bpr-library 0.0.14 → 0.0.16

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.
@@ -14,7 +14,7 @@ interface BaseDataTableProps<T> {
14
14
  data: (T & {
15
15
  id: number;
16
16
  })[];
17
- actions?: (row: T) => React.ReactNode;
17
+ actions?: (row: T, close?: () => void) => React.ReactNode;
18
18
  sortedBy?: IColumnSort<T>;
19
19
  handleSort?: (data?: IColumnSort<T>) => void;
20
20
  useContext?: boolean;
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:
@@ -601,7 +601,7 @@ function D0() {
601
601
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
602
602
  )), l = this.props.ref, l !== void 0 ? l : null;
603
603
  }
604
- function d(l, f, g, C, t0, m0) {
604
+ function h(l, f, g, C, t0, m0) {
605
605
  var S = g.ref;
606
606
  return l = {
607
607
  $$typeof: z,
@@ -634,7 +634,7 @@ function D0() {
634
634
  value: m0
635
635
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
636
636
  }
637
- function h(l, f, g, C, t0, m0) {
637
+ function d(l, f, g, C, t0, m0) {
638
638
  var S = f.children;
639
639
  if (S !== void 0)
640
640
  if (C)
@@ -673,7 +673,7 @@ React keys must be passed directly to JSX without using spread:
673
673
  return S && w(
674
674
  g,
675
675
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
676
- ), d(
676
+ ), h(
677
677
  l,
678
678
  S,
679
679
  g,
@@ -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 = {
@@ -702,7 +702,7 @@ React keys must be passed directly to JSX without using spread:
702
702
  )(), f0 = v(o(i)), M0 = {};
703
703
  Q.Fragment = b, Q.jsx = function(l, f, g) {
704
704
  var C = 1e4 > U.recentlyCreatedOwnerStacks++;
705
- return h(
705
+ return d(
706
706
  l,
707
707
  f,
708
708
  g,
@@ -712,7 +712,7 @@ React keys must be passed directly to JSX without using spread:
712
712
  );
713
713
  }, Q.jsxs = function(l, f, g) {
714
714
  var C = 1e4 > U.recentlyCreatedOwnerStacks++;
715
- return h(
715
+ return d(
716
716
  l,
717
717
  f,
718
718
  g,
@@ -850,10 +850,10 @@ function i0({
850
850
  y: i,
851
851
  style: s
852
852
  }) {
853
- const [w, m] = H(c?.current ? c.current.getBoundingClientRect().width : 0), d = O(null);
853
+ const [w, m] = H(c?.current ? c.current.getBoundingClientRect().width : 0), h = O(null);
854
854
  return A(() => {
855
- let h = null, M = null;
856
- if (typeof n == "number" && typeof i == "number" && d.current) {
855
+ let d = null, M = null;
856
+ if (typeof n == "number" && typeof i == "number" && h.current) {
857
857
  const p = {
858
858
  getBoundingClientRect: () => ({
859
859
  x: n,
@@ -867,37 +867,37 @@ function i0({
867
867
  toJSON: () => {
868
868
  }
869
869
  }),
870
- contextElement: d.current
870
+ contextElement: h.current
871
871
  };
872
- h = b0(p, d.current, {
872
+ d = b0(p, h.current, {
873
873
  placement: "bottom-start",
874
874
  modifiers: [
875
875
  { name: "flip", options: { fallbackPlacements: ["top-start"] } },
876
876
  { name: "preventOverflow", options: { boundary: "viewport" } }
877
877
  ]
878
878
  });
879
- } else c?.current && d.current && (h = b0(c.current, d.current, {
879
+ } else c?.current && h.current && (d = b0(c.current, h.current, {
880
880
  placement: "bottom-start",
881
881
  modifiers: [
882
882
  { name: "flip", options: { fallbackPlacements: ["top-start"] } },
883
883
  { name: "preventOverflow", options: { boundary: "viewport" } }
884
884
  ]
885
885
  }), M = new ResizeObserver(() => {
886
- m(c.current.getBoundingClientRect().width), h.update();
886
+ m(c.current.getBoundingClientRect().width), d.update();
887
887
  }), M.observe(c.current));
888
888
  return () => {
889
- M && c?.current && M.disconnect(), h && h.destroy();
889
+ M && c?.current && M.disconnect(), d && d.destroy();
890
890
  };
891
891
  }, [c?.current, n, i]), A(() => {
892
- const h = (M) => {
893
- d.current && !d.current.contains(M.target) && (c?.current && c.current.contains(M.target) || t());
892
+ const d = (M) => {
893
+ h.current && !h.current.contains(M.target) && (c?.current && c.current.contains(M.target) || t());
894
894
  };
895
- return document.addEventListener("mousedown", h), () => document.removeEventListener("mousedown", h);
895
+ return document.addEventListener("mousedown", d), () => document.removeEventListener("mousedown", d);
896
896
  }, [t, c?.current]), $0(
897
897
  /* @__PURE__ */ e.jsx(
898
898
  "div",
899
899
  {
900
- ref: d,
900
+ ref: h,
901
901
  className: f1.container,
902
902
  style: typeof n == "number" && typeof i == "number" ? { minWidth: "unset", position: "fixed", ...s } : { minWidth: o ? "unset" : `${w}px`, ...s },
903
903
  tabIndex: -1,
@@ -918,19 +918,19 @@ const o3 = ({
918
918
  error: w = !1,
919
919
  // freeSolo = false,
920
920
  fullWidth: m = !1,
921
- customMenuItemRenderer: d,
922
- isLoading: h,
921
+ customMenuItemRenderer: h,
922
+ isLoading: d,
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);
@@ -985,7 +985,7 @@ const o3 = ({
985
985
  width: m ? "100%" : "min-content"
986
986
  },
987
987
  children: [
988
- h && /* @__PURE__ */ e.jsx(_0, {}),
988
+ d && /* @__PURE__ */ e.jsx(_0, {}),
989
989
  /* @__PURE__ */ e.jsxs("div", { className: V.select_container, children: [
990
990
  B.length > 0 && /* @__PURE__ */ e.jsx("ul", { className: V.selected_list, children: B.map((v) => /* @__PURE__ */ e.jsxs(
991
991
  "li",
@@ -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",
@@ -1068,7 +1068,7 @@ const o3 = ({
1068
1068
  D.stopPropagation(), P ? q(v) : U(v);
1069
1069
  },
1070
1070
  onMouseEnter: () => b(y),
1071
- children: d ? d(v, P) : W(v)
1071
+ children: h ? h(v, P) : W(v)
1072
1072
  },
1073
1073
  v.id
1074
1074
  );
@@ -1104,8 +1104,8 @@ function v0({
1104
1104
  onFileSelect: s,
1105
1105
  multipleFile: w = !1,
1106
1106
  onClick: m,
1107
- className: d,
1108
- disabled: h,
1107
+ className: h,
1108
+ disabled: d,
1109
1109
  ...M
1110
1110
  }) {
1111
1111
  const p = O(null), u = (x) => {
@@ -1122,10 +1122,10 @@ function v0({
1122
1122
  ${R.btn}
1123
1123
  ${R[o]} ${c ? R.icon_padding : ""}
1124
1124
  ${n ? R.active : ""}
1125
- ${h ? R.disabled : ""}
1126
- ${d}
1125
+ ${d ? R.disabled : ""}
1126
+ ${h}
1127
1127
  `,
1128
- disabled: h,
1128
+ disabled: d,
1129
1129
  onClick: s ? z : m,
1130
1130
  children: [
1131
1131
  t,
@@ -1155,7 +1155,7 @@ function v0({
1155
1155
  multiple: w,
1156
1156
  ref: p,
1157
1157
  onChange: u,
1158
- disabled: h
1158
+ disabled: d
1159
1159
  }
1160
1160
  )
1161
1161
  ]
@@ -1172,8 +1172,8 @@ function Y({
1172
1172
  onFileSelect: s,
1173
1173
  onClick: w,
1174
1174
  children: m,
1175
- style: d,
1176
- ...h
1175
+ style: h,
1176
+ ...d
1177
1177
  }) {
1178
1178
  const M = O(null), p = (z) => {
1179
1179
  z.target.files && s && s(z.target.files);
@@ -1183,12 +1183,12 @@ function Y({
1183
1183
  return /* @__PURE__ */ e.jsxs(
1184
1184
  "button",
1185
1185
  {
1186
- ...h,
1186
+ ...d,
1187
1187
  type: r,
1188
1188
  className: `${R.icon_btn} ${R[o]} ${n ? R.active : ""} ${i}`,
1189
1189
  onClick: s ? u : w,
1190
1190
  style: {
1191
- ...d,
1191
+ ...h,
1192
1192
  width: t,
1193
1193
  height: t
1194
1194
  },
@@ -1286,9 +1286,9 @@ function Y1({
1286
1286
  });
1287
1287
  }
1288
1288
  return u;
1289
- }, [n]), d = () => {
1289
+ }, [n]), h = () => {
1290
1290
  i(s ? new Date(n.getFullYear() + 1, n.getMonth(), 1) : new Date(n.getFullYear(), n.getMonth() + 1, 1));
1291
- }, h = () => {
1291
+ }, d = () => {
1292
1292
  i(s ? new Date(n.getFullYear() - 1, n.getMonth(), 1) : new Date(n.getFullYear(), n.getMonth() - 1, 1));
1293
1293
  }, M = (p) => {
1294
1294
  s && (i(new Date(n.getFullYear(), p, 1)), w(!1));
@@ -1300,7 +1300,7 @@ function Y1({
1300
1300
  {
1301
1301
  icon: "arrow-left",
1302
1302
  variant: "secondary",
1303
- onClick: h
1303
+ onClick: d
1304
1304
  }
1305
1305
  ),
1306
1306
  s ? /* @__PURE__ */ e.jsx("p", { className: E.month, children: n.getFullYear() }) : /* @__PURE__ */ e.jsxs(
@@ -1323,7 +1323,7 @@ function Y1({
1323
1323
  {
1324
1324
  icon: "arrow-right",
1325
1325
  variant: "secondary",
1326
- onClick: d
1326
+ onClick: h
1327
1327
  }
1328
1328
  )
1329
1329
  ] }),
@@ -1469,14 +1469,14 @@ function h2(c) {
1469
1469
  }
1470
1470
  const m2 = (c, t = {}) => (r, o, n) => {
1471
1471
  const { enabled: i, anonymousActionType: s, store: w, ...m } = t;
1472
- let d;
1472
+ let h;
1473
1473
  try {
1474
- d = (i ?? (j0 ? "production" : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
1474
+ h = (i ?? (j0 ? "production" : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
1475
1475
  } catch {
1476
1476
  }
1477
- if (!d)
1477
+ if (!h)
1478
1478
  return c(r, o, n);
1479
- const { connection: h, ...M } = s2(w, d, m);
1479
+ const { connection: d, ...M } = s2(w, h, m);
1480
1480
  let p = !0;
1481
1481
  n.setState = ((x, b, a) => {
1482
1482
  const _ = r(x, b);
@@ -1484,7 +1484,7 @@ const m2 = (c, t = {}) => (r, o, n) => {
1484
1484
  const k = a === void 0 ? {
1485
1485
  type: s || h2(new Error().stack) || "anonymous"
1486
1486
  } : typeof a == "string" ? { type: a } : a;
1487
- return w === void 0 ? (h?.send(k, o()), _) : (h?.send(
1487
+ return w === void 0 ? (d?.send(k, o()), _) : (d?.send(
1488
1488
  {
1489
1489
  ...k,
1490
1490
  type: `${w}/${k.type}`
@@ -1496,14 +1496,14 @@ const m2 = (c, t = {}) => (r, o, n) => {
1496
1496
  ), _);
1497
1497
  }), n.devtools = {
1498
1498
  cleanup: () => {
1499
- h && typeof h.unsubscribe == "function" && h.unsubscribe(), i2(m.name, w);
1499
+ d && typeof d.unsubscribe == "function" && d.unsubscribe(), i2(m.name, w);
1500
1500
  }
1501
1501
  };
1502
1502
  const u = (...x) => {
1503
1503
  const b = p;
1504
1504
  p = !1, r(...x), p = b;
1505
1505
  }, z = c(n.setState, o, n);
1506
- if (M.type === "untracked" ? h?.init(z) : (M.stores[M.store] = n, h?.init(
1506
+ if (M.type === "untracked" ? d?.init(z) : (M.stores[M.store] = n, d?.init(
1507
1507
  Object.fromEntries(
1508
1508
  Object.entries(M.stores).map(([x, b]) => [
1509
1509
  x,
@@ -1519,7 +1519,7 @@ const m2 = (c, t = {}) => (r, o, n) => {
1519
1519
  ), x = !0), b(...a);
1520
1520
  };
1521
1521
  }
1522
- return h.subscribe((x) => {
1522
+ return d.subscribe((x) => {
1523
1523
  var b;
1524
1524
  switch (x.type) {
1525
1525
  case "ACTION":
@@ -1556,20 +1556,20 @@ const m2 = (c, t = {}) => (r, o, n) => {
1556
1556
  case "DISPATCH":
1557
1557
  switch (x.payload.type) {
1558
1558
  case "RESET":
1559
- return u(z), w === void 0 ? h?.init(n.getState()) : h?.init(o0(m.name));
1559
+ return u(z), w === void 0 ? d?.init(n.getState()) : d?.init(o0(m.name));
1560
1560
  case "COMMIT":
1561
1561
  if (w === void 0) {
1562
- h?.init(n.getState());
1562
+ d?.init(n.getState());
1563
1563
  return;
1564
1564
  }
1565
- return h?.init(o0(m.name));
1565
+ return d?.init(o0(m.name));
1566
1566
  case "ROLLBACK":
1567
1567
  return w0(x.state, (a) => {
1568
1568
  if (w === void 0) {
1569
- u(a), h?.init(n.getState());
1569
+ u(a), d?.init(n.getState());
1570
1570
  return;
1571
1571
  }
1572
- u(a[w]), h?.init(o0(m.name));
1572
+ u(a[w]), d?.init(o0(m.name));
1573
1573
  });
1574
1574
  case "JUMP_TO_STATE":
1575
1575
  case "JUMP_TO_ACTION":
@@ -1583,7 +1583,7 @@ const m2 = (c, t = {}) => (r, o, n) => {
1583
1583
  case "IMPORT_STATE": {
1584
1584
  const { nextLiftedState: a } = x.payload, _ = (b = a.computedStates.slice(-1)[0]) == null ? void 0 : b.state;
1585
1585
  if (!_) return;
1586
- u(w === void 0 ? _ : _[w]), h?.send(
1586
+ u(w === void 0 ? _ : _[w]), d?.send(
1587
1587
  null,
1588
1588
  // FIXME no-any
1589
1589
  a
@@ -1636,8 +1636,8 @@ const m2 = (c, t = {}) => (r, o, n) => {
1636
1636
  type: s = "side",
1637
1637
  title: w,
1638
1638
  className: m,
1639
- disabledTitle: d = !1,
1640
- blockBackdrop: h = !1,
1639
+ disabledTitle: h = !1,
1640
+ blockBackdrop: d = !1,
1641
1641
  skeleton: M
1642
1642
  }) => {
1643
1643
  const [p] = H(() => Math.floor(Math.random() * 1e9)), [u, z] = H(!1), x = O(null), b = O(null), {
@@ -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));
@@ -1691,7 +1691,7 @@ const m2 = (c, t = {}) => (r, o, n) => {
1691
1691
  ref: b,
1692
1692
  className: $.backdrop,
1693
1693
  style: { zIndex: B - 1 },
1694
- onClick: h ? () => {
1694
+ onClick: d ? () => {
1695
1695
  } : F
1696
1696
  }
1697
1697
  )
@@ -1726,7 +1726,7 @@ const m2 = (c, t = {}) => (r, o, n) => {
1726
1726
  ...i
1727
1727
  },
1728
1728
  children: [
1729
- s === "center" && !d && /* @__PURE__ */ e.jsxs("div", { className: $.title_block, children: [
1729
+ s === "center" && !h && /* @__PURE__ */ e.jsxs("div", { className: $.title_block, children: [
1730
1730
  /* @__PURE__ */ e.jsx("h2", { className: $.title, children: w }),
1731
1731
  /* @__PURE__ */ e.jsx(
1732
1732
  Y,
@@ -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,
@@ -1842,13 +1842,13 @@ function i3({
1842
1842
  handleSort: i,
1843
1843
  useContext: s = !1
1844
1844
  }) {
1845
- const [w, m] = H(!1), [d, h] = H(), {
1845
+ const [w, m] = H(!1), [h, d] = H(), {
1846
1846
  visibleColumns: M,
1847
1847
  setVisibleColumns: p
1848
1848
  } = B2(c, t.map((a) => String(a.key))), u = O(null), z = t.filter(
1849
1849
  (a) => M.includes(String(a.key))
1850
1850
  ), x = (a, _) => {
1851
- o && s && (a.preventDefault(), a.stopPropagation(), h({ position: { x: a.clientX, y: a.clientY }, element: _ }));
1851
+ o && s && (a.preventDefault(), a.stopPropagation(), d({ position: { x: a.clientX, y: a.clientY }, element: _ }));
1852
1852
  }, b = (a) => {
1853
1853
  if (i)
1854
1854
  if (n?.key === a.key) {
@@ -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,29 +1879,32 @@ 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
1896
1897
  )) })
1897
1898
  ] }),
1898
- d && /* @__PURE__ */ e.jsx(
1899
+ h && /* @__PURE__ */ e.jsx(
1899
1900
  i0,
1900
1901
  {
1901
- handleClose: () => h(void 0),
1902
- x: d.position.x,
1903
- y: d.position.y,
1904
- children: o && o(d.element)
1902
+ handleClose: () => d(void 0),
1903
+ x: h.position.x,
1904
+ y: h.position.y,
1905
+ children: o && o(h.element, () => {
1906
+ d(void 0);
1907
+ })
1905
1908
  }
1906
1909
  ),
1907
1910
  w && /* @__PURE__ */ e.jsx(
@@ -1911,9 +1914,9 @@ function i3({
1911
1914
  handleClose: () => {
1912
1915
  m(!1);
1913
1916
  },
1914
- children: /* @__PURE__ */ e.jsx("ul", { className: L.column_filter_list, children: t.map((a) => {
1917
+ children: /* @__PURE__ */ e.jsx("ul", { className: T.column_filter_list, children: t.map((a) => {
1915
1918
  const _ = a.key;
1916
- return /* @__PURE__ */ e.jsxs("li", { className: L.item, children: [
1919
+ return /* @__PURE__ */ e.jsxs("li", { className: T.item, children: [
1917
1920
  /* @__PURE__ */ e.jsx(
1918
1921
  G1,
1919
1922
  {
@@ -1921,12 +1924,12 @@ function i3({
1921
1924
  onChange: (k) => {
1922
1925
  const N = k.target.checked;
1923
1926
  p(
1924
- (T) => N ? [...T, _] : T.filter((F) => F !== _)
1927
+ (L) => N ? [...L, _] : L.filter((F) => F !== _)
1925
1928
  );
1926
1929
  }
1927
1930
  }
1928
1931
  ),
1929
- /* @__PURE__ */ e.jsx("p", { className: L.label, children: a.label })
1932
+ /* @__PURE__ */ e.jsx("p", { className: T.label, children: a.label })
1930
1933
  ] }, String(a.key));
1931
1934
  }) })
1932
1935
  }
@@ -1944,9 +1947,9 @@ function a3({
1944
1947
  blockPastDates: o = !1,
1945
1948
  type: n = "date"
1946
1949
  }) {
1947
- const [i, s] = H(!1), w = O(null), m = (d) => {
1948
- const h = d.getDate().toString().padStart(2, "0"), M = (d.getMonth() + 1).toString().padStart(2, "0"), p = d.getFullYear();
1949
- return `${h}.${M}.${p}`;
1950
+ const [i, s] = H(!1), w = O(null), m = (h) => {
1951
+ const d = h.getDate().toString().padStart(2, "0"), M = (h.getMonth() + 1).toString().padStart(2, "0"), p = h.getFullYear();
1952
+ return `${d}.${M}.${p}`;
1950
1953
  };
1951
1954
  return /* @__PURE__ */ e.jsxs(
1952
1955
  "div",
@@ -1963,8 +1966,8 @@ function a3({
1963
1966
  {
1964
1967
  variant: "secondary",
1965
1968
  icon: "my-calendar",
1966
- onClick: (d) => {
1967
- d.stopPropagation(), r || s(!0);
1969
+ onClick: (h) => {
1970
+ h.stopPropagation(), r || s(!0);
1968
1971
  }
1969
1972
  }
1970
1973
  ),
@@ -2041,24 +2044,24 @@ function h3({
2041
2044
  ), w = a0(() => {
2042
2045
  const m = [];
2043
2046
  if (n <= 6) {
2044
- for (let d = 1; d <= n; d++)
2045
- m.push(s(d));
2047
+ for (let h = 1; h <= n; h++)
2048
+ m.push(s(h));
2046
2049
  return m;
2047
2050
  }
2048
2051
  if (i < 5) {
2049
- for (let d = 1; d <= 5; d++)
2050
- m.push(s(d));
2052
+ for (let h = 1; h <= 5; h++)
2053
+ m.push(s(h));
2051
2054
  return m.push(/* @__PURE__ */ e.jsx("span", { className: K.dots, children: "..." }, "dots2")), m.push(s(n)), m;
2052
2055
  }
2053
2056
  if (i > n - 5) {
2054
2057
  m.push(s(1)), m.push(/* @__PURE__ */ e.jsx("span", { className: K.dots, children: "..." }, "dots1"));
2055
- for (let d = n - 4; d <= n; d++)
2056
- m.push(s(d));
2058
+ for (let h = n - 4; h <= n; h++)
2059
+ m.push(s(h));
2057
2060
  return m;
2058
2061
  }
2059
2062
  m.push(s(1)), m.push(/* @__PURE__ */ e.jsx("span", { className: K.dots, children: "..." }, "dots1"));
2060
- for (let d = i - 1; d <= i + 1 && d <= n; d++)
2061
- m.push(s(d));
2063
+ for (let h = i - 1; h <= i + 1 && h <= n; h++)
2064
+ m.push(s(h));
2062
2065
  return m.push(/* @__PURE__ */ e.jsx("span", { className: K.dots, children: "..." }, "dots2")), m.push(s(n)), m;
2063
2066
  }, [i, n]);
2064
2067
  return /* @__PURE__ */ e.jsxs("div", { className: K.pagination, style: { ...o }, children: [
@@ -2099,19 +2102,19 @@ function m3({
2099
2102
  ...i
2100
2103
  }) {
2101
2104
  const s = (m) => {
2102
- const d = m.replace(/\D/g, "");
2103
- let h = d.startsWith("380") ? d.slice(3) : d;
2104
- h = h.slice(0, 9);
2105
- const M = h.slice(0, 2), p = h.slice(2, 5), u = h.slice(5, 7), z = h.slice(7, 9);
2105
+ const h = m.replace(/\D/g, "");
2106
+ let d = h.startsWith("380") ? h.slice(3) : h;
2107
+ d = d.slice(0, 9);
2108
+ const M = d.slice(0, 2), p = d.slice(2, 5), u = d.slice(5, 7), z = d.slice(7, 9);
2106
2109
  let x = "+380";
2107
2110
  return M && (x += ` (${M}`), M.length === 2 && (x += ")"), p && (x += ` ${p}`), u && (x += `-${u}`), z && (x += `-${z}`), x;
2108
2111
  }, w = (m) => {
2109
- let d = m.target.value.replace(/\D/g, "");
2110
- d.startsWith("380") && (d = d.slice(3)), d = d.slice(0, 9);
2111
- const h = `+380${d}`;
2112
+ let h = m.target.value.replace(/\D/g, "");
2113
+ h.startsWith("380") && (h = h.slice(3)), h = h.slice(0, 9);
2114
+ const d = `+380${h}`;
2112
2115
  t && t({
2113
2116
  ...m,
2114
- target: { ...m.target, value: h }
2117
+ target: { ...m.target, value: d }
2115
2118
  });
2116
2119
  };
2117
2120
  return /* @__PURE__ */ e.jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpr-library",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "type": "module",
5
5
  "module": "dist/index.es.js",
6
6
  "main": "./dist/index.js",