@truedat/dq 7.2.9 → 7.2.11
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/dq",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.11",
|
|
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.2.
|
|
37
|
+
"@truedat/test": "7.2.11",
|
|
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",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@apollo/client": "^3.7.1",
|
|
95
|
-
"@truedat/core": "7.2.
|
|
96
|
-
"@truedat/df": "7.2.
|
|
95
|
+
"@truedat/core": "7.2.11",
|
|
96
|
+
"@truedat/df": "7.2.11",
|
|
97
97
|
"decode-uri-component": "^0.2.2",
|
|
98
98
|
"graphql": "^15.5.3",
|
|
99
99
|
"moment": "^2.29.4",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"react-dom": ">= 16.8.6 < 17",
|
|
119
119
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
120
120
|
},
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "74eb04f81dd49275229cf3050b56b897ff78410e"
|
|
122
122
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
toggleRuleFilterValue,
|
|
6
6
|
searchRules,
|
|
7
7
|
selectRulePage,
|
|
8
|
-
sortRules
|
|
8
|
+
sortRules,
|
|
9
9
|
} from "../../routines";
|
|
10
10
|
import { ruleQuery } from "..";
|
|
11
11
|
|
|
@@ -27,14 +27,14 @@ describe("reducers: ruleQuery", () => {
|
|
|
27
27
|
it("should handle the clearRuleFilters.TRIGGER action", () => {
|
|
28
28
|
expect(ruleQuery(fooState, { type: clearRuleFilters.TRIGGER })).toEqual({
|
|
29
29
|
...fooState,
|
|
30
|
-
page: 1
|
|
30
|
+
page: 1,
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
it("should return default page when filter is removed", () => {
|
|
35
35
|
expect(ruleQuery(fooState, { type: removeRuleFilter.TRIGGER })).toEqual({
|
|
36
36
|
...fooState,
|
|
37
|
-
page: 1
|
|
37
|
+
page: 1,
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ describe("reducers: ruleQuery", () => {
|
|
|
43
43
|
ruleQuery(fooState, { type: toggleRuleFilterValue.TRIGGER })
|
|
44
44
|
).toEqual({
|
|
45
45
|
...fooState,
|
|
46
|
-
page: 1
|
|
46
|
+
page: 1,
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
@@ -65,13 +65,13 @@ describe("reducers: ruleQuery", () => {
|
|
|
65
65
|
).toMatchObject({ query });
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
-
it("when query is not empty it should order by relevance
|
|
68
|
+
it("when query is not empty it should order by relevance", () => {
|
|
69
69
|
const payload = { query };
|
|
70
70
|
expect(
|
|
71
71
|
ruleQuery(fooState, { type: searchRules.TRIGGER, payload })
|
|
72
72
|
).toMatchObject({
|
|
73
73
|
query,
|
|
74
|
-
sort: [{ _score: "desc" },
|
|
74
|
+
sort: [{ _score: "desc" }],
|
|
75
75
|
});
|
|
76
76
|
});
|
|
77
77
|
|
|
@@ -81,7 +81,7 @@ describe("reducers: ruleQuery", () => {
|
|
|
81
81
|
ruleQuery(fooState, { type: searchRules.TRIGGER, payload })
|
|
82
82
|
).toMatchObject({
|
|
83
83
|
query: "",
|
|
84
|
-
sort: [{ "name.raw": "asc" }]
|
|
84
|
+
sort: [{ "name.raw": "asc" }],
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
});
|
|
@@ -10,17 +10,14 @@ import {
|
|
|
10
10
|
|
|
11
11
|
const defaultPage = 1;
|
|
12
12
|
const defaultSize = 20;
|
|
13
|
-
const defaultSearchSort = [
|
|
14
|
-
|
|
15
|
-
{ "implementation_key.sort": "asc" },
|
|
16
|
-
];
|
|
17
|
-
const byKeySort = [{ "implementation_key.sort": "asc" }];
|
|
13
|
+
const defaultSearchSort = [{ "implementation_key.sort": "asc" }];
|
|
14
|
+
const scoreSort = [{ _score: "desc" }];
|
|
18
15
|
|
|
19
16
|
export const initialState = {
|
|
20
17
|
query: "",
|
|
21
18
|
page: defaultPage,
|
|
22
19
|
size: defaultSize,
|
|
23
|
-
sort:
|
|
20
|
+
sort: defaultSearchSort,
|
|
24
21
|
};
|
|
25
22
|
|
|
26
23
|
const ruleImplementationQuery = (state = initialState, { type, payload }) => {
|
|
@@ -39,7 +36,7 @@ const ruleImplementationQuery = (state = initialState, { type, payload }) => {
|
|
|
39
36
|
case searchImplementations.TRIGGER: {
|
|
40
37
|
const page = defaultPage;
|
|
41
38
|
const query = _.propOr("", "query")(payload);
|
|
42
|
-
const sort = query != "" ?
|
|
39
|
+
const sort = query != "" ? scoreSort : defaultSearchSort;
|
|
43
40
|
return { ...state, query, page, sort };
|
|
44
41
|
}
|
|
45
42
|
case selectImplementationPage.TRIGGER: {
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
toggleRuleFilterValue,
|
|
6
6
|
searchRules,
|
|
7
7
|
selectRulePage,
|
|
8
|
-
sortRules
|
|
8
|
+
sortRules,
|
|
9
9
|
} from "../routines";
|
|
10
10
|
|
|
11
11
|
const defaultPage = 1;
|
|
12
12
|
const defaultSize = 20;
|
|
13
|
-
const defaultSearchSort = [{
|
|
14
|
-
const
|
|
13
|
+
const defaultSearchSort = [{ "name.raw": "asc" }];
|
|
14
|
+
const scoreSort = [{ _score: "desc" }];
|
|
15
15
|
|
|
16
16
|
export const initialState = {
|
|
17
17
|
query: "",
|
|
18
18
|
page: defaultPage,
|
|
19
19
|
size: defaultSize,
|
|
20
|
-
sort:
|
|
20
|
+
sort: defaultSearchSort,
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
const ruleQuery = (state = initialState, { type, payload }) => {
|
|
@@ -36,7 +36,7 @@ const ruleQuery = (state = initialState, { type, payload }) => {
|
|
|
36
36
|
case searchRules.TRIGGER: {
|
|
37
37
|
const page = defaultPage;
|
|
38
38
|
const query = _.propOr("", "query")(payload);
|
|
39
|
-
const sort = query != "" ?
|
|
39
|
+
const sort = query != "" ? scoreSort : defaultSearchSort;
|
|
40
40
|
return { ...state, query, page, sort };
|
|
41
41
|
}
|
|
42
42
|
case selectRulePage.TRIGGER: {
|