@ssgc/alert-console 2.9.9 → 2.9.10

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
@@ -1,5 +1,5 @@
1
1
  import { jsx as c, jsxs as h, Fragment as cr } from "react/jsx-runtime";
2
- import { useContext as ka, useMemo as Ae, createContext as Ia, forwardRef as ur, createElement as qs, useState as v, useEffect as re, useRef as xa } from "react";
2
+ import { useContext as ka, useMemo as Ae, createContext as Ia, forwardRef as ur, createElement as qs, useState as v, useEffect as ne, useRef as xa } from "react";
3
3
  import { Select as De, Table as on, Row as Le, Col as J, Input as Oa, Tag as Mt, Space as nt, Tooltip as wn, Button as Fe, Progress as Ea, Dropdown as Ma, Typography as Kt, Spin as Ns, Checkbox as It, Divider as Ht, TimePicker as An, Tabs as ln, Card as Rs, Steps as Da, Modal as Ca, Carousel as Ra } from "antd";
4
4
  import { MessageOutlined as Ua, MailOutlined as La, MoreOutlined as Fa, PlusOutlined as $a, EditOutlined as Pa, LeftOutlined as Wa, RightOutlined as Va } from "@ant-design/icons";
5
5
  import { toast as Te } from "react-toastify";
@@ -102,8 +102,8 @@ function si(t) {
102
102
  }), a = await We(r, {
103
103
  method: "GET",
104
104
  headers: e
105
- });
106
- return Array.isArray(a) ? a : [];
105
+ }), i = Array.isArray(a) ? a : [], o = i.length > 0 ? i[0].totalRecords ?? i.length : 0;
106
+ return { items: i, total: o };
107
107
  },
