@praxisui/table 8.0.0-beta.65 → 8.0.0-beta.67
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-Opr6LFdK.mjs → praxisui-table-praxisui-table-D2MmgleA.mjs} +1 -1
- package/fesm2022/{praxisui-table-table-ai.adapter-qfy6aMSq.mjs → praxisui-table-table-ai.adapter-q4vtNR8o.mjs} +64 -6
- package/fesm2022/praxisui-table.mjs +1 -1
- package/package.json +10 -10
|
@@ -39578,7 +39578,7 @@ class PraxisTable {
|
|
|
39578
39578
|
if (this.aiAdapter || this.aiAdapterLoadStarted)
|
|
39579
39579
|
return;
|
|
39580
39580
|
this.aiAdapterLoadStarted = true;
|
|
39581
|
-
import('./praxisui-table-table-ai.adapter-
|
|
39581
|
+
import('./praxisui-table-table-ai.adapter-q4vtNR8o.mjs')
|
|
39582
39582
|
.then(({ TableAiAdapter }) => {
|
|
39583
39583
|
this.aiAdapter = new TableAiAdapter(this);
|
|
39584
39584
|
this.initializeAiAssistantController();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { firstValueFrom } from 'rxjs';
|
|
2
2
|
import { BaseAiAdapter, createComponentAuthoringContext } from '@praxisui/ai';
|
|
3
3
|
import { deepMerge } from '@praxisui/core';
|
|
4
|
-
import { z as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, R as coerceTableComponentEditPlans, W as compileTableComponentEditPlans, G as TASK_PRESETS, $ as getTableComponentEditPlanCapabilities, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-
|
|
4
|
+
import { z as TABLE_COMPONENT_EDIT_PLAN_OPERATION_IDS, k as PRAXIS_TABLE_AUTHORING_MANIFEST, T as TABLE_AI_CAPABILITIES, R as coerceTableComponentEditPlans, W as compileTableComponentEditPlans, G as TASK_PRESETS, $ as getTableComponentEditPlanCapabilities, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, y as TABLE_COMPONENT_EDIT_PLAN_KIND } from './praxisui-table-praxisui-table-D2MmgleA.mjs';
|
|
5
5
|
|
|
6
6
|
const TABLE_COMPONENT_CONTEXT_PACK = {
|
|
7
7
|
version: 'v1',
|
|
@@ -2768,7 +2768,7 @@ class TableAiAdapter extends BaseAiAdapter {
|
|
|
2768
2768
|
error: 'A operacao dynamicPage.surface.open exige surfaceId.',
|
|
2769
2769
|
};
|
|
2770
2770
|
}
|
|
2771
|
-
const surface = this.
|
|
2771
|
+
const surface = this.getRecordSurfaceForOpenInput(operation.input);
|
|
2772
2772
|
if (!surface) {
|
|
2773
2773
|
return {
|
|
2774
2774
|
success: false,
|
|
@@ -2810,6 +2810,55 @@ class TableAiAdapter extends BaseAiAdapter {
|
|
|
2810
2810
|
.map((surface) => this.toRecord(surface))
|
|
2811
2811
|
.find((surface) => this.stringValue(surface?.['id']).toLowerCase() === normalized) ?? null;
|
|
2812
2812
|
}
|
|
2813
|
+
getRecordSurfaceForOpenInput(input) {
|
|
2814
|
+
const surfaceId = this.stringValue(input['surfaceId'] ?? input['id']);
|
|
2815
|
+
const exact = this.getRecordSurfaceById(surfaceId);
|
|
2816
|
+
if (exact)
|
|
2817
|
+
return exact;
|
|
2818
|
+
const aliases = [
|
|
2819
|
+
surfaceId,
|
|
2820
|
+
this.stringValue(input['surfaceLabel']),
|
|
2821
|
+
this.stringValue(input['label']),
|
|
2822
|
+
this.stringValue(input['title']),
|
|
2823
|
+
]
|
|
2824
|
+
.map((value) => this.normalizeRecordSurfaceAlias(value))
|
|
2825
|
+
.filter(Boolean);
|
|
2826
|
+
if (!aliases.length)
|
|
2827
|
+
return null;
|
|
2828
|
+
const recordSurfaces = this.getRecordSurfaceAuthoringContext();
|
|
2829
|
+
const surfaces = Array.isArray(recordSurfaces?.['surfaces']) ? recordSurfaces['surfaces'] : [];
|
|
2830
|
+
const matches = surfaces
|
|
2831
|
+
.map((surface) => this.toRecord(surface))
|
|
2832
|
+
.filter((surface) => !!surface && aliases.some((alias) => this.recordSurfaceAliases(surface).has(alias)));
|
|
2833
|
+
return matches.length === 1 ? matches[0] : null;
|
|
2834
|
+
}
|
|
2835
|
+
recordSurfaceAliases(surface) {
|
|
2836
|
+
const aliases = new Set();
|
|
2837
|
+
const resourceSurface = this.toRecord(surface['resourceSurface']);
|
|
2838
|
+
const add = (value) => {
|
|
2839
|
+
const normalized = this.normalizeRecordSurfaceAlias(value);
|
|
2840
|
+
if (!normalized)
|
|
2841
|
+
return;
|
|
2842
|
+
aliases.add(normalized);
|
|
2843
|
+
aliases.add(this.normalizeRecordSurfaceAlias(`open-${normalized}`));
|
|
2844
|
+
};
|
|
2845
|
+
add(surface['id']);
|
|
2846
|
+
add(surface['label']);
|
|
2847
|
+
add(surface['description']);
|
|
2848
|
+
add(resourceSurface?.['id']);
|
|
2849
|
+
add(resourceSurface?.['title']);
|
|
2850
|
+
add(resourceSurface?.['description']);
|
|
2851
|
+
return aliases;
|
|
2852
|
+
}
|
|
2853
|
+
normalizeRecordSurfaceAlias(value) {
|
|
2854
|
+
return this.stringValue(value)
|
|
2855
|
+
.normalize('NFD')
|
|
2856
|
+
.replace(/[\u0300-\u036f]/g, '')
|
|
2857
|
+
.toLowerCase()
|
|
2858
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
2859
|
+
.replace(/-+/g, '-')
|
|
2860
|
+
.replace(/^-|-$/g, '');
|
|
2861
|
+
}
|
|
2813
2862
|
hydrateRecordSurfaceRowActionPlans(plans) {
|
|
2814
2863
|
if (!plans?.length)
|
|
2815
2864
|
return plans;
|
|
@@ -2826,19 +2875,28 @@ class TableAiAdapter extends BaseAiAdapter {
|
|
|
2826
2875
|
const nestedValue = this.toRecord(input['value']);
|
|
2827
2876
|
const declaredSurfaceId = this.stringValue(this.toRecord(input['recordSurface'])?.['id'])
|
|
2828
2877
|
|| this.stringValue(this.toRecord(nestedValue?.['recordSurface'])?.['id']);
|
|
2829
|
-
|
|
2878
|
+
const actionId = this.stringValue(input['action'])
|
|
2879
|
+
|| this.stringValue(this.toRecord(input['globalAction'])?.['actionId']);
|
|
2880
|
+
const surfaceEntry = declaredSurfaceId
|
|
2881
|
+
? this.getRecordSurfaceById(declaredSurfaceId)
|
|
2882
|
+
: actionId === 'surface.open'
|
|
2883
|
+
? this.getRecordSurfaceForOpenInput(input)
|
|
2884
|
+
: null;
|
|
2885
|
+
if (!surfaceEntry)
|
|
2830
2886
|
return plan;
|
|
2831
|
-
const surfaceEntry = this.getRecordSurfaceById(declaredSurfaceId);
|
|
2832
2887
|
const resourceSurface = this.toRecord(surfaceEntry?.['resourceSurface']) ?? surfaceEntry;
|
|
2833
2888
|
if (!resourceSurface)
|
|
2834
2889
|
return plan;
|
|
2890
|
+
const surfaceId = this.stringValue(surfaceEntry['id'])
|
|
2891
|
+
|| this.stringValue(resourceSurface['id'])
|
|
2892
|
+
|| declaredSurfaceId;
|
|
2835
2893
|
const label = this.stringValue(input['label'])
|
|
2836
2894
|
|| this.stringValue(surfaceEntry?.['label'])
|
|
2837
2895
|
|| this.stringValue(resourceSurface['title'])
|
|
2838
|
-
||
|
|
2896
|
+
|| surfaceId;
|
|
2839
2897
|
const rowAction = {
|
|
2840
2898
|
...input,
|
|
2841
|
-
id: this.stringValue(input['id']) || `open-${
|
|
2899
|
+
id: this.stringValue(input['id']) || `open-${surfaceId}`,
|
|
2842
2900
|
label,
|
|
2843
2901
|
action: this.stringValue(input['action']) || 'surface.open',
|
|
2844
2902
|
icon: this.stringValue(input['icon']) || 'open_in_new',
|
|
@@ -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 PraxisFilter, n as PraxisFilterWidgetConfigEditor, o as PraxisTable, p as PraxisTableConfigEditor, q as PraxisTableInlineAuthoringEditorComponent, r as PraxisTableToolbar, s as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, t as TABLE_COMPONENT_AI_CAPABILITIES, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, y as TABLE_COMPONENT_EDIT_PLAN_KIND, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, G as TASK_PRESETS, H as TableDefaultsProvider, I as TableRulesEditorComponent, K as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, L as VisualFormulaBuilderComponent, O as buildTableApplyPlan, Q as coerceTableComponentEditPlan, R as coerceTableComponentEditPlans, U as compileTableComponentEditPlan, W as compileTableComponentEditPlans, X as createTableAuthoringDocument, Y as getActionId, Z as getEnum, _ as getTableCapabilities, $ as getTableComponentEditPlanCapabilities, a0 as isTableRendererSupportedByRichContentP0, a1 as mapTableRendererToRichContentP0, a2 as normalizeTableAuthoringDocument, a3 as parseLegacyOrTableDocument, a4 as providePraxisFilterMetadata, a5 as providePraxisTableMetadata, a6 as serializeTableAuthoringDocument, a7 as toCanonicalTableConfig, a8 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 PraxisFilter, n as PraxisFilterWidgetConfigEditor, o as PraxisTable, p as PraxisTableConfigEditor, q as PraxisTableInlineAuthoringEditorComponent, r as PraxisTableToolbar, s as PraxisTableWidgetConfigEditor, S as STRING_PRESETS, T as TABLE_AI_CAPABILITIES, t as TABLE_COMPONENT_AI_CAPABILITIES, u as TABLE_COMPONENT_EDIT_PLAN_ALLOWED_CHANGE_KINDS, v as TABLE_COMPONENT_EDIT_PLAN_BATCH_KIND, w as TABLE_COMPONENT_EDIT_PLAN_EXPECTED_PATHS, x as TABLE_COMPONENT_EDIT_PLAN_JSON_SCHEMA, y as TABLE_COMPONENT_EDIT_PLAN_KIND, E as TABLE_COMPONENT_EDIT_PLAN_VERSION, G as TASK_PRESETS, H as TableDefaultsProvider, I as TableRulesEditorComponent, K as ToolbarActionsEditorComponent, V as ValueMappingEditorComponent, L as VisualFormulaBuilderComponent, O as buildTableApplyPlan, Q as coerceTableComponentEditPlan, R as coerceTableComponentEditPlans, U as compileTableComponentEditPlan, W as compileTableComponentEditPlans, X as createTableAuthoringDocument, Y as getActionId, Z as getEnum, _ as getTableCapabilities, $ as getTableComponentEditPlanCapabilities, a0 as isTableRendererSupportedByRichContentP0, a1 as mapTableRendererToRichContentP0, a2 as normalizeTableAuthoringDocument, a3 as parseLegacyOrTableDocument, a4 as providePraxisFilterMetadata, a5 as providePraxisTableMetadata, a6 as serializeTableAuthoringDocument, a7 as toCanonicalTableConfig, a8 as validateTableAuthoringDocument } from './praxisui-table-praxisui-table-D2MmgleA.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.67",
|
|
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.67",
|
|
9
|
+
"@praxisui/core": "^8.0.0-beta.67",
|
|
10
|
+
"@praxisui/dynamic-fields": "^8.0.0-beta.67",
|
|
11
|
+
"@praxisui/dynamic-form": "^8.0.0-beta.67",
|
|
12
|
+
"@praxisui/metadata-editor": "^8.0.0-beta.67",
|
|
13
|
+
"@praxisui/rich-content": "^8.0.0-beta.67",
|
|
14
|
+
"@praxisui/settings-panel": "^8.0.0-beta.67",
|
|
15
|
+
"@praxisui/table-rule-builder": "^8.0.0-beta.67",
|
|
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.67",
|
|
21
21
|
"rxjs": "~7.8.0"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|