anarock-widgets 1.0.340 → 1.0.342

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
@@ -53568,7 +53568,7 @@ function hpe({ data: e = null }) {
53568
53568
  description: "Catch up all the data. Change the date range to see the data."
53569
53569
  }
53570
53570
  ) }) : /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col items-center mt-[16px]", children: [
53571
- /* @__PURE__ */ h.jsxs("div", { className: "relative w-[200px] h-[200px]", children: [
53571
+ /* @__PURE__ */ h.jsxs("div", { className: "relative w-[212px] h-[212px]", children: [
53572
53572
  /* @__PURE__ */ h.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ h.jsx("div", { className: "w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]" }) }),
53573
53573
  /* @__PURE__ */ h.jsx("div", { className: "h-[212px]", children: /* @__PURE__ */ h.jsx(Pt, { width: "100%", height: "100%", children: /* @__PURE__ */ h.jsxs(Hi, { children: [
53574
53574
  /* @__PURE__ */ h.jsx(
@@ -53648,18 +53648,12 @@ function mpe({
53648
53648
  ] }) });
53649
53649
  }
53650
53650
  function gpe({ data: e = [] }) {
53651
- const t = [
53652
- { block_name: "Google", entries: 4, exit: 4 },
53653
- { block_name: "Uber", entries: 3, exit: 3 },
53654
- { block_name: "ANAROCK", entries: 3, exit: 3 },
53655
- { block_name: "Flipkart", entries: 2, exit: 2 },
53656
- { block_name: "HP", entries: 22, exit: 1 }
53657
- ], [n, r] = B.useState([]), i = e.length ? e : t, o = e && e.length > 0 && e.every(
53658
- (l) => Number(l.entries) === 0 && Number(l.exit) === 0
53659
- ), a = (l) => l >= 1e3 ? `${l / 1e3}K` : l, s = (l) => {
53660
- r((c) => c.includes(l) ? c.filter((u) => u !== l) : [...c, l]);
53661
- };
53662
- return /* @__PURE__ */ h.jsx(At, { title: "Access Points Usage", titleWeight: "semi-bold", className: "h-[362px]", children: o ? /* @__PURE__ */ h.jsx("div", { className: "h-[270px] flex items-center justify-center", children: /* @__PURE__ */ h.jsx(
53651
+ const [t, n] = B.useState([]), r = e && e.length ? e : [], i = !e || e.length === 0, o = e && e.length > 0 && e.every(
53652
+ (c) => Number(c.entries) === 0 && Number(c.exit) === 0
53653
+ ), a = i || o, s = (c) => c >= 1e3 ? `${c / 1e3}K` : c, l = (c) => {
53654
+ n((u) => u.includes(c) ? u.filter((d) => d !== c) : [...u, c]);
53655
+ };
53656
+ return /* @__PURE__ */ h.jsx(At, { title: "Access Points Usage", titleWeight: "semi-bold", className: "h-[362px]", children: a ? /* @__PURE__ */ h.jsx("div", { className: "h-[270px] flex items-center justify-center", children: /* @__PURE__ */ h.jsx(
53663
53657
  Sn,
53664
53658
  {
53665
53659
  title: "No access Point Found",
@@ -53668,7 +53662,7 @@ function gpe({ data: e = [] }) {
53668
53662
  ) }) : /* @__PURE__ */ h.jsx("div", { className: "mt-[24px] h-[270px] w-full", children: /* @__PURE__ */ h.jsx(Pt, { width: "100%", height: "100%", children: /* @__PURE__ */ h.jsxs(
53669
53663
  jo,
53670
53664
  {
53671
- data: i,
53665
+ data: r,
53672
53666
  barSize: 54,
53673
53667
  margin: { top: 0, right: 0, left: -20, bottom: 0 },
53674
53668
  children: [
@@ -53686,7 +53680,7 @@ function gpe({ data: e = [] }) {
53686
53680
  /* @__PURE__ */ h.jsx(
53687
53681
  Ln,
53688
53682
  {
53689
- tickFormatter: a,
53683
+ tickFormatter: s,
53690
53684
  tick: { fontSize: 12, fill: "#64748B" },
53691
53685
  axisLine: !1,
53692
53686
  tickLine: !1
@@ -53697,9 +53691,9 @@ function gpe({ data: e = [] }) {
53697
53691
  {
53698
53692
  cursor: !1,
53699
53693
  wrapperStyle: { zIndex: 1e3 },
53700
- content: (l) => {
53701
- if (!l.active || !l.label) return null;
53702
- const c = i.find((u) => u.block_name === l.label);
53694
+ content: (c) => {
53695
+ if (!c.active || !c.label) return null;
53696
+ const u = r.find((d) => d.block_name === c.label);
53703
53697
  return /* @__PURE__ */ h.jsxs(
53704
53698
  "div",
53705
53699
  {
@@ -53714,8 +53708,8 @@ function gpe({ data: e = [] }) {
53714
53708
  fontSize: "13px"
53715
53709
  },
53716
53710
  children: [
53717
- /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 600 }, children: l.label }),
53718
- !n.includes("entries") && /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
53711
+ /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 600 }, children: c.label }),
53712
+ !t.includes("entries") && /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
53719
53713
  /* @__PURE__ */ h.jsx(
53720
53714
  "div",
53721
53715
  {
@@ -53728,9 +53722,9 @@ function gpe({ data: e = [] }) {
53728
53722
  }
53729
53723
  ),
53730
53724
  /* @__PURE__ */ h.jsx("div", { style: { color: "#aaa" }, children: "Entries" }),
53731
- /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 700 }, children: c?.entries ?? 0 })
53725
+ /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 700 }, children: u?.entries ?? 0 })
53732
53726
  ] }),
53733
- !n.includes("exit") && /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
53727
+ !t.includes("exit") && /* @__PURE__ */ h.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
53734
53728
  /* @__PURE__ */ h.jsx(
53735
53729
  "div",
53736
53730
  {
@@ -53743,7 +53737,7 @@ function gpe({ data: e = [] }) {
53743
53737
  }
53744
53738
  ),
53745
53739
  /* @__PURE__ */ h.jsx("div", { style: { color: "#aaa" }, children: "Exit" }),
53746
- /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 700 }, children: c?.exit ?? 0 })
53740
+ /* @__PURE__ */ h.jsx("div", { style: { fontWeight: 700 }, children: u?.exit ?? 0 })
53747
53741
  ] })
53748
53742
  ]
53749
53743
  }
@@ -53757,22 +53751,22 @@ function gpe({ data: e = [] }) {
53757
53751
  verticalAlign: "bottom",
53758
53752
  height: 36,
53759
53753
  content: () => {
53760
- const l = [
53754
+ const c = [
53761
53755
  { key: "entries", label: "Entries", color: "#329DFF" },
53762
53756
  { key: "exit", label: "Exit", color: "#76BDFF" }
53763
53757
  ];
53764
- return /* @__PURE__ */ h.jsx("div", { style: { display: "flex", gap: "20px", justifyContent: "center", marginTop: "20px" }, children: l.map((c, u) => {
53765
- const d = n.includes(c.key);
53758
+ return /* @__PURE__ */ h.jsx("div", { style: { display: "flex", gap: "20px", justifyContent: "center", marginTop: "20px" }, children: c.map((u, d) => {
53759
+ const f = t.includes(u.key);
53766
53760
  return /* @__PURE__ */ h.jsxs(
53767
53761
  "div",
53768
53762
  {
53769
- onClick: () => s(c.key),
53763
+ onClick: () => l(u.key),
53770
53764
  style: {
53771
53765
  display: "flex",
53772
53766
  alignItems: "center",
53773
53767
  gap: "8px",
53774
53768
  cursor: "pointer",
53775
- opacity: d ? 0.4 : 1
53769
+ opacity: f ? 0.4 : 1
53776
53770
  },
53777
53771
  children: [
53778
53772
  /* @__PURE__ */ h.jsx(
@@ -53781,14 +53775,14 @@ function gpe({ data: e = [] }) {
53781
53775
  style: {
53782
53776
  width: "20px",
53783
53777
  height: "8px",
53784
- backgroundColor: c.color
53778
+ backgroundColor: u.color
53785
53779
  }
53786
53780
  }
53787
53781
  ),
53788
- /* @__PURE__ */ h.jsx("div", { style: { fontSize: "12px", color: "#64748B" }, children: c.label })
53782
+ /* @__PURE__ */ h.jsx("div", { style: { fontSize: "12px", color: "#64748B" }, children: u.label })
53789
53783
  ]
53790
53784
  },
53791
- u
53785
+ d
53792
53786
  );
53793
53787
  }) });
53794
53788
  }
@@ -53800,7 +53794,7 @@ function gpe({ data: e = [] }) {
53800
53794
  dataKey: "entries",
53801
53795
  stackId: "a",
53802
53796
  fill: "#329DFF",
53803
- hide: n.includes("entries")
53797
+ hide: t.includes("entries")
53804
53798
  }
53805
53799
  ),
53806
53800
  /* @__PURE__ */ h.jsx(
@@ -53809,7 +53803,7 @@ function gpe({ data: e = [] }) {
53809
53803
  dataKey: "exit",
53810
53804
  stackId: "a",
53811
53805
  fill: "#76BDFF",
53812
- hide: n.includes("exit")
53806
+ hide: t.includes("exit")
53813
53807
  }
53814
53808
  )
53815
53809
  ]