@truedat/dd 4.43.0 → 4.43.3
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/CHANGELOG.md +8 -2
- package/package.json +7 -7
- package/src/components/GrantRequestApprovalForm.js +10 -4
- package/src/components/LinkStructureTagForm.js +21 -15
- package/src/components/MetadataFiltersInput.js +1 -1
- package/src/components/MetadataViewForm.js +2 -2
- package/src/components/MyGrantRequests.js +1 -1
- package/src/components/PendingStructureNotes.js +3 -3
- package/src/components/StructureTagForm.js +5 -2
- package/src/components/StructureTypeForm.js +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.43.3] 2022-05-04
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- [TD-3936] Updated `react-hook-form`
|
|
8
|
+
|
|
3
9
|
## [4.43.0] 2022-04-26
|
|
4
10
|
|
|
5
11
|
### Added
|
|
@@ -681,7 +687,7 @@ New major version for Truedat 4.0, no changes
|
|
|
681
687
|
|
|
682
688
|
- [TD-2637] Obtain user name from `user` if present in audit events
|
|
683
689
|
|
|
684
|
-
## [3.23.6]
|
|
690
|
+
## [3.23.6] 2020-06-01
|
|
685
691
|
|
|
686
692
|
### Changed
|
|
687
693
|
|
|
@@ -839,7 +845,7 @@ New major version for Truedat 4.0, no changes
|
|
|
839
845
|
|
|
840
846
|
## [3.16.3] 2020-02-13
|
|
841
847
|
|
|
842
|
-
|
|
848
|
+
### Changed
|
|
843
849
|
|
|
844
850
|
- [TD-2339] Render profiling table when there are fields with profile
|
|
845
851
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.43.
|
|
3
|
+
"version": "4.43.3",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.14.1",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "4.43.
|
|
37
|
+
"@truedat/test": "4.43.3",
|
|
38
38
|
"babel-jest": "^27.0.6",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@truedat/auth": "4.43.
|
|
88
|
-
"@truedat/core": "4.43.
|
|
89
|
-
"@truedat/df": "4.43.
|
|
87
|
+
"@truedat/auth": "4.43.3",
|
|
88
|
+
"@truedat/core": "4.43.3",
|
|
89
|
+
"@truedat/df": "4.43.3",
|
|
90
90
|
"lodash": "^4.17.21",
|
|
91
91
|
"path-to-regexp": "^1.7.0",
|
|
92
92
|
"prop-types": "^15.7.2",
|
|
93
|
-
"react-hook-form": "^
|
|
93
|
+
"react-hook-form": "^7.30.0",
|
|
94
94
|
"react-intl": "^5.20.10",
|
|
95
95
|
"react-moment": "^0.9.7",
|
|
96
96
|
"react-redux": "^7.2.4",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
"react-dom": ">= 16.8.6 < 17",
|
|
108
108
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "072eb5d04ec38033c17e030c365502484815a96b"
|
|
111
111
|
}
|
|
@@ -55,7 +55,10 @@ export const GrantRequestApprovalForm = ({
|
|
|
55
55
|
control={control}
|
|
56
56
|
name="role"
|
|
57
57
|
rules={{ validate: (v) => !_.isEmpty(v) }}
|
|
58
|
-
render={({
|
|
58
|
+
render={({
|
|
59
|
+
field: { onBlur, onChange, value },
|
|
60
|
+
fieldState: { error },
|
|
61
|
+
}) => (
|
|
59
62
|
<Form.Dropdown
|
|
60
63
|
placeholder={formatMessage({
|
|
61
64
|
id: "grantRequestApproval.form.role.placeholder",
|
|
@@ -63,7 +66,7 @@ export const GrantRequestApprovalForm = ({
|
|
|
63
66
|
label={formatMessage({
|
|
64
67
|
id: "grantRequestApproval.form.role.label",
|
|
65
68
|
})}
|
|
66
|
-
error={
|
|
69
|
+
error={!!error}
|
|
67
70
|
onBlur={onBlur}
|
|
68
71
|
value={value}
|
|
69
72
|
onChange={(_, { value }) => onChange(value)}
|
|
@@ -76,7 +79,10 @@ export const GrantRequestApprovalForm = ({
|
|
|
76
79
|
<Controller
|
|
77
80
|
control={control}
|
|
78
81
|
name="comment"
|
|
79
|
-
render={({
|
|
82
|
+
render={({
|
|
83
|
+
field: { onBlur, onChange, value },
|
|
84
|
+
fieldState: { error },
|
|
85
|
+
}) => (
|
|
80
86
|
<Form.TextArea
|
|
81
87
|
data-testid="comment-id"
|
|
82
88
|
label={formatMessage({
|
|
@@ -87,7 +93,7 @@ export const GrantRequestApprovalForm = ({
|
|
|
87
93
|
})}
|
|
88
94
|
value={value}
|
|
89
95
|
onBlur={onBlur}
|
|
90
|
-
error={
|
|
96
|
+
error={!!error}
|
|
91
97
|
onChange={(_, { value }) => onChange(value)}
|
|
92
98
|
/>
|
|
93
99
|
)}
|
|
@@ -16,7 +16,7 @@ export const LinkStructureTagForm = ({
|
|
|
16
16
|
linkStructureTag,
|
|
17
17
|
structureId,
|
|
18
18
|
structureTags,
|
|
19
|
-
tagId
|
|
19
|
+
tagId,
|
|
20
20
|
}) => {
|
|
21
21
|
const { formatMessage } = useIntl();
|
|
22
22
|
const allTags = _.map("id")(structureTags);
|
|
@@ -39,11 +39,11 @@ export const LinkStructureTagForm = ({
|
|
|
39
39
|
const submitTitle = _.isNil(tagId)
|
|
40
40
|
? "structure.tag.add"
|
|
41
41
|
: "structure.tag.edit";
|
|
42
|
-
const onSubmit = params => {
|
|
42
|
+
const onSubmit = (params) => {
|
|
43
43
|
const payload = {
|
|
44
44
|
structureId,
|
|
45
45
|
tagId: params.tag,
|
|
46
|
-
tag: { description: params.description }
|
|
46
|
+
tag: { description: params.description },
|
|
47
47
|
};
|
|
48
48
|
linkStructureTag(payload);
|
|
49
49
|
};
|
|
@@ -52,8 +52,8 @@ export const LinkStructureTagForm = ({
|
|
|
52
52
|
mode: "all",
|
|
53
53
|
defaultValues: {
|
|
54
54
|
description: description || "",
|
|
55
|
-
tag: defaultTag
|
|
56
|
-
}
|
|
55
|
+
tag: defaultTag,
|
|
56
|
+
},
|
|
57
57
|
});
|
|
58
58
|
const { isDirty, isValid } = formState;
|
|
59
59
|
return (
|
|
@@ -63,13 +63,16 @@ export const LinkStructureTagForm = ({
|
|
|
63
63
|
control={control}
|
|
64
64
|
name="tag"
|
|
65
65
|
rules={{ required: true }}
|
|
66
|
-
render={({
|
|
66
|
+
render={({
|
|
67
|
+
field: { onBlur, onChange, value },
|
|
68
|
+
fieldState: { error },
|
|
69
|
+
}) => (
|
|
67
70
|
<Form.Dropdown
|
|
68
71
|
name="tag"
|
|
69
72
|
disabled={_.negate(_.isNil)(tagId)}
|
|
70
|
-
error={
|
|
73
|
+
error={!!error}
|
|
71
74
|
placeholder={formatMessage({
|
|
72
|
-
id: "structure.tag.dropdown.placeholder"
|
|
75
|
+
id: "structure.tag.dropdown.placeholder",
|
|
73
76
|
})}
|
|
74
77
|
label={formatMessage({ id: "structure.tag.dropdown.label" })}
|
|
75
78
|
onBlur={onBlur}
|
|
@@ -86,14 +89,17 @@ export const LinkStructureTagForm = ({
|
|
|
86
89
|
control={control}
|
|
87
90
|
name="description"
|
|
88
91
|
rules={{ required: true }}
|
|
89
|
-
render={({
|
|
92
|
+
render={({
|
|
93
|
+
field: { onBlur, onChange, value },
|
|
94
|
+
fieldState: { error },
|
|
95
|
+
}) => (
|
|
90
96
|
<Form.TextArea
|
|
91
97
|
data-testid="description-id"
|
|
92
|
-
error={
|
|
98
|
+
error={!!error}
|
|
93
99
|
name="description"
|
|
94
100
|
label={formatMessage({ id: "structure.tag.textArea.label" })}
|
|
95
101
|
placeholder={formatMessage({
|
|
96
|
-
id: "structure.tag.textArea.placeholder"
|
|
102
|
+
id: "structure.tag.textArea.placeholder",
|
|
97
103
|
})}
|
|
98
104
|
onBlur={onBlur}
|
|
99
105
|
onChange={(_e, { value }) => onChange(value)}
|
|
@@ -130,22 +136,22 @@ LinkStructureTagForm.propTypes = {
|
|
|
130
136
|
linkStructureTag: PropTypes.func,
|
|
131
137
|
structureId: PropTypes.number,
|
|
132
138
|
structureTags: PropTypes.array,
|
|
133
|
-
tagId: PropTypes.number
|
|
139
|
+
tagId: PropTypes.number,
|
|
134
140
|
};
|
|
135
141
|
|
|
136
142
|
const mapStateToProps = ({
|
|
137
143
|
linkedStructureTags,
|
|
138
144
|
structure,
|
|
139
|
-
structureTags
|
|
145
|
+
structureTags,
|
|
140
146
|
}) => ({
|
|
141
147
|
linkedStructureTags,
|
|
142
148
|
structureId: _.prop("id")(structure),
|
|
143
|
-
structureTags
|
|
149
|
+
structureTags,
|
|
144
150
|
});
|
|
145
151
|
|
|
146
152
|
const mapDispatchToProps = {
|
|
147
153
|
deleteLinkStructureTag,
|
|
148
|
-
linkStructureTag
|
|
154
|
+
linkStructureTag,
|
|
149
155
|
};
|
|
150
156
|
|
|
151
157
|
export default connect(
|
|
@@ -12,7 +12,7 @@ export const MetadataFiltersInput = ({ control, fieldOptions, fields }) => {
|
|
|
12
12
|
control={control}
|
|
13
13
|
name="filters"
|
|
14
14
|
defaultValue={_.isArray(fields) ? fields : []}
|
|
15
|
-
render={({ onBlur, onChange, value }) => (
|
|
15
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
16
16
|
<Form.Dropdown
|
|
17
17
|
name="filters"
|
|
18
18
|
label={formatMessage({ id: "structureType.filters" })}
|
|
@@ -26,7 +26,7 @@ export const MetadataViewForm = ({
|
|
|
26
26
|
control={control}
|
|
27
27
|
name={`metadata_views.${idx}.name`}
|
|
28
28
|
defaultValue={name || ""}
|
|
29
|
-
render={({ onBlur, onChange, value }) => (
|
|
29
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
30
30
|
<Form.Input
|
|
31
31
|
autoComplete="off"
|
|
32
32
|
name={`metadata_views.${idx}.name`}
|
|
@@ -45,7 +45,7 @@ export const MetadataViewForm = ({
|
|
|
45
45
|
control={control}
|
|
46
46
|
name={`metadata_views.${idx}.fields`}
|
|
47
47
|
defaultValue={_.isArray(fields) ? fields : []}
|
|
48
|
-
render={({ onBlur, onChange, value }) => (
|
|
48
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
49
49
|
<Form.Dropdown
|
|
50
50
|
name={`metadata_views.${idx}.fields`}
|
|
51
51
|
label={formatMessage({ id: "metadataView.fields" })}
|
|
@@ -50,7 +50,7 @@ export const MyGrantRequests = ({
|
|
|
50
50
|
<Controller
|
|
51
51
|
control={control}
|
|
52
52
|
name="status"
|
|
53
|
-
render={({ onBlur, onChange, value }) => (
|
|
53
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
54
54
|
<Form.Field className="subscriptions-checkbox-filters">
|
|
55
55
|
<label>
|
|
56
56
|
{formatMessage({ id: "grantRequest.header.status" })}
|
|
@@ -74,7 +74,7 @@ export const PendingStructureNotes = () => {
|
|
|
74
74
|
<Controller
|
|
75
75
|
control={control}
|
|
76
76
|
name="status"
|
|
77
|
-
render={({ onBlur, onChange, value }) => (
|
|
77
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
78
78
|
<Form.Field className="subscriptions-checkbox-filters">
|
|
79
79
|
<label>
|
|
80
80
|
{formatMessage({ id: "pendingStructureNotes.props.status" })}
|
|
@@ -104,7 +104,7 @@ export const PendingStructureNotes = () => {
|
|
|
104
104
|
<Controller
|
|
105
105
|
control={control}
|
|
106
106
|
name="system_ids"
|
|
107
|
-
render={({ onBlur, onChange, value }) => (
|
|
107
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
108
108
|
<Form.Dropdown
|
|
109
109
|
label={formatMessage({
|
|
110
110
|
id: "pendingStructureNotes.props.system",
|
|
@@ -129,7 +129,7 @@ export const PendingStructureNotes = () => {
|
|
|
129
129
|
<Controller
|
|
130
130
|
control={control}
|
|
131
131
|
name="domain_ids"
|
|
132
|
-
render={({ onChange, value }) => (
|
|
132
|
+
render={({ field: { onChange, value } }) => (
|
|
133
133
|
<DomainDropdownSelector
|
|
134
134
|
value={value}
|
|
135
135
|
onChange={(_e, { value }) => {
|
|
@@ -37,10 +37,13 @@ export const StructureTagForm = ({
|
|
|
37
37
|
control={control}
|
|
38
38
|
name="name"
|
|
39
39
|
rules={{ required: true }}
|
|
40
|
-
render={({
|
|
40
|
+
render={({
|
|
41
|
+
field: { onBlur, onChange, value },
|
|
42
|
+
fieldState: { error },
|
|
43
|
+
}) => (
|
|
41
44
|
<Form.Input
|
|
42
45
|
autoComplete="off"
|
|
43
|
-
error={
|
|
46
|
+
error={!!error}
|
|
44
47
|
id="name"
|
|
45
48
|
label={formatMessage({ id: "structureTagForm.props.name" })}
|
|
46
49
|
onBlur={onBlur}
|
|
@@ -62,7 +62,7 @@ export const StructureTypeForm = ({
|
|
|
62
62
|
control={control}
|
|
63
63
|
defaultValue=""
|
|
64
64
|
name="translation"
|
|
65
|
-
render={({ onBlur, onChange, value }) => (
|
|
65
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
66
66
|
<Form.Input
|
|
67
67
|
autoComplete="off"
|
|
68
68
|
label={formatMessage({ id: "structureType.translation" })}
|
|
@@ -77,7 +77,7 @@ export const StructureTypeForm = ({
|
|
|
77
77
|
control={control}
|
|
78
78
|
name="template_id"
|
|
79
79
|
defaultValue=""
|
|
80
|
-
render={({ onBlur, onChange, value }) => (
|
|
80
|
+
render={({ field: { onBlur, onChange, value } }) => (
|
|
81
81
|
<Form.Dropdown
|
|
82
82
|
label={formatMessage({ id: "structureType.template" })}
|
|
83
83
|
name="template_id"
|