@praxisui/crud 9.0.0-beta.5 → 9.0.0-beta.50
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 +1 -1
- package/ai/component-registry.json +10721 -0
- package/fesm2022/praxisui-crud.mjs +425 -70
- package/package.json +12 -8
- package/types/praxisui-crud.d.ts +27 -1
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.50",
|
|
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.50",
|
|
9
|
+
"@praxisui/table": "^9.0.0-beta.50",
|
|
10
|
+
"@praxisui/core": "^9.0.0-beta.50",
|
|
11
|
+
"@praxisui/dynamic-fields": "^9.0.0-beta.50",
|
|
12
|
+
"@praxisui/settings-panel": "^9.0.0-beta.50",
|
|
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.50",
|
|
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
|
+
}
|
package/types/praxisui-crud.d.ts
CHANGED
|
@@ -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, 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';
|
|
@@ -53,6 +53,7 @@ interface CrudActionFormContract {
|
|
|
53
53
|
apiEndpointKey?: ApiEndpoint | string | null;
|
|
54
54
|
apiUrlEntry?: ApiUrlEntry | null;
|
|
55
55
|
initialValue?: Record<string, unknown> | null;
|
|
56
|
+
layoutPolicy?: DynamicFormLayoutPolicy | null;
|
|
56
57
|
}
|
|
57
58
|
type CrudActionResolutionMode = 'inferred' | 'explicit';
|
|
58
59
|
type CrudAction = (RowAction | ToolbarAction) & {
|
|
@@ -72,8 +73,10 @@ interface CrudDefaults {
|
|
|
72
73
|
}
|
|
73
74
|
interface CrudResource {
|
|
74
75
|
path: string;
|
|
76
|
+
schemaPath?: string | null;
|
|
75
77
|
idField?: string | number;
|
|
76
78
|
endpointKey?: ApiEndpoint;
|
|
79
|
+
apiUrlEntry?: ApiUrlEntry | null;
|
|
77
80
|
}
|
|
78
81
|
interface CrudMetadata {
|
|
79
82
|
component: 'praxis-crud';
|
|
@@ -124,7 +127,9 @@ interface CrudValidationContext {
|
|
|
124
127
|
}
|
|
125
128
|
|
|
126
129
|
type CrudActionRuntimeEvent = {
|
|
130
|
+
action?: string;
|
|
127
131
|
actionConfig?: ResourceActionCatalogItem | ResourceSurfaceCatalogItem | null;
|
|
132
|
+
rows?: Record<string, unknown>[];
|
|
128
133
|
};
|
|
129
134
|
type CrudContextAction = {
|
|
130
135
|
action: string;
|
|
@@ -203,12 +208,14 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
203
208
|
private collectionCapabilitiesResolvedHref;
|
|
204
209
|
private collectionCapabilitiesRequestSeq;
|
|
205
210
|
private currentAuthoringDocument?;
|
|
211
|
+
selectedRow: Record<string, unknown> | null;
|
|
206
212
|
private getResourceDiscovery;
|
|
207
213
|
private getActionOpenAdapter;
|
|
208
214
|
private getSurfaceOpenAdapter;
|
|
209
215
|
onResetPreferences(): void;
|
|
210
216
|
onTableRowClick(event: unknown): void;
|
|
211
217
|
onTableSelectionChange(event: unknown): void;
|
|
218
|
+
onBulkAction(event: CrudActionRuntimeEvent): Promise<void>;
|
|
212
219
|
ngOnChanges(changes: SimpleChanges): void;
|
|
213
220
|
onAction(action: string, row?: Record<string, unknown>, runtimeEvent?: CrudActionRuntimeEvent): Promise<void>;
|
|
214
221
|
private hasExplicitOpenBinding;
|
|
@@ -234,6 +241,10 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
234
241
|
private syncRuntimeBindings;
|
|
235
242
|
private resolveQueryContext;
|
|
236
243
|
private resolveFilterCriteria;
|
|
244
|
+
private extractRowFromEvent;
|
|
245
|
+
private extractSelectedRowFromEvent;
|
|
246
|
+
private extractSelectedRowFromBulkAction;
|
|
247
|
+
private resolveSelectedRowForAction;
|
|
237
248
|
private tryOpenDiscoveredCrudSurface;
|
|
238
249
|
private resolveDiscoveredSurfaceCatalog;
|
|
239
250
|
private tryOpenDiscoveredWorkflowAction;
|
|
@@ -251,6 +262,9 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
251
262
|
private handleDiscoveredSurfaceResult;
|
|
252
263
|
private buildEffectiveTableConfig;
|
|
253
264
|
private isAddLike;
|
|
265
|
+
private normalizeCrudActionName;
|
|
266
|
+
private shouldCanonicalizeToolbarCreateAction;
|
|
267
|
+
private isCreateActionAliasName;
|
|
254
268
|
private buildTableCrudContext;
|
|
255
269
|
private readonly openCrudAuthoringFromTable;
|
|
256
270
|
private applyCrudAuthoringPayload;
|
|
@@ -306,6 +320,7 @@ declare class CrudLauncherService {
|
|
|
306
320
|
private buildRoute;
|
|
307
321
|
private mapInputs;
|
|
308
322
|
private resolveActionForLaunch;
|
|
323
|
+
private resolveSubmitUrlTemplate;
|
|
309
324
|
private resolveActionFormContract;
|
|
310
325
|
resolveRuntimeContract(action: CrudAction, row: Record<string, unknown> | undefined, metadata: CrudMetadata, runtime?: {
|
|
311
326
|
capabilities?: ResourceCapabilitySnapshot | null;
|
|
@@ -316,10 +331,14 @@ declare class CrudLauncherService {
|
|
|
316
331
|
submitMethod?: string | null;
|
|
317
332
|
apiEndpointKey?: unknown;
|
|
318
333
|
apiUrlEntry?: unknown;
|
|
334
|
+
layoutPolicy?: unknown;
|
|
319
335
|
};
|
|
320
336
|
private buildInferredFormId;
|
|
321
337
|
private isCanonicalCrudAction;
|
|
338
|
+
private normalizeActionForLaunch;
|
|
339
|
+
private normalizeCrudOperationName;
|
|
322
340
|
private isExplicitCrudAction;
|
|
341
|
+
private defaultInferredLayoutPolicy;
|
|
323
342
|
private mergeCrudOverrides;
|
|
324
343
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudLauncherService, never>;
|
|
325
344
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CrudLauncherService>;
|
|
@@ -333,6 +352,7 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
333
352
|
private configStorage;
|
|
334
353
|
formComp?: PraxisDynamicForm;
|
|
335
354
|
modal: any;
|
|
355
|
+
presentation: 'modal' | 'drawer';
|
|
336
356
|
maximized: boolean;
|
|
337
357
|
private initialSize;
|
|
338
358
|
private rememberState;
|
|
@@ -347,6 +367,8 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
347
367
|
submitMethod?: string | null;
|
|
348
368
|
apiEndpointKey?: ApiEndpoint | string | null;
|
|
349
369
|
apiUrlEntry?: ApiUrlEntry | null;
|
|
370
|
+
layoutPolicy?: DynamicFormLayoutPolicy | null;
|
|
371
|
+
formConfig: FormConfig;
|
|
350
372
|
formActions?: FormConfig['actions'];
|
|
351
373
|
mode: 'create' | 'edit' | 'view';
|
|
352
374
|
backConfig?: BackConfig;
|
|
@@ -354,7 +376,11 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
354
376
|
texts: Record<string, string>;
|
|
355
377
|
constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent>, data: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage);
|
|
356
378
|
private extractInitialValue;
|
|
379
|
+
private resolveFormConfig;
|
|
380
|
+
get dialogTitle(): string;
|
|
381
|
+
private resolveResourceTitle;
|
|
357
382
|
private resolveFormActions;
|
|
383
|
+
private resolveLayoutPolicy;
|
|
358
384
|
private resolveSubmitLabel;
|
|
359
385
|
ngOnInit(): void;
|
|
360
386
|
onSave(result: unknown): void;
|