@truedat/df 4.45.1 → 4.45.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/df",
3
- "version": "4.45.1",
3
+ "version": "4.45.6",
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.4",
35
35
  "@testing-library/react": "^12.0.0",
36
36
  "@testing-library/user-event": "^13.2.1",
37
- "@truedat/test": "4.45.1",
37
+ "@truedat/test": "4.45.6",
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
  },
89
89
  "dependencies": {
90
- "@truedat/auth": "4.45.1",
91
- "@truedat/core": "4.45.1",
90
+ "@truedat/auth": "4.45.6",
91
+ "@truedat/core": "4.45.6",
92
92
  "axios": "^0.19.2",
93
93
  "path-to-regexp": "^1.7.0",
94
94
  "prop-types": "^15.8.1",
@@ -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": "c13f37ee357bf4a5e8c8c99eb6bd0c798f468c49"
110
+ "gitHead": "6624767ce3b6893d538087057b662d11f90eb72d"
111
111
  }
@@ -4,7 +4,7 @@ import { Button, Icon, Modal } from "semantic-ui-react";
4
4
  import {
5
5
  SortableContainer,
6
6
  SortableElement,
7
- arrayMove
7
+ arrayMove,
8
8
  } from "react-sortable-hoc";
9
9
  import { useIntl } from "react-intl";
