customer-module-frontend 2.7.0-beta.30 → 2.7.0-beta.32

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.
@@ -13,7 +13,7 @@ import Tn, { isAxiosError as hn, AxiosError as at } from "axios";
13
13
  import yo from "universal-cookie";
14
14
  import { createRoot as Ao } from "react-dom/client";
15
15
  import { useLocation as $e, useNavigate as Oe, Outlet as Eo, useSearchParams as No, useParams as De, Routes as So, Route as Me, Navigate as ko, MemoryRouter as To } from "react-router-dom";
16
- import { useQueryClient as He, useQuery as Ee, useMutation as he, useInfiniteQuery as Tt, QueryClient as Mo, QueryClientProvider as Io } from "@tanstack/react-query";
16
+ import { useQueryClient as He, useQuery as Ne, useMutation as he, useInfiniteQuery as Tt, QueryClient as Mo, QueryClientProvider as Io } from "@tanstack/react-query";
17
17
  const qc = {
18
18
  palette: {
19
19
  primary: {
@@ -2323,16 +2323,16 @@ const gl = async (e, t) => (await X.patch(
2323
2323
  e.isSelected && /* @__PURE__ */ n("div", { className: "cm:overflow-clip cm:relative cm:shrink-0 cm:w-3.5 cm:h-3.5", children: /* @__PURE__ */ n(Rt, { name: "check", size: 14, className: "cm:text-primary-text-default cm:text-sm cm:pr-2" }) })
2324
2324
  ]
2325
2325
  }
2326
- ), Al = "data:image/svg+xml,%3csvg%20width='100'%20height='94'%20viewBox='0%200%20100%2094'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.551665'%20d='M10.959%2049.9883H32.8768V62.4883H10.959V49.9883Z'%20fill='%23B3D0E8'/%3e%3cpath%20opacity='0.551665'%20d='M67.209%2049.9883H89.1268V62.4883H67.209V49.9883Z'%20fill='%23B3D0E8'/%3e%3cpath%20opacity='0.8'%20d='M11%200H89V12H11V0Z'%20fill='%23B3D0E8'/%3e%3cpath%20opacity='0.551665'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M89.1263%2065.5742V82.7831H67.2085V65.5742H89.1263ZM78.1674%2074.9609H75.0363C74.1717%2074.9609%2073.4707%2075.6613%2073.4707%2076.5254C73.4707%2077.3894%2074.1717%2078.0898%2075.0363%2078.0898H78.1674C79.032%2078.0898%2079.733%2077.3894%2079.733%2076.5254C79.733%2075.6613%2079.032%2074.9609%2078.1674%2074.9609Z'%20fill='%23D3E5F3'/%3e%3cpath%20d='M0%2089.8633H100V93.0311H0V89.8633Z'%20fill='%23D5E5F2'/%3e%3cpath%20opacity='0.551665'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M32.8763%2065.5742V82.7831H10.9585V65.5742H32.8763ZM25.0485%2074.9609H21.9174C21.0528%2074.9609%2020.3518%2075.6613%2020.3518%2076.5254C20.3518%2077.3894%2021.0528%2078.0898%2021.9174%2078.0898H25.0485C25.9131%2078.0898%2026.6141%2077.3894%2026.6141%2076.5254C26.6141%2075.6613%2025.9131%2074.9609%2025.0485%2074.9609Z'%20fill='%23D3E5F3'/%3e%3cpath%20opacity='0.8'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M93.5164%2014.7714C93.2315%2014.311%2092.7284%2014.031%2092.1868%2014.0312H7.8132C7.27162%2014.031%206.76853%2014.311%206.48365%2014.7713C6.19876%2015.2316%206.1727%2015.8066%206.41479%2016.2907L10.9381%2025.3301V46.8223H32.8128V40.5764C32.8214%2032.8186%2039.1122%2026.5317%2046.875%2026.5231H53.1249C60.8877%2026.5317%2067.1786%2032.8186%2067.1872%2040.5764V46.8223H89.0618V25.3301L93.5852%2016.2907C93.8273%2015.8066%2093.8013%2015.2317%2093.5164%2014.7714ZM25.0004%2029.6462H21.8755C21.0125%2029.6462%2020.313%2028.9471%2020.313%2028.0848C20.313%2027.2224%2021.0125%2026.5233%2021.8755%2026.5233H25.0004C25.8633%2026.5233%2026.5629%2027.2224%2026.5629%2028.0848C26.5629%2028.9471%2025.8633%2029.6462%2025.0004%2029.6462ZM78.1245%2026.5233H74.9996C74.1366%2026.5233%2073.4371%2027.2224%2073.4371%2028.0848C73.4371%2028.9471%2074.1366%2029.6462%2074.9996%2029.6462H78.1245C78.9874%2029.6462%2079.687%2028.9471%2079.687%2028.0848C79.687%2027.2224%2078.9874%2026.5233%2078.1245%2026.5233ZM74.9996%2043.6994H73.4371C72.5742%2043.6994%2071.8746%2043.0003%2071.8746%2042.1379C71.8746%2041.2755%2072.5742%2040.5764%2073.4371%2040.5764H74.9996C75.8625%2040.5764%2076.562%2041.2755%2076.562%2042.1379C76.562%2043.0003%2075.8625%2043.6994%2074.9996%2043.6994ZM79.687%2043.6994H81.2495C82.1124%2043.6994%2082.8119%2043.0003%2082.8119%2042.1379C82.8119%2041.2755%2082.1124%2040.5764%2081.2495%2040.5764H79.687C78.8241%2040.5764%2078.1245%2041.2755%2078.1245%2042.1379C78.1245%2043.0003%2078.8241%2043.6994%2079.687%2043.6994Z'%20fill='%23B3D0E8'/%3e%3crect%20x='2'%20y='14.0312'%20width='9'%20height='30'%20fill='white'/%3e%3crect%20x='89'%20y='14.0312'%20width='9'%20height='30'%20fill='white'/%3e%3c/svg%3e", je = "https://cdn.hiverhq.com/channels/default_bot_images", Se = {
2327
- hiverBee: `${je}/Hiver_Bee.svg`,
2328
- hiverBee2: `${je}/Hiver_Bee_2.png`,
2329
- importAnimation: `${je}/import-animation.gif`,
2330
- salesforceSync: `${je}/salesforce-sync.svg`,
2331
- hubspotLogo: `${je}/hubspot.png`,
2332
- hubspotIllustration: `${je}/Illustration.png`,
2333
- successState: `${je}/success-state.gif`
2334
- }, Qe = ({ title: e, subcopy: t, icon: c = "hiver-bee", iconContent: s, contentClassName: a }) => {
2335
- const o = P((i) => i.theme === "dark"), r = c === "india-gate" ? Al : Se.hiverBee, l = s && o && s === Se.hiverBee2 ? Se.hiverBee : s;
2326
+ ), Al = "data:image/svg+xml,%3csvg%20width='100'%20height='94'%20viewBox='0%200%20100%2094'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20opacity='0.551665'%20d='M10.959%2049.9883H32.8768V62.4883H10.959V49.9883Z'%20fill='%23B3D0E8'/%3e%3cpath%20opacity='0.551665'%20d='M67.209%2049.9883H89.1268V62.4883H67.209V49.9883Z'%20fill='%23B3D0E8'/%3e%3cpath%20opacity='0.8'%20d='M11%200H89V12H11V0Z'%20fill='%23B3D0E8'/%3e%3cpath%20opacity='0.551665'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M89.1263%2065.5742V82.7831H67.2085V65.5742H89.1263ZM78.1674%2074.9609H75.0363C74.1717%2074.9609%2073.4707%2075.6613%2073.4707%2076.5254C73.4707%2077.3894%2074.1717%2078.0898%2075.0363%2078.0898H78.1674C79.032%2078.0898%2079.733%2077.3894%2079.733%2076.5254C79.733%2075.6613%2079.032%2074.9609%2078.1674%2074.9609Z'%20fill='%23D3E5F3'/%3e%3cpath%20d='M0%2089.8633H100V93.0311H0V89.8633Z'%20fill='%23D5E5F2'/%3e%3cpath%20opacity='0.551665'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M32.8763%2065.5742V82.7831H10.9585V65.5742H32.8763ZM25.0485%2074.9609H21.9174C21.0528%2074.9609%2020.3518%2075.6613%2020.3518%2076.5254C20.3518%2077.3894%2021.0528%2078.0898%2021.9174%2078.0898H25.0485C25.9131%2078.0898%2026.6141%2077.3894%2026.6141%2076.5254C26.6141%2075.6613%2025.9131%2074.9609%2025.0485%2074.9609Z'%20fill='%23D3E5F3'/%3e%3cpath%20opacity='0.8'%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M93.5164%2014.7714C93.2315%2014.311%2092.7284%2014.031%2092.1868%2014.0312H7.8132C7.27162%2014.031%206.76853%2014.311%206.48365%2014.7713C6.19876%2015.2316%206.1727%2015.8066%206.41479%2016.2907L10.9381%2025.3301V46.8223H32.8128V40.5764C32.8214%2032.8186%2039.1122%2026.5317%2046.875%2026.5231H53.1249C60.8877%2026.5317%2067.1786%2032.8186%2067.1872%2040.5764V46.8223H89.0618V25.3301L93.5852%2016.2907C93.8273%2015.8066%2093.8013%2015.2317%2093.5164%2014.7714ZM25.0004%2029.6462H21.8755C21.0125%2029.6462%2020.313%2028.9471%2020.313%2028.0848C20.313%2027.2224%2021.0125%2026.5233%2021.8755%2026.5233H25.0004C25.8633%2026.5233%2026.5629%2027.2224%2026.5629%2028.0848C26.5629%2028.9471%2025.8633%2029.6462%2025.0004%2029.6462ZM78.1245%2026.5233H74.9996C74.1366%2026.5233%2073.4371%2027.2224%2073.4371%2028.0848C73.4371%2028.9471%2074.1366%2029.6462%2074.9996%2029.6462H78.1245C78.9874%2029.6462%2079.687%2028.9471%2079.687%2028.0848C79.687%2027.2224%2078.9874%2026.5233%2078.1245%2026.5233ZM74.9996%2043.6994H73.4371C72.5742%2043.6994%2071.8746%2043.0003%2071.8746%2042.1379C71.8746%2041.2755%2072.5742%2040.5764%2073.4371%2040.5764H74.9996C75.8625%2040.5764%2076.562%2041.2755%2076.562%2042.1379C76.562%2043.0003%2075.8625%2043.6994%2074.9996%2043.6994ZM79.687%2043.6994H81.2495C82.1124%2043.6994%2082.8119%2043.0003%2082.8119%2042.1379C82.8119%2041.2755%2082.1124%2040.5764%2081.2495%2040.5764H79.687C78.8241%2040.5764%2078.1245%2041.2755%2078.1245%2042.1379C78.1245%2043.0003%2078.8241%2043.6994%2079.687%2043.6994Z'%20fill='%23B3D0E8'/%3e%3crect%20x='2'%20y='14.0312'%20width='9'%20height='30'%20fill='white'/%3e%3crect%20x='89'%20y='14.0312'%20width='9'%20height='30'%20fill='white'/%3e%3c/svg%3e", Ve = "https://cdn.hiverhq.com/channels/default_bot_images", Ee = {
2327
+ hiverBee: `${Ve}/Hiver_Bee.svg`,
2328
+ hiverBee2: `${Ve}/Hiver_Bee_2.png`,
2329
+ importAnimation: `${Ve}/import-animation.gif`,
2330
+ salesforceSync: `${Ve}/salesforce-sync.svg`,
2331
+ hubspotLogo: `${Ve}/hubspot.png`,
2332
+ hubspotIllustration: `${Ve}/Illustration.png`,
2333
+ successState: `${Ve}/success-state.gif`
2334
+ }, je = ({ title: e, subcopy: t, icon: c = "hiver-bee", iconContent: s, contentClassName: a }) => {
2335
+ const o = P((i) => i.theme === "dark"), r = c === "india-gate" ? Al : Ee.hiverBee, l = s && o && s === Ee.hiverBee2 ? Ee.hiverBee : s;
2336
2336
  return /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-1 cm:flex-col cm:items-center cm:justify-center cm:w-full cm:min-h-[400px] cm:py-8", children: /* @__PURE__ */ m("div", { className: `cm:flex cm:flex-1 cm:flex-col cm:items-center cm:justify-center cm:gap-3 ${a || ""}`, children: [
2337
2337
  /* @__PURE__ */ n("div", { className: "cm:h-[93.031px] cm:w-[100px] cm:shrink-0", children: /* @__PURE__ */ n(
2338
2338
  "img",
@@ -3417,7 +3417,7 @@ const ys = ({
3417
3417
  )
3418
3418
  ] })
3419
3419
  ] }) : /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-1 cm:flex-col cm:w-full cm:h-full cm:min-h-0 cm:overflow-hidden", style: { marginTop: "-40px" }, children: /* @__PURE__ */ n(
3420
- Qe,
3420
+ je,
3421
3421
  {
3422
3422
  title: "No contact",
3423
3423
  subcopy: "There are no contacts info to display",
@@ -3495,7 +3495,7 @@ const ys = ({
3495
3495
  )
3496
3496
  ] })
