@ambuj.bhaskar/react-component-library 0.24.7-alpha → 0.24.8-alpha

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.d.ts CHANGED
@@ -844,6 +844,8 @@ export declare type EventPreviewProps = {
844
844
  focusedIndex?: number;
845
845
  setFocusedIndex?: (index: number) => void;
846
846
  emptyData?: React.ReactNode;
847
+ dateFormat?: Intl.DateTimeFormat;
848
+ timeFormat?: Intl.DateTimeFormat;
847
849
  };
848
850
 
849
851
  declare type EventType = {
package/dist/index.js CHANGED
@@ -74700,7 +74700,7 @@ const kOe = ({
74700
74700
  hour: "2-digit",
74701
74701
  minute: "2-digit",
74702
74702
  second: "2-digit",
74703
- hour12: !0
74703
+ hour12: !1
74704
74704
  }), Ms = (e) => {
74705
74705
  e.scrollIntoView({
74706
74706
  behavior: "smooth",
@@ -74715,42 +74715,44 @@ const kOe = ({
74715
74715
  height: i = "40rem",
74716
74716
  focusedIndex: a = 0,
74717
74717
  setFocusedIndex: s,
74718
- emptyData: l
74718
+ emptyData: l,
74719
+ dateFormat: u = UE,
74720
+ timeFormat: d = ZE
74719
74721
  }) => {
74720
- var C;
74721
- const u = n, d = u == null ? void 0 : u[a];
74722
- d != null && d.appName && (e = d == null ? void 0 : d.appName), d != null && d.appName && (t = d == null ? void 0 : d.icon);
74723
- const h = y0(
74724
- (m) => {
74725
- switch (m.key) {
74722
+ var A;
74723
+ const h = n, C = h == null ? void 0 : h[a];
74724
+ C != null && C.appName && (e = C == null ? void 0 : C.appName), C != null && C.appName && (t = C == null ? void 0 : C.icon);
74725
+ const m = y0(
74726
+ (v) => {
74727
+ switch (v.key) {
74726
74728
  case "ArrowUp":
74727
74729
  if (a === 0) return;
74728
- Ms(m.target), s == null || s(a - 1);
74730
+ Ms(v.target), s == null || s(a - 1);
74729
74731
  break;
74730
74732
  case "ArrowDown":
74731
- if (a === (u == null ? void 0 : u.length) - 1) return;
74732
- Ms(m.target), s == null || s(a + 1);
74733
+ if (a === (h == null ? void 0 : h.length) - 1) return;
74734
+ Ms(v.target), s == null || s(a + 1);
74733
74735
  break;
74734
74736
  }
74735
74737
  },
74736
- [a, u == null ? void 0 : u.length, s]
74738
+ [a, h == null ? void 0 : h.length, s]
74737
74739
  );
74738
- return Nt(() => (window.addEventListener("keydown", h), () => window.removeEventListener("keydown", h)), [h]), /* @__PURE__ */ K.jsx(
74740
+ return Nt(() => (window.addEventListener("keydown", m), () => window.removeEventListener("keydown", m)), [m]), /* @__PURE__ */ K.jsx(
74739
74741
  "div",
74740
74742
  {
74741
- className: `event_preview_window ${u != null && u.length ? "" : "empty"}`,
74743
+ className: `event_preview_window ${h != null && h.length ? "" : "empty"}`,
74742
74744
  style: {
74743
74745
  height: i,
74744
74746
  width: o
74745
74747
  },
74746
- children: (u == null ? void 0 : u.length) == 0 || d == null ? l ?? "No data found! 📊" : /* @__PURE__ */ K.jsxs(K.Fragment, { children: [
74748
+ children: (h == null ? void 0 : h.length) == 0 || C == null ? l ?? "No data found! 📊" : /* @__PURE__ */ K.jsxs(K.Fragment, { children: [
74747
74749
  /* @__PURE__ */ K.jsxs("span", { className: "event_preview_dialog_header", children: [
74748
74750
  /* @__PURE__ */ K.jsx("span", { className: "event_preview_dialog_header_icon", children: t && /* @__PURE__ */ K.jsx("img", { src: t, alt: e }) }),
74749
74751
  /* @__PURE__ */ K.jsx("span", { className: "event_preview_dialog_header_content", title: e, children: /* @__PURE__ */ K.jsx("h6", { className: "hydra_text_limit", children: e }) })
74750
74752
  ] }),
74751
74753
  /* @__PURE__ */ K.jsxs("div", { className: "event_preview_content_container", children: [
74752
74754
  /* @__PURE__ */ K.jsxs("span", { className: "event_preview_image_container", children: [
74753
- /* @__PURE__ */ K.jsx("img", { src: d == null ? void 0 : d.frameUrl, alt: "Alert" }),
74755
+ /* @__PURE__ */ K.jsx("img", { src: C == null ? void 0 : C.frameUrl, alt: "Alert" }),
74754
74756
  /* @__PURE__ */ K.jsxs("div", { className: "event_preview_image_footer", children: [
74755
74757
  /* @__PURE__ */ K.jsxs("span", { className: "event_preview_image_footer_infoitem", children: [
74756
74758
  /* @__PURE__ */ K.jsx(
@@ -74758,16 +74760,16 @@ const kOe = ({
74758
74760
  {
74759
74761
  className: "status_indicator",
74760
74762
  style: {
74761
- background: `linear-gradient(90deg, rgba(0,0,0,0), ${d == null ? void 0 : d.color})`
74763
+ background: `linear-gradient(90deg, rgba(0,0,0,0), ${C == null ? void 0 : C.color})`
74762
74764
  }
74763
74765
  }
74764
74766
  ),
74765
74767
  /* @__PURE__ */ K.jsx("p", { children: "Severity" }),
74766
- /* @__PURE__ */ K.jsx("h5", { title: d == null ? void 0 : d.severity, children: (C = d == null ? void 0 : d.severity) == null ? void 0 : C.toLocaleLowerCase() })
74768
+ /* @__PURE__ */ K.jsx("h5", { title: C == null ? void 0 : C.severity, children: (A = C == null ? void 0 : C.severity) == null ? void 0 : A.toLocaleLowerCase() })
74767
74769
  ] }),
74768
74770
  /* @__PURE__ */ K.jsxs("span", { className: "event_preview_image_footer_infoitem", children: [
74769
74771
  /* @__PURE__ */ K.jsx("p", { children: "Source" }),
74770
- /* @__PURE__ */ K.jsx("h5", { title: d == null ? void 0 : d.location, children: d == null ? void 0 : d.location })
74772
+ /* @__PURE__ */ K.jsx("h5", { title: C == null ? void 0 : C.location, children: C == null ? void 0 : C.location })
74771
74773
  ] }),
74772
74774
  /* @__PURE__ */ K.jsxs("span", { className: "event_preview_image_footer_infoitem", children: [
74773
74775
  /* @__PURE__ */ K.jsx("p", { children: "Date" }),
@@ -74775,9 +74777,9 @@ const kOe = ({
74775
74777
  "h5",
74776
74778
  {
74777
74779
  title: UE.format(
74778
- new Date(d == null ? void 0 : d.timeStamp)
74780
+ new Date(C == null ? void 0 : C.timeStamp)
74779
74781
  ),
74780
- children: UE.format(new Date(d == null ? void 0 : d.timeStamp))
74782
+ children: u == null ? void 0 : u.format(new Date(C == null ? void 0 : C.timeStamp))
74781
74783
  }
74782
74784
  )
74783
74785
  ] }),
@@ -74787,19 +74789,19 @@ const kOe = ({
74787
74789
  "h5",
74788
74790
  {
74789
74791
  title: ZE.format(
74790
- new Date(d == null ? void 0 : d.timeStamp)
74792
+ new Date(C == null ? void 0 : C.timeStamp)
74791
74793
  ),
74792
- children: ZE.format(new Date(d == null ? void 0 : d.timeStamp))
74794
+ children: d == null ? void 0 : d.format(new Date(C == null ? void 0 : C.timeStamp))
74793
74795
  }
74794
74796
  )
74795
74797
  ] })
74796
74798
  ] })
74797
74799
  ] }),
74798
- /* @__PURE__ */ K.jsx("span", { className: "event_preview_content", children: /* @__PURE__ */ K.jsx(kOe, { data: d == null ? void 0 : d.blobs }) }),
74800
+ /* @__PURE__ */ K.jsx("span", { className: "event_preview_content", children: /* @__PURE__ */ K.jsx(kOe, { data: C == null ? void 0 : C.blobs }) }),
74799
74801
  /* @__PURE__ */ K.jsx("span", { className: "event_preview_other_events_container", children: r || /* @__PURE__ */ K.jsx(
74800
74802
  NOe,
74801
74803
  {
74802
- events: u,
74804
+ events: h,
74803
74805
  focusedIndex: a,
74804
74806
  setFocusedIndex: s
74805
74807
  }