@hybr1d-tech/charizard 1.1.79 → 1.1.80

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/hybr1d-ui.js CHANGED
@@ -9561,22 +9561,25 @@ function S1({ items: e, onChange: l, renderItem: n }) {
9561
9561
  S1.Item = Sm;
9562
9562
  S1.DragHandle = Rm;
9563
9563
  const I2 = "select", $2 = "dropdown-actions", G2 = "select-radio";
9564
- function Gm({ checkedState: e, setCheckedState: l, search: n }) {
9565
- const c = q.useRef([]);
9566
- q.useEffect(() => {
9567
- JSON.stringify(c.current) !== JSON.stringify(e) && (c.current = e.map((i) => ({ ...i })));
9568
- }, [e]);
9564
+ function Gm({
9565
+ checkedState: e,
9566
+ setCheckedState: l,
9567
+ search: n,
9568
+ table: c
9569
+ }) {
9569
9570
  const t = q.useCallback(
9570
- (i) => {
9571
- const o = i.map((u) => ({ ...u }));
9572
- return c.current = o, l(o), o;
9571
+ (i, o) => {
9572
+ l((u) => {
9573
+ const m = u.map((v) => v.id === i ? { ...v, checked: o } : v), d = c.getColumn(i);
9574
+ return d && d.toggleVisibility(o), m;
9575
+ });
9573
9576
  },
9574
- [l]
9577
+ [c, l]
9575
9578
  ), s = q.useMemo(() => {
9576
9579
  const i = {};
9577
9580
  return e.forEach((o) => {
9578
9581
  const u = o.group || "Ungrouped";
9579
- i[u] || (i[u] = []), i[u].push({ ...o });
9582
+ i[u] || (i[u] = []), i[u].push(o);
9580
9583
  }), i;
9581
9584
  }, [e]), r = q.useMemo(() => {
9582
9585
  const i = {};
@@ -9596,7 +9599,13 @@ function Gm({ checkedState: e, setCheckedState: l, search: n }) {
9596
9599
  id: u.id,
9597
9600
  checked: u.checked,
9598
9601
  setCheckedState: (m) => {
9599
- t(typeof m == "function" ? m(e) : m);
9602
+ if (typeof m == "function") {
9603
+ const v = m(e).find((h) => h.id === u.id);
9604
+ v && t(u.id, v.checked);
9605
+ } else {
9606
+ const d = [...m], v = d.findIndex((h) => h.id === u.id);
9607
+ v !== -1 && t(u.id, d[v].checked);
9608
+ }
9600
9609
  }
9601
9610
  }
9602
9611
  ) }, u.id))
@@ -9661,7 +9670,8 @@ function Fm({
9661
9670
  {
9662
9671
  checkedState: d,
9663
9672
  setCheckedState: v,
9664
- search: h
9673
+ search: h,
9674
+ table: l
9665
9675
  }
9666
9676
  ) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
9667
9677
  /* @__PURE__ */ a.jsx("div", { className: e2.option, children: /* @__PURE__ */ a.jsx(