@praxisui/visual-builder 9.0.5-rc.9 → 9.0.6
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
CHANGED
|
@@ -135,6 +135,7 @@ Boundary rules:
|
|
|
135
135
|
- effects must be constrained by target property schemas and `RULE_PROPERTY_SCHEMA`
|
|
136
136
|
- `dsl.roundTrip.validate` validates the JSON export/import path currently implemented by `RuleBuilderService`; form-config import remains supported but is not advertised as a round-trip export target by this operation
|
|
137
137
|
- field-to-field comparisons are part of the supported visual subset; context-variable and function-result operands in field conditions remain planned until a canonical JSON Logic shape exists
|
|
138
|
+
- field operands wrapped by the canonical Praxis `coalesce` operator round-trip without semantic loss; the editor preserves that nullish-value transform while fields or operators are changed
|
|
138
139
|
- component-specific configuration belongs to child component manifests
|
|
139
140
|
|
|
140
141
|
## Legacy Note
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-19T23:21:15.260Z",
|
|
4
4
|
"packageName": "@praxisui/visual-builder",
|
|
5
|
-
"packageVersion": "9.0.
|
|
5
|
+
"packageVersion": "9.0.6",
|
|
6
6
|
"sourceRegistry": "praxis-component-registry-ingestion",
|
|
7
7
|
"sourceRegistryVersion": "1.0.0",
|
|
8
8
|
"componentCount": 1,
|
|
@@ -1545,7 +1545,10 @@ class RuleBuilderService {
|
|
|
1545
1545
|
return null;
|
|
1546
1546
|
}
|
|
1547
1547
|
return {
|
|
1548
|
-
[operator]: [
|
|
1548
|
+
[operator]: [
|
|
1549
|
+
this.buildFieldOperand(cfg.fieldName, cfg.fieldValueTransform),
|
|
1550
|
+
this.buildConditionRightOperand(cfg),
|
|
1551
|
+
],
|
|
1549
1552
|
};
|
|
1550
1553
|
}
|
|
1551
1554
|
if (node.type === RuleNodeType.AND_GROUP || node.type === RuleNodeType.OR_GROUP) {
|
|
@@ -1957,18 +1960,26 @@ class RuleBuilderService {
|
|
|
1957
1960
|
return undefined;
|
|
1958
1961
|
}
|
|
1959
1962
|
const [left, right] = normalizedArgs;
|
|
1960
|
-
|
|
1963
|
+
const leftOperand = this.parseFieldOperand(left);
|
|
1964
|
+
if (!leftOperand) {
|
|
1961
1965
|
return undefined;
|
|
1962
1966
|
}
|
|
1963
1967
|
const config = {
|
|
1964
1968
|
type: 'fieldCondition',
|
|
1965
|
-
fieldName:
|
|
1969
|
+
fieldName: leftOperand.path,
|
|
1966
1970
|
operator: builderOperator,
|
|
1967
1971
|
value: right,
|
|
1968
1972
|
};
|
|
1969
|
-
if (
|
|
1973
|
+
if (leftOperand.transform) {
|
|
1974
|
+
config['fieldValueTransform'] = leftOperand.transform;
|
|
1975
|
+
}
|
|
1976
|
+
const rightOperand = this.parseFieldOperand(right);
|
|
1977
|
+
if (rightOperand) {
|
|
1970
1978
|
config['valueType'] = 'field';
|
|
1971
|
-
config['compareToField'] =
|
|
1979
|
+
config['compareToField'] = rightOperand.path;
|
|
1980
|
+
if (rightOperand.transform) {
|
|
1981
|
+
config['compareToFieldValueTransform'] = rightOperand.transform;
|
|
1982
|
+
}
|
|
1972
1983
|
}
|
|
1973
1984
|
return {
|
|
1974
1985
|
id: v4(),
|
|
@@ -2091,10 +2102,34 @@ class RuleBuilderService {
|
|
|
2091
2102
|
if (cfg['valueType'] === 'field' &&
|
|
2092
2103
|
typeof cfg['compareToField'] === 'string' &&
|
|
2093
2104
|
cfg['compareToField'].trim()) {
|
|
2094
|
-
return
|
|
2105
|
+
return this.buildFieldOperand(cfg['compareToField'].trim(), cfg['compareToFieldValueTransform']);
|
|
2095
2106
|
}
|
|
2096
2107
|
return this.normalizeConditionValue(cfg['value']);
|
|
2097
2108
|
}
|
|
2109
|
+
buildFieldOperand(path, transform) {
|
|
2110
|
+
const variable = { var: path };
|
|
2111
|
+
return transform === 'coalesce' ? { coalesce: [variable] } : variable;
|
|
2112
|
+
}
|
|
2113
|
+
parseFieldOperand(value) {
|
|
2114
|
+
if (this.isVarExpression(value)) {
|
|
2115
|
+
return { path: this.extractVarPath(value.var) };
|
|
2116
|
+
}
|
|
2117
|
+
if (!value ||
|
|
2118
|
+
typeof value !== 'object' ||
|
|
2119
|
+
Array.isArray(value) ||
|
|
2120
|
+
!('coalesce' in value)) {
|
|
2121
|
+
return null;
|
|
2122
|
+
}
|
|
2123
|
+
const args = value.coalesce;
|
|
2124
|
+
const normalizedArgs = Array.isArray(args) ? args : [args];
|
|
2125
|
+
if (normalizedArgs.length !== 1 || !this.isVarExpression(normalizedArgs[0])) {
|
|
2126
|
+
return null;
|
|
2127
|
+
}
|
|
2128
|
+
return {
|
|
2129
|
+
path: this.extractVarPath(normalizedArgs[0].var),
|
|
2130
|
+
transform: 'coalesce',
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
2098
2133
|
isJsonLogicExpressionCandidate(value) {
|
|
2099
2134
|
return !!value && typeof value === 'object' && !Array.isArray(value);
|
|
2100
2135
|
}
|
|
@@ -4755,6 +4790,7 @@ class PropertyEffectEditorComponent {
|
|
|
4755
4790
|
size="dense"
|
|
4756
4791
|
matSuffix
|
|
4757
4792
|
type="button"
|
|
4793
|
+
[attr.aria-label]="getDefinition(entry.property)?.description"
|
|
4758
4794
|
[matTooltip]="getDefinition(entry.property)?.description"
|
|
4759
4795
|
matTooltipPosition="above"
|
|
4760
4796
|
>
|
|
@@ -5073,6 +5109,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
5073
5109
|
size="dense"
|
|
5074
5110
|
matSuffix
|
|
5075
5111
|
type="button"
|
|
5112
|
+
[attr.aria-label]="getDefinition(entry.property)?.description"
|
|
5076
5113
|
[matTooltip]="getDefinition(entry.property)?.description"
|
|
5077
5114
|
matTooltipPosition="above"
|
|
5078
5115
|
>
|
|
@@ -5463,6 +5500,8 @@ class FieldConditionEditorComponent {
|
|
|
5463
5500
|
valueType,
|
|
5464
5501
|
compareToField: valueType === 'field' ? formValue.compareToField : '',
|
|
5465
5502
|
contextVariable: '',
|
|
5503
|
+
fieldValueTransform: this.config?.fieldValueTransform,
|
|
5504
|
+
compareToFieldValueTransform: valueType === 'field' ? this.config?.compareToFieldValueTransform : undefined,
|
|
5466
5505
|
};
|
|
5467
5506
|
this.configChanged.emit(config);
|
|
5468
5507
|
}
|
|
@@ -5847,6 +5886,7 @@ class FieldConditionEditorComponent {
|
|
|
5847
5886
|
size="dense"
|
|
5848
5887
|
matSuffix
|
|
5849
5888
|
type="button"
|
|
5889
|
+
[attr.aria-label]="selectedField?.description"
|
|
5850
5890
|
[matTooltip]="selectedField?.description"
|
|
5851
5891
|
matTooltipPosition="above"
|
|
5852
5892
|
>
|
|
@@ -5901,15 +5941,18 @@ class FieldConditionEditorComponent {
|
|
|
5901
5941
|
formControlName="value"
|
|
5902
5942
|
[placeholder]="getValuePlaceholder()"
|
|
5903
5943
|
/>
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5944
|
+
@if (getValueHint()) {
|
|
5945
|
+
<button
|
|
5946
|
+
praxisIconButton="help_outline"
|
|
5947
|
+
size="dense"
|
|
5948
|
+
matSuffix
|
|
5949
|
+
type="button"
|
|
5950
|
+
[attr.aria-label]="getValueHint()"
|
|
5951
|
+
[matTooltip]="getValueHint()"
|
|
5952
|
+
matTooltipPosition="above"
|
|
5953
|
+
>
|
|
5954
|
+
</button>
|
|
5955
|
+
}
|
|
5913
5956
|
</mat-form-field>
|
|
5914
5957
|
}
|
|
5915
5958
|
@if (isBooleanField()) {
|
|
@@ -6144,6 +6187,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
6144
6187
|
size="dense"
|
|
6145
6188
|
matSuffix
|
|
6146
6189
|
type="button"
|
|
6190
|
+
[attr.aria-label]="selectedField?.description"
|
|
6147
6191
|
[matTooltip]="selectedField?.description"
|
|
6148
6192
|
matTooltipPosition="above"
|
|
6149
6193
|
>
|
|
@@ -6198,15 +6242,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
6198
6242
|
formControlName="value"
|
|
6199
6243
|
[placeholder]="getValuePlaceholder()"
|
|
6200
6244
|
/>
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6245
|
+
@if (getValueHint()) {
|
|
6246
|
+
<button
|
|
6247
|
+
praxisIconButton="help_outline"
|
|
6248
|
+
size="dense"
|
|
6249
|
+
matSuffix
|
|
6250
|
+
type="button"
|
|
6251
|
+
[attr.aria-label]="getValueHint()"
|
|
6252
|
+
[matTooltip]="getValueHint()"
|
|
6253
|
+
matTooltipPosition="above"
|
|
6254
|
+
>
|
|
6255
|
+
</button>
|
|
6256
|
+
}
|
|
6210
6257
|
</mat-form-field>
|
|
6211
6258
|
}
|
|
6212
6259
|
@if (isBooleanField()) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/visual-builder",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.6",
|
|
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": "^9.0.
|
|
12
|
-
"@praxisui/ai": "^9.0.
|
|
13
|
-
"@praxisui/core": "^9.0.
|
|
14
|
-
"@praxisui/metadata-editor": "^9.0.
|
|
11
|
+
"@praxisui/settings-panel": "^9.0.6",
|
|
12
|
+
"@praxisui/ai": "^9.0.6",
|
|
13
|
+
"@praxisui/core": "^9.0.6",
|
|
14
|
+
"@praxisui/metadata-editor": "^9.0.6",
|
|
15
15
|
"rxjs": "~7.8.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
@@ -42,6 +42,7 @@ interface SpecificationMetadata {
|
|
|
42
42
|
* Value types for rule configuration
|
|
43
43
|
*/
|
|
44
44
|
type ValueType = 'literal' | 'field' | 'context' | 'function';
|
|
45
|
+
type FieldOperandTransform = 'coalesce';
|
|
45
46
|
/**
|
|
46
47
|
* Valid comparison operators supported by the visual builder
|
|
47
48
|
*/
|
|
@@ -112,6 +113,10 @@ interface FieldConditionConfig {
|
|
|
112
113
|
valueType?: ValueType;
|
|
113
114
|
/** Field to compare against (for field-to-field comparisons) */
|
|
114
115
|
compareToField?: string;
|
|
116
|
+
/** Canonical JSON Logic transform applied to the left field operand. */
|
|
117
|
+
fieldValueTransform?: FieldOperandTransform;
|
|
118
|
+
/** Canonical JSON Logic transform applied to a field-valued right operand. */
|
|
119
|
+
compareToFieldValueTransform?: FieldOperandTransform;
|
|
115
120
|
/** Context variable to use as value */
|
|
116
121
|
contextVariable?: string;
|
|
117
122
|
/** Optional metadata for error messages and UI hints */
|
|
@@ -1304,6 +1309,8 @@ declare class RuleBuilderService {
|
|
|
1304
1309
|
private jsonLogicOperatorToBuilderOperator;
|
|
1305
1310
|
private normalizeConditionValue;
|
|
1306
1311
|
private buildConditionRightOperand;
|
|
1312
|
+
private buildFieldOperand;
|
|
1313
|
+
private parseFieldOperand;
|
|
1307
1314
|
private isJsonLogicExpressionCandidate;
|
|
1308
1315
|
private isVarExpression;
|
|
1309
1316
|
private extractVarPath;
|
|
@@ -2958,4 +2965,4 @@ declare class RuleListComponent {
|
|
|
2958
2965
|
}
|
|
2959
2966
|
|
|
2960
2967
|
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, PRAXIS_VISUAL_BUILDER_AUTHORING_MANIFEST, PRAXIS_VISUAL_BUILDER_COMPONENT_METADATA, 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, providePraxisVisualBuilderMetadata };
|
|
2961
|
-
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, VisualBuilderMode, WebhookConfig, WebhookDelivery, WebhookEvent, WebhookStats };
|
|
2968
|
+
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, FieldOperandTransform, 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, VisualBuilderMode, WebhookConfig, WebhookDelivery, WebhookEvent, WebhookStats };
|