@praxisui/table 9.0.0-beta.22 → 9.0.0-beta.26

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.
@@ -1,7 +1,7 @@
1
1
  import { firstValueFrom } from 'rxjs';
2
2
  import { BaseAiAdapter, sanitizePraxisAssistantText, 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-D07QUesj.mjs';
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-mNsK6DE9.mjs';
5
5
 
6
6
  const TABLE_ROW_EXPRESSION_CONTEXT_OPTION = {
7
7
  mode: 'expression',
@@ -434,18 +434,36 @@ const TABLE_COMPONENT_CONTEXT_PACK = {
434
434
  'columns[].renderer.microVisualization.visualization.valueExpr': {
435
435
  ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
436
436
  },
437
+ 'columns[].renderer.microVisualization.visualization.valueSuffixExpr': {
438
+ ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
439
+ },
440
+ 'columns[].renderer.microVisualization.visualization.totalExpr': {
441
+ ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
442
+ },
437
443
  'columns[].renderer.microVisualization.visualization.targetExpr': {
438
444
  ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
439
445
  },
446
+ 'columns[].renderer.microVisualization.visualization.baselineExpr': {
447
+ ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
448
+ },
440
449
  'columns[].renderer.microVisualization.visualization.segmentsExpr': {
441
450
  ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
442
451
  },
443
452
  'columns[].renderer.microVisualization.visualization.pointsExpr': {
444
453
  ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
445
454
  },
455
+ 'columns[].renderer.microVisualization.visualization.thresholdsExpr': {
456
+ ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
457
+ },
458
+ 'columns[].renderer.microVisualization.visualization.itemsExpr': {
459
+ ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
460
+ },
446
461
  'columns[].renderer.microVisualization.visualization.toneExpr': {
447
462
  ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
448
463
  },
464
+ 'columns[].renderer.microVisualization.visualization.ariaLabelExpr': {
465
+ ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
466
+ },
449
467
  'columns[].renderer.microVisualization.visualization.fallbackTextExpr': {
450
468
  ...TABLE_ROW_EXPRESSION_CONTEXT_OPTION,
451
469
  },
@@ -1604,7 +1622,7 @@ const TABLE_COMPONENT_CONTEXT_PACK = {
1604
1622
  {
1605
1623
  name: 'condition',
1606
1624
  type: 'STRING',
1607
- description: 'Expressao condicional (ex: recompensa > 500000)'
1625
+ description: 'Objeto JSON Logic canonico serializado, nunca DSL textual (ex: { ">": [{ "var": "recompensa" }, 500000] })'
1608
1626
  },
1609
1627
  {
1610
1628
  name: 'renderer',
@@ -3708,7 +3726,13 @@ Columns Analysis:
3708
3726
  const isRootArray = currentPath && (allowedPaths.has(currentPath + '[]') || Array.from(allowedPaths).some(p => p.startsWith(currentPath + '[].')));
3709
3727
  if (!isRootArray)
3710
3728
  return obj; // É um valor array (ex: tags), retorna direto
3711
- return obj.map(item => recurse(item, currentPath + '[]'));
3729
+ const items = obj.map(item => recurse(item, currentPath + '[]'));
3730
+ if (currentPath === 'columns[].conditionalRenderers'
3731
+ || currentPath === 'columns[].conditionalStyles'
3732
+ || currentPath === 'rowConditionalStyles') {
3733
+ return items.filter((item) => this.hasCanonicalConditionalRule(item));
3734
+ }
3735
+ return items;
3712
3736
  }
3713
3737
  const cleanObj = {};
3714
3738
  for (const key of Object.keys(obj)) {
@@ -3720,14 +3744,6 @@ Columns Analysis:
3720
3744
  const exactMatch = allowedPaths.has(newPath) || isIdentityField;
3721
3745
  const prefixMatch = Array.from(allowedPaths).some(p => p.startsWith(newPath + '.') || p.startsWith(newPath + '['));
3722
3746
  if (exactMatch || prefixMatch) {
3723
- if (exactMatch
3724
- && (passthroughObjectPaths.has(newPath) || jsonLogicObjectPaths.has(newPath))
3725
- && typeof obj[key] === 'object'
3726
- && obj[key] !== null
3727
- && !Array.isArray(obj[key])) {
3728
- cleanObj[key] = obj[key];
3729
- continue;
3730
- }
3731
3747
  if (newPath === 'columns[].computed.expression') {
3732
3748
  if (!obj[key] || typeof obj[key] !== 'object' || Array.isArray(obj[key])) {
3733
3749
  warnings.push(`Computed expression inválida: ${newPath} (deve ser Json Logic)`);
@@ -3740,6 +3756,22 @@ Columns Analysis:
3740
3756
  cleanObj[key] = obj[key];
3741
3757
  continue;
3742
3758
  }
3759
+ if (exactMatch && jsonLogicObjectPaths.has(newPath)) {
3760
+ if (!this.isCanonicalJsonLogicObject(obj[key])) {
3761
+ warnings.push(`Condicao Json Logic invalida: ${newPath} (deve ser objeto Json Logic)`);
3762
+ continue;
3763
+ }
3764
+ cleanObj[key] = obj[key];
3765
+ continue;
3766
+ }
3767
+ if (exactMatch
3768
+ && passthroughObjectPaths.has(newPath)
3769
+ && typeof obj[key] === 'object'
3770
+ && obj[key] !== null
3771
+ && !Array.isArray(obj[key])) {
3772
+ cleanObj[key] = obj[key];
3773
+ continue;
3774
+ }
3743
3775
  const val = recurse(obj[key], newPath);
3744
3776
  // Se for objeto vazio após limpeza, não inclui (salvo se for intenção explicita de limpar config, mas patch geralmente é aditivo)
3745
3777
  if (typeof val === 'object' && val !== null && !Array.isArray(val) && Object.keys(val).length === 0) {
@@ -3758,6 +3790,17 @@ Columns Analysis:
3758
3790
  const sanitized = recurse(patch, '');
3759
3791
  return { sanitized, warnings };
3760
3792
  }
3793
+ isCanonicalJsonLogicObject(value) {
3794
+ return !!value
3795
+ && typeof value === 'object'
3796
+ && !Array.isArray(value)
3797
+ && Object.keys(value).length === 1;
3798
+ }
3799
+ hasCanonicalConditionalRule(value) {
3800
+ if (!value || typeof value !== 'object' || Array.isArray(value))
3801
+ return false;
3802
+ return this.isCanonicalJsonLogicObject(value['condition']);
3803
+ }
3761
3804
  // -------- Internal helpers --------
3762
3805
  /**
3763
3806
  * Specialized merge for TableConfig that handles Array reconciliation safely.
@@ -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-D07QUesj.mjs';
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-mNsK6DE9.mjs';
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "9.0.0-beta.22",
3
+ "version": "9.0.0-beta.26",
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
8
  "@angular/platform-browser": "^21.0.0",
9
- "@praxisui/ai": "^9.0.0-beta.22",
10
- "@praxisui/core": "^9.0.0-beta.22",
11
- "@praxisui/dynamic-fields": "^9.0.0-beta.22",
12
- "@praxisui/dynamic-form": "^9.0.0-beta.22",
13
- "@praxisui/metadata-editor": "^9.0.0-beta.22",
14
- "@praxisui/rich-content": "^9.0.0-beta.22",
15
- "@praxisui/settings-panel": "^9.0.0-beta.22",
16
- "@praxisui/table-rule-builder": "^9.0.0-beta.22",
9
+ "@praxisui/ai": "^9.0.0-beta.26",
10
+ "@praxisui/core": "^9.0.0-beta.26",
11
+ "@praxisui/dynamic-fields": "^9.0.0-beta.26",
12
+ "@praxisui/dynamic-form": "^9.0.0-beta.26",
13
+ "@praxisui/metadata-editor": "^9.0.0-beta.26",
14
+ "@praxisui/rich-content": "^9.0.0-beta.26",
15
+ "@praxisui/settings-panel": "^9.0.0-beta.26",
16
+ "@praxisui/table-rule-builder": "^9.0.0-beta.26",
17
17
  "@angular/cdk": "^21.0.0",
18
18
  "@angular/forms": "^21.0.0",
19
19
  "@angular/material": "^21.0.0",
20
20
  "@angular/router": "^21.0.0",
21
- "@praxisui/dialog": "^9.0.0-beta.22",
21
+ "@praxisui/dialog": "^9.0.0-beta.26",
22
22
  "rxjs": "~7.8.0"
23
23
  },
24
24
  "dependencies": {
@@ -142,7 +142,6 @@ declare class PraxisTableToolbar implements OnDestroy {
142
142
  private resolveVisibleWhenFallback;
143
143
  private resolveVisibleWhenFallbackPolicy;
144
144
  private resolveRuntimeEnvironment;
145
- private isDiagnosticsEnvironment;
146
145
  private buildEvaluationContext;
147
146
  private warnVisibleWhenFallback;
148
147
  private collectShortcutBindings;
@@ -1936,7 +1935,6 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
1936
1935
  private isJsonLogicExpression;
1937
1936
  private hasConditionalExpression;
1938
1937
  private resolveRuntimeEnvironment;
1939
- private isDiagnosticsRuntimeEnvironment;
1940
1938
  private logActionConditionFallback;
1941
1939
  getRowClasses(rowData: any): string[] | undefined;
1942
1940
  getRowNgStyle(rowData: any): Record<string, string> | undefined;