@praxisui/visual-builder 10.0.0-rc.4 → 10.0.0-rc.40
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 +23 -0
- package/ai/component-registry.json +2 -2
- package/fesm2022/praxisui-visual-builder.mjs +2265 -1529
- package/package.json +5 -5
- package/types/praxisui-visual-builder.d.ts +46 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/visual-builder",
|
|
3
|
-
"version": "10.0.0-rc.
|
|
3
|
+
"version": "10.0.0-rc.40",
|
|
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.
|
|
12
|
-
"@praxisui/ai": "^10.0.0-rc.
|
|
13
|
-
"@praxisui/core": "^10.0.0-rc.
|
|
14
|
-
"@praxisui/metadata-editor": "^10.0.0-rc.
|
|
11
|
+
"@praxisui/settings-panel": "^10.0.0-rc.40",
|
|
12
|
+
"@praxisui/ai": "^10.0.0-rc.40",
|
|
13
|
+
"@praxisui/core": "^10.0.0-rc.40",
|
|
14
|
+
"@praxisui/metadata-editor": "^10.0.0-rc.40",
|
|
15
15
|
"rxjs": "~7.8.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
@@ -9,6 +9,7 @@ import { FormBuilder, FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
|
9
9
|
import { MatSelectChange } from '@angular/material/select';
|
|
10
10
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
11
11
|
import { MatButtonToggleChange } from '@angular/material/button-toggle';
|
|
12
|
+
import { ErrorStateMatcher } from '@angular/material/core';
|
|
12
13
|
import { MatChipInputEvent } from '@angular/material/chips';
|
|
13
14
|
|
|
14
15
|
/**
|
|
@@ -1242,7 +1243,12 @@ declare class RuleBuilderService {
|
|
|
1242
1243
|
/**
|
|
1243
1244
|
* Update an existing rule node
|
|
1244
1245
|
*/
|
|
1245
|
-
updateNode(nodeId: string, updates: Partial<RuleNode
|
|
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;
|
|
1246
1252
|
/**
|
|
1247
1253
|
* Remove a rule node (and its descendants)
|
|
1248
1254
|
*/
|
|
@@ -1278,6 +1284,7 @@ declare class RuleBuilderService {
|
|
|
1278
1284
|
buildConditionExpressionFromGraph(nodes: Record<string, RuleNode>, rootNodes: string[]): JsonLogicExpression | null;
|
|
1279
1285
|
private saveSnapshot;
|
|
1280
1286
|
private generateNodeLabel;
|
|
1287
|
+
private createDefaultNodeConfig;
|
|
1281
1288
|
private withRuleTimestamps;
|
|
1282
1289
|
private isPropertyRuleNode;
|
|
1283
1290
|
private containsPropertyRule;
|
|
@@ -2236,6 +2243,7 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
|
|
|
2236
2243
|
fileInput: ElementRef<HTMLInputElement>;
|
|
2237
2244
|
private destroy$;
|
|
2238
2245
|
private initialized;
|
|
2246
|
+
private synchronizingInput;
|
|
2239
2247
|
private lastInitialConditionSignature;
|
|
2240
2248
|
currentState: RuleBuilderState | null;
|
|
2241
2249
|
fieldSchemas: Record<string, FieldSchema>;
|
|
@@ -2274,7 +2282,7 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
|
|
|
2274
2282
|
}): void;
|
|
2275
2283
|
removeConditionNode(nodeId: string): void;
|
|
2276
2284
|
duplicateNode(nodeId: string): void;
|
|
2277
|
-
onRuleUpdated(config: RuleNodeConfigExtended): void;
|
|
2285
|
+
onRuleUpdated(config: RuleNodeConfigExtended, conditionState?: RuleBuilderState): void;
|
|
2278
2286
|
removeNode(nodeId: string): void;
|
|
2279
2287
|
isPropertyRule(node: RuleNode | null): boolean;
|
|
2280
2288
|
openExportDialog(): void;
|
|
@@ -2283,6 +2291,11 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
|
|
|
2283
2291
|
getRuleCount(): number;
|
|
2284
2292
|
t(key: string, fallback: string): string;
|
|
2285
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;
|
|
2286
2299
|
private loadInitialConditionIfNeeded;
|
|
2287
2300
|
private validateAiResponse;
|
|
2288
2301
|
private buildPropertyRuleLabel;
|
|
@@ -2366,15 +2379,22 @@ declare class RuleNodeComponent {
|
|
|
2366
2379
|
nodes: Record<string, RuleNode>;
|
|
2367
2380
|
fieldSchemas: Record<string, FieldSchema>;
|
|
2368
2381
|
level: number;
|
|
2382
|
+
conditionOnly: boolean;
|
|
2369
2383
|
isSelected: boolean;
|
|
2370
2384
|
validationErrors: ValidationError$1[];
|
|
2371
2385
|
nodeClicked: EventEmitter<void>;
|
|
2386
|
+
nodeSelectedById: EventEmitter<string>;
|
|
2372
2387
|
nodeUpdated: EventEmitter<{
|
|
2373
2388
|
nodeId: string;
|
|
2374
2389
|
updates: Partial<RuleNode>;
|
|
2375
2390
|
}>;
|
|
2376
2391
|
nodeDeleted: EventEmitter<void>;
|
|
2392
|
+
nodeDeletedById: EventEmitter<string>;
|
|
2377
2393
|
childAdded: EventEmitter<RuleNodeType>;
|
|
2394
|
+
childAddedToNode: EventEmitter<{
|
|
2395
|
+
parentId: string;
|
|
2396
|
+
type: RuleNodeType;
|
|
2397
|
+
}>;
|
|
2378
2398
|
childMoved: EventEmitter<CdkDragDrop<string[], string[], any>>;
|
|
2379
2399
|
get hasValidationErrors(): boolean;
|
|
2380
2400
|
get ownValidationErrors(): ValidationError$1[];
|
|
@@ -2416,21 +2436,28 @@ declare class RuleNodeComponent {
|
|
|
2416
2436
|
onConditionalValidatorChanged(config: ConditionalValidatorConfig): void;
|
|
2417
2437
|
onCollectionValidationChanged(config: CollectionValidatorConfig): void;
|
|
2418
2438
|
onChildClicked(childId: string): void;
|
|
2439
|
+
onChildSelectedById(nodeId: string): void;
|
|
2419
2440
|
onChildUpdated(event: {
|
|
2420
2441
|
nodeId: string;
|
|
2421
2442
|
updates: Partial<RuleNode>;
|
|
2422
2443
|
}): void;
|
|
2423
2444
|
onChildDeleted(childId: string): void;
|
|
2424
|
-
|
|
2445
|
+
onChildDeletedById(nodeId: string): void;
|
|
2446
|
+
onChildAdded(parentId: string, type: RuleNodeType): void;
|
|
2447
|
+
onChildAddedToNode(event: {
|
|
2448
|
+
parentId: string;
|
|
2449
|
+
type: RuleNodeType;
|
|
2450
|
+
}): void;
|
|
2425
2451
|
onChildMoved(event: CdkDragDrop<string[]>): void;
|
|
2426
2452
|
onChildDrop(event: CdkDragDrop<string[]>): void;
|
|
2427
2453
|
private formatNodeType;
|
|
2428
2454
|
static ɵfac: i0.ɵɵFactoryDeclaration<RuleNodeComponent, never>;
|
|
2429
|
-
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>;
|
|
2430
2456
|
}
|
|
2431
2457
|
|
|
2432
2458
|
declare class FieldConditionEditorComponent implements OnInit, OnChanges {
|
|
2433
2459
|
private fb;
|
|
2460
|
+
private readonly i18n?;
|
|
2434
2461
|
config: FieldConditionConfig | null;
|
|
2435
2462
|
fieldSchemas: Record<string, FieldSchema>;
|
|
2436
2463
|
configChanged: EventEmitter<FieldConditionConfig>;
|
|
@@ -2452,7 +2479,7 @@ declare class FieldConditionEditorComponent implements OnInit, OnChanges {
|
|
|
2452
2479
|
selectedOperator: string | null;
|
|
2453
2480
|
valueType: string;
|
|
2454
2481
|
availableOperators: string[];
|
|
2455
|
-
constructor(fb: FormBuilder);
|
|
2482
|
+
constructor(fb: FormBuilder, i18n?: PraxisI18nService | undefined);
|
|
2456
2483
|
focusSearchInput(): void;
|
|
2457
2484
|
clearSearch(event: Event): void;
|
|
2458
2485
|
ngOnInit(): void;
|
|
@@ -2491,7 +2518,7 @@ declare class FieldConditionEditorComponent implements OnInit, OnChanges {
|
|
|
2491
2518
|
getValidationErrors(): string[];
|
|
2492
2519
|
isValid(): boolean;
|
|
2493
2520
|
hasFieldOptions(): boolean;
|
|
2494
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionEditorComponent,
|
|
2521
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionEditorComponent, [null, { optional: true; }]>;
|
|
2495
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>;
|
|
2496
2523
|
}
|
|
2497
2524
|
|
|
@@ -2604,8 +2631,9 @@ declare class CollectionValidatorEditorComponent implements OnInit, OnChanges {
|
|
|
2604
2631
|
static ɵcmp: i0.ɵɵComponentDeclaration<CollectionValidatorEditorComponent, "praxis-collection-validator-editor", never, { "config": { "alias": "config"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "configChanged": "configChanged"; }, never, never, true, never>;
|
|
2605
2632
|
}
|
|
2606
2633
|
|
|
2607
|
-
declare class MetadataEditorComponent implements OnInit, OnChanges {
|
|
2634
|
+
declare class MetadataEditorComponent implements OnInit, OnChanges, OnDestroy {
|
|
2608
2635
|
private fb;
|
|
2636
|
+
private cdr?;
|
|
2609
2637
|
selectedNode: RuleNode | null;
|
|
2610
2638
|
metadataUpdated: EventEmitter<SpecificationMetadata>;
|
|
2611
2639
|
private destroy$;
|
|
@@ -2613,6 +2641,7 @@ declare class MetadataEditorComponent implements OnInit, OnChanges {
|
|
|
2613
2641
|
metadataForm: FormGroup;
|
|
2614
2642
|
activeTabIndex: number;
|
|
2615
2643
|
hasUnsavedChanges: boolean;
|
|
2644
|
+
readonly jsonControlErrorMatcher: ErrorStateMatcher;
|
|
2616
2645
|
availableTags: string[];
|
|
2617
2646
|
filteredTags: Observable<string[]>;
|
|
2618
2647
|
availableIcons: {
|
|
@@ -2622,7 +2651,7 @@ declare class MetadataEditorComponent implements OnInit, OnChanges {
|
|
|
2622
2651
|
get customProperties(): FormArray;
|
|
2623
2652
|
get documentationLinks(): FormArray;
|
|
2624
2653
|
get enableConditionalMetadata(): boolean;
|
|
2625
|
-
constructor(fb: FormBuilder);
|
|
2654
|
+
constructor(fb: FormBuilder, cdr?: ChangeDetectorRef | undefined);
|
|
2626
2655
|
ngOnInit(): void;
|
|
2627
2656
|
ngOnChanges(changes: SimpleChanges): void;
|
|
2628
2657
|
ngOnDestroy(): void;
|
|
@@ -2654,7 +2683,7 @@ declare class MetadataEditorComponent implements OnInit, OnChanges {
|
|
|
2654
2683
|
private stringifyJsonEditorValue;
|
|
2655
2684
|
private parseJsonEditorObject;
|
|
2656
2685
|
private static readonly invalidJsonEditorValue;
|
|
2657
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MetadataEditorComponent,
|
|
2686
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetadataEditorComponent, [null, { optional: true; }]>;
|
|
2658
2687
|
static ɵcmp: i0.ɵɵComponentDeclaration<MetadataEditorComponent, "praxis-metadata-editor", never, { "selectedNode": { "alias": "selectedNode"; "required": false; }; }, { "metadataUpdated": "metadataUpdated"; }, never, never, true, never>;
|
|
2659
2688
|
}
|
|
2660
2689
|
|
|
@@ -2917,6 +2946,9 @@ type RuleCardStatus = 'draft' | 'incomplete' | 'error' | 'valid';
|
|
|
2917
2946
|
type StatusFilter = 'all' | RuleCardStatus;
|
|
2918
2947
|
declare class RuleListComponent {
|
|
2919
2948
|
private readonly i18n?;
|
|
2949
|
+
private readonly fieldSchemaService?;
|
|
2950
|
+
private readonly ruleBuilderService?;
|
|
2951
|
+
private readonly summaryConfig?;
|
|
2920
2952
|
rules: RuleListItem[];
|
|
2921
2953
|
selectedRuleId: string;
|
|
2922
2954
|
nodeMap: Record<string, RuleNode>;
|
|
@@ -2928,7 +2960,7 @@ declare class RuleListComponent {
|
|
|
2928
2960
|
aiRequested: EventEmitter<void>;
|
|
2929
2961
|
searchTerm: string;
|
|
2930
2962
|
statusFilter: StatusFilter;
|
|
2931
|
-
constructor(i18n?: PraxisI18nService | undefined);
|
|
2963
|
+
constructor(i18n?: PraxisI18nService | undefined, fieldSchemaService?: FieldSchemaService | undefined, ruleBuilderService?: RuleBuilderService | undefined, summaryConfig?: (() => RuleBuilderConfig | undefined) | undefined);
|
|
2932
2964
|
get filteredRules(): RuleListItem[];
|
|
2933
2965
|
trackById: (_index: number, item: RuleListItem) => string;
|
|
2934
2966
|
isSelected(item: RuleListItem): boolean;
|
|
@@ -2941,6 +2973,9 @@ declare class RuleListComponent {
|
|
|
2941
2973
|
getConditionDetail(item: RuleListItem): string;
|
|
2942
2974
|
getPrimaryTargetLabel(item: RuleListItem): string;
|
|
2943
2975
|
getMainTargetName(item: RuleListItem): string;
|
|
2976
|
+
private summaryContext;
|
|
2977
|
+
private conditionFor;
|
|
2978
|
+
private relatedNodeIds;
|
|
2944
2979
|
getPrimaryEffectLabel(item: RuleListItem): string;
|
|
2945
2980
|
getEffectDetail(item: RuleListItem): string;
|
|
2946
2981
|
getSummary(item: RuleListItem): string;
|
|
@@ -2957,10 +2992,8 @@ declare class RuleListComponent {
|
|
|
2957
2992
|
private getNode;
|
|
2958
2993
|
private getItemId;
|
|
2959
2994
|
private getTargetTypeLabel;
|
|
2960
|
-
private describeProperty;
|
|
2961
|
-
private stripTargetPrefix;
|
|
2962
2995
|
private parseTimestamp;
|
|
2963
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RuleListComponent, [{ optional: true; }]>;
|
|
2996
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuleListComponent, [{ optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
2964
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>;
|
|
2965
2998
|
}
|
|
2966
2999
|
|