@hiver/connector-agent 4.27.0-appWidgets-beta.12 → 4.27.0-appWidgets-beta.13

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,EAEV,eAAe,EAIhB,MAAM,UAAU,CAAC;AAClB,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;AAoBF;;;;;;;;;;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;AAEF,gFAAgF;AAChF,eAAO,MAAM,WAAW,WAAY,MAAM,aAAa,MAAM,KAAG,MAU/D,CAAC;AAuQF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,WACtB,eAAe,SAChB,iBAAiB,EAAE,0BAEzB,cAmBF,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,EAEV,eAAe,EAIhB,MAAM,UAAU,CAAC;AAClB,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;AAoBF;;;;;;;;;;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;AAEF,gFAAgF;AAChF,eAAO,MAAM,WAAW,WAAY,MAAM,aAAa,MAAM,KAAG,MAU/D,CAAC;AAoRF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,WACtB,eAAe,SAChB,iBAAiB,EAAE,0BAEzB,cAmBF,CAAC"}
package/index.es.js CHANGED
@@ -3118,11 +3118,11 @@ const Mr = async () => {
3118
3118
  }, T8 = async (e) => {
3119
3119
  const t = await PF(e);
3120
3120
  return t && !ec(t) ? !1 : await Bf(e) && !t ? !0 : !!(await XF(e)).length;
3121
- }, fK = async (e, t) => {
3121
+ }, cK = async (e, t) => {
3122
3122
  await HF(e, t);
3123
3123
  }, us = async (e) => {
3124
3124
  e && await UF(e);
3125
- }, cK = async (e, t) => {
3125
+ }, lK = async (e, t) => {
3126
3126
  const n = await Bf(e);
3127
3127
  t ? n !== !1 && await gd(e, t) : await gd(e, void 0);
3128
3128
  }, ZF = async (e) => await QF(e) && await T8(e), JF = async (e) => {
@@ -7051,7 +7051,7 @@ const $n = {
7051
7051
  if (!$n.baseUrl)
7052
7052
  throw new Error("Base url is not setup. please call the initConnectorsBifrost function with the appropriate value");
7053
7053
  return $n;
7054
- }, dK = ({
7054
+ }, AK = ({
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
- }, bk = "Required Field", xk = "Invalid date", b4 = /^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i, vk = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, x4 = "Please enter a valid URL", yk = "Please enter valid ID", Bk = "Please enter valid input", wk = "URL must start with https://", Ik = "URL should not end with a slash", Sk = "Invalid email address", kk = "Email must be a string", V3 = "Invalid date", Tk = "Date cannot be in the past", Lk = "Date cannot be in the future", Rk = "Invalid number", Ok = "Invalid text", AK = async (e) => {
16020
+ }, bk = "Required Field", xk = "Invalid date", b4 = /^https:\/\/([a-z0-9-]+(\.[a-z0-9-]+)+)(:[0-9]{1,5})?(\/[^\s/]*)*$/i, vk = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, x4 = "Please enter a valid URL", yk = "Please enter valid ID", Bk = "Please enter valid input", wk = "URL must start with https://", Ik = "URL should not end with a slash", Sk = "Invalid email address", kk = "Email must be a string", V3 = "Invalid date", Tk = "Date cannot be in the past", Lk = "Date cannot be in the future", Rk = "Invalid number", Ok = "Invalid text", pK = 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 sA = {
20945
20945
  });
20946
20946
  }
20947
20947
  }
