@zjlab-fe/data-hub-ui 0.17.4 → 0.19.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.
@@ -0,0 +1 @@
1
+ export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { SDKModalLocale } from './locale/translations';
2
+ type DocumentationLinkProps = {
3
+ link: string;
4
+ locale: SDKModalLocale;
5
+ };
6
+ export default function DocumentationLink({ link, locale }: DocumentationLinkProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SDKModalProps, SDKModalConfig } from './types';
2
+ export declare function showSDKModal(config: SDKModalConfig): {
3
+ destroy: () => void;
4
+ };
5
+ declare function SDKModalComponent(props: SDKModalProps): import("react/jsx-runtime").JSX.Element;
6
+ type SDKModalType = typeof SDKModalComponent & {
7
+ show: typeof showSDKModal;
8
+ };
9
+ declare const SDKModal: SDKModalType;
10
+ export default SDKModal;
@@ -0,0 +1,3 @@
1
+ import { SDKModalProps } from './types';
2
+ declare const _default: import("react").NamedExoticComponent<SDKModalProps>;
3
+ export default _default;
@@ -0,0 +1,10 @@
1
+ export type SDKModalLocale = {
2
+ /** 底部确认按钮文本 */
3
+ confirm: string;
4
+ /** 文档链接前缀文案 */
5
+ documentPrefix: string;
6
+ /** 文档链接文本 */
7
+ documentLinkText: string;
8
+ };
9
+ export type SDKModalLang = 'zh' | 'en';
10
+ export declare function getLocale(lang?: SDKModalLang): SDKModalLocale;
@@ -0,0 +1,15 @@
1
+ import { SDKModalLang } from './locale/translations';
2
+ import { ModalProps } from 'antd';
3
+ export type { SDKModalLang };
4
+ export type SDKModalProps = {
5
+ open: boolean;
6
+ onClose: () => void;
7
+ SDKCode?: string;
8
+ loadSDK?: () => Promise<string>;
9
+ title: string;
10
+ subTitle?: string;
11
+ modalConfig?: ModalProps;
12
+ documentLink?: string;
13
+ locale?: SDKModalLang;
14
+ };
15
+ export type SDKModalConfig = Omit<SDKModalProps, 'open'>;
@@ -89,23 +89,23 @@ export interface UploadHandlers {
89
89
  /** Called before requesting upload URLs. Return { success: false } to cancel upload */
90
90
  onBeforeUpload?: (file: UploadFile, ctx: HandlerContext) => Promise<CallbackResult>;
91
91
  /** Request upload URLs from server (required) */
92
- onGetUploadUrls: (fileName: string, partCount: number) => Promise<GetUploadUrlsResult>;
92
+ onGetUploadUrls: (fileName: string, partCount: number, file: UploadFile) => Promise<GetUploadUrlsResult>;
93
93
  /** Called after URLs received, before chunk uploads begin */
94
94
  onUploadStart?: (file: UploadFile, ctx: HandlerContext) => void;
95
95
  /** Called when file progress updates (0-100) */
96
96
  onProgress?: (file: UploadFile, progress: number, ctx: HandlerContext) => void;
97
97
  /** Called when a chunk upload completes (required) */
98
- onPartComplete: (fileName: string, uploadId: string, partNum: number) => Promise<CallbackResult>;
98
+ onPartComplete: (fileName: string, uploadId: string, partNum: number, file: UploadFile) => Promise<CallbackResult>;
99
99
  /** Called when upload is paused */
100
100
  onPause?: (file: UploadFile, ctx: HandlerContext) => void;
101
101
  /** Called when upload is resumed */
102
102
  onResume?: (file: UploadFile, ctx: HandlerContext) => void;
103
103
  /** Called when entire file upload completes (required) */
104
- onFileComplete: (fileName: string, uploadId: string) => Promise<CallbackResult>;
104
+ onFileComplete: (fileName: string, uploadId: string, file: UploadFile) => Promise<CallbackResult>;
105
105
  /** Called when upload is successful */
106
106
  onUploadSuccess?: (file: UploadFile, ctx: HandlerContext) => void;
107
107
  /** Called when upload is cancelled */
108
- onUploadCancel?: (fileName: string, uploadId: string) => Promise<CallbackResult>;
108
+ onUploadCancel?: (fileName: string, uploadId: string, file: UploadFile) => Promise<CallbackResult>;
109
109
  /** Called when file is deleted */
110
110
  onDeleteFile?: (file: UploadFile, ctx: HandlerContext) => Promise<CallbackResult>;
111
111
  /** Called when upload is retried (smart or full retry) */
@@ -38,3 +38,4 @@ export { default as CorpusCard } from './components/corpus-card';
38
38
  export { default as ModelCard } from './components/model-card';
39
39
  export type { ModelCardProps } from './components/model-card';
40
40
  export type { CorpusCardProps, ProcessTemplateListItem, ProcessTemplateLabel, LabelTypeColor, } from './components/corpus-card';
41
+ export { default as SDKModal } from './components/SDK-modal';