108
108
  async getAlertStatusList() {
109
109
  const s = Pe(t.baseUrl, "/api/Alert/AlertStatusList"), n = await We(s, {
@@ -311,7 +311,7 @@ function oi() {
311
311
  } }, O = "en", Z = {};
312
312
  Z[O] = G;
313
313
  var R = "$isDayjsObject", q = function(M) {
314
- return M instanceof ne || !(!M || !M[R]);
314
+ return M instanceof re || !(!M || !M[R]);
315
315
  }, f = function M(b, w, x) {
316
316
  var T;
317
317
  if (!b) return O;
@@ -328,12 +328,12 @@ function oi() {
328
328
  }, A = function(M, b) {
329
329
  if (q(M)) return M.clone();
330
330
  var w = typeof b == "object" ? b : {};
331
- return w.date = M, w.args = arguments, new ne(w);
331
+ return w.date = M, w.args = arguments, new re(w);
332
332
  }, C = g;
333
333
  C.l = f, C.i = q, C.w = function(M, b) {
334
334
  return A(M, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
335
335
  };
336
- var ne = (function() {
336
+ var re = (function() {
337
337
  function M(w) {
338
338
  this.$L = f(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[R] = !0;
339
339
  }
@@ -548,13 +548,13 @@ function oi() {
548
548
  }, b.toString = function() {
549
549
  return this.$d.toUTCString();
550
550
  }, M;
551
- })(), fe = ne.prototype;
551
+ })(), fe = re.prototype;
552
552
  return A.prototype = fe, [["$ms", a], ["$s", i], ["$m", o], ["$H", l], ["$W", u], ["$M", m], ["$y", p], ["$D", I]].forEach((function(M) {
553
553
  fe[M[1]] = function(b) {
554
554
  return this.$g(b, M[0], M[1]);
555
555
  };
556
556
  })), A.extend = function(M, b) {
557
- return M.$i || (M(b, ne, A), M.$i = !0), A;
557
+ return M.$i || (M(b, re, A), M.$i = !0), A;
558
558
  }, A.locale = f, A.isDayjs = q, A.unix = function(M) {
559
559
  return A(1e3 * M);
560
560
  }, A.en = Z[O], A.Ls = Z, A.p = {}, A;
@@ -1572,9 +1572,9 @@ const Gi = [
1572
1572
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
1573
1573
  ], qi = bs("minimize-2", Gi), vr = ({ isOpen: t, onClose: e, src: s, type: n = "image" }) => {
1574
1574
  const [r, a] = v(!1), [i, o] = v(!1);
1575
- return re(() => {
1575
+ return ne(() => {
1576
1576
  t && o(!1);
1577
- }, [t, s]), re(() => {
1577
+ }, [t, s]), ne(() => {
1578
1578
  t && (!s || i) && e();
1579
1579
  }, [t, s, i, e]), t ? /* @__PURE__ */ c(
1580
1580
  "div",
@@ -1641,7 +1641,7 @@ function Yi(t) {
1641
1641
  }
1642
1642
  function wr({ record: t }) {
1643
1643
  const e = Ae(() => Yi(t), [t]), [s, n] = v(!1), [r, a] = v(!1);
1644
- if (re(() => {
1644
+ if (ne(() => {
1645
1645
  a(!1);
1646
1646
  }, [e?.url]), !e)
1647
1647
  return /* @__PURE__ */ c("span", { className: "text-gray-400 text-sm", children: "—" });
@@ -1689,26 +1689,26 @@ function wr({ record: t }) {
1689
1689
  }
1690
1690
  function ji(t, e) {
1691
1691
  const [s, n] = v(t);
1692
- return re(() => {
1692
+ return ne(() => {
1693
1693
  const r = window.setTimeout(() => n(t), e);
1694
1694
  return () => window.clearTimeout(r);
1695
1695
  }, [t, e]), s;
1696
1696
  }
1697
1697
  function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage: r, columns: a, severityOptions: i, anomalyOptions: o, spaceOptions: l, renderActions: u, onAlertIdClick: d, onRefetch: m, onPageChange: S, onFilterChange: p, resetKey: I, serverSideFilters: E = !1 }) {
1698
1698
  const [D, j] = v("All"), [G, P] = v("All"), [g, O] = v("All"), [Z, R] = v("All"), [q, f] = v(""), [A, C] = v(r ?? 1);
1699
- re(() => {
1699
+ ne(() => {
1700
1700
  I !== void 0 && (j("All"), P("All"), O("All"), R("All"), f(""), C(1));
1701
- }, [I]), re(() => {
1701
+ }, [I]), ne(() => {
1702
1702
  r !== void 0 && C(r);
1703
1703
  }, [r]);
1704
- const [ne, fe] = v([{ label: "All", value: "All" }]), [M, b] = v([]), [w, x] = v([]), [T, $] = v([]), [U, Y] = v(/* @__PURE__ */ new Set()), { rules: K, alerts: X, config: ee } = Ze(), ie = ee.tenant === "schools", de = ee.tenant === "transit", oe = ee.tenant === "snl" ? "anomalyDisplayName" : "anomalyName", le = ji(q, 600), Ne = ie && le.trim() ? 100 : s, ce = {
1704
+ const [re, fe] = v([{ label: "All", value: "All" }]), [M, b] = v([]), [w, x] = v([]), [T, $] = v([]), [U, Y] = v(/* @__PURE__ */ new Set()), { rules: K, alerts: X, config: ee } = Ze(), ie = ee.tenant === "schools", de = ee.tenant === "transit", oe = ee.tenant === "snl" ? "anomalyDisplayName" : "anomalyName", le = ji(q, 600), Ne = ie && le.trim() ? 100 : s, ce = {
1705
1705
  6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c(La, {}) },
1706
1706
  7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ c(Ua, {}) }
1707
1707
  }, ae = Ae(
1708
1708
  () => bi(t, oe),
1709
1709
  [t, oe]
1710
1710
  ), Oe = Ae(() => ki(t, de), [t, de]);
1711
- re(() => {
1711
+ ne(() => {
1712
1712
  if (!X.getAllSpaces) return;
1713
1713
  let he = !0;
1714
1714
  return (async () => {
@@ -1727,7 +1727,7 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1727
1727
  })(), () => {
1728
1728
  he = !1;
1729
1729
  };
1730
- }, [X, de]), re(() => {
1730
+ }, [X, de]), ne(() => {
1731
1731
  let he = !0;
1732
1732
  return (async () => {
1733
1733
  try {
@@ -1748,7 +1748,7 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1748
1748
  })(), () => {
1749
1749
  he = !1;
1750
1750
  };
1751
- }, [K]), re(() => {
1751
+ }, [K]), ne(() => {
1752
1752
  if (!p) return;
1753
1753
  const he = {
1754
1754
  anomalyId: w.length > 1 && G !== "All" ? G : void 0,
@@ -1912,7 +1912,7 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1912
1912
  ] }) }),
1913
1913
  /* @__PURE__ */ c(J, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1914
1914
  /* @__PURE__ */ c("span", { children: "Action Taken" }),
1915
- /* @__PURE__ */ c(Ci, { value: Z, onChange: R, options: ne })
1915
+ /* @__PURE__ */ c(Ci, { value: Z, onChange: R, options: re })
1916
1916
  ] }) }),
1917
1917
  /* @__PURE__ */ c(J, { flex: "auto" }),
1918
1918
  /* @__PURE__ */ c(J, { flex: "none", children: /* @__PURE__ */ c(
@@ -7776,7 +7776,7 @@ function tc({
7776
7776
  }
7777
7777
  function sc({ label: t = "USA", timeZone: e = "America/New_York", updateIntervalMs: s = 1e3, className: n }) {
7778
7778
  const [r, a] = v(/* @__PURE__ */ new Date());
7779
- re(() => {
7779
+ ne(() => {
7780
7780
  const u = setInterval(() => a(/* @__PURE__ */ new Date()), s);
7781
7781
  return () => clearInterval(u);
7782
7782
  }, [s]);
@@ -7859,10 +7859,10 @@ function ac(t) {
7859
7859
  setAutoExpire: f,
7860
7860
  onClear: A,
7861
7861
  onSave: C,
7862
- saving: ne,
7862
+ saving: re,
7863
7863
  onActionTypesLoaded: fe
7864
7864
  } = t, { rules: M, config: b } = Ze(), w = b.tenant === "schools", [x, T] = v([]), [$, U] = v([]), [Y, K] = v(!1);
7865
- re(() => {
7865
+ ne(() => {
7866
7866
  let oe = !1;
7867
7867
  return (async () => {
7868
7868
  try {
@@ -7883,7 +7883,7 @@ function ac(t) {
7883
7883
  };
7884
7884
  }, []);
7885
7885
  const X = typeof i == "number" || typeof l == "number", ee = typeof d == "number" || typeof S == "number", ie = typeof i == "number" || typeof l == "number" || typeof d == "number" || typeof S == "number" || typeof I == "number" || typeof D == "number" || Array.isArray(G) && G.length > 0 || Array.isArray(g) && g.length > 0 || !!Z || !!q;
7886
- return /* @__PURE__ */ h(Ns, { spinning: !!ne || Y, children: [
7886
+ return /* @__PURE__ */ h(Ns, { spinning: !!re || Y, children: [
7887
7887
  /* @__PURE__ */ h(Le, { gutter: [16, 16], align: "bottom", children: [
7888
7888
  /* @__PURE__ */ c(J, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
7889
7889
  /* @__PURE__ */ c(lt, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
@@ -8022,7 +8022,7 @@ function ac(t) {
8022
8022
  ] }) }),
8023
8023
  /* @__PURE__ */ c(J, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
8024
8024
  /* @__PURE__ */ c(Fe, { onClick: A, children: "Clear" }),
8025
- /* @__PURE__ */ c(Fe, { type: "primary", onClick: C, loading: !!ne, disabled: !(!!e && ie && !ne), children: "Save" })
8025
+ /* @__PURE__ */ c(Fe, { type: "primary", onClick: C, loading: !!re, disabled: !(!!e && ie && !re), children: "Save" })
8026
8026
  ] }) })
8027
8027
  ] })
8028
8028
  ] });
@@ -8105,7 +8105,7 @@ function lc({ userRoles: t, rules: e, rawRules: s }) {
8105
8105
  })),
8106
8106
  [e]
8107
8107
  );
8108
- re(() => {
8108
+ ne(() => {
8109
8109
  let g = !1;
8110
8110
  return (async () => {
8111
8111
  try {
@@ -8120,9 +8120,9 @@ function lc({ userRoles: t, rules: e, rawRules: s }) {
8120
8120
  })(), () => {
8121
8121
  g = !0;
8122
8122
  };
8123
- }, []), re(() => {
8123
+ }, []), ne(() => {
8124
8124
  !l && Array.isArray(s) && u(s);
8125
- }, [s]), re(() => {
8125
+ }, [s]), ne(() => {
8126
8126
  if (!d || !Array.isArray(l)) {
8127
8127
  p([]);
8128
8128
  return;
@@ -8274,10 +8274,10 @@ function Gs(t) {
8274
8274
  };
8275
8275
  }
8276
8276
  function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: a }) {
8277
- const { rules: i, alerts: o } = Ze(), [l, u] = v("By Severity"), [d, m] = v("By severity"), [S, p] = v("By Severity"), [I, E] = v(!1), [D, j] = v(!1), [G, P] = v(!1), [g, O] = v(null), [Z, R] = v("rules"), [q, f] = v(), [A, C] = v(), [ne, fe] = v(), [M, b] = v(), [w, x] = v(), [T, $] = v(), [U, Y] = v(), [K, X] = v(), [ee, ie] = v([]), [de, oe] = v([]), [le, Ne] = v(!1), [ce, ae] = v(!1), [Oe, $e] = v({}), [et, rt] = v({}), [je, Ft] = v(s || []), [ut, Nt] = v([]), [he, _] = v(!1), [be, ye] = v(!1), [we, Be] = v(n || []);
8278
- re(() => {
8277
+ const { rules: i, alerts: o } = Ze(), [l, u] = v("By Severity"), [d, m] = v("By severity"), [S, p] = v("By Severity"), [I, E] = v(!1), [D, j] = v(!1), [G, P] = v(!1), [g, O] = v(null), [Z, R] = v("rules"), [q, f] = v(), [A, C] = v(), [re, fe] = v(), [M, b] = v(), [w, x] = v(), [T, $] = v(), [U, Y] = v(), [K, X] = v(), [ee, ie] = v([]), [de, oe] = v([]), [le, Ne] = v(!1), [ce, ae] = v(!1), [Oe, $e] = v({}), [et, rt] = v({}), [je, Ft] = v(s || []), [ut, Nt] = v([]), [he, _] = v(!1), [be, ye] = v(!1), [we, Be] = v(n || []);
8278
+ ne(() => {
8279
8279
  n && n.length && Be(n);
8280
- }, [n]), re(() => {
8280
+ }, [n]), ne(() => {
8281
8281
  if (!we || !we.length) return;
8282
8282
  const L = Object.keys(Oe).length > 0 || Object.keys(et).length > 0;
8283
8283
  if (ut.length && !L) return;
@@ -8307,7 +8307,7 @@ function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8307
8307
  () => je.map((L) => ({ label: L.userRoleName, value: L.userRoleId })),
8308
8308
  [je]
8309
8309
  ), $t = Ae(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map((L) => ({ label: `${L}`, value: L })), []);
8310
- re(() => {
8310
+ ne(() => {
8311
8311
  let L = !1;
8312
8312
  async function B() {
8313
8313
  try {
@@ -8329,7 +8329,7 @@ function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8329
8329
  return B(), () => {
8330
8330
  L = !0;
8331
8331
  };
8332
- }, []), re(() => {
8332
+ }, []), ne(() => {
8333
8333
  if (!A) return;
8334
8334
  const L = (y) => {
8335
8335
  const N = Number(y);
@@ -8371,7 +8371,7 @@ function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8371
8371
  ye(!1);
8372
8372
  }
8373
8373
  };
8374
- return re(() => {
8374
+ return ne(() => {
8375
8375
  let L = !1;
8376
8376
  return (async () => {
8377
8377
  try {
@@ -8447,7 +8447,7 @@ function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8447
8447
  ruleOptions: tt,
8448
8448
  minsOptions: $t,
8449
8449
  roleOptions: ke,
8450
- l1mins: ne,
8450
+ l1mins: re,
8451
8451
  setL1mins: fe,
8452
8452
  l1role: M,
8453
8453
  setL1role: b,
@@ -8472,7 +8472,7 @@ function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8472
8472
  _(!0), a?.({
8473
8473
  ruleId: A,
8474
8474
  levels: [
8475
- { minutes: ne, role: M },
8475
+ { minutes: re, role: M },
8476
8476
  { minutes: w, role: T },
8477
8477
  { minutes: U, role: K }
8478
8478
  ],
@@ -8494,7 +8494,7 @@ function cc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8494
8494
  ...z,
8495
8495
  escalationSettings: {
8496
8496
  level1UserRoleId: M ?? 0,
8497
- level1PostAssistTime: ne ?? 0,
8497
+ level1PostAssistTime: re ?? 0,
8498
8498
  level2UserRoleId: T ?? 0,
8499
8499
  level2PostAssistTime: w ?? 0,
8500
8500
  level3UserRoleId: K ?? 0,
@@ -8550,7 +8550,7 @@ function Dc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8550
8550
  { label: "By Severity", value: "By Severity" },
8551
8551
  { label: "By Created Date", value: "By Created Date" }
8552
8552
  ], [o, l] = v("By Severity"), [u, d] = v(/* @__PURE__ */ new Set()), [m, S] = v(null), [p, I] = v(null), [E, D] = v({ inApp: !1, sms: !1, email: !1 }), [j, G] = v([]), [P, g] = v(!0), [O, Z] = v(!1);
8553
- re(() => {
8553
+ ne(() => {
8554
8554
  let f = !1;
8555
8555
  return (async () => {
8556
8556
  try {
@@ -8563,14 +8563,14 @@ function Dc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8563
8563
  email: !!A.email
8564
8564
  });
8565
8565
  const C = mr(A.sortBy);
8566
- l(C === "By Created Date" ? "By Created Date" : "By Severity"), S(On(A.doNotDisturbStart)), I(On(A.doNotDisturbEnd)), Array.isArray(A.anomalyIds) && d(new Set(A.anomalyIds.map((ne) => String(ne))));
8566
+ l(C === "By Created Date" ? "By Created Date" : "By Severity"), S(On(A.doNotDisturbStart)), I(On(A.doNotDisturbEnd)), Array.isArray(A.anomalyIds) && d(new Set(A.anomalyIds.map((re) => String(re))));
8567
8567
  } catch (A) {
8568
8568
  console.error("Error in loading my preferences: ", A);
8569
8569
  }
8570
8570
  })(), () => {
8571
8571
  f = !0;
8572
8572
  };
8573
- }, []), re(() => {
8573
+ }, []), ne(() => {
8574
8574
  let f = !1;
8575
8575
  return (async () => {
8576
8576
  try {
@@ -8605,7 +8605,7 @@ function Dc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8605
8605
  });
8606
8606
  try {
8607
8607
  Z(!0);
8608
- const f = m ? m.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", A = p ? p.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", C = Array.from(u).map((fe) => Number(fe)).filter((fe) => Number.isFinite(fe)), ne = await a.setPreferenceSettings({
8608
+ const f = m ? m.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", A = p ? p.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", C = Array.from(u).map((fe) => Number(fe)).filter((fe) => Number.isFinite(fe)), re = await a.setPreferenceSettings({
8609
8609
  anomalyIds: C,
8610
8610
  doNotDisturbStart: f,
8611
8611
  doNotDisturbEnd: A,
@@ -8614,7 +8614,7 @@ function Dc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8614
8614
  email: !!E.email,
8615
8615
  sortBy: o
8616
8616
  });
8617
- ne?.responseStatus && Te.success(ne?.data || "Preferences updated successfully.");
8617
+ re?.responseStatus && Te.success(re?.data || "Preferences updated successfully.");
8618
8618
  } catch (f) {
8619
8619
  console.error("Error in saving my preferences: ", f);
8620
8620
  } finally {
@@ -8847,7 +8847,7 @@ const yc = ({
8847
8847
  "brandished guns & knives": "weapon",
8848
8848
  "brandished guns and knives": "weapon"
8849
8849
  }, vc = ({ isModalOpen: t, handleModalClose: e, selectedRow: s, fetchAlertLogs: n, alertStatusList: r = [], alertStatusLoading: a = !1, initialTab: i = "details", sourceTab: o, onAlertView: l }) => {
8850
- const [u, d] = v(), [m, S] = v(""), [p, I] = v(!1), E = xa(null), [D, j] = v("details"), [G, P] = v(void 0), g = Nr(), { alerts: O, rules: Z, config: R } = Ze(), { timeZoneDetails: q } = Ms(), [f, A] = v(null), [C, ne] = v(!1), [fe, M] = v(!1), [b, w] = v(void 0), [x, T] = v(void 0), [$, U] = v({}), [Y, K] = v({}), X = (y, N, F) => {
8850
+ const [u, d] = v(), [m, S] = v(""), [p, I] = v(!1), E = xa(null), [D, j] = v("details"), [G, P] = v(void 0), g = Nr(), { alerts: O, rules: Z, config: R } = Ze(), { timeZoneDetails: q } = Ms(), [f, A] = v(null), [C, re] = v(!1), [fe, M] = v(!1), [b, w] = v(void 0), [x, T] = v(void 0), [$, U] = v({}), [Y, K] = v({}), X = (y, N, F) => {
8851
8851
  const Se = Y[y];
8852
8852
  return $[y] === !1 && !Se ? /* @__PURE__ */ h("div", { className: "w-full flex flex-col items-center justify-center min-h-[200px] bg-gray-100 rounded-lg gap-2 text-gray-400", children: [
8853
8853
  /* @__PURE__ */ c(gr, { size: 40 }),
@@ -8916,7 +8916,7 @@ const yc = ({
8916
8916
  P(void 0);
8917
8917
  }
8918
8918
  };
8919
- re(() => {
8919
+ ne(() => {
8920
8920
  if (D !== "track" || !rt) return;
8921
8921
  let y = !1;
8922
8922
  return Be(rt).then(() => {
@@ -8924,21 +8924,21 @@ const yc = ({
8924
8924
  }), () => {
8925
8925
  y = !0;
8926
8926
  };
8927
- }, [D, rt]), re(() => {
8927
+ }, [D, rt]), ne(() => {
8928
8928
  t ? j(i) : (d(void 0), S(""));
8929
- }, [t, i]), re(() => {
8929
+ }, [t, i]), ne(() => {
8930
8930
  !t || !l || l([{
8931
8931
  personName: ee.personName,
8932
8932
  faceId: ee.faceId,
8933
8933
  mediaDetails: ee.mediaDetails
8934
8934
  }]);
8935
- }, [t]), re(() => {
8935
+ }, [t]), ne(() => {
8936
8936
  if (!t || R.tenant !== "snl") return;
8937
8937
  let y = !1;
8938
- return ne(!0), Z.getLookups().then((N) => {
8939
- y || (A(N.alertStatusTypes ?? []), ne(!1));
8938
+ return re(!0), Z.getLookups().then((N) => {
8939
+ y || (A(N.alertStatusTypes ?? []), re(!1));
8940
8940
  }).catch(() => {
8941
- y || (A([]), ne(!1));
8941
+ y || (A([]), re(!1));
8942
8942
  }), () => {
8943
8943
  y = !0;
8944
8944
  };
@@ -8961,7 +8961,7 @@ const yc = ({
8961
8961
  return !y.isElopementStatus && !gt(y) && !Zt(y);
8962
8962
  }
8963
8963
  }).map((y) => ({ value: y.alertStatusTypeName, label: y.alertStatusTypeName })), B = R.tenant === "snl" && f !== null ? L : Wt, z = Ae(() => yr(ut), [ut]);
8964
- return re(() => {
8964
+ return ne(() => {
8965
8965
  let y = !1;
8966
8966
  const N = new AbortController(), F = async (me) => {
8967
8967
  if (me) {
@@ -9237,8 +9237,8 @@ function wc() {
9237
9237
  }
9238
9238
  function ba({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r, onRefetch: a, onPageChange: i, onFilterChange: o, onAlertView: l }) {
9239
9239
  const [u, d] = v(!1), [m, S] = v(null), [p, I] = v("details"), { list: E, loading: D } = wc(), j = !0, { timeZoneDetails: G } = Ms(), P = G?.timeZoneName ?? "UTC", g = G?.ianaTimeZoneId ?? "UTC";
9240
- function O(ne, fe) {
9241
- S(ne), I(fe?.tab ?? "details"), q(fe?.sourceTab ?? "active"), d(!0);
9240
+ function O(re, fe) {
9241
+ S(re), I(fe?.tab ?? "details"), q(fe?.sourceTab ?? "active"), d(!0);
9242
9242
  }
9243
9243
  function Z() {
9244
9244
  d(!1);
@@ -9263,8 +9263,8 @@ function ba({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r,
9263
9263
  defaultActiveKey: "active",
9264
9264
  className: "w-full",
9265
9265
  tabBarStyle: { fontSize: "medium" },
9266
- onChange: (ne) => {
9267
- const fe = ne === "archived";
9266
+ onChange: (re) => {
9267
+ const fe = re === "archived";
9268
9268
  A((M) => M + 1), i?.(1), o?.({ isArchived: fe });
9269
9269
  },
9270
9270
  items: [
@@ -9310,7 +9310,7 @@ function ba({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r,
9310
9310
  }
9311
9311
  function Ac() {
9312
9312
  const [t, e] = v([]), [s, n] = v([]), [r, a] = v([]), [i, o] = v([]), [l, u] = v(!0), { rules: d } = Ze();
9313
- return re(() => {
9313
+ return ne(() => {
9314
9314
  let m = !0;
9315
9315
  return (async () => {
9316
9316
  try {
@@ -9371,7 +9371,11 @@ function Tc(t = 1, e) {
9371
9371
  };
9372
9372
  }
9373
9373
  function bc(t) {
9374
- const [e, s] = v(1), [n, r] = v({}), { alerts: a, total: i, loading: o, refetch: l } = Tc(e, n), u = (d) => {
9374
+ const [e, s] = v(1), [n, r] = v({}), { alerts: a, total: i, loading: o, refetch: l } = Tc(e, n);
9375
+ ne(() => {
9376
+ !o && a.length > 0 && t.onAlertView?.(a);
9377
+ }, [a, o]);
9378
+ const u = (d) => {
9375
9379
  "isArchived" in d ? r({ isArchived: d.isArchived }) : r((m) => ({ ...m, ...d }));
9376
9380
  };
9377
9381
  return /* @__PURE__ */ c(ba, { alerts: a, loading: o, columns: t.columns, total: i, currentPage: e, onRefetch: l, onPageChange: s, onFilterChange: u, onAlertView: t.onAlertView });