@praxisui/crud 9.0.4-rc.8 → 9.0.4

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/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@praxisui/crud",
3
- "version": "9.0.4-rc.8",
3
+ "version": "9.0.4",
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.4-rc.8",
9
- "@praxisui/table": "^9.0.4-rc.8",
10
- "@praxisui/core": "^9.0.4-rc.8",
11
- "@praxisui/dynamic-fields": "^9.0.4-rc.8",
12
- "@praxisui/settings-panel": "^9.0.4-rc.8",
8
+ "@praxisui/dynamic-form": "^9.0.4",
9
+ "@praxisui/table": "^9.0.4",
10
+ "@praxisui/core": "^9.0.4",
11
+ "@praxisui/dynamic-fields": "^9.0.4",
12
+ "@praxisui/settings-panel": "^9.0.4",
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.4-rc.8",
17
+ "@praxisui/ai": "^9.0.4",
18
18
  "rxjs": "~7.8.0"
19
19
  },
20
20
  "dependencies": {
@@ -55,8 +55,10 @@ interface CrudDrawerOpenConfig {
55
55
  action: CrudAction;
56
56
  metadata: CrudMetadata;
57
57
  inputs: Record<string, unknown>;
58
- /** Read-only record context for edit drawers. It is never part of form inputs or submit payloads. */
58
+ /** Read-only record context for existing-record drawers. It is never part of form inputs or submit payloads. */
59
59
  resourceIdentity?: MaterializedResourceIdentity | null;
60
+ /** Read-only task scope for related operations. It is never part of form inputs or submit payloads. */
61
+ contextIdentity?: MaterializedResourceIdentity | null;
60
62
  /**
61
63
  * Notifica fechamento do drawer (cancelamento/fechamento externo/resultado finalizado).
62
64
  */
@@ -1,8 +1,9 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { NgZone, OnChanges, EventEmitter, SimpleChanges, OnInit, AfterViewInit, Provider, OnDestroy } from '@angular/core';
1
3
  import * as _praxisui_core from '@praxisui/core';
2
- import { RowAction, ToolbarAction, ApiEndpoint, ApiUrlEntry, DynamicFormLayoutPolicy, BackConfig, TableConfig, PraxisDataQueryContext, FormConfig, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, MaterializedResourceIdentity, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCatalog, AiCapability, AiCapabilityCategory, AiValueKind, ComponentAuthoringManifest, SettingsValueProvider } from '@praxisui/core';
4
+ import { RowAction, ToolbarAction, ApiEndpoint, ApiUrlEntry, DynamicFormLayoutPolicy, BackConfig, TableConfig, PraxisDataQueryContext, FormConfig, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, MaterializedResourceIdentity, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, SurfaceDrawerRef, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCatalog, AiCapability, AiCapabilityCategory, AiValueKind, ComponentAuthoringManifest, SettingsValueProvider } from '@praxisui/core';
3
5
  export { BackConfig } from '@praxisui/core';
4
- import * as _angular_core from '@angular/core';
5
- import { NgZone, OnChanges, EventEmitter, SimpleChanges, OnInit, Provider, AfterViewInit, OnDestroy } from '@angular/core';
6
+ import { TableConfigPersistenceStrategy } from '@praxisui/table';
6
7
  import { MatDialogConfig, MatDialogRef, MatDialog } from '@angular/material/dialog';
7
8
  export { MAT_DIALOG_DATA as DIALOG_DATA } from '@angular/material/dialog';
8
9
  import { ComponentType } from '@angular/cdk/portal';
@@ -148,6 +149,8 @@ type CrudActionRuntimeEvent = {
148
149
  selectedRows?: Record<string, unknown>[];
149
150
  rows?: Record<string, unknown>[];
150
151
  resourceIdentity?: MaterializedResourceIdentity | null;
152
+ /** Ephemeral focus origin provided by a runtime surface, never persisted. */
153
+ focusOrigin?: HTMLElement;
151
154
  };
152
155
  type CrudContextAction = {
153
156
  action: string;
@@ -170,6 +173,8 @@ declare class PraxisCrudComponent implements OnChanges {
170
173
  metadata: CrudMetadata | string;
171
174
  crudId: string;
172
175
  componentInstanceId?: string;
176
+ /** Controls whether the CRUD's internal table trusts host input or stored user configuration. */
177
+ tableConfigPersistenceStrategy: TableConfigPersistenceStrategy;
173
178
  context?: Record<string, unknown>;
174
179
  enableCustomization: boolean;
175
180
  /** Capability publica exigida para authoring governado do CRUD e da tabela interna. */
@@ -189,6 +194,8 @@ declare class PraxisCrudComponent implements OnChanges {
189
194
  }>;
190
195
  error: EventEmitter<unknown>;
191
196
  rowClick: EventEmitter<unknown>;
197
+ /** Emits the canonical table row-action envelope before the CRUD handles its surface/action. */
198
+ rowAction: EventEmitter<CrudActionRuntimeEvent>;
192
199
  selectionChange: EventEmitter<unknown>;
193
200
  tableRuntimeConfigChange: EventEmitter<_praxisui_core.TableConfigModern>;
194
201
  crudAuthoringDocumentApplied: EventEmitter<CrudAuthoringWidgetPersistenceEvent>;
@@ -199,6 +206,7 @@ declare class PraxisCrudComponent implements OnChanges {
199
206
  tableQueryContext: Record<string, unknown> | null;
200
207
  tableFilterCriteria: Record<string, unknown>;
201
208
  tableCrudContext?: CrudContextValue;
209
+ readonly openingActionLabel: _angular_core.WritableSignal<string | null>;
202
210
  private readonly launcher;
203
211
  private readonly http;
204
212
  private readonly destroyRef;
@@ -234,6 +242,7 @@ declare class PraxisCrudComponent implements OnChanges {
234
242
  private collectionCapabilitiesRequestSeq;
235
243
  private currentAuthoringDocument?;
236
244
  selectedRow: Record<string, unknown> | null;
245
+ onTableRowAction(event: CrudActionRuntimeEvent): void;
237
246
  private getResourceDiscovery;
238
247
  private getActionOpenAdapter;
239
248
  private getSurfaceOpenAdapter;
@@ -244,6 +253,9 @@ declare class PraxisCrudComponent implements OnChanges {
244
253
  onToolbarAction(event: CrudActionRuntimeEvent): Promise<void>;
245
254
  ngOnChanges(changes: SimpleChanges): void;
246
255
  onAction(action: string, row?: Record<string, unknown>, runtimeEvent?: CrudActionRuntimeEvent): Promise<void>;
256
+ private resolveTaskScopeIdentity;
257
+ getOpeningActionStatus(actionLabel: string): string;
258
+ private resolveOpeningActionLabel;
247
259
  private hasExplicitOpenBinding;
248
260
  getCurrentTableConfigSnapshot(): TableConfig | null;
249
261
  onTableMetadataChange(): void;
@@ -260,6 +272,7 @@ declare class PraxisCrudComponent implements OnChanges {
260
272
  private tryHandleCanonicalDeleteAction;
261
273
  private tryHandleCanonicalDuplicateDraftAction;
262
274
  private refreshTable;
275
+ private resolveSurfaceRuntime;
263
276
  private tryRefreshMaterializedLocalData;
264
277
  private isCurrentMaterializedRefresh;
265
278
  private resolveMaterializedReadUrl;
@@ -277,11 +290,18 @@ declare class PraxisCrudComponent implements OnChanges {
277
290
  private extractSelectedRowFromEvent;
278
291
  private extractSelectedRowFromBulkAction;
279
292
  private extractSelectedRowFromToolbarAction;
293
+ /**
294
+ * Keeps the DOM trigger exclusively in transient runtime context. Discovery
295
+ * payloads remain JSON-safe and can still be authored, inspected and
296
+ * persisted independently from the browser that opened the surface.
297
+ */
298
+ private resolveRuntimeFocusOrigin;
280
299
  private extractDiscoveryActionConfig;
281
300
  private resolveSelectedRowForAction;
282
301
  private tryOpenDiscoveredCrudSurface;
283
302
  private resolveDiscoveredSurfaceCatalog;
284
303
  private tryOpenDiscoveredWorkflowAction;
304
+ private notifySurfaceNavigationFailure;
285
305
  private resolveDiscoveredActionCatalog;
286
306
  private selectDiscoveredWorkflowAction;
287
307
  private resolveProvidedWorkflowAction;
@@ -313,6 +333,8 @@ declare class PraxisCrudComponent implements OnChanges {
313
333
  private supportsViewCapability;
314
334
  private supportsEditCapability;
315
335
  private supportsDeleteCapability;
336
+ private resolveOperationAvailability;
337
+ private isCatalogActionAvailable;
316
338
  private hasCanonicalOperation;
317
339
  private resolveCollectionCapabilitiesHref;
318
340
  private resolveCrudResourceIdentity;
@@ -329,7 +351,7 @@ declare class PraxisCrudComponent implements OnChanges {
329
351
  private txWithParams;
330
352
  private interpolateTranslationParams;
331
353
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisCrudComponent, never>;
332
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisCrudComponent, "praxis-crud", never, { "metadata": { "alias": "metadata"; "required": true; }; "crudId": { "alias": "crudId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "context": { "alias": "context"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "authoringCapability": { "alias": "authoringCapability"; "required": false; }; }, { "configureRequested": "configureRequested"; "afterOpen": "afterOpen"; "afterClose": "afterClose"; "afterSave": "afterSave"; "afterDelete": "afterDelete"; "error": "error"; "rowClick": "rowClick"; "selectionChange": "selectionChange"; "tableRuntimeConfigChange": "tableRuntimeConfigChange"; "crudAuthoringDocumentApplied": "crudAuthoringDocumentApplied"; "crudAuthoringDocumentSaved": "crudAuthoringDocumentSaved"; }, never, never, true, never>;
354
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisCrudComponent, "praxis-crud", never, { "metadata": { "alias": "metadata"; "required": true; }; "crudId": { "alias": "crudId"; "required": true; }; "componentInstanceId": { "alias": "componentInstanceId"; "required": false; }; "tableConfigPersistenceStrategy": { "alias": "tableConfigPersistenceStrategy"; "required": false; }; "context": { "alias": "context"; "required": false; }; "enableCustomization": { "alias": "enableCustomization"; "required": false; }; "authoringCapability": { "alias": "authoringCapability"; "required": false; }; }, { "configureRequested": "configureRequested"; "afterOpen": "afterOpen"; "afterClose": "afterClose"; "afterSave": "afterSave"; "afterDelete": "afterDelete"; "error": "error"; "rowClick": "rowClick"; "rowAction": "rowAction"; "selectionChange": "selectionChange"; "tableRuntimeConfigChange": "tableRuntimeConfigChange"; "crudAuthoringDocumentApplied": "crudAuthoringDocumentApplied"; "crudAuthoringDocumentSaved": "crudAuthoringDocumentSaved"; }, never, never, true, never>;
333
355
  }
334
356
 
335
357
  type CrudDrawerResultType = 'save' | 'delete' | 'close';
@@ -338,25 +360,36 @@ interface CrudDrawerResult {
338
360
  data?: Record<string, unknown>;
339
361
  }
340
362
 
363
+ interface CrudLaunchRuntime {
364
+ capabilities?: ResourceCapabilitySnapshot | null;
365
+ links?: RestApiLinks | null;
366
+ resourceIdentity?: MaterializedResourceIdentity | null;
367
+ contextIdentity?: MaterializedResourceIdentity | null;
368
+ /** Active runtime drawer session. It is never persisted in CRUD metadata. */
369
+ surfaceRuntime?: SurfaceDrawerRef | null;
370
+ /** Stable runtime trigger for restoring focus after a form overlay closes. */
371
+ focusOrigin?: HTMLElement | null;
372
+ }
341
373
  declare class CrudLauncherService {
342
374
  private readonly router;
343
375
  private readonly dialog;
344
376
  private readonly storage;
345
377
  private readonly global;
346
378
  private readonly operationResolver;
379
+ private readonly logger;
380
+ private dialogHostPromise?;
381
+ private nextSurfaceFrameId;
347
382
  private readonly drawerAdapter;
348
383
  launch(action: CrudAction, row: Record<string, unknown> | undefined, metadata: CrudMetadata, componentKeyId?: string | null, drawerCallbacks?: {
349
384
  onClose?: () => void;
350
385
  onResult?: (result: CrudDrawerResult) => void;
351
- }, runtime?: {
352
- capabilities?: ResourceCapabilitySnapshot | null;
353
- links?: RestApiLinks | null;
354
- resourceIdentity?: MaterializedResourceIdentity | null;
355
- }): Promise<{
386
+ }, runtime?: CrudLaunchRuntime): Promise<{
356
387
  mode: FormOpenMode;
357
388
  ref?: DialogRef<any>;
358
389
  }>;
359
390
  resolveOpenMode(action: CrudAction, metadata: CrudMetadata): FormOpenMode;
391
+ private isLikelyOverlayAction;
392
+ private loadDialogHost;
360
393
  private buildRoute;
361
394
  private mapInputs;
362
395
  private resolveActionForLaunch;
@@ -379,32 +412,38 @@ declare class CrudLauncherService {
379
412
  private normalizeCrudOperationName;
380
413
  private isExplicitCrudAction;
381
414
  private defaultInferredLayoutPolicy;
415
+ private buildSurfaceFrameId;
416
+ private resolveSurfaceFrameTitle;
417
+ private resolveSurfaceFrameSubtitle;
418
+ private bindSurfaceFrameLifecycle;
382
419
  private mergeCrudOverrides;
383
420
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudLauncherService, never>;
384
421
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<CrudLauncherService>;
385
422
  }
386
423
 
387
- declare class DynamicFormDialogHostComponent implements OnInit {
388
- dialogRef: DialogRef<DynamicFormDialogHostComponent>;
389
- data: any;
424
+ declare class DynamicFormDialogHostComponent implements OnInit, AfterViewInit {
425
+ dialogRef: DialogRef<DynamicFormDialogHostComponent> | null;
390
426
  private dialogService;
391
427
  private crud;
392
428
  private configStorage;
429
+ private readonly surfaceRef;
393
430
  formComp?: PraxisDynamicForm;
394
431
  modal: any;
395
- presentation: 'modal' | 'drawer';
432
+ presentation: 'modal' | 'drawer' | 'surface-frame';
396
433
  maximized: boolean;
397
434
  private initialSize;
398
435
  private readonly initialPosition?;
399
436
  private rememberState;
400
437
  private stateKey?;
401
438
  private backDefaults;
439
+ private terminalClose;
402
440
  private destroyRef;
403
441
  private readonly i18n;
404
442
  resourcePath?: string;
405
443
  resourceId?: string | number;
406
444
  initialValue?: Record<string, unknown> | null;
407
445
  resourceIdentity: MaterializedResourceIdentity | null;
446
+ contextIdentity: MaterializedResourceIdentity | null;
408
447
  schemaUrl?: string | null;
409
448
  submitUrl?: string | null;
410
449
  submitMethod?: string | null;
@@ -414,22 +453,33 @@ declare class DynamicFormDialogHostComponent implements OnInit {
414
453
  formConfig: FormConfig;
415
454
  formActions?: FormConfig['actions'];
416
455
  readonly formConfigPersistenceStrategy = "input-first";
456
+ readonly fieldIconPolicy = "presentation-only";
417
457
  mode: 'create' | 'edit' | 'view';
418
458
  backConfig?: BackConfig;
419
459
  private idField;
460
+ readonly isSurfaceFrame: boolean;
461
+ readonly data: any;
420
462
  texts: Record<string, string>;
421
- constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent>, data: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage);
463
+ constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent> | null, dialogData: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage, surfaceRef?: SurfaceDrawerRef | null, surfaceContentData?: Readonly<Record<string, unknown>> | null);
464
+ get resourceIdentityLabel(): string;
465
+ get showContextIdentity(): boolean;
466
+ private sameIdentity;
467
+ private identityLabel;
422
468
  private extractInitialValue;
423
469
  private resolveFormConfig;
424
470
  get dialogTitle(): string;
471
+ get dialogSubtitle(): string | undefined;
472
+ get dialogIcon(): string | undefined;
425
473
  private resolveActionDialogTitle;
426
474
  private resolveResourceTitle;
427
475
  private resolveFormActions;
428
476
  private resolveLayoutPolicy;
429
477
  private resolveSubmitLabel;
430
478
  ngOnInit(): void;
479
+ ngAfterViewInit(): void;
431
480
  onSave(result: unknown): void;
432
481
  onCancel(): void;
482
+ private canLeaveSurfaceFrame;
433
483
  toggleMaximize(initial?: boolean): void;
434
484
  private resolveOverlayPane;
435
485
  private captureRenderedInitialSize;
@@ -437,7 +487,7 @@ declare class DynamicFormDialogHostComponent implements OnInit {
437
487
  private applySavedState;
438
488
  private updateHostPosition;
439
489
  private resolveMaximizedDrawerPosition;
440
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicFormDialogHostComponent, never>;
490
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicFormDialogHostComponent, [{ optional: true; }, { optional: true; }, null, null, null, { optional: true; }, { optional: true; }]>;
441
491
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicFormDialogHostComponent, "praxis-dynamic-form-dialog-host", never, {}, {}, never, never, true, never>;
442
492
  }
443
493
 
@@ -677,6 +727,7 @@ interface PraxisCrudWidgetEditorInputs {
677
727
  metadata?: CrudMetadata | string | null;
678
728
  crudId?: string;
679
729
  componentInstanceId?: string;
730
+ tableConfigPersistenceStrategy?: TableConfigPersistenceStrategy;
680
731
  context?: Record<string, unknown>;
681
732
  enableCustomization?: boolean;
682
733
  authoringCapability?: string | null;