@hopara/react 0.2.4 → 0.3.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/README.md +30 -1
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ import {Hopara} from '@hopara/react';
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Authentication
|
|
29
|
-
The component requires a valid `accessToken`. Use the `Auth API` to fetch it, as explained in our [
|
|
29
|
+
The component requires a valid `accessToken`. Use the `Auth API` to fetch it, as explained in our [integration guide][integration guide](https://docs.hopara.app/#/docs/integration-guide/2-authentication-integration.html)
|
|
30
30
|
|
|
31
31
|
## Examples
|
|
32
32
|
### Basic usage
|
|
@@ -61,9 +61,38 @@ type HoparaProps = {
|
|
|
61
61
|
|
|
62
62
|
// The initial row (e.g. asset) to load the visualization
|
|
63
63
|
initialRow: InitialRow | undefined
|
|
64
|
+
|
|
65
|
+
// The custom controller to be used on Hopara Visualization
|
|
66
|
+
controller: HoparaController | undefined
|
|
64
67
|
}
|
|
65
68
|
```
|
|
66
69
|
|
|
70
|
+
### Controller
|
|
71
|
+
You can provide a Hopara Controller to manually trigger a data refresh (i.e. fetch all data again).
|
|
72
|
+
|
|
73
|
+
#### Example
|
|
74
|
+
|
|
75
|
+
```jsx
|
|
76
|
+
import {Hopara, HoparaController} from '@hopara/react'
|
|
77
|
+
const customController = new HoparaController()
|
|
78
|
+
|
|
79
|
+
...
|
|
80
|
+
|
|
81
|
+
setInterval(() => {
|
|
82
|
+
customController.refresh()
|
|
83
|
+
}, 3000)
|
|
84
|
+
|
|
85
|
+
...
|
|
86
|
+
|
|
87
|
+
<div className="HoparaEmbedded">
|
|
88
|
+
<Hopara
|
|
89
|
+
app="your-app-id"
|
|
90
|
+
accessToken="your-access-token"
|
|
91
|
+
controller={customController}
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
```
|
|
95
|
+
|
|
67
96
|
### Data Loader
|
|
68
97
|
By default Hopara will load the same visualization and data as seen as in hopara.app. You can use the data loader prop to provide a custom way to load the data.
|
|
69
98
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hopara/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Hopara React Component",
|
|
5
5
|
"author": "Hopara",
|
|
6
6
|
"homepage": "https://hopara.io",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
"@babel/core": "^7.18.9",
|
|
30
30
|
"@babel/preset-env": "^7.16.4",
|
|
31
31
|
"@danmarshall/deckgl-typings": "^4.9.22",
|
|
32
|
-
"@hopara/auth-front": "^0.
|
|
33
|
-
"@hopara/config": "^0.
|
|
34
|
-
"@hopara/dataset": "^0.
|
|
35
|
-
"@hopara/design-system": "^0.
|
|
36
|
-
"@hopara/encoding": "^0.
|
|
37
|
-
"@hopara/http-client": "^0.
|
|
38
|
-
"@hopara/i18n": "^0.
|
|
39
|
-
"@hopara/image": "^0.
|
|
40
|
-
"@hopara/internals": "^0.
|
|
41
|
-
"@hopara/memoize": "^0.
|
|
42
|
-
"@hopara/object": "^0.
|
|
43
|
-
"@hopara/page": "^0.
|
|
44
|
-
"@hopara/projector": "^0.
|
|
32
|
+
"@hopara/auth-front": "^0.3.0",
|
|
33
|
+
"@hopara/config": "^0.3.0",
|
|
34
|
+
"@hopara/dataset": "^0.3.0",
|
|
35
|
+
"@hopara/design-system": "^0.3.0",
|
|
36
|
+
"@hopara/encoding": "^0.3.0",
|
|
37
|
+
"@hopara/http-client": "^0.3.0",
|
|
38
|
+
"@hopara/i18n": "^0.3.0",
|
|
39
|
+
"@hopara/image": "^0.3.0",
|
|
40
|
+
"@hopara/internals": "^0.3.0",
|
|
41
|
+
"@hopara/memoize": "^0.3.0",
|
|
42
|
+
"@hopara/object": "^0.3.0",
|
|
43
|
+
"@hopara/page": "^0.3.0",
|
|
44
|
+
"@hopara/projector": "^0.3.0",
|
|
45
45
|
"@hopara/region": "git+ssh://git@bitbucket.org:kyrix/region.git#release",
|
|
46
|
-
"@hopara/spatial": "^0.
|
|
46
|
+
"@hopara/spatial": "^0.3.0",
|
|
47
47
|
"babel-loader": "8.1.0",
|
|
48
48
|
"customize-cra": "^1.0.0",
|
|
49
49
|
"react-app-rewired": "^2.2.1",
|