@praxisui/crud 8.0.0-beta.0 → 8.0.0-beta.11
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 +7 -0
- package/fesm2022/praxisui-crud.mjs +108 -10
- package/index.d.ts +6 -2
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -246,6 +246,13 @@ sequenceDiagram
|
|
|
246
246
|
5. **Modal e drawer nao sao equivalentes internamente**: o ramo modal usa `DynamicFormDialogHostComponent`; o ramo drawer depende do adapter provido pelo host.
|
|
247
247
|
6. **Save e delete geram refetch automatico da lista**: esse side effect faz parte do contrato atual do shell CRUD.
|
|
248
248
|
|
|
249
|
+
Nota de fronteira para formularios:
|
|
250
|
+
|
|
251
|
+
- `@praxisui/crud` nao redefine payload de formulario nem filtra campos locais.
|
|
252
|
+
- Campos locais/transientes pertencem ao contrato de `@praxisui/dynamic-form` via `fieldMetadata[].source`, `fieldMetadata[].transient` e `fieldMetadata[].submitPolicy`.
|
|
253
|
+
- No fluxo modal, `DynamicFormDialogHostComponent` recebe `formSubmit.formData` ja filtrado para persistencia. Valores completos de UI ficam em `formSubmit.rawFormData`.
|
|
254
|
+
- `actions[].form.initialValue` e `inputs` continuam sendo seed/contexto de abertura, nao campos automaticamente persistiveis.
|
|
255
|
+
|
|
249
256
|
## Documentacao Tecnica da Lib
|
|
250
257
|
|
|
251
258
|
- `projects/praxis-crud/docs/host-crud-runtime-and-openmode.md`
|
|
@@ -3409,7 +3409,7 @@ class PraxisCrudComponent {
|
|
|
3409
3409
|
async onAction(action, row, runtimeEvent) {
|
|
3410
3410
|
try {
|
|
3411
3411
|
document.activeElement?.blur();
|
|
3412
|
-
const openedByDiscovery = await this.tryOpenDiscoveredCrudSurface(action, row);
|
|
3412
|
+
const openedByDiscovery = await this.tryOpenDiscoveredCrudSurface(action, row, runtimeEvent);
|
|
3413
3413
|
if (openedByDiscovery) {
|
|
3414
3414
|
return;
|
|
3415
3415
|
}
|
|
@@ -3704,17 +3704,27 @@ class PraxisCrudComponent {
|
|
|
3704
3704
|
resolveFilterCriteria(meta) {
|
|
3705
3705
|
return this.isRecord(meta?.filterCriteria) ? { ...meta.filterCriteria } : {};
|
|
3706
3706
|
}
|
|
3707
|
-
async tryOpenDiscoveredCrudSurface(action, row) {
|
|
3707
|
+
async tryOpenDiscoveredCrudSurface(action, row, runtimeEvent) {
|
|
3708
3708
|
const normalizedAction = String(action || '').trim().toLowerCase();
|
|
3709
|
-
if (!this.
|
|
3709
|
+
if (!this.surfaceService) {
|
|
3710
3710
|
return false;
|
|
3711
3711
|
}
|
|
3712
|
-
const
|
|
3713
|
-
|
|
3712
|
+
const providedSurface = this.resolveProvidedSurface(normalizedAction, runtimeEvent?.actionConfig);
|
|
3713
|
+
if (!providedSurface && !this.isDiscoveryManagedCrudAction(normalizedAction)) {
|
|
3714
|
+
return false;
|
|
3715
|
+
}
|
|
3716
|
+
const catalog = providedSurface
|
|
3717
|
+
? null
|
|
3718
|
+
: await this.resolveDiscoveredSurfaceCatalog(normalizedAction, row);
|
|
3719
|
+
const surface = providedSurface || this.selectSurfaceForCrudAction(normalizedAction, catalog?.surfaces || []);
|
|
3714
3720
|
const resourcePath = String(catalog?.resourcePath || this.resolveResourcePath(this.resolvedMetadata) || '').trim();
|
|
3715
|
-
if (!
|
|
3721
|
+
if (!surface || !resourcePath) {
|
|
3716
3722
|
return false;
|
|
3717
3723
|
}
|
|
3724
|
+
if (surface.availability?.allowed === false) {
|
|
3725
|
+
this.snack.open(translateUnavailableWorkflowMessage(this.i18n, surface.availability), undefined, { duration: 2500 });
|
|
3726
|
+
return true;
|
|
3727
|
+
}
|
|
3718
3728
|
let payload;
|
|
3719
3729
|
try {
|
|
3720
3730
|
payload = this.surfaceOpenAdapter.toPayload(surface, {
|
|
@@ -3722,7 +3732,7 @@ class PraxisCrudComponent {
|
|
|
3722
3732
|
resourceId: this.resolveRowResourceId(row),
|
|
3723
3733
|
endpointKey: this.resolvedMetadata?.resource?.endpointKey,
|
|
3724
3734
|
apiUrlEntry: this.resolveDiscoveryApiEntry(),
|
|
3725
|
-
group: catalog
|
|
3735
|
+
group: catalog?.group ?? null,
|
|
3726
3736
|
});
|
|
3727
3737
|
}
|
|
3728
3738
|
catch {
|
|
@@ -3880,6 +3890,23 @@ class PraxisCrudComponent {
|
|
|
3880
3890
|
}
|
|
3881
3891
|
return candidate;
|
|
3882
3892
|
}
|
|
3893
|
+
resolveProvidedSurface(action, candidate) {
|
|
3894
|
+
if (!candidate || typeof candidate !== 'object') {
|
|
3895
|
+
return null;
|
|
3896
|
+
}
|
|
3897
|
+
const normalizedId = String(candidate.id || '').trim().toLowerCase();
|
|
3898
|
+
if (!normalizedId || normalizedId !== action) {
|
|
3899
|
+
return null;
|
|
3900
|
+
}
|
|
3901
|
+
const surface = candidate;
|
|
3902
|
+
if (!surface.kind || !surface.scope || !surface.path || !surface.method) {
|
|
3903
|
+
return null;
|
|
3904
|
+
}
|
|
3905
|
+
if (!this.isWritableCrudSurface(surface) && !this.isReadableCrudSurface(surface)) {
|
|
3906
|
+
return null;
|
|
3907
|
+
}
|
|
3908
|
+
return surface;
|
|
3909
|
+
}
|
|
3883
3910
|
selectSurfaceForCrudAction(action, surfaces) {
|
|
3884
3911
|
const candidates = surfaces
|
|
3885
3912
|
.filter((surface) => surface.availability?.allowed !== false)
|
|
@@ -4412,7 +4439,7 @@ class PraxisCrudComponent {
|
|
|
4412
4439
|
/>
|
|
4413
4440
|
}
|
|
4414
4441
|
}
|
|
4415
|
-
`, isInline: true, styles: [":host{display:block;width:100%;min-width:0;max-width:100%}\n"], dependencies: [{ kind: "component", type: PraxisTable, selector: "praxis-table", inputs: ["config", "resourcePath", "data", "tableId", "componentInstanceId", "title", "subtitle", "icon", "autoDelete", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "crudContext", "filterCriteria", "queryContext", "enableCustomization", "dense"], outputs: ["rowClick", "rowDoubleClick", "rowExpansionChange", "rowAction", "toolbarAction", "bulkAction", "columnReorder", "columnReorderAttempt", "beforeDelete", "afterDelete", "deleteError", "beforeBulkDelete", "afterBulkDelete", "bulkDeleteError", "schemaStatusChange", "metadataChange", "loadingStateChange", "collectionLinksChange"] }, { kind: "component", type: EmptyStateCardComponent, selector: "praxis-empty-state-card", inputs: ["icon", "title", "description", "primaryAction", "secondaryActions", "inline", "tone"] }] });
|
|
4442
|
+
`, isInline: true, styles: [":host{display:block;width:100%;min-width:0;max-width:100%}\n"], dependencies: [{ kind: "component", type: PraxisTable, selector: "praxis-table", inputs: ["config", "resourcePath", "data", "tableId", "componentInstanceId", "title", "subtitle", "icon", "autoDelete", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "crudContext", "filterCriteria", "queryContext", "enableCustomization", "dense"], outputs: ["rowClick", "rowDoubleClick", "rowExpansionChange", "rowAction", "toolbarAction", "bulkAction", "columnReorder", "columnReorderAttempt", "beforeDelete", "afterDelete", "deleteError", "beforeBulkDelete", "afterBulkDelete", "bulkDeleteError", "schemaStatusChange", "metadataChange", "loadingStateChange", "collectionLinksChange", "selectionChange"] }, { kind: "component", type: EmptyStateCardComponent, selector: "praxis-empty-state-card", inputs: ["icon", "title", "description", "primaryAction", "secondaryActions", "inline", "tone"] }] });
|
|
4416
4443
|
}
|
|
4417
4444
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: PraxisCrudComponent, decorators: [{
|
|
4418
4445
|
type: Component,
|
|
@@ -4505,6 +4532,7 @@ class DynamicFormDialogHostComponent {
|
|
|
4505
4532
|
submitMethod;
|
|
4506
4533
|
apiEndpointKey;
|
|
4507
4534
|
apiUrlEntry;
|
|
4535
|
+
formActions;
|
|
4508
4536
|
mode = 'create';
|
|
4509
4537
|
backConfig;
|
|
4510
4538
|
idField = 'id';
|
|
@@ -4560,6 +4588,7 @@ class DynamicFormDialogHostComponent {
|
|
|
4560
4588
|
this.apiUrlEntry = this.data.inputs?.['apiUrlEntry'] ?? null;
|
|
4561
4589
|
const act = this.data.action?.action;
|
|
4562
4590
|
this.mode = act === 'edit' ? 'edit' : act === 'view' ? 'view' : 'create';
|
|
4591
|
+
this.formActions = this.resolveFormActions();
|
|
4563
4592
|
// Back config: defaults from metadata/action, overridden by saved per-form config
|
|
4564
4593
|
const defaults = (this.data.action?.back || this.data.metadata?.defaults?.back) || {};
|
|
4565
4594
|
this.backDefaults = defaults;
|
|
@@ -4616,6 +4645,47 @@ class DynamicFormDialogHostComponent {
|
|
|
4616
4645
|
}
|
|
4617
4646
|
return Object.keys(explicit).length ? explicit : null;
|
|
4618
4647
|
}
|
|
4648
|
+
resolveFormActions() {
|
|
4649
|
+
if (this.mode === 'view') {
|
|
4650
|
+
return undefined;
|
|
4651
|
+
}
|
|
4652
|
+
const submitLabel = this.resolveSubmitLabel();
|
|
4653
|
+
if (!submitLabel) {
|
|
4654
|
+
return undefined;
|
|
4655
|
+
}
|
|
4656
|
+
return {
|
|
4657
|
+
showSaveButton: true,
|
|
4658
|
+
showCancelButton: false,
|
|
4659
|
+
showResetButton: false,
|
|
4660
|
+
submit: {
|
|
4661
|
+
id: 'submit',
|
|
4662
|
+
type: 'submit',
|
|
4663
|
+
color: 'primary',
|
|
4664
|
+
visible: true,
|
|
4665
|
+
label: submitLabel,
|
|
4666
|
+
},
|
|
4667
|
+
};
|
|
4668
|
+
}
|
|
4669
|
+
resolveSubmitLabel() {
|
|
4670
|
+
const action = this.data.action ?? {};
|
|
4671
|
+
const explicit = stringOrUndefined(action.form?.submitLabel ??
|
|
4672
|
+
action.submitLabel ??
|
|
4673
|
+
action.form?.actions?.submit?.label ??
|
|
4674
|
+
action.form?.actions?.submitButtonLabel);
|
|
4675
|
+
if (explicit) {
|
|
4676
|
+
return explicit;
|
|
4677
|
+
}
|
|
4678
|
+
const actionLabel = stringOrUndefined(action.label);
|
|
4679
|
+
if (this.mode === 'create') {
|
|
4680
|
+
return deriveCreateSubmitLabel(actionLabel);
|
|
4681
|
+
}
|
|
4682
|
+
if (this.mode === 'edit') {
|
|
4683
|
+
return actionLabel && !/^editar\b/i.test(actionLabel)
|
|
4684
|
+
? actionLabel
|
|
4685
|
+
: 'Salvar alterações';
|
|
4686
|
+
}
|
|
4687
|
+
return undefined;
|
|
4688
|
+
}
|
|
4619
4689
|
ngOnInit() {
|
|
4620
4690
|
// Carregar estado salvo (se habilitado)
|
|
4621
4691
|
if (this.rememberState && this.stateKey) {
|
|
@@ -4640,8 +4710,11 @@ class DynamicFormDialogHostComponent {
|
|
|
4640
4710
|
}
|
|
4641
4711
|
}
|
|
4642
4712
|
onSave(result) {
|
|
4713
|
+
const stage = getFormSubmitStage(result);
|
|
4714
|
+
if (stage === 'before' || stage === 'error') {
|
|
4715
|
+
return;
|
|
4716
|
+
}
|
|
4643
4717
|
if (this.modal.closeOnSave === false) {
|
|
4644
|
-
// Não fechar: manter aberto e opcionalmente salvar estado atual
|
|
4645
4718
|
this.saveState();
|
|
4646
4719
|
return;
|
|
4647
4720
|
}
|
|
@@ -4779,11 +4852,12 @@ class DynamicFormDialogHostComponent {
|
|
|
4779
4852
|
[apiUrlEntry]="apiUrlEntry"
|
|
4780
4853
|
[presentationModeGlobal]="mode === 'view' ? true : null"
|
|
4781
4854
|
[backConfig]="backConfig"
|
|
4855
|
+
[actions]="formActions"
|
|
4782
4856
|
(formSubmit)="onSave($event)"
|
|
4783
4857
|
(formCancel)="onCancel()"
|
|
4784
4858
|
></praxis-dynamic-form>
|
|
4785
4859
|
</mat-dialog-content>
|
|
4786
|
-
`, isInline: true, styles: [":host{--dlg-header-h: 56px;--dlg-footer-h: 56px;--dlg-pad: 16px;display:flex;flex-direction:column;height:100%;overflow:hidden}:host([data-density=\"compact\"]){--dlg-header-h: 44px;--dlg-footer-h: 44px;--dlg-pad: 12px}.dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:var(--dlg-pad);padding:0 var(--dlg-pad);height:var(--dlg-header-h);margin:0;background:var(--md-sys-color-surface-container-high);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}.dialog-title{margin:0;font:inherit;font-weight:600;color:var(--md-sys-color-on-surface)}.spacer{flex:1}.dialog-content{overflow:auto;padding:var(--dlg-pad);max-height:calc(100svh - var(--dlg-header-h) - 32px)}.dialog-header button.mat-icon-button{color:var(--md-sys-color-on-surface-variant)}.dialog-header button.mat-icon-button:hover{color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container)}.dialog-footer{position:sticky;bottom:0;z-index:1;padding:var(--dlg-pad)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisDynamicForm, selector: "praxis-dynamic-form", inputs: ["resourcePath", "resourceId", "initialValue", "editorialContext", "mode", "config", "schemaSource", "schemaUrl", "submitUrl", "submitMethod", "responseSchemaUrl", "apiEndpointKey", "apiUrlEntry", "enableCustomization", "formId", "componentInstanceId", "layout", "backConfig", "hooks", "removeEmptyContainersOnSave", "reactiveValidation", "reactiveValidationDebounceMs", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "readonlyModeGlobal", "disabledModeGlobal", "presentationModeGlobal", "visibleGlobal", "customEndpoints"], outputs: ["formSubmit", "formCancel", "formReset", "configChange", "formReady", "valueChange", "syncCompleted", "initializationError", "loadingStateChange", "enableCustomizationChange", "customAction", "actionConfirmation", "schemaStatusChange", "fieldRenderError"] }] });
|
|
4860
|
+
`, isInline: true, styles: [":host{--dlg-header-h: 56px;--dlg-footer-h: 56px;--dlg-pad: 16px;display:flex;flex-direction:column;height:100%;overflow:hidden}:host([data-density=\"compact\"]){--dlg-header-h: 44px;--dlg-footer-h: 44px;--dlg-pad: 12px}.dialog-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:var(--dlg-pad);padding:0 var(--dlg-pad);height:var(--dlg-header-h);margin:0;background:var(--md-sys-color-surface-container-high);border-bottom:1px solid var(--md-sys-color-outline-variant);color:var(--md-sys-color-on-surface)}.dialog-title{margin:0;font:inherit;font-weight:600;color:var(--md-sys-color-on-surface)}.spacer{flex:1}.dialog-content{overflow:auto;padding:var(--dlg-pad);max-height:calc(100svh - var(--dlg-header-h) - 32px)}.dialog-header button.mat-icon-button{color:var(--md-sys-color-on-surface-variant)}.dialog-header button.mat-icon-button:hover{color:var(--md-sys-color-primary);background:var(--md-sys-color-primary-container)}.dialog-footer{position:sticky;bottom:0;z-index:1;padding:var(--dlg-pad)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: PraxisIconDirective, selector: "mat-icon[praxisIcon]", inputs: ["praxisIcon"] }, { kind: "component", type: PraxisDynamicForm, selector: "praxis-dynamic-form", inputs: ["resourcePath", "resourceId", "initialValue", "editorialContext", "mode", "config", "actions", "schemaSource", "schemaUrl", "submitUrl", "submitMethod", "responseSchemaUrl", "apiEndpointKey", "apiUrlEntry", "enableCustomization", "formId", "componentInstanceId", "layout", "backConfig", "hooks", "removeEmptyContainersOnSave", "reactiveValidation", "reactiveValidationDebounceMs", "notifyIfOutdated", "snoozeMs", "autoOpenSettingsOnOutdated", "readonlyModeGlobal", "disabledModeGlobal", "presentationModeGlobal", "visibleGlobal", "customEndpoints"], outputs: ["formSubmit", "formCancel", "formReset", "configChange", "formReady", "valueChange", "syncCompleted", "initializationError", "loadingStateChange", "enableCustomizationChange", "customAction", "actionConfirmation", "schemaStatusChange", "fieldRenderError"] }] });
|
|
4787
4861
|
}
|
|
4788
4862
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: DynamicFormDialogHostComponent, decorators: [{
|
|
4789
4863
|
type: Component,
|
|
@@ -4841,6 +4915,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
4841
4915
|
[apiUrlEntry]="apiUrlEntry"
|
|
4842
4916
|
[presentationModeGlobal]="mode === 'view' ? true : null"
|
|
4843
4917
|
[backConfig]="backConfig"
|
|
4918
|
+
[actions]="formActions"
|
|
4844
4919
|
(formSubmit)="onSave($event)"
|
|
4845
4920
|
(formCancel)="onCancel()"
|
|
4846
4921
|
></praxis-dynamic-form>
|
|
@@ -4859,6 +4934,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
|
|
|
4859
4934
|
type: ViewChild,
|
|
4860
4935
|
args: [PraxisDynamicForm]
|
|
4861
4936
|
}] } });
|
|
4937
|
+
function getFormSubmitStage(result) {
|
|
4938
|
+
if (!result || typeof result !== 'object' || !('stage' in result)) {
|
|
4939
|
+
return null;
|
|
4940
|
+
}
|
|
4941
|
+
const stage = result.stage;
|
|
4942
|
+
return stage === 'before' || stage === 'after' || stage === 'error'
|
|
4943
|
+
? stage
|
|
4944
|
+
: null;
|
|
4945
|
+
}
|
|
4946
|
+
function stringOrUndefined(value) {
|
|
4947
|
+
const text = String(value ?? '').trim();
|
|
4948
|
+
return text || undefined;
|
|
4949
|
+
}
|
|
4950
|
+
function deriveCreateSubmitLabel(actionLabel) {
|
|
4951
|
+
if (!actionLabel) {
|
|
4952
|
+
return 'Criar';
|
|
4953
|
+
}
|
|
4954
|
+
const match = actionLabel.match(/^(novo|nova|adicionar|incluir|criar)\s+(.+)$/i);
|
|
4955
|
+
if (match?.[2]) {
|
|
4956
|
+
return `Criar ${match[2].trim()}`;
|
|
4957
|
+
}
|
|
4958
|
+
return actionLabel;
|
|
4959
|
+
}
|
|
4862
4960
|
|
|
4863
4961
|
var dynamicFormDialogHost_component = /*#__PURE__*/Object.freeze({
|
|
4864
4962
|
__proto__: null,
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _praxisui_core from '@praxisui/core';
|
|
2
|
-
import { ApiEndpoint, TableConfig, PraxisDataQueryContext, FormConfig, BackConfig, RowAction, ToolbarAction, ApiUrlEntry, ResourceActionCatalogItem, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog, SettingsValueProvider } from '@praxisui/core';
|
|
2
|
+
import { ApiEndpoint, TableConfig, PraxisDataQueryContext, FormConfig, BackConfig, RowAction, ToolbarAction, ApiUrlEntry, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCategory, AiValueKind, AiCapability, AiCapabilityCatalog, SettingsValueProvider } from '@praxisui/core';
|
|
3
3
|
export { BackConfig } from '@praxisui/core';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
5
|
import { NgZone, OnChanges, EventEmitter, SimpleChanges, OnInit, Provider } from '@angular/core';
|
|
@@ -123,7 +123,7 @@ interface CrudValidationContext {
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
type CrudActionRuntimeEvent = {
|
|
126
|
-
actionConfig?: ResourceActionCatalogItem | null;
|
|
126
|
+
actionConfig?: ResourceActionCatalogItem | ResourceSurfaceCatalogItem | null;
|
|
127
127
|
};
|
|
128
128
|
type CrudContextAction = {
|
|
129
129
|
action: string;
|
|
@@ -230,6 +230,7 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
230
230
|
private resolveDiscoveredActionCatalog;
|
|
231
231
|
private selectDiscoveredWorkflowAction;
|
|
232
232
|
private resolveProvidedWorkflowAction;
|
|
233
|
+
private resolveProvidedSurface;
|
|
233
234
|
private selectSurfaceForCrudAction;
|
|
234
235
|
private getPreferredSurfaceIdsForCrudAction;
|
|
235
236
|
private isDiscoveryManagedCrudAction;
|
|
@@ -336,12 +337,15 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
336
337
|
submitMethod?: string | null;
|
|
337
338
|
apiEndpointKey?: ApiEndpoint | string | null;
|
|
338
339
|
apiUrlEntry?: ApiUrlEntry | null;
|
|
340
|
+
formActions?: FormConfig['actions'];
|
|
339
341
|
mode: 'create' | 'edit' | 'view';
|
|
340
342
|
backConfig?: BackConfig;
|
|
341
343
|
private idField;
|
|
342
344
|
texts: Record<string, string>;
|
|
343
345
|
constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent>, data: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage);
|
|
344
346
|
private extractInitialValue;
|
|
347
|
+
private resolveFormActions;
|
|
348
|
+
private resolveSubmitLabel;
|
|
345
349
|
ngOnInit(): void;
|
|
346
350
|
onSave(result: unknown): void;
|
|
347
351
|
onCancel(): void;
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.11",
|
|
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": "^20.1.0",
|
|
7
7
|
"@angular/core": "^20.1.0",
|
|
8
|
-
"@praxisui/dynamic-form": "^8.0.0-beta.
|
|
9
|
-
"@praxisui/table": "^8.0.0-beta.
|
|
10
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-fields": "^8.0.0-beta.
|
|
12
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
8
|
+
"@praxisui/dynamic-form": "^8.0.0-beta.11",
|
|
9
|
+
"@praxisui/table": "^8.0.0-beta.11",
|
|
10
|
+
"@praxisui/core": "^8.0.0-beta.11",
|
|
11
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.11",
|
|
12
|
+
"@praxisui/settings-panel": "^8.0.0-beta.11"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"tslib": "^2.3.0"
|