climb-onyx-gui 0.14.3 → 0.15.0
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 +8 -7
- package/dist/api/index.d.ts +19 -19
- package/dist/climb-onyx-gui.js +17820 -17359
- package/dist/components/Buttons.d.ts +4 -1
- package/dist/components/ColumnsModal.d.ts +12 -0
- package/dist/components/DataPanel.d.ts +4 -2
- package/dist/components/Details.d.ts +7 -2
- package/dist/components/Dropdowns.d.ts +2 -2
- package/dist/components/Filter.d.ts +2 -1
- package/dist/components/FilterPanel.d.ts +1 -1
- package/dist/components/Graphs.d.ts +4 -3
- package/dist/components/Header.d.ts +8 -7
- package/dist/components/HistoryPanel.d.ts +9 -0
- package/dist/components/JsonSearch.d.ts +2 -2
- package/dist/components/PageTitle.d.ts +1 -1
- package/dist/components/QueryHandler.d.ts +10 -2
- package/dist/components/RelatedPanel.d.ts +12 -0
- package/dist/components/Resizer.d.ts +8 -0
- package/dist/components/ResultsPanel.d.ts +4 -2
- package/dist/components/Summarise.d.ts +10 -0
- package/dist/components/SummarisePanel.d.ts +9 -0
- package/dist/components/Table.d.ts +5 -5
- package/dist/interfaces.d.ts +12 -12
- package/dist/pages/Site.d.ts +2 -2
- package/dist/pages/User.d.ts +2 -2
- package/dist/style.css +1 -1
- package/dist/types.d.ts +97 -34
- package/dist/utils/functions.d.ts +3 -2
- package/dist/utils/hooks.d.ts +4 -3
- package/dist/utils/styles.d.ts +2 -17
- package/package.json +1 -1
- package/dist/components/History.d.ts +0 -9
- package/dist/components/Transforms.d.ts +0 -12
- package/dist/components/TransformsPanel.d.ts +0 -12
package/dist/types.d.ts
CHANGED
|
@@ -1,17 +1,47 @@
|
|
|
1
|
+
export declare enum Themes {
|
|
2
|
+
LIGHT = "light",
|
|
3
|
+
DARK = "dark"
|
|
4
|
+
}
|
|
5
|
+
export declare enum DarkModeColours {
|
|
6
|
+
BS_BODY_COLOR = "#dee2e6",// Bootstrap body text color for dark mode
|
|
7
|
+
BS_BODY_BG = "#121212",// Bootstrap body background color for dark mode
|
|
8
|
+
BS_GRAY_600 = "#6c757d",// Bootstrap gray-600 for dark mode
|
|
9
|
+
BS_GRAY_900 = "#212529"
|
|
10
|
+
}
|
|
11
|
+
export declare enum OnyxTabKeys {
|
|
12
|
+
USER = "user-tab",
|
|
13
|
+
SITE = "site-tab",
|
|
14
|
+
RECORDS = "records-tab",
|
|
15
|
+
ANALYSES = "analyses-tab",
|
|
16
|
+
GRAPHS = "graphs-tab"
|
|
17
|
+
}
|
|
1
18
|
export declare enum RecordTabKeys {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Analyses = "record-analyses-tab"
|
|
19
|
+
LIST = "record-list-tab",
|
|
20
|
+
DETAIL = "record-detail-tab"
|
|
5
21
|
}
|
|
6
22
|
export declare enum AnalysisTabKeys {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
23
|
+
LIST = "analysis-list-tab",
|
|
24
|
+
DETAIL = "analysis-detail-tab"
|
|
25
|
+
}
|
|
26
|
+
export declare enum RecordDetailTabKeys {
|
|
27
|
+
DATA = "record-detail-data-tab",
|
|
28
|
+
HISTORY = "record-detail-history-tab",
|
|
29
|
+
ANALYSES = "record-detail-analyses-tab"
|
|
30
|
+
}
|
|
31
|
+
export declare enum AnalysisDetailTabKeys {
|
|
32
|
+
DATA = "analysis-detail-data-tab",
|
|
33
|
+
HISTORY = "analysis-detail-history-tab",
|
|
34
|
+
RECORDS = "analysis-detail-records-tab",
|
|
35
|
+
UPSTREAM = "analysis-detail-upstream-tab",
|
|
36
|
+
DOWNSTREAM = "analysis-detail-downstream-tab"
|
|
12
37
|
}
|
|
13
38
|
export declare enum DataPanelTabKeys {
|
|
14
|
-
|
|
39
|
+
DETAILS = "data-panel-details"
|
|
40
|
+
}
|
|
41
|
+
export declare enum GraphPanelTabKeys {
|
|
42
|
+
GRAPH = "graph-panel-graph",
|
|
43
|
+
FILTERS = "graph-panel-filters",
|
|
44
|
+
DISPLAY = "graph-panel-display"
|
|
15
45
|
}
|
|
16
46
|
export declare enum ExportStatus {
|
|
17
47
|
READY = 0,
|
|
@@ -21,14 +51,52 @@ export declare enum ExportStatus {
|
|
|
21
51
|
CANCELLED = 4,
|
|
22
52
|
ERROR = 5
|
|
23
53
|
}
|
|
54
|
+
export type TabState = {
|
|
55
|
+
tabKey: OnyxTabKeys;
|
|
56
|
+
recordTabKey: RecordTabKeys;
|
|
57
|
+
recordDetailTabKey: RecordDetailTabKeys;
|
|
58
|
+
recordDataPanelTabKey: DataPanelTabKeys;
|
|
59
|
+
recordID: string;
|
|
60
|
+
analysisTabKey: AnalysisTabKeys;
|
|
61
|
+
analysisDetailTabKey: AnalysisDetailTabKeys;
|
|
62
|
+
analysisDataPanelTabKey: DataPanelTabKeys;
|
|
63
|
+
analysisID: string;
|
|
64
|
+
};
|
|
65
|
+
export type RecentlyViewed = {
|
|
66
|
+
ID: string;
|
|
67
|
+
timestamp: Date;
|
|
68
|
+
handleShowID: (id: string) => void;
|
|
69
|
+
};
|
|
24
70
|
export type FieldType = "text" | "choice" | "integer" | "decimal" | "date" | "datetime" | "bool" | "relation" | "array" | "structure" | "";
|
|
25
71
|
export type GraphType = "line" | "bar" | "pie" | "";
|
|
26
|
-
export type
|
|
72
|
+
export type Profile = {
|
|
73
|
+
username: string;
|
|
74
|
+
site: string;
|
|
75
|
+
email: string;
|
|
76
|
+
};
|
|
77
|
+
export type Project = {
|
|
78
|
+
code: string;
|
|
79
|
+
name: string;
|
|
80
|
+
};
|
|
81
|
+
export type ProjectPermissionGroup = {
|
|
82
|
+
project: string;
|
|
83
|
+
name: string;
|
|
84
|
+
scope: string;
|
|
85
|
+
actions: string[];
|
|
86
|
+
};
|
|
87
|
+
export type Field = {
|
|
27
88
|
type: FieldType;
|
|
89
|
+
code: string;
|
|
28
90
|
description: string;
|
|
29
91
|
actions: string[];
|
|
30
92
|
values?: string[];
|
|
31
|
-
fields?: Record<string,
|
|
93
|
+
fields?: Record<string, Field>;
|
|
94
|
+
};
|
|
95
|
+
export type Fields = {
|
|
96
|
+
name: string;
|
|
97
|
+
description: string;
|
|
98
|
+
fields: Record<string, Field>;
|
|
99
|
+
default_fields?: string[];
|
|
32
100
|
};
|
|
33
101
|
export type FilterConfig = {
|
|
34
102
|
key: string;
|
|
@@ -50,7 +118,7 @@ export type TypeObject = {
|
|
|
50
118
|
type: FieldType;
|
|
51
119
|
lookups: string[];
|
|
52
120
|
};
|
|
53
|
-
export type
|
|
121
|
+
export type Lookup = {
|
|
54
122
|
lookup: string;
|
|
55
123
|
description: string;
|
|
56
124
|
};
|
|
@@ -58,42 +126,37 @@ export type ChoiceDescription = {
|
|
|
58
126
|
description: string;
|
|
59
127
|
is_active: boolean;
|
|
60
128
|
};
|
|
61
|
-
export type
|
|
129
|
+
export type Choices = Record<string, ChoiceDescription>;
|
|
130
|
+
export type SelectOption = {
|
|
62
131
|
label: string;
|
|
63
132
|
value: string;
|
|
64
133
|
};
|
|
65
|
-
export type ErrorType = Record<string, string | string[]>;
|
|
66
134
|
export type RecordType = Record<string, string | number | boolean | object | null | RecordType[]>;
|
|
67
|
-
export type
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
135
|
+
export type HistoricalEntry = {
|
|
136
|
+
username?: string;
|
|
137
|
+
timestamp: string;
|
|
138
|
+
action: "add" | "change" | "delete";
|
|
139
|
+
changes: RecordType[];
|
|
140
|
+
};
|
|
141
|
+
export type HistoricalEntries = {
|
|
142
|
+
history: HistoricalEntry[];
|
|
72
143
|
};
|
|
144
|
+
export type Summary = Record<"count", number> & Record<string, string | number | boolean | object | null>;
|
|
145
|
+
export type ErrorMessages = Record<string, string | string[]>;
|
|
73
146
|
export interface ErrorResponse {
|
|
74
147
|
status: "fail" | "error";
|
|
75
148
|
code: number;
|
|
76
|
-
messages:
|
|
149
|
+
messages: ErrorMessages;
|
|
77
150
|
}
|
|
78
151
|
export interface SuccessResponse {
|
|
79
152
|
status: "success";
|
|
80
153
|
code: number;
|
|
81
154
|
}
|
|
82
|
-
export interface ListResponse extends SuccessResponse {
|
|
83
|
-
data:
|
|
155
|
+
export interface ListResponse<T> extends SuccessResponse {
|
|
156
|
+
data: T[];
|
|
84
157
|
next: string | null;
|
|
85
158
|
previous: string | null;
|
|
86
159
|
}
|
|
87
|
-
export interface DetailResponse extends SuccessResponse {
|
|
88
|
-
data:
|
|
89
|
-
}
|
|
90
|
-
export interface FieldsResponse extends SuccessResponse {
|
|
91
|
-
data: {
|
|
92
|
-
name: string;
|
|
93
|
-
description: string;
|
|
94
|
-
fields: Record<string, ProjectField>;
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
export interface ChoicesResponse extends SuccessResponse {
|
|
98
|
-
data: Record<string, ChoiceDescription>;
|
|
160
|
+
export interface DetailResponse<T> extends SuccessResponse {
|
|
161
|
+
data: T;
|
|
99
162
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ExportHandlerProps, OnyxProps } from '../interfaces';
|
|
2
|
-
import { DetailResponse, ErrorResponse, FilterConfig } from '../types';
|
|
2
|
+
import { RecordType, DetailResponse, ErrorResponse, FilterConfig } from '../types';
|
|
3
3
|
|
|
4
4
|
/** Returns a random hexadecimal string. */
|
|
5
5
|
declare function generateKey(): string;
|
|
6
6
|
/** Generate a default file name prefix based on the project code and search parameters. */
|
|
7
7
|
declare function getDefaultFileNamePrefix(project: string, searchParameters: string): string;
|
|
8
8
|
interface DetailResponseProps extends OnyxProps {
|
|
9
|
-
response: DetailResponse | ErrorResponse | undefined;
|
|
9
|
+
response: DetailResponse<RecordType> | ErrorResponse | undefined;
|
|
10
10
|
}
|
|
11
11
|
/** Handler for converting JSON data to a string for file export. */
|
|
12
12
|
declare function handleJSONExport(props: DetailResponseProps): (exportProps: ExportHandlerProps) => void;
|
|
@@ -14,4 +14,5 @@ declare function handleJSONExport(props: DetailResponseProps): (exportProps: Exp
|
|
|
14
14
|
declare function formatFilters(filters: FilterConfig[]): string[][];
|
|
15
15
|
/** Takes a Response object and returns its status code, formatted as a string. */
|
|
16
16
|
declare function formatResponseStatus(response: Response): string;
|
|
17
|
+
export declare function formatTimeAgo(timestamp: Date): string;
|
|
17
18
|
export { formatFilters, formatResponseStatus, generateKey, getDefaultFileNamePrefix, handleJSONExport, };
|
package/dist/utils/hooks.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
declare const useDebouncedValue: (inputValue: string, delay: number) => string;
|
|
2
|
-
declare const
|
|
3
|
-
export
|
|
1
|
+
export declare const useDebouncedValue: (inputValue: string, delay: number) => string;
|
|
2
|
+
export declare const useDelayedValue: (delay?: number) => boolean;
|
|
3
|
+
export declare const useCyclicValue: (start: number, end: number, pause?: number) => number;
|
|
4
|
+
export declare const useQueryRefresh: (refresh: number | null, dataUpdatedAt: number, errorUpdatedAt: number, refetch: () => void, setLastUpdated: (lastUpdated: string | null) => void) => void;
|
package/dist/utils/styles.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { StylesConfig } from 'react-select';
|
|
2
|
+
import { Template } from 'plotly.js-basic-dist';
|
|
2
3
|
|
|
3
4
|
declare const selectStyles: StylesConfig;
|
|
4
|
-
declare const graphStyles:
|
|
5
|
-
layout: {
|
|
6
|
-
font: {
|
|
7
|
-
color: string;
|
|
8
|
-
};
|
|
9
|
-
paper_bgcolor: string;
|
|
10
|
-
plot_bgcolor: string;
|
|
11
|
-
xaxis: {
|
|
12
|
-
gridcolor: string;
|
|
13
|
-
zerolinecolor: string;
|
|
14
|
-
};
|
|
15
|
-
yaxis: {
|
|
16
|
-
gridcolor: string;
|
|
17
|
-
zerolinecolor: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
};
|
|
5
|
+
declare const graphStyles: Template;
|
|
21
6
|
export { graphStyles, selectStyles };
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DataProps } from '../interfaces';
|
|
2
|
-
|
|
3
|
-
interface TransformsProps extends DataProps {
|
|
4
|
-
transform: string;
|
|
5
|
-
transformList: string[];
|
|
6
|
-
setTransformList: (value: string[]) => void;
|
|
7
|
-
filterFieldOptions: string[];
|
|
8
|
-
listFieldOptions: string[];
|
|
9
|
-
setEditMode: (value: boolean) => void;
|
|
10
|
-
}
|
|
11
|
-
declare function Transforms(props: TransformsProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default Transforms;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DataProps } from '../interfaces';
|
|
2
|
-
|
|
3
|
-
interface TransformsPanelProps extends DataProps {
|
|
4
|
-
transform: string;
|
|
5
|
-
setTransform: (value: string) => void;
|
|
6
|
-
transformList: string[];
|
|
7
|
-
setTransformList: (value: string[]) => void;
|
|
8
|
-
filterFieldOptions: string[];
|
|
9
|
-
listFieldOptions: string[];
|
|
10
|
-
}
|
|
11
|
-
declare function TransformsPanel(props: TransformsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default TransformsPanel;
|