@streamoid/catalogix-chat 0.2.13 → 0.2.14
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 +54 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2615,31 +2615,66 @@ var ValueRow = React7.memo(function ValueRow2({
|
|
|
2615
2615
|
raw,
|
|
2616
2616
|
mapped,
|
|
2617
2617
|
options,
|
|
2618
|
+
loading,
|
|
2618
2619
|
itemIndex,
|
|
2619
2620
|
attribute,
|
|
2620
2621
|
onValueChange
|
|
2621
2622
|
}) {
|
|
2623
|
+
const [open, setOpen] = useState7(false);
|
|
2622
2624
|
return /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2", children: [
|
|
2623
2625
|
/* @__PURE__ */ jsx21("span", { className: "text-xs text-muted-foreground truncate min-w-0 flex-1", children: raw }),
|
|
2624
2626
|
/* @__PURE__ */ jsx21(ArrowRight, { className: "size-3 shrink-0 text-muted-foreground/50" }),
|
|
2625
|
-
/* @__PURE__ */ jsxs10(
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2627
|
+
/* @__PURE__ */ jsxs10(Popover, { open, onOpenChange: setOpen, children: [
|
|
2628
|
+
/* @__PURE__ */ jsx21(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs10(
|
|
2629
|
+
Button,
|
|
2630
|
+
{
|
|
2631
|
+
variant: "outline",
|
|
2632
|
+
size: "sm",
|
|
2633
|
+
className: "h-7 w-[160px] justify-between text-xs font-normal",
|
|
2634
|
+
children: [
|
|
2635
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate", children: mapped || /* @__PURE__ */ jsx21("span", { className: "text-muted-foreground", children: "Select..." }) }),
|
|
2636
|
+
loading && !options.length ? /* @__PURE__ */ jsx21(Loader25, { className: "size-3 shrink-0 animate-spin text-muted-foreground" }) : /* @__PURE__ */ jsx21(ChevronDown2, { className: "size-3 shrink-0 text-muted-foreground" })
|
|
2637
|
+
]
|
|
2638
|
+
}
|
|
2639
|
+
) }),
|
|
2640
|
+
/* @__PURE__ */ jsx21(PopoverContent, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ jsxs10(Command, { children: [
|
|
2641
|
+
/* @__PURE__ */ jsx21(CommandInput, { placeholder: "Search..." }),
|
|
2642
|
+
/* @__PURE__ */ jsx21(CommandList, { children: loading && !options.length ? /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-2 py-4 text-xs text-muted-foreground", children: [
|
|
2643
|
+
/* @__PURE__ */ jsx21(Loader25, { className: "size-3 animate-spin" }),
|
|
2644
|
+
"Loading..."
|
|
2645
|
+
] }) : /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
2646
|
+
/* @__PURE__ */ jsx21(CommandEmpty, { children: "No match." }),
|
|
2647
|
+
/* @__PURE__ */ jsxs10(CommandGroup, { children: [
|
|
2648
|
+
/* @__PURE__ */ jsx21(
|
|
2649
|
+
CommandItem,
|
|
2650
|
+
{
|
|
2651
|
+
value: "__skip__",
|
|
2652
|
+
onSelect: () => {
|
|
2653
|
+
onValueChange(itemIndex, attribute, raw, null);
|
|
2654
|
+
setOpen(false);
|
|
2655
|
+
},
|
|
2656
|
+
children: /* @__PURE__ */ jsx21("span", { className: "italic text-muted-foreground", children: "Skip" })
|
|
2657
|
+
}
|
|
2658
|
+
),
|
|
2659
|
+
options.map((v) => /* @__PURE__ */ jsxs10(
|
|
2660
|
+
CommandItem,
|
|
2661
|
+
{
|
|
2662
|
+
value: v,
|
|
2663
|
+
onSelect: () => {
|
|
2664
|
+
onValueChange(itemIndex, attribute, raw, v);
|
|
2665
|
+
setOpen(false);
|
|
2666
|
+
},
|
|
2667
|
+
children: [
|
|
2668
|
+
v,
|
|
2669
|
+
mapped === v && /* @__PURE__ */ jsx21(Check2, { className: "ml-auto size-3" })
|
|
2670
|
+
]
|
|
2671
|
+
},
|
|
2672
|
+
v
|
|
2673
|
+
))
|
|
2639
2674
|
] })
|
|
2640
|
-
]
|
|
2641
|
-
}
|
|
2642
|
-
)
|
|
2675
|
+
] }) })
|
|
2676
|
+
] }) })
|
|
2677
|
+
] })
|
|
2643
2678
|
] });
|
|
2644
2679
|
});
|
|
2645
2680
|
function ValueMappingPanel({
|
|
@@ -2745,15 +2780,13 @@ function ValueMappingPanel({
|
|
|
2745
2780
|
]
|
|
2746
2781
|
}
|
|
2747
2782
|
),
|
|
2748
|
-
isExpanded && /* @__PURE__ */ jsx21("div", { className: "space-y-1 pl-4 pb-1.5 pt-1", children:
|
|
2749
|
-
/* @__PURE__ */ jsx21(Loader25, { className: "size-3 animate-spin" }),
|
|
2750
|
-
"Loading values..."
|
|
2751
|
-
] }) : item.rawValues.map((raw) => /* @__PURE__ */ jsx21(
|
|
2783
|
+
isExpanded && /* @__PURE__ */ jsx21("div", { className: "space-y-1 pl-4 pb-1.5 pt-1", children: item.rawValues.map((raw) => /* @__PURE__ */ jsx21(
|
|
2752
2784
|
ValueRow,
|
|
2753
2785
|
{
|
|
2754
2786
|
raw,
|
|
2755
2787
|
mapped: item.mappedValues[raw],
|
|
2756
2788
|
options,
|
|
2789
|
+
loading: loadingLov && !lovCache[item.attribute],
|
|
2757
2790
|
itemIndex: item.itemIndex,
|
|
2758
2791
|
attribute: item.attribute,
|
|
2759
2792
|
onValueChange
|
package/package.json
CHANGED