@app-studio/web 0.3.68 → 0.5.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/bot/Bot.d.ts +4 -3
- package/dist/bot/FileHandler.d.ts +5 -0
- package/dist/bot/OpenAIConnector.d.ts +2 -0
- package/dist/bot/prompt/1-project.d.ts +1 -1
- package/dist/bot/prompt/2-response.d.ts +1 -1
- package/dist/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +0 -3
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +10 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +36 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +2 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.state.d.ts +2 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.type.d.ts +12 -0
- package/dist/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +4 -0
- package/dist/components/Form/ComboBox/ComboBox.d.ts +3 -0
- package/dist/components/Form/ComboBox/examples/default.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/index.d.ts +10 -0
- package/dist/components/Form/ComboBox/examples/label.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/left.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/onSelect.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/placeholder.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/right.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/searchEnabled.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/searchPlaceholder.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/showTick.d.ts +2 -0
- package/dist/components/Form/ComboBox/examples/styles.d.ts +2 -0
- package/dist/components/Form/DatePicker/DatePicker/DatePicker.props.d.ts +0 -3
- package/dist/components/Form/TextField/examples/index.d.ts +1 -1
- package/dist/components/Formik/Formik.ComboBox.d.ts +6 -0
- package/dist/components/Formik/examples/FormikComboBox.d.ts +2 -0
- package/dist/components/Formik/examples/index.d.ts +1 -0
- package/dist/components/Formik/index.d.ts +1 -0
- package/dist/components/Layout/index.d.ts +4 -0
- package/dist/components/Message/Message/Message.layout.d.ts +1 -1
- package/dist/components/Message/Message/Message.props.d.ts +31 -107
- package/dist/components/Message/Message/Message.store.d.ts +2 -8
- package/dist/components/Message/Message/Message.style.d.ts +2 -2
- package/dist/components/Message/Message/Message.view.d.ts +2 -18
- package/dist/components/Message/examples/action.d.ts +2 -0
- package/dist/components/Message/examples/default.d.ts +2 -0
- package/dist/components/Message/examples/index.d.ts +9 -0
- package/dist/components/Message/examples/isClosable.d.ts +2 -0
- package/dist/components/Message/examples/showIcon.d.ts +2 -0
- package/dist/components/Message/examples/styles.d.ts +2 -0
- package/dist/components/Message/examples/subtitle.d.ts +2 -0
- package/dist/components/Message/examples/timeout.d.ts +2 -0
- package/dist/components/Message/examples/title.d.ts +2 -0
- package/dist/components/Message/examples/variant.d.ts +2 -0
- package/dist/components/Svg/Error.d.ts +8 -0
- package/dist/components/Svg/Info.d.ts +8 -0
- package/dist/components/Svg/Plus.d.ts +8 -0
- package/dist/components/Svg/Search.d.ts +8 -0
- package/dist/components/Svg/Success.d.ts +8 -0
- package/dist/components/Svg/Tick.d.ts +8 -0
- package/dist/components/Svg/index.d.ts +3 -0
- package/dist/components/Table/Table/Table.context.d.ts +16 -0
- package/dist/components/Table/Table/Table.props.d.ts +22 -0
- package/dist/components/Table/Table/Table.state.d.ts +5 -0
- package/dist/components/Table/Table/Table.type.d.ts +19 -0
- package/dist/components/Table/Table/Table.view.d.ts +11 -0
- package/dist/components/Table/Table.d.ts +13 -0
- package/dist/components/Table/examples/caption.d.ts +2 -0
- package/dist/components/Table/examples/data.d.ts +2 -0
- package/dist/components/Table/examples/default.d.ts +2 -0
- package/dist/components/Table/examples/footer.d.ts +2 -0
- package/dist/components/Table/examples/index.d.ts +5 -0
- package/dist/components/Table/examples/styles.d.ts +2 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/pages/comboBox.page.d.ts +3 -0
- package/dist/pages/message.page.d.ts +2 -2
- package/dist/pages/table.page.d.ts +3 -0
- package/dist/utils/componentsPageImports.d.ts +6 -0
- package/dist/web.cjs.development.js +709 -63
- package/dist/web.cjs.development.js.map +1 -1
- package/dist/web.cjs.production.min.js +1 -1
- package/dist/web.cjs.production.min.js.map +1 -1
- package/dist/web.esm.js +704 -64
- package/dist/web.esm.js.map +1 -1
- package/package.json +6 -5
- package/dist/components/Message/Examples/CloseButtonMessage.d.ts +0 -2
- package/dist/components/Message/Examples/DefaultMessage.d.ts +0 -2
- package/dist/components/Message/Examples/VariantMessage.d.ts +0 -2
- package/dist/components/Message/Examples/index.d.ts +0 -3
- /package/dist/components/Form/TextField/examples/{ColorScheme.d.ts → colorScheme.d.ts} +0 -0
package/dist/bot/Bot.d.ts
CHANGED
|
@@ -5,9 +5,10 @@ export declare class Bot {
|
|
|
5
5
|
private readonly cache;
|
|
6
6
|
private readonly cacheKey;
|
|
7
7
|
constructor(cacheKey: string);
|
|
8
|
-
init(name: string, fileIds: string[],
|
|
9
|
-
addFiles(componentFolder: string): Promise<any>;
|
|
8
|
+
init(name: string, fileIds: string[], cachePath: string): Promise<Assistant>;
|
|
10
9
|
createFile(fileContent: string, fileName: string): Promise<any>;
|
|
11
|
-
|
|
10
|
+
addFile(filePath: string): Promise<any>;
|
|
11
|
+
response(assistantId: string, propsPath: string, componentFolder: string, componentName: string): Promise<any>;
|
|
12
|
+
isObject(value: any): boolean;
|
|
12
13
|
MarkdownGeneration(componentFolder: string, componentName: string, propsPath: string): Promise<void>;
|
|
13
14
|
}
|
|
@@ -15,5 +15,10 @@ export declare class FileHandler {
|
|
|
15
15
|
readComponentPropsFromJson: (filePath: string) => Record<string, any>;
|
|
16
16
|
uploadFile(filePath: string, purpose: 'fine-tune' | 'assistants'): Promise<string>;
|
|
17
17
|
deleteFile(fileId: string): Promise<boolean>;
|
|
18
|
+
deleteFiles(fileIds: string[]): Promise<{
|
|
19
|
+
fileId: string;
|
|
20
|
+
deleted: boolean;
|
|
21
|
+
error: null;
|
|
22
|
+
}[]>;
|
|
18
23
|
listFiles(): Promise<OpenAI.Files.FileObject[]>;
|
|
19
24
|
}
|
|
@@ -13,9 +13,11 @@ export declare class OpenAIConnector {
|
|
|
13
13
|
private readonly apiKey;
|
|
14
14
|
private readonly organization;
|
|
15
15
|
private readonly openai;
|
|
16
|
+
private readonly fileHandler;
|
|
16
17
|
constructor(apiKey: string, organization: string);
|
|
17
18
|
sendChatMessage(model: string, messages: MessageCreateParams[]): Promise<OpenAI.Chat.Completions.ChatCompletion>;
|
|
18
19
|
createAssistant(instructions: string, name: string, fileIds: string[]): Promise<Assistant>;
|
|
20
|
+
updateAssistantFiles(assistantId: string, newFileIds: string[]): Promise<Assistant>;
|
|
19
21
|
createAssistantFiles(assistantId: string, filesIds: string[]): Promise<Assistant>;
|
|
20
22
|
deleteAssistantFiles(assistantId: string, AssistantFileId: string): Promise<OpenAI.Beta.Assistants.Files.FileDeleteResponse>;
|
|
21
23
|
getAssistantFiles(assistantId: string): Promise<OpenAI.Beta.Assistants.Files.AssistantFilesPage>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const ProjectPrompt: (
|
|
1
|
+
export declare const ProjectPrompt: () => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const RespondPrompt: () => string;
|
|
1
|
+
export declare const RespondPrompt: (props: string, view: string, type?: string | undefined) => string;
|
|
@@ -2,9 +2,6 @@ import React, { CSSProperties } from 'react';
|
|
|
2
2
|
import { Elevation } from 'src/utils/elevation';
|
|
3
3
|
import { Shadow } from 'app-studio';
|
|
4
4
|
import { CheckboxStyles, Size } from './Checkbox.type';
|
|
5
|
-
/**
|
|
6
|
-
* Represents the properties for a checkbox component.
|
|
7
|
-
*/
|
|
8
5
|
export interface CheckboxProps {
|
|
9
6
|
/**
|
|
10
7
|
* The identifier for the checkbox.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface ComboBoxContextType {
|
|
3
|
+
openDropdowns: {
|
|
4
|
+
[key: string]: boolean;
|
|
5
|
+
};
|
|
6
|
+
toggleDropdown: (id: string) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ComboBoxContext: import("react").Context<ComboBoxContextType>;
|
|
9
|
+
export declare const useComboBoxContext: () => ComboBoxContextType;
|
|
10
|
+
export default ComboBoxContext;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ReactNode, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { ComboBoxStyles } from './ComboBox.type';
|
|
3
|
+
export interface ComboBoxProps {
|
|
4
|
+
id: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
items: ComboBoxItem[];
|
|
7
|
+
onSelect?: (item: ComboBoxItem) => void;
|
|
8
|
+
searchEnabled?: boolean;
|
|
9
|
+
left?: ReactNode;
|
|
10
|
+
right?: ReactNode;
|
|
11
|
+
label?: string;
|
|
12
|
+
showTick?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
styles?: ComboBoxStyles;
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
[x: string]: any;
|
|
17
|
+
}
|
|
18
|
+
export interface ComboBoxItem {
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface ComboBoxStateActions {
|
|
24
|
+
filteredItems: ComboBoxItem[];
|
|
25
|
+
setFilteredItems: Dispatch<SetStateAction<ComboBoxItem[]>>;
|
|
26
|
+
selectedItem: ComboBoxItem;
|
|
27
|
+
setSelectedItem: Dispatch<SetStateAction<ComboBoxItem>>;
|
|
28
|
+
highlightedIndex: number;
|
|
29
|
+
setHighlightedIndex: Dispatch<SetStateAction<number>>;
|
|
30
|
+
searchQuery: string;
|
|
31
|
+
setSearchQuery: Dispatch<SetStateAction<string>>;
|
|
32
|
+
isDropdownVisible: boolean;
|
|
33
|
+
setIsDropdownVisible: Dispatch<SetStateAction<boolean>>;
|
|
34
|
+
}
|
|
35
|
+
export interface ComboBoxViewProps extends ComboBoxProps, ComboBoxStateActions {
|
|
36
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare type Styles = {
|
|
3
|
+
[key: string]: React.CSSProperties;
|
|
4
|
+
};
|
|
5
|
+
export declare type ComboBoxStyles = {
|
|
6
|
+
container?: React.CSSProperties;
|
|
7
|
+
label?: any;
|
|
8
|
+
dropdown?: React.CSSProperties;
|
|
9
|
+
item?: React.CSSProperties;
|
|
10
|
+
labelContainer?: React.CSSProperties;
|
|
11
|
+
text?: any;
|
|
12
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './default';
|
|
2
|
+
export * from './label';
|
|
3
|
+
export * from './left';
|
|
4
|
+
export * from './onSelect';
|
|
5
|
+
export * from './placeholder';
|
|
6
|
+
export * from './right';
|
|
7
|
+
export * from './searchEnabled';
|
|
8
|
+
export * from './searchPlaceholder';
|
|
9
|
+
export * from './showTick';
|
|
10
|
+
export * from './styles';
|
|
@@ -3,9 +3,6 @@ import { Elevation } from 'src/utils/elevation';
|
|
|
3
3
|
import { Shadow } from 'app-studio';
|
|
4
4
|
import { DatePickerStyles, Shape, Size, Variant } from './DatePicker.type';
|
|
5
5
|
export interface DatePickerProps {
|
|
6
|
-
/**
|
|
7
|
-
* The identifier for the DatePicker component.
|
|
8
|
-
*/
|
|
9
6
|
id?: string;
|
|
10
7
|
/**
|
|
11
8
|
* Custom icon to display when the DatePicker is checked.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MessageLayoutProps } from './Message.props';
|
|
3
|
-
export declare const MessageLayout: ({ container,
|
|
3
|
+
export declare const MessageLayout: ({ container, theme, position, }: MessageLayoutProps) => React.JSX.Element | null;
|
|
@@ -1,115 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Elevation } from 'src/utils/elevation';
|
|
3
|
-
import { Shadow } from 'app-studio';
|
|
4
|
-
import { CloseButtonPosition, Position, Shape, Size } from './Message.type';
|
|
5
|
-
export interface MessageProps {
|
|
6
|
-
/**
|
|
7
|
-
* The content to be displayed inside the message.
|
|
8
|
-
*/
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* The color of the close button in the header.
|
|
12
|
-
*/
|
|
13
|
-
buttonColor?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The size of the close button in the header.
|
|
16
|
-
*/
|
|
17
|
-
iconSize?: Size;
|
|
18
|
-
/**
|
|
19
|
-
* Determines whether the message should have sharp or rounded edges.
|
|
20
|
-
*/
|
|
21
|
-
shape?: Shape;
|
|
22
|
-
/**
|
|
23
|
-
* If set to true, the message will occupy the full width and height of the screen.
|
|
24
|
-
*/
|
|
25
|
-
isFullScreen?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Indicates the presence of a close button and its position within the header.
|
|
28
|
-
*/
|
|
29
|
-
buttonPosition?: CloseButtonPosition;
|
|
30
|
-
/**
|
|
31
|
-
* The callback function to be executed when the close button is clicked or pressed.
|
|
32
|
-
*/
|
|
33
|
-
onClose?: () => void;
|
|
34
|
-
/**
|
|
35
|
-
* The degree of blurriness applied to the overlay.
|
|
36
|
-
*/
|
|
37
|
-
blur?: number;
|
|
38
|
-
/**
|
|
39
|
-
* If set to true, the message will be visible.
|
|
40
|
-
*/
|
|
41
|
-
isOpen?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* If set to true, the message will remain open when the overlay is clicked.
|
|
44
|
-
*/
|
|
45
|
-
isClosePrevented?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* The positioning of the message container.
|
|
48
|
-
*/
|
|
49
|
-
position?: Position;
|
|
50
|
-
/**
|
|
51
|
-
* Applies a shadow effect to the button.
|
|
52
|
-
*/
|
|
53
|
-
shadow?: Shadow | Elevation | CSSProperties;
|
|
54
|
-
/**
|
|
55
|
-
* Additional properties.
|
|
56
|
-
*/
|
|
57
|
-
[x: string]: any;
|
|
58
|
-
}
|
|
59
|
-
export interface MessageType extends React.FunctionComponent<MessageProps> {
|
|
60
|
-
/**
|
|
61
|
-
* The container component of the message.
|
|
62
|
-
*/
|
|
63
|
-
Container: React.FC<ContainerProps>;
|
|
64
|
-
/**
|
|
65
|
-
* The body component of the message.
|
|
66
|
-
*/
|
|
67
|
-
Body: React.FC<BodyProps>;
|
|
68
|
-
/**
|
|
69
|
-
* The header component of the message.
|
|
70
|
-
*/
|
|
71
|
-
Layout: React.FC<MessageLayoutProps>;
|
|
72
|
-
}
|
|
1
|
+
import { Message, MessageViewStyles, Position, ThemesType } from './Message.type';
|
|
73
2
|
export interface MessageLayoutProps {
|
|
74
3
|
icons?: {
|
|
75
4
|
[x: string]: string;
|
|
76
5
|
};
|
|
77
6
|
container?: any;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
7
|
+
theme?: ThemesType;
|
|
8
|
+
position?: Position;
|
|
9
|
+
}
|
|
10
|
+
export interface ShowMessageProps {
|
|
11
|
+
isClosable?: boolean;
|
|
12
|
+
styles?: MessageViewStyles;
|
|
13
|
+
action?: Function;
|
|
14
|
+
actionText?: string;
|
|
15
|
+
showIcon?: boolean;
|
|
16
|
+
timeout?: number;
|
|
83
17
|
}
|
|
84
|
-
export interface
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*/
|
|
92
|
-
shape?: Shape;
|
|
93
|
-
/**
|
|
94
|
-
* If true, the message will take the full width and height
|
|
95
|
-
*/
|
|
96
|
-
isFullScreen?: boolean;
|
|
97
|
-
/**
|
|
98
|
-
* Set a shadow effect on the button.
|
|
99
|
-
*/
|
|
100
|
-
shadow?: Shadow | Elevation | CSSProperties;
|
|
101
|
-
/**
|
|
102
|
-
* Other properties
|
|
103
|
-
*/
|
|
104
|
-
[x: string]: any;
|
|
18
|
+
export interface MessageProps extends ShowMessageProps {
|
|
19
|
+
subtitle?: string;
|
|
20
|
+
variant: Message;
|
|
21
|
+
show?: boolean;
|
|
22
|
+
hide: Function;
|
|
23
|
+
title: string;
|
|
24
|
+
theme?: ThemesType;
|
|
105
25
|
}
|
|
106
|
-
export interface
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
26
|
+
export interface MessageState {
|
|
27
|
+
visible: boolean;
|
|
28
|
+
variant: Message;
|
|
29
|
+
title: string;
|
|
30
|
+
subtitle: string;
|
|
31
|
+
isClosable?: boolean;
|
|
32
|
+
styles?: MessageViewStyles;
|
|
33
|
+
action?: Function;
|
|
34
|
+
actionText?: string;
|
|
35
|
+
showIcon?: boolean;
|
|
36
|
+
timeout?: number;
|
|
37
|
+
show: (variant: Message, title?: string, subtitle?: string, isClosable?: boolean, styles?: MessageViewStyles, action?: Function, actionText?: string, showIcon?: boolean, timeout?: number) => void;
|
|
38
|
+
hide: () => void;
|
|
115
39
|
}
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
visible: boolean;
|
|
3
|
-
variant?: string;
|
|
4
|
-
message: string;
|
|
5
|
-
show: (variant?: string, message?: string) => void;
|
|
6
|
-
hide: () => void;
|
|
7
|
-
}
|
|
1
|
+
import { Message, ShowMessageType } from './Message.type';
|
|
8
2
|
export declare const useMessageStore: any;
|
|
9
|
-
export declare const showMessage: (variant: string,
|
|
3
|
+
export declare const showMessage: (variant: Message, title?: string | undefined, subtitle?: string | undefined, props?: ShowMessageType | undefined) => void;
|
|
10
4
|
export declare const hideMessage: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Message, Shape, Size } from './Message.type';
|
|
3
3
|
export declare const ContainerShapes: Record<Shape, CSSProperties>;
|
|
4
|
-
export declare const OverlayAlignments: Record<Position, CSSProperties>;
|
|
5
4
|
export declare const HeaderIconSizes: Record<Size, number>;
|
|
5
|
+
export declare const Themes: Record<Message, any>;
|
|
@@ -1,19 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
variant?: string;
|
|
5
|
-
show?: boolean;
|
|
6
|
-
hide: Function;
|
|
7
|
-
closable?: boolean;
|
|
8
|
-
timeout?: number;
|
|
9
|
-
props?: any;
|
|
10
|
-
icons?: Record<string, string>;
|
|
11
|
-
text?: any;
|
|
12
|
-
icon?: any;
|
|
13
|
-
theme?: Record<string, any>;
|
|
14
|
-
iconProps?: any;
|
|
15
|
-
textProps?: any;
|
|
16
|
-
containerProps?: any;
|
|
17
|
-
}
|
|
18
|
-
export declare const MessageView: ({ variant, message, hide, props, timeout, closable, icons, text, theme, icon, }: IMessage) => React.JSX.Element;
|
|
19
|
-
export {};
|
|
2
|
+
import { MessageProps } from './Message.props';
|
|
3
|
+
export declare const MessageView: ({ variant, hide, title, subtitle, theme, action, actionText, showIcon, isClosable, timeout, styles, }: MessageProps) => React.JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export declare type TableViewStyles = {
|
|
3
|
+
table?: CSSProperties;
|
|
4
|
+
thead?: CSSProperties;
|
|
5
|
+
tfoot?: CSSProperties;
|
|
6
|
+
tbody?: CSSProperties;
|
|
7
|
+
tr?: CSSProperties;
|
|
8
|
+
td?: CSSProperties;
|
|
9
|
+
th?: CSSProperties;
|
|
10
|
+
caption?: CSSProperties;
|
|
11
|
+
};
|
|
12
|
+
export declare const TableStylesProvider: React.FC<{
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
styles?: TableViewStyles;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const useTableStyles: () => TableViewStyles;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Column, FooterCell, TableViewStyles } from './Table.type';
|
|
3
|
+
export interface TableProps {
|
|
4
|
+
data: any[];
|
|
5
|
+
columns: Column[];
|
|
6
|
+
footer?: FooterCell[];
|
|
7
|
+
caption?: React.ReactNode;
|
|
8
|
+
styles?: TableViewStyles;
|
|
9
|
+
}
|
|
10
|
+
export interface TableViewProps extends TableProps {
|
|
11
|
+
}
|
|
12
|
+
export interface TableLayoutProps {
|
|
13
|
+
Head?: React.FC<any>;
|
|
14
|
+
Body?: React.FC<any>;
|
|
15
|
+
Row?: React.FC<any>;
|
|
16
|
+
Cell?: React.FC<any>;
|
|
17
|
+
Footer?: React.FC<any>;
|
|
18
|
+
Caption?: React.FC<any>;
|
|
19
|
+
TableContainer?: React.FC<any>;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
styles?: TableViewStyles;
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export declare type TableViewStyles = {
|
|
3
|
+
table?: CSSProperties;
|
|
4
|
+
thead?: CSSProperties;
|
|
5
|
+
tfoot?: CSSProperties;
|
|
6
|
+
tbody?: CSSProperties;
|
|
7
|
+
tr?: CSSProperties;
|
|
8
|
+
td?: CSSProperties;
|
|
9
|
+
th?: CSSProperties;
|
|
10
|
+
caption?: CSSProperties;
|
|
11
|
+
};
|
|
12
|
+
export interface Column {
|
|
13
|
+
title: string;
|
|
14
|
+
field: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FooterCell {
|
|
17
|
+
value: string;
|
|
18
|
+
props?: any;
|
|
19
|
+
}
|