@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.
Files changed (80) hide show
  1. package/LICENSE +201 -0
  2. package/dist/asset/index.d.mts +2 -0
  3. package/dist/asset/index.d.ts +2 -0
  4. package/dist/asset/index.js +19 -0
  5. package/dist/asset/index.mjs +1 -0
  6. package/dist/chunk-7754RETD.mjs +57 -0
  7. package/dist/chunk-B47KDUYY.mjs +26 -0
  8. package/dist/chunk-BFZPRJQT.mjs +1 -0
  9. package/dist/chunk-GF3WJZVI.mjs +141 -0
  10. package/dist/chunk-GFABGXAO.mjs +1 -0
  11. package/dist/chunk-KNGEZZFI.mjs +157 -0
  12. package/dist/chunk-TICWEZUI.mjs +1 -0
  13. package/dist/chunk-TW3S4OE2.mjs +251 -0
  14. package/dist/common/compliance/compliance-badge.d.mts +33 -0
  15. package/dist/common/compliance/compliance-badge.d.ts +33 -0
  16. package/dist/common/compliance/compliance-badge.js +103 -0
  17. package/dist/common/compliance/compliance-badge.mjs +13 -0
  18. package/dist/common/compliance/index.d.mts +2 -0
  19. package/dist/common/compliance/index.d.ts +2 -0
  20. package/dist/common/compliance/index.js +104 -0
  21. package/dist/common/compliance/index.mjs +13 -0
  22. package/dist/common/compliance/messages.d.mts +20 -0
  23. package/dist/common/compliance/messages.d.ts +20 -0
  24. package/dist/common/compliance/messages.js +49 -0
  25. package/dist/common/compliance/messages.mjs +7 -0
  26. package/dist/common/impact/impact-card.d.mts +35 -0
  27. package/dist/common/impact/impact-card.d.ts +35 -0
  28. package/dist/common/impact/impact-card.js +551 -0
  29. package/dist/common/impact/impact-card.mjs +10 -0
  30. package/dist/common/impact/index.d.mts +5 -0
  31. package/dist/common/impact/index.d.ts +5 -0
  32. package/dist/common/impact/index.js +564 -0
  33. package/dist/common/impact/index.mjs +24 -0
  34. package/dist/common/impact/messages.d.mts +128 -0
  35. package/dist/common/impact/messages.d.ts +128 -0
  36. package/dist/common/impact/messages.js +164 -0
  37. package/dist/common/impact/messages.mjs +7 -0
  38. package/dist/common/impact/scales.d.mts +46 -0
  39. package/dist/common/impact/scales.d.ts +46 -0
  40. package/dist/common/impact/scales.js +319 -0
  41. package/dist/common/impact/scales.mjs +16 -0
  42. package/dist/common/index.d.mts +6 -0
  43. package/dist/common/index.d.ts +6 -0
  44. package/dist/common/index.js +640 -0
  45. package/dist/common/index.mjs +35 -0
  46. package/dist/control/index.d.mts +2 -0
  47. package/dist/control/index.d.ts +2 -0
  48. package/dist/control/index.js +19 -0
  49. package/dist/control/index.mjs +1 -0
  50. package/dist/incident/index.d.mts +2 -0
  51. package/dist/incident/index.d.ts +2 -0
  52. package/dist/incident/index.js +19 -0
  53. package/dist/incident/index.mjs +1 -0
  54. package/dist/index.d.mts +6 -0
  55. package/dist/index.d.ts +6 -0
  56. package/dist/index.js +640 -0
  57. package/dist/index.mjs +35 -0
  58. package/dist/risk/index.d.mts +2 -0
  59. package/dist/risk/index.d.ts +2 -0
  60. package/dist/risk/index.js +19 -0
  61. package/dist/risk/index.mjs +1 -0
  62. package/dist/vendor/index.d.mts +2 -0
  63. package/dist/vendor/index.d.ts +2 -0
  64. package/dist/vendor/index.js +19 -0
  65. package/dist/vendor/index.mjs +1 -0
  66. package/package.json +66 -0
  67. package/src/asset/index.ts +4 -0
  68. package/src/common/compliance/compliance-badge.tsx +110 -0
  69. package/src/common/compliance/index.ts +8 -0
  70. package/src/common/compliance/messages.ts +20 -0
  71. package/src/common/impact/impact-card.tsx +367 -0
  72. package/src/common/impact/index.ts +14 -0
  73. package/src/common/impact/messages.ts +141 -0
  74. package/src/common/impact/scales.ts +191 -0
  75. package/src/common/index.ts +4 -0
  76. package/src/control/index.ts +4 -0
  77. package/src/incident/index.ts +4 -0
  78. package/src/index.ts +20 -0
  79. package/src/risk/index.ts +4 -0
  80. package/src/vendor/index.ts +4 -0
