@zjlab-fe/data-hub-ui 0.2.2 → 0.2.3

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.
@@ -1,3 +1,4 @@
1
+ import './utils/modalConfig.css';
1
2
  import { ModalProps } from 'antd';
2
3
  import { FileDraggerProps } from './FileUploaderFileDragger';
3
4
  import { FileInfo, UploadManager } from './types';
@@ -1,9 +1,11 @@
1
+ import './FileUploaderFileDragger.css';
1
2
  import { ReactNode } from 'react';
2
3
  export interface FileDraggerProps {
3
4
  accept?: string;
4
5
  directory?: boolean;
5
6
  dragAreaDescription?: ReactNode;
6
7
  maxSizePerFile?: number;
8
+ className?: string;
7
9
  onFileReceived: (_files: File[]) => void;
8
10
  }
9
- export default function FileUploaderFileDragger({ accept, directory, dragAreaDescription, maxSizePerFile, onFileReceived, }: FileDraggerProps): import("react/jsx-runtime").JSX.Element;
11
+ export default function FileUploaderFileDragger({ className, accept, directory, dragAreaDescription, maxSizePerFile, onFileReceived, }: FileDraggerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { UploadableFile } from './types';
3
+ import { Locale } from './translations';
3
4
  export type UploadStore = {
4
5
  [key: string]: UploadableFile[];
5
6
  };
@@ -27,10 +28,14 @@ type UploadStoreAction = {
27
28
  files: UploadableFile[];
28
29
  };
29
30
  type UploadStoreDispatch = React.Dispatch<UploadStoreAction>;
31
+ export declare const localeAtom: import("jotai").PrimitiveAtom<Locale> & {
32
+ init: Locale;
33
+ };
30
34
  export declare const TEMP_STORE: {};
31
35
  export declare const UploadStoreContext: React.Context<UploadStore>;
32
36
  export declare const UploadStoreDispatchContext: React.Context<UploadStoreDispatch>;
33
- export default function UploadStoreProvider({ children }: {
37
+ export default function UploadStoreProvider({ locale, children, }: {
38
+ locale?: 'zh' | 'en';
34
39
  children: React.ReactElement;
35
40
  }): import("react/jsx-runtime").JSX.Element;
36
41
  export {};
@@ -1 +1,2 @@
1
+ import './index.css';
1
2
  export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1 @@
1
- import { ModalFuncProps } from 'antd';
2
- export declare const confirmModalConfig: ModalFuncProps;
3
1
  export declare function useResumeUnfinishedUploads(identifier: string): () => Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function useTranslate(): (key: string) => string;
@@ -0,0 +1,4 @@
1
+ export type Locale = Record<string, string>;
2
+ declare const localeEn: Locale;
3
+ declare const localeZh: Locale;
4
+ export { localeEn, localeZh };
@@ -0,0 +1,3 @@
1
+ import { ModalFuncProps, ModalProps } from 'antd/es/modal/interface';
2
+ export declare const confirmModalConfig: ModalFuncProps;
3
+ export declare const modalConfig: ModalProps;
@@ -5,7 +5,7 @@ export interface ICopy {
5
5
  text?: string;
6
6
  onClick?: () => void;
7
7
  /** 语言,默认:zh */
8
- lang?: 'zh' | 'en';
8
+ locale?: 'zh' | 'en';
9
9
  }
10
10
  export default function Copy(props: ICopy): import("react/jsx-runtime").JSX.Element;
11
11
  /**
@@ -13,9 +13,9 @@ export default function Copy(props: ICopy): import("react/jsx-runtime").JSX.Elem
13
13
  * @param text {string} 文本内容
14
14
  * @param options {object} 其它选项
15
15
  * @param options.showFeedback {boolean} 是否展示复制成功的反馈信息,默认展示
16
- * @param options.lang {string} 语言,默认:zh
16
+ * @param options.locale {string} 语言,默认:zh
17
17
  */
18
18
  export declare function copy(text: string, options?: {
19
19
  showFeedback?: boolean;
20
- lang?: 'zh' | 'en';
20
+ locale?: 'zh' | 'en';
21
21
  }): void;