@praxisui/visual-builder 4.0.0-beta.0 → 6.0.0-beta.0
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 +42 -609
- package/fesm2022/praxisui-visual-builder.mjs +15811 -21744
- package/index.d.ts +85 -840
- package/package.json +5 -8
package/index.d.ts
CHANGED
|
@@ -1,30 +1,49 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, OnInit, OnDestroy, OnChanges, AfterViewInit, ElementRef, ChangeDetectorRef, SimpleChanges } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { SpecificationMetadata, Specification } from '@praxisui/specification-core';
|
|
5
|
-
export { SpecificationMetadata } from '@praxisui/specification-core';
|
|
3
|
+
import { JsonLogicExpression, FormLayoutRule, RulePropertySchema, PraxisI18nService } from '@praxisui/core';
|
|
6
4
|
import { Observable } from 'rxjs';
|
|
7
|
-
import { FormLayoutRule, RulePropertySchema, PraxisI18nService } from '@praxisui/core';
|
|
8
|
-
import { DslParsingConfig, DslParsingResult, DslParsingService, AiResponseValidatorService, AiRuleResponse } from '@praxisui/ai';
|
|
9
5
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
10
6
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
7
|
+
import { AiResponseValidatorService, AiRuleResponse } from '@praxisui/ai';
|
|
11
8
|
import { FormBuilder, FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
12
9
|
import { MatSelectChange } from '@angular/material/select';
|
|
13
10
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
14
11
|
import { MatButtonToggleChange } from '@angular/material/button-toggle';
|
|
15
|
-
import { MatSlideToggleChange } from '@angular/material/slide-toggle';
|
|
16
12
|
import { MatChipInputEvent } from '@angular/material/chips';
|
|
17
13
|
|
|
18
14
|
/**
|
|
19
15
|
* Models for the Visual Rule Builder
|
|
20
16
|
*/
|
|
21
17
|
|
|
18
|
+
interface RuleContextProvider {
|
|
19
|
+
hasValue(path: string): boolean;
|
|
20
|
+
getValue<T = unknown>(path: string): T | undefined;
|
|
21
|
+
}
|
|
22
|
+
type RuleFunctionRegistry<T = unknown> = Record<string, T>;
|
|
23
|
+
interface DocumentationLink {
|
|
24
|
+
title?: string;
|
|
25
|
+
url?: string;
|
|
26
|
+
}
|
|
27
|
+
interface SpecificationMetadata {
|
|
28
|
+
code?: string;
|
|
29
|
+
message?: string;
|
|
30
|
+
tag?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
priority?: string;
|
|
33
|
+
uiConfig?: Record<string, unknown>;
|
|
34
|
+
customProperties?: Record<string, unknown>;
|
|
35
|
+
conditionExpression?: JsonLogicExpression | null;
|
|
36
|
+
fallbackMetadata?: SpecificationMetadata;
|
|
37
|
+
internalNotes?: string;
|
|
38
|
+
documentationLinks?: DocumentationLink[];
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
}
|
|
22
41
|
/**
|
|
23
42
|
* Value types for rule configuration
|
|
24
43
|
*/
|
|
25
44
|
type ValueType = 'literal' | 'field' | 'context' | 'function';
|
|
26
45
|
/**
|
|
27
|
-
* Valid comparison operators
|
|
46
|
+
* Valid comparison operators supported by the visual builder
|
|
28
47
|
*/
|
|
29
48
|
type ValidComparisonOperator = 'eq' | 'neq' | 'lt' | 'lte' | 'gt' | 'gte' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'notIn' | 'matches' | 'notMatches' | 'isNull' | 'isNotNull' | 'isEmpty' | 'isNotEmpty';
|
|
30
49
|
interface RuleNode {
|
|
@@ -80,12 +99,12 @@ declare enum RuleNodeType {
|
|
|
80
99
|
* String literal type for rule node types (for flexibility)
|
|
81
100
|
*/
|
|
82
101
|
type RuleNodeTypeString = 'fieldCondition' | 'propertyRule' | 'andGroup' | 'orGroup' | 'notGroup' | 'xorGroup' | 'impliesGroup' | 'requiredIf' | 'visibleIf' | 'disabledIf' | 'readonlyIf' | 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength' | 'ifDefined' | 'ifNotNull' | 'ifExists' | 'withDefault' | 'functionCall' | 'fieldToField' | 'contextual' | 'atLeast' | 'exactly' | 'expression' | 'contextualTemplate' | 'custom';
|
|
83
|
-
type RuleNodeConfig = FieldConditionConfig | PropertyRuleConfig | BooleanGroupConfig | ConditionalValidatorConfig | CollectionValidationConfig | CollectionValidatorConfig | OptionalFieldConfig | FunctionCallConfig | FieldToFieldConfig | ContextualConfig
|
|
102
|
+
type RuleNodeConfig = FieldConditionConfig | PropertyRuleConfig | BooleanGroupConfig | ConditionalValidatorConfig | CollectionValidationConfig | CollectionValidatorConfig | OptionalFieldConfig | FunctionCallConfig | FieldToFieldConfig | ContextualConfig | CardinalityConfig | ExpressionConfig | ContextualTemplateConfig | CustomConfig;
|
|
84
103
|
interface FieldConditionConfig {
|
|
85
104
|
type: 'fieldCondition';
|
|
86
105
|
/** Primary field name */
|
|
87
106
|
fieldName: string;
|
|
88
|
-
/** Comparison operator
|
|
107
|
+
/** Comparison operator supported by the visual builder */
|
|
89
108
|
operator: ValidComparisonOperator | string;
|
|
90
109
|
/** Comparison value */
|
|
91
110
|
value?: unknown;
|
|
@@ -109,8 +128,8 @@ interface PropertyRuleConfig {
|
|
|
109
128
|
properties?: Record<string, any>;
|
|
110
129
|
/** Properties applied when condition is false */
|
|
111
130
|
propertiesWhenFalse?: Record<string, any>;
|
|
112
|
-
/** Optional condition node or inline
|
|
113
|
-
condition?: RuleNode |
|
|
131
|
+
/** Optional condition node or inline condition expression */
|
|
132
|
+
condition?: RuleNode | JsonLogicExpression | null;
|
|
114
133
|
/** Optional reference to a condition node inside the graph */
|
|
115
134
|
conditionNodeId?: string;
|
|
116
135
|
/** Metadata for UI/description */
|
|
@@ -169,7 +188,7 @@ interface ConditionalValidatorConfig {
|
|
|
169
188
|
readonlyStyle?: string;
|
|
170
189
|
/** Show readonly indicator */
|
|
171
190
|
showReadonlyIndicator?: boolean;
|
|
172
|
-
/**
|
|
191
|
+
/** Optional metadata for validation messages and UI hints */
|
|
173
192
|
metadata?: SpecificationMetadata;
|
|
174
193
|
}
|
|
175
194
|
interface CollectionValidationConfig {
|
|
@@ -189,7 +208,6 @@ interface CollectionValidationConfig {
|
|
|
189
208
|
}
|
|
190
209
|
/**
|
|
191
210
|
* Enhanced collection validator configuration (Phase 2 Implementation)
|
|
192
|
-
* Aligned with @praxisui/specification collection validation patterns
|
|
193
211
|
*/
|
|
194
212
|
interface CollectionValidatorConfig {
|
|
195
213
|
type: 'forEach' | 'uniqueBy' | 'minLength' | 'maxLength';
|
|
@@ -282,14 +300,14 @@ interface FieldToFieldConfig {
|
|
|
282
300
|
/** Optional metadata for validation */
|
|
283
301
|
metadata?: SpecificationMetadata;
|
|
284
302
|
}
|
|
285
|
-
interface ContextualConfig
|
|
303
|
+
interface ContextualConfig {
|
|
286
304
|
type: 'contextual';
|
|
287
305
|
/** Template string with context placeholders */
|
|
288
306
|
template: string;
|
|
289
307
|
/** Available context variables */
|
|
290
308
|
contextVariables: Record<string, unknown>;
|
|
291
309
|
/** Optional context provider for dynamic values */
|
|
292
|
-
contextProvider?:
|
|
310
|
+
contextProvider?: RuleContextProvider;
|
|
293
311
|
/** Strict validation of context tokens */
|
|
294
312
|
strictContextValidation?: boolean;
|
|
295
313
|
/** Optional metadata */
|
|
@@ -350,14 +368,12 @@ interface RuleBuilderState {
|
|
|
350
368
|
rootNodes: string[];
|
|
351
369
|
/** Currently selected node ID */
|
|
352
370
|
selectedNodeId?: string;
|
|
353
|
-
/** Current DSL representation */
|
|
354
|
-
currentDSL?: string;
|
|
355
371
|
/** Current JSON representation */
|
|
356
372
|
currentJSON?: unknown;
|
|
357
373
|
/** Validation errors */
|
|
358
374
|
validationErrors: ValidationError$1[];
|
|
359
375
|
/** Build mode */
|
|
360
|
-
mode: 'visual' | '
|
|
376
|
+
mode: 'visual' | 'json';
|
|
361
377
|
/** Whether the rule is dirty (has unsaved changes) */
|
|
362
378
|
isDirty: boolean;
|
|
363
379
|
/** Undo/redo history */
|
|
@@ -389,10 +405,9 @@ interface RuleBuilderSnapshot {
|
|
|
389
405
|
nodes: Record<string, RuleNode>;
|
|
390
406
|
rootNodes: string[];
|
|
391
407
|
selectedNodeId?: string;
|
|
392
|
-
currentDSL?: string;
|
|
393
408
|
currentJSON?: any;
|
|
394
409
|
validationErrors?: ValidationError$1[];
|
|
395
|
-
mode?: 'visual' | '
|
|
410
|
+
mode?: 'visual' | 'json';
|
|
396
411
|
isDirty?: boolean;
|
|
397
412
|
};
|
|
398
413
|
}
|
|
@@ -461,15 +476,11 @@ interface TemplateMetadata {
|
|
|
461
476
|
*/
|
|
462
477
|
interface ExportOptions {
|
|
463
478
|
/** Export format */
|
|
464
|
-
format: 'json' | '
|
|
479
|
+
format: 'json' | 'typescript' | 'form-config';
|
|
465
480
|
/** Include metadata in export */
|
|
466
481
|
includeMetadata?: boolean;
|
|
467
|
-
/** Pretty print JSON
|
|
482
|
+
/** Pretty print JSON */
|
|
468
483
|
prettyPrint?: boolean;
|
|
469
|
-
/** Include comments in DSL */
|
|
470
|
-
includeComments?: boolean;
|
|
471
|
-
/** Metadata position in DSL */
|
|
472
|
-
metadataPosition?: 'before' | 'after' | 'inline';
|
|
473
484
|
/** TypeScript interface name (for TS export) */
|
|
474
485
|
interfaceName?: string;
|
|
475
486
|
/** Additional export configuration */
|
|
@@ -480,7 +491,7 @@ interface ExportOptions {
|
|
|
480
491
|
*/
|
|
481
492
|
interface ImportOptions {
|
|
482
493
|
/** Source format */
|
|
483
|
-
format: 'json' | '
|
|
494
|
+
format: 'json' | 'form-config';
|
|
484
495
|
/** Whether to merge with existing rules */
|
|
485
496
|
merge?: boolean;
|
|
486
497
|
/** Whether to preserve existing metadata */
|
|
@@ -529,8 +540,6 @@ interface RuleBuilderConfig {
|
|
|
529
540
|
showAdvanced?: boolean;
|
|
530
541
|
/** Enable drag and drop */
|
|
531
542
|
enableDragDrop?: boolean;
|
|
532
|
-
/** Show DSL preview */
|
|
533
|
-
showDSLPreview?: boolean;
|
|
534
543
|
/** Show validation errors inline */
|
|
535
544
|
showInlineErrors?: boolean;
|
|
536
545
|
/** Auto-save interval (ms) */
|
|
@@ -548,7 +557,7 @@ interface RuleBuilderConfig {
|
|
|
548
557
|
/** Export/import configuration */
|
|
549
558
|
exportImport?: {
|
|
550
559
|
/** Default export format */
|
|
551
|
-
defaultExportFormat?: 'json' | '
|
|
560
|
+
defaultExportFormat?: 'json' | 'typescript';
|
|
552
561
|
/** Supported formats */
|
|
553
562
|
supportedFormats?: string[];
|
|
554
563
|
/** Include metadata by default */
|
|
@@ -572,27 +581,27 @@ interface OptionalFieldConfig {
|
|
|
572
581
|
metadata?: SpecificationMetadata;
|
|
573
582
|
}
|
|
574
583
|
/**
|
|
575
|
-
* Configuration for expression
|
|
584
|
+
* Configuration for legacy expression authoring support
|
|
576
585
|
*/
|
|
577
586
|
interface ExpressionConfig {
|
|
578
587
|
type: 'expression';
|
|
579
|
-
/**
|
|
588
|
+
/** Legacy textual expression string */
|
|
580
589
|
expression: string;
|
|
581
590
|
/** Function registry for validation */
|
|
582
|
-
functionRegistry?:
|
|
591
|
+
functionRegistry?: RuleFunctionRegistry<unknown>;
|
|
583
592
|
/** Context provider for variable resolution */
|
|
584
|
-
contextProvider?:
|
|
593
|
+
contextProvider?: RuleContextProvider;
|
|
585
594
|
/** Known field names for validation */
|
|
586
595
|
knownFields?: string[];
|
|
587
596
|
/** Enable performance warnings */
|
|
588
597
|
enablePerformanceWarnings?: boolean;
|
|
589
598
|
/** Maximum expression complexity */
|
|
590
599
|
maxComplexity?: number;
|
|
591
|
-
/**
|
|
600
|
+
/** Optional metadata for UI/description */
|
|
592
601
|
metadata?: SpecificationMetadata;
|
|
593
602
|
}
|
|
594
603
|
/**
|
|
595
|
-
* Configuration for contextual template
|
|
604
|
+
* Configuration for contextual template authoring
|
|
596
605
|
*/
|
|
597
606
|
interface ContextualTemplateConfig {
|
|
598
607
|
type: 'contextualTemplate';
|
|
@@ -601,10 +610,10 @@ interface ContextualTemplateConfig {
|
|
|
601
610
|
/** Available context variables */
|
|
602
611
|
contextVariables?: Record<string, unknown>;
|
|
603
612
|
/** Context provider instance */
|
|
604
|
-
contextProvider?:
|
|
613
|
+
contextProvider?: RuleContextProvider;
|
|
605
614
|
/** Enable strict validation of context tokens */
|
|
606
615
|
strictContextValidation?: boolean;
|
|
607
|
-
/**
|
|
616
|
+
/** Optional metadata for UI/description */
|
|
608
617
|
metadata?: SpecificationMetadata;
|
|
609
618
|
}
|
|
610
619
|
|
|
@@ -984,20 +993,6 @@ interface ValidationResult {
|
|
|
984
993
|
errors: string[];
|
|
985
994
|
}
|
|
986
995
|
|
|
987
|
-
type DslContextScope = 'user' | 'session' | 'env' | 'global' | string;
|
|
988
|
-
interface DslContextVariable {
|
|
989
|
-
/** Variable name */
|
|
990
|
-
name: string;
|
|
991
|
-
/** Variable type */
|
|
992
|
-
type: 'string' | 'number' | 'boolean' | 'date' | 'object' | 'array';
|
|
993
|
-
/** Variable scope */
|
|
994
|
-
scope: DslContextScope;
|
|
995
|
-
/** Description */
|
|
996
|
-
description?: string;
|
|
997
|
-
/** Example value */
|
|
998
|
-
example?: string;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
996
|
/**
|
|
1002
997
|
* Registry service for managing RuleNode instances and their relationships.
|
|
1003
998
|
* Solves the core problem of resolving string IDs to actual RuleNode objects.
|
|
@@ -1187,479 +1182,18 @@ interface CleanupResult {
|
|
|
1187
1182
|
memoryFreed: number;
|
|
1188
1183
|
}
|
|
1189
1184
|
|
|
1190
|
-
/**
|
|
1191
|
-
* Context interface for rule conversion operations
|
|
1192
|
-
* Eliminates circular dependencies between converters and factory
|
|
1193
|
-
*/
|
|
1194
|
-
interface ConversionContext {
|
|
1195
|
-
/**
|
|
1196
|
-
* Convert a child node to a specification
|
|
1197
|
-
* This method is provided by the factory to avoid circular dependencies
|
|
1198
|
-
*/
|
|
1199
|
-
convertChild<T extends object = any>(node: RuleNode): Specification<T>;
|
|
1200
|
-
/**
|
|
1201
|
-
* Convert multiple child nodes to specifications
|
|
1202
|
-
*/
|
|
1203
|
-
convertChildren<T extends object = any>(nodes: RuleNode[]): Specification<T>[];
|
|
1204
|
-
/**
|
|
1205
|
-
* Check if a node type is supported
|
|
1206
|
-
*/
|
|
1207
|
-
isSupported(nodeType: string): boolean;
|
|
1208
|
-
/**
|
|
1209
|
-
* Validate that a node can be converted
|
|
1210
|
-
*/
|
|
1211
|
-
validateNode(node: RuleNode): {
|
|
1212
|
-
isValid: boolean;
|
|
1213
|
-
errors: string[];
|
|
1214
|
-
};
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
/**
|
|
1218
|
-
* Interface for rule converters that transform RuleNodes to Specifications
|
|
1219
|
-
*/
|
|
1220
|
-
interface RuleConverter {
|
|
1221
|
-
/**
|
|
1222
|
-
* Convert a RuleNode to a Specification
|
|
1223
|
-
* @param node The node to convert
|
|
1224
|
-
* @param context Context providing access to child conversion capabilities
|
|
1225
|
-
*/
|
|
1226
|
-
convert<T extends object = any>(node: RuleNode, context?: ConversionContext): Specification<T>;
|
|
1227
|
-
/**
|
|
1228
|
-
* Check if this converter can handle the given node type
|
|
1229
|
-
*/
|
|
1230
|
-
canConvert(nodeType: string): boolean;
|
|
1231
|
-
/**
|
|
1232
|
-
* Get the supported node types
|
|
1233
|
-
*/
|
|
1234
|
-
getSupportedTypes(): string[];
|
|
1235
|
-
/**
|
|
1236
|
-
* Set the conversion context (called by factory during initialization)
|
|
1237
|
-
*/
|
|
1238
|
-
setContext?(context: ConversionContext): void;
|
|
1239
|
-
}
|
|
1240
|
-
/**
|
|
1241
|
-
* Base abstract class for rule converters
|
|
1242
|
-
*/
|
|
1243
|
-
declare abstract class BaseRuleConverter implements RuleConverter {
|
|
1244
|
-
protected abstract supportedTypes: string[];
|
|
1245
|
-
protected context?: ConversionContext;
|
|
1246
|
-
abstract convert<T extends object = any>(node: RuleNode, context?: ConversionContext): Specification<T>;
|
|
1247
|
-
/**
|
|
1248
|
-
* Set the conversion context
|
|
1249
|
-
*/
|
|
1250
|
-
setContext(context: ConversionContext): void;
|
|
1251
|
-
canConvert(nodeType: string): boolean;
|
|
1252
|
-
getSupportedTypes(): string[];
|
|
1253
|
-
protected validateNode(node: RuleNode, expectedType?: string): void;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
/**
|
|
1257
|
-
* Converter for field condition rules to field specifications
|
|
1258
|
-
*/
|
|
1259
|
-
declare class FieldConditionConverter extends BaseRuleConverter {
|
|
1260
|
-
protected supportedTypes: string[];
|
|
1261
|
-
convert<T extends object>(node: RuleNode, context?: ConversionContext): Specification<T>;
|
|
1262
|
-
private mapOperator;
|
|
1263
|
-
private convertValue;
|
|
1264
|
-
private inferAndConvertValue;
|
|
1265
|
-
private operatorRequiresValue;
|
|
1266
|
-
private defaultValueForOperator;
|
|
1267
|
-
private getImpliedValue;
|
|
1268
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConditionConverter, never>;
|
|
1269
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<FieldConditionConverter>;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
/**
|
|
1273
|
-
* Converter for boolean group rules (AND, OR, NOT, XOR, IMPLIES)
|
|
1274
|
-
*/
|
|
1275
|
-
declare class BooleanGroupConverter extends BaseRuleConverter {
|
|
1276
|
-
private nodeRegistry;
|
|
1277
|
-
protected supportedTypes: string[];
|
|
1278
|
-
constructor(nodeRegistry: RuleNodeRegistryService);
|
|
1279
|
-
convert<T extends object>(node: RuleNode, context?: ConversionContext): Specification<T>;
|
|
1280
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BooleanGroupConverter, never>;
|
|
1281
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BooleanGroupConverter>;
|
|
1282
|
-
}
|
|
1283
|
-
|
|
1284
|
-
/**
|
|
1285
|
-
* Converter for cardinality rules (atLeast, exactly)
|
|
1286
|
-
*/
|
|
1287
|
-
declare class CardinalityConverter extends BaseRuleConverter {
|
|
1288
|
-
private nodeRegistry;
|
|
1289
|
-
protected supportedTypes: string[];
|
|
1290
|
-
constructor(nodeRegistry: RuleNodeRegistryService);
|
|
1291
|
-
convert<T extends object>(node: RuleNode, context?: ConversionContext): Specification<T>;
|
|
1292
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CardinalityConverter, never>;
|
|
1293
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CardinalityConverter>;
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
|
-
/**
|
|
1297
|
-
* Factory service for converting RuleNodes to Specifications
|
|
1298
|
-
* Uses Strategy pattern to delegate to appropriate converters
|
|
1299
|
-
*/
|
|
1300
|
-
declare class ConverterFactoryService {
|
|
1301
|
-
private fieldConditionConverter;
|
|
1302
|
-
private booleanGroupConverter;
|
|
1303
|
-
private cardinalityConverter;
|
|
1304
|
-
private converters;
|
|
1305
|
-
private context;
|
|
1306
|
-
constructor(fieldConditionConverter: FieldConditionConverter, booleanGroupConverter: BooleanGroupConverter, cardinalityConverter: CardinalityConverter);
|
|
1307
|
-
/**
|
|
1308
|
-
* Convert a RuleNode to a Specification
|
|
1309
|
-
*/
|
|
1310
|
-
convert<T extends object = any>(node: RuleNode): Specification<T>;
|
|
1311
|
-
/**
|
|
1312
|
-
* Get converter for a specific node type
|
|
1313
|
-
*/
|
|
1314
|
-
getConverter(nodeType: string): RuleConverter | undefined;
|
|
1315
|
-
/**
|
|
1316
|
-
* Register a new converter
|
|
1317
|
-
*/
|
|
1318
|
-
registerConverter(name: string, converter: RuleConverter): void;
|
|
1319
|
-
/**
|
|
1320
|
-
* Unregister a converter
|
|
1321
|
-
*/
|
|
1322
|
-
unregisterConverter(name: string): boolean;
|
|
1323
|
-
/**
|
|
1324
|
-
* Get all supported node types
|
|
1325
|
-
*/
|
|
1326
|
-
getSupportedTypes(): string[];
|
|
1327
|
-
/**
|
|
1328
|
-
* Check if a node type is supported
|
|
1329
|
-
*/
|
|
1330
|
-
isSupported(nodeType: string): boolean;
|
|
1331
|
-
private initializeContext;
|
|
1332
|
-
/**
|
|
1333
|
-
* Internal convert method that bypasses context to avoid recursion
|
|
1334
|
-
*/
|
|
1335
|
-
private convertInternal;
|
|
1336
|
-
private initializeConverters;
|
|
1337
|
-
/**
|
|
1338
|
-
* Convert multiple nodes to specifications
|
|
1339
|
-
*/
|
|
1340
|
-
convertMultiple<T extends object = any>(nodes: RuleNode[]): Specification<T>[];
|
|
1341
|
-
/**
|
|
1342
|
-
* Validate that a node can be converted
|
|
1343
|
-
*/
|
|
1344
|
-
validateNode(node: RuleNode): {
|
|
1345
|
-
isValid: boolean;
|
|
1346
|
-
errors: string[];
|
|
1347
|
-
};
|
|
1348
|
-
/**
|
|
1349
|
-
* Get statistics about converter usage
|
|
1350
|
-
*/
|
|
1351
|
-
getStatistics(): ConverterStatistics;
|
|
1352
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ConverterFactoryService, never>;
|
|
1353
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ConverterFactoryService>;
|
|
1354
|
-
}
|
|
1355
|
-
/**
|
|
1356
|
-
* Statistics about the converter factory
|
|
1357
|
-
*/
|
|
1358
|
-
interface ConverterStatistics {
|
|
1359
|
-
converterCount: number;
|
|
1360
|
-
supportedTypeCount: number;
|
|
1361
|
-
supportedTypes: string[];
|
|
1362
|
-
converterNames: string[];
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
/**
|
|
1366
|
-
* Configuration for contextual specification support
|
|
1367
|
-
*/
|
|
1368
|
-
interface SpecificationContextualConfig {
|
|
1369
|
-
/** Context variables available for token resolution */
|
|
1370
|
-
contextVariables?: DslContextVariable[];
|
|
1371
|
-
/** Context provider instance */
|
|
1372
|
-
contextProvider?: ContextProvider;
|
|
1373
|
-
/** Enable strict validation of context tokens */
|
|
1374
|
-
strictContextValidation?: boolean;
|
|
1375
|
-
}
|
|
1376
|
-
declare class SpecificationBridgeService {
|
|
1377
|
-
private nodeRegistry;
|
|
1378
|
-
private converterFactory;
|
|
1379
|
-
private dslExporter;
|
|
1380
|
-
private dslParser;
|
|
1381
|
-
private dslValidator;
|
|
1382
|
-
private contextProvider?;
|
|
1383
|
-
constructor(nodeRegistry: RuleNodeRegistryService, converterFactory: ConverterFactoryService);
|
|
1384
|
-
/**
|
|
1385
|
-
* Converts a RuleNode tree to a Specification instance
|
|
1386
|
-
*/
|
|
1387
|
-
ruleNodeToSpecification<T extends object = any>(node: RuleNode): Specification<T>;
|
|
1388
|
-
private registerSubtree;
|
|
1389
|
-
/**
|
|
1390
|
-
* Converts a Specification instance to a RuleNode tree
|
|
1391
|
-
*/
|
|
1392
|
-
specificationToRuleNode<T extends object = any>(spec: Specification<T>): RuleNode;
|
|
1393
|
-
/**
|
|
1394
|
-
* Exports a RuleNode tree to DSL format
|
|
1395
|
-
*/
|
|
1396
|
-
exportToDsl<T extends object = any>(node: RuleNode, options?: Partial<ExportOptions$1>): string;
|
|
1397
|
-
/**
|
|
1398
|
-
* Exports a RuleNode tree to DSL format with metadata
|
|
1399
|
-
*/
|
|
1400
|
-
exportToDslWithMetadata<T extends object = any>(node: RuleNode): string;
|
|
1401
|
-
/**
|
|
1402
|
-
* Validates that a RuleNode can be successfully round-tripped
|
|
1403
|
-
*/
|
|
1404
|
-
validateRoundTrip<T extends object = any>(node: RuleNode): {
|
|
1405
|
-
success: boolean;
|
|
1406
|
-
errors: string[];
|
|
1407
|
-
warnings: string[];
|
|
1408
|
-
};
|
|
1409
|
-
/**
|
|
1410
|
-
* Performs deep validation between original and reconstructed nodes
|
|
1411
|
-
*/
|
|
1412
|
-
private deepValidateRoundTrip;
|
|
1413
|
-
/**
|
|
1414
|
-
* Compares two configuration objects
|
|
1415
|
-
*/
|
|
1416
|
-
private compareConfigs;
|
|
1417
|
-
/**
|
|
1418
|
-
* Validates DSL round-trip conversion
|
|
1419
|
-
*/
|
|
1420
|
-
private validateDslRoundTrip;
|
|
1421
|
-
/**
|
|
1422
|
-
* Parses a DSL expression string into a Specification
|
|
1423
|
-
*/
|
|
1424
|
-
parseDslExpression<T extends object = any>(expression: string, config?: DslParsingConfig): DslParsingResult<T>;
|
|
1425
|
-
/**
|
|
1426
|
-
* Creates a ContextualSpecification with token resolution
|
|
1427
|
-
*/
|
|
1428
|
-
createContextualSpecification<T extends object = any>(template: string, config?: SpecificationContextualConfig): ContextualSpecification<T>;
|
|
1429
|
-
/**
|
|
1430
|
-
* Resolves context tokens in a template using provided variables
|
|
1431
|
-
*/
|
|
1432
|
-
resolveContextTokens(template: string, contextVariables: DslContextVariable[]): string;
|
|
1433
|
-
/**
|
|
1434
|
-
* Extracts all context tokens from a template
|
|
1435
|
-
*/
|
|
1436
|
-
extractContextTokens(template: string): string[];
|
|
1437
|
-
/**
|
|
1438
|
-
* Validates that all context tokens in a template have corresponding variables
|
|
1439
|
-
*/
|
|
1440
|
-
validateContextTokens(template: string, contextVariables: DslContextVariable[]): ValidationIssue$1[];
|
|
1441
|
-
/**
|
|
1442
|
-
* Converts a DSL expression to a ContextualSpecification
|
|
1443
|
-
*/
|
|
1444
|
-
dslToContextualSpecification<T extends object = any>(dslExpression: string, config?: SpecificationContextualConfig): ContextualSpecification<T>;
|
|
1445
|
-
/**
|
|
1446
|
-
* Converts a ContextualSpecification back to DSL template
|
|
1447
|
-
*/
|
|
1448
|
-
contextualSpecificationToDsl<T extends object = any>(spec: ContextualSpecification<T>): string;
|
|
1449
|
-
/**
|
|
1450
|
-
* Performs round-trip validation for expression specifications
|
|
1451
|
-
*/
|
|
1452
|
-
validateExpressionRoundTrip<T extends object = any>(originalExpression: string, config?: DslParsingConfig): {
|
|
1453
|
-
success: boolean;
|
|
1454
|
-
errors: string[];
|
|
1455
|
-
warnings: string[];
|
|
1456
|
-
reconstructedExpression?: string;
|
|
1457
|
-
};
|
|
1458
|
-
/**
|
|
1459
|
-
* Updates the context provider for contextual specifications
|
|
1460
|
-
*/
|
|
1461
|
-
updateContextProvider(contextProvider: ContextProvider): void;
|
|
1462
|
-
/**
|
|
1463
|
-
* Gets the current context provider
|
|
1464
|
-
*/
|
|
1465
|
-
getContextProvider(): ContextProvider | undefined;
|
|
1466
|
-
/**
|
|
1467
|
-
* Gets expected DSL keywords for a given node type
|
|
1468
|
-
*/
|
|
1469
|
-
private getExpectedDslKeywords;
|
|
1470
|
-
private createFieldSpecification;
|
|
1471
|
-
private createBooleanGroupSpecification;
|
|
1472
|
-
private createFunctionSpecification;
|
|
1473
|
-
private createFieldToFieldSpecification;
|
|
1474
|
-
private createCardinalitySpecification;
|
|
1475
|
-
/**
|
|
1476
|
-
* Creates conditional validator specifications (Phase 1 implementation)
|
|
1477
|
-
*/
|
|
1478
|
-
private createConditionalValidatorSpecification;
|
|
1479
|
-
/**
|
|
1480
|
-
* Creates collection validator specifications (Phase 2 implementation)
|
|
1481
|
-
*/
|
|
1482
|
-
private createCollectionValidatorSpecification;
|
|
1483
|
-
/**
|
|
1484
|
-
* Creates expression specification from DSL (Phase 4 implementation)
|
|
1485
|
-
*/
|
|
1486
|
-
private createExpressionSpecification;
|
|
1487
|
-
/**
|
|
1488
|
-
* Creates contextual specification (Phase 4 implementation)
|
|
1489
|
-
*/
|
|
1490
|
-
private createContextualSpecificationFromNode;
|
|
1491
|
-
private convertToComparisonOperator;
|
|
1492
|
-
private convertValue;
|
|
1493
|
-
private comparisonExpectsValue;
|
|
1494
|
-
private defaultValueForOperator;
|
|
1495
|
-
private getImpliedValueForOperator;
|
|
1496
|
-
private jsonToRuleNode;
|
|
1497
|
-
private mapSpecificationTypeToNodeType;
|
|
1498
|
-
private mapComparisonOperator;
|
|
1499
|
-
private inferValueType;
|
|
1500
|
-
private generateNodeId;
|
|
1501
|
-
private generateNodeLabel;
|
|
1502
|
-
/**
|
|
1503
|
-
* Creates a context provider from context variables
|
|
1504
|
-
*/
|
|
1505
|
-
private createContextProviderFromVariables;
|
|
1506
|
-
/**
|
|
1507
|
-
* Calculates complexity of a DSL expression
|
|
1508
|
-
*/
|
|
1509
|
-
private calculateComplexity;
|
|
1510
|
-
/**
|
|
1511
|
-
* Finds the position of a token in a template
|
|
1512
|
-
*/
|
|
1513
|
-
private findTokenPosition;
|
|
1514
|
-
/**
|
|
1515
|
-
* Suggests similar variable names using Levenshtein distance
|
|
1516
|
-
*/
|
|
1517
|
-
private suggestSimilarVariable;
|
|
1518
|
-
/**
|
|
1519
|
-
* Calculates Levenshtein distance between two strings
|
|
1520
|
-
*/
|
|
1521
|
-
private levenshteinDistance;
|
|
1522
|
-
/**
|
|
1523
|
-
* Parses a value expression. Phase 1 shim: accepts strings starting with '=' or { expr } objects.
|
|
1524
|
-
* Returns success when the shape is acceptable; full DSL parsing will be integrated in Phase 2.
|
|
1525
|
-
*/
|
|
1526
|
-
parseDslExpressionValue(expression: string | {
|
|
1527
|
-
expr: string;
|
|
1528
|
-
} | null | undefined, _config?: DslParsingConfig): {
|
|
1529
|
-
success: boolean;
|
|
1530
|
-
issues: string[];
|
|
1531
|
-
};
|
|
1532
|
-
/**
|
|
1533
|
-
* Evaluates a value expression with a row context. Phase 1 shim: executes simple '=' expressions in a sandboxed Function.
|
|
1534
|
-
* In Phase 2, this will use the real DSL evaluator from @praxisui/specification.
|
|
1535
|
-
*/
|
|
1536
|
-
evaluateValue(expression: string | {
|
|
1537
|
-
expr: string;
|
|
1538
|
-
}, ctx: {
|
|
1539
|
-
row: any;
|
|
1540
|
-
}): any;
|
|
1541
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SpecificationBridgeService, never>;
|
|
1542
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<SpecificationBridgeService>;
|
|
1543
|
-
}
|
|
1544
|
-
|
|
1545
|
-
interface RoundTripValidationResult {
|
|
1546
|
-
success: boolean;
|
|
1547
|
-
errors: ValidationError$1[];
|
|
1548
|
-
warnings: ValidationError$1[];
|
|
1549
|
-
stages: {
|
|
1550
|
-
visualToSpecification: {
|
|
1551
|
-
success: boolean;
|
|
1552
|
-
error?: string;
|
|
1553
|
-
};
|
|
1554
|
-
specificationToDsl: {
|
|
1555
|
-
success: boolean;
|
|
1556
|
-
error?: string;
|
|
1557
|
-
dsl?: string;
|
|
1558
|
-
};
|
|
1559
|
-
dslToSpecification: {
|
|
1560
|
-
success: boolean;
|
|
1561
|
-
error?: string;
|
|
1562
|
-
};
|
|
1563
|
-
specificationToVisual: {
|
|
1564
|
-
success: boolean;
|
|
1565
|
-
error?: string;
|
|
1566
|
-
};
|
|
1567
|
-
};
|
|
1568
|
-
dataIntegrity: {
|
|
1569
|
-
nodeCountMatch: boolean;
|
|
1570
|
-
structureMatch: boolean;
|
|
1571
|
-
metadataPreserved: boolean;
|
|
1572
|
-
logicPreserved: boolean;
|
|
1573
|
-
};
|
|
1574
|
-
performance: {
|
|
1575
|
-
totalTime: number;
|
|
1576
|
-
stageTimings: Record<string, number>;
|
|
1577
|
-
};
|
|
1578
|
-
}
|
|
1579
|
-
interface RoundTripTestCase {
|
|
1580
|
-
id: string;
|
|
1581
|
-
name: string;
|
|
1582
|
-
description: string;
|
|
1583
|
-
visualRule: RuleNode;
|
|
1584
|
-
expectedDsl?: string;
|
|
1585
|
-
expectedValidation?: {
|
|
1586
|
-
shouldSucceed: boolean;
|
|
1587
|
-
expectedErrors?: string[];
|
|
1588
|
-
expectedWarnings?: string[];
|
|
1589
|
-
};
|
|
1590
|
-
relatedNodes?: RuleNode[];
|
|
1591
|
-
}
|
|
1592
|
-
declare class RoundTripValidatorService {
|
|
1593
|
-
private specificationBridge;
|
|
1594
|
-
private nodeRegistry;
|
|
1595
|
-
private dslParser;
|
|
1596
|
-
constructor(specificationBridge: SpecificationBridgeService, nodeRegistry: RuleNodeRegistryService);
|
|
1597
|
-
/**
|
|
1598
|
-
* Validates complete round-trip conversion: Visual → DSL → Visual
|
|
1599
|
-
*/
|
|
1600
|
-
validateRoundTrip(visualRule: RuleNode, relatedNodes?: RuleNode[]): RoundTripValidationResult;
|
|
1601
|
-
/**
|
|
1602
|
-
* Validates data integrity between original and reconstructed visual rules
|
|
1603
|
-
*/
|
|
1604
|
-
private validateDataIntegrity;
|
|
1605
|
-
/**
|
|
1606
|
-
* Validates that the logical structure is preserved
|
|
1607
|
-
*/
|
|
1608
|
-
private validateStructureMatch;
|
|
1609
|
-
/**
|
|
1610
|
-
* Validates that metadata is preserved through the round-trip
|
|
1611
|
-
*/
|
|
1612
|
-
private validateMetadataPreservation;
|
|
1613
|
-
/**
|
|
1614
|
-
* Validates that the logical meaning is preserved
|
|
1615
|
-
*/
|
|
1616
|
-
private validateLogicPreservation;
|
|
1617
|
-
/**
|
|
1618
|
-
* Counts total number of nodes in a rule tree
|
|
1619
|
-
*/
|
|
1620
|
-
private countNodes;
|
|
1621
|
-
/**
|
|
1622
|
-
* Runs a comprehensive test suite for round-trip validation
|
|
1623
|
-
*/
|
|
1624
|
-
runTestSuite(testCases: RoundTripTestCase[]): {
|
|
1625
|
-
totalTests: number;
|
|
1626
|
-
passed: number;
|
|
1627
|
-
failed: number;
|
|
1628
|
-
results: Array<{
|
|
1629
|
-
testCase: RoundTripTestCase;
|
|
1630
|
-
result: RoundTripValidationResult;
|
|
1631
|
-
}>;
|
|
1632
|
-
};
|
|
1633
|
-
/**
|
|
1634
|
-
* Validates test expectations against results
|
|
1635
|
-
*/
|
|
1636
|
-
private validateExpectations;
|
|
1637
|
-
/**
|
|
1638
|
-
* Creates default test cases for common rule patterns
|
|
1639
|
-
*/
|
|
1640
|
-
createDefaultTestCases(): RoundTripTestCase[];
|
|
1641
|
-
private generateErrorId;
|
|
1642
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RoundTripValidatorService, never>;
|
|
1643
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<RoundTripValidatorService>;
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
1185
|
declare class RuleBuilderService {
|
|
1647
|
-
private specificationBridge;
|
|
1648
|
-
private roundTripValidator;
|
|
1649
1186
|
private nodeRegistry;
|
|
1650
1187
|
private readonly _state;
|
|
1651
1188
|
private readonly _validationErrors;
|
|
1652
1189
|
private readonly _nodeSelected;
|
|
1653
1190
|
private readonly _stateChanged;
|
|
1654
1191
|
private config;
|
|
1655
|
-
private dslExporter;
|
|
1656
|
-
private dslValidator;
|
|
1657
|
-
private dslParser;
|
|
1658
1192
|
readonly state$: Observable<RuleBuilderState>;
|
|
1659
1193
|
readonly validationErrors$: Observable<ValidationError$1[]>;
|
|
1660
1194
|
readonly nodeSelected$: Observable<string>;
|
|
1661
1195
|
readonly stateChanged$: Observable<void>;
|
|
1662
|
-
constructor(
|
|
1196
|
+
constructor(nodeRegistry: RuleNodeRegistryService);
|
|
1663
1197
|
/**
|
|
1664
1198
|
* Initialize the rule builder with configuration
|
|
1665
1199
|
*/
|
|
@@ -1716,37 +1250,28 @@ declare class RuleBuilderService {
|
|
|
1716
1250
|
* Export rules to JSON payload
|
|
1717
1251
|
*/
|
|
1718
1252
|
export(options: ExportOptions): string;
|
|
1719
|
-
|
|
1720
|
-
* Convert current builder state to Specification (best-effort)
|
|
1721
|
-
*/
|
|
1722
|
-
toSpecification(): Specification<any> | null;
|
|
1253
|
+
toSpecification(): null;
|
|
1723
1254
|
private updateState;
|
|
1724
1255
|
/**
|
|
1725
1256
|
* Validate current rules (lightweight placeholder)
|
|
1726
1257
|
*/
|
|
1727
1258
|
validateRules(): void;
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
*/
|
|
1731
|
-
loadFromParsedDsl(nodes: Record<string, RuleNode>, rootNodes: string[], description?: string): void;
|
|
1732
|
-
/**
|
|
1733
|
-
* Update builder state with a parsed DSL graph while preserving history.
|
|
1734
|
-
*/
|
|
1735
|
-
updateFromParsedDsl(nodes: Record<string, RuleNode>, rootNodes: string[], description?: string): void;
|
|
1259
|
+
loadFromConditionExpression(condition: JsonLogicExpression, description?: string): void;
|
|
1260
|
+
buildConditionExpressionFromGraph(nodes: Record<string, RuleNode>, rootNodes: string[]): JsonLogicExpression | null;
|
|
1736
1261
|
private saveSnapshot;
|
|
1737
1262
|
private generateNodeLabel;
|
|
1738
1263
|
private withRuleTimestamps;
|
|
1739
1264
|
private isPropertyRuleNode;
|
|
1740
1265
|
private containsPropertyRule;
|
|
1741
1266
|
/**
|
|
1742
|
-
*
|
|
1743
|
-
* focando em
|
|
1267
|
+
* Constrói um array de FormLayoutRule a partir do estado atual do builder,
|
|
1268
|
+
* focando em nós propertyRule ou nós com propriedades/targets definidos.
|
|
1744
1269
|
*/
|
|
1745
1270
|
private exportFormRulesFromState;
|
|
1746
1271
|
private toFormLayoutRule;
|
|
1747
1272
|
private normalizeTargets;
|
|
1748
|
-
private
|
|
1749
|
-
private
|
|
1273
|
+
private buildJsonLogicFromCondition;
|
|
1274
|
+
private buildJsonLogicFromState;
|
|
1750
1275
|
private applyBuilderState;
|
|
1751
1276
|
private extractFormRules;
|
|
1752
1277
|
private isFormRuleCandidate;
|
|
@@ -1756,8 +1281,18 @@ declare class RuleBuilderService {
|
|
|
1756
1281
|
private sanitizeStructuredValue;
|
|
1757
1282
|
private formRulesToBuilderState;
|
|
1758
1283
|
private inferRuleTypeFromFormRule;
|
|
1759
|
-
private
|
|
1284
|
+
private parseConditionExpression;
|
|
1285
|
+
private normalizeJsonLogicCondition;
|
|
1286
|
+
private parseJsonLogicCondition;
|
|
1287
|
+
private parseJsonLogicChild;
|
|
1760
1288
|
private normalizeOperator;
|
|
1289
|
+
private builderOperatorToJsonLogicOperator;
|
|
1290
|
+
private jsonLogicOperatorToBuilderOperator;
|
|
1291
|
+
private normalizeConditionValue;
|
|
1292
|
+
private isJsonLogicExpressionCandidate;
|
|
1293
|
+
private isVarExpression;
|
|
1294
|
+
private extractVarPath;
|
|
1295
|
+
private flattenConditionNodes;
|
|
1761
1296
|
private prefixTarget;
|
|
1762
1297
|
private buildRuleNodeTree;
|
|
1763
1298
|
private flattenRuleNodeTree;
|
|
@@ -1827,10 +1362,9 @@ interface ExternalSystemConfig {
|
|
|
1827
1362
|
}
|
|
1828
1363
|
declare class ExportIntegrationService {
|
|
1829
1364
|
private ruleBuilderService;
|
|
1830
|
-
private specificationBridge;
|
|
1831
1365
|
private readonly SUPPORTED_FORMATS;
|
|
1832
1366
|
private externalSystems;
|
|
1833
|
-
constructor(ruleBuilderService: RuleBuilderService
|
|
1367
|
+
constructor(ruleBuilderService: RuleBuilderService);
|
|
1834
1368
|
/**
|
|
1835
1369
|
* Gets all supported export formats
|
|
1836
1370
|
*/
|
|
@@ -1906,7 +1440,6 @@ declare class ExportIntegrationService {
|
|
|
1906
1440
|
private generateContent;
|
|
1907
1441
|
private generateJson;
|
|
1908
1442
|
private generateJsonSchema;
|
|
1909
|
-
private generateDsl;
|
|
1910
1443
|
private generateYaml;
|
|
1911
1444
|
private generateXml;
|
|
1912
1445
|
private generateTypeScript;
|
|
@@ -2131,7 +1664,6 @@ interface TemplateStats {
|
|
|
2131
1664
|
popularTags: string[];
|
|
2132
1665
|
}
|
|
2133
1666
|
declare class RuleTemplateService {
|
|
2134
|
-
private bridgeService;
|
|
2135
1667
|
private readonly STORAGE_KEY;
|
|
2136
1668
|
private readonly VERSION_KEY;
|
|
2137
1669
|
private readonly CURRENT_VERSION;
|
|
@@ -2141,7 +1673,7 @@ declare class RuleTemplateService {
|
|
|
2141
1673
|
templates$: Observable<RuleTemplate[]>;
|
|
2142
1674
|
categories$: Observable<TemplateCategory[]>;
|
|
2143
1675
|
recentlyUsed$: Observable<RuleTemplate[]>;
|
|
2144
|
-
constructor(
|
|
1676
|
+
constructor();
|
|
2145
1677
|
/**
|
|
2146
1678
|
* Get all templates
|
|
2147
1679
|
*/
|
|
@@ -2359,17 +1891,6 @@ interface ContextEntry {
|
|
|
2359
1891
|
/** Optional type hint for validation */
|
|
2360
1892
|
type?: string;
|
|
2361
1893
|
}
|
|
2362
|
-
/**
|
|
2363
|
-
* Configuration for contextual specification support
|
|
2364
|
-
*/
|
|
2365
|
-
interface ContextualConfig {
|
|
2366
|
-
/** Context variables available for token resolution */
|
|
2367
|
-
contextVariables?: ContextEntry[];
|
|
2368
|
-
/** Context provider instance */
|
|
2369
|
-
contextProvider?: ContextProvider;
|
|
2370
|
-
/** Enable strict validation of context tokens */
|
|
2371
|
-
strictContextValidation?: boolean;
|
|
2372
|
-
}
|
|
2373
1894
|
/**
|
|
2374
1895
|
* Context variable value with metadata
|
|
2375
1896
|
*/
|
|
@@ -2398,7 +1919,7 @@ interface ContextScope {
|
|
|
2398
1919
|
}
|
|
2399
1920
|
/**
|
|
2400
1921
|
* Dedicated service for context management and variable resolution
|
|
2401
|
-
* Extracted from
|
|
1922
|
+
* Extracted from the old bridge-oriented implementation to follow SRP
|
|
2402
1923
|
*/
|
|
2403
1924
|
declare class ContextManagementService {
|
|
2404
1925
|
private scopes;
|
|
@@ -2407,7 +1928,7 @@ declare class ContextManagementService {
|
|
|
2407
1928
|
/**
|
|
2408
1929
|
* Create a context provider from context variables
|
|
2409
1930
|
*/
|
|
2410
|
-
createContextProvider(contextVariables: ContextEntry[]):
|
|
1931
|
+
createContextProvider(contextVariables: ContextEntry[]): RuleContextProvider;
|
|
2411
1932
|
/**
|
|
2412
1933
|
* Create a new context scope
|
|
2413
1934
|
*/
|
|
@@ -2434,11 +1955,11 @@ declare class ContextManagementService {
|
|
|
2434
1955
|
/**
|
|
2435
1956
|
* Create a scoped context provider
|
|
2436
1957
|
*/
|
|
2437
|
-
createScopedProvider(scopeId: string):
|
|
1958
|
+
createScopedProvider(scopeId: string): RuleContextProvider;
|
|
2438
1959
|
/**
|
|
2439
1960
|
* Merge multiple context providers
|
|
2440
1961
|
*/
|
|
2441
|
-
mergeProviders(...providers:
|
|
1962
|
+
mergeProviders(...providers: RuleContextProvider[]): RuleContextProvider;
|
|
2442
1963
|
/**
|
|
2443
1964
|
* Get context statistics
|
|
2444
1965
|
*/
|
|
@@ -2462,69 +1983,6 @@ declare class ContextManagementService {
|
|
|
2462
1983
|
static ɵprov: i0.ɵɵInjectableDeclaration<ContextManagementService>;
|
|
2463
1984
|
}
|
|
2464
1985
|
|
|
2465
|
-
/**
|
|
2466
|
-
* Simplified service for core rule conversion operations
|
|
2467
|
-
* Replaces the God Service anti-pattern from SpecificationBridgeService
|
|
2468
|
-
* Focuses only on conversion between RuleNodes and Specifications
|
|
2469
|
-
*/
|
|
2470
|
-
declare class RuleConversionService {
|
|
2471
|
-
private converterFactory;
|
|
2472
|
-
private dslParsingService;
|
|
2473
|
-
private contextManagementService;
|
|
2474
|
-
private dslExporter;
|
|
2475
|
-
constructor(converterFactory: ConverterFactoryService, dslParsingService: DslParsingService, contextManagementService: ContextManagementService);
|
|
2476
|
-
/**
|
|
2477
|
-
* Convert a RuleNode tree to a Specification instance
|
|
2478
|
-
* Core conversion functionality with clean error handling
|
|
2479
|
-
*/
|
|
2480
|
-
convertRuleToSpecification<T extends object = any>(node: RuleNode): Specification<T>;
|
|
2481
|
-
/**
|
|
2482
|
-
* Convert a Specification back to a RuleNode tree
|
|
2483
|
-
* Simplified reverse conversion
|
|
2484
|
-
*/
|
|
2485
|
-
convertSpecificationToRule<T extends object = any>(spec: Specification<T>): RuleNode;
|
|
2486
|
-
/**
|
|
2487
|
-
* Export a RuleNode tree to DSL format
|
|
2488
|
-
*/
|
|
2489
|
-
exportRuleToDsl<T extends object = any>(node: RuleNode, options?: Partial<ExportOptions$1>): string;
|
|
2490
|
-
/**
|
|
2491
|
-
* Import a RuleNode tree from DSL format
|
|
2492
|
-
*/
|
|
2493
|
-
importRuleFromDsl<T extends object = any>(dslExpression: string, config?: DslParsingConfig): DslParsingResult<T>;
|
|
2494
|
-
/**
|
|
2495
|
-
* Create a contextual specification from a RuleNode
|
|
2496
|
-
*/
|
|
2497
|
-
createContextualSpecification<T extends object = any>(node: RuleNode, contextConfig: ContextualConfig): Specification<T>;
|
|
2498
|
-
/**
|
|
2499
|
-
* Validate that a rule can be converted
|
|
2500
|
-
*/
|
|
2501
|
-
validateConversion(node: RuleNode): ConversionValidationResult;
|
|
2502
|
-
/**
|
|
2503
|
-
* Get conversion statistics
|
|
2504
|
-
*/
|
|
2505
|
-
getConversionStatistics(): ConversionStatistics;
|
|
2506
|
-
private jsonToRuleNode;
|
|
2507
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RuleConversionService, never>;
|
|
2508
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<RuleConversionService>;
|
|
2509
|
-
}
|
|
2510
|
-
/**
|
|
2511
|
-
* Result of conversion validation
|
|
2512
|
-
*/
|
|
2513
|
-
interface ConversionValidationResult {
|
|
2514
|
-
isValid: boolean;
|
|
2515
|
-
errors: string[];
|
|
2516
|
-
warnings: string[];
|
|
2517
|
-
}
|
|
2518
|
-
/**
|
|
2519
|
-
* Statistics about conversion capabilities
|
|
2520
|
-
*/
|
|
2521
|
-
interface ConversionStatistics {
|
|
2522
|
-
supportedNodeTypes: number;
|
|
2523
|
-
registeredConverters: number;
|
|
2524
|
-
availableNodeTypes: string[];
|
|
2525
|
-
converterNames: string[];
|
|
2526
|
-
}
|
|
2527
|
-
|
|
2528
1986
|
/**
|
|
2529
1987
|
* Typed error system for Visual Builder operations
|
|
2530
1988
|
* Provides structured error handling with codes, categories, and context
|
|
@@ -2536,7 +1994,7 @@ declare enum ErrorCategory {
|
|
|
2536
1994
|
VALIDATION = "validation",
|
|
2537
1995
|
CONVERSION = "conversion",
|
|
2538
1996
|
REGISTRY = "registry",
|
|
2539
|
-
|
|
1997
|
+
EXPRESSION = "expression",
|
|
2540
1998
|
CONTEXT = "context",
|
|
2541
1999
|
CONFIGURATION = "configuration",
|
|
2542
2000
|
NETWORK = "network",
|
|
@@ -2599,16 +2057,16 @@ declare class RegistryError extends VisualBuilderError {
|
|
|
2599
2057
|
constructor(operation: string, message: string, nodeId?: string | undefined, context?: Record<string, any>);
|
|
2600
2058
|
}
|
|
2601
2059
|
/**
|
|
2602
|
-
*
|
|
2060
|
+
* Expression parsing and processing errors
|
|
2603
2061
|
*/
|
|
2604
|
-
declare class
|
|
2062
|
+
declare class ExpressionError extends VisualBuilderError {
|
|
2605
2063
|
readonly expression?: string | undefined;
|
|
2606
2064
|
readonly position?: {
|
|
2607
2065
|
start: number;
|
|
2608
2066
|
end: number;
|
|
2609
2067
|
} | undefined;
|
|
2610
2068
|
readonly code: string;
|
|
2611
|
-
readonly category = ErrorCategory.
|
|
2069
|
+
readonly category = ErrorCategory.EXPRESSION;
|
|
2612
2070
|
readonly severity = ErrorSeverity.HIGH;
|
|
2613
2071
|
constructor(type: 'PARSING' | 'VALIDATION' | 'EXPORT' | 'IMPORT', message: string, expression?: string | undefined, position?: {
|
|
2614
2072
|
start: number;
|
|
@@ -2715,7 +2173,7 @@ declare const createError: {
|
|
|
2715
2173
|
validation: (message: string, nodeId?: string, rules?: string[]) => ValidationError;
|
|
2716
2174
|
conversion: (code: string, message: string, nodeId?: string) => ConversionError;
|
|
2717
2175
|
registry: (operation: string, message: string, nodeId?: string) => RegistryError;
|
|
2718
|
-
|
|
2176
|
+
expression: (type: "PARSING" | "VALIDATION" | "EXPORT" | "IMPORT", message: string, expression?: string) => ExpressionError;
|
|
2719
2177
|
context: (operation: string, message: string, scopeId?: string, variablePath?: string) => ContextError;
|
|
2720
2178
|
configuration: (message: string, configPath?: string, expectedType?: string) => ConfigurationError;
|
|
2721
2179
|
internal: (message: string, cause?: Error) => InternalError;
|
|
@@ -2727,7 +2185,7 @@ type RuleNodeConfigExtended = RuleNodeConfig & {
|
|
|
2727
2185
|
properties?: Record<string, any>;
|
|
2728
2186
|
propertiesWhenFalse?: Record<string, any>;
|
|
2729
2187
|
targets?: string[];
|
|
2730
|
-
condition?: RuleNode |
|
|
2188
|
+
condition?: RuleNode | JsonLogicExpression | null;
|
|
2731
2189
|
};
|
|
2732
2190
|
declare class RuleEditorComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {
|
|
2733
2191
|
private readonly ruleBuilderService;
|
|
@@ -3134,77 +2592,13 @@ declare class MetadataEditorComponent implements OnInit, OnChanges {
|
|
|
3134
2592
|
removeCustomProperty(index: number): void;
|
|
3135
2593
|
addDocumentationLink(): void;
|
|
3136
2594
|
removeDocumentationLink(index: number): void;
|
|
2595
|
+
private stringifyJsonEditorValue;
|
|
2596
|
+
private parseJsonEditorObject;
|
|
2597
|
+
private static readonly invalidJsonEditorValue;
|
|
3137
2598
|
static ɵfac: i0.ɵɵFactoryDeclaration<MetadataEditorComponent, never>;
|
|
3138
2599
|
static ɵcmp: i0.ɵɵComponentDeclaration<MetadataEditorComponent, "praxis-metadata-editor", never, { "selectedNode": { "alias": "selectedNode"; "required": false; }; }, { "metadataUpdated": "metadataUpdated"; }, never, never, true, never>;
|
|
3139
2600
|
}
|
|
3140
2601
|
|
|
3141
|
-
declare class DslViewerComponent implements OnInit, OnChanges, AfterViewInit {
|
|
3142
|
-
private snackBar;
|
|
3143
|
-
dsl: string;
|
|
3144
|
-
editable: boolean;
|
|
3145
|
-
language: string;
|
|
3146
|
-
theme: string;
|
|
3147
|
-
dslChanged: EventEmitter<string>;
|
|
3148
|
-
validationChanged: EventEmitter<{
|
|
3149
|
-
valid: boolean;
|
|
3150
|
-
errors: any[];
|
|
3151
|
-
warnings: any[];
|
|
3152
|
-
}>;
|
|
3153
|
-
editorTextarea?: ElementRef<HTMLTextAreaElement>;
|
|
3154
|
-
syntaxOverlay?: ElementRef<HTMLDivElement>;
|
|
3155
|
-
private originalDsl;
|
|
3156
|
-
private parser;
|
|
3157
|
-
private validator;
|
|
3158
|
-
hasChanges: boolean;
|
|
3159
|
-
showErrors: boolean;
|
|
3160
|
-
syntaxErrors: any[];
|
|
3161
|
-
warnings: any[];
|
|
3162
|
-
cursorPosition: {
|
|
3163
|
-
line: number;
|
|
3164
|
-
column: number;
|
|
3165
|
-
} | null;
|
|
3166
|
-
currentDsl: string;
|
|
3167
|
-
showLineNumbers: boolean;
|
|
3168
|
-
wordWrap: boolean;
|
|
3169
|
-
showMinimap: boolean;
|
|
3170
|
-
highlightedDsl: string;
|
|
3171
|
-
constructor(snackBar: MatSnackBar);
|
|
3172
|
-
ngOnInit(): void;
|
|
3173
|
-
ngAfterViewInit(): void;
|
|
3174
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
3175
|
-
ngOnDestroy(): void;
|
|
3176
|
-
get themeClass(): string;
|
|
3177
|
-
private setEditorValue;
|
|
3178
|
-
getEditorValue(): string;
|
|
3179
|
-
onEditorInput(event: Event): void;
|
|
3180
|
-
private updateEditorOptions;
|
|
3181
|
-
syncScroll(): void;
|
|
3182
|
-
updateCursorPosition(): void;
|
|
3183
|
-
private validateSyntaxDebounced;
|
|
3184
|
-
private debounce;
|
|
3185
|
-
getValidationStatusClass(): string;
|
|
3186
|
-
getValidationIcon(): string;
|
|
3187
|
-
getValidationText(): string;
|
|
3188
|
-
getEditorInfo(): string;
|
|
3189
|
-
formatCode(): void;
|
|
3190
|
-
validateSyntax(): void;
|
|
3191
|
-
applyChanges(): void;
|
|
3192
|
-
discardChanges(): void;
|
|
3193
|
-
copyToClipboard(): void;
|
|
3194
|
-
downloadDsl(): void;
|
|
3195
|
-
toggleLineNumbers(): void;
|
|
3196
|
-
toggleWordWrap(): void;
|
|
3197
|
-
toggleMinimap(): void;
|
|
3198
|
-
showErrorDetails(): void;
|
|
3199
|
-
hideErrorDetails(): void;
|
|
3200
|
-
goToError(error: any): void;
|
|
3201
|
-
private formatDslCode;
|
|
3202
|
-
private validateDslSyntax;
|
|
3203
|
-
private updateSyntaxHighlighting;
|
|
3204
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DslViewerComponent, never>;
|
|
3205
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DslViewerComponent, "praxis-dsl-viewer", never, { "dsl": { "alias": "dsl"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; "language": { "alias": "language"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; }, { "dslChanged": "dslChanged"; "validationChanged": "validationChanged"; }, never, never, true, never>;
|
|
3206
|
-
}
|
|
3207
|
-
|
|
3208
2602
|
declare class JsonViewerComponent implements OnInit, OnChanges {
|
|
3209
2603
|
private snackBar;
|
|
3210
2604
|
json: any;
|
|
@@ -3239,40 +2633,6 @@ declare class JsonViewerComponent implements OnInit, OnChanges {
|
|
|
3239
2633
|
static ɵcmp: i0.ɵɵComponentDeclaration<JsonViewerComponent, "praxis-json-viewer", never, { "json": { "alias": "json"; "required": false; }; "editable": { "alias": "editable"; "required": false; }; }, { "jsonChanged": "jsonChanged"; }, never, never, true, never>;
|
|
3240
2634
|
}
|
|
3241
2635
|
|
|
3242
|
-
declare class RoundTripTesterComponent implements OnInit {
|
|
3243
|
-
private roundTripValidator;
|
|
3244
|
-
private ruleBuilderService;
|
|
3245
|
-
private snackBar;
|
|
3246
|
-
private cdr;
|
|
3247
|
-
private nodeRegistry;
|
|
3248
|
-
isRunning: boolean;
|
|
3249
|
-
showTestCases: boolean;
|
|
3250
|
-
lastTestResult: RoundTripValidationResult | null;
|
|
3251
|
-
testSuiteResults: any;
|
|
3252
|
-
defaultTestCases: RoundTripTestCase[];
|
|
3253
|
-
hasCurrentRule: boolean;
|
|
3254
|
-
constructor(roundTripValidator: RoundTripValidatorService, ruleBuilderService: RuleBuilderService, snackBar: MatSnackBar, cdr: ChangeDetectorRef, nodeRegistry: RuleNodeRegistryService);
|
|
3255
|
-
ngOnInit(): void;
|
|
3256
|
-
private loadDefaultTestCases;
|
|
3257
|
-
private checkCurrentRule;
|
|
3258
|
-
runCurrentRuleTest(): void;
|
|
3259
|
-
runTestSuite(): void;
|
|
3260
|
-
clearResults(): void;
|
|
3261
|
-
private buildCompleteRuleTree;
|
|
3262
|
-
getCurrentRuleType(): string;
|
|
3263
|
-
getCurrentRuleLabel(): string;
|
|
3264
|
-
getTestCaseColor(testCase: RoundTripTestCase): 'primary' | 'accent' | 'warn';
|
|
3265
|
-
getResultSummary(): string;
|
|
3266
|
-
getStatusClass(result: RoundTripValidationResult): string;
|
|
3267
|
-
getStatusIcon(result: RoundTripValidationResult): string;
|
|
3268
|
-
getStages(result: RoundTripValidationResult): any[];
|
|
3269
|
-
getIntegrityChecks(result: RoundTripValidationResult): any[];
|
|
3270
|
-
getSuccessRate(): number;
|
|
3271
|
-
getSuccessRateClass(): string;
|
|
3272
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<RoundTripTesterComponent, never>;
|
|
3273
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RoundTripTesterComponent, "praxis-round-trip-tester", never, {}, {}, never, never, true, never>;
|
|
3274
|
-
}
|
|
3275
|
-
|
|
3276
2636
|
interface ExportDialogData {
|
|
3277
2637
|
title?: string;
|
|
3278
2638
|
allowMultipleFormats?: boolean;
|
|
@@ -3329,121 +2689,6 @@ declare class ExportDialogComponent implements OnInit {
|
|
|
3329
2689
|
static ɵcmp: i0.ɵɵComponentDeclaration<ExportDialogComponent, "praxis-export-dialog", never, {}, {}, never, never, true, never>;
|
|
3330
2690
|
}
|
|
3331
2691
|
|
|
3332
|
-
interface DslLintError {
|
|
3333
|
-
id: string;
|
|
3334
|
-
line: number;
|
|
3335
|
-
column: number;
|
|
3336
|
-
length: number;
|
|
3337
|
-
severity: 'error' | 'warning' | 'info' | 'hint';
|
|
3338
|
-
code: string;
|
|
3339
|
-
message: string;
|
|
3340
|
-
suggestion?: string;
|
|
3341
|
-
quickFix?: DslQuickFix;
|
|
3342
|
-
category: 'syntax' | 'semantic' | 'style' | 'performance' | 'best-practice';
|
|
3343
|
-
tags?: string[];
|
|
3344
|
-
}
|
|
3345
|
-
interface DslQuickFix {
|
|
3346
|
-
title: string;
|
|
3347
|
-
description: string;
|
|
3348
|
-
edits: DslEdit[];
|
|
3349
|
-
}
|
|
3350
|
-
interface DslEdit {
|
|
3351
|
-
range: {
|
|
3352
|
-
startLine: number;
|
|
3353
|
-
startColumn: number;
|
|
3354
|
-
endLine: number;
|
|
3355
|
-
endColumn: number;
|
|
3356
|
-
};
|
|
3357
|
-
newText: string;
|
|
3358
|
-
}
|
|
3359
|
-
interface DslLintStats {
|
|
3360
|
-
totalErrors: number;
|
|
3361
|
-
totalWarnings: number;
|
|
3362
|
-
totalInfos: number;
|
|
3363
|
-
totalHints: number;
|
|
3364
|
-
complexity: number;
|
|
3365
|
-
maintainabilityIndex: number;
|
|
3366
|
-
lastLintTime: Date;
|
|
3367
|
-
lintDuration: number;
|
|
3368
|
-
}
|
|
3369
|
-
interface DslLintRule {
|
|
3370
|
-
id: string;
|
|
3371
|
-
name: string;
|
|
3372
|
-
description: string;
|
|
3373
|
-
category: string;
|
|
3374
|
-
severity: 'error' | 'warning' | 'info' | 'hint';
|
|
3375
|
-
enabled: boolean;
|
|
3376
|
-
configurable: boolean;
|
|
3377
|
-
config?: any;
|
|
3378
|
-
}
|
|
3379
|
-
declare class DslLinterComponent implements OnInit, OnDestroy {
|
|
3380
|
-
private ruleBuilderService;
|
|
3381
|
-
private specificationBridge;
|
|
3382
|
-
private cdr;
|
|
3383
|
-
dsl: string;
|
|
3384
|
-
autoLint: boolean;
|
|
3385
|
-
lintDelay: number;
|
|
3386
|
-
errorSelected: EventEmitter<DslLintError>;
|
|
3387
|
-
quickFixApplied: EventEmitter<{
|
|
3388
|
-
error: DslLintError;
|
|
3389
|
-
fix: DslQuickFix;
|
|
3390
|
-
}>;
|
|
3391
|
-
ruleToggled: EventEmitter<{
|
|
3392
|
-
rule: DslLintRule;
|
|
3393
|
-
enabled: boolean;
|
|
3394
|
-
}>;
|
|
3395
|
-
private destroy$;
|
|
3396
|
-
private lintSubject;
|
|
3397
|
-
isLinting: boolean;
|
|
3398
|
-
activeTabIndex: number;
|
|
3399
|
-
allErrors: DslLintError[];
|
|
3400
|
-
filteredErrors: DslLintError[];
|
|
3401
|
-
selectedSeverities: string[];
|
|
3402
|
-
selectedCategories: string[];
|
|
3403
|
-
stats: DslLintStats;
|
|
3404
|
-
lintRules: DslLintRule[];
|
|
3405
|
-
constructor(ruleBuilderService: RuleBuilderService, specificationBridge: SpecificationBridgeService, cdr: ChangeDetectorRef);
|
|
3406
|
-
ngOnInit(): void;
|
|
3407
|
-
ngOnDestroy(): void;
|
|
3408
|
-
private setupSubscriptions;
|
|
3409
|
-
private initializeLinting;
|
|
3410
|
-
private triggerLinting;
|
|
3411
|
-
runLinting(): void;
|
|
3412
|
-
private performLinting;
|
|
3413
|
-
private analyzeDsl;
|
|
3414
|
-
private checkSyntaxRules;
|
|
3415
|
-
private checkSemanticRules;
|
|
3416
|
-
private checkStyleRules;
|
|
3417
|
-
private checkPerformanceRules;
|
|
3418
|
-
private checkBestPracticeRules;
|
|
3419
|
-
private isRuleEnabled;
|
|
3420
|
-
private getRuleConfig;
|
|
3421
|
-
private updateStats;
|
|
3422
|
-
private calculateComplexity;
|
|
3423
|
-
private calculateMaintainabilityIndex;
|
|
3424
|
-
toggleAutoLint(): void;
|
|
3425
|
-
onSeverityFilterChange(event: MatSelectChange): void;
|
|
3426
|
-
onCategoryFilterChange(event: MatSelectChange): void;
|
|
3427
|
-
private applyFilters;
|
|
3428
|
-
trackByErrorId(index: number, error: DslLintError): string;
|
|
3429
|
-
getSeverityIcon(severity: string): string;
|
|
3430
|
-
translateSeverity(severity: string): string;
|
|
3431
|
-
translateCategory(category: string): string;
|
|
3432
|
-
getComplexityClass(complexity: number): string;
|
|
3433
|
-
getMaintainabilityClass(maintainability: number): string;
|
|
3434
|
-
getIssueDistribution(): any[];
|
|
3435
|
-
getMostCommonIssues(): any[];
|
|
3436
|
-
getRuleCategories(): any[];
|
|
3437
|
-
navigateToError(error: DslLintError): void;
|
|
3438
|
-
applyQuickFix(error: DslLintError): void;
|
|
3439
|
-
ignoreError(error: DslLintError): void;
|
|
3440
|
-
toggleRule(rule: DslLintRule, change: MatSlideToggleChange): void;
|
|
3441
|
-
configureRule(rule: DslLintRule): void;
|
|
3442
|
-
openLinterSettings(): void;
|
|
3443
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DslLinterComponent, never>;
|
|
3444
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DslLinterComponent, "praxis-dsl-linter", never, { "dsl": { "alias": "dsl"; "required": false; }; "autoLint": { "alias": "autoLint"; "required": false; }; "lintDelay": { "alias": "lintDelay"; "required": false; }; }, { "errorSelected": "errorSelected"; "quickFixApplied": "quickFixApplied"; "ruleToggled": "ruleToggled"; }, never, never, true, never>;
|
|
3445
|
-
}
|
|
3446
|
-
|
|
3447
2692
|
/**
|
|
3448
2693
|
* Placeholder Visual Rule Builder Component
|
|
3449
2694
|
*
|
|
@@ -3541,7 +2786,6 @@ declare class TemplateEditorDialogComponent implements OnInit {
|
|
|
3541
2786
|
data: TemplateEditorDialogData;
|
|
3542
2787
|
private fb;
|
|
3543
2788
|
private templateService;
|
|
3544
|
-
private bridgeService;
|
|
3545
2789
|
private snackBar;
|
|
3546
2790
|
basicInfoForm: FormGroup;
|
|
3547
2791
|
rulesForm: FormGroup;
|
|
@@ -3561,7 +2805,7 @@ declare class TemplateEditorDialogComponent implements OnInit {
|
|
|
3561
2805
|
previewNodes: RuleNode[];
|
|
3562
2806
|
detectedVariables: string[];
|
|
3563
2807
|
get nodeCount(): number;
|
|
3564
|
-
constructor(dialogRef: MatDialogRef<TemplateEditorDialogComponent>, data: TemplateEditorDialogData, fb: FormBuilder, templateService: RuleTemplateService,
|
|
2808
|
+
constructor(dialogRef: MatDialogRef<TemplateEditorDialogComponent>, data: TemplateEditorDialogData, fb: FormBuilder, templateService: RuleTemplateService, snackBar: MatSnackBar);
|
|
3565
2809
|
ngOnInit(): void;
|
|
3566
2810
|
private createBasicInfoForm;
|
|
3567
2811
|
private createRulesForm;
|
|
@@ -3641,6 +2885,7 @@ declare class RuleListComponent {
|
|
|
3641
2885
|
getPrimaryEffectLabel(item: RuleListItem): string;
|
|
3642
2886
|
getEffectDetail(item: RuleListItem): string;
|
|
3643
2887
|
getSummary(item: RuleListItem): string;
|
|
2888
|
+
private hasConfiguredCondition;
|
|
3644
2889
|
getRelativeTime(item: RuleListItem): string | null;
|
|
3645
2890
|
getTargetPreview(item: RuleListItem): string[];
|
|
3646
2891
|
t(key: string, fallback: string): string;
|
|
@@ -3660,5 +2905,5 @@ declare class RuleListComponent {
|
|
|
3660
2905
|
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>;
|
|
3661
2906
|
}
|
|
3662
2907
|
|
|
3663
|
-
export { ArrayFieldAnalyzer, CollectionValidatorEditorComponent, ConditionalValidatorEditorComponent, ConditionalValidatorType, ConfigurationError, ContextError, ContextManagementService, ConversionError,
|
|
3664
|
-
export type { ArrayCollectionValidationRule, ArrayFieldSchema, ArrayValidationContext, ArrayValidationError, BooleanGroupConfig, CardinalityConfig, CircularReference, CleanupResult, CollectionValidationConfig, CollectionValidatorConfig, ConditionalValidatorConfig, ConditionalValidatorPreview, ContextEntry, ContextScope, ContextValue, ContextVariable, ContextualConfig
|
|
2908
|
+
export { ArrayFieldAnalyzer, CollectionValidatorEditorComponent, ConditionalValidatorEditorComponent, ConditionalValidatorType, ConfigurationError, ContextError, ContextManagementService, ConversionError, ErrorCategory, ErrorHandler, ErrorSeverity, ExportDialogComponent, ExportIntegrationService, ExpressionError, FIELD_TYPE_OPERATORS, FieldConditionEditorComponent, FieldSchemaService, FieldType, InternalError, JsonViewerComponent, MetadataEditorComponent, OPERATOR_LABELS, PraxisVisualBuilder, RegistryError, RuleBuilderService, RuleCanvasComponent, RuleEditorComponent, RuleListComponent, RuleNodeComponent, RuleNodeRegistryService, RuleNodeType, RuleTemplateService, RuleValidationService, TemplateEditorDialogComponent, TemplateGalleryComponent, TemplatePreviewDialogComponent, ValidationError as VBValidationError, ValidationCategory, ValidationSeverity, VisualBuilderError, VisualRuleBuilderComponent, WebhookIntegrationService, createError, getArrayItemFieldPaths, globalErrorHandler, isArrayFieldSchema };
|
|
2909
|
+
export type { ArrayCollectionValidationRule, ArrayFieldSchema, ArrayValidationContext, ArrayValidationError, BooleanGroupConfig, CardinalityConfig, CircularReference, CleanupResult, CollectionValidationConfig, CollectionValidatorConfig, ConditionalValidatorConfig, ConditionalValidatorPreview, ContextEntry, ContextScope, ContextValue, ContextVariable, ContextualConfig, ContextualTemplateConfig, CustomConfig, CustomFunction, DocumentationLink, EnhancedFieldSchema, ErrorInfo, ErrorStatistics, ExportDialogData, ExportFormat, ExportOptions, ExportResult, ExpressionConfig, ExternalSystemConfig, FieldConditionConfig, FieldFormat, FieldOption, FieldSchema, FieldSchemaContext, FieldToFieldConfig, FieldUIConfig, FunctionCallConfig, FunctionParameter, ImportOptions, IntegrationEndpoint, IntegrationResult, MemoryStats, OptionalFieldConfig, PropertyRuleConfig, RegistryIntegrityResult, RegistryValidationResult, RuleBuilderConfig, RuleBuilderSnapshot, RuleBuilderState, RuleContextProvider, RuleFunctionRegistry, RuleNode, RuleNodeConfig, RuleNodeTree, RuleNodeTypeString, RuleTemplate, RuleValidationResult, SpecificationMetadata, TemplateApplicationResult, TemplateCategory, TemplateDisplayMode, TemplateEditorDialogData, TemplateEditorResult, TemplateMetadata, TemplatePreviewDialogData, TemplateSearchCriteria, TemplateSortOption, TemplateStats, TemplateValidationResult, ValidComparisonOperator, ValidationConfig, ValidationContext, ValidationError$1 as ValidationError, ValidationIssue, ValidationResult, ValidationRule, ValueType, WebhookConfig, WebhookDelivery, WebhookEvent, WebhookStats };
|