@praxisui/metadata-editor 10.0.0-rc.38 → 10.0.0-rc.39
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,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/metadata-editor",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.39",
|
|
4
4
|
"description": "Metadata editor for Praxis UI fields and components with runtime integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"@angular/cdk": "^21.0.0",
|
|
9
9
|
"@angular/forms": "^21.0.0",
|
|
10
10
|
"@angular/material": "^21.0.0",
|
|
11
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
12
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
13
|
-
"@praxisui/dynamic-fields": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/settings-panel": "^10.0.0-rc.
|
|
11
|
+
"@praxisui/ai": "^10.0.0-rc.39",
|
|
12
|
+
"@praxisui/core": "^10.0.0-rc.39",
|
|
13
|
+
"@praxisui/dynamic-fields": "^10.0.0-rc.39",
|
|
14
|
+
"@praxisui/settings-panel": "^10.0.0-rc.39",
|
|
15
15
|
"rxjs": "~7.8.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
@@ -298,6 +298,21 @@ interface CascadeRuleViewModel {
|
|
|
298
298
|
dependencyDebounceMs?: number | null;
|
|
299
299
|
dependencyLoadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
|
|
300
300
|
}
|
|
301
|
+
interface CascadeCycleDiagnostic {
|
|
302
|
+
/** Ordered field names in the cycle, starting and ending with the same field (e.g. ['cargoId', 'departamentoId', 'cargoId']). */
|
|
303
|
+
path: string[];
|
|
304
|
+
/** Human-readable path with labels and field names (e.g. "Cargo (cargoId) → Departamento (departamentoId) → Cargo (cargoId)"). */
|
|
305
|
+
formattedPath: string;
|
|
306
|
+
/** True when a field directly references itself in dependencyFields. */
|
|
307
|
+
isSelfReference: boolean;
|
|
308
|
+
/** Actionable remediation message in analyst language. */
|
|
309
|
+
message: string;
|
|
310
|
+
}
|
|
311
|
+
interface CascadeGraphValidationResult {
|
|
312
|
+
valid: boolean;
|
|
313
|
+
cycles: CascadeCycleDiagnostic[];
|
|
314
|
+
fieldsInCycles: Set<string>;
|
|
315
|
+
}
|
|
301
316
|
declare class CascadeRulesService {
|
|
302
317
|
getFieldLabelMap(fields: Array<FieldDefinition | FieldMetadata>): Map<string, string>;
|
|
303
318
|
hydrateRule(field: FieldDefinition | FieldMetadata): CascadeRuleViewModel | null;
|
|
@@ -305,6 +320,15 @@ declare class CascadeRulesService {
|
|
|
305
320
|
clearPatch(): Partial<FieldDefinition>;
|
|
306
321
|
/** Fill missing mappings and value paths without replacing authored values. */
|
|
307
322
|
suggest(rule: CascadeRuleViewModel, inferredValueKey?: string): CascadeRuleViewModel;
|
|
323
|
+
/**
|
|
324
|
+
* Validates the cascade dependency graph directly from an array of FieldMetadata/FieldDefinition.
|
|
325
|
+
*/
|
|
326
|
+
validateFieldsCascadeGraph(fields: ReadonlyArray<FieldDefinition | FieldMetadata>): CascadeGraphValidationResult;
|
|
327
|
+
/**
|
|
328
|
+
* Detects self-references, direct cycles (A -> B -> A) and indirect cycles (A -> B -> C -> A),
|
|
329
|
+
* including graphs where fields have multiple parent dependencies.
|
|
330
|
+
*/
|
|
331
|
+
validateCascadeGraph(rules: ReadonlyMap<string, CascadeRuleViewModel> | Record<string, CascadeRuleViewModel>, fields?: ReadonlyArray<FieldDefinition | FieldMetadata>): CascadeGraphValidationResult;
|
|
308
332
|
private normalizeDependencyFields;
|
|
309
333
|
static ɵfac: i0.ɵɵFactoryDeclaration<CascadeRulesService, never>;
|
|
310
334
|
static ɵprov: i0.ɵɵInjectableDeclaration<CascadeRulesService>;
|
|
@@ -319,6 +343,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
319
343
|
}>;
|
|
320
344
|
apply: EventEmitter<Record<string, Partial<FieldDefinition>>>;
|
|
321
345
|
cancel: EventEmitter<void>;
|
|
346
|
+
validChange: EventEmitter<boolean>;
|
|
322
347
|
searchTerm: string;
|
|
323
348
|
private searchTimer;
|
|
324
349
|
private searchValue;
|
|
@@ -343,13 +368,24 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
343
368
|
}>;
|
|
344
369
|
private editInitialFilterMap;
|
|
345
370
|
private editInitialValuePath;
|
|
371
|
+
private lastEmittedValid;
|
|
346
372
|
private setFeedback;
|
|
347
373
|
constructor(svc: CascadeRulesService);
|
|
348
374
|
ngOnInit(): void;
|
|
349
375
|
ngOnChanges(changes: SimpleChanges): void;
|
|
350
|
-
private _logCount;
|
|
351
376
|
filteredFields(): Array<FieldDefinition | FieldMetadata>;
|
|
352
377
|
labelFor(name: string): string;
|
|
378
|
+
/**
|
|
379
|
+
* Disambiguates fields that share the same display label (e.g. "Cargo" for both `cargoId` and `cargoNome`).
|
|
380
|
+
*/
|
|
381
|
+
disambiguatedLabelFor(name: string): string;
|
|
382
|
+
hasRemoteOptionSource(name: string): boolean;
|
|
383
|
+
fieldRoleBadge(name: string): string;
|
|
384
|
+
fieldRoleSummary(name: string): string;
|
|
385
|
+
formatParentList(deps: string[]): string;
|
|
386
|
+
formatRelationshipSummary(targetField: string, deps: string[]): string;
|
|
387
|
+
formatLoadOnLabel(policy?: 'respectLoadOn' | 'immediate' | 'manual' | null): string;
|
|
388
|
+
formatMergeStrategyLabel(strategy?: 'merge' | 'replace' | null): string;
|
|
353
389
|
selectedField(): string | null;
|
|
354
390
|
selectField(name: string): void;
|
|
355
391
|
hasRule(name: string): boolean;
|
|
@@ -357,10 +393,23 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
357
393
|
isCascadeEnabled(name: string): boolean;
|
|
358
394
|
loadOnChange(name: string): 'respectLoadOn' | 'immediate' | 'manual';
|
|
359
395
|
hasConflict(name: string): boolean;
|
|
396
|
+
/**
|
|
397
|
+
* Computes graph validation combining saved rules with any active draft in the inline editor.
|
|
398
|
+
*/
|
|
399
|
+
validateCurrentGraph(includeDraft?: boolean): CascadeGraphValidationResult;
|
|
400
|
+
activeCycleDiagnostics(): CascadeCycleDiagnostic[];
|
|
401
|
+
isFieldInCycle(name: string): boolean;
|
|
402
|
+
hasBlockingErrors(): boolean;
|
|
403
|
+
private syncValidityState;
|
|
404
|
+
onDraftControlChange(): void;
|
|
360
405
|
startEdit(name: string): void;
|
|
361
406
|
edit(name: string): void;
|
|
362
407
|
cancelEdit(): void;
|
|
363
408
|
saveEdit(name: string): void;
|
|
409
|
+
/**
|
|
410
|
+
* Removes cyclic dependencies from the given field's draft (and saved rule if present).
|
|
411
|
+
*/
|
|
412
|
+
breakCycleForField(name: string): void;
|
|
364
413
|
remove(name: string): void;
|
|
365
414
|
quickSet(name: string, action: 'disable' | 'manual'): void;
|
|
366
415
|
private emitPatch;
|
|
@@ -381,7 +430,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
381
430
|
getKeySuggestions(dep: string): string[];
|
|
382
431
|
getValuePathSuggestions(dep: string): string[];
|
|
383
432
|
static ɵfac: i0.ɵɵFactoryDeclaration<CascadeManagerTabComponent, never>;
|
|
384
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CascadeManagerTabComponent, "praxis-cascade-manager-tab", never, { "fields": { "alias": "fields"; "required": false; }; "connections": { "alias": "connections"; "required": false; }; }, { "apply": "apply"; "cancel": "cancel"; }, never, never, true, never>;
|
|
433
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CascadeManagerTabComponent, "praxis-cascade-manager-tab", never, { "fields": { "alias": "fields"; "required": false; }; "connections": { "alias": "connections"; "required": false; }; }, { "apply": "apply"; "cancel": "cancel"; "validChange": "validChange"; }, never, never, true, never>;
|
|
385
434
|
}
|
|
386
435
|
|
|
387
436
|
/**
|
|
@@ -413,4 +462,4 @@ declare const PRAXIS_METADATA_EDITOR_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
413
462
|
declare function providePraxisMetadataEditorMetadata(): Provider;
|
|
414
463
|
|
|
415
464
|
export { CascadeManagerTabComponent, CascadeRulesService, ConfigRegistryService, ContextValidatorRegistryService, DynamicEditorRendererComponent, DynamicFormFactoryService, EditorComponentRegistryService, FieldMetadataEditorComponent, METADATA_EDITOR_AI_CAPABILITIES, METADATA_EDITOR_AI_CAPABILITY_CATALOG, PRAXIS_METADATA_EDITOR_AUTHORING_MANIFEST, PRAXIS_METADATA_EDITOR_COMPONENT_METADATA, ReactiveDeterminationDiagnosticsComponent, SchemaNormalizerService, providePraxisMetadataEditorMetadata };
|
|
416
|
-
export type { CascadeRuleViewModel, ConfigMap, EditorProperty };
|
|
465
|
+
export type { CascadeCycleDiagnostic, CascadeGraphValidationResult, CascadeRuleViewModel, ConfigMap, EditorProperty };
|