@praxisui/visual-builder 8.0.0-beta.12 → 8.0.0-beta.13
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 +15 -2
- package/index.d.ts +5 -4
- package/package.json +2 -2
|
@@ -9983,6 +9983,12 @@ class TargetSelectorComponent {
|
|
|
9983
9983
|
description: this.t('target.type.action.description', 'Botoes de acao.'),
|
|
9984
9984
|
icon: 'smart_button',
|
|
9985
9985
|
},
|
|
9986
|
+
{
|
|
9987
|
+
id: 'visualBlock',
|
|
9988
|
+
label: this.t('target.type.visualBlock.label', 'Bloco visual'),
|
|
9989
|
+
description: this.t('target.type.visualBlock.description', 'Bloco editorial no layout.'),
|
|
9990
|
+
icon: 'notes',
|
|
9991
|
+
},
|
|
9986
9992
|
];
|
|
9987
9993
|
}
|
|
9988
9994
|
ngOnInit() {
|
|
@@ -10153,6 +10159,8 @@ class TargetSelectorComponent {
|
|
|
10153
10159
|
return this.targetSchemas.rows || {};
|
|
10154
10160
|
case 'column':
|
|
10155
10161
|
return this.targetSchemas.columns || {};
|
|
10162
|
+
case 'visualBlock':
|
|
10163
|
+
return this.targetSchemas.visualBlocks || {};
|
|
10156
10164
|
default:
|
|
10157
10165
|
return {};
|
|
10158
10166
|
}
|
|
@@ -10781,6 +10789,8 @@ class RuleDefinitionComponent {
|
|
|
10781
10789
|
return this.t('ruleDefinition.targetType.rowPlural', 'Linhas');
|
|
10782
10790
|
case 'column':
|
|
10783
10791
|
return this.t('ruleDefinition.targetType.columnPlural', 'Colunas');
|
|
10792
|
+
case 'visualBlock':
|
|
10793
|
+
return this.t('ruleDefinition.targetType.visualBlockPlural', 'Blocos visuais');
|
|
10784
10794
|
default:
|
|
10785
10795
|
return this.t('ruleDefinition.targetType.fieldPlural', 'Campos');
|
|
10786
10796
|
}
|
|
@@ -12657,6 +12667,9 @@ class RuleEditorComponent {
|
|
|
12657
12667
|
return;
|
|
12658
12668
|
}
|
|
12659
12669
|
const finalResponse = validation.correctedResponse || aiResponse;
|
|
12670
|
+
const finalCondition = finalResponse.condition
|
|
12671
|
+
? finalResponse.condition
|
|
12672
|
+
: undefined;
|
|
12660
12673
|
try {
|
|
12661
12674
|
const draftNodeId = this.ruleBuilderService.addNode({
|
|
12662
12675
|
type: RuleNodeType.PROPERTY_RULE,
|
|
@@ -12665,7 +12678,7 @@ class RuleEditorComponent {
|
|
|
12665
12678
|
type: 'propertyRule',
|
|
12666
12679
|
targetType: finalResponse.targetType,
|
|
12667
12680
|
targets: finalResponse.targetIds,
|
|
12668
|
-
condition:
|
|
12681
|
+
condition: finalCondition,
|
|
12669
12682
|
properties: finalResponse.effects.properties,
|
|
12670
12683
|
propertiesWhenFalse: finalResponse.effects.propertiesWhenFalse,
|
|
12671
12684
|
},
|
|
@@ -13429,7 +13442,7 @@ const effectSetSchema = {
|
|
|
13429
13442
|
required: ['nodeId', 'targetType', 'targets', 'properties'],
|
|
13430
13443
|
properties: {
|
|
13431
13444
|
nodeId: { type: 'string' },
|
|
13432
|
-
targetType: { enum: ['field', 'section', 'action', 'row', 'column'] },
|
|
13445
|
+
targetType: { enum: ['field', 'section', 'action', 'row', 'column', 'visualBlock'] },
|
|
13433
13446
|
targets: {
|
|
13434
13447
|
type: 'array',
|
|
13435
13448
|
items: { type: 'string' },
|
package/index.d.ts
CHANGED
|
@@ -121,7 +121,7 @@ interface FieldConditionConfig {
|
|
|
121
121
|
}
|
|
122
122
|
interface PropertyRuleConfig {
|
|
123
123
|
type: 'propertyRule';
|
|
124
|
-
targetType: 'field' | 'section' | 'action' | 'row' | 'column';
|
|
124
|
+
targetType: 'field' | 'section' | 'action' | 'row' | 'column' | 'visualBlock';
|
|
125
125
|
/** Target IDs without prefix (namespace is defined by targetType) */
|
|
126
126
|
targets: string[];
|
|
127
127
|
/** Properties applied when condition is true */
|
|
@@ -512,9 +512,10 @@ interface RuleBuilderConfig {
|
|
|
512
512
|
actions?: Record<string, unknown>;
|
|
513
513
|
rows?: Record<string, unknown>;
|
|
514
514
|
columns?: Record<string, unknown>;
|
|
515
|
+
visualBlocks?: Record<string, unknown>;
|
|
515
516
|
};
|
|
516
517
|
/** Optional property schema per targetType for typed property editing */
|
|
517
|
-
targetPropertySchemas?: Record<'field' | 'section' | 'action' | 'row' | 'column', Array<{
|
|
518
|
+
targetPropertySchemas?: Record<'field' | 'section' | 'action' | 'row' | 'column' | 'visualBlock', Array<{
|
|
518
519
|
name: string;
|
|
519
520
|
type: 'string' | 'boolean' | 'object' | 'enum' | 'number';
|
|
520
521
|
label?: string;
|
|
@@ -641,7 +642,7 @@ interface FieldSchema {
|
|
|
641
642
|
/** Human-readable field label */
|
|
642
643
|
label: string;
|
|
643
644
|
/** Logical origin to help context-sensitive filtering (form field, section, row, column, table column, etc.) */
|
|
644
|
-
origin?: 'field' | 'section' | 'action' | 'row' | 'column' | 'tableField' | 'tableColumn';
|
|
645
|
+
origin?: 'field' | 'section' | 'action' | 'row' | 'column' | 'visualBlock' | 'tableField' | 'tableColumn';
|
|
645
646
|
/** Field data type */
|
|
646
647
|
type: FieldType | string;
|
|
647
648
|
/** Optional description or help text */
|
|
@@ -2181,7 +2182,7 @@ declare const createError: {
|
|
|
2181
2182
|
internal: (message: string, cause?: Error) => InternalError;
|
|
2182
2183
|
};
|
|
2183
2184
|
|
|
2184
|
-
type TargetType = 'field' | 'section' | 'action' | 'row' | 'column';
|
|
2185
|
+
type TargetType = 'field' | 'section' | 'action' | 'row' | 'column' | 'visualBlock';
|
|
2185
2186
|
type RuleNodeConfigExtended = RuleNodeConfig & {
|
|
2186
2187
|
targetType?: TargetType;
|
|
2187
2188
|
properties?: Record<string, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/visual-builder",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.13",
|
|
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": "^20.0.0",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@angular/cdk": "^20.0.0",
|
|
9
9
|
"@angular/material": "^20.0.0",
|
|
10
10
|
"@angular/forms": "^20.0.0",
|
|
11
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
11
|
+
"@praxisui/settings-panel": "^8.0.0-beta.13"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"tslib": "^2.3.0",
|