@truedat/dd 7.2.9 → 7.2.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@truedat/dd",
3
- "version": "7.2.9",
3
+ "version": "7.2.10",
4
4
  "description": "Truedat Web Data Dictionary",
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.9",
37
+ "@truedat/test": "7.2.10",
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",
@@ -88,9 +88,9 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@apollo/client": "^3.7.1",
91
- "@truedat/auth": "7.2.9",
92
- "@truedat/core": "7.2.9",
93
- "@truedat/df": "7.2.9",
91
+ "@truedat/auth": "7.2.10",
92
+ "@truedat/core": "7.2.10",
93
+ "@truedat/df": "7.2.10",
94
94
  "lodash": "^4.17.21",
95
95
  "moment": "^2.29.4",
96
96
  "path-to-regexp": "^1.7.0",
@@ -115,5 +115,5 @@
115
115
  "react-dom": ">= 16.8.6 < 17",
116
116
  "semantic-ui-react": ">= 2.0.3 < 2.2"
117
117
  },
118
- "gitHead": "208c632f7f18e209553299cfe267fbe43d1de285"
118
+ "gitHead": "425c9b112aaab0b8a0b43160f818b21a3b32b926"
119
119
  }
@@ -74,16 +74,13 @@ describe("reducers: grantQuery", () => {
74
74
  ).toMatchObject({ query });
75
75
  });
76
76
 
77
- it("when query is not empty it should order by relevance and name", () => {
77
+ it("when query is not empty it should order by relevance", () => {
78
78
  const payload = { query };
79
79
  expect(
80
80
  grantQuery(fooState, { type: searchGrants.TRIGGER, payload })
81
81
  ).toMatchObject({
82
82
  query,
83
- sort: [
84
- { _score: "desc" },
85
- { "data_structure_version.name.raw": "asc" },
86
- ],
83
+ sort: [{ _score: "desc" }],
87
84
  });
88
85
  });
89
86
 
@@ -34,7 +34,7 @@ describe("reducers: structureQuery", () => {
34
34
  structureQuery(fooState, { type: searchStructures.TRIGGER, payload })
35
35
  ).toMatchObject({
36
36
  query,
37
- sort: [{ _score: "desc" }, { "name.raw": "asc" }],
37
+ sort: [{ _score: "desc" }],
38
38
  });
39
39
  });
40
40
 
@@ -11,17 +11,14 @@ import {
11
11
 
12
12
  const defaultPage = 1;
13
13
  const defaultSize = 20;
14
- const defaultSearchSort = [
15
- { _score: "desc" },
16
- { "data_structure_version.name.raw": "asc" },
17
- ];
18
- const byNameSort = [{ "data_structure_version.name.raw": "asc" }];
14
+ const defaultSearchSort = [{ "data_structure_version.name.raw": "asc" }];
15
+ const scoreSort = [{ _score: "desc" }];
19
16
 
20
17
  export const initialState = {
21
18
  query: "",
22
19
  page: defaultPage,
23
20
  size: defaultSize,
24
- sort: byNameSort,
21
+ sort: defaultSearchSort,
25
22
  };
26
23
 
27
24
  const grantQuery = (state = initialState, { type, payload }) => {
@@ -40,7 +37,7 @@ const grantQuery = (state = initialState, { type, payload }) => {
40
37
  case searchGrants.TRIGGER: {
41
38
  const page = defaultPage;
42
39
  const query = _.propOr("", "query")(payload);
43
- const sort = query != "" ? defaultSearchSort : byNameSort;
40
+ const sort = query != "" ? scoreSort : defaultSearchSort;
44
41
  return { ...state, query, page, sort };
45
42
  }
46
43
  case selectGrantPage.TRIGGER: {
@@ -52,7 +49,7 @@ const grantQuery = (state = initialState, { type, payload }) => {
52
49
  return { ...state, sort, page: defaultPage };
53
50
  }
54
51
  case clearGrantsSort.TRIGGER: {
55
- return { ...state, sort: byNameSort };
52
+ return { ...state, sort: defaultSearchSort };
56
53
  }
57
54
  default:
58
55
  return state;
@@ -3,14 +3,14 @@ import { clearStructureFilters, searchStructures } from "../routines";
3
3
 
4
4
  const defaultPage = 1;
5
5
  const defaultSize = 20;
6
- const defaultSearchSort = [{ _score: "desc" }, { "name.raw": "asc" }];
7
- const byNameSort = [{ "name.raw": "asc" }];
6
+ const defaultSearchSort = [{ "name.raw": "asc" }];
7
+ const scoreSort = [{ _score: "desc" }];
8
8
 
9
9
  export const initialState = {
10
10
  query: "",
11
11
  page: defaultPage,
12
12
  size: defaultSize,
13
- sort: byNameSort,
13
+ sort: defaultSearchSort,
14
14
  };
15
15
 
16
16
  const structureQuery = (state = initialState, { type, payload }) => {
@@ -21,7 +21,7 @@ const structureQuery = (state = initialState, { type, payload }) => {
21
21
  case searchStructures.TRIGGER: {
22
22
  const page = defaultPage;
23
23
  const query = _.propOr("", "query")(payload);
24
- const sort = query != "" ? defaultSearchSort : byNameSort;
24
+ const sort = query != "" ? scoreSort : defaultSearchSort;
25
25
  return { ...state, query, page, sort };
26
26
  }
27
27
  default: