@hsu-react/ui 0.0.13 → 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 +12 -9
- 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 +12 -9
- 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 +12 -9
- 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
|
@@ -77,7 +77,7 @@ export interface UseSearchCommonReturn {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Extracts the common logic shared by all Search components
|
|
81
81
|
*/
|
|
82
82
|
export const useSearchCommon = (
|
|
83
83
|
params: UseSearchCommonParams,
|
|
@@ -109,23 +109,23 @@ export const useSearchCommon = (
|
|
|
109
109
|
const buttonGroupRef = useRef<HTMLDivElement>(null);
|
|
110
110
|
const cls = useMemo(() => generateRandomStr(10), []);
|
|
111
111
|
|
|
112
|
-
//
|
|
112
|
+
// Extract visible search items
|
|
113
113
|
const visibleSearchItems = useMemo(() => {
|
|
114
114
|
return processedSearchItems.filter((item) => item.visible !== false);
|
|
115
115
|
}, [processedSearchItems]);
|
|
116
116
|
|
|
117
|
-
//
|
|
117
|
+
// Extract visible "more" search items
|
|
118
118
|
const visibleMoreSearchItems = useMemo(() => {
|
|
119
119
|
return moreSearchItems.filter((item) => item.visible !== false);
|
|
120
120
|
}, [moreSearchItems]);
|
|
121
121
|
|
|
122
|
-
//
|
|
122
|
+
// Count of visible search items
|
|
123
123
|
const visibleSearchItemCount = visibleSearchItems.length;
|
|
124
124
|
|
|
125
|
-
//
|
|
125
|
+
// Total column count (including the button group)
|
|
126
126
|
const baseTotalColumnNum = columnNum + 1;
|
|
127
127
|
|
|
128
|
-
//
|
|
128
|
+
// Dynamically adjust column count based on container width
|
|
129
129
|
const totalColumnNum = useAdaptiveColumnNum(
|
|
130
130
|
containerRef,
|
|
131
131
|
baseTotalColumnNum,
|
|
@@ -136,10 +136,10 @@ export const useSearchCommon = (
|
|
|
136
136
|
baseWidth,
|
|
137
137
|
);
|
|
138
138
|
|
|
139
|
-
//
|
|
139
|
+
// Adjusted search-item column count (excluding the button group)
|
|
140
140
|
const adaptiveColumnNum = Math.max(1, totalColumnNum - 1);
|
|
141
141
|
|
|
142
|
-
//
|
|
142
|
+
// Use width-based expand/collapse control
|
|
143
143
|
const { expand, setExpand, toggleExpand, visibleItemCount } = useSearchExpand(
|
|
144
144
|
containerRef,
|
|
145
145
|
buttonGroupRef,
|
|
@@ -156,14 +156,14 @@ export const useSearchCommon = (
|
|
|
156
156
|
|
|
157
157
|
useSearchForm({ form, searchData });
|
|
158
158
|
|
|
159
|
-
//
|
|
159
|
+
// Compute the search items that should currently be displayed
|
|
160
160
|
const currentSearchItems = useMemo(() => {
|
|
161
161
|
if (showAllSearchItems || !!moreSearchItems?.length) {
|
|
162
162
|
if (expand) return [...visibleSearchItems, ...visibleMoreSearchItems];
|
|
163
163
|
return visibleSearchItems;
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
//
|
|
166
|
+
// Compute button group width and column width (used to decide whether more items should be displayed)
|
|
167
167
|
let buttonGroupWidth: number | undefined;
|
|
168
168
|
let columnWidth: number | undefined;
|
|
169
169
|
|
|
@@ -178,7 +178,7 @@ export const useSearchCommon = (
|
|
|
178
178
|
columnWidth = result.columnWidth;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
//
|
|
181
|
+
// Otherwise use the calculation function
|
|
182
182
|
return calculateVisibleItems(
|
|
183
183
|
processedSearchItems,
|
|
184
184
|
expand,
|
|
@@ -215,18 +215,18 @@ export const useSearchCommon = (
|
|
|
215
215
|
});
|
|
216
216
|
}, [form, onSearch]);
|
|
217
217
|
|
|
218
|
-
//
|
|
218
|
+
// Check whether any item has a custom width
|
|
219
219
|
const hasCustomWidth = useMemo(() => {
|
|
220
220
|
return processedSearchItems.some((item) => item.width !== undefined);
|
|
221
221
|
}, [processedSearchItems]);
|
|
222
222
|
|
|
223
|
-
//
|
|
223
|
+
// Compute the actual number of items to display (accounting for the case where the button group is wider than a column)
|
|
224
224
|
const actualDisplayCount = useMemo(() => {
|
|
225
225
|
if (hasCustomWidth) {
|
|
226
226
|
return visibleItemCount;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
//
|
|
229
|
+
// Compute button group width and column width
|
|
230
230
|
const { buttonGroupWidth, columnWidth } =
|
|
231
231
|
calculateButtonGroupAndColumnWidth(
|
|
232
232
|
containerRef,
|
|
@@ -235,7 +235,7 @@ export const useSearchCommon = (
|
|
|
235
235
|
columnOffsetWidth,
|
|
236
236
|
);
|
|
237
237
|
|
|
238
|
-
//
|
|
238
|
+
// If the button group is wider than a column, display actual search item count + 1
|
|
239
239
|
if (
|
|
240
240
|
shouldDisplayExtraItem(
|
|
241
241
|
buttonGroupWidth,
|
|
@@ -256,9 +256,9 @@ export const useSearchCommon = (
|
|
|
256
256
|
visibleItemCount,
|
|
257
257
|
]);
|
|
258
258
|
|
|
259
|
-
//
|
|
259
|
+
// Determine whether to show the expand button
|
|
260
260
|
const showExpandButton = useMemo(() => {
|
|
261
|
-
//
|
|
261
|
+
// If there are "more" search items, show the expand button
|
|
262
262
|
if (showAllSearchItems || !!moreSearchItems?.length) {
|
|
263
263
|
if (visibleMoreSearchItems?.length) {
|
|
264
264
|
return true;
|
|
@@ -266,11 +266,11 @@ export const useSearchCommon = (
|
|
|
266
266
|
return false;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
//
|
|
269
|
+
// If there are custom widths, decide based on the visible item count
|
|
270
270
|
if (hasCustomWidth) {
|
|
271
271
|
return visibleSearchItemCount > visibleItemCount;
|
|
272
272
|
}
|
|
273
|
-
//
|
|
273
|
+
// Otherwise decide based on the actual display count (accounting for the case where the button group is wider than a column)
|
|
274
274
|
return visibleSearchItemCount > actualDisplayCount;
|
|
275
275
|
}, [
|
|
276
276
|
showAllSearchItems,
|
|
@@ -282,7 +282,7 @@ export const useSearchCommon = (
|
|
|
282
282
|
visibleItemCount,
|
|
283
283
|
]);
|
|
284
284
|
|
|
285
|
-
//
|
|
285
|
+
// Check whether the button group contains any permitted button
|
|
286
286
|
const hasPermittedButtons = useCallback(
|
|
287
287
|
(buttonGroup?: ChakraButtonProps[]) => {
|
|
288
288
|
if (!buttonGroup?.length) return false;
|
|
@@ -292,7 +292,7 @@ export const useSearchCommon = (
|
|
|
292
292
|
[checkPermission],
|
|
293
293
|
);
|
|
294
294
|
|
|
295
|
-
//
|
|
295
|
+
// Permission and content check
|
|
296
296
|
const shouldRender = useMemo(() => {
|
|
297
297
|
return Boolean(
|
|
298
298
|
hasPermittedButtons(beforeButtonGroup) ||
|
|
@@ -3,18 +3,18 @@ import { FormItemProps } from "../../FormItem";
|
|
|
3
3
|
import { measureButtonGroupWidth } from "../_utils";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
7
|
-
* @param containerRef
|
|
8
|
-
* @param buttonGroupRef
|
|
9
|
-
* @param itemClassName
|
|
10
|
-
* @param itemCount
|
|
11
|
-
* @param columnNum
|
|
12
|
-
* @param autoAdaptWidth
|
|
13
|
-
* @param defaultExpanded
|
|
14
|
-
* @param onExpandChange
|
|
15
|
-
* @param searchItems
|
|
16
|
-
* @param showAllSearchItems
|
|
17
|
-
* @returns
|
|
6
|
+
* Hook that controls expand/collapse adaptively based on width
|
|
7
|
+
* @param containerRef Container ref
|
|
8
|
+
* @param buttonGroupRef Button group ref
|
|
9
|
+
* @param itemClassName className of the search items
|
|
10
|
+
* @param itemCount Total number of search items
|
|
11
|
+
* @param columnNum Column count
|
|
12
|
+
* @param autoAdaptWidth Whether adaptive width is enabled
|
|
13
|
+
* @param defaultExpanded Whether expanded by default
|
|
14
|
+
* @param onExpandChange Callback when expand state changes
|
|
15
|
+
* @param searchItems Search item config array (optional)
|
|
16
|
+
* @param showAllSearchItems Whether to show all search items
|
|
17
|
+
* @returns Expand state and control methods
|
|
18
18
|
*/
|
|
19
19
|
export function useSearchExpand(
|
|
20
20
|
containerRef: React.RefObject<HTMLDivElement>,
|
|
@@ -43,41 +43,41 @@ export function useSearchExpand(
|
|
|
43
43
|
if (!containerRef.current || !buttonGroupRef.current) return;
|
|
44
44
|
|
|
45
45
|
const containerWidth = container.offsetWidth;
|
|
46
|
-
//
|
|
46
|
+
// Subtract padding
|
|
47
47
|
const availableWidth = containerWidth - 30; // 15px padding on each side
|
|
48
48
|
|
|
49
|
-
//
|
|
49
|
+
// Get the actual width of the button group (sum of all child element widths)
|
|
50
50
|
const buttonGroupWidth =
|
|
51
51
|
measureButtonGroupWidth(buttonGroupRef.current) ?? 0;
|
|
52
52
|
|
|
53
|
-
//
|
|
53
|
+
// Get all search item elements
|
|
54
54
|
const items = container.querySelectorAll(`${itemClassName}`);
|
|
55
55
|
|
|
56
|
-
//
|
|
56
|
+
// Compute how many search items fit in the first row
|
|
57
57
|
let count = 0;
|
|
58
58
|
let usedWidth = 0;
|
|
59
|
-
const gap = 10; //
|
|
59
|
+
const gap = 10; // Gap between items
|
|
60
60
|
|
|
61
|
-
//
|
|
61
|
+
// Compute the default width of a single item (container width divided by column count)
|
|
62
62
|
const defaultItemWidth =
|
|
63
63
|
(availableWidth - (columnNum - 1) * gap) / columnNum -
|
|
64
64
|
columnOffsetWidth;
|
|
65
65
|
|
|
66
|
-
//
|
|
66
|
+
// Iterate over all search items (including unrendered ones)
|
|
67
67
|
for (let i = 0; i < itemCount; i++) {
|
|
68
68
|
let itemWidth = 0;
|
|
69
69
|
|
|
70
|
-
//
|
|
70
|
+
// If this item exists in the DOM, use its actual width
|
|
71
71
|
if (i < items.length) {
|
|
72
72
|
const item = items[i] as HTMLElement;
|
|
73
73
|
itemWidth = item.offsetWidth;
|
|
74
74
|
} else if (searchItems && searchItems[i]?.width !== undefined) {
|
|
75
|
-
//
|
|
75
|
+
// If not in the DOM but a width is configured, use the configured width
|
|
76
76
|
const configWidth = searchItems[i].width;
|
|
77
77
|
if (typeof configWidth === "number") {
|
|
78
78
|
itemWidth = configWidth;
|
|
79
79
|
} else if (typeof configWidth === "string") {
|
|
80
|
-
//
|
|
80
|
+
// Handle percentage or pixel values
|
|
81
81
|
if (configWidth.endsWith("%")) {
|
|
82
82
|
const percent = parseFloat(configWidth) / 100;
|
|
83
83
|
itemWidth = availableWidth * percent;
|
|
@@ -86,14 +86,14 @@ export function useSearchExpand(
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
} else {
|
|
89
|
-
//
|
|
89
|
+
// If not in the DOM and no width is configured, use the default computed width
|
|
90
90
|
itemWidth = defaultItemWidth;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
//
|
|
93
|
+
// Compute the total width after adding the current item (including gap)
|
|
94
94
|
const nextWidth = usedWidth + itemWidth + (i > 0 ? gap : 0);
|
|
95
95
|
|
|
96
|
-
//
|
|
96
|
+
// Check whether the button group still fits (must reserve the gap and the button group width)
|
|
97
97
|
if (nextWidth + gap + buttonGroupWidth <= availableWidth) {
|
|
98
98
|
count++;
|
|
99
99
|
usedWidth = nextWidth;
|
|
@@ -102,26 +102,26 @@ export function useSearchExpand(
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
//
|
|
105
|
+
// Show at least 1 search item
|
|
106
106
|
count = Math.max(1, count);
|
|
107
107
|
setVisibleItemCount(count);
|
|
108
108
|
|
|
109
|
-
//
|
|
109
|
+
// If all items can be displayed, expanding is not needed
|
|
110
110
|
if (count >= itemCount) {
|
|
111
111
|
setExpand(false);
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const resizeObserver = new ResizeObserver(() => {
|
|
116
|
-
//
|
|
116
|
+
// Use requestAnimationFrame to defer to the next frame, ensuring the DOM has updated
|
|
117
117
|
requestAnimationFrame(() => {
|
|
118
118
|
calculateVisibleItems();
|
|
119
119
|
});
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
// MutationObserver
|
|
122
|
+
// MutationObserver watches for DOM changes
|
|
123
123
|
const mutationObserver = new MutationObserver(() => {
|
|
124
|
-
//
|
|
124
|
+
// Use requestAnimationFrame to defer to the next frame
|
|
125
125
|
requestAnimationFrame(() => {
|
|
126
126
|
calculateVisibleItems();
|
|
127
127
|
});
|
|
@@ -135,7 +135,7 @@ export function useSearchExpand(
|
|
|
135
135
|
attributeFilter: ["class", "style"],
|
|
136
136
|
});
|
|
137
137
|
|
|
138
|
-
//
|
|
138
|
+
// Listen for window resize
|
|
139
139
|
const handleWindowResize = () => {
|
|
140
140
|
requestAnimationFrame(() => {
|
|
141
141
|
calculateVisibleItems();
|
|
@@ -143,7 +143,7 @@ export function useSearchExpand(
|
|
|
143
143
|
};
|
|
144
144
|
window.addEventListener("resize", handleWindowResize);
|
|
145
145
|
|
|
146
|
-
//
|
|
146
|
+
// Initial calculation (deferred to ensure the DOM has rendered)
|
|
147
147
|
requestAnimationFrame(() => {
|
|
148
148
|
calculateVisibleItems();
|
|
149
149
|
});
|
|
@@ -2,11 +2,12 @@ import { useCallback, useMemo, useState } from "react";
|
|
|
2
2
|
import { FormItemProps } from "../../FormItem";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Manages search item state
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
7
|
+
* Derives directly from the input via useMemo, storing only the visible
|
|
8
|
+
* overrides the user manually toggles in FilterDropdown as state; this avoids
|
|
9
|
+
* repeated setState when a useEffect mirrors the prop and the parent passes a
|
|
10
|
+
* new array reference, which would trigger a Maximum update depth loop.
|
|
10
11
|
*/
|
|
11
12
|
export function useSearchItems(searchItems: FormItemProps[]) {
|
|
12
13
|
const [visibilityOverrides, setVisibilityOverrides] = useState<
|
|
@@ -4,7 +4,7 @@ import { FormItemProps } from "../../FormItem";
|
|
|
4
4
|
import { ChakraButtonProps } from "../../Button";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Search
|
|
7
|
+
* Base props interface for the Search component
|
|
8
8
|
*/
|
|
9
9
|
export interface BaseSearchProps {
|
|
10
10
|
searchItems?: FormItemProps[];
|
|
@@ -14,19 +14,19 @@ export interface BaseSearchProps {
|
|
|
14
14
|
className?: string;
|
|
15
15
|
externalForm?: FormInstance;
|
|
16
16
|
hasPermi?: string[];
|
|
17
|
-
/**
|
|
17
|
+
/** Search item column count (excluding the button group; total column count is columnNum + 1) */
|
|
18
18
|
columnNum?: number;
|
|
19
19
|
beforeButtonGroup?: ChakraButtonProps[];
|
|
20
20
|
affterButtonGroup?: ChakraButtonProps[];
|
|
21
21
|
searchData?: Record<string, unknown>;
|
|
22
22
|
minLabelWidth?: boolean | number;
|
|
23
|
-
/**
|
|
23
|
+
/** Whether expanded by default */
|
|
24
24
|
defaultExpanded?: boolean;
|
|
25
|
-
/**
|
|
25
|
+
/** Callback when the expand state changes */
|
|
26
26
|
onExpandChange?: (expand: boolean) => void;
|
|
27
|
-
/**
|
|
27
|
+
/** Whether to enable width-based adaptive layout (by default shows one row including buttons) */
|
|
28
28
|
autoAdaptWidth?: boolean;
|
|
29
|
-
/**
|
|
29
|
+
/** Base width for adaptive layout (default 1200px) */
|
|
30
30
|
baseWidth?: number;
|
|
31
31
|
onValuesChange?: (
|
|
32
32
|
value: Record<string, unknown>,
|
|
@@ -34,20 +34,20 @@ export interface BaseSearchProps {
|
|
|
34
34
|
) => void;
|
|
35
35
|
searchDisabled?: boolean;
|
|
36
36
|
showAllSearchItems?: boolean;
|
|
37
|
-
/**
|
|
37
|
+
/** Search button text */
|
|
38
38
|
searchText?: ReactNode;
|
|
39
|
-
/**
|
|
39
|
+
/** Reset button text */
|
|
40
40
|
resetText?: ReactNode;
|
|
41
|
-
/**
|
|
41
|
+
/** Column offset width, used to adjust column width calculation (default 0) */
|
|
42
42
|
columnOffsetWidth?: number;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* Props interface for the Search component with filter
|
|
47
47
|
*/
|
|
48
48
|
export interface SearchPropsWithFilter extends BaseSearchProps {
|
|
49
|
-
/**
|
|
49
|
+
/** Whether to show the filter */
|
|
50
50
|
setFilter?: boolean;
|
|
51
|
-
/** FilterDropdown
|
|
51
|
+
/** Callback when checked items change in FilterDropdown */
|
|
52
52
|
onFilterChange?: (items: FormItemProps[]) => void;
|
|
53
53
|
}
|
|
@@ -2,12 +2,12 @@ import { RefObject } from "react";
|
|
|
2
2
|
import { measureButtonGroupWidth } from "./measureButtonGroupWidth";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @param containerRef
|
|
7
|
-
* @param buttonGroupRef
|
|
8
|
-
* @param adaptiveColumnNum
|
|
9
|
-
* @param columnOffsetWidth
|
|
10
|
-
* @returns
|
|
5
|
+
* Computes the button group width and column width
|
|
6
|
+
* @param containerRef Container ref
|
|
7
|
+
* @param buttonGroupRef Button group ref
|
|
8
|
+
* @param adaptiveColumnNum Adaptive column count
|
|
9
|
+
* @param columnOffsetWidth Column offset width (default 0)
|
|
10
|
+
* @returns Button group width and column width
|
|
11
11
|
*/
|
|
12
12
|
export function calculateButtonGroupAndColumnWidth(
|
|
13
13
|
containerRef: RefObject<HTMLDivElement>,
|
|
@@ -23,13 +23,13 @@ export function calculateButtonGroupAndColumnWidth(
|
|
|
23
23
|
|
|
24
24
|
if (containerRef.current && buttonGroupRef.current) {
|
|
25
25
|
const containerWidth = containerRef.current.offsetWidth;
|
|
26
|
-
const availableWidth = containerWidth - 30; //
|
|
27
|
-
const gap = 10; //
|
|
26
|
+
const availableWidth = containerWidth - 30; // Subtract padding
|
|
27
|
+
const gap = 10; // Gap between items
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// Compute the button group width
|
|
30
30
|
buttonGroupWidth = measureButtonGroupWidth(buttonGroupRef.current);
|
|
31
31
|
|
|
32
|
-
//
|
|
32
|
+
// Compute the column width (default width of a single search item)
|
|
33
33
|
if (adaptiveColumnNum > 0) {
|
|
34
34
|
columnWidth =
|
|
35
35
|
availableWidth -
|
|
@@ -2,15 +2,15 @@ import { FormItemProps } from "../../FormItem";
|
|
|
2
2
|
import { shouldDisplayExtraItem } from "./shouldDisplayExtraItem";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* @param searchItems
|
|
7
|
-
* @param expand
|
|
8
|
-
* @param columnNum
|
|
9
|
-
* @param visibleItemCount
|
|
10
|
-
* @param autoAdaptWidth
|
|
11
|
-
* @param buttonGroupWidth
|
|
12
|
-
* @param columnWidth
|
|
13
|
-
* @returns
|
|
5
|
+
* Computes the search items that should currently be displayed
|
|
6
|
+
* @param searchItems All search items
|
|
7
|
+
* @param expand Whether expanded
|
|
8
|
+
* @param columnNum Column count
|
|
9
|
+
* @param visibleItemCount Visible item count (used with adaptive width)
|
|
10
|
+
* @param autoAdaptWidth Whether adaptive width is enabled
|
|
11
|
+
* @param buttonGroupWidth Button group width (optional)
|
|
12
|
+
* @param columnWidth Column width (optional)
|
|
13
|
+
* @returns The search items that should currently be displayed
|
|
14
14
|
*/
|
|
15
15
|
export function calculateVisibleItems(
|
|
16
16
|
searchItems: FormItemProps[],
|
|
@@ -25,14 +25,14 @@ export function calculateVisibleItems(
|
|
|
25
25
|
const hasCustomWidth = searchItems.some((item) => item.width !== undefined);
|
|
26
26
|
|
|
27
27
|
if (!expand) {
|
|
28
|
-
//
|
|
28
|
+
// When there are custom widths, use adaptive calculation
|
|
29
29
|
if (hasCustomWidth && autoAdaptWidth) {
|
|
30
30
|
if (visibleItems.length > visibleItemCount) {
|
|
31
31
|
return visibleItems.slice(0, visibleItemCount);
|
|
32
32
|
}
|
|
33
33
|
} else if (!hasCustomWidth) {
|
|
34
|
-
//
|
|
35
|
-
//
|
|
34
|
+
// Without custom widths, use columnNum (actual search item count)
|
|
35
|
+
// If the button group is wider than a column, display actual search item count + 1
|
|
36
36
|
const displayCount = shouldDisplayExtraItem(
|
|
37
37
|
buttonGroupWidth,
|
|
38
38
|
columnWidth,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param data
|
|
4
|
-
* @returns
|
|
2
|
+
* Cleans search data by removing undefined values
|
|
3
|
+
* @param data Raw search data
|
|
4
|
+
* @returns Cleaned search data
|
|
5
5
|
*/
|
|
6
6
|
export function cleanSearchData<T = Record<string, unknown>>(
|
|
7
7
|
data: Record<string, unknown>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* @param buttonGroupEl
|
|
4
|
-
* @returns
|
|
2
|
+
* Computes the actual width of the button group (sum of all child element widths + gaps between children)
|
|
3
|
+
* @param buttonGroupEl Button group element
|
|
4
|
+
* @returns Button group width; undefined when there are no children
|
|
5
5
|
*/
|
|
6
6
|
export function measureButtonGroupWidth(
|
|
7
7
|
buttonGroupEl: HTMLElement | null
|
|
@@ -15,7 +15,7 @@ export function measureButtonGroupWidth(
|
|
|
15
15
|
buttonChildren.forEach((child) => {
|
|
16
16
|
totalWidth += (child as HTMLElement).offsetWidth;
|
|
17
17
|
});
|
|
18
|
-
//
|
|
18
|
+
// Add the gaps between child elements
|
|
19
19
|
const childGap = 5;
|
|
20
20
|
totalWidth += (buttonChildren.length - 1) * childGap;
|
|
21
21
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Determines whether one extra search item should be displayed in collapsed state
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* @param buttonGroupWidth
|
|
7
|
-
* @param columnWidth
|
|
8
|
-
* @param columnNum
|
|
9
|
-
* @param visibleCount
|
|
4
|
+
* Rules: the button group is wider than a column (the button group takes up more space on its own, leaving spare room in the first row);
|
|
5
|
+
* or the button group is narrower than a column and the visible items exceed the column count by exactly 1 (collapsing would only hide 1 item, so it's better to just fit it in).
|
|
6
|
+
* @param buttonGroupWidth Button group width
|
|
7
|
+
* @param columnWidth Column width
|
|
8
|
+
* @param columnNum Search item column count (excluding the button group)
|
|
9
|
+
* @param visibleCount Total number of visible search items
|
|
10
10
|
*/
|
|
11
11
|
export function shouldDisplayExtraItem(
|
|
12
12
|
buttonGroupWidth: number | undefined,
|
|
@@ -21,12 +21,12 @@ interface SearchFC extends React.FC<SearchProps> {
|
|
|
21
21
|
WithMore: typeof SearchWithMore;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
//
|
|
24
|
+
// Export all available Search mode key names
|
|
25
25
|
export type SearchModeKeys =
|
|
26
26
|
| "Default"
|
|
27
27
|
| keyof Omit<SearchFC, keyof React.FC<SearchProps>>;
|
|
28
28
|
|
|
29
|
-
//
|
|
29
|
+
// Export the Search mode props mapping type
|
|
30
30
|
export type SearchModePropsMap = {
|
|
31
31
|
Default: SearchProps;
|
|
32
32
|
Card: React.ComponentProps<SearchFC["Card"]>;
|
|
@@ -37,8 +37,8 @@ export type SearchModePropsMap = {
|
|
|
37
37
|
};
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
* -
|
|
40
|
+
* Base Search component
|
|
41
|
+
* - Standard search form layout with adaptive column count and expand/collapse
|
|
42
42
|
*/
|
|
43
43
|
const Search: SearchFC = (props) => {
|
|
44
44
|
return <SearchBase {...props} />;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
height: 100%;
|
|
9
9
|
padding: 0px 11px;
|
|
10
10
|
|
|
11
|
-
// CF
|
|
11
|
+
// CF style: outlined input control that follows appearance switching
|
|
12
12
|
border: 1px solid var(--cf-border);
|
|
13
13
|
border-radius: 6px;
|
|
14
14
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
&.focused {
|
|
50
50
|
border-color: var(--primary-color);
|
|
51
51
|
|
|
52
|
-
box-shadow: 0 0 0 2px
|
|
52
|
+
box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color) 12%, transparent);
|
|
53
53
|
|
|
54
54
|
outline: 0;
|
|
55
55
|
}
|
|
@@ -76,20 +76,20 @@
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&:has(:global(.ant-select-status-error)) {
|
|
79
|
-
border: 1px solid
|
|
79
|
+
border: 1px solid var(--cf-error);
|
|
80
80
|
|
|
81
81
|
.prefix,
|
|
82
82
|
.suffix {
|
|
83
|
-
color:
|
|
83
|
+
color: var(--cf-error);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
&.legacyHasErrorStatus {
|
|
88
|
-
border: 1px solid
|
|
88
|
+
border: 1px solid var(--cf-error);
|
|
89
89
|
|
|
90
90
|
.prefix,
|
|
91
91
|
.suffix {
|
|
92
|
-
color:
|
|
92
|
+
color: var(--cf-error);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -84,7 +84,7 @@ const AutoCompleteSelect: React.FC<AutoCompleteSelectProps> = (props) => {
|
|
|
84
84
|
})
|
|
85
85
|
: autoCompleteWidth;
|
|
86
86
|
|
|
87
|
-
//
|
|
87
|
+
// Convert options into the format AutoComplete requires
|
|
88
88
|
const autoCompleteOptions = useMemo(() => {
|
|
89
89
|
return options?.map((option) => {
|
|
90
90
|
const { label, value, disabled, ...rest } = option;
|
|
@@ -97,16 +97,16 @@ const AutoCompleteSelect: React.FC<AutoCompleteSelectProps> = (props) => {
|
|
|
97
97
|
});
|
|
98
98
|
}, [options]);
|
|
99
99
|
|
|
100
|
-
//
|
|
100
|
+
// Handle filterOption
|
|
101
101
|
const handleFilterOption = useMemo(() => {
|
|
102
|
-
//
|
|
102
|
+
// If a custom filterOption is provided, use it first
|
|
103
103
|
if (customFilterOption) {
|
|
104
104
|
return (inputValue: string, option?: AutoCompleteOption) => {
|
|
105
105
|
return customFilterOption(inputValue, option);
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
//
|
|
109
|
+
// Default filtering logic: case-insensitive substring match
|
|
110
110
|
return (inputValue: string, option?: AutoCompleteOption): boolean => {
|
|
111
111
|
if (!isComposing && option) {
|
|
112
112
|
const searchText = inputValue.toUpperCase();
|