@truedat/dd 4.36.5 → 4.36.9
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 +0 -1
- package/package.json +6 -6
- package/src/components/StructureDeleteButton.js +4 -12
- package/src/components/StructureNoteActions.js +5 -4
- package/src/components/StructureTagsCards.js +1 -3
- package/src/components/StructuresBulkUpdate.js +1 -1
- package/src/components/__tests__/__snapshots__/StructureTagsCards.spec.js.snap +2 -2
- package/src/components/__tests__/__snapshots__/StructuresBulkUpdate.spec.js.snap +1 -1
- package/src/messages/en.js +1 -1
- package/src/messages/es.js +1 -1
- package/src/reducers/ddMessage.js +17 -17
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/dd",
|
|
3
|
-
"version": "4.36.
|
|
3
|
+
"version": "4.36.9",
|
|
4
4
|
"description": "Truedat Web Data Dictionary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"jest": "^27.0.6",
|
|
48
48
|
"react": "^16.14.0",
|
|
49
49
|
"react-dom": "^16.14.0",
|
|
50
|
-
"redux-saga-test-plan": "^4.0.
|
|
50
|
+
"redux-saga-test-plan": "^4.0.4",
|
|
51
51
|
"rimraf": "^3.0.2",
|
|
52
52
|
"semantic-ui-react": "^2.0.3"
|
|
53
53
|
},
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@truedat/auth": "4.36.
|
|
88
|
-
"@truedat/core": "4.36.
|
|
89
|
-
"@truedat/df": "4.36.
|
|
87
|
+
"@truedat/auth": "4.36.9",
|
|
88
|
+
"@truedat/core": "4.36.9",
|
|
89
|
+
"@truedat/df": "4.36.9",
|
|
90
90
|
"lodash": "^4.17.21",
|
|
91
91
|
"path-to-regexp": "^1.7.0",
|
|
92
92
|
"prop-types": "^15.7.2",
|
|
@@ -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": "4b56a9ae46e2454719a2ae31022bc0d700a65dd3"
|
|
111
111
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import { bindActionCreators } from "redux";
|
|
4
3
|
import { connect } from "react-redux";
|
|
5
4
|
import { useIntl } from "react-intl";
|
|
6
5
|
import { Button, Icon } from "semantic-ui-react";
|
|
@@ -24,11 +23,7 @@ export const StructureDeleteButton = ({ structure, deleteStructure }) => {
|
|
|
24
23
|
content={formatMessage({
|
|
25
24
|
id: "structure.actions.delete.confirmation.content",
|
|
26
25
|
})}
|
|
27
|
-
|
|
28
|
-
deleteStructure({
|
|
29
|
-
id: structure.id,
|
|
30
|
-
})
|
|
31
|
-
}
|
|
26
|
+
onConfirm={() => deleteStructure({ id: structure.id })}
|
|
32
27
|
onOpen={(e) => e.stopPropagation()}
|
|
33
28
|
onClone={(e) => e.stopPropagation()}
|
|
34
29
|
/>
|
|
@@ -39,14 +34,11 @@ StructureDeleteButton.propTypes = {
|
|
|
39
34
|
structure: PropTypes.object,
|
|
40
35
|
deleteStructure: PropTypes.func,
|
|
41
36
|
};
|
|
42
|
-
const mapDispatchToProps = (dispatch) =>
|
|
43
|
-
bindActionCreators({ deleteStructure }, dispatch);
|
|
44
37
|
|
|
45
38
|
const mapStateToProps = ({ structure }) => ({
|
|
46
39
|
structure,
|
|
47
40
|
});
|
|
48
41
|
|
|
49
|
-
export default connect(
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
)(StructureDeleteButton);
|
|
42
|
+
export default connect(mapStateToProps, { deleteStructure })(
|
|
43
|
+
StructureDeleteButton
|
|
44
|
+
);
|
|
@@ -9,7 +9,7 @@ import { ConfirmModal, GroupActions } from "@truedat/core/components";
|
|
|
9
9
|
import { linkTo } from "@truedat/core/routes";
|
|
10
10
|
import { doStructureNoteAction } from "../routines";
|
|
11
11
|
|
|
12
|
-
export const ModalDelete = ({
|
|
12
|
+
export const ModalDelete = ({ modalOnConfirm, modalAction, modalIcon }) => (
|
|
13
13
|
<ConfirmModal
|
|
14
14
|
icon="trash"
|
|
15
15
|
trigger={
|
|
@@ -34,11 +34,12 @@ export const ModalDelete = ({ modalOnClick, modalAction, modalIcon }) => (
|
|
|
34
34
|
id={`structure.notes.actions.${modalAction}.confirmation.content`}
|
|
35
35
|
/>
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
onConfirm={modalOnConfirm}
|
|
38
38
|
/>
|
|
39
39
|
);
|
|
40
|
+
|
|
40
41
|
ModalDelete.propTypes = {
|
|
41
|
-
|
|
42
|
+
modalOnConfirm: PropTypes.func,
|
|
42
43
|
modalText: PropTypes.object,
|
|
43
44
|
modalAction: PropTypes.string,
|
|
44
45
|
};
|
|
@@ -89,7 +90,7 @@ export const StructureNoteActions = ({
|
|
|
89
90
|
return withModal(action)
|
|
90
91
|
? {
|
|
91
92
|
...baseAction,
|
|
92
|
-
|
|
93
|
+
modalOnConfirm: () =>
|
|
93
94
|
doStructureNoteAction({
|
|
94
95
|
action: data,
|
|
95
96
|
dataStructureId: structure?.id,
|
|
@@ -186,7 +186,7 @@ export class StructuresBulkUpdate extends React.Component {
|
|
|
186
186
|
values={{ structures_count: structureCount }}
|
|
187
187
|
/>
|
|
188
188
|
}
|
|
189
|
-
|
|
189
|
+
onConfirm={this.handleSubmit}
|
|
190
190
|
/>
|
|
191
191
|
<HistoryBackButton
|
|
192
192
|
content={<FormattedMessage id="actions.cancel" />}
|
|
@@ -46,13 +46,13 @@ exports[`<StructureTagsCards /> matches the latest snapshot 1`] = `
|
|
|
46
46
|
}
|
|
47
47
|
/>
|
|
48
48
|
}
|
|
49
|
-
handleSubmit={[Function]}
|
|
50
49
|
header={
|
|
51
50
|
<Memo(MemoizedFormattedMessage)
|
|
52
51
|
id="structureTags.actions.delete.confirmation.header"
|
|
53
52
|
/>
|
|
54
53
|
}
|
|
55
54
|
icon="trash"
|
|
55
|
+
onConfirm={[Function]}
|
|
56
56
|
trigger={
|
|
57
57
|
<Button
|
|
58
58
|
as="button"
|
|
@@ -109,13 +109,13 @@ exports[`<StructureTagsCards /> matches the latest snapshot 1`] = `
|
|
|
109
109
|
}
|
|
110
110
|
/>
|
|
111
111
|
}
|
|
112
|
-
handleSubmit={[Function]}
|
|
113
112
|
header={
|
|
114
113
|
<Memo(MemoizedFormattedMessage)
|
|
115
114
|
id="structureTags.actions.delete.confirmation.header"
|
|
116
115
|
/>
|
|
117
116
|
}
|
|
118
117
|
icon="trash"
|
|
118
|
+
onConfirm={[Function]}
|
|
119
119
|
trigger={
|
|
120
120
|
<Button
|
|
121
121
|
as="button"
|
|
@@ -81,12 +81,12 @@ exports[`<StructuresBulkUpdate /> matches the latest snapshot 1`] = `
|
|
|
81
81
|
}
|
|
82
82
|
/>
|
|
83
83
|
}
|
|
84
|
-
handleSubmit={[Function]}
|
|
85
84
|
header={
|
|
86
85
|
<Memo(MemoizedFormattedMessage)
|
|
87
86
|
id="structures.edit.bulk.confirmation.header"
|
|
88
87
|
/>
|
|
89
88
|
}
|
|
89
|
+
onConfirm={[Function]}
|
|
90
90
|
trigger={
|
|
91
91
|
<Button
|
|
92
92
|
as="button"
|
package/src/messages/en.js
CHANGED
|
@@ -375,7 +375,7 @@ export default {
|
|
|
375
375
|
"No structures selected",
|
|
376
376
|
"structures.bulkUpdateStructures.no.structures.header": "Empty Search",
|
|
377
377
|
"structures.bulkUpdateStructures.success.header":
|
|
378
|
-
"Bulk update
|
|
378
|
+
"Bulk update completed. Loaded {count_ids} errors {count_errors}",
|
|
379
379
|
"structures.bulkUpdateStructures.success.errors":
|
|
380
380
|
"Error in external id {externalId}, message: {message}",
|
|
381
381
|
"structures.bulkUploadStructures.success.errors":
|
package/src/messages/es.js
CHANGED
|
@@ -378,7 +378,7 @@ export default {
|
|
|
378
378
|
"External id: {externalId} El campo <{field}> es necesario",
|
|
379
379
|
"structures.bulkUpdateStructures.no.structures.header": "Búsqueda vacía",
|
|
380
380
|
"structures.bulkUpdateStructures.success.header":
|
|
381
|
-
"¡Actualización
|
|
381
|
+
"¡Actualización finalizada! subidos {count_ids} errores {count_errors}",
|
|
382
382
|
"structures.bulkUpdateStructures.success.errors":
|
|
383
383
|
"Error en external id {externalId}, mensaje: {message}",
|
|
384
384
|
"structures.bulkUploadStructures.success.errors":
|
|
@@ -66,24 +66,24 @@ const ddMessage = (state = initialState, { type, payload }) => {
|
|
|
66
66
|
const field = _.path("errors.field")(data);
|
|
67
67
|
const messages = _.has("errors")(data)
|
|
68
68
|
? _.flow(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
69
|
+
_.propOr([], "errors"),
|
|
70
|
+
_.toPairs,
|
|
71
|
+
_.filter(([k, _v]) => k !== "row" && k !== "field"),
|
|
72
|
+
_.map(([k, v]) =>
|
|
73
|
+
_.map((e) => ({
|
|
74
|
+
id: `structures.uploadStructures.failed.${k}.${e}`,
|
|
75
|
+
fields: { row, field },
|
|
76
|
+
defaultMessage: "structures.uploadStructures.failed.default",
|
|
77
|
+
}))(v)
|
|
78
|
+
),
|
|
79
|
+
_.flatten
|
|
80
|
+
)(data)
|
|
81
81
|
: _.flow(_.path("error.message"), (m) => [
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
{
|
|
83
|
+
id: `structures.uploadStructures.failed.${m}`,
|
|
84
|
+
defaultMessage: "structures.uploadStructures.failed.default",
|
|
85
|
+
},
|
|
86
|
+
])(data);
|
|
87
87
|
return {
|
|
88
88
|
error: true,
|
|
89
89
|
header: "structures.uploadStructures.failed.header",
|