@zjlab-fe/data-hub-ui 0.15.1 → 0.16.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/dist/types/components/corpus-card/demo/index.d.ts +1 -0
- package/dist/types/components/corpus-card/demo/mockdata.d.ts +60 -0
- package/dist/types/components/corpus-card/index.d.ts +27 -0
- package/dist/types/components/operator-chain/components/AddButton.d.ts +3 -13
- package/dist/types/components/operator-chain/components/VirtualDropdown.d.ts +15 -0
- package/dist/types/components/operator-chain/index.d.ts +2 -6
- package/dist/types/components/tip-tap/extensions/index.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Demo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
export declare const mockData: {
|
|
2
|
+
code: number;
|
|
3
|
+
msg: string;
|
|
4
|
+
data: {
|
|
5
|
+
totalList: {
|
|
6
|
+
id: number;
|
|
7
|
+
code: number;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
createTime: number;
|
|
11
|
+
updateTime: number;
|
|
12
|
+
labels: {
|
|
13
|
+
id: number;
|
|
14
|
+
name: string;
|
|
15
|
+
type: number;
|
|
16
|
+
}[];
|
|
17
|
+
labelTypeColorMap: {
|
|
18
|
+
type: number;
|
|
19
|
+
bgColor: string;
|
|
20
|
+
borderColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
}[];
|
|
23
|
+
operators: never[];
|
|
24
|
+
globalParams: {
|
|
25
|
+
type: string;
|
|
26
|
+
key: string;
|
|
27
|
+
keyCn: string;
|
|
28
|
+
required: boolean;
|
|
29
|
+
defaultValue: string;
|
|
30
|
+
value: string;
|
|
31
|
+
desc: string;
|
|
32
|
+
descEn: null;
|
|
33
|
+
isOutput: boolean;
|
|
34
|
+
isFrontendVisible: boolean;
|
|
35
|
+
isEditable: boolean;
|
|
36
|
+
isRuntimeParam: null;
|
|
37
|
+
options: null;
|
|
38
|
+
showCondition: null;
|
|
39
|
+
constraints: {
|
|
40
|
+
min: null;
|
|
41
|
+
max: null;
|
|
42
|
+
enumValue: null;
|
|
43
|
+
accuracy: null;
|
|
44
|
+
source: null;
|
|
45
|
+
step: null;
|
|
46
|
+
};
|
|
47
|
+
uiWidget: string;
|
|
48
|
+
fields: never[];
|
|
49
|
+
suffix: null;
|
|
50
|
+
}[];
|
|
51
|
+
}[];
|
|
52
|
+
total: number;
|
|
53
|
+
totalPage: number;
|
|
54
|
+
pageSize: number;
|
|
55
|
+
currentPage: number;
|
|
56
|
+
start: number;
|
|
57
|
+
};
|
|
58
|
+
success: boolean;
|
|
59
|
+
};
|
|
60
|
+
export default mockData;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface ProcessTemplateListItem {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
labels: ProcessTemplateLabel[];
|
|
6
|
+
labelTypeColorMap?: LabelTypeColor[];
|
|
7
|
+
}
|
|
8
|
+
export interface ProcessTemplateLabel {
|
|
9
|
+
id: number;
|
|
10
|
+
name: string;
|
|
11
|
+
type: number;
|
|
12
|
+
}
|
|
13
|
+
export interface LabelTypeColor {
|
|
14
|
+
type: number;
|
|
15
|
+
bgColor: string;
|
|
16
|
+
borderColor: string;
|
|
17
|
+
textColor: string;
|
|
18
|
+
}
|
|
19
|
+
export interface CorpusCardProps {
|
|
20
|
+
card: ProcessTemplateListItem;
|
|
21
|
+
isActive?: boolean;
|
|
22
|
+
width?: number;
|
|
23
|
+
onClick?: (id: number) => void;
|
|
24
|
+
onCardClick?: (id: number) => void;
|
|
25
|
+
}
|
|
26
|
+
declare function CorpusCard({ card, isActive, width, onClick, onCardClick }: CorpusCardProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default CorpusCard;
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
type SingleCardItem = {
|
|
3
|
-
id: string;
|
|
4
|
-
title?: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
};
|
|
1
|
+
import { SingleCardItem } from '..';
|
|
7
2
|
interface AddButtonProps {
|
|
8
|
-
menu
|
|
3
|
+
menu?: Array<SingleCardItem> | [];
|
|
9
4
|
isEdit?: boolean;
|
|
10
5
|
onClick: (id: string) => void;
|
|
11
|
-
dropdownStyle?: {
|
|
12
|
-
width?: string | number;
|
|
13
|
-
maxHeight?: string | number;
|
|
14
|
-
overflowY?: React.CSSProperties['overflowY'];
|
|
15
|
-
};
|
|
16
6
|
}
|
|
17
|
-
declare function AddButton({ menu, isEdit, onClick
|
|
7
|
+
declare function AddButton({ menu, isEdit, onClick }: AddButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
18
8
|
export default AddButton;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type SingleCardItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
typeId?: number;
|
|
6
|
+
type?: string;
|
|
7
|
+
};
|
|
8
|
+
interface VirtualDropdownProps {
|
|
9
|
+
menu: Array<SingleCardItem> | [];
|
|
10
|
+
onItemClick: (id: string) => void;
|
|
11
|
+
onSelect?: (typeId: number) => void;
|
|
12
|
+
onInputChange?: (value: string) => void;
|
|
13
|
+
}
|
|
14
|
+
declare function VirtualDropdown({ menu, onItemClick, onSelect, onInputChange }: VirtualDropdownProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export default VirtualDropdown;
|
|
@@ -2,6 +2,8 @@ export type SingleCardItem = {
|
|
|
2
2
|
id: string;
|
|
3
3
|
title?: string;
|
|
4
4
|
description?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
typeId?: number;
|
|
5
7
|
};
|
|
6
8
|
export type OperatorChainProps = {
|
|
7
9
|
type?: 'default' | 'dataIO';
|
|
@@ -11,12 +13,6 @@ export type OperatorChainProps = {
|
|
|
11
13
|
onClick?: (id: string) => void;
|
|
12
14
|
onChange?: (values: SingleCardItem[]) => void;
|
|
13
15
|
onActive?: (id: string | null) => void;
|
|
14
|
-
width?: string;
|
|
15
|
-
dropdownStyle?: {
|
|
16
|
-
width?: string | number;
|
|
17
|
-
maxHeight?: string | number;
|
|
18
|
-
overflowY?: React.CSSProperties['overflowY'];
|
|
19
|
-
};
|
|
20
16
|
};
|
|
21
17
|
export type OperatorChainRef = {
|
|
22
18
|
getCards: () => SingleCardItem[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const editorExtensions: (placeholder?: string) => (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").
|
|
1
|
+
export declare const editorExtensions: (placeholder?: string) => (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-text-style").TextStyleOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-style").ColorOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-align").TextAlignOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-highlight").HighlightOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableRowOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any> | import("@tiptap/core").Extension<any, any> | import("@tiptap/core").Extension<import("@tiptap/extension-placeholder").PlaceholderOptions, any> | import("@tiptap/core").Extension<import("@tiptap/markdown").MarkdownExtensionOptions, import("@tiptap/markdown").MarkdownExtensionStorage>)[];
|
|
2
2
|
export declare const readerExtensions: () => (import("@tiptap/core").Extension<import("@tiptap/starter-kit").StarterKitOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-text-style").TextStyleOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-style").ColorOptions, any> | import("@tiptap/core").Extension<import("@tiptap/extension-text-align").TextAlignOptions, any> | import("@tiptap/core").Mark<import("@tiptap/extension-highlight").HighlightOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-image").ImageOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableRowOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-code-block-lowlight").CodeBlockLowlightOptions, any>)[];
|
package/dist/types/index.d.ts
CHANGED
|
@@ -34,3 +34,5 @@ export { default as RadioCard } from './components/radio-card';
|
|
|
34
34
|
export type { RadioCardProps, RadioOption } from './components/radio-card';
|
|
35
35
|
export { default as OperatorChain } from './components/operator-chain';
|
|
36
36
|
export type { OperatorChainProps, SingleCardItem, OperatorChainRef } from './components/operator-chain';
|
|
37
|
+
export { default as CorpusCard } from './components/corpus-card';
|
|
38
|
+
export type { CorpusCardProps, ProcessTemplateListItem, ProcessTemplateLabel, LabelTypeColor, } from './components/corpus-card';
|