@hybr1d-tech/charizard 1.1.77 → 1.1.79

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
@@ -9562,43 +9562,45 @@ S1.Item = Sm;
9562
9562
  S1.DragHandle = Rm;
9563
9563
  const I2 = "select", $2 = "dropdown-actions", G2 = "select-radio";
9564
9564
  function Gm({ checkedState: e, setCheckedState: l, search: n }) {
9565
- const [c, t] = q.useState([]);
9565
+ const c = q.useRef([]);
9566
9566
  q.useEffect(() => {
9567
- t(e);
9567
+ JSON.stringify(c.current) !== JSON.stringify(e) && (c.current = e.map((i) => ({ ...i })));
9568
9568
  }, [e]);
9569
- const s = q.useMemo(() => {
9570
- const o = {};
9571
- return c.forEach((u) => {
9572
- const m = u.group || "Ungrouped";
9573
- o[m] || (o[m] = []), o[m].push(u);
9574
- }), o;
9575
- }, [c]), r = q.useMemo(() => {
9576
- const o = {};
9577
- return Object.entries(s).forEach(([u, m]) => {
9578
- const d = m.filter(
9579
- (v) => v.label.toLowerCase().includes(n.toLowerCase())
9580
- );
9581
- d.length > 0 && (o[u] = d);
9582
- }), o;
9583
- }, [s, n]), i = q.useCallback(
9584
- (o) => {
9585
- const u = typeof o == "function" ? o(c) : o;
9586
- t(u), l(u);
9569
+ const t = q.useCallback(
9570
+ (i) => {
9571
+ const o = i.map((u) => ({ ...u }));
9572
+ return c.current = o, l(o), o;
9587
9573
  },
9588
- [l, c]
9589
- );
9590
- return /* @__PURE__ */ a.jsx(a.Fragment, { children: Object.entries(r).map(([o, u]) => /* @__PURE__ */ a.jsxs("div", { children: [
9591
- /* @__PURE__ */ a.jsx("h3", { className: e2.groupTitle, children: o }),
9592
- u.map((m) => /* @__PURE__ */ a.jsx("div", { className: e2.option, children: /* @__PURE__ */ a.jsx(
9574
+ [l]
9575
+ ), s = q.useMemo(() => {
9576
+ const i = {};
9577
+ return e.forEach((o) => {
9578
+ const u = o.group || "Ungrouped";
9579
+ i[u] || (i[u] = []), i[u].push({ ...o });
9580
+ }), i;
9581
+ }, [e]), r = q.useMemo(() => {
9582
+ const i = {};
9583
+ return Object.entries(s).forEach(([o, u]) => {
9584
+ const m = u.filter(
9585
+ (d) => d.label.toLowerCase().includes(n.toLowerCase())
9586
+ );
9587
+ m.length > 0 && (i[o] = m);
9588
+ }), i;
9589
+ }, [s, n]);
9590
+ return /* @__PURE__ */ a.jsx(a.Fragment, { children: Object.entries(r).map(([i, o]) => /* @__PURE__ */ a.jsxs("div", { children: [
9591
+ /* @__PURE__ */ a.jsx("h3", { className: e2.groupTitle, children: i }),
9592
+ o.map((u) => /* @__PURE__ */ a.jsx("div", { className: e2.option, children: /* @__PURE__ */ a.jsx(
9593
9593
  E1,
9594
9594
  {
9595
- label: m.label,
9596
- id: m.id,
9597
- checked: m.checked,
9598
- setCheckedState: i
9595
+ label: u.label,
9596
+ id: u.id,
9597
+ checked: u.checked,
9598
+ setCheckedState: (m) => {
9599
+ t(typeof m == "function" ? m(e) : m);
9600
+ }
9599
9601
  }
9600
- ) }, m.id))
9601
- ] }, o)) });
9602
+ ) }, u.id))
9603
+ ] }, i)) });
9602
9604
  }
9603
9605
  function Fm({
9604
9606
  customColumnConfig: e,