climb-onyx-gui 0.13.0 → 0.14.0-dev
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/api/hooks.d.ts +11 -0
- package/dist/api/index.d.ts +69 -0
- package/dist/climb-onyx-gui.js +71224 -69355
- package/dist/components/Badges.d.ts +2 -0
- package/dist/components/Buttons.d.ts +9 -0
- package/dist/components/CellRenderers.d.ts +21 -0
- package/dist/components/DataField.d.ts +9 -0
- package/dist/components/Dropdowns.d.ts +2 -4
- package/dist/components/ExportModal.d.ts +2 -1
- package/dist/components/FieldsModal.d.ts +0 -0
- package/dist/components/Filter.d.ts +4 -3
- package/dist/components/FilterPanel.d.ts +4 -3
- package/dist/components/Graphs.d.ts +8 -6
- package/dist/components/Header.d.ts +7 -3
- package/dist/components/History.d.ts +9 -0
- package/dist/components/Inputs.d.ts +7 -1
- package/dist/components/Json.d.ts +8 -0
- package/dist/components/ObjectDetails.d.ts +9 -0
- package/dist/components/PageTitle.d.ts +6 -0
- package/dist/components/QueryHandler.d.ts +4 -3
- package/dist/components/ResultsPanel.d.ts +8 -7
- package/dist/components/SearchBar.d.ts +2 -3
- package/dist/components/Table.d.ts +14 -5
- package/dist/interfaces.d.ts +13 -7
- package/dist/pages/Analysis.d.ts +8 -0
- package/dist/pages/Graphs.d.ts +4 -0
- package/dist/pages/ProjectRecord.d.ts +8 -0
- package/dist/pages/Results.d.ts +4 -0
- package/dist/pages/Site.d.ts +4 -0
- package/dist/pages/User.d.ts +4 -0
- package/dist/style.css +2 -2
- package/dist/types.d.ts +64 -23
- package/dist/utils/functions.d.ts +15 -0
- package/dist/utils/hooks.d.ts +3 -0
- package/dist/utils/messages.d.ts +3 -0
- package/dist/utils/{graphStyles.d.ts → styles.d.ts} +4 -1
- package/package.json +4 -1
- package/dist/components/RecordModal.d.ts +0 -9
- package/dist/pages/Data.d.ts +0 -4
- package/dist/pages/Stats.d.ts +0 -4
- package/dist/utils/errorMessages.d.ts +0 -1
- package/dist/utils/generateKey.d.ts +0 -2
- package/dist/utils/selectStyles.d.ts +0 -4
package/dist/types.d.ts
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
|
+
type FieldType = "text" | "choice" | "integer" | "decimal" | "date" | "datetime" | "bool" | "relation" | "array" | "structure" | "";
|
|
2
|
+
type GraphType = "line" | "bar" | "pie" | "";
|
|
1
3
|
type ProjectField = {
|
|
2
|
-
type:
|
|
4
|
+
type: FieldType;
|
|
3
5
|
description: string;
|
|
4
6
|
actions: string[];
|
|
5
7
|
values?: string[];
|
|
6
8
|
fields?: Record<string, ProjectField>;
|
|
7
9
|
};
|
|
8
|
-
type
|
|
10
|
+
type FilterConfig = {
|
|
9
11
|
key: string;
|
|
12
|
+
type: FieldType;
|
|
10
13
|
field: string;
|
|
11
14
|
lookup: string;
|
|
12
15
|
value: string;
|
|
13
16
|
};
|
|
14
|
-
type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
code: number;
|
|
23
|
-
next?: string;
|
|
24
|
-
previous?: string;
|
|
25
|
-
data?: ResultType[];
|
|
26
|
-
messages?: ErrorType;
|
|
17
|
+
type GraphConfig = {
|
|
18
|
+
key: string;
|
|
19
|
+
type: GraphType;
|
|
20
|
+
field: string;
|
|
21
|
+
groupBy: string;
|
|
22
|
+
groupMode: string;
|
|
23
|
+
filters: FilterConfig[];
|
|
24
|
+
yAxisType: string;
|
|
27
25
|
};
|
|
28
26
|
declare enum ExportStatus {
|
|
29
27
|
READY = 0,
|
|
@@ -33,13 +31,56 @@ declare enum ExportStatus {
|
|
|
33
31
|
CANCELLED = 4,
|
|
34
32
|
ERROR = 5
|
|
35
33
|
}
|
|
36
|
-
type
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
34
|
+
type TypeObject = {
|
|
35
|
+
type: FieldType;
|
|
36
|
+
lookups: string[];
|
|
37
|
+
};
|
|
38
|
+
type LookupObject = {
|
|
39
|
+
lookup: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
type ChoiceDescription = {
|
|
43
|
+
description: string;
|
|
44
|
+
is_active: boolean;
|
|
45
|
+
};
|
|
46
|
+
type OptionType = {
|
|
47
|
+
label: string;
|
|
48
|
+
value: string;
|
|
49
|
+
};
|
|
50
|
+
type ErrorType = Record<string, string | string[]>;
|
|
51
|
+
type RecordType = Record<string, string | number | boolean | object | null | RecordType[]>;
|
|
52
|
+
type SummaryType = Record<"count", number> & Record<string, string | number | boolean | object | null>;
|
|
53
|
+
type ProjectPermissionType = {
|
|
54
|
+
project: string;
|
|
55
|
+
scope: string;
|
|
56
|
+
actions: string[];
|
|
57
|
+
};
|
|
58
|
+
type ErrorResponse = {
|
|
59
|
+
status: "fail" | "error";
|
|
60
|
+
code: number;
|
|
61
|
+
messages: ErrorType;
|
|
62
|
+
};
|
|
63
|
+
type SuccessResponse = {
|
|
64
|
+
status: "success";
|
|
65
|
+
code: number;
|
|
66
|
+
};
|
|
67
|
+
type RecordListResponse = SuccessResponse & {
|
|
68
|
+
data: RecordType[];
|
|
69
|
+
next: string | null;
|
|
70
|
+
previous: string | null;
|
|
71
|
+
};
|
|
72
|
+
type RecordDetailResponse = SuccessResponse & {
|
|
73
|
+
data: RecordType;
|
|
74
|
+
};
|
|
75
|
+
type FieldsResponse = SuccessResponse & {
|
|
76
|
+
data: {
|
|
77
|
+
name: string;
|
|
78
|
+
description: string;
|
|
79
|
+
fields: Record<string, ProjectField>;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
type ChoicesResponse = SuccessResponse & {
|
|
83
|
+
data: Record<string, ChoiceDescription>;
|
|
43
84
|
};
|
|
44
|
-
export type { ProjectField,
|
|
85
|
+
export type { FieldType, GraphType, ProjectField, FilterConfig, GraphConfig, TypeObject, LookupObject, ChoiceDescription, OptionType, ErrorType, RecordType, SummaryType, ProjectPermissionType, ErrorResponse, SuccessResponse, RecordListResponse, RecordDetailResponse, FieldsResponse, ChoicesResponse, };
|
|
45
86
|
export { ExportStatus };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RecordDetailResponse, ErrorResponse, FilterConfig } from '../types';
|
|
2
|
+
import { OnyxProps, ExportHandlerProps } from '../interfaces';
|
|
3
|
+
|
|
4
|
+
/** Returns a random hexadecimal string. */
|
|
5
|
+
declare function generateKey(): string;
|
|
6
|
+
/** Generate a default file name prefix based on the project code and search parameters. */
|
|
7
|
+
declare function getDefaultFileNamePrefix(project: string, searchParameters: string): string;
|
|
8
|
+
interface RecordDetailResponseProps extends OnyxProps {
|
|
9
|
+
response: RecordDetailResponse | ErrorResponse;
|
|
10
|
+
}
|
|
11
|
+
/** Handler for converting JSON data to a string for file export. */
|
|
12
|
+
declare function handleJSONExport(props: RecordDetailResponseProps): (exportProps: ExportHandlerProps) => void;
|
|
13
|
+
/** Takes an array of FilterConfig objects and formats into an array of field (+lookup), value pairs. */
|
|
14
|
+
declare function formatFilters(filters: FilterConfig[]): string[][];
|
|
15
|
+
export { generateKey, getDefaultFileNamePrefix, handleJSONExport, formatFilters, };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const useDebouncedValue: (inputValue: string, delay: number) => string;
|
|
2
|
+
declare const useQueryRefresh: (refresh: number, dataUpdatedAt: number, errorUpdatedAt: number, refetch: () => void, setLastUpdated: (lastUpdated: string | null) => void) => void;
|
|
3
|
+
export { useDebouncedValue, useQueryRefresh };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const s3BucketsMessage = "If you haven't already, please make sure you have clicked the 'Get Started With S3 Buckets' button under the 'S3 Buckets' tab on BRYN.";
|
|
2
|
+
export declare const recentActivityMessage = "Your 50 most recent API requests will be listed here. If you see anything suspicious, please contact CLIMB-TRE support immediately.";
|
|
3
|
+
export declare const errorModalMessage = "Please try again or contact CLIMB-TRE support if the problem persists.";
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { StylesConfig } from 'react-select';
|
|
2
|
+
|
|
3
|
+
declare const selectStyles: StylesConfig;
|
|
1
4
|
declare const graphStyles: {
|
|
2
5
|
layout: {
|
|
3
6
|
font: {
|
|
@@ -15,4 +18,4 @@ declare const graphStyles: {
|
|
|
15
18
|
};
|
|
16
19
|
};
|
|
17
20
|
};
|
|
18
|
-
export
|
|
21
|
+
export { selectStyles, graphStyles };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "climb-onyx-gui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0-dev",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/climb-onyx-gui.js",
|
|
6
6
|
"types": "dist/main.d.ts",
|
|
@@ -23,8 +23,11 @@
|
|
|
23
23
|
"@ag-grid-community/csv-export": "^32.2.0",
|
|
24
24
|
"@ag-grid-community/react": "^32.2.0",
|
|
25
25
|
"@ag-grid-community/styles": "^32.2.0",
|
|
26
|
+
"@fontsource/ibm-plex-sans": "^5.1.1",
|
|
26
27
|
"@tanstack/react-query": "^4.36.1",
|
|
27
28
|
"export-to-csv": "^1.3.0",
|
|
29
|
+
"http-status-codes": "^2.3.0",
|
|
30
|
+
"json-edit-react": "^1.22.6",
|
|
28
31
|
"plotly.js-basic-dist": "^2.33.0",
|
|
29
32
|
"react-bootstrap": "^2.10.2",
|
|
30
33
|
"react-icons": "^5.3.0",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { DataProps } from '../interfaces';
|
|
2
|
-
|
|
3
|
-
interface RecordModalProps extends DataProps {
|
|
4
|
-
recordID: string;
|
|
5
|
-
show: boolean;
|
|
6
|
-
onHide: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare function RecordModal(props: RecordModalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default RecordModal;
|
package/dist/pages/Data.d.ts
DELETED
package/dist/pages/Stats.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const s3BucketsMessage = "If you haven't already, please make sure you have clicked the 'Get Started With S3 Buckets' button under the 'S3 Buckets' tab on BRYN.";
|