@streamoid/catalogix-chat 0.2.7 → 0.2.8
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/dist/index.js +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2458,7 +2458,7 @@ function hasIncompleteLovValues(item, valuesOntologyAttributes, uniqueValues) {
|
|
|
2458
2458
|
const rawVals = uniqueValues[item.feedCol] || [];
|
|
2459
2459
|
if (rawVals.length === 0) continue;
|
|
2460
2460
|
const mapped = item.mappedValues[attr] || {};
|
|
2461
|
-
if (rawVals.some((v) => mapped[v]
|
|
2461
|
+
if (rawVals.some((v) => !mapped[v])) return true;
|
|
2462
2462
|
}
|
|
2463
2463
|
return false;
|
|
2464
2464
|
}
|
|
@@ -2613,7 +2613,7 @@ function ValueMappingPanel({
|
|
|
2613
2613
|
const existing = item.mappedValues[attr] || {};
|
|
2614
2614
|
const valueMap = {};
|
|
2615
2615
|
rawVals.forEach((v) => {
|
|
2616
|
-
valueMap[v] = existing[v]
|
|
2616
|
+
valueMap[v] = existing[v] || null;
|
|
2617
2617
|
});
|
|
2618
2618
|
items.push({
|
|
2619
2619
|
itemIndex,
|
|
@@ -2626,6 +2626,11 @@ function ValueMappingPanel({
|
|
|
2626
2626
|
});
|
|
2627
2627
|
});
|
|
2628
2628
|
});
|
|
2629
|
+
items.sort((a, b) => {
|
|
2630
|
+
const aIncomplete = a.mappedCount < a.totalCount ? 0 : 1;
|
|
2631
|
+
const bIncomplete = b.mappedCount < b.totalCount ? 0 : 1;
|
|
2632
|
+
return aIncomplete - bIncomplete;
|
|
2633
|
+
});
|
|
2629
2634
|
return items;
|
|
2630
2635
|
}, [data, valuesOntologyAttributes, uniqueValues]);
|
|
2631
2636
|
if (lovItems.length === 0) {
|
|
@@ -2659,7 +2664,7 @@ function ValueMappingPanel({
|
|
|
2659
2664
|
/* @__PURE__ */ jsxs10(
|
|
2660
2665
|
Select,
|
|
2661
2666
|
{
|
|
2662
|
-
value: mapped
|
|
2667
|
+
value: mapped || "__unmapped__",
|
|
2663
2668
|
onValueChange: (v) => {
|
|
2664
2669
|
const val = v === "__skip__" ? null : v;
|
|
2665
2670
|
onValueChange(
|
|
@@ -2717,7 +2722,7 @@ function MapAttributesChat({
|
|
|
2717
2722
|
if (!valuesOntologyAttributes.includes(attr)) continue;
|
|
2718
2723
|
const rawVals = uniqueValues[item.feedCol] || [];
|
|
2719
2724
|
const mapped = item.mappedValues[attr] || {};
|
|
2720
|
-
if (rawVals.some((v) => mapped[v]
|
|
2725
|
+
if (rawVals.some((v) => !mapped[v])) return false;
|
|
2721
2726
|
}
|
|
2722
2727
|
}
|
|
2723
2728
|
return true;
|
package/package.json
CHANGED