@zjlab-fe/data-hub-ui 0.27.1 → 0.28.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,33 @@
1
+ import { UploadFile } from 'antd';
2
+ export declare enum EDatasetBatchType {
3
+ list = "list",
4
+ export = "export",
5
+ tag = "tag",
6
+ zone = "area"
7
+ }
8
+ export interface IConfirmParam {
9
+ type: EDatasetBatchType;
10
+ file?: UploadFile;
11
+ inputIds?: string[];
12
+ fields?: string[];
13
+ }
14
+ export interface IFieldOption {
15
+ id: string;
16
+ label: string;
17
+ datasetCnt?: number;
18
+ }
19
+ export interface IDatasetBatchActionParams {
20
+ type: EDatasetBatchType;
21
+ title: string;
22
+ description: string;
23
+ hasZoneManualInput?: boolean;
24
+ hasUpload?: boolean;
25
+ manualInputPlaceholder?: string;
26
+ manualInputTitle?: string;
27
+ fieldTitle?: string;
28
+ fieldOptions?: IFieldOption[];
29
+ }
30
+ export default function DatasetBatchAction(p: {
31
+ onCancel: () => void;
32
+ onConfirm: (param: IConfirmParam) => void;
33
+ } & IDatasetBatchActionParams): import("react/jsx-runtime").JSX.Element;
@@ -41,3 +41,6 @@ export type { CorpusCardProps, ProcessTemplateListItem, ProcessTemplateLabel, La
41
41
  export { default as SDKModal } from './components/SDK-modal';
42
42
  export { default as TagView } from './components/tag-view';
43
43
  export { default as TagGroupFilter } from './components/tag-group-filter';
44
+ export { default as DatasetBatchAction } from './components/dataset-batch-action';
45
+ export type { IConfirmParam, IFieldOption, IDatasetBatchActionParams, } from './components/dataset-batch-action';
46
+ export { EDatasetBatchType } from './components/dataset-batch-action';
@@ -0,0 +1,107 @@
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
+ import React from 'react';
3
+ import { Upload, Input, Modal, Tabs, message, Alert, Button } from 'antd';
4
+ import { datasetBatchAction, description, manualLabel, uploadContainer, uploadIconWrapper, uploadIcon, uploadText, alertMessage, fieldSelection, fieldHeader, fieldTitleWrapper, fieldTitleIndicator, fieldTitle, fieldActions, selectAllBtn, clearAllBtn, fieldGrid, fieldItem, selected, unselected, fieldItemContent, fieldLabel, fieldCheckbox, checked, unchecked, checkIcon, fieldMeta, listTip, tipContent, tipIcon, tipText } from './index.module.scss.js';
5
+
6
+ const { Dragger } = Upload;
7
+ const { TextArea } = Input;
8
+ var EDatasetBatchType;
9
+ (function (EDatasetBatchType) {
10
+ EDatasetBatchType["list"] = "list";
11
+ EDatasetBatchType["export"] = "export";
12
+ EDatasetBatchType["tag"] = "tag";
13
+ EDatasetBatchType["zone"] = "area";
14
+ })(EDatasetBatchType || (EDatasetBatchType = {}));
15
+ const DATASET_FIELDS = [
16
+ { id: 'id', label: '数据集ID' },
17
+ { id: 'name', label: '数据集名称' },
18
+ { id: 'provider', label: '提供方' },
19
+ { id: 'creator', label: '发布者' },
20
+ { id: 'fileSize', label: '数据量' },
21
+ { id: 'authorizationType', label: '开放方式' },
22
+ { id: 'subjects', label: '科学领域' },
23
+ { id: 'source', label: '来源名称' },
24
+ { id: 'keywords', label: '关键词' },
25
+ { id: 'label', label: '相关标签' },
26
+ { id: 'license', label: '使用许可' },
27
+ { id: 'dataSourceUrl', label: '来源链接' },
28
+ { id: 'publishTime', label: '发布时间' },
29
+ { id: 'storageFilePath', label: '存储路径' },
30
+ { id: 'domain', label: '域名标识' },
31
+ ];
32
+ function DatasetBatchAction(p) {
33
+ var _a, _b;
34
+ const [fileList, setFileList] = React.useState([]);
35
+ const [manualInputValue, setManualInputValue] = React.useState('');
36
+ const [activeTab, setActiveTab] = React.useState(p.hasZoneManualInput ? 'manual' : 'upload');
37
+ const exportFields = (_a = p.fieldOptions) !== null && _a !== void 0 ? _a : (p.type === EDatasetBatchType.list || p.type === EDatasetBatchType.export ? DATASET_FIELDS : []);
38
+ const [selectedFields, setSelectedFields] = React.useState(new Set((exportFields === null || exportFields === void 0 ? void 0 : exportFields.map((f) => f.id)) || []));
39
+ const hasUpload = (_b = p.hasUpload) !== null && _b !== void 0 ? _b : true;
40
+ const handleConfirmExport = () => {
41
+ if (p.type === EDatasetBatchType.zone) {
42
+ if (activeTab === 'manual' && !manualInputValue.trim()) {
43
+ message.warning('请输入数据集ID');
44
+ return;
45
+ }
46
+ if (activeTab === 'upload' && !fileList.length) {
47
+ message.warning('请上传CSV文件');
48
+ return;
49
+ }
50
+ const inputIds = activeTab === 'manual'
51
+ ? manualInputValue
52
+ .split(/[,,\n]+/)
53
+ .map((id) => id.trim())
54
+ .filter(Boolean)
55
+ : undefined;
56
+ p.onConfirm({
57
+ type: p.type,
58
+ file: activeTab === 'upload' ? fileList[0] : undefined,
59
+ inputIds,
60
+ fields: Array.from(selectedFields),
61
+ });
62
+ }
63
+ else if (p.type !== EDatasetBatchType.list && !fileList.length) {
64
+ message.warning('请上传csv或excel文件');
65
+ return;
66
+ }
67
+ else {
68
+ p.onConfirm({ type: p.type, file: fileList[0], fields: Array.from(selectedFields) });
69
+ }
70
+ };
71
+ const toggleExportField = (fieldId) => {
72
+ const next = new Set(selectedFields);
73
+ if (next.has(fieldId))
74
+ next.delete(fieldId);
75
+ else
76
+ next.add(fieldId);
77
+ setSelectedFields(next);
78
+ };
79
+ return (jsxs(Modal, { title: p.title, open: true, onOk: handleConfirmExport, onCancel: p.onCancel, className: datasetBatchAction, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88", children: [jsx("p", { className: description, children: p.description }), p.type === EDatasetBatchType.zone && p.hasZoneManualInput && (jsxs(Fragment, { children: [hasUpload && (jsx(Tabs, { activeKey: activeTab, onChange: setActiveTab, items: [
80
+ {
81
+ key: 'manual',
82
+ label: '手动输入ID',
83
+ },
84
+ {
85
+ key: 'upload',
86
+ label: '批量任务文件上传',
87
+ },
88
+ ] })), activeTab === 'manual' && (jsxs("div", { children: [jsx("p", { className: manualLabel, children: p.manualInputTitle }), jsx(TextArea, { value: manualInputValue, onChange: (e) => setManualInputValue(e.target.value), placeholder: p.manualInputPlaceholder, rows: 6 })] }))] })), hasUpload &&
89
+ (p.type === EDatasetBatchType.export ||
90
+ p.type === EDatasetBatchType.tag ||
91
+ (p.type === EDatasetBatchType.zone && activeTab === 'upload')) && (jsxs(Dragger, { name: "name", customRequest: (options) => {
92
+ if (options.onSuccess) {
93
+ options.onSuccess({});
94
+ }
95
+ }, className: uploadContainer, multiple: false, accept: ".csv,.xlsx,.xls", fileList: fileList, onChange: (info) => {
96
+ const newFileList = [...info.fileList];
97
+ if (newFileList.length > 1) {
98
+ message.warning('单次任务只能上传1个文件,不支持第二个文件的上传');
99
+ }
100
+ setFileList(newFileList.slice(0, 1));
101
+ }, onRemove: () => setFileList([]), children: [jsx("div", { className: uploadIconWrapper, children: jsx("svg", { className: uploadIcon, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" }) }) }), jsx("div", { className: uploadText, children: "\u70B9\u51FB\u6D4F\u89C8\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u81F3\u6B64\uFF08\u652F\u6301csv\u6216excel\u6587\u4EF6\uFF09" })] })), p.type === EDatasetBatchType.tag && (jsx(Alert, { message: "\u63D0\u793A\uFF1A\u6587\u4EF6\u7B2C\u4E00\u5217\u5E94\u4E3A dataset_id\uFF0C\u7B2C\u4E8C\u5217\u4E3A tag_ids\uFF08\u591A\u4E2A\u6807\u7B7E ID \u8BF7\u7528\u5206\u53F7\u5206\u9694\uFF09\u3002", type: "info", showIcon: true, className: alertMessage })), p.type === EDatasetBatchType.zone && activeTab === 'upload' && p.hasZoneManualInput && (jsx(Alert, { message: '\u63D0\u793A\uFF1A\u8BF7\u4E0A\u4F20csv\u6216excel\u6587\u4EF6\uFF0C\u63D0\u4F9B\u6570\u636E\u96C6id\uFF0C\u5355\u6B21\u4EFB\u52A1\u53EA\u80FD\u4E0A\u4F201\u4E2A\u6587\u4EF6\u3002\u6587\u4EF6\u91C7\u7528\u5355\u5217\u5E03\u5C40\uFF0C\u9996\u884C\u4E3A"dataset_id"\uFF0C\u4ECE\u7B2C\u4E8C\u884C\u5F00\u59CB\u6BCF\u884C\u4E3A\u4E00\u4E2A\u5177\u4F53id\u3002', type: "info", showIcon: true, className: alertMessage })), exportFields && exportFields.length > 0 && (jsxs("div", { className: fieldSelection, children: [jsxs("div", { className: fieldHeader, children: [jsxs("div", { className: fieldTitleWrapper, children: [jsx("div", { className: fieldTitleIndicator }), jsx("h4", { className: fieldTitle, children: p.fieldTitle })] }), jsxs("div", { className: fieldActions, children: [jsx("span", { onClick: () => setSelectedFields(new Set((exportFields === null || exportFields === void 0 ? void 0 : exportFields.map((f) => f.id)) || [])), className: selectAllBtn, children: "\u5168\u9009" }), jsx("span", { onClick: () => setSelectedFields(new Set()), className: clearAllBtn, children: "\u6E05\u7A7A" })] })] }), jsx("div", { className: fieldGrid, children: exportFields.map((field) => {
102
+ const isSelected = selectedFields.has(field.id);
103
+ return (jsxs(Button, { onClick: () => toggleExportField(field.id), className: `${fieldItem} ${isSelected ? selected : unselected}`, style: { height: p.type === EDatasetBatchType.zone ? '60px' : '32px' }, children: [jsxs("div", { className: fieldItemContent, children: [jsx("span", { className: fieldLabel, title: field.label, children: field.label }), jsx("div", { className: `${fieldCheckbox} ${isSelected ? checked : unchecked}`, children: isSelected && (jsx("svg", { className: checkIcon, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 4, children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" }) })) })] }), p.type === EDatasetBatchType.zone && (jsxs("div", { className: fieldMeta, children: [jsxs("span", { children: ["ID\uFF1A", field.id] }), jsxs("span", { children: [field.datasetCnt, " \u8D44\u4EA7"] })] }))] }, field.id));
104
+ }) })] })), p.type === EDatasetBatchType.list && (jsx("div", { className: listTip, children: jsxs("div", { className: tipContent, children: [jsx("svg", { className: tipIcon, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.5, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }), jsx("p", { className: tipText, children: "\u8BF7\u524D\u5F80\"\u6279\u91CF\u4EFB\u52A1\"\u4E2D\u67E5\u770B\u5BFC\u51FA\u6587\u4EF6" })] }) }))] }));
105
+ }
106
+
107
+ export { EDatasetBatchType, DatasetBatchAction as default };
@@ -0,0 +1,200 @@
1
+ var style = document.createElement('style');
2
+ style.textContent = `.index-module__datasetBatchAction___L6yz5 .index-module__description___CfxF4 {
3
+ color: #545b64;
4
+ font-size: 14px;
5
+ margin-top: 8px;
6
+ }
7
+ .index-module__datasetBatchAction___L6yz5 .index-module__manualLabel___lvm5X {
8
+ font-size: 14px;
9
+ color: #545b64;
10
+ margin-bottom: 8px;
11
+ margin-top: 0;
12
+ }
13
+ .index-module__datasetBatchAction___L6yz5 .index-module__uploadContainer___j8IxU {
14
+ margin-top: 24px;
15
+ }
16
+ .index-module__datasetBatchAction___L6yz5 .index-module__uploadContainer___j8IxU .index-module__uploadIconWrapper___yV1NJ {
17
+ width: 64px;
18
+ height: 64px;
19
+ background: #f8fafc;
20
+ border-radius: 16px;
21
+ display: flex;
22
+ align-items: center;
23
+ justify-content: center;
24
+ margin: 0 auto 16px auto;
25
+ transition: all 0.3s ease;
26
+ }
27
+ .index-module__datasetBatchAction___L6yz5 .index-module__uploadContainer___j8IxU .index-module__uploadIconWrapper___yV1NJ .index-module__uploadIcon___1Wkwf {
28
+ width: 32px;
29
+ height: 32px;
30
+ color: #cbd5e1;
31
+ transition: color 0.3s ease;
32
+ }
33
+ .index-module__datasetBatchAction___L6yz5 .index-module__uploadContainer___j8IxU .index-module__uploadText___x0Qvf {
34
+ font-size: 12px;
35
+ font-weight: 900;
36
+ text-transform: uppercase;
37
+ letter-spacing: 0.1em;
38
+ color: #94a3b8;
39
+ text-align: center;
40
+ margin-bottom: 16px;
41
+ transition: color 0.3s ease;
42
+ }
43
+ .index-module__datasetBatchAction___L6yz5 .index-module__alertMessage___ZwIzM {
44
+ margin-top: 16px;
45
+ }
46
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- {
47
+ margin-top: 16px;
48
+ margin-bottom: 32px;
49
+ }
50
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux {
51
+ display: flex;
52
+ align-items: center;
53
+ justify-content: space-between;
54
+ }
55
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux .index-module__fieldTitleWrapper___6ojO6 {
56
+ display: flex;
57
+ align-items: center;
58
+ }
59
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux .index-module__fieldTitleWrapper___6ojO6 .index-module__fieldTitleIndicator___fhurM {
60
+ width: 6px;
61
+ height: 16px;
62
+ background: #1775fe;
63
+ border-radius: 9999px;
64
+ }
65
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux .index-module__fieldTitleWrapper___6ojO6 .index-module__fieldTitle___-3Ew- {
66
+ font-size: 14px;
67
+ font-weight: 900;
68
+ color: #0f172b;
69
+ text-transform: uppercase;
70
+ letter-spacing: 0.1em;
71
+ margin-left: 8px;
72
+ }
73
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux .index-module__fieldActions___3QFDa {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 8px;
77
+ }
78
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux .index-module__fieldActions___3QFDa .index-module__selectAllBtn___vlUcC {
79
+ font-size: 12px;
80
+ font-weight: 900;
81
+ color: #1775fe;
82
+ text-transform: uppercase;
83
+ letter-spacing: 0.1em;
84
+ cursor: pointer;
85
+ }
86
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldHeader___jDOux .index-module__fieldActions___3QFDa .index-module__clearAllBtn___ytxsA {
87
+ font-size: 12px;
88
+ font-weight: 900;
89
+ color: #94a3b8;
90
+ text-transform: uppercase;
91
+ letter-spacing: 0.1em;
92
+ cursor: pointer;
93
+ }
94
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X {
95
+ display: grid;
96
+ grid-template-columns: repeat(2, 1fr);
97
+ gap: 16px;
98
+ margin-top: 16px;
99
+ width: 100%;
100
+ }
101
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB {
102
+ border-radius: 16px;
103
+ font-size: 12px;
104
+ font-weight: 700;
105
+ border: 2px solid;
106
+ display: block;
107
+ transition: all 0.3s ease;
108
+ width: 100%;
109
+ min-width: 0;
110
+ overflow: hidden;
111
+ }
112
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB.index-module__selected___yvp-c {
113
+ background: #eff6ff;
114
+ border-color: #1775fe;
115
+ color: #1d4ed8;
116
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
117
+ }
118
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB.index-module__unselected___zpzVQ {
119
+ background: #ffffff;
120
+ color: #64748b;
121
+ border-color: #f1f5f9;
122
+ }
123
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldItemContent___CYfcn {
124
+ display: flex;
125
+ align-items: center;
126
+ justify-content: space-between;
127
+ width: 100%;
128
+ gap: 8px;
129
+ overflow: hidden;
130
+ }
131
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldItemContent___CYfcn .index-module__fieldLabel___ZZAbg {
132
+ overflow: hidden;
133
+ text-overflow: ellipsis;
134
+ white-space: nowrap;
135
+ flex: 1;
136
+ min-width: 0;
137
+ text-align: left;
138
+ max-width: calc(100% - 28px);
139
+ }
140
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldItemContent___CYfcn .index-module__fieldCheckbox___wu5hE {
141
+ width: 20px;
142
+ height: 20px;
143
+ border-radius: 50%;
144
+ display: flex;
145
+ align-items: center;
146
+ justify-content: center;
147
+ flex-shrink: 0;
148
+ }
149
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldItemContent___CYfcn .index-module__fieldCheckbox___wu5hE.index-module__checked___a9iwW {
150
+ background: #1775fe;
151
+ }
152
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldItemContent___CYfcn .index-module__fieldCheckbox___wu5hE.index-module__unchecked___Zr7bU {
153
+ background: #f1f5f9;
154
+ border: 1px solid #e2e8f0;
155
+ }
156
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldItemContent___CYfcn .index-module__fieldCheckbox___wu5hE .index-module__checkIcon___rIrgu {
157
+ width: 12px;
158
+ height: 12px;
159
+ color: #ffffff;
160
+ }
161
+ .index-module__datasetBatchAction___L6yz5 .index-module__fieldSelection___ongq- .index-module__fieldGrid___p8N1X .index-module__fieldItem___ZC7EB .index-module__fieldMeta___FPhuU {
162
+ font-size: 12px;
163
+ color: #94a3b8;
164
+ width: 100%;
165
+ display: flex;
166
+ align-items: center;
167
+ justify-content: space-between;
168
+ font-weight: 400;
169
+ margin-top: 8px;
170
+ }
171
+ .index-module__datasetBatchAction___L6yz5 .index-module__listTip___gu05n {
172
+ margin-top: 16px;
173
+ border-top: 1px solid #f1f5f9;
174
+ background: rgba(248, 250, 252, 0.5);
175
+ display: flex;
176
+ flex-direction: column;
177
+ align-items: flex-end;
178
+ }
179
+ .index-module__datasetBatchAction___L6yz5 .index-module__listTip___gu05n .index-module__tipContent___D-7Qq {
180
+ display: flex;
181
+ align-items: center;
182
+ color: #1775fe;
183
+ }
184
+ .index-module__datasetBatchAction___L6yz5 .index-module__listTip___gu05n .index-module__tipContent___D-7Qq .index-module__tipIcon___HpeFp {
185
+ width: 16px;
186
+ height: 16px;
187
+ }
188
+ .index-module__datasetBatchAction___L6yz5 .index-module__listTip___gu05n .index-module__tipContent___D-7Qq .index-module__tipText___LiR5M {
189
+ font-size: 12px;
190
+ font-weight: 900;
191
+ text-transform: uppercase;
192
+ letter-spacing: 0.1em;
193
+ margin-left: 4px;
194
+ }`;
195
+ document.head.appendChild(style);
196
+
197
+ var datasetBatchAction = "index-module__datasetBatchAction___L6yz5";var description = "index-module__description___CfxF4";var manualLabel = "index-module__manualLabel___lvm5X";var uploadContainer = "index-module__uploadContainer___j8IxU";var uploadIconWrapper = "index-module__uploadIconWrapper___yV1NJ";var uploadIcon = "index-module__uploadIcon___1Wkwf";var uploadText = "index-module__uploadText___x0Qvf";var alertMessage = "index-module__alertMessage___ZwIzM";var fieldSelection = "index-module__fieldSelection___ongq-";var fieldHeader = "index-module__fieldHeader___jDOux";var fieldTitleWrapper = "index-module__fieldTitleWrapper___6ojO6";var fieldTitleIndicator = "index-module__fieldTitleIndicator___fhurM";var fieldTitle = "index-module__fieldTitle___-3Ew-";var fieldActions = "index-module__fieldActions___3QFDa";var selectAllBtn = "index-module__selectAllBtn___vlUcC";var clearAllBtn = "index-module__clearAllBtn___ytxsA";var fieldGrid = "index-module__fieldGrid___p8N1X";var fieldItem = "index-module__fieldItem___ZC7EB";var selected = "index-module__selected___yvp-c";var unselected = "index-module__unselected___zpzVQ";var fieldItemContent = "index-module__fieldItemContent___CYfcn";var fieldLabel = "index-module__fieldLabel___ZZAbg";var fieldCheckbox = "index-module__fieldCheckbox___wu5hE";var checked = "index-module__checked___a9iwW";var unchecked = "index-module__unchecked___Zr7bU";var checkIcon = "index-module__checkIcon___rIrgu";var fieldMeta = "index-module__fieldMeta___FPhuU";var listTip = "index-module__listTip___gu05n";var tipContent = "index-module__tipContent___D-7Qq";var tipIcon = "index-module__tipIcon___HpeFp";var tipText = "index-module__tipText___LiR5M";
198
+ var styles = {"datasetBatchAction":"index-module__datasetBatchAction___L6yz5","description":"index-module__description___CfxF4","manualLabel":"index-module__manualLabel___lvm5X","uploadContainer":"index-module__uploadContainer___j8IxU","uploadIconWrapper":"index-module__uploadIconWrapper___yV1NJ","uploadIcon":"index-module__uploadIcon___1Wkwf","uploadText":"index-module__uploadText___x0Qvf","alertMessage":"index-module__alertMessage___ZwIzM","fieldSelection":"index-module__fieldSelection___ongq-","fieldHeader":"index-module__fieldHeader___jDOux","fieldTitleWrapper":"index-module__fieldTitleWrapper___6ojO6","fieldTitleIndicator":"index-module__fieldTitleIndicator___fhurM","fieldTitle":"index-module__fieldTitle___-3Ew-","fieldActions":"index-module__fieldActions___3QFDa","selectAllBtn":"index-module__selectAllBtn___vlUcC","clearAllBtn":"index-module__clearAllBtn___ytxsA","fieldGrid":"index-module__fieldGrid___p8N1X","fieldItem":"index-module__fieldItem___ZC7EB","selected":"index-module__selected___yvp-c","unselected":"index-module__unselected___zpzVQ","fieldItemContent":"index-module__fieldItemContent___CYfcn","fieldLabel":"index-module__fieldLabel___ZZAbg","fieldCheckbox":"index-module__fieldCheckbox___wu5hE","checked":"index-module__checked___a9iwW","unchecked":"index-module__unchecked___Zr7bU","checkIcon":"index-module__checkIcon___rIrgu","fieldMeta":"index-module__fieldMeta___FPhuU","listTip":"index-module__listTip___gu05n","tipContent":"index-module__tipContent___D-7Qq","tipIcon":"index-module__tipIcon___HpeFp","tipText":"index-module__tipText___LiR5M"};
199
+
200
+ export { alertMessage, checkIcon, checked, clearAllBtn, datasetBatchAction, styles as default, description, fieldActions, fieldCheckbox, fieldGrid, fieldHeader, fieldItem, fieldItemContent, fieldLabel, fieldMeta, fieldSelection, fieldTitle, fieldTitleIndicator, fieldTitleWrapper, listTip, manualLabel, selectAllBtn, selected, tipContent, tipIcon, tipText, unchecked, unselected, uploadContainer, uploadIcon, uploadIconWrapper, uploadText };
@@ -92,7 +92,7 @@ const MainLayoutSider = (props) => {
92
92
  return (jsxs("div", { className: itemClass, style: itemStyle, onClick: () => onMenuClick(child), children: [child.icon, !internalCollapsed && jsx("span", { style: { marginLeft: '8px' }, children: child.label })] }));
93
93
  };
94
94
  return (jsxs(Sider, { collapsible: true, collapsed: internalCollapsed, collapsedWidth: "60", className: side_menu, width: 180, trigger: null, children: [jsx("div", { className: menu_content, style: { padding: internalCollapsed ? '20px 8px 0 8px' : '0 8px 20px 8px' }, children: menus.length > 0 &&
95
- menus.map((item) => (jsxs("div", { className: menu_content_contain, children: [!internalCollapsed && jsx("div", { className: menu_content_title, children: item.label }), item.children && (jsx("div", { className: menu_content_subcontain, children: item.children.map((child, i) => {
95
+ menus.map((item) => (jsxs("div", { className: menu_content_contain, style: { width: internalCollapsed ? '34px' : '150px' }, children: [!internalCollapsed && jsx("div", { className: menu_content_title, children: item.label }), item.children && (jsx("div", { className: menu_content_subcontain, children: item.children.map((child, i) => {
96
96
  const menuItem = renderMenuItem(child);
97
97
  return internalCollapsed ? (jsx(Tooltip, { placement: "right", title: child.label, children: menuItem }, child.key + `${i}`)) : (jsx("div", { children: menuItem }, child.key + `${i}`));
98
98
  }) }))] }, item.key))) }), jsx(TriggerIcon, {})] }));
@@ -55,12 +55,22 @@ style.textContent = `@charset "UTF-8";
55
55
  position: absolute;
56
56
  z-index: 999;
57
57
  background: #ffffff;
58
- border-top: 1px solid #f5f5f5;
58
+ border: none;
59
59
  border-right: none;
60
60
  border-left: none;
61
61
  border-bottom: none;
62
62
  bottom: 14px;
63
- left: 8px;
63
+ left: 50%;
64
+ transform: translateX(-50%);
65
+ }
66
+ .index-module__trigger-icon___LwUuZ::before {
67
+ content: "";
68
+ position: absolute;
69
+ top: -13px;
70
+ left: 0;
71
+ width: 100%;
72
+ height: 1px;
73
+ background: #f1f3f7;
64
74
  }
65
75
  .index-module__trigger-icon___LwUuZ:hover {
66
76
  color: #1775fe;
@@ -71,8 +81,8 @@ style.textContent = `@charset "UTF-8";
71
81
  }
72
82
  .index-module__menu-content___ZdUR3 {
73
83
  overflow-y: scroll;
74
- height: calc(100vh - 60px);
75
- padding-bottom: 60px !important;
84
+ height: calc(100vh - 65px);
85
+ padding-bottom: 62px !important;
76
86
  scrollbar-width: none;
77
87
  -ms-overflow-style: none;
78
88
  }
@@ -88,6 +98,7 @@ style.textContent = `@charset "UTF-8";
88
98
  justify-content: center;
89
99
  align-items: flex-start;
90
100
  gap: 12px;
101
+ margin: 0 auto;
91
102
  }
92
103
  .index-module__menu-content___ZdUR3 .index-module__menu-content-title___m8GfK {
93
104
  margin-top: 24px;
@@ -108,6 +119,7 @@ style.textContent = `@charset "UTF-8";
108
119
  justify-content: center;
109
120
  align-items: flex-start;
110
121
  gap: 4px;
122
+ margin-bottom: 4px;
111
123
  }
112
124
  .index-module__menu-content___ZdUR3 .index-module__menu-content-item___sRn7B {
113
125
  font-family: "AlibabaPuHuiTi-3-55-Regular";
package/es/index.js CHANGED
@@ -36,4 +36,5 @@ export { default as ModelCard } from './components/model-card/index.js';
36
36
  export { default as SDKModal } from './components/SDK-modal/index.js';
37
37
  export { default as TagView } from './components/tag-view/index.js';
38
38
  export { default as TagGroupFilter } from './components/tag-group-filter/index.js';
39
+ export { default as DatasetBatchAction, EDatasetBatchType } from './components/dataset-batch-action/index.js';
39
40
  export { default as UploadDrawerUploadStoreProvider } from './components/uploadDrawer/UploadStoreProvider.js';