@praxisui/visual-builder 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/visual-builder",
3
- "version": "10.0.0-rc.37",
3
+ "version": "10.0.0-rc.39",
4
4
  "description": "Visual rule and expression builder for Praxis UI with JSON Logic authoring, validation and context variables.",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^21.0.0",
@@ -8,10 +8,10 @@
8
8
  "@angular/cdk": "^21.0.0",
9
9
  "@angular/material": "^21.0.0",
10
10
  "@angular/forms": "^21.0.0",
11
- "@praxisui/settings-panel": "^10.0.0-rc.37",
12
- "@praxisui/ai": "^10.0.0-rc.37",
13
- "@praxisui/core": "^10.0.0-rc.37",
14
- "@praxisui/metadata-editor": "^10.0.0-rc.37",
11
+ "@praxisui/settings-panel": "^10.0.0-rc.39",
12
+ "@praxisui/ai": "^10.0.0-rc.39",
13
+ "@praxisui/core": "^10.0.0-rc.39",
14
+ "@praxisui/metadata-editor": "^10.0.0-rc.39",
15
15
  "rxjs": "~7.8.0"
16
16
  },
17
17
  "dependencies": {
@@ -1243,7 +1243,12 @@ declare class RuleBuilderService {
1243
1243
  /**
1244
1244
  * Update an existing rule node
1245
1245
  */
1246
- updateNode(nodeId: string, updates: Partial<RuleNode>): void;
1246
+ updateNode(nodeId: string, updates: Partial<RuleNode>, conditionState?: RuleBuilderState): void;
1247
+ private reachableConditionNodes;
1248
+ /** A condition can be referenced by another rule; never delete that rule's graph. */
1249
+ private ownedConditionNodes;
1250
+ /** Atomically replaces this property's condition graph; shared conditions remain available to their remaining owners. */
1251
+ private projectConditionGraph;
1247
1252
  /**
1248
1253
  * Remove a rule node (and its descendants)
1249
1254
  */
@@ -1279,6 +1284,7 @@ declare class RuleBuilderService {
1279
1284
  buildConditionExpressionFromGraph(nodes: Record<string, RuleNode>, rootNodes: string[]): JsonLogicExpression | null;
1280
1285
  private saveSnapshot;
1281
1286
  private generateNodeLabel;
1287
+ private createDefaultNodeConfig;
1282
1288
  private withRuleTimestamps;
1283
1289
  private isPropertyRuleNode;
1284
1290
  private containsPropertyRule;
@@ -2237,6 +2243,7 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
2237
2243
  fileInput: ElementRef<HTMLInputElement>;
2238
2244
  private destroy$;
2239
2245
  private initialized;
2246
+ private synchronizingInput;
2240
2247
  private lastInitialConditionSignature;
2241
2248
  currentState: RuleBuilderState | null;
2242
2249
  fieldSchemas: Record<string, FieldSchema>;
@@ -2275,7 +2282,7 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
2275
2282
  }): void;
2276
2283
  removeConditionNode(nodeId: string): void;
2277
2284
  duplicateNode(nodeId: string): void;
2278
- onRuleUpdated(config: RuleNodeConfigExtended): void;
2285
+ onRuleUpdated(config: RuleNodeConfigExtended, conditionState?: RuleBuilderState): void;
2279
2286
  removeNode(nodeId: string): void;
2280
2287
  isPropertyRule(node: RuleNode | null): boolean;
2281
2288
  openExportDialog(): void;
@@ -2284,6 +2291,11 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
2284
2291
  getRuleCount(): number;
2285
2292
  t(key: string, fallback: string): string;
2286
2293
  private setupSubscriptions;
2294
+ private emitCurrentState;
2295
+ /** Input replacement uses the existing importer/history owner; echoes never reset its history. */
2296
+ private loadInitialRulesIfNeeded;
2297
+ private clearInputImportError;
2298
+ private stableInputSignature;
2287
2299
  private loadInitialConditionIfNeeded;
2288
2300
  private validateAiResponse;
2289
2301
  private buildPropertyRuleLabel;
@@ -2367,15 +2379,22 @@ declare class RuleNodeComponent {
2367
2379
  nodes: Record<string, RuleNode>;
2368
2380
  fieldSchemas: Record<string, FieldSchema>;
2369
2381
  level: number;
2382
+ conditionOnly: boolean;
2370
2383
  isSelected: boolean;
2371
2384
  validationErrors: ValidationError$1[];
2372
2385
  nodeClicked: EventEmitter<void>;
2386
+ nodeSelectedById: EventEmitter<string>;
2373
2387
  nodeUpdated: EventEmitter<{
2374
2388
  nodeId: string;
2375
2389
  updates: Partial<RuleNode>;
2376
2390
  }>;
2377
2391
  nodeDeleted: EventEmitter<void>;
2392
+ nodeDeletedById: EventEmitter<string>;
2378
2393
  childAdded: EventEmitter<RuleNodeType>;
2394
+ childAddedToNode: EventEmitter<{
2395
+ parentId: string;
2396
+ type: RuleNodeType;
2397
+ }>;
2379
2398
  childMoved: EventEmitter<CdkDragDrop<string[], string[], any>>;
2380
2399
  get hasValidationErrors(): boolean;
2381
2400
  get ownValidationErrors(): ValidationError$1[];
@@ -2417,21 +2436,28 @@ declare class RuleNodeComponent {
2417
2436
  onConditionalValidatorChanged(config: ConditionalValidatorConfig): void;
2418
2437
  onCollectionValidationChanged(config: CollectionValidatorConfig): void;
2419
2438
  onChildClicked(childId: string): void;
2439
+ onChildSelectedById(nodeId: string): void;
2420
2440
  onChildUpdated(event: {
2421
2441
  nodeId: string;
2422
2442
  updates: Partial<RuleNode>;
2423
2443
  }): void;
2424
2444
  onChildDeleted(childId: string): void;
2425
- onChildAdded(event: RuleNodeType): void;
2445
+ onChildDeletedById(nodeId: string): void;
2446
+ onChildAdded(parentId: string, type: RuleNodeType): void;
2447
+ onChildAddedToNode(event: {
2448
+ parentId: string;
2449
+ type: RuleNodeType;
2450
+ }): void;
2426
2451
  onChildMoved(event: CdkDragDrop<string[]>): void;
2427
2452
  onChildDrop(event: CdkDragDrop<string[]>): void;
2428
2453
  private formatNodeType;
2429
2454
  static ɵfac: i0.ɵɵFactoryDeclaration<RuleNodeComponent, never>;
2430
- static ɵcmp: i0.ɵɵComponentDeclaration<RuleNodeComponent, "praxis-rule-node", never, { "node": { "alias": "node"; "required": false; }; "nodes": { "alias": "nodes"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; "level": { "alias": "level"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "validationErrors": { "alias": "validationErrors"; "required": false; }; }, { "nodeClicked": "nodeClicked"; "nodeUpdated": "nodeUpdated"; "nodeDeleted": "nodeDeleted"; "childAdded": "childAdded"; "childMoved": "childMoved"; }, never, never, true, never>;
2455
+ static ɵcmp: i0.ɵɵComponentDeclaration<RuleNodeComponent, "praxis-rule-node", never, { "node": { "alias": "node"; "required": false; }; "nodes": { "alias": "nodes"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; "level": { "alias": "level"; "required": false; }; "conditionOnly": { "alias": "conditionOnly"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "validationErrors": { "alias": "validationErrors"; "required": false; }; }, { "nodeClicked": "nodeClicked"; "nodeSelectedById": "nodeSelectedById"; "nodeUpdated": "nodeUpdated"; "nodeDeleted": "nodeDeleted"; "nodeDeletedById": "nodeDeletedById"; "childAdded": "childAdded"; "childAddedToNode": "childAddedToNode"; "childMoved": "childMoved"; }, never, never, true, never>;
2431
2456
  }
2432
2457
 
2433
2458
  declare class FieldConditionEditorComponent implements OnInit, OnChanges {
2434
2459
  private fb;
2460
+ private readonly i18n?;
2435
2461
  config: FieldConditionConfig | null;
2436
2462
  fieldSchemas: Record<string, FieldSchema>;
2437
2463
  configChanged: EventEmitter<FieldConditionConfig>;
@@ -2453,7 +2479,7 @@ declare class FieldConditionEditorComponent implements OnInit, OnChanges {
2453
2479
  selectedOperator: string | null;
2454
2480
  valueType: string;
2455
2481
  availableOperators: string[];
2456
- constructor(fb: FormBuilder);
2482
+ constructor(fb: FormBuilder, i18n?: PraxisI18nService | undefined);
2457
2483
  focusSearchInput(): void;
2458
2484
  clearSearch(event: Event): void;
2459
2485
  ngOnInit(): void;
@@ -2492,7 +2518,7 @@ declare class FieldConditionEditorComponent implements OnInit, OnChanges {
2492
2518
  getValidationErrors(): string[];
2493
2519
  isValid(): boolean;
2494
2520
  hasFieldOptions(): boolean;
2495
- static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionEditorComponent, never>;
2521
+ static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionEditorComponent, [null, { optional: true; }]>;
2496
2522
  static ɵcmp: i0.ɵɵComponentDeclaration<FieldConditionEditorComponent, "praxis-field-condition-editor", never, { "config": { "alias": "config"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "configChanged": "configChanged"; }, never, never, true, never>;
2497
2523
  }
2498
2524
 
@@ -2920,6 +2946,9 @@ type RuleCardStatus = 'draft' | 'incomplete' | 'error' | 'valid';
2920
2946
  type StatusFilter = 'all' | RuleCardStatus;
2921
2947
  declare class RuleListComponent {
2922
2948
  private readonly i18n?;
2949
+ private readonly fieldSchemaService?;
2950
+ private readonly ruleBuilderService?;
2951
+ private readonly summaryConfig?;
2923
2952
  rules: RuleListItem[];
2924
2953
  selectedRuleId: string;
2925
2954
  nodeMap: Record<string, RuleNode>;
@@ -2931,7 +2960,7 @@ declare class RuleListComponent {
2931
2960
  aiRequested: EventEmitter<void>;
2932
2961
  searchTerm: string;
2933
2962
  statusFilter: StatusFilter;
2934
- constructor(i18n?: PraxisI18nService | undefined);
2963
+ constructor(i18n?: PraxisI18nService | undefined, fieldSchemaService?: FieldSchemaService | undefined, ruleBuilderService?: RuleBuilderService | undefined, summaryConfig?: (() => RuleBuilderConfig | undefined) | undefined);
2935
2964
  get filteredRules(): RuleListItem[];
2936
2965
  trackById: (_index: number, item: RuleListItem) => string;
2937
2966
  isSelected(item: RuleListItem): boolean;
@@ -2944,6 +2973,9 @@ declare class RuleListComponent {
2944
2973
  getConditionDetail(item: RuleListItem): string;
2945
2974
  getPrimaryTargetLabel(item: RuleListItem): string;
2946
2975
  getMainTargetName(item: RuleListItem): string;
2976
+ private summaryContext;
2977
+ private conditionFor;
2978
+ private relatedNodeIds;
2947
2979
  getPrimaryEffectLabel(item: RuleListItem): string;
2948
2980
  getEffectDetail(item: RuleListItem): string;
2949
2981
  getSummary(item: RuleListItem): string;
@@ -2960,10 +2992,8 @@ declare class RuleListComponent {
2960
2992
  private getNode;
2961
2993
  private getItemId;
2962
2994
  private getTargetTypeLabel;
2963
- private describeProperty;
2964
- private stripTargetPrefix;
2965
2995
  private parseTimestamp;
2966
- static ɵfac: i0.ɵɵFactoryDeclaration<RuleListComponent, [{ optional: true; }]>;
2996
+ static ɵfac: i0.ɵɵFactoryDeclaration<RuleListComponent, [{ optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
2967
2997
  static ɵcmp: i0.ɵɵComponentDeclaration<RuleListComponent, "praxis-rule-list", never, { "rules": { "alias": "rules"; "required": false; }; "selectedRuleId": { "alias": "selectedRuleId"; "required": false; }; "nodeMap": { "alias": "nodeMap"; "required": false; }; "validationErrors": { "alias": "validationErrors"; "required": false; }; }, { "ruleSelected": "ruleSelected"; "ruleDeleted": "ruleDeleted"; "ruleDuplicated": "ruleDuplicated"; "ruleAdded": "ruleAdded"; "aiRequested": "aiRequested"; }, never, never, true, never>;
2968
2998
  }
2969
2999