@praxisui/visual-builder 8.0.0-beta.12 → 8.0.0-beta.14
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 +29 -3
- package/index.d.ts +5 -4
- package/package.json +2 -2
|
@@ -5873,6 +5873,9 @@ const PRAXIS_VISUAL_BUILDER_EN_US = {
|
|
|
5873
5873
|
'praxis.visualBuilder.target.type.action.label': 'Action',
|
|
5874
5874
|
'praxis.visualBuilder.target.type.action.labelPlural': 'Actions',
|
|
5875
5875
|
'praxis.visualBuilder.target.type.action.description': 'Action buttons.',
|
|
5876
|
+
'praxis.visualBuilder.target.type.visualBlock.label': 'Visual block',
|
|
5877
|
+
'praxis.visualBuilder.target.type.visualBlock.labelPlural': 'Visual blocks',
|
|
5878
|
+
'praxis.visualBuilder.target.type.visualBlock.description': 'Editorial block in the layout.',
|
|
5876
5879
|
'praxis.visualBuilder.target.type.allPlural': 'Targets',
|
|
5877
5880
|
'praxis.visualBuilder.ruleDefinition.step1.title': 'Targets',
|
|
5878
5881
|
'praxis.visualBuilder.ruleDefinition.step1.subtitle': 'Where to apply',
|
|
@@ -5923,6 +5926,7 @@ const PRAXIS_VISUAL_BUILDER_EN_US = {
|
|
|
5923
5926
|
'praxis.visualBuilder.ruleDefinition.targetType.rowPlural': 'Rows',
|
|
5924
5927
|
'praxis.visualBuilder.ruleDefinition.targetType.columnPlural': 'Columns',
|
|
5925
5928
|
'praxis.visualBuilder.ruleDefinition.targetType.actionPlural': 'Actions',
|
|
5929
|
+
'praxis.visualBuilder.ruleDefinition.targetType.visualBlockPlural': 'Visual blocks',
|
|
5926
5930
|
'praxis.visualBuilder.ruleDefinition.effect.visibleOn': 'Show the selected elements',
|
|
5927
5931
|
'praxis.visualBuilder.ruleDefinition.effect.visibleOff': 'Hide the selected elements',
|
|
5928
5932
|
'praxis.visualBuilder.ruleDefinition.effect.requiredOn': 'Make the fields required',
|
|
@@ -6221,6 +6225,9 @@ const PRAXIS_VISUAL_BUILDER_PT_BR = {
|
|
|
6221
6225
|
'praxis.visualBuilder.target.type.action.label': 'Ação',
|
|
6222
6226
|
'praxis.visualBuilder.target.type.action.labelPlural': 'Ações',
|
|
6223
6227
|
'praxis.visualBuilder.target.type.action.description': 'Botões de ação.',
|
|
6228
|
+
'praxis.visualBuilder.target.type.visualBlock.label': 'Bloco visual',
|
|
6229
|
+
'praxis.visualBuilder.target.type.visualBlock.labelPlural': 'Blocos visuais',
|
|
6230
|
+
'praxis.visualBuilder.target.type.visualBlock.description': 'Bloco editorial no layout.',
|
|
6224
6231
|
'praxis.visualBuilder.target.type.allPlural': 'Alvos',
|
|
6225
6232
|
'praxis.visualBuilder.ruleDefinition.step1.title': 'Alvos',
|
|
6226
6233
|
'praxis.visualBuilder.ruleDefinition.step1.subtitle': 'Onde aplicar',
|
|
@@ -6271,6 +6278,7 @@ const PRAXIS_VISUAL_BUILDER_PT_BR = {
|
|
|
6271
6278
|
'praxis.visualBuilder.ruleDefinition.targetType.rowPlural': 'Linhas',
|
|
6272
6279
|
'praxis.visualBuilder.ruleDefinition.targetType.columnPlural': 'Colunas',
|
|
6273
6280
|
'praxis.visualBuilder.ruleDefinition.targetType.actionPlural': 'Ações',
|
|
6281
|
+
'praxis.visualBuilder.ruleDefinition.targetType.visualBlockPlural': 'Blocos visuais',
|
|
6274
6282
|
'praxis.visualBuilder.ruleDefinition.effect.visibleOn': 'Mostrar os elementos selecionados',
|
|
6275
6283
|
'praxis.visualBuilder.ruleDefinition.effect.visibleOff': 'Ocultar os elementos selecionados',
|
|
6276
6284
|
'praxis.visualBuilder.ruleDefinition.effect.requiredOn': 'Tornar os campos obrigatórios',
|
|
@@ -9983,6 +9991,12 @@ class TargetSelectorComponent {
|
|
|
9983
9991
|
description: this.t('target.type.action.description', 'Botoes de acao.'),
|
|
9984
9992
|
icon: 'smart_button',
|
|
9985
9993
|
},
|
|
9994
|
+
{
|
|
9995
|
+
id: 'visualBlock',
|
|
9996
|
+
label: this.t('target.type.visualBlock.label', 'Bloco visual'),
|
|
9997
|
+
description: this.t('target.type.visualBlock.description', 'Bloco editorial no layout.'),
|
|
9998
|
+
icon: 'notes',
|
|
9999
|
+
},
|
|
9986
10000
|
];
|
|
9987
10001
|
}
|
|
9988
10002
|
ngOnInit() {
|
|
@@ -10122,6 +10136,8 @@ class TargetSelectorComponent {
|
|
|
10122
10136
|
return this.t('target.type.column.labelPlural', 'Colunas');
|
|
10123
10137
|
case 'action':
|
|
10124
10138
|
return this.t('target.type.action.labelPlural', 'Acoes');
|
|
10139
|
+
case 'visualBlock':
|
|
10140
|
+
return this.t('target.type.visualBlock.labelPlural', 'Blocos visuais');
|
|
10125
10141
|
default:
|
|
10126
10142
|
return this.t('target.type.allPlural', 'Alvos');
|
|
10127
10143
|
}
|
|
@@ -10153,6 +10169,8 @@ class TargetSelectorComponent {
|
|
|
10153
10169
|
return this.targetSchemas.rows || {};
|
|
10154
10170
|
case 'column':
|
|
10155
10171
|
return this.targetSchemas.columns || {};
|
|
10172
|
+
case 'visualBlock':
|
|
10173
|
+
return this.targetSchemas.visualBlocks || {};
|
|
10156
10174
|
default:
|
|
10157
10175
|
return {};
|
|
10158
10176
|
}
|
|
@@ -10781,6 +10799,8 @@ class RuleDefinitionComponent {
|
|
|
10781
10799
|
return this.t('ruleDefinition.targetType.rowPlural', 'Linhas');
|
|
10782
10800
|
case 'column':
|
|
10783
10801
|
return this.t('ruleDefinition.targetType.columnPlural', 'Colunas');
|
|
10802
|
+
case 'visualBlock':
|
|
10803
|
+
return this.t('ruleDefinition.targetType.visualBlockPlural', 'Blocos visuais');
|
|
10784
10804
|
default:
|
|
10785
10805
|
return this.t('ruleDefinition.targetType.fieldPlural', 'Campos');
|
|
10786
10806
|
}
|
|
@@ -10790,7 +10810,8 @@ class RuleDefinitionComponent {
|
|
|
10790
10810
|
.replace(/^section:/, '')
|
|
10791
10811
|
.replace(/^action:/, '')
|
|
10792
10812
|
.replace(/^row:/, '')
|
|
10793
|
-
.replace(/^column:/, '')
|
|
10813
|
+
.replace(/^column:/, '')
|
|
10814
|
+
.replace(/^visualBlock:/, '');
|
|
10794
10815
|
}
|
|
10795
10816
|
initializeFromNode() {
|
|
10796
10817
|
this.isInitializing = true;
|
|
@@ -10831,6 +10852,8 @@ class RuleDefinitionComponent {
|
|
|
10831
10852
|
return 'row';
|
|
10832
10853
|
if (targets.some((target) => target.startsWith('column:')))
|
|
10833
10854
|
return 'column';
|
|
10855
|
+
if (targets.some((target) => target.startsWith('visualBlock:')))
|
|
10856
|
+
return 'visualBlock';
|
|
10834
10857
|
return 'field';
|
|
10835
10858
|
}
|
|
10836
10859
|
buildRuleConfig(skipVisualCondition = false) {
|
|
@@ -12657,6 +12680,9 @@ class RuleEditorComponent {
|
|
|
12657
12680
|
return;
|
|
12658
12681
|
}
|
|
12659
12682
|
const finalResponse = validation.correctedResponse || aiResponse;
|
|
12683
|
+
const finalCondition = finalResponse.condition
|
|
12684
|
+
? finalResponse.condition
|
|
12685
|
+
: undefined;
|
|
12660
12686
|
try {
|
|
12661
12687
|
const draftNodeId = this.ruleBuilderService.addNode({
|
|
12662
12688
|
type: RuleNodeType.PROPERTY_RULE,
|
|
@@ -12665,7 +12691,7 @@ class RuleEditorComponent {
|
|
|
12665
12691
|
type: 'propertyRule',
|
|
12666
12692
|
targetType: finalResponse.targetType,
|
|
12667
12693
|
targets: finalResponse.targetIds,
|
|
12668
|
-
condition:
|
|
12694
|
+
condition: finalCondition,
|
|
12669
12695
|
properties: finalResponse.effects.properties,
|
|
12670
12696
|
propertiesWhenFalse: finalResponse.effects.propertiesWhenFalse,
|
|
12671
12697
|
},
|
|
@@ -13429,7 +13455,7 @@ const effectSetSchema = {
|
|
|
13429
13455
|
required: ['nodeId', 'targetType', 'targets', 'properties'],
|
|
13430
13456
|
properties: {
|
|
13431
13457
|
nodeId: { type: 'string' },
|
|
13432
|
-
targetType: { enum: ['field', 'section', 'action', 'row', 'column'] },
|
|
13458
|
+
targetType: { enum: ['field', 'section', 'action', 'row', 'column', 'visualBlock'] },
|
|
13433
13459
|
targets: {
|
|
13434
13460
|
type: 'array',
|
|
13435
13461
|
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.14",
|
|
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.14"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"tslib": "^2.3.0",
|