@praxisui/crud 9.0.0-beta.8 → 9.0.0-beta.81

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.0-beta.8",
3
+ "version": "9.0.0-beta.81",
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.8",
9
- "@praxisui/table": "^9.0.0-beta.8",
10
- "@praxisui/core": "^9.0.0-beta.8",
11
- "@praxisui/dynamic-fields": "^9.0.0-beta.8",
12
- "@praxisui/settings-panel": "^9.0.0-beta.8",
8
+ "@praxisui/dynamic-form": "^9.0.0-beta.81",
9
+ "@praxisui/table": "^9.0.0-beta.81",
10
+ "@praxisui/core": "^9.0.0-beta.81",
11
+ "@praxisui/dynamic-fields": "^9.0.0-beta.81",
12
+ "@praxisui/settings-panel": "^9.0.0-beta.81",
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.8",
17
+ "@praxisui/ai": "^9.0.0-beta.81",
18
18
  "rxjs": "~7.8.0"
19
19
  },
20
20
  "dependencies": {
@@ -28,6 +28,7 @@
28
28
  "keywords": [
29
29
  "angular",
30
30
  "praxisui",
31
+ "praxis",
31
32
  "crud",
32
33
  "admin",
33
34
  "backoffice",
@@ -48,7 +49,10 @@
48
49
  "./drawer-adapter": {
49
50
  "types": "./types/praxisui-crud-drawer-adapter.d.ts",
50
51
  "default": "./fesm2022/praxisui-crud-drawer-adapter.mjs"
52
+ },
53
+ "./ai/component-registry.json": {
54
+ "default": "./ai/component-registry.json"
51
55
  }
52
56
  },
53
57
  "type": "module"
54
- }
58
+ }
@@ -1,5 +1,5 @@
1
1
  import * as _praxisui_core from '@praxisui/core';
2
- import { RowAction, ToolbarAction, ApiEndpoint, ApiUrlEntry, BackConfig, TableConfig, PraxisDataQueryContext, FormConfig, ResourceActionCatalogItem, ResourceSurfaceCatalogItem, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCatalog, AiCapability, AiCapabilityCategory, AiValueKind, ComponentAuthoringManifest, SettingsValueProvider } 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';
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, AfterViewInit, OnDestroy } from '@angular/core';
@@ -20,14 +20,20 @@ interface DialogConfig<D = any> extends MatDialogConfig<D> {
20
20
  disableCloseOnEsc?: boolean;
21
21
  /** Density hint consumed by CRUD dialog host chrome */
22
22
  density?: 'default' | 'compact';
23
+ /** Praxis backdrop visual preset */
24
+ backdropStyle?: 'blur' | 'dim' | 'transparent';
23
25
  /** Enable maximize button */
24
26
  canMaximize?: boolean;
25
27
  /** Persist last dialog size/state for the same form */
26
28
  rememberLastState?: boolean;
29
+ /** Keep the dialog open after a successful form submission */
30
+ closeOnSave?: boolean;
27
31
  /** Start dialog maximized */
28
32
  startMaximized?: boolean;
29
33
  /** Screen width in px where dialog starts fullscreen */
30
34
  fullscreenBreakpoint?: number;
35
+ /** Viewport inset in px applied while the dialog or drawer is maximized */
36
+ edgeGap?: number;
31
37
  }
32
38
 
