@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,251 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
getScale,
|
|
4
|
+
impactLevels
|
|
5
|
+
} from "./chunk-KNGEZZFI.mjs";
|
|
6
|
+
import {
|
|
7
|
+
messages
|
|
8
|
+
} from "./chunk-GF3WJZVI.mjs";
|
|
9
|
+
|
|
10
|
+
// src/common/impact/impact-card.tsx
|
|
11
|
+
import { useSafeIntl } from "@kopexa/i18n";
|
|
12
|
+
import { EditIcon } from "@kopexa/icons";
|
|
13
|
+
import { Button, Card, Chip, Heading, Select, Textarea } from "@kopexa/sight";
|
|
14
|
+
import { impactCard } from "@kopexa/theme";
|
|
15
|
+
import { useState } from "react";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function ImpactItemRow({
|
|
18
|
+
label,
|
|
19
|
+
shortLabel,
|
|
20
|
+
value,
|
|
21
|
+
isEditing,
|
|
22
|
+
scale,
|
|
23
|
+
formatLabel,
|
|
24
|
+
onLevelChange
|
|
25
|
+
}) {
|
|
26
|
+
const config = scale[value];
|
|
27
|
+
const isUnrated = value === 0;
|
|
28
|
+
const percentage = isUnrated ? 0 : value / 5 * 100;
|
|
29
|
+
const styles = impactCard({ unrated: isUnrated });
|
|
30
|
+
return /* @__PURE__ */ jsx("div", { className: styles.row(), children: /* @__PURE__ */ jsxs("div", { className: styles.rowContent(), children: [
|
|
31
|
+
/* @__PURE__ */ jsx("span", { className: styles.rowIcon(), children: shortLabel }),
|
|
32
|
+
/* @__PURE__ */ jsxs("div", { className: styles.rowBody(), children: [
|
|
33
|
+
/* @__PURE__ */ jsxs("div", { className: styles.rowHeader(), children: [
|
|
34
|
+
/* @__PURE__ */ jsx("span", { className: styles.rowLabel(), children: label }),
|
|
35
|
+
isEditing ? /* @__PURE__ */ jsxs(
|
|
36
|
+
Select,
|
|
37
|
+
{
|
|
38
|
+
value: String(value),
|
|
39
|
+
onValueChange: (val) => onLevelChange(Number(val)),
|
|
40
|
+
size: "sm",
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx(Select.Trigger, { className: "w-36", children: /* @__PURE__ */ jsx(Select.Value, {}) }),
|
|
43
|
+
/* @__PURE__ */ jsx(Select.Content, { children: impactLevels.map((level) => /* @__PURE__ */ jsx(Select.Item, { value: String(level), children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground w-3", children: level }),
|
|
45
|
+
formatLabel(level)
|
|
46
|
+
] }) }, level)) })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) : /* @__PURE__ */ jsxs("div", { className: styles.rowValue(), children: [
|
|
50
|
+
!isUnrated && /* @__PURE__ */ jsx("span", { className: styles.rowValueNumber(), children: value }),
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
"span",
|
|
53
|
+
{
|
|
54
|
+
className: styles.rowValueBadge({
|
|
55
|
+
className: isUnrated ? void 0 : `${config.color} ${config.bgColor}`
|
|
56
|
+
}),
|
|
57
|
+
children: formatLabel(value)
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
!isUnrated && !isEditing && /* @__PURE__ */ jsx("div", { className: styles.progressContainer(), children: /* @__PURE__ */ jsx(
|
|
63
|
+
"div",
|
|
64
|
+
{
|
|
65
|
+
className: styles.progressBar({ className: config.barColor }),
|
|
66
|
+
style: { width: `${percentage}%` }
|
|
67
|
+
}
|
|
68
|
+
) })
|
|
69
|
+
] })
|
|
70
|
+
] }) });
|
|
71
|
+
}
|
|
72
|
+
var defaultImpact = {
|
|
73
|
+
impactConfidentiality: 0,
|
|
74
|
+
impactIntegrity: 0,
|
|
75
|
+
impactAvailability: 0,
|
|
76
|
+
impactAuthenticity: 0
|
|
77
|
+
};
|
|
78
|
+
function ImpactCard({
|
|
79
|
+
value,
|
|
80
|
+
onChange,
|
|
81
|
+
showJustification = false,
|
|
82
|
+
showAuthenticity = false,
|
|
83
|
+
readOnly = false,
|
|
84
|
+
scale = "risk",
|
|
85
|
+
title
|
|
86
|
+
}) {
|
|
87
|
+
var _a, _b;
|
|
88
|
+
const intl = useSafeIntl();
|
|
89
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
90
|
+
const [editValues, setEditValues] = useState(
|
|
91
|
+
value || defaultImpact
|
|
92
|
+
);
|
|
93
|
+
const styles = impactCard({ editing: isEditing });
|
|
94
|
+
const scaleConfig = typeof scale === "string" ? getScale(scale) : scale;
|
|
95
|
+
const formatLabel = (level) => {
|
|
96
|
+
const config = scaleConfig[level];
|
|
97
|
+
return intl.formatMessage(config.message);
|
|
98
|
+
};
|
|
99
|
+
const t = {
|
|
100
|
+
titleCia: intl.formatMessage(messages.title_cia),
|
|
101
|
+
titleCiaa: intl.formatMessage(messages.title_ciaa),
|
|
102
|
+
confidentiality: intl.formatMessage(messages.confidentiality),
|
|
103
|
+
integrity: intl.formatMessage(messages.integrity),
|
|
104
|
+
availability: intl.formatMessage(messages.availability),
|
|
105
|
+
authenticity: intl.formatMessage(messages.authenticity),
|
|
106
|
+
justification: intl.formatMessage(messages.justification),
|
|
107
|
+
justificationPlaceholder: intl.formatMessage(
|
|
108
|
+
messages.justification_placeholder
|
|
109
|
+
),
|
|
110
|
+
noJustification: intl.formatMessage(messages.no_justification),
|
|
111
|
+
edit: intl.formatMessage(messages.edit),
|
|
112
|
+
cancel: intl.formatMessage(messages.cancel),
|
|
113
|
+
save: intl.formatMessage(messages.save)
|
|
114
|
+
};
|
|
115
|
+
const defaultTitle = showAuthenticity ? t.titleCiaa : t.titleCia;
|
|
116
|
+
const cardTitle = title != null ? title : defaultTitle;
|
|
117
|
+
const handleSave = () => {
|
|
118
|
+
onChange == null ? void 0 : onChange(editValues);
|
|
119
|
+
setIsEditing(false);
|
|
120
|
+
};
|
|
121
|
+
const handleCancel = () => {
|
|
122
|
+
setEditValues(value || defaultImpact);
|
|
123
|
+
setIsEditing(false);
|
|
124
|
+
};
|
|
125
|
+
const handleStartEdit = () => {
|
|
126
|
+
setEditValues(value || defaultImpact);
|
|
127
|
+
setIsEditing(true);
|
|
128
|
+
};
|
|
129
|
+
const currentImpact = isEditing ? editValues : value || defaultImpact;
|
|
130
|
+
const handleLevelChange = (key) => (level) => {
|
|
131
|
+
setEditValues((prev) => ({
|
|
132
|
+
...prev,
|
|
133
|
+
[key]: level
|
|
134
|
+
}));
|
|
135
|
+
};
|
|
136
|
+
const handleJustificationChange = (justification) => {
|
|
137
|
+
setEditValues((prev) => ({
|
|
138
|
+
...prev,
|
|
139
|
+
impactJustification: justification || void 0
|
|
140
|
+
}));
|
|
141
|
+
};
|
|
142
|
+
const highestImpact = Math.max(
|
|
143
|
+
currentImpact.impactConfidentiality,
|
|
144
|
+
currentImpact.impactIntegrity,
|
|
145
|
+
currentImpact.impactAvailability,
|
|
146
|
+
(_a = currentImpact.impactAuthenticity) != null ? _a : 0
|
|
147
|
+
);
|
|
148
|
+
const highestLabel = formatLabel(highestImpact);
|
|
149
|
+
const justificationHint = intl.formatMessage(messages.justification_hint, {
|
|
150
|
+
level: highestLabel
|
|
151
|
+
});
|
|
152
|
+
return /* @__PURE__ */ jsxs(Card.Root, { className: styles.root(), children: [
|
|
153
|
+
/* @__PURE__ */ jsxs(Card.Header, { className: "flex flex-row items-center justify-between", children: [
|
|
154
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
155
|
+
/* @__PURE__ */ jsx(Heading, { level: "h4", className: "text-sm font-medium", children: cardTitle }),
|
|
156
|
+
isEditing && /* @__PURE__ */ jsx(Chip, { size: "sm", color: "primary", children: t.edit })
|
|
157
|
+
] }),
|
|
158
|
+
!readOnly && (!isEditing ? /* @__PURE__ */ jsx(
|
|
159
|
+
"button",
|
|
160
|
+
{
|
|
161
|
+
type: "button",
|
|
162
|
+
onClick: handleStartEdit,
|
|
163
|
+
className: styles.editButton(),
|
|
164
|
+
"aria-label": t.edit,
|
|
165
|
+
children: /* @__PURE__ */ jsx(EditIcon, { className: "size-4" })
|
|
166
|
+
}
|
|
167
|
+
) : /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
168
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: handleCancel, children: t.cancel }),
|
|
169
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: handleSave, children: t.save })
|
|
170
|
+
] }))
|
|
171
|
+
] }),
|
|
172
|
+
/* @__PURE__ */ jsxs(Card.Body, { className: "space-y-3", children: [
|
|
173
|
+
/* @__PURE__ */ jsx(
|
|
174
|
+
ImpactItemRow,
|
|
175
|
+
{
|
|
176
|
+
label: t.confidentiality,
|
|
177
|
+
shortLabel: "C",
|
|
178
|
+
value: currentImpact.impactConfidentiality,
|
|
179
|
+
isEditing,
|
|
180
|
+
scale: scaleConfig,
|
|
181
|
+
formatLabel,
|
|
182
|
+
onLevelChange: handleLevelChange("impactConfidentiality")
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ jsx(
|
|
186
|
+
ImpactItemRow,
|
|
187
|
+
{
|
|
188
|
+
label: t.integrity,
|
|
189
|
+
shortLabel: "I",
|
|
190
|
+
value: currentImpact.impactIntegrity,
|
|
191
|
+
isEditing,
|
|
192
|
+
scale: scaleConfig,
|
|
193
|
+
formatLabel,
|
|
194
|
+
onLevelChange: handleLevelChange("impactIntegrity")
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ jsx(
|
|
198
|
+
ImpactItemRow,
|
|
199
|
+
{
|
|
200
|
+
label: t.availability,
|
|
201
|
+
shortLabel: "A",
|
|
202
|
+
value: currentImpact.impactAvailability,
|
|
203
|
+
isEditing,
|
|
204
|
+
scale: scaleConfig,
|
|
205
|
+
formatLabel,
|
|
206
|
+
onLevelChange: handleLevelChange("impactAvailability")
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
showAuthenticity && /* @__PURE__ */ jsx(
|
|
210
|
+
ImpactItemRow,
|
|
211
|
+
{
|
|
212
|
+
label: t.authenticity,
|
|
213
|
+
shortLabel: "Au",
|
|
214
|
+
value: (_b = currentImpact.impactAuthenticity) != null ? _b : 0,
|
|
215
|
+
isEditing,
|
|
216
|
+
scale: scaleConfig,
|
|
217
|
+
formatLabel,
|
|
218
|
+
onLevelChange: handleLevelChange("impactAuthenticity")
|
|
219
|
+
}
|
|
220
|
+
),
|
|
221
|
+
showJustification && /* @__PURE__ */ jsxs("div", { className: styles.justificationSection(), children: [
|
|
222
|
+
/* @__PURE__ */ jsxs(
|
|
223
|
+
"label",
|
|
224
|
+
{
|
|
225
|
+
htmlFor: "impact-justification",
|
|
226
|
+
className: styles.justificationLabel(),
|
|
227
|
+
children: [
|
|
228
|
+
t.justification,
|
|
229
|
+
highestImpact > 0 && /* @__PURE__ */ jsx("span", { className: styles.justificationHint(), children: justificationHint })
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
isEditing ? /* @__PURE__ */ jsx(
|
|
234
|
+
Textarea,
|
|
235
|
+
{
|
|
236
|
+
id: "impact-justification",
|
|
237
|
+
value: currentImpact.impactJustification || "",
|
|
238
|
+
onChange: (e) => handleJustificationChange(e.target.value),
|
|
239
|
+
placeholder: t.justificationPlaceholder,
|
|
240
|
+
rows: 3,
|
|
241
|
+
className: "text-sm"
|
|
242
|
+
}
|
|
243
|
+
) : currentImpact.impactJustification ? /* @__PURE__ */ jsx("p", { className: styles.justificationText(), children: currentImpact.impactJustification }) : /* @__PURE__ */ jsx("p", { className: styles.justificationEmpty(), children: t.noJustification })
|
|
244
|
+
] })
|
|
245
|
+
] })
|
|
246
|
+
] });
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
export {
|
|
250
|
+
ImpactCard
|
|
251
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface DoraBadgeProps {
|
|
4
|
+
/** Custom tooltip content */
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
/** Icon size */
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
/** Additional class names */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
interface Nis2BadgeProps {
|
|
12
|
+
/** Custom tooltip content */
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
/** Icon size */
|
|
15
|
+
iconSize?: number;
|
|
16
|
+
/** Additional class names */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
interface ComplianceBadgesProps {
|
|
20
|
+
/** Show DORA Critical badge */
|
|
21
|
+
doraCritical?: boolean;
|
|
22
|
+
/** Show NIS2 Significant badge */
|
|
23
|
+
nis2Significant?: boolean;
|
|
24
|
+
/** Icon size for badges */
|
|
25
|
+
iconSize?: number;
|
|
26
|
+
/** Additional class names for container */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
declare function DoraBadge({ tooltip, iconSize, className, }: DoraBadgeProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare function Nis2Badge({ tooltip, iconSize, className, }: Nis2BadgeProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare function ComplianceBadges({ doraCritical, nis2Significant, iconSize, className, }: ComplianceBadgesProps): react_jsx_runtime.JSX.Element | null;
|
|
32
|
+
|
|
33
|
+
export { ComplianceBadges, type ComplianceBadgesProps, DoraBadge, type DoraBadgeProps, Nis2Badge, type Nis2BadgeProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface DoraBadgeProps {
|
|
4
|
+
/** Custom tooltip content */
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
/** Icon size */
|
|
7
|
+
iconSize?: number;
|
|
8
|
+
/** Additional class names */
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
interface Nis2BadgeProps {
|
|
12
|
+
/** Custom tooltip content */
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
/** Icon size */
|
|
15
|
+
iconSize?: number;
|
|
16
|
+
/** Additional class names */
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
interface ComplianceBadgesProps {
|
|
20
|
+
/** Show DORA Critical badge */
|
|
21
|
+
doraCritical?: boolean;
|
|
22
|
+
/** Show NIS2 Significant badge */
|
|
23
|
+
nis2Significant?: boolean;
|
|
24
|
+
/** Icon size for badges */
|
|
25
|
+
iconSize?: number;
|
|
26
|
+
/** Additional class names for container */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
declare function DoraBadge({ tooltip, iconSize, className, }: DoraBadgeProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
declare function Nis2Badge({ tooltip, iconSize, className, }: Nis2BadgeProps): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare function ComplianceBadges({ doraCritical, nis2Significant, iconSize, className, }: ComplianceBadgesProps): react_jsx_runtime.JSX.Element | null;
|
|
32
|
+
|
|
33
|
+
export { ComplianceBadges, type ComplianceBadgesProps, DoraBadge, type DoraBadgeProps, Nis2Badge, type Nis2BadgeProps };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client";
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
|
+
|
|
22
|
+
// src/common/compliance/compliance-badge.tsx
|
|
23
|
+
var compliance_badge_exports = {};
|
|
24
|
+
__export(compliance_badge_exports, {
|
|
25
|
+
ComplianceBadges: () => ComplianceBadges,
|
|
26
|
+
DoraBadge: () => DoraBadge,
|
|
27
|
+
Nis2Badge: () => Nis2Badge
|
|
28
|
+
});
|
|
29
|
+
module.exports = __toCommonJS(compliance_badge_exports);
|
|
30
|
+
var import_i18n2 = require("@kopexa/i18n");
|
|
31
|
+
var import_icons = require("@kopexa/icons");
|
|
32
|
+
var import_sight = require("@kopexa/sight");
|
|
33
|
+
var import_theme = require("@kopexa/theme");
|
|
34
|
+
|
|
35
|
+
// src/common/compliance/messages.ts
|
|
36
|
+
var import_i18n = require("@kopexa/i18n");
|
|
37
|
+
var messages = (0, import_i18n.defineMessages)({
|
|
38
|
+
dora_label: {
|
|
39
|
+
id: "grc.compliance.dora.label",
|
|
40
|
+
defaultMessage: "DORA"
|
|
41
|
+
},
|
|
42
|
+
dora_tooltip: {
|
|
43
|
+
id: "grc.compliance.dora.tooltip",
|
|
44
|
+
defaultMessage: "DORA Critical - Affects critical ICT functions"
|
|
45
|
+
},
|
|
46
|
+
nis2_label: {
|
|
47
|
+
id: "grc.compliance.nis2.label",
|
|
48
|
+
defaultMessage: "NIS2"
|
|
49
|
+
},
|
|
50
|
+
nis2_tooltip: {
|
|
51
|
+
id: "grc.compliance.nis2.tooltip",
|
|
52
|
+
defaultMessage: "NIS2 Significant - All-hazards risk"
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// src/common/compliance/compliance-badge.tsx
|
|
57
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
58
|
+
function DoraBadge({
|
|
59
|
+
tooltip,
|
|
60
|
+
iconSize = 12,
|
|
61
|
+
className
|
|
62
|
+
}) {
|
|
63
|
+
const intl = (0, import_i18n2.useSafeIntl)();
|
|
64
|
+
const styles = (0, import_theme.complianceBadge)({ color: "dora" });
|
|
65
|
+
const tooltipContent = tooltip != null ? tooltip : intl.formatMessage(messages.dora_tooltip);
|
|
66
|
+
const label = intl.formatMessage(messages.dora_label);
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Tooltip, { content: tooltipContent, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: styles.root({ className }), children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DORAIcon, { size: iconSize, className: styles.icon() }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.label(), children: label })
|
|
70
|
+
] }) });
|
|
71
|
+
}
|
|
72
|
+
function Nis2Badge({
|
|
73
|
+
tooltip,
|
|
74
|
+
iconSize = 12,
|
|
75
|
+
className
|
|
76
|
+
}) {
|
|
77
|
+
const intl = (0, import_i18n2.useSafeIntl)();
|
|
78
|
+
const styles = (0, import_theme.complianceBadge)({ color: "nis2" });
|
|
79
|
+
const tooltipContent = tooltip != null ? tooltip : intl.formatMessage(messages.nis2_tooltip);
|
|
80
|
+
const label = intl.formatMessage(messages.nis2_label);
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Tooltip, { content: tooltipContent, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: styles.root({ className }), children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.NIS2Icon, { size: iconSize, className: styles.icon() }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.label(), children: label })
|
|
84
|
+
] }) });
|
|
85
|
+
}
|
|
86
|
+
function ComplianceBadges({
|
|
87
|
+
doraCritical,
|
|
88
|
+
nis2Significant,
|
|
89
|
+
iconSize = 12,
|
|
90
|
+
className
|
|
91
|
+
}) {
|
|
92
|
+
if (!doraCritical && !nis2Significant) return null;
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: className != null ? className : "flex items-center gap-1", children: [
|
|
94
|
+
doraCritical && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DoraBadge, { iconSize }),
|
|
95
|
+
nis2Significant && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Nis2Badge, { iconSize })
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
99
|
+
0 && (module.exports = {
|
|
100
|
+
ComplianceBadges,
|
|
101
|
+
DoraBadge,
|
|
102
|
+
Nis2Badge
|
|
103
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
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/compliance/index.ts
|
|
22
|
+
var compliance_exports = {};
|
|
23
|
+
__export(compliance_exports, {
|
|
24
|
+
ComplianceBadges: () => ComplianceBadges,
|
|
25
|
+
DoraBadge: () => DoraBadge,
|
|
26
|
+
Nis2Badge: () => Nis2Badge
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(compliance_exports);
|
|
29
|
+
|
|
30
|
+
// src/common/compliance/compliance-badge.tsx
|
|
31
|
+
var import_i18n2 = require("@kopexa/i18n");
|
|
32
|
+
var import_icons = require("@kopexa/icons");
|
|
33
|
+
var import_sight = require("@kopexa/sight");
|
|
34
|
+
var import_theme = require("@kopexa/theme");
|
|
35
|
+
|
|
36
|
+
// src/common/compliance/messages.ts
|
|
37
|
+
var import_i18n = require("@kopexa/i18n");
|
|
38
|
+
var messages = (0, import_i18n.defineMessages)({
|
|
39
|
+
dora_label: {
|
|
40
|
+
id: "grc.compliance.dora.label",
|
|
41
|
+
defaultMessage: "DORA"
|
|
42
|
+
},
|
|
43
|
+
dora_tooltip: {
|
|
44
|
+
id: "grc.compliance.dora.tooltip",
|
|
45
|
+
defaultMessage: "DORA Critical - Affects critical ICT functions"
|
|
46
|
+
},
|
|
47
|
+
nis2_label: {
|
|
48
|
+
id: "grc.compliance.nis2.label",
|
|
49
|
+
defaultMessage: "NIS2"
|
|
50
|
+
},
|
|
51
|
+
nis2_tooltip: {
|
|
52
|
+
id: "grc.compliance.nis2.tooltip",
|
|
53
|
+
defaultMessage: "NIS2 Significant - All-hazards risk"
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// src/common/compliance/compliance-badge.tsx
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
+
function DoraBadge({
|
|
60
|
+
tooltip,
|
|
61
|
+
iconSize = 12,
|
|
62
|
+
className
|
|
63
|
+
}) {
|
|
64
|
+
const intl = (0, import_i18n2.useSafeIntl)();
|
|
65
|
+
const styles = (0, import_theme.complianceBadge)({ color: "dora" });
|
|
66
|
+
const tooltipContent = tooltip != null ? tooltip : intl.formatMessage(messages.dora_tooltip);
|
|
67
|
+
const label = intl.formatMessage(messages.dora_label);
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Tooltip, { content: tooltipContent, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: styles.root({ className }), children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.DORAIcon, { size: iconSize, className: styles.icon() }),
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.label(), children: label })
|
|
71
|
+
] }) });
|
|
72
|
+
}
|
|
73
|
+
function Nis2Badge({
|
|
74
|
+
tooltip,
|
|
75
|
+
iconSize = 12,
|
|
76
|
+
className
|
|
77
|
+
}) {
|
|
78
|
+
const intl = (0, import_i18n2.useSafeIntl)();
|
|
79
|
+
const styles = (0, import_theme.complianceBadge)({ color: "nis2" });
|
|
80
|
+
const tooltipContent = tooltip != null ? tooltip : intl.formatMessage(messages.nis2_tooltip);
|
|
81
|
+
const label = intl.formatMessage(messages.nis2_label);
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sight.Tooltip, { content: tooltipContent, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: styles.root({ className }), children: [
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icons.NIS2Icon, { size: iconSize, className: styles.icon() }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles.label(), children: label })
|
|
85
|
+
] }) });
|
|
86
|
+
}
|
|
87
|
+
function ComplianceBadges({
|
|
88
|
+
doraCritical,
|
|
89
|
+
nis2Significant,
|
|
90
|
+
iconSize = 12,
|
|
91
|
+
className
|
|
92
|
+
}) {
|
|
93
|
+
if (!doraCritical && !nis2Significant) return null;
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: className != null ? className : "flex items-center gap-1", children: [
|
|
95
|
+
doraCritical && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DoraBadge, { iconSize }),
|
|
96
|
+
nis2Significant && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Nis2Badge, { iconSize })
|
|
97
|
+
] });
|
|
98
|
+
}
|
|
99
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
100
|
+
0 && (module.exports = {
|
|
101
|
+
ComplianceBadges,
|
|
102
|
+
DoraBadge,
|
|
103
|
+
Nis2Badge
|
|
104
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
dora_label: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
};
|
|
6
|
+
dora_tooltip: {
|
|
7
|
+
id: string;
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
};
|
|
10
|
+
nis2_label: {
|
|
11
|
+
id: string;
|
|
12
|
+
defaultMessage: string;
|
|
13
|
+
};
|
|
14
|
+
nis2_tooltip: {
|
|
15
|
+
id: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { messages };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
dora_label: {
|
|
3
|
+
id: string;
|
|
4
|
+
defaultMessage: string;
|
|
5
|
+
};
|
|
6
|
+
dora_tooltip: {
|
|
7
|
+
id: string;
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
};
|
|
10
|
+
nis2_label: {
|
|
11
|
+
id: string;
|
|
12
|
+
defaultMessage: string;
|
|
13
|
+
};
|
|
14
|
+
nis2_tooltip: {
|
|
15
|
+
id: string;
|
|
16
|
+
defaultMessage: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { messages };
|
|
@@ -0,0 +1,49 @@
|
|
|
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/compliance/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
|
+
dora_label: {
|
|
30
|
+
id: "grc.compliance.dora.label",
|
|
31
|
+
defaultMessage: "DORA"
|
|
32
|
+
},
|
|
33
|
+
dora_tooltip: {
|
|
34
|
+
id: "grc.compliance.dora.tooltip",
|
|
35
|
+
defaultMessage: "DORA Critical - Affects critical ICT functions"
|
|
36
|
+
},
|
|
37
|
+
nis2_label: {
|
|
38
|
+
id: "grc.compliance.nis2.label",
|
|
39
|
+
defaultMessage: "NIS2"
|
|
40
|
+
},
|
|
41
|
+
nis2_tooltip: {
|
|
42
|
+
id: "grc.compliance.nis2.tooltip",
|
|
43
|
+
defaultMessage: "NIS2 Significant - All-hazards risk"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
messages
|
|
49
|
+
});
|