20948
- ), { resetState: pK, resetPreviewCardData: Xr, setSelectedSuggestionType: bO, resetDropdownOptionsCache: xO } = f6.actions, vO = f6.reducer, mr = "/v1/api", yO = `${mr}/connectors/forms/list`, BO = `${mr}/connectors/cards/:id/unlink`, wO = `${mr}/connectors/forms/:id/link`, IO = `${mr}/connectors/form/:formId`, SO = `${mr}/connectors/forms/:formId/data`, kO = `${mr}/connectors/forms/:formId/get_forms_custom_fields`, TO = `${mr}/connectors/forms/:formId/field/:fieldName/custom_fields`, c6 = `${mr}/connectors/forms/:formId/defaults`, LO = `${mr}/connectors/forms/:formId/default-values`, RO = `${mr}/connectors/conversation-summary`, OO = `${mr}/connectors/attachments`, l6 = ({
20948
+ ), { resetState: hK, resetPreviewCardData: Xr, setSelectedSuggestionType: bO, resetDropdownOptionsCache: xO } = f6.actions, vO = f6.reducer, mr = "/v1/api", yO = `${mr}/connectors/forms/list`, BO = `${mr}/connectors/cards/:id/unlink`, wO = `${mr}/connectors/forms/:id/link`, IO = `${mr}/connectors/form/:formId`, SO = `${mr}/connectors/forms/:formId/data`, kO = `${mr}/connectors/forms/:formId/get_forms_custom_fields`, TO = `${mr}/connectors/forms/:formId/field/:fieldName/custom_fields`, c6 = `${mr}/connectors/forms/:formId/defaults`, LO = `${mr}/connectors/forms/:formId/default-values`, RO = `${mr}/connectors/conversation-summary`, OO = `${mr}/connectors/attachments`, l6 = ({
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", cA = "Select an ob
21379
21379
  return et({ message: no, type: St }), t(s);
21380
21380
  }
21381
21381
  }
21382
- ), { resetState: hK, setCurrentCardInEdit: Po, resetCurrentResourceDetails: eN, setHasUnsavedChanges: nu } = C6.actions, tN = C6.reducer, nN = () => {
21382
+ ), { resetState: gK, setCurrentCardInEdit: Po, resetCurrentResourceDetails: eN, setHasUnsavedChanges: nu } = C6.actions, tN = C6.reducer, nN = () => {
21383
21383
  const [e, t] = P(null), [n, r] = P({
21384
21384
  isVertical: !1,
21385
21385
  isHorizontal: !1,
@@ -22592,9 +22592,9 @@ const pA = /* @__PURE__ */ new Set(), DD = () => Uc.forEach((e) => e()), t1 = (e
22592
22592
  userAuthStatusReceived: Gc,
22593
22593
  userAuthRequired: bj,
22594
22594
  userAuthInProgress: xj,
22595
- userAuthCompleted: gK,
22595
+ userAuthCompleted: CK,
22596
22596
  userAuthFailed: Lu,
22597
- userAuthReset: CK
22597
+ userAuthReset: FK
22598
22598
  } = z6.actions, vj = z6.reducer, yj = { state: "unknown" }, Ii = (e, t) => e.userAuth.byConnectorId[t] || yj, Bj = /* @__PURE__ */ new Set([
22599
22599
  "disconnected",
22600
22600
  "in_progress",
@@ -27292,7 +27292,7 @@ const OQ = w(U)`
27292
27292
  let Jc = {};
27293
27293
  const Kc = /* @__PURE__ */ new Set(), RH = (e, t) => {
27294
27294
  Jc = { ...Jc, [e]: t }, Kc.forEach((n) => n());
27295
- }, OH = (e) => (Kc.add(e), () => Kc.delete(e)), FK = (e) => il(OH, () => Jc)[e], NH = async ({ id: e, searchString: t, args: n, smId: r, smIds: o }) => {
27295
+ }, OH = (e) => (Kc.add(e), () => Kc.delete(e)), mK = (e) => il(OH, () => Jc)[e], NH = 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 BD = () => {
28247
28247
  children: /* @__PURE__ */ a.jsx(hi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: e })
28248
28248
  }
28249
28249
  ) }) }) }) });
28250
- }, mK = ({
28250
+ }, EK = ({
28251
28251
  userEmail: e = "",
28252
28252
  contactEmail: t = "",
28253
28253
  baseUrls: n = {},
@@ -28290,7 +28290,7 @@ const BD = () => {
28290
28290
  ]
28291
28291
  }
28292
28292
  ) });
28293
- }, EK = {
28293
+ }, bK = {
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(ca, { store: mu, children: /* @__PURE__ */ a.jsx(Io, { config: t, children: /* @__PURE__ */ a.jsx(ki, { children: /* @__PURE__ */ a.jsx(hi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: e }) }) }) }), bK = ({
28987
+ }, UU = ({ children: e, theme: t }) => /* @__PURE__ */ a.jsx(ca, { store: mu, children: /* @__PURE__ */ a.jsx(Io, { config: t, children: /* @__PURE__ */ a.jsx(ki, { children: /* @__PURE__ */ a.jsx(hi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: e }) }) }) }), xK = ({
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 xK {
29019
+ class vK {
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(bn.Provider, { value: i, children: u });
30744
30744
  }, Xh = ({ children: e, theme: t, ...n }) => /* @__PURE__ */ a.jsx(ca, { store: mu, children: /* @__PURE__ */ a.jsx(Io, { config: t, children: /* @__PURE__ */ a.jsx(t6, { enabled: n.tenant === "HIVERWEB", children: /* @__PURE__ */ a.jsx(ki, { children: /* @__PURE__ */ a.jsx(hi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: /* @__PURE__ */ a.jsx(eV, { ...n, children: e }) }) }) }) }) }), es = ".hiver-log-crm-button", ts = ".hiver-log-crm-compose-button", $A = ".hiver-log-crm-subject-button";
30745
- class vK {
30745
+ class yK {
30746
30746
  constructor({
30747
30747
  emailNodeFilter: t,
30748
30748
  composeNodeFilter: n,
@@ -30839,7 +30839,7 @@ class vK {
30839
30839
  document.querySelectorAll(es).forEach((r) => r.remove()), document.querySelectorAll(ts).forEach((r) => r.remove()), this.observer && (this.observer.disconnect(), this.observer = null);
30840
30840
  }
30841
30841
  }
30842
- const yK = ({
30842
+ const BK = ({
30843
30843
  observer: e,
30844
30844
  theme: t = Qr,
30845
30845
  ...n
@@ -31874,7 +31874,7 @@ const gV = w("div")`
31874
31874
  ]
31875
31875
  }
31876
31876
  );
31877
- }, BK = ({
31877
+ }, wK = ({
31878
31878
  onVisibilityChange: e,
31879
31879
  theme: t = Qr,
31880
31880
  ...n
@@ -39947,7 +39947,7 @@ const yZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
39947
39947
  MuiMenuItem: { styleOverrides: { root: { fontFamily: `${Su} !important` } } },
39948
39948
  MuiChip: { styleOverrides: { root: { fontFamily: `${Su} !important` } } }
39949
39949
  }
39950
- }, RZ = (e) => Ci(e, LZ), Vg = ({ children: e, theme: t, ...n }) => /* @__PURE__ */ a.jsx(ca, { store: mu, children: /* @__PURE__ */ a.jsx(Io, { config: t, children: /* @__PURE__ */ a.jsx(xf, { theme: RZ, children: /* @__PURE__ */ a.jsx(TZ, { children: /* @__PURE__ */ a.jsx(hi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: /* @__PURE__ */ a.jsx(Nh, { value: { ...n, tenant: "omni" }, children: e }) }) }) }) }) }), wK = ({ theme: e = Qr, ...t }) => {
39950
+ }, RZ = (e) => Ci(e, LZ), Vg = ({ children: e, theme: t, ...n }) => /* @__PURE__ */ a.jsx(ca, { store: mu, children: /* @__PURE__ */ a.jsx(Io, { config: t, children: /* @__PURE__ */ a.jsx(xf, { theme: RZ, children: /* @__PURE__ */ a.jsx(TZ, { children: /* @__PURE__ */ a.jsx(hi, { fallback: /* @__PURE__ */ a.jsx(a.Fragment, {}), children: /* @__PURE__ */ a.jsx(Nh, { value: { ...n, tenant: "omni" }, children: e }) }) }) }) }) }), IK = ({ theme: e = Qr, ...t }) => {
39951
39951
  const n = Cu(e);
39952
39952
  return /* @__PURE__ */ a.jsx(la, { className: "connector-theme-root", "data-color-scheme": e.mode, style: n, children: /* @__PURE__ */ a.jsxs(Vg, { ...t, theme: e, children: [
39953
39953
  /* @__PURE__ */ a.jsx(Gg, {}),
@@ -39969,7 +39969,7 @@ const yZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
39969
39969
  document.body
39970
39970
  )
39971
39971
  ] }) });
39972
- }, IK = ({
39972
+ }, SK = ({
39973
39973
  connectorId: e,
39974
39974
  open: t,
39975
39975
  onClose: n,
@@ -40060,7 +40060,7 @@ const yZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40060
40060
  }
40061
40061
  )
40062
40062
  ] });
40063
- }, SK = ({
40063
+ }, kK = ({
40064
40064
  theme: e = { mode: "light" },
40065
40065
  flow: t,
40066
40066
  unlinkLinkId: n,
@@ -40094,7 +40094,7 @@ const yZ = (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
- ) }) }) }) }) }), kK = ({ theme: e = Qr, ...t }) => {
40097
+ ) }) }) }) }) }), TK = ({ theme: e = Qr, ...t }) => {
40098
40098
  const n = Cu(e);
40099
40099
  return /* @__PURE__ */ a.jsx(la, { className: "connector-theme-root", "data-color-scheme": e.mode, style: n, children: /* @__PURE__ */ a.jsxs(UD, { ...t, theme: e, children: [
40100
40100
  /* @__PURE__ */ a.jsx(Gg, {}),
@@ -40537,13 +40537,13 @@ const yZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40537
40537
  y && W(),
40538
40538
  ae
40539
40539
  ] });
40540
- }, TK = ({
40540
+ }, LK = ({
40541
40541
  onViewAll: e,
40542
40542
  onOpenLink: t,
40543
40543
  onUnreadCountChange: n,
40544
40544
  theme: r,
40545
40545
  ...o
40546
- }) => /* @__PURE__ */ a.jsx(UD, { ...o, theme: r, children: /* @__PURE__ */ a.jsx(zg, { onViewAll: e, onOpenLink: t, onUnreadCountChange: n }) }), LK = ({
40546
+ }) => /* @__PURE__ */ a.jsx(UD, { ...o, theme: r, children: /* @__PURE__ */ a.jsx(zg, { onViewAll: e, onOpenLink: t, onUnreadCountChange: n }) }), RK = ({
40547
40547
  onViewAll: e,
40548
40548
  onOpenLink: t,
40549
40549
  onUnreadCountChange: n,
@@ -40558,12 +40558,12 @@ const yZ = (e) => e.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9_-]/g, "
40558
40558
  headerless: !0
40559
40559
  }
40560
40560
  ) });
