climb-onyx-gui 0.10.2 → 0.10.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,20 +1,30 @@
1
1
  import { default as React } from 'react';
2
2
 
3
- declare function Dropdown({ isClearable, options, titles, value, placeholder, onChange, darkMode, }: {
4
- isClearable?: boolean;
3
+ interface GenericDropdownProps {
5
4
  options: string[];
6
5
  titles?: Map<string, string>;
7
- value: string;
8
6
  placeholder?: string;
9
7
  onChange: React.ChangeEventHandler<HTMLSelectElement>;
10
- darkMode: boolean;
11
- }): import("react/jsx-runtime").JSX.Element;
12
- declare function MultiDropdown({ options, titles, value, placeholder, onChange, darkMode, }: {
13
- options: string[];
14
- titles?: Map<string, string>;
8
+ }
9
+ interface DropdownProps extends GenericDropdownProps {
10
+ value: string;
11
+ isClearable?: boolean;
12
+ isDisabled?: boolean;
13
+ }
14
+ interface MultiDropdownProps extends GenericDropdownProps {
15
15
  value: string[];
16
- placeholder?: string;
17
- onChange: React.ChangeEventHandler<HTMLSelectElement>;
18
- darkMode: boolean;
19
- }): import("react/jsx-runtime").JSX.Element;
20
- export { Dropdown, MultiDropdown };
16
+ }
17
+ interface GenericChoiceProps {
18
+ project: string;
19
+ field: string;
20
+ httpPathHandler: (path: string) => Promise<Response>;
21
+ }
22
+ interface ChoiceProps extends DropdownProps, GenericChoiceProps {
23
+ }
24
+ interface MultiChoiceProps extends MultiDropdownProps, GenericChoiceProps {
25
+ }
26
+ declare function Dropdown(props: DropdownProps): import("react/jsx-runtime").JSX.Element;
27
+ declare function MultiDropdown(props: MultiDropdownProps): import("react/jsx-runtime").JSX.Element;
28
+ declare function Choice(props: ChoiceProps): import("react/jsx-runtime").JSX.Element;
29
+ declare function MultiChoice(props: MultiChoiceProps): import("react/jsx-runtime").JSX.Element;
30
+ export { Dropdown, MultiDropdown, Choice, MultiChoice };
@@ -1,6 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  interface FilterProps {
4
+ project: string;
5
+ httpPathHandler: (path: string) => Promise<Response>;
4
6
  filter: {
5
7
  field: string;
6
8
  lookup: string;
@@ -19,7 +21,6 @@ interface FilterProps {
19
21
  handleValueChange: React.ChangeEventHandler<HTMLInputElement | HTMLSelectElement>;
20
22
  handleFilterAdd: () => void;
21
23
  handleFilterRemove: () => void;
22
- darkMode: boolean;
23
24
  }
24
25
  declare function Filter(props: FilterProps): import("react/jsx-runtime").JSX.Element;
25
26
  export default Filter;
@@ -3,9 +3,12 @@ interface HeaderProps {
3
3
  projectName: string;
4
4
  projectList: string[];
5
5
  handleProjectChange: (p: string) => void;
6
- handleThemeChange: () => void;
7
6
  guiVersion?: string;
8
7
  extVersion?: string;
8
+ tabKey: string;
9
+ setTabKey: (k: string) => void;
10
+ darkMode: boolean;
11
+ handleThemeChange: () => void;
9
12
  }
10
13
  declare function Header(props: HeaderProps): import("react/jsx-runtime").JSX.Element;
11
14
  export default Header;
@@ -5,11 +5,10 @@ declare function Input({ value, placeholder, onChange, }: {
5
5
  placeholder?: string;
6
6
  onChange: React.ChangeEventHandler<HTMLInputElement>;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- declare function MultiInput({ value, placeholder, limit, onChange, darkMode, }: {
8
+ declare function MultiInput({ value, placeholder, limit, onChange, }: {
9
9
  value: string[];
10
10
  placeholder?: string;
11
11
  limit?: number;
12
12
  onChange: React.ChangeEventHandler<HTMLInputElement>;
13
- darkMode: boolean;
14
13
  }): import("react/jsx-runtime").JSX.Element;
15
14
  export { Input, MultiInput };
@@ -0,0 +1,11 @@
1
+ import { OnyxProps, ProjectField } from '../types';
2
+
3
+ interface DataProps extends OnyxProps {
4
+ project: string;
5
+ projectFields: Map<string, ProjectField>;
6
+ typeLookups: Map<string, string[]>;
7
+ fieldDescriptions: Map<string, string>;
8
+ lookupDescriptions: Map<string, string>;
9
+ }
10
+ declare function Data(props: DataProps): import("react/jsx-runtime").JSX.Element;
11
+ export default Data;
@@ -0,0 +1,9 @@
1
+ import { OnyxProps, ProjectField } from '../types';
2
+
3
+ interface StatsProps extends OnyxProps {
4
+ project: string;
5
+ projectFields: Map<string, ProjectField>;
6
+ darkMode: boolean;
7
+ }
8
+ declare function Stats(props: StatsProps): import("react/jsx-runtime").JSX.Element;
9
+ export default Stats;
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- @charset "UTF-8";.table{display:block;overflow-x:auto;overflow-y:scroll;overscroll-behavior-x:none;height:47vh;white-space:nowrap}.table thead{position:sticky;top:0;margin:0}.card-header{font-size:large;min-height:50px}.card-footer{height:50px}.panel{height:15vh;overflow-y:scroll}.table-panel{height:48vh}/*!
1
+ @charset "UTF-8";.table{display:block;overflow-x:auto;overflow-y:scroll;overscroll-behavior-x:none;height:47vh;white-space:nowrap}.table thead{position:sticky;top:0;margin:0}.card-header{font-size:large;min-height:50px}.card-footer{height:50px}.panel{height:15vh;overflow-y:scroll}.graph-panel{height:78vh;overflow-y:scroll}.table-panel{height:48vh}[data-bs-theme=light]{--onyx-dropdown-control-border-color: var(--bs-gray-300);--onyx-dropdown-control-background-color: var(--bs-white);--onyx-dropdown-menu-background-color: var(--bs-white);--onyx-dropdown-multivalue-label-background-color: var(--bs-gray-300);--onyx-dropdown-label-color: var(--bs-black);--onyx-dropdown-option-background-color: var(--bs-white);--onyx-dropdown-option-hover-background-color: var(--bs-gray-300)}[data-bs-theme=dark]{--onyx-dropdown-control-border-color: var(--bs-gray-700);--onyx-dropdown-control-background-color: var(--bs-gray-900);--onyx-dropdown-menu-background-color: var(--bs-black);--onyx-dropdown-multivalue-label-background-color: var(--bs-gray-700);--onyx-dropdown-label-color: var(--bs-white);--onyx-dropdown-option-background-color: var(--bs-black);--onyx-dropdown-option-hover-background-color: var(--bs-gray-700)}[data-bs-theme=dark] .btn-dark{--bs-btn-border-color: var(--bs-gray-700);--bs-btn-hover-border-color: var(--bs-gray-500)}/*!
2
2
  * Bootstrap v5.3.3 (https://getbootstrap.com/)
3
3
  * Copyright 2011-2024 The Bootstrap Authors
4
4
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -0,0 +1,18 @@
1
+ interface OnyxProps {
2
+ httpPathHandler: (path: string) => Promise<Response>;
3
+ s3PathHandler?: (path: string) => void;
4
+ fileWriter?: (path: string, content: string) => void;
5
+ extVersion?: string;
6
+ }
7
+ type ProjectField = {
8
+ type: string;
9
+ description: string;
10
+ actions: string[];
11
+ values?: string[];
12
+ fields?: Record<string, ProjectField>;
13
+ };
14
+ type OptionType = {
15
+ label: string;
16
+ value: string;
17
+ };
18
+ export type { OnyxProps, ProjectField, OptionType };
@@ -0,0 +1,140 @@
1
+ declare const graphStyles: {
2
+ layout: {
3
+ annotationdefaults: {
4
+ arrowcolor: string;
5
+ arrowhead: number;
6
+ arrowwidth: number;
7
+ };
8
+ autotypenumbers: string;
9
+ coloraxis: {
10
+ colorbar: {
11
+ outlinewidth: number;
12
+ ticks: string;
13
+ };
14
+ };
15
+ colorscale: {
16
+ diverging: (string | number)[][];
17
+ sequential: (string | number)[][];
18
+ sequentialminus: (string | number)[][];
19
+ };
20
+ colorway: string[];
21
+ font: {
22
+ color: string;
23
+ };
24
+ geo: {
25
+ bgcolor: string;
26
+ lakecolor: string;
27
+ landcolor: string;
28
+ showlakes: boolean;
29
+ showland: boolean;
30
+ subunitcolor: string;
31
+ };
32
+ hoverlabel: {
33
+ align: string;
34
+ };
35
+ hovermode: string;
36
+ mapbox: {
37
+ style: string;
38
+ };
39
+ paper_bgcolor: string;
40
+ plot_bgcolor: string;
41
+ polar: {
42
+ angularaxis: {
43
+ gridcolor: string;
44
+ linecolor: string;
45
+ ticks: string;
46
+ };
47
+ bgcolor: string;
48
+ radialaxis: {
49
+ gridcolor: string;
50
+ linecolor: string;
51
+ ticks: string;
52
+ };
53
+ };
54
+ scene: {
55
+ xaxis: {
56
+ backgroundcolor: string;
57
+ gridcolor: string;
58
+ gridwidth: number;
59
+ linecolor: string;
60
+ showbackground: boolean;
61
+ ticks: string;
62
+ zerolinecolor: string;
63
+ };
64
+ yaxis: {
65
+ backgroundcolor: string;
66
+ gridcolor: string;
67
+ gridwidth: number;
68
+ linecolor: string;
69
+ showbackground: boolean;
70
+ ticks: string;
71
+ zerolinecolor: string;
72
+ };
73
+ zaxis: {
74
+ backgroundcolor: string;
75
+ gridcolor: string;
76
+ gridwidth: number;
77
+ linecolor: string;
78
+ showbackground: boolean;
79
+ ticks: string;
80
+ zerolinecolor: string;
81
+ };
82
+ };
83
+ shapedefaults: {
84
+ line: {
85
+ color: string;
86
+ };
87
+ };
88
+ sliderdefaults: {
89
+ bgcolor: string;
90
+ bordercolor: string;
91
+ borderwidth: number;
92
+ tickwidth: number;
93
+ };
94
+ ternary: {
95
+ aaxis: {
96
+ gridcolor: string;
97
+ linecolor: string;
98
+ ticks: string;
99
+ };
100
+ baxis: {
101
+ gridcolor: string;
102
+ linecolor: string;
103
+ ticks: string;
104
+ };
105
+ bgcolor: string;
106
+ caxis: {
107
+ gridcolor: string;
108
+ linecolor: string;
109
+ ticks: string;
110
+ };
111
+ };
112
+ updatemenudefaults: {
113
+ bgcolor: string;
114
+ borderwidth: number;
115
+ };
116
+ xaxis: {
117
+ automargin: boolean;
118
+ gridcolor: string;
119
+ linecolor: string;
120
+ ticks: string;
121
+ title: {
122
+ standoff: number;
123
+ };
124
+ zerolinecolor: string;
125
+ zerolinewidth: number;
126
+ };
127
+ yaxis: {
128
+ automargin: boolean;
129
+ gridcolor: string;
130
+ linecolor: string;
131
+ ticks: string;
132
+ title: {
133
+ standoff: number;
134
+ };
135
+ zerolinecolor: string;
136
+ zerolinewidth: number;
137
+ };
138
+ };
139
+ };
140
+ export default graphStyles;
@@ -0,0 +1,4 @@
1
+ import { StylesConfig } from 'react-select';
2
+
3
+ declare const selectStyles: StylesConfig;
4
+ export default selectStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "climb-onyx-gui",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "type": "module",
5
5
  "main": "dist/climb-onyx-gui.js",
6
6
  "types": "dist/main.d.ts",
@@ -20,7 +20,9 @@
20
20
  "dependencies": {
21
21
  "@tanstack/react-query": "^4.36.1",
22
22
  "export-to-csv": "^1.3.0",
23
+ "plotly.js-basic-dist": "^2.33.0",
23
24
  "react-bootstrap": "^2.10.2",
25
+ "react-plotly.js": "^2.6.0",
24
26
  "react-select": "^5.8.0"
25
27
  },
26
28
  "peerDependencies": {
@@ -29,8 +31,10 @@
29
31
  },
30
32
  "devDependencies": {
31
33
  "@types/node": "^20.12.12",
34
+ "@types/plotly.js-basic-dist": "^1.54.4",
32
35
  "@types/react": "^18.2.66",
33
36
  "@types/react-dom": "^18.2.22",
37
+ "@types/react-plotly.js": "^2.6.3",
34
38
  "@typescript-eslint/eslint-plugin": "^7.2.0",
35
39
  "@typescript-eslint/parser": "^7.2.0",
36
40
  "@vitejs/plugin-react-swc": "^3.5.0",
@@ -1,4 +0,0 @@
1
- import { StylesConfig } from 'react-select';
2
-
3
- declare const getStyles: (darkMode: boolean) => StylesConfig;
4
- export default getStyles;