@praxisui/crud 10.0.0-rc.11 → 10.0.0-rc.13
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/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-crud.mjs +1115 -145
- package/package.json +7 -7
- package/types/praxisui-crud.d.ts +55 -10
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/crud",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.13",
|
|
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": "^10.0.0-rc.
|
|
9
|
-
"@praxisui/table": "^10.0.0-rc.
|
|
10
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
11
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
8
|
+
"@praxisui/dynamic-form": "^10.0.0-rc.13",
|
|
9
|
+
"@praxisui/table": "^10.0.0-rc.13",
|
|
10
|
+
"@praxisui/core": "^10.0.0-rc.13",
|
|
11
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.13",
|
|
12
|
+
"@praxisui/settings-panel": "^10.0.0-rc.13",
|
|
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": "^10.0.0-rc.
|
|
17
|
+
"@praxisui/ai": "^10.0.0-rc.13",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
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, DynamicFormLayoutPolicy, BackConfig, ResourceBulkExecutionContract, ResourceSurfaceCatalogItem, MaterializedResourceIdentity, TableConfig, PraxisKpiBandConfig, PraxisDataQueryContext, FormConfig, ReactiveDeterminationExecutionEvent, DynamicDataRecord, PraxisResourceEvent, PraxisKpiBandCard, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, SurfaceDrawerRef, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCatalog, AiCapability, AiCapabilityCategory, AiValueKind, ComponentAuthoringManifest, SettingsValueProvider, ResourceActionCatalogItem, ResourceBulkTarget, ColumnDefinition, ResourceBulkProposalDiagnostic } from '@praxisui/core';
|
|
2
|
+
import { RowAction, ToolbarAction, ApiEndpoint, ApiUrlEntry, DynamicFormLayoutPolicy, BackConfig, ResourceBulkExecutionContract, ResourceSurfaceCatalogItem, MaterializedResourceIdentity, TableConfig, PraxisKpiBandConfig, PraxisDataQueryContext, FormConfig, ReactiveDeterminationExecutionEvent, DynamicDataRecord, PraxisResourceEvent, PraxisKpiBandCard, LoadingState, RestApiLinks, ResourceCapabilitySnapshot, SurfaceDrawerRef, GenericCrudService, AsyncConfigStorage, ComponentDocMeta, AiCapabilityCatalog, AiCapability, AiCapabilityCategory, AiValueKind, ComponentAuthoringManifest, SettingsValueProvider, ResourceActionCatalogItem, ResourceBulkTarget, ColumnDefinition, BulkProposalItemResult, BulkItemResult, ResourceBulkProposalDiagnostic } from '@praxisui/core';
|
|
3
3
|
export { BackConfig, DynamicDataCollection, DynamicDataRecord, createDynamicRecord, extractRecordId, isDynamicDataRecord, resolveDataField } from '@praxisui/core';
|
|
4
4
|
import * as _angular_core from '@angular/core';
|
|
5
5
|
import { NgZone, OnChanges, TemplateRef, EventEmitter, SimpleChanges, Injector, OnInit, AfterViewInit, Provider, OnDestroy } from '@angular/core';
|
|
@@ -142,6 +142,10 @@ interface CrudFilterBarConfig {
|
|
|
142
142
|
/** Exibir botão para abrir o construtor de filtros avançados (padrão: true) */
|
|
143
143
|
showAdvanced?: boolean;
|
|
144
144
|
}
|
|
145
|
+
type CrudTableConfig = Omit<TableConfig, 'columns'> & {
|
|
146
|
+
/** Definições de colunas (opcional no CrudMetadata quando columnProjection estiver presente ou colunas forem providas via schema) */
|
|
147
|
+
columns?: TableConfig['columns'];
|
|
148
|
+
};
|
|
145
149
|
interface CrudMetadata {
|
|
146
150
|
component: 'praxis-crud';
|
|
147
151
|
/**
|
|
@@ -152,7 +156,7 @@ interface CrudMetadata {
|
|
|
152
156
|
interactionMode?: CrudInteractionMode;
|
|
153
157
|
resource?: CrudResource;
|
|
154
158
|
data?: any[] | null;
|
|
155
|
-
table?:
|
|
159
|
+
table?: CrudTableConfig;
|
|
156
160
|
filterBar?: CrudFilterBarConfig;
|
|
157
161
|
/** Configuração declarativa da faixa de resumo executivo e KPIs (Issue #33) */
|
|
158
162
|
kpiBand?: PraxisKpiBandConfig;
|
|
@@ -350,6 +354,9 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
350
354
|
onTableDrawerOpen(event: DrawerOpenEvent<DynamicDataRecord>): void;
|
|
351
355
|
onTableDrawerClose(): void;
|
|
352
356
|
onBulkAction(event: any): Promise<void>;
|
|
357
|
+
private resolveBulkTargetsFromRows;
|
|
358
|
+
private resolveSyncBulkExecutionContractForAction;
|
|
359
|
+
private resolveAsyncDiscoveredBulkContractForAction;
|
|
353
360
|
onToolbarAction(event: CrudActionRuntimeEvent): Promise<void>;
|
|
354
361
|
ngOnChanges(changes: SimpleChanges): void;
|
|
355
362
|
onAction(action: string, row?: Record<string, unknown>, runtimeEvent?: CrudActionRuntimeEvent): Promise<void>;
|
|
@@ -448,6 +455,7 @@ declare class PraxisCrudComponent implements OnChanges {
|
|
|
448
455
|
private emitInspectOnlyDiagnostics;
|
|
449
456
|
private resolveCollectionWorkflowCrudActions;
|
|
450
457
|
private resolveCollectionWorkflowToolbarActions;
|
|
458
|
+
private resolveDiscoveredBulkTableActions;
|
|
451
459
|
private supportsCreateCapability;
|
|
452
460
|
private supportsViewCapability;
|
|
453
461
|
private supportsEditCapability;
|
|
@@ -973,6 +981,7 @@ declare class PraxisKpiBandComponent implements OnInit, OnChanges {
|
|
|
973
981
|
statsError: EventEmitter<any>;
|
|
974
982
|
refreshClick: EventEmitter<void>;
|
|
975
983
|
private readonly http;
|
|
984
|
+
private readonly apiUrl;
|
|
976
985
|
private readonly cdr;
|
|
977
986
|
private readonly destroyRef;
|
|
978
987
|
private readonly evaluator;
|
|
@@ -980,6 +989,8 @@ declare class PraxisKpiBandComponent implements OnInit, OnChanges {
|
|
|
980
989
|
evaluatedCards: EvaluatedKpiCard[];
|
|
981
990
|
fetchedData: Record<string, any>;
|
|
982
991
|
skeletonPlaceholders: number[];
|
|
992
|
+
private initialized;
|
|
993
|
+
private fetchSub?;
|
|
983
994
|
get isVisible(): boolean;
|
|
984
995
|
get resolvedColumns(): string;
|
|
985
996
|
get resolvedGap(): string;
|
|
@@ -987,6 +998,7 @@ declare class PraxisKpiBandComponent implements OnInit, OnChanges {
|
|
|
987
998
|
ngOnChanges(changes: SimpleChanges): void;
|
|
988
999
|
handleRefresh(): void;
|
|
989
1000
|
refresh(): void;
|
|
1001
|
+
private resolveSourceUrl;
|
|
990
1002
|
private fetchFromSource;
|
|
991
1003
|
recomputeCards(): void;
|
|
992
1004
|
onCardClick(card: EvaluatedKpiCard, index: number): void;
|
|
@@ -1000,7 +1012,7 @@ declare class PraxisKpiBandComponent implements OnInit, OnChanges {
|
|
|
1000
1012
|
interface PraxisResourceDomainBadge {
|
|
1001
1013
|
label: string;
|
|
1002
1014
|
icon?: string;
|
|
1003
|
-
tone?: 'primary' | '
|
|
1015
|
+
tone?: 'primary' | 'info' | 'success' | 'warning' | 'danger' | 'neutral' | string;
|
|
1004
1016
|
}
|
|
1005
1017
|
/**
|
|
1006
1018
|
* Configuração declarativa para a barra tática de escopo integrada
|
|
@@ -1029,19 +1041,19 @@ interface PraxisResourceScopeBarConfig {
|
|
|
1029
1041
|
* Pode ser utilizado diretamente como alvo de rotas do Angular:
|
|
1030
1042
|
* ```typescript
|
|
1031
1043
|
* {
|
|
1032
|
-
* path: '
|
|
1044
|
+
* path: 'contracts',
|
|
1033
1045
|
* component: PraxisResourcePage,
|
|
1034
1046
|
* data: {
|
|
1035
|
-
* resource: '
|
|
1036
|
-
* title: '
|
|
1037
|
-
* subtitle: '
|
|
1038
|
-
* domain: { label: '
|
|
1047
|
+
* resource: 'procurement/contracts',
|
|
1048
|
+
* title: 'Gestão de Contratos',
|
|
1049
|
+
* subtitle: 'Acompanhamento de vigência e conformidade.',
|
|
1050
|
+
* domain: { label: 'Suprimentos', icon: 'inventory_2', tone: 'info' },
|
|
1039
1051
|
* scopeBar: { ... }
|
|
1040
1052
|
* }
|
|
1041
1053
|
* }
|
|
1042
1054
|
* ```
|
|
1043
1055
|
*/
|
|
1044
|
-
declare class PraxisResourcePage implements OnInit, OnDestroy {
|
|
1056
|
+
declare class PraxisResourcePage implements OnInit, OnChanges, OnDestroy {
|
|
1045
1057
|
private readonly route;
|
|
1046
1058
|
private readonly runtimeContext;
|
|
1047
1059
|
private routeSub?;
|
|
@@ -1088,6 +1100,7 @@ declare class PraxisResourcePage implements OnInit, OnDestroy {
|
|
|
1088
1100
|
id: string | number;
|
|
1089
1101
|
}>;
|
|
1090
1102
|
error: EventEmitter<unknown>;
|
|
1103
|
+
private readonly inputsVersion;
|
|
1091
1104
|
private readonly routeResourceSignal;
|
|
1092
1105
|
private readonly routeMetadataSignal;
|
|
1093
1106
|
private readonly routeTitleSignal;
|
|
@@ -1111,6 +1124,7 @@ declare class PraxisResourcePage implements OnInit, OnDestroy {
|
|
|
1111
1124
|
private restoreDefaultScope;
|
|
1112
1125
|
private onRuntimeContext;
|
|
1113
1126
|
ngOnInit(): void;
|
|
1127
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
1114
1128
|
ngOnDestroy(): void;
|
|
1115
1129
|
onScopeChange(item: PraxisScopeBarItem): void;
|
|
1116
1130
|
onScopeClear(): void;
|
|
@@ -1147,6 +1161,13 @@ declare class PraxisBulkOperationDialogComponent implements OnInit {
|
|
|
1147
1161
|
readonly execution: _angular_core.WritableSignal<_praxisui_core.BulkExecution | null>;
|
|
1148
1162
|
readonly errorMessage: _angular_core.WritableSignal<string | null>;
|
|
1149
1163
|
readonly parametersValue: _angular_core.WritableSignal<Record<string, unknown>>;
|
|
1164
|
+
readonly proposalItems: _angular_core.WritableSignal<BulkProposalItemResult<_praxisui_core.BulkWireId>[]>;
|
|
1165
|
+
readonly proposalNextCursor: _angular_core.WritableSignal<string | null>;
|
|
1166
|
+
readonly loadingProposalResults: _angular_core.WritableSignal<boolean>;
|
|
1167
|
+
readonly executionItems: _angular_core.WritableSignal<BulkItemResult<_praxisui_core.BulkWireId>[]>;
|
|
1168
|
+
readonly executionNextCursor: _angular_core.WritableSignal<string | null>;
|
|
1169
|
+
readonly loadingExecutionResults: _angular_core.WritableSignal<boolean>;
|
|
1170
|
+
readonly cancellingExecution: _angular_core.WritableSignal<boolean>;
|
|
1150
1171
|
readonly action: ResourceActionCatalogItem;
|
|
1151
1172
|
readonly targets: ResourceBulkTarget[];
|
|
1152
1173
|
private confirmationIdempotencyKey?;
|
|
@@ -1161,9 +1182,15 @@ declare class PraxisBulkOperationDialogComponent implements OnInit {
|
|
|
1161
1182
|
isConfirmDisabled(): boolean;
|
|
1162
1183
|
isDiagnosticError(diag: any): boolean;
|
|
1163
1184
|
onEvaluate(): void;
|
|
1185
|
+
loadProposalResults(cursor?: string): void;
|
|
1164
1186
|
onConfirm(): void;
|
|
1187
|
+
private finalizeExecution;
|
|
1188
|
+
loadExecutionResults(cursor?: string): void;
|
|
1189
|
+
canCancelExecution(): boolean;
|
|
1190
|
+
onCancelActiveExecution(): void;
|
|
1165
1191
|
onCloseSuccess(): void;
|
|
1166
1192
|
onCancel(): void;
|
|
1193
|
+
onEscape(event?: Event): void;
|
|
1167
1194
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisBulkOperationDialogComponent, never>;
|
|
1168
1195
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisBulkOperationDialogComponent, "praxis-bulk-operation-dialog", never, {}, {}, never, never, true, never>;
|
|
1169
1196
|
}
|
|
@@ -1196,6 +1223,14 @@ declare class PraxisBulkEditDialogComponent {
|
|
|
1196
1223
|
readonly proposal: _angular_core.WritableSignal<_praxisui_core.BulkProposal | null>;
|
|
1197
1224
|
readonly execution: _angular_core.WritableSignal<_praxisui_core.BulkExecution | null>;
|
|
1198
1225
|
readonly errorMessage: _angular_core.WritableSignal<string | null>;
|
|
1226
|
+
readonly fetchedSchema: _angular_core.WritableSignal<Record<string, any> | null>;
|
|
1227
|
+
readonly proposalItems: _angular_core.WritableSignal<BulkProposalItemResult<_praxisui_core.BulkWireId>[]>;
|
|
1228
|
+
readonly proposalNextCursor: _angular_core.WritableSignal<string | null>;
|
|
1229
|
+
readonly loadingProposalResults: _angular_core.WritableSignal<boolean>;
|
|
1230
|
+
readonly executionItems: _angular_core.WritableSignal<BulkItemResult<_praxisui_core.BulkWireId>[]>;
|
|
1231
|
+
readonly executionNextCursor: _angular_core.WritableSignal<string | null>;
|
|
1232
|
+
readonly loadingExecutionResults: _angular_core.WritableSignal<boolean>;
|
|
1233
|
+
readonly cancellingExecution: _angular_core.WritableSignal<boolean>;
|
|
1199
1234
|
readonly contract: ResourceBulkExecutionContract;
|
|
1200
1235
|
readonly targets: ResourceBulkTarget[];
|
|
1201
1236
|
readonly writableFields: string[];
|
|
@@ -1204,8 +1239,12 @@ declare class PraxisBulkEditDialogComponent {
|
|
|
1204
1239
|
get dialogTitle(): string;
|
|
1205
1240
|
get dialogSubtitle(): string;
|
|
1206
1241
|
constructor(data: PraxisBulkEditDialogData);
|
|
1242
|
+
private hydrateRemoteSchemaIfNeeded;
|
|
1243
|
+
private getEffectiveSchemaProperty;
|
|
1244
|
+
private getFieldDescriptor;
|
|
1207
1245
|
isFieldClearable(fieldName: string): boolean;
|
|
1208
1246
|
hasAvailableFieldsToAdd(): boolean;
|
|
1247
|
+
isFieldSelectedInOtherRow(field: string, currentRow: EditableFieldRow): boolean;
|
|
1209
1248
|
addFieldRow(): void;
|
|
1210
1249
|
removeFieldRow(index: number): void;
|
|
1211
1250
|
getFieldLabel(fieldName: string): string;
|
|
@@ -1219,13 +1258,19 @@ declare class PraxisBulkEditDialogComponent {
|
|
|
1219
1258
|
isConfirmDisabled(): boolean;
|
|
1220
1259
|
isDiagnosticError(diag: ResourceBulkProposalDiagnostic | any): boolean;
|
|
1221
1260
|
onEvaluate(): void;
|
|
1261
|
+
loadProposalResults(cursor?: string): void;
|
|
1222
1262
|
onConfirm(): void;
|
|
1263
|
+
private finalizeExecution;
|
|
1264
|
+
loadExecutionResults(cursor?: string): void;
|
|
1265
|
+
canCancelExecution(): boolean;
|
|
1266
|
+
onCancelActiveExecution(): void;
|
|
1223
1267
|
onCloseSuccess(): void;
|
|
1224
1268
|
onCancel(): void;
|
|
1269
|
+
onEscape(event?: Event): void;
|
|
1225
1270
|
private parseFieldValue;
|
|
1226
1271
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PraxisBulkEditDialogComponent, never>;
|
|
1227
1272
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PraxisBulkEditDialogComponent, "praxis-bulk-edit-dialog", never, {}, {}, never, never, true, never>;
|
|
1228
1273
|
}
|
|
1229
1274
|
|
|
1230
1275
|
export { CRUD_AI_CAPABILITIES, CrudLauncherService, CrudMetadataEditorComponent, CrudPageHeaderComponent, DialogService, DynamicFormDialogHostComponent, PRAXIS_CRUD_AUTHORING_MANIFEST, PRAXIS_CRUD_COMPONENT_METADATA, PraxisBulkEditDialogComponent, PraxisBulkOperationDialogComponent, PraxisCrudComponent, PraxisCrudWidgetConfigEditor, PraxisKpiBandComponent, PraxisResourcePage, assertCrudMetadata, createCrudAuthoringDocument, findCrudAction, formatKpiValue, normalizeCrudAuthoringDocument, openCrudMetadataEditor, parseLegacyOrCrudDocument, providePraxisCrudMetadata, serializeCrudAuthoringDocument, validateCrudAuthoringDocument };
|
|
1231
|
-
export type { BulkDialogStep, BulkEditStep, Capability, CapabilityCatalog, CapabilityCategory, CrudAction, CrudActionFormContract, CrudActionResolutionMode, CrudActionRuntimeEvent, CrudAuthoringDocument, CrudAuthoringWidgetPersistenceEvent, CrudDefaults, CrudEditorDiagnostic, CrudFilterBarConfig, CrudFormReactiveDeterminationStabilityChange, CrudHeaderConfig, CrudHeaderVariant, CrudInteractionMode, CrudMetadata, CrudMetadataAssertionOptions, CrudParamMapping, CrudReactiveDeterminationStabilityChange, CrudReactiveDeterminationStabilityStatus, CrudResource, CrudValidationContext, DialogConfig, DialogRef, EvaluatedKpiCard, FormOpenMode, OpenCrudMetadataEditorOptions, PraxisBulkEditDialogData, PraxisBulkOperationDialogData, PraxisCrudWidgetEditorInputs, PraxisCrudWidgetEditorValue, PraxisResourceDomainBadge, PraxisResourceScopeBarConfig, ValueKind };
|
|
1276
|
+
export type { BulkDialogStep, BulkEditStep, Capability, CapabilityCatalog, CapabilityCategory, CrudAction, CrudActionFormContract, CrudActionResolutionMode, CrudActionRuntimeEvent, CrudAuthoringDocument, CrudAuthoringWidgetPersistenceEvent, CrudDefaults, CrudEditorDiagnostic, CrudFilterBarConfig, CrudFormReactiveDeterminationStabilityChange, CrudHeaderConfig, CrudHeaderVariant, CrudInteractionMode, CrudMetadata, CrudMetadataAssertionOptions, CrudParamMapping, CrudReactiveDeterminationStabilityChange, CrudReactiveDeterminationStabilityStatus, CrudResource, CrudTableConfig, CrudValidationContext, DialogConfig, DialogRef, EvaluatedKpiCard, FormOpenMode, OpenCrudMetadataEditorOptions, PraxisBulkEditDialogData, PraxisBulkOperationDialogData, PraxisCrudWidgetEditorInputs, PraxisCrudWidgetEditorValue, PraxisResourceDomainBadge, PraxisResourceScopeBarConfig, ValueKind };
|