@praxisui/crud 9.0.0-beta.48 → 9.0.0-beta.49
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/ai/component-registry.json +7767 -661
- package/fesm2022/praxisui-crud.mjs +24 -3
- package/package.json +7 -7
- package/types/praxisui-crud.d.ts +3 -0
|
@@ -5002,6 +5002,7 @@ class DynamicFormDialogHostComponent {
|
|
|
5002
5002
|
apiEndpointKey;
|
|
5003
5003
|
apiUrlEntry;
|
|
5004
5004
|
layoutPolicy;
|
|
5005
|
+
formConfig = {};
|
|
5005
5006
|
formActions;
|
|
5006
5007
|
mode = 'create';
|
|
5007
5008
|
backConfig;
|
|
@@ -5059,6 +5060,7 @@ class DynamicFormDialogHostComponent {
|
|
|
5059
5060
|
this.apiUrlEntry = this.data.inputs?.['apiUrlEntry'] ?? null;
|
|
5060
5061
|
const act = this.data.action?.action;
|
|
5061
5062
|
this.mode = act === 'edit' ? 'edit' : act === 'view' ? 'view' : 'create';
|
|
5063
|
+
this.formConfig = this.resolveFormConfig();
|
|
5062
5064
|
this.layoutPolicy = this.resolveLayoutPolicy();
|
|
5063
5065
|
this.formActions = this.resolveFormActions();
|
|
5064
5066
|
// Back config: defaults from metadata/action, overridden by saved per-form config
|
|
@@ -5118,10 +5120,22 @@ class DynamicFormDialogHostComponent {
|
|
|
5118
5120
|
}
|
|
5119
5121
|
return Object.keys(explicit).length ? explicit : null;
|
|
5120
5122
|
}
|
|
5123
|
+
resolveFormConfig() {
|
|
5124
|
+
const config = this.data.metadata?.form;
|
|
5125
|
+
return config && typeof config === 'object' ? config : {};
|
|
5126
|
+
}
|
|
5127
|
+
get dialogTitle() {
|
|
5128
|
+
return stringOrUndefined(this.data.action?.label) ||
|
|
5129
|
+
stringOrUndefined(this.formConfig['title']) ||
|
|
5130
|
+
this.texts.title;
|
|
5131
|
+
}
|
|
5121
5132
|
resolveFormActions() {
|
|
5122
5133
|
if (this.mode === 'view') {
|
|
5123
5134
|
return undefined;
|
|
5124
5135
|
}
|
|
5136
|
+
if (this.formConfig?.actions) {
|
|
5137
|
+
return undefined;
|
|
5138
|
+
}
|
|
5125
5139
|
const submitLabel = this.resolveSubmitLabel();
|
|
5126
5140
|
if (!submitLabel) {
|
|
5127
5141
|
return undefined;
|
|
@@ -5293,7 +5307,7 @@ class DynamicFormDialogHostComponent {
|
|
|
5293
5307
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: DynamicFormDialogHostComponent, isStandalone: true, selector: "praxis-dynamic-form-dialog-host", host: { properties: { "attr.data-density": "modal.density || \"default\"", "attr.data-presentation": "presentation", "class.praxis-drawer": "presentation === \"drawer\"" }, classAttribute: "praxis-dialog" }, providers: [GenericCrudService], viewQueries: [{ propertyName: "formComp", first: true, predicate: PraxisDynamicForm, descendants: true }], ngImport: i0, template: `
|
|
5294
5308
|
<div mat-dialog-title class="dialog-header">
|
|
5295
5309
|
<h2 id="crudDialogTitle" class="dialog-title">
|
|
5296
|
-
{{
|
|
5310
|
+
{{ dialogTitle }}
|
|
5297
5311
|
</h2>
|
|
5298
5312
|
<span class="spacer"></span>
|
|
5299
5313
|
@if (modal.canMaximize) {
|
|
@@ -5327,6 +5341,7 @@ class DynamicFormDialogHostComponent {
|
|
|
5327
5341
|
[resourceId]="resourceId"
|
|
5328
5342
|
[initialValue]="initialValue"
|
|
5329
5343
|
[mode]="mode"
|
|
5344
|
+
[config]="formConfig"
|
|
5330
5345
|
[schemaUrl]="schemaUrl"
|
|
5331
5346
|
[submitUrl]="submitUrl"
|
|
5332
5347
|
[submitMethod]="submitMethod"
|
|
@@ -5358,7 +5373,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5358
5373
|
}, template: `
|
|
5359
5374
|
<div mat-dialog-title class="dialog-header">
|
|
5360
5375
|
<h2 id="crudDialogTitle" class="dialog-title">
|
|
5361
|
-
{{
|
|
5376
|
+
{{ dialogTitle }}
|
|
5362
5377
|
</h2>
|
|
5363
5378
|
<span class="spacer"></span>
|
|
5364
5379
|
@if (modal.canMaximize) {
|
|
@@ -5392,6 +5407,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5392
5407
|
[resourceId]="resourceId"
|
|
5393
5408
|
[initialValue]="initialValue"
|
|
5394
5409
|
[mode]="mode"
|
|
5410
|
+
[config]="formConfig"
|
|
5395
5411
|
[schemaUrl]="schemaUrl"
|
|
5396
5412
|
[submitUrl]="submitUrl"
|
|
5397
5413
|
[submitMethod]="submitMethod"
|
|
@@ -5597,6 +5613,11 @@ const PRAXIS_CRUD_COMPONENT_METADATA = {
|
|
|
5597
5613
|
type: 'Record<string, unknown> | null',
|
|
5598
5614
|
description: 'Bridge declarativa de filtros encaminhada para a tabela interna. Para novo authoring, prefira metadata.queryContext.',
|
|
5599
5615
|
},
|
|
5616
|
+
{
|
|
5617
|
+
name: 'metadata.form',
|
|
5618
|
+
type: 'FormConfig',
|
|
5619
|
+
description: 'Configuração do formulário encaminhada para o PraxisDynamicForm aberto por ações modal/drawer; layout, fieldMetadata, actions e helpPresentation permanecem propriedade do Dynamic Form.',
|
|
5620
|
+
},
|
|
5600
5621
|
{
|
|
5601
5622
|
name: 'metadata.actions[].form',
|
|
5602
5623
|
type: 'CrudActionFormContract',
|
|
@@ -6130,7 +6151,7 @@ const PRAXIS_CRUD_AUTHORING_MANIFEST = {
|
|
|
6130
6151
|
{ kind: 'viewSurface', resolver: 'crud-action-by-id:view', description: 'View action open mode, route/form binding and launcher inputs.' },
|
|
6131
6152
|
{ kind: 'deleteBehavior', resolver: 'crud-action-by-id:delete', description: 'Delete action enablement, confirmation, endpoint and capability policy.' },
|
|
6132
6153
|
{ kind: 'dialogHost', resolver: 'crud-dialog-host-defaults', description: 'Route/modal/drawer defaults consumed by CrudLauncherService and DynamicFormDialogHostComponent.' },
|
|
6133
|
-
{ kind: 'formBinding', resolver: 'crud-action-form-contract-by-action-id', description: 'CRUD-owned form binding fields: formId, schemaUrl, submitUrl, submitMethod, params and initialValue.' },
|
|
6154
|
+
{ kind: 'formBinding', resolver: 'crud-action-form-contract-by-action-id', description: 'CRUD-owned form binding fields: formId, schemaUrl, submitUrl, submitMethod, params and initialValue. Shared FormConfig remains owned by Dynamic Form and is forwarded through CrudMetadata.form when present.' },
|
|
6134
6155
|
{ kind: 'permissions', resolver: 'crud-resource-capabilities', description: 'CRUD action availability derived from resource capabilities and action permissions.' },
|
|
6135
6156
|
{ kind: 'domainGovernanceContext', resolver: 'domain-catalog-context-by-resource-key', description: 'Read-only semantic/governance context resolved from Domain Catalog and referenced from CRUD queryContext.meta.' },
|
|
6136
6157
|
{ kind: 'childOperation', resolver: 'child-authoring-manifest-operation', description: 'Delegated form/table/dialog/settings-panel operation owned by the child component manifest.' },
|
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.49",
|
|
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.49",
|
|
9
|
+
"@praxisui/table": "^9.0.0-beta.49",
|
|
10
|
+
"@praxisui/core": "^9.0.0-beta.49",
|
|
11
|
+
"@praxisui/dynamic-fields": "^9.0.0-beta.49",
|
|
12
|
+
"@praxisui/settings-panel": "^9.0.0-beta.49",
|
|
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.49",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
package/types/praxisui-crud.d.ts
CHANGED
|
@@ -368,6 +368,7 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
368
368
|
apiEndpointKey?: ApiEndpoint | string | null;
|
|
369
369
|
apiUrlEntry?: ApiUrlEntry | null;
|
|
370
370
|
layoutPolicy?: DynamicFormLayoutPolicy | null;
|
|
371
|
+
formConfig: FormConfig;
|
|
371
372
|
formActions?: FormConfig['actions'];
|
|
372
373
|
mode: 'create' | 'edit' | 'view';
|
|
373
374
|
backConfig?: BackConfig;
|
|
@@ -375,6 +376,8 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
375
376
|
texts: Record<string, string>;
|
|
376
377
|
constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent>, data: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage);
|
|
377
378
|
private extractInitialValue;
|
|
379
|
+
private resolveFormConfig;
|
|
380
|
+
get dialogTitle(): string;
|
|
378
381
|
private resolveFormActions;
|
|
379
382
|
private resolveLayoutPolicy;
|
|
380
383
|
private resolveSubmitLabel;
|