@praxisui/table 8.0.0-beta.3 → 8.0.0-beta.30
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 +150 -8
- package/docs/DSL-Extensions-Guide.md +23 -0
- package/docs/adr/2026-03-dynamic-filter-cross-lib-coupling.md +107 -0
- package/docs/adr/2026-03-filter-drawer-adapter-light-entrypoint.md +105 -0
- package/docs/adr/2026-03-table-editor-idfield-decision.md +85 -0
- package/docs/column-resize-reorder-implementation-plan.md +338 -0
- package/docs/column-resize-reorder-review-prompt.md +34 -0
- package/docs/dynamic-filter-architecture-overview.md +207 -0
- package/docs/dynamic-filter-backend-contract-cheatsheet.md +167 -0
- package/docs/dynamic-filter-editor-settings-guide.md +229 -0
- package/docs/dynamic-filter-host-integration-guide.md +266 -0
- package/docs/dynamic-filter-payload-contract.md +331 -0
- package/docs/dynamic-filter-range-filters-guide.md +296 -0
- package/docs/dynamic-filter-troubleshooting-guide.md +257 -0
- package/docs/dynamic-inline-filter-catalog.md +147 -0
- package/docs/e2e-column-drag-playwright.md +62 -0
- package/docs/expandable-rows-enterprise-big-leagues-plan.md +1080 -0
- package/docs/json-logic-operators-and-helpers.md +57 -0
- package/docs/local-data-mode-precedence.md +12 -0
- package/docs/local-data-pre-implementation-baseline.md +22 -0
- package/docs/local-data-preimplementation-go-no-go.md +39 -0
- package/docs/local-data-support-implementation-plan.md +524 -0
- package/docs/local-data-support-pr-package.md +66 -0
- package/docs/localization-persistence-merge.md +22 -0
- package/docs/performance-hardening-v2-implementation-plan.md +479 -0
- package/docs/playground-scenario-curation-plan.md +482 -0
- package/docs/playground-scenario-second-opinion-prompt.md +121 -0
- package/docs/playground-scenario-second-opinion-review.md +234 -0
- package/docs/release-notes-p1-hardening.md +76 -0
- package/docs/table-authoring-document-completeness-checklist.md +120 -0
- package/docs/table-editor-capability-review-prompt.md +349 -0
- package/docs/visual-rules-editor-transition.md +29 -0
- package/fesm2022/{praxisui-table-filter-form-dialog-host.component-Dm2f0muy.mjs → praxisui-table-filter-form-dialog-host.component-CN9JWFoa.mjs} +69 -14
- package/fesm2022/praxisui-table-praxisui-table-DFBE5wpp.mjs +57164 -0
- package/fesm2022/{praxisui-table-table-agentic-authoring-turn-flow-tu7jtTwV.mjs → praxisui-table-table-agentic-authoring-turn-flow-EigJf8mp.mjs} +59 -4
- package/fesm2022/praxisui-table-table-ai.adapter-7THXe94D.mjs +2674 -0
- package/fesm2022/praxisui-table.mjs +1 -51444
- package/index.d.ts +391 -114
- package/package.json +15 -9
- package/src/lib/praxis-table.json-api.md +1325 -0
- package/fesm2022/praxisui-table-table-ai.adapter-DxjDaQqy.mjs +0 -895
|
@@ -25,7 +25,7 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
25
25
|
const schemaFields = this.adapter.getSchemaFields?.()
|
|
26
26
|
?.map((field) => this.toAiJsonObject(field))
|
|
27
27
|
.filter((field) => Object.keys(field).length > 0);
|
|
28
|
-
const contextHints = this.optionalJsonObject(this.adapter.getAuthoringContext?.());
|
|
28
|
+
const contextHints = this.mergeJsonObjects(this.optionalJsonObject(this.adapter.getAuthoringContext?.()), this.optionalJsonObject(request.action?.contextHints));
|
|
29
29
|
const response = await firstValueFrom(this.aiApi.getPatch({
|
|
30
30
|
componentId,
|
|
31
31
|
componentType,
|
|
@@ -130,6 +130,7 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
130
130
|
sessionId: response.sessionId ?? request.sessionId,
|
|
131
131
|
assistantMessage: message,
|
|
132
132
|
statusText: message,
|
|
133
|
+
quickReplies: this.toQuickReplies(response),
|
|
133
134
|
canApply: false,
|
|
134
135
|
};
|
|
135
136
|
}
|
|
@@ -146,12 +147,11 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
146
147
|
}
|
|
147
148
|
if (response.patch && Object.keys(response.patch).length > 0) {
|
|
148
149
|
const warnings = response.warnings?.filter(Boolean) ?? [];
|
|
149
|
-
const suffix = warnings.length ? ` Avisos: ${warnings.join('; ')}` : '';
|
|
150
150
|
return {
|
|
151
151
|
state: 'review',
|
|
152
152
|
phase: 'review',
|
|
153
153
|
sessionId: response.sessionId ?? request.sessionId,
|
|
154
|
-
assistantMessage:
|
|
154
|
+
assistantMessage: response.explanation || 'Proposta de alteracao pronta para revisar.',
|
|
155
155
|
statusText: 'Revise a proposta antes de aplicar.',
|
|
156
156
|
canApply: true,
|
|
157
157
|
pendingPatch: response.patch,
|
|
@@ -173,9 +173,26 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
173
173
|
}
|
|
174
174
|
compileAdapterResponse(response) {
|
|
175
175
|
const compiled = this.adapter.compileAiResponse?.(response);
|
|
176
|
+
if (!compiled && response.patch && Object.keys(response.patch).length > 0) {
|
|
177
|
+
return {
|
|
178
|
+
type: 'error',
|
|
179
|
+
message: 'A tabela exige componentEditPlan validado pelo manifesto antes de gerar patch local.',
|
|
180
|
+
warnings: [
|
|
181
|
+
'free-table-patch-rejected',
|
|
182
|
+
'Use componentEditPlan validado contra PRAXIS_TABLE_AUTHORING_MANIFEST.',
|
|
183
|
+
],
|
|
184
|
+
};
|
|
185
|
+
}
|
|
176
186
|
if (!compiled) {
|
|
177
187
|
return response;
|
|
178
188
|
}
|
|
189
|
+
if (compiled.type === 'error') {
|
|
190
|
+
return {
|
|
191
|
+
type: 'error',
|
|
192
|
+
message: compiled.message || 'O componentEditPlan da tabela nao passou na validacao de capacidades.',
|
|
193
|
+
warnings: compiled.warnings,
|
|
194
|
+
};
|
|
195
|
+
}
|
|
179
196
|
const warnings = [
|
|
180
197
|
...(response.warnings ?? []),
|
|
181
198
|
...(compiled.warnings ?? []),
|
|
@@ -183,6 +200,7 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
183
200
|
return {
|
|
184
201
|
...response,
|
|
185
202
|
...compiled,
|
|
203
|
+
patch: compiled.patch,
|
|
186
204
|
warnings: warnings.length ? warnings : undefined,
|
|
187
205
|
};
|
|
188
206
|
}
|
|
@@ -221,12 +239,17 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
221
239
|
return payloads
|
|
222
240
|
.map((option, index) => {
|
|
223
241
|
const label = option.label?.trim() || option.value?.trim() || `Opcao ${index + 1}`;
|
|
224
|
-
const prompt = option.
|
|
242
|
+
const prompt = option.value?.trim() || option.example?.trim() || label;
|
|
225
243
|
return {
|
|
226
244
|
id: `option-${index + 1}`,
|
|
227
245
|
label,
|
|
228
246
|
prompt,
|
|
229
247
|
kind: 'clarification-option',
|
|
248
|
+
description: this.optionDescription(option),
|
|
249
|
+
icon: this.optionIcon(option),
|
|
250
|
+
tone: this.optionTone(option),
|
|
251
|
+
presentation: this.optionPresentation(option),
|
|
252
|
+
contextHints: this.optionContextHints(option),
|
|
230
253
|
};
|
|
231
254
|
});
|
|
232
255
|
}
|
|
@@ -239,6 +262,28 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
239
262
|
kind: 'clarification-option',
|
|
240
263
|
}));
|
|
241
264
|
}
|
|
265
|
+
optionContextHints(option) {
|
|
266
|
+
return this.toRecord(option.contextHints);
|
|
267
|
+
}
|
|
268
|
+
optionPresentation(option) {
|
|
269
|
+
const hints = this.optionContextHints(option);
|
|
270
|
+
return this.toRecord(hints?.['presentation']);
|
|
271
|
+
}
|
|
272
|
+
optionDescription(option) {
|
|
273
|
+
const presentation = this.optionPresentation(option);
|
|
274
|
+
const value = presentation?.['description'];
|
|
275
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
276
|
+
}
|
|
277
|
+
optionIcon(option) {
|
|
278
|
+
const presentation = this.optionPresentation(option);
|
|
279
|
+
const value = presentation?.['icon'];
|
|
280
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
281
|
+
}
|
|
282
|
+
optionTone(option) {
|
|
283
|
+
const presentation = this.optionPresentation(option);
|
|
284
|
+
const value = presentation?.['tone'];
|
|
285
|
+
return typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
286
|
+
}
|
|
242
287
|
buildCurrentStateDigest(currentState, dataProfile) {
|
|
243
288
|
const columns = Array.isArray(currentState['columns'])
|
|
244
289
|
? currentState['columns']
|
|
@@ -258,6 +303,16 @@ class TableAgenticAuthoringTurnFlow {
|
|
|
258
303
|
const object = this.toAiJsonObject(value);
|
|
259
304
|
return Object.keys(object).length ? object : undefined;
|
|
260
305
|
}
|
|
306
|
+
mergeJsonObjects(base, overlay) {
|
|
307
|
+
if (!base)
|
|
308
|
+
return overlay;
|
|
309
|
+
if (!overlay)
|
|
310
|
+
return base;
|
|
311
|
+
return {
|
|
312
|
+
...base,
|
|
313
|
+
...overlay,
|
|
314
|
+
};
|
|
315
|
+
}
|
|
261
316
|
toAiJsonObject(value) {
|
|
262
317
|
const record = this.toRecord(value);
|
|
263
318
|
if (!record) {
|