react-data-matrix 0.1.9 → 0.3.1
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/README.md +229 -164
- package/dist/components/MatrixHeaders.tsx +92 -0
- package/dist/components/MatrixRows.tsx +135 -0
- package/dist/components/ReactMatrix.tsx +47 -0
- package/dist/components/TableData.tsx +48 -0
- package/dist/context/index.tsx +66 -0
- package/dist/helpers/getStyles.ts +77 -0
- package/dist/index.ts +1 -0
- package/dist/types/index.d.ts +106 -0
- package/dist/utils/data.ts +346 -0
- package/dist/utils/functions.ts +33 -0
- package/package.json +16 -8
- package/dist/components/matrixHeaders.js +0 -78
- package/dist/components/matrixRows.js +0 -84
- package/dist/components/reactMatrix.js +0 -106
- package/dist/components/tableData.js +0 -63
- package/dist/context/index.js +0 -37
- package/dist/helpers/getStyles.js +0 -54
- package/dist/index.js +0 -13
- package/dist/utils/data.js +0 -315
- package/dist/utils/functions.js +0 -35
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { FC, useContext } from "react";
|
|
2
|
+
import {
|
|
3
|
+
getTableStyles,
|
|
4
|
+
getTableBoarder,
|
|
5
|
+
getContainerStyles,
|
|
6
|
+
} from "../helpers/getStyles";
|
|
7
|
+
import MatrixHeaders from "./MatrixHeaders";
|
|
8
|
+
import MatrixRows from "./MatrixRows";
|
|
9
|
+
import Context from "../context";
|
|
10
|
+
import { ReactMatrixProps } from "../types";
|
|
11
|
+
|
|
12
|
+
const ReactMatrix: FC<ReactMatrixProps> = ({ tableStyles = {} }) => {
|
|
13
|
+
const {
|
|
14
|
+
matrixName,
|
|
15
|
+
tableStyles: contextTableStyles,
|
|
16
|
+
hasTableBorder: contextHasTableBorder,
|
|
17
|
+
hasInlineStyles: contextHasInlineStyles,
|
|
18
|
+
matrixDescription,
|
|
19
|
+
hasContainerStyles: contextHasContainerStyles,
|
|
20
|
+
tableContainerStyles: contextTableContainerStyles,
|
|
21
|
+
} = useContext(Context);
|
|
22
|
+
|
|
23
|
+
const tableBorder = getTableBoarder(
|
|
24
|
+
contextHasInlineStyles && contextHasTableBorder
|
|
25
|
+
);
|
|
26
|
+
const tableElmStyles = getTableStyles(
|
|
27
|
+
!!(contextHasInlineStyles && contextTableStyles),
|
|
28
|
+
tableStyles
|
|
29
|
+
);
|
|
30
|
+
const containerStyles = getContainerStyles(
|
|
31
|
+
contextHasInlineStyles && contextHasContainerStyles,
|
|
32
|
+
contextTableContainerStyles
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<div style={containerStyles}>
|
|
37
|
+
<h1>{matrixName}</h1>
|
|
38
|
+
<h4>{matrixDescription}</h4>
|
|
39
|
+
<table id="matrix-table" style={{ ...tableElmStyles, ...tableBorder }}>
|
|
40
|
+
<MatrixHeaders />
|
|
41
|
+
<MatrixRows />
|
|
42
|
+
</table>
|
|
43
|
+
</div>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default ReactMatrix;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { FC } from "react";
|
|
2
|
+
import { TableDataProps } from "../types";
|
|
3
|
+
|
|
4
|
+
const TableData: FC<TableDataProps> = ({
|
|
5
|
+
data,
|
|
6
|
+
tdStyles = {},
|
|
7
|
+
hasInlineStyles = true,
|
|
8
|
+
customTableDataDynamicIdValue = "",
|
|
9
|
+
}) => {
|
|
10
|
+
const handleCellClick = (tdSelected: TableDataProps["data"]) => {
|
|
11
|
+
alert(
|
|
12
|
+
`${tdSelected?.description}, ${tdSelected?.score_value} \n${tdSelected?.response}`
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const customTdStyles = !tdStyles ? {} : tdStyles;
|
|
17
|
+
const tableDataStyles: React.CSSProperties = hasInlineStyles
|
|
18
|
+
? {
|
|
19
|
+
cursor: "pointer",
|
|
20
|
+
textAlign: "center",
|
|
21
|
+
borderColor: "black",
|
|
22
|
+
borderStyle: "solid",
|
|
23
|
+
borderWidth: `${1}px`,
|
|
24
|
+
backgroundColor: data?.colour,
|
|
25
|
+
...tdStyles,
|
|
26
|
+
}
|
|
27
|
+
: { ...customTdStyles };
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<>
|
|
31
|
+
<td
|
|
32
|
+
style={tableDataStyles}
|
|
33
|
+
onClick={() => handleCellClick(data)}
|
|
34
|
+
id={`react-matrix-dynamic-table-data${
|
|
35
|
+
!customTableDataDynamicIdValue
|
|
36
|
+
? ""
|
|
37
|
+
: `-${customTableDataDynamicIdValue}`
|
|
38
|
+
}`}
|
|
39
|
+
>
|
|
40
|
+
{`${data?.description}`}
|
|
41
|
+
<br />
|
|
42
|
+
{`(${data?.score_value})`}
|
|
43
|
+
</td>
|
|
44
|
+
</>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default TableData;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { createContext } from "react";
|
|
2
|
+
import { MatrixData } from "../types";
|
|
3
|
+
|
|
4
|
+
interface ContextType {
|
|
5
|
+
data: MatrixData;
|
|
6
|
+
matrixName: string;
|
|
7
|
+
matrixDescription: string;
|
|
8
|
+
hasTableBorder: boolean;
|
|
9
|
+
rowPrimaryUpper: boolean;
|
|
10
|
+
hasInlineStyles: boolean;
|
|
11
|
+
matrixSizeSelected: number;
|
|
12
|
+
headerPrimaryUpper: boolean;
|
|
13
|
+
hasContainerStyles: boolean;
|
|
14
|
+
reverseMatrixValues: boolean;
|
|
15
|
+
tableContainerStyles: Record<string, any>;
|
|
16
|
+
tableStyles: Record<string, any>;
|
|
17
|
+
thRowStyles: Record<string, any>;
|
|
18
|
+
thTitleStyles: Record<string, any>;
|
|
19
|
+
thSubTitleStyles: Record<string, any>;
|
|
20
|
+
thPrimaryTitleStyles: Record<string, any>;
|
|
21
|
+
trRowStyles: Record<string, any>;
|
|
22
|
+
trTitleStyles: Record<string, any>;
|
|
23
|
+
trSubTitleStyles: Record<string, any>;
|
|
24
|
+
trPrimaryTitleStyles: Record<string, any>;
|
|
25
|
+
tdStyles: Record<string, any>;
|
|
26
|
+
customHeaderRowIdValue: string;
|
|
27
|
+
customRowDynamicIdValue: string;
|
|
28
|
+
customTableDataDynamicIdValue: string;
|
|
29
|
+
customRowHeaderDynamicIdValue: string;
|
|
30
|
+
customDynamicHeaderTitleIdValue: string;
|
|
31
|
+
customDynamicSubHeaderTitleIdValue: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const Context = createContext<ContextType>({
|
|
35
|
+
data: {} as MatrixData,
|
|
36
|
+
matrixName: "",
|
|
37
|
+
matrixDescription: "",
|
|
38
|
+
hasTableBorder: true,
|
|
39
|
+
rowPrimaryUpper: true,
|
|
40
|
+
hasInlineStyles: true,
|
|
41
|
+
matrixSizeSelected: 5,
|
|
42
|
+
headerPrimaryUpper: true,
|
|
43
|
+
hasContainerStyles: true,
|
|
44
|
+
reverseMatrixValues: true,
|
|
45
|
+
tableContainerStyles: {},
|
|
46
|
+
tableStyles: {},
|
|
47
|
+
thRowStyles: {},
|
|
48
|
+
thTitleStyles: {},
|
|
49
|
+
thSubTitleStyles: {},
|
|
50
|
+
thPrimaryTitleStyles: {},
|
|
51
|
+
trRowStyles: {},
|
|
52
|
+
trTitleStyles: {},
|
|
53
|
+
trSubTitleStyles: {},
|
|
54
|
+
trPrimaryTitleStyles: {},
|
|
55
|
+
tdStyles: {},
|
|
56
|
+
customHeaderRowIdValue: "",
|
|
57
|
+
customRowDynamicIdValue: "",
|
|
58
|
+
customTableDataDynamicIdValue: "",
|
|
59
|
+
customRowHeaderDynamicIdValue: "",
|
|
60
|
+
customDynamicHeaderTitleIdValue: "",
|
|
61
|
+
customDynamicSubHeaderTitleIdValue: "",
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const Provider = Context.Provider;
|
|
65
|
+
|
|
66
|
+
export default Context;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export const getCustomStyles = (hasStyle: boolean) =>
|
|
2
|
+
!hasStyle ? {} : hasStyle;
|
|
3
|
+
|
|
4
|
+
export const getContainerStyles = (
|
|
5
|
+
hasStyle: boolean,
|
|
6
|
+
styles: React.CSSProperties
|
|
7
|
+
): React.CSSProperties =>
|
|
8
|
+
// if custom styles are passed remove default styles by returning a spread empty object
|
|
9
|
+
!hasStyle
|
|
10
|
+
? { ...getCustomStyles(hasStyle) }
|
|
11
|
+
: {
|
|
12
|
+
top: `${50}%`,
|
|
13
|
+
left: `${50}%`,
|
|
14
|
+
height: `${100}%`,
|
|
15
|
+
textAlign: "center",
|
|
16
|
+
position: "absolute",
|
|
17
|
+
transform: `translate(${-50}%, ${-50}%)`,
|
|
18
|
+
...styles,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const getTableBoarder = (hasStyle: boolean) =>
|
|
22
|
+
!hasStyle ? {} : { border: `${1}px solid black` };
|
|
23
|
+
|
|
24
|
+
export const getTableStyles = (
|
|
25
|
+
hasStyle: boolean,
|
|
26
|
+
styles: React.CSSProperties
|
|
27
|
+
): React.CSSProperties =>
|
|
28
|
+
!hasStyle
|
|
29
|
+
? { ...getCustomStyles(hasStyle) }
|
|
30
|
+
: { width: `${70}rem`, ...styles };
|
|
31
|
+
|
|
32
|
+
export const getHeaderPrimaryTitleStyles = (
|
|
33
|
+
hasStyle: boolean,
|
|
34
|
+
styles: React.CSSProperties
|
|
35
|
+
): React.CSSProperties =>
|
|
36
|
+
!hasStyle
|
|
37
|
+
? { ...getCustomStyles(hasStyle) }
|
|
38
|
+
: {
|
|
39
|
+
borderWidth: `${0}`,
|
|
40
|
+
padding: `${1}rem ${0} ${1}rem ${0}`,
|
|
41
|
+
...styles,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const getHeaderRowStyles = (
|
|
45
|
+
hasStyle: boolean,
|
|
46
|
+
styles: React.CSSProperties
|
|
47
|
+
): React.CSSProperties =>
|
|
48
|
+
!hasStyle
|
|
49
|
+
? { ...getCustomStyles(hasStyle) }
|
|
50
|
+
: {
|
|
51
|
+
borderColor: "black",
|
|
52
|
+
borderStyle: "solid",
|
|
53
|
+
padding: `${10}rem ${0} ${0} ${0}`,
|
|
54
|
+
borderWidth: `${0} ${0} ${0} ${10}px`,
|
|
55
|
+
...styles,
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const getHeaderTitleStyles = (
|
|
59
|
+
hasStyle: boolean,
|
|
60
|
+
styles: React.CSSProperties
|
|
61
|
+
): React.CSSProperties =>
|
|
62
|
+
!hasStyle
|
|
63
|
+
? { ...getCustomStyles(hasStyle) }
|
|
64
|
+
: {
|
|
65
|
+
padding: `${0} ${0.5}rem ${0} ${0.5}rem`,
|
|
66
|
+
backgroundColor: "light-grey",
|
|
67
|
+
border: `${1}px solid black`,
|
|
68
|
+
...styles,
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const getHeaderSubTitleStyles = (
|
|
72
|
+
hasStyle: boolean,
|
|
73
|
+
styles: React.CSSProperties
|
|
74
|
+
): React.CSSProperties =>
|
|
75
|
+
!hasStyle
|
|
76
|
+
? { ...getCustomStyles(hasStyle) }
|
|
77
|
+
: { fontSize: `${0.9}em`, fontWeight: "normal", ...styles };
|
package/dist/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ReactMatrix } from "./components/ReactMatrix";
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
export interface MatrixDetail {
|
|
2
|
+
id: number;
|
|
3
|
+
position: number;
|
|
4
|
+
matrix_type: string;
|
|
5
|
+
likelihood: string;
|
|
6
|
+
consequence: number;
|
|
7
|
+
header_title: string;
|
|
8
|
+
header_sub_title: string;
|
|
9
|
+
row_header_title: string;
|
|
10
|
+
row_header_sub_title: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface MatrixValue {
|
|
14
|
+
id: number;
|
|
15
|
+
matrix_id: number;
|
|
16
|
+
description: string;
|
|
17
|
+
score_value: number;
|
|
18
|
+
colour: string;
|
|
19
|
+
position: number;
|
|
20
|
+
likelihood_descriptor: string;
|
|
21
|
+
consequence_descriptor: number;
|
|
22
|
+
response: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface MatrixData {
|
|
26
|
+
id: number;
|
|
27
|
+
matrix_size: number;
|
|
28
|
+
matrix_name: string;
|
|
29
|
+
primary_header_title: string;
|
|
30
|
+
primary_row_header_title: string;
|
|
31
|
+
matrix_description: string;
|
|
32
|
+
matrix_details: MatrixDetail[];
|
|
33
|
+
matrix_values: MatrixValue[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface ReactMatrixProps {
|
|
37
|
+
data?: {
|
|
38
|
+
id: number;
|
|
39
|
+
matrix_name: string;
|
|
40
|
+
matrix_description: string;
|
|
41
|
+
matrix_size: number;
|
|
42
|
+
primary_header_title: string;
|
|
43
|
+
primary_row_header_title: string;
|
|
44
|
+
matrix_details: {
|
|
45
|
+
id: number;
|
|
46
|
+
likelihood: string;
|
|
47
|
+
consequence: number;
|
|
48
|
+
header_title: string;
|
|
49
|
+
header_sub_title: string;
|
|
50
|
+
row_header_title: string;
|
|
51
|
+
row_header_sub_title: string;
|
|
52
|
+
}[];
|
|
53
|
+
matrix_values: {
|
|
54
|
+
id: number;
|
|
55
|
+
colour: string;
|
|
56
|
+
position: number;
|
|
57
|
+
matrix_id: number;
|
|
58
|
+
score_value: number;
|
|
59
|
+
description: string;
|
|
60
|
+
response: string;
|
|
61
|
+
likelihood_descriptor: string;
|
|
62
|
+
consequence_descriptor: number;
|
|
63
|
+
}[];
|
|
64
|
+
};
|
|
65
|
+
hasTableBorder?: boolean;
|
|
66
|
+
hasInlineStyles?: boolean;
|
|
67
|
+
hasContainerStyles?: boolean;
|
|
68
|
+
reverseMatrixValues?: boolean;
|
|
69
|
+
matrixSizeSelected?: number;
|
|
70
|
+
rowPrimaryUpper?: boolean;
|
|
71
|
+
headerPrimaryUpper?: boolean;
|
|
72
|
+
tableContainerStyles?: React.CSSProperties;
|
|
73
|
+
tableStyles?: React.CSSProperties;
|
|
74
|
+
thRowStyles?: React.CSSProperties;
|
|
75
|
+
thTitleStyles?: React.CSSProperties;
|
|
76
|
+
thSubTitleStyles?: React.CSSProperties;
|
|
77
|
+
thPrimaryTitleStyles?: React.CSSProperties;
|
|
78
|
+
trRowStyles?: React.CSSProperties;
|
|
79
|
+
trTitleStyles?: React.CSSProperties;
|
|
80
|
+
trSubTitleStyles?: React.CSSProperties;
|
|
81
|
+
trPrimaryTitleStyles?: React.CSSProperties;
|
|
82
|
+
tdStyles?: React.CSSProperties;
|
|
83
|
+
customHeaderRowIdValue?: string;
|
|
84
|
+
customDynamicHeaderTitleIdValue?: string;
|
|
85
|
+
customDynamicSubHeaderTitleIdValue?: string;
|
|
86
|
+
customRowDynamicIdValue?: string;
|
|
87
|
+
customRowHeaderDynamicIdValue?: string;
|
|
88
|
+
customTableDataDynamicIdValue?: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface TableDataProps {
|
|
92
|
+
data: {
|
|
93
|
+
id: number;
|
|
94
|
+
colour: string;
|
|
95
|
+
position: number;
|
|
96
|
+
matrix_id: number;
|
|
97
|
+
score_value: number;
|
|
98
|
+
description: string;
|
|
99
|
+
response: string;
|
|
100
|
+
likelihood_descriptor: string;
|
|
101
|
+
consequence_descriptor: number;
|
|
102
|
+
};
|
|
103
|
+
tdStyles?: React.CSSProperties;
|
|
104
|
+
hasInlineStyles?: boolean;
|
|
105
|
+
customTableDataDynamicIdValue?: string;
|
|
106
|
+
}
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { MatrixData } from "../types";
|
|
2
|
+
|
|
3
|
+
export const data: MatrixData = {
|
|
4
|
+
id: 1,
|
|
5
|
+
matrix_size: 5,
|
|
6
|
+
matrix_name: "React Matrix",
|
|
7
|
+
primary_header_title: "Consequence",
|
|
8
|
+
primary_row_header_title: "Likelihood",
|
|
9
|
+
matrix_description: "Risk Matrix Template",
|
|
10
|
+
|
|
11
|
+
matrix_details: [
|
|
12
|
+
{
|
|
13
|
+
id: 1,
|
|
14
|
+
likelihood: "E",
|
|
15
|
+
consequence: 1,
|
|
16
|
+
position: 5,
|
|
17
|
+
matrix_type: "Risk",
|
|
18
|
+
header_title: "Minor",
|
|
19
|
+
header_sub_title: "Header sub-title/description.",
|
|
20
|
+
row_header_title: "Rare",
|
|
21
|
+
row_header_sub_title: "Row Header sub-title/description.",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: 2,
|
|
25
|
+
position: 5,
|
|
26
|
+
matrix_type: "Risk",
|
|
27
|
+
likelihood: "D",
|
|
28
|
+
consequence: 2,
|
|
29
|
+
header_title: "Moderate",
|
|
30
|
+
header_sub_title: "Header sub-title/description.",
|
|
31
|
+
row_header_title: "Unlikely",
|
|
32
|
+
row_header_sub_title: "Row Header sub-title/description.",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 3,
|
|
36
|
+
position: 5,
|
|
37
|
+
matrix_type: "Risk",
|
|
38
|
+
likelihood: "C",
|
|
39
|
+
consequence: 3,
|
|
40
|
+
header_title: "Significant",
|
|
41
|
+
header_sub_title: "Header sub-title/description.",
|
|
42
|
+
row_header_title: "Possible",
|
|
43
|
+
row_header_sub_title: "Row Header sub-title/description.",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 4,
|
|
47
|
+
position: 5,
|
|
48
|
+
matrix_type: "Risk",
|
|
49
|
+
likelihood: "B",
|
|
50
|
+
consequence: 4,
|
|
51
|
+
header_title: "Critical",
|
|
52
|
+
header_sub_title: "Header sub-title/description.",
|
|
53
|
+
row_header_title: "Likely",
|
|
54
|
+
row_header_sub_title: "Row Header sub-title/description.",
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: 5,
|
|
58
|
+
position: 5,
|
|
59
|
+
matrix_type: "Risk",
|
|
60
|
+
likelihood: "A",
|
|
61
|
+
consequence: 5,
|
|
62
|
+
header_title: "Catastrophic",
|
|
63
|
+
header_sub_title: "Header sub-title/description.",
|
|
64
|
+
row_header_title: "Almost Certain",
|
|
65
|
+
row_header_sub_title: "Row Header sub-title/description.",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
|
|
69
|
+
matrix_values: [
|
|
70
|
+
{
|
|
71
|
+
id: 26,
|
|
72
|
+
matrix_id: 1,
|
|
73
|
+
description: "low",
|
|
74
|
+
score_value: 1,
|
|
75
|
+
colour: "green",
|
|
76
|
+
position: 1,
|
|
77
|
+
likelihood_descriptor: "E",
|
|
78
|
+
consequence_descriptor: 1,
|
|
79
|
+
response: "Business as usual",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: 27,
|
|
83
|
+
matrix_id: 1,
|
|
84
|
+
description: "low",
|
|
85
|
+
score_value: 2,
|
|
86
|
+
colour: "green",
|
|
87
|
+
position: 6,
|
|
88
|
+
likelihood_descriptor: "D",
|
|
89
|
+
consequence_descriptor: 1,
|
|
90
|
+
response: "Business as usual",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: 28,
|
|
94
|
+
matrix_id: 1,
|
|
95
|
+
description: "low",
|
|
96
|
+
score_value: 3,
|
|
97
|
+
colour: "green",
|
|
98
|
+
position: 2,
|
|
99
|
+
likelihood_descriptor: "E",
|
|
100
|
+
consequence_descriptor: 2,
|
|
101
|
+
response: "Business as usual",
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
id: 29,
|
|
105
|
+
matrix_id: 1,
|
|
106
|
+
description: "low",
|
|
107
|
+
score_value: 4,
|
|
108
|
+
colour: "green",
|
|
109
|
+
position: 11,
|
|
110
|
+
likelihood_descriptor: "C",
|
|
111
|
+
consequence_descriptor: 1,
|
|
112
|
+
response: "Business as usual",
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: 30,
|
|
116
|
+
matrix_id: 1,
|
|
117
|
+
description: "low",
|
|
118
|
+
score_value: 5,
|
|
119
|
+
colour: "green",
|
|
120
|
+
position: 7,
|
|
121
|
+
likelihood_descriptor: "D",
|
|
122
|
+
consequence_descriptor: 2,
|
|
123
|
+
response: "Business as usual",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: 31,
|
|
127
|
+
matrix_id: 1,
|
|
128
|
+
description: "low",
|
|
129
|
+
score_value: 6,
|
|
130
|
+
colour: "green",
|
|
131
|
+
position: 3,
|
|
132
|
+
likelihood_descriptor: "E",
|
|
133
|
+
consequence_descriptor: 3,
|
|
134
|
+
response: "Business as usual",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: 32,
|
|
138
|
+
matrix_id: 1,
|
|
139
|
+
description: "medium",
|
|
140
|
+
score_value: 7,
|
|
141
|
+
colour: "yellow",
|
|
142
|
+
position: 16,
|
|
143
|
+
likelihood_descriptor: "B",
|
|
144
|
+
consequence_descriptor: 1,
|
|
145
|
+
response: "Requires routine to periodic monitoring",
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
id: 33,
|
|
149
|
+
matrix_id: 1,
|
|
150
|
+
description: "medium",
|
|
151
|
+
score_value: 8,
|
|
152
|
+
colour: "yellow",
|
|
153
|
+
position: 12,
|
|
154
|
+
likelihood_descriptor: "C",
|
|
155
|
+
consequence_descriptor: 2,
|
|
156
|
+
response: "Requires routine to periodic monitoring",
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: 34,
|
|
160
|
+
matrix_id: 1,
|
|
161
|
+
description: "medium",
|
|
162
|
+
score_value: 9,
|
|
163
|
+
colour: "yellow",
|
|
164
|
+
position: 8,
|
|
165
|
+
likelihood_descriptor: "D",
|
|
166
|
+
consequence_descriptor: 3,
|
|
167
|
+
response: "Requires routine to periodic monitoring",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 35,
|
|
171
|
+
matrix_id: 1,
|
|
172
|
+
description: "medium",
|
|
173
|
+
score_value: 10,
|
|
174
|
+
colour: "yellow",
|
|
175
|
+
position: 4,
|
|
176
|
+
likelihood_descriptor: "E",
|
|
177
|
+
consequence_descriptor: 4,
|
|
178
|
+
response: "Requires routine to periodic monitoring",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
id: 36,
|
|
182
|
+
matrix_id: 1,
|
|
183
|
+
description: "medium",
|
|
184
|
+
score_value: 11,
|
|
185
|
+
colour: "yellow",
|
|
186
|
+
position: 21,
|
|
187
|
+
likelihood_descriptor: "A",
|
|
188
|
+
consequence_descriptor: 1,
|
|
189
|
+
response: "Requires routine to periodic monitoring",
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
id: 37,
|
|
193
|
+
matrix_id: 1,
|
|
194
|
+
description: "high",
|
|
195
|
+
score_value: 12,
|
|
196
|
+
colour: "orange",
|
|
197
|
+
position: 17,
|
|
198
|
+
likelihood_descriptor: "B",
|
|
199
|
+
consequence_descriptor: 2,
|
|
200
|
+
response: "Risk requires targeted management plan",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: 38,
|
|
204
|
+
matrix_id: 1,
|
|
205
|
+
description: "high",
|
|
206
|
+
score_value: 13,
|
|
207
|
+
colour: "orange",
|
|
208
|
+
position: 13,
|
|
209
|
+
likelihood_descriptor: "C",
|
|
210
|
+
consequence_descriptor: 3,
|
|
211
|
+
response: "Risk requires targeted management plan",
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: 39,
|
|
215
|
+
matrix_id: 1,
|
|
216
|
+
description: "high",
|
|
217
|
+
score_value: 14,
|
|
218
|
+
colour: "orange",
|
|
219
|
+
position: 9,
|
|
220
|
+
likelihood_descriptor: "D",
|
|
221
|
+
consequence_descriptor: 4,
|
|
222
|
+
response: "Risk requires targeted management plan",
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: 40,
|
|
226
|
+
matrix_id: 1,
|
|
227
|
+
description: "high",
|
|
228
|
+
score_value: 15,
|
|
229
|
+
colour: "orange",
|
|
230
|
+
position: 5,
|
|
231
|
+
likelihood_descriptor: "E",
|
|
232
|
+
consequence_descriptor: 5,
|
|
233
|
+
response: "Risk requires targeted management plan",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: 41,
|
|
237
|
+
matrix_id: 1,
|
|
238
|
+
description: "high",
|
|
239
|
+
score_value: 16,
|
|
240
|
+
colour: "orange",
|
|
241
|
+
position: 22,
|
|
242
|
+
likelihood_descriptor: "A",
|
|
243
|
+
consequence_descriptor: 2,
|
|
244
|
+
response: "Risk requires targeted management plan",
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 42,
|
|
248
|
+
matrix_id: 1,
|
|
249
|
+
description: "high",
|
|
250
|
+
score_value: 17,
|
|
251
|
+
colour: "orange",
|
|
252
|
+
position: 18,
|
|
253
|
+
likelihood_descriptor: "B",
|
|
254
|
+
consequence_descriptor: 3,
|
|
255
|
+
response: "Risk requires targeted management plan",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
id: 43,
|
|
259
|
+
matrix_id: 1,
|
|
260
|
+
description: "high",
|
|
261
|
+
score_value: 18,
|
|
262
|
+
colour: "orange",
|
|
263
|
+
position: 14,
|
|
264
|
+
likelihood_descriptor: "C",
|
|
265
|
+
consequence_descriptor: 4,
|
|
266
|
+
response: "Risk requires targeted management plan",
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
id: 44,
|
|
270
|
+
matrix_id: 1,
|
|
271
|
+
description: "high",
|
|
272
|
+
score_value: 19,
|
|
273
|
+
colour: "orange",
|
|
274
|
+
position: 10,
|
|
275
|
+
likelihood_descriptor: "D",
|
|
276
|
+
consequence_descriptor: 5,
|
|
277
|
+
response: "Risk requires targeted management plan",
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
id: 45,
|
|
281
|
+
matrix_id: 1,
|
|
282
|
+
description: "extreme",
|
|
283
|
+
score_value: 20,
|
|
284
|
+
colour: "red",
|
|
285
|
+
position: 23,
|
|
286
|
+
likelihood_descriptor: "A",
|
|
287
|
+
consequence_descriptor: 3,
|
|
288
|
+
response: "Activity should not commence",
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
id: 46,
|
|
292
|
+
matrix_id: 1,
|
|
293
|
+
description: "extreme",
|
|
294
|
+
score_value: 21,
|
|
295
|
+
colour: "red",
|
|
296
|
+
position: 19,
|
|
297
|
+
likelihood_descriptor: "B",
|
|
298
|
+
consequence_descriptor: 4,
|
|
299
|
+
response: "Activity should not commence",
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
id: 47,
|
|
303
|
+
matrix_id: 1,
|
|
304
|
+
description: "extreme",
|
|
305
|
+
score_value: 22,
|
|
306
|
+
colour: "red",
|
|
307
|
+
position: 15,
|
|
308
|
+
likelihood_descriptor: "C",
|
|
309
|
+
consequence_descriptor: 5,
|
|
310
|
+
response: "Activity should not commence",
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
id: 48,
|
|
314
|
+
matrix_id: 1,
|
|
315
|
+
description: "extreme",
|
|
316
|
+
score_value: 23,
|
|
317
|
+
colour: "red",
|
|
318
|
+
position: 24,
|
|
319
|
+
likelihood_descriptor: "A",
|
|
320
|
+
consequence_descriptor: 4,
|
|
321
|
+
response: "Activity should not commence",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
id: 49,
|
|
325
|
+
matrix_id: 1,
|
|
326
|
+
description: "extreme",
|
|
327
|
+
score_value: 24,
|
|
328
|
+
colour: "red",
|
|
329
|
+
position: 20,
|
|
330
|
+
likelihood_descriptor: "B",
|
|
331
|
+
consequence_descriptor: 5,
|
|
332
|
+
response: "Activity should not commence",
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
id: 50,
|
|
336
|
+
matrix_id: 1,
|
|
337
|
+
description: "extreme",
|
|
338
|
+
score_value: 25,
|
|
339
|
+
colour: "red",
|
|
340
|
+
position: 25,
|
|
341
|
+
likelihood_descriptor: "A",
|
|
342
|
+
consequence_descriptor: 5,
|
|
343
|
+
response: "Activity should not commence",
|
|
344
|
+
},
|
|
345
|
+
],
|
|
346
|
+
};
|