33
39
  declare class DialogService {
@@ -53,6 +59,7 @@ interface CrudActionFormContract {
53
59
  apiEndpointKey?: ApiEndpoint | string | null;
54
60
  apiUrlEntry?: ApiUrlEntry | null;
55
61
  initialValue?: Record<string, unknown> | null;
62
+ layoutPolicy?: DynamicFormLayoutPolicy | null;
56
63
  }
57
64
  type CrudActionResolutionMode = 'inferred' | 'explicit';
58
65
  type CrudAction = (RowAction | ToolbarAction) & {
@@ -72,8 +79,13 @@ interface CrudDefaults {
72
79
  }
73
80
  interface CrudResource {
74
81
  path: string;
82
+ schemaPath?: string | null;
75
83
  idField?: string | number;
84
+ title?: string | null;
85
+ label?: string | null;
86
+ formTitle?: string | null;
76
87
  endpointKey?: ApiEndpoint;
88
+ apiUrlEntry?: ApiUrlEntry | null;
77
89
  }
78
90
  interface CrudMetadata {
79
91
  component: 'praxis-crud';
@@ -124,7 +136,13 @@ interface CrudValidationContext {
124
136
  }
125
137
 
126
138
  type CrudActionRuntimeEvent = {
127
- actionConfig?: ResourceActionCatalogItem | ResourceSurfaceCatalogItem | null;
139
+ action?: string;
140
+ actionConfig?: ToolbarAction | ResourceActionCatalogItem | ResourceSurfaceCatalogItem | null;
141
+ row?: Record<string, unknown>;
142
+ selectedRow?: Record<string, unknown>;
143
+ selectedRows?: Record<string, unknown>[];
144
+ rows?: Record<string, unknown>[];
145
+ resourceIdentity?: MaterializedResourceIdentity | null;
128
146
  };
129
147
  type CrudContextAction = {
130
148
  action: string;
@@ -149,6 +167,8 @@ declare class PraxisCrudComponent implements OnChanges {
149
167
  componentInstanceId?: string;
150
168
  context?: Record<string, unknown>;
151
169
  enableCustomization: boolean;
170
+ /** Capability publica exigida para authoring governado do CRUD e da tabela interna. */
171
+ authoringCapability: string | null;
152
172
  configureRequested: EventEmitter<void>;
153
173
  afterOpen: EventEmitter<{
154
174
  mode: FormOpenMode;
@@ -181,6 +201,7 @@ declare class PraxisCrudComponent implements OnChanges {
181
201
  private table;
182
202
  private readonly storage;
183
203
  private readonly settingsPanel;
204
+ private readonly enterpriseRuntimeContext;
184
205
  private readonly snack;
185
206
  private readonly dialog;
186
207
  private readonly i18n;
@@ -188,8 +209,10 @@ declare class PraxisCrudComponent implements OnChanges {
188
209
  private resourceDiscoveryInstance?;
189
210
  private actionOpenAdapterInstance?;
190
211
  private surfaceOpenAdapterInstance?;
212
+ private materializedRefreshSequence;
191
213
  private readonly global;
192
214
  private readonly surfaceService;
215
+ private readonly surfaceOutlets;
193
216
  private readonly componentKeys;
194
217
  private readonly route;
195
218
  private warnedMissingId;
@@ -199,16 +222,21 @@ declare class PraxisCrudComponent implements OnChanges {
199
222
  private lastAppliedResourceIdentity;
200
223
  private tableCollectionLinks;
201
224
  private collectionCapabilities;
225
+ private activeAuthoringPanelRef;
226
+ constructor();
202
227
  private collectionCapabilitiesRequestHref;
203
228
  private collectionCapabilitiesResolvedHref;
204
229
  private collectionCapabilitiesRequestSeq;
205
230
  private currentAuthoringDocument?;
231
+ selectedRow: Record<string, unknown> | null;
206
232
  private getResourceDiscovery;
207
233
  private getActionOpenAdapter;
208
234
  private getSurfaceOpenAdapter;
209
235
  onResetPreferences(): void;
210
236
  onTableRowClick(event: unknown): void;
211
237
  onTableSelectionChange(event: unknown): void;
238
+ onBulkAction(event: CrudActionRuntimeEvent): Promise<void>;
239
+ onToolbarAction(event: CrudActionRuntimeEvent): Promise<void>;
212
240
  ngOnChanges(changes: SimpleChanges): void;
213
241
  onAction(action: string, row?: Record<string, unknown>, runtimeEvent?: CrudActionRuntimeEvent): Promise<void>;
214
242
  private hasExplicitOpenBinding;
@@ -225,7 +253,13 @@ declare class PraxisCrudComponent implements OnChanges {
225
253
  getEmptyStatePrimaryAction(): string;
226
254
  onConfigureRequested(): void;
227
255
  private tryHandleCanonicalDeleteAction;
256
+ private tryHandleCanonicalDuplicateDraftAction;
228
257
  private refreshTable;
258
+ private tryRefreshMaterializedLocalData;
259
+ private isCurrentMaterializedRefresh;
260
+ private resolveMaterializedReadUrl;
261
+ private unwrapRestData;
262
+ private extractCollectionData;
229
263
  private emitTableRuntimeConfigSnapshot;
230
264
  private applyResolvedCrudState;
231
265
  private assignTableConfigForBinding;
@@ -234,6 +268,12 @@ declare class PraxisCrudComponent implements OnChanges {
234
268
  private syncRuntimeBindings;
235
269
  private resolveQueryContext;
236
270
  private resolveFilterCriteria;
271
+ private extractRowFromEvent;
272
+ private extractSelectedRowFromEvent;
273
+ private extractSelectedRowFromBulkAction;
274
+ private extractSelectedRowFromToolbarAction;
275
+ private extractDiscoveryActionConfig;
276
+ private resolveSelectedRowForAction;
237
277
  private tryOpenDiscoveredCrudSurface;
238
278
  private resolveDiscoveredSurfaceCatalog;
239
279
  private tryOpenDiscoveredWorkflowAction;
@@ -251,8 +291,12 @@ declare class PraxisCrudComponent implements OnChanges {
251
291
  private handleDiscoveredSurfaceResult;
252
292
  private buildEffectiveTableConfig;
253
293
  private isAddLike;
294
+ private normalizeCrudActionName;
295
+ private shouldCanonicalizeToolbarCreateAction;
296
+ private isCreateActionAliasName;
254
297
  private buildTableCrudContext;
255
298
  private readonly openCrudAuthoringFromTable;
299
+ isCustomizationAvailable(): boolean;
256
300
  private applyCrudAuthoringPayload;
257
301
  private buildWidgetPersistencePayload;
258
302
  private resolveCreateToolbarAction;
@@ -274,9 +318,12 @@ declare class PraxisCrudComponent implements OnChanges {
274
318
  private componentKeyId;
275
319
  private warnMissingId;
276
320
  private getCrudActionLabel;
321
+ private ensureCanonicalCollectionEmptyState;
277
322
  private tx;
323
+ private txWithParams;
324
+ private interpolateTranslationParams;
278
325
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisCrudComponent, never>;
279
- 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; }; }, { "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>;
326
+ 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>;
280
327
  }
281
328
 
282
329
  type CrudDrawerResultType = 'save' | 'delete' | 'close';
@@ -298,6 +345,7 @@ declare class CrudLauncherService {
298
345
  }, runtime?: {
299
346
  capabilities?: ResourceCapabilitySnapshot | null;
300
347
  links?: RestApiLinks | null;
348
+ resourceIdentity?: MaterializedResourceIdentity | null;
301
349
  }): Promise<{
302
350
  mode: FormOpenMode;
303
351
  ref?: DialogRef<any>;
@@ -306,6 +354,7 @@ declare class CrudLauncherService {
306
354
  private buildRoute;
307
355
  private mapInputs;
308
356
  private resolveActionForLaunch;
357
+ private resolveSubmitUrlTemplate;
309
358
  private resolveActionFormContract;
310
359
  resolveRuntimeContract(action: CrudAction, row: Record<string, unknown> | undefined, metadata: CrudMetadata, runtime?: {
311
360
  capabilities?: ResourceCapabilitySnapshot | null;
@@ -316,10 +365,14 @@ declare class CrudLauncherService {
316
365
  submitMethod?: string | null;
317
366
  apiEndpointKey?: unknown;
318
367
  apiUrlEntry?: unknown;
368
+ layoutPolicy?: unknown;
319
369
  };
320
370
  private buildInferredFormId;
321
371
  private isCanonicalCrudAction;
372
+ private normalizeActionForLaunch;
373
+ private normalizeCrudOperationName;
322
374
  private isExplicitCrudAction;
375
+ private defaultInferredLayoutPolicy;
323
376
  private mergeCrudOverrides;
324
377
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudLauncherService, never>;
325
378
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<CrudLauncherService>;
@@ -333,8 +386,10 @@ declare class DynamicFormDialogHostComponent implements OnInit {
333
386
  private configStorage;
334
387
  formComp?: PraxisDynamicForm;
335
388
  modal: any;
389
+ presentation: 'modal' | 'drawer';
336
390
  maximized: boolean;
337
391
  private initialSize;
392
+ private readonly initialPosition?;
338
393
  private rememberState;
339
394
  private stateKey?;
340
395
  private backDefaults;
@@ -342,19 +397,28 @@ declare class DynamicFormDialogHostComponent implements OnInit {
342
397
  resourcePath?: string;
343
398
  resourceId?: string | number;
344
399
  initialValue?: Record<string, unknown> | null;
400
+ resourceIdentity: MaterializedResourceIdentity | null;
345
401
  schemaUrl?: string | null;
346
402
  submitUrl?: string | null;
347
403
  submitMethod?: string | null;
348
404
  apiEndpointKey?: ApiEndpoint | string | null;
349
405
  apiUrlEntry?: ApiUrlEntry | null;
406
+ layoutPolicy?: DynamicFormLayoutPolicy | null;
407
+ formConfig: FormConfig;
350
408
  formActions?: FormConfig['actions'];
409
+ readonly formConfigPersistenceStrategy = "input-first";
351
410
  mode: 'create' | 'edit' | 'view';
352
411
  backConfig?: BackConfig;
353
412
  private idField;
354
413
  texts: Record<string, string>;
355
414
  constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent>, data: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage);
356
415
  private extractInitialValue;
416
+ private resolveFormConfig;
417
+ get dialogTitle(): string;
418
+ private resolveActionDialogTitle;
419
+ private resolveResourceTitle;
357
420
  private resolveFormActions;
421
+ private resolveLayoutPolicy;
358
422
  private resolveSubmitLabel;
359
423
  ngOnInit(): void;
360
424
  onSave(result: unknown): void;
@@ -362,6 +426,8 @@ declare class DynamicFormDialogHostComponent implements OnInit {
362
426
  toggleMaximize(initial?: boolean): void;
363
427
  private saveState;
364
428
  private applySavedState;
429
+ private updateHostPosition;
430
+ private resolveMaximizedDrawerPosition;
365
431
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicFormDialogHostComponent, never>;
366
432
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicFormDialogHostComponent, "praxis-dynamic-form-dialog-host", never, {}, {}, never, never, true, never>;
367
433
  }
@@ -604,6 +670,7 @@ interface PraxisCrudWidgetEditorInputs {
604
670
  componentInstanceId?: string;
605
671
  context?: Record<string, unknown>;
606
672
  enableCustomization?: boolean;
673
+ authoringCapability?: string | null;
607
674
  [key: string]: unknown;
608
675
  }
609
676
  interface PraxisCrudWidgetEditorValue {