@datawheel/bespoke 0.10.0-beta.1 → 0.10.0-test.6
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 +0 -8
- package/dist/auth.js +1 -1
- package/dist/cms.css +1 -1
- package/dist/cms.js +66 -38
- package/dist/explore.css +1 -1
- package/dist/explore.js +36 -8
- package/dist/index.js +1 -1
- package/dist/redux-store.js +4 -3
- package/dist/report.css +1 -1
- package/dist/report.js +42 -14
- package/dist/server.js +11 -10
- package/package.json +40 -76
- package/css/mixins.scss +0 -178
- package/dist/Search-BWmRyIa9.d.mts +0 -129
- package/dist/auth-BwgF4GT9.d.mts +0 -139
- package/dist/auth.d.mts +0 -42
- package/dist/cms.d.mts +0 -13
- package/dist/explore.d.mts +0 -40
- package/dist/index.d.mts +0 -24
- package/dist/redux-store.d.mts +0 -175
- package/dist/report.d.mts +0 -132
- package/dist/server.d.mts +0 -108
- package/dist/store-De3Xknzr.d.mts +0 -545
- package/dist/types-BcIo0oyw.d.mts +0 -847
package/dist/cms.d.mts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { NotificationsProps } from '@mantine/notifications';
|
|
2
|
-
|
|
3
|
-
interface BespokeManagerOptions {
|
|
4
|
-
title?: string;
|
|
5
|
-
notifications?: NotificationsProps;
|
|
6
|
-
pathSegment?: string;
|
|
7
|
-
locale?: string;
|
|
8
|
-
profilePrefix?: string;
|
|
9
|
-
previewPrefix?: string | null;
|
|
10
|
-
}
|
|
11
|
-
declare function BespokeManager(options: BespokeManagerOptions): React.FC;
|
|
12
|
-
|
|
13
|
-
export { BespokeManager, type BespokeManagerOptions };
|
package/dist/explore.d.mts
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { FC, ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { E as ExploreTranslations, R as ReportTileProps } from './Search-BWmRyIa9.mjs';
|
|
4
|
-
export { b as BespokeExploreProvider, a as BespokeReportItemProps, B as BespokeSearch, u as useBespokeExplore } from './Search-BWmRyIa9.mjs';
|
|
5
|
-
import { ActionIconProps, ModalProps, TooltipProps } from '@mantine/core';
|
|
6
|
-
import './types-BcIo0oyw.mjs';
|
|
7
|
-
import 'sequelize';
|
|
8
|
-
|
|
9
|
-
type BespokeExploreProps = {
|
|
10
|
-
locale?: string;
|
|
11
|
-
profilePrefix: string;
|
|
12
|
-
initialReportId?: number;
|
|
13
|
-
initialVariantId?: number;
|
|
14
|
-
initialQuery?: string;
|
|
15
|
-
translations?: ExploreTranslations;
|
|
16
|
-
reportTile?: FC<ReportTileProps>;
|
|
17
|
-
onSelect?: () => void;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* React component for rendering a fully featured explore page
|
|
21
|
-
*/
|
|
22
|
-
declare function BespokeExplore({ profilePrefix, initialReportId, initialVariantId, translations, onSelect, reportTile, initialQuery, }: BespokeExploreProps): react_jsx_runtime.JSX.Element;
|
|
23
|
-
|
|
24
|
-
type BespokeExploreModalProps = {
|
|
25
|
-
exploreProps: BespokeExploreProps;
|
|
26
|
-
icon?: ReactElement;
|
|
27
|
-
actionIconProps?: Partial<ActionIconProps>;
|
|
28
|
-
modalProps?: Partial<ModalProps>;
|
|
29
|
-
tooltipProps?: Partial<TooltipProps>;
|
|
30
|
-
tooltipText?: string;
|
|
31
|
-
children?: ReactNode;
|
|
32
|
-
showIcon?: boolean;
|
|
33
|
-
showTooltip?: boolean;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* React component for rendering a button that opens the Modal with explore
|
|
37
|
-
*/
|
|
38
|
-
declare function BespokeExploreModal({ exploreProps, icon, actionIconProps, modalProps, tooltipProps, tooltipText, showIcon, showTooltip, children }: BespokeExploreModalProps): react_jsx_runtime.JSX.Element;
|
|
39
|
-
|
|
40
|
-
export { BespokeExplore, BespokeExploreModal, ReportTileProps as BespokeReportTileProps };
|
package/dist/index.d.mts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import react from 'react';
|
|
3
|
-
|
|
4
|
-
interface ConfirmPrompt {
|
|
5
|
-
title?: string;
|
|
6
|
-
message: string;
|
|
7
|
-
cancelText?: string;
|
|
8
|
-
confirmText?: string;
|
|
9
|
-
}
|
|
10
|
-
type Prompt = ConfirmPrompt;
|
|
11
|
-
interface RequestFactory<T extends Prompt> {
|
|
12
|
-
(request: T, delayed?: false): Promise<void>;
|
|
13
|
-
(request: T, delayed: true): {
|
|
14
|
-
show(): Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
type DialogContextProps = {
|
|
18
|
-
newConfirmation: RequestFactory<ConfirmPrompt>;
|
|
19
|
-
};
|
|
20
|
-
type DialogProviderProps = react.PropsWithChildren<Record<string, unknown>>;
|
|
21
|
-
declare function DialogProvider(props: DialogProviderProps): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare function useDialog(): DialogContextProps;
|
|
23
|
-
|
|
24
|
-
export { DialogProvider, useDialog };
|
package/dist/redux-store.d.mts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { R as RecordsKey, A as AppThunk, a as ReadMembersResult, V as ValidateVariantSlugResponse, b as RegenerateSearchResponse, c as ReadMembersParams, d as ReadMembersResponse, S as SearchMemberParams, e as SearchMemberResponse, P as ProxyRequestParams, f as AppDispatch, g as AppState } from './store-De3Xknzr.mjs';
|
|
2
|
-
export { s as storeWrapper } from './store-De3Xknzr.mjs';
|
|
3
|
-
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
4
|
-
import { D as DataSource, A as AnyBlock, R as Result, a as AnyNestedBlock, N as NestedDimension, F as Formatter, b as AnyReport, c as AnyNestedReport, d as Section, e as NestedSection, V as Variant, f as DeleteParams, g as ReadParams, h as Dimension, i as SearchReportParams, j as SearchReportResponse, k as ReadMetadataParams, l as ReadMetadataResponse, S as SearchUsersParams, U as UpdateUserParams, m as UpdateMyDataParams, n as ReadPrivateBlocksParams, o as ReadPrivateBlocksResponse, p as RevalidateUrlRequest, q as RevalidateUrlResponse, r as RevalidateReportRequest, s as RevalidateReportResponse, t as ReadEnvSecretsResponse } from './types-BcIo0oyw.mjs';
|
|
5
|
-
import { d as BespokeUserProfile } from './auth-BwgF4GT9.mjs';
|
|
6
|
-
import { TypedUseSelectorHook } from 'react-redux';
|
|
7
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import 'next/app';
|
|
9
|
-
import 'next';
|
|
10
|
-
import 'querystring';
|
|
11
|
-
import 'next-redux-wrapper';
|
|
12
|
-
import 'sequelize';
|
|
13
|
-
import 'next-auth';
|
|
14
|
-
import 'next-auth/react';
|
|
15
|
-
|
|
16
|
-
interface ResourceContextType {
|
|
17
|
-
pathSegment: string;
|
|
18
|
-
formatterFunctions: Record<string, Record<string, (value: any) => string>>;
|
|
19
|
-
datasourceFunctions: DataSource[];
|
|
20
|
-
profilePrefix: string;
|
|
21
|
-
previewPrefix?: string | null;
|
|
22
|
-
siteProps?: Record<string, any>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type VariableUpdateParams = {
|
|
26
|
-
sid: number;
|
|
27
|
-
bid: number;
|
|
28
|
-
previews: Record<string, any>[];
|
|
29
|
-
query: Record<string, any>;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
declare const createEntity: <T extends RecordsKey>(type: T, payload: Parameters<{
|
|
33
|
-
block: (payload: Pick<AnyBlock, "type" | "blockrow" | "blockcol" | "section_id"> & {
|
|
34
|
-
locales: Array<string>;
|
|
35
|
-
}) => AppThunk<Promise<Result<AnyNestedBlock>>>;
|
|
36
|
-
dimension: (payload: Pick<NestedDimension, "report_id" | "name" | "ordering">) => AppThunk<Promise<Result<NestedDimension>>>;
|
|
37
|
-
formatter: (payload: Pick<Formatter, "content" | "name">) => AppThunk<Promise<Result<Formatter>>>;
|
|
38
|
-
report: (payload: Pick<AnyReport, "name">) => AppThunk<Promise<Result<AnyNestedReport>>>;
|
|
39
|
-
section: (payload: Pick<Section, "report_id" | "ordering">) => AppThunk<Promise<Result<NestedSection>>>;
|
|
40
|
-
variant: (payload: Pick<Variant, "dimension_id" | "slug" | "name">) => AppThunk<Promise<Result<Variant>>>;
|
|
41
|
-
datasource: (payload: Pick<DataSource, "content" | "description" | "name">) => AppThunk<Promise<Result<DataSource>>>;
|
|
42
|
-
}[T]>[0]) => any;
|
|
43
|
-
declare const readEntity: <T extends RecordsKey>(type: T, payload: Parameters<{
|
|
44
|
-
block: (payload: ReadParams) => AppThunk<Promise<Result<AnyBlock[] | AnyNestedBlock[], string>>>;
|
|
45
|
-
dimension: (payload: ReadParams) => AppThunk<Promise<Result<NestedDimension[] | Dimension[], string>>>;
|
|
46
|
-
formatter: (payload: ReadParams) => AppThunk<Promise<Result<Formatter[], string>>>;
|
|
47
|
-
report: (payload: ReadParams) => AppThunk<Promise<Result<AnyNestedReport[] | AnyReport[], string>>>;
|
|
48
|
-
section: (payload: ReadParams) => AppThunk<Promise<Result<NestedSection[] | Section[], string>>>;
|
|
49
|
-
variant: (payload: ReadParams) => AppThunk<Promise<Result<Variant[], string>>>;
|
|
50
|
-
datasource: (payload: ReadParams) => AppThunk<Promise<Result<DataSource[], string>>>;
|
|
51
|
-
}[T]>[0]) => any;
|
|
52
|
-
declare const updateEntity: <T extends RecordsKey>(type: T, payload: Parameters<{
|
|
53
|
-
block: (payload: Partial<AnyNestedBlock> & {
|
|
54
|
-
id: number;
|
|
55
|
-
inputAction?: {
|
|
56
|
-
operation: "create" | "delete";
|
|
57
|
-
input: {
|
|
58
|
-
input_id: number;
|
|
59
|
-
block_id: number;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
}) => AppThunk<Promise<Result<AnyNestedBlock>>>;
|
|
63
|
-
dimension: (payload: Partial<NestedDimension> & {
|
|
64
|
-
id: number;
|
|
65
|
-
}) => AppThunk<Promise<Result<NestedDimension>>>;
|
|
66
|
-
formatter: (payload: Partial<Formatter> & {
|
|
67
|
-
id: number;
|
|
68
|
-
}) => AppThunk<Promise<Result<Formatter>>>;
|
|
69
|
-
report: (payload: Partial<AnyNestedReport> & {
|
|
70
|
-
id: number;
|
|
71
|
-
}) => AppThunk<Promise<Result<AnyNestedReport>>>;
|
|
72
|
-
section: (payload: Partial<NestedSection> & {
|
|
73
|
-
id: number;
|
|
74
|
-
}) => AppThunk<Promise<Result<NestedSection>>>;
|
|
75
|
-
variant: (payload: Partial<Variant> & {
|
|
76
|
-
id: number;
|
|
77
|
-
}) => AppThunk<Promise<Result<Variant>>>;
|
|
78
|
-
datasource: (payload: Partial<DataSource> & {
|
|
79
|
-
id: number;
|
|
80
|
-
}) => AppThunk<Promise<Result<DataSource>>>;
|
|
81
|
-
}[T]>[0]) => any;
|
|
82
|
-
declare const deleteEntity: <T extends RecordsKey>(type: T, payload: Parameters<{
|
|
83
|
-
block: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
84
|
-
dimension: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
85
|
-
formatter: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
86
|
-
report: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
87
|
-
section: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
88
|
-
variant: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
89
|
-
datasource: (payload: DeleteParams) => AppThunk<Promise<void>>;
|
|
90
|
-
}[T]>[0]) => any;
|
|
91
|
-
declare const cloneEntity: <T extends RecordsKey>(type: T, payload: Parameters<Record<RecordsKey, AnyThunk>[T]>[0]) => any;
|
|
92
|
-
type AnyThunk = (p: any) => any;
|
|
93
|
-
|
|
94
|
-
declare const setStatus: _reduxjs_toolkit.ActionCreatorWithNonInferrablePayload<"status/setStatus">;
|
|
95
|
-
declare const setPreviews: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<ReadMembersResult[], "status/setPreviews">;
|
|
96
|
-
declare const setSectionState: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<Record<number, any>, "status/setSectionState">;
|
|
97
|
-
declare const resetSectionState: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<number, "status/resetSectionState">;
|
|
98
|
-
declare const setCurrentLocale: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<string, "status/setCurrentLocale">;
|
|
99
|
-
declare const setPreferredLocale: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<string, "status/setPreferredLocale">;
|
|
100
|
-
declare const addRunConsumersRunning: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<number[], "status/addRunConsumersRunning">;
|
|
101
|
-
declare const removeRunConsumersRunning: _reduxjs_toolkit.ActionCreatorWithOptionalPayload<number[], "status/removeRunConsumersRunning">;
|
|
102
|
-
declare function variantValidateSlug(dimension: number, slug: string): AppThunk<Promise<ValidateVariantSlugResponse>>;
|
|
103
|
-
declare function reportSearch(filters: SearchReportParams): AppThunk<Promise<SearchReportResponse>>;
|
|
104
|
-
declare function searchRegenerate(): AppThunk<Promise<RegenerateSearchResponse>>;
|
|
105
|
-
declare function readMember(params: ReadMembersParams): AppThunk<Promise<ReadMembersResponse>>;
|
|
106
|
-
declare function searchMember(params: SearchMemberParams): AppThunk<Promise<SearchMemberResponse>>;
|
|
107
|
-
/** Deletes a given key from the current query parameters */
|
|
108
|
-
declare function deleteQueryParam(resource: any, key: any): (dispatch: any, getState: any) => Promise<void>;
|
|
109
|
-
/** Adds to or edits the current status query parameters to include the given key/val */
|
|
110
|
-
declare function setQueryParam(resource: any, key: any, value: any): (dispatch: any, getState: any) => Promise<void>;
|
|
111
|
-
declare function recalculateVariables(resource: ResourceContextType, params?: Partial<VariableUpdateParams>): AppThunk;
|
|
112
|
-
declare function readMetadata(filters: ReadMetadataParams): AppThunk<Promise<ReadMetadataResponse>>;
|
|
113
|
-
declare function urlProxy(config: ProxyRequestParams): AppThunk<Promise<any>>;
|
|
114
|
-
/** Users actions */
|
|
115
|
-
declare function searchRole(): AppThunk<Promise<any>>;
|
|
116
|
-
declare function searchUser(filters: SearchUsersParams): AppThunk<Promise<any>>;
|
|
117
|
-
declare function readUser(userId: string): AppThunk<Promise<BespokeUserProfile>>;
|
|
118
|
-
declare function updateUser({ user }: {
|
|
119
|
-
user: UpdateUserParams;
|
|
120
|
-
}): AppThunk<Promise<any>>;
|
|
121
|
-
declare function updateMyData(params: UpdateMyDataParams): AppThunk<Promise<any>>;
|
|
122
|
-
/** Remove a list of blocks from state, only used for private blocks during getStaticProps */
|
|
123
|
-
declare function removeBlocksFromState(privateBlockIds: number[]): AppThunk<Promise<void>>;
|
|
124
|
-
declare function addBlockToState(newBlocks: any): AppThunk<Promise<void>>;
|
|
125
|
-
declare function readPrivateBlocks(params: ReadPrivateBlocksParams): AppThunk<Promise<ReadPrivateBlocksResponse>>;
|
|
126
|
-
declare function revalidateUrl(params: RevalidateUrlRequest): AppThunk<Promise<RevalidateUrlResponse>>;
|
|
127
|
-
declare function revalidateReport(params: RevalidateReportRequest): AppThunk<Promise<RevalidateReportResponse>>;
|
|
128
|
-
declare function readEnvSecrets(): AppThunk<Promise<ReadEnvSecretsResponse>>;
|
|
129
|
-
declare function removeDataSourceLogic(): AppThunk<Promise<void>>;
|
|
130
|
-
|
|
131
|
-
declare const actions_addBlockToState: typeof addBlockToState;
|
|
132
|
-
declare const actions_addRunConsumersRunning: typeof addRunConsumersRunning;
|
|
133
|
-
declare const actions_cloneEntity: typeof cloneEntity;
|
|
134
|
-
declare const actions_createEntity: typeof createEntity;
|
|
135
|
-
declare const actions_deleteEntity: typeof deleteEntity;
|
|
136
|
-
declare const actions_deleteQueryParam: typeof deleteQueryParam;
|
|
137
|
-
declare const actions_readEntity: typeof readEntity;
|
|
138
|
-
declare const actions_readEnvSecrets: typeof readEnvSecrets;
|
|
139
|
-
declare const actions_readMember: typeof readMember;
|
|
140
|
-
declare const actions_readMetadata: typeof readMetadata;
|
|
141
|
-
declare const actions_readPrivateBlocks: typeof readPrivateBlocks;
|
|
142
|
-
declare const actions_readUser: typeof readUser;
|
|
143
|
-
declare const actions_recalculateVariables: typeof recalculateVariables;
|
|
144
|
-
declare const actions_removeBlocksFromState: typeof removeBlocksFromState;
|
|
145
|
-
declare const actions_removeDataSourceLogic: typeof removeDataSourceLogic;
|
|
146
|
-
declare const actions_removeRunConsumersRunning: typeof removeRunConsumersRunning;
|
|
147
|
-
declare const actions_reportSearch: typeof reportSearch;
|
|
148
|
-
declare const actions_resetSectionState: typeof resetSectionState;
|
|
149
|
-
declare const actions_revalidateReport: typeof revalidateReport;
|
|
150
|
-
declare const actions_revalidateUrl: typeof revalidateUrl;
|
|
151
|
-
declare const actions_searchMember: typeof searchMember;
|
|
152
|
-
declare const actions_searchRegenerate: typeof searchRegenerate;
|
|
153
|
-
declare const actions_searchRole: typeof searchRole;
|
|
154
|
-
declare const actions_searchUser: typeof searchUser;
|
|
155
|
-
declare const actions_setCurrentLocale: typeof setCurrentLocale;
|
|
156
|
-
declare const actions_setPreferredLocale: typeof setPreferredLocale;
|
|
157
|
-
declare const actions_setPreviews: typeof setPreviews;
|
|
158
|
-
declare const actions_setQueryParam: typeof setQueryParam;
|
|
159
|
-
declare const actions_setSectionState: typeof setSectionState;
|
|
160
|
-
declare const actions_setStatus: typeof setStatus;
|
|
161
|
-
declare const actions_updateEntity: typeof updateEntity;
|
|
162
|
-
declare const actions_updateMyData: typeof updateMyData;
|
|
163
|
-
declare const actions_updateUser: typeof updateUser;
|
|
164
|
-
declare const actions_urlProxy: typeof urlProxy;
|
|
165
|
-
declare const actions_variantValidateSlug: typeof variantValidateSlug;
|
|
166
|
-
declare namespace actions {
|
|
167
|
-
export { actions_addBlockToState as addBlockToState, actions_addRunConsumersRunning as addRunConsumersRunning, actions_cloneEntity as cloneEntity, actions_createEntity as createEntity, actions_deleteEntity as deleteEntity, actions_deleteQueryParam as deleteQueryParam, actions_readEntity as readEntity, actions_readEnvSecrets as readEnvSecrets, actions_readMember as readMember, actions_readMetadata as readMetadata, actions_readPrivateBlocks as readPrivateBlocks, actions_readUser as readUser, actions_recalculateVariables as recalculateVariables, actions_removeBlocksFromState as removeBlocksFromState, actions_removeDataSourceLogic as removeDataSourceLogic, actions_removeRunConsumersRunning as removeRunConsumersRunning, actions_reportSearch as reportSearch, actions_resetSectionState as resetSectionState, actions_revalidateReport as revalidateReport, actions_revalidateUrl as revalidateUrl, actions_searchMember as searchMember, actions_searchRegenerate as searchRegenerate, actions_searchRole as searchRole, actions_searchUser as searchUser, actions_setCurrentLocale as setCurrentLocale, actions_setPreferredLocale as setPreferredLocale, actions_setPreviews as setPreviews, actions_setQueryParam as setQueryParam, actions_setSectionState as setSectionState, actions_setStatus as setStatus, actions_updateEntity as updateEntity, actions_updateMyData as updateMyData, actions_updateUser as updateUser, actions_urlProxy as urlProxy, actions_variantValidateSlug as variantValidateSlug };
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
declare const useAppDispatch: () => AppDispatch;
|
|
171
|
-
declare const useAppSelector: TypedUseSelectorHook<AppState>;
|
|
172
|
-
|
|
173
|
-
declare const withBespokeStore: (Component: any) => (props: any) => react_jsx_runtime.JSX.Element;
|
|
174
|
-
|
|
175
|
-
export { AppDispatch, AppState, actions, useAppDispatch as useBespokeDispatch, useAppSelector as useBespokeSelector, withBespokeStore };
|
package/dist/report.d.mts
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as ExploreTranslations, a as ReportItemProps, R as ReportTileProps } from './Search-BWmRyIa9.mjs';
|
|
3
|
-
import './auth-BwgF4GT9.mjs';
|
|
4
|
-
import { MRT_Localization } from 'mantine-react-table';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
|
-
import { ModalProps, AutocompleteProps } from '@mantine/core';
|
|
7
|
-
export { u as SearchReportItem } from './types-BcIo0oyw.mjs';
|
|
8
|
-
import 'next-auth';
|
|
9
|
-
import 'next-auth/react';
|
|
10
|
-
import 'sequelize';
|
|
11
|
-
|
|
12
|
-
type TranslationKeys$3 = "data_source" | "no_data_src" | "viz_source" | "error_generating" | "choose_data_src" | "original_src" | "loading" | "error_preview" | "open_in_window" | "formatted_src" | "formatted_group" | "raw_group" | "rows_preview" | "choose_format" | "processing_file" | "download" | "preview" | "copy" | "copied";
|
|
13
|
-
type DataTabTranslations = Record<TranslationKeys$3, string>;
|
|
14
|
-
|
|
15
|
-
type TranslationKeys$2 = "wrong_node" | "choose_area" | "choose_viz" | "choose_format" | "transparent_bg" | "processing" | "download" | "entire_section" | "source" | "viz_only";
|
|
16
|
-
type ImageTabTranslations = Record<TranslationKeys$2, string>;
|
|
17
|
-
|
|
18
|
-
type TranslationKeys$1 = "title" | "include_section";
|
|
19
|
-
type ShareTabTraslations = Record<TranslationKeys$1, string>;
|
|
20
|
-
|
|
21
|
-
interface OptionsModalTranslations {
|
|
22
|
-
download_title: string;
|
|
23
|
-
image_title: string;
|
|
24
|
-
share_title: string;
|
|
25
|
-
download_tab?: Partial<DataTabTranslations>;
|
|
26
|
-
image_tab?: Partial<ImageTabTranslations>;
|
|
27
|
-
share_tab?: Partial<ShareTabTraslations>;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
type TranslationKeys = "image_by";
|
|
31
|
-
type SectionTranslations = Record<TranslationKeys, string>;
|
|
32
|
-
|
|
33
|
-
type OutlineNode = {
|
|
34
|
-
id: number;
|
|
35
|
-
order: number;
|
|
36
|
-
label: string;
|
|
37
|
-
iconProps: {
|
|
38
|
-
iconType: string;
|
|
39
|
-
icon: string;
|
|
40
|
-
iconSize: string;
|
|
41
|
-
iconVariant: string;
|
|
42
|
-
iconRadius: string;
|
|
43
|
-
};
|
|
44
|
-
properties: {
|
|
45
|
-
sectionId?: number;
|
|
46
|
-
titleType?: "primary" | "secondary";
|
|
47
|
-
[key: string]: any;
|
|
48
|
-
};
|
|
49
|
-
children: OutlineNode[];
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
interface DownloadOptionsTranslations {
|
|
53
|
-
export: string;
|
|
54
|
-
pdf: {
|
|
55
|
-
label: string;
|
|
56
|
-
desc: string;
|
|
57
|
-
cancel: string;
|
|
58
|
-
export: string;
|
|
59
|
-
generating: string;
|
|
60
|
-
selectAll: string;
|
|
61
|
-
deselectAll: string;
|
|
62
|
-
selectSectionsDescription: string;
|
|
63
|
-
sectionsSelected: string;
|
|
64
|
-
};
|
|
65
|
-
xlsx: {
|
|
66
|
-
label: string;
|
|
67
|
-
desc: string;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
interface PdfSectionSelectorPanelProps {
|
|
71
|
-
translations: DownloadOptionsTranslations;
|
|
72
|
-
content: OutlineNode[];
|
|
73
|
-
selection: {
|
|
74
|
-
topLevelState: {
|
|
75
|
-
isChecked: boolean;
|
|
76
|
-
isIndeterminate: boolean;
|
|
77
|
-
};
|
|
78
|
-
getSelectionState: (node: OutlineNode) => {
|
|
79
|
-
isChecked: boolean;
|
|
80
|
-
isIndeterminate: boolean;
|
|
81
|
-
};
|
|
82
|
-
selectedSections: Set<number>;
|
|
83
|
-
};
|
|
84
|
-
download: {
|
|
85
|
-
isDownloading: boolean;
|
|
86
|
-
handleDownload: () => void;
|
|
87
|
-
};
|
|
88
|
-
callbacks: {
|
|
89
|
-
handleToggleSection: (id: number, isSelected: boolean) => void;
|
|
90
|
-
handleTopLevelToggle: (checked: boolean) => void;
|
|
91
|
-
handleSelectAll: () => void;
|
|
92
|
-
handleDeselectAll: () => void;
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
interface ReportTranslations {
|
|
97
|
-
"options"?: Partial<OptionsModalTranslations>;
|
|
98
|
-
"explore"?: Partial<ExploreTranslations>;
|
|
99
|
-
"sections"?: Partial<SectionTranslations>;
|
|
100
|
-
"export"?: Partial<DownloadOptionsTranslations>;
|
|
101
|
-
"table"?: Partial<MRT_Localization>;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
interface BespokeComponentsType {
|
|
105
|
-
SearchResultItem?: React.ComponentType<ReportItemProps>;
|
|
106
|
-
ExploreCard?: React.FC<ReportTileProps>;
|
|
107
|
-
FallbackComponent?: React.FC<{
|
|
108
|
-
block: any;
|
|
109
|
-
}>;
|
|
110
|
-
PdfSectionPanel?: (state: PdfSectionSelectorPanelProps) => React.ReactElement;
|
|
111
|
-
SearchModalProps?: Partial<ModalProps>;
|
|
112
|
-
SearchFieldProps?: Partial<AutocompleteProps>;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
interface BespokeRendererProps {
|
|
116
|
-
className?: string;
|
|
117
|
-
pathSegmentsKey: string;
|
|
118
|
-
translations?: ReportTranslations;
|
|
119
|
-
buildTime: string;
|
|
120
|
-
components?: Partial<BespokeComponentsType>;
|
|
121
|
-
profilePrefix: string;
|
|
122
|
-
siteProps: Record<string, any>;
|
|
123
|
-
loader?: ReactNode;
|
|
124
|
-
sectionLoader?: ReactNode;
|
|
125
|
-
mode?: "embed";
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* React component for rendering a report
|
|
129
|
-
*/
|
|
130
|
-
declare function BespokeRenderer({ className, pathSegmentsKey, translations, components, buildTime, siteProps, profilePrefix, loader, sectionLoader, mode, }: BespokeRendererProps): react_jsx_runtime.JSX.Element;
|
|
131
|
-
|
|
132
|
-
export { type BespokeComponentsType, BespokeRenderer, type BespokeRendererProps, type ReportTranslations as BespokeReportTranslations, type PdfSectionSelectorPanelProps, ReportItemProps, ReportTileProps };
|
package/dist/server.d.mts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { Session, NextAuthOptions, AuthOptions } from 'next-auth';
|
|
2
|
-
import * as next from 'next';
|
|
3
|
-
import { NextApiRequest, NextApiResponse, NextApiHandler, GetServerSidePropsContext, GetStaticPathsResult, GetStaticPaths, GetStaticProps, GetServerSideProps } from 'next';
|
|
4
|
-
import { e as BespokeAuthOptions } from './auth-BwgF4GT9.mjs';
|
|
5
|
-
import { h as AppStore } from './store-De3Xknzr.mjs';
|
|
6
|
-
export { i as dbApiFactory, u as useDatabaseApi } from './store-De3Xknzr.mjs';
|
|
7
|
-
import * as querystring from 'querystring';
|
|
8
|
-
export { v as ReportsDB } from './types-BcIo0oyw.mjs';
|
|
9
|
-
import 'next-auth/react';
|
|
10
|
-
import 'next/app';
|
|
11
|
-
import 'next-redux-wrapper';
|
|
12
|
-
import '@reduxjs/toolkit';
|
|
13
|
-
import 'sequelize';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Returns the instance connection to the DB.
|
|
17
|
-
* This connection is shared through all items in the running server.
|
|
18
|
-
* The function must run synchronously, so async startup operations are set to
|
|
19
|
-
* run without `await`ing or monitoring the result.
|
|
20
|
-
*/
|
|
21
|
-
declare const getDB: () => Promise<any>;
|
|
22
|
-
|
|
23
|
-
type BespokeSession = Session & {
|
|
24
|
-
source: string;
|
|
25
|
-
};
|
|
26
|
-
declare function getBespokeServerSession(req: NextApiRequest, res: NextApiResponse, authOptions?: BespokeAuthOptions): Promise<BespokeSession>;
|
|
27
|
-
|
|
28
|
-
declare const handleAuth: (authOptions?: {
|
|
29
|
-
providers: any[];
|
|
30
|
-
}) => any;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @param req Next req
|
|
35
|
-
* @param res Next res
|
|
36
|
-
* @param settings
|
|
37
|
-
* @returns
|
|
38
|
-
*/
|
|
39
|
-
declare const updateCurrentUserAppMetadata: (req: NextApiRequest, res: NextApiResponse, authOptions: BespokeAuthOptions, newMetadata: {
|
|
40
|
-
[key: string]: string;
|
|
41
|
-
}) => Promise<{
|
|
42
|
-
[key: string]: string;
|
|
43
|
-
}>;
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @param req Next req
|
|
48
|
-
* @param res Next res
|
|
49
|
-
* @param settings
|
|
50
|
-
* @returns
|
|
51
|
-
*/
|
|
52
|
-
declare const updateCurrentUserMetadata: (req: NextApiRequest, res: NextApiResponse, authOptions: BespokeAuthOptions, newMetadata: {
|
|
53
|
-
[key: string]: string;
|
|
54
|
-
}) => Promise<{
|
|
55
|
-
[key: string]: string;
|
|
56
|
-
}>;
|
|
57
|
-
|
|
58
|
-
declare const withApiRoleAuthRequired: (apiRoute: NextApiHandler, allowedRoles: string[], authOptions: NextAuthOptions) => NextApiHandler<any>;
|
|
59
|
-
|
|
60
|
-
declare const searchUsersByMetadata: (authOptions: BespokeAuthOptions, key: string, value: string) => Promise<any>;
|
|
61
|
-
|
|
62
|
-
declare function endpointKey(method: string, path: string): string;
|
|
63
|
-
declare function endpointNextJsHandlerFactory(authOptions: NextAuthOptions): (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
|
|
64
|
-
|
|
65
|
-
declare const reportsCrosswalkEntrypointFn: (crosswalk: any) => (_req: NextApiRequest, res: NextApiResponse) => Promise<void>;
|
|
66
|
-
|
|
67
|
-
declare function BespokeManagerServerSideProps(options?: {
|
|
68
|
-
preResolve?: (store: AppStore, ctx: GetServerSidePropsContext) => Promise<any>;
|
|
69
|
-
postResolve?: (store: AppStore, ctx: GetServerSidePropsContext) => Promise<any>;
|
|
70
|
-
/**
|
|
71
|
-
* The variable name set in the current filename for Dynamic Routes.
|
|
72
|
-
* @see {@link https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes}
|
|
73
|
-
*/
|
|
74
|
-
pathSegmentsKey?: string;
|
|
75
|
-
authOptions: AuthOptions;
|
|
76
|
-
}): next.GetServerSideProps<any, querystring.ParsedUrlQuery, next.PreviewData>;
|
|
77
|
-
|
|
78
|
-
declare function BespokeRendererStaticPaths(options?: {
|
|
79
|
-
/**
|
|
80
|
-
* Enable nextjs getStaticPaths fallback.
|
|
81
|
-
* Setting this to `false` will disable any other page not found at compile time.
|
|
82
|
-
* @see {@link https://nextjs.org/docs/api-reference/data-fetching/get-static-paths#fallback-false}
|
|
83
|
-
* @default true
|
|
84
|
-
*/
|
|
85
|
-
fallback?: GetStaticPathsResult["fallback"];
|
|
86
|
-
/**
|
|
87
|
-
* The max amount of high ranking pages to pre-render PER Variant
|
|
88
|
-
* @default 50
|
|
89
|
-
*/
|
|
90
|
-
limit?: number;
|
|
91
|
-
}): GetStaticPaths;
|
|
92
|
-
declare function BespokeRendererStaticProps(options?: {
|
|
93
|
-
/**
|
|
94
|
-
* The variable name set in the current filename for Dynamic Routes.
|
|
95
|
-
* @see {@link https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes}
|
|
96
|
-
*/
|
|
97
|
-
pathSegmentsKey?: string;
|
|
98
|
-
}): GetStaticProps;
|
|
99
|
-
|
|
100
|
-
declare function BespokeEmbedServerSideProps(options?: {
|
|
101
|
-
/**
|
|
102
|
-
* The variable name set in the current filename for Dynamic Routes.
|
|
103
|
-
* @see {@link https://nextjs.org/docs/routing/dynamic-routes#catch-all-routes}
|
|
104
|
-
*/
|
|
105
|
-
pathSegmentsKey?: string;
|
|
106
|
-
}): GetServerSideProps;
|
|
107
|
-
|
|
108
|
-
export { BespokeEmbedServerSideProps, endpointNextJsHandlerFactory as BespokeEndpointNextJsHandlerFactory, getBespokeServerSession as BespokeGetSession, handleAuth as BespokeHandleAuth, BespokeManagerServerSideProps, BespokeRendererStaticPaths, BespokeRendererStaticProps, searchUsersByMetadata as BespokeSearchUsersByMetadata, updateCurrentUserAppMetadata as BespokeUpdateCurrentUserAppMetadata, updateCurrentUserMetadata as BespokeUpdateCurrentUserMetadata, withApiRoleAuthRequired as BespokeWithApiRoleAuthRequired, reportsCrosswalkEntrypointFn as ReportCrosswalkHandler, endpointKey, getDB };
|