@zjlab-fe/data-hub-ui 0.18.0 → 0.20.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'>;
@@ -0,0 +1,7 @@
1
+ interface IProps {
2
+ value: string[];
3
+ isEn?: boolean;
4
+ onChange: (selected: string[]) => void;
5
+ }
6
+ export default function DataSizeFilter(p: IProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1 @@
1
+ export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,32 @@
1
+ import { ITagListItem } from './tagFilter';
2
+ interface ITagGroupDataItem {
3
+ key: string;
4
+ title?: string;
5
+ children: ITagListItem[];
6
+ }
7
+ interface IProps {
8
+ tagGroupDatas: ITagGroupDataItem[];
9
+ tagSelected: Record<string, string[]>;
10
+ needDataSizeFilter?: boolean;
11
+ dataSizeValue?: string[];
12
+ isEn?: boolean;
13
+ tagClassName?: {
14
+ default?: string;
15
+ checked?: string;
16
+ };
17
+ onTagChange: (tagSelected: Record<string, string[]>) => void;
18
+ onDataSizeChange?: (value: string[]) => void;
19
+ }
20
+ /**
21
+ * 标签组过滤器
22
+ * @param tagGroupDatas 标签组数据
23
+ * @param tagSelected 标签选中状态
24
+ * @param needDataSizeFilter 是否需要数据量过滤(可选)
25
+ * @param dataSizeValue 数据量过滤值(可选)
26
+ * @param isEn 是否英文环境(可选)
27
+ * @param tagClassName 标签类名(可选)
28
+ * @param onTagChange 标签选中状态变化回调
29
+ * @param onDataSizeChange 数据量过滤值变化回调(可选)
30
+ */
31
+ export default function TagGroupFilter(p: IProps): import("react/jsx-runtime").JSX.Element;
32
+ export {};
@@ -0,0 +1,22 @@
1
+ export interface ITagListItem {
2
+ subTitle?: string;
3
+ children: {
4
+ value: string;
5
+ name: string;
6
+ }[];
7
+ }
8
+ interface IProps {
9
+ title?: string;
10
+ list: ITagListItem[];
11
+ selected: string[];
12
+ isFold: boolean;
13
+ hideFoldIcon?: boolean;
14
+ onChange: (selected: string[]) => void;
15
+ onFoldChange: (isFlod: boolean) => void;
16
+ tagClassName?: {
17
+ default?: string;
18
+ checked?: string;
19
+ };
20
+ }
21
+ declare function TagFilter(p: IProps): import("react/jsx-runtime").JSX.Element;
22
+ export default TagFilter;
@@ -0,0 +1 @@
1
+ export default function Demo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ list: {
4
+ value: string;
5
+ name: string;
6
+ }[];
7
+ maxLine?: number;
8
+ needTooltip?: boolean;
9
+ selected?: string[];
10
+ style?: React.CSSProperties;
11
+ onChange?: (selected: string[]) => void;
12
+ tagClassName?: {
13
+ default?: string;
14
+ checked?: string;
15
+ };
16
+ }
17
+ /**
18
+ * 标签视图
19
+ * @param list 标签列表
20
+ * @param maxLine 最大行数(可选)
21
+ * @param needTooltip 是否需要tooltip(可选)
22
+ * @param selected 选中的标签(可选)
23
+ * @param style 样式(可选)
24
+ * @param onChange 选中状态变化回调(可选)
25
+ * @param tagClassName 标签类名(可选)
26
+ */
27
+ export default function TagView(p: IProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -0,0 +1,6 @@
1
+ import { RefObject } from 'react';
2
+ declare function useSize(target: HTMLElement | RefObject<HTMLElement> | null): {
3
+ width: number;
4
+ height: number;
5
+ };
6
+ export default useSize;
@@ -0,0 +1 @@
1
+ export default function NotionEditorDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import '@blocknote/core/fonts/inter.css';
3
+ import '@blocknote/mantine/style.css';
4
+ import './index.scss';
5
+ export interface NotionEditorHandle {
6
+ getContent: () => string;
7
+ getJSON: () => Record<string, unknown>;
8
+ setContent: (content: string) => void;
9
+ focus: () => void;
10
+ isEmpty: () => boolean;
11
+ }
12
+ interface NotionEditorProps {
13
+ content?: string;
14
+ placeholder?: string;
15
+ editable?: boolean;
16
+ className?: string;
17
+ onChange?: (html: string) => void;
18
+ onImageUpload?: (file: File) => Promise<string>;
19
+ onFileUpload?: (file: File) => Promise<{
20
+ url: string;
21
+ name: string;
22
+ size: number;
23
+ }>;
24
+ }
25
+ declare const NotionEditor: React.ForwardRefExoticComponent<NotionEditorProps & React.RefAttributes<NotionEditorHandle>>;
26
+ export default NotionEditor;
@@ -38,3 +38,6 @@ 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';
42
+ export { default as TagView } from './components/tag-view';
43
+ export { default as TagGroupFilter } from './components/tag-group-filter';