climb-onyx-gui 0.14.0-dev → 0.14.0-dev.10

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/types.d.ts CHANGED
@@ -1,20 +1,43 @@
1
- type FieldType = "text" | "choice" | "integer" | "decimal" | "date" | "datetime" | "bool" | "relation" | "array" | "structure" | "";
2
- type GraphType = "line" | "bar" | "pie" | "";
3
- type ProjectField = {
1
+ export declare enum RecordTabKeys {
2
+ Data = "record-data-tab",
3
+ History = "record-history-tab",
4
+ Analyses = "record-analyses-tab"
5
+ }
6
+ export declare enum AnalysisTabKeys {
7
+ Data = "analysis-data-tab",
8
+ History = "analysis-history-tab",
9
+ Records = "analysis-records-tab",
10
+ Upstream = "analysis-upstream-tab",
11
+ Downstream = "analysis-downstream-tab"
12
+ }
13
+ export declare enum DataPanelTabKeys {
14
+ Details = "data-panel-details"
15
+ }
16
+ export declare enum ExportStatus {
17
+ READY = 0,
18
+ RUNNING = 1,
19
+ WRITING = 2,
20
+ FINISHED = 3,
21
+ CANCELLED = 4,
22
+ ERROR = 5
23
+ }
24
+ export type FieldType = "text" | "choice" | "integer" | "decimal" | "date" | "datetime" | "bool" | "relation" | "array" | "structure" | "";
25
+ export type GraphType = "line" | "bar" | "pie" | "";
26
+ export type ProjectField = {
4
27
  type: FieldType;
5
28
  description: string;
6
29
  actions: string[];
7
30
  values?: string[];
8
31
  fields?: Record<string, ProjectField>;
9
32
  };
10
- type FilterConfig = {
33
+ export type FilterConfig = {
11
34
  key: string;
12
35
  type: FieldType;
13
36
  field: string;
14
37
  lookup: string;
15
38
  value: string;
16
39
  };
17
- type GraphConfig = {
40
+ export type GraphConfig = {
18
41
  key: string;
19
42
  type: GraphType;
20
43
  field: string;
@@ -23,64 +46,54 @@ type GraphConfig = {
23
46
  filters: FilterConfig[];
24
47
  yAxisType: string;
25
48
  };
26
- declare enum ExportStatus {
27
- READY = 0,
28
- RUNNING = 1,
29
- WRITING = 2,
30
- FINISHED = 3,
31
- CANCELLED = 4,
32
- ERROR = 5
33
- }
34
- type TypeObject = {
49
+ export type TypeObject = {
35
50
  type: FieldType;
36
51
  lookups: string[];
37
52
  };
38
- type LookupObject = {
53
+ export type LookupObject = {
39
54
  lookup: string;
40
55
  description: string;
41
56
  };
42
- type ChoiceDescription = {
57
+ export type ChoiceDescription = {
43
58
  description: string;
44
59
  is_active: boolean;
45
60
  };
46
- type OptionType = {
61
+ export type OptionType = {
47
62
  label: string;
48
63
  value: string;
49
64
  };
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 = {
65
+ export type ErrorType = Record<string, string | string[]>;
66
+ export type RecordType = Record<string, string | number | boolean | object | null | RecordType[]>;
67
+ export type SummaryType = Record<"count", number> & Record<string, string | number | boolean | object | null>;
68
+ export type ProjectPermissionType = {
54
69
  project: string;
55
70
  scope: string;
56
71
  actions: string[];
57
72
  };
58
- type ErrorResponse = {
73
+ export interface ErrorResponse {
59
74
  status: "fail" | "error";
60
75
  code: number;
61
76
  messages: ErrorType;
62
- };
63
- type SuccessResponse = {
77
+ }
78
+ export interface SuccessResponse {
64
79
  status: "success";
65
80
  code: number;
66
- };
67
- type RecordListResponse = SuccessResponse & {
81
+ }
82
+ export interface ListResponse extends SuccessResponse {
68
83
  data: RecordType[];
69
84
  next: string | null;
70
85
  previous: string | null;
71
- };
72
- type RecordDetailResponse = SuccessResponse & {
86
+ }
87
+ export interface DetailResponse extends SuccessResponse {
73
88
  data: RecordType;
74
- };
75
- type FieldsResponse = SuccessResponse & {
89
+ }
90
+ export interface FieldsResponse extends SuccessResponse {
76
91
  data: {
77
92
  name: string;
78
93
  description: string;
79
94
  fields: Record<string, ProjectField>;
80
95
  };
81
- };
82
- type ChoicesResponse = SuccessResponse & {
96
+ }
97
+ export interface ChoicesResponse extends SuccessResponse {
83
98
  data: Record<string, ChoiceDescription>;
84
- };
85
- export type { FieldType, GraphType, ProjectField, FilterConfig, GraphConfig, TypeObject, LookupObject, ChoiceDescription, OptionType, ErrorType, RecordType, SummaryType, ProjectPermissionType, ErrorResponse, SuccessResponse, RecordListResponse, RecordDetailResponse, FieldsResponse, ChoicesResponse, };
86
- export { ExportStatus };
99
+ }
@@ -1,15 +1,17 @@
1
- import { RecordDetailResponse, ErrorResponse, FilterConfig } from '../types';
2
- import { OnyxProps, ExportHandlerProps } from '../interfaces';
1
+ import { ExportHandlerProps, OnyxProps } from '../interfaces';
2
+ import { 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
- interface RecordDetailResponseProps extends OnyxProps {
9
- response: RecordDetailResponse | ErrorResponse;
8
+ interface DetailResponseProps extends OnyxProps {
9
+ response: DetailResponse | ErrorResponse | undefined;
10
10
  }
11
11
  /** Handler for converting JSON data to a string for file export. */
12
- declare function handleJSONExport(props: RecordDetailResponseProps): (exportProps: ExportHandlerProps) => void;
12
+ declare function handleJSONExport(props: DetailResponseProps): (exportProps: ExportHandlerProps) => void;
13
13
  /** Takes an array of FilterConfig objects and formats into an array of field (+lookup), value pairs. */
14
14
  declare function formatFilters(filters: FilterConfig[]): string[][];
15
- export { generateKey, getDefaultFileNamePrefix, handleJSONExport, formatFilters, };
15
+ /** Takes a Response object and returns its status code, formatted as a string. */
16
+ declare function formatResponseStatus(response: Response): string;
17
+ export { formatFilters, formatResponseStatus, generateKey, getDefaultFileNamePrefix, handleJSONExport, };
@@ -1,3 +1,3 @@
1
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;
2
+ declare const useQueryRefresh: (refresh: number | null, dataUpdatedAt: number, errorUpdatedAt: number, refetch: () => void, setLastUpdated: (lastUpdated: string | null) => void) => void;
3
3
  export { useDebouncedValue, useQueryRefresh };
@@ -1,3 +1,4 @@
1
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.";
2
+ export declare const recentActivityMessage = "Your most recent API requests will be listed here. If you see anything suspicious, please contact CLIMB-TRE support immediately.";
3
3
  export declare const errorModalMessage = "Please try again or contact CLIMB-TRE support if the problem persists.";
4
+ export declare const defaultExportProgressMessage = "Fetching items...";
@@ -18,4 +18,4 @@ declare const graphStyles: {
18
18
  };
19
19
  };
20
20
  };
21
- export { selectStyles, graphStyles };
21
+ export { graphStyles, selectStyles };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "climb-onyx-gui",
3
- "version": "0.14.0-dev",
3
+ "version": "0.14.0-dev.10",
4
4
  "type": "module",
5
5
  "main": "dist/climb-onyx-gui.js",
6
6
  "types": "dist/main.d.ts",
File without changes
@@ -1,9 +0,0 @@
1
- import { ErrorResponse, RecordDetailResponse } from '../types';
2
- import { DataProps } from '../interfaces';
3
-
4
- interface ObjectDetailsProps extends DataProps {
5
- data: RecordDetailResponse | ErrorResponse;
6
- handleErrorModalShow: (error: Error) => void;
7
- }
8
- declare function ObjectDetails(props: ObjectDetailsProps): import("react/jsx-runtime").JSX.Element;
9
- export default ObjectDetails;