@hopara/iframe 0.2.3 → 0.2.5
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 +18 -20
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
This package provides an iframe to add [Hopara](https://hopara.io) visualizations to your project.
|
|
3
3
|
|
|
4
4
|
# Installing
|
|
5
|
-
You can install
|
|
5
|
+
You can install the iframe as a NPM module or using the Hopara CDN directly:
|
|
6
6
|
|
|
7
7
|
As a module:
|
|
8
8
|
```shell
|
|
@@ -15,7 +15,7 @@ Using Hopara CDN:
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
## Authentication
|
|
18
|
-
The iframe requires a valid `accessToken`. Use the `Auth API` to fetch it, as explained in our [integration guide](https://docs.hopara.app
|
|
18
|
+
The iframe requires a valid `accessToken`. Use the `Auth API` to fetch it, as explained in our [integration guide](https://docs.hopara.app/#/docs/integration-guide/2-authentication-integration.html)
|
|
19
19
|
|
|
20
20
|
# Example
|
|
21
21
|
### Node.JS
|
|
@@ -109,8 +109,8 @@ type DataLoader = {
|
|
|
109
109
|
|
|
110
110
|
#### Example
|
|
111
111
|
|
|
112
|
-
```
|
|
113
|
-
const
|
|
112
|
+
```javascript
|
|
113
|
+
const customDataLoaders = [{
|
|
114
114
|
name: 'queryName',
|
|
115
115
|
source: 'dataSourceName',
|
|
116
116
|
loader: () => {
|
|
@@ -139,13 +139,13 @@ const dataLoaders = [{
|
|
|
139
139
|
]
|
|
140
140
|
}
|
|
141
141
|
}]
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
|
|
143
|
+
Hopara.init({
|
|
144
|
+
app: 'my-hopara-app',
|
|
145
|
+
accessToken: 'my-hopara-token',
|
|
146
|
+
targetElementId: 'my-target-element',
|
|
147
|
+
dataLoaders: customDataLoaders,
|
|
148
|
+
})
|
|
149
149
|
```
|
|
150
150
|
|
|
151
151
|
### Data Updater
|
|
@@ -167,7 +167,7 @@ type DataUpdater = {
|
|
|
167
167
|
```
|
|
168
168
|
|
|
169
169
|
```jsx
|
|
170
|
-
const
|
|
170
|
+
const customDataUpdaters = [{
|
|
171
171
|
name: 'queryName',
|
|
172
172
|
source: 'dataSourceName',
|
|
173
173
|
updater: (newRow) => {
|
|
@@ -176,15 +176,13 @@ const dataUpdaters = [{
|
|
|
176
176
|
}
|
|
177
177
|
}]
|
|
178
178
|
|
|
179
|
-
...
|
|
180
179
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</div>
|
|
180
|
+
Hopara.init({
|
|
181
|
+
app: 'my-hopara-app',
|
|
182
|
+
accessToken: 'my-hopara-token',
|
|
183
|
+
targetElementId: 'my-target-element',
|
|
184
|
+
dataUpdaters: customDataUpdaters,
|
|
185
|
+
})
|
|
188
186
|
```
|
|
189
187
|
|
|
190
188
|
### Initial Position
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hopara/iframe",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"main": "build/client.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "ESLINT_NO_DEV_ERRORS=true react-app-rewired start",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
],
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/register": "^7.15.3",
|
|
30
|
-
"@hopara/react": "^0.2.
|
|
31
|
-
"@hopara/system-test": "^0.2.
|
|
30
|
+
"@hopara/react": "^0.2.5",
|
|
31
|
+
"@hopara/system-test": "^0.2.4",
|
|
32
32
|
"babel-loader": "8.1.0",
|
|
33
33
|
"customize-cra": "^1.0.0",
|
|
34
34
|
"react": "^18.2.0",
|