customer-module-frontend 2.7.0-beta.13 → 2.7.0-beta.15

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.
@@ -39434,7 +39434,7 @@ const es = () => xt.getState().callbacks?.cfApiCallback, Wc = async ({ entity_ty
39434
39434
  }, p = (g) => {
39435
39435
  s(g), h("");
39436
39436
  };
39437
- return /* @__PURE__ */ N("div", { className: "cm:flex cm:flex-col cm:gap-2 cm:px-4 cm:pt-4 cm:pb-3", children: [
39437
+ return /* @__PURE__ */ N("div", { className: "cm-exclude-add-row cm:flex cm:flex-col cm:gap-2 cm:px-4 cm:pt-4 cm:pb-3", children: [
39438
39438
  /* @__PURE__ */ N("div", { className: "cm:flex cm:items-start cm:gap-3", children: [
39439
39439
  /* @__PURE__ */ u("div", { className: "cm:flex-1 cm:min-w-0", children: /* @__PURE__ */ u(
39440
39440
  ts,
@@ -39808,7 +39808,7 @@ const bk = ({
39808
39808
  },
39809
39809
  onDragLeave: () => s(!1),
39810
39810
  onDrop: (f) => !e && d(f),
39811
- className: `cm:rounded-xl cm:border-1 cm:border-dashed cm:bg-slate-50 cm:py-[72px] cm:px-[40px]
39811
+ className: `cm-csv-dropzone cm:rounded-xl cm:border-1 cm:border-dashed cm:bg-slate-50 cm:py-[72px] cm:px-[40px]
39812
39812
  cm:flex cm:flex-col cm:items-center cm:justify-center cm:gap-4 cm:transition-colors cm:min-h-[330px]
39813
39813
  ${i && !e ? "cm:border-blue-400 cm:bg-blue-50" : "cm:border-slate-200"}`,
39814
39814
  children: [
@@ -43119,11 +43119,7 @@ const bk = ({
43119
43119
  return /* @__PURE__ */ u(fI, { fields: n, defaultValue: t, onChange: (o) => {
43120
43120
  a(e, o);
43121
43121
  } });
43122
- }, q6 = lo((e) => ({
43123
- company: { text: "" },
43124
- contact: { text: "" },
43125
- setSearch: (n, t) => e({ [n]: { text: t } })
43126
- })), X6 = ({ total: e, entityType: n, rightNode: t, extraActions: a }) => {
43122
+ }, q6 = ({ total: e, entityType: n, rightNode: t, extraActions: a }) => {
43127
43123
  const r = n === Tt.COMPANY ? "accounts" : "contacts", o = Qr(Ir.CUSTOM_FIELDS_M2_ENABLED), i = Qr(Ir.IS_ADMIN);
43128
43124
  return /* @__PURE__ */ N("div", { className: "cm:flex cm:items-center cm:justify-between cm:pl-6 cm:pr-3 cm:py-2.5 cm:border cm:border-slate-border-light cm:rounded-t-lg cm:bg-white", children: [
43129
43125
  /* @__PURE__ */ u("div", { className: "cm:text-sm cm:font-normal cm:text-slate-text-body", children: e > 0 ? `${e ?? 0} ${r}` : "" }),
@@ -43162,7 +43158,7 @@ const bk = ({
43162
43158
  flexShrink: 0
43163
43159
  }, ...e }, /* @__PURE__ */ l.createElement("path", { d: "M5 8.5L7 11L9 8.5", stroke: "#64748B", strokeWidth: 1.1, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ l.createElement("path", { d: "M5 5.5L7 3L9 5.5", stroke: "#64748B", strokeWidth: 1.1, strokeLinecap: "round", strokeLinejoin: "round" })), Fp = (e) => /* @__PURE__ */ l.createElement("svg", { width: 14, height: 14, viewBox: "0 0 14 14", fill: "none", style: {
43164
43160
  flexShrink: 0
43165
- }, ...e }, /* @__PURE__ */ l.createElement("path", { d: "M5 8.25L7 5.75L9 8.25", stroke: "#64748B", strokeWidth: 1.1, strokeLinecap: "round", strokeLinejoin: "round" })), Y6 = ({ title: e, entityType: n, field: t, isCF: a }) => {
43161
+ }, ...e }, /* @__PURE__ */ l.createElement("path", { d: "M5 8.25L7 5.75L9 8.25", stroke: "#64748B", strokeWidth: 1.1, strokeLinecap: "round", strokeLinejoin: "round" })), X6 = ({ title: e, entityType: n, field: t, isCF: a }) => {
43166
43162
  const r = Nc((m) => m[n]), i = Nc((m) => m.setSort)(n), s = hI(r)(t, a);
43167
43163
  return /* @__PURE__ */ N(
43168
43164
  "div",
@@ -43234,7 +43230,7 @@ const bk = ({
43234
43230
  title: e,
43235
43231
  children: e
43236
43232
  }
43237
- ), EI = 2, Z6 = ({
43233
+ ), EI = 2, Y6 = ({
43238
43234
  values: e,
43239
43235
  maxVisible: n = EI,
43240
43236
  className: t,
@@ -43280,7 +43276,7 @@ const bk = ({
43280
43276
  params: {
43281
43277
  entity_type: e
43282
43278
  }
43283
- })).data.data, J6 = async ({ entity_type: e, visible_items: n }) => {
43279
+ })).data.data, Z6 = async ({ entity_type: e, visible_items: n }) => {
43284
43280
  try {
43285
43281
  return (await hn.put(Zn.VIEW_CUSTOM_FIELDS, {
43286
43282
  entity_type: e,
@@ -43310,7 +43306,7 @@ const bk = ({
43310
43306
  }, kI = (e) => {
43311
43307
  const [n, t] = e?.split(":") ?? [];
43312
43308
  return { key: n, visible: t === "true" };
43313
- }, $6 = (e, n) => `${e}:${n}`, eg = (e) => {
43309
+ }, J6 = (e, n) => `${e}:${n}`, $6 = (e) => {
43314
43310
  let n;
43315
43311
  switch (e?.type) {
43316
43312
  case tn.DATE:
@@ -43335,7 +43331,7 @@ const bk = ({
43335
43331
  return g ? (delete m[y], { ...g, visible: g.locked ? g.visible ?? !0 : v }) : null;
43336
43332
  }).filter(Boolean), h = Object.values(m).filter(Boolean);
43337
43333
  return [...f, ...h];
43338
- }, tg = ({ entity_type: e, defaultColumns: n, extraColumns: t }) => Na({
43334
+ }, eg = ({ entity_type: e, defaultColumns: n, extraColumns: t }) => Na({
43339
43335
  // extraColumns ids join the key so flag flips (CI on/off) re-derive the set.
43340
43336
  queryKey: [
43341
43337
  aa.CUSTOM_FIELDS_COLUMNS,
@@ -43343,11 +43339,15 @@ const bk = ({
43343
43339
  (t ?? []).map((a) => a.id)
43344
43340
  ],
43345
43341
  queryFn: () => OI({ entity_type: e, defaultColumns: n, extraColumns: t })
43346
- }), ng = (e) => {
43342
+ }), tg = (e) => {
43347
43343
  if (!e) return null;
43348
43344
  const n = e.parentElement?.parentElement;
43349
43345
  return n?.tagName === "TR" ? n : e;
43350
- }, rg = ({ field: e }) => /* @__PURE__ */ u("div", { children: eg(e) }), ag = (e, n = 300) => {
43346
+ }, ng = ({ field: e }) => /* @__PURE__ */ u("div", { children: $6(e) }), rg = lo((e) => ({
43347
+ company: { text: "" },
43348
+ contact: { text: "" },
43349
+ setSearch: (n, t) => e({ [n]: { text: t } })
43350
+ })), ag = (e, n = 300) => {
43351
43351
  const [t, a] = He(e);
43352
43352
  return gt(() => {
43353
43353
  const r = window.setTimeout(() => a(e), n);
@@ -43638,7 +43638,7 @@ const NI = ({
43638
43638
  reorderPreferences: c,
43639
43639
  setAllVisible: d
43640
43640
  };
43641
- }, FI = tu((e) => /* @__PURE__ */ u(rg, { field: e })), LI = tu(() => /* @__PURE__ */ u(ro, {})), BI = {
43641
+ }, FI = tu((e) => /* @__PURE__ */ u(ng, { field: e })), LI = tu(() => /* @__PURE__ */ u(ro, {})), BI = {
43642
43642
  id: "account_sentiment",
43643
43643
  field: "accountSentimentDisplay",
43644
43644
  label: "Account Sentiment",
@@ -43649,9 +43649,9 @@ const NI = ({
43649
43649
  }, jI = ({ name: e, health: n, sentiment: t }) => /* @__PURE__ */ N("span", { className: "cm:inline-flex cm:min-w-0 cm:items-center cm:gap-1.5", children: [
43650
43650
  /* @__PURE__ */ u(ur, { text: e, className: "cm:text-slate-900" }),
43651
43651
  /* @__PURE__ */ u(o6, { health: n, sentiment: t })
43652
- ] }), _I = ({ domains: e, fallback: n }) => e.length ? /* @__PURE__ */ u(Z6, { values: e, maxVisible: 2 }) : /* @__PURE__ */ u(ur, { text: n, className: "cm:text-slate-900" });
43652
+ ] }), _I = ({ domains: e, fallback: n }) => e.length ? /* @__PURE__ */ u(Y6, { values: e, maxVisible: 2 }) : /* @__PURE__ */ u(ur, { text: n, className: "cm:text-slate-900" });
43653
43653
  function Gu({ filterBy: e, tabs: n, ciEnabled: t = !1, onAtRiskCount: a, onAllCount: r } = {}) {
43654
- const o = pa(), { search: i } = Yr(), [s, c] = He(!1), d = q6((V) => V[Tt.COMPANY]?.text ?? ""), f = ag(d).trim() || void 0, h = At(
43654
+ const o = pa(), { search: i } = Yr(), [s, c] = He(!1), d = rg((V) => V[Tt.COMPANY]?.text ?? ""), f = ag(d).trim() || void 0, h = At(
43655
43655
  () => e || f ? { ...e ? { filter_by: e } : {}, ...f ? { text: f } : {} } : void 0,
43656
43656
  [e, f]
43657
43657
  ), {
@@ -43674,14 +43674,14 @@ function Gu({ filterBy: e, tabs: n, ciEnabled: t = !1, onAtRiskCount: a, onAllCo
43674
43674
  callback: async () => {
43675
43675
  E && await S();
43676
43676
  },
43677
- selectTargetNode: ng
43678
- }), { data: P = [], refetch: I } = tg({
43677
+ selectTargetNode: tg
43678
+ }), { data: P = [], refetch: I } = eg({
43679
43679
  entity_type: Tt.COMPANY,
43680
43680
  defaultColumns: S6,
43681
43681
  extraColumns: t ? [BI] : []
43682
43682
  }), A = xt((V) => V.callbacks), B = async (V) => {
43683
- const X = V.map((ve) => $6(ve.id, ve.visible ?? !1));
43684
- await J6({ entity_type: Tt.COMPANY, visible_items: X }) && I();
43683
+ const X = V.map((ve) => J6(ve.id, ve.visible ?? !1));
43684
+ await Z6({ entity_type: Tt.COMPANY, visible_items: X }) && I();
43685
43685
  }, {
43686
43686
  preferences: z,
43687
43687
  togglePreference: H,
@@ -43689,7 +43689,7 @@ function Gu({ filterBy: e, tabs: n, ciEnabled: t = !1, onAtRiskCount: a, onAllCo
43689
43689
  setAllVisible: Q
43690
43690
  } = sg({ items: P, savePreferences: B }), de = x || z.length === 0, Se = At(() => z.filter((V) => V?.visible).map((V) => V.sortable === !1 ? V : {
43691
43691
  ...V,
43692
- label: /* @__PURE__ */ u(Y6, { title: V.label, entityType: Tt.COMPANY, field: V.sortId || V.id, isCF: !V.locked })
43692
+ label: /* @__PURE__ */ u(X6, { title: V.label, entityType: Tt.COMPANY, field: V.sortId || V.id, isCF: !V.locked })
43693
43693
  }), [z]), me = At(() => {
43694
43694
  if (!p) return [];
43695
43695
  const V = p.map((ee) => {
@@ -43802,7 +43802,7 @@ function Gu({ filterBy: e, tabs: n, ciEnabled: t = !1, onAtRiskCount: a, onAllCo
43802
43802
  ` }),
43803
43803
  /* @__PURE__ */ N("div", { className: "cm-listing-shell cm:px-12 cm:w-full cm:flex cm:flex-col cm:flex-1 cm:basis-0 cm:min-h-0 account-table-datatable", ref: L, children: [
43804
43804
  /* @__PURE__ */ u(
43805
- X6,
43805
+ q6,
43806
43806
  {
43807
43807
  total: y,
43808
43808
  entityType: Tt.COMPANY,
@@ -44256,7 +44256,7 @@ const WI = { total: 0, page: 0, page_size: 0 }, QI = { total_results: 0, page_nu
44256
44256
  total: y,
44257
44257
  ...f
44258
44258
  };
44259
- }, ZI = tu((e) => /* @__PURE__ */ u(rg, { field: e })), JI = tu(() => /* @__PURE__ */ u(ro, {})), $I = {
44259
+ }, ZI = tu((e) => /* @__PURE__ */ u(ng, { field: e })), JI = tu(() => /* @__PURE__ */ u(ro, {})), $I = {
44260
44260
  id: "phoneCall",
44261
44261
  field: "phoneCallDisplay",
44262
44262
  label: "",
@@ -44272,7 +44272,7 @@ const WI = { total: 0, page: 0, page_size: 0 }, QI = { total_results: 0, page_nu
44272
44272
  );
44273
44273
  };
44274
44274
  function tP() {
44275
- const [e, n] = He(!1), t = q6((de) => de[Tt.CONTACT]?.text ?? ""), r = ag(t).trim() || void 0, o = At(() => r ? { text: r } : void 0, [r]), {
44275
+ const [e, n] = He(!1), t = rg((de) => de[Tt.CONTACT]?.text ?? ""), r = ag(t).trim() || void 0, o = At(() => r ? { text: r } : void 0, [r]), {
44276
44276
  contacts: i,
44277
44277
  total: s,
44278
44278
  isLoading: c,
@@ -44284,10 +44284,10 @@ function tP() {
44284
44284
  callback: async () => {
44285
44285
  m && await h();
44286
44286
  },
44287
- selectTargetNode: ng
44288
- }), v = pa(), g = xt((de) => de.callbacks), x = Qr(Ir.VOICE_ENABLED), { data: w = [], refetch: E } = tg({ entity_type: Tt.CONTACT, defaultColumns: A6 }), k = async (de) => {
44289
- const Se = de.map((be) => $6(be.id, be.visible ?? !1));
44290
- await J6({ entity_type: Tt.CONTACT, visible_items: Se }) && E();
44287
+ selectTargetNode: tg
44288
+ }), v = pa(), g = xt((de) => de.callbacks), x = Qr(Ir.VOICE_ENABLED), { data: w = [], refetch: E } = eg({ entity_type: Tt.CONTACT, defaultColumns: A6 }), k = async (de) => {
44289
+ const Se = de.map((be) => J6(be.id, be.visible ?? !1));
44290
+ await Z6({ entity_type: Tt.CONTACT, visible_items: Se }) && E();
44291
44291
  }, {
44292
44292
  preferences: S,
44293
44293
  togglePreference: L,
@@ -44301,7 +44301,7 @@ function tP() {
44301
44301
  }
44302
44302
  return de.map((Se) => Se.id === "phoneCall" ? Se : {
44303
44303
  ...Se,
44304
- label: /* @__PURE__ */ u(Y6, { title: Se.label, entityType: Tt.CONTACT, field: Se.sortId || Se.id, isCF: !Se.locked })
44304
+ label: /* @__PURE__ */ u(X6, { title: Se.label, entityType: Tt.CONTACT, field: Se.sortId || Se.id, isCF: !Se.locked })
44305
44305
  });
44306
44306
  }, [S, g?.onPhoneClick, x]), B = At(() => {
44307
44307
  if (I || !i?.length)
@@ -44385,7 +44385,7 @@ function tP() {
44385
44385
  ` }),
44386
44386
  /* @__PURE__ */ N("div", { className: "cm-listing-shell cm:px-12 cm:w-full cm:flex cm:flex-col cm:flex-1 cm:basis-0 cm:min-h-0 contact-table-datatable", ref: p, children: [
44387
44387
  /* @__PURE__ */ u(
44388
- X6,
44388
+ q6,
44389
44389
  {
44390
44390
  total: s,
44391
44391
  entityType: Tt.CONTACT,
@@ -44533,7 +44533,7 @@ const nP = () => {
44533
44533
  enabled: t
44534
44534
  }), oP = (e) => /* @__PURE__ */ N("div", { className: "cm:flex cm:items-center cm:relative cm:shrink-0 cm:w-full", children: [
44535
44535
  /* @__PURE__ */ u("p", { className: "cm:font-normal cm:leading-5 cm:text-sm cm:text-slate-text-subtle cm:flex-1 cm:min-w-0", children: e.display_name ?? e.cf_id }),
44536
- /* @__PURE__ */ u("div", { className: "cm:flex-1 cm:flex cm:items-center cm:min-w-0", children: /* @__PURE__ */ u("p", { className: "cm:font-medium cm:leading-5 cm:text-sm cm:text-slate-text-title cm:truncate", children: eg(e) }) })
44536
+ /* @__PURE__ */ u("div", { className: "cm:flex-1 cm:flex cm:items-center cm:min-w-0", children: /* @__PURE__ */ u("p", { className: "cm:font-medium cm:leading-5 cm:text-sm cm:text-slate-text-title cm:truncate", children: $6(e) }) })
44537
44537
  ] }), mg = ({ entityType: e, entityId: n }) => {
44538
44538
  const [t, a] = He(!0), { data: r } = Dm({ entity_type: e, entity_ids: [n], enabled: !!n }), o = r?.custom_fields ?? [], i = () => a((s) => !s);
44539
44539
  return o.length === 0 ? null : /* @__PURE__ */ N("div", { className: "cm:flex cm:flex-col cm:gap-5 cm:items-stretch cm:relative cm:shrink-0 cm:w-full cm:border-t cm:border-slate-border-mild cm:pt-5", children: [
@@ -44599,7 +44599,7 @@ const nP = () => {
44599
44599
  {
44600
44600
  icon: /* @__PURE__ */ u(Jt, { name: "domain", size: 14, color: "#64758B" }),
44601
44601
  label: "Domain",
44602
- value: a ? /* @__PURE__ */ u(Z6, { values: d, maxVisible: 1 }) : c
44602
+ value: a ? /* @__PURE__ */ u(Y6, { values: d, maxVisible: 1 }) : c
44603
44603
  }
44604
44604
  ),
44605
44605
  /* @__PURE__ */ u(