@hiver/connector-agent 4.27.0-appWidgets-beta.3 → 4.27.0-appWidgets-beta.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/features/app-widget/model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAe,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEpG,OAAO,KAAK,EAAE,OAAO,EAAyB,MAAM,QAAQ,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAkB,cAAc,EAAmB,MAAM,SAAS,CAAC;AAElG,KAAK,QAAQ,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG;IAC1F,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,yFAAyF;AACzF,KAAK,GAAG,GAAG;IACT,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,SAAU,aAAa,GAAG,IAAI,KAAG,GAAG,EAuB3D,CAAC;AAmBF,eAAO,MAAM,QAAQ,UAAW,cAAc,GAAG,SAAS,KAAG,MAAM,GAAG,IAIrE,CAAC;AAOF,gFAAgF;AAChF,eAAO,MAAM,WAAW,WAAY,MAAM,aAAa,MAAM,KAAG,MAS/D,CAAC;AA2RF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAS,OAAO,SAAS,iBAAiB,EAAE,KAAG,cAqB9E,CAAC"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../src/features/app-widget/model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAe,kBAAkB,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEpG,OAAO,KAAK,EAAE,OAAO,EAAyB,MAAM,QAAQ,CAAC;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAkB,cAAc,EAAmB,MAAM,SAAS,CAAC;AAElG,KAAK,QAAQ,GAAG,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC,GAAG;IAC1F,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B,CAAC;AAEF,yFAAyF;AACzF,KAAK,GAAG,GAAG;IACT,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAmBF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,SAAU,aAAa,GAAG,IAAI,KAAG,GAAG,EAuB3D,CAAC;AAmBF,eAAO,MAAM,QAAQ,UAAW,cAAc,GAAG,SAAS,KAAG,MAAM,GAAG,IAIrE,CAAC;AAOF,gFAAgF;AAChF,eAAO,MAAM,WAAW,WAAY,MAAM,aAAa,MAAM,KAAG,MAS/D,CAAC;AAuSF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,QAAS,OAAO,SAAS,iBAAiB,EAAE,KAAG,cAqB9E,CAAC"}
package/index.es.js CHANGED
@@ -3118,11 +3118,11 @@ const Qr = async () => {
3118
3118
  }, _8 = async (e) => {
3119
3119
  const t = await MF(e);
3120
3120
  return t && !ac(t) ? !1 : await Rf(e) && !t ? !0 : !!(await zF(e)).length;
3121
- }, AK = async (e, t) => {
3121
+ }, pK = async (e, t) => {
3122
3122
  await QF(e, t);
3123
3123
  }, ls = async (e) => {
3124
3124
  e && await HF(e);
3125
- }, pK = async (e, t) => {
3125
+ }, gK = async (e, t) => {
3126
3126
  const n = await Rf(e);
3127
3127
  t ? n !== !1 && await Ed(e, t) : await Ed(e, void 0);
3128
3128
  }, XF = async (e) => await PF(e) && await _8(e), ZF = async (e) => {
@@ -7051,7 +7051,7 @@ const tr = {
7051
7051
  if (!tr.baseUrl)
7052
7052
  throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");
7053
7053
  return tr;
7054
- }, CK = ({
7054
+ }, FK = ({
7055
7055
  baseUrl: e,
7056
7056
  appEnv: t,
7057
7057
  tier: n,
@@ -16017,7 +16017,7 @@ const gk = (e, t) => ({
16017
16017
  DELETE: "DELETE",
16018
16018
  PATCH: "PATCH",
16019
16019
  PUT: "PUT"
16020
- }, Ek = "Required Field", bk = "Invalid date", B4 = /^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i, xk = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, w4 = "Please enter a valid URL", yk = "Please enter valid ID", vk = "Please enter valid input", Bk = "URL must start with https://", wk = "URL should not end with a slash", Ik = "Invalid email address", Sk = "Email must be a string", J3 = "Invalid date", kk = "Date cannot be in the past", Tk = "Date cannot be in the future", Lk = "Invalid number", Rk = "Invalid text", FK = async (e) => {
16020
+ }, Ek = "Required Field", bk = "Invalid date", B4 = /^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i, xk = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, w4 = "Please enter a valid URL", yk = "Please enter valid ID", vk = "Please enter valid input", Bk = "URL must start with https://", wk = "URL should not end with a slash", Ik = "Invalid email address", Sk = "Email must be a string", J3 = "Invalid date", kk = "Date cannot be in the past", Tk = "Date cannot be in the future", Lk = "Invalid number", Rk = "Invalid text", mK = async (e) => {
16021
16021
  const t = new URLSearchParams(), { inboxIds: n, channelType: r, conversationId: o, fetchAuthenticatedConnectors: u } = e || {};
16022
16022
  return n == null || n.forEach((s) => {
16023
16023
  t.append("inbox_ids", s);
@@ -20945,7 +20945,7 @@ const DA = {
20945
20945
  });
20946
20946
  }
20947
20947
  }
20948
- ), { resetState: mK, resetPreviewCardData: Zr, setSelectedSuggestionType: EO, resetDropdownOptionsCache: bO } = d6.actions, xO = d6.reducer, br = "/v1/api", yO = `${br}/connectors/forms/list`, vO = `${br}/connectors/cards/:id/unlink`, BO = `${br}/connectors/forms/:id/link`, wO = `${br}/connectors/form/:formId`, IO = `${br}/connectors/forms/:formId/data`, SO = `${br}/connectors/forms/:formId/get_forms_custom_fields`, kO = `${br}/connectors/forms/:formId/field/:fieldName/custom_fields`, A6 = `${br}/connectors/forms/:formId/defaults`, TO = `${br}/connectors/forms/:formId/default-values`, LO = `${br}/connectors/conversation-summary`, RO = `${br}/connectors/attachments`, OO = ({
20948
+ ), { resetState: EK, resetPreviewCardData: Zr, setSelectedSuggestionType: EO, resetDropdownOptionsCache: bO } = d6.actions, xO = d6.reducer, br = "/v1/api", yO = `${br}/connectors/forms/list`, vO = `${br}/connectors/cards/:id/unlink`, BO = `${br}/connectors/forms/:id/link`, wO = `${br}/connectors/form/:formId`, IO = `${br}/connectors/forms/:formId/data`, SO = `${br}/connectors/forms/:formId/get_forms_custom_fields`, kO = `${br}/connectors/forms/:formId/field/:fieldName/custom_fields`, A6 = `${br}/connectors/forms/:formId/defaults`, TO = `${br}/connectors/forms/:formId/default-values`, LO = `${br}/connectors/conversation-summary`, RO = `${br}/connectors/attachments`, OO = ({
20949
20949
  inboxIds: e,
20950
20950
  channelType: t,
20951
20951
  conversationId: n,
@@ -21379,7 +21379,7 @@ Do you want to continue?`, ZO = "Select an object to create", AA = "Select an ob
21379
21379
  return et({ message: no, type: St }), t(s);
21380
21380
  }
21381
21381
  }
21382
- ), { resetState: EK, setCurrentCardInEdit: Wo, resetCurrentResourceDetails: e_, setHasUnsavedChanges: au } = E6.actions, t_ = E6.reducer, n_ = () => {
21382
+ ), { resetState: bK, setCurrentCardInEdit: Wo, resetCurrentResourceDetails: e_, setHasUnsavedChanges: au } = E6.actions, t_ = E6.reducer, n_ = () => {
21383
21383
  const [e, t] = P(null), [n, r] = P({
21384
21384
  isVertical: !1,
21385
21385
  isHorizontal: !1,
@@ -22592,9 +22592,9 @@ const FA = /* @__PURE__ */ new Set(), hD = () => Zc.forEach((e) => e()), s1 = (e
22592
22592
  userAuthStatusReceived: Kc,
22593
22593
  userAuthRequired: bj,
22594
22594
  userAuthInProgress: xj,
22595
- userAuthCompleted: bK,
22595
+ userAuthCompleted: xK,
22596
22596
  userAuthFailed: _u,
22597
- userAuthReset: xK
22597
+ userAuthReset: yK
22598
22598
  } = K6.actions, yj = K6.reducer, vj = { state: "unknown" }, Oi = (e, t) => e.userAuth.byConnectorId[t] || vj, Bj = /* @__PURE__ */ new Set([
22599
22599
  "disconnected",
22600
22600
  "in_progress",
@@ -27292,7 +27292,7 @@ const OQ = w(U)`
27292
27292
  let tl = {};
27293
27293
  const nl = /* @__PURE__ */ new Set(), RH = (e, t) => {
27294
27294
  tl = { ...tl, [e]: t }, nl.forEach((n) => n());
27295
- }, OH = (e) => (nl.add(e), () => nl.delete(e)), yK = (e) => dl(OH, () => tl)[e], _H = async ({ id: e, searchString: t, args: n, smId: r, smIds: o }) => {
27295
+ }, OH = (e) => (nl.add(e), () => nl.delete(e)), vK = (e) => dl(OH, () => tl)[e], _H = async ({ id: e, searchString: t, args: n, smId: r, smIds: o }) => {
27296
27296
  try {
27297
27297
  if (e === void 0 || t === void 0)
27298
27298
  return [];
@@ -28247,7 +28247,7 @@ const TD = () => {
28247
28247
  children: /* @__PURE__ */ a.jsx(bi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: e })
28248
28248
  }
28249
28249
  ) }) }) }) });
