unifyedx-storybook-new 0.2.57 → 0.2.58

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.
@@ -5687,10 +5687,10 @@ const Jl = ({
5687
5687
  Array.isArray(h) && d(h);
5688
5688
  }, [h]);
5689
5689
  const _ = (p) => {
5690
- l && (w(p.id), r(p.categoryName || ""));
5690
+ l && (w(p._id?.$oid), r(p.categoryName || ""));
5691
5691
  }, U = () => {
5692
5692
  if (!i || u !== null) return;
5693
- const N = (v.length > 0 ? Math.max(...v.map((k) => k.id)) : 0) + 1;
5693
+ const N = (v.length > 0 ? Math.max(...v.map((k) => k._id?.$oid ?? 0)) : 0) + 1;
5694
5694
  d((k) => [
5695
5695
  ...k,
5696
5696
  {
@@ -5704,12 +5704,12 @@ const Jl = ({
5704
5704
  ]), w(N), r("");
5705
5705
  }, Y = () => {
5706
5706
  u != null && (d((p) => {
5707
- const k = !collections.some(($) => $.id === u) ? p.filter(($) => $.id !== u) : p;
5707
+ const k = !p.some(($) => $._id?.$oid !== void 0 && $._id.$oid === u && $.categoryName) ? p.filter(($) => $._id?.$oid !== u) : p;
5708
5708
  return a?.(k), k;
5709
5709
  }), w(null), r(""));
5710
5710
  }, G = () => {
5711
5711
  u == null || !y.trim() || (d((p) => {
5712
- const N = p.map((k) => k.id === u ? {
5712
+ const N = p.map((k) => k._id?.$oid === u ? {
5713
5713
  ...k,
5714
5714
  categoryName: y.trim()
5715
5715
  } : k);
@@ -5717,7 +5717,7 @@ const Jl = ({
5717
5717
  }), w(null), r(""));
5718
5718
  }, T = (p) => {
5719
5719
  m && d((N) => {
5720
- const k = N.filter(($) => $.id !== p.id);
5720
+ const k = N.filter(($) => $._id?.$oid !== p._id?.$oid);
5721
5721
  return a?.(k), k;
5722
5722
  });
5723
5723
  }, x = (p, N, k) => {
@@ -5769,13 +5769,13 @@ const Jl = ({
5769
5769
  )
5770
5770
  ] }) }),
5771
5771
  /* @__PURE__ */ e("div", { className: "mt-5 flex flex-col", children: b.map((p) => {
5772
- const N = u === p.id, k = p?.links?.length ?? 0, $ = g === p.id, M = A === p.id && g !== p.id;
5772
+ const N = u === p._id?.$oid, k = p?.links?.length ?? 0, $ = g === p._id?.$oid, M = A === p._id?.$oid && g !== p._id?.$oid;
5773
5773
  return /* @__PURE__ */ e(
5774
5774
  "div",
5775
5775
  {
5776
- onDragEnter: () => C(p.id),
5776
+ onDragEnter: () => C(p._id?.$oid),
5777
5777
  onDragOver: I,
5778
- onDrop: (S) => E(S, p.id),
5778
+ onDrop: (S) => E(S, p._id?.$oid),
5779
5779
  className: [
5780
5780
  "flex items-center justify-between p-3 border rounded-2xl mb-3",
5781
5781
  "border-gray-300",
@@ -5789,7 +5789,7 @@ const Jl = ({
5789
5789
  type: "text",
5790
5790
  className: "flex-1 h-10 px-3 max-w-[200px] border border-gray-300 rounded-2xl outline-none focus:ring-2 focus:ring-gray-800/20",
5791
5791
  value: y,
5792
- placeholder: collections.some((S) => S.id === p.id) ? "Edit collection name" : "New collection name",
5792
+ placeholder: v.some((S) => S._id?.$oid === p._id?.$oid && S.categoryName) ? "Edit collection name" : "New collection name",
5793
5793
  onChange: (S) => r(S.target.value),
5794
5794
  onKeyDown: (S) => {
5795
5795
  S.key === "Enter" && G(), S.key === "Escape" && Y();
@@ -5861,7 +5861,7 @@ const Jl = ({
5861
5861
  ] })
5862
5862
  ] })
5863
5863
  },
5864
- p.id
5864
+ p._id?.$oid
5865
5865
  );
5866
5866
  }) })
5867
5867
  ] });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unifyedx-storybook-new",
3
3
  "private": false,
4
- "version": "0.2.57",
4
+ "version": "0.2.58",
5
5
  "type": "module",
6
6
  "main": "dist/unifyedx-storybook-new.es.js",
7
7
  "module": "dist/unifyedx-storybook-new.es.js",