@truedat/bg 6.5.2 → 6.5.4

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/bg",
3
- "version": "6.5.2",
3
+ "version": "6.5.4",
4
4
  "description": "Truedat Web Business Glossary",
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": "6.5.2",
37
+ "@truedat/test": "6.5.4",
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",
@@ -86,9 +86,9 @@
86
86
  ]
87
87
  },
88
88
  "dependencies": {
89
- "@truedat/core": "6.5.2",
90
- "@truedat/df": "6.5.2",
91
- "@truedat/lm": "6.5.2",
89
+ "@truedat/core": "6.5.4",
90
+ "@truedat/df": "6.5.4",
91
+ "@truedat/lm": "6.5.4",
92
92
  "decode-uri-component": "^0.2.2",
93
93
  "file-saver": "^2.0.5",
94
94
  "moment": "^2.29.4",
@@ -111,5 +111,5 @@
111
111
  "react-dom": ">= 16.8.6 < 17",
112
112
  "semantic-ui-react": ">= 2.0.3 < 2.2"
113
113
  },
114
- "gitHead": "4e35f7cfa7562cdb15da70e2c74ceeaa458ad741"
114
+ "gitHead": "ca29de8f75c143bb950bb8c9fc8a4d96c97464fb"
115
115
  }
@@ -5,7 +5,6 @@ import { connect } from "react-redux";
5
5
  import { useLocation } from "react-router-dom";
6
6
  import { Table, Header, Icon } from "semantic-ui-react";
7
7
  import { FormattedMessage } from "react-intl";
8
- import { sortColumn } from "@truedat/core/services/sort";
9
8
  import { CONCEPTS_PENDING } from "@truedat/core/routes";
10
9
  import { useSearchContext } from "@truedat/core/search/SearchContext";
11
10
  import { getConceptColumns } from "../selectors";
@@ -15,10 +14,9 @@ export const ConceptsTable = ({ columnsByScope }) => {
15
14
  const {
16
15
  searchData,
17
16
  loading,
18
- sortColumn: sortedColumn,
19
- sortDirection: direction,
20
- setSortColumn: setColumn,
21
- setSortDirection: setDirection,
17
+ sortColumn,
18
+ sortDirection,
19
+ handleSortSelection,
22
20
  } = useSearchContext();
23
21
 
24
22
  const concepts = searchData?.data;
@@ -30,7 +28,6 @@ export const ConceptsTable = ({ columnsByScope }) => {
30
28
  const conceptColumns = columns.filter(
31
29
  (column) => pathname === CONCEPTS_PENDING || column.name != "status"
32
30
  );
33
- const dummySortFunc = () => {};
34
31
 
35
32
  return (
36
33
  <>
@@ -49,20 +46,13 @@ export const ConceptsTable = ({ columnsByScope }) => {
49
46
  />
50
47
  }
51
48
  sorted={
52
- _.path("sort.name")(column) === sortedColumn
53
- ? direction
49
+ _.path("sort.name")(column) === sortColumn
50
+ ? sortDirection
54
51
  : null
55
52
  }
56
53
  className={_.path("sort.name")(column) ? "" : "disabled"}
57
54
  onClick={() =>
58
- sortColumn(
59
- column,
60
- dummySortFunc,
61
- setDirection,
62
- setColumn,
63
- direction,
64
- sortedColumn
65
- )
55
+ handleSortSelection(_.path("sort.name")(column))
66
56
  }
67
57
  />
68
58
  ))}
@@ -25,12 +25,11 @@ const searchProps = {
25
25
 
26
26
  describe("<ConceptsUpdateButton />", () => {
27
27
  it("button will appear disabled if template is empty", () => {
28
- const { getByRole, debug } = render(
28
+ const { getByRole } = render(
29
29
  <SearchContext.Provider value={searchProps}>
30
30
  <ConceptsUpdateButton />
31
31
  </SearchContext.Provider>
32
32
  );
33
- debug();
34
33
  expect(getByRole("button", { name: /Update/i })).toBeEnabled();
35
34
  });
36
35