10
10
  import {
@@ -13,13 +13,13 @@ import {
13
13
  copyFieldsStyle,
14
14
  mainContainerStyle,
15
15
  lastSortableItemStyle,
16
- buttonDisplayFieldsStyle
16
+ buttonDisplayFieldsStyle,
17
17
  } from "./CustomStyles";
18
18
  import { CopyFieldColumn } from "./CopyFieldColumn";
19
19
 
20
20
  export const CopyField = ({
21
21
  fields: { value: tableContent = [] },
22
- onChange
22
+ onChange,
23
23
  }) => {
24
24
  // eslint-disable-next-line fp/no-let
25
25
  let scrollLeft = 0;
@@ -33,12 +33,12 @@ export const CopyField = ({
33
33
  { definition: "Size", fieldType: "size" },
34
34
  { definition: "Format", fieldType: "format" },
35
35
  { definition: "Scale", fieldType: "scale" },
36
- { definition: "Precision", fieldType: "precision" }
37
- ].filter(tableDef =>
38
- tableContent.some(content => content[tableDef.fieldType])
36
+ { definition: "Precision", fieldType: "precision" },
37
+ ].filter((tableDef) =>
38
+ tableContent.some((content) => content[tableDef.fieldType])
39
39
  );
40
40
 
41
- const onChangeTableContent = tableContent => {
41
+ const onChangeTableContent = (tableContent) => {
42
42
  const value = tableContent.map(
43
43
  ({ name, type, size, scale, precision, format }) => {
44
44
  const tableColumn = { name, type };
@@ -61,13 +61,13 @@ export const CopyField = ({
61
61
  const addColumn = () => {
62
62
  onChangeTableContent([
63
63
  { name: getColumnName(), type: "string", size: 40 },
64
- ...tableContent
64
+ ...tableContent,
65
65
  ]);
66
66
  };
67
67
 
68
68
  const getColumnName = () => {
69
69
  const getIndex = (index = tableContent.length) => {
70
- if (!tableContent.find(column => column.name === `New${index}`)) {
70
+ if (!tableContent.find((column) => column.name === `New${index}`)) {
71
71
  return index;
72
72
  }
73
73
  return getIndex(index + 1);
@@ -92,14 +92,14 @@ export const CopyField = ({
92
92
  Object.assign(
93
93
  document.getElementsByClassName("copyFields" + (open ? "1" : "0"))[0],
94
94
  {
95
- scrollLeft
95
+ scrollLeft,
96
96
  }
97
97
  ),
98
98
  0
99
99
  );
100
100
  };
101
101
 
102
- const deleteColumn = index => {
102
+ const deleteColumn = (index) => {
103
103
  tableContent.splice(index, 1);
104
104
  onChangeTableContent(tableContent);
105
105
  setTimeout(
@@ -107,7 +107,7 @@ export const CopyField = ({
107
107
  Object.assign(
108
108
  document.getElementsByClassName("copyFields" + (open ? "1" : "0"))[0],
109
109
  {
110
- scrollLeft: scrollLeft - 150
110
+ scrollLeft: scrollLeft - 150,
111
111
  }
112
112
  ),
113
113
  0
@@ -131,13 +131,13 @@ export const CopyField = ({
131
131
  return (
132
132
  <div
133
133
  className={"copyFields copyFields" + containerIdx}
134
- onScroll={e => {
134
+ onScroll={(e) => {
135
135
  // eslint-disable-next-line fp/no-mutation
136
136
  scrollLeft = e.target.scrollLeft;
137
137
  }}
138
138
  style={{
139
139
  ...copyFieldsStyle,
140
- display: items.length ? "inline-flex" : "none"
140
+ display: items.length ? "inline-flex" : "none",
141
141
  }}
142
142
  >
143
143
  {items.map((value, index) => (
@@ -158,12 +158,12 @@ export const CopyField = ({
158
158
  Object.assign(
159
159
  document.getElementsByClassName("copyFields" + (open ? "1" : "0"))[0],
160
160
  {
161
- scrollLeft
161
+ scrollLeft,
162
162
  }
163
163
  );
164
164
  };
165
165
 
166
- const onFieldInvalid = textMessage => {
166
+ const onFieldInvalid = (textMessage) => {
167
167
  if (open) {
168
168
  Object.assign(
169
169
  errorModalMessage.current || {},
@@ -181,7 +181,7 @@ export const CopyField = ({
181
181
  }
182
182
  };
183
183
 
184
- const getModalContent = containerIdx => {
184
+ const getModalContent = (containerIdx) => {
185
185
  return (
186
186
  <div style={{ ...mainContainerStyle }}>
187
187
  <div>
@@ -251,7 +251,7 @@ export const CopyField = ({
251
251
  <Modal.Actions>
252
252
  <Button
253
253
  content={formatMessage({ id: "widget.copy.button.back" })}
254
- secondary={true}
254
+ secondary
255
255
  onClick={() => setOpen(false)}
256
256
  />
257
257
  </Modal.Actions>
@@ -264,7 +264,7 @@ export const CopyField = ({
264
264
 
265
265
  CopyField.propTypes = {
266
266
  fields: PropTypes.object,
267
- onChange: PropTypes.func
267
+ onChange: PropTypes.func,
268
268
  };
269
269
 
270
270
  export default CopyField;
@@ -187,7 +187,7 @@ export const ActiveGroupForm = ({
187
187
  />
188
188
  {!_.isEmpty(confirmDelete) && (
189
189
  <Confirm
190
- open={true}
190
+ open
191
191
  cancelButton={formatMessage({ id: "confirmation.no" })}
192
192
  confirmButton={formatMessage({ id: "confirmation.yes" })}
193
193
  content={formatMessage({
@@ -7,7 +7,7 @@ describe("<TemplateFormActions />", () => {
7
7
  const onDelete = jest.fn();
8
8
  const template = {
9
9
  id: 1,
10
- name: "Name"
10
+ name: "Name",
11
11
  };
12
12
  const templateSaving = false;
13
13
  const templateDeleting = false;
@@ -16,7 +16,7 @@ describe("<TemplateFormActions />", () => {
16
16
  templateSaving,
17
17
  templateDeleting,
18
18
  onDelete,
19
- onSave
19
+ onSave,
20
20
  };
21
21
 
22
22
  it("matches the latest snapshot", () => {
@@ -25,15 +25,13 @@ describe("<TemplateFormActions />", () => {
25
25
  });
26
26
 
27
27
  it("matches the latest snapshot (saving)", () => {
28
- const wrapper = shallow(
29
- <TemplateFormActions {...props} templateSaving={true} />
30
- );
28
+ const wrapper = shallow(<TemplateFormActions {...props} templateSaving />);
31
29
  expect(wrapper).toMatchSnapshot();
32
30
  });
33
31
 
34
32
  it("matches the latest snapshot (deleting)", () => {
35
33
  const wrapper = shallow(
36
- <TemplateFormActions {...props} templateDeleting={true} />
34
+ <TemplateFormActions {...props} templateDeleting />
37
35
  );
38
36
  expect(wrapper).toMatchSnapshot();
39
37
  });