elcrm 0.9.70 → 0.9.72

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/index.es.js CHANGED
@@ -433,14 +433,14 @@ function Kr() {
433
433
  Z.unshift("Warning: " + v), Function.prototype.apply.call(console[d], console, Z);
434
434
  }
435
435
  }
436
- var L = !1, k = !1, w = !1, S = !1, b = !1, U;
437
- U = Symbol.for("react.module.reference");
436
+ var L = !1, k = !1, w = !1, S = !1, b = !1, z;
437
+ z = Symbol.for("react.module.reference");
438
438
  function T(d) {
439
439
  return !!(typeof d == "string" || typeof d == "function" || d === r || d === i || b || d === s || d === _ || d === u || S || d === m || L || k || w || typeof d == "object" && d !== null && (d.$$typeof === f || d.$$typeof === x || d.$$typeof === o || d.$$typeof === l || d.$$typeof === c || // This needs to include all possible module reference object
440
440
  // types supported by any Flight configuration anywhere since
441
441
  // we don't know which Flight build this will end up being used
442
442
  // with.
443
- d.$$typeof === U || d.getModuleId !== void 0));
443
+ d.$$typeof === z || d.getModuleId !== void 0));
444
444
  }
445
445
  function M(d, v, E) {
446
446
  var B = d.displayName;
@@ -1686,7 +1686,7 @@ function $s(e, t, n, r = !1) {
1686
1686
  function Bs(e) {
1687
1687
  return { style: { background: `var(--color-${e})` } };
1688
1688
  }
1689
- const z = {
1689
+ const U = {
1690
1690
  Age: Ds,
1691
1691
  ArraySort: Ns,
1692
1692
  ArrayGroup: Ts,
@@ -1715,8 +1715,8 @@ const z = {
1715
1715
  isNumeric: Is,
1716
1716
  Week: Ss
1717
1717
  };
1718
- z.setFN = (e, t) => {
1719
- z[e] = t;
1718
+ U.setFN = (e, t) => {
1719
+ U[e] = t;
1720
1720
  };
1721
1721
  const Fs = ({ before: e, from: t = 0, to: n }) => {
1722
1722
  const r = h.useRef();
@@ -1724,12 +1724,13 @@ const Fs = ({ before: e, from: t = 0, to: n }) => {
1724
1724
  r.s = !0;
1725
1725
  const s = 1e3, i = 10;
1726
1726
  r.n = 0;
1727
- let o = Math.round(s / (n / i));
1727
+ let o = Math.round(s / (n / i)), l = e ? e + " " : "";
1728
1728
  return r.i = setInterval(() => {
1729
- if (!r.s) return;
1730
- r.n = r.n + i, r.n >= n && clearInterval(r.i);
1731
- let l = e ? e + " " : "";
1732
- r.current && (r.current.textContent = `${l}` + z.Money(r.n));
1729
+ if (!r.s)
1730
+ return r.current.textContent = `${l}` + U.Money(n), clearInterval(r.i);
1731
+ if (n === 0)
1732
+ return r.current.textContent = `${l}` + U.Money(n), clearInterval(r.i);
1733
+ r.n = r.n + i, r.n >= n && clearInterval(r.i), r.current && (r.current.textContent = `${l}` + U.Money(r.n));
1733
1734
  }, o), () => {
1734
1735
  r.s = !1, clearInterval(r.i);
1735
1736
  };
@@ -2856,8 +2857,8 @@ const $o = ({ children: e, className: t, title: n }) => /* @__PURE__ */ a.jsxs("
2856
2857
  })).json()).status === "success" && (t({ type: "delete", id: e.id }), ye.Send({ type: "success", text: "Файл успешно удалён" }));
2857
2858
  };
2858
2859
  return /* @__PURE__ */ a.jsxs("li", { children: [
2859
- /* @__PURE__ */ a.jsx("div", { className: "f035", children: z.TypeFiles(e.type) }),
2860
- /* @__PURE__ */ a.jsx("div", { className: "f100", children: z.Date(e.uDate, "dd.mm.yy") }),
2860
+ /* @__PURE__ */ a.jsx("div", { className: "f035", children: U.TypeFiles(e.type) }),
2861
+ /* @__PURE__ */ a.jsx("div", { className: "f100", children: U.Date(e.uDate, "dd.mm.yy") }),
2861
2862
  /* @__PURE__ */ a.jsx("div", { className: "f000", children: e.name }),
2862
2863
  /* @__PURE__ */ a.jsxs("div", { className: "f050 flex button", children: [
2863
2864
  /* @__PURE__ */ a.jsx(
@@ -2879,7 +2880,7 @@ const $o = ({ children: e, className: t, title: n }) => /* @__PURE__ */ a.jsxs("
2879
2880
  }
2880
2881
  )
2881
2882
  ] }),
2882
- /* @__PURE__ */ a.jsx("div", { className: "f080", children: z.Size(e.size) })
2883
+ /* @__PURE__ */ a.jsx("div", { className: "f080", children: U.Size(e.size) })
2883
2884
  ] });
2884
2885
  }, Ft = { setSetting: vr, getSetting: Cr };
2885
2886
  let q = {};
@@ -3896,7 +3897,7 @@ function Ke({
3896
3897
  S.field = "input", p && (S.className = p);
3897
3898
  const b = {};
3898
3899
  s && (b.placeholder = s), c && _ && (b.edit = "");
3899
- const U = (T) => {
3900
+ const z = (T) => {
3900
3901
  oe.Blur(T), g == null || g({ value: T.target.textContent.trim(), name: r });
3901
3902
  };
3902
3903
  return /* @__PURE__ */ a.jsxs("dl", { ...S, children: [
@@ -3906,7 +3907,7 @@ function Ke({
3906
3907
  {
3907
3908
  onPaste: w,
3908
3909
  onInput: R,
3909
- onBlur: U,
3910
+ onBlur: z,
3910
3911
  onKeyDown: L,
3911
3912
  onContextMenu: k,
3912
3913
  contentEditable: c && _ ? "plaintext-only" : "false",
@@ -4307,7 +4308,7 @@ function Ot({
4307
4308
  ...j,
4308
4309
  "data-edit": (n && r) + "",
4309
4310
  children: [
4310
- z.Date(x, "dd.mm.yyyy"),
4311
+ U.Date(x, "dd.mm.yyyy"),
4311
4312
  u
4312
4313
  ]
4313
4314
  }
@@ -4340,7 +4341,7 @@ const jc = (e) => {
4340
4341
  y(l.m - 1, l.y);
4341
4342
  }, j = (k) => {
4342
4343
  e.onValue(
4343
- l.y + "-" + z.Number(2, l.m) + "-" + z.Number(2, k)
4344
+ l.y + "-" + U.Number(2, l.m) + "-" + U.Number(2, k)
4344
4345
  ), C();
4345
4346
  }, y = (k, w) => {
4346
4347
  w = k > 12 ? w + 1 : k < 1 ? w - 1 : w, k = k > 12 ? 1 : k < 1 ? 12 : k, c({ y: w, m: k });
@@ -4357,7 +4358,6 @@ const jc = (e) => {
4357
4358
  /* @__PURE__ */ a.jsxs(
4358
4359
  "div",
4359
4360
  {
4360
- "data-select": "backdrop",
4361
4361
  className: [
4362
4362
  fe.c,
4363
4363
  e.className && e.className + "-backdrop"
@@ -4377,7 +4377,7 @@ const jc = (e) => {
4377
4377
  }
4378
4378
  ) }),
4379
4379
  /* @__PURE__ */ a.jsxs("h2", { children: [
4380
- z.Month(l.m).name,
4380
+ U.Month(l.m).name,
4381
4381
  " ",
4382
4382
  l.y
4383
4383
  ] }),
@@ -4478,7 +4478,7 @@ function Gt({
4478
4478
  className: p = ""
4479
4479
  }) {
4480
4480
  let j = !!(o && (e === "" || e === void 0));
4481
- e = z.isNumeric(e) ? Number(e) / x : 0;
4481
+ e = U.isNumeric(e) ? Number(e) / x : 0;
4482
4482
  let y = (T) => C === "multi" ? T.replace(/[^+\d.+-]/g, "") : T.replace(/[^+\d.]/g, ""), R = (T, M) => {
4483
4483
  let $ = document.createRange(), N = window.getSelection();
4484
4484
  $.setStart(M.childNodes[0], T), $.collapse(!0), N.removeAllRanges(), N.addRange($), M.focus();
@@ -4491,7 +4491,7 @@ function Gt({
4491
4491
  oe.Blur(T), T.target.textContent === "" && (T.target.textContent = 0), g == null || g({ value: y(T.target.textContent) * x, name: n }), t == null || t({
4492
4492
  value: y(T.target.textContent) * x,
4493
4493
  name: n
4494
- }), T.target.textContent = z.Money(T.target.textContent);
4494
+ }), T.target.textContent = U.Money(T.target.textContent);
4495
4495
  }, w = (T) => {
4496
4496
  T.target.textContent = y(T.target.textContent);
4497
4497
  }, S = (T) => {
@@ -4503,8 +4503,8 @@ function Gt({
4503
4503
  });
4504
4504
  };
4505
4505
  if (!(l && c) && !u || !(l && c) && j) return "";
4506
- const U = {};
4507
- return U.field = "input", p && (U.className = p), /* @__PURE__ */ a.jsxs("dl", { ...U, children: [
4506
+ const z = {};
4507
+ return z.field = "input", p && (z.className = p), /* @__PURE__ */ a.jsxs("dl", { ...z, children: [
4508
4508
  s ? /* @__PURE__ */ a.jsx("dt", { children: s }) : "",
4509
4509
  /* @__PURE__ */ a.jsx(
4510
4510
  "dd",
@@ -4517,7 +4517,7 @@ function Gt({
4517
4517
  contentEditable: l && c ? "plaintext-only" : "false",
4518
4518
  suppressContentEditableWarning: !0,
4519
4519
  "e-after": _,
4520
- children: z.Money(e)
4520
+ children: U.Money(e)
4521
4521
  }
4522
4522
  ),
4523
4523
  i ? /* @__PURE__ */ a.jsx("em", { children: i }) : ""
@@ -4566,7 +4566,7 @@ function na({
4566
4566
  {
4567
4567
  onClick: C,
4568
4568
  ...g,
4569
- children: z.Date(x, "mm.yyyy")
4569
+ children: U.Date(x, "mm.yyyy")
4570
4570
  }
4571
4571
  ),
4572
4572
  s && /* @__PURE__ */ a.jsx("em", { children: s })
@@ -4586,7 +4586,7 @@ const kc = (e) => {
4586
4586
  }, x = () => {
4587
4587
  c(l - 1);
4588
4588
  }, f = (j) => {
4589
- e.onValue(l + "-" + z.Number(2, j)), _();
4589
+ e.onValue(l + "-" + U.Number(2, j)), _();
4590
4590
  }, m = (j) => i.y === o.y && i.m === j ? "_FFEB3B" : "", C = Array(12).fill("").map((j, y) => y + 1), g = window.innerHeight - e.position.y + 33 < 320 ? e.position.y - 312 : e.position.y + 33, p = window.innerWidth - e.position.x < 265 ? e.position.x - 235 : e.position.x;
4591
4591
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: t ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
4592
4592
  /* @__PURE__ */ a.jsx(
@@ -4635,7 +4635,7 @@ const kc = (e) => {
4635
4635
  f(j);
4636
4636
  },
4637
4637
  color: m(j),
4638
- children: /* @__PURE__ */ a.jsx("b", { children: z.Month(j).abc })
4638
+ children: /* @__PURE__ */ a.jsx("b", { children: U.Month(j).abc })
4639
4639
  },
4640
4640
  y
4641
4641
  )) })
@@ -4692,8 +4692,8 @@ function aa({
4692
4692
  if (!(c && _) && !x) return "";
4693
4693
  const b = {};
4694
4694
  b.field = "notes", p && (b.className = p);
4695
- const U = {};
4696
- s && (U.placeholder = s), c && _ && (U.edit = ""), y && (U.open = "");
4695
+ const z = {};
4696
+ s && (z.placeholder = s), c && _ && (z.edit = ""), y && (z.open = "");
4697
4697
  const T = (M) => {
4698
4698
  oe.Blur(M), g == null || g({ value: M.target.textContent.trim(), name: r });
4699
4699
  };
@@ -4709,7 +4709,7 @@ function aa({
4709
4709
  onContextMenu: w,
4710
4710
  contentEditable: c && _ ? "plaintext-only" : "false",
4711
4711
  suppressContentEditableWarning: !0,
4712
- ...U,
4712
+ ...z,
4713
4713
  children: t
4714
4714
  }
4715
4715
  ),
@@ -4745,13 +4745,13 @@ function Zt({
4745
4745
  }, R = (b) => {
4746
4746
  if (b.which === 17 || b.which === 91) return p = !1;
4747
4747
  }, L = (b) => {
4748
- b.preventDefault(), navigator.clipboard.readText().then((U) => {
4749
- U = U.replace(/\D/g, ""), window.document.execCommand(
4748
+ b.preventDefault(), navigator.clipboard.readText().then((z) => {
4749
+ z = z.replace(/\D/g, ""), window.document.execCommand(
4750
4750
  "insertText",
4751
4751
  !1,
4752
- "" + U.replace(/\D/g, "")
4752
+ "" + z.replace(/\D/g, "")
4753
4753
  );
4754
- }).catch((U) => {
4754
+ }).catch((z) => {
4755
4755
  });
4756
4756
  };
4757
4757
  const k = (b) => {
@@ -6276,7 +6276,7 @@ function Ut({
6276
6276
  }, b = ($) => {
6277
6277
  $.key === "Enter" && $.preventDefault();
6278
6278
  };
6279
- const U = ($) => {
6279
+ const z = ($) => {
6280
6280
  oe.Blur($), n && n({
6281
6281
  value: $.target.textContent.replace(/\D/g, ""),
6282
6282
  name: r
@@ -6294,7 +6294,7 @@ function Ut({
6294
6294
  onInput: S,
6295
6295
  onKeyDown: b,
6296
6296
  onContextMenu: k,
6297
- onBlur: U,
6297
+ onBlur: z,
6298
6298
  suppressContentEditableWarning: !0,
6299
6299
  children: w.q
6300
6300
  }
@@ -6752,20 +6752,20 @@ function oa({
6752
6752
  onSave: m,
6753
6753
  className: C = ""
6754
6754
  }) {
6755
- let g = !!(o && (e === "" || e === void 0)), p = z.Date(e === void 0 ? /* @__PURE__ */ new Date() : e, "HH:MM"), j = h.useRef(null);
6755
+ let g = !!(o && (e === "" || e === void 0)), p = U.Date(e === void 0 ? /* @__PURE__ */ new Date() : e, "HH:MM"), j = h.useRef(null);
6756
6756
  if (!(l && c) && !u || !(l && c) && g) return "";
6757
6757
  let y = (S) => {
6758
6758
  j.current.textContent = S, t && t({ value: S, name: n });
6759
6759
  }, R = (S) => {
6760
6760
  m && m({ value: S, name: n });
6761
6761
  }, L = (S) => {
6762
- const b = S.target.getBoundingClientRect(), U = b.left, T = b.top;
6762
+ const b = S.target.getBoundingClientRect(), z = b.left, T = b.top;
6763
6763
  he.setListener(
6764
6764
  "form",
6765
6765
  /* @__PURE__ */ a.jsx(
6766
6766
  Sc,
6767
6767
  {
6768
- positions: { x: U, y: T },
6768
+ positions: { x: z, y: T },
6769
6769
  onSave: R,
6770
6770
  onValue: y,
6771
6771
  date: p
@@ -6791,8 +6791,8 @@ function oa({
6791
6791
  }
6792
6792
  const Sc = ({ positions: e, onSave: t, onValue: n, date: r }) => {
6793
6793
  let s = r.split(":"), i = {
6794
- h: z.Number(2, s[0]),
6795
- m: z.Number(2, s[1])
6794
+ h: U.Number(2, s[0]),
6795
+ m: U.Number(2, s[1])
6796
6796
  }, o = "hour", [l, c] = h.useState({}), _ = !1, u = 0, x = 0, f = {
6797
6797
  body: h.useRef(null),
6798
6798
  time: h.useRef(null),
@@ -6815,10 +6815,10 @@ const Sc = ({ positions: e, onSave: t, onValue: n, date: r }) => {
6815
6815
  ) * (180 / Math.PI) * -1 + 180;
6816
6816
  f[o].current.style.transform = "rotate(" + b + "deg)", o === "hour" ? (i = {
6817
6817
  ...i,
6818
- h: z.Number(2, parseInt(String(b / 15), 10))
6818
+ h: U.Number(2, parseInt(String(b / 15), 10))
6819
6819
  }, f.hourText.current.textContent = i.h) : (i = {
6820
6820
  ...i,
6821
- m: z.Number(2, parseInt(String(b / 6), 10))
6821
+ m: U.Number(2, parseInt(String(b / 6), 10))
6822
6822
  }, f.timeText.current.textContent = i.m), n(i.h + ":" + i.m);
6823
6823
  }
6824
6824
  }, p = (w) => {
@@ -6829,7 +6829,7 @@ const Sc = ({ positions: e, onSave: t, onValue: n, date: r }) => {
6829
6829
  if (x !== S) {
6830
6830
  x = S;
6831
6831
  let b = parseInt(i.h, 10) + 1;
6832
- b = b > 23 ? 0 : b, i = { ...i, h: z.Number(2, b) }, f.hourText.current.textContent = i.h, f[o].current.style.transform = "rotate(" + i.h * 15 + "deg)";
6832
+ b = b > 23 ? 0 : b, i = { ...i, h: U.Number(2, b) }, f.hourText.current.textContent = i.h, f[o].current.style.transform = "rotate(" + i.h * 15 + "deg)";
6833
6833
  }
6834
6834
  } else {
6835
6835
  u -= w.deltaY;
@@ -6837,7 +6837,7 @@ const Sc = ({ positions: e, onSave: t, onValue: n, date: r }) => {
6837
6837
  if (x !== S) {
6838
6838
  x = S;
6839
6839
  let b = parseInt(i.h, 10) - 1;
6840
- b = b < 0 ? 23 : b, i = { ...i, h: z.Number(2, b) }, f.hourText.current.textContent = i.h, f[o].current.style.transform = "rotate(" + i.h * 15 + "deg)";
6840
+ b = b < 0 ? 23 : b, i = { ...i, h: U.Number(2, b) }, f.hourText.current.textContent = i.h, f[o].current.style.transform = "rotate(" + i.h * 15 + "deg)";
6841
6841
  }
6842
6842
  }
6843
6843
  else if (w.deltaY > 0) {
@@ -6846,7 +6846,7 @@ const Sc = ({ positions: e, onSave: t, onValue: n, date: r }) => {
6846
6846
  if (x !== S) {
6847
6847
  x = S;
6848
6848
  let b = parseInt(i.m, 10) + 1;
6849
- b = b > 59 ? 0 : b, i = { ...i, m: z.Number(2, b) }, f.timeText.current.textContent = i.m, f[o].current.style.transform = "rotate(" + i.m * 6 + "deg)";
6849
+ b = b > 59 ? 0 : b, i = { ...i, m: U.Number(2, b) }, f.timeText.current.textContent = i.m, f[o].current.style.transform = "rotate(" + i.m * 6 + "deg)";
6850
6850
  }
6851
6851
  } else {
6852
6852
  u -= w.deltaY;
@@ -6854,7 +6854,7 @@ const Sc = ({ positions: e, onSave: t, onValue: n, date: r }) => {
6854
6854
  if (x !== S) {
6855
6855
  x = S;
6856
6856
  let b = parseInt(i.m, 10) - 1;
6857
- b = b < 0 ? 59 : b, i = { ...i, m: z.Number(2, b) }, f.timeText.current.textContent = i.m, f[o].current.style.transform = "rotate(" + i.m * 6 + "deg)";
6857
+ b = b < 0 ? 59 : b, i = { ...i, m: U.Number(2, b) }, f.timeText.current.textContent = i.m, f[o].current.style.transform = "rotate(" + i.m * 6 + "deg)";
6858
6858
  }
6859
6859
  }
6860
6860
  n(i.h + ":" + i.m);
@@ -7024,7 +7024,7 @@ function da({
7024
7024
  };
7025
7025
  let b = (M, $) => {
7026
7026
  p[$] = M.target.textContent, t && t({ value: p.join(g), name: n });
7027
- }, U = (M) => {
7027
+ }, z = (M) => {
7028
7028
  M.key === "Enter" && M.preventDefault();
7029
7029
  };
7030
7030
  const T = ({ data: M }) => f !== 0 && M.length >= f ? "" : /* @__PURE__ */ a.jsx("i", { onClick: y, children: /* @__PURE__ */ a.jsxs(
@@ -7058,7 +7058,7 @@ function da({
7058
7058
  placeholder: r,
7059
7059
  onPaste: k,
7060
7060
  contentEditable: l && c ? "plaintext-only" : "false",
7061
- onKeyDown: U,
7061
+ onKeyDown: z,
7062
7062
  onBlur: (N) => S(N, $),
7063
7063
  suppressContentEditableWarning: !0,
7064
7064
  children: p[$]
@@ -7380,7 +7380,7 @@ function Bc({
7380
7380
  }, S = k(e), b = (N) => {
7381
7381
  let F = k(N.target.textContent);
7382
7382
  N.target.textContent = F.q, F.i = F.q.lastIndexOf(F.v.substr(-1)), F.i < F.q.length && F.q !== p ? F.i++ : F.i = F.q.indexOf("_"), R(F.i, N.target), t && t({ value: F.q.replace(/\D/g, ""), name: r });
7383
- }, U = (N) => {
7383
+ }, z = (N) => {
7384
7384
  N.key === "Enter" && N.preventDefault();
7385
7385
  };
7386
7386
  const T = (N) => {
@@ -7399,7 +7399,7 @@ function Bc({
7399
7399
  ...$,
7400
7400
  onPaste: L,
7401
7401
  onInput: b,
7402
- onKeyDown: U,
7402
+ onKeyDown: z,
7403
7403
  onContextMenu: w,
7404
7404
  onBlur: T,
7405
7405
  suppressContentEditableWarning: !0,
@@ -7994,7 +7994,7 @@ export {
7994
7994
  Ld as Files,
7995
7995
  Ad as Filter,
7996
7996
  $d as Form,
7997
- z as Format,
7997
+ U as Format,
7998
7998
  Md as HotKey,
7999
7999
  Id as Icon,
8000
8000
  dl as Init,