@praxisui/visual-builder 3.0.0-beta.1 → 3.0.0-beta.10
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/fesm2022/praxisui-visual-builder.mjs +3776 -2149
- package/index.d.ts +58 -23
- package/package.json +4 -4
- package/fesm2022/praxisui-visual-builder.mjs.map +0 -1
package/index.d.ts
CHANGED
|
@@ -4,10 +4,10 @@ import { ContextProvider, FunctionRegistry, ExportOptions as ExportOptions$1, Co
|
|
|
4
4
|
import { SpecificationMetadata, Specification } from '@praxisui/specification-core';
|
|
5
5
|
export { SpecificationMetadata } from '@praxisui/specification-core';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { FormLayoutRule, RulePropertySchema } from '@praxisui/core';
|
|
7
|
+
import { FormLayoutRule, RulePropertySchema, PraxisI18nService } from '@praxisui/core';
|
|
8
8
|
import { DslParsingConfig, DslParsingResult, DslParsingService, AiResponseValidatorService, AiRuleResponse } from '@praxisui/ai';
|
|
9
|
-
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
10
9
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
10
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
11
11
|
import { FormBuilder, FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
12
12
|
import { MatSelectChange } from '@angular/material/select';
|
|
13
13
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
@@ -1735,6 +1735,7 @@ declare class RuleBuilderService {
|
|
|
1735
1735
|
updateFromParsedDsl(nodes: Record<string, RuleNode>, rootNodes: string[], description?: string): void;
|
|
1736
1736
|
private saveSnapshot;
|
|
1737
1737
|
private generateNodeLabel;
|
|
1738
|
+
private withRuleTimestamps;
|
|
1738
1739
|
private isPropertyRuleNode;
|
|
1739
1740
|
private containsPropertyRule;
|
|
1740
1741
|
/**
|
|
@@ -2729,12 +2730,13 @@ type RuleNodeConfigExtended = RuleNodeConfig & {
|
|
|
2729
2730
|
condition?: RuleNode | string | null;
|
|
2730
2731
|
};
|
|
2731
2732
|
declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
2732
|
-
private ruleBuilderService;
|
|
2733
|
-
private fieldSchemaService;
|
|
2734
|
-
private aiResponseValidator;
|
|
2735
|
-
private snackBar;
|
|
2736
|
-
private dialog;
|
|
2737
|
-
private cdr;
|
|
2733
|
+
private readonly ruleBuilderService;
|
|
2734
|
+
private readonly fieldSchemaService;
|
|
2735
|
+
private readonly aiResponseValidator;
|
|
2736
|
+
private readonly snackBar;
|
|
2737
|
+
private readonly dialog;
|
|
2738
|
+
private readonly cdr;
|
|
2739
|
+
private readonly i18n?;
|
|
2738
2740
|
embedded: boolean;
|
|
2739
2741
|
config: RuleBuilderConfig | null;
|
|
2740
2742
|
initialRules: any;
|
|
@@ -2756,33 +2758,36 @@ declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, After
|
|
|
2756
2758
|
private lastErrorCount;
|
|
2757
2759
|
get canUndo(): boolean;
|
|
2758
2760
|
get canRedo(): boolean;
|
|
2759
|
-
constructor(ruleBuilderService: RuleBuilderService, fieldSchemaService: FieldSchemaService, aiResponseValidator: AiResponseValidatorService, snackBar: MatSnackBar, dialog: MatDialog, cdr: ChangeDetectorRef);
|
|
2761
|
+
constructor(ruleBuilderService: RuleBuilderService, fieldSchemaService: FieldSchemaService, aiResponseValidator: AiResponseValidatorService, snackBar: MatSnackBar, dialog: MatDialog, cdr: ChangeDetectorRef, i18n?: PraxisI18nService | undefined);
|
|
2760
2762
|
ngOnInit(): void;
|
|
2761
2763
|
ngOnChanges(changes: SimpleChanges): void;
|
|
2762
2764
|
ngAfterViewInit(): void;
|
|
2763
2765
|
ngOnDestroy(): void;
|
|
2764
|
-
private setupSubscriptions;
|
|
2765
2766
|
undo(): void;
|
|
2766
2767
|
redo(): void;
|
|
2767
2768
|
clearRules(): void;
|
|
2768
2769
|
toggleListPanel(): void;
|
|
2770
|
+
shouldShowShellChrome(): boolean;
|
|
2771
|
+
shouldShowStatusBar(): boolean;
|
|
2769
2772
|
openAiWizard(): void;
|
|
2770
2773
|
createRuleFromAI(aiResponse: AiRuleResponse): Promise<void>;
|
|
2771
|
-
private validateAiResponse;
|
|
2772
2774
|
addPropertyRule(): void;
|
|
2773
2775
|
selectNode(nodeId: string): void;
|
|
2776
|
+
duplicateNode(nodeId: string): void;
|
|
2774
2777
|
onRuleUpdated(config: RuleNodeConfigExtended): void;
|
|
2775
2778
|
removeNode(nodeId: string): void;
|
|
2776
2779
|
isPropertyRule(node: RuleNode | null): boolean;
|
|
2777
|
-
private buildPropertyRuleLabel;
|
|
2778
|
-
private stripTargetPrefix;
|
|
2779
|
-
private normalizeRuleConfig;
|
|
2780
2780
|
openExportDialog(): void;
|
|
2781
2781
|
importRules(): void;
|
|
2782
2782
|
onFileSelected(event: Event): void;
|
|
2783
2783
|
getRuleCount(): number;
|
|
2784
|
-
|
|
2785
|
-
|
|
2784
|
+
t(key: string, fallback: string): string;
|
|
2785
|
+
private setupSubscriptions;
|
|
2786
|
+
private validateAiResponse;
|
|
2787
|
+
private buildPropertyRuleLabel;
|
|
2788
|
+
private stripTargetPrefix;
|
|
2789
|
+
private normalizeRuleConfig;
|
|
2790
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuleEditorComponent, [null, null, null, null, null, null, { optional: true; }]>;
|
|
2786
2791
|
static ɵcmp: i0.ɵɵComponentDeclaration<RuleEditorComponent, "praxis-rule-editor", never, { "embedded": { "alias": "embedded"; "required": false; }; "config": { "alias": "config"; "required": false; }; "initialRules": { "alias": "initialRules"; "required": false; }; }, { "stateChanged": "stateChanged"; "save": "save"; "rulesChanged": "rulesChanged"; "exportRequested": "exportRequested"; "importRequested": "importRequested"; }, never, never, true, never>;
|
|
2787
2792
|
}
|
|
2788
2793
|
|
|
@@ -2973,8 +2978,9 @@ declare class FieldConditionEditorComponent implements OnInit, OnChanges {
|
|
|
2973
2978
|
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>;
|
|
2974
2979
|
}
|
|
2975
2980
|
|
|
2976
|
-
declare class ConditionalValidatorEditorComponent implements OnInit, OnChanges {
|
|
2981
|
+
declare class ConditionalValidatorEditorComponent implements OnInit, OnChanges, OnDestroy {
|
|
2977
2982
|
private fb;
|
|
2983
|
+
private readonly i18n?;
|
|
2978
2984
|
config: ConditionalValidatorConfig | null;
|
|
2979
2985
|
fieldSchemas: Record<string, FieldSchema>;
|
|
2980
2986
|
configChanged: EventEmitter<ConditionalValidatorConfig>;
|
|
@@ -2993,7 +2999,7 @@ declare class ConditionalValidatorEditorComponent implements OnInit, OnChanges {
|
|
|
2993
2999
|
icon: string;
|
|
2994
3000
|
}>;
|
|
2995
3001
|
get showDisabledMessage(): boolean;
|
|
2996
|
-
constructor(fb: FormBuilder);
|
|
3002
|
+
constructor(fb: FormBuilder, i18n?: PraxisI18nService | undefined);
|
|
2997
3003
|
ngOnInit(): void;
|
|
2998
3004
|
ngOnChanges(changes: SimpleChanges): void;
|
|
2999
3005
|
ngOnDestroy(): void;
|
|
@@ -3023,7 +3029,9 @@ declare class ConditionalValidatorEditorComponent implements OnInit, OnChanges {
|
|
|
3023
3029
|
private isConditionIncomplete;
|
|
3024
3030
|
private mapRuleTypeToValidatorType;
|
|
3025
3031
|
private mapValidatorTypeToRuleType;
|
|
3026
|
-
|
|
3032
|
+
private refreshValidatorTypeLabels;
|
|
3033
|
+
t(key: string, fallback: string): string;
|
|
3034
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConditionalValidatorEditorComponent, [null, { optional: true; }]>;
|
|
3027
3035
|
static ɵcmp: i0.ɵɵComponentDeclaration<ConditionalValidatorEditorComponent, "praxis-conditional-validator-editor", never, { "config": { "alias": "config"; "required": false; }; "fieldSchemas": { "alias": "fieldSchemas"; "required": false; }; }, { "configChanged": "configChanged"; }, never, never, true, never>;
|
|
3028
3036
|
}
|
|
3029
3037
|
|
|
@@ -3602,27 +3610,54 @@ declare class TemplatePreviewDialogComponent {
|
|
|
3602
3610
|
}
|
|
3603
3611
|
|
|
3604
3612
|
type RuleListItem = string | RuleNode;
|
|
3613
|
+
type RuleCardStatus = 'draft' | 'incomplete' | 'error' | 'valid';
|
|
3614
|
+
type StatusFilter = 'all' | RuleCardStatus;
|
|
3605
3615
|
declare class RuleListComponent {
|
|
3616
|
+
private readonly i18n?;
|
|
3606
3617
|
rules: RuleListItem[];
|
|
3607
3618
|
selectedRuleId: string;
|
|
3608
3619
|
nodeMap: Record<string, RuleNode>;
|
|
3620
|
+
validationErrors: ValidationError$1[];
|
|
3609
3621
|
ruleSelected: EventEmitter<string>;
|
|
3610
3622
|
ruleDeleted: EventEmitter<string>;
|
|
3623
|
+
ruleDuplicated: EventEmitter<string>;
|
|
3611
3624
|
ruleAdded: EventEmitter<void>;
|
|
3625
|
+
aiRequested: EventEmitter<void>;
|
|
3612
3626
|
searchTerm: string;
|
|
3627
|
+
statusFilter: StatusFilter;
|
|
3628
|
+
constructor(i18n?: PraxisI18nService | undefined);
|
|
3613
3629
|
get filteredRules(): RuleListItem[];
|
|
3614
3630
|
trackById: (_index: number, item: RuleListItem) => string;
|
|
3615
3631
|
isSelected(item: RuleListItem): boolean;
|
|
3616
3632
|
getLabel(item: RuleListItem): string;
|
|
3617
|
-
getDescription(item: RuleListItem): string | undefined;
|
|
3618
3633
|
getTooltip(item: RuleListItem): string;
|
|
3619
|
-
|
|
3634
|
+
getStatus(item: RuleListItem): RuleCardStatus;
|
|
3635
|
+
getStatusLabel(item: RuleListItem): string;
|
|
3636
|
+
countRulesByStatus(status: RuleCardStatus): number;
|
|
3637
|
+
getConditionPill(item: RuleListItem): string;
|
|
3638
|
+
getConditionDetail(item: RuleListItem): string;
|
|
3639
|
+
getPrimaryTargetLabel(item: RuleListItem): string;
|
|
3640
|
+
getMainTargetName(item: RuleListItem): string;
|
|
3641
|
+
getPrimaryEffectLabel(item: RuleListItem): string;
|
|
3642
|
+
getEffectDetail(item: RuleListItem): string;
|
|
3643
|
+
getSummary(item: RuleListItem): string;
|
|
3644
|
+
getRelativeTime(item: RuleListItem): string | null;
|
|
3645
|
+
getTargetPreview(item: RuleListItem): string[];
|
|
3646
|
+
t(key: string, fallback: string): string;
|
|
3620
3647
|
onSelect(item: RuleListItem): void;
|
|
3621
3648
|
onDelete(item: RuleListItem, event: MouseEvent): void;
|
|
3649
|
+
onDuplicate(item: RuleListItem, event: MouseEvent): void;
|
|
3622
3650
|
onKeySelect(item: RuleListItem, event: Event): void;
|
|
3623
3651
|
onAddRule(): void;
|
|
3624
|
-
|
|
3625
|
-
|
|
3652
|
+
onAiRequest(): void;
|
|
3653
|
+
private getNode;
|
|
3654
|
+
private getItemId;
|
|
3655
|
+
private getTargetTypeLabel;
|
|
3656
|
+
private describeProperty;
|
|
3657
|
+
private stripTargetPrefix;
|
|
3658
|
+
private parseTimestamp;
|
|
3659
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RuleListComponent, [{ optional: true; }]>;
|
|
3660
|
+
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>;
|
|
3626
3661
|
}
|
|
3627
3662
|
|
|
3628
3663
|
export { ArrayFieldAnalyzer, CollectionValidatorEditorComponent, ConditionalValidatorEditorComponent, ConditionalValidatorType, ConfigurationError, ContextError, ContextManagementService, ConversionError, ConverterFactoryService, DslError, DslLinterComponent, DslViewerComponent, ErrorCategory, ErrorHandler, ErrorSeverity, ExportDialogComponent, ExportIntegrationService, FIELD_TYPE_OPERATORS, FieldConditionEditorComponent, FieldSchemaService, FieldType, InternalError, JsonViewerComponent, MetadataEditorComponent, OPERATOR_LABELS, PraxisVisualBuilder, RegistryError, RoundTripTesterComponent, RoundTripValidatorService, RuleBuilderService, RuleCanvasComponent, RuleConversionService, RuleEditorComponent, RuleListComponent, RuleNodeComponent, RuleNodeRegistryService, RuleNodeType, RuleTemplateService, RuleValidationService, SpecificationBridgeService, TemplateEditorDialogComponent, TemplateGalleryComponent, TemplatePreviewDialogComponent, ValidationError as VBValidationError, ValidationCategory, ValidationSeverity, VisualBuilderError, VisualRuleBuilderComponent, WebhookIntegrationService, createError, getArrayItemFieldPaths, globalErrorHandler, isArrayFieldSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/visual-builder",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.10",
|
|
4
4
|
"description": "Visual rule and expression builder for Praxis UI with mini-DSL support, validation and context variables.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^20.0.0",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"@angular/cdk": "^20.0.0",
|
|
9
9
|
"@angular/material": "^20.0.0",
|
|
10
10
|
"@angular/forms": "^20.0.0",
|
|
11
|
-
"@praxisui/specification-core": "^3.0.0-beta.
|
|
12
|
-
"@praxisui/specification": "^3.0.0-beta.
|
|
13
|
-
"@praxisui/settings-panel": "^3.0.0-beta.
|
|
11
|
+
"@praxisui/specification-core": "^3.0.0-beta.10",
|
|
12
|
+
"@praxisui/specification": "^3.0.0-beta.10",
|
|
13
|
+
"@praxisui/settings-panel": "^3.0.0-beta.10"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"tslib": "^2.3.0",
|