Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | 32x 32x 32x 32x 96x 32x | import { CIAComponentType } from "../types/cia-services";
/**
* UI-related constants for the application
*/
// Widget icons using emoji characters
export const WIDGET_ICONS = {
SECURITY_LEVEL: "đĄī¸",
SECURITY_SUMMARY: "đ",
SECURITY_VISUALIZATION: "đ",
COMPLIANCE_STATUS: "â
",
VALUE_CREATION: "đš",
COST_ESTIMATION: "đ°",
BUSINESS_IMPACT: "đĸ",
TECHNICAL_IMPLEMENTATION: "âī¸",
AVAILABILITY_IMPACT: "âąī¸",
INTEGRITY_IMPACT: "đ",
CONFIDENTIALITY_IMPACT: "đ",
SECURITY_RESOURCES: "đ",
};
/**
* Icons for business impact categories
*/
export const BUSINESS_IMPACT_ICONS = {
financial: "đ°",
operational: "âī¸",
reputational: "đĨ",
regulatory: "đ",
strategic: "đ¯",
};
/**
* Icons for CIA components
*/
export const CIA_COMPONENT_ICONS: Record<CIAComponentType, string> = {
availability: "âąī¸",
integrity: "â",
confidentiality: "đ",
};
/**
* Icons for security-related concepts
*/
export const SECURITY_ICONS = {
risk: "â ī¸",
recommendation: "đĄ",
compliance: "đ",
riskLevel: "đ",
security: "đ",
score: "đ",
details: "âšī¸",
implementation: "đ ī¸",
value: "đ",
cost: "đ˛",
time: "â°",
effort: "đ",
};
/**
* Get icon for a specific CIA component
*
* @param component - The CIA component
* @returns The appropriate icon
*/
export function getComponentIcon(component: CIAComponentType): string {
return CIA_COMPONENT_ICONS[component] || "đĩ";
}
/**
* Get icon for a business impact category
*
* @param category - The business impact category
* @returns The appropriate icon
*/
export function getBusinessImpactIcon(category: string): string {
const normalizedCategory = category.toLowerCase();
// Type assertion to access the object with string index
const icons = BUSINESS_IMPACT_ICONS as Record<string, string>;
return icons[normalizedCategory] || "đ";
}
/**
* Get icon for a security concept
*
* @param concept - The security concept
* @returns The appropriate icon
*/
export function getSecurityIcon(concept: string): string {
const normalizedConcept = concept.toLowerCase();
// Type assertion to access the object with string index
const icons = SECURITY_ICONS as Record<string, string>;
return icons[normalizedConcept] || "đˇ";
}
/**
* Color mapping for security levels
*/
export const SECURITY_LEVEL_COLORS = {
NONE: "#e74c3c", // Red
LOW: "#f39c12", // Orange
MODERATE: "#3498db", // Blue
HIGH: "#2ecc71", // Green
VERY_HIGH: "#9b59b6", // Purple
};
|