@@ -0,0 +1,564 @@
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/index.ts
22
+ var impact_exports = {};
23
+ __export(impact_exports, {
24
+ ImpactCard: () => ImpactCard,
25
+ assetScale: () => assetScale,
26
+ getScale: () => getScale,
27
+ impactLevels: () => impactLevels,
28
+ impactMessages: () => messages,
29
+ processScale: () => processScale,
30
+ riskScale: () => riskScale
31
+ });
32
+ module.exports = __toCommonJS(impact_exports);
33
+
34
+ // src/common/impact/impact-card.tsx
35
+ var import_i18n2 = require("@kopexa/i18n");
36
+ var import_icons = require("@kopexa/icons");
37
+ var import_sight = require("@kopexa/sight");
38
+ var import_theme = require("@kopexa/theme");
39
+ var import_react = require("react");
40
+
41
+ // src/common/impact/messages.ts
42
+ var import_i18n = require("@kopexa/i18n");
43
+ var messages = (0, import_i18n.defineMessages)({
44
+ // Card titles
45
+ title_cia: {
46
+ id: "grc.impact.title_cia",
47
+ defaultMessage: "CIA Impact"
48
+ },
49
+ title_ciaa: {
50
+ id: "grc.impact.title_ciaa",
51
+ defaultMessage: "CIAA Impact"
52
+ },
53
+ // Dimensions
54
+ confidentiality: {
55
+ id: "grc.impact.confidentiality",
56
+ defaultMessage: "Confidentiality"
57
+ },
58
+ integrity: {
59
+ id: "grc.impact.integrity",
60
+ defaultMessage: "Integrity"
61
+ },
62
+ availability: {
63
+ id: "grc.impact.availability",
64
+ defaultMessage: "Availability"
65
+ },
66
+ authenticity: {
67
+ id: "grc.impact.authenticity",
68
+ defaultMessage: "Authenticity"
69
+ },
70
+ // Justification
71
+ justification: {
72
+ id: "grc.impact.justification",
73
+ defaultMessage: "Justification"
74
+ },
75
+ justification_hint: {
76
+ id: "grc.impact.justification_hint",
77
+ defaultMessage: "(highest impact: {level})"
78
+ },
79
+ justification_placeholder: {
80
+ id: "grc.impact.justification_placeholder",
81
+ defaultMessage: "Enter justification for the chosen impact values..."
82
+ },
83
+ no_justification: {
84
+ id: "grc.impact.no_justification",
85
+ defaultMessage: "No justification provided"
86
+ },
87
+ // Actions
88
+ edit: {
89
+ id: "grc.impact.edit",
90
+ defaultMessage: "Edit"
91
+ },
92
+ cancel: {
93
+ id: "grc.impact.cancel",
94
+ defaultMessage: "Cancel"
95
+ },
96
+ save: {
97
+ id: "grc.impact.save",
98
+ defaultMessage: "Save"
99
+ },
100
+ // Risk Scale (default)
101
+ risk_0: {
102
+ id: "grc.impact.scale.risk.0",
103
+ defaultMessage: "Not rated"
104
+ },
105
+ risk_1: {
106
+ id: "grc.impact.scale.risk.1",
107
+ defaultMessage: "Negligible"
108
+ },
109
+ risk_2: {
110
+ id: "grc.impact.scale.risk.2",
111
+ defaultMessage: "Low"
112
+ },
113
+ risk_3: {
114
+ id: "grc.impact.scale.risk.3",
115
+ defaultMessage: "Medium"
116
+ },
117
+ risk_4: {
118
+ id: "grc.impact.scale.risk.4",
119
+ defaultMessage: "High"
120
+ },
121
+ risk_5: {
122
+ id: "grc.impact.scale.risk.5",
123
+ defaultMessage: "Critical"
124
+ },
125
+ // Process Scale
126
+ process_0: {
127
+ id: "grc.impact.scale.process.0",
128
+ defaultMessage: "Not rated"
129
+ },
130
+ process_1: {
131
+ id: "grc.impact.scale.process.1",
132
+ defaultMessage: "Insignificant"
133
+ },
134
+ process_2: {
135
+ id: "grc.impact.scale.process.2",
136
+ defaultMessage: "Low"
137
+ },
138
+ process_3: {
139
+ id: "grc.impact.scale.process.3",
140
+ defaultMessage: "Relevant"
141
+ },
142
+ process_4: {
143
+ id: "grc.impact.scale.process.4",
144
+ defaultMessage: "Important"
145
+ },
146
+ process_5: {
147
+ id: "grc.impact.scale.process.5",
148
+ defaultMessage: "Vital"
149
+ },
150
+ // Asset Scale
151
+ asset_0: {
152
+ id: "grc.impact.scale.asset.0",
153
+ defaultMessage: "Not classified"
154
+ },
155
+ asset_1: {
156
+ id: "grc.impact.scale.asset.1",
157
+ defaultMessage: "Insignificant"
158
+ },
159
+ asset_2: {
160
+ id: "grc.impact.scale.asset.2",
161
+ defaultMessage: "Low"
162
+ },
163
+ asset_3: {
164
+ id: "grc.impact.scale.asset.3",
165
+ defaultMessage: "Medium"
166
+ },
167
+ asset_4: {
168
+ id: "grc.impact.scale.asset.4",
169
+ defaultMessage: "High"
170
+ },
171
+ asset_5: {
172
+ id: "grc.impact.scale.asset.5",
173
+ defaultMessage: "Business Critical"
174
+ }
175
+ });
176
+
177
+ // src/common/impact/scales.ts
178
+ var riskScale = {
179
+ 0: {
180
+ message: messages.risk_0,
181
+ fallbackLabel: "Not rated",
182
+ color: "text-muted-foreground",
183
+ bgColor: "bg-muted",
184
+ barColor: "bg-muted"
185
+ },
186
+ 1: {
187
+ message: messages.risk_1,
188
+ fallbackLabel: "Negligible",
189
+ color: "text-green-700",
190
+ bgColor: "bg-green-100",
191
+ barColor: "bg-green-500"
192
+ },
193
+ 2: {
194
+ message: messages.risk_2,
195
+ fallbackLabel: "Low",
196
+ color: "text-lime-700",
197
+ bgColor: "bg-lime-100",
198
+ barColor: "bg-lime-500"
199
+ },
200
+ 3: {
201
+ message: messages.risk_3,
202
+ fallbackLabel: "Medium",
203
+ color: "text-yellow-700",
204
+ bgColor: "bg-yellow-100",
205
+ barColor: "bg-yellow-500"
206
+ },
207
+ 4: {
208
+ message: messages.risk_4,
209
+ fallbackLabel: "High",
210
+ color: "text-orange-700",
211
+ bgColor: "bg-orange-100",
212
+ barColor: "bg-orange-500"
213
+ },
214
+ 5: {
215
+ message: messages.risk_5,
216
+ fallbackLabel: "Critical",
217
+ color: "text-red-700",
218
+ bgColor: "bg-red-100",
219
+ barColor: "bg-red-500"
220
+ }
221
+ };
222
+ var processScale = {
223
+ 0: {
224
+ message: messages.process_0,
225
+ fallbackLabel: "Not rated",
226
+ color: "text-muted-foreground",
227
+ bgColor: "bg-muted",
228
+ barColor: "bg-muted"
229
+ },
230
+ 1: {
231
+ message: messages.process_1,
232
+ fallbackLabel: "Insignificant",
233
+ color: "text-green-700",
234
+ bgColor: "bg-green-100",
235
+ barColor: "bg-green-500"
236
+ },
237
+ 2: {
238
+ message: messages.process_2,
239
+ fallbackLabel: "Low",
240
+ color: "text-lime-700",
241
+ bgColor: "bg-lime-100",
242
+ barColor: "bg-lime-500"
243
+ },
244
+ 3: {
245
+ message: messages.process_3,
246
+ fallbackLabel: "Relevant",
247
+ color: "text-yellow-700",
248
+ bgColor: "bg-yellow-100",
249
+ barColor: "bg-yellow-500"
250
+ },
251
+ 4: {
252
+ message: messages.process_4,
253
+ fallbackLabel: "Important",
254
+ color: "text-orange-700",
255
+ bgColor: "bg-orange-100",
256
+ barColor: "bg-orange-500"
257
+ },
258
+ 5: {
259
+ message: messages.process_5,
260
+ fallbackLabel: "Vital",
261
+ color: "text-red-700",
262
+ bgColor: "bg-red-100",
263
+ barColor: "bg-red-500"
264
+ }
265
+ };
266
+ var assetScale = {
267
+ 0: {
268
+ message: messages.asset_0,
269
+ fallbackLabel: "Not classified",
270
+ color: "text-muted-foreground",
271
+ bgColor: "bg-muted",
272
+ barColor: "bg-muted"
273
+ },
274
+ 1: {
275
+ message: messages.asset_1,
276
+ fallbackLabel: "Insignificant",
277
+ color: "text-green-700",
278
+ bgColor: "bg-green-100",
279
+ barColor: "bg-green-500"
280
+ },
281
+ 2: {
282
+ message: messages.asset_2,
283
+ fallbackLabel: "Low",
284
+ color: "text-lime-700",
285
+ bgColor: "bg-lime-100",
286
+ barColor: "bg-lime-500"
287
+ },
288
+ 3: {
289
+ message: messages.asset_3,
290
+ fallbackLabel: "Medium",
291
+ color: "text-yellow-700",
292
+ bgColor: "bg-yellow-100",
293
+ barColor: "bg-yellow-500"
294
+ },
295
+ 4: {
296
+ message: messages.asset_4,
297
+ fallbackLabel: "High",
298
+ color: "text-orange-700",
299
+ bgColor: "bg-orange-100",
300
+ barColor: "bg-orange-500"
301
+ },
302
+ 5: {
303
+ message: messages.asset_5,
304
+ fallbackLabel: "Business Critical",
305
+ color: "text-red-700",
306
+ bgColor: "bg-red-100",
307
+ barColor: "bg-red-500"
308
+ }
309
+ };
310
+ var impactLevels = [0, 1, 2, 3, 4, 5];
311
+ function getScale(preset) {
312
+ switch (preset) {
313
+ case "process":
314
+ return processScale;
315
+ case "asset":
316
+ return assetScale;
317
+ default:
318
+ return riskScale;
319
+ }
320
+ }
321
+
322
+ // src/common/impact/impact-card.tsx
323
+ var import_jsx_runtime = require("react/jsx-runtime");
324
+ function ImpactItemRow({
325
+ label,
326
+ shortLabel,
327
+ value,
328
+ isEditing,
329
+ scale,
330
+ formatLabel,
331
+ onLevelChange
332
+ }) {
333
+ const config = scale[value];
334
+ const isUnrated = value === 0;
335
+ const percentage = isUnrated ? 0 : value / 5 * 100;
336
+ const styles = (0, import_theme.impactCard)({ unrated: isUnrated });
337
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: styles.row(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles.rowContent(), children: [
338
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.rowIcon(), children: shortLabel }),
339
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles.rowBody(), children: [
340
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles.rowHeader(), children: [
341
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.rowLabel(), children: label }),
342
+ isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
343
+ import_sight.Select,
344
+ {
345
+ value: String(value),
346
+ onValueChange: (val) => onLevelChange(Number(val)),
347
+ size: "sm",
348
+ children: [
349
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Select.Trigger, { className: "w-36", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Select.Value, {}) }),
350
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Select.Content, { children: impactLevels.map((level) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Select.Item, { value: String(level), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-2", children: [
351
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground w-3", children: level }),
352
+ formatLabel(level)
353
+ ] }) }, level)) })
354
+ ]
355
+ }
356
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles.rowValue(), children: [
357
+ !isUnrated && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.rowValueNumber(), children: value }),
358
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
359
+ "span",
360
+ {
361
+ className: styles.rowValueBadge({
362
+ className: isUnrated ? void 0 : `${config.color} ${config.bgColor}`
363
+ }),
364
+ children: formatLabel(value)
365
+ }
366
+ )
367
+ ] })
368
+ ] }),
369
+ !isUnrated && !isEditing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: styles.progressContainer(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
370
+ "div",
371
+ {
372
+ className: styles.progressBar({ className: config.barColor }),
373
+ style: { width: `${percentage}%` }
374
+ }
375
+ ) })
376
+ ] })
377
+ ] }) });
378
+ }
379
+ var defaultImpact = {
380
+ impactConfidentiality: 0,
381
+ impactIntegrity: 0,
382
+ impactAvailability: 0,
383
+ impactAuthenticity: 0
384
+ };
385
+ function ImpactCard({
386
+ value,
387
+ onChange,
388
+ showJustification = false,
389
+ showAuthenticity = false,
390
+ readOnly = false,
391
+ scale = "risk",
392
+ title
393
+ }) {
394
+ var _a, _b;
395
+ const intl = (0, import_i18n2.useSafeIntl)();
396
+ const [isEditing, setIsEditing] = (0, import_react.useState)(false);
397
+ const [editValues, setEditValues] = (0, import_react.useState)(
398
+ value || defaultImpact
399
+ );
400
+ const styles = (0, import_theme.impactCard)({ editing: isEditing });
401
+ const scaleConfig = typeof scale === "string" ? getScale(scale) : scale;
402
+ const formatLabel = (level) => {
403
+ const config = scaleConfig[level];
404
+ return intl.formatMessage(config.message);
405
+ };
406
+ const t = {
407
+ titleCia: intl.formatMessage(messages.title_cia),
408
+ titleCiaa: intl.formatMessage(messages.title_ciaa),
409
+ confidentiality: intl.formatMessage(messages.confidentiality),
410
+ integrity: intl.formatMessage(messages.integrity),
411
+ availability: intl.formatMessage(messages.availability),
412
+ authenticity: intl.formatMessage(messages.authenticity),
413
+ justification: intl.formatMessage(messages.justification),
414
+ justificationPlaceholder: intl.formatMessage(
415
+ messages.justification_placeholder
416
+ ),
417
+ noJustification: intl.formatMessage(messages.no_justification),
418
+ edit: intl.formatMessage(messages.edit),
419
+ cancel: intl.formatMessage(messages.cancel),
420
+ save: intl.formatMessage(messages.save)
421
+ };
422
+ const defaultTitle = showAuthenticity ? t.titleCiaa : t.titleCia;
423
+ const cardTitle = title != null ? title : defaultTitle;
424
+ const handleSave = () => {
425
+ onChange == null ? void 0 : onChange(editValues);
426
+ setIsEditing(false);
427
+ };
428
+ const handleCancel = () => {
429
+ setEditValues(value || defaultImpact);
430
+ setIsEditing(false);
431
+ };
432
+ const handleStartEdit = () => {
433
+ setEditValues(value || defaultImpact);
434
+ setIsEditing(true);
435
+ };
436
+ const currentImpact = isEditing ? editValues : value || defaultImpact;
437
+ const handleLevelChange = (key) => (level) => {
438
+ setEditValues((prev) => ({
439
+ ...prev,
440
+ [key]: level
441
+ }));
442
+ };
443
+ const handleJustificationChange = (justification) => {
444
+ setEditValues((prev) => ({
445
+ ...prev,
446
+ impactJustification: justification || void 0
447
+ }));
448
+ };
449
+ const highestImpact = Math.max(
450
+ currentImpact.impactConfidentiality,
451
+ currentImpact.impactIntegrity,
452
+ currentImpact.impactAvailability,
453
+ (_a = currentImpact.impactAuthenticity) != null ? _a : 0
454
+ );
455
+ const highestLabel = formatLabel(highestImpact);
456
+ const justificationHint = intl.formatMessage(messages.justification_hint, {
457
+ level: highestLabel
458
+ });
459
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_sight.Card.Root, { className: styles.root(), children: [
460
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_sight.Card.Header, { className: "flex flex-row items-center justify-between", children: [
461
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
462
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Heading, { level: "h4", className: "text-sm font-medium", children: cardTitle }),
463
+ isEditing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Chip, { size: "sm", color: "primary", children: t.edit })
464
+ ] }),
465
+ !readOnly && (!isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
466
+ "button",
467
+ {
468
+ type: "button",
469
+ onClick: handleStartEdit,
470
+ className: styles.editButton(),
471
+ "aria-label": t.edit,
472
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.EditIcon, { className: "size-4" })
473
+ }
474
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
475
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Button, { variant: "ghost", size: "sm", onClick: handleCancel, children: t.cancel }),
476
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Button, { size: "sm", onClick: handleSave, children: t.save })
477
+ ] }))
478
+ ] }),
479
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_sight.Card.Body, { className: "space-y-3", children: [
480
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
481
+ ImpactItemRow,
482
+ {
483
+ label: t.confidentiality,
484
+ shortLabel: "C",
485
+ value: currentImpact.impactConfidentiality,
486
+ isEditing,
487
+ scale: scaleConfig,
488
+ formatLabel,
489
+ onLevelChange: handleLevelChange("impactConfidentiality")
490
+ }
491
+ ),
492
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
493
+ ImpactItemRow,
494
+ {
495
+ label: t.integrity,
496
+ shortLabel: "I",
497
+ value: currentImpact.impactIntegrity,
498
+ isEditing,
499
+ scale: scaleConfig,
500
+ formatLabel,
501
+ onLevelChange: handleLevelChange("impactIntegrity")
502
+ }
503
+ ),
504
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
505
+ ImpactItemRow,
506
+ {
507
+ label: t.availability,
508
+ shortLabel: "A",
509
+ value: currentImpact.impactAvailability,
510
+ isEditing,
511
+ scale: scaleConfig,
512
+ formatLabel,
513
+ onLevelChange: handleLevelChange("impactAvailability")
514
+ }
515
+ ),
516
+ showAuthenticity && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
517
+ ImpactItemRow,
518
+ {
519
+ label: t.authenticity,
520
+ shortLabel: "Au",
521
+ value: (_b = currentImpact.impactAuthenticity) != null ? _b : 0,
522
+ isEditing,
523
+ scale: scaleConfig,
524
+ formatLabel,
525
+ onLevelChange: handleLevelChange("impactAuthenticity")
526
+ }
527
+ ),
528
+ showJustification && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles.justificationSection(), children: [
529
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
530
+ "label",
531
+ {
532
+ htmlFor: "impact-justification",
533
+ className: styles.justificationLabel(),
534
+ children: [
535
+ t.justification,
536
+ highestImpact > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.justificationHint(), children: justificationHint })
537
+ ]
538
+ }
539
+ ),
540
+ isEditing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
541
+ import_sight.Textarea,
542
+ {
543
+ id: "impact-justification",
544
+ value: currentImpact.impactJustification || "",
545
+ onChange: (e) => handleJustificationChange(e.target.value),
546
+ placeholder: t.justificationPlaceholder,
547
+ rows: 3,
548
+ className: "text-sm"
549
+ }
550
+ ) : currentImpact.impactJustification ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: styles.justificationText(), children: currentImpact.impactJustification }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: styles.justificationEmpty(), children: t.noJustification })
551
+ ] })
552
+ ] })
553
+ ] });
554
+ }
555
+ // Annotate the CommonJS export names for ESM import in node:
556
+ 0 && (module.exports = {
557
+ ImpactCard,
558
+ assetScale,
559
+ getScale,
560
+ impactLevels,
561
+ impactMessages,
562
+ processScale,
563
+ riskScale
564
+ });
@@ -0,0 +1,24 @@
1
+ "use client";
2
+ import "../../chunk-GFABGXAO.mjs";
3
+ import {
4
+ ImpactCard
5
+ } from "../../chunk-TW3S4OE2.mjs";
6
+ import {
7
+ assetScale,
8
+ getScale,
9
+ impactLevels,
10
+ processScale,
11
+ riskScale
12
+ } from "../../chunk-KNGEZZFI.mjs";
13
+ import {
14
+ messages
15
+ } from "../../chunk-GF3WJZVI.mjs";
16
+ export {
17
+ ImpactCard,
18
+ assetScale,
19
+ getScale,
20
+ impactLevels,
21
+ messages as impactMessages,
22
+ processScale,
23
+ riskScale
24
+ };
@@ -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 };