@cozeloop/components 0.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/README.md +3 -0
- package/dist/base-search-select/base-search-form-select.d.ts +3 -0
- package/dist/base-search-select/base-search-form-select.js +6 -0
- package/dist/base-search-select/base-search-form-select.js.map +1 -0
- package/dist/base-search-select/base-search-select.d.ts +9 -0
- package/dist/base-search-select/base-search-select.js +125 -0
- package/dist/base-search-select/base-search-select.js.map +1 -0
- package/dist/base-search-select/index.d.ts +3 -0
- package/dist/base-search-select/index.js +3 -0
- package/dist/base-search-select/index.js.map +1 -0
- package/dist/base-search-select/types.d.ts +10 -0
- package/dist/base-search-select/types.js +2 -0
- package/dist/base-search-select/types.js.map +1 -0
- package/dist/base-search-select/utils.d.ts +8 -0
- package/dist/base-search-select/utils.js +48 -0
- package/dist/base-search-select/utils.js.map +1 -0
- package/dist/code-editor/index.d.ts +3 -0
- package/dist/code-editor/index.js +6 -0
- package/dist/code-editor/index.js.map +1 -0
- package/dist/collapse-card/index.d.ts +13 -0
- package/dist/collapse-card/index.js +31 -0
- package/dist/collapse-card/index.js.map +1 -0
- package/dist/collapsible-card/index.d.ts +13 -0
- package/dist/collapsible-card/index.js +13 -0
- package/dist/collapsible-card/index.js.map +1 -0
- package/dist/column-manage-storage/index.d.ts +11 -0
- package/dist/column-manage-storage/index.js +48 -0
- package/dist/column-manage-storage/index.js.map +1 -0
- package/dist/columns-select/index.d.ts +19 -0
- package/dist/columns-select/index.js +79 -0
- package/dist/columns-select/index.js.map +1 -0
- package/dist/edit-icon-button/index.d.ts +8 -0
- package/dist/edit-icon-button/index.js +13 -0
- package/dist/edit-icon-button/index.js.map +1 -0
- package/dist/es/collapsible-card/index.js +45 -0
- package/dist/es/collapsible-card/index.module.js +5 -0
- package/dist/es/collapsible-card/index_module.css +48 -0
- package/dist/es/column-manage-storage/index.js +73 -0
- package/dist/es/columns-select/index.js +219 -0
- package/dist/es/hooks/use-infinite-scroll.js +178 -0
- package/dist/es/hooks/use-mouse-down-offset.js +41 -0
- package/dist/es/id-render/icon-button-container.js +61 -0
- package/dist/es/id-render/index.js +78 -0
- package/dist/es/index.js +66 -0
- package/dist/es/infinite-scroll-table/index.js +98 -0
- package/dist/es/input-slider/index.js +123 -0
- package/dist/es/input-slider/index.module.js +5 -0
- package/dist/es/input-slider/index_module.css +21 -0
- package/dist/es/large-txt-render/index.js +38 -0
- package/dist/es/page-content/index.js +108 -0
- package/dist/es/primary-page/index.js +4 -0
- package/dist/es/primary-page/primary-header.js +38 -0
- package/dist/es/resize-sidesheet/index.js +100 -0
- package/dist/es/resize-sidesheet/index.module.js +5 -0
- package/dist/es/resize-sidesheet/index_module.css +9 -0
- package/dist/es/resize-sidesheet/use-drag.js +31 -0
- package/dist/es/table/index.js +56 -0
- package/dist/es/table/index.module.js +5 -0
- package/dist/es/table/index_module.css +90 -0
- package/dist/es/table/sort-icon.js +105 -0
- package/dist/es/table/table-with-pagination.js +112 -0
- package/dist/es/table/table-without-pagniation.js +74 -0
- package/dist/es/table-col-actions/index.js +103 -0
- package/dist/es/table-header/index.js +68 -0
- package/dist/es/table-header/index.module.js +5 -0
- package/dist/es/table-header/index_module.css +3 -0
- package/dist/es/tabs/index.js +42 -0
- package/dist/es/tabs/index.module.js +5 -0
- package/dist/es/tabs/index_module.css +37 -0
- package/dist/es/text-with-copy/index.js +71 -0
- package/dist/es/tooltip-with-disabled/index.js +49 -0
- package/dist/es/utils/basic.js +44 -0
- package/dist/es/utils/rect.js +37 -0
- package/dist/hooks/use-infinite-scroll.d.ts +23 -0
- package/dist/hooks/use-infinite-scroll.js +133 -0
- package/dist/hooks/use-infinite-scroll.js.map +1 -0
- package/dist/hooks/use-mouse-down-offset.d.ts +9 -0
- package/dist/hooks/use-mouse-down-offset.js +39 -0
- package/dist/hooks/use-mouse-down-offset.js.map +1 -0
- package/dist/id-render/icon-button-container.d.ts +6 -0
- package/dist/id-render/icon-button-container.js +6 -0
- package/dist/id-render/icon-button-container.js.map +1 -0
- package/dist/id-render/index.d.ts +7 -0
- package/dist/id-render/index.js +21 -0
- package/dist/id-render/index.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/infinite-scroll-table/index.d.ts +19 -0
- package/dist/infinite-scroll-table/index.js +34 -0
- package/dist/infinite-scroll-table/index.js.map +1 -0
- package/dist/info-tooltip/index.d.ts +6 -0
- package/dist/info-tooltip/index.js +6 -0
- package/dist/info-tooltip/index.js.map +1 -0
- package/dist/input-slider/index.d.ts +14 -0
- package/dist/input-slider/index.js +81 -0
- package/dist/input-slider/index.js.map +1 -0
- package/dist/jump-button/jump-icon-button.d.ts +4 -0
- package/dist/jump-button/jump-icon-button.js +7 -0
- package/dist/jump-button/jump-icon-button.js.map +1 -0
- package/dist/large-txt-render/index.d.ts +4 -0
- package/dist/large-txt-render/index.js +26 -0
- package/dist/large-txt-render/index.js.map +1 -0
- package/dist/lib/collapsible-card/index.js +79 -0
- package/dist/lib/collapsible-card/index.module.js +25 -0
- package/dist/lib/collapsible-card/index_module.css +48 -0
- package/dist/lib/column-manage-storage/index.js +98 -0
- package/dist/lib/columns-select/index.js +241 -0
- package/dist/lib/hooks/use-infinite-scroll.js +195 -0
- package/dist/lib/hooks/use-mouse-down-offset.js +65 -0
- package/dist/lib/id-render/icon-button-container.js +89 -0
- package/dist/lib/id-render/index.js +112 -0
- package/dist/lib/index.js +110 -0
- package/dist/lib/infinite-scroll-table/index.js +126 -0
- package/dist/lib/input-slider/index.js +154 -0
- package/dist/lib/input-slider/index.module.js +25 -0
- package/dist/lib/input-slider/index_module.css +21 -0
- package/dist/lib/large-txt-render/index.js +62 -0
- package/dist/lib/page-content/index.js +136 -0
- package/dist/lib/primary-page/index.js +28 -0
- package/dist/lib/primary-page/primary-header.js +72 -0
- package/dist/lib/resize-sidesheet/index.js +129 -0
- package/dist/lib/resize-sidesheet/index.module.js +25 -0
- package/dist/lib/resize-sidesheet/index_module.css +9 -0
- package/dist/lib/resize-sidesheet/use-drag.js +55 -0
- package/dist/lib/table/index.js +88 -0
- package/dist/lib/table/index.module.js +25 -0
- package/dist/lib/table/index_module.css +90 -0
- package/dist/lib/table/sort-icon.js +137 -0
- package/dist/lib/table/table-with-pagination.js +146 -0
- package/dist/lib/table/table-without-pagniation.js +108 -0
- package/dist/lib/table-col-actions/index.js +123 -0
- package/dist/lib/table-header/index.js +96 -0
- package/dist/lib/table-header/index.module.js +25 -0
- package/dist/lib/table-header/index_module.css +3 -0
- package/dist/lib/tabs/index.js +74 -0
- package/dist/lib/tabs/index.module.js +25 -0
- package/dist/lib/tabs/index_module.css +37 -0
- package/dist/lib/text-with-copy/index.js +105 -0
- package/dist/lib/tooltip-with-disabled/index.js +71 -0
- package/dist/lib/utils/basic.js +78 -0
- package/dist/lib/utils/rect.js +65 -0
- package/dist/logic-expr/consts.d.ts +4 -0
- package/dist/logic-expr/consts.js +5 -0
- package/dist/logic-expr/consts.js.map +1 -0
- package/dist/logic-expr/expr-group-render.d.ts +2 -0
- package/dist/logic-expr/expr-group-render.js +60 -0
- package/dist/logic-expr/expr-group-render.js.map +1 -0
- package/dist/logic-expr/expr-render.d.ts +2 -0
- package/dist/logic-expr/expr-render.js +84 -0
- package/dist/logic-expr/expr-render.js.map +1 -0
- package/dist/logic-expr/index.d.ts +2 -0
- package/dist/logic-expr/index.js +2 -0
- package/dist/logic-expr/index.js.map +1 -0
- package/dist/logic-expr/logic-expr.d.ts +2 -0
- package/dist/logic-expr/logic-expr.js +187 -0
- package/dist/logic-expr/logic-expr.js.map +1 -0
- package/dist/logic-expr/logic-not.d.ts +10 -0
- package/dist/logic-expr/logic-not.js +20 -0
- package/dist/logic-expr/logic-not.js.map +1 -0
- package/dist/logic-expr/logic-toggle.d.ts +12 -0
- package/dist/logic-expr/logic-toggle.js +32 -0
- package/dist/logic-expr/logic-toggle.js.map +1 -0
- package/dist/logic-expr/types.d.ts +79 -0
- package/dist/logic-expr/types.js +2 -0
- package/dist/logic-expr/types.js.map +1 -0
- package/dist/open-detail-button/index.d.ts +6 -0
- package/dist/open-detail-button/index.js +11 -0
- package/dist/open-detail-button/index.js.map +1 -0
- package/dist/page-content/index.d.ts +20 -0
- package/dist/page-content/index.js +23 -0
- package/dist/page-content/index.js.map +1 -0
- package/dist/primary-page/index.d.ts +1 -0
- package/dist/primary-page/index.js +2 -0
- package/dist/primary-page/index.js.map +1 -0
- package/dist/primary-page/primary-header.d.ts +10 -0
- package/dist/primary-page/primary-header.js +4 -0
- package/dist/primary-page/primary-header.js.map +1 -0
- package/dist/resize-sidesheet/index.d.ts +6 -0
- package/dist/resize-sidesheet/index.js +15 -0
- package/dist/resize-sidesheet/index.js.map +1 -0
- package/dist/resize-sidesheet/use-drag.d.ts +10 -0
- package/dist/resize-sidesheet/use-drag.js +25 -0
- package/dist/resize-sidesheet/use-drag.js.map +1 -0
- package/dist/route/route-back-action.d.ts +6 -0
- package/dist/route/route-back-action.js +29 -0
- package/dist/route/route-back-action.js.map +1 -0
- package/dist/table/index.d.ts +2 -0
- package/dist/table/index.js +6 -0
- package/dist/table/index.js.map +1 -0
- package/dist/table/sort-icon.d.ts +8 -0
- package/dist/table/sort-icon.js +30 -0
- package/dist/table/sort-icon.js.map +1 -0
- package/dist/table/table-with-pagination.d.ts +14 -0
- package/dist/table/table-with-pagination.js +55 -0
- package/dist/table/table-with-pagination.js.map +1 -0
- package/dist/table/table-without-pagniation.d.ts +8 -0
- package/dist/table/table-without-pagniation.js +36 -0
- package/dist/table/table-without-pagniation.js.map +1 -0
- package/dist/table-col-actions/index.d.ts +17 -0
- package/dist/table-col-actions/index.js +24 -0
- package/dist/table-col-actions/index.js.map +1 -0
- package/dist/table-header/index.d.ts +12 -0
- package/dist/table-header/index.js +10 -0
- package/dist/table-header/index.js.map +1 -0
- package/dist/tabs/index.d.ts +2 -0
- package/dist/tabs/index.js +9 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/text-with-copy/index.d.ts +14 -0
- package/dist/text-with-copy/index.js +21 -0
- package/dist/text-with-copy/index.js.map +1 -0
- package/dist/tooltip-with-disabled/index.d.ts +5 -0
- package/dist/tooltip-with-disabled/index.js +9 -0
- package/dist/tooltip-with-disabled/index.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/collapsible-card/index.d.ts +22 -0
- package/dist/types/column-manage-storage/index.d.ts +11 -0
- package/dist/types/columns-select/index.d.ts +29 -0
- package/dist/types/hooks/use-infinite-scroll.d.ts +23 -0
- package/dist/types/hooks/use-mouse-down-offset.d.ts +9 -0
- package/dist/types/id-render/icon-button-container.d.ts +12 -0
- package/dist/types/id-render/index.d.ts +13 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/infinite-scroll-table/index.d.ts +19 -0
- package/dist/types/input-slider/index.d.ts +14 -0
- package/dist/types/large-txt-render/index.d.ts +4 -0
- package/dist/types/page-content/index.d.ts +36 -0
- package/dist/types/primary-page/index.d.ts +1 -0
- package/dist/types/primary-page/primary-header.d.ts +17 -0
- package/dist/types/resize-sidesheet/index.d.ts +6 -0
- package/dist/types/resize-sidesheet/use-drag.d.ts +10 -0
- package/dist/types/table/index.d.ts +2 -0
- package/dist/types/table/sort-icon.d.ts +13 -0
- package/dist/types/table/table-with-pagination.d.ts +14 -0
- package/dist/types/table/table-without-pagniation.d.ts +8 -0
- package/dist/types/table-col-actions/index.d.ts +21 -0
- package/dist/types/table-header/index.d.ts +20 -0
- package/dist/types/tabs/index.d.ts +2 -0
- package/dist/types/text-with-copy/index.d.ts +24 -0
- package/dist/types/tooltip-with-disabled/index.d.ts +9 -0
- package/dist/types/utils/basic.d.ts +1 -0
- package/dist/types/utils/rect.d.ts +10 -0
- package/dist/upload/index.d.ts +9 -0
- package/dist/upload/index.js +25 -0
- package/dist/upload/index.js.map +1 -0
- package/dist/user-profile/index.d.ts +8 -0
- package/dist/user-profile/index.js +16 -0
- package/dist/user-profile/index.js.map +1 -0
- package/dist/user-select/index.d.ts +0 -0
- package/dist/user-select/index.js +188 -0
- package/dist/user-select/index.js.map +1 -0
- package/dist/user-select/user-info.d.ts +8 -0
- package/dist/user-select/user-info.js +16 -0
- package/dist/user-select/user-info.js.map +1 -0
- package/dist/utils/basic.d.ts +1 -0
- package/dist/utils/basic.js +24 -0
- package/dist/utils/basic.js.map +1 -0
- package/dist/utils/rect.d.ts +10 -0
- package/dist/utils/rect.js +35 -0
- package/dist/utils/rect.js.map +1 -0
- package/dist/version-list/version-descriptions.d.ts +15 -0
- package/dist/version-list/version-descriptions.js +14 -0
- package/dist/version-list/version-descriptions.js.map +1 -0
- package/dist/version-list/version-item.d.ts +9 -0
- package/dist/version-list/version-item.js +6 -0
- package/dist/version-list/version-item.js.map +1 -0
- package/dist/version-list/version-list.d.ts +11 -0
- package/dist/version-list/version-list.js +11 -0
- package/dist/version-list/version-list.js.map +1 -0
- package/dist/version-list/version-switch-panel.d.ts +5 -0
- package/dist/version-list/version-switch-panel.js +10 -0
- package/dist/version-list/version-switch-panel.js.map +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: ReactNode;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
actionBtns?: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
hideExpand?: boolean;
|
|
9
|
+
isExpand?: boolean;
|
|
10
|
+
setIsExpand?: (isExpand: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function CollapsibleCard({
|
|
13
|
+
title,
|
|
14
|
+
children,
|
|
15
|
+
actionBtns,
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
isExpand,
|
|
19
|
+
setIsExpand,
|
|
20
|
+
hideExpand
|
|
21
|
+
}: Props): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ColumnItem } from '../columns-select';
|
|
2
|
+
export declare const DATASET_COLUMN_STORAGE_KEY = "dataset-column";
|
|
3
|
+
export declare const getColumnManageStorage: (storageKey: string) => any;
|
|
4
|
+
export interface ColumnSort {
|
|
5
|
+
[key: string]: {
|
|
6
|
+
index: number;
|
|
7
|
+
checked: boolean;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export declare const setColumnsManageStorage: (storageKey: string, columns: ColumnItem[]) => void;
|
|
11
|
+
export declare const dealColumnsWithStorage: (storageKey: string, columns: ColumnItem[]) => ColumnItem[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ColumnProps } from '@coze-arch/coze-design';
|
|
2
|
+
export interface ColumnItem extends ColumnProps {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ColumnSelectorProps {
|
|
9
|
+
columns: ColumnItem[];
|
|
10
|
+
onChange?: (items: ColumnItem[]) => void;
|
|
11
|
+
buttonText?: string;
|
|
12
|
+
resetButtonText?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
sortable?: boolean;
|
|
15
|
+
defaultColumns?: ColumnItem[];
|
|
16
|
+
itemRender?: (item: ColumnItem) => React.ReactNode;
|
|
17
|
+
footerRender?: (item: ColumnItem[]) => React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
export declare const ColumnSelector: ({
|
|
20
|
+
columns,
|
|
21
|
+
defaultColumns,
|
|
22
|
+
onChange,
|
|
23
|
+
buttonText,
|
|
24
|
+
resetButtonText,
|
|
25
|
+
className,
|
|
26
|
+
sortable,
|
|
27
|
+
itemRender,
|
|
28
|
+
footerRender
|
|
29
|
+
}: ColumnSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type InfiniteScrollOptions, type Data, type Service } from 'ahooks/lib/useInfiniteScroll/types';
|
|
2
|
+
/**
|
|
3
|
+
* ahook的实现,在刷新列表时会出现以下两个问题
|
|
4
|
+
* 1. 发送存量数据对应的列表请求
|
|
5
|
+
* 2. 列表请求重复
|
|
6
|
+
* 因此fork ahook 实现,并将reload含义定义为刷新列表,并回到第一页
|
|
7
|
+
* @param service
|
|
8
|
+
* @param options
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare const useInfiniteScroll: <TData extends Data>(service: Service<TData>, options?: InfiniteScrollOptions<TData>) => {
|
|
12
|
+
data: TData | undefined;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
error: Error | undefined;
|
|
15
|
+
loadingMore: boolean;
|
|
16
|
+
noMore: boolean;
|
|
17
|
+
loadMore: () => void;
|
|
18
|
+
loadMoreAsync: () => Promise<TData>;
|
|
19
|
+
reload: () => void;
|
|
20
|
+
reloadAsync: () => Promise<TData>;
|
|
21
|
+
mutate: import("react").Dispatch<import("react").SetStateAction<TData | undefined>>;
|
|
22
|
+
cancel: () => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DOMAttributes } from 'react';
|
|
2
|
+
export default function IconButtonContainer({
|
|
3
|
+
icon,
|
|
4
|
+
className,
|
|
5
|
+
style,
|
|
6
|
+
onClick,
|
|
7
|
+
...rest
|
|
8
|
+
}: {
|
|
9
|
+
icon: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
} & DOMAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare function IDRender({
|
|
2
|
+
id,
|
|
3
|
+
showSuffixLength,
|
|
4
|
+
enableCopy,
|
|
5
|
+
useTag,
|
|
6
|
+
defaultShowCopyBtn
|
|
7
|
+
}: {
|
|
8
|
+
id: Int64;
|
|
9
|
+
showSuffixLength?: number;
|
|
10
|
+
enableCopy?: boolean;
|
|
11
|
+
useTag?: boolean;
|
|
12
|
+
defaultShowCopyBtn?: boolean;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { ColumnSelector, type ColumnItem } from './columns-select';
|
|
2
|
+
export { TooltipWhenDisabled } from './tooltip-with-disabled';
|
|
3
|
+
export { LoopTable } from './table';
|
|
4
|
+
export { TableWithPagination, DEFAULT_PAGE_SIZE, PAGE_SIZE_OPTIONS } from './table/table-with-pagination';
|
|
5
|
+
export { PageError, PageLoading, PageNoAuth, PageNoContent, PageNotFound, FullPage } from './page-content';
|
|
6
|
+
export { TableColActions } from './table-col-actions';
|
|
7
|
+
export { LoopTabs } from './tabs';
|
|
8
|
+
export { LargeTxtRender } from './large-txt-render';
|
|
9
|
+
export { InputSlider } from './input-slider';
|
|
10
|
+
export { handleCopy } from './utils/basic';
|
|
11
|
+
export { TextWithCopy } from './text-with-copy';
|
|
12
|
+
export { IDRender } from './id-render';
|
|
13
|
+
export { default as IconButtonContainer } from './id-render/icon-button-container';
|
|
14
|
+
export { getColumnManageStorage, setColumnsManageStorage, dealColumnsWithStorage } from './column-manage-storage';
|
|
15
|
+
export { PrimaryPage } from './primary-page';
|
|
16
|
+
export { ResizeSidesheet } from './resize-sidesheet';
|
|
17
|
+
export { InfiniteScrollTable, type InfiniteScrollTableRef } from './infinite-scroll-table';
|
|
18
|
+
export { TableHeader, type TableHeaderProps } from './table-header';
|
|
19
|
+
export { TableWithoutPagination } from './table/table-without-pagniation';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ForwardedRef } from 'react';
|
|
2
|
+
import { type Data, type InfiniteScrollOptions, type Service } from 'ahooks/lib/useInfiniteScroll/types';
|
|
3
|
+
import { useInfiniteScroll } from 'ahooks';
|
|
4
|
+
import { type TableProps } from '@coze-arch/coze-design';
|
|
5
|
+
interface ExpandData extends Data {
|
|
6
|
+
hasMore?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface InfiniteScrollTableProps<TData extends ExpandData> {
|
|
9
|
+
service: Service<TData>;
|
|
10
|
+
options?: InfiniteScrollOptions<TData>;
|
|
11
|
+
}
|
|
12
|
+
export interface InfiniteScrollTableRef {
|
|
13
|
+
hookRes: ReturnType<typeof useInfiniteScroll>;
|
|
14
|
+
}
|
|
15
|
+
type Props<TData extends ExpandData> = TableProps & InfiniteScrollTableProps<TData>;
|
|
16
|
+
export declare const InfiniteScrollTable: <TData extends ExpandData>(props: Props<TData> & {
|
|
17
|
+
ref?: ForwardedRef<InfiniteScrollTableRef>;
|
|
18
|
+
}) => React.ReactElement | null;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type SliderProps } from '@coze-arch/coze-design';
|
|
2
|
+
interface InputSliderProps {
|
|
3
|
+
value?: number;
|
|
4
|
+
onChange?: (v: number) => void;
|
|
5
|
+
max?: number;
|
|
6
|
+
min?: number;
|
|
7
|
+
step?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
decimalPlaces?: number;
|
|
10
|
+
marks?: SliderProps['marks'];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const InputSlider: React.FC<InputSliderProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type EmptyStateProps } from '@coze-arch/coze-design';
|
|
3
|
+
interface PageLoadingProps {
|
|
4
|
+
tip?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
interface FullPageProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
type PageContentProps = Omit<EmptyStateProps, 'image' | 'darkModeImage'>;
|
|
14
|
+
export declare function FullPage({
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
style
|
|
18
|
+
}: FullPageProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function PageLoading(props: PageLoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function PageNotFound({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: PageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function PageError({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: PageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function PageNoAuth({
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: PageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function PageNoContent({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: PageContentProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PrimaryPage } from './primary-header';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface PrimaryPageHeaderProps {
|
|
2
|
+
pageTitle?: string;
|
|
3
|
+
filterSlot?: React.ReactNode;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
contentClassName?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
titleSlot?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const PrimaryPage: ({
|
|
10
|
+
pageTitle,
|
|
11
|
+
filterSlot,
|
|
12
|
+
children,
|
|
13
|
+
contentClassName,
|
|
14
|
+
className,
|
|
15
|
+
titleSlot
|
|
16
|
+
}: PrimaryPageHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type SideSheetReactProps } from '@coze-arch/coze-design';
|
|
2
|
+
import { type DragOptions } from './use-drag';
|
|
3
|
+
export declare const ResizeSidesheet: (props: SideSheetReactProps & {
|
|
4
|
+
dragOptions?: DragOptions;
|
|
5
|
+
showDivider?: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface DragOptions {
|
|
2
|
+
defaultWidth?: number;
|
|
3
|
+
maxWidth?: number;
|
|
4
|
+
minWidth?: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const useDrag: (options?: DragOptions) => {
|
|
7
|
+
sidePaneWidth: number;
|
|
8
|
+
containerRef: (node: HTMLElement | null) => void;
|
|
9
|
+
isActive: boolean;
|
|
10
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type SVGAttributes } from 'react';
|
|
2
|
+
export declare const IconSortArrow: ({
|
|
3
|
+
sortOrder,
|
|
4
|
+
...rest
|
|
5
|
+
}: {
|
|
6
|
+
sortOrder?: "ascend" | "descend" | boolean;
|
|
7
|
+
} & SVGAttributes<HTMLOrSVGElement>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
/** 表格排序专用图标 */
|
|
9
|
+
export default function LoopTableSortIcon({
|
|
10
|
+
sortOrder
|
|
11
|
+
}: {
|
|
12
|
+
sortOrder?: 'ascend' | 'descend' | boolean;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Params, type PaginationResult } from 'ahooks/lib/usePagination/types';
|
|
2
|
+
import { type TableProps } from '@coze-arch/coze-design';
|
|
3
|
+
export declare const PAGE_SIZE_OPTIONS: number[];
|
|
4
|
+
export declare const DEFAULT_PAGE_SIZE = 10;
|
|
5
|
+
export declare function TableWithPagination<RecordItem>(props: TableProps & {
|
|
6
|
+
heightFull?: boolean;
|
|
7
|
+
service: Pick<PaginationResult<{
|
|
8
|
+
total: number;
|
|
9
|
+
list: RecordItem[];
|
|
10
|
+
}, Params>, 'data' | 'pagination' | 'loading'>;
|
|
11
|
+
pageSizeOpts?: number[];
|
|
12
|
+
header?: React.ReactNode;
|
|
13
|
+
footerWithPagination?: React.ReactNode;
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type TableProps } from '@coze-arch/coze-design';
|
|
2
|
+
export declare const PAGE_SIZE_OPTIONS: number[];
|
|
3
|
+
export declare const DEFAULT_PAGE_SIZE = 10;
|
|
4
|
+
export declare function TableWithoutPagination(props: TableProps & {
|
|
5
|
+
heightFull?: boolean;
|
|
6
|
+
pageSizeOpts?: number[];
|
|
7
|
+
header?: React.ReactNode;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type TypographyProps } from '@coze-arch/coze-design';
|
|
3
|
+
interface Props {
|
|
4
|
+
actions: {
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
hide?: boolean;
|
|
9
|
+
type?: TypographyProps['type'];
|
|
10
|
+
disabledTooltip?: string;
|
|
11
|
+
onClick?: () => void;
|
|
12
|
+
}[];
|
|
13
|
+
maxCount?: number;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function TableColActions({
|
|
17
|
+
actions,
|
|
18
|
+
maxCount,
|
|
19
|
+
disabled
|
|
20
|
+
}: Props): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type ButtonProps } from '@coze-arch/coze-design';
|
|
2
|
+
import { type ColumnSelectorProps } from "../columns-select";
|
|
3
|
+
export interface TableHeaderProps {
|
|
4
|
+
columnSelectorConfigProps?: ColumnSelectorProps;
|
|
5
|
+
filterForm?: React.ReactNode;
|
|
6
|
+
actions?: React.ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
spaceProps?: Record<string, unknown>;
|
|
10
|
+
refreshButtonPros?: ButtonProps;
|
|
11
|
+
}
|
|
12
|
+
export declare function TableHeader({
|
|
13
|
+
columnSelectorConfigProps,
|
|
14
|
+
filterForm,
|
|
15
|
+
actions,
|
|
16
|
+
className,
|
|
17
|
+
style,
|
|
18
|
+
spaceProps,
|
|
19
|
+
refreshButtonPros
|
|
20
|
+
}: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CSSProperties } from 'react';
|
|
2
|
+
interface TextWithCopyProps {
|
|
3
|
+
content?: string;
|
|
4
|
+
displayText?: string;
|
|
5
|
+
copyTooltipText?: string;
|
|
6
|
+
maxWidth?: number | string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: CSSProperties;
|
|
9
|
+
textClassName?: string;
|
|
10
|
+
textType?: 'success' | 'secondary' | 'primary' | 'danger' | 'warning' | 'tertiary' | 'quaternary';
|
|
11
|
+
onlyIconCopy?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function TextWithCopy({
|
|
14
|
+
displayText,
|
|
15
|
+
copyTooltipText,
|
|
16
|
+
content,
|
|
17
|
+
className,
|
|
18
|
+
maxWidth,
|
|
19
|
+
style,
|
|
20
|
+
textClassName,
|
|
21
|
+
textType,
|
|
22
|
+
onlyIconCopy
|
|
23
|
+
}: TextWithCopyProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type TooltipProps } from '@coze-arch/coze-design';
|
|
2
|
+
export interface TooltipWhenDisabledProps extends TooltipProps {
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function TooltipWhenDisabled({
|
|
6
|
+
children,
|
|
7
|
+
disabled,
|
|
8
|
+
...rest
|
|
9
|
+
}: TooltipWhenDisabledProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const handleCopy: (value: string, hideToast?: boolean) => Promise<boolean>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
export declare const isBrowser: boolean;
|
|
3
|
+
export declare const getScrollTop: (el: Document | Element) => number;
|
|
4
|
+
export declare const getScrollHeight: (el: Document | Element) => number;
|
|
5
|
+
export declare const getClientHeight: (el: Document | Element) => number;
|
|
6
|
+
type TargetValue<T> = T | undefined | null;
|
|
7
|
+
type TargetType = HTMLElement | Element | Window | Document;
|
|
8
|
+
export type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
|
|
9
|
+
export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): TargetValue<T>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type customRequestArgs } from '@coze-arch/coze-design';
|
|
2
|
+
export declare function uploadFile({ file, fileType, onProgress, onSuccess, onError, spaceID, }: {
|
|
3
|
+
file: File;
|
|
4
|
+
fileType?: 'image' | 'object';
|
|
5
|
+
onProgress?: customRequestArgs['onProgress'];
|
|
6
|
+
onSuccess?: customRequestArgs['onSuccess'];
|
|
7
|
+
onError?: customRequestArgs['onError'];
|
|
8
|
+
spaceID: string;
|
|
9
|
+
}): Promise<string>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function uploadFile({ file, fileType = 'image', onProgress, onSuccess, onError, spaceID, }) {
|
|
2
|
+
const result = new Promise((resolve, reject) => {
|
|
3
|
+
(async function () {
|
|
4
|
+
try {
|
|
5
|
+
const formData = new FormData();
|
|
6
|
+
formData.append('file', file);
|
|
7
|
+
formData.append('business_type', 'evaluation');
|
|
8
|
+
formData.append('workspace_id', spaceID);
|
|
9
|
+
const res = await fetch('/api/foundation/v1/files', {
|
|
10
|
+
method: 'POST',
|
|
11
|
+
body: formData,
|
|
12
|
+
});
|
|
13
|
+
const resObj = await res.json();
|
|
14
|
+
onSuccess?.({ status: 200, Uri: resObj?.data?.file_name });
|
|
15
|
+
resolve(resObj?.data?.file_name ?? '');
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
onError?.({ status: 500 });
|
|
19
|
+
reject(e);
|
|
20
|
+
}
|
|
21
|
+
})();
|
|
22
|
+
});
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/upload/index.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,UAAU,CAAC,EACzB,IAAI,EACJ,QAAQ,GAAG,OAAO,EAClB,UAAU,EACV,SAAS,EACT,OAAO,EACP,OAAO,GAQR;IACC,MAAM,MAAM,GAAG,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrD,CAAC,KAAK;YACJ,IAAI,CAAC;gBACH,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;gBAChC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;gBAC9B,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;gBAC/C,QAAQ,CAAC,MAAM,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;gBACzC,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,0BAA0B,EAAE;oBAClD,MAAM,EAAE,MAAM;oBACd,IAAI,EAAE,QAAQ;iBACf,CAAC,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;gBAChC,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;gBAC3D,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;YACzC,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;gBAC3B,MAAM,CAAC,CAAC,CAAC,CAAC;YACZ,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface UserInfoProps {
|
|
2
|
+
avatarUrl?: string;
|
|
3
|
+
name?: string;
|
|
4
|
+
className?: string;
|
|
5
|
+
avatarClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const UserProfile: ({ avatarUrl, name, className, avatarClassName, }: UserInfoProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { CozAvatar, Typography } from '@coze-arch/coze-design';
|
|
4
|
+
export const UserProfile = ({ avatarUrl, name, className, avatarClassName, }) => (_jsxs("div", { className: cn('flex items-center gap-[6px] w-full', className), children: [_jsx(CozAvatar, { className: cn('!w-[20px] !h-[20px]', avatarClassName), src: avatarUrl, children: name }), _jsx(Typography.Text, { className: "flex-1 overflow-hidden !text-[13px]", style: {
|
|
5
|
+
fontSize: 'inherit',
|
|
6
|
+
color: 'inherit',
|
|
7
|
+
fontWeight: 'inherit',
|
|
8
|
+
lineHeight: 'inherit',
|
|
9
|
+
}, ellipsis: {
|
|
10
|
+
showTooltip: {
|
|
11
|
+
opts: {
|
|
12
|
+
theme: 'dark',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
}, children: name })] }));
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/user-profile/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAQ/D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,SAAS,EACT,IAAI,EACJ,SAAS,EACT,eAAe,GACD,EAAE,EAAE,CAAC,CACnB,eAAK,SAAS,EAAE,EAAE,CAAC,oCAAoC,EAAE,SAAS,CAAC,aACjE,KAAC,SAAS,IACR,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,eAAe,CAAC,EACrD,GAAG,EAAE,SAAS,YAEb,IAAI,GACK,EACZ,KAAC,UAAU,CAAC,IAAI,IACd,SAAS,EAAC,qCAAqC,EAC/C,KAAK,EAAE;gBACL,QAAQ,EAAE,SAAS;gBACnB,KAAK,EAAE,SAAS;gBAChB,UAAU,EAAE,SAAS;gBACrB,UAAU,EAAE,SAAS;aACtB,EACD,QAAQ,EAAE;gBACR,WAAW,EAAE;oBACX,IAAI,EAAE;wBACJ,KAAK,EAAE,MAAM;qBACd;iBACF;aACF,YAEA,IAAI,GACW,IACd,CACP,CAAC"}
|
|
File without changes
|