bpr-library 0.0.14 → 0.0.15

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 +24 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -524,7 +524,7 @@ function D0() {
524
524
  return l.displayName || "Context";
525
525
  case k:
526
526
  return (l._context.displayName || "Context") + ".Consumer";
527
- case T:
527
+ case L:
528
528
  var f = l.render;
529
529
  return l = l.displayName, l || (l = f.displayName || f.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
530
530
  case W:
@@ -688,7 +688,7 @@ React keys must be passed directly to JSX without using spread:
688
688
  function p(l) {
689
689
  return typeof l == "object" && l !== null && l.$$typeof === z;
690
690
  }
691
- var u = T0, z = /* @__PURE__ */ Symbol.for("react.transitional.element"), x = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), _ = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), N = /* @__PURE__ */ Symbol.for("react.context"), T = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), j = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), d0 = /* @__PURE__ */ Symbol.for("react.client.reference"), U = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, h0 = Array.isArray, v = console.createTask ? console.createTask : function() {
691
+ var u = T0, z = /* @__PURE__ */ Symbol.for("react.transitional.element"), x = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), a = /* @__PURE__ */ Symbol.for("react.strict_mode"), _ = /* @__PURE__ */ Symbol.for("react.profiler"), k = /* @__PURE__ */ Symbol.for("react.consumer"), N = /* @__PURE__ */ Symbol.for("react.context"), L = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), B = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), j = /* @__PURE__ */ Symbol.for("react.lazy"), J = /* @__PURE__ */ Symbol.for("react.activity"), d0 = /* @__PURE__ */ Symbol.for("react.client.reference"), U = u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, q = Object.prototype.hasOwnProperty, h0 = Array.isArray, v = console.createTask ? console.createTask : function() {
692
692
  return null;
693
693
  };
