listpage-next 0.0.228 → 0.0.230
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/components/Menu/types.d.ts +1 -0
- package/dist/components/Menu/utils.js +0 -1
- package/dist/features/ChatClient/ui/ChatInput/index.d.ts +1 -0
- package/dist/features/ChatClient/ui/ChatInput/index.js +2 -2
- package/dist/features/ListPage/components/DataTable/index.js +3 -1
- package/dist/features/ListPage/components/DataTable/types.d.ts +3 -1
- package/dist/features/ListPage/components/ListPageContainer/index.d.ts +1 -0
- package/dist/features/ListPage/components/ListPageContainer/index.js +5 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { ChatInputBottom, ChatInputContent, ChatInputPanel, ExtraContainer, Send
|
|
|
6
6
|
import { useTrigger } from "./hooks/useTrigger.js";
|
|
7
7
|
import { IconSend } from "../../icons/IconSend.js";
|
|
8
8
|
const ChatInput = (props)=>{
|
|
9
|
-
const { style, className, placeholder, extra, actions, loading, onSubmit, skills = [] } = props;
|
|
9
|
+
const { style, className, placeholder, extra, actions, loading, onSubmit, disabled, skills = [] } = props;
|
|
10
10
|
const ref = useRef(null);
|
|
11
11
|
const [inputValue, setInputValue] = useState('');
|
|
12
12
|
const { interceptKeyDown, ...triggerProps } = useTrigger({
|
|
@@ -58,7 +58,7 @@ const ChatInput = (props)=>{
|
|
|
58
58
|
variant: "filled",
|
|
59
59
|
onClick: handleClickSend,
|
|
60
60
|
onKeyDown: handleKeyDown,
|
|
61
|
-
disabled: !inputValue && !loading,
|
|
61
|
+
disabled: disabled || !inputValue && !loading,
|
|
62
62
|
icon: /*#__PURE__*/ jsx(IconSend, {
|
|
63
63
|
size: 16
|
|
64
64
|
}),
|
|
@@ -7,15 +7,17 @@ import { useSelectionTools } from "../../hooks/useSelectionTools.js";
|
|
|
7
7
|
import { useListPageStore } from "../../context/index.js";
|
|
8
8
|
import { TableContainer } from "../../styles.js";
|
|
9
9
|
const DataTable = observer((props)=>{
|
|
10
|
-
const { title, extra, columns = [], rowTitleKey, rowSelectionType, tableProps } = props;
|
|
10
|
+
const { title, extra, columns = [], rowTitleKey, rowSelectionType, tableProps, variant, style } = props;
|
|
11
11
|
const store = useListPageStore();
|
|
12
12
|
const paginationEle = usePagination(tableProps?.pagination);
|
|
13
13
|
const newColumns = useColumns(columns);
|
|
14
14
|
const extraEle = 'function' == typeof extra ? extra(store) : extra;
|
|
15
15
|
const selectionToolEle = useSelectionTools(rowTitleKey);
|
|
16
16
|
return /*#__PURE__*/ jsxs(Card, {
|
|
17
|
+
variant: variant,
|
|
17
18
|
title: selectionToolEle || title,
|
|
18
19
|
extra: extraEle,
|
|
20
|
+
style: style,
|
|
19
21
|
styles: {
|
|
20
22
|
body: {
|
|
21
23
|
padding: 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TableProps, TagProps, TypographyProps } from 'antd';
|
|
2
2
|
import { ColumnType } from 'antd/es/table';
|
|
3
|
-
import { HTMLAttributeAnchorTarget, ReactNode } from 'react';
|
|
3
|
+
import { CSSProperties, HTMLAttributeAnchorTarget, ReactNode } from 'react';
|
|
4
4
|
import { ListPageStore } from '../../context';
|
|
5
5
|
export type ComponentType = 'text' | 'time' | 'tag' | 'link' | 'switch';
|
|
6
6
|
export type ComponentProps<RecordValue extends Record<string, any> = any> = {
|
|
@@ -34,6 +34,8 @@ export interface DataTableProps<FilterValue = any, RecordValue extends Record<st
|
|
|
34
34
|
rowSelectionType?: 'checkbox' | 'radio';
|
|
35
35
|
rowTitleKey?: string;
|
|
36
36
|
columns?: ListPageTableColumn<FilterValue, RecordValue>[];
|
|
37
|
+
variant?: 'borderless' | 'outlined';
|
|
38
|
+
style?: CSSProperties;
|
|
37
39
|
tableProps?: Omit<TableProps<RecordValue>, 'dataSource' | 'title' | 'columns'>;
|
|
38
40
|
}
|
|
39
41
|
export type ColumnRender<Type extends ComponentType, R extends Record<string, any> = any, K extends string = any> = (value: R[K], record: R, index: number, props: ComponentProps<R>[Type]) => ReactNode;
|
|
@@ -4,6 +4,7 @@ import { ListPageContext } from '../..';
|
|
|
4
4
|
export interface ListPageProps<FilterValue = any, RecordValue extends Record<string, any> = any> {
|
|
5
5
|
styles?: {
|
|
6
6
|
page?: React.CSSProperties;
|
|
7
|
+
table?: React.CSSProperties;
|
|
7
8
|
};
|
|
8
9
|
pageRef?: React.RefObject<ListPageContext<FilterValue, RecordValue>>;
|
|
9
10
|
request: ListPageRequest<FilterValue, RecordValue>;
|