@ant-design/agentic-ui 2.29.19 → 2.29.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AILabel/index.js +2 -2
- package/dist/AILabel/style.js +1 -1
- package/dist/AgentRunBar/Robot.js +1 -1
- package/dist/AgentRunBar/index.js +2 -2
- package/dist/AgentRunBar/style.js +1 -1
- package/dist/AgenticLayout/index.js +2 -2
- package/dist/AgenticLayout/style.js +2 -2
- package/dist/AnswerAlert/components/ErrorIcon.js +1 -1
- package/dist/AnswerAlert/components/InfoIcon.js +1 -1
- package/dist/AnswerAlert/components/SuccessIcon.js +1 -1
- package/dist/AnswerAlert/components/WarningIcon.js +1 -1
- package/dist/AnswerAlert/index.js +1 -1
- package/dist/AnswerAlert/style.js +1 -1
- package/dist/BackTo/BackTop.js +1 -1
- package/dist/BackTo/ScrollVisibleButton.js +4 -4
- package/dist/BackTo/hooks/useScrollVisible.js +1 -1
- package/dist/BackTo/icons/BottomIcon.js +1 -1
- package/dist/BackTo/icons/TopIcon.js +1 -1
- package/dist/BackTo/style.js +1 -1
- package/dist/Bubble/AIBubble.js +5 -5
- package/dist/Bubble/Avatar/index.js +1 -1
- package/dist/Bubble/Avatar/isEmoji.js +1 -1
- package/dist/Bubble/Bubble.js +1 -1
- package/dist/Bubble/BubbleBeforeNode.js +3 -3
- package/dist/Bubble/FileView.js +6 -6
- package/dist/Bubble/List/PureBubbleList.js +3 -3
- package/dist/Bubble/List/index.js +3 -3
- package/dist/Bubble/List/style.js +1 -1
- package/dist/Bubble/MessagesContent/BubbleContext.js +2 -2
- package/dist/Bubble/MessagesContent/BubbleExtra.js +9 -11
- package/dist/Bubble/MessagesContent/CopyButton/index.js +2 -2
- package/dist/Bubble/MessagesContent/DocInfo.js +7 -7
- package/dist/Bubble/MessagesContent/EXCEPTION.js +1 -1
- package/dist/Bubble/MessagesContent/MarkdownPreview.js +1 -1
- package/dist/Bubble/MessagesContent/VoiceButton/index.js +8 -8
- package/dist/Bubble/MessagesContent/VoiceButton/style.js +1 -1
- package/dist/Bubble/MessagesContent/docInfoStyle.js +1 -1
- package/dist/Bubble/MessagesContent/icons.js +2 -2
- package/dist/Bubble/MessagesContent/index.js +10 -10
- package/dist/Bubble/MessagesContent/style.js +15 -8
- package/dist/Bubble/PureBubble.js +1 -1
- package/dist/Bubble/Title.js +4 -4
- package/dist/Bubble/UserBubble.js +4 -4
- package/dist/Bubble/schema-editor/SchemaEditorBridgeManager.js +3 -3
- package/dist/Bubble/schema-editor/useSchemaEditorBridge.js +1 -1
- package/dist/Bubble/style.js +1 -1
- package/dist/ChatBootPage/ButtonTab.js +1 -1
- package/dist/ChatBootPage/ButtonTabGroup.js +2 -2
- package/dist/ChatBootPage/ButtonTabGroupStyle.js +2 -2
- package/dist/ChatBootPage/ButtonTabStyle.js +2 -2
- package/dist/ChatBootPage/CaseReply.js +2 -2
- package/dist/ChatBootPage/CaseReplyStyle.js +2 -2
- package/dist/ChatBootPage/Title.js +1 -1
- package/dist/ChatBootPage/style.js +2 -2
- package/dist/ChatLayout/components/FooterBackground/index.js +1 -1
- package/dist/ChatLayout/index.js +1 -1
- package/dist/ChatLayout/style.js +1 -1
- package/dist/Components/ActionIconBox/index.js +12 -12
- package/dist/Components/ActionIconBox/style.js +1 -1
- package/dist/Components/ActionItemBox/ActionItemBox.js +1 -1
- package/dist/Components/ActionItemBox/style.js +1 -1
- package/dist/Components/Button/IconButton/index.js +1 -1
- package/dist/Components/Button/IconButton/style.js +1 -1
- package/dist/Components/Button/SwitchButton/index.js +3 -3
- package/dist/Components/Button/SwitchButton/style.js +1 -1
- package/dist/Components/Button/ToggleButton/index.js +1 -1
- package/dist/Components/Button/ToggleButton/style.js +1 -1
- package/dist/Components/GradientText/style.js +2 -2
- package/dist/Components/ImageList.js +2 -2
- package/dist/Components/LayoutHeader/index.js +4 -4
- package/dist/Components/LayoutHeader/style.js +2 -2
- package/dist/Components/Loading/CreativeRecommendationLoading.js +1 -1
- package/dist/Components/Loading/CreativeSparkLoading.js +1 -1
- package/dist/Components/Loading/Loading.js +1 -1
- package/dist/Components/Loading/style.js +1 -1
- package/dist/Components/Robot/index.js +1 -1
- package/dist/Components/Robot/lotties/BlowingWindLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/BouncingLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/DazingLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/PeekLottie/index.js +1 -1
- package/dist/Components/Robot/lotties/ThinkingLottie/index.js +1 -1
- package/dist/Components/SuggestionList/index.js +4 -4
- package/dist/Components/SuggestionList/style.js +1 -1
- package/dist/Components/TextAnimate/index.js +2 -2
- package/dist/Components/TextAnimate/style.js +2 -2
- package/dist/Components/TypingAnimation/index.js +1 -1
- package/dist/Components/TypingAnimation/style.js +2 -2
- package/dist/Components/VisualList/index.js +3 -3
- package/dist/Components/VisualList/style.js +1 -1
- package/dist/Components/effects/CreativeRecommendationEffect/index.js +1 -1
- package/dist/Components/effects/LoadingEffect/index.js +1 -1
- package/dist/Components/icons/LoadingSpinnerIcon.js +1 -1
- package/dist/Components/lotties/CreativeSparkLottie/index.js +1 -1
- package/dist/Components/lotties/DazingLottie/index.js +1 -1
- package/dist/Components/lotties/LoadingLottie/index.js +1 -1
- package/dist/Components/lotties/TextLoading/index.js +1 -1
- package/dist/Components/lotties/TextLoading/style.js +1 -1
- package/dist/Components/lotties/ThinkingLottie/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Abstract/style.js +1 -1
- package/dist/Components/lotties/bubble-actions/Copy/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Dislike/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Like/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/More/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Play/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Quote/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Refresh/index.js +1 -1
- package/dist/Components/lotties/bubble-actions/Share/index.js +1 -1
- package/dist/History/components/HistoryActionsBox.js +9 -9
- package/dist/History/components/HistoryEmpty.js +1 -1
- package/dist/History/components/HistoryEmptyIcon.js +1 -1
- package/dist/History/components/HistoryItem.js +4 -4
- package/dist/History/components/HistoryList.js +2 -2
- package/dist/History/components/LoadMoreComponent.js +2 -2
- package/dist/History/components/NewChatComponent.js +1 -1
- package/dist/History/components/NewChatComponent.style.js +2 -2
- package/dist/History/components/SearchComponent.js +6 -6
- package/dist/History/hooks/useHistory.js +1 -1
- package/dist/History/index.js +3 -3
- package/dist/History/menu.js +2 -2
- package/dist/History/style.js +1 -1
- package/dist/History/utils/index.js +2 -2
- package/dist/Hooks/useAutoScroll.js +3 -3
- package/dist/Hooks/useClickAway.js +2 -2
- package/dist/Hooks/useCopied.js +1 -1
- package/dist/Hooks/useElementSize.js +1 -1
- package/dist/Hooks/useIntersectionOnce.js +1 -1
- package/dist/Hooks/useRefFunction/index.js +1 -1
- package/dist/Hooks/useSpeechSynthesis.js +1 -1
- package/dist/Hooks/useStyle/index.js +2 -2
- package/dist/I18n/index.js +1 -1
- package/dist/Icons/animated/VoicePlayLottie/index.js +1 -1
- package/dist/Icons/animated/VoicingLottie/index.js +1 -1
- package/dist/MarkdownEditor/BaseMarkdownEditor.js +7 -7
- package/dist/MarkdownEditor/editor/Editor.js +18 -18
- package/dist/MarkdownEditor/editor/components/CommentList/index.js +6 -6
- package/dist/MarkdownEditor/editor/components/CommentList/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +2 -2
- package/dist/MarkdownEditor/editor/components/ContributorAvatar/style.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/LazyElement/style.js +2 -2
- package/dist/MarkdownEditor/editor/components/MediaErrorLink.js +2 -2
- package/dist/MarkdownEditor/editor/components/fntTag/index.js +1 -1
- package/dist/MarkdownEditor/editor/components/fntTag/style.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Blockquote/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Break/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Card/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Code/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Comment/index.js +3 -3
- package/dist/MarkdownEditor/editor/elements/CommentLeaf/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/FncLeaf/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/FootnoteDefinition/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/FootnoteReference/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Head/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Hr/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Image/index.js +17 -17
- package/dist/MarkdownEditor/editor/elements/InlineKatex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Katex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/LinkCard/ReadonlyLinkCard.js +2 -2
- package/dist/MarkdownEditor/editor/elements/LinkCard/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/List/List.js +2 -2
- package/dist/MarkdownEditor/editor/elements/List/ListItem.js +9 -9
- package/dist/MarkdownEditor/editor/elements/Media/ReadonlyMedia.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Media/index.js +15 -15
- package/dist/MarkdownEditor/editor/elements/Mermaid/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Paragraph/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Schema/index.js +4 -4
- package/dist/MarkdownEditor/editor/elements/Table/ReadonlyTableComponent.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/SimpleTable.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Table.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableContext.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +1 -1
- package/dist/MarkdownEditor/editor/elements/Table/Td/index.js +2 -2
- package/dist/MarkdownEditor/editor/elements/Table/index.js +5 -5
- package/dist/MarkdownEditor/editor/elements/Table/useScrollShadow.js +2 -2
- package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +18 -18
- package/dist/MarkdownEditor/editor/elements/index.js +9 -9
- package/dist/MarkdownEditor/editor/parser/parse/applyContextPropsAndConfig.js +2 -2
- package/dist/MarkdownEditor/editor/parser/parse/parseBlockElements.js +9 -9
- package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +5 -5
- package/dist/MarkdownEditor/editor/parser/parse/parseElements.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseEmptyLines.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseFootnote.js +1 -1
- package/dist/MarkdownEditor/editor/parser/parse/parseHtml.js +18 -18
- package/dist/MarkdownEditor/editor/parser/parse/parseMath.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseMedia.js +3 -3
- package/dist/MarkdownEditor/editor/parser/parse/parseTable.js +10 -10
- package/dist/MarkdownEditor/editor/parser/parse/parseText.js +5 -5
- package/dist/MarkdownEditor/editor/parser/parserMarkdownToSlateNode.js +24 -24
- package/dist/MarkdownEditor/editor/parser/parserMdToSchema.js +2 -2
- package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +41 -41
- package/dist/MarkdownEditor/editor/plugins/catchError.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/elements.js +21 -21
- package/dist/MarkdownEditor/editor/plugins/handlePaste.js +9 -9
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/arrow.js +4 -4
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/backspace.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/enter.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/match.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/hotKeyCommands/tab.js +4 -4
- package/dist/MarkdownEditor/editor/plugins/insertParsedHtmlNodes.js +44 -44
- package/dist/MarkdownEditor/editor/plugins/parseMarkdownToNodesAndInsert.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/useHighlight.js +5 -5
- package/dist/MarkdownEditor/editor/plugins/useKeyboard.js +5 -5
- package/dist/MarkdownEditor/editor/plugins/useOnchange.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/utils.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withCardPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withCodeTagPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withInlineNodes.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/withLinkAndMediaPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withListsPlugin.js +3 -3
- package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +1 -1
- package/dist/MarkdownEditor/editor/plugins/withSchemaPlugin.js +2 -2
- package/dist/MarkdownEditor/editor/plugins/withVoidNodes.js +1 -1
- package/dist/MarkdownEditor/editor/store.js +6 -6
- package/dist/MarkdownEditor/editor/style.js +2 -2
- package/dist/MarkdownEditor/editor/tools/DragHandle.js +2 -2
- package/dist/MarkdownEditor/editor/tools/InsertAutocomplete.js +22 -22
- package/dist/MarkdownEditor/editor/tools/InsertLink.js +7 -7
- package/dist/MarkdownEditor/editor/tools/Leading.js +8 -8
- package/dist/MarkdownEditor/editor/tools/ToolBar/BaseBar.js +6 -6
- package/dist/MarkdownEditor/editor/tools/ToolBar/FloatBar.js +5 -5
- package/dist/MarkdownEditor/editor/tools/ToolBar/ReadonlyBaseBar.js +7 -7
- package/dist/MarkdownEditor/editor/tools/ToolBar/ToolBar.js +2 -2
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/ColorPickerButton.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/FormattingTools.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/components/HeadingDropdown.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/config/toolsConfig.js +9 -9
- package/dist/MarkdownEditor/editor/tools/ToolBar/floatBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/ToolBar/hooks/useToolBarLogic.js +4 -4
- package/dist/MarkdownEditor/editor/tools/ToolBar/toolBarStyle.js +1 -1
- package/dist/MarkdownEditor/editor/tools/insertAutocompleteStyle.js +1 -1
- package/dist/MarkdownEditor/editor/utils/ace.js +3 -3
- package/dist/MarkdownEditor/editor/utils/docx/docxDeserializer.js +2 -2
- package/dist/MarkdownEditor/editor/utils/docx/module.js +9 -9
- package/dist/MarkdownEditor/editor/utils/docx/utils.js +5 -5
- package/dist/MarkdownEditor/editor/utils/dom.js +5 -5
- package/dist/MarkdownEditor/editor/utils/editorCommands.js +5 -5
- package/dist/MarkdownEditor/editor/utils/editorUtils.js +17 -17
- package/dist/MarkdownEditor/editor/utils/index.js +9 -9
- package/dist/MarkdownEditor/editor/utils/keyboard.js +4 -4
- package/dist/MarkdownEditor/editor/utils/markdownToHtml.js +6 -6
- package/dist/MarkdownEditor/editor/utils/media.js +2 -2
- package/dist/MarkdownEditor/editor/utils/path.js +3 -3
- package/dist/MarkdownEditor/editor/utils/performanceMonitor.js +2 -2
- package/dist/MarkdownEditor/editor/utils/useLocalState.js +1 -1
- package/dist/MarkdownEditor/hooks/editor.js +2 -2
- package/dist/MarkdownEditor/hooks/subscribe.js +1 -1
- package/dist/MarkdownEditor/index.js +1 -1
- package/dist/MarkdownEditor/style.js +1 -1
- package/dist/MarkdownEditor/utils/exportHtml.js +2 -2
- package/dist/MarkdownEditor/utils/native-table/native-table-editor.js +4 -4
- package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +8 -8
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +10 -10
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/index.js +10 -10
- package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/index.js +18 -18
- package/dist/MarkdownInputField/AttachmentButton/style.js +1 -1
- package/dist/MarkdownInputField/AttachmentButton/utils.js +8 -8
- package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +4 -4
- package/dist/MarkdownInputField/BorderBeamAnimation.js +1 -1
- package/dist/MarkdownInputField/Enlargement/index.js +1 -1
- package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +8 -8
- package/dist/MarkdownInputField/FileMapView/index.js +2 -2
- package/dist/MarkdownInputField/FileMapView/style.js +1 -1
- package/dist/MarkdownInputField/FilePaste/index.js +2 -2
- package/dist/MarkdownInputField/FileUploadManager/index.js +2 -2
- package/dist/MarkdownInputField/MarkdownInputField.js +10 -10
- package/dist/MarkdownInputField/QuickActions/index.js +5 -5
- package/dist/MarkdownInputField/RefinePromptButton/index.js +3 -3
- package/dist/MarkdownInputField/RefinePromptButton/style.js +1 -1
- package/dist/MarkdownInputField/SendActions/index.js +6 -6
- package/dist/MarkdownInputField/SendButton/index.js +3 -3
- package/dist/MarkdownInputField/SendButton/style.js +1 -1
- package/dist/MarkdownInputField/SkillModeBar/index.js +3 -3
- package/dist/MarkdownInputField/SkillModeBar/style.js +1 -1
- package/dist/MarkdownInputField/Suggestion/index.js +8 -8
- package/dist/MarkdownInputField/TopOperatingArea/index.js +2 -2
- package/dist/MarkdownInputField/TopOperatingArea/style.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/index.js +2 -2
- package/dist/MarkdownInputField/VoiceInput/style.js +1 -1
- package/dist/MarkdownInputField/VoiceInputManager/index.js +3 -3
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldActions.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldHandlers.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldLayout.js +2 -2
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldRefs.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldState.js +1 -1
- package/dist/MarkdownInputField/hooks/useMarkdownInputFieldStyles.js +1 -1
- package/dist/MarkdownInputField/style.js +2 -2
- package/dist/MarkdownInputField/utils/renderHelpers.js +5 -5
- package/dist/Plugins/chart/AreaChart/index.js +4 -4
- package/dist/Plugins/chart/AreaChart/style.js +1 -1
- package/dist/Plugins/chart/BarChart/index.js +11 -11
- package/dist/Plugins/chart/BarChart/style.js +1 -1
- package/dist/Plugins/chart/ChartAttrToolBar/ChartAttrToolBarStyle.js +1 -1
- package/dist/Plugins/chart/ChartAttrToolBar/index.js +3 -3
- package/dist/Plugins/chart/ChartMark/Area.js +2 -2
- package/dist/Plugins/chart/ChartMark/Bar.js +2 -2
- package/dist/Plugins/chart/ChartMark/Column.js +2 -2
- package/dist/Plugins/chart/ChartMark/Container.js +1 -1
- package/dist/Plugins/chart/ChartMark/Line.js +2 -2
- package/dist/Plugins/chart/ChartMark/Pie.js +2 -2
- package/dist/Plugins/chart/ChartRender.js +19 -19
- package/dist/Plugins/chart/ChartStatistic/index.js +3 -3
- package/dist/Plugins/chart/ChartStatistic/style.js +1 -1
- package/dist/Plugins/chart/ChartStatistic/utils.js +2 -2
- package/dist/Plugins/chart/DonutChart/Legend.js +3 -3
- package/dist/Plugins/chart/DonutChart/hooks.js +5 -5
- package/dist/Plugins/chart/DonutChart/index.js +11 -11
- package/dist/Plugins/chart/DonutChart/plugins.js +3 -3
- package/dist/Plugins/chart/DonutChart/style.js +1 -1
- package/dist/Plugins/chart/FunnelChart/index.js +14 -14
- package/dist/Plugins/chart/FunnelChart/style.js +1 -1
- package/dist/Plugins/chart/LineChart/index.js +3 -3
- package/dist/Plugins/chart/LineChart/style.js +1 -1
- package/dist/Plugins/chart/RadarChart/index.js +7 -7
- package/dist/Plugins/chart/RadarChart/style.js +1 -1
- package/dist/Plugins/chart/ScatterChart/index.js +7 -7
- package/dist/Plugins/chart/ScatterChart/style.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/ChartContainer.js +1 -1
- package/dist/Plugins/chart/components/ChartContainer/style.js +2 -2
- package/dist/Plugins/chart/components/ChartFilter/ChartFilter.js +6 -6
- package/dist/Plugins/chart/components/ChartFilter/style.js +1 -1
- package/dist/Plugins/chart/components/ChartToolBar/ChartToolBar.js +2 -2
- package/dist/Plugins/chart/components/ChartToolBar/style.js +1 -1
- package/dist/Plugins/chart/components/icons/TimeIcon.js +1 -1
- package/dist/Plugins/chart/components/index.js +1 -1
- package/dist/Plugins/chart/hooks/useChartDataFilter.js +1 -1
- package/dist/Plugins/chart/hooks/useChartStatistics.js +1 -1
- package/dist/Plugins/chart/hooks/useChartTheme.js +1 -1
- package/dist/Plugins/chart/hooks/useResponsiveSize.js +2 -2
- package/dist/Plugins/chart/index.js +8 -8
- package/dist/Plugins/chart/loadChartRuntime.js +1 -1
- package/dist/Plugins/chart/utils/registerChart.js +3 -3
- package/dist/Plugins/chart/utils.js +12 -12
- package/dist/Plugins/code/CodeUI/Katex/Katex.js +1 -1
- package/dist/Plugins/code/components/AceEditor.js +2 -2
- package/dist/Plugins/code/components/CodeContainer.js +3 -3
- package/dist/Plugins/code/components/CodeRenderer.js +2 -2
- package/dist/Plugins/code/components/CodeToolbar.js +5 -5
- package/dist/Plugins/code/components/LanguageSelector.js +7 -7
- package/dist/Plugins/code/components/LoadImage.js +3 -3
- package/dist/Plugins/code/components/ThinkBlock.js +2 -2
- package/dist/Plugins/code/index.js +1 -1
- package/dist/Plugins/code/langIcons/AbapIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ActionscriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AdaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApacheIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApexIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AplIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ApplescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AstroIcon.js +1 -1
- package/dist/Plugins/code/langIcons/AwkIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BallerinaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BatIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BicepIcon.js +1 -1
- package/dist/Plugins/code/langIcons/BladeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CadenceIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ClojureIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CmakeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CobolIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CodeqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CoffeeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ConsoleIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CppIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CrystalIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CsharpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/CssIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DartIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DatabaseIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DiffIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DockerIcon.js +1 -1
- package/dist/Plugins/code/langIcons/DotenvIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ElixirIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ElmIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ErbIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ErlangIcon.js +1 -1
- package/dist/Plugins/code/langIcons/FsharpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GdscriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GlslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GnuplotIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GraphqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/GroovyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HackIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HandlebarsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HaskellIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HclIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HclLightIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HjsonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HlslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HtmlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/HttpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ImbaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/IniIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JavaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JavascriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JinjaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/Json5Icon.js +1 -1
- package/dist/Plugins/code/langIcons/JsonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JsonnetIcon.js +1 -1
- package/dist/Plugins/code/langIcons/JuliaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/KotlinIcon.js +1 -1
- package/dist/Plugins/code/langIcons/KustoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LessIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LiquidIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LispIcon.js +1 -1
- package/dist/Plugins/code/langIcons/LuaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MakefileIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MarkdownIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MarkojsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MatlabIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MdxIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MermaidIcon.js +1 -1
- package/dist/Plugins/code/langIcons/MojoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NginxIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NimIcon.js +1 -1
- package/dist/Plugins/code/langIcons/NixIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ObjectiveCIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ObjectiveCppIcon.js +1 -1
- package/dist/Plugins/code/langIcons/OcamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PascalIcon.js +1 -1
- package/dist/Plugins/code/langIcons/Perl6Icon.js +1 -1
- package/dist/Plugins/code/langIcons/PerlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PhpIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PostcssIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PowershellIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PrismaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PrologIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ProtoIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PugIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PuppetIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PurescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/PythonIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RazorIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ReactIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ReactTsIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RubyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/RustIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SasIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SassIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ScalaIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SchemeIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ShaderlabIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SolidityIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SparqlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/StataIcon.js +1 -1
- package/dist/Plugins/code/langIcons/StylusIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SvelteIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SwiftIcon.js +1 -1
- package/dist/Plugins/code/langIcons/SystemverilogIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TclIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TexIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TomlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TwigIcon.js +1 -1
- package/dist/Plugins/code/langIcons/TypescriptIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VerilogIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VhdlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VimIcon.js +1 -1
- package/dist/Plugins/code/langIcons/VueIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WebassemblyIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WenyanIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WgslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/WolframlanguageIcon.js +1 -1
- package/dist/Plugins/code/langIcons/XmlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/XslIcon.js +1 -1
- package/dist/Plugins/code/langIcons/YamlIcon.js +1 -1
- package/dist/Plugins/code/langIcons/ZigIcon.js +1 -1
- package/dist/Plugins/code/loadAceEditor.js +3 -3
- package/dist/Plugins/katex/InlineKatex.js +2 -2
- package/dist/Plugins/katex/Katex.js +1 -1
- package/dist/Plugins/katex/index.js +2 -2
- package/dist/Plugins/katex/loadKatex.js +2 -2
- package/dist/Plugins/mermaid/Mermaid.js +1 -1
- package/dist/Plugins/mermaid/MermaidFallback.js +1 -1
- package/dist/Plugins/mermaid/MermaidRendererImpl.js +1 -1
- package/dist/Plugins/mermaid/index.js +5 -5
- package/dist/Plugins/mermaid/style.js +1 -1
- package/dist/Plugins/mermaid/useMermaidRender.js +1 -1
- package/dist/Plugins/mermaid/utils.js +3 -3
- package/dist/Quote/index.js +2 -2
- package/dist/Quote/style.js +1 -1
- package/dist/Schema/SchemaEditor/AceEditorWrapper.js +1 -1
- package/dist/Schema/SchemaEditor/index.js +6 -6
- package/dist/Schema/SchemaEditor/style.js +1 -1
- package/dist/Schema/SchemaForm/index.js +4 -4
- package/dist/Schema/SchemaRenderer/index.js +8 -8
- package/dist/TaskList/index.js +4 -4
- package/dist/TaskList/style.js +1 -1
- package/dist/ThoughtChainList/CostMillis.js +2 -2
- package/dist/ThoughtChainList/DeepThink.js +1 -1
- package/dist/ThoughtChainList/DotAni/index.js +1 -1
- package/dist/ThoughtChainList/DotAni/style.js +1 -1
- package/dist/ThoughtChainList/MarkdownEditor.js +2 -2
- package/dist/ThoughtChainList/RagRetrievalInfo.js +2 -2
- package/dist/ThoughtChainList/TableSql.js +8 -8
- package/dist/ThoughtChainList/TitleInfo.js +3 -3
- package/dist/ThoughtChainList/ToolCall.js +7 -7
- package/dist/ThoughtChainList/WebSearch.js +1 -1
- package/dist/ThoughtChainList/style.js +1 -1
- package/dist/ToolUseBar/BarItem/Content.js +5 -5
- package/dist/ToolUseBar/BarItem/index.js +1 -1
- package/dist/ToolUseBar/index.js +1 -1
- package/dist/ToolUseBar/style.js +1 -1
- package/dist/ToolUseBarThink/index.js +10 -10
- package/dist/ToolUseBarThink/style.js +1 -1
- package/dist/Types/message.d.ts +1 -0
- package/dist/Utils/debugUtils.js +1 -1
- package/dist/Utils/formatTime.js +1 -1
- package/dist/Utils/getScroll.js +2 -2
- package/dist/Utils/loadCSS.js +2 -2
- package/dist/Utils/proxySandbox/ProxySandbox.js +37 -37
- package/dist/Utils/proxySandbox/SecurityContextManager.js +6 -6
- package/dist/Utils/scrollTo.js +1 -1
- package/dist/Utils/throttleByAnimationFrame.js +2 -2
- package/dist/WelcomeMessage/index.js +1 -1
- package/dist/WelcomeMessage/style.js +1 -1
- package/dist/Workspace/Browser/index.js +13 -13
- package/dist/Workspace/Browser/style.js +1 -1
- package/dist/Workspace/File/FileComponent.js +38 -38
- package/dist/Workspace/File/FileTypeProcessor.js +8 -8
- package/dist/Workspace/File/PreviewComponent.js +14 -14
- package/dist/Workspace/File/style.js +1 -1
- package/dist/Workspace/File/utils.js +3 -3
- package/dist/Workspace/HtmlPreview/index.js +5 -5
- package/dist/Workspace/HtmlPreview/style.js +1 -1
- package/dist/Workspace/RealtimeFollow/index.js +18 -18
- package/dist/Workspace/RealtimeFollow/style.js +1 -1
- package/dist/Workspace/Task/index.js +3 -3
- package/dist/Workspace/Task/style.js +1 -1
- package/dist/Workspace/index.js +9 -9
- package/dist/Workspace/style.js +1 -1
- package/dist/Workspace/types.js +3 -3
- package/dist/Workspace/utils/codeLanguageUtils.js +3 -3
- package/dist/Workspace/utils.js +2 -2
- package/package.json +4 -3
|
@@ -135,7 +135,7 @@ import { useStyle } from "./style";
|
|
|
135
135
|
// 正负柱状图颜色(与需求给定的 rgba 保持一致)
|
|
136
136
|
var POSITIVE_COLOR_HEX = '#388BFF'; // rgba(56, 139, 255, 1)
|
|
137
137
|
var NEGATIVE_COLOR_HEX = '#F78826'; // rgba(247, 136, 38, 1)
|
|
138
|
-
var BarChart = function(param) {
|
|
138
|
+
var BarChart = function BarChart(param) {
|
|
139
139
|
var title = param.title, data = param.data, _param_width = param.width, width = _param_width === void 0 ? 600 : _param_width, _param_height = param.height, height = _param_height === void 0 ? 400 : _param_height, className = param.className, classNames = param.classNames, style = param.style, styles = param.styles, dataTime = param.dataTime, _param_theme = param.theme, theme = _param_theme === void 0 ? 'light' : _param_theme, color = param.color, _param_showLegend = param.showLegend, showLegend = _param_showLegend === void 0 ? true : _param_showLegend, _param_legendPosition = param.legendPosition, legendPosition = _param_legendPosition === void 0 ? 'bottom' : _param_legendPosition, _param_legendAlign = param.legendAlign, legendAlign = _param_legendAlign === void 0 ? 'start' : _param_legendAlign, _param_showGrid = param.showGrid, showGrid = _param_showGrid === void 0 ? true : _param_showGrid, _param_xPosition = param.xPosition, xPosition = _param_xPosition === void 0 ? 'bottom' : _param_xPosition, _param_yPosition = param.yPosition, yPosition = _param_yPosition === void 0 ? 'left' : _param_yPosition, _param_hiddenX = param.hiddenX, hiddenX = _param_hiddenX === void 0 ? false : _param_hiddenX, _param_hiddenY = param.hiddenY, hiddenY = _param_hiddenY === void 0 ? false : _param_hiddenY, _param_stacked = param.stacked, stacked = _param_stacked === void 0 ? false : _param_stacked, _param_indexAxis = param.indexAxis, indexAxis = _param_indexAxis === void 0 ? 'x' : _param_indexAxis, maxBarThickness = param.maxBarThickness, toolbarExtra = param.toolbarExtra, _param_renderFilterInToolbar = param.renderFilterInToolbar, renderFilterInToolbar = _param_renderFilterInToolbar === void 0 ? false : _param_renderFilterInToolbar, statisticConfig = param.statistic, variant = param.variant, _param_showDataLabels = param.showDataLabels, showDataLabels = _param_showDataLabels === void 0 ? false : _param_showDataLabels, dataLabelFormatter = param.dataLabelFormatter, chartOptions = param.chartOptions, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading;
|
|
140
140
|
useMemo(function() {
|
|
141
141
|
if (barChartComponentsRegistered) {
|
|
@@ -156,7 +156,7 @@ var BarChart = function(param) {
|
|
|
156
156
|
var responsiveHeight = isMobile ? Math.min(windowWidth * 0.8, 400) : height;
|
|
157
157
|
// 监听窗口大小变化
|
|
158
158
|
useEffect(function() {
|
|
159
|
-
var handleResize = function() {
|
|
159
|
+
var handleResize = function handleResize() {
|
|
160
160
|
setWindowWidth(window.innerWidth);
|
|
161
161
|
};
|
|
162
162
|
if (typeof window !== 'undefined') {
|
|
@@ -301,7 +301,7 @@ var BarChart = function(param) {
|
|
|
301
301
|
});
|
|
302
302
|
var datasets = types.map(function(type, index) {
|
|
303
303
|
var provided = color;
|
|
304
|
-
var pickByIndex = function(i) {
|
|
304
|
+
var pickByIndex = function pickByIndex(i) {
|
|
305
305
|
return Array.isArray(provided) ? provided[i] || provided[0] || defaultColorList[i % defaultColorList.length] : provided || defaultColorList[i % defaultColorList.length];
|
|
306
306
|
};
|
|
307
307
|
var baseColor = pickByIndex(index);
|
|
@@ -322,7 +322,7 @@ var BarChart = function(param) {
|
|
|
322
322
|
return _object_spread_props(_object_spread({
|
|
323
323
|
label: type || '默认',
|
|
324
324
|
data: typeData,
|
|
325
|
-
borderColor: function(ctx) {
|
|
325
|
+
borderColor: function borderColor(ctx) {
|
|
326
326
|
var parsed = ctx.parsed;
|
|
327
327
|
var value = indexAxis === 'y' ? typeof (parsed === null || parsed === void 0 ? void 0 : parsed.x) === 'number' ? parsed.x : 0 : typeof (parsed === null || parsed === void 0 ? void 0 : parsed.y) === 'number' ? parsed.y : 0;
|
|
328
328
|
var base = resolvedBaseColor;
|
|
@@ -335,7 +335,7 @@ var BarChart = function(param) {
|
|
|
335
335
|
}
|
|
336
336
|
return hexToRgba(base, 0.95);
|
|
337
337
|
},
|
|
338
|
-
backgroundColor: function(ctx) {
|
|
338
|
+
backgroundColor: function backgroundColor(ctx) {
|
|
339
339
|
var chart = ctx.chart;
|
|
340
340
|
var chartArea = chart.chartArea;
|
|
341
341
|
var parsed = ctx.parsed;
|
|
@@ -408,7 +408,7 @@ var BarChart = function(param) {
|
|
|
408
408
|
maxBarThickness: maxBarThickness
|
|
409
409
|
}), {
|
|
410
410
|
stack: stacked ? 'stack' : undefined,
|
|
411
|
-
borderRadius: function(ctx) {
|
|
411
|
+
borderRadius: function borderRadius(ctx) {
|
|
412
412
|
var rawValue = ctx === null || ctx === void 0 ? void 0 : ctx.raw;
|
|
413
413
|
var value = typeof rawValue === 'number' ? rawValue : Number(rawValue !== null && rawValue !== void 0 ? rawValue : 0);
|
|
414
414
|
var isHorizontal = indexAxis === 'y';
|
|
@@ -515,7 +515,7 @@ var BarChart = function(param) {
|
|
|
515
515
|
var axisTextColor = isLight ? 'rgba(0, 25, 61, 0.3255)' : 'rgba(255, 255, 255, 0.8)';
|
|
516
516
|
var gridColor = isLight ? 'rgba(0,0,0,0.08)' : 'rgba(255,255,255,0.2)';
|
|
517
517
|
// 标签宽度计算函数
|
|
518
|
-
var calculateLabelWidth = function(text) {
|
|
518
|
+
var calculateLabelWidth = function calculateLabelWidth(text) {
|
|
519
519
|
var fontSize = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 11;
|
|
520
520
|
// 创建临时canvas来测量文本宽度
|
|
521
521
|
try {
|
|
@@ -596,7 +596,7 @@ var BarChart = function(param) {
|
|
|
596
596
|
indexAxis
|
|
597
597
|
]);
|
|
598
598
|
// 深度合并函数
|
|
599
|
-
var deepMerge = function(target, source) {
|
|
599
|
+
var deepMerge = function deepMerge1(target, source) {
|
|
600
600
|
if (!source || (typeof source === "undefined" ? "undefined" : _type_of(source)) !== 'object') return source;
|
|
601
601
|
if (!target || (typeof target === "undefined" ? "undefined" : _type_of(target)) !== 'object') return source;
|
|
602
602
|
var result = _object_spread({}, target);
|
|
@@ -653,7 +653,7 @@ var BarChart = function(param) {
|
|
|
653
653
|
}
|
|
654
654
|
}, ChartDataLabels && {
|
|
655
655
|
datalabels: {
|
|
656
|
-
display: function(context) {
|
|
656
|
+
display: function display(context) {
|
|
657
657
|
if (!showDataLabels) return false;
|
|
658
658
|
// 堆叠图:只在可见数据集中最后一个显示标签(显示累计总和)
|
|
659
659
|
if (stacked) {
|
|
@@ -696,7 +696,7 @@ var BarChart = function(param) {
|
|
|
696
696
|
size: isMobile ? 10 : 11,
|
|
697
697
|
weight: 'normal'
|
|
698
698
|
},
|
|
699
|
-
formatter: function(value, context) {
|
|
699
|
+
formatter: function formatter(value, context) {
|
|
700
700
|
var _context_chart_data_labels;
|
|
701
701
|
if (value === null || value === undefined) return '';
|
|
702
702
|
var dataIndex = context.dataIndex;
|
|
@@ -826,7 +826,7 @@ var BarChart = function(param) {
|
|
|
826
826
|
};
|
|
827
827
|
// 合并外部传入的选项与默认选项
|
|
828
828
|
var options = chartOptions ? deepMerge(defaultOptions, chartOptions) : defaultOptions;
|
|
829
|
-
var handleDownload = function() {
|
|
829
|
+
var handleDownload = function handleDownload() {
|
|
830
830
|
downloadChart(chartRef.current, 'bar-chart');
|
|
831
831
|
};
|
|
832
832
|
var rootClassName = classNamesLib(classNames === null || classNames === void 0 ? void 0 : classNames.root, className);
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { useEditorStyleRegister } from "../../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
return _define_property({}, token.componentCls, {
|
|
56
56
|
// 统计数据容器样式
|
|
57
57
|
'&-statistic-container': {
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { useEditorStyleRegister } from "../../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
return _define_property({}, token.componentCls, {
|
|
56
56
|
display: 'flex',
|
|
57
57
|
justifyContent: 'flex-end',
|
|
@@ -49,7 +49,7 @@ import { useStyle } from "./ChartAttrToolBarStyle";
|
|
|
49
49
|
* - 阻止事件冒泡
|
|
50
50
|
* - 使用 Tooltip 提供提示
|
|
51
51
|
* - 响应式布局设计
|
|
52
|
-
*/ export var ChartAttrToolBar = function(props) {
|
|
52
|
+
*/ export var ChartAttrToolBar = function ChartAttrToolBar(props) {
|
|
53
53
|
var _props_options, _i18n_locale;
|
|
54
54
|
var _useEditorStore = useEditorStore(), markdownEditorRef = _useEditorStore.markdownEditorRef, readonly = _useEditorStore.readonly;
|
|
55
55
|
var i18n = useContext(I18nContext);
|
|
@@ -78,7 +78,7 @@ import { useStyle } from "./ChartAttrToolBarStyle";
|
|
|
78
78
|
},
|
|
79
79
|
contentEditable: false,
|
|
80
80
|
"data-testid": "chart-attr-toolbar",
|
|
81
|
-
onClick: function(e) {
|
|
81
|
+
onClick: function onClick(e) {
|
|
82
82
|
e.stopPropagation();
|
|
83
83
|
}
|
|
84
84
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
@@ -86,7 +86,7 @@ import { useStyle } from "./ChartAttrToolBarStyle";
|
|
|
86
86
|
flex: 1,
|
|
87
87
|
fontWeight: 'bold'
|
|
88
88
|
},
|
|
89
|
-
onClick: function(e) {
|
|
89
|
+
onClick: function onClick(e) {
|
|
90
90
|
e.stopPropagation();
|
|
91
91
|
}
|
|
92
92
|
}, props.title), props === null || props === void 0 ? void 0 : (_props_options = props.options) === null || _props_options === void 0 ? void 0 : _props_options.map(function(item, index) {
|
|
@@ -28,7 +28,7 @@ import React, { useImperativeHandle, useRef } from "react";
|
|
|
28
28
|
import { Line } from "react-chartjs-2";
|
|
29
29
|
import { Container } from "./Container";
|
|
30
30
|
var chartMarkAreaRegistered = false;
|
|
31
|
-
export var Area = function(props) {
|
|
31
|
+
export var Area = function Area(props) {
|
|
32
32
|
React.useMemo(function() {
|
|
33
33
|
if (chartMarkAreaRegistered) {
|
|
34
34
|
return undefined;
|
|
@@ -49,7 +49,7 @@ export var Area = function(props) {
|
|
|
49
49
|
chartRef.current
|
|
50
50
|
]);
|
|
51
51
|
// 处理数据格式
|
|
52
|
-
var processData = function() {
|
|
52
|
+
var processData = function processData() {
|
|
53
53
|
if (!props.data || props.data.length === 0) {
|
|
54
54
|
return {
|
|
55
55
|
labels: [],
|
|
@@ -29,7 +29,7 @@ import { Bar as ChartBar } from "react-chartjs-2";
|
|
|
29
29
|
import { stringFormatNumber } from "../utils";
|
|
30
30
|
import { Container } from "./Container";
|
|
31
31
|
var chartMarkBarRegistered = false;
|
|
32
|
-
export var Bar = function(props) {
|
|
32
|
+
export var Bar = function Bar(props) {
|
|
33
33
|
React.useMemo(function() {
|
|
34
34
|
if (chartMarkBarRegistered) {
|
|
35
35
|
return undefined;
|
|
@@ -50,7 +50,7 @@ export var Bar = function(props) {
|
|
|
50
50
|
chartRef.current
|
|
51
51
|
]);
|
|
52
52
|
// 处理数据格式
|
|
53
|
-
var processData = function() {
|
|
53
|
+
var processData = function processData() {
|
|
54
54
|
if (!props.data || props.data.length === 0) {
|
|
55
55
|
return {
|
|
56
56
|
labels: [],
|
|
@@ -29,7 +29,7 @@ import { Bar as ChartBar } from "react-chartjs-2";
|
|
|
29
29
|
import { stringFormatNumber } from "../utils";
|
|
30
30
|
import { Container } from "./Container";
|
|
31
31
|
var chartMarkColumnRegistered = false;
|
|
32
|
-
export var Column = function(props) {
|
|
32
|
+
export var Column = function Column(props) {
|
|
33
33
|
React.useMemo(function() {
|
|
34
34
|
if (chartMarkColumnRegistered) {
|
|
35
35
|
return undefined;
|
|
@@ -50,7 +50,7 @@ export var Column = function(props) {
|
|
|
50
50
|
chartRef.current
|
|
51
51
|
]);
|
|
52
52
|
// 处理数据格式
|
|
53
|
-
var processData = function() {
|
|
53
|
+
var processData = function processData() {
|
|
54
54
|
if (!props.data || props.data.length === 0) {
|
|
55
55
|
return {
|
|
56
56
|
labels: [],
|
|
@@ -47,7 +47,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
47
47
|
import ResizeObserver from "rc-resize-observer";
|
|
48
48
|
import React, { useEffect, useRef, useState } from "react";
|
|
49
49
|
import { debounce } from "../utils";
|
|
50
|
-
export var Container = function(props) {
|
|
50
|
+
export var Container = function Container(props) {
|
|
51
51
|
var _htmlRef_current;
|
|
52
52
|
var chartRef = props.chartRef, htmlRef = props.htmlRef, children = props.children;
|
|
53
53
|
var sizeRef = useRef({
|
|
@@ -29,7 +29,7 @@ import { Line as ChartLine } from "react-chartjs-2";
|
|
|
29
29
|
import { stringFormatNumber } from "../utils";
|
|
30
30
|
import { Container } from "./Container";
|
|
31
31
|
var chartMarkLineRegistered = false;
|
|
32
|
-
export var Line = function(props) {
|
|
32
|
+
export var Line = function Line(props) {
|
|
33
33
|
React.useMemo(function() {
|
|
34
34
|
if (chartMarkLineRegistered) {
|
|
35
35
|
return undefined;
|
|
@@ -50,7 +50,7 @@ export var Line = function(props) {
|
|
|
50
50
|
chartRef.current
|
|
51
51
|
]);
|
|
52
52
|
// 处理数据格式
|
|
53
|
-
var processData = function() {
|
|
53
|
+
var processData = function processData() {
|
|
54
54
|
if (!props.data || props.data.length === 0) {
|
|
55
55
|
return {
|
|
56
56
|
labels: [],
|
|
@@ -4,7 +4,7 @@ import { Doughnut } from "react-chartjs-2";
|
|
|
4
4
|
import { defaultColorList } from "../const";
|
|
5
5
|
import { Container } from "./Container";
|
|
6
6
|
var chartMarkPieRegistered = false;
|
|
7
|
-
export var Pie = function(props) {
|
|
7
|
+
export var Pie = function Pie(props) {
|
|
8
8
|
React.useMemo(function() {
|
|
9
9
|
if (chartMarkPieRegistered) {
|
|
10
10
|
return undefined;
|
|
@@ -25,7 +25,7 @@ export var Pie = function(props) {
|
|
|
25
25
|
chartRef.current
|
|
26
26
|
]);
|
|
27
27
|
// 处理数据格式
|
|
28
|
-
var processData = function() {
|
|
28
|
+
var processData = function processData() {
|
|
29
29
|
if (!props.data || props.data.length === 0) {
|
|
30
30
|
return {
|
|
31
31
|
labels: [],
|
|
@@ -259,7 +259,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
259
259
|
* ```
|
|
260
260
|
*
|
|
261
261
|
* @since 1.0.0
|
|
262
|
-
*/ var getChartMap = function(i18n) {
|
|
262
|
+
*/ var getChartMap = function getChartMap(i18n) {
|
|
263
263
|
var _i18n_locale, _i18n_locale1, _i18n_locale2, _i18n_locale3, _i18n_locale4, _i18n_locale5, _i18n_locale6, _i18n_locale7, _i18n_locale8, _i18n_locale9, _i18n_locale10;
|
|
264
264
|
return {
|
|
265
265
|
pie: {
|
|
@@ -343,7 +343,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
343
343
|
/**
|
|
344
344
|
* 图表运行时渲染器组件实现
|
|
345
345
|
* 负责使用已加载的 runtime 渲染图表
|
|
346
|
-
*/ var ChartRuntimeRendererImpl = function(param) {
|
|
346
|
+
*/ var ChartRuntimeRendererImpl = function ChartRuntimeRendererImpl(param) {
|
|
347
347
|
var chartType = param.chartType, runtime = param.runtime, convertDonutData = param.convertDonutData, convertFlatData = param.convertFlatData, config = param.config, title = param.title, dataTime = param.dataTime, toolBar = param.toolBar, filterBy = param.filterBy, groupBy = param.groupBy, colorLegend = param.colorLegend, chartData = param.chartData, getFieldValue = param.getFieldValue, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading;
|
|
348
348
|
var DonutChart = runtime.DonutChart, FunnelChart = runtime.FunnelChart, AreaChart = runtime.AreaChart, BarChart = runtime.BarChart, LineChart = runtime.LineChart, RadarChart = runtime.RadarChart, ScatterChart = runtime.ScatterChart;
|
|
349
349
|
if (chartType === 'pie') {
|
|
@@ -559,7 +559,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
559
559
|
return [
|
|
560
560
|
2,
|
|
561
561
|
{
|
|
562
|
-
default: function(props) {
|
|
562
|
+
default: function _default(props) {
|
|
563
563
|
return /*#__PURE__*/ React.createElement(ChartRuntimeRendererImpl, _object_spread_props(_object_spread({}, props), {
|
|
564
564
|
runtime: runtime
|
|
565
565
|
}));
|
|
@@ -572,7 +572,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
572
572
|
});
|
|
573
573
|
/**
|
|
574
574
|
* 加载中的占位组件
|
|
575
|
-
*/ var ChartRuntimeFallback = function(param) {
|
|
575
|
+
*/ var ChartRuntimeFallback = function ChartRuntimeFallback(param) {
|
|
576
576
|
var _param_height = param.height, height = _param_height === void 0 ? 240 : _param_height;
|
|
577
577
|
return /*#__PURE__*/ React.createElement("div", {
|
|
578
578
|
style: {
|
|
@@ -644,7 +644,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
644
644
|
* - 集成国际化支持
|
|
645
645
|
* - 提供图表属性工具栏
|
|
646
646
|
* - 使用 React.lazy 和 Suspense 实现代码分割
|
|
647
|
-
*/ export var ChartRender = function(props) {
|
|
647
|
+
*/ export var ChartRender = function ChartRender(props) {
|
|
648
648
|
var // 对于 rest 对象,使用浅比较
|
|
649
649
|
_config_rest, _config_rest1, _config_rest2, _config_rest3, _config_rest4, _config_rest5;
|
|
650
650
|
var _useState = _sliced_to_array(useState(function() {
|
|
@@ -690,7 +690,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
690
690
|
}, [
|
|
691
691
|
i18n
|
|
692
692
|
]);
|
|
693
|
-
var getAxisTitles = function() {
|
|
693
|
+
var getAxisTitles = function getAxisTitles() {
|
|
694
694
|
var _config_columns_find, _config_columns, _config_columns_find1, _config_columns1;
|
|
695
695
|
var xCol = config === null || config === void 0 ? void 0 : (_config_columns = config.columns) === null || _config_columns === void 0 ? void 0 : (_config_columns_find = _config_columns.find) === null || _config_columns_find === void 0 ? void 0 : _config_columns_find.call(_config_columns, function(c) {
|
|
696
696
|
return (c === null || c === void 0 ? void 0 : c.dataIndex) === (config === null || config === void 0 ? void 0 : config.x);
|
|
@@ -703,7 +703,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
703
703
|
yTitle: (yCol === null || yCol === void 0 ? void 0 : yCol.title) || String((config === null || config === void 0 ? void 0 : config.y) || '')
|
|
704
704
|
};
|
|
705
705
|
};
|
|
706
|
-
var buildXIndexer = function() {
|
|
706
|
+
var buildXIndexer = function buildXIndexer() {
|
|
707
707
|
var map = new Map();
|
|
708
708
|
var idx = 1;
|
|
709
709
|
(chartData || []).forEach(function(row) {
|
|
@@ -717,7 +717,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
717
717
|
/**
|
|
718
718
|
* 规范化字段名,统一处理转义字符
|
|
719
719
|
* 将 `index\_value` 转换为 `index_value`,确保字段名一致
|
|
720
|
-
*/ var normalizeFieldName = function(fieldName) {
|
|
720
|
+
*/ var normalizeFieldName = function normalizeFieldName(fieldName) {
|
|
721
721
|
if (!fieldName) return fieldName;
|
|
722
722
|
// 移除转义字符:将 `\_` 转换为 `_`,`\\` 转换为 `\`
|
|
723
723
|
return fieldName.replace(/\\_/g, '_').replace(/\\\\/g, '\\').replace(/\\(?=")/g, '') // 移除转义的双引号
|
|
@@ -725,7 +725,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
725
725
|
};
|
|
726
726
|
/**
|
|
727
727
|
* 安全地获取字段值,如果字段名不匹配,也尝试规范化后的字段名
|
|
728
|
-
*/ var getFieldValueSafely = function(row, field) {
|
|
728
|
+
*/ var getFieldValueSafely = function getFieldValueSafely(row, field) {
|
|
729
729
|
if (!field) return undefined;
|
|
730
730
|
// 先尝试直接访问
|
|
731
731
|
if (row[field] !== undefined) {
|
|
@@ -743,7 +743,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
743
743
|
}
|
|
744
744
|
return undefined;
|
|
745
745
|
};
|
|
746
|
-
var getFieldValue = function(row, field) {
|
|
746
|
+
var getFieldValue = function getFieldValue(row, field) {
|
|
747
747
|
var value = getFieldValueSafely(row, field);
|
|
748
748
|
if (field && isNotEmpty(value)) {
|
|
749
749
|
return String(value);
|
|
@@ -868,13 +868,13 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
868
868
|
return {
|
|
869
869
|
key: key,
|
|
870
870
|
label: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale = i18n.locale) === null || _i18n_locale === void 0 ? void 0 : _i18n_locale[key + 'eChart']) || ((_ChartMap_key = ChartMap[key]) === null || _ChartMap_key === void 0 ? void 0 : _ChartMap_key.title),
|
|
871
|
-
onClick: function() {
|
|
871
|
+
onClick: function onClick() {
|
|
872
872
|
setChartType(key);
|
|
873
873
|
}
|
|
874
874
|
};
|
|
875
875
|
})) || []
|
|
876
876
|
},
|
|
877
|
-
getPopupContainer: function() {
|
|
877
|
+
getPopupContainer: function getPopupContainer() {
|
|
878
878
|
return document.body;
|
|
879
879
|
}
|
|
880
880
|
}, /*#__PURE__*/ React.createElement("span", {
|
|
@@ -899,13 +899,13 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
899
899
|
return {
|
|
900
900
|
key: i + 1,
|
|
901
901
|
label: i + 1,
|
|
902
|
-
onClick: function() {
|
|
902
|
+
onClick: function onClick() {
|
|
903
903
|
onColumnLengthChange === null || onColumnLengthChange === void 0 ? void 0 : onColumnLengthChange(i + 1);
|
|
904
904
|
}
|
|
905
905
|
};
|
|
906
906
|
})
|
|
907
907
|
},
|
|
908
|
-
getPopupContainer: function() {
|
|
908
|
+
getPopupContainer: function getPopupContainer() {
|
|
909
909
|
return document.body;
|
|
910
910
|
}
|
|
911
911
|
}, /*#__PURE__*/ React.createElement("span", {
|
|
@@ -933,7 +933,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
933
933
|
key: "config",
|
|
934
934
|
title: (i18n === null || i18n === void 0 ? void 0 : (_i18n_locale1 = i18n.locale) === null || _i18n_locale1 === void 0 ? void 0 : _i18n_locale1.configChart) || '配置图表',
|
|
935
935
|
trigger: 'click',
|
|
936
|
-
getPopupContainer: function() {
|
|
936
|
+
getPopupContainer: function getPopupContainer() {
|
|
937
937
|
return document.body;
|
|
938
938
|
},
|
|
939
939
|
content: /*#__PURE__*/ React.createElement(ConfigProvider, {
|
|
@@ -948,7 +948,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
948
948
|
width: 300
|
|
949
949
|
},
|
|
950
950
|
initialValues: config,
|
|
951
|
-
onFinish: function(values) {
|
|
951
|
+
onFinish: function onFinish(values) {
|
|
952
952
|
setConfig(_object_spread({}, props.config, values));
|
|
953
953
|
setRenderKey(function(k) {
|
|
954
954
|
return k + 1;
|
|
@@ -968,7 +968,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
968
968
|
label: "X",
|
|
969
969
|
name: "x",
|
|
970
970
|
fieldProps: {
|
|
971
|
-
onClick: function(e) {
|
|
971
|
+
onClick: function onClick(e) {
|
|
972
972
|
e.stopPropagation();
|
|
973
973
|
}
|
|
974
974
|
},
|
|
@@ -984,7 +984,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
984
984
|
name: "y",
|
|
985
985
|
label: "Y",
|
|
986
986
|
fieldProps: {
|
|
987
|
-
onClick: function(e) {
|
|
987
|
+
onClick: function onClick(e) {
|
|
988
988
|
e.stopPropagation();
|
|
989
989
|
}
|
|
990
990
|
},
|
|
@@ -1042,7 +1042,7 @@ import { debounce, getDataHash, isConfigEqual, isNotEmpty, toNumber } from "./ut
|
|
|
1042
1042
|
dataSource: chartData,
|
|
1043
1043
|
columns: config === null || config === void 0 ? void 0 : config.columns,
|
|
1044
1044
|
pagination: false,
|
|
1045
|
-
rowKey: function(record) {
|
|
1045
|
+
rowKey: function rowKey(record) {
|
|
1046
1046
|
return record.key;
|
|
1047
1047
|
}
|
|
1048
1048
|
}));
|
|
@@ -56,14 +56,14 @@ import { ConfigProvider, Tooltip } from "antd";
|
|
|
56
56
|
import React, { useContext } from "react";
|
|
57
57
|
import { useStyle } from "./style";
|
|
58
58
|
import { formatNumber } from "./utils";
|
|
59
|
-
var ChartStatistic = function(param) {
|
|
59
|
+
var ChartStatistic = function ChartStatistic(param) {
|
|
60
60
|
var title = param.title, tooltip = param.tooltip, value = param.value, precision = param.precision, _param_groupSeparator = param.groupSeparator, groupSeparator = _param_groupSeparator === void 0 ? ',' : _param_groupSeparator, _param_prefix = param.prefix, prefix = _param_prefix === void 0 ? '' : _param_prefix, _param_suffix = param.suffix, suffix = _param_suffix === void 0 ? '' : _param_suffix, formatter = param.formatter, _param_className = param.className, className = _param_className === void 0 ? '' : _param_className, classNames = param.classNames, style = param.style, styles = param.styles, _param_theme = param.theme, theme = _param_theme === void 0 ? 'light' : _param_theme, _param_size = param.size, size = _param_size === void 0 ? 'default' : _param_size, _param_block = param.block, block = _param_block === void 0 ? false : _param_block, extra = param.extra;
|
|
61
61
|
var _Object;
|
|
62
62
|
var getPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls;
|
|
63
63
|
var prefixCls = getPrefixCls('chart-statistic');
|
|
64
64
|
var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
65
65
|
// 渲染数值
|
|
66
|
-
var renderValue = function() {
|
|
66
|
+
var renderValue = function renderValue() {
|
|
67
67
|
// 如果提供了自定义格式化函数,优先使用
|
|
68
68
|
if (formatter) {
|
|
69
69
|
return formatter(value);
|
|
@@ -76,7 +76,7 @@ var ChartStatistic = function(param) {
|
|
|
76
76
|
return formatNumber(value, formatOptions);
|
|
77
77
|
};
|
|
78
78
|
// 渲染标题和问号图标
|
|
79
|
-
var renderHeader = function() {
|
|
79
|
+
var renderHeader = function renderHeader() {
|
|
80
80
|
if (!title && !extra) return null;
|
|
81
81
|
var titleElement = title ? /*#__PURE__*/ React.createElement("span", {
|
|
82
82
|
className: [
|
|
@@ -51,7 +51,7 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
53
|
import { resetComponent, useEditorStyleRegister } from "../../../Hooks/useStyle";
|
|
54
|
-
var genStyle = function(token) {
|
|
54
|
+
var genStyle = function genStyle(token) {
|
|
55
55
|
var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6, _obj7, _obj8, _obj9, _obj10;
|
|
56
56
|
return _define_property({}, token.componentCls, (_obj10 = {
|
|
57
57
|
display: 'flex',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @param value 原始数值
|
|
6
6
|
* @param options 格式化选项
|
|
7
7
|
* @returns 格式化后的字符串
|
|
8
|
-
*/ export var formatNumber = function(value) {
|
|
8
|
+
*/ export var formatNumber = function formatNumber(value) {
|
|
9
9
|
var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
10
10
|
var precision = options.precision, _options_groupSeparator = options.groupSeparator, groupSeparator = _options_groupSeparator === void 0 ? ',' : _options_groupSeparator;
|
|
11
11
|
// 处理空值
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* 检查值是否为有效的数值
|
|
33
|
-
*/ export var isValidNumber = function(value) {
|
|
33
|
+
*/ export var isValidNumber = function isValidNumber(value) {
|
|
34
34
|
if (value === null || value === undefined || value === '') {
|
|
35
35
|
return false;
|
|
36
36
|
}
|
|
@@ -27,7 +27,7 @@ function _object_spread(target) {
|
|
|
27
27
|
return target;
|
|
28
28
|
}
|
|
29
29
|
import React from "react";
|
|
30
|
-
var Legend = function(param) {
|
|
30
|
+
var Legend = function Legend(param) {
|
|
31
31
|
var chartData = param.chartData, backgroundColors = param.backgroundColors, hiddenDataIndicesByChart = param.hiddenDataIndicesByChart, chartIndex = param.chartIndex, onLegendItemClick = param.onLegendItemClick, total = param.total, baseClassName = param.baseClassName, hashId = param.hashId, isMobile = param.isMobile;
|
|
32
32
|
var hiddenDataIndices = React.useMemo(function() {
|
|
33
33
|
return hiddenDataIndicesByChart[chartIndex] || new Set();
|
|
@@ -63,10 +63,10 @@ var Legend = function(param) {
|
|
|
63
63
|
minHeight: isMobile ? '24px' : '28px',
|
|
64
64
|
textDecoration: isHidden ? 'line-through' : 'none'
|
|
65
65
|
},
|
|
66
|
-
onClick: function() {
|
|
66
|
+
onClick: function onClick() {
|
|
67
67
|
return onLegendItemClick(i);
|
|
68
68
|
},
|
|
69
|
-
onKeyDown: function(e) {
|
|
69
|
+
onKeyDown: function onKeyDown(e) {
|
|
70
70
|
if (e.key === 'Enter' || e.key === ' ') {
|
|
71
71
|
e.preventDefault();
|
|
72
72
|
onLegendItemClick(i);
|
|
@@ -58,11 +58,11 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
58
58
|
}
|
|
59
59
|
import React from "react";
|
|
60
60
|
import { MOBILE_MAX_CHART_SIZE } from "./constants";
|
|
61
|
-
export var useMobile = function() {
|
|
61
|
+
export var useMobile = function useMobile() {
|
|
62
62
|
var _React_useState = _sliced_to_array(React.useState(false), 2), isMobile = _React_useState[0], setIsMobile = _React_useState[1];
|
|
63
63
|
var _React_useState1 = _sliced_to_array(React.useState(typeof window !== 'undefined' ? window.innerWidth : 0), 2), windowWidth = _React_useState1[0], setWindowWidth = _React_useState1[1];
|
|
64
64
|
React.useEffect(function() {
|
|
65
|
-
var handleResize = function() {
|
|
65
|
+
var handleResize = function handleResize() {
|
|
66
66
|
var width = window.innerWidth;
|
|
67
67
|
setWindowWidth(width);
|
|
68
68
|
setIsMobile(width <= 768);
|
|
@@ -78,7 +78,7 @@ export var useMobile = function() {
|
|
|
78
78
|
windowWidth: windowWidth
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
|
-
export var useResponsiveDimensions = function(isMobile, windowWidth, width, height) {
|
|
81
|
+
export var useResponsiveDimensions = function useResponsiveDimensions(isMobile, windowWidth, width, height) {
|
|
82
82
|
if (isMobile) {
|
|
83
83
|
var mobileWidth = Math.min(windowWidth - 40, Number(width), MOBILE_MAX_CHART_SIZE);
|
|
84
84
|
var mobileHeight = Math.min(windowWidth - 40, Number(height), MOBILE_MAX_CHART_SIZE);
|
|
@@ -96,7 +96,7 @@ export var useResponsiveDimensions = function(isMobile, windowWidth, width, heig
|
|
|
96
96
|
chartHeight: height
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
-
export var useFilterLabels = function(data) {
|
|
99
|
+
export var useFilterLabels = function useFilterLabels(data) {
|
|
100
100
|
var validFilterLabels = React.useMemo(function() {
|
|
101
101
|
return data.map(function(item) {
|
|
102
102
|
return item.filterLabel;
|
|
@@ -143,7 +143,7 @@ export var useFilterLabels = function(data) {
|
|
|
143
143
|
setSelectedFilterLabel: setSelectedFilterLabel
|
|
144
144
|
};
|
|
145
145
|
};
|
|
146
|
-
export var useAutoCategory = function(data, enableAutoCategory, externalSelectedFilter) {
|
|
146
|
+
export var useAutoCategory = function useAutoCategory(data, enableAutoCategory, externalSelectedFilter) {
|
|
147
147
|
var autoCategoryData = React.useMemo(function() {
|
|
148
148
|
if (!enableAutoCategory || !data) {
|
|
149
149
|
return null;
|
|
@@ -194,7 +194,7 @@ import { useStyle } from "./style";
|
|
|
194
194
|
* ```
|
|
195
195
|
*
|
|
196
196
|
* @since 1.0.0
|
|
197
|
-
*/ var DonutChart = function(_0) {
|
|
197
|
+
*/ var DonutChart = function DonutChart(_0) {
|
|
198
198
|
var data = _0.data, configs = _0.configs, _0_width = _0.width, width = _0_width === void 0 ? 200 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 200 : _0_height, className = _0.className, classNamesProp = _0.classNames, title = _0.title, _0_showToolbar = _0.showToolbar, showToolbar = _0_showToolbar === void 0 ? true : _0_showToolbar, onDownload = _0.onDownload, dataTime = _0.dataTime, filterList = _0.filterList, selectedFilter = _0.selectedFilter, onFilterChange = _0.onFilterChange, _0_enableAutoCategory = _0.enableAutoCategory, enableAutoCategory = _0_enableAutoCategory === void 0 ? true : _0_enableAutoCategory, _0_singleMode = _0.singleMode, singleMode = _0_singleMode === void 0 ? false : _0_singleMode, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
|
|
199
199
|
"data",
|
|
200
200
|
"configs",
|
|
@@ -261,10 +261,10 @@ import { useStyle } from "./style";
|
|
|
261
261
|
filterLabels,
|
|
262
262
|
selectedFilterLabel
|
|
263
263
|
]);
|
|
264
|
-
var handleInternalCategoryChange = function(category) {
|
|
264
|
+
var handleInternalCategoryChange = function handleInternalCategoryChange(category) {
|
|
265
265
|
setInternalSelectedCategory(category);
|
|
266
266
|
};
|
|
267
|
-
var handleLegendItemClick = function(chartIndex, dataIndex) {
|
|
267
|
+
var handleLegendItemClick = function handleLegendItemClick(chartIndex, dataIndex) {
|
|
268
268
|
setHiddenDataIndicesByChart(function(prev) {
|
|
269
269
|
var _next_chartIndex;
|
|
270
270
|
var next = _object_spread({}, prev);
|
|
@@ -302,7 +302,7 @@ import { useStyle } from "./style";
|
|
|
302
302
|
}, [
|
|
303
303
|
statisticConfig
|
|
304
304
|
]);
|
|
305
|
-
var handleDownload = function() {
|
|
305
|
+
var handleDownload = function handleDownload() {
|
|
306
306
|
if (onDownload) {
|
|
307
307
|
onDownload();
|
|
308
308
|
return;
|
|
@@ -463,7 +463,7 @@ import { useStyle } from "./style";
|
|
|
463
463
|
var visibleData = chartData.filter(function(_, index) {
|
|
464
464
|
return !hiddenSetForChart.has(index);
|
|
465
465
|
});
|
|
466
|
-
var toNum = function(v) {
|
|
466
|
+
var toNum = function toNum(v) {
|
|
467
467
|
return typeof v === 'number' ? v : Number(v);
|
|
468
468
|
};
|
|
469
469
|
var rawLabels = visibleData.map(function(d) {
|
|
@@ -512,7 +512,7 @@ import { useStyle } from "./style";
|
|
|
512
512
|
borderWidth: cfg.chartStyle === 'pie' ? 0 : isMobile ? 1 : 1,
|
|
513
513
|
spacing: isSingleValueMode ? 0 : cfg.chartStyle === 'pie' ? 0 : isMobile ? 3 : 6,
|
|
514
514
|
borderRadius: cfg.chartStyle === 'pie' ? 0 : 4,
|
|
515
|
-
hoverOffset: function(ctx) {
|
|
515
|
+
hoverOffset: function hoverOffset(ctx) {
|
|
516
516
|
return isSingleValueMode && (ctx === null || ctx === void 0 ? void 0 : ctx.dataIndex) === 1 ? 0 : isMobile ? 4 : 6;
|
|
517
517
|
}
|
|
518
518
|
}
|
|
@@ -547,7 +547,7 @@ import { useStyle } from "./style";
|
|
|
547
547
|
},
|
|
548
548
|
tooltip: {
|
|
549
549
|
enabled: cfg.showTooltip !== false,
|
|
550
|
-
filter: function(tooltipItem) {
|
|
550
|
+
filter: function filter(tooltipItem) {
|
|
551
551
|
return !(isSingleValueMode && tooltipItem.dataIndex === 1);
|
|
552
552
|
},
|
|
553
553
|
backgroundColor: tooltipBackgroundColor,
|
|
@@ -563,7 +563,7 @@ import { useStyle } from "./style";
|
|
|
563
563
|
size: isMobile ? 11 : 13
|
|
564
564
|
},
|
|
565
565
|
callbacks: {
|
|
566
|
-
label: function(param) {
|
|
566
|
+
label: function label(param) {
|
|
567
567
|
var label = param.label, raw = param.raw;
|
|
568
568
|
var val = typeof raw === 'number' ? raw : Number(raw);
|
|
569
569
|
var pct = total > 0 && Number.isFinite(val) ? (val / total * 100).toFixed(0) : '0';
|
|
@@ -595,7 +595,7 @@ import { useStyle } from "./style";
|
|
|
595
595
|
margin: '0 auto'
|
|
596
596
|
} : {})
|
|
597
597
|
}, /*#__PURE__*/ React.createElement(Doughnut, {
|
|
598
|
-
ref: function(instance) {
|
|
598
|
+
ref: function ref(instance) {
|
|
599
599
|
chartRefs.current[idx] = instance;
|
|
600
600
|
},
|
|
601
601
|
data: chartJsData,
|
|
@@ -617,7 +617,7 @@ import { useStyle } from "./style";
|
|
|
617
617
|
variant: "borderless",
|
|
618
618
|
style: (_obj1 = {}, _define_property(_obj1, '--donut-chart-width', "".concat(dimensions.chartWidth, "px")), _define_property(_obj1, '--donut-chart-height', "".concat(dimensions.chartHeight, "px")), _define_property(_obj1, "width", dimensions.chartWidth), _define_property(_obj1, "height", dimensions.chartHeight), _define_property(_obj1, "marginTop", '20px'), _obj1)
|
|
619
619
|
}, /*#__PURE__*/ React.createElement(Doughnut, {
|
|
620
|
-
ref: function(instance) {
|
|
620
|
+
ref: function ref(instance) {
|
|
621
621
|
chartRefs.current[idx] = instance;
|
|
622
622
|
},
|
|
623
623
|
data: chartJsData,
|
|
@@ -627,7 +627,7 @@ import { useStyle } from "./style";
|
|
|
627
627
|
backgroundColors: backgroundColors,
|
|
628
628
|
hiddenDataIndicesByChart: hiddenDataIndicesByChart,
|
|
629
629
|
chartIndex: idx,
|
|
630
|
-
onLegendItemClick: function(dataIndex) {
|
|
630
|
+
onLegendItemClick: function onLegendItemClick(dataIndex) {
|
|
631
631
|
return handleLegendItemClick(idx, dataIndex);
|
|
632
632
|
},
|
|
633
633
|
total: total,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export var createCenterTextPlugin = function(value, label) {
|
|
1
|
+
export var createCenterTextPlugin = function createCenterTextPlugin(value, label) {
|
|
2
2
|
var isMobile = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
3
3
|
return {
|
|
4
4
|
id: 'centerText',
|
|
5
|
-
beforeDraw: function(chart) {
|
|
5
|
+
beforeDraw: function beforeDraw(chart) {
|
|
6
6
|
var width = chart.width, height = chart.height, ctx = chart.ctx;
|
|
7
7
|
ctx.save();
|
|
8
8
|
var centerX = width / 2;
|
|
@@ -24,7 +24,7 @@ export var createCenterTextPlugin = function(value, label) {
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
// 单值饼图增加背景圆环
|
|
27
|
-
export var createBackgroundArcPlugin = function() {
|
|
27
|
+
export var createBackgroundArcPlugin = function createBackgroundArcPlugin() {
|
|
28
28
|
var bgColor = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '#F7F8F9', padding = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4;
|
|
29
29
|
return {
|
|
30
30
|
id: 'backgroundArc',
|