@vizzly/dashboard 0.12.0 → 0.12.1-dev-47d3534a0e08d7178d805f0ce84bd1d6e267d9ce

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.
@@ -4,7 +4,7 @@ import { Dashboard } from '../../../../shared-logic/src/Dashboard';
4
4
  export declare type GlobalContextType = DashboardProps & {
5
5
  onSave: (dashboard: Dashboard) => void;
6
6
  };
7
- export declare const useGlobalContext: () => ({
7
+ export declare const useGlobalContext: () => (import("../../types").InBrowserProps & {
8
8
  vizzlyApiHost?: string | undefined;
9
9
  featureToggles?: Partial<import("../../../../shared-logic/src/FeatureToggle/types").FeatureToggles> | undefined;
10
10
  customComponents?: import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides.CustomComponent[] | undefined;
@@ -60,21 +60,8 @@ export declare const useGlobalContext: () => ({
60
60
  pdfSettings?: import("../../../../shared-logic/src/PDFGenerator/types").PDFSettings | undefined;
61
61
  labelFormat?: import("../../../../shared-ui/src/contexts/DashboardBehaviour/types").LabelFormat | undefined;
62
62
  } & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
63
- identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
64
- dataSets: import("../../../../shared-logic/src/Callbacks/types").loadDataSetsCallback;
65
- data: import("../../../../shared-logic/src/Callbacks/types").loadDataCallback;
66
- runQueries?: undefined;
67
- queryEngineConfig?: undefined;
68
- queryEngineEndpoint?: string | {
69
- endpoint: string;
70
- dynamicConfig?: Object | undefined;
71
- customHeaders?: (() => {
72
- [headerKey: string]: string;
73
- }) | undefined;
74
- } | undefined;
75
- } & {
76
63
  onSave: (dashboard: Dashboard) => void;
77
- }) | ({
64
+ }) | (import("../../types").SelfHostedProps & {
78
65
  vizzlyApiHost?: string | undefined;
79
66
  featureToggles?: Partial<import("../../../../shared-logic/src/FeatureToggle/types").FeatureToggles> | undefined;
80
67
  customComponents?: import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides.CustomComponent[] | undefined;
@@ -130,21 +117,8 @@ export declare const useGlobalContext: () => ({
130
117
  pdfSettings?: import("../../../../shared-logic/src/PDFGenerator/types").PDFSettings | undefined;
131
118
  labelFormat?: import("../../../../shared-ui/src/contexts/DashboardBehaviour/types").LabelFormat | undefined;
132
119
  } & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
133
- queryEngineEndpoint?: string | {
134
- endpoint: string;
135
- dynamicConfig?: Object | undefined;
136
- customHeaders?: (() => {
137
- [headerKey: string]: string;
138
- }) | undefined;
139
- } | undefined;
140
- identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
141
- runQueries?: undefined;
142
- dataSets?: import("../../../../shared-logic/src/Callbacks/types").loadDataSetsCallback | undefined;
143
- data?: undefined;
144
- queryEngineConfig?: undefined;
145
- } & {
146
120
  onSave: (dashboard: Dashboard) => void;
147
- }) | ({
121
+ }) | (import("../../types").CustomProps & {
148
122
  vizzlyApiHost?: string | undefined;
149
123
  featureToggles?: Partial<import("../../../../shared-logic/src/FeatureToggle/types").FeatureToggles> | undefined;
150
124
  customComponents?: import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides.CustomComponent[] | undefined;
@@ -200,27 +174,9 @@ export declare const useGlobalContext: () => ({
200
174
  pdfSettings?: import("../../../../shared-logic/src/PDFGenerator/types").PDFSettings | undefined;
201
175
  labelFormat?: import("../../../../shared-ui/src/contexts/DashboardBehaviour/types").LabelFormat | undefined;
202
176
  } & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
203
- runQueries: (queries: import("../../../../shared-logic/src/Query/types").Query<string, string, string>[], params: {
204
- dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[];
205
- abortSignal?: AbortSignal | undefined;
206
- dataAccessToken?: string | undefined;
207
- filterConfig?: import("../../../../shared-logic/src/AdditionalFilter/types").FilterConfig | undefined;
208
- }) => Promise<(import("../../../../shared-logic/src/Result/types").Result | any[][] | null)[] | null>;
209
- identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
210
- dataSets: import("../../../../shared-logic/src/Callbacks/types").loadDataSetsCallback;
211
- queryEngineConfig: import("../../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback;
212
- data?: undefined;
213
- queryEngineEndpoint?: string | {
214
- endpoint: string;
215
- dynamicConfig?: Object | undefined;
216
- customHeaders?: (() => {
217
- [headerKey: string]: string;
218
- }) | undefined;
219
- } | undefined;
220
- } & {
221
177
  onSave: (dashboard: Dashboard) => void;
222
178
  }) | undefined;
223
- export declare const GlobalContext: import("react").Context<({
179
+ export declare const GlobalContext: import("react").Context<(import("../../types").InBrowserProps & {
224
180
  vizzlyApiHost?: string | undefined;
225
181
  featureToggles?: Partial<import("../../../../shared-logic/src/FeatureToggle/types").FeatureToggles> | undefined;
226
182
  customComponents?: import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides.CustomComponent[] | undefined;
@@ -276,21 +232,8 @@ export declare const GlobalContext: import("react").Context<({
276
232
  pdfSettings?: import("../../../../shared-logic/src/PDFGenerator/types").PDFSettings | undefined;
277
233
  labelFormat?: import("../../../../shared-ui/src/contexts/DashboardBehaviour/types").LabelFormat | undefined;
278
234
  } & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
279
- identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
280
- dataSets: import("../../../../shared-logic/src/Callbacks/types").loadDataSetsCallback;
281
- data: import("../../../../shared-logic/src/Callbacks/types").loadDataCallback;
282
- runQueries?: undefined;
283
- queryEngineConfig?: undefined;
284
- queryEngineEndpoint?: string | {
285
- endpoint: string;
286
- dynamicConfig?: Object | undefined;
287
- customHeaders?: (() => {
288
- [headerKey: string]: string;
289
- }) | undefined;
290
- } | undefined;
291
- } & {
292
235
  onSave: (dashboard: Dashboard) => void;
293
- }) | ({
236
+ }) | (import("../../types").SelfHostedProps & {
294
237
  vizzlyApiHost?: string | undefined;
295
238
  featureToggles?: Partial<import("../../../../shared-logic/src/FeatureToggle/types").FeatureToggles> | undefined;
296
239
  customComponents?: import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides.CustomComponent[] | undefined;
@@ -346,21 +289,8 @@ export declare const GlobalContext: import("react").Context<({
346
289
  pdfSettings?: import("../../../../shared-logic/src/PDFGenerator/types").PDFSettings | undefined;
347
290
  labelFormat?: import("../../../../shared-ui/src/contexts/DashboardBehaviour/types").LabelFormat | undefined;
348
291
  } & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
349
- queryEngineEndpoint?: string | {
350
- endpoint: string;
351
- dynamicConfig?: Object | undefined;
352
- customHeaders?: (() => {
353
- [headerKey: string]: string;
354
- }) | undefined;
355
- } | undefined;
356
- identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
357
- runQueries?: undefined;
358
- dataSets?: import("../../../../shared-logic/src/Callbacks/types").loadDataSetsCallback | undefined;
359
- data?: undefined;
360
- queryEngineConfig?: undefined;
361
- } & {
362
292
  onSave: (dashboard: Dashboard) => void;
363
- }) | ({
293
+ }) | (import("../../types").CustomProps & {
364
294
  vizzlyApiHost?: string | undefined;
365
295
  featureToggles?: Partial<import("../../../../shared-logic/src/FeatureToggle/types").FeatureToggles> | undefined;
366
296
  customComponents?: import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides.CustomComponent[] | undefined;
@@ -416,23 +346,5 @@ export declare const GlobalContext: import("react").Context<({
416
346
  pdfSettings?: import("../../../../shared-logic/src/PDFGenerator/types").PDFSettings | undefined;
417
347
  labelFormat?: import("../../../../shared-ui/src/contexts/DashboardBehaviour/types").LabelFormat | undefined;
418
348
  } & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
419
- runQueries: (queries: import("../../../../shared-logic/src/Query/types").Query<string, string, string>[], params: {
420
- dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[];
421
- abortSignal?: AbortSignal | undefined;
422
- dataAccessToken?: string | undefined;
423
- filterConfig?: import("../../../../shared-logic/src/AdditionalFilter/types").FilterConfig | undefined;
424
- }) => Promise<(import("../../../../shared-logic/src/Result/types").Result | any[][] | null)[] | null>;
425
- identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
426
- dataSets: import("../../../../shared-logic/src/Callbacks/types").loadDataSetsCallback;
427
- queryEngineConfig: import("../../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback;
428
- data?: undefined;
429
- queryEngineEndpoint?: string | {
430
- endpoint: string;
431
- dynamicConfig?: Object | undefined;
432
- customHeaders?: (() => {
433
- [headerKey: string]: string;
434
- }) | undefined;
435
- } | undefined;
436
- } & {
437
349
  onSave: (dashboard: Dashboard) => void;
438
350
  }) | undefined>;
@@ -5,14 +5,16 @@ import * as DataSetField from './sdk/DataSetField';
5
5
  import { Component as ComponentType } from '../../shared-logic/src/Component/types';
6
6
  import NewVizzlyImplementation from '../../shared-logic/src/errors/NewVizzlyImplementation';
7
7
  import { Result as VizzlyResult } from '../../shared-logic/src/Result/types';
8
- import { DashboardProps } from './types';
8
+ import { DashboardProps, EditorProps } from './types';
9
9
  export * from './types';
10
10
  export { vizzlyState, VizzlyState } from '../../shared-logic/src/VizzlyState';
11
11
  import './developerTools';
12
12
  declare const Dashboard: (props: DashboardProps) => JSX.Element;
13
+ declare const Editor: (props: EditorProps) => JSX.Element;
13
14
  export * from '../../shared-ui/src/hooks/useVizzly';
14
15
  declare const _default: {
15
16
  Dashboard: (props: DashboardProps) => JSX.Element;
17
+ Editor: (props: EditorProps) => JSX.Element;
16
18
  NewVizzlyImplementation: typeof NewVizzlyImplementation;
17
19
  displayPositions: {
18
20
  FIRST_ROW: number;
@@ -29,7 +31,7 @@ declare const _default: {
29
31
  DataSetField: typeof DataSetField;
30
32
  };
31
33
  export default _default;
32
- export { Dashboard, NewVizzlyImplementation, displayPositions, DataSetField };
34
+ export { Dashboard, NewVizzlyImplementation, displayPositions, DataSetField, Editor };
33
35
  export type { Query } from '../../shared-logic/src/Query/types';
34
36
  export declare type Result = VizzlyResult | VizzlyResult['content'];
35
37
  export type { DataSet } from '../../shared-logic/src/DataSet/types';
@@ -4,6 +4,34 @@ import { DashboardBehaviour } from '../../shared-ui/src/contexts/DashboardBehavi
4
4
  import { CustomDriver } from '../../results-driver/src/types';
5
5
  import { QueryEngineEndpoint } from '../../shared-logic/src/QueryEngineConfig/types';
6
6
  import { loadDataSetsCallback } from '../../shared-logic/src/Callbacks/types';
7
+ import { EditorBehaviour } from '../../shared-ui/src/components/Editor/types';
8
+ export declare type SharedEditorProps = {
9
+ view: EditorBehaviour['view'];
10
+ onSave?: EditorBehaviour['onSave'];
11
+ vizzlyApiHost?: string;
12
+ featureToggles?: Partial<DashboardBehaviour['featureToggles']>;
13
+ customComponents?: DashboardBehaviour['customComponents'];
14
+ excludeComponents?: StudioProps['excludeComponents'];
15
+ includeComponents?: StudioProps['includeComponents'];
16
+ numberFormatOptions?: DashboardBehaviour['numberFormatOptions'];
17
+ dateTimeFormatOptions?: DashboardBehaviour['dateTimeFormatOptions'];
18
+ developerTools?: DashboardBehaviour['developerTools'];
19
+ textOverrides?: DashboardBehaviour['textOverrides'];
20
+ dataPanel?: DashboardBehaviour['dataPanel'];
21
+ id?: string;
22
+ /**
23
+ * @deprecated This property is being deprecated. Use dateFilterOptions for dates.
24
+ */
25
+ dateTimeFilterOptions?: DashboardBehaviour['dateFilterOptions'];
26
+ dateFilterOptions?: DashboardBehaviour['dateFilterOptions'];
27
+ formatPanel?: DashboardBehaviour['formatPanel'];
28
+ onEditorUpdate?: DashboardBehaviour['onEditorUpdate'];
29
+ theme?: VizzlyTheming.Base;
30
+ onError?: VizzlyComponents.OnError;
31
+ onViewClick?: DashboardBehaviour['onViewClick'];
32
+ trackEvent?: trackEventCallback;
33
+ labelFormat?: DashboardBehaviour['labelFormat'];
34
+ } & Partial<VizzlyComponents.ComponentOverrides>;
7
35
  export declare type SharedDashboardProps = {
8
36
  vizzlyApiHost?: string;
9
37
  featureToggles?: Partial<DashboardBehaviour['featureToggles']>;
@@ -37,11 +65,11 @@ export declare type SharedDashboardProps = {
37
65
  /**
38
66
  * Child Dashboard ID. If your user has multiple copies of a parent dashboard, you
39
67
  * will need to specify the ID of the dashboard copy here to render the correct one.
68
+ * You can use the services functionality to manage your user's dashboards
69
+ * https://docs.vizzly.co/services
40
70
  *
41
- * You can use this with the `useDashboardManager` react hook, to manage a user's
42
- * collection of dashboards.
43
- *
44
- * https://docs.vizzly.co/dashboard/management
71
+ * Or learn more about child dashboards
72
+ * https://docs.vizzly.co/concepts/parent-and-child-dashboards
45
73
  */
46
74
  dashboardId?: string;
47
75
  cascadeFilterSelection?: boolean;
@@ -50,7 +78,9 @@ export declare type SharedDashboardProps = {
50
78
  pdfSettings?: DashboardBehaviour['pdfSettings'];
51
79
  labelFormat?: DashboardBehaviour['labelFormat'];
52
80
  } & Partial<VizzlyComponents.ComponentOverrides>;
53
- export declare type CustomDashboardProps = SharedDashboardProps & {
81
+ export declare type CustomDashboardProps = CustomProps & SharedDashboardProps;
82
+ export declare type CustomEditorProps = CustomProps & SharedEditorProps;
83
+ export declare type CustomProps = {
54
84
  runQueries: CustomDriver['runQueries'];
55
85
  identity: VizzlyComponents.identityCallback;
56
86
  dataSets: loadDataSetsCallback;
@@ -58,7 +88,9 @@ export declare type CustomDashboardProps = SharedDashboardProps & {
58
88
  data?: never;
59
89
  queryEngineEndpoint?: QueryEngineEndpoint;
60
90
  };
61
- export declare type InBrowserDashboardProps = SharedDashboardProps & {
91
+ export declare type InBrowserDashboardProps = InBrowserProps & SharedDashboardProps;
92
+ export declare type InBrowserEditorProps = InBrowserProps & SharedEditorProps;
93
+ export declare type InBrowserProps = {
62
94
  identity: VizzlyComponents.identityCallback;
63
95
  dataSets: loadDataSetsCallback;
64
96
  data: VizzlyComponents.loadDataCallback;
@@ -66,7 +98,9 @@ export declare type InBrowserDashboardProps = SharedDashboardProps & {
66
98
  queryEngineConfig?: never;
67
99
  queryEngineEndpoint?: QueryEngineEndpoint;
68
100
  };
69
- export declare type SelfHostedDashboardProps = SharedDashboardProps & {
101
+ export declare type SelfHostedDashboardProps = SelfHostedProps & SharedDashboardProps;
102
+ export declare type SelfHostedEditorProps = SelfHostedProps & SharedEditorProps;
103
+ export declare type SelfHostedProps = {
70
104
  queryEngineEndpoint?: QueryEngineEndpoint;
71
105
  identity: VizzlyComponents.identityCallback;
72
106
  runQueries?: never;
@@ -75,3 +109,4 @@ export declare type SelfHostedDashboardProps = SharedDashboardProps & {
75
109
  queryEngineConfig?: never;
76
110
  };
77
111
  export declare type DashboardProps = InBrowserDashboardProps | SelfHostedDashboardProps | CustomDashboardProps;
112
+ export declare type EditorProps = InBrowserEditorProps | SelfHostedEditorProps | CustomEditorProps;