@praxisui/table 8.0.0-beta.86 → 8.0.0-beta.87
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-table-praxisui-table-CpSv6jWv.mjs → praxisui-table-praxisui-table-DDQAk0TJ.mjs} +2 -2
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-Dhte2er9.mjs → praxisui-table-table-agentic-authoring-turn-flow-oJhkMALs.mjs} +23 -1
- package/fesm2022/{praxisui-table-table-ai.adapter-BvgPN7wY.mjs → praxisui-table-table-ai.adapter-yEPQ8xBc.mjs} +85 -6
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
|
@@ -39881,7 +39881,7 @@ class PraxisTable {
|
|
|
39881
39881
|
if (this.aiAdapter || this.aiAdapterLoadStarted)
|
|
39882
39882
|
return;
|
|
39883
39883
|
this.aiAdapterLoadStarted = true;
|
|
39884
|
-
import('./praxisui-table-table-ai.adapter-
|
|
39884
|
+
import('./praxisui-table-table-ai.adapter-yEPQ8xBc.mjs')
|
|
39885
39885
|
.then(({ TableAiAdapter }) => {
|
|
39886
39886
|
this.aiAdapter = new TableAiAdapter(this);
|
|
39887
39887
|
this.initializeAiAssistantController();
|
|
@@ -40327,7 +40327,7 @@ class PraxisTable {
|
|
|
40327
40327
|
initializeAiAssistantController() {
|
|
40328
40328
|
if (!this.aiAdapter || this.aiAssistantController)
|
|
40329
40329
|
return;
|
|
40330
|
-
import('./praxisui-table-table-agentic-authoring-turn-flow-
|
|
40330
|
+
import('./praxisui-table-table-agentic-authoring-turn-flow-oJhkMALs.mjs')
|
|
40331
40331
|
.then(({ TableAgenticAuthoringTurnFlow }) => {
|
|
40332
40332
|
if (this.aiAssistantController || !this.aiAdapter)
|
|
40333
40333
|
return;
|
|
@@ -4100,6 +4100,28 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
4100
4100
|
?? this.booleanSimNaoOperationsFromGroundedClarification(prompt, responseText, columns)
|
|
4101
4101
|
?? this.booleanSimNaoOperationsFromSingleGroundedBooleanColumn(prompt, responseText, columns)
|
|
4102
4102
|
?? this.booleanSimNaoOperationsFromGroundedResponseField(prompt, responseText, columns);
|
|
4103
|
+
const promptRequestsSimNao = this.normalizedTextIncludesAny(this.normalizeLabel(prompt), [
|
|
4104
|
+
'sim nao',
|
|
4105
|
+
'sim/nao',
|
|
4106
|
+
'sim não',
|
|
4107
|
+
'sim/não',
|
|
4108
|
+
'sim ou nao',
|
|
4109
|
+
'sim ou não',
|
|
4110
|
+
]);
|
|
4111
|
+
const responseGroundsBooleanSimNao = this.normalizedTextIncludesAny(normalizedResponse, [
|
|
4112
|
+
'sim quando true',
|
|
4113
|
+
'sim quando verdadeiro',
|
|
4114
|
+
'nao quando false',
|
|
4115
|
+
'não quando false',
|
|
4116
|
+
'nao quando falso',
|
|
4117
|
+
'não quando falso',
|
|
4118
|
+
'sim para true',
|
|
4119
|
+
'sim para verdadeiro',
|
|
4120
|
+
'nao para false',
|
|
4121
|
+
'não para false',
|
|
4122
|
+
'nao para falso',
|
|
4123
|
+
'não para falso',
|
|
4124
|
+
]);
|
|
4103
4125
|
const booleanFormatClarification = !!booleanOperations?.length && this.normalizedTextIncludesAny(normalizedResponse, [
|
|
4104
4126
|
'sim nao',
|
|
4105
4127
|
'sim / nao',
|
|
@@ -4110,7 +4132,7 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
4110
4132
|
'badges com textos sim nao',
|
|
4111
4133
|
'mostrar apenas texto sim nao',
|
|
4112
4134
|
'valores booleanos como sim ou nao',
|
|
4113
|
-
]);
|
|
4135
|
+
]) || (!!booleanOperations?.length && promptRequestsSimNao && responseGroundsBooleanSimNao);
|
|
4114
4136
|
if (booleanOperations?.length && (booleanInfo || booleanFormatClarification)) {
|
|
4115
4137
|
return this.componentEditPlanResponse(booleanOperations, 'Vou mostrar o booleano como Sim/Nao na coluna indicada.', [
|
|
4116
4138
|
...(response.warnings ?? []),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { firstValueFrom } from 'rxjs';
|
|
2
2
|
import { BaseAiAdapter, createComponentAuthoringContext } from '@praxisui/ai';
|
|
3
3
|
import { PRAXIS_GLOBAL_ACTION_CATALOG, deepMerge } from '@praxisui/core';
|
|
4
|
-
import { G as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, W as coerceTableComponentEditPlans, Y as compileTableComponentEditPlans, I as TASK_PRESETS, a1 as getTableComponentEditPlanCapabilities, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, E as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-
|
|
4
|
+
import { G as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, W as coerceTableComponentEditPlans, Y as compileTableComponentEditPlans, I as TASK_PRESETS, a1 as getTableComponentEditPlanCapabilities, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, E as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-DDQAk0TJ.mjs';
|
|
5
5
|
|
|
6
6
|
const TABLE_COMPONENT_CONTEXT_PACK = {
|
|
7
7
|
version: 'v1',
|
|
@@ -3688,12 +3688,13 @@ Columns Analysis:
|
|
|
3688
3688
|
const match = patchCols.find((p) => p.field === origCol.field);
|
|
3689
3689
|
if (!match)
|
|
3690
3690
|
return origCol;
|
|
3691
|
-
const
|
|
3692
|
-
|
|
3693
|
-
|
|
3691
|
+
const normalizedMatch = this.normalizeBooleanValueMappingColumnPatch(origCol, match);
|
|
3692
|
+
const merged = deepMerge(origCol, normalizedMatch);
|
|
3693
|
+
if (Array.isArray(normalizedMatch.conditionalRenderers)) {
|
|
3694
|
+
merged.conditionalRenderers = normalizedMatch.conditionalRenderers;
|
|
3694
3695
|
}
|
|
3695
|
-
if (Array.isArray(
|
|
3696
|
-
merged.conditionalStyles =
|
|
3696
|
+
if (Array.isArray(normalizedMatch.conditionalStyles)) {
|
|
3697
|
+
merged.conditionalStyles = normalizedMatch.conditionalStyles;
|
|
3697
3698
|
}
|
|
3698
3699
|
return merged;
|
|
3699
3700
|
});
|
|
@@ -3706,6 +3707,84 @@ Columns Analysis:
|
|
|
3706
3707
|
}
|
|
3707
3708
|
return result;
|
|
3708
3709
|
}
|
|
3710
|
+
normalizeBooleanValueMappingColumnPatch(origCol, patchCol) {
|
|
3711
|
+
const mapping = this.toRecord(patchCol.valueMapping);
|
|
3712
|
+
if (!mapping || Array.isArray(patchCol.conditionalRenderers))
|
|
3713
|
+
return patchCol;
|
|
3714
|
+
const trueLabel = this.stringValue(mapping['true'] ?? mapping['TRUE'] ?? mapping['1']);
|
|
3715
|
+
const falseLabel = this.stringValue(mapping['false'] ?? mapping['FALSE'] ?? mapping['0']);
|
|
3716
|
+
if (!trueLabel || !falseLabel || !this.isBooleanPresentationColumn(origCol, patchCol)) {
|
|
3717
|
+
return patchCol;
|
|
3718
|
+
}
|
|
3719
|
+
const normalized = { ...patchCol };
|
|
3720
|
+
delete normalized['valueMapping'];
|
|
3721
|
+
normalized['format'] = `custom|${trueLabel}|${falseLabel}`;
|
|
3722
|
+
const existingRules = Array.isArray(origCol.conditionalRenderers)
|
|
3723
|
+
? origCol.conditionalRenderers
|
|
3724
|
+
: [];
|
|
3725
|
+
const nextRules = existingRules
|
|
3726
|
+
.map((rule) => this.relabelBooleanConditionalRenderer(rule, trueLabel, falseLabel))
|
|
3727
|
+
.filter((rule) => !!rule);
|
|
3728
|
+
if (nextRules.length) {
|
|
3729
|
+
normalized['conditionalRenderers'] = nextRules;
|
|
3730
|
+
}
|
|
3731
|
+
return normalized;
|
|
3732
|
+
}
|
|
3733
|
+
isBooleanPresentationColumn(origCol, patchCol) {
|
|
3734
|
+
const type = this.stringValue(patchCol.type ?? origCol.type ?? origCol.dataType).toLowerCase();
|
|
3735
|
+
if (type === 'boolean' || type === 'bool')
|
|
3736
|
+
return true;
|
|
3737
|
+
const format = this.stringValue(patchCol.format ?? origCol.format);
|
|
3738
|
+
if (this.looksLikeBooleanFormat(format))
|
|
3739
|
+
return true;
|
|
3740
|
+
const rules = Array.isArray(origCol.conditionalRenderers)
|
|
3741
|
+
? origCol.conditionalRenderers
|
|
3742
|
+
: [];
|
|
3743
|
+
return rules.some((rule) => this.booleanConditionValue(rule?.condition) !== null);
|
|
3744
|
+
}
|
|
3745
|
+
relabelBooleanConditionalRenderer(rule, trueLabel, falseLabel) {
|
|
3746
|
+
const value = this.booleanConditionValue(rule?.condition);
|
|
3747
|
+
if (value === null)
|
|
3748
|
+
return rule;
|
|
3749
|
+
const renderer = this.toRecord(rule?.renderer);
|
|
3750
|
+
if (!renderer)
|
|
3751
|
+
return rule;
|
|
3752
|
+
const rendererType = this.stringValue(renderer['type']);
|
|
3753
|
+
const visual = rendererType ? this.toRecord(renderer[rendererType]) : null;
|
|
3754
|
+
if (!rendererType || !visual)
|
|
3755
|
+
return rule;
|
|
3756
|
+
const label = value ? trueLabel : falseLabel;
|
|
3757
|
+
return {
|
|
3758
|
+
...rule,
|
|
3759
|
+
renderer: {
|
|
3760
|
+
...renderer,
|
|
3761
|
+
[rendererType]: {
|
|
3762
|
+
...visual,
|
|
3763
|
+
...(Object.prototype.hasOwnProperty.call(visual, 'label')
|
|
3764
|
+
? { label }
|
|
3765
|
+
: { text: label }),
|
|
3766
|
+
},
|
|
3767
|
+
},
|
|
3768
|
+
};
|
|
3769
|
+
}
|
|
3770
|
+
booleanConditionValue(condition) {
|
|
3771
|
+
const record = this.toRecord(condition);
|
|
3772
|
+
if (!record)
|
|
3773
|
+
return null;
|
|
3774
|
+
const entries = Object.entries(record);
|
|
3775
|
+
if (entries.length !== 1)
|
|
3776
|
+
return null;
|
|
3777
|
+
const [operator, args] = entries[0];
|
|
3778
|
+
if (!['==', '==='].includes(operator) || !Array.isArray(args))
|
|
3779
|
+
return null;
|
|
3780
|
+
for (const arg of args) {
|
|
3781
|
+
if (arg === true)
|
|
3782
|
+
return true;
|
|
3783
|
+
if (arg === false)
|
|
3784
|
+
return false;
|
|
3785
|
+
}
|
|
3786
|
+
return null;
|
|
3787
|
+
}
|
|
3709
3788
|
applyConfig(config) {
|
|
3710
3789
|
const prev = this.table.config;
|
|
3711
3790
|
this.table.config = config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as AnalyticsTableConfigAdapterService, a as AnalyticsTableContractService, b as AnalyticsTableStatsApiService, B as BOOLEAN_PRESETS, c as BehaviorConfigEditorComponent, C as CURRENCY_PRESETS, d as ColumnsConfigEditorComponent, D as DATE_PRESETS, e as DataFormatterComponent, f as DataFormattingService, F as FORMULA_TEMPLATES, g as FilterConfigService, h as FilterSettingsComponent, i as FormulaGeneratorService, J as JsonConfigEditorComponent, M as MessagesLocalizationEditorComponent, N as NUMBER_PRESETS, P as PERCENTAGE_PRESETS, j as PRAXIS_FILTER_COMPONENT_METADATA, k as PRAXIS_TABLE_AUTHORING_MANIFEST, l as PRAXIS_TABLE_COMPONENT_METADATA, m as PRAXIS_TABLE_TOOLBAR_DEFAULT_APPEARANCE, n as PRAXIS_TABLE_TOOLBAR_TOKEN_PRESETS, o as PraxisFilter, p as PraxisFilterWidgetConfigEditor, q as PraxisTable, r as PraxisTableConfigEditor, s as PraxisTableInlineAuthoringEditorComponent, t as PraxisTableToolbar, u as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, v as TABLE_COMPONENT_AI_CAPABILITIES, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_KIND, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, I as TASK_PRESETS, K as TableDefaultsProvider, L as TableRulesEditorComponent, O as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, Q as VisualFormulaBuilderComponent, R as buildTableApplyPlan, U as coerceTableComponentEditPlan, W as coerceTableComponentEditPlans, X as compileTableComponentEditPlan, Y as compileTableComponentEditPlans, Z as createTableAuthoringDocument, _ as getActionId, $ as getEnum, a0 as getTableCapabilities, a1 as getTableComponentEditPlanCapabilities, a2 as isTableRendererSupportedByRichContentP0, a3 as mapTableRendererToRichContentP0, a4 as normalizeTableAuthoringDocument, a5 as parseLegacyOrTableDocument, a6 as providePraxisFilterMetadata, a7 as providePraxisTableMetadata, a8 as providePraxisTableToolbarAppearance, a9 as serializeTableAuthoringDocument, aa as toCanonicalTableConfig, ab as validateTableAuthoringDocument } from './praxisui-table-praxisui-table-
|
|
1
|
+
export { A as AnalyticsTableConfigAdapterService, a as AnalyticsTableContractService, b as AnalyticsTableStatsApiService, B as BOOLEAN_PRESETS, c as BehaviorConfigEditorComponent, C as CURRENCY_PRESETS, d as ColumnsConfigEditorComponent, D as DATE_PRESETS, e as DataFormatterComponent, f as DataFormattingService, F as FORMULA_TEMPLATES, g as FilterConfigService, h as FilterSettingsComponent, i as FormulaGeneratorService, J as JsonConfigEditorComponent, M as MessagesLocalizationEditorComponent, N as NUMBER_PRESETS, P as PERCENTAGE_PRESETS, j as PRAXIS_FILTER_COMPONENT_METADATA, k as PRAXIS_TABLE_AUTHORING_MANIFEST, l as PRAXIS_TABLE_COMPONENT_METADATA, m as PRAXIS_TABLE_TOOLBAR_DEFAULT_APPEARANCE, n as PRAXIS_TABLE_TOOLBAR_TOKEN_PRESETS, o as PraxisFilter, p as PraxisFilterWidgetConfigEditor, q as PraxisTable, r as PraxisTableConfigEditor, s as PraxisTableInlineAuthoringEditorComponent, t as PraxisTableToolbar, u as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, v as TABLE_COMPONENT_AI_CAPABILITIES, w as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, z as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_KIND, H as TABLE_COMPONENT_EDIT_PLAN_VERSION, I as TASK_PRESETS, K as TableDefaultsProvider, L as TableRulesEditorComponent, O as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, Q as VisualFormulaBuilderComponent, R as buildTableApplyPlan, U as coerceTableComponentEditPlan, W as coerceTableComponentEditPlans, X as compileTableComponentEditPlan, Y as compileTableComponentEditPlans, Z as createTableAuthoringDocument, _ as getActionId, $ as getEnum, a0 as getTableCapabilities, a1 as getTableComponentEditPlanCapabilities, a2 as isTableRendererSupportedByRichContentP0, a3 as mapTableRendererToRichContentP0, a4 as normalizeTableAuthoringDocument, a5 as parseLegacyOrTableDocument, a6 as providePraxisFilterMetadata, a7 as providePraxisTableMetadata, a8 as providePraxisTableToolbarAppearance, a9 as serializeTableAuthoringDocument, aa as toCanonicalTableConfig, ab as validateTableAuthoringDocument } from './praxisui-table-praxisui-table-DDQAk0TJ.mjs';
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@praxisui/table",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.87",
|
|
4
4
|
"description": "Advanced data table for Angular (Praxis UI) with editing, filtering, sorting, virtualization, and settings panel integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/common": "^21.0.0",
|
|
7
7
|
"@angular/core": "^21.0.0",
|
|
8
|
-
"@praxisui/ai": "^8.0.0-beta.
|
|
9
|
-
"@praxisui/core": "^8.0.0-beta.
|
|
10
|
-
"@praxisui/dynamic-fields": "^8.0.0-beta.
|
|
11
|
-
"@praxisui/dynamic-form": "^8.0.0-beta.
|
|
12
|
-
"@praxisui/metadata-editor": "^8.0.0-beta.
|
|
13
|
-
"@praxisui/rich-content": "^8.0.0-beta.
|
|
14
|
-
"@praxisui/settings-panel": "^8.0.0-beta.
|
|
15
|
-
"@praxisui/table-rule-builder": "^8.0.0-beta.
|
|
8
|
+
"@praxisui/ai": "^8.0.0-beta.87",
|
|
9
|
+
"@praxisui/core": "^8.0.0-beta.87",
|
|
10
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.87",
|
|
11
|
+
"@praxisui/dynamic-form": "^8.0.0-beta.87",
|
|
12
|
+
"@praxisui/metadata-editor": "^8.0.0-beta.87",
|
|
13
|
+
"@praxisui/rich-content": "^8.0.0-beta.87",
|
|
14
|
+
"@praxisui/settings-panel": "^8.0.0-beta.87",
|
|
15
|
+
"@praxisui/table-rule-builder": "^8.0.0-beta.87",
|
|
16
16
|
"@angular/cdk": "^21.0.0",
|
|
17
17
|
"@angular/forms": "^21.0.0",
|
|
18
18
|
"@angular/material": "^21.0.0",
|
|
19
19
|
"@angular/router": "^21.0.0",
|
|
20
|
-
"@praxisui/dialog": "^8.0.0-beta.
|
|
20
|
+
"@praxisui/dialog": "^8.0.0-beta.87",
|
|
21
21
|
"rxjs": "~7.8.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|