@praxisui/table 8.0.0-beta.101 → 8.0.0-beta.102

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.
@@ -39948,7 +39948,7 @@ class PraxisTable {
39948
39948
  if (this.aiAdapter || this.aiAdapterLoadStarted)
39949
39949
  return;
39950
39950
  this.aiAdapterLoadStarted = true;
39951
- import('./praxisui-table-table-ai.adapter-C9ch90hi.mjs')
39951
+ import('./praxisui-table-table-ai.adapter-D1VAQO63.mjs')
39952
39952
  .then(({ TableAiAdapter }) => {
39953
39953
  this.aiAdapter = new TableAiAdapter(this);
39954
39954
  this.initializeAiAssistantController();
@@ -40678,7 +40678,7 @@ class PraxisTable {
40678
40678
  initializeAiAssistantController() {
40679
40679
  if (!this.aiAdapter || this.aiAssistantController)
40680
40680
  return;
40681
- import('./praxisui-table-table-agentic-authoring-turn-flow-B9D6QMS2.mjs')
40681
+ import('./praxisui-table-table-agentic-authoring-turn-flow-CC5bOKf5.mjs')
40682
40682
  .then(({ TableAgenticAuthoringTurnFlow }) => {
40683
40683
  if (this.aiAssistantController || !this.aiAdapter)
40684
40684
  return;
@@ -7496,16 +7496,17 @@ class TableAgenticAuthoringTurnFlow {
7496
7496
  .slice(0, 4);
7497
7497
  const dateRanges = fields
7498
7498
  .map((field) => {
7499
- const timestamps = rows
7500
- .map((row) => this.dateTimestamp(row[field]))
7501
- .filter((value) => value !== null);
7502
- if (timestamps.length < 2)
7499
+ const values = rows
7500
+ .map((row) => this.analysisDateValue(row[field]))
7501
+ .filter((value) => !!value);
7502
+ if (values.length < 2)
7503
7503
  return null;
7504
- const min = Math.min(...timestamps);
7505
- const max = Math.max(...timestamps);
7506
- if (min === max)
7504
+ const sorted = [...values].sort((left, right) => left.sort - right.sort);
7505
+ const min = sorted[0];
7506
+ const max = sorted[sorted.length - 1];
7507
+ if (!min || !max || min.sort === max.sort)
7507
7508
  return null;
7508
- return `${labelByField.get(field) || this.humanizeField(field)}: ${this.formatAnalysisDate(min)} até ${this.formatAnalysisDate(max)}`;
7509
+ return `${labelByField.get(field) || this.humanizeField(field)}: ${min.label} até ${max.label}`;
7509
7510
  })
7510
7511
  .filter((entry) => !!entry)
7511
7512
  .slice(0, 3);
@@ -7561,6 +7562,27 @@ class TableAgenticAuthoringTurnFlow {
7561
7562
  : Number.NaN;
7562
7563
  return Number.isFinite(raw) ? raw : null;
7563
7564
  }
7565
+ analysisDateValue(value) {
7566
+ if (typeof value === 'string') {
7567
+ const trimmed = value.trim();
7568
+ const dateOnly = /^(\d{4})-(\d{2})-(\d{2})$/u.exec(trimmed);
7569
+ if (dateOnly) {
7570
+ const year = Number(dateOnly[1]);
7571
+ const month = Number(dateOnly[2]);
7572
+ const day = Number(dateOnly[3]);
7573
+ if (Number.isInteger(year) && Number.isInteger(month) && Number.isInteger(day)) {
7574
+ return {
7575
+ sort: year * 10000 + month * 100 + day,
7576
+ label: `${String(day).padStart(2, '0')}/${String(month).padStart(2, '0')}/${String(year)}`,
7577
+ };
7578
+ }
7579
+ }
7580
+ }
7581
+ const timestamp = this.dateTimestamp(value);
7582
+ return timestamp === null
7583
+ ? null
7584
+ : { sort: timestamp, label: this.formatAnalysisDate(timestamp) };
7585
+ }
7564
7586
  formatAnalysisDate(timestamp) {
7565
7587
  return new Intl.DateTimeFormat('pt-BR', {
7566
7588
  day: '2-digit',
@@ -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-BW05k1Xw.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-DDUl1Vav.mjs';
5
5
 
6
6
  const TABLE_COMPONENT_CONTEXT_PACK = {
7
7
  version: 'v1',
@@ -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-BW05k1Xw.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-DDUl1Vav.mjs';
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "@praxisui/table",
3
- "version": "8.0.0-beta.101",
3
+ "version": "8.0.0-beta.102",
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.101",
9
- "@praxisui/core": "^8.0.0-beta.101",
10
- "@praxisui/dynamic-fields": "^8.0.0-beta.101",
11
- "@praxisui/dynamic-form": "^8.0.0-beta.101",
12
- "@praxisui/metadata-editor": "^8.0.0-beta.101",
13
- "@praxisui/rich-content": "^8.0.0-beta.101",
14
- "@praxisui/settings-panel": "^8.0.0-beta.101",
15
- "@praxisui/table-rule-builder": "^8.0.0-beta.101",
8
+ "@praxisui/ai": "^8.0.0-beta.102",
9
+ "@praxisui/core": "^8.0.0-beta.102",
10
+ "@praxisui/dynamic-fields": "^8.0.0-beta.102",
11
+ "@praxisui/dynamic-form": "^8.0.0-beta.102",
12
+ "@praxisui/metadata-editor": "^8.0.0-beta.102",
13
+ "@praxisui/rich-content": "^8.0.0-beta.102",
14
+ "@praxisui/settings-panel": "^8.0.0-beta.102",
15
+ "@praxisui/table-rule-builder": "^8.0.0-beta.102",
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.101",
20
+ "@praxisui/dialog": "^8.0.0-beta.102",
21
21
  "rxjs": "~7.8.0"
22
22
  },
23
23
  "dependencies": {