@vis3/kit 1.0.0-alpha.7 → 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/README.md +4 -2
- package/dist/components/Renderer/Block/index.d.ts +3 -1
- package/dist/components/Renderer/ImageList/index.d.ts +4 -0
- package/dist/components/Renderer/contexts/preview.context.d.ts +2 -0
- package/dist/index.mjs +9909 -9896
- package/dist/index.umd.js +136 -136
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -48,8 +48,8 @@ export default function App() {
|
|
|
48
48
|
|
|
49
49
|
| 属性 | 类型 | 默认值 | 说明 |
|
|
50
50
|
|------|------|--------|------|
|
|
51
|
-
| id | string | - |
|
|
52
|
-
| path | string | - |
|
|
51
|
+
| id | string | - | |
|
|
52
|
+
| path | string | - | s3 file path |
|
|
53
53
|
| dataSource | BucketType \| BucketType[] | - | 数据源,可以是单个文件/目录对象或数组 |
|
|
54
54
|
| loading | boolean | false | 加载状态 |
|
|
55
55
|
| onClose | () => void | - | 关闭按钮点击回调 |
|
|
@@ -63,6 +63,8 @@ export default function App() {
|
|
|
63
63
|
| showDownload | boolean | true | 是否显示下载按钮 |
|
|
64
64
|
| closeable | boolean | false | 是否可关闭 |
|
|
65
65
|
| onChange | (params: Partial<BucketParams>) => void | - | 参数变更回调 |
|
|
66
|
+
| onLinkClick | (path: string) => void | - | json视图 链接 点击回调 |
|
|
67
|
+
| onKeyClick | (field: string, value: string | number | object) => void | - | json视图 字段键 点击回调|
|
|
66
68
|
| renderBucketItem | (item: BucketType) => React.ReactNode | - | 自定义渲染列表项 |
|
|
67
69
|
| previewUrl | string | - | 预览文件的URL |
|
|
68
70
|
| onOpenInNewTab | (path: string) => void | - | 在新标签页打开回调 |
|
|
@@ -22,5 +22,7 @@ export interface BucketBlockProps<BucketType extends BaseBucketType> {
|
|
|
22
22
|
renderBucketItem?: (item: BucketType) => React.ReactNode;
|
|
23
23
|
previewUrl?: string;
|
|
24
24
|
onOpenInNewTab?: (path: string) => void;
|
|
25
|
+
onLinkClick?: (path: string) => void;
|
|
26
|
+
onKeyClick?: (path: string, value: string) => void;
|
|
25
27
|
}
|
|
26
|
-
export declare function BucketBlock<T extends BaseBucketType>({ id, path, onClose, dataSource, style, className, loading, onDownload, pageSize, pageNo, onPathCorrection, showGoParent, showPagination, onChange, closeable, showOpenInNewTab, onOpenInNewTab, renderBucketItem, previewUrl, showDownload, }: BucketBlockProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function BucketBlock<T extends BaseBucketType>({ id, path, onClose, dataSource, style, className, loading, onDownload, pageSize, pageNo, onPathCorrection, showGoParent, showPagination, onChange, closeable, showOpenInNewTab, onOpenInNewTab, renderBucketItem, previewUrl, showDownload, onLinkClick, onKeyClick, }: BucketBlockProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,4 +7,8 @@ export interface ImageListProps {
|
|
|
7
7
|
data: string[] | ImageItem[];
|
|
8
8
|
name: string;
|
|
9
9
|
}
|
|
10
|
+
export declare const ErrorContainer: import("@emotion/styled").StyledComponent<{
|
|
11
|
+
theme?: import("@emotion/react").Theme;
|
|
12
|
+
as?: React.ElementType;
|
|
13
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
10
14
|
export default function ImageListCard({ className, name, value, extraTail }: RendererProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -15,6 +15,8 @@ export interface RenderBlockContextType<BucketType extends BaseBucketType> {
|
|
|
15
15
|
onDownload?: (path: string) => void;
|
|
16
16
|
renderBucketItem?: (item: BucketType) => React.ReactNode;
|
|
17
17
|
previewUrl?: string;
|
|
18
|
+
onLinkClick?: (path: string) => void;
|
|
19
|
+
onKeyClick?: (path: string, value: string) => void;
|
|
18
20
|
}
|
|
19
21
|
export declare const PreviewBlockContext: import("react").Context<RenderBlockContextType<BaseBucketType>>;
|
|
20
22
|
export declare function usePreviewBlockContext<T extends BaseBucketType>(): RenderBlockContextType<T>;
|