28250
- }, vK = ({
28250
+ }, BK = ({
28251
28251
  userEmail: e = "",
28252
28252
  contactEmail: t = "",
28253
28253
  baseUrls: n = {},
@@ -28290,7 +28290,7 @@ const TD = () => {
28290
28290
  ]
28291
28291
  }
28292
28292
  ) });
28293
- }, BK = {
28293
+ }, wK = {
28294
28294
  /**
28295
28295
  * @deprecated Nothing listens to this any more. Opening the expanded create form now goes
28296
28296
  * through the ActionQueue (`ACTIONS.OPEN_CREATE_FORM` with a `connectorId`): the request
@@ -28984,7 +28984,7 @@ const HU = ({
28984
28984
  }
28985
28985
  }
28986
28986
  ) });
28987
- }, UU = ({ children: e, theme: t }) => /* @__PURE__ */ a.jsx(Aa, { store: xu, children: /* @__PURE__ */ a.jsx(ro, { config: t, children: /* @__PURE__ */ a.jsx(ji, { children: /* @__PURE__ */ a.jsx(bi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: e }) }) }) }), wK = ({
28987
+ }, UU = ({ children: e, theme: t }) => /* @__PURE__ */ a.jsx(Aa, { store: xu, children: /* @__PURE__ */ a.jsx(ro, { config: t, children: /* @__PURE__ */ a.jsx(ji, { children: /* @__PURE__ */ a.jsx(bi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: e }) }) }) }), IK = ({
28988
28988
  conversationId: e,
28989
28989
  hasSmList: t,
28990
28990
  smIds: n,
@@ -29016,7 +29016,7 @@ const HU = ({
29016
29016
  const r = n.payload;
29017
29017
  return r.conversationId !== e ? !1 : (t({ ...r, connectorId: n.connectorId }), !0);
29018
29018
  }, VU = ({ conversationId: e, openLink: t }) => (n) => n.payload.conversationId !== e || !t ? !1 : (t(), !0);
29019
- class IK {
29019
+ class SK {
29020
29020
  constructor({ processDelay: t = 1e3 }) {
29021
29021
  lt(this, "_processDelay");
29022
29022
  lt(this, "_queue", []);
@@ -30742,7 +30742,7 @@ const fG = w(U)`
30742
30742
  );
30743
30743
  return /* @__PURE__ */ a.jsx(xn.Provider, { value: i, children: u });
30744
30744
  }, Yg = ({ children: e, theme: t, ...n }) => /* @__PURE__ */ a.jsx(Aa, { store: xu, children: /* @__PURE__ */ a.jsx(ro, { config: t, children: /* @__PURE__ */ a.jsx(u6, { enabled: n.tenant === "HIVERWEB", children: /* @__PURE__ */ a.jsx(ji, { children: /* @__PURE__ */ a.jsx(bi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: /* @__PURE__ */ a.jsx(eV, { ...n, children: e }) }) }) }) }) }), as = ".hiver-log-crm-button", is = ".hiver-log-crm-compose-button", r2 = ".hiver-log-crm-subject-button";
30745
- class SK {
30745
+ class kK {
30746
30746
  constructor({
30747
30747
  emailNodeFilter: t,
30748
30748
  composeNodeFilter: n,
@@ -30839,7 +30839,7 @@ class SK {
30839
30839
  document.querySelectorAll(as).forEach((r) => r.remove()), document.querySelectorAll(is).forEach((r) => r.remove()), this.observer && (this.observer.disconnect(), this.observer = null);
30840
30840
  }
30841
30841
  }
30842
- const kK = ({
30842
+ const TK = ({
30843
30843
  observer: e,
30844
30844
  theme: t = So,
30845
30845
  ...n
@@ -31874,7 +31874,7 @@ const hV = w("div")`
31874
31874
  ]
31875
31875
  }
31876
31876
  );
31877
- }, TK = ({
31877
+ }, LK = ({
31878
31878
  onVisibilityChange: e,
31879
31879
  theme: t = So,
31880
31880
  ...n
@@ -39947,7 +39947,7 @@ const vZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
39947
39947
  MuiMenuItem: { styleOverrides: { root: { fontFamily: `${Lu} !important` } } },
39948
39948
  MuiChip: { styleOverrides: { root: { fontFamily: `${Lu} !important` } } }
39949
39949
  }
39950
- }, RZ = (e) => yi(e, LZ), Jh = ({ children: e, theme: t, ...n }) => /* @__PURE__ */ a.jsx(Aa, { store: xu, children: /* @__PURE__ */ a.jsx(ro, { config: t, children: /* @__PURE__ */ a.jsx(kf, { theme: RZ, children: /* @__PURE__ */ a.jsx(TZ, { children: /* @__PURE__ */ a.jsx(bi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: /* @__PURE__ */ a.jsx(Pg, { value: { ...n, tenant: "omni" }, children: e }) }) }) }) }) }), LK = ({ theme: e = So, ...t }) => {
39950
+ }, RZ = (e) => yi(e, LZ), Jh = ({ children: e, theme: t, ...n }) => /* @__PURE__ */ a.jsx(Aa, { store: xu, children: /* @__PURE__ */ a.jsx(ro, { config: t, children: /* @__PURE__ */ a.jsx(kf, { theme: RZ, children: /* @__PURE__ */ a.jsx(TZ, { children: /* @__PURE__ */ a.jsx(bi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: /* @__PURE__ */ a.jsx(Pg, { value: { ...n, tenant: "omni" }, children: e }) }) }) }) }) }), RK = ({ theme: e = So, ...t }) => {
39951
39951
  const n = Fa(e);
39952
39952
  return /* @__PURE__ */ a.jsx(pa, { className: "connector-theme-root", "data-color-scheme": e.mode, style: n, children: /* @__PURE__ */ a.jsxs(Jh, { ...t, theme: e, children: [
39953
39953
  /* @__PURE__ */ a.jsx(Zh, {}),
@@ -39969,7 +39969,7 @@ const vZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
39969
39969
  document.body
39970
39970
  )
39971
39971
  ] }) });
39972
- }, RK = ({
39972
+ }, OK = ({
39973
39973
  connectorId: e,
39974
39974
  open: t,
39975
39975
  onClose: n,
@@ -40060,7 +40060,7 @@ const vZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40060
40060
  }
40061
40061
  )
40062
40062
  ] });
