@databrainhq/plugin 0.11.38 → 0.11.39
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 +233 -233
- package/dist/components/ExternalMetricForm/index.d.ts +2 -2
- package/dist/components/MetricCreation/MetricCreation.d.ts +1 -1
- package/dist/components/MetricList/MetricList.d.ts +1 -2
- package/dist/components/MetricList/components/DownloadRawCsvModal/index.d.ts +1 -1
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +1 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +1 -1
- package/dist/components/MetricList/components/index.d.ts +0 -1
- package/dist/consts/api.d.ts +37 -0
- package/dist/hooks/index.d.ts +0 -2
- package/dist/hooks/useApplyAdminTheme.d.ts +1 -2
- package/dist/hooks/useDashboardContext.d.ts +4 -4
- package/dist/hooks/useDownloadRawCsv.d.ts +6 -44
- package/dist/hooks/useEmbeddedMetric.d.ts +2 -3
- package/dist/hooks/useExternalMetric.d.ts +14 -3
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +9 -11
- package/dist/hooks/useMetricCard.d.ts +1 -2
- package/dist/hooks/useNewEmbeddedDashboard.d.ts +4 -4
- package/dist/hooks/useScheduleEmail.d.ts +2 -11
- package/dist/queries/externalDashboard.mutation.d.ts +43 -0
- package/dist/queries/externalDashboard.query.d.ts +13 -0
- package/dist/queries/metric.mutation.d.ts +13 -0
- package/dist/queries/metric.query.d.ts +7 -0
- package/dist/types/metricCreate.d.ts +1 -1
- package/dist/types/queryTypes.d.ts +239 -0
- package/dist/utils/fetcher.d.ts +10 -1
- package/dist/webcomponents.es.js +26880 -27452
- package/dist/webcomponents.umd.js +166 -500
- package/package.json +107 -108
- package/src/index.ts +7 -7
- package/dist/components/MetricList/components/MetricCards/SingleValueCard.d.ts +0 -3
- package/dist/helpers/timesAgo.d.ts +0 -2
- package/dist/hooks/useEmbeddedDashboard.d.ts +0 -67
- package/dist/hooks/useGenerateEmbeddedMetric.d.ts +0 -15
- package/dist/utils/generated/graphql.d.ts +0 -4514
package/README.md
CHANGED
|
@@ -1,233 +1,233 @@
|
|
|
1
|
-
# @databrainhq/plugin
|
|
2
|
-
|
|
3
|
-
> Databrain app ui web component plugin.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @databrainhq/plugin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
React/Solidjs
|
|
16
|
-
|
|
17
|
-
Import in main/index/App
|
|
18
|
-
```tsx
|
|
19
|
-
import '@databrainhq/plugin/web';
|
|
20
|
-
```
|
|
21
|
-
Then use it anywhere in your app
|
|
22
|
-
|
|
23
|
-
Integrating Dashboard
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
const Example = () => {
|
|
27
|
-
return (
|
|
28
|
-
<dbn-dashboard
|
|
29
|
-
token="Your Guest Token"
|
|
30
|
-
dashboardId="Your Dashboard Id"
|
|
31
|
-
options={{
|
|
32
|
-
disableMetricCreation: false,
|
|
33
|
-
disableMetricUpdation: false,
|
|
34
|
-
disableMetricDeletion: false,
|
|
35
|
-
disableLayoutCustomization: false,
|
|
36
|
-
chartColors: [
|
|
37
|
-
'violet',
|
|
38
|
-
'indigo',
|
|
39
|
-
'blue',
|
|
40
|
-
'green',
|
|
41
|
-
'yellow',
|
|
42
|
-
'orange',
|
|
43
|
-
'red',
|
|
44
|
-
'pink',
|
|
45
|
-
'gray',
|
|
46
|
-
],
|
|
47
|
-
}}
|
|
48
|
-
theme={YOUR_THEME}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
};
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Integrating Metric
|
|
55
|
-
|
|
56
|
-
```tsx
|
|
57
|
-
const Example = () => {
|
|
58
|
-
return (
|
|
59
|
-
<Metric
|
|
60
|
-
token="Your Guest Token"
|
|
61
|
-
metricId="Your Metric Id"
|
|
62
|
-
width="500px"
|
|
63
|
-
height="300px"
|
|
64
|
-
chartRendererType="canvas"
|
|
65
|
-
chartColors={[
|
|
66
|
-
'violet',
|
|
67
|
-
'indigo',
|
|
68
|
-
'blue',
|
|
69
|
-
'green',
|
|
70
|
-
'yellow',
|
|
71
|
-
'orange',
|
|
72
|
-
'red',
|
|
73
|
-
'pink',
|
|
74
|
-
'gray',
|
|
75
|
-
]}
|
|
76
|
-
theme={YOUR_THEME}
|
|
77
|
-
/>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
Vue
|
|
83
|
-
|
|
84
|
-
Import in main/index/App
|
|
85
|
-
```vue
|
|
86
|
-
<script setup lang="ts">
|
|
87
|
-
import '@databrainhq/plugin/web';
|
|
88
|
-
</script>
|
|
89
|
-
```
|
|
90
|
-
Then use it anywhere in your app
|
|
91
|
-
|
|
92
|
-
Integrating Dashboard
|
|
93
|
-
|
|
94
|
-
```vue
|
|
95
|
-
<script setup lang="ts">
|
|
96
|
-
// your component logic
|
|
97
|
-
</script>
|
|
98
|
-
<template>
|
|
99
|
-
<dbn-dashboard
|
|
100
|
-
:token="/*YOUR GUEST TOKEN*/"
|
|
101
|
-
:options="/*YOUR ACCESS PERMISSION OPTIONS*/"
|
|
102
|
-
:theme="/*YOUR THEME*/"
|
|
103
|
-
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
104
|
-
></dbn-dashboard>
|
|
105
|
-
</template>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Integrating Metric
|
|
109
|
-
|
|
110
|
-
```vue
|
|
111
|
-
<script setup lang="ts">
|
|
112
|
-
// your component logic
|
|
113
|
-
</script>
|
|
114
|
-
<template>
|
|
115
|
-
<dbn-metric
|
|
116
|
-
:token="/*YOUR GUEST TOKEN*/"
|
|
117
|
-
chartRendererType="canvas"
|
|
118
|
-
:theme="/*YOUR THEME*/"
|
|
119
|
-
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
120
|
-
width="500"
|
|
121
|
-
height="400"
|
|
122
|
-
:style="/* YOUR STYLEs */"
|
|
123
|
-
className="YOUR CLASS"
|
|
124
|
-
></dbn-metric>
|
|
125
|
-
</template>
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Svelte
|
|
129
|
-
|
|
130
|
-
Import in main/index/App
|
|
131
|
-
|
|
132
|
-
```svelte
|
|
133
|
-
<script lang="ts">
|
|
134
|
-
import '@databrainhq/plugin/web';
|
|
135
|
-
</script>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
Then use it anywhere in your app
|
|
139
|
-
|
|
140
|
-
Integrating Dashboard
|
|
141
|
-
|
|
142
|
-
```svelte
|
|
143
|
-
<script lang="ts">
|
|
144
|
-
// your component logic
|
|
145
|
-
</script>
|
|
146
|
-
<main>
|
|
147
|
-
<dbn-dashboard
|
|
148
|
-
token={/*YOUR GUEST TOKEN*/}
|
|
149
|
-
options={/*YOUR ACCESS PERMISSION OPTIONS*/}
|
|
150
|
-
theme={/*YOUR THEME*/}
|
|
151
|
-
dashboardId={/*YOUR DASHBORD ID*/}
|
|
152
|
-
></dbn-dashboard>
|
|
153
|
-
</main>
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
Integrating Metric
|
|
157
|
-
|
|
158
|
-
```svelte
|
|
159
|
-
<script lang="ts">
|
|
160
|
-
// your component logic
|
|
161
|
-
</script>
|
|
162
|
-
<main>
|
|
163
|
-
<dbn-metric
|
|
164
|
-
token={/*YOUR GUEST TOKEN*/}
|
|
165
|
-
chartRendererType="canvas"
|
|
166
|
-
theme={/*YOUR THEME*/}
|
|
167
|
-
dashboardId="/*YOUR DASHBORD ID*/"
|
|
168
|
-
width="500"
|
|
169
|
-
height="400"
|
|
170
|
-
style={/* YOUR STYLEs */}
|
|
171
|
-
className="YOUR CLASS"
|
|
172
|
-
></dbn-metric>
|
|
173
|
-
</main>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
Angular
|
|
177
|
-
|
|
178
|
-
Add suport for custom elements/web components in app.module.ts
|
|
179
|
-
|
|
180
|
-
```ts
|
|
181
|
-
// app.module.ts
|
|
182
|
-
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
183
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
184
|
-
|
|
185
|
-
import { AppComponent } from './app.component';
|
|
186
|
-
|
|
187
|
-
@NgModule({
|
|
188
|
-
declarations: [AppComponent],
|
|
189
|
-
imports: [BrowserModule],
|
|
190
|
-
providers: [],
|
|
191
|
-
bootstrap: [AppComponent],
|
|
192
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
193
|
-
})
|
|
194
|
-
|
|
195
|
-
export class AppModule {}
|
|
196
|
-
```
|
|
197
|
-
Import in app.component.ts
|
|
198
|
-
|
|
199
|
-
```ts
|
|
200
|
-
import '@databrainhq/plugin/web';
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
Then use it anywhere in your app
|
|
204
|
-
|
|
205
|
-
Integrating Dashboard
|
|
206
|
-
|
|
207
|
-
```html
|
|
208
|
-
<dbn-dashboard
|
|
209
|
-
token="YOUR GUEST TOKEN"
|
|
210
|
-
options="YOUR ACCESS PERMISSION OPTIONS"
|
|
211
|
-
theme="YOUR THEME"
|
|
212
|
-
dashboardId="YOUR DASHBORD ID"
|
|
213
|
-
></dbn-dashboard>
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
Integrating Metric
|
|
217
|
-
|
|
218
|
-
```html
|
|
219
|
-
<dbn-metric
|
|
220
|
-
token="YOUR GUEST TOKEN"
|
|
221
|
-
chartRendererType="canvas"
|
|
222
|
-
theme="YOUR THEME"
|
|
223
|
-
dashboardId="YOUR DASHBORD ID"
|
|
224
|
-
width="500"
|
|
225
|
-
height="400"
|
|
226
|
-
style="YOUR STYLE"
|
|
227
|
-
className="YOUR CLASS"
|
|
228
|
-
></dbn-metric>
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
## License
|
|
232
|
-
|
|
233
|
-
MIT © [databrainhq](https://github.com/databrainhq)
|
|
1
|
+
# @databrainhq/plugin
|
|
2
|
+
|
|
3
|
+
> Databrain app ui web component plugin.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @databrainhq/plugin
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
React/Solidjs
|
|
16
|
+
|
|
17
|
+
Import in main/index/App
|
|
18
|
+
```tsx
|
|
19
|
+
import '@databrainhq/plugin/web';
|
|
20
|
+
```
|
|
21
|
+
Then use it anywhere in your app
|
|
22
|
+
|
|
23
|
+
Integrating Dashboard
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
const Example = () => {
|
|
27
|
+
return (
|
|
28
|
+
<dbn-dashboard
|
|
29
|
+
token="Your Guest Token"
|
|
30
|
+
dashboardId="Your Dashboard Id"
|
|
31
|
+
options={{
|
|
32
|
+
disableMetricCreation: false,
|
|
33
|
+
disableMetricUpdation: false,
|
|
34
|
+
disableMetricDeletion: false,
|
|
35
|
+
disableLayoutCustomization: false,
|
|
36
|
+
chartColors: [
|
|
37
|
+
'violet',
|
|
38
|
+
'indigo',
|
|
39
|
+
'blue',
|
|
40
|
+
'green',
|
|
41
|
+
'yellow',
|
|
42
|
+
'orange',
|
|
43
|
+
'red',
|
|
44
|
+
'pink',
|
|
45
|
+
'gray',
|
|
46
|
+
],
|
|
47
|
+
}}
|
|
48
|
+
theme={YOUR_THEME}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Integrating Metric
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
const Example = () => {
|
|
58
|
+
return (
|
|
59
|
+
<Metric
|
|
60
|
+
token="Your Guest Token"
|
|
61
|
+
metricId="Your Metric Id"
|
|
62
|
+
width="500px"
|
|
63
|
+
height="300px"
|
|
64
|
+
chartRendererType="canvas"
|
|
65
|
+
chartColors={[
|
|
66
|
+
'violet',
|
|
67
|
+
'indigo',
|
|
68
|
+
'blue',
|
|
69
|
+
'green',
|
|
70
|
+
'yellow',
|
|
71
|
+
'orange',
|
|
72
|
+
'red',
|
|
73
|
+
'pink',
|
|
74
|
+
'gray',
|
|
75
|
+
]}
|
|
76
|
+
theme={YOUR_THEME}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Vue
|
|
83
|
+
|
|
84
|
+
Import in main/index/App
|
|
85
|
+
```vue
|
|
86
|
+
<script setup lang="ts">
|
|
87
|
+
import '@databrainhq/plugin/web';
|
|
88
|
+
</script>
|
|
89
|
+
```
|
|
90
|
+
Then use it anywhere in your app
|
|
91
|
+
|
|
92
|
+
Integrating Dashboard
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<script setup lang="ts">
|
|
96
|
+
// your component logic
|
|
97
|
+
</script>
|
|
98
|
+
<template>
|
|
99
|
+
<dbn-dashboard
|
|
100
|
+
:token="/*YOUR GUEST TOKEN*/"
|
|
101
|
+
:options="/*YOUR ACCESS PERMISSION OPTIONS*/"
|
|
102
|
+
:theme="/*YOUR THEME*/"
|
|
103
|
+
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
104
|
+
></dbn-dashboard>
|
|
105
|
+
</template>
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Integrating Metric
|
|
109
|
+
|
|
110
|
+
```vue
|
|
111
|
+
<script setup lang="ts">
|
|
112
|
+
// your component logic
|
|
113
|
+
</script>
|
|
114
|
+
<template>
|
|
115
|
+
<dbn-metric
|
|
116
|
+
:token="/*YOUR GUEST TOKEN*/"
|
|
117
|
+
chartRendererType="canvas"
|
|
118
|
+
:theme="/*YOUR THEME*/"
|
|
119
|
+
:dashboardId="/*YOUR DASHBORD ID*/"
|
|
120
|
+
width="500"
|
|
121
|
+
height="400"
|
|
122
|
+
:style="/* YOUR STYLEs */"
|
|
123
|
+
className="YOUR CLASS"
|
|
124
|
+
></dbn-metric>
|
|
125
|
+
</template>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Svelte
|
|
129
|
+
|
|
130
|
+
Import in main/index/App
|
|
131
|
+
|
|
132
|
+
```svelte
|
|
133
|
+
<script lang="ts">
|
|
134
|
+
import '@databrainhq/plugin/web';
|
|
135
|
+
</script>
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Then use it anywhere in your app
|
|
139
|
+
|
|
140
|
+
Integrating Dashboard
|
|
141
|
+
|
|
142
|
+
```svelte
|
|
143
|
+
<script lang="ts">
|
|
144
|
+
// your component logic
|
|
145
|
+
</script>
|
|
146
|
+
<main>
|
|
147
|
+
<dbn-dashboard
|
|
148
|
+
token={/*YOUR GUEST TOKEN*/}
|
|
149
|
+
options={/*YOUR ACCESS PERMISSION OPTIONS*/}
|
|
150
|
+
theme={/*YOUR THEME*/}
|
|
151
|
+
dashboardId={/*YOUR DASHBORD ID*/}
|
|
152
|
+
></dbn-dashboard>
|
|
153
|
+
</main>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Integrating Metric
|
|
157
|
+
|
|
158
|
+
```svelte
|
|
159
|
+
<script lang="ts">
|
|
160
|
+
// your component logic
|
|
161
|
+
</script>
|
|
162
|
+
<main>
|
|
163
|
+
<dbn-metric
|
|
164
|
+
token={/*YOUR GUEST TOKEN*/}
|
|
165
|
+
chartRendererType="canvas"
|
|
166
|
+
theme={/*YOUR THEME*/}
|
|
167
|
+
dashboardId="/*YOUR DASHBORD ID*/"
|
|
168
|
+
width="500"
|
|
169
|
+
height="400"
|
|
170
|
+
style={/* YOUR STYLEs */}
|
|
171
|
+
className="YOUR CLASS"
|
|
172
|
+
></dbn-metric>
|
|
173
|
+
</main>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
Angular
|
|
177
|
+
|
|
178
|
+
Add suport for custom elements/web components in app.module.ts
|
|
179
|
+
|
|
180
|
+
```ts
|
|
181
|
+
// app.module.ts
|
|
182
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
183
|
+
import { BrowserModule } from '@angular/platform-browser';
|
|
184
|
+
|
|
185
|
+
import { AppComponent } from './app.component';
|
|
186
|
+
|
|
187
|
+
@NgModule({
|
|
188
|
+
declarations: [AppComponent],
|
|
189
|
+
imports: [BrowserModule],
|
|
190
|
+
providers: [],
|
|
191
|
+
bootstrap: [AppComponent],
|
|
192
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
export class AppModule {}
|
|
196
|
+
```
|
|
197
|
+
Import in app.component.ts
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
import '@databrainhq/plugin/web';
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Then use it anywhere in your app
|
|
204
|
+
|
|
205
|
+
Integrating Dashboard
|
|
206
|
+
|
|
207
|
+
```html
|
|
208
|
+
<dbn-dashboard
|
|
209
|
+
token="YOUR GUEST TOKEN"
|
|
210
|
+
options="YOUR ACCESS PERMISSION OPTIONS"
|
|
211
|
+
theme="YOUR THEME"
|
|
212
|
+
dashboardId="YOUR DASHBORD ID"
|
|
213
|
+
></dbn-dashboard>
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
Integrating Metric
|
|
217
|
+
|
|
218
|
+
```html
|
|
219
|
+
<dbn-metric
|
|
220
|
+
token="YOUR GUEST TOKEN"
|
|
221
|
+
chartRendererType="canvas"
|
|
222
|
+
theme="YOUR THEME"
|
|
223
|
+
dashboardId="YOUR DASHBORD ID"
|
|
224
|
+
width="500"
|
|
225
|
+
height="400"
|
|
226
|
+
style="YOUR STYLE"
|
|
227
|
+
className="YOUR CLASS"
|
|
228
|
+
></dbn-metric>
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## License
|
|
232
|
+
|
|
233
|
+
MIT © [databrainhq](https://github.com/databrainhq)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import { DashboardType } from '@/types/app';
|
|
3
|
+
import { DashboardType, FloatingDropDownOption } from '@/types/app';
|
|
4
4
|
type ExternalMetricProps = {
|
|
5
5
|
onSubmit: (values: FieldValues) => void;
|
|
6
6
|
defaultValues?: FieldValues;
|
|
@@ -8,7 +8,7 @@ type ExternalMetricProps = {
|
|
|
8
8
|
isEmbedded?: boolean;
|
|
9
9
|
dashboardIds: DashboardType['id'][];
|
|
10
10
|
onDashboardChange: (selected: DashboardType['id'][]) => void;
|
|
11
|
-
|
|
11
|
+
options: FloatingDropDownOption[];
|
|
12
12
|
error?: string;
|
|
13
13
|
};
|
|
14
14
|
export declare const ExternalMetricForm: React.FC<ExternalMetricProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmbeddedMetricCreationProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const EmbeddedMetricCreation: ({ clientId, companyId, isLiveMode, externalDashboardId, userProvidedDashboardId, chartColors, isShowMetricCreateModal, setShowMetricCreateModal, metric, metricData,
|
|
3
|
+
export declare const EmbeddedMetricCreation: ({ clientId, companyId, isLiveMode, externalDashboardId, userProvidedDashboardId, chartColors, isShowMetricCreateModal, setShowMetricCreateModal, metric, metricData, }: EmbeddedMetricCreationProps) => React.JSX.Element;
|
|
@@ -3,7 +3,6 @@ import { Layout } from 'react-grid-layout';
|
|
|
3
3
|
import { MetricCardProps } from './components';
|
|
4
4
|
import { ClientType } from '@/types/app';
|
|
5
5
|
import { ThemeType } from '@/utils/theme';
|
|
6
|
-
import { EmbeddedDashboardMetricsQuery } from '@/utils/generated/graphql';
|
|
7
6
|
export declare const GridLayout: React.ComponentClass<import("react-grid-layout").ResponsiveProps & import("react-grid-layout").WidthProviderProps, any>;
|
|
8
7
|
export type ExternalMetricListProps = {
|
|
9
8
|
chartColors?: string[];
|
|
@@ -17,7 +16,7 @@ export type ExternalMetricListProps = {
|
|
|
17
16
|
breakpoint: ThemeType['breakpoint'];
|
|
18
17
|
layoutCols: ThemeType['metricLayoutCols'];
|
|
19
18
|
adminLayout: Layout[];
|
|
20
|
-
externalDashboardMetrics?:
|
|
19
|
+
externalDashboardMetrics?: any;
|
|
21
20
|
params?: any;
|
|
22
21
|
appFilters?: any;
|
|
23
22
|
companyTenancyType: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ExternalMetrics } from '@/
|
|
2
|
+
import { ExternalMetrics } from '@/types/queryTypes';
|
|
3
3
|
import { ClientType } from '@/types/app';
|
|
4
4
|
import { FilterFieldType } from '@/components/FilterField';
|
|
5
5
|
export type MetricCardProps = {
|
|
@@ -3,6 +3,5 @@ export * from './DownloadRawCsvModal';
|
|
|
3
3
|
export * from './LayoutAlert';
|
|
4
4
|
export * from './TableViewModal';
|
|
5
5
|
export * from './MetricCards/MetricCard';
|
|
6
|
-
export * from './MetricCards/SingleValueCard';
|
|
7
6
|
export * from './MetricCards/NoDataLoading';
|
|
8
7
|
export * from './FullScreenView';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const DASHBOARD_PATH = "/dashboard";
|
|
2
|
+
export declare const METRIC_PATH = "/metric";
|
|
3
|
+
export declare const DASHBOARD_DATA_QUERY = "dashboardData";
|
|
4
|
+
export declare const DASHBOARD_EMBEDDED_METRIC_PATH: string;
|
|
5
|
+
export declare const DASHBOARD_EMBEDDED_METRIC_QUERY = "embeddedMetric";
|
|
6
|
+
export declare const DASHBOARD_LAYOUT_PATH: string;
|
|
7
|
+
export declare const DASHBOARD_LAYOUT_QUERY = "dashboardLayout";
|
|
8
|
+
export declare const DASHBOARD_SCHEDULED_REPORT_PATH: string;
|
|
9
|
+
export declare const DASHBOARD_SCHEDULED_REPORT_QUERY = "dashboardScheduledReport";
|
|
10
|
+
export declare const DASHBOARD_SAVE_LAYOUT_PATH: string;
|
|
11
|
+
export declare const DASHBOARD_SAVE_LAYOUT_MUTATION = "saveLayout";
|
|
12
|
+
export declare const DASHBOARD_SAVE_SCHEDULED_REPORT_PATH: string;
|
|
13
|
+
export declare const DASHBOARD_SAVE_SCHEDULED_REPORT_MUTATION = "saveScheduleReport";
|
|
14
|
+
export declare const DASHBOARD_DELETE_SCHEDULED_REPORT_PATH: string;
|
|
15
|
+
export declare const DASHBOARD_DELETE_SCHEDULED_REPORT_MUTATION = "deleteScheduleReport";
|
|
16
|
+
export declare const DASHBOARD_CREATE_METRIC_PATH: string;
|
|
17
|
+
export declare const DASHBOARD_CREATE_METRIC_MUTATION = "createMetric";
|
|
18
|
+
export declare const DASHBOARD_UPDATE_METRIC_PATH: string;
|
|
19
|
+
export declare const DASHBOARD_UPDATE_METRIC_MUTATION = "updateMetric";
|
|
20
|
+
export declare const DASHBOARD_UPDATE_ADMIN_METRIC_PATH: string;
|
|
21
|
+
export declare const DASHBOARD_UPDATE_ADMIN_METRIC_MUTATION = "updateAdminMetric";
|
|
22
|
+
export declare const DASHBOARD_GENERATE_METRIC_PATH: string;
|
|
23
|
+
export declare const DASHBOARD_GENERATE_METRIC_MUTATION = "generateMetric";
|
|
24
|
+
export declare const DASHBOARD_PREVIEW_TABLE_PATH: string;
|
|
25
|
+
export declare const DASHBOARD_PREVIEW_TABLE_MUTATION = "previewTable";
|
|
26
|
+
export declare const METRIC_QUERY_PATH: string;
|
|
27
|
+
export declare const METRIC_QUERY_QUERY = "query";
|
|
28
|
+
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_PATH: string;
|
|
29
|
+
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_QUERY = "rawDownloadSettings";
|
|
30
|
+
export declare const METRIC_COLUMN_PATH: string;
|
|
31
|
+
export declare const METRIC_COLUMN_MUTATION = "column";
|
|
32
|
+
export declare const METRIC_UNDERLYING_DATA_PATH: string;
|
|
33
|
+
export declare const METRIC_UNDERLYING_DATA_MUTATION = "underlyingData";
|
|
34
|
+
export declare const METRIC_SHARE_CSV_PATH: string;
|
|
35
|
+
export declare const METRIC_SHARE_CSV_MUTATION = "invokeShareCsv";
|
|
36
|
+
export declare const METRIC_MARK_ARCHIVED_PATH: string;
|
|
37
|
+
export declare const METRIC_MARK_ARCHIVED_MUTATION = "markArchived";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
export * from './useEmbeddedDashboard';
|
|
2
1
|
export * from './useExternalMetric';
|
|
3
2
|
export * from './useGenerateDatasetMetrics';
|
|
4
|
-
export * from './useGenerateEmbeddedMetric';
|
|
5
3
|
export * from './useOutsideAlerter';
|
|
6
4
|
export * from './useApplyAdminTheme';
|
|
7
5
|
export * from './useClientDashboardLayout';
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const useApplyAdminTheme: (adminTheme?: Themes) => void;
|
|
1
|
+
export declare const useApplyAdminTheme: (adminTheme?: any) => void;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ExternalDashboardMetrics, ExternalDashboards, Themes } from '@/utils/generated/graphql';
|
|
3
2
|
interface DashboardContextType {
|
|
4
3
|
isLoading: boolean | undefined;
|
|
5
4
|
token: string | undefined;
|
|
@@ -8,8 +7,8 @@ interface DashboardContextType {
|
|
|
8
7
|
companyId: string;
|
|
9
8
|
sharingSettingsId: string | undefined;
|
|
10
9
|
clientId: string | undefined;
|
|
11
|
-
externalDashboardMetrics:
|
|
12
|
-
externalDashboard:
|
|
10
|
+
externalDashboardMetrics: any[];
|
|
11
|
+
externalDashboard: any;
|
|
13
12
|
rlsSettings: any | undefined;
|
|
14
13
|
appFilters: any | undefined;
|
|
15
14
|
companyTenancyType: any;
|
|
@@ -18,7 +17,8 @@ interface DashboardContextType {
|
|
|
18
17
|
isAllowedToUpdateMetrics: boolean | undefined;
|
|
19
18
|
isAllowedToChangeLayout: boolean | undefined;
|
|
20
19
|
workspace: any;
|
|
21
|
-
adminTheme:
|
|
20
|
+
adminTheme: any;
|
|
21
|
+
clientSubsetData?: any | undefined;
|
|
22
22
|
} | undefined;
|
|
23
23
|
}
|
|
24
24
|
export declare const DashboardContext: import("react").Context<DashboardContextType>;
|