@truedat/bg 4.36.7 → 4.37.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/package.json +5 -5
- package/src/concepts/components/ConceptActions.js +2 -4
- package/src/concepts/components/ConceptsBulkUpdate.js +1 -1
- package/src/concepts/components/__tests__/__snapshots__/ConceptsBulkUpdate.spec.js.snap +1 -1
- package/src/concepts/relations/components/ConceptLinkActions.js +1 -1
- package/src/taxonomy/components/DomainActions.js +54 -84
- package/src/taxonomy/components/ModalOnRoleDeletion.js +1 -1
- package/src/taxonomy/components/__tests__/__snapshots__/DomainActions.spec.js.snap +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/bg",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.37.1",
|
|
4
4
|
"description": "Truedat Web Business Glossary",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"jest": "^27.0.6",
|
|
46
46
|
"react": "^16.14.0",
|
|
47
47
|
"react-dom": "^16.14.0",
|
|
48
|
-
"redux-saga-test-plan": "^4.0.
|
|
48
|
+
"redux-saga-test-plan": "^4.0.4",
|
|
49
49
|
"rimraf": "^3.0.2",
|
|
50
50
|
"semantic-ui-react": "^2.0.3"
|
|
51
51
|
},
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@truedat/core": "4.
|
|
85
|
-
"@truedat/df": "4.
|
|
84
|
+
"@truedat/core": "4.37.1",
|
|
85
|
+
"@truedat/df": "4.37.1",
|
|
86
86
|
"file-saver": "^2.0.5",
|
|
87
87
|
"moment": "^2.24.0",
|
|
88
88
|
"path-to-regexp": "^1.7.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"react-dom": ">= 16.8.6 < 17",
|
|
103
103
|
"semantic-ui-react": ">= 0.88.2 < 2.1"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "36ffd7e86efe27f38c3ae1bb616eb9eb4d444d12"
|
|
106
106
|
}
|
|
@@ -75,7 +75,7 @@ const ModalDelete = ({
|
|
|
75
75
|
)}
|
|
76
76
|
</>
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
onConfirm={() => conceptAction({ action: "delete", ...deleteAction })}
|
|
79
79
|
/>
|
|
80
80
|
);
|
|
81
81
|
|
|
@@ -107,9 +107,7 @@ const ModalDeprecate = ({ conceptAction, deprecateAction, concept }) => (
|
|
|
107
107
|
conceptVersion={_.prop("version")(concept)}
|
|
108
108
|
/>
|
|
109
109
|
}
|
|
110
|
-
|
|
111
|
-
conceptAction({ action: "deprecate", ...deprecateAction })
|
|
112
|
-
}
|
|
110
|
+
onConfirm={() => conceptAction({ action: "deprecate", ...deprecateAction })}
|
|
113
111
|
/>
|
|
114
112
|
);
|
|
115
113
|
|
|
@@ -178,7 +178,7 @@ export class ConceptsBulkUpdate extends React.Component {
|
|
|
178
178
|
values={{ concepts_count: conceptCount }}
|
|
179
179
|
/>
|
|
180
180
|
}
|
|
181
|
-
|
|
181
|
+
onConfirm={this.handleSubmit}
|
|
182
182
|
/>
|
|
183
183
|
<HistoryBackButton
|
|
184
184
|
content={<FormattedMessage id="actions.cancel" />}
|
|
@@ -80,12 +80,12 @@ exports[`<ConceptsBulkUpdate /> matches the latest snapshot 1`] = `
|
|
|
80
80
|
}
|
|
81
81
|
/>
|
|
82
82
|
}
|
|
83
|
-
handleSubmit={[Function]}
|
|
84
83
|
header={
|
|
85
84
|
<Memo(MemoizedFormattedMessage)
|
|
86
85
|
id="concepts.edit.bulk.confirmation.header"
|
|
87
86
|
/>
|
|
88
87
|
}
|
|
88
|
+
onConfirm={[Function]}
|
|
89
89
|
trigger={
|
|
90
90
|
<Button
|
|
91
91
|
as="button"
|
|
@@ -19,7 +19,7 @@ export const DeleteLink = ({ conceptLinkAction, action, loading }) =>
|
|
|
19
19
|
content={
|
|
20
20
|
<FormattedMessage id="relations.actions.data_field.delete.confirmation.content" />
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
onConfirm={() => conceptLinkAction(action)}
|
|
23
23
|
onOpen={(e) => e.stopPropagation()}
|
|
24
24
|
onClose={(e) => e.stopPropagation()}
|
|
25
25
|
/>
|
|
@@ -2,24 +2,27 @@ import _ from "lodash/fp";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { Link } from "react-router-dom";
|
|
5
|
-
import { Dropdown, Button
|
|
5
|
+
import { Dropdown, Button } from "semantic-ui-react";
|
|
6
6
|
import { bindActionCreators } from "redux";
|
|
7
7
|
import { connect } from "react-redux";
|
|
8
|
-
import { FormattedMessage } from "react-intl";
|
|
8
|
+
import { FormattedMessage, useIntl } from "react-intl";
|
|
9
9
|
import { ConfirmModal, GroupActions } from "@truedat/core/components";
|
|
10
10
|
import { deleteDomain } from "../routines";
|
|
11
11
|
import { filterDomains } from "../routines";
|
|
12
12
|
import { getPrimaryActions, getSecondaryActions } from "../selectors";
|
|
13
13
|
|
|
14
|
-
const DomainAction = ({ action, icon, messageId, id, ...rest }) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
const DomainAction = ({ action, icon, messageId, id, ...rest }) => {
|
|
15
|
+
const { formatMessage } = useIntl();
|
|
16
|
+
return (
|
|
17
|
+
<Dropdown.Item
|
|
18
|
+
text={formatMessage({ id: messageId })}
|
|
19
|
+
icon={icon}
|
|
20
|
+
as={Link}
|
|
21
|
+
to={action(id)}
|
|
22
|
+
{...rest}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
23
26
|
|
|
24
27
|
DomainAction.propTypes = {
|
|
25
28
|
action: PropTypes.func,
|
|
@@ -28,17 +31,20 @@ DomainAction.propTypes = {
|
|
|
28
31
|
id: PropTypes.number,
|
|
29
32
|
};
|
|
30
33
|
|
|
31
|
-
const DomainActionButton = ({ action, icon, messageId, id, ...rest }) =>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
const DomainActionButton = ({ action, icon, messageId, id, ...rest }) => {
|
|
35
|
+
const { formatMessage } = useIntl();
|
|
36
|
+
return (
|
|
37
|
+
<Button
|
|
38
|
+
floated="right"
|
|
39
|
+
primary
|
|
40
|
+
content={formatMessage({ id: messageId })}
|
|
41
|
+
icon={icon}
|
|
42
|
+
as={Link}
|
|
43
|
+
to={action(id)}
|
|
44
|
+
{...rest}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
42
48
|
|
|
43
49
|
DomainActionButton.propTypes = {
|
|
44
50
|
action: PropTypes.func,
|
|
@@ -47,73 +53,37 @@ DomainActionButton.propTypes = {
|
|
|
47
53
|
id: PropTypes.number,
|
|
48
54
|
};
|
|
49
55
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<Grid columns="equal">
|
|
68
|
-
<Grid.Column>
|
|
69
|
-
<Button fluid secondary onClick={onCancel}>
|
|
70
|
-
<FormattedMessage id="actions.cancel" />
|
|
71
|
-
</Button>
|
|
72
|
-
</Grid.Column>
|
|
73
|
-
<Grid.Column>
|
|
74
|
-
<Button fluid negative onClick={onConfirm}>
|
|
75
|
-
<FormattedMessage id="actions.delete" />
|
|
76
|
-
</Button>
|
|
77
|
-
</Grid.Column>
|
|
78
|
-
</Grid>
|
|
79
|
-
</Modal.Actions>
|
|
80
|
-
</Modal>
|
|
81
|
-
);
|
|
82
|
-
|
|
83
|
-
ModalConfirm.propTypes = {
|
|
84
|
-
open: PropTypes.bool,
|
|
85
|
-
content: PropTypes.string,
|
|
86
|
-
onCancel: PropTypes.func,
|
|
87
|
-
onConfirm: PropTypes.func,
|
|
88
|
-
header: PropTypes.string,
|
|
89
|
-
subHeader: PropTypes.string,
|
|
56
|
+
const ModalDelete = ({ onConfirm }) => {
|
|
57
|
+
const { formatMessage } = useIntl();
|
|
58
|
+
return (
|
|
59
|
+
<ConfirmModal
|
|
60
|
+
header={formatMessage({ id: "domain" })}
|
|
61
|
+
content={formatMessage({ id: "actions.confirm" })}
|
|
62
|
+
onConfirm={onConfirm}
|
|
63
|
+
trigger={
|
|
64
|
+
<Button
|
|
65
|
+
floated="right"
|
|
66
|
+
negative
|
|
67
|
+
content={formatMessage({ id: "actions.delete" })}
|
|
68
|
+
icon="trash"
|
|
69
|
+
/>
|
|
70
|
+
}
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
90
73
|
};
|
|
91
74
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
header={<FormattedMessage id="domain" />}
|
|
96
|
-
content={<FormattedMessage id="actions.confirm" />}
|
|
97
|
-
handleSubmit={handleConfirm}
|
|
98
|
-
trigger={
|
|
99
|
-
<Button
|
|
100
|
-
floated="right"
|
|
101
|
-
negative
|
|
102
|
-
content={<FormattedMessage id="actions.delete" />}
|
|
103
|
-
icon="trash"
|
|
104
|
-
/>
|
|
105
|
-
}
|
|
106
|
-
/>
|
|
107
|
-
);
|
|
75
|
+
ModalDelete.propTypes = {
|
|
76
|
+
onConfirm: PropTypes.func.isRequired,
|
|
77
|
+
};
|
|
108
78
|
|
|
109
|
-
const withDelete = (actions,
|
|
79
|
+
const withDelete = (actions, onConfirm) => [
|
|
110
80
|
...actions,
|
|
111
81
|
{
|
|
112
82
|
key: "delete",
|
|
113
83
|
icon: "trash",
|
|
114
84
|
value: "delete",
|
|
115
85
|
as: ModalDelete,
|
|
116
|
-
|
|
86
|
+
onConfirm,
|
|
117
87
|
},
|
|
118
88
|
];
|
|
119
89
|
|
|
@@ -130,12 +100,12 @@ const ActionButtons = ({
|
|
|
130
100
|
secondaryActions,
|
|
131
101
|
deleteAction,
|
|
132
102
|
id,
|
|
133
|
-
|
|
103
|
+
onConfirm,
|
|
134
104
|
}) => {
|
|
135
105
|
const availableActions = _.flow(
|
|
136
106
|
composeAvailableActions,
|
|
137
107
|
_.map(({ action, ...rest }) => ({ ...rest, to: action(id) })),
|
|
138
|
-
(actions) => (deleteAction ? withDelete(actions,
|
|
108
|
+
(actions) => (deleteAction ? withDelete(actions, onConfirm) : actions)
|
|
139
109
|
)(secondaryActions);
|
|
140
110
|
|
|
141
111
|
return (
|
|
@@ -152,7 +122,7 @@ const ActionButtons = ({
|
|
|
152
122
|
|
|
153
123
|
ActionButtons.propTypes = {
|
|
154
124
|
id: PropTypes.number,
|
|
155
|
-
|
|
125
|
+
onConfirm: PropTypes.func,
|
|
156
126
|
};
|
|
157
127
|
|
|
158
128
|
export class DomainActions extends React.Component {
|
|
@@ -184,7 +154,7 @@ export class DomainActions extends React.Component {
|
|
|
184
154
|
deleteAction={deleteAction}
|
|
185
155
|
show={this.show}
|
|
186
156
|
id={id}
|
|
187
|
-
|
|
157
|
+
onConfirm={this.handleConfirm}
|
|
188
158
|
/>
|
|
189
159
|
);
|
|
190
160
|
};
|