@threatcaptain/tc-reports 0.2.6 → 0.2.7
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 +16 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28751,16 +28751,16 @@ const Dashboard = () => {
|
|
|
28751
28751
|
};
|
|
28752
28752
|
const BreachLikelihood = ({ reportData }) => {
|
|
28753
28753
|
var _a;
|
|
28754
|
-
const { clientData,
|
|
28754
|
+
const { clientData, securityAssessment, user } = reportData;
|
|
28755
28755
|
const calculateBreachLikelihood = (protectionLevel) => {
|
|
28756
|
-
if ((
|
|
28757
|
-
return Math.round(
|
|
28756
|
+
if ((securityAssessment == null ? void 0 : securityAssessment.overall_breach_likelihood) !== null && (securityAssessment == null ? void 0 : securityAssessment.overall_breach_likelihood) !== void 0) {
|
|
28757
|
+
return Math.round(securityAssessment.overall_breach_likelihood);
|
|
28758
28758
|
}
|
|
28759
28759
|
return Math.max(5, 100 - protectionLevel);
|
|
28760
28760
|
};
|
|
28761
28761
|
const calculateProtectionLevel = () => {
|
|
28762
|
-
if (
|
|
28763
|
-
const findings =
|
|
28762
|
+
if (securityAssessment == null ? void 0 : securityAssessment.findings) {
|
|
28763
|
+
const findings = securityAssessment.findings;
|
|
28764
28764
|
const totalControls = 18;
|
|
28765
28765
|
let implementedControls = 0;
|
|
28766
28766
|
for (let i = 1; i <= totalControls; i++) {
|
|
@@ -28959,7 +28959,7 @@ const BreachLikelihood = ({ reportData }) => {
|
|
|
28959
28959
|
] }),
|
|
28960
28960
|
(() => {
|
|
28961
28961
|
var _a2;
|
|
28962
|
-
const controlMappings = ((_a2 = clientData.
|
|
28962
|
+
const controlMappings = ((_a2 = clientData.securityAssessment) == null ? void 0 : _a2.control_mappings) || [];
|
|
28963
28963
|
const implementedControls = Array.isArray(controlMappings) ? controlMappings.filter((c2) => c2.implemented === true) : [];
|
|
28964
28964
|
const potentialControls = Array.isArray(controlMappings) ? controlMappings.filter((c2) => c2.implemented !== true) : [];
|
|
28965
28965
|
const renderControlRow = (control) => {
|
|
@@ -29146,7 +29146,7 @@ const BreachLikelihood = ({ reportData }) => {
|
|
|
29146
29146
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold text-slate-900 mb-4", children: "Control Implementation Impact" }),
|
|
29147
29147
|
(() => {
|
|
29148
29148
|
var _a2;
|
|
29149
|
-
const controlMappings = ((_a2 = clientData.
|
|
29149
|
+
const controlMappings = ((_a2 = clientData.securityAssessment) == null ? void 0 : _a2.control_mappings) || [];
|
|
29150
29150
|
const implementedControls = Array.isArray(controlMappings) ? controlMappings.filter(
|
|
29151
29151
|
(control) => control.implemented === true
|
|
29152
29152
|
) : [];
|
|
@@ -30732,7 +30732,6 @@ const ReportBuilder = ({
|
|
|
30732
30732
|
mspCompanyName,
|
|
30733
30733
|
user
|
|
30734
30734
|
}) => {
|
|
30735
|
-
var _a;
|
|
30736
30735
|
const [searchParams] = reactRouterDom.useSearchParams();
|
|
30737
30736
|
const reportTemplate = searchParams.get("template");
|
|
30738
30737
|
const templateArray = (reportTemplate == null ? void 0 : reportTemplate.split(",").map((item) => item.trim())) || [];
|
|
@@ -30741,8 +30740,9 @@ const ReportBuilder = ({
|
|
|
30741
30740
|
const showInsuranceHealthScore = templateArray.includes(
|
|
30742
30741
|
"insurance-health-score"
|
|
30743
30742
|
);
|
|
30744
|
-
const
|
|
30745
|
-
const
|
|
30743
|
+
const securityAssessment = assessmentData.securityAssessments;
|
|
30744
|
+
const insuranceHealthData = assessmentData.insuranceAssessment;
|
|
30745
|
+
const financialSimulationData = simulationData;
|
|
30746
30746
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30747
30747
|
!clientData.id && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-4xl mx-auto bg-white p-8 flex items-center justify-center min-h-[600px]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-4", children: [
|
|
30748
30748
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 bg-slate-100 rounded-full flex items-center justify-center mx-auto", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FileText, { className: "w-8 h-8 text-slate-400" }) }),
|
|
@@ -30803,7 +30803,12 @@ const ReportBuilder = ({
|
|
|
30803
30803
|
}
|
|
30804
30804
|
}
|
|
30805
30805
|
),
|
|
30806
|
-
showBreachLikelihood && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30806
|
+
showBreachLikelihood && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30807
|
+
BreachLikelihood,
|
|
30808
|
+
{
|
|
30809
|
+
reportData: { clientData, securityAssessment, user }
|
|
30810
|
+
}
|
|
30811
|
+
),
|
|
30807
30812
|
showInsuranceHealthScore && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30808
30813
|
InsuranceHealthScore,
|
|
30809
30814
|
{
|