@vizzly/dashboard 0.11.0 → 0.12.0-dev-e9cb501d005236550d32fd4ffe3eaeb1307996b1
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/dist/charts/src/ScatterChart/ScatterChart.d.ts +1 -1
- package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +30 -30
- package/dist/dashboard/src/contexts/SessionContext/getStrategy.d.ts +2 -3
- package/dist/dashboard/src/contexts/SessionContext/useSessionContext.d.ts +11 -12
- package/dist/dashboard/src/contexts/useDashboardStrategy/runStrategy.d.ts +2 -2
- package/dist/dashboard/src/contexts/useDashboardStrategy.d.ts +3 -4
- package/dist/dashboard/src/index.d.ts +3 -214
- package/dist/dashboard/src/sdk.d.ts +0 -79
- package/dist/dashboard/src/types.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/AreaChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/BarChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/BasicTable/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/HorizontalBarChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/LineChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/PieChart/toQueries.d.ts +1 -1
- package/dist/results-driver/src/driver/VizzlyQuery/PivotTable/toQueries.d.ts +1 -1
- package/dist/services/src/Services/Cell.d.ts +65 -0
- package/dist/services/src/Services/Dashboard.d.ts +55 -0
- package/dist/services/src/Services/Header.d.ts +19 -0
- package/dist/services/src/Services/Library.d.ts +43 -0
- package/dist/services/src/Services/Row.d.ts +45 -0
- package/dist/services/src/Services/View.d.ts +65 -0
- package/dist/services/src/errors/ServicesValidationError.d.ts +2 -0
- package/dist/services/src/errors/TimeoutWaitingForVizzlyInstance.d.ts +3 -0
- package/dist/services/src/errors/VizzlyInstanceNotLoaded.d.ts +3 -0
- package/dist/services/src/index.d.ts +125 -0
- package/dist/services/src/schemaValidations/cell.d.ts +1 -0
- package/dist/services/src/schemaValidations/dashboard.d.ts +4 -0
- package/dist/services/src/schemaValidations/filters.d.ts +3 -0
- package/dist/services/src/schemaValidations/library.d.ts +2 -0
- package/dist/shared-logic/src/Callbacks/types.d.ts +2 -0
- package/dist/shared-logic/src/Dashboard/fromRaw.d.ts +4 -0
- package/dist/shared-logic/src/Dashboard/types.d.ts +8 -0
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI.d.ts +0 -10
- package/dist/shared-logic/src/DashboardAPI/dataSets.d.ts +3 -11
- package/dist/shared-logic/src/FeatureToggle/types.d.ts +1 -0
- package/dist/shared-logic/src/GlobalLibrary/GlobalLibrary.d.ts +1 -0
- package/dist/shared-logic/src/GlobalLibrary/fromRaw.d.ts +10 -0
- package/dist/shared-logic/src/GlobalLibrary/index.d.ts +2 -0
- package/dist/shared-logic/src/GlobalLibrary/types.d.ts +16 -0
- package/dist/shared-logic/src/PDFGenerator/generatePNG.d.ts +3 -0
- package/dist/shared-logic/src/PDFGenerator/pageBreaks.d.ts +5 -0
- package/dist/shared-logic/src/QueryEngineConfig/loadQueryEngineConfig.d.ts +2 -2
- package/dist/shared-logic/src/Theme/types.d.ts +1 -0
- package/dist/shared-logic/src/Translations/translation.types.d.ts +43 -8
- package/dist/shared-logic/src/ViewConfiguration/types.d.ts +4 -0
- package/dist/shared-logic/src/api/index.d.ts +15 -35
- package/dist/shared-logic/src/api/queryEngine/getTeamMembers.d.ts +2 -2
- package/dist/shared-logic/src/errors/LoadingAborted.d.ts +4 -0
- package/dist/shared-logic/src/errors/index.d.ts +2 -1
- package/dist/shared-logic/src/getVizzly.d.ts +5 -0
- package/dist/shared-ui/src/api/useQueryEffect/download.d.ts +1 -1
- package/dist/shared-ui/src/base/explorer/Code.d.ts +49 -0
- package/dist/shared-ui/src/base/explorer/ExplorerPanel.d.ts +19 -0
- package/dist/shared-ui/src/base/explorer/ListOfFeatures.d.ts +25 -0
- package/dist/shared-ui/src/base/explorer/MoreIcon.d.ts +2 -0
- package/dist/shared-ui/src/base/explorer/ProgrammaticSection/DashboardFiltersSection.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/ProgrammaticSection/OtherSection.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/ProgrammaticSection/ProgrammaticSection.d.ts +10 -0
- package/dist/shared-ui/src/base/explorer/StudioWithExplorer.d.ts +11 -0
- package/dist/shared-ui/src/base/explorer/ThemeSection/ButtonsExplorer.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/ThemeSection/ChartsExplorer.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/ThemeSection/DashboardExplorer.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/ThemeSection/PanelsSection.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/ThemeSection/ThemeSection.d.ts +10 -0
- package/dist/shared-ui/src/base/explorer/ThemeSection/utils.funcs.d.ts +6 -0
- package/dist/shared-ui/src/base/explorer/Toggles/DeveloperToolsSection.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/Toggles/FeatureTogglesSection.d.ts +3 -0
- package/dist/shared-ui/src/base/explorer/Toggles/TogglesSection.d.ts +13 -0
- package/dist/shared-ui/src/base/explorer/functions/index.d.ts +7 -0
- package/dist/shared-ui/src/base/explorer/functions/index.test.d.ts +1 -0
- package/dist/shared-ui/src/components/Editor/EditorApp.d.ts +3 -0
- package/dist/shared-ui/src/components/Modals/ConfirmAddToLibraryModal.d.ts +5 -0
- package/dist/shared-ui/src/components/Modals/deleteModal.funcs.d.ts +1 -1
- package/dist/shared-ui/src/components/Studio/StudioApp/ComponentOptions.d.ts +2 -0
- package/dist/shared-ui/src/components/Studio/constants.d.ts +1 -1
- package/dist/shared-ui/src/contexts/DashboardBehaviour/types.d.ts +4 -3
- package/dist/shared-ui/src/contexts/DashboardContext/types.d.ts +15 -1
- package/dist/shared-ui/src/hooks/useVizzly.d.ts +32 -0
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/PercentageModal/buildGroupedFilterValue.d.ts +3 -0
- package/dist/shared-ui/src/library/DataPanel/CustomFieldInput/PercentageModal/usePercentageModal.d.ts +2 -0
- package/dist/shared-ui/src/library/DataPanel/FilterInput/FilterInputForm.d.ts +1 -0
- package/dist/shared-ui/src/library/DataPanel/FilterInput/IndividualFilter.d.ts +1 -0
- package/dist/shared-ui/src/library/Editor/EditorComponent.d.ts +10 -0
- package/dist/shared-ui/src/library/Editor/useEditor.d.ts +2 -2
- package/dist/shared-ui/src/library/EditorModal.d.ts +4 -0
- package/dist/shared-ui/src/library/Library/types.d.ts +1 -0
- package/dist/shared-ui/src/library/ResizableRow.d.ts +1 -0
- package/dist/shared-ui/src/styles/global.styles.d.ts +2 -0
- package/dist/shared-ui/src/styles/styles.fn.d.ts +12 -0
- package/package.json +7 -6
- package/dist/dashboard/src/contexts/useDashboardAPI.d.ts +0 -36
- package/dist/dashboard/src/contexts/useDataConfigurationAndIdentity.d.ts +0 -21
- package/dist/dashboard/src/properties/queryEngineConfig.d.ts +0 -3
- package/dist/dashboard/src/sdk/Dashboard.d.ts +0 -15
- package/dist/dashboard/src/useDashboardManager/createDashboard.d.ts +0 -12
- package/dist/dashboard/src/useDashboardManager/deleteDashboard.d.ts +0 -4
- package/dist/dashboard/src/useDashboardManager/updateDashboardMeta.d.ts +0 -5
- package/dist/dashboard/src/useDashboardManager.d.ts +0 -36
- package/dist/shared-logic/src/DashboardAPI/clientDashboardSchema.d.ts +0 -3
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/creating.d.ts +0 -19
- package/dist/shared-logic/src/DashboardAPI/dashboardAPI/updating.d.ts +0 -19
- package/dist/shared-logic/src/DashboardAPI/dashboardManager.d.ts +0 -9
- package/dist/shared-logic/src/api/queryEngine/createDashboard.d.ts +0 -20
- package/dist/shared-logic/src/api/queryEngine/multiGetDashboards.d.ts +0 -7
- package/dist/shared-logic/src/api/queryEngine/updateDashboard.d.ts +0 -13
- package/dist/shared-logic/src/api/vizzly/createDashboard.d.ts +0 -20
- package/dist/shared-logic/src/api/vizzly/createDashboardAccess.d.ts +0 -8
- package/dist/shared-logic/src/api/vizzly/createQueryEngineUser.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/getConnection.d.ts +0 -7
- package/dist/shared-logic/src/api/vizzly/getProject.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/getProjects.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/getQueryEngineUser.d.ts +0 -3
- package/dist/shared-logic/src/api/vizzly/getTeamMembers.d.ts +0 -11
- package/dist/shared-logic/src/api/vizzly/getVizzlyConfig.d.ts +0 -4
- package/dist/shared-logic/src/api/vizzly/multiGetDashboards.d.ts +0 -7
- package/dist/shared-logic/src/api/vizzly/multiGetEncryptedDashboards.d.ts +0 -7
- package/dist/shared-logic/src/api/vizzly/saveConnection.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/saveEncryptedProjectEncryptionSecret.d.ts +0 -2
- package/dist/shared-logic/src/api/vizzly/updateDashboard.d.ts +0 -20
- package/dist/shared-logic/src/api/vizzly/updateQueryEngineUser.d.ts +0 -2
- package/dist/shared-ui/src/library/Editor.d.ts +0 -5
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CreateDashboardParams, UpdateDashboardParams, VizzlyServicesProperties } from '../../../services/src';
|
|
2
|
+
import { QueryEngineConfig } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
3
|
+
import { Dashboard } from '../../../shared-logic/src/Dashboard/types';
|
|
4
|
+
import { DashboardAccessConfig, IdentityConfig } from '../../../shared-logic/src/IdentityConfig/types';
|
|
5
|
+
import { GlobalLibrary } from '../../../shared-logic/src/GlobalLibrary/types';
|
|
6
|
+
export declare type LoadedVizzlyHook = Omit<State, 'loading'> & {
|
|
7
|
+
createDashboard: (params: CreateDashboardParams) => Promise<Dashboard | null>;
|
|
8
|
+
updateDashboard: (params: UpdateDashboardParams) => Promise<Dashboard | null>;
|
|
9
|
+
identityConfig: IdentityConfig;
|
|
10
|
+
queryEngineConfig: QueryEngineConfig;
|
|
11
|
+
accessType: DashboardAccessConfig['accessType'];
|
|
12
|
+
loading: false;
|
|
13
|
+
};
|
|
14
|
+
declare type LoadingVizzlyHook = Omit<State, 'loading'> & {
|
|
15
|
+
createDashboard: null;
|
|
16
|
+
updateDashboard: null;
|
|
17
|
+
identityConfig: null;
|
|
18
|
+
queryEngineConfig: null;
|
|
19
|
+
accessType: null;
|
|
20
|
+
loading: true;
|
|
21
|
+
};
|
|
22
|
+
declare type Returns = LoadedVizzlyHook | LoadingVizzlyHook;
|
|
23
|
+
declare type State = {
|
|
24
|
+
globalLibraries: GlobalLibrary[];
|
|
25
|
+
dashboards: Dashboard[];
|
|
26
|
+
loading: boolean;
|
|
27
|
+
error: Error | undefined;
|
|
28
|
+
};
|
|
29
|
+
export declare const useVizzly: (properties: VizzlyServicesProperties, options?: {
|
|
30
|
+
apiHost?: string | undefined;
|
|
31
|
+
} | undefined) => Returns;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DataSet } from '../../../../../../shared-logic/src/DataSet/types';
|
|
2
|
+
import { QueryAttributes } from '../../../../../../shared-logic/src/QueryAttributes/types';
|
|
3
|
+
export declare function buildGroupedFilterValue(dataSet: DataSet, filterGroup: QueryAttributes.Filter[][]): string;
|
|
@@ -20,10 +20,12 @@ declare const usePercentageModal: (queryEngineConfig: QueryEngineConfig, percent
|
|
|
20
20
|
wipNumeratorFilters: Partial<import("../../FilterInput/types").CompletedWipFilter>[][];
|
|
21
21
|
deleteWipNumeratorFilter: (orFilterIndex: number, andFilterIndex: number) => QueryAttributes.Filter[][];
|
|
22
22
|
updateWipNumeratorFilter: (wipFilter: Partial<import("../../FilterInput/types").CompletedWipFilter>, orFilterIndex: number, andFilterIndex: number) => void;
|
|
23
|
+
addOrNumeratorFilter: () => void;
|
|
23
24
|
completedDenominatorFilter: QueryAttributes.Filter[][];
|
|
24
25
|
wipDenominatorFilters: Partial<import("../../FilterInput/types").CompletedWipFilter>[][];
|
|
25
26
|
deleteWipDenominatorFilter: (orFilterIndex: number, andFilterIndex: number) => QueryAttributes.Filter[][];
|
|
26
27
|
updateWipDenominatorFilter: (wipFilter: Partial<import("../../FilterInput/types").CompletedWipFilter>, orFilterIndex: number, andFilterIndex: number) => void;
|
|
28
|
+
addOrDenominatorFilter: () => void;
|
|
27
29
|
isEditing: boolean;
|
|
28
30
|
handleUpsertPercentageField: () => void;
|
|
29
31
|
numeratorFilter: boolean;
|
|
@@ -5,6 +5,7 @@ import { SupportedQueryOperators } from '../QueryOpInput';
|
|
|
5
5
|
import { QueryEngineConfig } from '../../../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
6
|
import { TextOverride } from '../../../../../shared-logic/src/Translations/types';
|
|
7
7
|
export declare const IndividualFilter: (props: {
|
|
8
|
+
id: string;
|
|
8
9
|
onChange: (filter: WipFilter) => void;
|
|
9
10
|
onDelete: () => void;
|
|
10
11
|
filter: WipFilter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { EditorHookValues } from './useEditor';
|
|
3
|
+
import { FeaturesType } from '../../contexts/BetaFeatureProvider/BetaFeatureProvider';
|
|
4
|
+
export declare type Origin = 'dashboard' | 'library';
|
|
5
|
+
export declare const EditorComponent: FunctionComponent<{
|
|
6
|
+
editor: EditorHookValues;
|
|
7
|
+
usingBeta: FeaturesType | undefined;
|
|
8
|
+
openAI: (open: boolean) => void;
|
|
9
|
+
ai: boolean;
|
|
10
|
+
}>;
|
|
@@ -9,7 +9,7 @@ import { DashboardBehaviour, TextOverride } from '../../contexts/DashboardBehavi
|
|
|
9
9
|
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
|
|
10
10
|
import { Result } from '../../../../shared-logic/src/Result/types';
|
|
11
11
|
import { StudioAction, StudioState } from '../../contexts/DashboardContext/types';
|
|
12
|
-
declare type
|
|
12
|
+
export declare type EditorHookValues = {
|
|
13
13
|
queryEngineConfig: QueryEngineConfig;
|
|
14
14
|
selectedComponent: ComponentType['attributes']['type'];
|
|
15
15
|
dataPanel: DashboardBehaviour['dataPanel'];
|
|
@@ -36,5 +36,5 @@ declare type ProvidedValues = {
|
|
|
36
36
|
dispatch: React.Dispatch<StudioAction>;
|
|
37
37
|
textOverride: TextOverride;
|
|
38
38
|
};
|
|
39
|
-
declare const useEditor: () =>
|
|
39
|
+
declare const useEditor: () => EditorHookValues | null;
|
|
40
40
|
export default useEditor;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSObject } from '@emotion/css';
|
|
2
2
|
import { CSSProperties } from 'react';
|
|
3
|
+
export declare const coreButton: CSSObject;
|
|
3
4
|
declare const fontSizeMap: {
|
|
4
5
|
xs: string;
|
|
5
6
|
sm: string;
|
|
@@ -129,6 +130,7 @@ export declare const css: (() => null) & {
|
|
|
129
130
|
(variantOptions: Object): string;
|
|
130
131
|
toString: any;
|
|
131
132
|
};
|
|
133
|
+
coreButton: CSSObject;
|
|
132
134
|
};
|
|
133
135
|
export declare const coreCSS: (() => null) & {
|
|
134
136
|
button: CSSObject;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CSSObject } from '@emotion/css';
|
|
2
|
+
declare type StyleConfig = CSSObject & {
|
|
3
|
+
variants?: {
|
|
4
|
+
[key: string]: CSSObject;
|
|
5
|
+
};
|
|
6
|
+
compoundVariants?: Array<{
|
|
7
|
+
css: CSSObject;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
export declare const styles: <T extends StyleConfig>(styleConfig: T) => string;
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly/dashboard",
|
|
3
3
|
"author": "james@vizzly.co",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.12.0-dev-e9cb501d005236550d32fd4ffe3eaeb1307996b1",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "./dist/dashboard/src/index.d.ts",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -36,12 +36,16 @@
|
|
|
36
36
|
"@popperjs/core": "^2.11.6",
|
|
37
37
|
"@react-spring/web": "9.6.1",
|
|
38
38
|
"@visx/visx": "^3.10.2",
|
|
39
|
+
"@vizzly/api-client": "0.0.28",
|
|
40
|
+
"@vizzly/joi": "^17.7.0",
|
|
39
41
|
"chroma-js": "^2.4.2",
|
|
40
42
|
"copy-to-clipboard": "^3.3.3",
|
|
41
43
|
"file-saver": "^2.0.5",
|
|
42
44
|
"fuse.js": "^6.6.2",
|
|
45
|
+
"html2canvas": "^1.4.1",
|
|
43
46
|
"isomorphic-fetch": "^3.0.0",
|
|
44
|
-
"
|
|
47
|
+
"joi-to-json": "^4.2.1",
|
|
48
|
+
"jspdf": "^2.5.1",
|
|
45
49
|
"lodash": "^4.17.21",
|
|
46
50
|
"lodash-es": "^4.17.21",
|
|
47
51
|
"react-dates-17": "22.0.8",
|
|
@@ -51,10 +55,7 @@
|
|
|
51
55
|
"react-visibility-sensor": "^5.1.1",
|
|
52
56
|
"topojson-client": "^3.1.0",
|
|
53
57
|
"twin.macro": "^3.0.0-rc.3",
|
|
54
|
-
"uuid": "^9.0.0"
|
|
55
|
-
"html2canvas": "^1.4.1",
|
|
56
|
-
"joi-to-json": "^4.2.1",
|
|
57
|
-
"jspdf": "^2.5.1"
|
|
58
|
+
"uuid": "^9.0.0"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
60
61
|
"@babel/core": "^7.19.3",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { CreateDashboardParams } from '../../../shared-logic/src/api/vizzly/createDashboard';
|
|
2
|
-
import { DashboardPermission as DashboardPermissionType } from '../../../shared-logic/src/DashboardPermission/types';
|
|
3
|
-
import { Dashboard as DashboardType } from '../../../shared-logic/src/Dashboard/types';
|
|
4
|
-
import { UpdateDashboardParams } from '../../../shared-logic/src/api/vizzly/updateDashboard';
|
|
5
|
-
import FailedToCreateDashboardAccess from '../../../shared-logic/src/errors/FailedToCreateDashboardAccess';
|
|
6
|
-
import FailedToGetDashboard from '../../../shared-logic/src/errors/FailedToGetDashboard';
|
|
7
|
-
import NewVizzlyImplementation from '../../../shared-logic/src/errors/NewVizzlyImplementation';
|
|
8
|
-
import { IdentityConfig as IdentityConfigType } from '../../../shared-logic/src/IdentityConfig/types';
|
|
9
|
-
import { DataSet } from '../../../shared-logic/src/DataSet/types';
|
|
10
|
-
import * as Dashboard from '../../../shared-logic/src/Dashboard';
|
|
11
|
-
import { api } from '../../../shared-logic/src/api';
|
|
12
|
-
import { DashboardStorageStrategy } from '../../../shared-logic/src/DashboardAPI/types';
|
|
13
|
-
import { QueryEngineConfig } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
14
|
-
export declare type DashboardApiInterface = {
|
|
15
|
-
childDashboardCount: number;
|
|
16
|
-
defaultParentDashboardId: string;
|
|
17
|
-
permissions: Array<DashboardPermissionType>;
|
|
18
|
-
dashboards: Array<DashboardType>;
|
|
19
|
-
writeAccessDashboards: Array<DashboardType>;
|
|
20
|
-
readOnlyAccessDashboards: Array<DashboardType>;
|
|
21
|
-
accessType: 'admin' | 'standard';
|
|
22
|
-
createDashboard: (createParams: Omit<CreateDashboardParams, 'dashboardAccessToken'>) => Promise<DashboardType>;
|
|
23
|
-
saveScheduledReport: (params: {
|
|
24
|
-
dashboardId: string;
|
|
25
|
-
scheduledReportId: string;
|
|
26
|
-
cronSchedule: string | null;
|
|
27
|
-
}) => Promise<boolean>;
|
|
28
|
-
updateDashboard: (dashboardId: string, updateParams: Omit<UpdateDashboardParams, 'dashboardSessionToken'>) => Promise<DashboardType>;
|
|
29
|
-
error: undefined | FailedToCreateDashboardAccess | FailedToGetDashboard | NewVizzlyImplementation;
|
|
30
|
-
};
|
|
31
|
-
export declare type LoadingDashboardApiInterface = {
|
|
32
|
-
isLoading: true;
|
|
33
|
-
error: DashboardApiInterface['error'];
|
|
34
|
-
};
|
|
35
|
-
declare const useDashboardAPI: (identityConfig: IdentityConfigType | undefined, dataSets: DataSet[] | undefined, vizzlyAPI: ReturnType<typeof api>, parentDashboardId: string | undefined, dashboardStorageStrategy: DashboardStorageStrategy, queryEngineConfig: QueryEngineConfig | undefined, programmaticDashboard?: ((dataSets: DataSet[]) => Promise<Array<Partial<Dashboard.SaveableDashboardDefinition>>>) | undefined) => DashboardApiInterface | LoadingDashboardApiInterface;
|
|
36
|
-
export default useDashboardAPI;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { VizzlyComponents } from '../../../shared-ui/src/types';
|
|
2
|
-
import FailedToLoadIdentity from '../../../shared-logic/src/errors/FailedToLoadIdentity';
|
|
3
|
-
import FailedToLoadQueryEngineConfig from '../../../shared-logic/src/errors/FailedToLoadQueryEngineConfig';
|
|
4
|
-
import { DataSet } from '../../../shared-logic/src/DataSet/types';
|
|
5
|
-
import { QueryEngineConfig, QueryEngineEndpoint } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
|
-
import { IdentityConfig as IdentityConfigType } from '../../../shared-logic/src/IdentityConfig/types';
|
|
7
|
-
import IdentityMustBeCallback from '../../../shared-logic/src/errors/IdentityMustBeCallback';
|
|
8
|
-
import NoDataSetResolved from '../../../shared-logic/src/errors/NoDataSetResolved';
|
|
9
|
-
import { TextOverride } from '../../../shared-logic/src/Translations/types';
|
|
10
|
-
export declare const useDataConfigurationAndIdentity: (identityCallback: import("../../../shared-logic/src/Callbacks/types").identityCallback, loadDataSetsCallback: import("../../../shared-logic/src/Callbacks/types").loadDataSetsCallback, loadQueryEngineConfigCallback: string | import("../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback | {
|
|
11
|
-
endpoint: string;
|
|
12
|
-
dynamicConfig?: Object | undefined;
|
|
13
|
-
customHeaders?: (() => {
|
|
14
|
-
[headerKey: string]: string;
|
|
15
|
-
}) | undefined;
|
|
16
|
-
}, textOverride: TextOverride) => {
|
|
17
|
-
error: FailedToLoadIdentity | FailedToLoadQueryEngineConfig | IdentityMustBeCallback | NoDataSetResolved | undefined;
|
|
18
|
-
dataSets: DataSet[] | undefined;
|
|
19
|
-
queryEngineConfig: QueryEngineConfig | undefined;
|
|
20
|
-
identityConfig: IdentityConfigType | undefined;
|
|
21
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SaveableDashboardDefinition } from '../../../shared-logic/src/Dashboard/types';
|
|
2
|
-
import { Component as ComponentType } from '../../../shared-logic/src/Component/types';
|
|
3
|
-
import { VizzlyDashboard } from './types';
|
|
4
|
-
import { PartialBy } from '../../../shared-logic/src/typeHelpers';
|
|
5
|
-
export declare const toSaveableDashboardDefinition: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T) => SaveableDashboardDefinition;
|
|
6
|
-
export declare const emptyDashboard: () => PartialBy<VizzlyDashboard, 'id'>;
|
|
7
|
-
export declare const insertRow: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T, rowIndex: number, overrides?: Partial<{
|
|
8
|
-
height: number;
|
|
9
|
-
}> | undefined) => T;
|
|
10
|
-
export declare const appendEmptyCell: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T, rowIndex: number) => T;
|
|
11
|
-
export declare const setComponentOnDisplay: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T, componentAttributes: ComponentType.Attributes, rowIndex: number, cellIndex: number) => T;
|
|
12
|
-
export declare const setComponentInLibrary: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T, componentAttributes: ComponentType.Attributes, libraryIndex: number) => T;
|
|
13
|
-
export declare const listComponentTypesUsed: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T) => Array<string>;
|
|
14
|
-
/** Returns the IDs of all data sets used on a dashboard */
|
|
15
|
-
export declare const listDataSetIdsUsed: <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, "id">>(vizzlyDashboard: T) => Array<string>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { VizzlyDashboard } from '../sdk/types';
|
|
2
|
-
import { PartialBy } from '../../../shared-logic/src/typeHelpers';
|
|
3
|
-
import { DashboardApiInterface } from '../contexts/useDashboardAPI';
|
|
4
|
-
declare type createDashboard = <T extends VizzlyDashboard | PartialBy<VizzlyDashboard, 'id'>>(options: {
|
|
5
|
-
dashboard?: T | undefined;
|
|
6
|
-
metadata?: {
|
|
7
|
-
[key: string]: string | number;
|
|
8
|
-
} | undefined;
|
|
9
|
-
parentDashboardId?: string;
|
|
10
|
-
}) => Promise<string | null>;
|
|
11
|
-
declare const createDashboard: (dashboardAPI: DashboardApiInterface) => createDashboard;
|
|
12
|
-
export default createDashboard;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { DashboardApiInterface } from '../contexts/useDashboardAPI';
|
|
2
|
-
import { VizzlyDashboard } from '../sdk';
|
|
3
|
-
declare type updateDashboardMeta = (dashboardId: string, metadata: VizzlyDashboard['metadata']) => Promise<boolean>;
|
|
4
|
-
declare const updateDashboardMeta: (dashboardAPI: DashboardApiInterface) => updateDashboardMeta;
|
|
5
|
-
export default updateDashboardMeta;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { VizzlyDashboard } from './sdk/types';
|
|
2
|
-
import { loadVizzlySDK } from './sdk';
|
|
3
|
-
import createDashboard from './useDashboardManager/createDashboard';
|
|
4
|
-
import deleteDashboard from './useDashboardManager/deleteDashboard';
|
|
5
|
-
import updateDashboardMeta from './useDashboardManager/updateDashboardMeta';
|
|
6
|
-
import { identityCallback, loadQueryEngineConfigCallback } from '../../shared-logic/src/Callbacks/types';
|
|
7
|
-
import { ApiConfig } from '../../shared-logic/src/ApiConfig';
|
|
8
|
-
import { QueryEngineEndpoint } from '../../shared-logic/src/QueryEngineConfig/types';
|
|
9
|
-
declare type BaseProvides<Loading extends boolean, VizzlySDK, ParentDashboardIdType> = {
|
|
10
|
-
VizzlySDK: VizzlySDK;
|
|
11
|
-
loading: Loading;
|
|
12
|
-
/** JSON representations of the child dashboards for the current parent dashboard. */
|
|
13
|
-
dashboards: VizzlyDashboard[];
|
|
14
|
-
/** JSON representations of all parent dashboards available */
|
|
15
|
-
parentDashboards: VizzlyDashboard[];
|
|
16
|
-
/** All child dashboards for each parent dashboard the user has access too. */
|
|
17
|
-
allChildDashboards: VizzlyDashboard[];
|
|
18
|
-
/** Fetch child dashboards for a specific parent dashboard. */
|
|
19
|
-
getChildDashboards: (parentDashboardId: string) => VizzlyDashboard[];
|
|
20
|
-
/**
|
|
21
|
-
* Creates a child dashboard.
|
|
22
|
-
* https://docs.vizzly.co/concepts/parent-and-child-dashboards
|
|
23
|
-
* */
|
|
24
|
-
createDashboard: ReturnType<typeof createDashboard>;
|
|
25
|
-
deleteDashboard: ReturnType<typeof deleteDashboard>;
|
|
26
|
-
updateDashboardMeta: ReturnType<typeof updateDashboardMeta>;
|
|
27
|
-
/** Does the current user have `admin` access. */
|
|
28
|
-
isAdmin: boolean;
|
|
29
|
-
defaultParentDashboardId: ParentDashboardIdType;
|
|
30
|
-
};
|
|
31
|
-
export declare type DashboardManagerLoadedState = BaseProvides<false, ReturnType<typeof loadVizzlySDK>, string>;
|
|
32
|
-
export declare type DashboardManagerLoadingState = BaseProvides<true, null, null>;
|
|
33
|
-
declare type Provides = DashboardManagerLoadedState | DashboardManagerLoadingState;
|
|
34
|
-
declare const useDashboardManager: (identity: identityCallback, loadQueryEngineConfig: loadQueryEngineConfigCallback | QueryEngineEndpoint, defaultParentDashboardId?: string | undefined, vizzlyApiConfigOverride?: ApiConfig | undefined) => Provides;
|
|
35
|
-
declare const useInBrowserDashboardManager: (identity: identityCallback, defaultParentDashboardId?: string | undefined, vizzlyApiConfigOverride?: ApiConfig | undefined) => Provides;
|
|
36
|
-
export { useDashboardManager, useInBrowserDashboardManager };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DataSet } from '../../DataSet/types';
|
|
2
|
-
import * as Dashboard from '../../../../shared-logic/src/Dashboard';
|
|
3
|
-
import { api } from '../../api';
|
|
4
|
-
import { IdentityConfig as IdentityConfigType } from '../../../../shared-logic/src/IdentityConfig/types';
|
|
5
|
-
import { CreateDashboardParams } from '../../api/vizzly/createDashboard';
|
|
6
|
-
import { DashboardPermission as DashboardPermissionType, RawDashboardPermission } from '../../../../shared-logic/src/DashboardPermission/types';
|
|
7
|
-
import { DashboardStorageStrategy } from '../types';
|
|
8
|
-
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
9
|
-
export declare function prepareCreateResponseForAdding(createdDashboardResponse: {
|
|
10
|
-
dashboard: Dashboard.RawDashboard;
|
|
11
|
-
permissions: RawDashboardPermission[];
|
|
12
|
-
}, dataSets: DataSet[], queryEngineConfig: QueryEngineConfig | undefined): {
|
|
13
|
-
createdDashboard: Dashboard.Dashboard;
|
|
14
|
-
formattedPermissions: DashboardPermissionType[];
|
|
15
|
-
};
|
|
16
|
-
export declare function postCreateDashboard(params: Omit<CreateDashboardParams, 'dashboardAccessToken'>, identityConfig: IdentityConfigType, dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>): Promise<{
|
|
17
|
-
dashboard: import("../../Dashboard").RawDashboard<import("../../typeHelpers").PartialBy<import("../../Dashboard").SaveableDashboardDefinition, "isPlayground" | "customFields">>;
|
|
18
|
-
permissions: import("../../DashboardPermission/types").RawDashboardPermission[];
|
|
19
|
-
}>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DataSet } from '../../DataSet/types';
|
|
2
|
-
import { Dashboard as DashboardType } from '../../../../shared-logic/src/Dashboard/types';
|
|
3
|
-
import * as Dashboard from '../../../../shared-logic/src/Dashboard';
|
|
4
|
-
import { api } from '../../api';
|
|
5
|
-
import { UnEncryptedDashboardUpdateResponse, UpdateDashboardParams } from '../../api/vizzly/updateDashboard';
|
|
6
|
-
import { DashboardStorageStrategy } from '../types';
|
|
7
|
-
import { QueryEngineConfig } from '../../QueryEngineConfig/types';
|
|
8
|
-
export declare function postUpdateDashboard(dashboardStorageStrategy: DashboardStorageStrategy, vizzlyAPI: ReturnType<typeof api>, updateParams: {
|
|
9
|
-
dashboardSessionToken: string;
|
|
10
|
-
definition?: Dashboard.SaveableDashboardDefinition;
|
|
11
|
-
/** @deprecated - use `metadata` instead */
|
|
12
|
-
meta?: any;
|
|
13
|
-
metadata?: any;
|
|
14
|
-
deleted?: boolean;
|
|
15
|
-
}): Promise<UnEncryptedDashboardUpdateResponse>;
|
|
16
|
-
export declare function updateDashboardFromUpdateResponse(updatedDashboardResponse: UnEncryptedDashboardUpdateResponse, dataSets: DataSet[], dashboards: DashboardType[], params: Omit<UpdateDashboardParams, 'dashboardSessionToken'>, queryEngineConfig: QueryEngineConfig | undefined): {
|
|
17
|
-
newDashboards: DashboardType[];
|
|
18
|
-
updatedDashboard: DashboardType;
|
|
19
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Dashboard } from '../Dashboard/types';
|
|
2
|
-
import { QueryEngineConfig } from '../QueryEngineConfig/types';
|
|
3
|
-
import { VizzlyDashboard } from './types';
|
|
4
|
-
import { JoiOptions } from '../validations';
|
|
5
|
-
export declare const joiOptions: JoiOptions;
|
|
6
|
-
export declare function buildClientFacingDashboards(dashboards: Dashboard[], queryEngineConfig: QueryEngineConfig | undefined): VizzlyDashboard[];
|
|
7
|
-
export declare const getChildDashboards: (parentDashboardId: string, clientFacingDash: VizzlyDashboard[]) => VizzlyDashboard[];
|
|
8
|
-
export declare function getAllClientFacingChildDashboards(clientFacingDash: VizzlyDashboard[]): VizzlyDashboard[];
|
|
9
|
-
export declare function getParentDashboards(clientFacingDash: VizzlyDashboard[]): VizzlyDashboard[];
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
|
|
2
|
-
import { RawDashboardPermission } from '../../DashboardPermission/types';
|
|
3
|
-
import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
|
|
4
|
-
export declare type Response = {
|
|
5
|
-
dashboard: RawDashboard;
|
|
6
|
-
permissions: Array<RawDashboardPermission>;
|
|
7
|
-
};
|
|
8
|
-
export declare type CreateDashboardParams = {
|
|
9
|
-
dashboardAccessToken: string;
|
|
10
|
-
definition: SaveableDashboardDefinition;
|
|
11
|
-
/** @deprecated - use `metadata` instead */
|
|
12
|
-
meta?: any;
|
|
13
|
-
metadata?: any;
|
|
14
|
-
parentDashboardId: string | null;
|
|
15
|
-
permissions: Array<any>;
|
|
16
|
-
};
|
|
17
|
-
export declare const createDashboardViaQueryEngine: (queryEngineEndpoint: QueryEngineEndpoint) => (params: CreateDashboardParams) => Promise<{
|
|
18
|
-
dashboard: RawDashboard;
|
|
19
|
-
permissions: Array<RawDashboardPermission>;
|
|
20
|
-
}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
|
|
2
|
-
import { RawDashboard } from '../../Dashboard';
|
|
3
|
-
export declare type Response = {
|
|
4
|
-
found: RawDashboard[];
|
|
5
|
-
not_found: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare const multiGetDashboards: (queryEngineEndpoint: QueryEngineEndpoint) => (dashboardAccessTokens: string[], abortSignal: AbortSignal) => Promise<Response>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as Dashboard from '../../Dashboard/Dashboard';
|
|
2
|
-
import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
|
|
3
|
-
import { QueryEngineEndpoint } from '../../QueryEngineConfig/types';
|
|
4
|
-
export declare type Response = {
|
|
5
|
-
dashboard: RawDashboard<Dashboard.RawDefinition>;
|
|
6
|
-
};
|
|
7
|
-
export declare type UpdateDashboardParams = {
|
|
8
|
-
dashboardSessionToken: string;
|
|
9
|
-
definition?: SaveableDashboardDefinition;
|
|
10
|
-
meta?: any;
|
|
11
|
-
deleted?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export declare const updateDashboardViaQueryEngine: (queryEngineEndpoint: QueryEngineEndpoint) => (params: UpdateDashboardParams) => Promise<Response>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
|
|
2
|
-
import { RawDashboardPermission } from '../../DashboardPermission/types';
|
|
3
|
-
import { HttpClient } from '../types';
|
|
4
|
-
export declare type Response = {
|
|
5
|
-
dashboard: RawDashboard;
|
|
6
|
-
permissions: Array<RawDashboardPermission>;
|
|
7
|
-
};
|
|
8
|
-
export declare type CreateDashboardParams = {
|
|
9
|
-
dashboardAccessToken: string;
|
|
10
|
-
definition: SaveableDashboardDefinition;
|
|
11
|
-
/** @deprecated - use `metadata` instead */
|
|
12
|
-
meta?: any;
|
|
13
|
-
metadata?: any;
|
|
14
|
-
parentDashboardId: string | null;
|
|
15
|
-
permissions: Array<any>;
|
|
16
|
-
};
|
|
17
|
-
export declare const createDashboard: (httpClient: HttpClient) => (params: CreateDashboardParams) => Promise<{
|
|
18
|
-
dashboard: RawDashboard;
|
|
19
|
-
permissions: Array<RawDashboardPermission>;
|
|
20
|
-
}>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '../types';
|
|
2
|
-
import { DashboardPermission, RawDashboardPermission } from '../../DashboardPermission/types';
|
|
3
|
-
export declare type Response = {
|
|
4
|
-
permissions: Array<RawDashboardPermission>;
|
|
5
|
-
};
|
|
6
|
-
export declare const createDashboardAccess: (httpClient: HttpClient) => (dashboardAccessToken: string, dashboardAdminOverrideToken: string | undefined, abortSignal: AbortSignal) => Promise<{
|
|
7
|
-
permissions: Array<DashboardPermission>;
|
|
8
|
-
}>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HttpClient } from '../types';
|
|
2
|
-
export declare type TeamMember = {
|
|
3
|
-
id: string;
|
|
4
|
-
organisation_name: string;
|
|
5
|
-
user_id: string;
|
|
6
|
-
email: string;
|
|
7
|
-
first_name: string;
|
|
8
|
-
last_name: string;
|
|
9
|
-
status: 'pending' | 'active' | 'removed';
|
|
10
|
-
};
|
|
11
|
-
export declare const getProjectTeamMembers: (httpClient: HttpClient) => (projectId: string) => Promise<Array<TeamMember> | undefined>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RawDashboard } from '../../Dashboard';
|
|
2
|
-
import { HttpClient } from '../types';
|
|
3
|
-
export declare type Response = {
|
|
4
|
-
found: RawDashboard[];
|
|
5
|
-
not_found: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare const multiGetDashboards: (httpClient: HttpClient) => (dashboardAccessTokens: string[], abortSignal: AbortSignal) => Promise<Response>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { RawDashboard, RawDefinition } from '../../Dashboard';
|
|
2
|
-
import { HttpClient } from '../types';
|
|
3
|
-
export declare type Response = {
|
|
4
|
-
found: RawDashboard<string | RawDefinition>[];
|
|
5
|
-
not_found: string[];
|
|
6
|
-
};
|
|
7
|
-
export declare const multiGetEncryptedDashboards: (httpClient: HttpClient) => (dashboardAccessTokens: string[]) => Promise<Response>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as Dashboard from '../../Dashboard/Dashboard';
|
|
2
|
-
import { RawDashboard, SaveableDashboardDefinition } from '../../Dashboard';
|
|
3
|
-
import { HttpClient } from '../types';
|
|
4
|
-
export declare type EncryptedDashboardUpdateResponse = {
|
|
5
|
-
dashboard: RawDashboard<string>;
|
|
6
|
-
};
|
|
7
|
-
export declare type UnEncryptedDashboardUpdateResponse = {
|
|
8
|
-
dashboard: RawDashboard<Dashboard.RawDefinition>;
|
|
9
|
-
};
|
|
10
|
-
declare type UpdateDashboardResponse = EncryptedDashboardUpdateResponse | UnEncryptedDashboardUpdateResponse;
|
|
11
|
-
export declare type UpdateDashboardParams = {
|
|
12
|
-
dashboardSessionToken: string;
|
|
13
|
-
definition?: SaveableDashboardDefinition;
|
|
14
|
-
/** @deprecated - use `metadata` instead */
|
|
15
|
-
meta?: any;
|
|
16
|
-
metadata?: any;
|
|
17
|
-
deleted?: boolean;
|
|
18
|
-
};
|
|
19
|
-
export declare const updateDashboard: (httpClient: HttpClient) => (params: UpdateDashboardParams) => Promise<UpdateDashboardResponse>;
|
|
20
|
-
export {};
|