694
694
  u = {
@@ -923,14 +923,14 @@ const o3 = ({
923
923
  className: M = "",
924
924
  handleSearch: p
925
925
  }) => {
926
- const [u, z] = H(!1), [x, b] = H(-1), [a, _] = H(""), k = O(null), N = O(null), T = O(null), F = O({}), B = z0(() => i ? t || [] : t ? [t] : [], [t, i]), W = (v) => v.title || v.content || v.name || "", j = z0(() => c.filter((v) => W(v).toLowerCase().includes(a.toLowerCase())), [c, a]), J = a0((v, y) => {
926
+ const [u, z] = H(!1), [x, b] = H(-1), [a, _] = H(""), k = O(null), N = O(null), L = O(null), F = O({}), B = z0(() => i ? t || [] : t ? [t] : [], [t, i]), W = (v) => v.title || v.content || v.name || "", j = z0(() => c.filter((v) => W(v).toLowerCase().includes(a.toLowerCase())), [c, a]), J = a0((v, y) => {
927
927
  F.current[v] = y;
928
928
  }, []);
929
929
  A(() => {
930
930
  u && setTimeout(() => {
931
931
  const v = B[0]?.id, y = F.current[v];
932
- y && T.current && T.current.scrollTo({
933
- top: y.offsetTop - T.current.offsetTop,
932
+ y && L.current && L.current.scrollTo({
933
+ top: y.offsetTop - L.current.offsetTop,
934
934
  behavior: "smooth"
935
935
  });
936
936
  }, 100);
@@ -1053,7 +1053,7 @@ const o3 = ({
1053
1053
  handleClose: () => {
1054
1054
  z(!1);
1055
1055
  },
1056
- children: /* @__PURE__ */ e.jsx("ul", { className: V.menu_list, ref: T, children: j.length === 0 ? /* @__PURE__ */ e.jsx("li", { className: V.no_options, children: "No options" }) : j.map((v, y) => {
1056
+ children: /* @__PURE__ */ e.jsx("ul", { className: V.menu_list, ref: L, children: j.length === 0 ? /* @__PURE__ */ e.jsx("li", { className: V.no_options, children: "No options" }) : j.map((v, y) => {
1057
1057
  const P = B.some((D) => D.id === v.id);
1058
1058
  return /* @__PURE__ */ e.jsx(
1059
1059
  "li",
@@ -1645,14 +1645,14 @@ const m2 = (c, t = {}) => (r, o, n) => {
1645
1645
  addModal: _,
1646
1646
  getModalIndex: k,
1647
1647
  removeModal: N,
1648
- isTopModal: T
1648
+ isTopModal: L
1649
1649
  } = p2();
1650
1650
  A(() => {
1651
1651
  const j = document.body.classList.contains("no-scroll");
1652
1652
  a.length > 0 && !j ? document.body.classList.add("no-scroll") : a.length === 0 && j && document.body.classList.remove("no-scroll");
1653
1653
  }, [a]), A(() => {
1654
1654
  const j = (J) => {
1655
- J.key === "Escape" && T(p) && (t(), J.stopPropagation());
1655
+ J.key === "Escape" && L(p) && (t(), J.stopPropagation());
1656
1656
  };
1657
1657
  return document.addEventListener("keydown", j), () => {
1658
1658
  document.removeEventListener("keydown", j);
@@ -1661,7 +1661,7 @@ const m2 = (c, t = {}) => (r, o, n) => {
1661
1661
  c && _(p);
1662
1662
  }, [c]);
1663
1663
  const F = (j) => {
1664
- T(p) && t(), j.stopPropagation();
1664
+ L(p) && t(), j.stopPropagation();
1665
1665
  };
1666
1666
  A(() => () => {
1667
1667
  k(p) !== -1 && (console.log("closed", p), N(p));
@@ -1809,7 +1809,7 @@ function s3({
1809
1809
  }
1810
1810
  );
1811
1811
  }
1812
- const z2 = "_table_container_1nvod_1", b2 = "_table_head_1nvod_7", y2 = "_title_1nvod_24", k2 = "_table_body_1nvod_34", g2 = "_hover_row_1nvod_39", C2 = "_content_1nvod_45", S2 = "_column_filter_list_1nvod_52", j2 = "_item_1nvod_59", N2 = "_label_1nvod_64", L = {
1812
+ const z2 = "_table_container_1nvod_1", b2 = "_table_head_1nvod_7", y2 = "_title_1nvod_24", k2 = "_table_body_1nvod_34", g2 = "_hover_row_1nvod_39", C2 = "_content_1nvod_45", S2 = "_column_filter_list_1nvod_52", j2 = "_item_1nvod_59", N2 = "_label_1nvod_64", T = {
1813
1813
  table_container: z2,
1814
1814
  table_head: b2,
1815
1815
  title: y2,
@@ -1858,8 +1858,8 @@ function i3({
1858
1858
  i({ key: a.key, direction: "asc" });
1859
1859
  };
1860
1860
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1861
- /* @__PURE__ */ e.jsxs("table", { className: L.table_container, children: [
1862
- /* @__PURE__ */ e.jsx("thead", { className: L.table_head, children: /* @__PURE__ */ e.jsxs("tr", { children: [
1861
+ /* @__PURE__ */ e.jsxs("table", { className: T.table_container, children: [
1862
+ /* @__PURE__ */ e.jsx("thead", { className: T.table_head, children: /* @__PURE__ */ e.jsxs("tr", { children: [
1863
1863
  /* @__PURE__ */ e.jsx("th", { style: { width: "40px" }, children: /* @__PURE__ */ e.jsx("div", { ref: u, children: /* @__PURE__ */ e.jsx(
1864
1864
  Y,
1865
1865
  {
@@ -1869,8 +1869,8 @@ function i3({
1869
1869
  }
1870
1870
  }
1871
1871
  ) }) }),
1872
- z.map((a) => /* @__PURE__ */ e.jsx("th", { style: { width: a.width }, children: /* @__PURE__ */ e.jsxs("div", { className: `${L.title} ${i ? L.sortable : ""}`, onClick: () => b(a), children: [
1873
- /* @__PURE__ */ e.jsx("p", { className: L.label, children: a.label }),
1872
+ z.map((a) => /* @__PURE__ */ e.jsx("th", { style: { width: a.width }, children: /* @__PURE__ */ e.jsxs("div", { className: `${T.title} ${i ? T.sortable : ""}`, onClick: () => b(a), children: [
1873
+ /* @__PURE__ */ e.jsx("p", { className: T.label, children: a.label }),
1874
1874
  n?.key === a.key && /* @__PURE__ */ e.jsx(
1875
1875
  I,
1876
1876
  {
@@ -1879,17 +1879,18 @@ function i3({
1879
1879
  name: n.direction === "asc" ? "arrow-up" : "arrow-down"
1880
1880
  }
1881
1881
  )
1882
- ] }) }, String(a.key)))
1882
+ ] }) }, String(a.key))),
1883
+ o && !s && /* @__PURE__ */ e.jsx("th", { style: { width: "0" }, children: /* @__PURE__ */ e.jsx("div", { className: T.title, children: "Дії" }) })
1883
1884
  ] }) }),
1884
- /* @__PURE__ */ e.jsx("tbody", { className: L.table_body, children: r.map((a) => /* @__PURE__ */ e.jsxs(
1885
+ /* @__PURE__ */ e.jsx("tbody", { className: T.table_body, children: r.map((a) => /* @__PURE__ */ e.jsxs(
1885
1886
  "tr",
1886
1887
  {
1887
1888
  onContextMenu: (_) => s ? x(_, a) : null,
1888
- className: `${o && s ? L.hover_row : ""}`,
1889
+ className: `${o && s ? T.hover_row : ""}`,
1889
1890
  children: [
1890
1891
  /* @__PURE__ */ e.jsx("td", { style: { width: "40px" } }),
1891
- z.map((_) => /* @__PURE__ */ e.jsx("td", { style: { width: _.width }, children: /* @__PURE__ */ e.jsx("div", { className: L.content, children: _.render ? _.render(a[_.key], a) : String(a[_.key] ?? "-") }) }, String(_.key))),
1892
- o && !s && /* @__PURE__ */ e.jsx("td", { style: { width: "0" }, children: /* @__PURE__ */ e.jsx("div", { className: L.content, children: o(a) }) })
1892
+ z.map((_) => /* @__PURE__ */ e.jsx("td", { style: { width: _.width }, children: /* @__PURE__ */ e.jsx("div", { className: T.content, children: _.render ? _.render(a[_.key], a) : String(a[_.key] ?? "-") }) }, String(_.key))),
1893
+ o && !s && /* @__PURE__ */ e.jsx("td", { style: { width: "0" }, children: /* @__PURE__ */ e.jsx("div", { className: T.content, children: o(a) }) })
1893
1894
  ]
1894
1895
  },
1895
1896
  a.id
@@ -1911,9 +1912,9 @@ function i3({
1911
1912
  handleClose: () => {
1912
1913
  m(!1);
1913
1914
  },
1914
- children: /* @__PURE__ */ e.jsx("ul", { className: L.column_filter_list, children: t.map((a) => {
1915
+ children: /* @__PURE__ */ e.jsx("ul", { className: T.column_filter_list, children: t.map((a) => {
1915
1916
  const _ = a.key;
1916
- return /* @__PURE__ */ e.jsxs("li", { className: L.item, children: [
1917
+ return /* @__PURE__ */ e.jsxs("li", { className: T.item, children: [
1917
1918
  /* @__PURE__ */ e.jsx(
1918
1919
  G1,
1919
1920
  {
@@ -1921,12 +1922,12 @@ function i3({
1921
1922
  onChange: (k) => {
1922
1923
  const N = k.target.checked;
1923
1924
  p(
1924
- (T) => N ? [...T, _] : T.filter((F) => F !== _)
1925
+ (L) => N ? [...L, _] : L.filter((F) => F !== _)
1925
1926
  );
1926
1927
  }
1927
1928
  }
1928
1929
  ),
1929
- /* @__PURE__ */ e.jsx("p", { className: L.label, children: a.label })
1930
+ /* @__PURE__ */ e.jsx("p", { className: T.label, children: a.label })
1930
1931
  ] }, String(a.key));
1931
1932
  }) })
1932
1933
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpr-library",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "type": "module",
5
5
  "module": "dist/index.es.js",
6
6
  "main": "./dist/index.js",