@praxisui/dynamic-fields 9.0.0 → 9.0.1

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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-07-26T13:23:40.838Z",
3
+ "generatedAt": "2026-07-26T21:12:06.328Z",
4
4
  "packageName": "@praxisui/dynamic-fields",
5
- "packageVersion": "9.0.0",
5
+ "packageVersion": "9.0.1",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 76,
@@ -12673,6 +12673,7 @@ class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
12673
12673
  termControl = new FormControl('');
12674
12674
  activeLookupFilters = signal([], ...(ngDevMode ? [{ debugName: "activeLookupFilters" }] : /* istanbul ignore next */ []));
12675
12675
  selectedLookupSortKey = signal(null, ...(ngDevMode ? [{ debugName: "selectedLookupSortKey" }] : /* istanbul ignore next */ []));
12676
+ selectedLookupSearchStrategyKey = signal(null, ...(ngDevMode ? [{ debugName: "selectedLookupSearchStrategyKey" }] : /* istanbul ignore next */ []));
12676
12677
  remoteTotalElements = signal(null, ...(ngDevMode ? [{ debugName: "remoteTotalElements" }] : /* istanbul ignore next */ []));
12677
12678
  queryTerm = signal('', ...(ngDevMode ? [{ debugName: "queryTerm" }] : /* istanbul ignore next */ []));
12678
12679
  store = new OptionStore();
@@ -12959,14 +12960,20 @@ class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
12959
12960
  lookupFilterDefinitions() {
12960
12961
  return this.currentLookupFiltering()?.availableFilters ?? [];
12961
12962
  }
12963
+ lookupSearchStrategies() {
12964
+ return this.currentLookupFiltering()?.searchStrategies ?? [];
12965
+ }
12962
12966
  initializeLookupFilteringState() {
12963
12967
  const filtering = this.currentLookupFiltering();
12964
12968
  if (!filtering) {
12965
12969
  this.selectedLookupSortKey.set(null);
12970
+ this.selectedLookupSearchStrategyKey.set(null);
12966
12971
  this.activeLookupFilters.set([]);
12967
12972
  return;
12968
12973
  }
12969
12974
  this.selectedLookupSortKey.set(filtering.defaultSort ?? null);
12975
+ const strategies = filtering.searchStrategies ?? [];
12976
+ this.selectedLookupSearchStrategyKey.set(strategies.length === 1 ? strategies[0].key : null);
12970
12977
  this.activeLookupFilters.set(this.buildDefaultLookupFilters(filtering));
12971
12978
  }
12972
12979
  buildDefaultLookupFilters(filtering) {
@@ -13011,6 +13018,27 @@ class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
13011
13018
  hasMultipleLookupSortOptions() {
13012
13019
  return this.lookupSortOptions().length > 1;
13013
13020
  }
13021
+ hasMultipleLookupSearchStrategies() {
13022
+ return this.lookupSearchStrategies().length > 1;
13023
+ }
13024
+ lookupSearchStrategySelectValue() {
13025
+ return this.selectedLookupSearchStrategyKey() ?? '';
13026
+ }
13027
+ setLookupSearchStrategyKey(strategyKey) {
13028
+ const normalized = typeof strategyKey === 'string' && strategyKey.trim()
13029
+ ? strategyKey.trim()
13030
+ : null;
13031
+ if (this.selectedLookupSearchStrategyKey() === normalized)
13032
+ return;
13033
+ this.selectedLookupSearchStrategyKey.set(normalized);
13034
+ this.refreshLookupQueryState();
13035
+ }
13036
+ lookupSearchStrategyLabelText() {
13037
+ return this.tDynamicFields('select.searchStrategyLabel', 'Buscar por');
13038
+ }
13039
+ lookupSearchStrategyDefaultOptionText() {
13040
+ return this.tDynamicFields('select.searchStrategyDefaultOption', 'Selecione uma estratégia');
13041
+ }
13014
13042
  hasActiveLookupFilters() {
13015
13043
  return this.activeLookupFilters().length > 0;
13016
13044
  }
@@ -13211,6 +13239,9 @@ class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
13211
13239
  ...(include || {}),
13212
13240
  observeVersionHeader: observeVersion,
13213
13241
  search: term || undefined,
13242
+ ...(this.selectedLookupSearchStrategyKey()
13243
+ ? { searchStrategy: this.selectedLookupSearchStrategyKey() }
13244
+ : {}),
13214
13245
  sortKey: this.selectedLookupSortKey() || undefined,
13215
13246
  filters: this.activeLookupFilters(),
13216
13247
  })
