@truedat/dd 5.14.1 → 5.15.0

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": "5.14.1",
3
+ "version": "5.15.0",
4
4
  "description": "Truedat Web Data Dictionary",
5
5
  "sideEffects": false,
6
6
  "jsnext:main": "src/index.js",
@@ -88,9 +88,9 @@
88
88
  },
89
89
  "dependencies": {
90
90
  "@apollo/client": "^3.7.1",
91
- "@truedat/auth": "5.14.1",
92
- "@truedat/core": "5.14.1",
93
- "@truedat/df": "5.14.1",
91
+ "@truedat/auth": "5.15.0",
92
+ "@truedat/core": "5.15.0",
93
+ "@truedat/df": "5.15.0",
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": "a4ee212708f281ed1bbe15431e6d8731a55f2d29"
118
+ "gitHead": "93bcd66804df32821aa0d563b863774554a39047"
119
119
  }
@@ -25,6 +25,7 @@ export const StructureSelector = ({
25
25
  pageSize = 7,
26
26
  links,
27
27
  placeToTop,
28
+ withDataFields,
28
29
  }) => {
29
30
  const [selectedStructure, setSelectedStructure] = useState(null);
30
31
  useEffect(() => {
@@ -39,7 +40,11 @@ export const StructureSelector = ({
39
40
 
40
41
  return (
41
42
  <Segment>
42
- <StructuresLoader pageSize={pageSize} defaultFilters={defaultFilters} />
43
+ <StructuresLoader
44
+ withDataFields
45
+ pageSize={pageSize}
46
+ defaultFilters={defaultFilters}
47
+ />
43
48
  <StructureTypesLoader />
44
49
  <StructureFiltersLoader defaultFilters={defaultFilters} />
45
50
  <StructuresSearch />
@@ -72,6 +77,7 @@ StructureSelector.propTypes = {
72
77
  structuresRows: PropTypes.array,
73
78
  links: PropTypes.array,
74
79
  placeToTop: PropTypes.bool,
80
+ withDataFields: PropTypes.bool,
75
81
  };
76
82
 
77
83
  export const mapStateToProps = (state, props) => ({
@@ -9,6 +9,7 @@ export const StructuresLoader = ({
9
9
  fetchStructures,
10
10
  payload,
11
11
  withGrantRequests,
12
+ withDataFields,
12
13
  }) => {
13
14
  useEffect(() => {
14
15
  return () => {
@@ -16,8 +17,12 @@ export const StructuresLoader = ({
16
17
  };
17
18
  }, [clearStructures]);
18
19
  useEffect(() => {
19
- fetchStructures({ ...payload, my_grant_requests: !!withGrantRequests });
20
- }, [payload, fetchStructures, withGrantRequests]);
20
+ fetchStructures({
21
+ ...payload,
22
+ my_grant_requests: !!withGrantRequests,
23
+ with_data_fields: !!withDataFields,
24
+ });
25
+ }, [payload, fetchStructures, withGrantRequests, withDataFields]);
21
26
  return null;
22
27
  };
23
28
 
@@ -26,6 +31,7 @@ StructuresLoader.propTypes = {
26
31
  fetchStructures: PropTypes.func,
27
32
  payload: PropTypes.object,
28
33
  withGrantRequests: PropTypes.bool,
34
+ withDataFields: PropTypes.bool,
29
35
  };
30
36
 
31
37
  const makeMapStateToProps = () => {
@@ -27,7 +27,7 @@ describe("<StructuresEditableDownloadOption />", () => {
27
27
  const props = {
28
28
  downloadEditableStructures,
29
29
  structuresLoading,
30
- structures: [],
30
+ structures: {},
31
31
  };
32
32
  const { getByRole, queryByText } = render(
33
33
  <StructuresEditableDownloadOption {...props} />,
@@ -4,6 +4,7 @@ exports[`<StructureSelector /> matches the latest snapshot 1`] = `
4
4
  <Segment>
5
5
  <Connect(StructuresLoader)
6
6
  pageSize={7}
7
+ withDataFields={true}
7
8
  />
8
9
  <Connect(StructureTypesLoader) />
9
10
  <Connect(FiltersLoader) />
@@ -9,6 +9,7 @@ exports[`<StructuresLoader /> matches the latest snapshot 1`] = `
9
9
  [
10
10
  {
11
11
  "my_grant_requests": false,
12
+ "with_data_fields": false,
12
13
  },
13
14
  ],
14
15
  ],