@kartverket/backstage-plugin-risk-scorecard 3.5.0 → 3.5.8
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/dist/components/riScInfo/RiScInfo.esm.js +12 -74
- package/dist/components/riScInfo/RiScInfo.esm.js.map +1 -1
- package/dist/components/riScInfo/RiScSelectionCard.esm.js +84 -0
- package/dist/components/riScInfo/RiScSelectionCard.esm.js.map +1 -0
- package/dist/components/riScInfo/riScStatus/RiScDifferenceDialog.esm.js +17 -11
- package/dist/components/riScInfo/riScStatus/RiScDifferenceDialog.esm.js.map +1 -1
- package/dist/components/riScInfo/riScStatus/RiScStatusComponent.esm.js +57 -92
- package/dist/components/riScInfo/riScStatus/RiScStatusComponent.esm.js.map +1 -1
- package/dist/components/riScInfo/riScStatus/StatusIconWithText.esm.js +5 -7
- package/dist/components/riScInfo/riScStatus/StatusIconWithText.esm.js.map +1 -1
- package/dist/components/scenarioDrawer/components/ActionsSection.esm.js +34 -29
- package/dist/components/scenarioDrawer/components/ActionsSection.esm.js.map +1 -1
- package/dist/components/scenarioTable/ScenarioTable.esm.js +14 -9
- package/dist/components/scenarioTable/ScenarioTable.esm.js.map +1 -1
- package/dist/components/scenarioTable/ScenarioTableStyles.esm.js +5 -7
- package/dist/components/scenarioTable/ScenarioTableStyles.esm.js.map +1 -1
- package/dist/stores/ActionFiltersStore.esm.js +36 -0
- package/dist/stores/ActionFiltersStore.esm.js.map +1 -0
- package/dist/utils/translations.esm.js +2 -2
- package/dist/utils/translations.esm.js.map +1 -1
- package/dist/utils/utilityfunctions.esm.js +2 -2
- package/dist/utils/utilityfunctions.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/common/EditButton.esm.js +0 -16
- package/dist/components/common/EditButton.esm.js.map +0 -1
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
import { jsxs, jsx
|
|
2
|
-
import { Grid
|
|
3
|
-
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
4
|
-
import { pluginRiScTranslationRef } from '../../utils/translations.esm.js';
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Grid } from '@material-ui/core';
|
|
5
3
|
import { RiScStatusComponent } from './riScStatus/RiScStatusComponent.esm.js';
|
|
6
|
-
import { InfoCard } from '@backstage/core-components';
|
|
7
|
-
import EditButton from '../common/EditButton.esm.js';
|
|
8
4
|
import { useRiScs } from '../../contexts/RiScContext.esm.js';
|
|
9
|
-
import {
|
|
10
|
-
import AddCircle from '@mui/icons-material/AddCircle';
|
|
11
|
-
import Button from '@mui/material/Button';
|
|
5
|
+
import { RiScSelectionCard } from './RiScSelectionCard.esm.js';
|
|
12
6
|
|
|
13
7
|
function RiScInfo({
|
|
14
8
|
riScWithMetadata,
|
|
15
9
|
edit,
|
|
16
10
|
onCreateNew
|
|
17
11
|
}) {
|
|
18
|
-
const {
|
|
19
|
-
const { approveRiSc, riScs, selectedRiSc, selectRiSc } = useRiScs();
|
|
12
|
+
const { approveRiSc } = useRiScs();
|
|
20
13
|
return /* @__PURE__ */ jsxs(Grid, { container: true, children: [
|
|
21
14
|
/* @__PURE__ */ jsx(
|
|
22
15
|
Grid,
|
|
@@ -29,69 +22,14 @@ function RiScInfo({
|
|
|
29
22
|
display: "flex",
|
|
30
23
|
flexDirection: "column"
|
|
31
24
|
},
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
alignItems: "center",
|
|
41
|
-
mb: 1
|
|
42
|
-
},
|
|
43
|
-
children: [
|
|
44
|
-
/* @__PURE__ */ jsx(
|
|
45
|
-
Typography,
|
|
46
|
-
{
|
|
47
|
-
variant: "h6",
|
|
48
|
-
style: { fontSize: 16, marginBottom: 1 },
|
|
49
|
-
children: t("contentHeader.multipleRiScs")
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ jsx(
|
|
53
|
-
Button,
|
|
54
|
-
{
|
|
55
|
-
startIcon: /* @__PURE__ */ jsx(AddCircle, {}),
|
|
56
|
-
variant: "text",
|
|
57
|
-
color: "success",
|
|
58
|
-
onClick: onCreateNew,
|
|
59
|
-
sx: {
|
|
60
|
-
alignItems: "right"
|
|
61
|
-
},
|
|
62
|
-
children: t("contentHeader.createNewButton")
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
/* @__PURE__ */ jsx(
|
|
69
|
-
Select,
|
|
70
|
-
{
|
|
71
|
-
variant: "standard",
|
|
72
|
-
value: selectedRiSc?.id ?? "",
|
|
73
|
-
onChange: (e) => selectRiSc(e.target.value),
|
|
74
|
-
style: { width: "100%" },
|
|
75
|
-
children: riScs.map((riSc) => /* @__PURE__ */ jsx(MenuItem, { value: riSc.id, children: /* @__PURE__ */ jsx(ListItemText, { primary: riSc.content.title }) }, riSc.id)) ?? []
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] }) }),
|
|
79
|
-
/* @__PURE__ */ jsxs(
|
|
80
|
-
Box,
|
|
81
|
-
{
|
|
82
|
-
style: {
|
|
83
|
-
display: "flex",
|
|
84
|
-
alignItems: "center",
|
|
85
|
-
justifyContent: "space-between"
|
|
86
|
-
},
|
|
87
|
-
children: [
|
|
88
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: riScWithMetadata.content.title }),
|
|
89
|
-
/* @__PURE__ */ jsx(EditButton, { onClick: edit })
|
|
90
|
-
]
|
|
91
|
-
}
|
|
92
|
-
),
|
|
93
|
-
/* @__PURE__ */ jsx(Markdown, { description: riScWithMetadata.content.scope })
|
|
94
|
-
] })
|
|
25
|
+
children: /* @__PURE__ */ jsx(
|
|
26
|
+
RiScSelectionCard,
|
|
27
|
+
{
|
|
28
|
+
riScWithMetadata,
|
|
29
|
+
edit,
|
|
30
|
+
onCreateNew
|
|
31
|
+
}
|
|
32
|
+
)
|
|
95
33
|
}
|
|
96
34
|
),
|
|
97
35
|
/* @__PURE__ */ jsx(Grid, { item: true, xs: 12, sm: 6, md: 6, children: /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiScInfo.esm.js","sources":["../../../src/components/riScInfo/RiScInfo.tsx"],"sourcesContent":["import { RiScWithMetadata } from '../../utils/types';\nimport {
|
|
1
|
+
{"version":3,"file":"RiScInfo.esm.js","sources":["../../../src/components/riScInfo/RiScInfo.tsx"],"sourcesContent":["import { RiScWithMetadata } from '../../utils/types';\nimport { Grid } from '@material-ui/core';\nimport { RiScStatusComponent } from './riScStatus/RiScStatusComponent';\nimport { useRiScs } from '../../contexts/RiScContext';\nimport { RiScSelectionCard } from './RiScSelectionCard.tsx';\n\ninterface RiScInfoProps {\n riScWithMetadata: RiScWithMetadata;\n edit: () => void;\n onCreateNew: () => void;\n}\n\nexport function RiScInfo({\n riScWithMetadata,\n edit,\n onCreateNew,\n}: RiScInfoProps) {\n const { approveRiSc } = useRiScs();\n\n return (\n <Grid container>\n <Grid\n item\n xs={12}\n sm={6}\n md={6}\n style={{\n display: 'flex',\n flexDirection: 'column',\n }}\n >\n <RiScSelectionCard\n riScWithMetadata={riScWithMetadata}\n edit={edit}\n onCreateNew={onCreateNew}\n />\n </Grid>\n <Grid item xs={12} sm={6} md={6}>\n <RiScStatusComponent\n selectedRiSc={riScWithMetadata}\n publishRiScFn={approveRiSc}\n />\n </Grid>\n </Grid>\n );\n}\n"],"names":[],"mappings":";;;;;;AAYO,SAAS,QAAS,CAAA;AAAA,EACvB,gBAAA;AAAA,EACA,IAAA;AAAA,EACA;AACF,CAAkB,EAAA;AAChB,EAAM,MAAA,EAAE,WAAY,EAAA,GAAI,QAAS,EAAA;AAEjC,EACE,uBAAA,IAAA,CAAC,IAAK,EAAA,EAAA,SAAA,EAAS,IACb,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,IAAI,EAAA,IAAA;AAAA,QACJ,EAAI,EAAA,EAAA;AAAA,QACJ,EAAI,EAAA,CAAA;AAAA,QACJ,EAAI,EAAA,CAAA;AAAA,QACJ,KAAO,EAAA;AAAA,UACL,OAAS,EAAA,MAAA;AAAA,UACT,aAAe,EAAA;AAAA,SACjB;AAAA,QAEA,QAAA,kBAAA,GAAA;AAAA,UAAC,iBAAA;AAAA,UAAA;AAAA,YACC,gBAAA;AAAA,YACA,IAAA;AAAA,YACA;AAAA;AAAA;AACF;AAAA,KACF;AAAA,oBACA,GAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EAAI,EAAA,EAAA,EAAI,CAAG,EAAA,EAAA,EAAI,CAC5B,EAAA,QAAA,kBAAA,GAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,YAAc,EAAA,gBAAA;AAAA,QACd,aAAe,EAAA;AAAA;AAAA,KAEnB,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import { Markdown } from '../common/Markdown.esm.js';
|
|
3
|
+
import { useRiScs } from '../../contexts/RiScContext.esm.js';
|
|
4
|
+
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
5
|
+
import { pluginRiScTranslationRef } from '../../utils/translations.esm.js';
|
|
6
|
+
import { Card, CardHeader, Flex, Text, Button, Select, CardBody, ButtonIcon } from '@backstage/ui';
|
|
7
|
+
|
|
8
|
+
function RiScSelectionCard(props) {
|
|
9
|
+
const { riScs, selectedRiSc, selectRiSc } = useRiScs();
|
|
10
|
+
const { t } = useTranslationRef(pluginRiScTranslationRef);
|
|
11
|
+
return /* @__PURE__ */ jsxs(Card, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx(CardHeader, { children: riScs !== null && riScs.length !== 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13
|
+
/* @__PURE__ */ jsxs(
|
|
14
|
+
Flex,
|
|
15
|
+
{
|
|
16
|
+
justify: "between",
|
|
17
|
+
align: "center",
|
|
18
|
+
style: {
|
|
19
|
+
marginBottom: "16px",
|
|
20
|
+
marginTop: "8px"
|
|
21
|
+
},
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx(Text, { variant: "title-small", as: "h6", weight: "bold", children: t("contentHeader.multipleRiScs") }),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
Button,
|
|
26
|
+
{
|
|
27
|
+
iconStart: /* @__PURE__ */ jsx("i", { className: "ri-add-line" }),
|
|
28
|
+
variant: "secondary",
|
|
29
|
+
onClick: props.onCreateNew,
|
|
30
|
+
style: {
|
|
31
|
+
color: "#2E7D32"
|
|
32
|
+
// Green color from MUI, change when BUI is more mature
|
|
33
|
+
},
|
|
34
|
+
children: t("contentHeader.createNewButton")
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
Select,
|
|
42
|
+
{
|
|
43
|
+
options: riScs.map((riSc) => ({
|
|
44
|
+
value: riSc.id,
|
|
45
|
+
label: riSc.content.title
|
|
46
|
+
})),
|
|
47
|
+
onSelectionChange: (key) => {
|
|
48
|
+
if (key) selectRiSc(key.toString());
|
|
49
|
+
},
|
|
50
|
+
defaultSelectedKey: selectedRiSc?.id ?? "",
|
|
51
|
+
size: "medium"
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] }) }),
|
|
55
|
+
/* @__PURE__ */ jsxs(CardBody, { children: [
|
|
56
|
+
/* @__PURE__ */ jsxs(
|
|
57
|
+
Flex,
|
|
58
|
+
{
|
|
59
|
+
justify: "between",
|
|
60
|
+
align: "center",
|
|
61
|
+
style: {
|
|
62
|
+
marginBottom: "16px",
|
|
63
|
+
marginTop: "8px"
|
|
64
|
+
},
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Text, { variant: "title-x-small", as: "h5", weight: "bold", children: props.riScWithMetadata.content.title }),
|
|
67
|
+
/* @__PURE__ */ jsx(
|
|
68
|
+
ButtonIcon,
|
|
69
|
+
{
|
|
70
|
+
onClick: props.edit,
|
|
71
|
+
icon: /* @__PURE__ */ jsx("i", { className: "ri-pencil-line", style: { fontSize: "x-large" } }),
|
|
72
|
+
variant: "tertiary"
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ jsx(Markdown, { description: props.riScWithMetadata.content.scope })
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { RiScSelectionCard };
|
|
84
|
+
//# sourceMappingURL=RiScSelectionCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RiScSelectionCard.esm.js","sources":["../../../src/components/riScInfo/RiScSelectionCard.tsx"],"sourcesContent":["import { Markdown } from '../common/Markdown.tsx';\nimport { RiScWithMetadata } from '../../utils/types.ts';\nimport { useRiScs } from '../../contexts/RiScContext.tsx';\nimport { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { pluginRiScTranslationRef } from '../../utils/translations.ts';\nimport {\n Card,\n CardBody,\n CardHeader,\n Button,\n Text,\n Select,\n ButtonIcon,\n Flex,\n} from '@backstage/ui';\n\ninterface Props {\n riScWithMetadata: RiScWithMetadata;\n edit: () => void;\n onCreateNew: () => void;\n}\n\nexport function RiScSelectionCard(props: Props) {\n const { riScs, selectedRiSc, selectRiSc } = useRiScs();\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n return (\n <Card>\n <CardHeader>\n {riScs !== null && riScs.length !== 0 && (\n <>\n <Flex\n justify=\"between\"\n align=\"center\"\n style={{\n marginBottom: '16px',\n marginTop: '8px',\n }}\n >\n <Text variant=\"title-small\" as=\"h6\" weight=\"bold\">\n {t('contentHeader.multipleRiScs')}\n </Text>\n <Button\n iconStart={<i className=\"ri-add-line\" />}\n variant=\"secondary\"\n onClick={props.onCreateNew}\n style={{\n color: '#2E7D32', // Green color from MUI, change when BUI is more mature\n }}\n >\n {t('contentHeader.createNewButton')}\n </Button>\n </Flex>\n <Select\n options={riScs.map(riSc => ({\n value: riSc.id,\n label: riSc.content.title,\n }))}\n onSelectionChange={key => {\n if (key) selectRiSc(key.toString());\n }}\n defaultSelectedKey={selectedRiSc?.id ?? ''}\n size=\"medium\"\n />\n </>\n )}\n </CardHeader>\n <CardBody>\n <Flex\n justify=\"between\"\n align=\"center\"\n style={{\n marginBottom: '16px',\n marginTop: '8px',\n }}\n >\n <Text variant=\"title-x-small\" as=\"h5\" weight=\"bold\">\n {props.riScWithMetadata.content.title}\n </Text>\n <ButtonIcon\n onClick={props.edit}\n icon={\n <i className=\"ri-pencil-line\" style={{ fontSize: 'x-large' }} />\n }\n variant=\"tertiary\"\n />\n </Flex>\n <Markdown description={props.riScWithMetadata.content.scope} />\n </CardBody>\n </Card>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAsBO,SAAS,kBAAkB,KAAc,EAAA;AAC9C,EAAA,MAAM,EAAE,KAAA,EAAO,YAAc,EAAA,UAAA,KAAe,QAAS,EAAA;AACrD,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AAExD,EAAA,4BACG,IACC,EAAA,EAAA,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,cACE,QAAU,EAAA,KAAA,KAAA,IAAA,IAAQ,KAAM,CAAA,MAAA,KAAW,qBAEhC,IAAA,CAAA,QAAA,EAAA,EAAA,QAAA,EAAA;AAAA,sBAAA,IAAA;AAAA,QAAC,IAAA;AAAA,QAAA;AAAA,UACC,OAAQ,EAAA,SAAA;AAAA,UACR,KAAM,EAAA,QAAA;AAAA,UACN,KAAO,EAAA;AAAA,YACL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d,SAAW,EAAA;AAAA,WACb;AAAA,UAEA,QAAA,EAAA;AAAA,4BAAC,GAAA,CAAA,IAAA,EAAA,EAAK,OAAQ,EAAA,eAAA,EAAgB,EAAG,EAAA,IAAA,EAAK,QAAO,MAC1C,EAAA,QAAA,EAAA,KAAA,CAAM,gBAAiB,CAAA,OAAA,CAAQ,KAClC,EAAA,CAAA;AAAA,4BACA,GAAA;AAAA,cAAC,UAAA;AAAA,cAAA;AAAA,gBACC,SAAS,KAAM,CAAA,IAAA;AAAA,gBACf,IAAA,sBACG,GAAE,EAAA,EAAA,SAAA,EAAU,kBAAiB,KAAO,EAAA,EAAE,QAAU,EAAA,SAAA,EAAa,EAAA,CAAA;AAAA,gBAEhE,OAAQ,EAAA;AAAA;AAAA;AACV;AAAA;AAAA,OACF;AAAA,0BACC,QAAS,EAAA,EAAA,WAAA,EAAa,KAAM,CAAA,gBAAA,CAAiB,QAAQ,KAAO,EAAA;AAAA,KAC/D,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
3
3
|
import { ErrorOutline, Favorite } from '@mui/icons-material';
|
|
4
|
-
import Box from '@mui/material/Box';
|
|
5
4
|
import CircularProgress from '@mui/material/CircularProgress';
|
|
6
|
-
import Typography from '@mui/material/Typography';
|
|
7
5
|
import { DateTime } from 'luxon';
|
|
8
6
|
import { pluginRiScTranslationRef } from '../../../utils/translations.esm.js';
|
|
9
7
|
import { DifferenceStatus } from '../../../utils/types.esm.js';
|
|
10
8
|
import { parseISODateFromEncryptedROS } from '../../../utils/utilityfunctions.esm.js';
|
|
11
9
|
import { RiScChangeSet } from '../changeset/RiScChangeSet.esm.js';
|
|
10
|
+
import { Box, Text } from '@backstage/ui';
|
|
12
11
|
|
|
13
12
|
function RiScDifferenceDialog({
|
|
14
13
|
differenceFetchState
|
|
@@ -18,17 +17,24 @@ function RiScDifferenceDialog({
|
|
|
18
17
|
differenceFetchState.defaultLastModifiedDateString
|
|
19
18
|
);
|
|
20
19
|
const parsedDateString = formatedDateString ? DateTime.fromISO(formatedDateString).toLocaleString() : null;
|
|
21
|
-
return /* @__PURE__ */ jsxs(Box, {
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
/* @__PURE__ */ jsx(
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
return /* @__PURE__ */ jsxs(Box, { style: { paddingBottom: "24px" }, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(Text, { as: "p", style: { fontSize: "16px" }, children: t("rosStatus.difference.description") }),
|
|
22
|
+
/* @__PURE__ */ jsx(
|
|
23
|
+
Text,
|
|
24
|
+
{
|
|
25
|
+
as: "p",
|
|
26
|
+
style: { fontSize: "13px", fontWeight: 700, paddingBottom: "16px" },
|
|
27
|
+
children: parsedDateString && t("rosStatus.difference.publishDate", {
|
|
28
|
+
date: parsedDateString
|
|
29
|
+
})
|
|
30
|
+
}
|
|
31
|
+
),
|
|
26
32
|
/* @__PURE__ */ jsxs(Box, { children: [
|
|
27
|
-
/* @__PURE__ */ jsx(
|
|
33
|
+
/* @__PURE__ */ jsx(Text, { as: "h3", style: { fontWeight: 700, fontSize: "18px" }, children: t("rosStatus.difference.differences.title") }),
|
|
28
34
|
differenceFetchState.isLoading && /* @__PURE__ */ jsxs(
|
|
29
35
|
Box,
|
|
30
36
|
{
|
|
31
|
-
|
|
37
|
+
style: {
|
|
32
38
|
display: "flex",
|
|
33
39
|
flexDirection: "column",
|
|
34
40
|
alignItems: "center",
|
|
@@ -49,7 +55,7 @@ function RiScDifferenceDialog({
|
|
|
49
55
|
differenceFetchState.status !== null && differenceFetchState.status !== DifferenceStatus.Success && differenceFetchState.status !== DifferenceStatus.GithubFileNotFound && /* @__PURE__ */ jsxs(
|
|
50
56
|
Box,
|
|
51
57
|
{
|
|
52
|
-
|
|
58
|
+
style: {
|
|
53
59
|
display: "flex",
|
|
54
60
|
flexDirection: "column",
|
|
55
61
|
alignItems: "center",
|
|
@@ -73,7 +79,7 @@ function RiScDifferenceDialog({
|
|
|
73
79
|
differenceFetchState.status !== null && differenceFetchState.status === DifferenceStatus.GithubFileNotFound && /* @__PURE__ */ jsxs(
|
|
74
80
|
Box,
|
|
75
81
|
{
|
|
76
|
-
|
|
82
|
+
style: {
|
|
77
83
|
display: "flex",
|
|
78
84
|
flexDirection: "column",
|
|
79
85
|
alignItems: "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RiScDifferenceDialog.esm.js","sources":["../../../../src/components/riScInfo/riScStatus/RiScDifferenceDialog.tsx"],"sourcesContent":["import { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { ErrorOutline, Favorite } from '@mui/icons-material';\nimport
|
|
1
|
+
{"version":3,"file":"RiScDifferenceDialog.esm.js","sources":["../../../../src/components/riScInfo/riScStatus/RiScDifferenceDialog.tsx"],"sourcesContent":["import { useTranslationRef } from '@backstage/core-plugin-api/alpha';\nimport { ErrorOutline, Favorite } from '@mui/icons-material';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport { DateTime } from 'luxon';\nimport { pluginRiScTranslationRef } from '../../../utils/translations';\nimport { DifferenceFetchState, DifferenceStatus } from '../../../utils/types';\nimport { parseISODateFromEncryptedROS } from '../../../utils/utilityfunctions';\nimport { RiScChangeSet } from '../changeset/RiScChangeSet.tsx';\nimport { Text, Box } from '@backstage/ui';\n\ntype RiScDifferenceDialogProps = {\n differenceFetchState: DifferenceFetchState;\n};\n\nexport function RiScDifferenceDialog({\n differenceFetchState,\n}: RiScDifferenceDialogProps) {\n const { t } = useTranslationRef(pluginRiScTranslationRef);\n\n const formatedDateString = parseISODateFromEncryptedROS(\n differenceFetchState.defaultLastModifiedDateString,\n );\n\n const parsedDateString = formatedDateString\n ? DateTime.fromISO(formatedDateString).toLocaleString()\n : null;\n return (\n <Box style={{ paddingBottom: '24px' }}>\n <Text as=\"p\" style={{ fontSize: '16px' }}>\n {t('rosStatus.difference.description')}\n </Text>\n <Text\n as=\"p\"\n style={{ fontSize: '13px', fontWeight: 700, paddingBottom: '16px' }}\n >\n {parsedDateString &&\n t('rosStatus.difference.publishDate', {\n date: parsedDateString,\n })}\n </Text>\n <Box>\n <Text as=\"h3\" style={{ fontWeight: 700, fontSize: '18px' }}>\n {t('rosStatus.difference.differences.title')}\n </Text>\n {differenceFetchState.isLoading && (\n <Box\n style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n margin: 'auto 0',\n }}\n >\n <CircularProgress\n size={30}\n sx={{ marginLeft: 1, color: 'inherit', margin: '10px' }}\n />\n {t('rosStatus.difference.fetching')}\n </Box>\n )}\n {differenceFetchState.status !== null &&\n differenceFetchState.status !== DifferenceStatus.Success &&\n differenceFetchState.status !==\n DifferenceStatus.GithubFileNotFound && (\n <Box\n style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n margin: 'auto 0',\n }}\n >\n <ErrorOutline\n sx={{\n fontSize: '30px',\n marginBottom: '16px',\n color: 'red',\n }}\n />\n {t('rosStatus.difference.error')}\n </Box>\n )}\n {differenceFetchState.status !== null &&\n differenceFetchState.status ===\n DifferenceStatus.GithubFileNotFound && (\n <Box\n style={{\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n margin: 'auto 0',\n }}\n >\n <Favorite\n sx={{\n fontSize: '30px',\n marginBottom: '16px',\n color: 'green',\n }}\n />\n {t('rosStatus.difference.newROS')}\n </Box>\n )}\n {differenceFetchState.status === DifferenceStatus.Success && (\n <RiScChangeSet changeset={differenceFetchState} />\n )}\n </Box>\n </Box>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAcO,SAAS,oBAAqB,CAAA;AAAA,EACnC;AACF,CAA8B,EAAA;AAC5B,EAAA,MAAM,EAAE,CAAA,EAAM,GAAA,iBAAA,CAAkB,wBAAwB,CAAA;AAExD,EAAA,MAAM,kBAA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B;AAAA;AAAA;AAAA,OAClC;AAAA,MAEH,qBAAqB,MAAW,KAAA,gBAAA,CAAiB,2BAC/C,GAAA,CAAA,aAAA,EAAA,EAAc,WAAW,oBAAsB,EAAA;AAAA,KAEpD,EAAA;AAAA,GACF,EAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { RiScStatus, DifferenceStatus } from '../../../utils/types.esm.js';
|
|
4
|
-
import Button from '@mui/material/Button';
|
|
5
4
|
import Link from '@mui/material/Link';
|
|
6
|
-
import Typography from '@mui/material/Typography';
|
|
7
5
|
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
|
8
6
|
import { pluginRiScTranslationRef } from '../../../utils/translations.esm.js';
|
|
9
|
-
import { InfoCard } from '@backstage/core-components';
|
|
10
7
|
import { useRiScs } from '../../../contexts/RiScContext.esm.js';
|
|
11
|
-
import { subtitle1 } from '../../common/typography.esm.js';
|
|
12
|
-
import Box from '@mui/material/Box';
|
|
13
|
-
import { WarningAmberOutlined } from '@mui/icons-material';
|
|
14
8
|
import { useAuthenticatedFetch } from '../../../utils/hooks.esm.js';
|
|
15
9
|
import Progress from './Progress.esm.js';
|
|
16
10
|
import { RiScMigrationDialog } from '../MigrationDialog.esm.js';
|
|
@@ -27,6 +21,7 @@ import { calculateDaysSince, calculateUpdatedStatus, UpdatedStatusEnum } from '.
|
|
|
27
21
|
import { RiScStatusEnum } from './utils.esm.js';
|
|
28
22
|
import { StatusIconWithText } from './StatusIconWithText.esm.js';
|
|
29
23
|
import DeleteIcon from '@mui/icons-material/Delete';
|
|
24
|
+
import { Card, CardBody, Text, Box, Flex, Button } from '@backstage/ui';
|
|
30
25
|
|
|
31
26
|
const emptyDifferenceFetchState = {
|
|
32
27
|
differenceState: {
|
|
@@ -48,9 +43,9 @@ const emptyDifferenceFetchState = {
|
|
|
48
43
|
defaultLastModifiedDateString: ""
|
|
49
44
|
};
|
|
50
45
|
function StatusBadge({ icon: Icon, text }) {
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
46
|
+
return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "2", children: [
|
|
52
47
|
/* @__PURE__ */ jsx(Icon, {}),
|
|
53
|
-
/* @__PURE__ */ jsx(
|
|
48
|
+
/* @__PURE__ */ jsx(Text, { as: "p", variant: "body-large", children: text })
|
|
54
49
|
] });
|
|
55
50
|
}
|
|
56
51
|
function RiScStatusComponent({
|
|
@@ -166,76 +161,53 @@ function RiScStatusComponent({
|
|
|
166
161
|
text: t("rosStatus.statusBadge.waitingDeletion")
|
|
167
162
|
}
|
|
168
163
|
};
|
|
169
|
-
return /* @__PURE__ */ jsxs(
|
|
170
|
-
/* @__PURE__ */ jsx(
|
|
164
|
+
return /* @__PURE__ */ jsx(Card, { style: { borderRadius: "4px" }, children: /* @__PURE__ */ jsxs(CardBody, { style: { padding: "4px" }, children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Text, { variant: "title-small", weight: "bold", as: "h5", children: "Status" }),
|
|
171
166
|
!migration && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
172
|
-
/* @__PURE__ */ jsx(Box, { mt:
|
|
173
|
-
/* @__PURE__ */ jsxs(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
{
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
paragraph: true,
|
|
205
|
-
variant: "subtitle1",
|
|
206
|
-
mb: 0,
|
|
207
|
-
ml: 5,
|
|
208
|
-
align: "right",
|
|
209
|
-
children: [
|
|
210
|
-
t("rosStatus.prStatus"),
|
|
211
|
-
/* @__PURE__ */ jsx(Link, { target: "_blank", href: selectedRiSc.pullRequestUrl, children: "Github" }),
|
|
212
|
-
status === RiScStatusEnum.WAITING && t("rosStatus.prStatus2Update"),
|
|
213
|
-
status === RiScStatusEnum.DELETION_WAITING && t("rosStatus.prStatus2Delete")
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
),
|
|
217
|
-
status === RiScStatusEnum.PUBLISHED && /* @__PURE__ */ jsx(
|
|
218
|
-
Typography,
|
|
219
|
-
{
|
|
220
|
-
paragraph: true,
|
|
221
|
-
variant: "subtitle1",
|
|
222
|
-
display: "flex",
|
|
223
|
-
gap: 1,
|
|
224
|
-
mb: 0,
|
|
225
|
-
children: t("rosStatus.statusBadge.approved")
|
|
226
|
-
}
|
|
227
|
-
)
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
),
|
|
167
|
+
/* @__PURE__ */ jsx(Box, { mt: "2", children: /* @__PURE__ */ jsx(Progress, { step: status }) }),
|
|
168
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "row", justify: "between", mt: "4", children: [
|
|
169
|
+
/* @__PURE__ */ jsx(
|
|
170
|
+
StatusBadge,
|
|
171
|
+
{
|
|
172
|
+
icon: statusMap[status].icon,
|
|
173
|
+
text: statusMap[status].text
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ jsxs(
|
|
177
|
+
Flex,
|
|
178
|
+
{
|
|
179
|
+
direction: "row",
|
|
180
|
+
ml: "auto",
|
|
181
|
+
mb: "4",
|
|
182
|
+
"min-width": "0",
|
|
183
|
+
style: { textAlign: "right" },
|
|
184
|
+
children: [
|
|
185
|
+
status === RiScStatusEnum.CREATED && /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-large", children: t("rosStatus.editing") }),
|
|
186
|
+
status === RiScStatusEnum.DRAFT && /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-large", children: t("rosStatus.statusBadge.missing") }),
|
|
187
|
+
status === RiScStatusEnum.DELETION_DRAFT && /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-large", children: t("rosStatus.statusBadge.deletionApproval") }),
|
|
188
|
+
(status === RiScStatusEnum.WAITING || status === RiScStatusEnum.DELETION_WAITING) && /* @__PURE__ */ jsxs(Text, { as: "p", variant: "body-large", children: [
|
|
189
|
+
t("rosStatus.prStatus"),
|
|
190
|
+
/* @__PURE__ */ jsx(Link, { target: "_blank", href: selectedRiSc.pullRequestUrl, children: "GitHub" }),
|
|
191
|
+
status === RiScStatusEnum.WAITING && t("rosStatus.prStatus2Update"),
|
|
192
|
+
status === RiScStatusEnum.DELETION_WAITING && t("rosStatus.prStatus2Delete")
|
|
193
|
+
] }),
|
|
194
|
+
status === RiScStatusEnum.PUBLISHED && /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-large", children: t("rosStatus.statusBadge.approved") })
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
)
|
|
198
|
+
] }),
|
|
231
199
|
(status === RiScStatusEnum.DRAFT || status === RiScStatusEnum.DELETION_DRAFT) && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
232
200
|
/* @__PURE__ */ jsxs(
|
|
233
201
|
Button,
|
|
234
202
|
{
|
|
235
|
-
|
|
236
|
-
|
|
203
|
+
variant: "primary",
|
|
204
|
+
size: "medium",
|
|
237
205
|
onClick: handleOpenPublishRiScDialog,
|
|
238
|
-
|
|
206
|
+
style: {
|
|
207
|
+
display: "block",
|
|
208
|
+
marginLeft: "auto",
|
|
209
|
+
fontSize: "14px"
|
|
210
|
+
},
|
|
239
211
|
children: [
|
|
240
212
|
status === RiScStatusEnum.DRAFT && t("rosStatus.approveButtonUpdate"),
|
|
241
213
|
status === RiScStatusEnum.DELETION_DRAFT && t("rosStatus.approveButtonDelete")
|
|
@@ -255,28 +227,21 @@ function RiScStatusComponent({
|
|
|
255
227
|
] })
|
|
256
228
|
] }),
|
|
257
229
|
migration && selectedRiSc.migrationStatus && /* @__PURE__ */ jsxs(Box, { children: [
|
|
258
|
-
/* @__PURE__ */ jsxs(
|
|
259
|
-
/* @__PURE__ */ jsx(
|
|
260
|
-
WarningAmberOutlined,
|
|
261
|
-
{
|
|
262
|
-
fontSize: "medium",
|
|
263
|
-
sx: { transform: "translateY(5px)", marginTop: "5px" }
|
|
264
|
-
}
|
|
265
|
-
),
|
|
230
|
+
/* @__PURE__ */ jsx(Box, { mt: "2", mb: "2", children: /* @__PURE__ */ jsxs(Text, { as: "p", variant: "body-large", weight: "bold", children: [
|
|
231
|
+
/* @__PURE__ */ jsx("i", { className: "ri-error-warning-line" }),
|
|
266
232
|
" ",
|
|
267
233
|
t("rosStatus.statusBadge.migration.title")
|
|
268
|
-
] }),
|
|
269
|
-
/* @__PURE__ */ jsx(
|
|
270
|
-
/* @__PURE__ */ jsx(
|
|
234
|
+
] }) }),
|
|
235
|
+
/* @__PURE__ */ jsx(Text, { as: "p", variant: "body-large", children: t("rosStatus.statusBadge.migration.description") }),
|
|
236
|
+
/* @__PURE__ */ jsx(Flex, { direction: "column", mt: "4", align: "end", children: /* @__PURE__ */ jsx(
|
|
271
237
|
Button,
|
|
272
238
|
{
|
|
273
|
-
|
|
274
|
-
|
|
239
|
+
variant: "primary",
|
|
240
|
+
size: "medium",
|
|
275
241
|
onClick: () => setMigrationDialogIsOpen(!migrationDialogIsOpen),
|
|
276
|
-
|
|
277
|
-
children: /* @__PURE__ */ jsx(Typography, { variant: "button", children: t("rosStatus.moreInformationButton") })
|
|
242
|
+
children: t("rosStatus.moreInformationButton")
|
|
278
243
|
}
|
|
279
|
-
),
|
|
244
|
+
) }),
|
|
280
245
|
/* @__PURE__ */ jsx(
|
|
281
246
|
RiScMigrationDialog,
|
|
282
247
|
{
|
|
@@ -287,9 +252,9 @@ function RiScStatusComponent({
|
|
|
287
252
|
}
|
|
288
253
|
)
|
|
289
254
|
] }),
|
|
290
|
-
!selectedRiSc && /* @__PURE__ */ jsx(
|
|
291
|
-
/* @__PURE__ */ jsx(
|
|
292
|
-
] });
|
|
255
|
+
!selectedRiSc && /* @__PURE__ */ jsx(Text, { as: "span", children: t("rosStatus.statusBadge.error") }),
|
|
256
|
+
/* @__PURE__ */ jsx(Flex, { direction: "row", mt: "4", children: renderStatusContent() })
|
|
257
|
+
] }) });
|
|
293
258
|
function renderStatusContent() {
|
|
294
259
|
if (numOfCommitsBehind !== null && daysSinceLastModified !== null) {
|
|
295
260
|
return /* @__PURE__ */ jsx(
|