@dhis2/analytics 26.8.3 → 26.8.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.
@@ -17,7 +17,8 @@ const CachedDataQueryProvider = _ref => {
17
17
  let {
18
18
  query,
19
19
  dataTransformation,
20
- children
20
+ children,
21
+ translucent = true
21
22
  } = _ref;
22
23
  const {
23
24
  data: rawData,
@@ -30,7 +31,7 @@ const CachedDataQueryProvider = _ref => {
30
31
  const data = rawData && dataTransformation ? dataTransformation(rawData) : rawData;
31
32
  if (loading) {
32
33
  return /*#__PURE__*/_react.default.createElement(_ui.Layer, {
33
- translucent: true
34
+ translucent: translucent
34
35
  }, /*#__PURE__*/_react.default.createElement(_ui.CenteredContent, null, /*#__PURE__*/_react.default.createElement(_ui.CircularLoader, null)));
35
36
  }
36
37
  if (error) {
@@ -48,7 +49,8 @@ exports.CachedDataQueryProvider = CachedDataQueryProvider;
48
49
  CachedDataQueryProvider.propTypes = {
49
50
  children: _propTypes.default.node.isRequired,
50
51
  query: _propTypes.default.object.isRequired,
51
- dataTransformation: _propTypes.default.func
52
+ dataTransformation: _propTypes.default.func,
53
+ translucent: _propTypes.default.bool
52
54
  };
53
55
  const useCachedDataQuery = () => (0, _react.useContext)(CachedDataQueryCtx);
54
56
  exports.useCachedDataQuery = useCachedDataQuery;
@@ -8,7 +8,8 @@ const CachedDataQueryProvider = _ref => {
8
8
  let {
9
9
  query,
10
10
  dataTransformation,
11
- children
11
+ children,
12
+ translucent = true
12
13
  } = _ref;
13
14
  const {
14
15
  data: rawData,
@@ -21,7 +22,7 @@ const CachedDataQueryProvider = _ref => {
21
22
  const data = rawData && dataTransformation ? dataTransformation(rawData) : rawData;
22
23
  if (loading) {
23
24
  return /*#__PURE__*/React.createElement(Layer, {
24
- translucent: true
25
+ translucent: translucent
25
26
  }, /*#__PURE__*/React.createElement(CenteredContent, null, /*#__PURE__*/React.createElement(CircularLoader, null)));
26
27
  }
27
28
  if (error) {
@@ -38,7 +39,8 @@ const CachedDataQueryProvider = _ref => {
38
39
  CachedDataQueryProvider.propTypes = {
39
40
  children: PropTypes.node.isRequired,
40
41
  query: PropTypes.object.isRequired,
41
- dataTransformation: PropTypes.func
42
+ dataTransformation: PropTypes.func,
43
+ translucent: PropTypes.bool
42
44
  };
43
45
  const useCachedDataQuery = () => useContext(CachedDataQueryCtx);
44
46
  export { CachedDataQueryProvider, useCachedDataQuery };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2/analytics",
3
- "version": "26.8.3",
3
+ "version": "26.8.4",
4
4
  "main": "./build/cjs/index.js",
5
5
  "module": "./build/es/index.js",
6
6
  "exports": {