@praxisui/crud 9.0.0-beta.50 → 9.0.0-beta.52
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-
|
|
3
|
+
"generatedAt": "2026-07-08T20:10:39.446Z",
|
|
4
4
|
"packageName": "@praxisui/crud",
|
|
5
|
-
"packageVersion": "9.0.0-beta.
|
|
5
|
+
"packageVersion": "9.0.0-beta.52",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 2,
|
|
@@ -41,6 +41,16 @@
|
|
|
41
41
|
"type": "string | null",
|
|
42
42
|
"required": false
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
"name": "metadata.resource.title",
|
|
46
|
+
"type": "string | null",
|
|
47
|
+
"required": false
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"name": "metadata.resource.formTitle",
|
|
51
|
+
"type": "string | null",
|
|
52
|
+
"required": false
|
|
53
|
+
},
|
|
44
54
|
{
|
|
45
55
|
"name": "metadata.filterCriteria",
|
|
46
56
|
"type": "Record<string, unknown> | null",
|
|
@@ -6218,9 +6228,9 @@
|
|
|
6218
6228
|
{
|
|
6219
6229
|
"chunkIndex": 0,
|
|
6220
6230
|
"chunkKind": "summary",
|
|
6221
|
-
"content": "Component ID: praxis-crud\nSelector: praxis-crud\nFriendly Name: Praxis CRUD\nDescription: Tabela com operações de CRUD via metadados.\nLib/Package: @praxisui/crud\nTags: widget, crud, configurable, hasWizard, stable\nInputs:\n - metadata (CrudMetadata | string)\n - crudId (string)\n - componentInstanceId (string)\n - context (Record<string, unknown>)\n - metadata.queryContext (PraxisDataQueryContext | null)\n - metadata.resource.schemaPath (string | null)\n - metadata.filterCriteria (Record<string, unknown> | null)\n - metadata.form (FormConfig)\n - metadata.actions[].form (CrudActionFormContract)\n - enableCustomization (boolean)\nOutputs:\n - afterOpen ({ mode: FormOpenMode; action: string })\n - afterClose (void)\n - afterSave ({ id: string | number; data: unknown })\n - afterDelete ({ id: string | number })\n - rowClick ({ row: unknown; index: number })\n - selectionChange (unknown)\n - error (unknown)\n - configureRequested (void)\n - crudAuthoringDocumentApplied (CrudAuthoringWidgetPersistenceEvent)\n - crudAuthoringDocumentSaved (CrudAuthoringWidgetPersistenceEvent)\n",
|
|
6231
|
+
"content": "Component ID: praxis-crud\nSelector: praxis-crud\nFriendly Name: Praxis CRUD\nDescription: Tabela com operações de CRUD via metadados.\nLib/Package: @praxisui/crud\nTags: widget, crud, configurable, hasWizard, stable\nInputs:\n - metadata (CrudMetadata | string)\n - crudId (string)\n - componentInstanceId (string)\n - context (Record<string, unknown>)\n - metadata.queryContext (PraxisDataQueryContext | null)\n - metadata.resource.schemaPath (string | null)\n - metadata.resource.title (string | null)\n - metadata.resource.formTitle (string | null)\n - metadata.filterCriteria (Record<string, unknown> | null)\n - metadata.form (FormConfig)\n - metadata.actions[].form (CrudActionFormContract)\n - enableCustomization (boolean)\nOutputs:\n - afterOpen ({ mode: FormOpenMode; action: string })\n - afterClose (void)\n - afterSave ({ id: string | number; data: unknown })\n - afterDelete ({ id: string | number })\n - rowClick ({ row: unknown; index: number })\n - selectionChange (unknown)\n - error (unknown)\n - configureRequested (void)\n - crudAuthoringDocumentApplied (CrudAuthoringWidgetPersistenceEvent)\n - crudAuthoringDocumentSaved (CrudAuthoringWidgetPersistenceEvent)\n",
|
|
6222
6232
|
"sourcePointer": "praxis-ui-angular/projects/praxis-crud/src/lib/praxis-crud.metadata.ts",
|
|
6223
|
-
"contentHash": "
|
|
6233
|
+
"contentHash": "aaf9272c833dab1a5fb9acd58a538b520551482a7c4c6f237dc1a1b6e503fa9b",
|
|
6224
6234
|
"sourceKind": "component_definition",
|
|
6225
6235
|
"sourceId": "praxis-crud",
|
|
6226
6236
|
"corpusVersion": "1.0.0"
|
|
@@ -6337,6 +6347,16 @@
|
|
|
6337
6347
|
"type": "string",
|
|
6338
6348
|
"required": false
|
|
6339
6349
|
},
|
|
6350
|
+
{
|
|
6351
|
+
"name": "data.metadata.resource.title",
|
|
6352
|
+
"type": "string | null",
|
|
6353
|
+
"required": false
|
|
6354
|
+
},
|
|
6355
|
+
{
|
|
6356
|
+
"name": "data.metadata.resource.formTitle",
|
|
6357
|
+
"type": "string | null",
|
|
6358
|
+
"required": false
|
|
6359
|
+
},
|
|
6340
6360
|
{
|
|
6341
6361
|
"name": "data.metadata.resource.endpointKey",
|
|
6342
6362
|
"type": "ApiEndpoint",
|
|
@@ -10687,9 +10707,9 @@
|
|
|
10687
10707
|
{
|
|
10688
10708
|
"chunkIndex": 0,
|
|
10689
10709
|
"chunkKind": "summary",
|
|
10690
|
-
"content": "Component ID: praxis-dynamic-form-dialog-host\nSelector: praxis-dynamic-form-dialog-host\nFriendly Name: Praxis Dynamic Form Dialog Host\nDescription: Dialog host that renders PraxisDynamicForm for CRUD actions.\nCategory: form\nLib/Package: @praxisui/crud\nTags: dialog, crud, form, host\nInputs:\n - data (CrudDialogData)\n - data.metadata (CrudMetadata)\n - data.metadata.form (FormConfig)\n - data.action (CrudAction)\n - data.inputs (Record<string, unknown>)\n - data.inputs.layoutPolicy (DynamicFormLayoutPolicy)\n - data.metadata.resource.path (string)\n - data.metadata.resource.endpointKey (ApiEndpoint)\n - data.metadata.resource.idField (string | number)\n - data.metadata.defaults.modal (DialogConfig)\n - data.metadata.defaults.back (BackConfig)\n - data.action.formId (string)\n - data.action.action (string)\n",
|
|
10710
|
+
"content": "Component ID: praxis-dynamic-form-dialog-host\nSelector: praxis-dynamic-form-dialog-host\nFriendly Name: Praxis Dynamic Form Dialog Host\nDescription: Dialog host that renders PraxisDynamicForm for CRUD actions.\nCategory: form\nLib/Package: @praxisui/crud\nTags: dialog, crud, form, host\nInputs:\n - data (CrudDialogData)\n - data.metadata (CrudMetadata)\n - data.metadata.form (FormConfig)\n - data.action (CrudAction)\n - data.inputs (Record<string, unknown>)\n - data.inputs.layoutPolicy (DynamicFormLayoutPolicy)\n - data.metadata.resource.path (string)\n - data.metadata.resource.title (string | null)\n - data.metadata.resource.formTitle (string | null)\n - data.metadata.resource.endpointKey (ApiEndpoint)\n - data.metadata.resource.idField (string | number)\n - data.metadata.defaults.modal (DialogConfig)\n - data.metadata.defaults.back (BackConfig)\n - data.action.formId (string)\n - data.action.action (string)\n",
|
|
10691
10711
|
"sourcePointer": "praxis-ui-angular/projects/praxis-crud/src/lib/dynamic-form-dialog-host.metadata.ts",
|
|
10692
|
-
"contentHash": "
|
|
10712
|
+
"contentHash": "9264365b82044e927a733022524e3f77ba7ee5f29fdee263866c4f682a0b8592",
|
|
10693
10713
|
"sourceKind": "component_definition",
|
|
10694
10714
|
"sourceId": "praxis-dynamic-form-dialog-host",
|
|
10695
10715
|
"corpusVersion": "1.0.0"
|
|
@@ -5125,11 +5125,29 @@ class DynamicFormDialogHostComponent {
|
|
|
5125
5125
|
return config && typeof config === 'object' ? config : {};
|
|
5126
5126
|
}
|
|
5127
5127
|
get dialogTitle() {
|
|
5128
|
-
|
|
5128
|
+
const actionLabel = this.resolveActionDialogTitle();
|
|
5129
|
+
return actionLabel ||
|
|
5129
5130
|
stringOrUndefined(this.formConfig['title']) ||
|
|
5130
5131
|
deriveModeTitle(this.mode, this.resolveResourceTitle()) ||
|
|
5131
5132
|
this.texts.title;
|
|
5132
5133
|
}
|
|
5134
|
+
resolveActionDialogTitle() {
|
|
5135
|
+
const actionLabel = stringOrUndefined(this.data.action?.label);
|
|
5136
|
+
if (!actionLabel) {
|
|
5137
|
+
return undefined;
|
|
5138
|
+
}
|
|
5139
|
+
const resource = this.data.metadata?.resource ?? {};
|
|
5140
|
+
const table = this.data.metadata?.table ?? {};
|
|
5141
|
+
const businessTitle = stringOrUndefined(resource.formTitle ??
|
|
5142
|
+
resource.title ??
|
|
5143
|
+
resource.label ??
|
|
5144
|
+
table.title ??
|
|
5145
|
+
table.label);
|
|
5146
|
+
const routeFallbackTitle = deriveModeTitle(this.mode, titleFromResourcePath(this.resourcePath));
|
|
5147
|
+
return businessTitle && routeFallbackTitle && sameTitle(actionLabel, routeFallbackTitle)
|
|
5148
|
+
? undefined
|
|
5149
|
+
: actionLabel;
|
|
5150
|
+
}
|
|
5133
5151
|
resolveResourceTitle() {
|
|
5134
5152
|
const resource = this.data.metadata?.resource ?? {};
|
|
5135
5153
|
const table = this.data.metadata?.table ?? {};
|
|
@@ -5458,6 +5476,17 @@ function stringOrUndefined(value) {
|
|
|
5458
5476
|
const text = String(value ?? '').trim();
|
|
5459
5477
|
return text || undefined;
|
|
5460
5478
|
}
|
|
5479
|
+
function sameTitle(left, right) {
|
|
5480
|
+
return normalizeTitle(left) === normalizeTitle(right);
|
|
5481
|
+
}
|
|
5482
|
+
function normalizeTitle(value) {
|
|
5483
|
+
return value
|
|
5484
|
+
.normalize('NFD')
|
|
5485
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
5486
|
+
.replace(/\s+/g, ' ')
|
|
5487
|
+
.trim()
|
|
5488
|
+
.toLocaleLowerCase('pt-BR');
|
|
5489
|
+
}
|
|
5461
5490
|
function deriveCreateSubmitLabel(actionLabel) {
|
|
5462
5491
|
if (!actionLabel) {
|
|
5463
5492
|
return 'Criar';
|
|
@@ -5673,6 +5702,16 @@ const PRAXIS_CRUD_COMPONENT_METADATA = {
|
|
|
5673
5702
|
type: 'string | null',
|
|
5674
5703
|
description: 'Template canonico opcional usado apenas para resolver /schemas/filtered quando resource.path precisa ser um alvo operacional concreto.',
|
|
5675
5704
|
},
|
|
5705
|
+
{
|
|
5706
|
+
name: 'metadata.resource.title',
|
|
5707
|
+
type: 'string | null',
|
|
5708
|
+
description: 'Titulo documental do recurso usado pelo shell CRUD para derivar titulos contextuais de criacao, edicao e visualizacao quando a action nao informa label.',
|
|
5709
|
+
},
|
|
5710
|
+
{
|
|
5711
|
+
name: 'metadata.resource.formTitle',
|
|
5712
|
+
type: 'string | null',
|
|
5713
|
+
description: 'Titulo documental especifico para formularios do recurso, usado antes de metadata.resource.title no shell modal/drawer.',
|
|
5714
|
+
},
|
|
5676
5715
|
{
|
|
5677
5716
|
name: 'metadata.filterCriteria',
|
|
5678
5717
|
type: 'Record<string, unknown> | null',
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "9.0.0-beta.
|
|
3
|
+
"version": "9.0.0-beta.52",
|
|
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.
|
|
9
|
-
"@praxisui/table": "^9.0.0-beta.
|
|
10
|
-
"@praxisui/core": "^9.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^9.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^9.0.0-beta.
|
|
8
|
+
"@praxisui/dynamic-form": "^9.0.0-beta.52",
|
|
9
|
+
"@praxisui/table": "^9.0.0-beta.52",
|
|
10
|
+
"@praxisui/core": "^9.0.0-beta.52",
|
|
11
|
+
"@praxisui/dynamic-fields": "^9.0.0-beta.52",
|
|
12
|
+
"@praxisui/settings-panel": "^9.0.0-beta.52",
|
|
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.
|
|
17
|
+
"@praxisui/ai": "^9.0.0-beta.52",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
package/types/praxisui-crud.d.ts
CHANGED
|
@@ -75,6 +75,9 @@ interface CrudResource {
|
|
|
75
75
|
path: string;
|
|
76
76
|
schemaPath?: string | null;
|
|
77
77
|
idField?: string | number;
|
|
78
|
+
title?: string | null;
|
|
79
|
+
label?: string | null;
|
|
80
|
+
formTitle?: string | null;
|
|
78
81
|
endpointKey?: ApiEndpoint;
|
|
79
82
|
apiUrlEntry?: ApiUrlEntry | null;
|
|
80
83
|
}
|
|
@@ -378,6 +381,7 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
378
381
|
private extractInitialValue;
|
|
379
382
|
private resolveFormConfig;
|
|
380
383
|
get dialogTitle(): string;
|
|
384
|
+
private resolveActionDialogTitle;
|
|
381
385
|
private resolveResourceTitle;
|
|
382
386
|
private resolveFormActions;
|
|
383
387
|
private resolveLayoutPolicy;
|