@truedat/df 7.5.4 → 7.5.5
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/components/widgets/CopyField/CopyFieldCell.js +6 -6
- package/src/components/widgets/CopyField/__tests__/__snapshots__/CopyFieldCell.spec.js.snap +2 -1
- package/src/components/widgets/ImageField.js +6 -6
- package/src/components/widgets/TableField.js +12 -4
- package/src/components/widgets/__tests__/__snapshots__/ImageField.spec.js.snap +7 -1
- package/src/components/widgets/__tests__/__snapshots__/TableField.spec.js.snap +28 -10
- package/src/templates/components/Template.js +4 -1
- package/src/templates/components/__tests__/__snapshots__/Template.spec.js.snap +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/df",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.5",
|
|
4
4
|
"description": "Truedat Web Data Quality Module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@testing-library/jest-dom": "^5.16.5",
|
|
35
35
|
"@testing-library/react": "^12.0.0",
|
|
36
36
|
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "7.5.
|
|
37
|
+
"@truedat/test": "7.5.5",
|
|
38
38
|
"babel-jest": "^28.1.0",
|
|
39
39
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
40
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -87,8 +87,8 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"@apollo/client": "^3.7.1",
|
|
90
|
-
"@truedat/auth": "7.5.
|
|
91
|
-
"@truedat/core": "7.5.
|
|
90
|
+
"@truedat/auth": "7.5.5",
|
|
91
|
+
"@truedat/core": "7.5.5",
|
|
92
92
|
"decode-uri-component": "^0.2.2",
|
|
93
93
|
"path-to-regexp": "^1.7.0",
|
|
94
94
|
"prop-types": "^15.8.1",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"react-dom": ">= 16.8.6 < 17",
|
|
110
110
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "2a4343b3b2837540358b57d3d647408ab292aa21"
|
|
113
113
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
disabledCellStyle,
|
|
9
9
|
deleteContainerStyle,
|
|
10
10
|
deleteButtonStyle,
|
|
11
|
-
cellContentStyle
|
|
11
|
+
cellContentStyle,
|
|
12
12
|
} from "./CustomStyles";
|
|
13
13
|
|
|
14
14
|
export const CopyFieldCell = ({
|
|
@@ -64,13 +64,13 @@ export const CopyFieldCell = ({
|
|
|
64
64
|
);
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
const onChangeField = event => {
|
|
67
|
+
const onChangeField = (event) => {
|
|
68
68
|
setCellValue(
|
|
69
69
|
isNaN(event.target.value) ? event.target.value : +event.target.value
|
|
70
70
|
);
|
|
71
71
|
};
|
|
72
72
|
|
|
73
|
-
const getCellContent = value => {
|
|
73
|
+
const getCellContent = (value) => {
|
|
74
74
|
const cellContent = (
|
|
75
75
|
<div
|
|
76
76
|
className="cellContent"
|
|
@@ -95,7 +95,7 @@ export const CopyFieldCell = ({
|
|
|
95
95
|
tabIndex="0"
|
|
96
96
|
onKeyDown={onKeyDownOnField.bind(this, colIndex, field)}
|
|
97
97
|
autoFocus
|
|
98
|
-
onChange={event => {
|
|
98
|
+
onChange={(event) => {
|
|
99
99
|
event.persist();
|
|
100
100
|
onChangeField(event);
|
|
101
101
|
}}
|
|
@@ -119,7 +119,7 @@ export const CopyFieldCell = ({
|
|
|
119
119
|
onMouseDown={() => onDeleteButtonPressed(colIndex)}
|
|
120
120
|
>
|
|
121
121
|
<Button style={{ ...deleteButtonStyle }} size="mini" icon>
|
|
122
|
-
<Icon name="trash" />
|
|
122
|
+
<Icon name="trash alternate outline" color="red" />
|
|
123
123
|
</Button>
|
|
124
124
|
</div>
|
|
125
125
|
)}
|
|
@@ -132,7 +132,7 @@ CopyFieldCell.propTypes = {
|
|
|
132
132
|
colIndex: PropTypes.number,
|
|
133
133
|
value: PropTypes.string,
|
|
134
134
|
isHeader: PropTypes.bool,
|
|
135
|
-
isModalOpened: PropTypes.bool
|
|
135
|
+
isModalOpened: PropTypes.bool,
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
export default CopyFieldCell;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
|
-
import { Button, Message } from "semantic-ui-react";
|
|
3
|
+
import { Button, Message, Icon } from "semantic-ui-react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import ImagePreview from "./ImagePreview";
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ export const ImageField = ({ field: { name, value }, onChange }) => {
|
|
|
11
11
|
const [inputError, setInputError] = useState();
|
|
12
12
|
const { formatMessage } = useIntl();
|
|
13
13
|
|
|
14
|
-
const handleImageChange = e => {
|
|
14
|
+
const handleImageChange = (e) => {
|
|
15
15
|
e.preventDefault();
|
|
16
16
|
|
|
17
17
|
const reader = new FileReader();
|
|
@@ -51,13 +51,13 @@ export const ImageField = ({ field: { name, value }, onChange }) => {
|
|
|
51
51
|
// eslint-disable-next-line fp/no-mutation
|
|
52
52
|
reader.readAsDataURL(file);
|
|
53
53
|
};
|
|
54
|
-
const clearImage = e => {
|
|
54
|
+
const clearImage = (e) => {
|
|
55
55
|
onChange(e, { name, value: null });
|
|
56
56
|
setInputValue("");
|
|
57
57
|
};
|
|
58
58
|
const deleteButtonStyle = {
|
|
59
59
|
margin: 5,
|
|
60
|
-
width: "100%"
|
|
60
|
+
width: "100%",
|
|
61
61
|
};
|
|
62
62
|
|
|
63
63
|
return (
|
|
@@ -78,7 +78,7 @@ export const ImageField = ({ field: { name, value }, onChange }) => {
|
|
|
78
78
|
<Button
|
|
79
79
|
style={deleteButtonStyle}
|
|
80
80
|
compact
|
|
81
|
-
icon="trash alternate"
|
|
81
|
+
icon={<Icon name="trash alternate outline" color="red" />}
|
|
82
82
|
onClick={clearImage}
|
|
83
83
|
/>
|
|
84
84
|
<ImagePreview value={value} />
|
|
@@ -90,7 +90,7 @@ export const ImageField = ({ field: { name, value }, onChange }) => {
|
|
|
90
90
|
|
|
91
91
|
ImageField.propTypes = {
|
|
92
92
|
field: PropTypes.object,
|
|
93
|
-
onChange: PropTypes.func
|
|
93
|
+
onChange: PropTypes.func,
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
export default ImageField;
|
|
@@ -78,10 +78,18 @@ export const TableField = ({
|
|
|
78
78
|
</Table.Cell>
|
|
79
79
|
))}
|
|
80
80
|
<Table.Cell style={{ textAlign: "center", padding: "1px" }}>
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
<Button
|
|
82
|
+
icon={
|
|
83
|
+
<Icon
|
|
84
|
+
className="selectable"
|
|
85
|
+
name="trash alternate outline"
|
|
86
|
+
color="red"
|
|
87
|
+
onClick={(e) => handleRemoveRow(e, i)}
|
|
88
|
+
/>
|
|
89
|
+
}
|
|
90
|
+
color="red"
|
|
91
|
+
size="mini"
|
|
92
|
+
basic
|
|
85
93
|
/>
|
|
86
94
|
</Table.Cell>
|
|
87
95
|
</Table.Row>
|
|
@@ -18,7 +18,13 @@ exports[`<ImageField /> matches the latest snapshot 1`] = `
|
|
|
18
18
|
<Button
|
|
19
19
|
as="button"
|
|
20
20
|
compact={true}
|
|
21
|
-
icon=
|
|
21
|
+
icon={
|
|
22
|
+
<Icon
|
|
23
|
+
as="i"
|
|
24
|
+
color="red"
|
|
25
|
+
name="trash alternate outline"
|
|
26
|
+
/>
|
|
27
|
+
}
|
|
22
28
|
onClick={[Function]}
|
|
23
29
|
style={
|
|
24
30
|
{
|
|
@@ -82,11 +82,20 @@ exports[`<TableField /> matches the latest snapshot 1`] = `
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
>
|
|
85
|
-
<
|
|
86
|
-
as="
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
<Button
|
|
86
|
+
as="button"
|
|
87
|
+
basic={true}
|
|
88
|
+
color="red"
|
|
89
|
+
icon={
|
|
90
|
+
<Icon
|
|
91
|
+
as="i"
|
|
92
|
+
className="selectable"
|
|
93
|
+
color="red"
|
|
94
|
+
name="trash alternate outline"
|
|
95
|
+
onClick={[Function]}
|
|
96
|
+
/>
|
|
97
|
+
}
|
|
98
|
+
size="mini"
|
|
90
99
|
/>
|
|
91
100
|
</TableCell>
|
|
92
101
|
</TableRow>
|
|
@@ -130,11 +139,20 @@ exports[`<TableField /> matches the latest snapshot 1`] = `
|
|
|
130
139
|
}
|
|
131
140
|
}
|
|
132
141
|
>
|
|
133
|
-
<
|
|
134
|
-
as="
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
142
|
+
<Button
|
|
143
|
+
as="button"
|
|
144
|
+
basic={true}
|
|
145
|
+
color="red"
|
|
146
|
+
icon={
|
|
147
|
+
<Icon
|
|
148
|
+
as="i"
|
|
149
|
+
className="selectable"
|
|
150
|
+
color="red"
|
|
151
|
+
name="trash alternate outline"
|
|
152
|
+
onClick={[Function]}
|
|
153
|
+
/>
|
|
154
|
+
}
|
|
155
|
+
size="mini"
|
|
138
156
|
/>
|
|
139
157
|
</TableCell>
|
|
140
158
|
</TableRow>
|
|
@@ -49,10 +49,13 @@ export const Template = ({
|
|
|
49
49
|
{template.id && (
|
|
50
50
|
<ConfirmModal
|
|
51
51
|
icon="trash"
|
|
52
|
+
color="red"
|
|
52
53
|
trigger={
|
|
53
54
|
<Button
|
|
54
55
|
negative
|
|
55
|
-
|
|
56
|
+
basic
|
|
57
|
+
icon={<Icon name="trash alternate outline" color="red" />}
|
|
58
|
+
color="red"
|
|
56
59
|
loading={templateDeleting}
|
|
57
60
|
disabled={templateSaving || templateDeleting}
|
|
58
61
|
/>
|
|
@@ -413,11 +413,11 @@ exports[`<Template /> matches the latest snapshot with previous data 1`] = `
|
|
|
413
413
|
class="ui right aligned container"
|
|
414
414
|
>
|
|
415
415
|
<button
|
|
416
|
-
class="ui icon negative button"
|
|
416
|
+
class="ui red basic icon negative button"
|
|
417
417
|
>
|
|
418
418
|
<i
|
|
419
419
|
aria-hidden="true"
|
|
420
|
-
class="trash icon"
|
|
420
|
+
class="red trash alternate outline icon"
|
|
421
421
|
/>
|
|
422
422
|
</button>
|
|
423
423
|
</div>
|