40561
- function RK(e) {
40561
+ function OK(e) {
40562
40562
  var n;
40563
40563
  const t = s1(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 OK(e, t = 0) {
40566
+ function NK(e, t = 0) {
40567
40567
  const r = RD(e, !0, t).data;
40568
40568
  return {
40569
40569
  links: ((r == null ? void 0 : r.links) ?? []).map((o) => ({
@@ -40578,11 +40578,11 @@ function OK(e, t = 0) {
40578
40578
  remainingSlots: (r == null ? void 0 : r.remainingSlots) ?? 0
40579
40579
  };
40580
40580
  }
40581
- const NK = (e) => Ie({
40581
+ const jK = (e) => Ie({
40582
40582
  url: gO,
40583
40583
  method: Ne.POST,
40584
40584
  data: e
40585
- }), jK = (e) => Ie({
40585
+ }), _K = (e) => Ie({
40586
40586
  url: CO,
40587
40587
  method: Ne.POST,
40588
40588
  data: e
@@ -40603,7 +40603,7 @@ const NK = (e) => Ie({
40603
40603
  fetchConnectors: r,
40604
40604
  abort: n.abort.bind(n)
40605
40605
  };
40606
- }, _K = (e = {}) => {
40606
+ }, MK = (e = {}) => {
40607
40607
  const t = wt(e.availableFeatures, A7), n = {
40608
40608
  connectorApiPending: !1,
40609
40609
  connectorApiAbort: null,
@@ -40759,7 +40759,7 @@ const NK = (e) => Ie({
40759
40759
  renderHighlight: c
40760
40760
  }
40761
40761
  );
40762
- }, MK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(nJ, { theme: e, children: /* @__PURE__ */ a.jsx(cJ, { ...t }) }), lJ = BD(), Xg = ({ children: e }) => /* @__PURE__ */ a.jsx(hl, { client: lJ, children: e }), DJ = (e) => {
40762
+ }, PK = ({ theme: e, ...t }) => /* @__PURE__ */ a.jsx(nJ, { theme: e, children: /* @__PURE__ */ a.jsx(cJ, { ...t }) }), lJ = BD(), Xg = ({ children: e }) => /* @__PURE__ */ a.jsx(hl, { client: lJ, children: e }), DJ = (e) => {
40763
40763
  var t;
40764
40764
  switch (e.category) {
40765
40765
  case "ecommerce":
@@ -40890,7 +40890,7 @@ const NK = (e) => Ie({
40890
40890
  if (!s) return;
40891
40891
  const f = !!r.externalResourceId;
40892
40892
  if (!(e.linkedOnly && !f)) {
40893
- if (f && HJ(o, u)) {
40893
+ if (f && UJ(o, u)) {
40894
40894
  n.push({
40895
40895
  id: `${r.id}:${r.externalResourceId}`,
40896
40896
  cardId: r.id,
@@ -40928,12 +40928,13 @@ const NK = (e) => Ie({
40928
40928
  });
40929
40929
  }
40930
40930
  }), n;
40931
- }, OJ = (e) => {
40931
+ }, OJ = (e) => e.externalResourceId ? e.externalResourceId : e.deepLink ? `${e.deepLink}|${e.title}` : null, NJ = (e) => {
40932
40932
  const t = /* @__PURE__ */ new Set();
40933
40933
  return [...e].sort((n, r) => Number(r.linked) - Number(n.linked)).filter((n) => {
40934
- if (!n.externalResourceId) return !0;
40935
- const r = `${n.record}:${n.externalResourceId}`;
40936
- return t.has(r) ? !1 : (t.add(r), !0);
40934
+ const r = OJ(n);
40935
+ if (!r) return !0;
40936
+ const o = `${n.record}:${r}`;
40937
+ return t.has(o) ? !1 : (t.add(o), !0);
40937
40938
  }).sort((n, r) => n.order - r.order);
40938
40939
  }, $g = (e) => {
40939
40940
  const t = e.spec.status;
@@ -40943,20 +40944,20 @@ const NK = (e) => Ie({
40943
40944
  } catch {
40944
40945
  return !0;
40945
40946
  }
40946
- }, NJ = (e) => {
40947
+ }, jJ = (e) => {
40947
40948
  const t = new Date(eo(e)).getTime();
40948
40949
  return Number.isNaN(t) ? null : t;
40949
- }, si = (e, t) => t != null && t.length ? e.filter((n) => t.includes(n.record)) : e, eC = (e, t) => e ? !(e.present && !si(t, [e.present]).length || e.absent && si(t, [e.absent]).length) : !0, jJ = (e, t) => (e.lookups ?? []).flatMap((n) => {
40950
+ }, si = (e, t) => t != null && t.length ? e.filter((n) => t.includes(n.record)) : e, eC = (e, t) => e ? !(e.present && !si(t, [e.present]).length || e.absent && si(t, [e.absent]).length) : !0, _J = (e, t) => (e.lookups ?? []).flatMap((n) => {
40950
40951
  if (!eC(n.when, t)) return [];
40951
40952
  let r = si(t, [n.record]);
40952
40953
  n.open && (r = r.filter($g));
40953
40954
  const o = n.sort;
40954
40955
  if (o) {
40955
- const u = o.order === "desc", i = (s) => NJ(D1(s.row, o.key)) ?? (u ? -1 / 0 : 1 / 0);
40956
+ const u = o.order === "desc", i = (s) => jJ(D1(s.row, o.key)) ?? (u ? -1 / 0 : 1 / 0);
40956
40957
  r = [...r].sort((s, f) => (u ? i(f) - i(s) : i(s) - i(f)) || 0);
40957
40958
  }
40958
40959
  return r.slice(0, n.limit ?? 1);
40959
- }), _J = (e, t) => {
40960
+ }), MJ = (e, t) => {
40960
40961
  const n = e.linkedFirst ?? [];
40961
40962
  return n.length ? [
40962
40963
  ...t.filter((r) => n.includes(r.record)),
@@ -40965,7 +40966,7 @@ const NK = (e) => Ie({
40965
40966
  }, L2 = (e, t) => {
40966
40967
  const [n, r] = Array.isArray(t) ? t : [t ?? "{n}", t ?? "{n}"];
40967
40968
  return (e === 1 ? n : r).replace("{n}", String(e));
40968
- }, MJ = (e, t) => {
40969
+ }, PJ = (e, t) => {
40969
40970
  if (!eC(e.when, t)) return "";
40970
40971
  if (e.count) {
40971
40972
  const { records: i, linked: s, open: f } = e.count;
@@ -40985,25 +40986,25 @@ const NK = (e) => Ie({
40985
40986
  if (e.as === "number") return L2(o, e.text);
40986
40987
  const u = Yg(o, qg(n.row, n.spec));
40987
40988
  return typeof e.text == "string" ? e.text.replace("{value}", u) : u;
40988
- }, PJ = (e, t) => {
40989
+ }, QJ = (e, t) => {
40989
40990
  for (const n of e.summary ?? []) {
40990
- const r = MJ(n, t);
40991
+ const r = PJ(n, t);
40991
40992
  if (r) return r;
40992
40993
  }
40993
40994
  return "";
40994
- }, tC = /^Your connection to .+ has expired\./, QJ = (e) => e.some(
40995
+ }, tC = /^Your connection to .+ has expired\./, HJ = (e) => e.some(
40995
40996
  ({ data: t, errorStatus: n }) => n === wJ || !!(t != null && t.redirectToAdminTab) || tC.test((t == null ? void 0 : t.cardErrorMessage) ?? "")
40996
- ), HJ = (e, t) => t === BJ || t === Kg || !!(e != null && e.cardErrorMessage) && !tC.test((e == null ? void 0 : e.cardErrorMessage) ?? "") || cD(e), UJ = 2, nC = (e, t, n = !0) => {
40997
- const r = OJ(RJ(e, t)), o = r.filter((c) => c.linked), u = r.filter((c) => !c.linked), i = [..._J(e, o), ...jJ(e, u)], s = e.uncounted ?? [], f = o.length + u.filter((c) => !s.includes(c.record)).length;
40997
+ ), UJ = (e, t) => t === BJ || t === Kg || !!(e != null && e.cardErrorMessage) && !tC.test((e == null ? void 0 : e.cardErrorMessage) ?? "") || cD(e), WJ = 2, nC = (e, t, n = !0) => {
40998
+ const r = NJ(RJ(e, t)), o = r.filter((c) => c.linked), u = r.filter((c) => !c.linked), i = [...MJ(e, o), ..._J(e, u)], s = e.uncounted ?? [], f = o.length + u.filter((c) => !s.includes(c.record)).length;
40998
40999
  return {
40999
41000
  category: e.category,
41000
- summary: PJ(e, r),
41001
- records: i.slice(0, UJ).map(WJ),
41001
+ summary: QJ(e, r),
41002
+ records: i.slice(0, WJ).map(GJ),
41002
41003
  total: f,
41003
- connection: QJ(t) ? "expired" : "ok",
41004
+ connection: HJ(t) ? "expired" : "ok",
41004
41005
  available: n
41005
41006
  };
41006
- }, WJ = (e) => ({
41007
+ }, GJ = (e) => ({
41007
41008
  id: e.id,
41008
41009
  cardId: e.cardId,
41009
41010
  recordType: e.recordType,
@@ -41013,12 +41014,12 @@ const NK = (e) => Ie({
41013
41014
  externalResourceId: e.externalResourceId,
41014
41015
  linked: e.linked,
41015
41016
  restricted: e.restricted
41016
- }), GJ = /* @__PURE__ */ new Set(["create", "link", "search_and_link"]), VJ = async ({ connectorId: e, conversationId: t, inboxIds: n }) => {
41017
+ }), VJ = /* @__PURE__ */ new Set(["create", "link", "search_and_link"]), zJ = async ({ connectorId: e, conversationId: t, inboxIds: n }) => {
41017
41018
  var r;
41018
41019
  try {
41019
41020
  const o = await l6({ inboxIds: n, channelType: "email", conversationId: t, connectorId: e }), u = (r = o == null ? void 0 : o.data) == null ? void 0 : r.formsList;
41020
41021
  return Array.isArray(u) ? u.some(
41021
- (i) => (!i.connectorId || i.connectorId === e) && GJ.has(String(i.type))
41022
+ (i) => (!i.connectorId || i.connectorId === e) && VJ.has(String(i.type))
41022
41023
  ) : !0;
41023
41024
  } catch {
41024
41025
  return !0;
@@ -41033,7 +41034,7 @@ const NK = (e) => Ie({
41033
41034
  ),
41034
41035
  // A template can let forms stand in for cards: a PM tool's link-only cards are left out until
41035
41036
  // something is linked. Otherwise an app with no cards has nothing to look up ("Enable Cards").
41036
- available: s.length > 0 || !!e.availableViaForms && await VJ(t)
41037
+ available: s.length > 0 || !!e.availableViaForms && await zJ(t)
41037
41038
  };
41038
41039
  }, oC = async (e, { conversationId: t, contactEmail: n, inboxIds: r }, o = !1) => {
41039
41040
  var u;
@@ -41052,13 +41053,13 @@ const NK = (e) => Ie({
41052
41053
  } catch (i) {
41053
41054
  return { card: e, data: null, errorStatus: (u = i == null ? void 0 : i.response) == null ? void 0 : u.status };
41054
41055
  }
41055
- }, PK = async (e, { refresh: t = !1 } = {}) => {
41056
+ }, QK = async (e, { refresh: t = !1 } = {}) => {
41056
41057
  if (!e.conversationId) return null;
41057
41058
  const n = await Jg(e.connectorId);
41058
41059
  if (!n) return null;
41059
41060
  const { cards: r, available: o } = await rC(n, e), u = await Promise.all(r.map((i) => oC(i, e, t)));
41060
41061
  return nC(n, u, o);
41061
- }, zJ = 5e3, R2 = /* @__PURE__ */ new Map(), O2 = (e, t) => ["appWidget", e, t], uC = ({
41062
+ }, XJ = 5e3, R2 = /* @__PURE__ */ new Map(), O2 = (e, t) => ["appWidget", e, t], uC = ({
41062
41063
  connectorId: e,
41063
41064
  connectorName: t,
41064
41065
  conversationId: n,
@@ -41091,7 +41092,7 @@ const NK = (e) => Ie({
41091
41092
  m.filter((v) => !!v),
41092
41093
  A
41093
41094
  ), [s, F.isLoading, h, g, A]), b = ie(() => {
41094
- R2.set(l, Date.now() + zJ), c.invalidateQueries({ queryKey: O2(e, n) });
41095
+ R2.set(l, Date.now() + XJ), c.invalidateQueries({ queryKey: O2(e, n) });
41095
41096
  }, [c, l, e, n]);
41096
41097
  return {
41097
41098
  app: s,
@@ -41117,7 +41118,7 @@ const NK = (e) => Ie({
41117
41118
  ...e.trackingContext,
41118
41119
  ...r
41119
41120
  });
41120
- }, XJ = (e) => {
41121
+ }, ZJ = (e) => {
41121
41122
  const { app: t, model: n, isLoading: r } = uC(e), { tokens: o } = Yf(), u = aC(r, Zg), i = (n == null ? void 0 : n.connection) === "expired", s = bJ(n, !!e.isAdmin), f = (n == null ? void 0 : n.available) ?? !0, { onSummaryChange: c } = e;
41122
41123
  re(() => {
41123
41124
  c == null || c({ text: s, isLoading: r, disconnected: i, available: f });
@@ -41138,14 +41139,14 @@ const NK = (e) => Ie({
41138
41139
  children: s
41139
41140
  }
41140
41141
  ) : null;
41141
- }, ZJ = (e) => {
41142
+ }, JJ = (e) => {
41142
41143
  const { app: t, model: n, isLoading: r, refresh: o } = uC(e), { tokens: u } = Yf(), i = aC(r, Zg);
41143
41144
  if (!t) return null;
41144
41145
  const s = (f, c, l) => {
41145
41146
  c && ks(e, t, c, l), e.onAction(f);
41146
41147
  };
41147
- return r ? i ? /* @__PURE__ */ a.jsx($J, {}) : null : !n || !n.available ? null : n.connection === "expired" ? /* @__PURE__ */ a.jsx(
41148
- eK,
41148
+ return r ? i ? /* @__PURE__ */ a.jsx(eK, {}) : null : !n || !n.available ? null : n.connection === "expired" ? /* @__PURE__ */ a.jsx(
41149
+ tK,
41149
41150
  {
41150
41151
  app: t,
41151
41152
  appName: e.connectorName,
@@ -41157,7 +41158,7 @@ const NK = (e) => Ie({
41157
41158
  }
41158
41159
  ) : /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-body", spacing: 1, sx: { pb: 1 }, children: [
41159
41160
  /* @__PURE__ */ a.jsx(
41160
- KJ,
41161
+ YJ,
41161
41162
  {
41162
41163
  lookupKey: t.linkedOnly ? "" : e.contactEmail,
41163
41164
  tokens: u,
@@ -41167,7 +41168,7 @@ const NK = (e) => Ie({
41167
41168
  }
41168
41169
  ),
41169
41170
  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(
41170
- YJ,
41171
+ qJ,
41171
41172
  {
41172
41173
  record: f,
41173
41174
  tokens: u,
@@ -41195,7 +41196,7 @@ const NK = (e) => Ie({
41195
41196
  }
41196
41197
  ),
41197
41198
  /* @__PURE__ */ a.jsx(
41198
- qJ,
41199
+ $J,
41199
41200
  {
41200
41201
  app: t,
41201
41202
  tokens: u,
@@ -41206,10 +41207,10 @@ const NK = (e) => Ie({
41206
41207
  }
41207
41208
  )
41208
41209
  ] });
41209
- }, JJ = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": !0, children: [
41210
+ }, KJ = () => /* @__PURE__ */ a.jsxs("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", "aria-hidden": !0, children: [
41210
41211
  /* @__PURE__ */ a.jsx("path", { d: "M13.5 8a5.5 5.5 0 1 1-1.6-3.9", strokeLinecap: "round" }),
41211
41212
  /* @__PURE__ */ a.jsx("path", { d: "M13.5 2.5v3h-3", strokeLinecap: "round", strokeLinejoin: "round" })
41212
- ] }), KJ = ({
41213
+ ] }), YJ = ({
41213
41214
  lookupKey: e,
41214
41215
  tokens: t,
41215
41216
  onRefresh: n
@@ -41232,10 +41233,10 @@ const NK = (e) => Ie({
41232
41233
  borderRadius: 1,
41233
41234
  "&:hover": { background: t.surfaceHover }
41234
41235
  },
41235
- children: /* @__PURE__ */ a.jsx(JJ, {})
41236
+ children: /* @__PURE__ */ a.jsx(KJ, {})
41236
41237
  }
41237
41238
  ) })
41238
- ] }), YJ = ({ record: e, tokens: t, onOpen: n, onOpenInApp: r }) => /* @__PURE__ */ a.jsx(
41239
+ ] }), qJ = ({ record: e, tokens: t, onOpen: n, onOpenInApp: r }) => /* @__PURE__ */ a.jsx(
41239
41240
  Q,
41240
41241
  {
41241
41242
  "data-testid": "app-widget-card",
@@ -41296,7 +41297,7 @@ const NK = (e) => Ie({
41296
41297
  ) })
41297
41298
  ] })
41298
41299
  }
41299
- ), qJ = ({ app: e, tokens: t, onCreate: n, onSearchLink: r }) => /* @__PURE__ */ a.jsxs(U, { direction: "row", spacing: 1, children: [
41300
+ ), $J = ({ app: e, tokens: t, onCreate: n, onSearchLink: r }) => /* @__PURE__ */ a.jsxs(U, { direction: "row", spacing: 1, children: [
41300
41301
  e.createLabel && /* @__PURE__ */ a.jsx(
41301
41302
  Re,
41302
41303
  {
@@ -41323,54 +41324,54 @@ const NK = (e) => Ie({
41323
41324
  children: FJ
41324
41325
  }
41325
41326
  )
41326
- ] }), $J = () => /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-loading", spacing: 1, sx: { pb: 1 }, children: [
41327
+ ] }), eK = () => /* @__PURE__ */ a.jsxs(U, { "data-testid": "app-widget-loading", spacing: 1, sx: { pb: 1 }, children: [
41327
41328
  /* @__PURE__ */ a.jsx(uu, { variant: "rounded", height: 64 }),
41328
41329
  /* @__PURE__ */ a.jsx(uu, { variant: "rounded", height: 64 })
41329
- ] }), eK = ({ 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: [
41330
+ ] }), tK = ({ 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: [
41330
41331
  /* @__PURE__ */ a.jsx(Y, { variant: "body2", sx: { color: o.textSecondary, fontSize: 13 }, children: dJ(e, t, n) }),
41331
41332
  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 ? hJ : pJ })
41332
41333
  ] }), iC = ({ theme: e, children: t }) => {
41333
41334
  const n = Cu(e), r = $(() => ({ ...n, display: "contents" }), [n]);
41334
41335
  return /* @__PURE__ */ a.jsx("span", { className: "connector-theme-root", "data-color-scheme": e.mode, style: r, children: /* @__PURE__ */ a.jsx(Io, { config: e, children: t }) });
41335
- }, QK = ({ theme: e = Qr, ...t }) => /* @__PURE__ */ a.jsx(iC, { theme: e, children: /* @__PURE__ */ a.jsx(Xg, { children: /* @__PURE__ */ a.jsx(XJ, { ...t }) }) }), HK = ({ theme: e = Qr, ...t }) => /* @__PURE__ */ a.jsx(iC, { theme: e, children: /* @__PURE__ */ a.jsx(Xg, { children: /* @__PURE__ */ a.jsx(ZJ, { ...t }) }) });
41336
+ }, HK = ({ theme: e = Qr, ...t }) => /* @__PURE__ */ a.jsx(iC, { theme: e, children: /* @__PURE__ */ a.jsx(Xg, { children: /* @__PURE__ */ a.jsx(ZJ, { ...t }) }) }), UK = ({ theme: e = Qr, ...t }) => /* @__PURE__ */ a.jsx(iC, { theme: e, children: /* @__PURE__ */ a.jsx(Xg, { children: /* @__PURE__ */ a.jsx(JJ, { ...t }) }) });
41336
41337
  export {
41337
41338
  Gr as APP_WIDGET_EVENTS,
41338
- xK as ActionQueue,
41339
- HK as AppWidgetBody,
41340
- QK as AppWidgetSummary,
41341
- EK as CONNECTORS_AGENT_EVENTS,
41342
- mK as ConnectorCardList,
41343
- yK as EmailLogger,
41344
- vK as GmailLogObserver,
41345
- IK as HigSlackConnectModalIsland,
41346
- TK as HigSlackSection,
41347
- LK as HigSlackSectionBody,
41348
- kK as HigSlackTab,
41339
+ vK as ActionQueue,
41340
+ UK as AppWidgetBody,
41341
+ HK as AppWidgetSummary,
41342
+ bK as CONNECTORS_AGENT_EVENTS,
41343
+ EK as ConnectorCardList,
41344
+ BK as EmailLogger,
41345
+ yK as GmailLogObserver,
41346
+ SK as HigSlackConnectModalIsland,
41347
+ LK as HigSlackSection,
41348
+ RK as HigSlackSectionBody,
41349
+ TK as HigSlackTab,
41349
41350
  Ie as HiverConnectorBifrostAuth,
41350
- bK as IntegrationSense,
41351
- BK as OmniEmailLogger,
41352
- wK as OmniSlackTab,
41351
+ xK as IntegrationSense,
41352
+ wK as OmniEmailLogger,
41353
+ IK as OmniSlackTab,
41353
41354
  WV as SLACK_LINKS_API,
41354
- IK as SlackConnectModalIsland,
41355
- SK as SlackLinkActionsIsland,
41356
- MK as SplitAppsNudge,
41357
- fK as addNewConnectors,
41355
+ SK as SlackConnectModalIsland,
41356
+ kK as SlackLinkActionsIsland,
41357
+ PK as SplitAppsNudge,
41358
+ cK as addNewConnectors,
41358
41359
  bJ as appWidgetSummaryText,
41359
41360
  iD as connectorThemeDefaults,
41360
- _K as createAppStore,
41361
+ MK as createAppStore,
41361
41362
  JF as dismissNotification,
41362
- NK as fetchAppCfValues,
41363
- jK as fetchDeferredAppCfValues,
41363
+ jK as fetchAppCfValues,
41364
+ _K as fetchDeferredAppCfValues,
41364
41365
  On as getConnectorsBifrostConfigs,
41365
- AK as getMetaData,
41366
- dK as initConnectorsBifrost,
41366
+ pK as getMetaData,
41367
+ AK as initConnectorsBifrost,
41367
41368
  yJ as loadAppWidgetConfigs,
41368
- PK as loadAppWidgetModel,
41369
+ QK as loadAppWidgetModel,
41369
41370
  r6 as resolveConnectorThemeTokens,
41370
- cK as setCaptureFeedbackOnDemand,
41371
+ lK as setCaptureFeedbackOnDemand,
41371
41372
  T8 as shouldCaptureFeedback,
41372
41373
  ZF as shouldShowNotification,
41373
- FK as useConnectorSelectedEmail,
41374
- OK as useSlackLinksSummary,
41375
- RK as useSlackTabLabel
41374
+ mK as useConnectorSelectedEmail,
41375
+ NK as useSlackLinksSummary,
41376
+ OK as useSlackTabLabel
41376
41377
  };