@threatcaptain/tc-reports 0.2.23 → 0.2.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -28788,6 +28788,10 @@ const getExecutiveSummaryTemplate = (industry) => {
28788
28788
  const formatCurrency = (value) => {
28789
28789
  return `$${value.toLocaleString()}`;
28790
28790
  };
28791
+ const formatSnakeCase = (value) => {
28792
+ if (!value) return "";
28793
+ return value.split("_").filter((word) => word.length > 0).map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(" ");
28794
+ };
28791
28795
  const displayExecutiveSummary = (clientData) => {
28792
28796
  if (clientData.executiveSummary) return clientData.executiveSummary;
28793
28797
  return getExecutiveSummaryTemplate(clientData.industry);
@@ -52192,6 +52196,7 @@ const UnifiedCostBreakdownChart = ({
52192
52196
  const FinancialImpact = ({ reportData }) => {
52193
52197
  const { clientData, simulationData } = reportData;
52194
52198
  const { industry } = clientData;
52199
+ const displayIndustry = formatSnakeCase(clientData.industry);
52195
52200
  const getIndustryRiskLevel = (industry2) => {
52196
52201
  const highRiskIndustries = [
52197
52202
  "Healthcare",
@@ -52453,11 +52458,11 @@ const FinancialImpact = ({ reportData }) => {
52453
52458
  }
52454
52459
  ),
52455
52460
  /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-slate-600", children: [
52456
- clientData.industry === "Healthcare" && "Healthcare organizations face elevated cyber risks due to valuable PHI data that commands high prices on dark web markets.",
52457
- clientData.industry === "Financial Services" && "Financial institutions are prime targets due to direct access to funds and sensitive financial data.",
52458
- clientData.industry === "Manufacturing" && "Manufacturing companies face operational technology risks that can halt production and supply chains.",
52461
+ displayIndustry === "Healthcare" && "Healthcare organizations face elevated cyber risks due to valuable PHI data that commands high prices on dark web markets.",
52462
+ displayIndustry === "Financial Services" && "Financial institutions are prime targets due to direct access to funds and sensitive financial data.",
52463
+ displayIndustry === "Manufacturing" && "Manufacturing companies face operational technology risks that can halt production and supply chains.",
52459
52464
  !["Healthcare", "Financial Services", "Manufacturing"].includes(
52460
- clientData.industry
52465
+ displayIndustry
52461
52466
  ) && "Your industry faces specific cyber risks that require tailored protection strategies."
52462
52467
  ] })
52463
52468
  ] }),
@@ -52535,11 +52540,11 @@ const FinancialImpact = ({ reportData }) => {
52535
52540
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3 text-sm", children: [
52536
52541
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
52537
52542
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-600", children: "Breach Type:" }),
52538
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-right capitalize", children: simulationData.breach_type ? simulationData.breach_type : "" })
52543
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-right", children: simulationData.breach_type ? formatSnakeCase(simulationData.breach_type) : "" })
52539
52544
  ] }),
52540
52545
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
52541
52546
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-600", children: "Industry:" }),
52542
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-right", children: clientData.industry })
52547
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-right", children: formatSnakeCase(clientData.industry) })
52543
52548
  ] }),
52544
52549
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
52545
52550
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-600", children: "Records at Risk:" }),
@@ -53266,7 +53271,7 @@ const ReportBuilder = ({
53266
53271
  id: "print-report",
53267
53272
  className: "report-wrapper max-w-4xl mx-auto bg-white p-8 space-y-8 print:font-sans",
53268
53273
  children: [
53269
- /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "report-page flex flex-col justify-center h-full print:mt-24 print:gap-8", children: [
53274
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "report-page flex flex-col justify-center print:mt-8 print:gap-8", children: [
53270
53275
  /* @__PURE__ */ jsxRuntime.jsx("figure", { className: "bg-slate-200 max-w-40 print:max-w-40 flex object-contain rounded-lg items-center justify-center mx-auto", children: mspInfo.company_logo ? /* @__PURE__ */ jsxRuntime.jsx(
53271
53276
  "img",
53272
53277
  {
@@ -53282,7 +53287,7 @@ const ReportBuilder = ({
53282
53287
  ] }),
53283
53288
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
53284
53289
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-700", children: "Industry Sector:" }),
53285
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-900", children: clientData.industry || "Industry" })
53290
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-slate-900", children: formatSnakeCase(clientData.industry) || "Industry" })
53286
53291
  ] }),
53287
53292
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between", children: [
53288
53293
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-slate-700", children: "Prepared By:" }),