@cubejs-client/react 0.30.64 → 0.30.74

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": "@cubejs-client/react",
3
- "version": "0.30.64",
3
+ "version": "0.30.74",
4
4
  "author": "Cube Dev, Inc.",
5
5
  "license": "MIT",
6
6
  "engines": {},
@@ -24,7 +24,7 @@
24
24
  ],
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.1.2",
27
- "@cubejs-client/core": "^0.30.64",
27
+ "@cubejs-client/core": "^0.30.74",
28
28
  "core-js": "^3.6.5",
29
29
  "ramda": "^0.27.0"
30
30
  },
@@ -42,5 +42,5 @@
42
42
  "peerDependencies": {
43
43
  "react": ">=16.10.2"
44
44
  },
45
- "gitHead": "f5123837220235430a0eabf921e2c9cd4f513261"
45
+ "gitHead": "5e3106342a834ac7138afc79da2242ac400beee6"
46
46
  }
@@ -31,6 +31,24 @@ const granularities = [
31
31
 
32
32
  export default class QueryBuilder extends React.Component {
33
33
  static contextType = CubeContext;
34
+
35
+ static defaultProps = {
36
+ cubejsApi: null,
37
+ stateChangeHeuristics: null,
38
+ disableHeuristics: false,
39
+ render: null,
40
+ wrapWithQueryRenderer: true,
41
+ defaultChartType: 'line',
42
+ defaultQuery: {},
43
+ initialVizState: null,
44
+ onVizStateChanged: null,
45
+
46
+ // deprecated
47
+ query: null,
48
+ setQuery: null,
49
+ vizState: null,
50
+ setVizState: null,
51
+ };
34
52
 
35
53
  // This is an anti-pattern, only kept for backward compatibility
36
54
  // https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#anti-pattern-unconditionally-copying-props-to-state
@@ -581,21 +599,3 @@ export default class QueryBuilder extends React.Component {
581
599
  }
582
600
  }
583
601
  }
584
-
585
- QueryBuilder.defaultProps = {
586
- cubejsApi: null,
587
- stateChangeHeuristics: null,
588
- disableHeuristics: false,
589
- render: null,
590
- wrapWithQueryRenderer: true,
591
- defaultChartType: 'line',
592
- defaultQuery: {},
593
- initialVizState: null,
594
- onVizStateChanged: null,
595
-
596
- // deprecated
597
- query: null,
598
- setQuery: null,
599
- vizState: null,
600
- setVizState: null,
601
- };
@@ -5,6 +5,18 @@ import { isQueryPresent } from '@cubejs-client/core';
5
5
  import CubeContext from './CubeContext';
6
6
 
7
7
  export default class QueryRenderer extends React.Component {
8
+ static contextType = CubeContext;
9
+
10
+ static defaultProps = {
11
+ cubejsApi: null,
12
+ query: null,
13
+ render: null,
14
+ queries: null,
15
+ loadSql: null,
16
+ updateOnlyOnStateChange: false,
17
+ resetResultSetOnChange: true
18
+ };
19
+
8
20
  // @deprected use `isQueryPresent` from `@cubejs-client/core`
9
21
  static isQueryPresent(query) {
10
22
  return isQueryPresent(query);
@@ -148,15 +160,3 @@ export default class QueryRenderer extends React.Component {
148
160
  return null;
149
161
  }
150
162
  }
151
-
152
- QueryRenderer.contextType = CubeContext;
153
-
154
- QueryRenderer.defaultProps = {
155
- cubejsApi: null,
156
- query: null,
157
- render: null,
158
- queries: null,
159
- loadSql: null,
160
- updateOnlyOnStateChange: false,
161
- resetResultSetOnChange: true
162
- };
@@ -17,11 +17,4 @@ const QueryRendererWithTotals = ({ query, ...restProps }) => (
17
17
  />
18
18
  );
19
19
 
20
- QueryRendererWithTotals.defaultProps = {
21
- query: null,
22
- render: null,
23
- queries: null,
24
- loadSql: null
25
- };
26
-
27
20
  export default QueryRendererWithTotals;