@hailbytes/security-roi-calculator 1.0.0
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/CHANGELOG.md +22 -0
- package/LICENSE +374 -0
- package/README.md +275 -0
- package/hailbytes-roi-calculator.js +999 -0
- package/index.d.ts +63 -0
- package/package.json +59 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type declarations for @hailbytes/security-roi-calculator.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export interface ROIInputs {
|
|
6
|
+
employeeCount: number;
|
|
7
|
+
avgSalary: number;
|
|
8
|
+
incidentsPerYear: number;
|
|
9
|
+
avgIncidentCost: number;
|
|
10
|
+
/** Pre-training phishing click rate, as a percent (0–100). */
|
|
11
|
+
clickRateBefore: number;
|
|
12
|
+
/** Expected reduction in click rate, as a percent (0–100). */
|
|
13
|
+
expectedReduction: number;
|
|
14
|
+
trainingHoursPerYear: number;
|
|
15
|
+
/** Platform licensing $ per year (total). */
|
|
16
|
+
platformLicensing: number;
|
|
17
|
+
implementationHours: number;
|
|
18
|
+
hourlyRate: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ROIResult {
|
|
22
|
+
inputs: ROIInputs;
|
|
23
|
+
annualRiskReduction: number;
|
|
24
|
+
totalTrainingCost: number;
|
|
25
|
+
platformLicensing: number;
|
|
26
|
+
implementationCost: number;
|
|
27
|
+
productivityCost: number;
|
|
28
|
+
netBenefit: number;
|
|
29
|
+
/** ROI as a percent (e.g. 250 means 250%). */
|
|
30
|
+
roi: number;
|
|
31
|
+
paybackMonths: number;
|
|
32
|
+
clickRateBefore: number;
|
|
33
|
+
clickRateAfter: number;
|
|
34
|
+
clickRateReduction: number;
|
|
35
|
+
preventedIncidents: number;
|
|
36
|
+
isPositiveROI: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Pure ROI calculation — no DOM required.
|
|
41
|
+
*/
|
|
42
|
+
export function calculateROI(inputs: ROIInputs): ROIResult;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The custom-element class. Importing this module also registers
|
|
46
|
+
* the `<hailbytes-roi-calculator>` tag via `customElements.define`.
|
|
47
|
+
*
|
|
48
|
+
* Supported attributes:
|
|
49
|
+
* - `theme="dark"|"light"` (default: `"dark"`)
|
|
50
|
+
* - `branding="off"` hides the "by HailBytes" header line and CTA
|
|
51
|
+
*/
|
|
52
|
+
export default class HailbytesROICalculator extends HTMLElement {
|
|
53
|
+
static readonly observedAttributes: readonly string[];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare global {
|
|
57
|
+
interface HTMLElementTagNameMap {
|
|
58
|
+
'hailbytes-roi-calculator': HailbytesROICalculator;
|
|
59
|
+
}
|
|
60
|
+
interface HTMLElementEventMap {
|
|
61
|
+
'roi-calculated': CustomEvent<ROIResult>;
|
|
62
|
+
}
|
|
63
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hailbytes/security-roi-calculator",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Zero-dependency web component for calculating security awareness training ROI. Works in Hugo, React, Vue, or plain HTML.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./hailbytes-roi-calculator.js",
|
|
7
|
+
"module": "./hailbytes-roi-calculator.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./index.d.ts",
|
|
11
|
+
"import": "./hailbytes-roi-calculator.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"types": "./index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"hailbytes-roi-calculator.js",
|
|
18
|
+
"index.d.ts",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"./hailbytes-roi-calculator.js"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"test": "node --test test/smoke.test.mjs"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"roi",
|
|
31
|
+
"roi-calculator",
|
|
32
|
+
"security-awareness",
|
|
33
|
+
"security-training",
|
|
34
|
+
"cybersecurity",
|
|
35
|
+
"web-component",
|
|
36
|
+
"custom-element",
|
|
37
|
+
"es-module",
|
|
38
|
+
"zero-dependency",
|
|
39
|
+
"hailbytes",
|
|
40
|
+
"vanilla-js"
|
|
41
|
+
],
|
|
42
|
+
"author": "HailBytes, LLC (https://hailbytes.com)",
|
|
43
|
+
"license": "MPL-2.0",
|
|
44
|
+
"repository": {
|
|
45
|
+
"type": "git",
|
|
46
|
+
"url": "git+https://github.com/HailBytes/security-roi-calculator.git"
|
|
47
|
+
},
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/HailBytes/security-roi-calculator/issues"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://hailbytes.com",
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18"
|
|
54
|
+
},
|
|
55
|
+
"publishConfig": {
|
|
56
|
+
"access": "public",
|
|
57
|
+
"provenance": true
|
|
58
|
+
}
|
|
59
|
+
}
|