@praxisui/dynamic-fields 9.0.0-beta.15 → 9.0.0-beta.17

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 CHANGED
@@ -162,6 +162,8 @@ Read-only and display states prefer the canonical `field.valuePresentation` cont
162
162
 
163
163
  Use `valuePresentation` for scalar display values such as currency, number, date, datetime, time, percentage, and boolean. Keep legacy hints such as `format`, `numericFormat`, `currency`, `numberFormat`, and `locale` only as compatibility inputs when needed.
164
164
 
165
+ Presentation formatting resolves locale in this order: `field.localization.locale`, `field.locale`, the canonical `PraxisI18nService` locale, Angular `LOCALE_ID`, then `en-US`. Host applications should configure the Praxis i18n service or field metadata instead of patching display labels locally.
166
+
165
167
  ## Inline Filters
166
168
 
167
169
  The package also exports inline field components for compact filter and toolbar experiences, including inline text, select, async select, entity lookup, numeric, currency, date, date range, time, rating, and specialized business filters.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-06-24T11:17:27.420Z",
3
+ "generatedAt": "2026-06-24T15:54:00.036Z",
4
4
  "packageName": "@praxisui/dynamic-fields",
5
- "packageVersion": "9.0.0-beta.15",
5
+ "packageVersion": "9.0.0-beta.17",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 76,
@@ -9064,7 +9064,7 @@ function resolveFieldPresentation(field, value, options) {
9064
9064
  const config = buildValuePresentationConfig(field, value);
9065
9065
  if (!config)
9066
9066
  return null;
9067
- const effectiveLocalization = mergeLocalization(options?.localization, buildLegacyFieldLocalization(field));
9067
+ const effectiveLocalization = mergeLocalization(mergeLocalization(buildLegacyFieldLocalization(field), field?.localization), options?.localization);
9068
9068
  const fallbackCurrencyCode = config.type === 'currency' && !config.currency?.code
9069
9069
  ? inferCurrencyCodeFromLocale(effectiveLocalization?.locale ||
9070
9070
  options?.surfaceLocale ||
@@ -9072,7 +9072,7 @@ function resolveFieldPresentation(field, value, options) {
9072
9072
  undefined)
9073
9073
  : undefined;
9074
9074
  return resolveValuePresentation(config, {
9075
- valueLocale: resolveFieldLocale(field),
9075
+ valueLocale: effectiveLocalization?.locale,
9076
9076
  localization: fallbackCurrencyCode
9077
9077
  ? mergeLocalization(effectiveLocalization, {
9078
9078
  ...(effectiveLocalization?.locale ? { locale: effectiveLocalization.locale } : {}),
@@ -9729,7 +9729,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
9729
9729
  * project additional chrome around the field.
9730
9730
  */
9731
9731
  class FieldShellComponent {
9732
- hostLocale = inject(LOCALE_ID, { optional: true }) ?? 'en-US';
9732
+ angularLocale = inject(LOCALE_ID, { optional: true }) ?? 'en-US';
9733
+ i18n = inject(PraxisI18nService, { optional: true });
9733
9734
  cdr = inject(ChangeDetectorRef);
9734
9735
  optionDisplayResolver = inject(OptionDisplayResolverService);
9735
9736
  crudService = inject(GenericCrudService, {
@@ -9898,7 +9899,7 @@ class FieldShellComponent {
9898
9899
  const formatted = typeof fn === 'function'
9899
9900
  ? fn(raw)
9900
9901
  : formatDisplayValue(this.field, raw, {
9901
- appLocale: this.hostLocale,
9902
+ appLocale: this.resolvePresentationAppLocale(),
9902
9903
  surfaceLocale: this.field?.localization?.locale ?? this.field?.locale ?? undefined,
9903
9904
  localization: this.field?.localization ?? undefined,
9904
9905
  });
@@ -9906,7 +9907,7 @@ class FieldShellComponent {
9906
9907
  }
9907
9908
  catch {
9908
9909
  return formatDisplayValue(this.field, raw, {
9909
- appLocale: this.hostLocale,
9910
+ appLocale: this.resolvePresentationAppLocale(),
9910
9911
  surfaceLocale: this.field?.localization?.locale ?? this.field?.locale ?? undefined,
9911
9912
  localization: this.field?.localization ?? undefined,
9912
9913
  });
@@ -9924,14 +9925,14 @@ class FieldShellComponent {
9924
9925
  : null;
9925
9926
  const val = formatted == null ? raw : formatted;
9926
9927
  return formatDisplayHtml(this.field, val, {
9927
- appLocale: this.hostLocale,
9928
+ appLocale: this.resolvePresentationAppLocale(),
9928
9929
  surfaceLocale: this.field?.localization?.locale ?? this.field?.locale ?? undefined,
9929
9930
  localization: this.field?.localization ?? undefined,
9930
9931
  });
9931
9932
  }
9932
9933
  catch {
9933
9934
  return formatDisplayHtml(this.field, raw, {
9934
- appLocale: this.hostLocale,
9935
+ appLocale: this.resolvePresentationAppLocale(),
9935
9936
  surfaceLocale: this.field?.localization?.locale ?? this.field?.locale ?? undefined,
9936
9937
  localization: this.field?.localization ?? undefined,
9937
9938
  });
@@ -10029,6 +10030,14 @@ class FieldShellComponent {
10029
10030
  const value = String(position ?? '').trim().toLowerCase();
10030
10031
  return ['end', 'right', 'after', 'suffix', 'trailing'].includes(value);
10031
10032
  }
10033
+ resolvePresentationAppLocale() {
10034
+ const praxisLocale = this.i18n?.getLocale()?.trim();
10035
+ if (praxisLocale) {
10036
+ return praxisLocale;
10037
+ }
10038
+ const angularLocale = this.angularLocale?.trim();
10039
+ return angularLocale || 'en-US';
10040
+ }
10032
10041
  refreshPresentationDisplayValue() {
10033
10042
  this.resolveSub?.unsubscribe();
10034
10043
  this.resolveSub = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@praxisui/dynamic-fields",
3
- "version": "9.0.0-beta.15",
3
+ "version": "9.0.0-beta.17",
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-beta.15",
15
- "@praxisui/cron-builder": "^9.0.0-beta.15"
14
+ "@praxisui/core": "^9.0.0-beta.17",
15
+ "@praxisui/cron-builder": "^9.0.0-beta.17"
16
16
  },
17
17
  "dependencies": {
18
18
  "libphonenumber-js": "^1.12.41",