@praxisui/table 4.0.0-beta.0 → 6.0.0-beta.0
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 +426 -449
- package/fesm2022/{praxisui-table-table-ai.adapter-C5rjLb8E.mjs → praxisui-table-table-ai.adapter-CFyyQB26.mjs} +22 -12
- package/fesm2022/praxisui-table.mjs +1524 -1539
- package/index.d.ts +326 -302
- package/package.json +8 -7
|
@@ -591,6 +591,20 @@ Columns Analysis:
|
|
|
591
591
|
'behavior.expansion.detail.source.inlineSchema',
|
|
592
592
|
'behavior.expansion.detail.source.resourcePath.paramsMap',
|
|
593
593
|
]);
|
|
594
|
+
const jsonLogicObjectPaths = new Set([
|
|
595
|
+
'columns[].computed.expression',
|
|
596
|
+
'columns[].conditionalStyles[].condition',
|
|
597
|
+
'columns[].conditionalRenderers[].condition',
|
|
598
|
+
'rowConditionalStyles[].condition',
|
|
599
|
+
'toolbar.actions[].visibleWhen',
|
|
600
|
+
'toolbar.actions[].children[].visibleWhen',
|
|
601
|
+
'actions.row.actions[].visibleWhen',
|
|
602
|
+
'actions.row.actions[].disabledWhen',
|
|
603
|
+
'columns[].renderer.button.disabledCondition',
|
|
604
|
+
'columns[].renderer.toggle.disabledCondition',
|
|
605
|
+
'columns[].conditionalRenderers[].renderer.button.disabledCondition',
|
|
606
|
+
'columns[].conditionalRenderers[].renderer.toggle.disabledCondition',
|
|
607
|
+
]);
|
|
594
608
|
const recurse = (obj, currentPath) => {
|
|
595
609
|
if (typeof obj !== 'object' || obj === null)
|
|
596
610
|
return obj;
|
|
@@ -613,30 +627,26 @@ Columns Analysis:
|
|
|
613
627
|
const prefixMatch = Array.from(allowedPaths).some(p => p.startsWith(newPath + '.') || p.startsWith(newPath + '['));
|
|
614
628
|
if (exactMatch || prefixMatch) {
|
|
615
629
|
if (exactMatch
|
|
616
|
-
&& passthroughObjectPaths.has(newPath)
|
|
630
|
+
&& (passthroughObjectPaths.has(newPath) || jsonLogicObjectPaths.has(newPath))
|
|
617
631
|
&& typeof obj[key] === 'object'
|
|
618
|
-
&& obj[key] !== null
|
|
632
|
+
&& obj[key] !== null
|
|
633
|
+
&& !Array.isArray(obj[key])) {
|
|
619
634
|
cleanObj[key] = obj[key];
|
|
620
635
|
continue;
|
|
621
636
|
}
|
|
622
|
-
const val = recurse(obj[key], newPath);
|
|
623
637
|
if (newPath === 'columns[].computed.expression') {
|
|
624
|
-
if (typeof
|
|
625
|
-
warnings.push(`Computed expression
|
|
638
|
+
if (!obj[key] || typeof obj[key] !== 'object' || Array.isArray(obj[key])) {
|
|
639
|
+
warnings.push(`Computed expression inválida: ${newPath} (deve ser Json Logic)`);
|
|
626
640
|
continue;
|
|
627
641
|
}
|
|
628
|
-
|
|
629
|
-
if (!trimmed) {
|
|
642
|
+
if (Object.keys(obj[key]).length === 0) {
|
|
630
643
|
warnings.push(`Computed expression vazia: ${newPath}`);
|
|
631
644
|
continue;
|
|
632
645
|
}
|
|
633
|
-
|
|
634
|
-
warnings.push(`Computed expression muito longa: ${newPath}`);
|
|
635
|
-
continue;
|
|
636
|
-
}
|
|
637
|
-
cleanObj[key] = trimmed;
|
|
646
|
+
cleanObj[key] = obj[key];
|
|
638
647
|
continue;
|
|
639
648
|
}
|
|
649
|
+
const val = recurse(obj[key], newPath);
|
|
640
650
|
// Se for objeto vazio após limpeza, não inclui (salvo se for intenção explicita de limpar config, mas patch geralmente é aditivo)
|
|
641
651
|
if (typeof val === 'object' && val !== null && !Array.isArray(val) && Object.keys(val).length === 0) {
|
|
642
652
|
// ignora
|