@truedat/dd 6.0.5 → 6.1.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": "6.0.5",
3
+ "version": "6.1.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": "6.0.5",
92
- "@truedat/core": "6.0.5",
93
- "@truedat/df": "6.0.5",
91
+ "@truedat/auth": "6.1.0",
92
+ "@truedat/core": "6.1.0",
93
+ "@truedat/df": "6.1.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": "abbaf37328ae24646d2a2c2851f77a611e5476d8"
118
+ "gitHead": "0e2dd260284f95d075f53ec5df1111606b5ecd0d"
119
119
  }
@@ -5,7 +5,7 @@ import { connect } from "react-redux";
5
5
  import { Link, useParams } from "react-router-dom";
6
6
  import { Card, Label } from "semantic-ui-react";
7
7
  import { useIntl } from "react-intl";
8
- import { FormattedNumber } from "react-intl";
8
+ import { FormattedNumber, FormattedMessage } from "react-intl";
9
9
  import { CardGroupsAccordion } from "@truedat/core/components";
10
10
  import { linkTo } from "@truedat/core/routes";
11
11
  import { fetchStructureFilters as fetchStructureFiltersRoutine } from "@truedat/dd/routines";
@@ -21,17 +21,21 @@ const orderBuckets = (buckets) =>
21
21
  )(buckets);
22
22
 
23
23
  export const CatalogCustomViewCards = ({
24
- structureFilters,
25
24
  fetchStructureFilters,
25
+ structureFilters,
26
+ structureFiltersLoading,
26
27
  }) => {
27
28
  useEffect(() => {
28
29
  fetchStructureFilters();
29
30
  }, [fetchStructureFilters]);
30
31
  const { propertyPath } = useParams();
31
32
  const groups = [];
33
+ const emptyMessageId = "catalogViewConfig.empty";
32
34
 
33
- return _.isEmpty(structureFilters) ? (
35
+ return structureFiltersLoading ? (
34
36
  <Loading />
37
+ ) : _.isEmpty(structureFilters) ? (
38
+ <FormattedMessage id={emptyMessageId} defaultMessage={emptyMessageId} />
35
39
  ) : Object.keys(groups).length > 1 ? (
36
40
  <CardGroupsAccordion
37
41
  groups={groups}
@@ -52,8 +56,9 @@ export const CatalogCustomViewCards = ({
52
56
  };
53
57
 
54
58
  CatalogCustomViewCards.propTypes = {
55
- structureFilters: PropTypes.object,
56
59
  fetchStructureFilters: PropTypes.func,
60
+ structureFilters: PropTypes.object,
61
+ structureFiltersLoading: PropTypes.bool,
57
62
  };
58
63
 
59
64
  export const CatalogCustomViewCard = ({
@@ -107,9 +112,14 @@ CatalogCustomViewCardPopup.propTypes = {
107
112
  structures_count: PropTypes.number,
108
113
  };
109
114
 
110
- const mapStateToProps = ({ structures, structureFilters }) => ({
115
+ const mapStateToProps = ({
116
+ structures,
117
+ structureFilters,
118
+ structureFiltersLoading,
119
+ }) => ({
111
120
  structures,
112
121
  structureFilters,
122
+ structureFiltersLoading,
113
123
  });
114
124
 
115
125
  export default connect(mapStateToProps, {