@gpustack/core-ui 1.0.0 → 1.0.1
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/index.cjs.js +15 -14
- package/dist/index.css +1 -1
- package/dist/index.es.js +236 -208
- package/dist/src/lib/components/card-wrapper/simple-card.d.ts +5 -1
- package/dist/src/lib/components/form/simple-select.d.ts +5 -0
- package/dist/src/lib/components/index.d.ts +1 -0
- package/dist/src/lib/components/logs-viewer/index.d.ts +1 -1
- package/dist/src/lib/components/page-tools/index.d.ts +3 -0
- package/dist/src/lib/components/select-panel/index.d.ts +6 -0
- package/dist/src/lib/components/terminal-tabs/{resize-container.d.ts → resize-panel.d.ts} +2 -2
- package/dist/src/lib/hooks/use-query-data-list.d.ts +6 -2
- package/package.json +1 -1
|
@@ -12,9 +12,13 @@ export declare const SimpleCard: React.FC<{
|
|
|
12
12
|
label: string;
|
|
13
13
|
value: React.ReactNode;
|
|
14
14
|
color: string;
|
|
15
|
-
iconType
|
|
15
|
+
iconType?: string;
|
|
16
16
|
}[];
|
|
17
17
|
height?: string | number;
|
|
18
18
|
bordered?: boolean;
|
|
19
|
+
styles?: {
|
|
20
|
+
wrapper?: React.CSSProperties;
|
|
21
|
+
item?: React.CSSProperties;
|
|
22
|
+
};
|
|
19
23
|
}>;
|
|
20
24
|
export default SimpleCard;
|
|
@@ -3,5 +3,10 @@ import { default as React } from 'react';
|
|
|
3
3
|
declare const SimpleSelect: React.FC<SelectProps & {
|
|
4
4
|
ref?: any;
|
|
5
5
|
showTags?: boolean;
|
|
6
|
+
optionLabelRender?: (option: any) => React.ReactNode;
|
|
7
|
+
styles?: {
|
|
8
|
+
wrapper?: React.CSSProperties;
|
|
9
|
+
select?: React.CSSProperties;
|
|
10
|
+
};
|
|
6
11
|
}>;
|
|
7
12
|
export default SimpleSelect;
|
|
@@ -116,6 +116,7 @@ export { default as TemplateCard } from './templates/card';
|
|
|
116
116
|
export { default as TemplateCardList } from './templates/card-list';
|
|
117
117
|
export { default as TemplateCardSkeleton } from './templates/card-skeleton';
|
|
118
118
|
export { default as TerminalTabs } from './terminal-tabs';
|
|
119
|
+
export { default as ResizePanel } from './terminal-tabs/resize-panel';
|
|
119
120
|
export { default as ThumbImage } from './thumb-image';
|
|
120
121
|
export { default as TooltipList } from './tooltip-list';
|
|
121
122
|
export { default as Transfer } from './transfer';
|
|
@@ -10,6 +10,12 @@ interface SelectPanelProps {
|
|
|
10
10
|
selectedKeys: string[];
|
|
11
11
|
notFoundContent?: React.ReactNode;
|
|
12
12
|
onSelectChange: (selectedKeys: string[]) => void;
|
|
13
|
+
styles?: {
|
|
14
|
+
container?: React.CSSProperties;
|
|
15
|
+
left?: React.CSSProperties;
|
|
16
|
+
right?: React.CSSProperties;
|
|
17
|
+
header?: React.CSSProperties;
|
|
18
|
+
};
|
|
13
19
|
}
|
|
14
20
|
declare const SelectPanel: React.FC<SelectPanelProps>;
|
|
15
21
|
export default SelectPanel;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ResizableProps } from 're-resizable';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
|
-
declare const
|
|
3
|
+
declare const ResizePanel: React.FC<React.PropsWithChildren<ResizableProps & {
|
|
4
4
|
ref?: any;
|
|
5
5
|
defaultHeight?: number;
|
|
6
6
|
defaultWidth?: number;
|
|
@@ -12,4 +12,4 @@ declare const ResizeContainer: React.FC<React.PropsWithChildren<ResizableProps &
|
|
|
12
12
|
height: number;
|
|
13
13
|
}) => void;
|
|
14
14
|
}>>;
|
|
15
|
-
export default
|
|
15
|
+
export default ResizePanel;
|
|
@@ -6,12 +6,15 @@
|
|
|
6
6
|
* @param option.fetchList: (params, extra) => Promise<{ items: ListItem[] }>
|
|
7
7
|
* @returns loading, dataList, fetchData, cancelRequest
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
type QueryResponse<ListItem, T extends 'array' | 'object'> = T extends 'array' ? ListItem[] : Global.PageResponse<ListItem>;
|
|
10
|
+
export declare function useQueryDataList<ListItem, Params = any, T extends 'array' | 'object' = 'array'>(option: {
|
|
10
11
|
key: string;
|
|
12
|
+
responseType?: T;
|
|
11
13
|
fetchList: (params: Params, options?: any) => Promise<Global.PageResponse<ListItem>>;
|
|
12
14
|
getLabel?: (item: ListItem) => string;
|
|
13
15
|
getValue?: (item: ListItem) => any;
|
|
14
16
|
errorMsg?: string;
|
|
17
|
+
debounceWait?: number;
|
|
15
18
|
}): {
|
|
16
19
|
loading: boolean;
|
|
17
20
|
dataList: Array<ListItem & {
|
|
@@ -19,7 +22,7 @@ export declare function useQueryDataList<ListItem, Params = any>(option: {
|
|
|
19
22
|
value: any;
|
|
20
23
|
}>;
|
|
21
24
|
cancelRequest: () => void;
|
|
22
|
-
fetchData: (params: Params, extra?: any) => Promise<ListItem
|
|
25
|
+
fetchData: (params: Params, extra?: any) => Promise<QueryResponse<ListItem, T>>;
|
|
23
26
|
};
|
|
24
27
|
export declare function useQueryData<Detail, Params = any>(option: {
|
|
25
28
|
key: string;
|
|
@@ -33,3 +36,4 @@ export declare function useQueryData<Detail, Params = any>(option: {
|
|
|
33
36
|
cancelRequest: () => void;
|
|
34
37
|
fetchData: (params: Params, extra?: any) => Promise<Detail>;
|
|
35
38
|
};
|
|
39
|
+
export {};
|