3497
3497
  ] }) : /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-1 cm:flex-col cm:w-full cm:h-full cm:min-h-0 cm:overflow-hidden", style: { marginTop: "-40px" }, children: /* @__PURE__ */ n(
3498
- Qe,
3498
+ je,
3499
3499
  {
3500
3500
  title: "No account",
3501
3501
  subcopy: "There are no accounts info to display",
@@ -5032,7 +5032,7 @@ function Rn({
5032
5032
  function _s({ entityLabel: e, onRetry: t }) {
5033
5033
  return /* @__PURE__ */ m("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: [
5034
5034
  /* @__PURE__ */ n(
5035
- Qe,
5035
+ je,
5036
5036
  {
5037
5037
  title: `Couldn't load ${e}`,
5038
5038
  subcopy: "Something went wrong on our side. Try again in a moment."
@@ -5180,7 +5180,7 @@ function m1({ ciEnabled: e = !1 } = {}) {
5180
5180
  return /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(Ce, {}) });
5181
5181
  const b = (s?.companies?.length ?? 0) > 0;
5182
5182
  return (r !== null || o) && !b ? /* @__PURE__ */ n(_s, { entityLabel: "accounts", onRetry: f }) : x || v.length === 0 ? /* @__PURE__ */ n("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
5183
- Qe,
5183
+ je,
5184
5184
  {
5185
5185
  title: "No accounts yet",
5186
5186
  subcopy: "Accounts will start showing up here when new conversations are created."
@@ -5275,7 +5275,7 @@ const Ps = (e, t) => {
5275
5275
  EXCLUDED_DOMAINS: "excluded-domains"
5276
5276
  }, xe = u1, Hn = ({ entity_type: e }) => {
5277
5277
  const t = He();
5278
- return { ...Ee({
5278
+ return { ...Ne({
5279
5279
  queryKey: [xe.CUSTOM_FIELDS_LIST, e],
5280
5280
  queryFn: async () => (await Vt({ entity_type: e })).account_custom_fields.find((r) => r.entity_type === e)?.custom_fields ?? []
5281
5281
  }), updateData: (a) => {
@@ -5298,7 +5298,7 @@ const Ps = (e, t) => {
5298
5298
  return (await X(c, {
5299
5299
  method: "DELETE"
5300
5300
  })).status === 200 ? e : !1;
5301
- }, Bs = (e = !0) => Ee({
5301
+ }, Bs = (e = !0) => Ne({
5302
5302
  queryKey: [xe.EXCLUDED_DOMAINS],
5303
5303
  queryFn: () => h1(),
5304
5304
  enabled: e
@@ -5409,6 +5409,7 @@ const Ps = (e, t) => {
5409
5409
  e
5410
5410
  ),
5411
5411
  height: 40,
5412
+ error: c,
5412
5413
  onChange: r,
5413
5414
  onBlur: a,
5414
5415
  icon: i,
@@ -5503,14 +5504,13 @@ const Ps = (e, t) => {
5503
5504
  appendTo: s
5504
5505
  }
5505
5506
  );
5506
- }, D1 = ({ onChange: e, error: t, ...c }) => /* @__PURE__ */ n(
5507
+ }, D1 = ({ onChange: e, ...t }) => /* @__PURE__ */ n(
5507
5508
  O1,
5508
5509
  {
5509
- ...c,
5510
- error: !1,
5510
+ ...t,
5511
5511
  onChange: e,
5512
- onValidityChange: (s) => {
5513
- s || e(Number.NaN);
5512
+ onValidityChange: (c) => {
5513
+ c || e(Number.NaN);
5514
5514
  }
5515
5515
  }
5516
5516
  ), F1 = ({ value: e, disabled: t, onRemove: c }) => /* @__PURE__ */ m(
@@ -5903,7 +5903,7 @@ const Ps = (e, t) => {
5903
5903
  className: `cm:flex cm:items-center cm:justify-end cm:gap-3 cm:px-7 cm:py-4 cm:border-t cm:border-[#edf1f6] cm:shrink-0 cm:bg-white ${t}`,
5904
5904
  children: e
5905
5905
  }
5906
- ), ze = (e) => /* @__PURE__ */ n(
5906
+ ), Qe = (e) => /* @__PURE__ */ n(
5907
5907
  dt,
5908
5908
  {
5909
5909
  variant: "contained",
@@ -5952,7 +5952,7 @@ const Ps = (e, t) => {
5952
5952
  }
5953
5953
  ),
5954
5954
  /* @__PURE__ */ n(
5955
- ze,
5955
+ Qe,
5956
5956
  {
5957
5957
  label: d,
5958
5958
  disabled: e && !r || l || c,
@@ -5998,7 +5998,7 @@ const Ps = (e, t) => {
5998
5998
  "/v1/crm/sync",
5999
5999
  s
6000
6000
  )).data;
6001
- }, zt = ["crmConfigs"], vt = (e = !0) => Ee({
6001
+ }, zt = ["crmConfigs"], vt = (e = !0) => Ne({
6002
6002
  queryKey: zt,
6003
6003
  queryFn: Un,
6004
6004
  enabled: e,
@@ -6257,7 +6257,7 @@ const Ps = (e, t) => {
6257
6257
  }
6258
6258
  )
6259
6259
  ] }) });
6260
- }, Ue = {
6260
+ }, ze = {
6261
6261
  CUSTOM_FIELDS: "/custom-fields/:entityType",
6262
6262
  ACCOUNTS: "/accounts",
6263
6263
  CONTACTS: "/contacts"
@@ -6296,7 +6296,7 @@ const Ps = (e, t) => {
6296
6296
  ) })
6297
6297
  ), km = ({ entityType: e, className: t }) => {
6298
6298
  const c = Oe(), s = Qt(e), a = () => {
6299
- c(ct(Ue.CUSTOM_FIELDS, { entityType: e }));
6299
+ c(ct(ze.CUSTOM_FIELDS, { entityType: e }));
6300
6300
  };
6301
6301
  return /* @__PURE__ */ n(
6302
6302
  qt,
@@ -6337,6 +6337,7 @@ const Ps = (e, t) => {
6337
6337
  {
6338
6338
  placeholder: c,
6339
6339
  value: i,
6340
+ error: !!s,
6340
6341
  onChange: (f) => {
6341
6342
  const C = f.target.value || "";
6342
6343
  p(C), h(() => {
@@ -6917,7 +6918,7 @@ const e2 = ({
6917
6918
  }) => /* @__PURE__ */ m(Ut, { children: [
6918
6919
  /* @__PURE__ */ n(nt, { label: "Cancel", onClick: t }),
6919
6920
  /* @__PURE__ */ n(
6920
- ze,
6921
+ Qe,
6921
6922
  {
6922
6923
  label: o2(e),
6923
6924
  disabled: e !== se.VALIDATED,
@@ -7546,7 +7547,7 @@ const e2 = ({
7546
7547
  /* @__PURE__ */ n(
7547
7548
  "img",
7548
7549
  {
7549
- src: Se.importAnimation,
7550
+ src: Ee.importAnimation,
7550
7551
  alt: "Import started",
7551
7552
  className: "cm:h-28 cm:w-28"
7552
7553
  }
@@ -7656,7 +7657,7 @@ const e2 = ({
7656
7657
  }
7657
7658
  ),
7658
7659
  /* @__PURE__ */ n(
7659
- ze,
7660
+ Qe,
7660
7661
  {
7661
7662
  disabled: !e.name.trim() || e.isLoading,
7662
7663
  onClick: o,
@@ -7667,7 +7668,7 @@ const e2 = ({
7667
7668
  ] })
7668
7669
  ] })
7669
7670
  ] }) });
7670
- }, Ve = {
7671
+ }, Ue = {
7671
7672
  text: "Text",
7672
7673
  string: "Text",
7673
7674
  number: "Number",
@@ -7703,7 +7704,7 @@ const e2 = ({
7703
7704
  crm_field_key: t.crm_field_key,
7704
7705
  crmFieldType: t.type,
7705
7706
  crmLabel: t.display_name,
7706
- crmTypeLabel: Ve[(t.type ?? "").toLowerCase()] ?? t.type,
7707
+ crmTypeLabel: Ue[(t.type ?? "").toLowerCase()] ?? t.type,
7707
7708
  default_hiver_field: t.default_hiver_field,
7708
7709
  hiver_field_types: (t.hiver_field_types ?? []).map((s) => (s ?? "").toLowerCase()),
7709
7710
  hiverFieldKey: null,
@@ -7727,7 +7728,7 @@ const e2 = ({
7727
7728
  crm_field_key: v.crm_field_key,
7728
7729
  crmFieldType: v.type,
7729
7730
  crmLabel: v.display_name,
7730
- crmTypeLabel: Ve[(v.type ?? "").toLowerCase()] ?? v.type,
7731
+ crmTypeLabel: Ue[(v.type ?? "").toLowerCase()] ?? v.type,
7731
7732
  default_hiver_field: v.default_hiver_field,
7732
7733
  hiver_field_types: (v.hiver_field_types ?? []).map((x) => (x ?? "").toLowerCase()),
7733
7734
  hiverFieldKey: p.cf_id,
@@ -7751,7 +7752,7 @@ const e2 = ({
7751
7752
  entityType: t,
7752
7753
  crmProvider: c
7753
7754
  }) => {
7754
- const [s, a] = M(null), [o, r] = M(null), l = Ee({
7755
+ const [s, a] = M(null), [o, r] = M(null), l = Ne({
7755
7756
  queryKey: ["crm-field-mapping-data", c, t],
7756
7757
  enabled: e && !!c,
7757
7758
  refetchOnWindowFocus: !1,
@@ -7912,7 +7913,7 @@ const e2 = ({
7912
7913
  e || (b(!1), E(null), D.current = 0);
7913
7914
  }, [e]);
7914
7915
  const V = (L, j) => {
7915
- const U = L.crmTypeLabel || Ve[L.crmFieldType.toLowerCase()] || L.crmFieldType, $ = Ve[j] ?? j;
7916
+ const U = L.crmTypeLabel || Ue[L.crmFieldType.toLowerCase()] || L.crmFieldType, $ = Ue[j] ?? j;
7916
7917
  return `'${U}' type cannot be stored as '${$}' — incompatible`;
7917
7918
  }, Z = (L) => {
7918
7919
  if (!L.hiverFieldKey) return;
@@ -8042,7 +8043,7 @@ const e2 = ({
8042
8043
  }
8043
8044
  }, ce = (L) => {
8044
8045
  f((j) => ({ ...j, [L]: null }));
8045
- }, Ne = (L) => {
8046
+ }, Se = (L) => {
8046
8047
  d((j) => j.filter((U) => U.id !== L));
8047
8048
  }, Fe = (L) => {
8048
8049
  const j = na(
@@ -8056,7 +8057,7 @@ const e2 = ({
8056
8057
  crm_field_key: L.crm_field_key,
8057
8058
  crmFieldType: L.type,
8058
8059
  crmLabel: L.display_name,
8059
- crmTypeLabel: Ve[(L.type ?? "").toLowerCase()] ?? L.type,
8060
+ crmTypeLabel: Ue[(L.type ?? "").toLowerCase()] ?? L.type,
8060
8061
  default_hiver_field: L.default_hiver_field,
8061
8062
  hiver_field_types: (L.hiver_field_types ?? []).map(
8062
8063
  ($) => ($ ?? "").toLowerCase()
@@ -8069,7 +8070,7 @@ const e2 = ({
8069
8070
  }, La = (L) => {
8070
8071
  if (!L.crmTypeLabel) return "";
8071
8072
  const j = u.find((U) => U.value === L.hiverFieldKey);
8072
- return j ? `${L.crmTypeLabel} > ${Ve[j.type] ?? j.type}` : L.crmTypeLabel;
8073
+ return j ? `${L.crmTypeLabel} > ${Ue[j.type] ?? j.type}` : L.crmTypeLabel;
8073
8074
  };
8074
8075
  return /* @__PURE__ */ n(We, { open: e, onClose: t, position: "right", width: 680, children: /* @__PURE__ */ m("div", { className: "cm:flex cm:flex-col cm:h-full", children: [
8075
8076
  /* @__PURE__ */ n(
@@ -8215,7 +8216,7 @@ const e2 = ({
8215
8216
  {
8216
8217
  type: "button",
8217
8218
  "aria-label": "Remove mapping",
8218
- onClick: () => Ne(L.id),
8219
+ onClick: () => Se(L.id),
8219
8220
  className: "cm:flex cm:h-[22px] cm:w-[22px] cm:items-center cm:justify-center cm:rounded cm:bg-transparent cm:border-0 cm:p-0 cm:cursor-pointer cm:opacity-[0.45] cm:hover:bg-slate-100",
8220
8221
  children: /* @__PURE__ */ n(
8221
8222
  "img",
@@ -8284,7 +8285,7 @@ const e2 = ({
8284
8285
  children: L.display_name
8285
8286
  }
8286
8287
  ),
8287
- /* @__PURE__ */ n("span", { className: "cm:text-xs cm:text-slate-500", children: Ve[(L.type ?? "").toLowerCase()] ?? L.type })
8288
+ /* @__PURE__ */ n("span", { className: "cm:text-xs cm:text-slate-500", children: Ue[(L.type ?? "").toLowerCase()] ?? L.type })
8288
8289
  ] })
8289
8290
  ] }),
8290
8291
  emptyMessage: "No fields found"
@@ -8292,11 +8293,11 @@ const e2 = ({
8292
8293
  )
8293
8294
  ] })
8294
8295
  ] }) }),
8295
- /* @__PURE__ */ n(Ut, { children: C ? /* @__PURE__ */ n(ze, { label: "Exit", onClick: c }) : /* @__PURE__ */ m(ee, { children: [
8296
+ /* @__PURE__ */ n(Ut, { children: C ? /* @__PURE__ */ n(Qe, { label: "Exit", onClick: c }) : /* @__PURE__ */ m(ee, { children: [
8296
8297
  N && /* @__PURE__ */ n("span", { className: "cm:text-xs cm:text-red-500 cm:mr-auto", children: N }),
8297
8298
  /* @__PURE__ */ n(nt, { label: "Cancel", onClick: t }),
8298
8299
  /* @__PURE__ */ n(
8299
- ze,
8300
+ Qe,
8300
8301
  {
8301
8302
  label: w ? "Syncing…" : "Sync now",
8302
8303
  onClick: be,
@@ -8376,7 +8377,7 @@ const e2 = ({
8376
8377
  )).data, X2 = 1e3, G2 = ({
8377
8378
  connectorId: e,
8378
8379
  enabled: t = !1
8379
- }) => Ee({
8380
+ }) => Ne({
8380
8381
  queryKey: ["connectorStatus", e],
8381
8382
  queryFn: () => q2(e),
8382
8383
  enabled: t && !!e,
@@ -8391,7 +8392,7 @@ const e2 = ({
8391
8392
  const e = P(
8392
8393
  (t) => !!t.callbacks?.connectorApiCallback
8393
8394
  );
8394
- return Ee({
8395
+ return Ne({
8395
8396
  queryKey: Gt,
8396
8397
  queryFn: ra,
8397
8398
  enabled: e,
@@ -8437,7 +8438,7 @@ const e2 = ({
8437
8438
  open: e,
8438
8439
  crmType: t,
8439
8440
  crmName: c
8440
- }) => Ee({
8441
+ }) => Ne({
8441
8442
  queryKey: ["crm-login-action", t],
8442
8443
  enabled: e,
8443
8444
  staleTime: 0,
@@ -8626,7 +8627,7 @@ const e2 = ({
8626
8627
  /* @__PURE__ */ n(
8627
8628
  "img",
8628
8629
  {
8629
- src: Se.successState,
8630
+ src: Ee.successState,
8630
8631
  alt: "Authorization successful",
8631
8632
  className: "cm:w-32 cm:h-32"
8632
8633
  }
@@ -9089,7 +9090,7 @@ const e2 = ({
9089
9090
  ),
9090
9091
  d && /* @__PURE__ */ n("p", { className: "cm:text-xs cm:text-red-500", children: d })
9091
9092
  ] });
9092
- }, ia = 10, u0 = (e, t, c = !0) => Ee({
9093
+ }, ia = 10, u0 = (e, t, c = !0) => Ne({
9093
9094
  queryKey: [xe.CRM_SYNC_RUNS, e, t],
9094
9095
  queryFn: () => dm({
9095
9096
  crm_provider: e,
@@ -9187,7 +9188,7 @@ const e2 = ({
9187
9188
  maxInterval: c = v0,
9188
9189
  backoffFactor: s = b0
9189
9190
  } = {}) => {
9190
- const a = Ee({
9191
+ const a = Ne({
9191
9192
  queryKey: [xe.CRM_SYNC_STATUS],
9192
9193
  queryFn: hm,
9193
9194
  enabled: e,
@@ -9386,7 +9387,7 @@ const e2 = ({
9386
9387
  connectIllustration: /* @__PURE__ */ n(
9387
9388
  "img",
9388
9389
  {
9389
- src: Se.salesforceSync,
9390
+ src: Ee.salesforceSync,
9390
9391
  width: 528,
9391
9392
  height: 276,
9392
9393
  className: "cm:rounded-xl",
@@ -9404,11 +9405,11 @@ const e2 = ({
9404
9405
  type: Qn,
9405
9406
  name: "HubSpot",
9406
9407
  dropdownLogo: /* @__PURE__ */ n(k0, { width: 24, height: 24, "aria-label": "HubSpot" }),
9407
- drawerLogo: /* @__PURE__ */ n("img", { src: Se.hubspotLogo, width: 28, height: 20, "aria-hidden": "true" }),
9408
+ drawerLogo: /* @__PURE__ */ n("img", { src: Ee.hubspotLogo, width: 28, height: 20, "aria-hidden": "true" }),
9408
9409
  connectIllustration: /* @__PURE__ */ n(
9409
9410
  "img",
9410
9411
  {
9411
- src: Se.hubspotIllustration,
9412
+ src: Ee.hubspotIllustration,
9412
9413
  width: 528,
9413
9414
  height: 276,
9414
9415
  className: "cm:rounded-xl",
@@ -9907,7 +9908,7 @@ const e2 = ({
9907
9908
  }
9908
9909
  ),
9909
9910
  /* @__PURE__ */ n(
9910
- ze,
9911
+ Qe,
9911
9912
  {
9912
9913
  label: "Apply",
9913
9914
  onClick: t,
@@ -10261,7 +10262,7 @@ const e2 = ({
10261
10262
  return f ? (delete u[v], { ...f, visible: f.locked ? f.visible ?? !0 : x }) : null;
10262
10263
  }).filter(Boolean), p = Object.values(u).filter(Boolean);
10263
10264
  return [...h, ...p];
10264
- }, Ca = ({ entity_type: e, defaultColumns: t, extraColumns: c }) => Ee({
10265
+ }, Ca = ({ entity_type: e, defaultColumns: t, extraColumns: c }) => Ne({
10265
10266
  // extraColumns ids join the key so flag flips (CI on/off) re-derive the set.
10266
10267
  queryKey: [
10267
10268
  xe.CUSTOM_FIELDS_COLUMNS,
@@ -10608,7 +10609,7 @@ function rn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10608
10609
  defaultColumns: Us,
10609
10610
  extraColumns: c ? [y3] : []
10610
10611
  }), E = P((J) => J.callbacks), O = async (J) => {
10611
- const be = J.map((Ne) => fa(Ne.id, Ne.visible ?? !1));
10612
+ const be = J.map((Se) => fa(Se.id, Se.visible ?? !1));
10612
10613
  await pa({ entity_type: H.COMPANY, visible_items: be }) && A();
10613
10614
  }, {
10614
10615
  preferences: T,
@@ -10621,13 +10622,13 @@ function rn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10621
10622
  }), [T]), Z = B(() => {
10622
10623
  if (!h) return [];
10623
10624
  const J = h.map((ce) => {
10624
- const Ne = (ce.domains || []).map((Fe) => Fe?.name).filter((Fe) => !!Fe);
10625
+ const Se = (ce.domains || []).map((Fe) => Fe?.name).filter((Fe) => !!Fe);
10625
10626
  return {
10626
10627
  id: ce.id,
10627
10628
  name: ge(
10628
10629
  ce.generated_name ? ce.generated_name : ce.name
10629
10630
  ),
10630
- domain: ge(Ne[0] || ce.generated_name),
10631
+ domain: ge(Se[0] || ce.generated_name),
10631
10632
  nameDisplay: /* @__PURE__ */ n(
10632
10633
  A3,
10633
10634
  {
@@ -10641,7 +10642,7 @@ function rn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10641
10642
  domainDisplay: /* @__PURE__ */ n(
10642
10643
  E3,
10643
10644
  {
10644
- domains: Ne,
10645
+ domains: Se,
10645
10646
  fallback: ge(ce.generated_name)
10646
10647
  }
10647
10648
  ),
@@ -10653,7 +10654,7 @@ function rn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10653
10654
  };
10654
10655
  }), be = h[0]?.custom_fields;
10655
10656
  if (C) {
10656
- const ce = Array.from({ length: 3 }, (Ne, Fe) => ({
10657
+ const ce = Array.from({ length: 3 }, (Se, Fe) => ({
10657
10658
  id: `shimmer-${Fe}`,
10658
10659
  name: "",
10659
10660
  domain: "",
@@ -10674,7 +10675,7 @@ function rn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10674
10675
  if (!be.isNoDataRow) {
10675
10676
  if (E?.sendGainsightEvent?.(oe.ACCOUNT_ROW_CLICKED), e === "at_risk") {
10676
10677
  const ce = h?.find(
10677
- (Ne) => String(Ne.id) === String(be.id)
10678
+ (Se) => String(Se.id) === String(be.id)
10678
10679
  );
10679
10680
  E?.sendGainsightEvent?.(
10680
10681
  oe.CUSTOMER_INTELLIGENCE_AT_RISK_ACCOUNT_OPENED,
@@ -10688,11 +10689,11 @@ function rn({ filterBy: e, tabs: t, ciEnabled: c = !1, onAtRiskCount: s, onAllCo
10688
10689
  }
10689
10690
  o({ pathname: `/accounts/${be.id}`, search: r });
10690
10691
  }
10691
- }, ie = () => k && !V.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(Ce, {}) }) : te ? /* @__PURE__ */ n("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
10692
- Qe,
10692
+ }, ie = () => k && !V.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(Ce, {}) }) : te ? /* @__PURE__ */ n("div", { className: "cm-listing-empty cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
10693
+ je,
10693
10694
  {
10694
10695
  title: Y ? "No accounts found" : "No accounts yet",
10695
- iconContent: Se.hiverBee2,
10696
+ iconContent: Ee.hiverBee2,
10696
10697
  subcopy: Y ? void 0 : "Accounts will start showing up here when new conversations are created."
10697
10698
  }
10698
10699
  ) }) : /* @__PURE__ */ n(
@@ -11079,7 +11080,7 @@ function I3() {
11079
11080
  return /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(Ce, {}) });
11080
11081
  const N = (e?.contacts?.length ?? 0) > 0;
11081
11082
  return (s !== null || c) && !N ? /* @__PURE__ */ n(_s, { entityLabel: "contacts", onRetry: w }) : b || C.length === 0 ? /* @__PURE__ */ n("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11082
- Qe,
11083
+ je,
11083
11084
  {
11084
11085
  title: "No contacts found",
11085
11086
  subcopy: "Contacts will start showing up here when new conversations are created."
@@ -11278,11 +11279,11 @@ function j3() {
11278
11279
  }, I = Ke((Z) => Z.contact.filters.length > 0) || !!c, D = !A && !O?.length, k = (Z) => {
11279
11280
  const q = Z.data;
11280
11281
  q.isNoDataRow || (v?.sendGainsightEvent?.(oe.CONTACT_ROW_CLICKED), g(`/contacts/${q.id}`));
11281
- }, V = () => A && !E.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(Ce, {}) }) : D ? /* @__PURE__ */ n("div", { className: "cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11282
- Qe,
11282
+ }, V = () => A && !E.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:items-center cm:justify-center cm:w-full cm:h-full", children: /* @__PURE__ */ n(Ce, {}) }) : D ? /* @__PURE__ */ n("div", { className: "cm-listing-empty cm:px-12 cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
11283
+ je,
11283
11284
  {
11284
11285
  title: I ? "No contacts found" : "No contacts yet",
11285
- iconContent: Se.hiverBee2,
11286
+ iconContent: Ee.hiverBee2,
11286
11287
  subcopy: I ? void 0 : "Contacts will start showing up here when new conversations are created."
11287
11288
  }
11288
11289
  ) }) : /* @__PURE__ */ n(
@@ -11462,7 +11463,7 @@ const V3 = () => {
11462
11463
  method: "POST",
11463
11464
  data: s
11464
11465
  })).data.data[0];
11465
- }, Gn = ({ entity_type: e, entity_ids: t, enabled: c }) => Ee({
11466
+ }, Gn = ({ entity_type: e, entity_ids: t, enabled: c }) => Ne({
11466
11467
  queryKey: [xe.ENTITY_SUMMARY, e, t],
11467
11468
  queryFn: () => z3({ entity_type: e, entity_ids: t }),
11468
11469
  enabled: c
@@ -12367,7 +12368,7 @@ const V3 = () => {
12367
12368
  }
12368
12369
  ),
12369
12370
  /* @__PURE__ */ n(
12370
- ze,
12371
+ Qe,
12371
12372
  {
12372
12373
  label: e ? "Save" : `Create ${c} field`,
12373
12374
  disabled: u,
@@ -13052,7 +13053,7 @@ const V3 = () => {
13052
13053
  ] })
13053
13054
  }
13054
13055
  ),
13055
- /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:flex-1 cm:min-h-0 custom-fields-table", children: /* @__PURE__ */ n(
13056
+ E.length ? /* @__PURE__ */ n("div", { className: "cm:flex cm:flex-col cm:flex-1 cm:min-h-0 custom-fields-table", children: /* @__PURE__ */ n(
13056
13057
  et,
13057
13058
  {
13058
13059
  scrollable: !0,
@@ -13062,6 +13063,12 @@ const V3 = () => {
13062
13063
  rowClassName: D
13063
13064
  },
13064
13065
  T
13066
+ ) }) : /* @__PURE__ */ n("div", { className: "cm-cf-empty cm:flex cm:flex-col cm:flex-1", children: /* @__PURE__ */ n(
13067
+ je,
13068
+ {
13069
+ title: `No ${i} fields found`,
13070
+ iconContent: Ee.hiverBee2
13071
+ }
13065
13072
  ) })
13066
13073
  ] }),
13067
13074
  /* @__PURE__ */ n(
@@ -13076,7 +13083,7 @@ const V3 = () => {
13076
13083
  )
13077
13084
  ] });
13078
13085
  }, Id = () => {
13079
- const { entityType: e } = De(), t = Oe(), c = e === H.COMPANY ? "Accounts" : "Contacts", s = e === H.COMPANY ? Ue.ACCOUNTS : Ue.CONTACTS, a = e === H.COMPANY ? "accounts" : "contacts", o = e === H.COMPANY ? "account" : "contact", r = [
13086
+ const { entityType: e } = De(), t = Oe(), c = e === H.COMPANY ? "Accounts" : "Contacts", s = e === H.COMPANY ? ze.ACCOUNTS : ze.CONTACTS, a = e === H.COMPANY ? "accounts" : "contacts", o = e === H.COMPANY ? "account" : "contact", r = [
13080
13087
  {
13081
13088
  label: c,
13082
13089
  icon: /* @__PURE__ */ n(G, { name: a, size: 14, color: "currentColor" }),
@@ -13113,14 +13120,14 @@ function _d() {
13113
13120
  /* @__PURE__ */ m(So, { children: [
13114
13121
  /* @__PURE__ */ n(Me, { path: "/conversation", element: /* @__PURE__ */ n(td, {}) }),
13115
13122
  /* @__PURE__ */ m(Me, { element: /* @__PURE__ */ n(n1, {}), children: [
13116
- /* @__PURE__ */ n(Me, { path: "/", element: /* @__PURE__ */ n(ko, { to: Ue.ACCOUNTS }) }),
13117
- /* @__PURE__ */ n(Me, { path: Ue.ACCOUNTS, element: /* @__PURE__ */ n(N3, {}) }),
13118
- /* @__PURE__ */ n(Me, { path: Ue.CONTACTS, element: /* @__PURE__ */ n(V3, {}) }),
13123
+ /* @__PURE__ */ n(Me, { path: "/", element: /* @__PURE__ */ n(ko, { to: ze.ACCOUNTS }) }),
13124
+ /* @__PURE__ */ n(Me, { path: ze.ACCOUNTS, element: /* @__PURE__ */ n(N3, {}) }),
13125
+ /* @__PURE__ */ n(Me, { path: ze.CONTACTS, element: /* @__PURE__ */ n(V3, {}) }),
13119
13126
  /* @__PURE__ */ n(Me, { path: "/accounts/:accountId", element: /* @__PURE__ */ n(Y3, {}) }),
13120
13127
  /* @__PURE__ */ n(Me, { path: "/accounts/:accountId/contacts/:contactId", element: /* @__PURE__ */ n(jc, {}) }),
13121
13128
  /* @__PURE__ */ n(Me, { path: "/contacts/:contactId", element: /* @__PURE__ */ n(jc, {}) })
13122
13129
  ] }),
13123
- /* @__PURE__ */ n(Me, { path: Ue.CUSTOM_FIELDS, element: /* @__PURE__ */ n(Id, {}) })
13130
+ /* @__PURE__ */ n(Me, { path: ze.CUSTOM_FIELDS, element: /* @__PURE__ */ n(Id, {}) })
13124
13131
  ] }),
13125
13132
  /* @__PURE__ */ n(Es, {})
13126
13133
  ] }) });