@praxisui/table 8.0.0-beta.90 → 8.0.0-beta.91
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-Db_nPX-d.mjs → praxisui-table-praxisui-table-BMNKohqK.mjs} +151 -2
- package/fesm2022/{praxisui-table-table-ai.adapter-DBaPq8mg.mjs → praxisui-table-table-ai.adapter-D034N3RL.mjs} +1 -1
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
- package/types/praxisui-table.d.ts +1 -0
|
@@ -39945,7 +39945,7 @@ class PraxisTable {
|
|
|
39945
39945
|
if (this.aiAdapter || this.aiAdapterLoadStarted)
|
|
39946
39946
|
return;
|
|
39947
39947
|
this.aiAdapterLoadStarted = true;
|
|
39948
|
-
import('./praxisui-table-table-ai.adapter-
|
|
39948
|
+
import('./praxisui-table-table-ai.adapter-D034N3RL.mjs')
|
|
39949
39949
|
.then(({ TableAiAdapter }) => {
|
|
39950
39950
|
this.aiAdapter = new TableAiAdapter(this);
|
|
39951
39951
|
this.initializeAiAssistantController();
|
|
@@ -40277,7 +40277,10 @@ class PraxisTable {
|
|
|
40277
40277
|
});
|
|
40278
40278
|
}
|
|
40279
40279
|
if (intents.length < 4) {
|
|
40280
|
-
const availableRecommendations =
|
|
40280
|
+
const availableRecommendations = [
|
|
40281
|
+
...intents,
|
|
40282
|
+
...this.getAiAssistantCapabilityDiscoveryRecommendations(t, tableContext),
|
|
40283
|
+
]
|
|
40281
40284
|
.slice(0, 5)
|
|
40282
40285
|
.map((intent) => ({
|
|
40283
40286
|
id: intent.id,
|
|
@@ -40322,6 +40325,152 @@ class PraxisTable {
|
|
|
40322
40325
|
}
|
|
40323
40326
|
return intents.slice(0, 6);
|
|
40324
40327
|
}
|
|
40328
|
+
getAiAssistantCapabilityDiscoveryRecommendations(t, tableContext) {
|
|
40329
|
+
const columns = (this.config?.columns ?? [])
|
|
40330
|
+
.filter((column) => !!column?.field)
|
|
40331
|
+
.slice(0, 12);
|
|
40332
|
+
if (!columns.length)
|
|
40333
|
+
return [];
|
|
40334
|
+
const columnLabel = (column) => column.header || column.field;
|
|
40335
|
+
const normalizedColumnText = (column) => this.normalizeFieldAlias([column.field, column.header].filter(Boolean).join(' '));
|
|
40336
|
+
const recommendations = [];
|
|
40337
|
+
const componentState = {
|
|
40338
|
+
...tableContext,
|
|
40339
|
+
columns: columns.map((column) => ({
|
|
40340
|
+
field: column.field,
|
|
40341
|
+
header: columnLabel(column),
|
|
40342
|
+
type: column.type ?? null,
|
|
40343
|
+
visible: column.visible !== false,
|
|
40344
|
+
rendererType: column.renderer?.type ?? null,
|
|
40345
|
+
})),
|
|
40346
|
+
};
|
|
40347
|
+
const visibleColumns = columns.filter((column) => column.visible !== false);
|
|
40348
|
+
const columnLabels = (items) => items
|
|
40349
|
+
.slice(0, 4)
|
|
40350
|
+
.map((column) => columnLabel(column))
|
|
40351
|
+
.filter((label) => !!label)
|
|
40352
|
+
.join(', ');
|
|
40353
|
+
if (visibleColumns.length > 5) {
|
|
40354
|
+
recommendations.push({
|
|
40355
|
+
id: 'table-curate-compact-view',
|
|
40356
|
+
label: t('table.assistant.recommendation.compactView.label', 'Compactar visual da tabela'),
|
|
40357
|
+
description: t('table.assistant.recommendation.compactView.description', 'Prioriza as colunas essenciais e reduz ruído visual para leitura rápida.'),
|
|
40358
|
+
group: {
|
|
40359
|
+
id: 'table-appearance',
|
|
40360
|
+
label: t('table.assistant.recommendation.group.appearance', 'Apresentação'),
|
|
40361
|
+
},
|
|
40362
|
+
icon: 'view_week',
|
|
40363
|
+
tone: 'neutral',
|
|
40364
|
+
action: {
|
|
40365
|
+
kind: 'submit-prompt',
|
|
40366
|
+
prompt: t('table.assistant.recommendation.compactView.prompt', 'Deixe esta tabela mais compacta e priorize as colunas mais importantes para uma visão operacional.'),
|
|
40367
|
+
contextHints: {
|
|
40368
|
+
source: 'table-capability-discovery-curation',
|
|
40369
|
+
opportunityId: 'table.appearance.compact-view',
|
|
40370
|
+
target: { kind: 'component', id: tableContext.tableId },
|
|
40371
|
+
componentState,
|
|
40372
|
+
},
|
|
40373
|
+
},
|
|
40374
|
+
requiresConfirmation: false,
|
|
40375
|
+
sourceCandidateIds: ['table.appearance.compact-view'],
|
|
40376
|
+
});
|
|
40377
|
+
}
|
|
40378
|
+
const publicViewCandidates = visibleColumns.filter((column) => column.type === 'currency'
|
|
40379
|
+
|| column.type === 'number'
|
|
40380
|
+
|| normalizedColumnText(column).includes('email')
|
|
40381
|
+
|| normalizedColumnText(column).includes('cpf')
|
|
40382
|
+
|| normalizedColumnText(column).includes('salario'));
|
|
40383
|
+
if (publicViewCandidates.length) {
|
|
40384
|
+
recommendations.push({
|
|
40385
|
+
id: 'table-curate-public-view',
|
|
40386
|
+
label: t('table.assistant.recommendation.publicView.label', 'Preparar visualização pública'),
|
|
40387
|
+
description: t('table.assistant.recommendation.publicView.description', 'Sugere ocultar dados sensíveis ou internos antes de compartilhar a tabela.'),
|
|
40388
|
+
group: {
|
|
40389
|
+
id: 'table-governance',
|
|
40390
|
+
label: t('table.assistant.recommendation.group.governance', 'Governança'),
|
|
40391
|
+
},
|
|
40392
|
+
icon: 'visibility_off',
|
|
40393
|
+
tone: 'warning',
|
|
40394
|
+
action: {
|
|
40395
|
+
kind: 'submit-prompt',
|
|
40396
|
+
prompt: t('table.assistant.recommendation.publicView.prompt', 'Prepare uma visualização pública desta tabela ocultando colunas sensíveis ou internas quando fizer sentido.'),
|
|
40397
|
+
contextHints: {
|
|
40398
|
+
source: 'table-capability-discovery-curation',
|
|
40399
|
+
opportunityId: 'table.governance.public-view',
|
|
40400
|
+
target: { kind: 'columns', id: `${tableContext.tableId}:public-view` },
|
|
40401
|
+
componentState,
|
|
40402
|
+
candidateColumns: publicViewCandidates.map((column) => ({
|
|
40403
|
+
field: column.field,
|
|
40404
|
+
label: columnLabel(column),
|
|
40405
|
+
type: column.type ?? null,
|
|
40406
|
+
})),
|
|
40407
|
+
},
|
|
40408
|
+
},
|
|
40409
|
+
requiresConfirmation: true,
|
|
40410
|
+
sourceCandidateIds: ['table.governance.public-view', 'column.visibility.set'],
|
|
40411
|
+
});
|
|
40412
|
+
}
|
|
40413
|
+
const booleanOrStatusColumn = columns.find((column) => column.type === 'boolean'
|
|
40414
|
+
|| normalizedColumnText(column).includes('status')
|
|
40415
|
+
|| normalizedColumnText(column).includes('ativo'));
|
|
40416
|
+
if (booleanOrStatusColumn) {
|
|
40417
|
+
recommendations.push({
|
|
40418
|
+
id: 'table-curate-status-badges',
|
|
40419
|
+
label: t('table.assistant.recommendation.statusBadge.label', 'Transformar status em badge'),
|
|
40420
|
+
description: t('table.assistant.recommendation.statusBadge.description', 'Melhora a leitura de estados booleanos ou operacionais com cores governadas.'),
|
|
40421
|
+
group: {
|
|
40422
|
+
id: 'table-appearance',
|
|
40423
|
+
label: t('table.assistant.recommendation.group.appearance', 'Apresentação'),
|
|
40424
|
+
},
|
|
40425
|
+
icon: 'verified',
|
|
40426
|
+
tone: 'success',
|
|
40427
|
+
action: {
|
|
40428
|
+
kind: 'submit-prompt',
|
|
40429
|
+
prompt: t('table.assistant.recommendation.statusBadge.prompt', 'Transforme a coluna de status ou ativo em badges visuais com texto curto e cores adequadas.'),
|
|
40430
|
+
contextHints: {
|
|
40431
|
+
source: 'table-capability-discovery-curation',
|
|
40432
|
+
opportunityId: 'table.appearance.status-badge',
|
|
40433
|
+
target: { kind: 'column', field: booleanOrStatusColumn.field },
|
|
40434
|
+
componentState,
|
|
40435
|
+
},
|
|
40436
|
+
},
|
|
40437
|
+
requiresConfirmation: true,
|
|
40438
|
+
sourceCandidateIds: ['table.appearance.status-badge', 'column.renderer.set'],
|
|
40439
|
+
});
|
|
40440
|
+
}
|
|
40441
|
+
const categoricalColumns = visibleColumns.filter((column) => column.type === 'string'
|
|
40442
|
+
&& /departamento|department|cargo|role|categoria|category/u.test(normalizedColumnText(column)));
|
|
40443
|
+
if (categoricalColumns.length) {
|
|
40444
|
+
recommendations.push({
|
|
40445
|
+
id: 'table-curate-categorical-chips',
|
|
40446
|
+
label: t('table.assistant.recommendation.categoryChips.label', 'Realçar categorias com chips'),
|
|
40447
|
+
description: t('table.assistant.recommendation.categoryChips.description', 'Usa renderização visual para campos categóricos como {columns}.', { columns: columnLabels(categoricalColumns) || t('table.assistant.recommendation.categoryChips.columnsFallback', 'categorias') }),
|
|
40448
|
+
group: {
|
|
40449
|
+
id: 'table-appearance',
|
|
40450
|
+
label: t('table.assistant.recommendation.group.appearance', 'Apresentação'),
|
|
40451
|
+
},
|
|
40452
|
+
icon: 'sell',
|
|
40453
|
+
tone: 'resource',
|
|
40454
|
+
action: {
|
|
40455
|
+
kind: 'submit-prompt',
|
|
40456
|
+
prompt: t('table.assistant.recommendation.categoryChips.prompt', 'Melhore a leitura das colunas categóricas desta tabela usando chips, badges ou outra apresentação visual adequada.'),
|
|
40457
|
+
contextHints: {
|
|
40458
|
+
source: 'table-capability-discovery-curation',
|
|
40459
|
+
opportunityId: 'table.appearance.categorical-chips',
|
|
40460
|
+
target: { kind: 'columns', id: `${tableContext.tableId}:categorical-columns` },
|
|
40461
|
+
componentState,
|
|
40462
|
+
candidateColumns: categoricalColumns.map((column) => ({
|
|
40463
|
+
field: column.field,
|
|
40464
|
+
label: columnLabel(column),
|
|
40465
|
+
})),
|
|
40466
|
+
},
|
|
40467
|
+
},
|
|
40468
|
+
requiresConfirmation: true,
|
|
40469
|
+
sourceCandidateIds: ['table.appearance.categorical-chips', 'column.renderer.set'],
|
|
40470
|
+
});
|
|
40471
|
+
}
|
|
40472
|
+
return recommendations;
|
|
40473
|
+
}
|
|
40325
40474
|
onAiAssistantRecommendedIntent(intent) {
|
|
40326
40475
|
const controller = this.aiAssistantController;
|
|
40327
40476
|
if (!controller)
|
|
@@ -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-BMNKohqK.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-
|
|
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-BMNKohqK.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.91",
|
|
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.91",
|
|
9
|
+
"@praxisui/core": "^8.0.0-beta.91",
|
|
10
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.91",
|
|
11
|
+
"@praxisui/dynamic-form": "^8.0.0-beta.91",
|
|
12
|
+
"@praxisui/metadata-editor": "^8.0.0-beta.91",
|
|
13
|
+
"@praxisui/rich-content": "^8.0.0-beta.91",
|
|
14
|
+
"@praxisui/settings-panel": "^8.0.0-beta.91",
|
|
15
|
+
"@praxisui/table-rule-builder": "^8.0.0-beta.91",
|
|
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.91",
|
|
21
21
|
"rxjs": "~7.8.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
@@ -1335,6 +1335,7 @@ declare class PraxisTable implements OnInit, OnChanges, AfterViewInit, AfterCont
|
|
|
1335
1335
|
onAiAssistantCancel(): void;
|
|
1336
1336
|
onAiAssistantQuickReply(reply: PraxisAssistantShellQuickReply): void;
|
|
1337
1337
|
getAiAssistantRecommendedIntents(): readonly PraxisAssistantRecommendedIntent[];
|
|
1338
|
+
private getAiAssistantCapabilityDiscoveryRecommendations;
|
|
1338
1339
|
onAiAssistantRecommendedIntent(intent: PraxisAssistantRecommendedIntent): void;
|
|
1339
1340
|
private getAiAssistantRecommendationResponseContract;
|
|
1340
1341
|
onAiAssistantEditMessage(message: PraxisAssistantShellMessage): void;
|