@praxisui/metadata-editor 10.0.0-rc.37 → 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": {
|
|
@@ -160,6 +160,7 @@ declare class FieldMetadataEditorComponent implements OnInit {
|
|
|
160
160
|
renderedProps: any[];
|
|
161
161
|
private initialSnapshot;
|
|
162
162
|
private initialControlType?;
|
|
163
|
+
private initialSeed?;
|
|
163
164
|
private baselineReady;
|
|
164
165
|
private readonly formRebuild$;
|
|
165
166
|
private readonly hostApplyPatch?;
|
|
@@ -227,6 +228,10 @@ declare class FieldMetadataEditorComponent implements OnInit {
|
|
|
227
228
|
reset(): void;
|
|
228
229
|
onControlTypeChange(next: FieldControlType): void;
|
|
229
230
|
onControlTypeChangeEvent(event: Event): void;
|
|
231
|
+
tx(key: string, fallback: string): string;
|
|
232
|
+
private buildCurrentSemanticFieldSnapshot;
|
|
233
|
+
canCalibrateFromSemantics(): boolean;
|
|
234
|
+
calibrateFromSemantics(): void;
|
|
230
235
|
private withSharedFieldMetadataProperties;
|
|
231
236
|
get isArrayEditor(): boolean;
|
|
232
237
|
private static readonly ROOT_DEPENDENT_FIELD_KEY_PROPS;
|
|
@@ -293,13 +298,37 @@ interface CascadeRuleViewModel {
|
|
|
293
298
|
dependencyDebounceMs?: number | null;
|
|
294
299
|
dependencyLoadOnChange?: 'respectLoadOn' | 'immediate' | 'manual';
|
|
295
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
|
+
}
|
|
296
316
|
declare class CascadeRulesService {
|
|
297
317
|
getFieldLabelMap(fields: Array<FieldDefinition | FieldMetadata>): Map<string, string>;
|
|
298
318
|
hydrateRule(field: FieldDefinition | FieldMetadata): CascadeRuleViewModel | null;
|
|
299
319
|
dehydratePatch(rule: CascadeRuleViewModel): Partial<FieldDefinition>;
|
|
300
320
|
clearPatch(): Partial<FieldDefinition>;
|
|
301
|
-
/**
|
|
321
|
+
/** Fill missing mappings and value paths without replacing authored values. */
|
|
302
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;
|
|
303
332
|
private normalizeDependencyFields;
|
|
304
333
|
static ɵfac: i0.ɵɵFactoryDeclaration<CascadeRulesService, never>;
|
|
305
334
|
static ɵprov: i0.ɵɵInjectableDeclaration<CascadeRulesService>;
|
|
@@ -314,6 +343,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
314
343
|
}>;
|
|
315
344
|
apply: EventEmitter<Record<string, Partial<FieldDefinition>>>;
|
|
316
345
|
cancel: EventEmitter<void>;
|
|
346
|
+
validChange: EventEmitter<boolean>;
|
|
317
347
|
searchTerm: string;
|
|
318
348
|
private searchTimer;
|
|
319
349
|
private searchValue;
|
|
@@ -327,7 +357,6 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
327
357
|
editLoadOn: 'respectLoadOn' | 'immediate' | 'manual';
|
|
328
358
|
editDebounce: number | null;
|
|
329
359
|
editValuePath: string;
|
|
330
|
-
editFilterMapJson: string;
|
|
331
360
|
importMode: boolean;
|
|
332
361
|
importJson: string;
|
|
333
362
|
feedbackMessage: string;
|
|
@@ -337,13 +366,26 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
337
366
|
key: string;
|
|
338
367
|
valuePath?: string;
|
|
339
368
|
}>;
|
|
369
|
+
private editInitialFilterMap;
|
|
370
|
+
private editInitialValuePath;
|
|
371
|
+
private lastEmittedValid;
|
|
340
372
|
private setFeedback;
|
|
341
373
|
constructor(svc: CascadeRulesService);
|
|
342
374
|
ngOnInit(): void;
|
|
343
375
|
ngOnChanges(changes: SimpleChanges): void;
|
|
344
|
-
private _logCount;
|
|
345
376
|
filteredFields(): Array<FieldDefinition | FieldMetadata>;
|
|
346
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;
|
|
347
389
|
selectedField(): string | null;
|
|
348
390
|
selectField(name: string): void;
|
|
349
391
|
hasRule(name: string): boolean;
|
|
@@ -351,10 +393,23 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
351
393
|
isCascadeEnabled(name: string): boolean;
|
|
352
394
|
loadOnChange(name: string): 'respectLoadOn' | 'immediate' | 'manual';
|
|
353
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;
|
|
354
405
|
startEdit(name: string): void;
|
|
355
406
|
edit(name: string): void;
|
|
356
407
|
cancelEdit(): void;
|
|
357
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;
|
|
358
413
|
remove(name: string): void;
|
|
359
414
|
quickSet(name: string, action: 'disable' | 'manual'): void;
|
|
360
415
|
private emitPatch;
|
|
@@ -366,6 +421,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
366
421
|
applyImport(): void;
|
|
367
422
|
startTemplate(name: string, tpl: 'rota-destino' | 'rota-destino-propriedade'): void;
|
|
368
423
|
buildMapRowsFromDeps(): void;
|
|
424
|
+
private initialRowValuePath;
|
|
369
425
|
buildValuePathOverrides(deps: string[]): string | Record<string, string>;
|
|
370
426
|
buildPreview(): string;
|
|
371
427
|
copyPreview(): void;
|
|
@@ -374,7 +430,7 @@ declare class CascadeManagerTabComponent implements OnChanges {
|
|
|
374
430
|
getKeySuggestions(dep: string): string[];
|
|
375
431
|
getValuePathSuggestions(dep: string): string[];
|
|
376
432
|
static ɵfac: i0.ɵɵFactoryDeclaration<CascadeManagerTabComponent, never>;
|
|
377
|
-
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>;
|
|
378
434
|
}
|
|
379
435
|
|
|
380
436
|
/**
|
|
@@ -406,4 +462,4 @@ declare const PRAXIS_METADATA_EDITOR_COMPONENT_METADATA: ComponentDocMeta;
|
|
|
406
462
|
declare function providePraxisMetadataEditorMetadata(): Provider;
|
|
407
463
|
|
|
408
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 };
|
|
409
|
-
export type { CascadeRuleViewModel, ConfigMap, EditorProperty };
|
|
465
|
+
export type { CascadeCycleDiagnostic, CascadeGraphValidationResult, CascadeRuleViewModel, ConfigMap, EditorProperty };
|