climb-onyx-gui 0.16.3-dev.3 → 0.16.4

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.
@@ -1,6 +1,6 @@
1
1
  import { default as Plotly, Layout } from 'plotly.js-basic-dist';
2
2
  import { DataProps } from '../interfaces';
3
- import { GraphConfig, Field } from '../types';
3
+ import { Themes, GraphConfig, Field } from '../types';
4
4
  interface BasePlotProps {
5
5
  fields: Map<string, Field>;
6
6
  plotData: Plotly.Data[];
@@ -10,7 +10,7 @@ interface BasePlotProps {
10
10
  yAxisType?: string;
11
11
  legendTitle?: string;
12
12
  layout?: Partial<Layout>;
13
- darkMode: boolean;
13
+ theme: Themes;
14
14
  uirevision: string;
15
15
  }
16
16
  interface GraphProps extends DataProps {
@@ -1,17 +1,18 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
- import { ExportStatus, TabState, Project, Field } from './types';
2
+ import { ExportStatus, TabState, Project, Field, Themes } from './types';
3
3
  export interface OnyxProps {
4
4
  enabled: boolean;
5
5
  httpPathHandler: (path: string) => Promise<Response>;
6
6
  s3PathHandler: (path: string) => Promise<void>;
7
7
  fileWriter: (path: string, content: string) => Promise<void>;
8
+ extTheme?: string | null;
8
9
  extVersion: string;
9
10
  getItem?: (key: string) => unknown;
10
11
  setItem?: (key: string, value: unknown) => void;
11
12
  setTitle?: (title: string) => void;
12
13
  }
13
14
  export interface PageProps extends OnyxProps {
14
- darkMode: boolean;
15
+ theme: Themes;
15
16
  tabState: TabState;
16
17
  setTabState: Dispatch<SetStateAction<TabState>>;
17
18
  }
@@ -1,20 +1,22 @@
1
1
  import { ExportHandlerProps, OnyxProps } from '../interfaces';
2
- import { RecordType, DetailResponse, ErrorResponse, FilterConfig } from '../types';
2
+ import { RecordType, DetailResponse, ErrorResponse, FilterConfig, Themes } from '../types';
3
3
  /** Returns a random hexadecimal string. */
4
- declare function generateKey(): string;
4
+ export declare function generateKey(): string;
5
5
  /** Generate a default file name prefix based on the project code and search parameters. */
6
- declare function getDefaultFileNamePrefix(project: string, searchParameters: string): string;
6
+ export declare function getDefaultFileNamePrefix(project: string, searchParameters: string): string;
7
7
  interface DetailResponseProps extends OnyxProps {
8
8
  response: DetailResponse<RecordType> | ErrorResponse | undefined;
9
9
  }
10
10
  /** Handler for converting JSON data to a string for file export. */
11
- declare function handleJSONExport(props: DetailResponseProps): (exportProps: ExportHandlerProps) => void;
11
+ export declare function handleJSONExport(props: DetailResponseProps): (exportProps: ExportHandlerProps) => void;
12
12
  /** Takes an array of FilterConfig objects and formats into an array of field (+lookup), value pairs. */
13
- declare function formatFilters(filters: FilterConfig[]): string[][];
13
+ export declare function formatFilters(filters: FilterConfig[]): string[][];
14
14
  /** Takes a Response object and returns its status code, formatted as a string. */
15
- declare function formatResponseStatus(response: Response): string;
15
+ export declare function formatResponseStatus(response: Response): string;
16
16
  export declare function formatTimeAgo(timestamp: string): string;
17
- declare function formatField(field: string): string;
18
- declare function formatLookup(lookup: string): string;
19
- declare function formatValue(value: string): string;
20
- export { formatFilters, formatField, formatLookup, formatResponseStatus, formatValue, generateKey, getDefaultFileNamePrefix, handleJSONExport, };
17
+ export declare function formatField(field: string): string;
18
+ export declare function formatLookup(lookup: string): string;
19
+ export declare function formatValue(value: string): string;
20
+ /** Converts a string theme value to a Themes enum value, or null if invalid. */
21
+ export declare function getTheme(theme: string | null | undefined): Themes | null;
22
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "climb-onyx-gui",
3
- "version": "0.16.3-dev.3",
3
+ "version": "0.16.4",
4
4
  "description": "Onyx Graphical User Interface",
5
5
  "keywords": [
6
6
  "gui",