@praxisui/crud 9.0.0-beta.51 → 9.0.0-beta.53

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-08T19:26:37.325Z",
3
+ "generatedAt": "2026-07-08T21:05:33.044Z",
4
4
  "packageName": "@praxisui/crud",
5
- "packageVersion": "9.0.0-beta.51",
5
+ "packageVersion": "9.0.0-beta.53",
6
6
  "sourceRegistry": "praxis-component-registry-ingestion",
7
7
  "sourceRegistryVersion": "1.0.0",
8
8
  "componentCount": 2,
@@ -637,10 +637,15 @@ function normalizeCrudMetadata(metadata) {
637
637
  if (base.resource && typeof base.resource === 'object') {
638
638
  normalized.resource = stripUndefinedShallow({
639
639
  path: trimString(base.resource.path) || undefined,
640
+ schemaPath: trimString(base.resource.schemaPath) || undefined,
640
641
  idField: typeof base.resource.idField === 'string'
641
642
  ? trimString(base.resource.idField) || undefined
642
643
  : base.resource.idField,
644
+ title: trimString(base.resource.title) || undefined,
645
+ label: trimString(base.resource.label) || undefined,
646
+ formTitle: trimString(base.resource.formTitle) || undefined,
643
647
  endpointKey: trimString(base.resource.endpointKey) || undefined,
648
+ apiUrlEntry: base.resource.apiUrlEntry || undefined,
644
649
  });
645
650
  }
646
651
  if (base.defaults && typeof base.defaults === 'object') {
@@ -5125,11 +5130,29 @@ class DynamicFormDialogHostComponent {
5125
5130
  return config && typeof config === 'object' ? config : {};
5126
5131
  }
5127
5132
  get dialogTitle() {
5128
- return stringOrUndefined(this.data.action?.label) ||
5133
+ const actionLabel = this.resolveActionDialogTitle();
5134
+ return actionLabel ||
5129
5135
  stringOrUndefined(this.formConfig['title']) ||
5130
5136
  deriveModeTitle(this.mode, this.resolveResourceTitle()) ||
5131
5137
  this.texts.title;
5132
5138
  }
5139
+ resolveActionDialogTitle() {
5140
+ const actionLabel = stringOrUndefined(this.data.action?.label);
5141
+ if (!actionLabel) {
5142
+ return undefined;
5143
+ }
5144
+ const resource = this.data.metadata?.resource ?? {};
5145
+ const table = this.data.metadata?.table ?? {};
5146
+ const businessTitle = stringOrUndefined(resource.formTitle ??
5147
+ resource.title ??
5148
+ resource.label ??
5149
+ table.title ??
5150
+ table.label);
5151
+ const routeFallbackTitle = deriveModeTitle(this.mode, titleFromResourcePath(this.resourcePath));
5152
+ return businessTitle && routeFallbackTitle && sameTitle(actionLabel, routeFallbackTitle)
5153
+ ? undefined
5154
+ : actionLabel;
5155
+ }
5133
5156
  resolveResourceTitle() {
5134
5157
  const resource = this.data.metadata?.resource ?? {};
5135
5158
  const table = this.data.metadata?.table ?? {};
@@ -5458,6 +5481,17 @@ function stringOrUndefined(value) {
5458
5481
  const text = String(value ?? '').trim();
5459
5482
  return text || undefined;
5460
5483
  }
5484
+ function sameTitle(left, right) {
5485
+ return normalizeTitle(left) === normalizeTitle(right);
5486
+ }
5487
+ function normalizeTitle(value) {
5488
+ return value
5489
+ .normalize('NFD')
5490
+ .replace(/[\u0300-\u036f]/g, '')
5491
+ .replace(/\s+/g, ' ')
5492
+ .trim()
5493
+ .toLocaleLowerCase('pt-BR');
5494
+ }
5461
5495
  function deriveCreateSubmitLabel(actionLabel) {
5462
5496
  if (!actionLabel) {
5463
5497
  return 'Criar';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@praxisui/crud",
3
- "version": "9.0.0-beta.51",
3
+ "version": "9.0.0-beta.53",
4
4
  "description": "CRUD building blocks for Praxis UI: integrates dynamic forms and tables with unified configuration and services.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
7
7
  "@angular/core": "^21.0.0",
8
- "@praxisui/dynamic-form": "^9.0.0-beta.51",
9
- "@praxisui/table": "^9.0.0-beta.51",
10
- "@praxisui/core": "^9.0.0-beta.51",
11
- "@praxisui/dynamic-fields": "^9.0.0-beta.51",
12
- "@praxisui/settings-panel": "^9.0.0-beta.51",
8
+ "@praxisui/dynamic-form": "^9.0.0-beta.53",
9
+ "@praxisui/table": "^9.0.0-beta.53",
10
+ "@praxisui/core": "^9.0.0-beta.53",
11
+ "@praxisui/dynamic-fields": "^9.0.0-beta.53",
12
+ "@praxisui/settings-panel": "^9.0.0-beta.53",
13
13
  "@angular/cdk": "^21.0.0",
14
14
  "@angular/forms": "^21.0.0",
15
15
  "@angular/material": "^21.0.0",
16
16
  "@angular/router": "^21.0.0",
17
- "@praxisui/ai": "^9.0.0-beta.51",
17
+ "@praxisui/ai": "^9.0.0-beta.53",
18
18
  "rxjs": "~7.8.0"
19
19
  },
20
20
  "dependencies": {
@@ -381,6 +381,7 @@ declare class DynamicFormDialogHostComponent implements OnInit {
381
381
  private extractInitialValue;
382
382
  private resolveFormConfig;
383
383
  get dialogTitle(): string;
384
+ private resolveActionDialogTitle;
384
385
  private resolveResourceTitle;
385
386
  private resolveFormActions;
386
387
  private resolveLayoutPolicy;