@truedat/profile 7.5.9 → 7.5.10
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 +41 -67
- package/src/components/ProfilingElements.js +1 -5
- package/src/components/ProfilingGraph.js +0 -1
- package/src/components/ProfilingPatterns.js +0 -1
- package/src/components/StructureProfiling.js +14 -13
- package/src/components/__tests__/StructureProfiling.spec.js +0 -1
- package/src/components/__tests__/__snapshots__/StructureProfiling.spec.js.snap +10 -15
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/profile",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.10",
|
|
4
4
|
"description": "Truedat Web Custom",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"jsnext:main": "src/index.js",
|
|
7
6
|
"module": "src/index.js",
|
|
8
7
|
"files": [
|
|
9
|
-
"src"
|
|
8
|
+
"src",
|
|
9
|
+
"index.js"
|
|
10
10
|
],
|
|
11
11
|
"author": "Bluetab Solutions",
|
|
12
12
|
"license": "GPL-3.0",
|
|
@@ -15,64 +15,25 @@
|
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"clean": "rimraf yarn-error.log",
|
|
18
|
-
"debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
|
|
19
18
|
"test": "TZ=UTC jest --coverage",
|
|
20
|
-
"test:watch": "TZ=UTC jest --watch",
|
|
21
19
|
"eslint": "eslint src/**",
|
|
22
20
|
"eslint:fix": "eslint --fix src/**"
|
|
23
21
|
},
|
|
24
|
-
"devDependencies": {
|
|
25
|
-
"@babel/cli": "^7.19.3",
|
|
26
|
-
"@babel/core": "^7.20.5",
|
|
27
|
-
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
28
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.20.2",
|
|
29
|
-
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
|
|
30
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
31
|
-
"@babel/plugin-transform-modules-commonjs": "^7.19.6",
|
|
32
|
-
"@babel/preset-env": "^7.20.2",
|
|
33
|
-
"@babel/preset-react": "^7.18.6",
|
|
34
|
-
"@testing-library/jest-dom": "^5.16.5",
|
|
35
|
-
"@testing-library/react": "^12.0.0",
|
|
36
|
-
"@testing-library/user-event": "^13.2.1",
|
|
37
|
-
"@truedat/test": "7.5.9",
|
|
38
|
-
"babel-jest": "^28.1.0",
|
|
39
|
-
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
40
|
-
"babel-plugin-lodash": "^3.3.4",
|
|
41
|
-
"babel-plugin-react-intl": "^5.1.18",
|
|
42
|
-
"babel-plugin-transform-semantic-ui-react-imports": "^1.4.1",
|
|
43
|
-
"enzyme": "^3.11.0",
|
|
44
|
-
"enzyme-to-json": "^3.6.2",
|
|
45
|
-
"identity-obj-proxy": "^3.0.0",
|
|
46
|
-
"jest": "^29.0.0",
|
|
47
|
-
"jest-environment-jsdom": "^29.0.0",
|
|
48
|
-
"react": "^16.14.0",
|
|
49
|
-
"react-dom": "^16.14.0",
|
|
50
|
-
"redux-saga-test-plan": "^4.0.4",
|
|
51
|
-
"rimraf": "^3.0.2",
|
|
52
|
-
"semantic-ui-react": "^2.1.4"
|
|
53
|
-
},
|
|
54
22
|
"jest": {
|
|
55
23
|
"maxWorkers": "50%",
|
|
56
24
|
"testTimeout": 10000,
|
|
57
25
|
"moduleDirectories": [
|
|
58
|
-
"<rootDir>/src"
|
|
59
|
-
"../../node_modules"
|
|
60
|
-
],
|
|
61
|
-
"setupFilesAfterEnv": [
|
|
62
|
-
"@truedat/test/setup"
|
|
26
|
+
"<rootDir>/src"
|
|
63
27
|
],
|
|
64
28
|
"moduleNameMapper": {
|
|
65
29
|
"\\.(css|less|png)$": "identity-obj-proxy",
|
|
66
30
|
"^@truedat/([^/]+)$": "<rootDir>/../$1/src/index",
|
|
67
31
|
"^@truedat/([^/]+)/(.*)$": "<rootDir>/../$1/src/$2"
|
|
68
32
|
},
|
|
69
|
-
"
|
|
70
|
-
"
|
|
33
|
+
"setupFilesAfterEnv": [
|
|
34
|
+
"@truedat/test/setup"
|
|
71
35
|
],
|
|
72
36
|
"testEnvironment": "jsdom",
|
|
73
|
-
"testPathIgnorePatterns": [
|
|
74
|
-
"<rootDir>/node_modules/"
|
|
75
|
-
],
|
|
76
37
|
"transform": {
|
|
77
38
|
"\\.js$": [
|
|
78
39
|
"babel-jest",
|
|
@@ -80,32 +41,45 @@
|
|
|
80
41
|
"rootMode": "upward"
|
|
81
42
|
}
|
|
82
43
|
]
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@testing-library/dom": "^10.4.0",
|
|
48
|
+
"@testing-library/jest-dom": "^6.6.3",
|
|
49
|
+
"@testing-library/react": "^16.2.0",
|
|
50
|
+
"@testing-library/user-event": "^14.6.1",
|
|
51
|
+
"@truedat/test": "7.5.10",
|
|
52
|
+
"identity-obj-proxy": "^3.0.0",
|
|
53
|
+
"jest": "^29.7.0",
|
|
54
|
+
"redux-saga-test-plan": "^4.0.6"
|
|
87
55
|
},
|
|
88
56
|
"dependencies": {
|
|
89
|
-
"@
|
|
90
|
-
"
|
|
91
|
-
"
|
|
57
|
+
"@apollo/client": "^3.13.5",
|
|
58
|
+
"axios": "^1.8.4",
|
|
59
|
+
"graphql": "^16.10.0",
|
|
60
|
+
"is-hotkey": "^0.2.0",
|
|
61
|
+
"is-url": "^1.2.4",
|
|
92
62
|
"lodash": "^4.17.21",
|
|
93
|
-
"
|
|
63
|
+
"moment": "^2.30.1",
|
|
64
|
+
"path-to-regexp": "^8.2.0",
|
|
94
65
|
"prop-types": "^15.8.1",
|
|
95
|
-
"
|
|
96
|
-
"react
|
|
97
|
-
"react-
|
|
98
|
-
"react-
|
|
99
|
-
"
|
|
100
|
-
"
|
|
66
|
+
"query-string": "^7.1.2",
|
|
67
|
+
"react": "^19.0.0",
|
|
68
|
+
"react-csv": "^2.2.2",
|
|
69
|
+
"react-dom": "^19.0.0",
|
|
70
|
+
"react-dropzone": "^14.3.8",
|
|
71
|
+
"react-hook-form": "^7.54.2",
|
|
72
|
+
"react-intl": "^7.1.10",
|
|
73
|
+
"react-moment": "^1.1.3",
|
|
74
|
+
"react-redux": "^9.2.0",
|
|
75
|
+
"react-router": "^7.4.0",
|
|
76
|
+
"redux": "^5.0.1",
|
|
77
|
+
"redux-saga": "^1.3.0",
|
|
101
78
|
"redux-saga-routines": "^3.2.3",
|
|
102
|
-
"
|
|
103
|
-
"
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"react": ">= 16.8.6 < 17",
|
|
107
|
-
"react-dom": ">= 16.8.6 < 17",
|
|
108
|
-
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
79
|
+
"reselect": "^5.1.1",
|
|
80
|
+
"semantic-ui-calendar-react": "^0.15.3",
|
|
81
|
+
"semantic-ui-react": "^3.0.0-beta.2",
|
|
82
|
+
"swr": "^2.3.3"
|
|
109
83
|
},
|
|
110
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "8a8c49e9d5d6bb4e5f2b503b063bfd6dd20a503d"
|
|
111
85
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import { connect } from "react-redux";
|
|
5
5
|
import { Button, Icon, Grid, Segment } from "semantic-ui-react";
|
|
@@ -43,18 +43,15 @@ export const ProfilingElements = ({ profile }) => {
|
|
|
43
43
|
</Button.Group>
|
|
44
44
|
</Grid.Column>
|
|
45
45
|
</Grid>
|
|
46
|
-
|
|
47
46
|
{elementActive === "graph" && <ProfilingGraph />}
|
|
48
47
|
{elementActive === "patterns" && <ProfilingPatterns />}
|
|
49
48
|
</>
|
|
50
49
|
)}
|
|
51
|
-
|
|
52
50
|
{!_.isEmpty(most_frequent) && _.isEmpty(patterns) && (
|
|
53
51
|
<Segment attached="bottom">
|
|
54
52
|
<ProfilingGraph />
|
|
55
53
|
</Segment>
|
|
56
54
|
)}
|
|
57
|
-
|
|
58
55
|
{_.isEmpty(most_frequent) && !_.isEmpty(patterns) && (
|
|
59
56
|
<>
|
|
60
57
|
<Grid>
|
|
@@ -64,7 +61,6 @@ export const ProfilingElements = ({ profile }) => {
|
|
|
64
61
|
</p>
|
|
65
62
|
</Grid.Column>
|
|
66
63
|
</Grid>
|
|
67
|
-
|
|
68
64
|
<ProfilingPatterns />
|
|
69
65
|
</>
|
|
70
66
|
)}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _ from "lodash/fp";
|
|
2
|
-
import
|
|
2
|
+
import { useState } from "react";
|
|
3
3
|
import PropTypes from "prop-types";
|
|
4
4
|
import queryString from "query-string";
|
|
5
5
|
import { connect } from "react-redux";
|
|
6
|
-
import { useLocation
|
|
6
|
+
import { useLocation } from "react-router";
|
|
7
|
+
import { useParams, useNavigate } from "react-router";
|
|
7
8
|
import { useQuery } from "@apollo/client";
|
|
8
9
|
import { Icon, Input, Message, Table } from "semantic-ui-react";
|
|
9
10
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
10
|
-
import { Link } from "react-router
|
|
11
|
+
import { Link } from "react-router";
|
|
11
12
|
import { linkTo } from "@truedat/core/routes";
|
|
12
13
|
import { DATA_FIELDS_QUERY } from "@truedat/dd/api/queries";
|
|
13
14
|
import { Loading } from "@truedat/core/components";
|
|
@@ -63,10 +64,10 @@ export const FieldProfileRow = ({ profile, data_structure_id, name }) => {
|
|
|
63
64
|
<Table.Cell className="text-right" content={uniquePercent} />
|
|
64
65
|
<Table.Cell className="text-right" content={nullPercent} />
|
|
65
66
|
<Table.Cell>
|
|
66
|
-
<span title={minTitle}>
|
|
67
|
+
<span title={minTitle}>{minValue}</span>
|
|
67
68
|
</Table.Cell>
|
|
68
69
|
<Table.Cell>
|
|
69
|
-
<span title={maxTitle}>
|
|
70
|
+
<span title={maxTitle}>{maxValue}</span>
|
|
70
71
|
</Table.Cell>
|
|
71
72
|
<Table.Cell content={modeValue} />
|
|
72
73
|
</Table.Row>
|
|
@@ -126,7 +127,7 @@ StructureProfilingTable.propTypes = {
|
|
|
126
127
|
const StructureProfileForParent = () => {
|
|
127
128
|
const { id: dataStructureId, version: version } = useParams();
|
|
128
129
|
const { formatMessage } = useIntl();
|
|
129
|
-
const
|
|
130
|
+
const navigate = useNavigate();
|
|
130
131
|
const { pathname, search } = useLocation();
|
|
131
132
|
const { before, after, q } = queryString.parse(search);
|
|
132
133
|
const [searchQuery, setSearchQuery] = useState(q || "");
|
|
@@ -141,15 +142,15 @@ const StructureProfileForParent = () => {
|
|
|
141
142
|
const fields = data?.dataFields?.page || [];
|
|
142
143
|
const pageInfo = data?.dataFields?.pageInfo || {};
|
|
143
144
|
|
|
144
|
-
const debounceSearch =
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
const debounceSearch = _.debounce(300)((value) => {
|
|
146
|
+
navigate(
|
|
147
|
+
{
|
|
147
148
|
pathname: pathname,
|
|
148
149
|
search: queryString.stringify({ q: value }),
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
);
|
|
150
|
+
},
|
|
151
|
+
{ replace: true }
|
|
152
|
+
);
|
|
153
|
+
});
|
|
153
154
|
const handleInputChange = (e) => {
|
|
154
155
|
const value = e.target.value;
|
|
155
156
|
setSearchQuery(value);
|
|
@@ -6,7 +6,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
6
6
|
class="ui left icon input"
|
|
7
7
|
>
|
|
8
8
|
<input
|
|
9
|
-
placeholder="
|
|
9
|
+
placeholder="structure.search.placeholder"
|
|
10
10
|
type="text"
|
|
11
11
|
value=""
|
|
12
12
|
/>
|
|
@@ -27,32 +27,32 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
27
27
|
<th
|
|
28
28
|
class=""
|
|
29
29
|
>
|
|
30
|
-
|
|
30
|
+
profiling.field.name
|
|
31
31
|
</th>
|
|
32
32
|
<th
|
|
33
33
|
class="text-right"
|
|
34
34
|
>
|
|
35
|
-
|
|
35
|
+
profiling.field.unique
|
|
36
36
|
</th>
|
|
37
37
|
<th
|
|
38
38
|
class="text-right"
|
|
39
39
|
>
|
|
40
|
-
|
|
40
|
+
profiling.field.null
|
|
41
41
|
</th>
|
|
42
42
|
<th
|
|
43
43
|
class=""
|
|
44
44
|
>
|
|
45
|
-
|
|
45
|
+
profiling.field.min
|
|
46
46
|
</th>
|
|
47
47
|
<th
|
|
48
48
|
class=""
|
|
49
49
|
>
|
|
50
|
-
|
|
50
|
+
profiling.field.max
|
|
51
51
|
</th>
|
|
52
52
|
<th
|
|
53
53
|
class=""
|
|
54
54
|
>
|
|
55
|
-
|
|
55
|
+
profiling.field.mode
|
|
56
56
|
</th>
|
|
57
57
|
</tr>
|
|
58
58
|
</thead>
|
|
@@ -66,6 +66,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
66
66
|
class=""
|
|
67
67
|
>
|
|
68
68
|
<a
|
|
69
|
+
data-discover="true"
|
|
69
70
|
href="/structures/1/profile"
|
|
70
71
|
>
|
|
71
72
|
field1
|
|
@@ -87,9 +88,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
87
88
|
<span
|
|
88
89
|
title=""
|
|
89
90
|
>
|
|
90
|
-
|
|
91
91
|
33
|
|
92
|
-
|
|
93
92
|
</span>
|
|
94
93
|
</td>
|
|
95
94
|
<td
|
|
@@ -98,9 +97,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
98
97
|
<span
|
|
99
98
|
title=""
|
|
100
99
|
>
|
|
101
|
-
|
|
102
100
|
40
|
|
103
|
-
|
|
104
101
|
</span>
|
|
105
102
|
</td>
|
|
106
103
|
<td
|
|
@@ -116,6 +113,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
116
113
|
class=""
|
|
117
114
|
>
|
|
118
115
|
<a
|
|
116
|
+
data-discover="true"
|
|
119
117
|
href="/structures/2/profile"
|
|
120
118
|
>
|
|
121
119
|
field2
|
|
@@ -137,9 +135,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
137
135
|
<span
|
|
138
136
|
title=""
|
|
139
137
|
>
|
|
140
|
-
|
|
141
138
|
33
|
|
142
|
-
|
|
143
139
|
</span>
|
|
144
140
|
</td>
|
|
145
141
|
<td
|
|
@@ -148,9 +144,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
148
144
|
<span
|
|
149
145
|
title=""
|
|
150
146
|
>
|
|
151
|
-
|
|
152
147
|
40
|
|
153
|
-
|
|
154
148
|
</span>
|
|
155
149
|
</td>
|
|
156
150
|
<td
|
|
@@ -168,6 +162,7 @@ exports[`<StructureProfiling /> matches the latest snapshot (fields) 1`] = `
|
|
|
168
162
|
<a
|
|
169
163
|
aria-label="First"
|
|
170
164
|
class="disabled link item"
|
|
165
|
+
data-discover="true"
|
|
171
166
|
href="/"
|
|
172
167
|
>
|
|
173
168
|
«
|