@kopexa/grc 0.0.2
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/LICENSE +201 -0
- package/dist/asset/index.d.mts +2 -0
- package/dist/asset/index.d.ts +2 -0
- package/dist/asset/index.js +19 -0
- package/dist/asset/index.mjs +1 -0
- package/dist/chunk-7754RETD.mjs +57 -0
- package/dist/chunk-B47KDUYY.mjs +26 -0
- package/dist/chunk-BFZPRJQT.mjs +1 -0
- package/dist/chunk-GF3WJZVI.mjs +141 -0
- package/dist/chunk-GFABGXAO.mjs +1 -0
- package/dist/chunk-KNGEZZFI.mjs +157 -0
- package/dist/chunk-TICWEZUI.mjs +1 -0
- package/dist/chunk-TW3S4OE2.mjs +251 -0
- package/dist/common/compliance/compliance-badge.d.mts +33 -0
- package/dist/common/compliance/compliance-badge.d.ts +33 -0
- package/dist/common/compliance/compliance-badge.js +103 -0
- package/dist/common/compliance/compliance-badge.mjs +13 -0
- package/dist/common/compliance/index.d.mts +2 -0
- package/dist/common/compliance/index.d.ts +2 -0
- package/dist/common/compliance/index.js +104 -0
- package/dist/common/compliance/index.mjs +13 -0
- package/dist/common/compliance/messages.d.mts +20 -0
- package/dist/common/compliance/messages.d.ts +20 -0
- package/dist/common/compliance/messages.js +49 -0
- package/dist/common/compliance/messages.mjs +7 -0
- package/dist/common/impact/impact-card.d.mts +35 -0
- package/dist/common/impact/impact-card.d.ts +35 -0
- package/dist/common/impact/impact-card.js +551 -0
- package/dist/common/impact/impact-card.mjs +10 -0
- package/dist/common/impact/index.d.mts +5 -0
- package/dist/common/impact/index.d.ts +5 -0
- package/dist/common/impact/index.js +564 -0
- package/dist/common/impact/index.mjs +24 -0
- package/dist/common/impact/messages.d.mts +128 -0
- package/dist/common/impact/messages.d.ts +128 -0
- package/dist/common/impact/messages.js +164 -0
- package/dist/common/impact/messages.mjs +7 -0
- package/dist/common/impact/scales.d.mts +46 -0
- package/dist/common/impact/scales.d.ts +46 -0
- package/dist/common/impact/scales.js +319 -0
- package/dist/common/impact/scales.mjs +16 -0
- package/dist/common/index.d.mts +6 -0
- package/dist/common/index.d.ts +6 -0
- package/dist/common/index.js +640 -0
- package/dist/common/index.mjs +35 -0
- package/dist/control/index.d.mts +2 -0
- package/dist/control/index.d.ts +2 -0
- package/dist/control/index.js +19 -0
- package/dist/control/index.mjs +1 -0
- package/dist/incident/index.d.mts +2 -0
- package/dist/incident/index.d.ts +2 -0
- package/dist/incident/index.js +19 -0
- package/dist/incident/index.mjs +1 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +640 -0
- package/dist/index.mjs +35 -0
- package/dist/risk/index.d.mts +2 -0
- package/dist/risk/index.d.ts +2 -0
- package/dist/risk/index.js +19 -0
- package/dist/risk/index.mjs +1 -0
- package/dist/vendor/index.d.mts +2 -0
- package/dist/vendor/index.d.ts +2 -0
- package/dist/vendor/index.js +19 -0
- package/dist/vendor/index.mjs +1 -0
- package/package.json +66 -0
- package/src/asset/index.ts +4 -0
- package/src/common/compliance/compliance-badge.tsx +110 -0
- package/src/common/compliance/index.ts +8 -0
- package/src/common/compliance/messages.ts +20 -0
- package/src/common/impact/impact-card.tsx +367 -0
- package/src/common/impact/index.ts +14 -0
- package/src/common/impact/messages.ts +141 -0
- package/src/common/impact/scales.ts +191 -0
- package/src/common/index.ts +4 -0
- package/src/control/index.ts +4 -0
- package/src/incident/index.ts +4 -0
- package/src/index.ts +20 -0
- package/src/risk/index.ts +4 -0
- package/src/vendor/index.ts +4 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
title_cia: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
};
|
|
6
|
+
title_ciaa: {
|
|
7
|
+
id: string;
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
};
|
|
10
|
+
confidentiality: {
|
|
11
|
+
id: string;
|
|
12
|
+
defaultMessage: string;
|
|
13
|
+
};
|
|
14
|
+
integrity: {
|
|
15
|
+
id: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
};
|
|
18
|
+
availability: {
|
|
19
|
+
id: string;
|
|
20
|
+
defaultMessage: string;
|
|
21
|
+
};
|
|
22
|
+
authenticity: {
|
|
23
|
+
id: string;
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
};
|
|
26
|
+
justification: {
|
|
27
|
+
id: string;
|
|
28
|
+
defaultMessage: string;
|
|
29
|
+
};
|
|
30
|
+
justification_hint: {
|
|
31
|
+
id: string;
|
|
32
|
+
defaultMessage: string;
|
|
33
|
+
};
|
|
34
|
+
justification_placeholder: {
|
|
35
|
+
id: string;
|
|
36
|
+
defaultMessage: string;
|
|
37
|
+
};
|
|
38
|
+
no_justification: {
|
|
39
|
+
id: string;
|
|
40
|
+
defaultMessage: string;
|
|
41
|
+
};
|
|
42
|
+
edit: {
|
|
43
|
+
id: string;
|
|
44
|
+
defaultMessage: string;
|
|
45
|
+
};
|
|
46
|
+
cancel: {
|
|
47
|
+
id: string;
|
|
48
|
+
defaultMessage: string;
|
|
49
|
+
};
|
|
50
|
+
save: {
|
|
51
|
+
id: string;
|
|
52
|
+
defaultMessage: string;
|
|
53
|
+
};
|
|
54
|
+
risk_0: {
|
|
55
|
+
id: string;
|
|
56
|
+
defaultMessage: string;
|
|
57
|
+
};
|
|
58
|
+
risk_1: {
|
|
59
|
+
id: string;
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
};
|
|
62
|
+
risk_2: {
|
|
63
|
+
id: string;
|
|
64
|
+
defaultMessage: string;
|
|
65
|
+
};
|
|
66
|
+
risk_3: {
|
|
67
|
+
id: string;
|
|
68
|
+
defaultMessage: string;
|
|
69
|
+
};
|
|
70
|
+
risk_4: {
|
|
71
|
+
id: string;
|
|
72
|
+
defaultMessage: string;
|
|
73
|
+
};
|
|
74
|
+
risk_5: {
|
|
75
|
+
id: string;
|
|
76
|
+
defaultMessage: string;
|
|
77
|
+
};
|
|
78
|
+
process_0: {
|
|
79
|
+
id: string;
|
|
80
|
+
defaultMessage: string;
|
|
81
|
+
};
|
|
82
|
+
process_1: {
|
|
83
|
+
id: string;
|
|
84
|
+
defaultMessage: string;
|
|
85
|
+
};
|
|
86
|
+
process_2: {
|
|
87
|
+
id: string;
|
|
88
|
+
defaultMessage: string;
|
|
89
|
+
};
|
|
90
|
+
process_3: {
|
|
91
|
+
id: string;
|
|
92
|
+
defaultMessage: string;
|
|
93
|
+
};
|
|
94
|
+
process_4: {
|
|
95
|
+
id: string;
|
|
96
|
+
defaultMessage: string;
|
|
97
|
+
};
|
|
98
|
+
process_5: {
|
|
99
|
+
id: string;
|
|
100
|
+
defaultMessage: string;
|
|
101
|
+
};
|
|
102
|
+
asset_0: {
|
|
103
|
+
id: string;
|
|
104
|
+
defaultMessage: string;
|
|
105
|
+
};
|
|
106
|
+
asset_1: {
|
|
107
|
+
id: string;
|
|
108
|
+
defaultMessage: string;
|
|
109
|
+
};
|
|
110
|
+
asset_2: {
|
|
111
|
+
id: string;
|
|
112
|
+
defaultMessage: string;
|
|
113
|
+
};
|
|
114
|
+
asset_3: {
|
|
115
|
+
id: string;
|
|
116
|
+
defaultMessage: string;
|
|
117
|
+
};
|
|
118
|
+
asset_4: {
|
|
119
|
+
id: string;
|
|
120
|
+
defaultMessage: string;
|
|
121
|
+
};
|
|
122
|
+
asset_5: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export { messages };
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/common/impact/messages.ts
|
|
22
|
+
var messages_exports = {};
|
|
23
|
+
__export(messages_exports, {
|
|
24
|
+
messages: () => messages
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(messages_exports);
|
|
27
|
+
var import_i18n = require("@kopexa/i18n");
|
|
28
|
+
var messages = (0, import_i18n.defineMessages)({
|
|
29
|
+
// Card titles
|
|
30
|
+
title_cia: {
|
|
31
|
+
id: "grc.impact.title_cia",
|
|
32
|
+
defaultMessage: "CIA Impact"
|
|
33
|
+
},
|
|
34
|
+
title_ciaa: {
|
|
35
|
+
id: "grc.impact.title_ciaa",
|
|
36
|
+
defaultMessage: "CIAA Impact"
|
|
37
|
+
},
|
|
38
|
+
// Dimensions
|
|
39
|
+
confidentiality: {
|
|
40
|
+
id: "grc.impact.confidentiality",
|
|
41
|
+
defaultMessage: "Confidentiality"
|
|
42
|
+
},
|
|
43
|
+
integrity: {
|
|
44
|
+
id: "grc.impact.integrity",
|
|
45
|
+
defaultMessage: "Integrity"
|
|
46
|
+
},
|
|
47
|
+
availability: {
|
|
48
|
+
id: "grc.impact.availability",
|
|
49
|
+
defaultMessage: "Availability"
|
|
50
|
+
},
|
|
51
|
+
authenticity: {
|
|
52
|
+
id: "grc.impact.authenticity",
|
|
53
|
+
defaultMessage: "Authenticity"
|
|
54
|
+
},
|
|
55
|
+
// Justification
|
|
56
|
+
justification: {
|
|
57
|
+
id: "grc.impact.justification",
|
|
58
|
+
defaultMessage: "Justification"
|
|
59
|
+
},
|
|
60
|
+
justification_hint: {
|
|
61
|
+
id: "grc.impact.justification_hint",
|
|
62
|
+
defaultMessage: "(highest impact: {level})"
|
|
63
|
+
},
|
|
64
|
+
justification_placeholder: {
|
|
65
|
+
id: "grc.impact.justification_placeholder",
|
|
66
|
+
defaultMessage: "Enter justification for the chosen impact values..."
|
|
67
|
+
},
|
|
68
|
+
no_justification: {
|
|
69
|
+
id: "grc.impact.no_justification",
|
|
70
|
+
defaultMessage: "No justification provided"
|
|
71
|
+
},
|
|
72
|
+
// Actions
|
|
73
|
+
edit: {
|
|
74
|
+
id: "grc.impact.edit",
|
|
75
|
+
defaultMessage: "Edit"
|
|
76
|
+
},
|
|
77
|
+
cancel: {
|
|
78
|
+
id: "grc.impact.cancel",
|
|
79
|
+
defaultMessage: "Cancel"
|
|
80
|
+
},
|
|
81
|
+
save: {
|
|
82
|
+
id: "grc.impact.save",
|
|
83
|
+
defaultMessage: "Save"
|
|
84
|
+
},
|
|
85
|
+
// Risk Scale (default)
|
|
86
|
+
risk_0: {
|
|
87
|
+
id: "grc.impact.scale.risk.0",
|
|
88
|
+
defaultMessage: "Not rated"
|
|
89
|
+
},
|
|
90
|
+
risk_1: {
|
|
91
|
+
id: "grc.impact.scale.risk.1",
|
|
92
|
+
defaultMessage: "Negligible"
|
|
93
|
+
},
|
|
94
|
+
risk_2: {
|
|
95
|
+
id: "grc.impact.scale.risk.2",
|
|
96
|
+
defaultMessage: "Low"
|
|
97
|
+
},
|
|
98
|
+
risk_3: {
|
|
99
|
+
id: "grc.impact.scale.risk.3",
|
|
100
|
+
defaultMessage: "Medium"
|
|
101
|
+
},
|
|
102
|
+
risk_4: {
|
|
103
|
+
id: "grc.impact.scale.risk.4",
|
|
104
|
+
defaultMessage: "High"
|
|
105
|
+
},
|
|
106
|
+
risk_5: {
|
|
107
|
+
id: "grc.impact.scale.risk.5",
|
|
108
|
+
defaultMessage: "Critical"
|
|
109
|
+
},
|
|
110
|
+
// Process Scale
|
|
111
|
+
process_0: {
|
|
112
|
+
id: "grc.impact.scale.process.0",
|
|
113
|
+
defaultMessage: "Not rated"
|
|
114
|
+
},
|
|
115
|
+
process_1: {
|
|
116
|
+
id: "grc.impact.scale.process.1",
|
|
117
|
+
defaultMessage: "Insignificant"
|
|
118
|
+
},
|
|
119
|
+
process_2: {
|
|
120
|
+
id: "grc.impact.scale.process.2",
|
|
121
|
+
defaultMessage: "Low"
|
|
122
|
+
},
|
|
123
|
+
process_3: {
|
|
124
|
+
id: "grc.impact.scale.process.3",
|
|
125
|
+
defaultMessage: "Relevant"
|
|
126
|
+
},
|
|
127
|
+
process_4: {
|
|
128
|
+
id: "grc.impact.scale.process.4",
|
|
129
|
+
defaultMessage: "Important"
|
|
130
|
+
},
|
|
131
|
+
process_5: {
|
|
132
|
+
id: "grc.impact.scale.process.5",
|
|
133
|
+
defaultMessage: "Vital"
|
|
134
|
+
},
|
|
135
|
+
// Asset Scale
|
|
136
|
+
asset_0: {
|
|
137
|
+
id: "grc.impact.scale.asset.0",
|
|
138
|
+
defaultMessage: "Not classified"
|
|
139
|
+
},
|
|
140
|
+
asset_1: {
|
|
141
|
+
id: "grc.impact.scale.asset.1",
|
|
142
|
+
defaultMessage: "Insignificant"
|
|
143
|
+
},
|
|
144
|
+
asset_2: {
|
|
145
|
+
id: "grc.impact.scale.asset.2",
|
|
146
|
+
defaultMessage: "Low"
|
|
147
|
+
},
|
|
148
|
+
asset_3: {
|
|
149
|
+
id: "grc.impact.scale.asset.3",
|
|
150
|
+
defaultMessage: "Medium"
|
|
151
|
+
},
|
|
152
|
+
asset_4: {
|
|
153
|
+
id: "grc.impact.scale.asset.4",
|
|
154
|
+
defaultMessage: "High"
|
|
155
|
+
},
|
|
156
|
+
asset_5: {
|
|
157
|
+
id: "grc.impact.scale.asset.5",
|
|
158
|
+
defaultMessage: "Business Critical"
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
162
|
+
0 && (module.exports = {
|
|
163
|
+
messages
|
|
164
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MessageDescriptor } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Impact Level Scale Configuration
|
|
5
|
+
*
|
|
6
|
+
* Different contexts (Risk vs Process vs Asset) use different terminology:
|
|
7
|
+
* - Risk: Negligible → Critical
|
|
8
|
+
* - Process: Insignificant → Vital
|
|
9
|
+
* - Asset: Insignificant → Business Critical
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Impact level 0-5 as per schema */
|
|
13
|
+
type ImpactLevel = 0 | 1 | 2 | 3 | 4 | 5;
|
|
14
|
+
interface ImpactLevelConfig {
|
|
15
|
+
/** i18n message descriptor for the label */
|
|
16
|
+
message: MessageDescriptor;
|
|
17
|
+
/** Fallback label (used when no IntlProvider) */
|
|
18
|
+
fallbackLabel: string;
|
|
19
|
+
color: string;
|
|
20
|
+
bgColor: string;
|
|
21
|
+
barColor: string;
|
|
22
|
+
}
|
|
23
|
+
type ImpactScaleConfig = Record<ImpactLevel, ImpactLevelConfig>;
|
|
24
|
+
/**
|
|
25
|
+
* Risk Scale (default) - Used for Risk assessments
|
|
26
|
+
* Not rated → Negligible → Low → Medium → High → Critical
|
|
27
|
+
*/
|
|
28
|
+
declare const riskScale: ImpactScaleConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Process Scale - Used for Business Process classifications
|
|
31
|
+
* Not rated → Insignificant → Low → Relevant → Important → Vital
|
|
32
|
+
*/
|
|
33
|
+
declare const processScale: ImpactScaleConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Asset Scale - Used for Asset criticality
|
|
36
|
+
* Not classified → Insignificant → Low → Medium → High → Business Critical
|
|
37
|
+
*/
|
|
38
|
+
declare const assetScale: ImpactScaleConfig;
|
|
39
|
+
/** Available impact levels for iteration */
|
|
40
|
+
declare const impactLevels: ImpactLevel[];
|
|
41
|
+
/** Preset scale types */
|
|
42
|
+
type ImpactScalePreset = "risk" | "process" | "asset";
|
|
43
|
+
/** Get scale by preset name */
|
|
44
|
+
declare function getScale(preset: ImpactScalePreset): ImpactScaleConfig;
|
|
45
|
+
|
|
46
|
+
export { type ImpactLevel, type ImpactLevelConfig, type ImpactScaleConfig, type ImpactScalePreset, assetScale, getScale, impactLevels, processScale, riskScale };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { MessageDescriptor } from 'react-intl';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Impact Level Scale Configuration
|
|
5
|
+
*
|
|
6
|
+
* Different contexts (Risk vs Process vs Asset) use different terminology:
|
|
7
|
+
* - Risk: Negligible → Critical
|
|
8
|
+
* - Process: Insignificant → Vital
|
|
9
|
+
* - Asset: Insignificant → Business Critical
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Impact level 0-5 as per schema */
|
|
13
|
+
type ImpactLevel = 0 | 1 | 2 | 3 | 4 | 5;
|
|
14
|
+
interface ImpactLevelConfig {
|
|
15
|
+
/** i18n message descriptor for the label */
|
|
16
|
+
message: MessageDescriptor;
|
|
17
|
+
/** Fallback label (used when no IntlProvider) */
|
|
18
|
+
fallbackLabel: string;
|
|
19
|
+
color: string;
|
|
20
|
+
bgColor: string;
|
|
21
|
+
barColor: string;
|
|
22
|
+
}
|
|
23
|
+
type ImpactScaleConfig = Record<ImpactLevel, ImpactLevelConfig>;
|
|
24
|
+
/**
|
|
25
|
+
* Risk Scale (default) - Used for Risk assessments
|
|
26
|
+
* Not rated → Negligible → Low → Medium → High → Critical
|
|
27
|
+
*/
|
|
28
|
+
declare const riskScale: ImpactScaleConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Process Scale - Used for Business Process classifications
|
|
31
|
+
* Not rated → Insignificant → Low → Relevant → Important → Vital
|
|
32
|
+
*/
|
|
33
|
+
declare const processScale: ImpactScaleConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Asset Scale - Used for Asset criticality
|
|
36
|
+
* Not classified → Insignificant → Low → Medium → High → Business Critical
|
|
37
|
+
*/
|
|
38
|
+
declare const assetScale: ImpactScaleConfig;
|
|
39
|
+
/** Available impact levels for iteration */
|
|
40
|
+
declare const impactLevels: ImpactLevel[];
|
|
41
|
+
/** Preset scale types */
|
|
42
|
+
type ImpactScalePreset = "risk" | "process" | "asset";
|
|
43
|
+
/** Get scale by preset name */
|
|
44
|
+
declare function getScale(preset: ImpactScalePreset): ImpactScaleConfig;
|
|
45
|
+
|
|
46
|
+
export { type ImpactLevel, type ImpactLevelConfig, type ImpactScaleConfig, type ImpactScalePreset, assetScale, getScale, impactLevels, processScale, riskScale };
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/common/impact/scales.ts
|
|
22
|
+
var scales_exports = {};
|
|
23
|
+
__export(scales_exports, {
|
|
24
|
+
assetScale: () => assetScale,
|
|
25
|
+
getScale: () => getScale,
|
|
26
|
+
impactLevels: () => impactLevels,
|
|
27
|
+
processScale: () => processScale,
|
|
28
|
+
riskScale: () => riskScale
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(scales_exports);
|
|
31
|
+
|
|
32
|
+
// src/common/impact/messages.ts
|
|
33
|
+
var import_i18n = require("@kopexa/i18n");
|
|
34
|
+
var messages = (0, import_i18n.defineMessages)({
|
|
35
|
+
// Card titles
|
|
36
|
+
title_cia: {
|
|
37
|
+
id: "grc.impact.title_cia",
|
|
38
|
+
defaultMessage: "CIA Impact"
|
|
39
|
+
},
|
|
40
|
+
title_ciaa: {
|
|
41
|
+
id: "grc.impact.title_ciaa",
|
|
42
|
+
defaultMessage: "CIAA Impact"
|
|
43
|
+
},
|
|
44
|
+
// Dimensions
|
|
45
|
+
confidentiality: {
|
|
46
|
+
id: "grc.impact.confidentiality",
|
|
47
|
+
defaultMessage: "Confidentiality"
|
|
48
|
+
},
|
|
49
|
+
integrity: {
|
|
50
|
+
id: "grc.impact.integrity",
|
|
51
|
+
defaultMessage: "Integrity"
|
|
52
|
+
},
|
|
53
|
+
availability: {
|
|
54
|
+
id: "grc.impact.availability",
|
|
55
|
+
defaultMessage: "Availability"
|
|
56
|
+
},
|
|
57
|
+
authenticity: {
|
|
58
|
+
id: "grc.impact.authenticity",
|
|
59
|
+
defaultMessage: "Authenticity"
|
|
60
|
+
},
|
|
61
|
+
// Justification
|
|
62
|
+
justification: {
|
|
63
|
+
id: "grc.impact.justification",
|
|
64
|
+
defaultMessage: "Justification"
|
|
65
|
+
},
|
|
66
|
+
justification_hint: {
|
|
67
|
+
id: "grc.impact.justification_hint",
|
|
68
|
+
defaultMessage: "(highest impact: {level})"
|
|
69
|
+
},
|
|
70
|
+
justification_placeholder: {
|
|
71
|
+
id: "grc.impact.justification_placeholder",
|
|
72
|
+
defaultMessage: "Enter justification for the chosen impact values..."
|
|
73
|
+
},
|
|
74
|
+
no_justification: {
|
|
75
|
+
id: "grc.impact.no_justification",
|
|
76
|
+
defaultMessage: "No justification provided"
|
|
77
|
+
},
|
|
78
|
+
// Actions
|
|
79
|
+
edit: {
|
|
80
|
+
id: "grc.impact.edit",
|
|
81
|
+
defaultMessage: "Edit"
|
|
82
|
+
},
|
|
83
|
+
cancel: {
|
|
84
|
+
id: "grc.impact.cancel",
|
|
85
|
+
defaultMessage: "Cancel"
|
|
86
|
+
},
|
|
87
|
+
save: {
|
|
88
|
+
id: "grc.impact.save",
|
|
89
|
+
defaultMessage: "Save"
|
|
90
|
+
},
|
|
91
|
+
// Risk Scale (default)
|
|
92
|
+
risk_0: {
|
|
93
|
+
id: "grc.impact.scale.risk.0",
|
|
94
|
+
defaultMessage: "Not rated"
|
|
95
|
+
},
|
|
96
|
+
risk_1: {
|
|
97
|
+
id: "grc.impact.scale.risk.1",
|
|
98
|
+
defaultMessage: "Negligible"
|
|
99
|
+
},
|
|
100
|
+
risk_2: {
|
|
101
|
+
id: "grc.impact.scale.risk.2",
|
|
102
|
+
defaultMessage: "Low"
|
|
103
|
+
},
|
|
104
|
+
risk_3: {
|
|
105
|
+
id: "grc.impact.scale.risk.3",
|
|
106
|
+
defaultMessage: "Medium"
|
|
107
|
+
},
|
|
108
|
+
risk_4: {
|
|
109
|
+
id: "grc.impact.scale.risk.4",
|
|
110
|
+
defaultMessage: "High"
|
|
111
|
+
},
|
|
112
|
+
risk_5: {
|
|
113
|
+
id: "grc.impact.scale.risk.5",
|
|
114
|
+
defaultMessage: "Critical"
|
|
115
|
+
},
|
|
116
|
+
// Process Scale
|
|
117
|
+
process_0: {
|
|
118
|
+
id: "grc.impact.scale.process.0",
|
|
119
|
+
defaultMessage: "Not rated"
|
|
120
|
+
},
|
|
121
|
+
process_1: {
|
|
122
|
+
id: "grc.impact.scale.process.1",
|
|
123
|
+
defaultMessage: "Insignificant"
|
|
124
|
+
},
|
|
125
|
+
process_2: {
|
|
126
|
+
id: "grc.impact.scale.process.2",
|
|
127
|
+
defaultMessage: "Low"
|
|
128
|
+
},
|
|
129
|
+
process_3: {
|
|
130
|
+
id: "grc.impact.scale.process.3",
|
|
131
|
+
defaultMessage: "Relevant"
|
|
132
|
+
},
|
|
133
|
+
process_4: {
|
|
134
|
+
id: "grc.impact.scale.process.4",
|
|
135
|
+
defaultMessage: "Important"
|
|
136
|
+
},
|
|
137
|
+
process_5: {
|
|
138
|
+
id: "grc.impact.scale.process.5",
|
|
139
|
+
defaultMessage: "Vital"
|
|
140
|
+
},
|
|
141
|
+
// Asset Scale
|
|
142
|
+
asset_0: {
|
|
143
|
+
id: "grc.impact.scale.asset.0",
|
|
144
|
+
defaultMessage: "Not classified"
|
|
145
|
+
},
|
|
146
|
+
asset_1: {
|
|
147
|
+
id: "grc.impact.scale.asset.1",
|
|
148
|
+
defaultMessage: "Insignificant"
|
|
149
|
+
},
|
|
150
|
+
asset_2: {
|
|
151
|
+
id: "grc.impact.scale.asset.2",
|
|
152
|
+
defaultMessage: "Low"
|
|
153
|
+
},
|
|
154
|
+
asset_3: {
|
|
155
|
+
id: "grc.impact.scale.asset.3",
|
|
156
|
+
defaultMessage: "Medium"
|
|
157
|
+
},
|
|
158
|
+
asset_4: {
|
|
159
|
+
id: "grc.impact.scale.asset.4",
|
|
160
|
+
defaultMessage: "High"
|
|
161
|
+
},
|
|
162
|
+
asset_5: {
|
|
163
|
+
id: "grc.impact.scale.asset.5",
|
|
164
|
+
defaultMessage: "Business Critical"
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
// src/common/impact/scales.ts
|
|
169
|
+
var riskScale = {
|
|
170
|
+
0: {
|
|
171
|
+
message: messages.risk_0,
|
|
172
|
+
fallbackLabel: "Not rated",
|
|
173
|
+
color: "text-muted-foreground",
|
|
174
|
+
bgColor: "bg-muted",
|
|
175
|
+
barColor: "bg-muted"
|
|
176
|
+
},
|
|
177
|
+
1: {
|
|
178
|
+
message: messages.risk_1,
|
|
179
|
+
fallbackLabel: "Negligible",
|
|
180
|
+
color: "text-green-700",
|
|
181
|
+
bgColor: "bg-green-100",
|
|
182
|
+
barColor: "bg-green-500"
|
|
183
|
+
},
|
|
184
|
+
2: {
|
|
185
|
+
message: messages.risk_2,
|
|
186
|
+
fallbackLabel: "Low",
|
|
187
|
+
color: "text-lime-700",
|
|
188
|
+
bgColor: "bg-lime-100",
|
|
189
|
+
barColor: "bg-lime-500"
|
|
190
|
+
},
|
|
191
|
+
3: {
|
|
192
|
+
message: messages.risk_3,
|
|
193
|
+
fallbackLabel: "Medium",
|
|
194
|
+
color: "text-yellow-700",
|
|
195
|
+
bgColor: "bg-yellow-100",
|
|
196
|
+
barColor: "bg-yellow-500"
|
|
197
|
+
},
|
|
198
|
+
4: {
|
|
199
|
+
message: messages.risk_4,
|
|
200
|
+
fallbackLabel: "High",
|
|
201
|
+
color: "text-orange-700",
|
|
202
|
+
bgColor: "bg-orange-100",
|
|
203
|
+
barColor: "bg-orange-500"
|
|
204
|
+
},
|
|
205
|
+
5: {
|
|
206
|
+
message: messages.risk_5,
|
|
207
|
+
fallbackLabel: "Critical",
|
|
208
|
+
color: "text-red-700",
|
|
209
|
+
bgColor: "bg-red-100",
|
|
210
|
+
barColor: "bg-red-500"
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
var processScale = {
|
|
214
|
+
0: {
|
|
215
|
+
message: messages.process_0,
|
|
216
|
+
fallbackLabel: "Not rated",
|
|
217
|
+
color: "text-muted-foreground",
|
|
218
|
+
bgColor: "bg-muted",
|
|
219
|
+
barColor: "bg-muted"
|
|
220
|
+
},
|
|
221
|
+
1: {
|
|
222
|
+
message: messages.process_1,
|
|
223
|
+
fallbackLabel: "Insignificant",
|
|
224
|
+
color: "text-green-700",
|
|
225
|
+
bgColor: "bg-green-100",
|
|
226
|
+
barColor: "bg-green-500"
|
|
227
|
+
},
|
|
228
|
+
2: {
|
|
229
|
+
message: messages.process_2,
|
|
230
|
+
fallbackLabel: "Low",
|
|
231
|
+
color: "text-lime-700",
|
|
232
|
+
bgColor: "bg-lime-100",
|
|
233
|
+
barColor: "bg-lime-500"
|
|
234
|
+
},
|
|
235
|
+
3: {
|
|
236
|
+
message: messages.process_3,
|
|
237
|
+
fallbackLabel: "Relevant",
|
|
238
|
+
color: "text-yellow-700",
|
|
239
|
+
bgColor: "bg-yellow-100",
|
|
240
|
+
barColor: "bg-yellow-500"
|
|
241
|
+
},
|
|
242
|
+
4: {
|
|
243
|
+
message: messages.process_4,
|
|
244
|
+
fallbackLabel: "Important",
|
|
245
|
+
color: "text-orange-700",
|
|
246
|
+
bgColor: "bg-orange-100",
|
|
247
|
+
barColor: "bg-orange-500"
|
|
248
|
+
},
|
|
249
|
+
5: {
|
|
250
|
+
message: messages.process_5,
|
|
251
|
+
fallbackLabel: "Vital",
|
|
252
|
+
color: "text-red-700",
|
|
253
|
+
bgColor: "bg-red-100",
|
|
254
|
+
barColor: "bg-red-500"
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
var assetScale = {
|
|
258
|
+
0: {
|
|
259
|
+
message: messages.asset_0,
|
|
260
|
+
fallbackLabel: "Not classified",
|
|
261
|
+
color: "text-muted-foreground",
|
|
262
|
+
bgColor: "bg-muted",
|
|
263
|
+
barColor: "bg-muted"
|
|
264
|
+
},
|
|
265
|
+
1: {
|
|
266
|
+
message: messages.asset_1,
|
|
267
|
+
fallbackLabel: "Insignificant",
|
|
268
|
+
color: "text-green-700",
|
|
269
|
+
bgColor: "bg-green-100",
|
|
270
|
+
barColor: "bg-green-500"
|
|
271
|
+
},
|
|
272
|
+
2: {
|
|
273
|
+
message: messages.asset_2,
|
|
274
|
+
fallbackLabel: "Low",
|
|
275
|
+
color: "text-lime-700",
|
|
276
|
+
bgColor: "bg-lime-100",
|
|
277
|
+
barColor: "bg-lime-500"
|
|
278
|
+
},
|
|
279
|
+
3: {
|
|
280
|
+
message: messages.asset_3,
|
|
281
|
+
fallbackLabel: "Medium",
|
|
282
|
+
color: "text-yellow-700",
|
|
283
|
+
bgColor: "bg-yellow-100",
|
|
284
|
+
barColor: "bg-yellow-500"
|
|
285
|
+
},
|
|
286
|
+
4: {
|
|
287
|
+
message: messages.asset_4,
|
|
288
|
+
fallbackLabel: "High",
|
|
289
|
+
color: "text-orange-700",
|
|
290
|
+
bgColor: "bg-orange-100",
|
|
291
|
+
barColor: "bg-orange-500"
|
|
292
|
+
},
|
|
293
|
+
5: {
|
|
294
|
+
message: messages.asset_5,
|
|
295
|
+
fallbackLabel: "Business Critical",
|
|
296
|
+
color: "text-red-700",
|
|
297
|
+
bgColor: "bg-red-100",
|
|
298
|
+
barColor: "bg-red-500"
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
var impactLevels = [0, 1, 2, 3, 4, 5];
|
|
302
|
+
function getScale(preset) {
|
|
303
|
+
switch (preset) {
|
|
304
|
+
case "process":
|
|
305
|
+
return processScale;
|
|
306
|
+
case "asset":
|
|
307
|
+
return assetScale;
|
|
308
|
+
default:
|
|
309
|
+
return riskScale;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
313
|
+
0 && (module.exports = {
|
|
314
|
+
assetScale,
|
|
315
|
+
getScale,
|
|
316
|
+
impactLevels,
|
|
317
|
+
processScale,
|
|
318
|
+
riskScale
|
|
319
|
+
});
|