@praxisui/crud 5.0.0-beta.0 → 7.0.0-beta.0
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 +97 -1
- package/drawer-adapter/index.d.ts +2 -0
- package/fesm2022/praxisui-crud.mjs +3178 -60
- package/index.d.ts +280 -14
- package/package.json +6 -6
package/index.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as _praxisui_core from '@praxisui/core';
|
|
2
|
-
import { ApiEndpoint, TableConfig, PraxisDataQueryContext, FormConfig, BackConfig, RowAction, ToolbarAction, ResourceActionCatalogItem, LoadingState, RestApiLinks,
|
|
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';
|
|
3
3
|
export { BackConfig } from '@praxisui/core';
|
|
4
|
-
import * as
|
|
4
|
+
import * as _angular_core from '@angular/core';
|
|
5
5
|
import { NgZone, OnChanges, EventEmitter, SimpleChanges, OnInit, Provider } from '@angular/core';
|
|
6
6
|
import { MatDialogConfig, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
7
7
|
export { MAT_DIALOG_DATA as DIALOG_DATA } from '@angular/material/dialog';
|
|
8
8
|
import { ComponentType } from '@angular/cdk/portal';
|
|
9
9
|
import { PraxisDynamicForm } from '@praxisui/dynamic-form';
|
|
10
|
+
import { BehaviorSubject } from 'rxjs';
|
|
11
|
+
import * as _praxisui_settings_panel from '@praxisui/settings-panel';
|
|
12
|
+
import { SettingsPanelService } from '@praxisui/settings-panel';
|
|
10
13
|
|
|
11
14
|
type DialogRef<T = any, R = any> = MatDialogRef<T, R>;
|
|
12
15
|
interface DialogConfig<D = any> extends MatDialogConfig<D> {
|
|
@@ -14,8 +17,12 @@ interface DialogConfig<D = any> extends MatDialogConfig<D> {
|
|
|
14
17
|
disableCloseOnBackdrop?: boolean;
|
|
15
18
|
/** Disable closing when user presses escape */
|
|
16
19
|
disableCloseOnEsc?: boolean;
|
|
20
|
+
/** Density hint consumed by CRUD dialog host chrome */
|
|
21
|
+
density?: 'default' | 'compact';
|
|
17
22
|
/** Enable maximize button */
|
|
18
23
|
canMaximize?: boolean;
|
|
24
|
+
/** Persist last dialog size/state for the same form */
|
|
25
|
+
rememberLastState?: boolean;
|
|
19
26
|
/** Start dialog maximized */
|
|
20
27
|
startMaximized?: boolean;
|
|
21
28
|
/** Screen width in px where dialog starts fullscreen */
|
|
@@ -28,8 +35,8 @@ declare class DialogService {
|
|
|
28
35
|
constructor(matDialog: MatDialog, zone: NgZone);
|
|
29
36
|
open<T, D = unknown, R = unknown>(component: ComponentType<T>, config?: DialogConfig<D>): DialogRef<T, R>;
|
|
30
37
|
openAsync<T, D = unknown, R = unknown>(loader: () => Promise<ComponentType<T>>, config?: DialogConfig<D>): Promise<DialogRef<T, R>>;
|
|
31
|
-
static ɵfac:
|
|
32
|
-
static ɵprov:
|
|
38
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DialogService, never>;
|
|
39
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<DialogService>;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
type FormOpenMode = 'route' | 'modal' | 'drawer';
|
|
@@ -38,10 +45,21 @@ interface CrudParamMapping {
|
|
|
38
45
|
to: 'routeParam' | 'query' | 'input';
|
|
39
46
|
name: string;
|
|
40
47
|
}
|
|
48
|
+
interface CrudActionFormContract {
|
|
49
|
+
schemaUrl?: string;
|
|
50
|
+
submitUrl?: string;
|
|
51
|
+
submitMethod?: 'post' | 'put' | 'patch' | 'delete';
|
|
52
|
+
apiEndpointKey?: ApiEndpoint | string | null;
|
|
53
|
+
apiUrlEntry?: ApiUrlEntry | null;
|
|
54
|
+
initialValue?: Record<string, unknown> | null;
|
|
55
|
+
}
|
|
56
|
+
type CrudActionResolutionMode = 'inferred' | 'explicit';
|
|
41
57
|
type CrudAction = (RowAction | ToolbarAction) & {
|
|
42
58
|
openMode?: FormOpenMode;
|
|
43
59
|
route?: string;
|
|
44
60
|
formId?: string;
|
|
61
|
+
mode?: CrudActionResolutionMode;
|
|
62
|
+
form?: CrudActionFormContract;
|
|
45
63
|
params?: CrudParamMapping[];
|
|
46
64
|
back?: BackConfig;
|
|
47
65
|
};
|
|
@@ -84,6 +102,26 @@ interface CrudMetadataAssertionOptions {
|
|
|
84
102
|
}
|
|
85
103
|
declare function assertCrudMetadata(meta: CrudMetadata, options?: CrudMetadataAssertionOptions): void;
|
|
86
104
|
|
|
105
|
+
interface CrudAuthoringDocument {
|
|
106
|
+
kind: 'praxis.crud.editor';
|
|
107
|
+
version: 1;
|
|
108
|
+
metadata: CrudMetadata;
|
|
109
|
+
}
|
|
110
|
+
interface CrudAuthoringWidgetPersistenceEvent {
|
|
111
|
+
document: CrudAuthoringDocument;
|
|
112
|
+
metadata: CrudMetadata;
|
|
113
|
+
inputPatch: Record<string, unknown>;
|
|
114
|
+
}
|
|
115
|
+
interface CrudEditorDiagnostic {
|
|
116
|
+
level: 'error' | 'warning' | 'info';
|
|
117
|
+
code: string;
|
|
118
|
+
message: string;
|
|
119
|
+
path?: string;
|
|
120
|
+
}
|
|
121
|
+
interface CrudValidationContext {
|
|
122
|
+
requireCanonicalActions?: boolean;
|
|
123
|
+
}
|
|
124
|
+
|
|
87
125
|
type CrudActionRuntimeEvent = {
|
|
88
126
|
actionConfig?: ResourceActionCatalogItem | null;
|
|
89
127
|
};
|
|
@@ -102,6 +140,7 @@ type CrudContextValue = {
|
|
|
102
140
|
defaults?: CrudMetadata['defaults'];
|
|
103
141
|
actions?: CrudContextAction[];
|
|
104
142
|
idField?: string;
|
|
143
|
+
openAuthoring?: () => void;
|
|
105
144
|
};
|
|
106
145
|
declare class PraxisCrudComponent implements OnChanges {
|
|
107
146
|
metadata: CrudMetadata | string;
|
|
@@ -124,6 +163,8 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
124
163
|
}>;
|
|
125
164
|
error: EventEmitter<unknown>;
|
|
126
165
|
tableRuntimeConfigChange: EventEmitter<_praxisui_core.TableConfigModern>;
|
|
166
|
+
crudAuthoringDocumentApplied: EventEmitter<CrudAuthoringWidgetPersistenceEvent>;
|
|
167
|
+
crudAuthoringDocumentSaved: EventEmitter<CrudAuthoringWidgetPersistenceEvent>;
|
|
127
168
|
resolvedMetadata: CrudMetadata;
|
|
128
169
|
effectiveTableConfig?: TableConfig;
|
|
129
170
|
tableConfigForBinding: TableConfig;
|
|
@@ -131,11 +172,14 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
131
172
|
tableFilterCriteria: Record<string, unknown>;
|
|
132
173
|
tableCrudContext?: CrudContextValue;
|
|
133
174
|
private readonly launcher;
|
|
175
|
+
private readonly http;
|
|
134
176
|
private readonly destroyRef;
|
|
135
177
|
private readonly cdr;
|
|
136
178
|
private table;
|
|
137
179
|
private readonly storage;
|
|
180
|
+
private readonly settingsPanel;
|
|
138
181
|
private readonly snack;
|
|
182
|
+
private readonly dialog;
|
|
139
183
|
private readonly i18n;
|
|
140
184
|
private readonly resourceDiscovery;
|
|
141
185
|
private readonly actionOpenAdapter;
|
|
@@ -154,6 +198,7 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
154
198
|
private collectionCapabilitiesRequestHref;
|
|
155
199
|
private collectionCapabilitiesResolvedHref;
|
|
156
200
|
private collectionCapabilitiesRequestSeq;
|
|
201
|
+
private currentAuthoringDocument?;
|
|
157
202
|
onResetPreferences(): void;
|
|
158
203
|
ngOnChanges(changes: SimpleChanges): void;
|
|
159
204
|
onAction(action: string, row?: Record<string, unknown>, runtimeEvent?: CrudActionRuntimeEvent): Promise<void>;
|
|
@@ -169,6 +214,7 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
169
214
|
getEmptyStateDescription(): string;
|
|
170
215
|
getEmptyStatePrimaryAction(): string;
|
|
171
216
|
onConfigureRequested(): void;
|
|
217
|
+
private tryHandleCanonicalDeleteAction;
|
|
172
218
|
private refreshTable;
|
|
173
219
|
private emitTableRuntimeConfigSnapshot;
|
|
174
220
|
private applyResolvedCrudState;
|
|
@@ -195,6 +241,9 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
195
241
|
private buildEffectiveTableConfig;
|
|
196
242
|
private isAddLike;
|
|
197
243
|
private buildTableCrudContext;
|
|
244
|
+
private readonly openCrudAuthoringFromTable;
|
|
245
|
+
private applyCrudAuthoringPayload;
|
|
246
|
+
private buildWidgetPersistencePayload;
|
|
198
247
|
private resolveCreateToolbarAction;
|
|
199
248
|
private resolveContextCrudActions;
|
|
200
249
|
private resolveCollectionWorkflowCrudActions;
|
|
@@ -208,14 +257,15 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
208
257
|
private resolveCrudResourceIdentity;
|
|
209
258
|
private buildDiscoveryOptions;
|
|
210
259
|
private resolveDiscoveryApiEntry;
|
|
260
|
+
private resolveCrudRuntimeLinks;
|
|
211
261
|
private isRecord;
|
|
212
262
|
private getIdField;
|
|
213
263
|
private componentKeyId;
|
|
214
264
|
private warnMissingId;
|
|
215
265
|
private getCrudActionLabel;
|
|
216
266
|
private tx;
|
|
217
|
-
static ɵfac:
|
|
218
|
-
static ɵcmp:
|
|
267
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisCrudComponent, never>;
|
|
268
|
+
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"; "tableRuntimeConfigChange": "tableRuntimeConfigChange"; "crudAuthoringDocumentApplied": "crudAuthoringDocumentApplied"; "crudAuthoringDocumentSaved": "crudAuthoringDocumentSaved"; }, never, never, true, never>;
|
|
219
269
|
}
|
|
220
270
|
|
|
221
271
|
type CrudDrawerResultType = 'save' | 'delete' | 'close';
|
|
@@ -229,10 +279,14 @@ declare class CrudLauncherService {
|
|
|
229
279
|
private readonly dialog;
|
|
230
280
|
private readonly storage;
|
|
231
281
|
private readonly global;
|
|
282
|
+
private readonly operationResolver;
|
|
232
283
|
private readonly drawerAdapter;
|
|
233
284
|
launch(action: CrudAction, row: Record<string, unknown> | undefined, metadata: CrudMetadata, componentKeyId?: string | null, drawerCallbacks?: {
|
|
234
285
|
onClose?: () => void;
|
|
235
286
|
onResult?: (result: CrudDrawerResult) => void;
|
|
287
|
+
}, runtime?: {
|
|
288
|
+
capabilities?: ResourceCapabilitySnapshot | null;
|
|
289
|
+
links?: RestApiLinks | null;
|
|
236
290
|
}): Promise<{
|
|
237
291
|
mode: FormOpenMode;
|
|
238
292
|
ref?: DialogRef<any>;
|
|
@@ -240,9 +294,24 @@ declare class CrudLauncherService {
|
|
|
240
294
|
resolveOpenMode(action: CrudAction, metadata: CrudMetadata): FormOpenMode;
|
|
241
295
|
private buildRoute;
|
|
242
296
|
private mapInputs;
|
|
297
|
+
private resolveActionForLaunch;
|
|
298
|
+
private resolveActionFormContract;
|
|
299
|
+
resolveRuntimeContract(action: CrudAction, row: Record<string, unknown> | undefined, metadata: CrudMetadata, runtime?: {
|
|
300
|
+
capabilities?: ResourceCapabilitySnapshot | null;
|
|
301
|
+
links?: RestApiLinks | null;
|
|
302
|
+
}): {
|
|
303
|
+
schemaUrl?: string | null;
|
|
304
|
+
submitUrl?: string | null;
|
|
305
|
+
submitMethod?: string | null;
|
|
306
|
+
apiEndpointKey?: unknown;
|
|
307
|
+
apiUrlEntry?: unknown;
|
|
308
|
+
};
|
|
309
|
+
private buildInferredFormId;
|
|
310
|
+
private isCanonicalCrudAction;
|
|
311
|
+
private isExplicitCrudAction;
|
|
243
312
|
private mergeCrudOverrides;
|
|
244
|
-
static ɵfac:
|
|
245
|
-
static ɵprov:
|
|
313
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudLauncherService, never>;
|
|
314
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<CrudLauncherService>;
|
|
246
315
|
}
|
|
247
316
|
|
|
248
317
|
declare class DynamicFormDialogHostComponent implements OnInit {
|
|
@@ -261,6 +330,7 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
261
330
|
private destroyRef;
|
|
262
331
|
resourcePath?: string;
|
|
263
332
|
resourceId?: string | number;
|
|
333
|
+
initialValue?: Record<string, unknown> | null;
|
|
264
334
|
schemaUrl?: string | null;
|
|
265
335
|
submitUrl?: string | null;
|
|
266
336
|
submitMethod?: string | null;
|
|
@@ -271,14 +341,15 @@ declare class DynamicFormDialogHostComponent implements OnInit {
|
|
|
271
341
|
private idField;
|
|
272
342
|
texts: Record<string, string>;
|
|
273
343
|
constructor(dialogRef: DialogRef<DynamicFormDialogHostComponent>, data: any, dialogService: DialogService, crud: GenericCrudService<any>, configStorage: AsyncConfigStorage);
|
|
344
|
+
private extractInitialValue;
|
|
274
345
|
ngOnInit(): void;
|
|
275
346
|
onSave(result: unknown): void;
|
|
276
347
|
onCancel(): void;
|
|
277
348
|
toggleMaximize(initial?: boolean): void;
|
|
278
349
|
private saveState;
|
|
279
350
|
private applySavedState;
|
|
280
|
-
static ɵfac:
|
|
281
|
-
static ɵcmp:
|
|
351
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DynamicFormDialogHostComponent, never>;
|
|
352
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DynamicFormDialogHostComponent, "praxis-dynamic-form-dialog-host", never, {}, {}, never, never, true, never>;
|
|
282
353
|
}
|
|
283
354
|
|
|
284
355
|
/** Metadata for PraxisCrudComponent */
|
|
@@ -295,8 +366,8 @@ declare class CrudPageHeaderComponent {
|
|
|
295
366
|
sticky: boolean;
|
|
296
367
|
divider: boolean;
|
|
297
368
|
returnTo?: string | null;
|
|
298
|
-
static ɵfac:
|
|
299
|
-
static ɵcmp:
|
|
369
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudPageHeaderComponent, never>;
|
|
370
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CrudPageHeaderComponent, "praxis-crud-page-header", never, { "title": { "alias": "title"; "required": false; }; "backLabel": { "alias": "backLabel"; "required": false; }; "showBack": { "alias": "showBack"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "sticky": { "alias": "sticky"; "required": false; }; "divider": { "alias": "divider"; "required": false; }; "returnTo": { "alias": "returnTo"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
300
371
|
}
|
|
301
372
|
|
|
302
373
|
/**
|
|
@@ -325,5 +396,200 @@ interface CapabilityCatalog extends AiCapabilityCatalog {
|
|
|
325
396
|
}
|
|
326
397
|
declare const CRUD_AI_CAPABILITIES: CapabilityCatalog;
|
|
327
398
|
|
|
328
|
-
|
|
329
|
-
|
|
399
|
+
declare function createCrudAuthoringDocument(source: {
|
|
400
|
+
metadata?: unknown;
|
|
401
|
+
}): CrudAuthoringDocument;
|
|
402
|
+
declare function parseLegacyOrCrudDocument(raw: unknown): CrudAuthoringDocument;
|
|
403
|
+
declare function normalizeCrudAuthoringDocument(doc: CrudAuthoringDocument): CrudAuthoringDocument;
|
|
404
|
+
declare function serializeCrudAuthoringDocument(doc: CrudAuthoringDocument): unknown;
|
|
405
|
+
declare function validateCrudAuthoringDocument(doc: CrudAuthoringDocument, context?: CrudValidationContext): CrudEditorDiagnostic[];
|
|
406
|
+
declare function findCrudAction(actions: CrudMetadata['actions'], actionName: string): CrudAction | undefined;
|
|
407
|
+
|
|
408
|
+
type CrudEditorActionKey = 'create' | 'view' | 'edit';
|
|
409
|
+
type CrudEditorActionGroupKey = 'binding' | 'schema' | 'submit' | 'api';
|
|
410
|
+
type CrudEditorParamTarget = CrudParamMapping['to'];
|
|
411
|
+
type CrudEditorSectionKey = 'connection' | 'defaults' | 'actions' | 'table';
|
|
412
|
+
type CrudEditorSectionStatus = 'ready' | 'pending' | 'invalid';
|
|
413
|
+
type CrudEditorHealthBucket = 'ready' | 'pending' | 'invalid';
|
|
414
|
+
type CrudEditorDiagnosticIssue = ReturnType<typeof validateCrudAuthoringDocument>[number];
|
|
415
|
+
type CrudEditorPayload = {
|
|
416
|
+
document: CrudAuthoringDocument;
|
|
417
|
+
metadata: CrudMetadata;
|
|
418
|
+
id?: string | null;
|
|
419
|
+
};
|
|
420
|
+
declare const HEADER_VARIANTS: readonly ["ghost", "tonal", "outlined"];
|
|
421
|
+
declare class CrudMetadataEditorComponent implements SettingsValueProvider {
|
|
422
|
+
readonly documentInput: _angular_core.InputSignal<CrudAuthoringDocument | null>;
|
|
423
|
+
readonly metadataInput: _angular_core.InputSignal<CrudMetadata | null>;
|
|
424
|
+
readonly crudIdInput: _angular_core.InputSignal<string | null>;
|
|
425
|
+
readonly readonlyInput: _angular_core.InputSignal<boolean>;
|
|
426
|
+
readonly isDirty$: BehaviorSubject<boolean>;
|
|
427
|
+
readonly isValid$: BehaviorSubject<boolean>;
|
|
428
|
+
readonly isBusy$: BehaviorSubject<boolean>;
|
|
429
|
+
readonly actionKeys: CrudEditorActionKey[];
|
|
430
|
+
readonly healthBuckets: CrudEditorHealthBucket[];
|
|
431
|
+
readonly openModes: FormOpenMode[];
|
|
432
|
+
readonly headerVariants: readonly ["ghost", "tonal", "outlined"];
|
|
433
|
+
readonly submitMethods: readonly ["post", "put", "patch"];
|
|
434
|
+
readonly modalDensities: readonly ["default", "compact"];
|
|
435
|
+
readonly backStrategies: readonly ["auto", "close", "navigate"];
|
|
436
|
+
readonly paramTargets: ("routeParam" | "query" | "input")[];
|
|
437
|
+
private readonly initialValueDrafts;
|
|
438
|
+
private readonly injectedData;
|
|
439
|
+
private readonly i18n;
|
|
440
|
+
private readonly currentDocument;
|
|
441
|
+
private readonly initialDocument;
|
|
442
|
+
private lastExternalSignature;
|
|
443
|
+
readonly effectiveCrudId: _angular_core.Signal<string | null>;
|
|
444
|
+
readonly isReadonly: _angular_core.Signal<boolean>;
|
|
445
|
+
readonly diagnostics: _angular_core.Signal<CrudEditorDiagnostic[]>;
|
|
446
|
+
readonly errorCount: _angular_core.Signal<number>;
|
|
447
|
+
readonly warningCount: _angular_core.Signal<number>;
|
|
448
|
+
readonly serializedDocument: _angular_core.Signal<string>;
|
|
449
|
+
readonly tableConfig: _angular_core.Signal<_praxisui_core.TableConfigModern>;
|
|
450
|
+
readonly resourcePath: _angular_core.Signal<string>;
|
|
451
|
+
readonly resourceIdField: _angular_core.Signal<string>;
|
|
452
|
+
readonly resourceEndpointKey: _angular_core.Signal<string>;
|
|
453
|
+
readonly defaultsOpenMode: _angular_core.Signal<FormOpenMode>;
|
|
454
|
+
readonly headerShowBack: _angular_core.Signal<boolean>;
|
|
455
|
+
readonly headerBackLabel: _angular_core.Signal<string>;
|
|
456
|
+
readonly headerVariant: _angular_core.Signal<"ghost" | "tonal" | "outlined">;
|
|
457
|
+
readonly headerSticky: _angular_core.Signal<boolean>;
|
|
458
|
+
readonly headerBreadcrumbs: _angular_core.Signal<boolean>;
|
|
459
|
+
readonly headerDivider: _angular_core.Signal<boolean>;
|
|
460
|
+
readonly modalDensity: _angular_core.Signal<string>;
|
|
461
|
+
readonly modalCanMaximize: _angular_core.Signal<boolean>;
|
|
462
|
+
readonly modalStartMaximized: _angular_core.Signal<boolean>;
|
|
463
|
+
readonly modalRememberLastState: _angular_core.Signal<boolean>;
|
|
464
|
+
readonly modalDisableCloseOnEsc: _angular_core.Signal<boolean>;
|
|
465
|
+
readonly modalDisableCloseOnBackdrop: _angular_core.Signal<boolean>;
|
|
466
|
+
readonly modalFullscreenBreakpoint: _angular_core.Signal<string>;
|
|
467
|
+
readonly backStrategy: _angular_core.Signal<string>;
|
|
468
|
+
readonly backReturnTo: _angular_core.Signal<string>;
|
|
469
|
+
readonly backConfirmOnDirty: _angular_core.Signal<boolean>;
|
|
470
|
+
readonly nextFocusSection: _angular_core.Signal<CrudEditorSectionKey>;
|
|
471
|
+
readonly nextFocusStatus: _angular_core.Signal<CrudEditorSectionStatus>;
|
|
472
|
+
readonly visibleHealthBuckets: _angular_core.Signal<CrudEditorHealthBucket[]>;
|
|
473
|
+
readonly showHealthMap: _angular_core.Signal<boolean>;
|
|
474
|
+
readonly groupedDiagnostics: _angular_core.Signal<{
|
|
475
|
+
section: CrudEditorSectionKey;
|
|
476
|
+
issues: CrudEditorDiagnostic[];
|
|
477
|
+
hasError: boolean;
|
|
478
|
+
}[]>;
|
|
479
|
+
constructor();
|
|
480
|
+
getSettingsValue(): CrudEditorPayload;
|
|
481
|
+
onSave(): CrudEditorPayload;
|
|
482
|
+
reset(): void;
|
|
483
|
+
actionValue(actionName: CrudEditorActionKey): CrudAction;
|
|
484
|
+
actionApiUrlEntryDraft(actionName: CrudEditorActionKey): string;
|
|
485
|
+
actionParams(actionName: CrudEditorActionKey): CrudParamMapping[];
|
|
486
|
+
actionInitialValueDraft(actionName: CrudEditorActionKey): string;
|
|
487
|
+
actionLabel(actionName: CrudEditorActionKey): string;
|
|
488
|
+
actionSummary(actionName: CrudEditorActionKey): string;
|
|
489
|
+
actionEffectiveBindingSummary(actionName: CrudEditorActionKey): string;
|
|
490
|
+
actionSubmitSummary(actionName: CrudEditorActionKey): string;
|
|
491
|
+
actionSchemaSummary(actionName: CrudEditorActionKey): string;
|
|
492
|
+
actionApiSummary(actionName: CrudEditorActionKey): string;
|
|
493
|
+
actionInputsNote(actionName: CrudEditorActionKey): string;
|
|
494
|
+
actionInputsSummary(actionName: CrudEditorActionKey): string;
|
|
495
|
+
actionParamsNote(actionName: CrudEditorActionKey): string;
|
|
496
|
+
actionInitialValueNote(actionName: CrudEditorActionKey): string;
|
|
497
|
+
actionAdvancedSummary(actionName: CrudEditorActionKey): string;
|
|
498
|
+
actionPrimarySummary(actionName: CrudEditorActionKey): string;
|
|
499
|
+
actionBindingNote(actionName: CrudEditorActionKey): string;
|
|
500
|
+
actionSchemaNote(actionName: CrudEditorActionKey): string;
|
|
501
|
+
actionSubmitNote(actionName: CrudEditorActionKey): string;
|
|
502
|
+
actionApiNote(actionName: CrudEditorActionKey): string;
|
|
503
|
+
actionBackStrategy(actionName: CrudEditorActionKey): string;
|
|
504
|
+
actionBackReturnTo(actionName: CrudEditorActionKey): string;
|
|
505
|
+
actionBackConfirmOnDirty(actionName: CrudEditorActionKey): boolean;
|
|
506
|
+
actionBackNote(actionName: CrudEditorActionKey): string;
|
|
507
|
+
actionGroupStatus(actionName: CrudEditorActionKey, group: CrudEditorActionGroupKey): 'ready' | 'pending' | 'invalid';
|
|
508
|
+
actionGroupStatusLabel(actionName: CrudEditorActionKey, group: CrudEditorActionGroupKey): string;
|
|
509
|
+
actionGroupLabel(group: CrudEditorActionGroupKey): string;
|
|
510
|
+
actionGroupsSummary(actionName: CrudEditorActionKey): string;
|
|
511
|
+
actionEditorialSummary(actionName: CrudEditorActionKey): string;
|
|
512
|
+
actionPanelExpanded(actionName: CrudEditorActionKey): boolean;
|
|
513
|
+
actionAdvancedPanelExpanded(actionName: CrudEditorActionKey): boolean;
|
|
514
|
+
actionStatus(actionName: CrudEditorActionKey): 'ready' | 'pending' | 'invalid';
|
|
515
|
+
actionStatusLabel(actionName: CrudEditorActionKey): string;
|
|
516
|
+
actionShowStatusChip(actionName: CrudEditorActionKey): boolean;
|
|
517
|
+
connectionOverview(): string;
|
|
518
|
+
connectionOverviewNote(): string;
|
|
519
|
+
defaultsOverview(): string;
|
|
520
|
+
defaultsOverviewNote(): string;
|
|
521
|
+
modalDefaultsNote(): string;
|
|
522
|
+
backDefaultsNote(): string;
|
|
523
|
+
actionsOverview(): string;
|
|
524
|
+
actionsOverviewNote(): string;
|
|
525
|
+
tableOverview(): string;
|
|
526
|
+
tableOverviewNote(): string;
|
|
527
|
+
tableStructureSummary(): string;
|
|
528
|
+
tableBehaviorSummary(): string;
|
|
529
|
+
tableStatesSummary(): string;
|
|
530
|
+
tableEditingFlowSummary(): string;
|
|
531
|
+
validationOverview(): string;
|
|
532
|
+
validationOverviewNote(): string;
|
|
533
|
+
jsonSectionSummary(): string;
|
|
534
|
+
sectionStatus(section: CrudEditorSectionKey): CrudEditorSectionStatus;
|
|
535
|
+
sectionStatusLabel(section: CrudEditorSectionKey): string;
|
|
536
|
+
sectionSummary(section: CrudEditorSectionKey): string;
|
|
537
|
+
nextFocusTitle(): string;
|
|
538
|
+
nextFocusSummary(): string;
|
|
539
|
+
nextFocusChipLabel(): string;
|
|
540
|
+
healthBucketLabel(bucket: CrudEditorHealthBucket): string;
|
|
541
|
+
healthBucketSummary(bucket: CrudEditorHealthBucket): string;
|
|
542
|
+
diagnosticsGroupStatusLabel(section: CrudEditorSectionKey, issues: CrudEditorDiagnosticIssue[]): string;
|
|
543
|
+
diagnosticsGroupSummary(section: CrudEditorSectionKey, issues: CrudEditorDiagnosticIssue[]): string;
|
|
544
|
+
modeLabel(mode: FormOpenMode): string;
|
|
545
|
+
variantLabel(variant: (typeof HEADER_VARIANTS)[number]): string;
|
|
546
|
+
modalDensityLabel(density: string): string;
|
|
547
|
+
backStrategyLabel(strategy: string): string;
|
|
548
|
+
private actionInputsSummaryBadge;
|
|
549
|
+
paramTargetLabel(target: CrudEditorParamTarget): string;
|
|
550
|
+
diagnosticMessage(code: string, fallback: string): string;
|
|
551
|
+
setResourceField(field: 'path' | 'idField' | 'endpointKey', value: unknown): void;
|
|
552
|
+
setDefaultsOpenMode(value: FormOpenMode): void;
|
|
553
|
+
setHeaderField(field: string, value: unknown): void;
|
|
554
|
+
setModalField(field: 'density' | 'canMaximize' | 'startMaximized' | 'rememberLastState' | 'disableCloseOnEsc' | 'disableCloseOnBackdrop' | 'fullscreenBreakpoint', value: unknown): void;
|
|
555
|
+
setBackField(field: 'strategy' | 'returnTo' | 'confirmOnDirty', value: unknown): void;
|
|
556
|
+
setActionField(actionName: CrudEditorActionKey, field: 'openMode' | 'route' | 'formId', value: unknown): void;
|
|
557
|
+
setActionFormField(actionName: CrudEditorActionKey, field: string, value: unknown): void;
|
|
558
|
+
addActionParam(actionName: CrudEditorActionKey): void;
|
|
559
|
+
removeActionParam(actionName: CrudEditorActionKey, index: number): void;
|
|
560
|
+
setActionParamField(actionName: CrudEditorActionKey, index: number, field: keyof CrudParamMapping, value: unknown): void;
|
|
561
|
+
setActionInitialValue(actionName: CrudEditorActionKey, raw: string): void;
|
|
562
|
+
setActionBackField(actionName: CrudEditorActionKey, field: 'strategy' | 'returnTo' | 'confirmOnDirty', value: unknown): void;
|
|
563
|
+
setActionApiUrlEntry(actionName: CrudEditorActionKey, raw: string): void;
|
|
564
|
+
setTableConfig(config: TableConfig): void;
|
|
565
|
+
private patchAction;
|
|
566
|
+
private updateMetadata;
|
|
567
|
+
private buildPayload;
|
|
568
|
+
private resolveExternalSeed;
|
|
569
|
+
private syncState;
|
|
570
|
+
protected tx(key: string, fallback: string): string;
|
|
571
|
+
private normalizeOptionalNumber;
|
|
572
|
+
private hasHealthBucketContent;
|
|
573
|
+
private sectionDiagnostics;
|
|
574
|
+
private actionDiagnostics;
|
|
575
|
+
private actionGroupLabelsByStatus;
|
|
576
|
+
private actionFocusSummary;
|
|
577
|
+
private prioritizedActionKey;
|
|
578
|
+
sectionDisplayLabel(section: CrudEditorSectionKey): string;
|
|
579
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CrudMetadataEditorComponent, never>;
|
|
580
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CrudMetadataEditorComponent, "praxis-crud-metadata-editor", never, { "documentInput": { "alias": "document"; "required": false; "isSignal": true; }; "metadataInput": { "alias": "metadata"; "required": false; "isSignal": true; }; "crudIdInput": { "alias": "crudId"; "required": false; "isSignal": true; }; "readonlyInput": { "alias": "readonly"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
type OpenCrudMetadataEditorOptions = {
|
|
584
|
+
id?: string;
|
|
585
|
+
title?: string;
|
|
586
|
+
titleIcon?: string;
|
|
587
|
+
document?: CrudAuthoringDocument | null;
|
|
588
|
+
metadata?: CrudMetadata | null;
|
|
589
|
+
crudId?: string;
|
|
590
|
+
readonly?: boolean;
|
|
591
|
+
};
|
|
592
|
+
declare function openCrudMetadataEditor(settings: SettingsPanelService, opts?: OpenCrudMetadataEditorOptions): _praxisui_settings_panel.SettingsPanelRef;
|
|
593
|
+
|
|
594
|
+
export { CRUD_AI_CAPABILITIES, CrudLauncherService, CrudMetadataEditorComponent, CrudPageHeaderComponent, DialogService, DynamicFormDialogHostComponent, PRAXIS_CRUD_COMPONENT_METADATA, PraxisCrudComponent, assertCrudMetadata, createCrudAuthoringDocument, findCrudAction, normalizeCrudAuthoringDocument, openCrudMetadataEditor, parseLegacyOrCrudDocument, providePraxisCrudMetadata, serializeCrudAuthoringDocument, validateCrudAuthoringDocument };
|
|
595
|
+
export type { Capability, CapabilityCatalog, CapabilityCategory, CrudAction, CrudActionFormContract, CrudActionResolutionMode, CrudAuthoringDocument, CrudAuthoringWidgetPersistenceEvent, CrudDefaults, CrudEditorDiagnostic, CrudHeaderConfig, CrudHeaderVariant, CrudMetadata, CrudMetadataAssertionOptions, CrudParamMapping, CrudResource, CrudValidationContext, DialogConfig, DialogRef, FormOpenMode, OpenCrudMetadataEditorOptions, ValueKind };
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-beta.0",
|
|
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": "^
|
|
9
|
-
"@praxisui/table": "^
|
|
10
|
-
"@praxisui/core": "^
|
|
11
|
-
"@praxisui/dynamic-fields": "^
|
|
12
|
-
"@praxisui/settings-panel": "^
|
|
8
|
+
"@praxisui/dynamic-form": "^7.0.0-beta.0",
|
|
9
|
+
"@praxisui/table": "^7.0.0-beta.0",
|
|
10
|
+
"@praxisui/core": "^7.0.0-beta.0",
|
|
11
|
+
"@praxisui/dynamic-fields": "^7.0.0-beta.0",
|
|
12
|
+
"@praxisui/settings-panel": "^7.0.0-beta.0"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"tslib": "^2.3.0"
|