@hsu-react/ui 0.0.12 → 0.0.14
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/LICENSE +21 -0
- package/README.md +11 -0
- package/es/components/Button/index.js +2 -2
- package/es/components/ChainGraph/ChainGraphServices/Edges/ArrowEdge.js +4 -4
- package/es/components/ChainGraph/ChainGraphServices/NodeEvents.js +3 -3
- package/es/components/ChainGraph/ChainGraphServices/RootNode.js +27 -27
- package/es/components/ChainGraph/ChainGraphServices/TreeNode.js +32 -32
- package/es/components/ChainGraph/ChainGraphServices/index.js +11 -11
- package/es/components/ChainGraph/_components/SearchSelect/index.module.scss +2 -2
- package/es/components/ChainGraph/_utils/findAncestorsOfNode.d.ts +5 -5
- package/es/components/ChainGraph/_utils/findAncestorsOfNode.js +12 -12
- package/es/components/ChainGraph/_utils/getTextSize.d.ts +4 -4
- package/es/components/ChainGraph/_utils/getTextSize.js +4 -4
- package/es/components/ChainGraph/_utils/styles.d.ts +3 -3
- package/es/components/ChainGraph/_utils/styles.js +3 -3
- package/es/components/ChainGraph/index.js +7 -7
- package/es/components/ChainGraph/index.module.scss +2 -2
- package/es/components/Chart/Bar/Bar3DOpt.d.ts +9 -9
- package/es/components/Chart/Bar/Bar3DOpt.js +29 -29
- package/es/components/Chart/Bar/index.d.ts +5 -5
- package/es/components/Chart/Bar/index.js +23 -23
- package/es/components/Chart/Bubble/index.d.ts +6 -6
- package/es/components/Chart/Bubble/index.js +41 -41
- package/es/components/Chart/Common/index.js +12 -12
- package/es/components/Chart/Gauge/index.js +11 -11
- package/es/components/Chart/Group/index.js +1 -1
- package/es/components/Chart/Heatmap/index.d.ts +12 -12
- package/es/components/Chart/Heatmap/index.js +24 -24
- package/es/components/Chart/Line/index.d.ts +5 -5
- package/es/components/Chart/Line/index.js +23 -23
- package/es/components/Chart/Pie/Pie3D/_hooks/index.js +14 -14
- package/es/components/Chart/Pie/Pie3D/_utils/label.js +30 -30
- package/es/components/Chart/Pie/index.d.ts +8 -8
- package/es/components/Chart/Pie/index.js +34 -34
- package/es/components/Chart/Polar/index.js +11 -11
- package/es/components/Chart/Radar/index.d.ts +8 -8
- package/es/components/Chart/Radar/index.js +7 -7
- package/es/components/Chart/Sankey/index.js +12 -12
- package/es/components/Chart/Tree/index.js +12 -12
- package/es/components/Chart/_utils/autoSmooth.d.ts +1 -1
- package/es/components/Chart/_utils/autoSmooth.js +2 -2
- package/es/components/Chart/_utils/bubble.js +8 -8
- package/es/components/Chart/_utils/cartesian.d.ts +4 -4
- package/es/components/Chart/_utils/cartesian.js +4 -4
- package/es/components/Chart/chartUtils/calculateAxisConfig.d.ts +4 -4
- package/es/components/Chart/chartUtils/calculateAxisConfig.js +16 -16
- package/es/components/Chart/chartUtils/chartTooltipFormatter.d.ts +1 -1
- package/es/components/Chart/chartUtils/chartTooltipFormatter.js +1 -1
- package/es/components/Chart/chartUtils/useDataZoomWindow.d.ts +7 -7
- package/es/components/Chart/chartUtils/useDataZoomWindow.js +4 -4
- package/es/components/Chart/chartUtils/useLegendSelection.d.ts +6 -6
- package/es/components/Chart/chartUtils/useLegendSelection.js +3 -3
- package/es/components/Chart/chartUtils/yAxisDisplayUnit.d.ts +4 -4
- package/es/components/Chart/chartUtils/yAxisDisplayUnit.js +4 -4
- package/es/components/Chart/index.d.ts +2 -2
- package/es/components/Chart/index.js +1 -1
- package/es/components/Chat/ChatHistory/_components/HistoryGroup/index.module.scss +1 -1
- package/es/components/Chat/ChatHistory/_components/HistoryItem/index.js +8 -8
- package/es/components/Chat/ChatHistory/_components/HistoryItem/index.module.scss +6 -6
- package/es/components/Chat/ChatHistory/_components/NewChatButton/index.module.scss +4 -4
- package/es/components/Chat/ChatHistory/_utils/index.d.ts +1 -1
- package/es/components/Chat/ChatHistory/_utils/index.js +1 -1
- package/es/components/Chat/ChatHistory/index.js +2 -2
- package/es/components/Chat/ChatHistory/index.module.scss +3 -3
- package/es/components/Chat/ChatInput/_components/AgentToggleButton/index.module.scss +8 -8
- package/es/components/Chat/ChatInput/_components/FileList/index.module.scss +3 -3
- package/es/components/Chat/ChatInput/_components/UploadButton/index.js +1 -1
- package/es/components/Chat/ChatInput/_utils/index.d.ts +3 -3
- package/es/components/Chat/ChatInput/_utils/index.js +3 -3
- package/es/components/Chat/ChatInput/index.d.ts +5 -5
- package/es/components/Chat/ChatInput/index.js +28 -23
- package/es/components/Chat/ChatInput/index.module.scss +4 -4
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/Copy/index.js +0 -1
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/Copy/index.module.scss +5 -5
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/LikeDislike/index.module.scss +5 -5
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/QuoteList/index.module.scss +7 -7
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/index.js +5 -5
- package/es/components/Chat/ChatList/_components/Assistant/AssistantItem/index.module.scss +5 -5
- package/es/components/Chat/ChatList/_components/Assistant/index.module.scss +3 -3
- package/es/components/Chat/ChatList/_components/User/index.module.scss +6 -6
- package/es/components/Chat/ChatList/_hooks/useAssistantNavigation.d.ts +1 -1
- package/es/components/Chat/ChatList/_hooks/useAssistantNavigation.js +1 -1
- package/es/components/Chat/ChatList/_hooks/useCalculateRowIndex.js +1 -1
- package/es/components/Chat/ChatList/_utils/cleanRedactedReasoning.d.ts +3 -3
- package/es/components/Chat/ChatList/_utils/cleanRedactedReasoning.js +3 -3
- package/es/components/Checkbox/CheckboxGroup/index.js +6 -6
- package/es/components/Checkbox/CheckboxGroup/index.module.scss +3 -3
- package/es/components/Checkbox/index.module.scss +2 -2
- package/es/components/CodeMirror/index.d.ts +6 -6
- package/es/components/CodeMirror/index.js +7 -7
- package/es/components/CodeMirror/index.module.scss +4 -4
- package/es/components/CodeMirror/linters/errorTranslator.d.ts +1 -1
- package/es/components/CodeMirror/linters/errorTranslator.js +19 -19
- package/es/components/CodeMirror/linters/jsonLinter.d.ts +2 -2
- package/es/components/CodeMirror/linters/jsonLinter.js +9 -9
- package/es/components/CodeMirror/linters/sqlLinter.js +29 -29
- package/es/components/Copy/index.module.scss +3 -3
- package/es/components/DatePicker/defaultModalPickerGetPopupContainer.d.ts +2 -2
- package/es/components/DatePicker/defaultModalPickerGetPopupContainer.js +2 -2
- package/es/components/DatePicker/index.js +9 -9
- package/es/components/Editor/index.js +3 -3
- package/es/components/Editor/index.module.scss +2 -2
- package/es/components/FileCol/index.js +2 -2
- package/es/components/FilePreview/_components/BasePreview/index.module.scss +2 -2
- package/es/components/FilePreview/_components/PdfPreview/index.module.scss +3 -3
- package/es/components/FilePreview/_hooks/useXlsxData.d.ts +1 -1
- package/es/components/FilePreview/_hooks/useXlsxData.js +1 -1
- package/es/components/FilePreview/index.module.scss +2 -2
- package/es/components/Form/ModalForm/_hooks/useAdaptiveColumnNum.d.ts +7 -7
- package/es/components/Form/ModalForm/_hooks/useAdaptiveColumnNum.js +8 -8
- package/es/components/Form/ModalForm/_hooks/useColumnFormItems.d.ts +3 -3
- package/es/components/Form/ModalForm/_hooks/useColumnFormItems.js +18 -18
- package/es/components/Form/ModalForm/_hooks/useFormItems.d.ts +5 -5
- package/es/components/Form/ModalForm/_hooks/useFormItems.js +5 -5
- package/es/components/FormItem/FormCodeMirror/index.js +6 -6
- package/es/components/FormItem/FormInput/FormPasswordStrength/index.module.scss +5 -5
- package/es/components/FormItem/FormRadio/index.module.scss +2 -2
- package/es/components/FormItem/FormUpload/index.module.scss +13 -13
- package/es/components/FormItem/ItemContainer/index.d.ts +1 -1
- package/es/components/FormItem/ItemContainer/index.js +3 -3
- package/es/components/FormItem/ItemContainer/index.module.scss +4 -4
- package/es/components/FormItem/databaseTypeMapping.d.ts +23 -23
- package/es/components/FormItem/databaseTypeMapping.js +36 -36
- package/es/components/FormItem/index.js +12 -12
- package/es/components/Icon/index.js +4 -4
- package/es/components/Input/Number/index.js +6 -6
- package/es/components/Input/Number/index.module.scss +5 -5
- package/es/components/Input/Password/index.js +3 -3
- package/es/components/Input/Range/index.js +3 -3
- package/es/components/Input/Range/index.module.scss +2 -2
- package/es/components/Input/Search/index.js +3 -3
- package/es/components/Input/TextArea/index.js +6 -6
- package/es/components/Input/TextArea/index.module.scss +5 -5
- package/es/components/Input/index.js +14 -14
- package/es/components/Input/index.module.scss +2 -2
- package/es/components/Markdown/Editor/index.module.scss +3 -3
- package/es/components/Markdown/Views/ArtifactBlock.d.ts +5 -5
- package/es/components/Markdown/Views/ArtifactBlock.js +2 -2
- package/es/components/Markdown/Views/MermaidBlock.d.ts +2 -2
- package/es/components/Markdown/Views/MermaidBlock.js +5 -5
- package/es/components/Markdown/Views/blocks.module.scss +11 -11
- package/es/components/Markdown/Views/index.js +5 -5
- package/es/components/Markdown/Views/index.module.scss +1 -1
- package/es/components/Modal/_hooks/useModalDrag.d.ts +1 -1
- package/es/components/Modal/_hooks/useModalDrag.js +1 -1
- package/es/components/Modal/_hooks/useModalElements.d.ts +1 -1
- package/es/components/Modal/_hooks/useModalElements.js +1 -1
- package/es/components/Modal/_utils/calculatePosition.d.ts +7 -7
- package/es/components/Modal/_utils/calculatePosition.js +7 -7
- package/es/components/Modal/index.module.scss +1 -1
- package/es/components/Operate/_hooks/useOperateEllipsis.d.ts +5 -5
- package/es/components/Operate/_hooks/useOperateEllipsis.js +5 -5
- package/es/components/Operate/index.js +16 -16
- package/es/components/Panel/DefaultPanel/index.module.scss +1 -1
- package/es/components/Panel/IframePanel/index.module.scss +1 -1
- package/es/components/Panel/ListPanel/ListModalPanel/index.d.ts +2 -2
- package/es/components/Panel/ListPanel/ListModalPanel/index.js +3 -3
- package/es/components/Panel/ListPanel/ListModalPanel/index.module.scss +1 -1
- package/es/components/Panel/ListPanel/_components/ColumnMgt/index.js +1 -1
- package/es/components/Panel/ListPanel/index.d.ts +2 -2
- package/es/components/Panel/ListPanel/index.js +1 -1
- package/es/components/Panel/ListPanel/index.module.scss +5 -5
- package/es/components/Search/SearchAdvanced/index.d.ts +4 -4
- package/es/components/Search/SearchAdvanced/index.js +4 -4
- package/es/components/Search/SearchAdvanced/index.module.scss +2 -2
- package/es/components/Search/SearchCard/_components/OptionRow/ChildrenItems/index.js +8 -8
- package/es/components/Search/SearchCard/_components/OptionRow/Item/index.js +13 -13
- package/es/components/Search/SearchCard/_components/OptionRow/index.js +8 -8
- package/es/components/Search/SearchCard/_hooks/useSearchCardCollapse.d.ts +1 -1
- package/es/components/Search/SearchCard/_hooks/useSearchCardCollapse.js +1 -1
- package/es/components/Search/SearchCard/_hooks/useSearchCardMoreOptions.d.ts +1 -1
- package/es/components/Search/SearchCard/_hooks/useSearchCardMoreOptions.js +14 -14
- package/es/components/Search/SearchCard/_hooks/useSearchCardValue.d.ts +1 -1
- package/es/components/Search/SearchCard/_hooks/useSearchCardValue.js +5 -5
- package/es/components/Search/SearchCard/_utils/getRealValues.d.ts +1 -1
- package/es/components/Search/SearchCard/_utils/getRealValues.js +5 -5
- package/es/components/Search/SearchCard/_utils/hasSelectedChildren.d.ts +1 -1
- package/es/components/Search/SearchCard/_utils/hasSelectedChildren.js +3 -3
- package/es/components/Search/SearchCard/_utils/typeGuards.d.ts +1 -1
- package/es/components/Search/SearchCard/_utils/typeGuards.js +1 -1
- package/es/components/Search/SearchCard/_utils/updateRealValue.d.ts +1 -1
- package/es/components/Search/SearchCard/_utils/updateRealValue.js +11 -11
- package/es/components/Search/SearchCard/index.js +1 -1
- package/es/components/Search/SearchCard/index.module.scss +8 -8
- package/es/components/Search/SearchCollapsible/index.d.ts +4 -4
- package/es/components/Search/SearchCollapsible/index.js +6 -6
- package/es/components/Search/SearchCollapsible/index.module.scss +2 -2
- package/es/components/Search/SearchWithFilter/index.d.ts +4 -4
- package/es/components/Search/SearchWithFilter/index.js +4 -4
- package/es/components/Search/SearchWithFilter/index.module.scss +2 -2
- package/es/components/Search/SearchWithMore/index.d.ts +4 -4
- package/es/components/Search/SearchWithMore/index.js +5 -5
- package/es/components/Search/SearchWithMore/index.module.scss +2 -2
- package/es/components/Search/_components/ButtonGroup/index.js +1 -1
- package/es/components/Search/_components/SearchBase/index.d.ts +8 -8
- package/es/components/Search/_components/SearchBase/index.js +5 -5
- package/es/components/Search/_components/SearchButtons/index.d.ts +2 -2
- package/es/components/Search/_hooks/useAdaptiveColumnNum.d.ts +9 -9
- package/es/components/Search/_hooks/useAdaptiveColumnNum.js +19 -19
- package/es/components/Search/_hooks/useSearchCommon.d.ts +1 -1
- package/es/components/Search/_hooks/useSearchCommon.js +21 -21
- package/es/components/Search/_hooks/useSearchExpand.d.ts +12 -12
- package/es/components/Search/_hooks/useSearchExpand.js +32 -32
- package/es/components/Search/_hooks/useSearchForm.d.ts +1 -1
- package/es/components/Search/_hooks/useSearchForm.js +1 -1
- package/es/components/Search/_hooks/useSearchItems.d.ts +5 -4
- package/es/components/Search/_hooks/useSearchItems.js +5 -4
- package/es/components/Search/_types/index.d.ts +12 -12
- package/es/components/Search/_utils/calculateButtonGroupAndColumnWidth.d.ts +6 -6
- package/es/components/Search/_utils/calculateButtonGroupAndColumnWidth.js +10 -10
- package/es/components/Search/_utils/calculateVisibleItems.d.ts +9 -9
- package/es/components/Search/_utils/calculateVisibleItems.js +12 -12
- package/es/components/Search/_utils/cleanSearchData.d.ts +3 -3
- package/es/components/Search/_utils/cleanSearchData.js +3 -3
- package/es/components/Search/_utils/measureButtonGroupWidth.d.ts +3 -3
- package/es/components/Search/_utils/measureButtonGroupWidth.js +4 -4
- package/es/components/Search/_utils/shouldDisplayExtraItem.d.ts +7 -7
- package/es/components/Search/_utils/shouldDisplayExtraItem.js +7 -7
- package/es/components/Search/index.d.ts +2 -2
- package/es/components/Search/index.js +4 -4
- package/es/components/Search/index.module.scss +1 -1
- package/es/components/SecondConf/index.module.scss +1 -1
- package/es/components/Select/AutoCompleteSelect/index.js +4 -4
- package/es/components/Select/AutoCompleteSelect/index.module.scss +6 -6
- package/es/components/Select/IconSelect/index.module.scss +2 -2
- package/es/components/Select/TreeSelect/_utils/getExpandedKeysByLevel.d.ts +4 -4
- package/es/components/Select/TreeSelect/_utils/getExpandedKeysByLevel.js +5 -5
- package/es/components/Select/TreeSelect/index.module.scss +1 -1
- package/es/components/Select/_hooks/useSelectComposition.d.ts +1 -1
- package/es/components/Select/_hooks/useSelectComposition.js +1 -1
- package/es/components/Select/_hooks/useSelectInputOptions.d.ts +1 -1
- package/es/components/Select/_hooks/useSelectInputOptions.js +1 -1
- package/es/components/Select/_utils/calculatePopupWidth.d.ts +1 -1
- package/es/components/Select/_utils/calculatePopupWidth.js +1 -1
- package/es/components/Select/_utils/filterOption.d.ts +1 -1
- package/es/components/Select/_utils/filterOption.js +1 -1
- package/es/components/Select/_utils/getElementPosition.d.ts +7 -6
- package/es/components/Select/_utils/getElementPosition.js +7 -6
- package/es/components/Select/index.module.scss +8 -8
- package/es/components/Spreadsheet/xlsxspread.js +2 -2
- package/es/components/Switch/index.module.scss +2 -2
- package/es/components/TabBar/index.module.scss +8 -8
- package/es/components/Table/_components/Pagination/index.js +3 -3
- package/es/components/Table/_hooks/useAutoScrolling.d.ts +1 -1
- package/es/components/Table/_hooks/useAutoScrolling.js +8 -7
- package/es/components/Table/_hooks/useEllipsisTooltip.d.ts +1 -1
- package/es/components/Table/_hooks/useEllipsisTooltip.js +6 -6
- package/es/components/Table/_hooks/usePaginationSync.d.ts +3 -3
- package/es/components/Table/_hooks/usePaginationSync.js +5 -5
- package/es/components/Table/_hooks/useScrollEnd.js +7 -7
- package/es/components/Table/_hooks/useTableColumns.js +30 -28
- package/es/components/Table/_hooks/useTablePagination.js +7 -7
- package/es/components/Table/_utils/tableUtils.d.ts +7 -7
- package/es/components/Table/_utils/tableUtils.js +11 -11
- package/es/components/Table/index.d.ts +11 -8
- package/es/components/Table/index.module.scss +3 -3
- package/es/components/Tags/_components/EllipsisTag/index.d.ts +1 -1
- package/es/components/Tags/_components/EllipsisTag/index.js +1 -1
- package/es/components/Tags/_components/MeasureContainer/index.d.ts +1 -1
- package/es/components/Tags/_components/MeasureContainer/index.js +1 -1
- package/es/components/Tags/_hooks/useVisibleTags.d.ts +5 -5
- package/es/components/Tags/_hooks/useVisibleTags.js +13 -13
- package/es/components/Tags/_utils/calculateVisibleCount.d.ts +6 -6
- package/es/components/Tags/_utils/calculateVisibleCount.js +12 -12
- package/es/components/Tags/_utils/getTagColor.d.ts +4 -4
- package/es/components/Tags/_utils/getTagColor.js +4 -4
- package/es/components/Tags/index.js +2 -2
- package/es/components/TextEllipsis/index.d.ts +11 -11
- package/es/components/TextEllipsis/index.js +18 -18
- package/es/components/Tree/_components/TitleSearchBar/index.js +2 -2
- package/es/components/Tree/_hooks/useClearNodeTitle.d.ts +4 -4
- package/es/components/Tree/_hooks/useClearNodeTitle.js +8 -8
- package/es/components/Tree/_hooks/useTreeCheck.d.ts +2 -2
- package/es/components/Tree/_hooks/useTreeCheck.js +4 -4
- package/es/components/Tree/_hooks/useTreeSearch.d.ts +1 -1
- package/es/components/Tree/_hooks/useTreeSearch.js +7 -7
- package/es/components/Tree/_hooks/useTreeState.d.ts +3 -3
- package/es/components/Tree/_hooks/useTreeState.js +10 -10
- package/es/components/Tree/_utils/index.d.ts +24 -24
- package/es/components/Tree/_utils/index.js +28 -28
- package/es/components/Tree/_utils/normalizeCheckedKeys.d.ts +4 -4
- package/es/components/Tree/_utils/normalizeCheckedKeys.js +16 -16
- package/es/components/Tree/index.d.ts +3 -3
- package/es/components/Tree/index.js +22 -21
- package/es/components/Tree/index.module.scss +2 -2
- package/es/components/Upload/_components/UploadedItem/index.js +2 -2
- package/es/components/Upload/_components/UploadingItem/index.js +2 -2
- package/es/components/Upload/_hooks/useUploadFileList.d.ts +1 -1
- package/es/components/Upload/_hooks/useUploadFileList.js +1 -1
- package/es/components/Upload/_hooks/useUploadOperations.d.ts +1 -1
- package/es/components/Upload/_hooks/useUploadOperations.js +3 -3
- package/es/components/Upload/_hooks/useUploadPreview.d.ts +1 -1
- package/es/components/Upload/_hooks/useUploadPreview.js +1 -1
- package/es/components/Upload/_utils/chunkUpload.d.ts +1 -1
- package/es/components/Upload/_utils/chunkUpload.js +4 -4
- package/es/components/Upload/_utils/createFormData.d.ts +1 -1
- package/es/components/Upload/_utils/createFormData.js +1 -1
- package/es/components/Upload/_utils/extractFileUrl.d.ts +1 -1
- package/es/components/Upload/_utils/extractFileUrl.js +1 -1
- package/es/components/Upload/_utils/isSuccessResponse.d.ts +1 -1
- package/es/components/Upload/_utils/isSuccessResponse.js +1 -1
- package/es/components/Upload/_utils/normalUpload.d.ts +1 -1
- package/es/components/Upload/_utils/normalUpload.js +2 -2
- package/es/components/Upload/_utils/toMB.d.ts +1 -1
- package/es/components/Upload/_utils/toMB.js +1 -1
- package/es/components/Upload/_utils/validateFile.d.ts +1 -1
- package/es/components/Upload/_utils/validateFile.js +1 -1
- package/es/components/Upload/index.js +2 -2
- package/es/config-provider/index.d.ts +3 -3
- package/es/config-provider/index.js +2 -2
- package/es/hooks/usePermissions.js +3 -3
- package/es/index.d.ts +2 -0
- package/es/index.js +6 -4
- package/es/request/ResType.d.ts +3 -3
- package/es/request/index.d.ts +6 -6
- package/es/request/index.js +6 -6
- package/es/styles/antd-overload.scss +16 -10
- package/es/styles/tokens.d.ts +26 -0
- package/es/styles/tokens.js +32 -0
- package/es/styles/tokens.scss +62 -0
- package/es/typings.d.ts +3 -3
- package/es/utils/getUUID.d.ts +1 -1
- package/es/utils/getUUID.js +1 -1
- package/lib/components/Button/index.js +2 -2
- package/lib/components/ChainGraph/ChainGraphServices/Edges/ArrowEdge.js +4 -4
- package/lib/components/ChainGraph/ChainGraphServices/NodeEvents.js +3 -3
- package/lib/components/ChainGraph/ChainGraphServices/RootNode.js +27 -27
- package/lib/components/ChainGraph/ChainGraphServices/TreeNode.js +32 -32
- package/lib/components/ChainGraph/ChainGraphServices/index.js +11 -11
- package/lib/components/ChainGraph/_components/SearchSelect/index.module.scss +2 -2
- package/lib/components/ChainGraph/_utils/findAncestorsOfNode.d.ts +5 -5
- package/lib/components/ChainGraph/_utils/findAncestorsOfNode.js +12 -12
- package/lib/components/ChainGraph/_utils/getTextSize.d.ts +4 -4
- package/lib/components/ChainGraph/_utils/getTextSize.js +4 -4
- package/lib/components/ChainGraph/_utils/styles.d.ts +3 -3
- package/lib/components/ChainGraph/_utils/styles.js +3 -3
- package/lib/components/ChainGraph/index.js +7 -7
- package/lib/components/ChainGraph/index.module.scss +2 -2
- package/lib/components/Chart/Bar/Bar3DOpt.d.ts +9 -9
- package/lib/components/Chart/Bar/Bar3DOpt.js +29 -29
- package/lib/components/Chart/Bar/index.d.ts +5 -5
- package/lib/components/Chart/Bar/index.js +23 -23
- package/lib/components/Chart/Bubble/index.d.ts +6 -6
- package/lib/components/Chart/Bubble/index.js +41 -41
- package/lib/components/Chart/Common/index.js +12 -12
- package/lib/components/Chart/Gauge/index.js +11 -11
- package/lib/components/Chart/Group/index.js +1 -1
- package/lib/components/Chart/Heatmap/index.d.ts +12 -12
- package/lib/components/Chart/Heatmap/index.js +24 -24
- package/lib/components/Chart/Line/index.d.ts +5 -5
- package/lib/components/Chart/Line/index.js +23 -23
- package/lib/components/Chart/Pie/Pie3D/_hooks/index.js +14 -14
- package/lib/components/Chart/Pie/Pie3D/_utils/label.js +30 -30
- package/lib/components/Chart/Pie/index.d.ts +8 -8
- package/lib/components/Chart/Pie/index.js +34 -34
- package/lib/components/Chart/Polar/index.js +11 -11
- package/lib/components/Chart/Radar/index.d.ts +8 -8
- package/lib/components/Chart/Radar/index.js +7 -7
- package/lib/components/Chart/Sankey/index.js +12 -12
- package/lib/components/Chart/Tree/index.js +12 -12
- package/lib/components/Chart/_utils/autoSmooth.d.ts +1 -1
- package/lib/components/Chart/_utils/autoSmooth.js +2 -2
- package/lib/components/Chart/_utils/bubble.js +8 -8
- package/lib/components/Chart/_utils/cartesian.d.ts +4 -4
- package/lib/components/Chart/_utils/cartesian.js +4 -4
- package/lib/components/Chart/chartUtils/calculateAxisConfig.d.ts +4 -4
- package/lib/components/Chart/chartUtils/calculateAxisConfig.js +16 -16
- package/lib/components/Chart/chartUtils/chartTooltipFormatter.d.ts +1 -1
- package/lib/components/Chart/chartUtils/chartTooltipFormatter.js +1 -1
- package/lib/components/Chart/chartUtils/useDataZoomWindow.d.ts +7 -7
- package/lib/components/Chart/chartUtils/useDataZoomWindow.js +4 -4
- package/lib/components/Chart/chartUtils/useLegendSelection.d.ts +6 -6
- package/lib/components/Chart/chartUtils/useLegendSelection.js +3 -3
- package/lib/components/Chart/chartUtils/yAxisDisplayUnit.d.ts +4 -4
- package/lib/components/Chart/chartUtils/yAxisDisplayUnit.js +4 -4
- package/lib/components/Chart/index.d.ts +2 -2
- package/lib/components/Chart/index.js +1 -1
- package/lib/components/Chat/ChatHistory/_components/HistoryGroup/index.module.scss +1 -1
- package/lib/components/Chat/ChatHistory/_components/HistoryItem/index.js +8 -8
- package/lib/components/Chat/ChatHistory/_components/HistoryItem/index.module.scss +6 -6
- package/lib/components/Chat/ChatHistory/_components/NewChatButton/index.module.scss +4 -4
- package/lib/components/Chat/ChatHistory/_utils/index.d.ts +1 -1
- package/lib/components/Chat/ChatHistory/_utils/index.js +1 -1
- package/lib/components/Chat/ChatHistory/index.js +2 -2
- package/lib/components/Chat/ChatHistory/index.module.scss +3 -3
- package/lib/components/Chat/ChatInput/_components/AgentToggleButton/index.module.scss +8 -8
- package/lib/components/Chat/ChatInput/_components/FileList/index.module.scss +3 -3
- package/lib/components/Chat/ChatInput/_components/UploadButton/index.js +1 -1
- package/lib/components/Chat/ChatInput/_utils/index.d.ts +3 -3
- package/lib/components/Chat/ChatInput/_utils/index.js +3 -3
- package/lib/components/Chat/ChatInput/index.d.ts +5 -5
- package/lib/components/Chat/ChatInput/index.js +23 -19
- package/lib/components/Chat/ChatInput/index.module.scss +4 -4
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/Copy/index.js +0 -1
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/Copy/index.module.scss +5 -5
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/LikeDislike/index.module.scss +5 -5
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/QuoteList/index.module.scss +7 -7
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/index.js +5 -5
- package/lib/components/Chat/ChatList/_components/Assistant/AssistantItem/index.module.scss +5 -5
- package/lib/components/Chat/ChatList/_components/Assistant/index.module.scss +3 -3
- package/lib/components/Chat/ChatList/_components/User/index.module.scss +6 -6
- package/lib/components/Chat/ChatList/_hooks/useAssistantNavigation.d.ts +1 -1
- package/lib/components/Chat/ChatList/_hooks/useAssistantNavigation.js +1 -1
- package/lib/components/Chat/ChatList/_hooks/useCalculateRowIndex.js +1 -1
- package/lib/components/Chat/ChatList/_utils/cleanRedactedReasoning.d.ts +3 -3
- package/lib/components/Chat/ChatList/_utils/cleanRedactedReasoning.js +3 -3
- package/lib/components/Checkbox/CheckboxGroup/index.js +6 -6
- package/lib/components/Checkbox/CheckboxGroup/index.module.scss +3 -3
- package/lib/components/Checkbox/index.module.scss +2 -2
- package/lib/components/CodeMirror/index.d.ts +6 -6
- package/lib/components/CodeMirror/index.js +9 -9
- package/lib/components/CodeMirror/index.module.scss +4 -4
- package/lib/components/CodeMirror/linters/errorTranslator.d.ts +1 -1
- package/lib/components/CodeMirror/linters/errorTranslator.js +19 -19
- package/lib/components/CodeMirror/linters/jsonLinter.d.ts +2 -2
- package/lib/components/CodeMirror/linters/jsonLinter.js +9 -9
- package/lib/components/CodeMirror/linters/sqlLinter.js +29 -29
- package/lib/components/Copy/index.module.scss +3 -3
- package/lib/components/DatePicker/defaultModalPickerGetPopupContainer.d.ts +2 -2
- package/lib/components/DatePicker/defaultModalPickerGetPopupContainer.js +2 -2
- package/lib/components/DatePicker/index.js +9 -9
- package/lib/components/Editor/index.js +3 -3
- package/lib/components/Editor/index.module.scss +2 -2
- package/lib/components/FileCol/index.js +2 -2
- package/lib/components/FilePreview/_components/BasePreview/index.module.scss +2 -2
- package/lib/components/FilePreview/_components/PdfPreview/index.module.scss +3 -3
- package/lib/components/FilePreview/_hooks/useXlsxData.d.ts +1 -1
- package/lib/components/FilePreview/_hooks/useXlsxData.js +1 -1
- package/lib/components/FilePreview/index.module.scss +2 -2
- package/lib/components/Form/ModalForm/_hooks/useAdaptiveColumnNum.d.ts +7 -7
- package/lib/components/Form/ModalForm/_hooks/useAdaptiveColumnNum.js +8 -8
- package/lib/components/Form/ModalForm/_hooks/useColumnFormItems.d.ts +3 -3
- package/lib/components/Form/ModalForm/_hooks/useColumnFormItems.js +18 -18
- package/lib/components/Form/ModalForm/_hooks/useFormItems.d.ts +5 -5
- package/lib/components/Form/ModalForm/_hooks/useFormItems.js +5 -5
- package/lib/components/FormItem/FormCodeMirror/index.js +6 -6
- package/lib/components/FormItem/FormInput/FormPasswordStrength/index.module.scss +5 -5
- package/lib/components/FormItem/FormRadio/index.module.scss +2 -2
- package/lib/components/FormItem/FormUpload/index.module.scss +13 -13
- package/lib/components/FormItem/ItemContainer/index.d.ts +1 -1
- package/lib/components/FormItem/ItemContainer/index.js +3 -3
- package/lib/components/FormItem/ItemContainer/index.module.scss +4 -4
- package/lib/components/FormItem/databaseTypeMapping.d.ts +23 -23
- package/lib/components/FormItem/databaseTypeMapping.js +36 -36
- package/lib/components/FormItem/index.js +12 -12
- package/lib/components/Icon/index.js +4 -4
- package/lib/components/Input/Number/index.js +6 -6
- package/lib/components/Input/Number/index.module.scss +5 -5
- package/lib/components/Input/Password/index.js +3 -3
- package/lib/components/Input/Range/index.js +3 -3
- package/lib/components/Input/Range/index.module.scss +2 -2
- package/lib/components/Input/Search/index.js +3 -3
- package/lib/components/Input/TextArea/index.js +6 -6
- package/lib/components/Input/TextArea/index.module.scss +5 -5
- package/lib/components/Input/index.js +14 -14
- package/lib/components/Input/index.module.scss +2 -2
- package/lib/components/Markdown/Editor/index.module.scss +3 -3
- package/lib/components/Markdown/Views/ArtifactBlock.d.ts +5 -5
- package/lib/components/Markdown/Views/ArtifactBlock.js +2 -2
- package/lib/components/Markdown/Views/MermaidBlock.d.ts +2 -2
- package/lib/components/Markdown/Views/MermaidBlock.js +5 -5
- package/lib/components/Markdown/Views/blocks.module.scss +11 -11
- package/lib/components/Markdown/Views/index.js +5 -5
- package/lib/components/Markdown/Views/index.module.scss +1 -1
- package/lib/components/Modal/_hooks/useModalDrag.d.ts +1 -1
- package/lib/components/Modal/_hooks/useModalDrag.js +1 -1
- package/lib/components/Modal/_hooks/useModalElements.d.ts +1 -1
- package/lib/components/Modal/_hooks/useModalElements.js +1 -1
- package/lib/components/Modal/_utils/calculatePosition.d.ts +7 -7
- package/lib/components/Modal/_utils/calculatePosition.js +7 -7
- package/lib/components/Modal/index.module.scss +1 -1
- package/lib/components/Operate/_hooks/useOperateEllipsis.d.ts +5 -5
- package/lib/components/Operate/_hooks/useOperateEllipsis.js +5 -5
- package/lib/components/Operate/index.js +16 -16
- package/lib/components/Panel/DefaultPanel/index.module.scss +1 -1
- package/lib/components/Panel/IframePanel/index.module.scss +1 -1
- package/lib/components/Panel/ListPanel/ListModalPanel/index.d.ts +2 -2
- package/lib/components/Panel/ListPanel/ListModalPanel/index.js +5 -5
- package/lib/components/Panel/ListPanel/ListModalPanel/index.module.scss +1 -1
- package/lib/components/Panel/ListPanel/_components/ColumnMgt/index.js +1 -1
- package/lib/components/Panel/ListPanel/index.d.ts +2 -2
- package/lib/components/Panel/ListPanel/index.js +3 -3
- package/lib/components/Panel/ListPanel/index.module.scss +5 -5
- package/lib/components/Search/SearchAdvanced/index.d.ts +4 -4
- package/lib/components/Search/SearchAdvanced/index.js +4 -4
- package/lib/components/Search/SearchAdvanced/index.module.scss +2 -2
- package/lib/components/Search/SearchCard/_components/OptionRow/ChildrenItems/index.js +8 -8
- package/lib/components/Search/SearchCard/_components/OptionRow/Item/index.js +13 -13
- package/lib/components/Search/SearchCard/_components/OptionRow/index.js +8 -8
- package/lib/components/Search/SearchCard/_hooks/useSearchCardCollapse.d.ts +1 -1
- package/lib/components/Search/SearchCard/_hooks/useSearchCardCollapse.js +1 -1
- package/lib/components/Search/SearchCard/_hooks/useSearchCardMoreOptions.d.ts +1 -1
- package/lib/components/Search/SearchCard/_hooks/useSearchCardMoreOptions.js +14 -14
- package/lib/components/Search/SearchCard/_hooks/useSearchCardValue.d.ts +1 -1
- package/lib/components/Search/SearchCard/_hooks/useSearchCardValue.js +5 -5
- package/lib/components/Search/SearchCard/_utils/getRealValues.d.ts +1 -1
- package/lib/components/Search/SearchCard/_utils/getRealValues.js +5 -5
- package/lib/components/Search/SearchCard/_utils/hasSelectedChildren.d.ts +1 -1
- package/lib/components/Search/SearchCard/_utils/hasSelectedChildren.js +3 -3
- package/lib/components/Search/SearchCard/_utils/typeGuards.d.ts +1 -1
- package/lib/components/Search/SearchCard/_utils/typeGuards.js +1 -1
- package/lib/components/Search/SearchCard/_utils/updateRealValue.d.ts +1 -1
- package/lib/components/Search/SearchCard/_utils/updateRealValue.js +11 -11
- package/lib/components/Search/SearchCard/index.js +1 -1
- package/lib/components/Search/SearchCard/index.module.scss +8 -8
- package/lib/components/Search/SearchCollapsible/index.d.ts +4 -4
- package/lib/components/Search/SearchCollapsible/index.js +6 -6
- package/lib/components/Search/SearchCollapsible/index.module.scss +2 -2
- package/lib/components/Search/SearchWithFilter/index.d.ts +4 -4
- package/lib/components/Search/SearchWithFilter/index.js +4 -4
- package/lib/components/Search/SearchWithFilter/index.module.scss +2 -2
- package/lib/components/Search/SearchWithMore/index.d.ts +4 -4
- package/lib/components/Search/SearchWithMore/index.js +5 -5
- package/lib/components/Search/SearchWithMore/index.module.scss +2 -2
- package/lib/components/Search/_components/ButtonGroup/index.js +1 -1
- package/lib/components/Search/_components/SearchBase/index.d.ts +8 -8
- package/lib/components/Search/_components/SearchBase/index.js +5 -5
- package/lib/components/Search/_components/SearchButtons/index.d.ts +2 -2
- package/lib/components/Search/_hooks/useAdaptiveColumnNum.d.ts +9 -9
- package/lib/components/Search/_hooks/useAdaptiveColumnNum.js +19 -19
- package/lib/components/Search/_hooks/useSearchCommon.d.ts +1 -1
- package/lib/components/Search/_hooks/useSearchCommon.js +21 -21
- package/lib/components/Search/_hooks/useSearchExpand.d.ts +12 -12
- package/lib/components/Search/_hooks/useSearchExpand.js +32 -32
- package/lib/components/Search/_hooks/useSearchForm.d.ts +1 -1
- package/lib/components/Search/_hooks/useSearchForm.js +1 -1
- package/lib/components/Search/_hooks/useSearchItems.d.ts +5 -4
- package/lib/components/Search/_hooks/useSearchItems.js +5 -4
- package/lib/components/Search/_types/index.d.ts +12 -12
- package/lib/components/Search/_utils/calculateButtonGroupAndColumnWidth.d.ts +6 -6
- package/lib/components/Search/_utils/calculateButtonGroupAndColumnWidth.js +10 -10
- package/lib/components/Search/_utils/calculateVisibleItems.d.ts +9 -9
- package/lib/components/Search/_utils/calculateVisibleItems.js +12 -12
- package/lib/components/Search/_utils/cleanSearchData.d.ts +3 -3
- package/lib/components/Search/_utils/cleanSearchData.js +3 -3
- package/lib/components/Search/_utils/measureButtonGroupWidth.d.ts +3 -3
- package/lib/components/Search/_utils/measureButtonGroupWidth.js +4 -4
- package/lib/components/Search/_utils/shouldDisplayExtraItem.d.ts +7 -7
- package/lib/components/Search/_utils/shouldDisplayExtraItem.js +7 -7
- package/lib/components/Search/index.d.ts +2 -2
- package/lib/components/Search/index.js +4 -4
- package/lib/components/Search/index.module.scss +1 -1
- package/lib/components/SecondConf/index.module.scss +1 -1
- package/lib/components/Select/AutoCompleteSelect/index.js +4 -4
- package/lib/components/Select/AutoCompleteSelect/index.module.scss +6 -6
- package/lib/components/Select/IconSelect/index.module.scss +2 -2
- package/lib/components/Select/TreeSelect/_utils/getExpandedKeysByLevel.d.ts +4 -4
- package/lib/components/Select/TreeSelect/_utils/getExpandedKeysByLevel.js +5 -5
- package/lib/components/Select/TreeSelect/index.module.scss +1 -1
- package/lib/components/Select/_hooks/useSelectComposition.d.ts +1 -1
- package/lib/components/Select/_hooks/useSelectComposition.js +1 -1
- package/lib/components/Select/_hooks/useSelectInputOptions.d.ts +1 -1
- package/lib/components/Select/_hooks/useSelectInputOptions.js +1 -1
- package/lib/components/Select/_utils/calculatePopupWidth.d.ts +1 -1
- package/lib/components/Select/_utils/calculatePopupWidth.js +1 -1
- package/lib/components/Select/_utils/filterOption.d.ts +1 -1
- package/lib/components/Select/_utils/filterOption.js +1 -1
- package/lib/components/Select/_utils/getElementPosition.d.ts +7 -6
- package/lib/components/Select/_utils/getElementPosition.js +7 -6
- package/lib/components/Select/index.module.scss +8 -8
- package/lib/components/Spreadsheet/xlsxspread.js +2 -2
- package/lib/components/Switch/index.module.scss +2 -2
- package/lib/components/TabBar/index.module.scss +8 -8
- package/lib/components/Table/_components/Pagination/index.js +3 -3
- package/lib/components/Table/_hooks/useAutoScrolling.d.ts +1 -1
- package/lib/components/Table/_hooks/useAutoScrolling.js +8 -7
- package/lib/components/Table/_hooks/useEllipsisTooltip.d.ts +1 -1
- package/lib/components/Table/_hooks/useEllipsisTooltip.js +6 -6
- package/lib/components/Table/_hooks/usePaginationSync.d.ts +3 -3
- package/lib/components/Table/_hooks/usePaginationSync.js +5 -5
- package/lib/components/Table/_hooks/useScrollEnd.js +7 -7
- package/lib/components/Table/_hooks/useTableColumns.js +30 -28
- package/lib/components/Table/_hooks/useTablePagination.js +7 -7
- package/lib/components/Table/_utils/tableUtils.d.ts +7 -7
- package/lib/components/Table/_utils/tableUtils.js +11 -11
- package/lib/components/Table/index.d.ts +11 -8
- package/lib/components/Table/index.module.scss +3 -3
- package/lib/components/Tags/_components/EllipsisTag/index.d.ts +1 -1
- package/lib/components/Tags/_components/EllipsisTag/index.js +1 -1
- package/lib/components/Tags/_components/MeasureContainer/index.d.ts +1 -1
- package/lib/components/Tags/_components/MeasureContainer/index.js +1 -1
- package/lib/components/Tags/_hooks/useVisibleTags.d.ts +5 -5
- package/lib/components/Tags/_hooks/useVisibleTags.js +13 -13
- package/lib/components/Tags/_utils/calculateVisibleCount.d.ts +6 -6
- package/lib/components/Tags/_utils/calculateVisibleCount.js +12 -12
- package/lib/components/Tags/_utils/getTagColor.d.ts +4 -4
- package/lib/components/Tags/_utils/getTagColor.js +4 -4
- package/lib/components/Tags/index.js +2 -2
- package/lib/components/TextEllipsis/index.d.ts +11 -11
- package/lib/components/TextEllipsis/index.js +18 -18
- package/lib/components/Tree/_components/TitleSearchBar/index.js +2 -2
- package/lib/components/Tree/_hooks/useClearNodeTitle.d.ts +4 -4
- package/lib/components/Tree/_hooks/useClearNodeTitle.js +8 -8
- package/lib/components/Tree/_hooks/useTreeCheck.d.ts +2 -2
- package/lib/components/Tree/_hooks/useTreeCheck.js +4 -4
- package/lib/components/Tree/_hooks/useTreeSearch.d.ts +1 -1
- package/lib/components/Tree/_hooks/useTreeSearch.js +7 -7
- package/lib/components/Tree/_hooks/useTreeState.d.ts +3 -3
- package/lib/components/Tree/_hooks/useTreeState.js +10 -10
- package/lib/components/Tree/_utils/index.d.ts +24 -24
- package/lib/components/Tree/_utils/index.js +28 -28
- package/lib/components/Tree/_utils/normalizeCheckedKeys.d.ts +4 -4
- package/lib/components/Tree/_utils/normalizeCheckedKeys.js +16 -16
- package/lib/components/Tree/index.d.ts +3 -3
- package/lib/components/Tree/index.js +22 -21
- package/lib/components/Tree/index.module.scss +2 -2
- package/lib/components/Upload/_components/UploadedItem/index.js +2 -2
- package/lib/components/Upload/_components/UploadingItem/index.js +2 -2
- package/lib/components/Upload/_hooks/useUploadFileList.d.ts +1 -1
- package/lib/components/Upload/_hooks/useUploadFileList.js +1 -1
- package/lib/components/Upload/_hooks/useUploadOperations.d.ts +1 -1
- package/lib/components/Upload/_hooks/useUploadOperations.js +3 -3
- package/lib/components/Upload/_hooks/useUploadPreview.d.ts +1 -1
- package/lib/components/Upload/_hooks/useUploadPreview.js +1 -1
- package/lib/components/Upload/_utils/chunkUpload.d.ts +1 -1
- package/lib/components/Upload/_utils/chunkUpload.js +4 -4
- package/lib/components/Upload/_utils/createFormData.d.ts +1 -1
- package/lib/components/Upload/_utils/createFormData.js +1 -1
- package/lib/components/Upload/_utils/extractFileUrl.d.ts +1 -1
- package/lib/components/Upload/_utils/extractFileUrl.js +1 -1
- package/lib/components/Upload/_utils/isSuccessResponse.d.ts +1 -1
- package/lib/components/Upload/_utils/isSuccessResponse.js +1 -1
- package/lib/components/Upload/_utils/normalUpload.d.ts +1 -1
- package/lib/components/Upload/_utils/normalUpload.js +2 -2
- package/lib/components/Upload/_utils/toMB.d.ts +1 -1
- package/lib/components/Upload/_utils/toMB.js +1 -1
- package/lib/components/Upload/_utils/validateFile.d.ts +1 -1
- package/lib/components/Upload/_utils/validateFile.js +1 -1
- package/lib/components/Upload/index.js +2 -2
- package/lib/config-provider/index.d.ts +3 -3
- package/lib/config-provider/index.js +2 -2
- package/lib/hooks/usePermissions.js +3 -3
- package/lib/index.d.ts +2 -0
- package/lib/index.js +22 -0
- package/lib/request/ResType.d.ts +3 -3
- package/lib/request/index.d.ts +6 -6
- package/lib/request/index.js +6 -6
- package/lib/styles/antd-overload.scss +16 -10
- package/lib/styles/tokens.d.ts +26 -0
- package/lib/styles/tokens.js +38 -0
- package/lib/styles/tokens.scss +62 -0
- package/lib/typings.d.ts +3 -3
- package/lib/utils/getUUID.d.ts +1 -1
- package/lib/utils/getUUID.js +1 -1
- package/package.json +3 -3
- package/src/components/Button/index.tsx +2 -2
- package/src/components/ChainGraph/ChainGraphServices/Edges/ArrowEdge.ts +4 -4
- package/src/components/ChainGraph/ChainGraphServices/NodeEvents.ts +3 -3
- package/src/components/ChainGraph/ChainGraphServices/RootNode.ts +27 -27
- package/src/components/ChainGraph/ChainGraphServices/TreeNode.ts +32 -32
- package/src/components/ChainGraph/ChainGraphServices/index.ts +11 -11
- package/src/components/ChainGraph/_components/SearchSelect/index.module.scss +2 -2
- package/src/components/ChainGraph/_utils/findAncestorsOfNode.ts +12 -12
- package/src/components/ChainGraph/_utils/getTextSize.ts +4 -4
- package/src/components/ChainGraph/_utils/styles.ts +3 -3
- package/src/components/ChainGraph/index.module.scss +2 -2
- package/src/components/ChainGraph/index.tsx +8 -8
- package/src/components/Chart/Bar/Bar3DOpt.tsx +33 -33
- package/src/components/Chart/Bar/index.tsx +28 -28
- package/src/components/Chart/Bubble/index.tsx +47 -47
- package/src/components/Chart/Common/index.tsx +12 -12
- package/src/components/Chart/Gauge/index.tsx +11 -11
- package/src/components/Chart/Group/index.tsx +1 -1
- package/src/components/Chart/Heatmap/index.tsx +36 -36
- package/src/components/Chart/Line/index.tsx +28 -28
- package/src/components/Chart/Pie/Pie3D/_hooks/index.ts +14 -14
- package/src/components/Chart/Pie/Pie3D/_utils/label.ts +31 -31
- package/src/components/Chart/Pie/index.tsx +42 -42
- package/src/components/Chart/Polar/index.tsx +11 -11
- package/src/components/Chart/Radar/index.tsx +12 -12
- package/src/components/Chart/Sankey/index.tsx +12 -12
- package/src/components/Chart/Tree/index.tsx +12 -12
- package/src/components/Chart/_utils/autoSmooth.ts +3 -3
- package/src/components/Chart/_utils/bubble.ts +8 -8
- package/src/components/Chart/_utils/cartesian.ts +4 -4
- package/src/components/Chart/chartUtils/calculateAxisConfig.ts +16 -16
- package/src/components/Chart/chartUtils/chartTooltipFormatter.ts +2 -2
- package/src/components/Chart/chartUtils/useDataZoomWindow.ts +8 -8
- package/src/components/Chart/chartUtils/useLegendSelection.ts +6 -6
- package/src/components/Chart/chartUtils/yAxisDisplayUnit.ts +4 -4
- package/src/components/Chart/index.tsx +2 -2
- package/src/components/Chat/ChatHistory/_components/HistoryGroup/index.module.scss +1 -1
- package/src/components/Chat/ChatHistory/_components/HistoryItem/index.module.scss +6 -6
- package/src/components/Chat/ChatHistory/_components/HistoryItem/index.tsx +8 -8
- package/src/components/Chat/ChatHistory/_components/NewChatButton/index.module.scss +4 -4
- package/src/components/Chat/ChatHistory/_utils/index.ts +1 -1
- package/src/components/Chat/ChatHistory/index.module.scss +3 -3
- package/src/components/Chat/ChatHistory/index.tsx +2 -2
- package/src/components/Chat/ChatInput/_components/AgentToggleButton/index.module.scss +8 -8
- package/src/components/Chat/ChatInput/_components/FileList/index.module.scss +3 -3
- package/src/components/Chat/ChatInput/_components/UploadButton/index.tsx +2 -2
- package/src/components/Chat/ChatInput/_utils/index.ts +3 -3
- package/src/components/Chat/ChatInput/index.module.scss +4 -4
- package/src/components/Chat/ChatInput/index.tsx +24 -23
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/Copy/index.module.scss +5 -5
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/Copy/index.tsx +0 -2
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/LikeDislike/index.module.scss +5 -5
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/_components/QuoteList/index.module.scss +7 -7
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/index.module.scss +5 -5
- package/src/components/Chat/ChatList/_components/Assistant/AssistantItem/index.tsx +6 -6
- package/src/components/Chat/ChatList/_components/Assistant/index.module.scss +3 -3
- package/src/components/Chat/ChatList/_components/User/index.module.scss +6 -6
- package/src/components/Chat/ChatList/_hooks/useAssistantNavigation.ts +1 -1
- package/src/components/Chat/ChatList/_hooks/useCalculateRowIndex.ts +1 -1
- package/src/components/Chat/ChatList/_utils/cleanRedactedReasoning.ts +3 -3
- package/src/components/Checkbox/CheckboxGroup/index.module.scss +3 -3
- package/src/components/Checkbox/CheckboxGroup/index.tsx +6 -6
- package/src/components/Checkbox/index.module.scss +2 -2
- package/src/components/CodeMirror/index.module.scss +4 -4
- package/src/components/CodeMirror/index.tsx +15 -15
- package/src/components/CodeMirror/linters/errorTranslator.ts +19 -19
- package/src/components/CodeMirror/linters/jsonLinter.ts +11 -11
- package/src/components/CodeMirror/linters/sqlLinter.ts +29 -29
- package/src/components/Copy/index.module.scss +3 -3
- package/src/components/DatePicker/defaultModalPickerGetPopupContainer.ts +2 -2
- package/src/components/DatePicker/index.tsx +9 -9
- package/src/components/Editor/index.module.scss +2 -2
- package/src/components/Editor/index.tsx +3 -3
- package/src/components/FileCol/index.tsx +2 -2
- package/src/components/FilePreview/_components/BasePreview/index.module.scss +2 -2
- package/src/components/FilePreview/_components/PdfPreview/index.module.scss +3 -3
- package/src/components/FilePreview/_hooks/useXlsxData.ts +1 -1
- package/src/components/FilePreview/index.module.scss +2 -2
- package/src/components/Form/ModalForm/_hooks/useAdaptiveColumnNum.ts +8 -8
- package/src/components/Form/ModalForm/_hooks/useColumnFormItems.ts +18 -18
- package/src/components/Form/ModalForm/_hooks/useFormItems.ts +5 -5
- package/src/components/FormItem/FormCodeMirror/index.tsx +6 -6
- package/src/components/FormItem/FormInput/FormPasswordStrength/index.module.scss +5 -5
- package/src/components/FormItem/FormRadio/index.module.scss +2 -2
- package/src/components/FormItem/FormUpload/index.module.scss +13 -13
- package/src/components/FormItem/ItemContainer/index.module.scss +4 -4
- package/src/components/FormItem/ItemContainer/index.tsx +4 -4
- package/src/components/FormItem/databaseTypeMapping.ts +43 -43
- package/src/components/FormItem/index.tsx +15 -15
- package/src/components/Icon/index.tsx +4 -4
- package/src/components/Input/Number/index.module.scss +5 -5
- package/src/components/Input/Number/index.tsx +6 -6
- package/src/components/Input/Password/index.tsx +3 -3
- package/src/components/Input/Range/index.module.scss +2 -2
- package/src/components/Input/Range/index.tsx +3 -3
- package/src/components/Input/Search/index.tsx +3 -3
- package/src/components/Input/TextArea/index.module.scss +5 -5
- package/src/components/Input/TextArea/index.tsx +6 -6
- package/src/components/Input/index.module.scss +2 -2
- package/src/components/Input/index.tsx +14 -14
- package/src/components/Markdown/Editor/index.module.scss +3 -3
- package/src/components/Markdown/Views/ArtifactBlock.tsx +5 -5
- package/src/components/Markdown/Views/MermaidBlock.tsx +5 -5
- package/src/components/Markdown/Views/blocks.module.scss +11 -11
- package/src/components/Markdown/Views/index.module.scss +1 -1
- package/src/components/Markdown/Views/index.tsx +5 -5
- package/src/components/Modal/_hooks/useModalDrag.ts +1 -1
- package/src/components/Modal/_hooks/useModalElements.ts +1 -1
- package/src/components/Modal/_utils/calculatePosition.ts +7 -7
- package/src/components/Modal/index.module.scss +1 -1
- package/src/components/Operate/_hooks/useOperateEllipsis.ts +5 -5
- package/src/components/Operate/index.tsx +16 -16
- package/src/components/Panel/DefaultPanel/index.module.scss +1 -1
- package/src/components/Panel/IframePanel/index.module.scss +1 -1
- package/src/components/Panel/ListPanel/ListModalPanel/index.module.scss +1 -1
- package/src/components/Panel/ListPanel/ListModalPanel/index.tsx +8 -8
- package/src/components/Panel/ListPanel/_components/ColumnMgt/index.tsx +1 -1
- package/src/components/Panel/ListPanel/index.module.scss +5 -5
- package/src/components/Panel/ListPanel/index.tsx +5 -5
- package/src/components/Search/SearchAdvanced/index.module.scss +2 -2
- package/src/components/Search/SearchAdvanced/index.tsx +4 -4
- package/src/components/Search/SearchCard/_components/OptionRow/ChildrenItems/index.tsx +8 -8
- package/src/components/Search/SearchCard/_components/OptionRow/Item/index.tsx +13 -13
- package/src/components/Search/SearchCard/_components/OptionRow/index.tsx +9 -9
- package/src/components/Search/SearchCard/_hooks/useSearchCardCollapse.ts +1 -1
- package/src/components/Search/SearchCard/_hooks/useSearchCardMoreOptions.ts +14 -14
- package/src/components/Search/SearchCard/_hooks/useSearchCardValue.ts +5 -5
- package/src/components/Search/SearchCard/_utils/getRealValues.ts +5 -5
- package/src/components/Search/SearchCard/_utils/hasSelectedChildren.ts +3 -3
- package/src/components/Search/SearchCard/_utils/typeGuards.ts +1 -1
- package/src/components/Search/SearchCard/_utils/updateRealValue.ts +11 -11
- package/src/components/Search/SearchCard/index.module.scss +8 -8
- package/src/components/Search/SearchCard/index.tsx +1 -1
- package/src/components/Search/SearchCollapsible/index.module.scss +2 -2
- package/src/components/Search/SearchCollapsible/index.tsx +6 -6
- package/src/components/Search/SearchWithFilter/index.module.scss +2 -2
- package/src/components/Search/SearchWithFilter/index.tsx +4 -4
- package/src/components/Search/SearchWithMore/index.module.scss +2 -2
- package/src/components/Search/SearchWithMore/index.tsx +5 -5
- package/src/components/Search/_components/ButtonGroup/index.tsx +1 -1
- package/src/components/Search/_components/SearchBase/index.tsx +9 -9
- package/src/components/Search/_components/SearchButtons/index.tsx +2 -2
- package/src/components/Search/_hooks/useAdaptiveColumnNum.ts +19 -19
- package/src/components/Search/_hooks/useSearchCommon.ts +21 -21
- package/src/components/Search/_hooks/useSearchExpand.ts +32 -32
- package/src/components/Search/_hooks/useSearchForm.ts +1 -1
- package/src/components/Search/_hooks/useSearchItems.ts +5 -4
- package/src/components/Search/_types/index.ts +12 -12
- package/src/components/Search/_utils/calculateButtonGroupAndColumnWidth.ts +10 -10
- package/src/components/Search/_utils/calculateVisibleItems.ts +12 -12
- package/src/components/Search/_utils/cleanSearchData.ts +3 -3
- package/src/components/Search/_utils/measureButtonGroupWidth.ts +4 -4
- package/src/components/Search/_utils/shouldDisplayExtraItem.ts +7 -7
- package/src/components/Search/index.module.scss +1 -1
- package/src/components/Search/index.tsx +4 -4
- package/src/components/SecondConf/index.module.scss +1 -1
- package/src/components/Select/AutoCompleteSelect/index.module.scss +6 -6
- package/src/components/Select/AutoCompleteSelect/index.tsx +4 -4
- package/src/components/Select/IconSelect/index.module.scss +2 -2
- package/src/components/Select/TreeSelect/_utils/getExpandedKeysByLevel.ts +5 -5
- package/src/components/Select/TreeSelect/index.module.scss +1 -1
- package/src/components/Select/_hooks/useSelectComposition.ts +1 -1
- package/src/components/Select/_hooks/useSelectInputOptions.ts +1 -1
- package/src/components/Select/_utils/calculatePopupWidth.ts +1 -1
- package/src/components/Select/_utils/filterOption.ts +1 -1
- package/src/components/Select/_utils/getElementPosition.ts +7 -6
- package/src/components/Select/index.module.scss +8 -8
- package/src/components/Spreadsheet/xlsxspread.ts +2 -2
- package/src/components/Switch/index.module.scss +2 -2
- package/src/components/TabBar/index.module.scss +8 -8
- package/src/components/Table/_components/Pagination/index.tsx +3 -3
- package/src/components/Table/_hooks/useAutoScrolling.ts +9 -8
- package/src/components/Table/_hooks/useEllipsisTooltip.ts +6 -6
- package/src/components/Table/_hooks/usePaginationSync.ts +5 -5
- package/src/components/Table/_hooks/useScrollEnd.ts +9 -9
- package/src/components/Table/_hooks/useTableColumns.tsx +30 -28
- package/src/components/Table/_hooks/useTablePagination.ts +7 -7
- package/src/components/Table/_utils/tableUtils.ts +11 -11
- package/src/components/Table/index.module.scss +3 -3
- package/src/components/Table/index.tsx +12 -9
- package/src/components/Tags/_components/EllipsisTag/index.tsx +1 -1
- package/src/components/Tags/_components/MeasureContainer/index.tsx +1 -1
- package/src/components/Tags/_hooks/useVisibleTags.ts +13 -13
- package/src/components/Tags/_utils/calculateVisibleCount.ts +12 -12
- package/src/components/Tags/_utils/getTagColor.ts +4 -4
- package/src/components/Tags/index.tsx +4 -4
- package/src/components/TextEllipsis/index.tsx +28 -28
- package/src/components/Tree/_components/TitleSearchBar/index.tsx +2 -2
- package/src/components/Tree/_hooks/useClearNodeTitle.ts +8 -8
- package/src/components/Tree/_hooks/useTreeCheck.ts +4 -4
- package/src/components/Tree/_hooks/useTreeSearch.ts +7 -7
- package/src/components/Tree/_hooks/useTreeState.ts +10 -10
- package/src/components/Tree/_utils/index.ts +28 -28
- package/src/components/Tree/_utils/normalizeCheckedKeys.ts +16 -16
- package/src/components/Tree/index.module.scss +2 -2
- package/src/components/Tree/index.tsx +25 -24
- package/src/components/Upload/_components/UploadedItem/index.tsx +2 -2
- package/src/components/Upload/_components/UploadingItem/index.tsx +2 -2
- package/src/components/Upload/_hooks/useUploadFileList.ts +1 -1
- package/src/components/Upload/_hooks/useUploadOperations.ts +3 -3
- package/src/components/Upload/_hooks/useUploadPreview.ts +1 -1
- package/src/components/Upload/_utils/chunkUpload.ts +4 -4
- package/src/components/Upload/_utils/createFormData.ts +1 -1
- package/src/components/Upload/_utils/extractFileUrl.ts +1 -1
- package/src/components/Upload/_utils/isSuccessResponse.ts +1 -1
- package/src/components/Upload/_utils/normalUpload.ts +2 -2
- package/src/components/Upload/_utils/toMB.ts +1 -1
- package/src/components/Upload/_utils/validateFile.ts +1 -1
- package/src/components/Upload/index.tsx +2 -2
- package/src/config-provider/index.tsx +4 -4
- package/src/hooks/usePermissions.ts +3 -3
- package/src/index.ts +8 -4
- package/src/request/ResType.ts +3 -3
- package/src/request/index.ts +7 -7
- package/src/styles/antd-overload.scss +16 -10
- package/src/styles/tokens.scss +62 -0
- package/src/styles/tokens.ts +52 -0
- package/src/typings.d.ts +3 -3
- package/src/utils/getUUID.ts +1 -1
|
@@ -3,7 +3,7 @@ import { TreeData } from "..";
|
|
|
3
3
|
import { filterTreeData } from "../_utils";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Hook for handling tree search
|
|
7
7
|
*/
|
|
8
8
|
export const useTreeSearch = (
|
|
9
9
|
treeData: TreeData[],
|
|
@@ -12,8 +12,8 @@ export const useTreeSearch = (
|
|
|
12
12
|
const [searchKey, setSearchKey] = useState<string>("");
|
|
13
13
|
const prevSearchKeyRef = useRef<string>("");
|
|
14
14
|
|
|
15
|
-
//
|
|
16
|
-
// filterTreeData
|
|
15
|
+
// Process tree data (search filtering)
|
|
16
|
+
// filterTreeData already handles data copying internally, no extra cloneDeep needed
|
|
17
17
|
const filteredTreeData = useMemo(() => {
|
|
18
18
|
if (!searchKey.trim()) {
|
|
19
19
|
return treeData;
|
|
@@ -21,25 +21,25 @@ export const useTreeSearch = (
|
|
|
21
21
|
return filterTreeData(searchKey, treeData);
|
|
22
22
|
}, [searchKey, treeData]);
|
|
23
23
|
|
|
24
|
-
//
|
|
24
|
+
// Handle expand logic while searching
|
|
25
25
|
useEffect(() => {
|
|
26
26
|
const trimmedSearchKey = searchKey.trim();
|
|
27
27
|
const prevTrimmedKey = prevSearchKeyRef.current.trim();
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// Skip processing if the search keyword has not changed
|
|
30
30
|
if (trimmedSearchKey === prevTrimmedKey) {
|
|
31
31
|
return;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
prevSearchKeyRef.current = searchKey;
|
|
35
35
|
|
|
36
|
-
//
|
|
36
|
+
// When the search is cleared, reset the expanded state
|
|
37
37
|
if (!trimmedSearchKey) {
|
|
38
38
|
setExpandedKeys([]);
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
//
|
|
42
|
+
// When there is a search keyword, expand all matching nodes
|
|
43
43
|
if (!filteredTreeData.length) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
@@ -4,7 +4,7 @@ import { CheckedKeys, TreeData } from "..";
|
|
|
4
4
|
import { normalizeCheckedKeys } from "../_utils/normalizeCheckedKeys";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Hook for syncing external expandedKeys
|
|
8
8
|
*/
|
|
9
9
|
export const useExpandedKeys = (
|
|
10
10
|
expandedKeysProps?: Key[],
|
|
@@ -15,10 +15,10 @@ export const useExpandedKeys = (
|
|
|
15
15
|
);
|
|
16
16
|
const prevPropsRef = useRef<Key[] | undefined>(expandedKeysProps);
|
|
17
17
|
const prevDefaultRef = useRef<Key[] | undefined>(defaultExpandedKeys);
|
|
18
|
-
//
|
|
18
|
+
// Flag indicating whether the user has manually changed the expanded state
|
|
19
19
|
const hasUserInteractedRef = useRef(false);
|
|
20
20
|
|
|
21
|
-
//
|
|
21
|
+
// Watch for expandedKeysProps changes in controlled mode
|
|
22
22
|
useEffect(() => {
|
|
23
23
|
if (
|
|
24
24
|
expandedKeysProps !== undefined &&
|
|
@@ -29,9 +29,9 @@ export const useExpandedKeys = (
|
|
|
29
29
|
}
|
|
30
30
|
}, [expandedKeysProps]);
|
|
31
31
|
|
|
32
|
-
//
|
|
32
|
+
// Watch for defaultExpandedKeys changes (in uncontrolled mode, used to respond to async data loading)
|
|
33
33
|
useEffect(() => {
|
|
34
|
-
//
|
|
34
|
+
// Only respond to defaultExpandedKeys changes in uncontrolled mode when the user has not manually interacted
|
|
35
35
|
if (
|
|
36
36
|
expandedKeysProps === undefined &&
|
|
37
37
|
!hasUserInteractedRef.current &&
|
|
@@ -42,7 +42,7 @@ export const useExpandedKeys = (
|
|
|
42
42
|
}
|
|
43
43
|
}, [defaultExpandedKeys, expandedKeysProps]);
|
|
44
44
|
|
|
45
|
-
//
|
|
45
|
+
// Wrap setExpandedKeys to mark that the user has manually interacted
|
|
46
46
|
const handleSetExpandedKeys = (
|
|
47
47
|
keys: Key[] | undefined | ((prev: Key[] | undefined) => Key[] | undefined)
|
|
48
48
|
) => {
|
|
@@ -54,14 +54,14 @@ export const useExpandedKeys = (
|
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
57
|
+
* Hook for syncing external checkedKeys
|
|
58
|
+
* Auto-normalizes: when a parent is in checked but its children are not all checked, the parent is set to half-checked
|
|
59
59
|
*/
|
|
60
60
|
export const useCheckedKeys = (
|
|
61
61
|
checkedKeysProps?: CheckedKeys,
|
|
62
62
|
treeData?: TreeData[]
|
|
63
63
|
) => {
|
|
64
|
-
//
|
|
64
|
+
// Normalize checkedKeys
|
|
65
65
|
const normalizedCheckedKeys = useMemo(() => {
|
|
66
66
|
if (!checkedKeysProps || !treeData?.length) {
|
|
67
67
|
return checkedKeysProps;
|
|
@@ -77,7 +77,7 @@ export const useCheckedKeys = (
|
|
|
77
77
|
);
|
|
78
78
|
|
|
79
79
|
useEffect(() => {
|
|
80
|
-
//
|
|
80
|
+
// Only update when the normalized value has actually changed
|
|
81
81
|
if (
|
|
82
82
|
normalizedCheckedKeys !== undefined &&
|
|
83
83
|
!Equal.ObjEqual(prevNormalizedRef.current, normalizedCheckedKeys)
|
|
@@ -2,9 +2,9 @@ import { Key } from "react";
|
|
|
2
2
|
import { TreeData } from "..";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @param children
|
|
7
|
-
* @returns
|
|
5
|
+
* Get the keys of all descendant nodes of a node
|
|
6
|
+
* @param children Array of child nodes
|
|
7
|
+
* @returns Array of keys of all descendant nodes
|
|
8
8
|
*/
|
|
9
9
|
export const getAllChildrenKeys = (children: TreeData[]): Key[] => {
|
|
10
10
|
const keys: Key[] = [];
|
|
@@ -21,11 +21,11 @@ export const getAllChildrenKeys = (children: TreeData[]): Key[] => {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @param targetKey
|
|
26
|
-
* @param treeData
|
|
27
|
-
* @param parentKeys
|
|
28
|
-
* @returns
|
|
24
|
+
* Find the keys of all ancestor nodes of a node in the tree
|
|
25
|
+
* @param targetKey Key of the target node
|
|
26
|
+
* @param treeData Tree data
|
|
27
|
+
* @param parentKeys Array of ancestor node keys (used for recursion)
|
|
28
|
+
* @returns Array of keys of all ancestor nodes; returns an empty array if not found
|
|
29
29
|
*/
|
|
30
30
|
export const getAllParentKeys = (
|
|
31
31
|
targetKey: Key,
|
|
@@ -39,7 +39,7 @@ export const getAllParentKeys = (
|
|
|
39
39
|
if (node.children?.length) {
|
|
40
40
|
const newParentKeys = [...parentKeys, node.key];
|
|
41
41
|
const found = getAllParentKeys(targetKey, node.children, newParentKeys);
|
|
42
|
-
//
|
|
42
|
+
// If found (the returned array length is greater than 0 or equals newParentKeys), the target was found in the subtree
|
|
43
43
|
if (found.length > 0) {
|
|
44
44
|
return found;
|
|
45
45
|
}
|
|
@@ -49,10 +49,10 @@ export const getAllParentKeys = (
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
53
|
-
* @param targetKey
|
|
54
|
-
* @param data
|
|
55
|
-
* @returns
|
|
52
|
+
* Find a node by key
|
|
53
|
+
* @param targetKey Key of the target node
|
|
54
|
+
* @param data Tree data
|
|
55
|
+
* @returns The found node, or null
|
|
56
56
|
*/
|
|
57
57
|
export const findNodeByKey = (
|
|
58
58
|
targetKey: Key,
|
|
@@ -71,10 +71,10 @@ export const findNodeByKey = (
|
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
75
|
-
* @param searchKey
|
|
76
|
-
* @param data
|
|
77
|
-
* @returns
|
|
74
|
+
* Filter tree data by search keyword
|
|
75
|
+
* @param searchKey Search keyword
|
|
76
|
+
* @param data Tree data
|
|
77
|
+
* @returns Filtered tree data
|
|
78
78
|
*/
|
|
79
79
|
export const filterTreeData = (
|
|
80
80
|
searchKey: string,
|
|
@@ -103,10 +103,10 @@ export const filterTreeData = (
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
107
|
-
* @param treeData
|
|
108
|
-
* @param level
|
|
109
|
-
* @returns
|
|
106
|
+
* Compute the node keys that should be expanded based on the default expand level
|
|
107
|
+
* @param treeData Tree data
|
|
108
|
+
* @param level Expand level (starting from 1: 1 means the first level, 2 the second, and so on)
|
|
109
|
+
* @returns Array of node keys that should be expanded
|
|
110
110
|
*/
|
|
111
111
|
export const getExpandedKeysByLevel = (
|
|
112
112
|
treeData: TreeData[],
|
|
@@ -120,7 +120,7 @@ export const getExpandedKeysByLevel = (
|
|
|
120
120
|
|
|
121
121
|
const traverse = (nodes: TreeData[], currentLevel: number) => {
|
|
122
122
|
for (const node of nodes) {
|
|
123
|
-
//
|
|
123
|
+
// Expand the node if the current level is less than or equal to the target level
|
|
124
124
|
if (currentLevel <= level && node.children?.length) {
|
|
125
125
|
expandedKeys.push(node.key);
|
|
126
126
|
traverse(node.children, currentLevel + 1);
|
|
@@ -134,10 +134,10 @@ export const getExpandedKeysByLevel = (
|
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
|
-
*
|
|
138
|
-
* @param targetKey
|
|
139
|
-
* @param treeData
|
|
140
|
-
* @returns
|
|
137
|
+
* Get the full path of a node (from the root node to the current node)
|
|
138
|
+
* @param targetKey Key of the target node
|
|
139
|
+
* @param treeData Tree data
|
|
140
|
+
* @returns Array of nodes on the path, containing all node info from the root to the target node; returns null if not found
|
|
141
141
|
*/
|
|
142
142
|
export const getNodePath = (
|
|
143
143
|
targetKey: Key,
|
|
@@ -150,12 +150,12 @@ export const getNodePath = (
|
|
|
150
150
|
for (const node of nodes) {
|
|
151
151
|
const currentPath = [...path, node];
|
|
152
152
|
|
|
153
|
-
//
|
|
153
|
+
// Target node found
|
|
154
154
|
if (node.key === targetKey) {
|
|
155
155
|
return currentPath;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
//
|
|
158
|
+
// Continue searching in child nodes
|
|
159
159
|
if (node.children?.length) {
|
|
160
160
|
const found = findPath(node.children, currentPath);
|
|
161
161
|
if (found) {
|
|
@@ -3,10 +3,10 @@ import { TreeData, CheckedKeys } from "..";
|
|
|
3
3
|
import { getAllChildrenKeys } from ".";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @param checkedKeys
|
|
8
|
-
* @param treeData
|
|
9
|
-
* @returns
|
|
6
|
+
* Normalize checkedKeys: check parent nodes; if their children are not all checked, mark the parent as half-checked
|
|
7
|
+
* @param checkedKeys The checkedKeys to normalize
|
|
8
|
+
* @param treeData Tree data
|
|
9
|
+
* @returns Normalized checkedKeys
|
|
10
10
|
*/
|
|
11
11
|
export const normalizeCheckedKeys = (
|
|
12
12
|
checkedKeys: CheckedKeys | undefined,
|
|
@@ -16,7 +16,7 @@ export const normalizeCheckedKeys = (
|
|
|
16
16
|
return checkedKeys;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
//
|
|
19
|
+
// If in array format, convert to object format
|
|
20
20
|
const checkedSet = new Set<Key>();
|
|
21
21
|
const halfCheckedSet = new Set<Key>();
|
|
22
22
|
|
|
@@ -27,46 +27,46 @@ export const normalizeCheckedKeys = (
|
|
|
27
27
|
(checkedKeys.halfChecked || [])?.forEach((key) => halfCheckedSet.add(key));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
//
|
|
30
|
+
// Recursively traverse all nodes and check parent node states
|
|
31
|
+
// Process from the deepest level up so that parent states are based on correct child states
|
|
32
32
|
const processNode = (node: TreeData): void => {
|
|
33
|
-
//
|
|
33
|
+
// Recursively process child nodes first (starting from the deepest level)
|
|
34
34
|
if (node.children?.length) {
|
|
35
35
|
for (const child of node.children) {
|
|
36
36
|
processNode(child);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//
|
|
41
|
-
//
|
|
40
|
+
// Then process the current node (the parent)
|
|
41
|
+
// If the node is in checked and has children
|
|
42
42
|
if (checkedSet.has(node.key) && node.children?.length) {
|
|
43
|
-
//
|
|
43
|
+
// Get the keys of all descendant nodes
|
|
44
44
|
const allChildrenKeys = getAllChildrenKeys(node.children);
|
|
45
45
|
|
|
46
|
-
//
|
|
46
|
+
// Check whether all descendant nodes are checked
|
|
47
47
|
if (allChildrenKeys.length > 0) {
|
|
48
48
|
const allChildrenChecked = allChildrenKeys.every((childKey) =>
|
|
49
49
|
checkedSet.has(childKey)
|
|
50
50
|
);
|
|
51
51
|
|
|
52
52
|
if (!allChildrenChecked) {
|
|
53
|
-
//
|
|
53
|
+
// If the children are not all checked, remove the parent from checked and add it to halfChecked
|
|
54
54
|
checkedSet.delete(node.key);
|
|
55
55
|
halfCheckedSet.add(node.key);
|
|
56
56
|
} else {
|
|
57
|
-
//
|
|
57
|
+
// If all children are checked, make sure the parent is not in halfChecked
|
|
58
58
|
halfCheckedSet.delete(node.key);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
//
|
|
64
|
+
// Traverse all root nodes
|
|
65
65
|
for (const node of treeData) {
|
|
66
66
|
processNode(node);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
//
|
|
69
|
+
// Return the normalized checkedKeys
|
|
70
70
|
return {
|
|
71
71
|
checked: Array.from(checkedSet),
|
|
72
72
|
halfChecked: Array.from(halfCheckedSet),
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&:has(> :global(.ant-tree-node-selected)) {
|
|
65
|
-
background-color:
|
|
65
|
+
background-color: color-mix(in srgb, var(--primary-color) 12%, transparent);
|
|
66
66
|
|
|
67
67
|
:global(.ant-tree-node-selected) {
|
|
68
68
|
background-color: transparent;
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
&.legacyHasSelectedNodeBackground {
|
|
132
132
|
.treeContainer {
|
|
133
133
|
:global(.ant-tree-treenode):global(.ant-tree-treenode-selected) {
|
|
134
|
-
background-color:
|
|
134
|
+
background-color: color-mix(in srgb, var(--primary-color) 12%, transparent);
|
|
135
135
|
|
|
136
136
|
:global(.ant-tree-node-selected) {
|
|
137
137
|
background-color: transparent;
|
|
@@ -62,12 +62,12 @@ export interface TreeProps extends Omit<
|
|
|
62
62
|
hideLeafExpand?: boolean;
|
|
63
63
|
buttonGroup?: ButtonProps[];
|
|
64
64
|
btnPosition?: "left" | "right";
|
|
65
|
-
/**
|
|
65
|
+
/** Default expand level (starting from 1: 1 means the first level, 2 the second, and so on) */
|
|
66
66
|
defaultExpandLevel?: number;
|
|
67
67
|
hasPermi?: string[];
|
|
68
|
-
/**
|
|
68
|
+
/** Callback when a node is selected, returns the full path of the selected node */
|
|
69
69
|
onSelectPath?: (path: TreeData[] | null, selectedKeys: Key[]) => void;
|
|
70
|
-
/**
|
|
70
|
+
/** Whether clicking an already selected node deselects it; defaults to true (deselection allowed) */
|
|
71
71
|
allowDeselect?: boolean;
|
|
72
72
|
titleSearchBarClassName?: string;
|
|
73
73
|
}
|
|
@@ -107,10 +107,10 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
107
107
|
const { permitted } = usePermissions(hasPermi);
|
|
108
108
|
const legacyHasSelector = isLegacyHasSelectorBrowser();
|
|
109
109
|
|
|
110
|
-
//
|
|
110
|
+
// Generate a unique class name (for style isolation)
|
|
111
111
|
const cls = useMemo(() => generateRandomStr(10), []);
|
|
112
|
-
//
|
|
113
|
-
//
|
|
112
|
+
// Compute the default expanded keys based on defaultExpandLevel
|
|
113
|
+
// If both defaultExpandedKeys and defaultExpandLevel are provided, defaultExpandedKeys takes precedence
|
|
114
114
|
const computedDefaultExpandedKeys = useMemo(() => {
|
|
115
115
|
if (defaultExpandedKeys !== undefined) {
|
|
116
116
|
return defaultExpandedKeys;
|
|
@@ -121,39 +121,39 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
121
121
|
return undefined;
|
|
122
122
|
}, [defaultExpandLevel, treeData, defaultExpandedKeys]);
|
|
123
123
|
|
|
124
|
-
//
|
|
124
|
+
// Manage expanded state
|
|
125
125
|
const [expandedKeys, setExpandedKeys] = useExpandedKeys(
|
|
126
126
|
expandedKeysProps,
|
|
127
127
|
computedDefaultExpandedKeys,
|
|
128
128
|
);
|
|
129
129
|
|
|
130
|
-
//
|
|
130
|
+
// Manage checked state (auto-normalized: a parent in checked whose children are not all checked becomes half-checked)
|
|
131
131
|
const [checkedKeys, setCheckedKeys] = useCheckedKeys(
|
|
132
132
|
checkedKeysProps,
|
|
133
133
|
treeData,
|
|
134
134
|
);
|
|
135
135
|
|
|
136
|
-
//
|
|
136
|
+
// Manage selected state (used to support the allowDeselect feature)
|
|
137
137
|
const [internalSelectedKeys, setInternalSelectedKeys] = React.useState<Key[]>(
|
|
138
138
|
defaultSelectedKeys ?? [],
|
|
139
139
|
);
|
|
140
140
|
|
|
141
|
-
//
|
|
141
|
+
// Controlled mode uses the externally provided selectedKeys; uncontrolled mode uses internal state
|
|
142
142
|
const selectedKeys = selectedKeysProps ?? internalSelectedKeys;
|
|
143
143
|
|
|
144
|
-
//
|
|
144
|
+
// Handle search
|
|
145
145
|
const { searchKey, handleSearchChange, filteredTreeData } = useTreeSearch(
|
|
146
146
|
treeData,
|
|
147
147
|
setExpandedKeys,
|
|
148
148
|
);
|
|
149
149
|
|
|
150
|
-
//
|
|
150
|
+
// Handle checking (uses antd's default logic)
|
|
151
151
|
const handleCheck = useTreeCheck(setCheckedKeys, onCheck, onChange);
|
|
152
152
|
|
|
153
|
-
//
|
|
153
|
+
// Clear the node title attribute (prevents hover tooltip)
|
|
154
154
|
useClearNodeTitle(filteredTreeData, cls);
|
|
155
155
|
|
|
156
|
-
//
|
|
156
|
+
// Style object (CSS variables)
|
|
157
157
|
const style = useMemo<CSSProperties>(
|
|
158
158
|
() =>
|
|
159
159
|
({
|
|
@@ -167,7 +167,7 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
167
167
|
[indent, switchWidth, switchGap],
|
|
168
168
|
);
|
|
169
169
|
|
|
170
|
-
//
|
|
170
|
+
// Store the latest onSelectPath callback and initialization flag in refs to avoid stale closures
|
|
171
171
|
const onSelectPathRef = useRef(onSelectPath);
|
|
172
172
|
const isInitializedRef = useRef(false);
|
|
173
173
|
|
|
@@ -175,7 +175,7 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
175
175
|
onSelectPathRef.current = onSelectPath;
|
|
176
176
|
}, [onSelectPath]);
|
|
177
177
|
|
|
178
|
-
//
|
|
178
|
+
// Handle expand events
|
|
179
179
|
const handleExpand = useCallback(
|
|
180
180
|
(
|
|
181
181
|
expandedKeys: Key[],
|
|
@@ -187,7 +187,7 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
187
187
|
[setExpandedKeys, treeConfig],
|
|
188
188
|
);
|
|
189
189
|
|
|
190
|
-
//
|
|
190
|
+
// Handle select events
|
|
191
191
|
const handleSelect = useCallback(
|
|
192
192
|
(
|
|
193
193
|
selectedKeys: Key[],
|
|
@@ -195,13 +195,14 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
195
195
|
) => {
|
|
196
196
|
let finalSelectedKeys = selectedKeys;
|
|
197
197
|
|
|
198
|
-
//
|
|
199
|
-
//
|
|
198
|
+
// If deselection is not allowed and an already selected node was clicked
|
|
199
|
+
// (info.selected being false means it is about to be deselected),
|
|
200
|
+
// block the deselection and keep the node selected
|
|
200
201
|
if (!allowDeselect && !info.selected && info.node.key) {
|
|
201
202
|
finalSelectedKeys = [info.node.key];
|
|
202
203
|
}
|
|
203
204
|
|
|
204
|
-
//
|
|
205
|
+
// In uncontrolled mode, update internal state
|
|
205
206
|
if (selectedKeysProps === undefined) {
|
|
206
207
|
setInternalSelectedKeys(finalSelectedKeys);
|
|
207
208
|
}
|
|
@@ -210,7 +211,7 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
210
211
|
|
|
211
212
|
if (!onSelectPathRef.current) return;
|
|
212
213
|
|
|
213
|
-
//
|
|
214
|
+
// Get the node path and invoke the callback
|
|
214
215
|
const path =
|
|
215
216
|
finalSelectedKeys.length > 0
|
|
216
217
|
? getNodePath(finalSelectedKeys[0], treeData)
|
|
@@ -220,11 +221,11 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
220
221
|
[onSelect, treeData, allowDeselect, selectedKeysProps],
|
|
221
222
|
);
|
|
222
223
|
|
|
223
|
-
//
|
|
224
|
+
// Handle initially provided selectedKeys and defaultSelectedKeys
|
|
224
225
|
useEffect(() => {
|
|
225
226
|
if (!onSelectPathRef.current || !treeData.length) return;
|
|
226
227
|
|
|
227
|
-
//
|
|
228
|
+
// Controlled mode: use selectedKeysProps
|
|
228
229
|
if (selectedKeysProps !== undefined) {
|
|
229
230
|
if (selectedKeysProps.length > 0) {
|
|
230
231
|
const path = getNodePath(selectedKeysProps[0], treeData);
|
|
@@ -236,7 +237,7 @@ const Tree: React.FC<TreeProps> = (props) => {
|
|
|
236
237
|
return;
|
|
237
238
|
}
|
|
238
239
|
|
|
239
|
-
//
|
|
240
|
+
// Uncontrolled mode: only use defaultSelectedKeys on initialization
|
|
240
241
|
if (
|
|
241
242
|
!isInitializedRef.current &&
|
|
242
243
|
defaultSelectedKeys &&
|
|
@@ -94,9 +94,9 @@ export const UploadedItem: React.FC<UploadedItemProps> = ({
|
|
|
94
94
|
<div className={classNames(styles.fileItem, listProps?.item)}>
|
|
95
95
|
<Tooltip
|
|
96
96
|
title={name}
|
|
97
|
-
color="
|
|
97
|
+
color="var(--cf-subtle)"
|
|
98
98
|
styles={{
|
|
99
|
-
body: { color: "
|
|
99
|
+
body: { color: "var(--cf-text)", padding: "6px 16px" },
|
|
100
100
|
}}
|
|
101
101
|
>
|
|
102
102
|
<div className={classNames(styles.fileName, listProps?.itemName)}>
|
|
@@ -32,9 +32,9 @@ export const UploadingItem: React.FC<UploadingItemProps> = ({
|
|
|
32
32
|
<div className={styles.uploading}>
|
|
33
33
|
<Tooltip
|
|
34
34
|
title={name}
|
|
35
|
-
color="
|
|
35
|
+
color="var(--cf-subtle)"
|
|
36
36
|
styles={{
|
|
37
|
-
body: { color: "
|
|
37
|
+
body: { color: "var(--cf-text)", padding: "6px 16px" },
|
|
38
38
|
}}
|
|
39
39
|
>
|
|
40
40
|
<div
|
|
@@ -7,7 +7,7 @@ interface UseUploadOperationsProps {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Manage upload and download operations
|
|
11
11
|
*/
|
|
12
12
|
export function useUploadOperations({
|
|
13
13
|
onUploadingList,
|
|
@@ -25,7 +25,7 @@ export function useUploadOperations({
|
|
|
25
25
|
uploadingList: {},
|
|
26
26
|
});
|
|
27
27
|
|
|
28
|
-
//
|
|
28
|
+
// Sync to the ref on update
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
operationsRef.current.downloading = downloading;
|
|
31
31
|
}, [downloading]);
|
|
@@ -41,7 +41,7 @@ export function useUploadOperations({
|
|
|
41
41
|
}
|
|
42
42
|
}, [uploadingList, lastUploadList, onUploadingList]);
|
|
43
43
|
|
|
44
|
-
//
|
|
44
|
+
// Cleanup function
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
return () => {
|
|
47
47
|
const {
|
|
@@ -24,7 +24,7 @@ interface ChunkUploadOptions {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Chunked upload
|
|
28
28
|
*/
|
|
29
29
|
export async function chunkUpload({
|
|
30
30
|
file,
|
|
@@ -43,7 +43,7 @@ export async function chunkUpload({
|
|
|
43
43
|
onError,
|
|
44
44
|
onUploadSuccess,
|
|
45
45
|
}: ChunkUploadOptions) {
|
|
46
|
-
//
|
|
46
|
+
// Validate the file
|
|
47
47
|
const validation = validateFile({ file, accept, size, en });
|
|
48
48
|
if (!validation.valid) {
|
|
49
49
|
onError?.(validation.error!);
|
|
@@ -52,8 +52,8 @@ export async function chunkUpload({
|
|
|
52
52
|
|
|
53
53
|
const name = file.name;
|
|
54
54
|
const uploadId = getUUID();
|
|
55
|
-
const sliceSize = toMB(5); //
|
|
56
|
-
const totalSlices = Math.ceil(file.size / sliceSize); //
|
|
55
|
+
const sliceSize = toMB(5); // Chunk size, 5MB per chunk
|
|
56
|
+
const totalSlices = Math.ceil(file.size / sliceSize); // Get the number of chunks
|
|
57
57
|
|
|
58
58
|
let chunk = 0;
|
|
59
59
|
let postPromises: Promise<{ data?: { code?: number; msg?: string } }>[] = [];
|
|
@@ -22,7 +22,7 @@ interface NormalUploadOptions {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* Normal file upload
|
|
26
26
|
*/
|
|
27
27
|
export async function normalUpload({
|
|
28
28
|
file,
|
|
@@ -39,7 +39,7 @@ export async function normalUpload({
|
|
|
39
39
|
onError,
|
|
40
40
|
onUploadSuccess,
|
|
41
41
|
}: NormalUploadOptions) {
|
|
42
|
-
//
|
|
42
|
+
// Validate the file
|
|
43
43
|
const validation = validateFile({ file, accept, size, en });
|
|
44
44
|
if (!validation.valid) {
|
|
45
45
|
onError?.(validation.error!);
|