@@ -17135,6 +17166,29 @@ class EntityLookupDialogComponent {
17135
17166
  showSortControl() {
17136
17167
  return this.lookup().showLookupSortControl();
17137
17168
  }
17169
+ showSearchStrategyControl() {
17170
+ return this.lookup().hasMultipleLookupSearchStrategies();
17171
+ }
17172
+ searchStrategies() {
17173
+ return this.lookup().lookupSearchStrategies();
17174
+ }
17175
+ trackLookupSearchStrategy(index, strategy) {
17176
+ return strategy.key || String(index);
17177
+ }
17178
+ searchStrategyValue() {
17179
+ return this.lookup().lookupSearchStrategySelectValue();
17180
+ }
17181
+ onSearchStrategyChange(event) {
17182
+ const source = event.target;
17183
+ const value = source instanceof HTMLSelectElement ? source.value : '';
17184
+ this.lookup().setLookupSearchStrategyKey(value || null);
17185
+ }
17186
+ searchStrategyLabel() {
17187
+ return this.lookup().lookupSearchStrategyLabelText();
17188
+ }
17189
+ searchStrategyDefaultLabel() {
17190
+ return this.lookup().lookupSearchStrategyDefaultOptionText();
17191
+ }
17138
17192
  sortOptions() {
17139
17193
  return this.lookup().lookupSortOptions();
17140
17194
  }
@@ -17837,6 +17891,24 @@ class EntityLookupDialogComponent {
17837
17891
  </label>
17838
17892
  }
17839
17893
 
17894
+ @if (showSearchStrategyControl()) {
17895
+ <label class="pdx-lookup-dialog-sort">
17896
+ <span>{{ searchStrategyLabel() }}</span>
17897
+ <select
17898
+ [value]="searchStrategyValue()"
17899
+ (change)="onSearchStrategyChange($event)"
17900
+ >
17901
+ <option value="">{{ searchStrategyDefaultLabel() }}</option>
17902
+ @for (
17903
+ strategy of searchStrategies();
17904
+ track trackLookupSearchStrategy($index, strategy)
17905
+ ) {
17906
+ <option [value]="strategy.key">{{ strategy.key }}</option>
17907
+ }
17908
+ </select>
17909
+ </label>
17910
+ }
17911
+
17840
17912
  @if (hasStructuredDialogFilters()) {
17841
17913
  <button
17842
17914
  mat-stroked-button
@@ -18358,6 +18430,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
18358
18430
  </label>
18359
18431
  }
18360
18432
 
18433
+ @if (showSearchStrategyControl()) {
18434
+ <label class="pdx-lookup-dialog-sort">
18435
+ <span>{{ searchStrategyLabel() }}</span>
18436
+ <select
18437
+ [value]="searchStrategyValue()"
18438
+ (change)="onSearchStrategyChange($event)"
18439
+ >
18440
+ <option value="">{{ searchStrategyDefaultLabel() }}</option>
18441
+ @for (
18442
+ strategy of searchStrategies();
18443
+ track trackLookupSearchStrategy($index, strategy)
18444
+ ) {
18445
+ <option [value]="strategy.key">{{ strategy.key }}</option>
18446
+ }
18447
+ </select>
18448
+ </label>
18449
+ }
18450
+
18361
18451
  @if (hasStructuredDialogFilters()) {
18362
18452
  <button
18363
18453
  mat-stroked-button
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/dynamic-fields",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
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": "^21.0.0",
@@ -11,8 +11,8 @@
11
11
  "@angular/platform-browser": "^21.0.0",
12
12
  "@angular/router": "^21.0.0",
13
13
  "rxjs": "^7.8.0",
14
- "@praxisui/core": "^9.0.0",
15
- "@praxisui/cron-builder": "^9.0.0"
14
+ "@praxisui/core": "^9.0.1",
15
+ "@praxisui/cron-builder": "^9.0.1"
16
16
  },
17
17
  "dependencies": {
18
18
  "libphonenumber-js": "^1.12.41",
@@ -3,7 +3,7 @@ import { WritableSignal, InjectionToken, Provider, OnInit, OnDestroy, AfterViewI
3
3
  import { AbstractControl, ControlValueAccessor, NgControl, ValidationErrors, FormControl, FormGroup, FormArray, FormGroupDirective, NgForm } from '@angular/forms';
4
4
  import { Observable, BehaviorSubject, Subscription } from 'rxjs';
5
5
  import * as _praxisui_core from '@praxisui/core';
6
- import { ComponentMetadata, PraxisTextValue, PraxisI18nDictionary, PraxisI18nConfig, PraxisI18nMessageDescriptor, PraxisI18nService, FormFieldHelpDisplay, GlobalActionService, GlobalActionRef, OptionSourceMetadata, GenericCrudService, GlobalConfigService, OptionDTO, ComponentMetadataEditorialDescriptor, ComponentDocMeta, ComponentMetadataRegistry, FieldMetadata, MaterialButtonMetadata, FieldArrayConfig, MaterialInputMetadata, MaterialColorInputMetadata, MaterialDateInputMetadata, MaterialDatepickerMetadata, MaterialDateRangeMetadata, DateRangePreset, DateRangeShortcutPreset, StaticPresetResolutionOptions, StaticDateRangePreset, DateRangeValue, MaterialDatetimeLocalInputMetadata, MaterialEmailInputMetadata, MaterialTextareaMetadata, MaterialNumericMetadata, MaterialCurrencyMetadata, MaterialCpfCnpjMetadata, MaterialPriceRangeMetadata, MaterialMonthInputMetadata, MaterialPasswordMetadata, MaterialSearchInputMetadata, MaterialSelectMetadata, LookupFilterRequest, LookupFilteringMetadata, LookupSortOptionMetadata, LookupFilterDefinitionMetadata, MaterialEntityLookupMetadata, LookupStatusTone, EntityLookupResultState, EntityLookupResult, LookupDialogMetadata, LookupFilterOperator, LookupFilterFieldType, LookupResultColumnMetadata, MaterialAutocompleteMetadata, RangeSliderMark, RangeSliderSemanticTone, MaterialToggleMetadata, MaterialRangeSliderMetadata, RangeSliderValue, InlinePeriodRangeMetadata, FieldControlType, MaterialTimepickerMetadata, MaterialTimeRangeMetadata, MaterialTreeNode, MaterialTreeSelectMetadata, MaterialMultiSelectTreeMetadata, MaterialChipsMetadata, RangeSliderSemanticBand, MaterialSliderMetadata, MaterialPhoneMetadata, MaterialTimeInputMetadata, MaterialUrlInputMetadata, MaterialWeekInputMetadata, MaterialColorPickerMetadata, MaterialYearInputMetadata, CapabilityCatalog, ComponentAuthoringManifest, ManifestControlProfile } from '@praxisui/core';
6
+ import { ComponentMetadata, PraxisTextValue, PraxisI18nDictionary, PraxisI18nConfig, PraxisI18nMessageDescriptor, PraxisI18nService, FormFieldHelpDisplay, GlobalActionService, GlobalActionRef, OptionSourceMetadata, GenericCrudService, GlobalConfigService, OptionDTO, ComponentMetadataEditorialDescriptor, ComponentDocMeta, ComponentMetadataRegistry, FieldMetadata, MaterialButtonMetadata, FieldArrayConfig, MaterialInputMetadata, MaterialColorInputMetadata, MaterialDateInputMetadata, MaterialDatepickerMetadata, MaterialDateRangeMetadata, DateRangePreset, DateRangeShortcutPreset, StaticPresetResolutionOptions, StaticDateRangePreset, DateRangeValue, MaterialDatetimeLocalInputMetadata, MaterialEmailInputMetadata, MaterialTextareaMetadata, MaterialNumericMetadata, MaterialCurrencyMetadata, MaterialCpfCnpjMetadata, MaterialPriceRangeMetadata, MaterialMonthInputMetadata, MaterialPasswordMetadata, MaterialSearchInputMetadata, MaterialSelectMetadata, LookupFilterRequest, LookupFilteringMetadata, LookupSortOptionMetadata, LookupFilterDefinitionMetadata, LookupSearchStrategyMetadata, MaterialEntityLookupMetadata, LookupStatusTone, EntityLookupResultState, EntityLookupResult, LookupDialogMetadata, LookupFilterOperator, LookupFilterFieldType, LookupResultColumnMetadata, MaterialAutocompleteMetadata, RangeSliderMark, RangeSliderSemanticTone, MaterialToggleMetadata, MaterialRangeSliderMetadata, RangeSliderValue, InlinePeriodRangeMetadata, FieldControlType, MaterialTimepickerMetadata, MaterialTimeRangeMetadata, MaterialTreeNode, MaterialTreeSelectMetadata, MaterialMultiSelectTreeMetadata, MaterialChipsMetadata, RangeSliderSemanticBand, MaterialSliderMetadata, MaterialPhoneMetadata, MaterialTimeInputMetadata, MaterialUrlInputMetadata, MaterialWeekInputMetadata, MaterialColorPickerMetadata, MaterialYearInputMetadata, CapabilityCatalog, ComponentAuthoringManifest, ManifestControlProfile } from '@praxisui/core';
7
7
  import { Router } from '@angular/router';
8
8
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
9
9
  import { MatSelect } from '@angular/material/select';
@@ -2730,6 +2730,7 @@ declare class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
2730
2730
  readonly termControl: FormControl<unknown>;
2731
2731
  readonly activeLookupFilters: _angular_core.WritableSignal<LookupFilterRequest[]>;
2732
2732
  readonly selectedLookupSortKey: _angular_core.WritableSignal<string | null>;
2733
+ readonly selectedLookupSearchStrategyKey: _angular_core.WritableSignal<string | null>;
2733
2734
  protected readonly remoteTotalElements: _angular_core.WritableSignal<number | null>;
2734
2735
  private readonly queryTerm;
2735
2736
  private readonly store;
@@ -2767,12 +2768,18 @@ declare class MaterialAsyncSelectComponent extends SimpleBaseSelectComponent {
2767
2768
  protected currentLookupFiltering(): LookupFilteringMetadata | null;
2768
2769
  lookupSortOptions(): LookupSortOptionMetadata[];
2769
2770
  lookupFilterDefinitions(): LookupFilterDefinitionMetadata[];
2771
+ lookupSearchStrategies(): LookupSearchStrategyMetadata[];
2770
2772
  protected initializeLookupFilteringState(): void;
2771
2773
  protected buildDefaultLookupFilters(filtering: LookupFilteringMetadata): LookupFilterRequest[];
2772
2774
  protected normalizeLookupFilterValue(operator: LookupFilterRequest['operator'], values: unknown[]): unknown;
2773
2775
  hasLookupFiltering(): boolean;
2774
2776
  hasLookupSortOptions(): boolean;
2775
2777
  hasMultipleLookupSortOptions(): boolean;
2778
+ hasMultipleLookupSearchStrategies(): boolean;
2779
+ lookupSearchStrategySelectValue(): string;
2780
+ setLookupSearchStrategyKey(strategyKey: string | null): void;
2781
+ lookupSearchStrategyLabelText(): string;
2782
+ lookupSearchStrategyDefaultOptionText(): string;
2776
2783
  hasActiveLookupFilters(): boolean;
2777
2784
  lookupFilterForField(field: string): LookupFilterRequest | undefined;
2778
2785
  setLookupSortKey(sortKey: string | null): void;
@@ -3204,6 +3211,15 @@ declare class EntityLookupDialogComponent implements AfterViewInit {
3204
3211
  dialogFiltersAriaLabel(): string;
3205
3212
  dialogPreviewAriaLabel(): string;
3206
3213
  showSortControl(): boolean;
3214
+ showSearchStrategyControl(): boolean;
3215
+ searchStrategies(): _praxisui_core.LookupSearchStrategyMetadata[];
3216
+ trackLookupSearchStrategy(index: number, strategy: {
3217
+ key?: string;
3218
+ }): string;
3219
+ searchStrategyValue(): string;
3220
+ onSearchStrategyChange(event: Event): void;
3221
+ searchStrategyLabel(): string;
3222
+ searchStrategyDefaultLabel(): string;
3207
3223
  sortOptions(): _praxisui_core.LookupSortOptionMetadata[];
3208
3224
  trackLookupSortOption(index: number, option: {
3209
3225
  key?: string;