40063
- }, OK = ({
40063
+ }, _K = ({
40064
40064
  theme: e = { mode: "light" },
40065
40065
  flow: t,
40066
40066
  unlinkLinkId: n,
@@ -40094,7 +40094,7 @@ const vZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40094
40094
  value: { ...n, showChannelHeader: !0, boxedMessages: !0, tenant: "hig" },
40095
40095
  children: e
40096
40096
  }
40097
- ) }) }) }) }) }), _K = ({ theme: e = So, ...t }) => {
40097
+ ) }) }) }) }) }), jK = ({ theme: e = So, ...t }) => {
40098
40098
  const n = Fa(e);
40099
40099
  return /* @__PURE__ */ a.jsx(pa, { className: "connector-theme-root", "data-color-scheme": e.mode, style: n, children: /* @__PURE__ */ a.jsxs(XD, { ...t, theme: e, children: [
40100
40100
  /* @__PURE__ */ a.jsx(Zh, {}),
@@ -40537,13 +40537,13 @@ const vZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40537
40537
  v && W(),
40538
40538
  ae
40539
40539
  ] });
40540
- }, jK = ({
40540
+ }, NK = ({
40541
40541
  onViewAll: e,
40542
40542
  onOpenLink: t,
40543
40543
  onUnreadCountChange: n,
40544
40544
  theme: r,
40545
40545
  ...o
40546
- }) => /* @__PURE__ */ a.jsx(XD, { ...o, theme: r, children: /* @__PURE__ */ a.jsx(Kh, { onViewAll: e, onOpenLink: t, onUnreadCountChange: n }) }), NK = ({
40546
+ }) => /* @__PURE__ */ a.jsx(XD, { ...o, theme: r, children: /* @__PURE__ */ a.jsx(Kh, { onViewAll: e, onOpenLink: t, onUnreadCountChange: n }) }), MK = ({
40547
40547
  onViewAll: e,
40548
40548
  onOpenLink: t,
40549
40549
  onUnreadCountChange: n,
@@ -40558,12 +40558,12 @@ const vZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40558
40558
  headerless: !0
40559
40559
  }
40560
40560
  ) });
40561
- function MK(e) {
40561
+ function PK(e) {
40562
40562
  var n;
40563
40563
  const t = p1(e, !0, 0);
40564
40564
  return (n = t.data) != null && n.channelName ? { label: t.data.channelName, isLinked: !0 } : { label: "Slack", isLinked: !1 };
40565
40565
  }
40566
- function PK(e, t = 0) {
40566
+ function QK(e, t = 0) {
40567
40567
  const r = MD(e, !0, t).data;
40568
40568
  return {
40569
40569
  links: ((r == null ? void 0 : r.links) ?? []).map((o) => ({
@@ -40578,11 +40578,11 @@ function PK(e, t = 0) {
40578
40578
  remainingSlots: (r == null ? void 0 : r.remainingSlots) ?? 0
40579
40579
  };
40580
40580
  }
40581
- const QK = (e) => ke({
40581
+ const HK = (e) => ke({
40582
40582
  url: gO,
40583
40583
  method: je.POST,
40584
40584
  data: e
40585
- }), HK = (e) => ke({
40585
+ }), UK = (e) => ke({
40586
40586
  url: hO,
40587
40587
  method: je.POST,
40588
40588
  data: e
@@ -40603,7 +40603,7 @@ const QK = (e) => ke({
40603
40603
  fetchConnectors: r,
40604
40604
  abort: n.abort.bind(n)
40605
40605
  };
40606
- }, UK = (e = {}) => {
40606
+ }, WK = (e = {}) => {
40607
40607
  const t = wt(e.availableFeatures, d7), n = {
40608
40608
  connectorApiPending: !1,
40609
40609
  connectorApiAbort: null,
@@ -40759,7 +40759,7 @@ const QK = (e) => ke({
40759
40759
  renderHighlight: c
40760
40760
  }
40761
40761
  );
40762
- }, WK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(nJ, { theme: e, children: /* @__PURE__ */ a.jsx(cJ, { ...t }) }), lJ = TD(), Yh = ({ children: e }) => /* @__PURE__ */ a.jsx(bl, { client: lJ, children: e }), DJ = (e) => {
40762
+ }, GK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(nJ, { theme: e, children: /* @__PURE__ */ a.jsx(cJ, { ...t }) }), lJ = TD(), Yh = ({ children: e }) => /* @__PURE__ */ a.jsx(bl, { client: lJ, children: e }), DJ = (e) => {
40763
40763
  var t;
40764
40764
  switch (e.category) {
40765
40765
  case "ecommerce":
@@ -41244,18 +41244,20 @@ const QK = (e) => ke({
41244
41244
  default:
41245
41245
  return "";
41246
41246
  }
41247
- }, ZJ = (e) => e.some(({ data: t, errorStatus: n }) => n === LJ || !!(t != null && t.redirectToAdminTab)), JJ = 2, nC = (e, t) => {
41247
+ }, ZJ = /^Your connection to .+ has expired\./, JJ = (e) => e.some(
41248
+ ({ data: t, errorStatus: n }) => n === LJ || !!(t != null && t.redirectToAdminTab) || ZJ.test((t == null ? void 0 : t.cardErrorMessage) ?? "")
41249
+ ), KJ = 2, nC = (e, t) => {
41248
41250
  const n = HJ(QJ(e, t)), r = n.filter((f) => f.linked), o = n.filter((f) => !f.linked), u = [...zJ(e, r), ...VJ(e, o)], i = o.filter(
41249
41251
  (f) => !(e.category === "crm" && ["Account", "Company"].includes(f.recordType))
41250
41252
  ), s = r.length + i.length;
41251
41253
  return {
41252
41254
  category: e.category,
41253
41255
  summary: XJ(e, n, r.length),
41254
- records: u.slice(0, JJ).map(KJ),
41256
+ records: u.slice(0, KJ).map(YJ),
41255
41257
  total: s,
41256
- connection: ZJ(t) ? "expired" : "ok"
41258
+ connection: JJ(t) ? "expired" : "ok"
41257
41259
  };
41258
- }, KJ = (e) => ({
41260
+ }, YJ = (e) => ({
41259
41261
  id: e.id,
41260
41262
  cardId: e.cardId,
41261
41263
  recordType: e.recordType,
@@ -41286,12 +41288,12 @@ const QK = (e) => ke({
41286
41288
  } catch (i) {
41287
41289
  return { card: e, data: null, errorStatus: (u = i == null ? void 0 : i.response) == null ? void 0 : u.status };
41288
41290
  }
41289
- }, GK = async (e, { refresh: t = !1 } = {}) => {
41291
+ }, VK = async (e, { refresh: t = !1 } = {}) => {
41290
41292
  const n = eC(e.connectorName);
41291
41293
  if (!n || !e.conversationId) return null;
41292
41294
  const r = await rC(n, e), o = await Promise.all(r.map((u) => oC(u, e, t)));
41293
41295
  return nC(n, o);
41294
- }, YJ = 5e3, N2 = /* @__PURE__ */ new Map(), M2 = (e, t) => ["appWidget", e, t], uC = ({
41296
+ }, qJ = 5e3, N2 = /* @__PURE__ */ new Map(), M2 = (e, t) => ["appWidget", e, t], uC = ({
41295
41297
  connectorId: e,
41296
41298
  connectorName: t,
41297
41299
  conversationId: n,
@@ -41314,7 +41316,7 @@ const QK = (e) => ke({
41314
41316
  i,
41315
41317
  d.filter((h) => !!h)
41316
41318
  ), [i, C.isLoading, A, ...d]), F = ie(() => {
41317
- N2.set(c, Date.now() + YJ), f.invalidateQueries({ queryKey: M2(e, n) });
41319
+ N2.set(c, Date.now() + qJ), f.invalidateQueries({ queryKey: M2(e, n) });
41318
41320
  }, [f, c, e, n]);
41319
41321
  return {
41320
41322
  app: i,
@@ -41340,7 +41342,7 @@ const QK = (e) => ke({
41340
41342
  ...e.trackingContext,
41341
41343
  ...r
41342
41344
  });
41343
- }, qJ = (e) => {
41345
+ }, $J = (e) => {
41344
41346
  const { app: t, model: n, isLoading: r } = uC(e), { tokens: o } = o1(), u = aC(r, qh), i = (n == null ? void 0 : n.connection) === "expired", s = bJ(n, !!e.isAdmin), { onSummaryChange: f } = e;
41345
41347
  re(() => {
41346
41348
  f == null || f({ text: s, isLoading: r, disconnected: i });
@@ -41361,14 +41363,14 @@ const QK = (e) => ke({
41361
41363
  children: s
41362
41364
  }
41363
41365
  ) : null : null;
41364
- }, $J = (e) => {
41366
+ }, eK = (e) => {
41365
41367
  const { app: t, model: n, isLoading: r, refresh: o } = uC(e), { tokens: u } = o1(), i = aC(r, qh);
41366
41368
  if (!t) return null;
41367
41369
  const s = (f, c, l) => {
41368
41370
  c && js(e, t, c, l), e.onAction(f);
41369
41371
  };
41370
- return r ? i ? /* @__PURE__ */ a.jsx(oK, {}) : null : n ? n.connection === "expired" ? /* @__PURE__ */ a.jsx(
41371
- uK,
41372
+ return r ? i ? /* @__PURE__ */ a.jsx(uK, {}) : null : n ? n.connection === "expired" ? /* @__PURE__ */ a.jsx(
41373
+ aK,
41372
41374
  {
41373
41375
  app: t,
41374
41376
  appName: e.connectorName,
@@ -41380,7 +41382,7 @@ const QK = (e) => ke({
41380
41382
  }
41381
41383
  ) : /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-body", spacing: 1, sx: { pb: 1 }, children: [
41382
41384
  /* @__PURE__ */ a.jsx(
41383
- tK,
41385
+ nK,
41384
41386
  {
41385
41387
  lookupKey: t.category === "pm" ? "" : e.contactEmail,
41386
41388
  tokens: u,
@@ -41390,7 +41392,7 @@ const QK = (e) => ke({
41390
41392
  }
41391
41393
  ),
41392
41394
  n.records.length === 0 ? /* @__PURE__ */ a.jsx(Y, { variant: "body2", sx: { color: u.textSecondary, fontSize: 13 }, children: DJ(t) }) : n.records.map((f) => /* @__PURE__ */ a.jsx(
41393
- nK,
41395
+ rK,
41394
41396
  {
41395
41397
  record: f,
41396
41398
  tokens: u,
@@ -41418,7 +41420,7 @@ const QK = (e) => ke({
41418
41420
  }
41419
41421
  ),
41420
41422
  /* @__PURE__ */ a.jsx(
41421
- rK,
41423
+ oK,
41422
41424
  {
41423
41425
  app: t,
41424
41426
  tokens: u,
@@ -41429,10 +41431,10 @@ const QK = (e) => ke({
41429
41431
  }
41430
41432
  )
41431
41433
  ] }) : null;
41432
- }, eK = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": !0, children: [
41434
+ }, tK = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": !0, children: [
41433
41435
  /* @__PURE__ */ a.jsx("path", { d: "M13.5 8a5.5 5.5 0 1 1-1.6-3.9", strokeLinecap: "round" }),
41434
41436
  /* @__PURE__ */ a.jsx("path", { d: "M13.5 2.5v3h-3", strokeLinecap: "round", strokeLinejoin: "round" })
41435
- ] }), tK = ({
41437
+ ] }), nK = ({
41436
41438
  lookupKey: e,
41437
41439
  tokens: t,
41438
41440
  onRefresh: n
@@ -41455,10 +41457,10 @@ const QK = (e) => ke({
41455
41457
  borderRadius: 1,
41456
41458
  "&:hover": { background: t.surfaceHover }
41457
41459
  },
41458
- children: /* @__PURE__ */ a.jsx(eK, {})
41460
+ children: /* @__PURE__ */ a.jsx(tK, {})
41459
41461
  }
41460
41462
  ) })
41461
- ] }), nK = ({ record: e, tokens: t, onOpen: n, onOpenInApp: r }) => /* @__PURE__ */ a.jsx(
41463
+ ] }), rK = ({ record: e, tokens: t, onOpen: n, onOpenInApp: r }) => /* @__PURE__ */ a.jsx(
41462
41464
  Q,
41463
41465
  {
41464
41466
  "data-testid": "app-widget-card",
@@ -41519,7 +41521,7 @@ const QK = (e) => ke({
41519
41521
  ) })
41520
41522
  ] })
41521
41523
  }
41522
- ), rK = ({ app: e, tokens: t, onCreate: n, onSearchLink: r }) => /* @__PURE__ */ a.jsxs(U, { direction: "row", spacing: 1, children: [
41524
+ ), oK = ({ app: e, tokens: t, onCreate: n, onSearchLink: r }) => /* @__PURE__ */ a.jsxs(U, { direction: "row", spacing: 1, children: [
41523
41525
  e.createLabel && /* @__PURE__ */ a.jsx(
41524
41526
  Re,
41525
41527
  {
@@ -41546,51 +41548,51 @@ const QK = (e) => ke({
41546
41548
  children: FJ
41547
41549
  }
41548
41550
  )
41549
- ] }), oK = () => /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-loading", spacing: 1, sx: { pb: 1 }, children: [
41551
+ ] }), uK = () => /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-loading", spacing: 1, sx: { pb: 1 }, children: [
41550
41552
  /* @__PURE__ */ a.jsx(fu, { variant: "rounded", height: 64 }),
41551
41553
  /* @__PURE__ */ a.jsx(fu, { variant: "rounded", height: 64 })
41552
- ] }), uK = ({ app: e, appName: t, isAdmin: n, adminNotified: r, tokens: o, onReconnect: u, onNotifyAdmin: i }) => /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-disconnected", spacing: 1, sx: { pb: 1 }, children: [
41554
+ ] }), aK = ({ app: e, appName: t, isAdmin: n, adminNotified: r, tokens: o, onReconnect: u, onNotifyAdmin: i }) => /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-disconnected", spacing: 1, sx: { pb: 1 }, children: [
41553
41555
  /* @__PURE__ */ a.jsx(Y, { variant: "body2", sx: { color: o.textSecondary, fontSize: 13 }, children: dJ(e, t, n) }),
41554
41556
  n ? /* @__PURE__ */ a.jsx(Re, { variant: "contained", size: "small", onClick: u, children: AJ(t) }) : /* @__PURE__ */ a.jsx(Re, { variant: "outlined", size: "small", disabled: r, onClick: i, children: r ? gJ : pJ })
41555
- ] }), VK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(ro, { config: e, children: /* @__PURE__ */ a.jsx(Yh, { children: /* @__PURE__ */ a.jsx(qJ, { ...t }) }) }), zK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(ro, { config: e, children: /* @__PURE__ */ a.jsx(Yh, { children: /* @__PURE__ */ a.jsx($J, { ...t }) }) });
41557
+ ] }), zK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(ro, { config: e, children: /* @__PURE__ */ a.jsx(Yh, { children: /* @__PURE__ */ a.jsx($J, { ...t }) }) }), XK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(ro, { config: e, children: /* @__PURE__ */ a.jsx(Yh, { children: /* @__PURE__ */ a.jsx(eK, { ...t }) }) });
41556
41558
  export {
41557
41559
  Vr as APP_WIDGET_EVENTS,
41558
- IK as ActionQueue,
41559
- zK as AppWidgetBody,
41560
- VK as AppWidgetSummary,
41561
- BK as CONNECTORS_AGENT_EVENTS,
41562
- vK as ConnectorCardList,
41563
- kK as EmailLogger,
41564
- SK as GmailLogObserver,
41565
- RK as HigSlackConnectModalIsland,
41566
- jK as HigSlackSection,
41567
- NK as HigSlackSectionBody,
41568
- _K as HigSlackTab,
41560
+ SK as ActionQueue,
41561
+ XK as AppWidgetBody,
41562
+ zK as AppWidgetSummary,
41563
+ wK as CONNECTORS_AGENT_EVENTS,
41564
+ BK as ConnectorCardList,
41565
+ TK as EmailLogger,
41566
+ kK as GmailLogObserver,
41567
+ OK as HigSlackConnectModalIsland,
41568
+ NK as HigSlackSection,
41569
+ MK as HigSlackSectionBody,
41570
+ jK as HigSlackTab,
41569
41571
  ke as HiverConnectorBifrostAuth,
41570
- wK as IntegrationSense,
41571
- TK as OmniEmailLogger,
41572
- LK as OmniSlackTab,
41572
+ IK as IntegrationSense,
41573
+ LK as OmniEmailLogger,
41574
+ RK as OmniSlackTab,
41573
41575
  WV as SLACK_LINKS_API,
41574
- RK as SlackConnectModalIsland,
41575
- OK as SlackLinkActionsIsland,
41576
- WK as SplitAppsNudge,
41577
- AK as addNewConnectors,
41576
+ OK as SlackConnectModalIsland,
41577
+ _K as SlackLinkActionsIsland,
41578
+ GK as SplitAppsNudge,
41579
+ pK as addNewConnectors,
41578
41580
  bJ as appWidgetSummaryText,
41579
41581
  dD as connectorThemeDefaults,
41580
- UK as createAppStore,
41582
+ WK as createAppStore,
41581
41583
  ZF as dismissNotification,
41582
- QK as fetchAppCfValues,
41583
- HK as fetchDeferredAppCfValues,
41584
+ HK as fetchAppCfValues,
41585
+ UK as fetchDeferredAppCfValues,
41584
41586
  eC as getAppWidgetSpec,
41585
41587
  _n as getConnectorsBifrostConfigs,
41586
- FK as getMetaData,
41587
- CK as initConnectorsBifrost,
41588
- GK as loadAppWidgetModel,
41588
+ mK as getMetaData,
41589
+ FK as initConnectorsBifrost,
41590
+ VK as loadAppWidgetModel,
41589
41591
  i6 as resolveConnectorThemeTokens,
41590
- pK as setCaptureFeedbackOnDemand,
41592
+ gK as setCaptureFeedbackOnDemand,
41591
41593
  _8 as shouldCaptureFeedback,
41592
41594
  XF as shouldShowNotification,
41593
- yK as useConnectorSelectedEmail,
41594
- PK as useSlackLinksSummary,
41595
- MK as useSlackTabLabel
41595
+ vK as useConnectorSelectedEmail,
41596
+ QK as useSlackLinksSummary,
41597
+ PK as useSlackTabLabel
41596
41598
  };