@praxisui/table 8.0.0-beta.87 → 8.0.0-beta.88
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 +2 -0
- package/fesm2022/{praxisui-table-praxisui-table-DDQAk0TJ.mjs → praxisui-table-praxisui-table-OCU_Au66.mjs} +95 -16
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-oJhkMALs.mjs → praxisui-table-table-agentic-authoring-turn-flow-4Deh8QJU.mjs} +856 -9
- package/fesm2022/{praxisui-table-table-ai.adapter-yEPQ8xBc.mjs → praxisui-table-table-ai.adapter-C8qa8APT.mjs} +43 -11
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
- package/types/praxisui-table.d.ts +5 -0
|
@@ -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-OCU_Au66.mjs';
|
|
5
5
|
|
|
6
6
|
const TABLE_COMPONENT_CONTEXT_PACK = {
|
|
7
7
|
version: 'v1',
|
|
@@ -2089,9 +2089,11 @@ class TableAiAdapter extends BaseAiAdapter {
|
|
|
2089
2089
|
preferredResponse: 'componentEditPlan',
|
|
2090
2090
|
useWhen: [
|
|
2091
2091
|
'The user asks to change table configuration, visual rules, renderers, columns, behavior, actions, or appearance.',
|
|
2092
|
+
'The user asks to hide, remove from view, show, reveal, or make columns public/private; this is column visibility/structure authoring, not row filtering.',
|
|
2092
2093
|
],
|
|
2093
2094
|
rules: [
|
|
2094
2095
|
'Do not use componentEditPlan for requests to apply, run, clear, or execute current filters against table data; those belong to runtime mode and tableRuntimeOperations.',
|
|
2096
|
+
'For privacy or public-presentation requests that mention columns such as email, salary, CPF, document, phone, or similar sensitive fields, prefer column.visibility.set with visible=false for each requested column unless the user explicitly asks to filter rows by those values.',
|
|
2095
2097
|
'Do not use rowAction.add for capability-discovery questions such as which row buttons or actions can be added; those belong to consult mode until the user explicitly asks to add one.',
|
|
2096
2098
|
'Do not use toolbar.action.add or bulkAction.add for capability-discovery questions such as which global actions, toolbar buttons, route buttons, or bulk buttons can be added; those belong to consult mode until the user explicitly asks to add one.',
|
|
2097
2099
|
'When the user asks to add a row button, row option, or action in each row for a declared record surface, use rowAction.add with capabilityPath "actions.row.actions[]".',
|
|
@@ -2117,6 +2119,7 @@ class TableAiAdapter extends BaseAiAdapter {
|
|
|
2117
2119
|
],
|
|
2118
2120
|
rules: [
|
|
2119
2121
|
'Return type "patch" with tableRuntimeOperations when the request can be materialized by a declared runtimeOperations operation.',
|
|
2122
|
+
'Do not use table.filter.apply when the user asks to hide, remove from view, show, reveal, or make columns public/private; those requests belong to edit mode and column.visibility.set.',
|
|
2120
2123
|
'For table.filter.apply, emit tableRuntimeOperations.operations[] with operationId "table.filter.apply" and input.criteria using declared filterFieldCatalog field names.',
|
|
2121
2124
|
'For boolean filters, use the boolean value expected by the declared field, for example { ativo: true } for an active-only filter when the catalog exposes ativo/status as a boolean criterion.',
|
|
2122
2125
|
'For set filters whose declared field ends with "In", use an array value, for example { departamentoIdsIn: [22], cargoIdsIn: [10] }.',
|
|
@@ -3688,7 +3691,7 @@ Columns Analysis:
|
|
|
3688
3691
|
const match = patchCols.find((p) => p.field === origCol.field);
|
|
3689
3692
|
if (!match)
|
|
3690
3693
|
return origCol;
|
|
3691
|
-
const normalizedMatch = this.
|
|
3694
|
+
const normalizedMatch = this.normalizeBooleanPresentationColumnPatch(origCol, match);
|
|
3692
3695
|
const merged = deepMerge(origCol, normalizedMatch);
|
|
3693
3696
|
if (Array.isArray(normalizedMatch.conditionalRenderers)) {
|
|
3694
3697
|
merged.conditionalRenderers = normalizedMatch.conditionalRenderers;
|
|
@@ -3707,29 +3710,58 @@ Columns Analysis:
|
|
|
3707
3710
|
}
|
|
3708
3711
|
return result;
|
|
3709
3712
|
}
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
if (!mapping || Array.isArray(patchCol.conditionalRenderers))
|
|
3713
|
+
normalizeBooleanPresentationColumnPatch(origCol, patchCol) {
|
|
3714
|
+
if (Array.isArray(patchCol.conditionalRenderers))
|
|
3713
3715
|
return patchCol;
|
|
3714
|
-
const
|
|
3715
|
-
|
|
3716
|
-
if (!trueLabel || !falseLabel || !this.isBooleanPresentationColumn(origCol, patchCol)) {
|
|
3716
|
+
const labels = this.booleanPresentationLabels(patchCol);
|
|
3717
|
+
if (!labels || !this.isBooleanPresentationColumn(origCol, patchCol)) {
|
|
3717
3718
|
return patchCol;
|
|
3718
3719
|
}
|
|
3719
3720
|
const normalized = { ...patchCol };
|
|
3720
|
-
|
|
3721
|
-
|
|
3721
|
+
if (Object.prototype.hasOwnProperty.call(normalized, 'valueMapping')) {
|
|
3722
|
+
delete normalized['valueMapping'];
|
|
3723
|
+
normalized['format'] = `custom|${labels.trueLabel}|${labels.falseLabel}`;
|
|
3724
|
+
}
|
|
3722
3725
|
const existingRules = Array.isArray(origCol.conditionalRenderers)
|
|
3723
3726
|
? origCol.conditionalRenderers
|
|
3724
3727
|
: [];
|
|
3725
3728
|
const nextRules = existingRules
|
|
3726
|
-
.map((rule) => this.relabelBooleanConditionalRenderer(rule, trueLabel, falseLabel))
|
|
3729
|
+
.map((rule) => this.relabelBooleanConditionalRenderer(rule, labels.trueLabel, labels.falseLabel))
|
|
3727
3730
|
.filter((rule) => !!rule);
|
|
3728
3731
|
if (nextRules.length) {
|
|
3729
3732
|
normalized['conditionalRenderers'] = nextRules;
|
|
3730
3733
|
}
|
|
3731
3734
|
return normalized;
|
|
3732
3735
|
}
|
|
3736
|
+
booleanPresentationLabels(patchCol) {
|
|
3737
|
+
const mapping = this.toRecord(patchCol.valueMapping);
|
|
3738
|
+
if (mapping) {
|
|
3739
|
+
const trueLabel = this.stringValue(mapping['true'] ?? mapping['TRUE'] ?? mapping['1']);
|
|
3740
|
+
const falseLabel = this.stringValue(mapping['false'] ?? mapping['FALSE'] ?? mapping['0']);
|
|
3741
|
+
return trueLabel && falseLabel ? { trueLabel, falseLabel } : null;
|
|
3742
|
+
}
|
|
3743
|
+
const format = this.stringValue(patchCol.format).trim();
|
|
3744
|
+
if (!format)
|
|
3745
|
+
return null;
|
|
3746
|
+
if (format.startsWith('custom|')) {
|
|
3747
|
+
const [, trueLabel, falseLabel] = format.split('|');
|
|
3748
|
+
return trueLabel && falseLabel ? { trueLabel, falseLabel } : null;
|
|
3749
|
+
}
|
|
3750
|
+
switch (format) {
|
|
3751
|
+
case 'true-false':
|
|
3752
|
+
return { trueLabel: 'True', falseLabel: 'False' };
|
|
3753
|
+
case 'yes-no':
|
|
3754
|
+
return { trueLabel: 'Sim', falseLabel: 'Não' };
|
|
3755
|
+
case 'active-inactive':
|
|
3756
|
+
return { trueLabel: 'Ativo', falseLabel: 'Inativo' };
|
|
3757
|
+
case 'on-off':
|
|
3758
|
+
return { trueLabel: 'On', falseLabel: 'Off' };
|
|
3759
|
+
case 'enabled-disabled':
|
|
3760
|
+
return { trueLabel: 'Habilitado', falseLabel: 'Desabilitado' };
|
|
3761
|
+
default:
|
|
3762
|
+
return null;
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3733
3765
|
isBooleanPresentationColumn(origCol, patchCol) {
|
|
3734
3766
|
const type = this.stringValue(patchCol.type ?? origCol.type ?? origCol.dataType).toLowerCase();
|
|
3735
3767
|
if (type === 'boolean' || type === 'bool')
|
|
@@ -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-OCU_Au66.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.88",
|
|
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.88",
|
|
9
|
+
"@praxisui/core": "^8.0.0-beta.88",
|
|
10
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.88",
|
|
11
|
+
"@praxisui/dynamic-form": "^8.0.0-beta.88",
|
|
12
|
+
"@praxisui/metadata-editor": "^8.0.0-beta.88",
|
|
13
|
+
"@praxisui/rich-content": "^8.0.0-beta.88",
|
|
14
|
+
"@praxisui/settings-panel": "^8.0.0-beta.88",
|
|
15
|
+
"@praxisui/table-rule-builder": "^8.0.0-beta.88",
|
|
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.88",
|
|
21
21
|
"rxjs": "~7.8.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
@@ -688,6 +688,8 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
688
688
|
private isCompositeRangeFilterField;
|
|
689
689
|
private pickMetasByOrder;
|
|
690
690
|
private hasRemoteOptionSource;
|
|
691
|
+
private normalizeFilterOptionEndpointMetadata;
|
|
692
|
+
private toOwningResourcePathForOptionsFilter;
|
|
691
693
|
private withInferredFilterControlType;
|
|
692
694
|
private isAllowedFilterControlType;
|
|
693
695
|
private inferFilterControlType;
|
|
@@ -727,6 +729,7 @@ declare class PraxisFilter implements OnInit, OnChanges, AfterViewInit, OnDestro
|
|
|
727
729
|
}): string;
|
|
728
730
|
private isFilterFieldHidden;
|
|
729
731
|
onAddSelectionChange(values: string[] | null | undefined): void;
|
|
732
|
+
private mergeSelectedFieldIds;
|
|
730
733
|
private formatWithCount;
|
|
731
734
|
getAddAriaLabel(): string;
|
|
732
735
|
getAddTriggerLabel(): string;
|
|
@@ -1091,6 +1094,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1091
1094
|
private lastResolvedDataMode;
|
|
1092
1095
|
private localFilterFieldMetadataCache;
|
|
1093
1096
|
private localFilterFieldMetadataCacheKey;
|
|
1097
|
+
private remoteDataLoadSequence;
|
|
1094
1098
|
private analyticsLoadSequence;
|
|
1095
1099
|
private uncontrolledExpandedRowKeys;
|
|
1096
1100
|
private readonly expansionOpaqueRefCacheLimit;
|
|
@@ -1134,6 +1138,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1134
1138
|
shouldShowToolbarTopPlacement(): boolean;
|
|
1135
1139
|
shouldShowToolbarBottomPlacement(): boolean;
|
|
1136
1140
|
shouldRenderFooterToolbar(): boolean;
|
|
1141
|
+
hasTopToolbarStack(): boolean;
|
|
1137
1142
|
shouldShowFooterToolbarMain(): boolean;
|
|
1138
1143
|
shouldShowFooterToolbarEndActions(): boolean;
|
|
1139
1144
|
getToolbarActionsPosition(): 'top' | 'bottom' | 'both';
|