@praxisui/dynamic-fields 8.0.0-beta.20 → 8.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -0
- package/docs/dynamic-fields-field-selection-guide.md +23 -0
- package/docs/dynamic-fields-inline-filter-runtime-contract.md +24 -0
- package/fesm2022/praxisui-dynamic-fields.mjs +1172 -156
- package/index.d.ts +47 -5
- package/package.json +3 -3
- package/src/lib/base/pdx-base-input-runtime-contract.json-api.md +30 -1
- package/src/lib/components/material-date-range/pdx-material-date-range.json-api.md +18 -5
- package/src/lib/components/material-datepicker/pdx-material-datepicker.json-api.md +16 -2
- package/src/lib/components/material-price-range/pdx-material-price-range.json-api.md +3 -0
package/index.d.ts
CHANGED
|
@@ -974,6 +974,7 @@ declare abstract class SimpleBaseSelectComponent<T = any> extends SimpleBaseInpu
|
|
|
974
974
|
/** Holds error message when option loading fails */
|
|
975
975
|
readonly error: _angular_core.WritableSignal<string | null>;
|
|
976
976
|
private readonly matSelectInitEffect;
|
|
977
|
+
private readonly multipleControlNormalizationEffect;
|
|
977
978
|
/** CRUD service for remote option loading (optional) */
|
|
978
979
|
protected readonly crudService: GenericCrudService<any> | null;
|
|
979
980
|
/** Emits whenever the selected value(s) change */
|
|
@@ -1011,6 +1012,8 @@ declare abstract class SimpleBaseSelectComponent<T = any> extends SimpleBaseInpu
|
|
|
1011
1012
|
protected defaultPanelClass(): string | string[] | undefined;
|
|
1012
1013
|
selectPanelClass(): string[];
|
|
1013
1014
|
protected isInteractionDisabled(): boolean;
|
|
1015
|
+
protected normalizeMultipleControlValue(): void;
|
|
1016
|
+
setExternalControl(control: AbstractControl): void;
|
|
1014
1017
|
/** Whether to show the clear button (if enabled in metadata) */
|
|
1015
1018
|
showClear(): boolean;
|
|
1016
1019
|
/** Clears the selection according to single/multiple mode */
|
|
@@ -1103,6 +1106,8 @@ declare abstract class SimpleBaseSelectComponent<T = any> extends SimpleBaseInpu
|
|
|
1103
1106
|
selectOption(option: SelectOption<T>): void;
|
|
1104
1107
|
/** Checks if the provided value is currently selected */
|
|
1105
1108
|
isSelected(value: T): boolean;
|
|
1109
|
+
isOptionDisabled(option: SelectOption<T>): boolean;
|
|
1110
|
+
protected areOptionValuesEqual(left: unknown, right: unknown): boolean;
|
|
1106
1111
|
/**
|
|
1107
1112
|
* Toggles selection of all options when `selectAll` is enabled in multiple
|
|
1108
1113
|
* selection mode.
|
|
@@ -1555,6 +1560,8 @@ declare class DynamicFieldLoaderDirective implements OnInit, OnDestroy, OnChange
|
|
|
1555
1560
|
/**
|
|
1556
1561
|
* Reatribui apenas os FormControls existentes aos componentes/shells sem refazer a renderização.
|
|
1557
1562
|
*/
|
|
1563
|
+
private hasSameRenderShape;
|
|
1564
|
+
private updateExistingFieldMetadata;
|
|
1558
1565
|
private rebindControlsOnly;
|
|
1559
1566
|
/** Destroi todos os componentes e limpa o container */
|
|
1560
1567
|
private destroyComponents;
|
|
@@ -1761,6 +1768,7 @@ declare class ColorInputComponent extends SimpleBaseInputComponent {
|
|
|
1761
1768
|
ngOnInit(): void;
|
|
1762
1769
|
validateField(): Promise<ValidationErrors | null>;
|
|
1763
1770
|
protected getSpecificCssClasses(): string[];
|
|
1771
|
+
effectiveFloatLabelBehavior(): 'always';
|
|
1764
1772
|
/** Applies component metadata with strong typing. */
|
|
1765
1773
|
setInputMetadata(metadata: MaterialColorInputMetadata): void;
|
|
1766
1774
|
/** Programmatically opens the native color picker if supported. */
|
|
@@ -1852,6 +1860,7 @@ declare class MaterialDatepickerComponent extends SimpleBaseInputComponent {
|
|
|
1852
1860
|
/** Applies component metadata with strong typing. */
|
|
1853
1861
|
setDatepickerMetadata(metadata: MaterialDatepickerMetadata): void;
|
|
1854
1862
|
isReadonlyEffective(): boolean;
|
|
1863
|
+
isInputReadonly(): boolean;
|
|
1855
1864
|
errorStateMatcher(): _angular_material_error_options_d_CGdTZUYk.E;
|
|
1856
1865
|
showClear(): boolean;
|
|
1857
1866
|
onClearClick(): void;
|
|
@@ -1895,16 +1904,26 @@ declare class MaterialDateRangeComponent extends SimpleBaseInputComponent implem
|
|
|
1895
1904
|
readonly maxDate: _angular_core.Signal<any>;
|
|
1896
1905
|
readonly startAt: _angular_core.Signal<any>;
|
|
1897
1906
|
overlayOpen: boolean;
|
|
1907
|
+
readonly shortcutOverlayViewportMargin = 12;
|
|
1908
|
+
private pickerOpen;
|
|
1898
1909
|
private readonly dateAdapter;
|
|
1899
1910
|
picker: MatDateRangePicker<Date>;
|
|
1911
|
+
private endDateInput?;
|
|
1900
1912
|
readonly shouldShowShortcuts: () => boolean;
|
|
1901
1913
|
readonly overlayPositions: () => ConnectedPosition[];
|
|
1914
|
+
private shortcutOverlayBelowPositions;
|
|
1915
|
+
private shortcutOverlayLeftPositions;
|
|
1916
|
+
private shortcutOverlayRightPositions;
|
|
1902
1917
|
readonly resolvedPresets: _angular_core.Signal<Record<string, DateRangePreset>>;
|
|
1903
1918
|
readonly shortcutItems: _angular_core.Signal<DateRangeShortcutItem[]>;
|
|
1904
1919
|
readonly activePresetId: () => string | null;
|
|
1905
1920
|
writeValue(value: unknown): void;
|
|
1906
1921
|
ngOnInit(): void;
|
|
1907
1922
|
protected shouldPropagateRangeGroupChanges(): boolean;
|
|
1923
|
+
protected focusEndDateInput(event: Event): void;
|
|
1924
|
+
private propagateRangeValue;
|
|
1925
|
+
private isEmptyRangeValue;
|
|
1926
|
+
private areDatesEqual;
|
|
1908
1927
|
validateField(): Promise<ValidationErrors | null>;
|
|
1909
1928
|
protected getSpecificCssClasses(): string[];
|
|
1910
1929
|
/** Applies component metadata with strong typing. */
|
|
@@ -2563,7 +2582,7 @@ declare class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
|
|
|
2563
2582
|
protected mapRemoteOption(option: AsyncOption): AsyncRenderedOption;
|
|
2564
2583
|
protected resolveRemoteOptionValue(option: AsyncOption): unknown;
|
|
2565
2584
|
protected resolveRemoteOptionDisabled(option: AsyncOption): boolean;
|
|
2566
|
-
|
|
2585
|
+
protected areOptionValuesEqual(left: unknown, right: unknown): boolean;
|
|
2567
2586
|
private normalizeRemoteOptionValue;
|
|
2568
2587
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MaterialAsyncSelectComponent, never>;
|
|
2569
2588
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MaterialAsyncSelectComponent, "pdx-material-async-select", never, { "readonlyMode": { "alias": "readonlyMode"; "required": false; }; "disabledMode": { "alias": "disabledMode"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "presentationMode": { "alias": "presentationMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -2794,6 +2813,9 @@ declare class InlineEntityLookupComponent extends MaterialAsyncSelectComponent {
|
|
|
2794
2813
|
dialogFilterOperatorHintText(operator: LookupFilterOperator): string;
|
|
2795
2814
|
dialogApplyFiltersActionText(): string;
|
|
2796
2815
|
dialogClearFiltersActionText(): string;
|
|
2816
|
+
dialogFilterSelectEmptyText(label: string): string;
|
|
2817
|
+
dialogFilterStartAriaLabelText(label: string): string;
|
|
2818
|
+
dialogFilterEndAriaLabelText(label: string): string;
|
|
2797
2819
|
dialogPreviewSelectionStateLabelText(): string;
|
|
2798
2820
|
dialogPreviewSelectionStateText(state: EntityLookupResultState): string;
|
|
2799
2821
|
dialogSearchAriaLabelText(): string;
|
|
@@ -2877,6 +2899,7 @@ declare class EntityLookupDialogComponent implements AfterViewInit {
|
|
|
2877
2899
|
readonly dialogSearchControl: FormControl<string | null>;
|
|
2878
2900
|
readonly filterPanelOpen: FormControl<boolean>;
|
|
2879
2901
|
private readonly dialogFilterControls;
|
|
2902
|
+
private readonly dialogFilterSecondaryControls;
|
|
2880
2903
|
private previewIdentity;
|
|
2881
2904
|
private activeResultIndex;
|
|
2882
2905
|
ngAfterViewInit(): void;
|
|
@@ -2902,9 +2925,22 @@ declare class EntityLookupDialogComponent implements AfterViewInit {
|
|
|
2902
2925
|
toggleFilterPanel(): void;
|
|
2903
2926
|
dialogFilterDefinitions(): LookupFilterDefinitionMetadata[];
|
|
2904
2927
|
filterPanelToggleText(): string;
|
|
2905
|
-
filterControl(field: string): FormControl<
|
|
2928
|
+
filterControl(field: string): FormControl<unknown>;
|
|
2929
|
+
filterSecondaryControl(field: string): FormControl<unknown>;
|
|
2906
2930
|
dialogFilterLabel(definition: LookupFilterDefinitionMetadata): string;
|
|
2907
2931
|
dialogFilterPlaceholder(definition: LookupFilterDefinitionMetadata): string;
|
|
2932
|
+
dialogFilterRangeEndPlaceholder(definition: LookupFilterDefinitionMetadata): string;
|
|
2933
|
+
dialogFilterStartAriaLabel(definition: LookupFilterDefinitionMetadata): string;
|
|
2934
|
+
dialogFilterEndAriaLabel(definition: LookupFilterDefinitionMetadata): string;
|
|
2935
|
+
dialogFilterInputType(definition: LookupFilterDefinitionMetadata): 'text' | 'date' | 'number';
|
|
2936
|
+
useDialogEnumSelect(definition: LookupFilterDefinitionMetadata): boolean;
|
|
2937
|
+
useDialogMultiSelect(definition: LookupFilterDefinitionMetadata): boolean;
|
|
2938
|
+
useDialogRangeInputs(definition: LookupFilterDefinitionMetadata): boolean;
|
|
2939
|
+
dialogFilterSelectEmptyText(definition: LookupFilterDefinitionMetadata): string;
|
|
2940
|
+
dialogEnumOptions(definition: LookupFilterDefinitionMetadata): Array<{
|
|
2941
|
+
value: string;
|
|
2942
|
+
label: string;
|
|
2943
|
+
}>;
|
|
2908
2944
|
dialogOperatorHint(definition: LookupFilterDefinitionMetadata): string;
|
|
2909
2945
|
applyDialogFiltersText(): string;
|
|
2910
2946
|
clearDialogFiltersText(): string;
|
|
@@ -2950,10 +2986,14 @@ declare class EntityLookupDialogComponent implements AfterViewInit {
|
|
|
2950
2986
|
previewSelectionStateLabel(): string;
|
|
2951
2987
|
previewSelectionStateText(item: EntityLookupViewModel): string;
|
|
2952
2988
|
private initializeDialogFilters;
|
|
2953
|
-
private
|
|
2989
|
+
private dialogFilterEmptyValue;
|
|
2990
|
+
private serializeDialogFilterSingleValue;
|
|
2991
|
+
private serializeDialogFilterScalarValue;
|
|
2954
2992
|
private buildDialogFilterRequest;
|
|
2955
|
-
private
|
|
2956
|
-
private
|
|
2993
|
+
private normalizeDialogFilterControlValue;
|
|
2994
|
+
private normalizeDialogFilterScalarValue;
|
|
2995
|
+
private resolveDialogFilterFieldValue;
|
|
2996
|
+
private pushDialogEnumOption;
|
|
2957
2997
|
private syncPreviewIdentity;
|
|
2958
2998
|
private focusResultRow;
|
|
2959
2999
|
private normalizeOptionValue;
|
|
@@ -5723,6 +5763,7 @@ declare class MaterialColorPickerComponent extends SimpleBaseInputComponent {
|
|
|
5723
5763
|
/** Handles color selection from the native input. */
|
|
5724
5764
|
onNativeColorChange(event: Event): void;
|
|
5725
5765
|
protected getSpecificCssClasses(): string[];
|
|
5766
|
+
effectiveFloatLabelBehavior(): 'always';
|
|
5726
5767
|
errorStateMatcher(): _angular_material_error_options_d_CGdTZUYk.E;
|
|
5727
5768
|
isReadonlyEffective(): boolean;
|
|
5728
5769
|
previewColor(): string;
|
|
@@ -5920,6 +5961,7 @@ declare class PdxColorPickerComponent extends SimpleBaseInputComponent implement
|
|
|
5920
5961
|
readonlyEffective(): boolean;
|
|
5921
5962
|
errorStateMatcher(): _angular_material_error_options_d_CGdTZUYk.E;
|
|
5922
5963
|
protected getSpecificCssClasses(): string[];
|
|
5964
|
+
effectiveFloatLabelBehavior(): 'always';
|
|
5923
5965
|
setInputMetadata(meta: ComponentMetadata | null): void;
|
|
5924
5966
|
private currentMetadataRecord;
|
|
5925
5967
|
private asRecord;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/dynamic-fields",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.22",
|
|
4
4
|
"description": "Angular Material-based dynamic form fields for Praxis UI with lazy loading and metadata-driven rendering.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.1.0",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"@angular/platform-browser": "^20.1.0",
|
|
12
12
|
"@angular/router": "^20.1.0",
|
|
13
13
|
"rxjs": "^7.8.0",
|
|
14
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
15
|
-
"@praxisui/cron-builder": "^8.0.0-beta.
|
|
14
|
+
"@praxisui/core": "^8.0.0-beta.22",
|
|
15
|
+
"@praxisui/cron-builder": "^8.0.0-beta.22"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"libphonenumber-js": "^1.12.41",
|
|
@@ -373,6 +373,33 @@ Limites:
|
|
|
373
373
|
| `metadata.ariaDescribedby` | `string` | Active | `aria-describedby` no elemento nativo. |
|
|
374
374
|
| `metadata.ariaLabelledby` | `string` | Active | `aria-labelledby` no elemento nativo. |
|
|
375
375
|
|
|
376
|
+
#### Politica de label com prefixos e sufixos
|
|
377
|
+
|
|
378
|
+
Quando um campo usa `metadata.prefixIcon`, `metadata.suffixIcon`, `clearButton`,
|
|
379
|
+
datepicker toggle, seletor de cor, simbolo de moeda ou qualquer outro conteudo
|
|
380
|
+
renderizado via `matPrefix`/`matSuffix`, a politica recomendada para
|
|
381
|
+
`materialDesign.appearance = 'fill'` ou `'outline'` e:
|
|
382
|
+
|
|
383
|
+
```json
|
|
384
|
+
{
|
|
385
|
+
"materialDesign": {
|
|
386
|
+
"appearance": "outline",
|
|
387
|
+
"floatLabel": "always",
|
|
388
|
+
"subscriptSizing": "dynamic"
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
Essa regra segue a limitacao documentada pelo Angular Material para campos
|
|
394
|
+
`fill`/`outline`: label em repouso e valor do input nao compartilham o mesmo
|
|
395
|
+
alinhamento, entao prefixos/sufixos podem conflitar visualmente com o label
|
|
396
|
+
quando `floatLabel = 'auto'`.
|
|
397
|
+
|
|
398
|
+
Para superficies geradas, como filtros avancados, preferir aplicar essa politica
|
|
399
|
+
na camada global que materializa a metadata dos campos. Evite corrigir com CSS
|
|
400
|
+
local movendo label, icone ou notch do `mat-form-field`; esses detalhes sao
|
|
401
|
+
internos do Angular Material e podem mudar entre versoes.
|
|
402
|
+
|
|
376
403
|
#### Saidas runtime compartilhadas
|
|
377
404
|
|
|
378
405
|
| Output | Tipo | Quando ocorre |
|
|
@@ -387,7 +414,8 @@ Limites:
|
|
|
387
414
|
1. Tratar `metadata.validators.*` como contrato de UX, sem substituir validacao de dominio no backend.
|
|
388
415
|
2. Manter consistencia entre `required`, `visible` e regras de negocio para evitar bloqueio de submit com campo oculto.
|
|
389
416
|
3. Padronizar `materialDesign` por design system (aparencia, cor e floatLabel) para reduzir variacao visual entre equipes.
|
|
390
|
-
4. Usar `
|
|
417
|
+
4. Usar `floatLabel: 'always'` em campos `fill`/`outline` com prefixos, sufixos ou icones Material.
|
|
418
|
+
5. Usar `clearButton` com `ariaLabel` para conformidade de acessibilidade.
|
|
391
419
|
|
|
392
420
|
#### Cross-links
|
|
393
421
|
|
|
@@ -400,6 +428,7 @@ Limites:
|
|
|
400
428
|
|
|
401
429
|
- Acessibilidade em Angular: https://angular.dev/best-practices/a11y
|
|
402
430
|
- Criacao e manutencao de libraries: https://angular.dev/tools/libraries/creating-libraries
|
|
431
|
+
- Angular Material `mat-form-field`: https://material.angular.io/components/form-field/overview
|
|
403
432
|
|
|
404
433
|
## JSON path index
|
|
405
434
|
|
|
@@ -24,8 +24,9 @@ source_of_truth:
|
|
|
24
24
|
- "projects/praxis-core/src/lib/models/component-metadata.interface.ts"
|
|
25
25
|
- "projects/praxis-core/src/lib/utils/date-range-presets.util.ts"
|
|
26
26
|
- "projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts"
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
- "projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts"
|
|
28
|
+
source_of_truth_last_verified: "2026-05-06"
|
|
29
|
+
last_updated: "2026-05-06"
|
|
29
30
|
toc: true
|
|
30
31
|
sidebar: true
|
|
31
32
|
tags:
|
|
@@ -84,6 +85,7 @@ Este documento e a referencia canonica da API JSON de pdx-material-date-range.
|
|
|
84
85
|
| projects/praxis-core/src/lib/models/component-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidencia de contrato. |
|
|
85
86
|
| projects/praxis-core/src/lib/utils/date-range-presets.util.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
|
|
86
87
|
| projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
|
|
88
|
+
| projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts | runtime-code | Adapter canonico de parsing manual de datas usado pelos controles Material de data. |
|
|
87
89
|
|
|
88
90
|
## Support legend
|
|
89
91
|
|
|
@@ -163,6 +165,14 @@ Nao ha paths experimentais confirmados no contrato publico desta revisao.
|
|
|
163
165
|
| `metadata.endPlaceholder` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
|
|
164
166
|
| `metadata.startAriaLabel` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
|
|
165
167
|
|
|
168
|
+
### Manual date parsing
|
|
169
|
+
|
|
170
|
+
- Digitacao manual usa `PraxisNativeDateAdapter` e respeita o `LOCALE_ID` do host.
|
|
171
|
+
- Em locales nao ingleses, como `pt-BR`, datas numericas sao interpretadas como `dd/MM/yyyy`.
|
|
172
|
+
- Em locales ingleses, datas numericas sao interpretadas como `MM/dd/yyyy`.
|
|
173
|
+
- Strings ISO date-only (`YYYY-MM-DD`) sao tratadas como data local, sem deslocamento por timezone.
|
|
174
|
+
- Valores enviados ao backend por ranges devem preservar a semantica date-only quando o campo representa uma data civil.
|
|
175
|
+
|
|
166
176
|
### Input bindings (inbound data)
|
|
167
177
|
|
|
168
178
|
| Binding/Path | Type | Required | Source | Runtime normalization | Notes |
|
|
@@ -199,6 +209,7 @@ Nao ha paths experimentais confirmados no contrato publico desta revisao.
|
|
|
199
209
|
| `component-metadata.interface.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/models/component-metadata.interface.ts`. |
|
|
200
210
|
| `date-range-presets.util.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/utils/date-range-presets.util.ts`. |
|
|
201
211
|
| `simple-base-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`. |
|
|
212
|
+
| `praxis-native-date-adapter.ts` | true | browser/dev/prod/ssr | locale-aware date parsing | Refer to `projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts`. |
|
|
202
213
|
|
|
203
214
|
## Coverage by surface (obrigatorio)
|
|
204
215
|
|
|
@@ -300,6 +311,7 @@ Use quando precisar:
|
|
|
300
311
|
|
|
301
312
|
Observacao:
|
|
302
313
|
- valor do campo segue `DateRangeValue` com `startDate` e `endDate` (e opcionalmente `preset`, `label`, `timezone`).
|
|
314
|
+
- Durante a selecao pelo `mat-date-range-picker`, o componente nao propaga um range parcial enquanto o overlay esta aberto; `valueChange` e write-back externo sao emitidos quando inicio e fim estao preenchidos ou quando o picker fecha.
|
|
303
315
|
|
|
304
316
|
### 3. Matriz de Cobertura JSON (Completa)
|
|
305
317
|
#### 3.1 Campos especificos do componente
|
|
@@ -318,7 +330,7 @@ Observacao:
|
|
|
318
330
|
| `metadata.endAriaLabel` | `string` | Ativo | ARIA label do input de fim. |
|
|
319
331
|
| `metadata.showShortcuts` | `boolean` | Ativo | Exibe overlay de atalhos ao abrir picker. |
|
|
320
332
|
| `metadata.shortcuts` | `Array<string \| DateRangePreset>` | Ativo | Define atalhos builtin e customizados. |
|
|
321
|
-
| `metadata.shortcutsPosition` | `'left' \| 'right'` | Ativo | Posicao do overlay de atalhos. |
|
|
333
|
+
| `metadata.shortcutsPosition` | `'auto' \| 'below' \| 'left' \| 'right'` | Ativo | Posicao preferencial do overlay de atalhos. O default `auto` prioriza posicionamento abaixo do campo, com fallback lateral e protecao contra recorte no viewport. |
|
|
322
334
|
| `metadata.applyOnShortcutClick` | `boolean` | Ativo | Aplica e fecha automaticamente ao clicar no atalho. |
|
|
323
335
|
| `metadata.i18nShortcuts` | `Partial<Record<...>>` | Ativo | Sobrescreve labels de atalhos builtin. |
|
|
324
336
|
| `metadata.timezone` | `string` | Ativo | Contexto de timezone para calculo de presets builtin. |
|
|
@@ -349,7 +361,7 @@ Resumo de composicao deste componente:
|
|
|
349
361
|
- Paginacao: nao se aplica.
|
|
350
362
|
- Ordenacao: nao se aplica.
|
|
351
363
|
- Selecao: objeto `DateRangeValue` (`startDate`, `endDate`, opcional `preset`).
|
|
352
|
-
- Eventos: `validationChange` + outputs herdados (`valueChange`, `focusChange`, `nativeBlur`, `nativeChange`).
|
|
364
|
+
- Eventos: `validationChange` + outputs herdados (`valueChange`, `focusChange`, `nativeBlur`, `nativeChange`). `valueChange` evita range parcial durante a selecao aberta para preservar o fluxo de escolha de inicio e fim.
|
|
353
365
|
- Renderizacao: `mat-date-range-input` + `mat-date-range-picker` + overlay opcional de atalhos.
|
|
354
366
|
|
|
355
367
|
### 5. Exemplo Minimo (JSON + Uso)
|
|
@@ -455,7 +467,7 @@ Correcao: verificar `applyOnShortcutClick`; com `false`, o fluxo exige acao manu
|
|
|
455
467
|
| Event | Payload | Trigger | Stability | Notes |
|
|
456
468
|
| --- | --- | --- | --- | --- |
|
|
457
469
|
| `validationChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
|
|
458
|
-
| `valueChange` | unknown | runtime-event | Experimental |
|
|
470
|
+
| `valueChange` | unknown | runtime-event | Experimental | Durante seleção pelo picker, o valor é publicado apenas após o fechamento do calendário; digitação manual fora do picker continua propagando pelas regras normais do CVA. |
|
|
459
471
|
| `focusChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
|
|
460
472
|
| `nativeBlur` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
|
|
461
473
|
| `nativeChange` | unknown | runtime-event | Experimental | Check component/runtime implementation. |
|
|
@@ -621,3 +633,4 @@ Correcao: verificar `applyOnShortcutClick`; com `false`, o fluxo exige acao manu
|
|
|
621
633
|
| 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 |
|
|
622
634
|
| runtime-code | projects/praxis-core/src/lib/utils/date-range-presets.util.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
|
|
623
635
|
| runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
|
|
636
|
+
| runtime-code | projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts | Source of truth for locale-aware manual date parsing. | 2026-05-06 | verified-path |
|
|
@@ -22,8 +22,9 @@ source_of_truth:
|
|
|
22
22
|
- "projects/praxis-dynamic-fields/src/lib/components/material-datepicker/material-datepicker.component.ts"
|
|
23
23
|
- "projects/praxis-core/src/lib/models/material-field-metadata.interface.ts"
|
|
24
24
|
- "projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts"
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
- "projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts"
|
|
26
|
+
source_of_truth_last_verified: "2026-05-06"
|
|
27
|
+
last_updated: "2026-05-06"
|
|
27
28
|
toc: true
|
|
28
29
|
sidebar: true
|
|
29
30
|
tags:
|
|
@@ -81,6 +82,7 @@ Este documento e a referencia canonica da API JSON de pdx-material-datepicker.
|
|
|
81
82
|
| projects/praxis-dynamic-fields/src/lib/components/material-datepicker/material-datepicker.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
|
|
82
83
|
| projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | schema-types | Arquivo presente no repositorio e usado como evidencia de contrato. |
|
|
83
84
|
| projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | runtime-code | Arquivo presente no repositorio e usado como evidencia de contrato. |
|
|
85
|
+
| projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts | runtime-code | Adapter canonico de parsing manual de datas usado pelos controles Material de data. |
|
|
84
86
|
|
|
85
87
|
## Support legend
|
|
86
88
|
|
|
@@ -118,6 +120,7 @@ Este documento e a referencia canonica da API JSON de pdx-material-datepicker.
|
|
|
118
120
|
| `metadata.controlType` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
|
|
119
121
|
| `metadata.minDate` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
|
|
120
122
|
| `metadata.maxDate` | string | false | n/a | Partial | See Detailed API reference for runtime semantics. |
|
|
123
|
+
| `metadata.manualInput` | boolean | false | `true` | Active | `false` keeps calendar selection enabled while making the text input readonly. |
|
|
121
124
|
|
|
122
125
|
### Supported legacy paths
|
|
123
126
|
|
|
@@ -155,6 +158,15 @@ Nao ha paths experimentais confirmados no contrato publico desta revisao.
|
|
|
155
158
|
| `metadata.touchUi` | boolean | false | n/a | component-defined | Partial; verify per source_of_truth. |
|
|
156
159
|
| `metadata.dateFilter` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
|
|
157
160
|
| `metadata.dateFormat` | string | false | n/a | component-defined | Partial; verify per source_of_truth. |
|
|
161
|
+
| `metadata.manualInput` | boolean | false | `true` | `false` blocks manual typing without activating readonly field semantics. | Use for locale-sensitive dates where typed strings would be ambiguous. |
|
|
162
|
+
|
|
163
|
+
### Manual date parsing
|
|
164
|
+
|
|
165
|
+
- Digitacao manual usa `PraxisNativeDateAdapter` e respeita o `LOCALE_ID` do host.
|
|
166
|
+
- Em locales nao ingleses, como `pt-BR`, datas numericas sao interpretadas como `dd/MM/yyyy`.
|
|
167
|
+
- Em locales ingleses, datas numericas sao interpretadas como `MM/dd/yyyy`.
|
|
168
|
+
- Strings ISO date-only (`YYYY-MM-DD`) sao tratadas como data local, sem deslocamento por timezone.
|
|
169
|
+
- Use `metadata.manualInput: false` quando o host quiser bloquear digitacao manual e manter apenas selecao pelo calendario.
|
|
158
170
|
|
|
159
171
|
### Input bindings (inbound data)
|
|
160
172
|
|
|
@@ -190,6 +202,7 @@ Nao ha paths experimentais confirmados no contrato publico desta revisao.
|
|
|
190
202
|
| `material-datepicker.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/components/material-datepicker/material-datepicker.component.ts`. |
|
|
191
203
|
| `material-field-metadata.interface.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-core/src/lib/models/material-field-metadata.interface.ts`. |
|
|
192
204
|
| `simple-base-input.component.ts` | true | browser/dev/prod/ssr | contract resolution | Refer to `projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts`. |
|
|
205
|
+
| `praxis-native-date-adapter.ts` | true | browser/dev/prod/ssr | locale-aware date parsing | Refer to `projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts`. |
|
|
193
206
|
|
|
194
207
|
## Coverage by surface (obrigatorio)
|
|
195
208
|
|
|
@@ -535,3 +548,4 @@ Correcao: validar `validators`/matcher e estado touched/dirty do controle no hos
|
|
|
535
548
|
| runtime-code | projects/praxis-dynamic-fields/src/lib/components/material-datepicker/material-datepicker.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
|
|
536
549
|
| schema-types | projects/praxis-core/src/lib/models/material-field-metadata.interface.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
|
|
537
550
|
| runtime-code | projects/praxis-dynamic-fields/src/lib/base/simple-base-input.component.ts | Primary source of truth for contract and behavior. | 2026-03-06 | verified-path |
|
|
551
|
+
| runtime-code | projects/praxis-dynamic-fields/src/lib/utils/praxis-native-date-adapter.ts | Source of truth for locale-aware manual date parsing. | 2026-05-06 | verified-path |
|
|
@@ -277,6 +277,9 @@ Em conflito entre alias legado e path canonico, priorizar path canonico e regist
|
|
|
277
277
|
|
|
278
278
|
### 1. Visao Geral e Quando Usar
|
|
279
279
|
`pdx-material-price-range` compoe dois `pdx-material-currency` para modelar faixa monetaria (`minPrice`/`maxPrice`).
|
|
280
|
+
O label do grupo identifica a faixa completa, enquanto `startLabel` e
|
|
281
|
+
`endLabel` identificam as entradas internas. `hint` e renderizado como helper
|
|
282
|
+
text abaixo do grupo, com a mesma hierarquia visual dos hints de `mat-form-field`.
|
|
280
283
|
|
|
281
284
|
Use quando precisar:
|
|
282
285
|
- capturar intervalo financeiro com mascara de moeda;
|