@zjlab-fe/data-hub-ui 0.21.7 → 0.22.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.
- package/es/assets/cardImg.png.js +3 -0
- package/es/assets/closeBtn.png.js +3 -0
- package/es/assets/icon-tag-header.png.js +3 -0
- package/es/assets/source.png.js +3 -0
- package/es/components/FileUploader/FileUploadModal.js +24 -0
- package/es/components/FileUploader/FileUploader.js +20 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploader.js +34 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderContextProvider.js +46 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiver.css.js +36 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiver.js +57 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiverContainer.js +24 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderFileReceiverDesc.js +9 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderList.js +46 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItem.js +46 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItemFail.js +21 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItemPaused.js +20 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderListItemUploading.js +43 -0
- package/es/components/FileUploader/FileUploaderImpl/FileUploaderlListItemFinished.js +32 -0
- package/es/components/FileUploader/Locale/translations.js +52 -0
- package/es/components/FileUploader/Locale/useTranslate.js +16 -0
- package/es/components/FileUploader/UploadStoreProvider/UploadStoreProvider.js +31 -0
- package/es/components/FileUploader/UploadStoreProvider/uploadStoreReducer.js +62 -0
- package/es/components/FileUploader/UploadStoreProvider/useOnFileAllUploaded.js +31 -0
- package/es/components/FileUploader/UploadStoreProvider/useSaveUnfinishedUploads.js +42 -0
- package/es/components/FileUploader/UploadStoreProvider/useSetupMergingEvent.js +45 -0
- package/es/components/FileUploader/hooks/useCancelUpload.js +40 -0
- package/es/components/FileUploader/hooks/useCurrentFile.js +61 -0
- package/es/components/FileUploader/hooks/useCurrentFileOnUploading.js +52 -0
- package/es/components/FileUploader/hooks/useCurrentFileSetupAndBackUp.js +39 -0
- package/es/components/FileUploader/hooks/useFormatFiles.js +64 -0
- package/es/components/FileUploader/hooks/useFormatFilesFindDuplicates.js +75 -0
- package/es/components/FileUploader/hooks/useFormatFilesRemoveDuplicates.js +21 -0
- package/es/components/FileUploader/hooks/useHandleChunkCompletion.js +31 -0
- package/es/components/FileUploader/hooks/useOnMounted.js +24 -0
- package/es/components/FileUploader/hooks/useOnMountedResumeUnfinished.js +58 -0
- package/es/components/FileUploader/hooks/useRetryUpload.js +33 -0
- package/es/components/FileUploader/hooks/useUploadChunk.js +46 -0
- package/es/components/FileUploader/icons/CloseFilled.js +7 -0
- package/es/components/FileUploader/icons/UnkownFileIcon.js +7 -0
- package/es/components/FileUploader/icons/UploadIcon.js +7 -0
- package/es/components/FileUploader/index.css.js +532 -0
- package/es/components/FileUploader/index.js +23 -0
- package/es/components/FileUploader/types.js +13 -0
- package/es/components/FileUploader/utils/calcDisplaySize.js +20 -0
- package/es/components/FileUploader/utils/checkExpiryTime.js +15 -0
- package/es/components/FileUploader/utils/createFileToUpload.js +60 -0
- package/es/components/FileUploader/utils/fileDB/addFilesToIndexdb.js +14 -0
- package/es/components/FileUploader/utils/fileDB/deleteFileInStore.js +18 -0
- package/es/components/FileUploader/utils/fileDB/deleteObjectStore.js +25 -0
- package/es/components/FileUploader/utils/fileDB/index.js +77 -0
- package/es/components/FileUploader/utils/fileDB/openDBAndRetrieveData.js +90 -0
- package/es/components/FileUploader/utils/fileDB/retrieveExistingData.js +49 -0
- package/es/components/FileUploader/utils/modalConfig.css.js +20 -0
- package/es/components/FileUploader/utils/modalConfig.js +32 -0
- package/es/components/FileUploader/utils/retrieveAllFiles.js +70 -0
- package/es/components/FileUploader/utils/splitFileIntoChunk.js +15 -0
- package/es/components/SDK-modal/document-link.js +8 -0
- package/es/components/SDK-modal/index.js +25 -0
- package/es/components/SDK-modal/index.module.scss.js +49 -0
- package/es/components/SDK-modal/inner-modal.js +59 -0
- package/es/components/SDK-modal/locale/translations.js +17 -0
- package/es/components/apply-perm-modal/index.js +53 -0
- package/es/components/apply-perm-modal/index.module.scss.js +96 -0
- package/es/components/auth-tag/index.js +23 -0
- package/es/components/bench-card/index.js +20 -0
- package/es/components/bench-card/index.module.scss.js +48 -0
- package/es/components/confirm-again/index.js +15 -0
- package/es/components/confirm-again/index.scss.js +37 -0
- package/es/components/copy/index.js +41 -0
- package/es/components/copy/index.module.scss.js +15 -0
- package/es/components/corpus-card/index.js +88 -0
- package/es/components/corpus-card/index.module.scss.js +171 -0
- package/es/components/feature-card/classNames.js +72 -0
- package/es/components/feature-card/components.js +48 -0
- package/es/components/feature-card/context.js +13 -0
- package/es/components/feature-card/index.css.js +655 -0
- package/es/components/feature-card/index.js +48 -0
- package/es/components/file-preview/data-table/index.js +94 -0
- package/es/components/file-preview/data-table/index.module.scss.js +54 -0
- package/es/components/file-preview/excel-preview/index.js +132 -0
- package/es/components/file-preview/excel-preview/index.module.scss.js +11 -0
- package/es/components/file-preview/excel-preview/utils.js +46 -0
- package/es/components/file-preview/img-preview/index.js +18 -0
- package/es/components/file-preview/img-preview/index.module.scss.js +17 -0
- package/es/components/file-preview/index.js +124 -0
- package/es/components/file-preview/index.module.scss.js +32 -0
- package/es/components/file-preview/json-preview/index.js +166 -0
- package/es/components/file-preview/markdown-preview/index.js +53 -0
- package/es/components/file-preview/markdown-preview/index.module.scss.js +1055 -0
- package/es/components/file-preview/parquet-preview/index.js +54 -0
- package/es/components/file-preview/pdf-preview/index.js +215 -0
- package/es/components/file-preview/pdf-preview/index.module.scss.js +16 -0
- package/es/components/file-preview/table-preview/index.js +43 -0
- package/es/components/file-preview/table-preview/index.module.scss.js +11 -0
- package/es/components/file-preview/txt-preview/index.js +24 -0
- package/es/components/file-preview/util.js +94 -0
- package/es/components/file-uploader/components/circle-progress.css.js +39 -0
- package/es/components/file-uploader/components/circle-progress.js +12 -0
- package/es/components/file-uploader/components/hooks/use-drop-zone.js +74 -0
- package/es/components/file-uploader/components/hooks/use-file-validation.js +52 -0
- package/es/components/file-uploader/components/icons.js +19 -0
- package/es/components/file-uploader/components/theme.css.js +64 -0
- package/es/components/file-uploader/components/uploader-drop-zone.css.js +66 -0
- package/es/components/file-uploader/components/uploader-drop-zone.js +74 -0
- package/es/components/file-uploader/components/uploader-file-item.css.js +186 -0
- package/es/components/file-uploader/components/uploader-file-item.js +63 -0
- package/es/components/file-uploader/components/uploader-file-list.css.js +43 -0
- package/es/components/file-uploader/components/uploader-file-list.js +27 -0
- package/es/components/file-uploader/components/uploader.css.js +20 -0
- package/es/components/file-uploader/components/uploader.js +51 -0
- package/es/components/file-uploader/components/uploading-status.css.js +52 -0
- package/es/components/file-uploader/components/uploading-status.js +54 -0
- package/es/components/file-uploader/components/utils/directory-reader.js +65 -0
- package/es/components/file-uploader/constants.js +31 -0
- package/es/components/file-uploader/context/action-registry.js +69 -0
- package/es/components/file-uploader/context/file-state-store.js +83 -0
- package/es/components/file-uploader/context/handler-registry.js +119 -0
- package/es/components/file-uploader/context/upload-context.js +36 -0
- package/es/components/file-uploader/context/upload-provider.js +77 -0
- package/es/components/file-uploader/context/upload-reducer.js +21 -0
- package/es/components/file-uploader/context/use-upload-engine.js +440 -0
- package/es/components/file-uploader/engine/queue-callbacks.js +257 -0
- package/es/components/file-uploader/engine/queue-manager.js +195 -0
- package/es/components/file-uploader/engine/queue-uploader.js +25 -0
- package/es/components/file-uploader/hooks/use-upload.js +327 -0
- package/es/components/file-uploader/utils/chunk-handlers.js +66 -0
- package/es/components/file-uploader/utils/ensure-handlers.js +53 -0
- package/es/components/file-uploader/utils/error-handler.js +84 -0
- package/es/components/file-uploader/utils/upload-controllers.js +43 -0
- package/es/components/file-uploader/utils/upload-handler.js +68 -0
- package/es/components/file-uploader/utils/validate-handlers.js +16 -0
- package/es/components/floating-label-input/index.js +46 -0
- package/es/components/floating-label-input/index.module.scss.js +30 -0
- package/es/components/floating-layer/index.js +15 -0
- package/es/components/floating-layer/index.scss.js +31 -0
- package/es/components/header/index.js +10 -0
- package/es/components/header/index.module.scss.js +16 -0
- package/es/components/input-tag/index.js +65 -0
- package/es/components/menu/index.js +96 -0
- package/es/components/menu/index.module.scss.js +188 -0
- package/es/components/model-card/index.js +20 -0
- package/es/components/model-card/index.module.scss.js +116 -0
- package/es/components/notion-editor/code-block/index.js +18 -0
- package/es/components/notion-editor/code-block/languageDetector.js +134 -0
- package/es/components/notion-editor/code-block/languages.js +42 -0
- package/es/components/notion-editor/index.js +258 -0
- package/es/components/notion-editor/index.scss.js +421 -0
- package/es/components/notion-editor/parseMarkdown.js +184 -0
- package/es/components/operator-chain/components/AddButton.js +20 -0
- package/es/components/operator-chain/components/IOCard.js +8 -0
- package/es/components/operator-chain/components/SingleCard.js +12 -0
- package/es/components/operator-chain/components/VirtualDropdown.js +56 -0
- package/es/components/operator-chain/index.js +83 -0
- package/es/components/operator-chain/index.module.scss.js +232 -0
- package/es/components/permission-editor/index.js +9 -0
- package/es/components/permission-editor/permissionEditModal/index.js +37 -0
- package/es/components/permission-editor/permissionEditor/index.js +253 -0
- package/es/components/permission-editor/permissionEditor/index.module.scss.js +22 -0
- package/es/components/permission-editor/permissionViewPopover/index.js +9 -0
- package/es/components/popover-select/index.js +42 -0
- package/es/components/popover-select/index.module.scss.js +22 -0
- package/es/components/radio-card/index.js +24 -0
- package/es/components/radio-card/index.scss.js +58 -0
- package/es/components/section-heading/classNames.js +22 -0
- package/es/components/section-heading/components.js +27 -0
- package/es/components/section-heading/context.js +13 -0
- package/es/components/section-heading/index.css.js +648 -0
- package/es/components/section-heading/index.js +37 -0
- package/es/components/status-tag/index.js +31 -0
- package/es/components/tag-group-filter/dataSizeFilter.js +100 -0
- package/es/components/tag-group-filter/index.js +53 -0
- package/es/components/tag-group-filter/index.module.scss.js +134 -0
- package/es/components/tag-group-filter/tagFilter.js +19 -0
- package/es/components/tag-view/index.js +138 -0
- package/es/components/tag-view/index.module.scss.js +56 -0
- package/es/components/tag-view/useSize.js +41 -0
- package/es/components/tip-tap/bubble-menu.js +47 -0
- package/es/components/tip-tap/editor.js +34 -0
- package/es/components/tip-tap/extensions/index.js +133 -0
- package/es/components/tip-tap/extensions/markdown-paste.js +148 -0
- package/es/components/tip-tap/icons/index.js +29 -0
- package/es/components/tip-tap/reader.js +15 -0
- package/es/components/tip-tap/styles/editor.css.js +863 -0
- package/es/components/tip-tap/toolbar/components/color-picker.js +76 -0
- package/es/components/tip-tap/toolbar/components/heading-dropdown.js +44 -0
- package/es/components/tip-tap/toolbar/components/image-button.js +26 -0
- package/es/components/tip-tap/toolbar/components/link-button.js +107 -0
- package/es/components/tip-tap/toolbar/components/table-button.js +37 -0
- package/es/components/tip-tap/toolbar/components/toolbar-button.js +7 -0
- package/es/components/tip-tap/toolbar/index.js +39 -0
- package/es/components/uploadDrawer/UploadStoreProvider.js +61 -0
- package/es/components/uploadDrawer/fileUploadDrawer.js +66 -0
- package/es/components/uploadDrawer/fileUploadDrawerFileDragger.js +71 -0
- package/es/components/uploadDrawer/fileUploadDrawerList.js +54 -0
- package/es/components/uploadDrawer/fileUploadDrawerListProgressButton.js +54 -0
- package/es/components/uploadDrawer/hooks/useCancelUpload.js +37 -0
- package/es/components/uploadDrawer/hooks/useFilterFiles.js +107 -0
- package/es/components/uploadDrawer/hooks/useFinishUpload.js +33 -0
- package/es/components/uploadDrawer/hooks/useFormatFiles.js +54 -0
- package/es/components/uploadDrawer/hooks/useProgressButtonRef.js +22 -0
- package/es/components/uploadDrawer/hooks/useRemoveFilesInUploadQueue.js +21 -0
- package/es/components/uploadDrawer/hooks/useResumeUnfinishedUploads.js +52 -0
- package/es/components/uploadDrawer/hooks/useRetryUpload.js +35 -0
- package/es/components/uploadDrawer/hooks/useSaveUnfinishedUploads.js +42 -0
- package/es/components/uploadDrawer/hooks/useSetupUpload.js +80 -0
- package/es/components/uploadDrawer/hooks/useUploadFileToOSS.js +23 -0
- package/es/components/uploadDrawer/index.css.js +511 -0
- package/es/components/uploadDrawer/index.js +43 -0
- package/es/components/uploadDrawer/utils/calcDisplaySize.js +19 -0
- package/es/components/uploadDrawer/utils/constant.js +16 -0
- package/es/components/uploadDrawer/utils/createFileToUpload.js +51 -0
- package/es/components/uploadDrawer/utils/fileDB/deleteFileInStore.js +28 -0
- package/es/components/uploadDrawer/utils/fileDB/deleteObjectStore.js +28 -0
- package/es/components/uploadDrawer/utils/fileDB/handleAddFilesToDB.js +37 -0
- package/es/components/uploadDrawer/utils/fileDB/index.js +9 -0
- package/es/components/uploadDrawer/utils/fileDB/openDB.js +111 -0
- package/es/components/uploadDrawer/utils/retrieveAllFiles.js +110 -0
- package/es/components/uploadDrawer/utils/shouldCreateNewFile.js +13 -0
- package/es/components/uploadDrawer/utils/splitFileIntoChunk.js +15 -0
- package/es/index.js +42 -1
- package/es/lib/utils.js +8 -0
- package/lib/index.js +1 -1
- package/package.json +164 -154
- package/rollup.es.config.mjs +177 -0
- package/tsconfig.rollup.json +7 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
var style = document.createElement('style');
|
|
2
|
+
style.textContent = `@charset "UTF-8";
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: "AlibabaPuHuiTi-3-45-Light";
|
|
5
|
+
src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-45-Light.ttf") format("truetype");
|
|
6
|
+
}
|
|
7
|
+
@font-face {
|
|
8
|
+
/** 对应字重 600 */
|
|
9
|
+
font-family: "AlibabaPuHuiTi-3-75-SemiBold";
|
|
10
|
+
src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-75-SemiBold.ttf") format("truetype");
|
|
11
|
+
}
|
|
12
|
+
.index-module__permModal___4Ukdb .ant-modal-content {
|
|
13
|
+
padding: 0 24px;
|
|
14
|
+
}
|
|
15
|
+
.index-module__permModal___4Ukdb .ant-modal-title {
|
|
16
|
+
padding-top: 50px;
|
|
17
|
+
font-family: "AlibabaPuHuiTi-3-75-SemiBold";
|
|
18
|
+
font-weight: normal;
|
|
19
|
+
font-size: 16px;
|
|
20
|
+
color: #222427;
|
|
21
|
+
line-height: 1.5;
|
|
22
|
+
text-align: center;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
text-transform: none;
|
|
25
|
+
}
|
|
26
|
+
.index-module__permModal___4Ukdb .ant-modal-body {
|
|
27
|
+
font-family: "AlibabaPuHuiTi-3-45-Light";
|
|
28
|
+
font-weight: normal;
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
line-height: 14px;
|
|
31
|
+
text-align: center;
|
|
32
|
+
font-style: normal;
|
|
33
|
+
text-transform: none;
|
|
34
|
+
}
|
|
35
|
+
.index-module__permModal___4Ukdb .ant-modal-footer {
|
|
36
|
+
text-align: center;
|
|
37
|
+
padding: 16px 0;
|
|
38
|
+
}
|
|
39
|
+
.index-module__noModalWrap___v6QCa .index-module__title___V39im {
|
|
40
|
+
padding-top: 50px;
|
|
41
|
+
font-family: "AlibabaPuHuiTi-3-75-SemiBold";
|
|
42
|
+
font-weight: normal;
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
color: #222427;
|
|
45
|
+
line-height: 1.5;
|
|
46
|
+
text-align: center;
|
|
47
|
+
font-style: normal;
|
|
48
|
+
text-transform: none;
|
|
49
|
+
}
|
|
50
|
+
.index-module__noModalWrap___v6QCa .index-module__content___e307P {
|
|
51
|
+
font-family: "AlibabaPuHuiTi-3-45-Light";
|
|
52
|
+
font-weight: normal;
|
|
53
|
+
font-size: 14px;
|
|
54
|
+
line-height: 14px;
|
|
55
|
+
text-align: center;
|
|
56
|
+
font-style: normal;
|
|
57
|
+
text-transform: none;
|
|
58
|
+
}
|
|
59
|
+
.index-module__noModalWrap___v6QCa .index-module__footer___B5SEp {
|
|
60
|
+
padding: 16px 0;
|
|
61
|
+
}
|
|
62
|
+
.index-module__permFunModal___t0q5w .ant-modal-content {
|
|
63
|
+
padding: 0 24px;
|
|
64
|
+
}
|
|
65
|
+
.index-module__permFunModal___t0q5w .ant-modal-body {
|
|
66
|
+
font-size: 14px;
|
|
67
|
+
}
|
|
68
|
+
.index-module__permFunModal___t0q5w .ant-modal-confirm-title {
|
|
69
|
+
padding-top: 50px;
|
|
70
|
+
font-family: "AlibabaPuHuiTi-3-75-SemiBold";
|
|
71
|
+
font-weight: normal;
|
|
72
|
+
font-size: 16px;
|
|
73
|
+
color: #222427;
|
|
74
|
+
line-height: 1.5;
|
|
75
|
+
text-align: center;
|
|
76
|
+
font-style: normal;
|
|
77
|
+
text-transform: none;
|
|
78
|
+
}
|
|
79
|
+
.index-module__permFunModal___t0q5w .ant-modal-confirm-content {
|
|
80
|
+
font-family: "AlibabaPuHuiTi-3-45-Light";
|
|
81
|
+
font-weight: normal;
|
|
82
|
+
font-size: 14px;
|
|
83
|
+
line-height: 14px;
|
|
84
|
+
text-align: center;
|
|
85
|
+
font-style: normal;
|
|
86
|
+
text-transform: none;
|
|
87
|
+
}
|
|
88
|
+
.index-module__permFunModal___t0q5w .ant-modal-confirm-btns {
|
|
89
|
+
text-align: center;
|
|
90
|
+
padding: 16px 0;
|
|
91
|
+
}`;
|
|
92
|
+
document.head.appendChild(style);
|
|
93
|
+
|
|
94
|
+
var permModal = "index-module__permModal___4Ukdb";var noModalWrap = "index-module__noModalWrap___v6QCa";var title = "index-module__title___V39im";var content = "index-module__content___e307P";var footer = "index-module__footer___B5SEp";var permFunModal = "index-module__permFunModal___t0q5w";
|
|
95
|
+
|
|
96
|
+
export { content, footer, noModalWrap, permFunModal, permModal, title };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Tag } from 'antd';
|
|
3
|
+
|
|
4
|
+
const colorPresets = {
|
|
5
|
+
confidential: '#FAAD14', // 限制公开
|
|
6
|
+
public: '#53C31B', // 公开
|
|
7
|
+
private: '#FE4D4F', // 非公开
|
|
8
|
+
};
|
|
9
|
+
function AuthTag(props) {
|
|
10
|
+
const { type = 'public', children } = props;
|
|
11
|
+
const colors = colorPresets[type];
|
|
12
|
+
return (jsx(Tag, { style: {
|
|
13
|
+
backgroundColor: '#fff',
|
|
14
|
+
border: `1px solid ${colors}`,
|
|
15
|
+
borderRadius: '4px',
|
|
16
|
+
fontSize: '12px',
|
|
17
|
+
color: `${colors}`,
|
|
18
|
+
padding: '0 8px',
|
|
19
|
+
fontFamily: 'AlibabaPuHuiTi-3-55-RegularL3',
|
|
20
|
+
}, children: children }));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export { AuthTag as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { "w-card-base" as w_card_base, bgblue, bgpurple, "t-card-base" as t_card_base } from './index.module.scss.js';
|
|
3
|
+
|
|
4
|
+
function Tcard(props) {
|
|
5
|
+
return (jsx("div", { style: {
|
|
6
|
+
width: props.width,
|
|
7
|
+
height: props.height,
|
|
8
|
+
}, className: `${t_card_base} ${props.type === 'workflow' ? bgblue : bgpurple}`, children: props.children }));
|
|
9
|
+
}
|
|
10
|
+
function Wcard(props) {
|
|
11
|
+
return (jsx("div", { style: {
|
|
12
|
+
width: props.width,
|
|
13
|
+
height: props.height,
|
|
14
|
+
}, className: `${w_card_base} ${props.type === 'workflow' ? bgblue : bgpurple}`, children: props.children }));
|
|
15
|
+
}
|
|
16
|
+
function BenchCard(props) {
|
|
17
|
+
return (jsxs("div", { children: [(props === null || props === void 0 ? void 0 : props.size) === 'small' && jsx(Wcard, Object.assign({}, props)), (!(props === null || props === void 0 ? void 0 : props.size) || (props === null || props === void 0 ? void 0 : props.size) === 'middle') && jsx(Tcard, Object.assign({}, props))] }));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { Tcard, Wcard, BenchCard as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
var style = document.createElement('style');
|
|
2
|
+
style.textContent = `.index-module__t-card-base___s99hJ {
|
|
3
|
+
width: 349px;
|
|
4
|
+
height: 280px;
|
|
5
|
+
border-radius: 10px 10px 10px 10px;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.index-module__bgblue___j--gQ {
|
|
9
|
+
background: linear-gradient(to top, #ffffff 0%, #f6f9fe 100%);
|
|
10
|
+
border: 1px solid #edf2fc;
|
|
11
|
+
-o-border-image: linear-gradient(180deg, rgb(237, 242, 252)) 1 1;
|
|
12
|
+
border-image: linear-gradient(180deg, rgb(237, 242, 252)) 1 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.index-module__bgblue___j--gQ:hover {
|
|
16
|
+
background: linear-gradient(to top, #ffffff 0%, #ecf4ff 100%);
|
|
17
|
+
box-shadow: 0px 8px 16px 0px rgba(7, 35, 76, 0.1);
|
|
18
|
+
border: 1px solid #afcfff;
|
|
19
|
+
-o-border-image: linear-gradient(180deg, rgba(23, 117, 254, 0.6)) 1 1;
|
|
20
|
+
border-image: linear-gradient(180deg, rgba(23, 117, 254, 0.6)) 1 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.index-module__bgpurple___4vuIR {
|
|
24
|
+
background: linear-gradient(to top, #ffffff 0%, #f7f5ff 100%);
|
|
25
|
+
border: 1px solid #ebe6ff;
|
|
26
|
+
-o-border-image: linear-gradient(180deg, rgb(236, 231, 255)) 1 1;
|
|
27
|
+
border-image: linear-gradient(180deg, rgb(236, 231, 255)) 1 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.index-module__bgpurple___4vuIR:hover {
|
|
31
|
+
background: linear-gradient(to top, #ffffff 0%, #e3dcff 100%);
|
|
32
|
+
box-shadow: 0px 8px 16px 0px rgba(40, 23, 92, 0.1);
|
|
33
|
+
border: 1px solid #c5b4ff;
|
|
34
|
+
-o-border-image: linear-gradient(180deg, rgba(114, 68, 255, 0.6)) 1 1;
|
|
35
|
+
border-image: linear-gradient(180deg, rgba(114, 68, 255, 0.6)) 1 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.index-module__w-card-base___iMmt5 {
|
|
39
|
+
width: 472px;
|
|
40
|
+
height: 148px;
|
|
41
|
+
border-radius: 10px 10px 10px 10px;
|
|
42
|
+
position: relative;
|
|
43
|
+
}`;
|
|
44
|
+
document.head.appendChild(style);
|
|
45
|
+
|
|
46
|
+
var t_card_base = "index-module__t-card-base___s99hJ";var bgblue = "index-module__bgblue___j--gQ";var bgpurple = "index-module__bgpurple___4vuIR";var w_card_base = "index-module__w-card-base___iMmt5";
|
|
47
|
+
|
|
48
|
+
export { bgblue, bgpurple, t_card_base as "t-card-base", w_card_base as "w-card-base" };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Modal } from 'antd';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import './index.scss.js';
|
|
5
|
+
|
|
6
|
+
function ConfirmAgain(props) {
|
|
7
|
+
var _a;
|
|
8
|
+
return (jsx(Modal, Object.assign({}, props, { width: (_a = props.width) !== null && _a !== void 0 ? _a : 400, wrapClassName: classNames('data-hub-ui-confirm-wrap', props.wrapClassName) })));
|
|
9
|
+
}
|
|
10
|
+
ConfirmAgain.confirm = (props) => {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
Modal.confirm(Object.assign(Object.assign({}, props), { width: (_a = props.width) !== null && _a !== void 0 ? _a : 400, closable: (_b = props.closable) !== null && _b !== void 0 ? _b : true, icon: (_c = props.icon) !== null && _c !== void 0 ? _c : null, wrapClassName: classNames('data-hub-ui-confirm-wrap', props.wrapClassName) }));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { ConfirmAgain as default };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var style = document.createElement('style');
|
|
2
|
+
style.textContent = `@charset "UTF-8";
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: "AlibabaPuHuiTi-3-45-Light";
|
|
5
|
+
src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-45-Light.ttf") format("truetype");
|
|
6
|
+
}
|
|
7
|
+
@font-face {
|
|
8
|
+
/** 对应字重 600 */
|
|
9
|
+
font-family: "AlibabaPuHuiTi-3-75-SemiBold";
|
|
10
|
+
src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-75-SemiBold.ttf") format("truetype");
|
|
11
|
+
}
|
|
12
|
+
.data-hub-ui-confirm-wrap .ant-modal-title,
|
|
13
|
+
.data-hub-ui-confirm-wrap .ant-modal-confirm-title {
|
|
14
|
+
font-family: "AlibabaPuHuiTi-3-75-SemiBold";
|
|
15
|
+
font-weight: normal;
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
color: #222427;
|
|
18
|
+
line-height: 1.5;
|
|
19
|
+
text-align: center;
|
|
20
|
+
position: relative;
|
|
21
|
+
top: -4px;
|
|
22
|
+
}
|
|
23
|
+
.data-hub-ui-confirm-wrap .ant-modal-confirm-paragraph {
|
|
24
|
+
max-width: none;
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
27
|
+
.data-hub-ui-confirm-wrap .ant-modal-body {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
}
|
|
32
|
+
.data-hub-ui-confirm-wrap .ant-modal-footer,
|
|
33
|
+
.data-hub-ui-confirm-wrap .ant-modal-confirm-btns {
|
|
34
|
+
text-align: center;
|
|
35
|
+
margin-top: 28px;
|
|
36
|
+
}`;
|
|
37
|
+
document.head.appendChild(style);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { message } from 'antd';
|
|
3
|
+
import copyToClipboard from 'copy-to-clipboard';
|
|
4
|
+
import { icon } from './index.module.scss.js';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
|
|
7
|
+
const successMsg = {
|
|
8
|
+
zh: '已复制',
|
|
9
|
+
en: 'Copied',
|
|
10
|
+
};
|
|
11
|
+
function Copy(props) {
|
|
12
|
+
const { showFeedback = true, text, locale = 'zh' } = props;
|
|
13
|
+
const onClick = () => {
|
|
14
|
+
if (text) {
|
|
15
|
+
copyToClipboard(text);
|
|
16
|
+
if (showFeedback) {
|
|
17
|
+
message.success(successMsg[locale]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
(props === null || props === void 0 ? void 0 : props.onClick) && props.onClick();
|
|
21
|
+
};
|
|
22
|
+
return (jsx("span", { className: classNames(icon, 'data-hub-ui-copy-icon'), onClick: onClick, children: "\uE85C" }));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 复制文本内容到粘贴板
|
|
26
|
+
* @param text {string} 文本内容
|
|
27
|
+
* @param options {object} 其它选项
|
|
28
|
+
* @param options.showFeedback {boolean} 是否展示复制成功的反馈信息,默认展示
|
|
29
|
+
* @param options.locale {string} 语言,默认:zh
|
|
30
|
+
*/
|
|
31
|
+
function copy(text, options = { showFeedback: true, locale: 'zh' }) {
|
|
32
|
+
const { showFeedback = 'true', locale = 'zh' } = options;
|
|
33
|
+
if (text) {
|
|
34
|
+
copyToClipboard(text);
|
|
35
|
+
if (showFeedback) {
|
|
36
|
+
message.success(successMsg[locale]);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { copy, Copy as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var style = document.createElement('style');
|
|
2
|
+
style.textContent = `.index-module__icon___cJc9L {
|
|
3
|
+
font-family: "hub-iconfont";
|
|
4
|
+
color: #545b64;
|
|
5
|
+
font-size: 12px;
|
|
6
|
+
cursor: pointer;
|
|
7
|
+
}
|
|
8
|
+
.index-module__icon___cJc9L:hover {
|
|
9
|
+
color: #1775fe;
|
|
10
|
+
}`;
|
|
11
|
+
document.head.appendChild(style);
|
|
12
|
+
|
|
13
|
+
var icon = "index-module__icon___cJc9L";
|
|
14
|
+
|
|
15
|
+
export { icon };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Flex, Tag, Popover } from 'antd';
|
|
3
|
+
import { useRef, useState, useMemo, useEffect } from 'react';
|
|
4
|
+
import { "new-task-card-item" as new_task_card_item, "card-actived" as card_actived, "new-task-card-header" as new_task_card_header, "new-task-card-title" as new_task_card_title, "new-task-card-update-time" as new_task_card_update_time, "new-task-card-update-time-icon" as new_task_card_update_time_icon, "new-task-card-update-time-text" as new_task_card_update_time_text, "new-task-card-tags" as new_task_card_tags, "new-task-card-tags-measure" as new_task_card_tags_measure, "new-task-card-tag-measure-item" as new_task_card_tag_measure_item, "new-task-card-tags-visible" as new_task_card_tags_visible, "new-task-card-tags-ellipsis" as new_task_card_tags_ellipsis, "new-task-card-tags-popover-content" as new_task_card_tags_popover_content, "new-task-card-description" as new_task_card_description } from './index.module.scss.js';
|
|
5
|
+
import sourceIcon from '../../assets/source.png.js';
|
|
6
|
+
|
|
7
|
+
function CorpusCard({ card, isActive, width, onClick, onCardClick }) {
|
|
8
|
+
const tagContainerRef = useRef(null);
|
|
9
|
+
const tagMeasureRefs = useRef([]);
|
|
10
|
+
const [visibleTagCount, setVisibleTagCount] = useState(card.labels.length);
|
|
11
|
+
const labelTypeColorMap = useMemo(() => {
|
|
12
|
+
var _a;
|
|
13
|
+
return (_a = card.labelTypeColorMap) !== null && _a !== void 0 ? _a : [];
|
|
14
|
+
}, [card.labelTypeColorMap]);
|
|
15
|
+
const formattedUpdateTime = useMemo(() => {
|
|
16
|
+
if (!card.updateTime)
|
|
17
|
+
return '';
|
|
18
|
+
const date = new Date(card.updateTime);
|
|
19
|
+
if (Number.isNaN(date.getTime()))
|
|
20
|
+
return '';
|
|
21
|
+
const year = date.getFullYear();
|
|
22
|
+
const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
23
|
+
const day = String(date.getDate()).padStart(2, '0');
|
|
24
|
+
return `${year}-${month}-${day}`;
|
|
25
|
+
}, [card.updateTime]);
|
|
26
|
+
const getLabelColor = (type, colorMap) => {
|
|
27
|
+
const target = colorMap.find((item) => item.type === type);
|
|
28
|
+
if (!target)
|
|
29
|
+
return {};
|
|
30
|
+
return {
|
|
31
|
+
backgroundColor: target.bgColor,
|
|
32
|
+
borderColor: target.borderColor,
|
|
33
|
+
color: target.textColor,
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const handleCardClick = (id) => {
|
|
37
|
+
onCardClick === null || onCardClick === void 0 ? void 0 : onCardClick(id);
|
|
38
|
+
};
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
const tagGap = 4;
|
|
41
|
+
const ellipsisTagWidth = 20;
|
|
42
|
+
const updateVisibleTags = () => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const containerWidth = (_b = (_a = tagContainerRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _b !== void 0 ? _b : 0;
|
|
45
|
+
const tagWidths = card.labels.map((_, index) => { var _a, _b; return (_b = (_a = tagMeasureRefs.current[index]) === null || _a === void 0 ? void 0 : _a.offsetWidth) !== null && _b !== void 0 ? _b : 0; });
|
|
46
|
+
if (!containerWidth || !tagWidths.length) {
|
|
47
|
+
setVisibleTagCount(card.labels.length);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const totalWidth = tagWidths.reduce((sum, current, index) => sum + current + (index === 0 ? 0 : tagGap), 0);
|
|
51
|
+
if (totalWidth <= containerWidth) {
|
|
52
|
+
setVisibleTagCount(card.labels.length);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
let usedWidth = 0;
|
|
56
|
+
let visibleCount = 0;
|
|
57
|
+
for (let index = 0; index < tagWidths.length; index += 1) {
|
|
58
|
+
const currentTagWidth = tagWidths[index];
|
|
59
|
+
const hasRemainingTags = index < tagWidths.length - 1;
|
|
60
|
+
const reservedWidthForEllipsis = hasRemainingTags ? tagGap + ellipsisTagWidth : 0;
|
|
61
|
+
const nextWidth = (visibleCount === 0 ? 0 : tagGap) + currentTagWidth + reservedWidthForEllipsis;
|
|
62
|
+
if (usedWidth + nextWidth > containerWidth)
|
|
63
|
+
break;
|
|
64
|
+
usedWidth += (visibleCount === 0 ? 0 : tagGap) + currentTagWidth;
|
|
65
|
+
visibleCount += 1;
|
|
66
|
+
}
|
|
67
|
+
setVisibleTagCount(Math.max(0, visibleCount));
|
|
68
|
+
};
|
|
69
|
+
updateVisibleTags();
|
|
70
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
71
|
+
updateVisibleTags();
|
|
72
|
+
});
|
|
73
|
+
if (tagContainerRef.current) {
|
|
74
|
+
resizeObserver.observe(tagContainerRef.current);
|
|
75
|
+
}
|
|
76
|
+
return () => {
|
|
77
|
+
resizeObserver.disconnect();
|
|
78
|
+
};
|
|
79
|
+
}, [card.labels, width]);
|
|
80
|
+
const needCollapseTags = visibleTagCount < card.labels.length;
|
|
81
|
+
const visibleTags = needCollapseTags ? card.labels.slice(0, visibleTagCount) : card.labels;
|
|
82
|
+
const hiddenTags = needCollapseTags ? card.labels.slice(visibleTagCount) : [];
|
|
83
|
+
return (jsx("div", { className: `${new_task_card_item} ${isActive ? card_actived : ''}`, style: { width: width || 375 }, onClick: () => handleCardClick(card.id), children: jsxs(Flex, { vertical: true, gap: 16, children: [jsxs("div", { className: new_task_card_header, children: [jsx("div", { className: new_task_card_title, children: card.name }), jsxs("span", { className: new_task_card_update_time, children: [jsx("img", { src: sourceIcon, alt: "update-time-icon", className: new_task_card_update_time_icon }), jsx("span", { className: new_task_card_update_time_text, children: formattedUpdateTime })] })] }), jsxs("div", { className: new_task_card_tags, children: [jsx("div", { className: new_task_card_tags_measure, children: card.labels.map((label, index) => (jsx("span", { ref: (element) => {
|
|
84
|
+
tagMeasureRefs.current[index] = element;
|
|
85
|
+
}, className: new_task_card_tag_measure_item, children: jsx(Tag, { style: getLabelColor(label.type, labelTypeColorMap), bordered: true, children: label.name }) }, `measure-${card.id}-${label.type}-${label.name}`))) }), jsxs("div", { ref: tagContainerRef, className: new_task_card_tags_visible, children: [visibleTags.map((label) => (jsx(Tag, { style: getLabelColor(label.type, labelTypeColorMap), bordered: true, children: label.name }, `${card.id}-${label.type}-${label.name}`))), needCollapseTags ? (jsx(Popover, { trigger: "hover", content: jsx("div", { className: new_task_card_tags_popover_content, children: hiddenTags.map((label) => (jsx(Tag, { style: getLabelColor(label.type, labelTypeColorMap), bordered: true, children: label.name }, `hidden-${card.id}-${label.type}-${label.name}`))) }), children: jsx(Tag, { className: new_task_card_tags_ellipsis, children: "..." }) })) : null] })] }), jsx("div", { className: new_task_card_description, children: card.description })] }) }, card.id));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { CorpusCard as default };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
var style = document.createElement('style');
|
|
2
|
+
style.textContent = `@charset "UTF-8";
|
|
3
|
+
/* 响应式设计 */
|
|
4
|
+
@font-face {
|
|
5
|
+
/** 对应字重 400 */
|
|
6
|
+
font-family: "AlibabaPuHuiTi-3-55-Regular";
|
|
7
|
+
src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-55-Regular.ttf") format("truetype");
|
|
8
|
+
}
|
|
9
|
+
@font-face {
|
|
10
|
+
/** 对应字重 500 */
|
|
11
|
+
font-family: "AlibabaPuHuiTi-3-65-Medium";
|
|
12
|
+
src: url("https://haina-datahub.zero2x.org/ossRoute/frontend/resources/fonts/alibaba_puhuiti_3/AlibabaPuHuiTi-3-65-Medium.ttf") format("truetype");
|
|
13
|
+
}
|
|
14
|
+
.index-module__new-task-cards-container___ydHyH {
|
|
15
|
+
margin-top: 20px;
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-columns: repeat(3, 1fr);
|
|
18
|
+
gap: 20px;
|
|
19
|
+
}
|
|
20
|
+
.index-module__new-task-card-item___4Ij8K {
|
|
21
|
+
transition: transform 0.3s ease;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
padding: 16px;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
height: 152px;
|
|
29
|
+
background: linear-gradient(360deg, #ffffff -3.49%, #f6f9fe 100%);
|
|
30
|
+
border: 1px solid #edf2fc;
|
|
31
|
+
border-radius: 10px;
|
|
32
|
+
}
|
|
33
|
+
.index-module__new-task-card-item___4Ij8K:hover {
|
|
34
|
+
border: 1px solid rgba(23, 117, 254, 0.7);
|
|
35
|
+
box-shadow: 0px 8px 24px rgba(7, 35, 76, 0.15);
|
|
36
|
+
border-radius: 10px;
|
|
37
|
+
}
|
|
38
|
+
.index-module__card-actived___Ds-rJ {
|
|
39
|
+
background: linear-gradient(180deg, rgba(23, 117, 254, 0.1) 0%, rgba(23, 117, 254, 0.01) 100%);
|
|
40
|
+
border: 1px solid #1775fe;
|
|
41
|
+
}
|
|
42
|
+
.index-module__new-task-card-header___YNZyQ {
|
|
43
|
+
height: 24px;
|
|
44
|
+
display: flex;
|
|
45
|
+
justify-content: space-between;
|
|
46
|
+
align-items: center;
|
|
47
|
+
width: 100%;
|
|
48
|
+
}
|
|
49
|
+
.index-module__new-task-card-title___ij3JL {
|
|
50
|
+
font-family: "AlibabaPuHuiTi-3-65-Medium";
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 500;
|
|
53
|
+
font-size: 18px;
|
|
54
|
+
line-height: 24px;
|
|
55
|
+
color: #222427;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
text-overflow: ellipsis;
|
|
58
|
+
display: -webkit-box;
|
|
59
|
+
line-clamp: 1;
|
|
60
|
+
-webkit-line-clamp: 1;
|
|
61
|
+
-webkit-box-orient: vertical;
|
|
62
|
+
text-transform: none;
|
|
63
|
+
word-break: break-word;
|
|
64
|
+
}
|
|
65
|
+
.index-module__new-task-card-update-time___-v0WT {
|
|
66
|
+
display: inline-flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 4px;
|
|
69
|
+
}
|
|
70
|
+
.index-module__new-task-card-update-time-icon___1BRTB {
|
|
71
|
+
width: 18px;
|
|
72
|
+
height: 18px;
|
|
73
|
+
}
|
|
74
|
+
.index-module__new-task-card-update-time-text___JDOy0 {
|
|
75
|
+
font-family: "AlibabaPuHuiTi-3-55-Regular";
|
|
76
|
+
font-style: normal;
|
|
77
|
+
font-weight: 400;
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
line-height: 17px;
|
|
80
|
+
color: #545b64;
|
|
81
|
+
}
|
|
82
|
+
.index-module__new-task-card-description___a-I9s {
|
|
83
|
+
height: 40px;
|
|
84
|
+
font-family: "AlibabaPuHuiTi-3-55-Regular";
|
|
85
|
+
font-style: normal;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
font-size: 14px;
|
|
88
|
+
line-height: 20px;
|
|
89
|
+
color: #545b64;
|
|
90
|
+
overflow: hidden;
|
|
91
|
+
text-overflow: ellipsis;
|
|
92
|
+
display: -webkit-box;
|
|
93
|
+
line-clamp: 2;
|
|
94
|
+
-webkit-line-clamp: 2;
|
|
95
|
+
-webkit-box-orient: vertical;
|
|
96
|
+
text-transform: none;
|
|
97
|
+
word-break: break-word;
|
|
98
|
+
}
|
|
99
|
+
.index-module__new-task-card-tags___kIHzm {
|
|
100
|
+
/* Auto layout */
|
|
101
|
+
position: relative;
|
|
102
|
+
height: 20px;
|
|
103
|
+
}
|
|
104
|
+
.index-module__new-task-card-tags-visible___r4txK {
|
|
105
|
+
display: flex;
|
|
106
|
+
flex-direction: row;
|
|
107
|
+
flex-wrap: nowrap;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 4px;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
width: 100%;
|
|
112
|
+
height: 20px;
|
|
113
|
+
}
|
|
114
|
+
.index-module__new-task-card-tags-measure___B-jpV {
|
|
115
|
+
position: absolute;
|
|
116
|
+
left: 0;
|
|
117
|
+
top: 0;
|
|
118
|
+
visibility: hidden;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
white-space: nowrap;
|
|
121
|
+
display: inline-flex;
|
|
122
|
+
gap: 4px;
|
|
123
|
+
}
|
|
124
|
+
.index-module__new-task-card-tag-measure-item___yWIae {
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
}
|
|
127
|
+
.index-module__new-task-card-tags-popover-content___rrMoB {
|
|
128
|
+
display: flex;
|
|
129
|
+
flex-wrap: wrap;
|
|
130
|
+
gap: 4px;
|
|
131
|
+
max-width: 260px;
|
|
132
|
+
}
|
|
133
|
+
.index-module__new-task-card-tags-ellipsis___GVtdA {
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: row;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
align-items: center;
|
|
138
|
+
padding: 0px 8px;
|
|
139
|
+
gap: 3px;
|
|
140
|
+
width: 20px;
|
|
141
|
+
height: 20px;
|
|
142
|
+
background: #f4f6fa;
|
|
143
|
+
border-radius: 2px;
|
|
144
|
+
color: #545b64;
|
|
145
|
+
margin-inline-end: 0;
|
|
146
|
+
background-color: transparent !important;
|
|
147
|
+
}
|
|
148
|
+
.index-module__new-task-card-empty-title___di6z- {
|
|
149
|
+
/* 空白模板 */
|
|
150
|
+
display: flex;
|
|
151
|
+
align-items: center;
|
|
152
|
+
justify-content: center;
|
|
153
|
+
font-style: normal;
|
|
154
|
+
font-weight: 600;
|
|
155
|
+
font-size: 18px;
|
|
156
|
+
line-height: 24px;
|
|
157
|
+
text-align: center;
|
|
158
|
+
height: 152px;
|
|
159
|
+
}
|
|
160
|
+
.index-module__card-detail-btn___QHpSP {
|
|
161
|
+
padding: 4px 16px;
|
|
162
|
+
width: 56px;
|
|
163
|
+
height: 24px;
|
|
164
|
+
background: #ffffff;
|
|
165
|
+
border: 1px solid #d9e0ed;
|
|
166
|
+
border-radius: 20px;
|
|
167
|
+
}`;
|
|
168
|
+
document.head.appendChild(style);
|
|
169
|
+
var new_task_card_item = "index-module__new-task-card-item___4Ij8K";var card_actived = "index-module__card-actived___Ds-rJ";var new_task_card_header = "index-module__new-task-card-header___YNZyQ";var new_task_card_title = "index-module__new-task-card-title___ij3JL";var new_task_card_update_time = "index-module__new-task-card-update-time___-v0WT";var new_task_card_update_time_icon = "index-module__new-task-card-update-time-icon___1BRTB";var new_task_card_update_time_text = "index-module__new-task-card-update-time-text___JDOy0";var new_task_card_description = "index-module__new-task-card-description___a-I9s";var new_task_card_tags = "index-module__new-task-card-tags___kIHzm";var new_task_card_tags_visible = "index-module__new-task-card-tags-visible___r4txK";var new_task_card_tags_measure = "index-module__new-task-card-tags-measure___B-jpV";var new_task_card_tag_measure_item = "index-module__new-task-card-tag-measure-item___yWIae";var new_task_card_tags_popover_content = "index-module__new-task-card-tags-popover-content___rrMoB";var new_task_card_tags_ellipsis = "index-module__new-task-card-tags-ellipsis___GVtdA";
|
|
170
|
+
|
|
171
|
+
export { card_actived as "card-actived", new_task_card_description as "new-task-card-description", new_task_card_header as "new-task-card-header", new_task_card_item as "new-task-card-item", new_task_card_tag_measure_item as "new-task-card-tag-measure-item", new_task_card_tags as "new-task-card-tags", new_task_card_tags_ellipsis as "new-task-card-tags-ellipsis", new_task_card_tags_measure as "new-task-card-tags-measure", new_task_card_tags_popover_content as "new-task-card-tags-popover-content", new_task_card_tags_visible as "new-task-card-tags-visible", new_task_card_title as "new-task-card-title", new_task_card_update_time as "new-task-card-update-time", new_task_card_update_time_icon as "new-task-card-update-time-icon", new_task_card_update_time_text as "new-task-card-update-time-text" };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get text alignment class based on align prop
|
|
3
|
+
*/
|
|
4
|
+
function getAlignClass(align) {
|
|
5
|
+
return align === 'center' ? 'dhu-text-center' : align === 'right' ? 'dhu-text-right' : undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Get icon alignment class based on align prop
|
|
9
|
+
*/
|
|
10
|
+
function getIconAlignClass(align) {
|
|
11
|
+
return align === 'center'
|
|
12
|
+
? 'dhu-justify-self-center'
|
|
13
|
+
: align === 'right'
|
|
14
|
+
? 'dhu-justify-self-end'
|
|
15
|
+
: 'dhu-justify-self-start';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Get icon rounded class based on iconVariant and size
|
|
19
|
+
*/
|
|
20
|
+
function getIconRoundedClass(iconVariant, size) {
|
|
21
|
+
if (iconVariant === 'full')
|
|
22
|
+
return 'dhu-rounded-full';
|
|
23
|
+
if (iconVariant === 'square')
|
|
24
|
+
return 'dhu-rounded-none';
|
|
25
|
+
if (size === 'sm')
|
|
26
|
+
return 'dhu-rounded-lg';
|
|
27
|
+
if (size === 'md')
|
|
28
|
+
return 'dhu-rounded-xl';
|
|
29
|
+
return 'dhu-rounded-2xl';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get icon size classes based on size
|
|
33
|
+
*/
|
|
34
|
+
function getIconSizeClasses(size) {
|
|
35
|
+
return size === 'sm'
|
|
36
|
+
? 'dhu-w-9 dhu-h-9'
|
|
37
|
+
: size === 'md'
|
|
38
|
+
? 'dhu-w-12 dhu-h-12'
|
|
39
|
+
: 'dhu-w-[60px] dhu-h-[60px]';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get title size classes based on size
|
|
43
|
+
*/
|
|
44
|
+
function getTitleSizeClasses(size) {
|
|
45
|
+
return size === 'sm'
|
|
46
|
+
? 'dhu-text-base dhu-leading-6'
|
|
47
|
+
: size === 'md'
|
|
48
|
+
? 'dhu-text-xl dhu-leading-7'
|
|
49
|
+
: 'dhu-text-2xl dhu-leading-8';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Get description size classes based on size
|
|
53
|
+
*/
|
|
54
|
+
function getDescriptionSizeClasses(size) {
|
|
55
|
+
return size === 'sm'
|
|
56
|
+
? 'dhu-text-xs dhu-leading-4'
|
|
57
|
+
: size === 'md'
|
|
58
|
+
? 'dhu-text-sm dhu-leading-5'
|
|
59
|
+
: 'dhu-text-base dhu-leading-6';
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Get root container classes based on size
|
|
63
|
+
*/
|
|
64
|
+
function getRootSizeClasses(size) {
|
|
65
|
+
return size === 'sm'
|
|
66
|
+
? 'dhu-rounded-xl dhu-p-3 dhu-gap-2'
|
|
67
|
+
: size === 'md'
|
|
68
|
+
? 'dhu-rounded-2xl dhu-p-4 dhu-gap-3'
|
|
69
|
+
: 'dhu-rounded-[20px] dhu-p-5 dhu-gap-4';
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { getAlignClass, getDescriptionSizeClasses, getIconAlignClass, getIconRoundedClass, getIconSizeClasses, getRootSizeClasses, getTitleSizeClasses };
|