@streamoid/catalogix-chat 0.2.17 → 0.2.18

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1717,16 +1717,24 @@ function SelectProducts({
1717
1717
  }));
1718
1718
  }, []);
1719
1719
  if (isSubmitted) {
1720
- return /* @__PURE__ */ jsxs7(Card, { className: "p-4", children: [
1721
- /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-2 font-semibold text-emerald-700", children: [
1722
- /* @__PURE__ */ jsx16(CheckCircle, { className: "size-4" }),
1723
- "Selection submitted"
1724
- ] }),
1725
- localSubmittedValues && /* @__PURE__ */ jsxs7("details", { className: "mt-2", children: [
1726
- /* @__PURE__ */ jsx16("summary", { className: "cursor-pointer text-sm text-muted-foreground", children: "View submitted data" }),
1727
- /* @__PURE__ */ jsx16("pre", { className: "mt-2 max-h-40 overflow-auto rounded bg-muted p-2 text-xs", children: JSON.stringify(localSubmittedValues, null, 2) })
1720
+ const vals = localSubmittedValues;
1721
+ const uuids = Array.isArray(vals?.product_uuids) ? vals.product_uuids : [];
1722
+ const codes = Array.isArray(vals?.product_codes) ? vals.product_codes : [];
1723
+ const count = uuids.length || codes.length;
1724
+ return /* @__PURE__ */ jsx16("div", { className: "max-w-[50%] py-2 animate-in fade-in duration-300", children: /* @__PURE__ */ jsxs7("div", { className: "rounded-md border p-2.5 flex items-start gap-2 bg-emerald-50/50 border-emerald-200 dark:bg-muted/20 dark:border-border", children: [
1725
+ /* @__PURE__ */ jsx16("div", { className: "mt-px text-emerald-500", children: /* @__PURE__ */ jsx16(CheckCircle, { className: "w-4 h-4" }) }),
1726
+ /* @__PURE__ */ jsxs7("div", { className: "flex-1 min-w-0", children: [
1727
+ /* @__PURE__ */ jsx16("p", { className: "text-xs font-medium leading-tight", children: "Submitted \u2014 Product Selection" }),
1728
+ count > 0 && /* @__PURE__ */ jsxs7("div", { className: "mt-1 text-[11px] leading-snug", children: [
1729
+ /* @__PURE__ */ jsx16("span", { className: "font-medium text-muted-foreground", children: "Products:" }),
1730
+ " ",
1731
+ /* @__PURE__ */ jsxs7("span", { className: "text-foreground/80", children: [
1732
+ count,
1733
+ " selected"
1734
+ ] })
1735
+ ] })
1728
1736
  ] })
1729
- ] });
1737
+ ] }) });
1730
1738
  }
1731
1739
  if (!storeId || !workspaceId) {
1732
1740
  return /* @__PURE__ */ jsx16(Card, { className: "p-6 text-center text-muted-foreground", children: "Store context missing. Please start from a store selection step." });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@streamoid/catalogix-chat",
3
- "version": "0.2.17",
3
+ "version": "0.2.18",
4
4
  "description": "Catalogix chat components for the Streamoid chat host — store creation, product selection, automations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",