@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
|
@@ -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
|
var _obj;
|
|
56
56
|
return _define_property({}, token.componentCls, (_obj = {
|
|
57
57
|
display: 'flex',
|
|
@@ -155,7 +155,7 @@ import { defaultColorList } from "../const";
|
|
|
155
155
|
import { findDataPointByXValue, isXValueEqual, resolveCssVariable, toNumber } from "../utils";
|
|
156
156
|
import { useStyle } from "./style";
|
|
157
157
|
var funnelChartComponentsRegistered = false;
|
|
158
|
-
var FunnelChart = function(_0) {
|
|
158
|
+
var FunnelChart = function FunnelChart(_0) {
|
|
159
159
|
var title = _0.title, data = _0.data, color = _0.color, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_legendAlign = _0.legendAlign, legendAlign = _0_legendAlign === void 0 ? 'start' : _0_legendAlign, _0_showPercent = _0.showPercent, showPercent = _0_showPercent === void 0 ? true : _0_showPercent, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, _0_bottomLayerMinWidth = _0.bottomLayerMinWidth, bottomLayerMinWidth = _0_bottomLayerMinWidth === void 0 ? 0 : _0_bottomLayerMinWidth, typeNames = _0.typeNames, statisticConfig = _0.statistic, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
|
|
160
160
|
"title",
|
|
161
161
|
"data",
|
|
@@ -203,7 +203,7 @@ var FunnelChart = function(_0) {
|
|
|
203
203
|
var _useState = _sliced_to_array(useState(typeof window !== 'undefined' ? window.innerWidth : 768), 2), windowWidth = _useState[0], setWindowWidth = _useState[1];
|
|
204
204
|
var isMobile = windowWidth <= 768;
|
|
205
205
|
useEffect(function() {
|
|
206
|
-
var handleResize = function() {
|
|
206
|
+
var handleResize = function handleResize() {
|
|
207
207
|
return setWindowWidth(window.innerWidth);
|
|
208
208
|
};
|
|
209
209
|
if (typeof window !== 'undefined') {
|
|
@@ -380,7 +380,7 @@ var FunnelChart = function(_0) {
|
|
|
380
380
|
];
|
|
381
381
|
});
|
|
382
382
|
// 生成从上到下由深到浅的颜色
|
|
383
|
-
var hexToRgb = function(hex) {
|
|
383
|
+
var hexToRgb = function hexToRgb(hex) {
|
|
384
384
|
var s = hex.replace('#', '');
|
|
385
385
|
var bigint = parseInt(s, 16);
|
|
386
386
|
return {
|
|
@@ -389,7 +389,7 @@ var FunnelChart = function(_0) {
|
|
|
389
389
|
b: bigint & 255
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
|
-
var rgbToHex = function(r, g, b) {
|
|
392
|
+
var rgbToHex = function rgbToHex(r, g, b) {
|
|
393
393
|
return "#".concat([
|
|
394
394
|
r,
|
|
395
395
|
g,
|
|
@@ -398,7 +398,7 @@ var FunnelChart = function(_0) {
|
|
|
398
398
|
return Math.max(0, Math.min(255, Math.round(v))).toString(16).padStart(2, '0');
|
|
399
399
|
}).join(''));
|
|
400
400
|
};
|
|
401
|
-
var lighten = function(hex, t) {
|
|
401
|
+
var lighten = function lighten(hex, t) {
|
|
402
402
|
var _hexToRgb = hexToRgb(hex), r = _hexToRgb.r, g = _hexToRgb.g, b = _hexToRgb.b;
|
|
403
403
|
var lr = r + (255 - r) * t;
|
|
404
404
|
var lg = g + (255 - g) * t;
|
|
@@ -435,7 +435,7 @@ var FunnelChart = function(_0) {
|
|
|
435
435
|
typeNames
|
|
436
436
|
]);
|
|
437
437
|
var ratioDisplay = useMemo(function() {
|
|
438
|
-
var formatRaw = function(v) {
|
|
438
|
+
var formatRaw = function formatRaw(v) {
|
|
439
439
|
if (v === null || v === undefined) return undefined;
|
|
440
440
|
if (typeof v === 'string') {
|
|
441
441
|
var s = v.trim();
|
|
@@ -541,7 +541,7 @@ var FunnelChart = function(_0) {
|
|
|
541
541
|
padding: isMobile ? 10 : 12,
|
|
542
542
|
usePointStyle: true,
|
|
543
543
|
pointStyle: 'rectRounded',
|
|
544
|
-
generateLabels: function(chart) {
|
|
544
|
+
generateLabels: function generateLabels(chart) {
|
|
545
545
|
// @ts-ignore
|
|
546
546
|
var base = (ChartJS.defaults.plugins.legend.labels.generateLabels(chart) || []).map(function(it) {
|
|
547
547
|
return _object_spread_props(_object_spread({}, it), {
|
|
@@ -574,7 +574,7 @@ var FunnelChart = function(_0) {
|
|
|
574
574
|
]);
|
|
575
575
|
}
|
|
576
576
|
},
|
|
577
|
-
onClick: function(e, legendItem, legend) {
|
|
577
|
+
onClick: function onClick(e, legendItem, legend) {
|
|
578
578
|
if (legendItem.text === ((typeNames === null || typeNames === void 0 ? void 0 : typeNames.rate) || '转化率')) {
|
|
579
579
|
setShowTrapezoid(function(v) {
|
|
580
580
|
return !v;
|
|
@@ -600,11 +600,11 @@ var FunnelChart = function(_0) {
|
|
|
600
600
|
padding: 8,
|
|
601
601
|
displayColors: false,
|
|
602
602
|
callbacks: {
|
|
603
|
-
title: function(items) {
|
|
603
|
+
title: function title(items) {
|
|
604
604
|
var it = items === null || items === void 0 ? void 0 : items[0];
|
|
605
605
|
return (it === null || it === void 0 ? void 0 : it.label) ? String(it.label) : '';
|
|
606
606
|
},
|
|
607
|
-
label: function(ctx) {
|
|
607
|
+
label: function label(ctx) {
|
|
608
608
|
var _ctx_dataIndex, _ref;
|
|
609
609
|
// 使用原始值而非调整后的视觉宽度
|
|
610
610
|
var idx = (_ctx_dataIndex = ctx.dataIndex) !== null && _ctx_dataIndex !== void 0 ? _ctx_dataIndex : 0;
|
|
@@ -633,7 +633,7 @@ var FunnelChart = function(_0) {
|
|
|
633
633
|
border: {
|
|
634
634
|
display: false
|
|
635
635
|
},
|
|
636
|
-
afterFit: function(scale) {
|
|
636
|
+
afterFit: function afterFit(scale) {
|
|
637
637
|
var rows = Math.max(1, stages.length);
|
|
638
638
|
var per = BAR_THICKNESS + ROW_GAP;
|
|
639
639
|
var total = rows * per;
|
|
@@ -660,14 +660,14 @@ var FunnelChart = function(_0) {
|
|
|
660
660
|
duration: isMobile ? 200 : 400
|
|
661
661
|
}
|
|
662
662
|
};
|
|
663
|
-
var handleDownload = function() {
|
|
663
|
+
var handleDownload = function handleDownload() {
|
|
664
664
|
return downloadChart(chartRef.current, 'funnel-chart');
|
|
665
665
|
};
|
|
666
666
|
// 中间梯形 + 比率文本(梯形 #F1F2F4,文本 #626F86)
|
|
667
667
|
var trapezoidPlugin = useMemo(function() {
|
|
668
668
|
return {
|
|
669
669
|
id: 'funnelTrapezoidLabels',
|
|
670
|
-
afterDatasetsDraw: function(chart) {
|
|
670
|
+
afterDatasetsDraw: function afterDatasetsDraw(chart) {
|
|
671
671
|
var _cdata_datasets_, _cdata_datasets;
|
|
672
672
|
if (!showTrapezoid) return;
|
|
673
673
|
var ctx = chart.ctx, cdata = chart.data, scales = chart.scales;
|
|
@@ -748,7 +748,7 @@ var FunnelChart = function(_0) {
|
|
|
748
748
|
var rightLabelPlugin = useMemo(function() {
|
|
749
749
|
return {
|
|
750
750
|
id: 'funnelRightLabels',
|
|
751
|
-
afterDatasetsDraw: function(chart) {
|
|
751
|
+
afterDatasetsDraw: function afterDatasetsDraw(chart) {
|
|
752
752
|
var _Math;
|
|
753
753
|
var _data_datasets_, _data_datasets;
|
|
754
754
|
var ctx = chart.ctx, data = chart.data, scales = chart.scales;
|
|
@@ -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
|
'.chart-wrapper': {
|
|
57
57
|
width: '100%',
|
|
@@ -120,7 +120,7 @@ import { defaultColorList } from "../const";
|
|
|
120
120
|
import { useChartDataFilter, useChartStatistics, useChartTheme, useResponsiveSize } from "../hooks";
|
|
121
121
|
import { extractAndSortXValues, findDataPointByXValue, hexToRgba, registerLineChartComponents, resolveCssVariable } from "../utils";
|
|
122
122
|
import { useStyle } from "./style";
|
|
123
|
-
var LineChart = function(_0) {
|
|
123
|
+
var LineChart = function LineChart(_0) {
|
|
124
124
|
var title = _0.title, data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, dataTime = _0.dataTime, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, color = _0.color, _0_showLegend = _0.showLegend, showLegend = _0_showLegend === void 0 ? true : _0_showLegend, _0_legendPosition = _0.legendPosition, legendPosition = _0_legendPosition === void 0 ? 'bottom' : _0_legendPosition, _0_legendAlign = _0.legendAlign, legendAlign = _0_legendAlign === void 0 ? 'start' : _0_legendAlign, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, _0_xPosition = _0.xPosition, xPosition = _0_xPosition === void 0 ? 'bottom' : _0_xPosition, _0_yPosition = _0.yPosition, yPosition = _0_yPosition === void 0 ? 'left' : _0_yPosition, _0_hiddenX = _0.hiddenX, hiddenX = _0_hiddenX === void 0 ? false : _0_hiddenX, _0_hiddenY = _0.hiddenY, hiddenY = _0_hiddenY === void 0 ? false : _0_hiddenY, 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, [
|
|
125
125
|
"title",
|
|
126
126
|
"data",
|
|
@@ -265,7 +265,7 @@ var LineChart = function(_0) {
|
|
|
265
265
|
cornerRadius: isMobile ? 6 : 8,
|
|
266
266
|
displayColors: true,
|
|
267
267
|
callbacks: {
|
|
268
|
-
label: function(context) {
|
|
268
|
+
label: function label(context) {
|
|
269
269
|
var label = context.dataset.label || '';
|
|
270
270
|
var y = context.parsed.y;
|
|
271
271
|
return "".concat(label, ": ").concat(y);
|
|
@@ -353,7 +353,7 @@ var LineChart = function(_0) {
|
|
|
353
353
|
duration: isMobile ? 200 : 400
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
|
-
var handleDownload = function() {
|
|
356
|
+
var handleDownload = function handleDownload() {
|
|
357
357
|
downloadChart(chartRef.current, 'line-chart');
|
|
358
358
|
};
|
|
359
359
|
var rootClassName = classNames(classNamesProp === null || classNamesProp === void 0 ? void 0 : classNamesProp.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
|
// 统计数据容器样式
|
|
@@ -147,7 +147,7 @@ import { defaultColorList } from "../const";
|
|
|
147
147
|
import { hexToRgba, resolveCssVariable } from "../utils";
|
|
148
148
|
import { useStyle } from "./style";
|
|
149
149
|
var radarChartComponentsRegistered = false;
|
|
150
|
-
var RadarChart = function(_0) {
|
|
150
|
+
var RadarChart = function RadarChart(_0) {
|
|
151
151
|
var data = _0.data, title = _0.title, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, dataTime = _0.dataTime, color = _0.color, statisticConfig = _0.statistic, _0_textMaxWidth = _0.textMaxWidth, textMaxWidth = _0_textMaxWidth === void 0 ? 80 : _0_textMaxWidth, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
|
|
152
152
|
"data",
|
|
153
153
|
"title",
|
|
@@ -194,7 +194,7 @@ var RadarChart = function(_0) {
|
|
|
194
194
|
var responsiveHeight = isMobile ? Math.min(windowWidth * 0.85, 400) : height;
|
|
195
195
|
// 监听窗口大小变化
|
|
196
196
|
useEffect(function() {
|
|
197
|
-
var handleResize = function() {
|
|
197
|
+
var handleResize = function handleResize() {
|
|
198
198
|
setWindowWidth(window.innerWidth);
|
|
199
199
|
};
|
|
200
200
|
if (typeof window !== 'undefined') {
|
|
@@ -279,7 +279,7 @@ var RadarChart = function(_0) {
|
|
|
279
279
|
}, props.style, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root)
|
|
280
280
|
}, /*#__PURE__*/ React.createElement(ChartToolBar, {
|
|
281
281
|
title: title || '雷达图',
|
|
282
|
-
onDownload: function() {},
|
|
282
|
+
onDownload: function onDownload() {},
|
|
283
283
|
extra: toolbarExtra,
|
|
284
284
|
dataTime: dataTime,
|
|
285
285
|
loading: loading
|
|
@@ -407,7 +407,7 @@ var RadarChart = function(_0) {
|
|
|
407
407
|
padding: isMobile ? 10 : 20,
|
|
408
408
|
usePointStyle: true,
|
|
409
409
|
pointStyle: 'rectRounded',
|
|
410
|
-
generateLabels: function(chart) {
|
|
410
|
+
generateLabels: function generateLabels(chart) {
|
|
411
411
|
var original = ChartJS.defaults.plugins.legend.labels.generateLabels(chart);
|
|
412
412
|
// 创建一个临时 canvas 来测量文字宽度
|
|
413
413
|
var canvas = document.createElement('canvas');
|
|
@@ -442,7 +442,7 @@ var RadarChart = function(_0) {
|
|
|
442
442
|
},
|
|
443
443
|
tooltip: {
|
|
444
444
|
enabled: false,
|
|
445
|
-
external: function(context) {
|
|
445
|
+
external: function external(context) {
|
|
446
446
|
var _dataPoint_label, _dataPoint_dataset_label, _dataPoint_dataset, _dataPoint_dataset_borderColor, _dataPoint_dataset1;
|
|
447
447
|
var chart = context.chart, tooltip = context.tooltip;
|
|
448
448
|
// 如果没有 tooltip 数据,隐藏
|
|
@@ -545,7 +545,7 @@ var RadarChart = function(_0) {
|
|
|
545
545
|
duration: isMobile ? 200 : 400
|
|
546
546
|
}
|
|
547
547
|
};
|
|
548
|
-
var handleDownload = function() {
|
|
548
|
+
var handleDownload = function handleDownload() {
|
|
549
549
|
try {
|
|
550
550
|
if (chartRef.current) {
|
|
551
551
|
downloadChart(chartRef.current, 'radar-chart');
|
|
@@ -625,7 +625,7 @@ var RadarChart = function(_0) {
|
|
|
625
625
|
}, props.style, (_props_styles2 = props.styles) === null || _props_styles2 === void 0 ? void 0 : _props_styles2.root)
|
|
626
626
|
}, /*#__PURE__*/ React.createElement(ChartToolBar, {
|
|
627
627
|
title: title || '雷达图',
|
|
628
|
-
onDownload: function() {},
|
|
628
|
+
onDownload: function onDownload() {},
|
|
629
629
|
extra: toolbarExtra,
|
|
630
630
|
dataTime: dataTime,
|
|
631
631
|
loading: loading
|
|
@@ -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;
|
|
56
56
|
return _define_property({}, "".concat(token.componentCls, "-container"), (_obj2 = {}, // 雷达图容器样式
|
|
57
57
|
_define_property(_obj2, "".concat(token.componentCls, "-chart-wrapper"), {
|
|
@@ -147,7 +147,7 @@ import { defaultColorList } from "../const";
|
|
|
147
147
|
import { hexToRgba, resolveCssVariable } from "../utils";
|
|
148
148
|
import { useStyle } from "./style";
|
|
149
149
|
var scatterChartComponentsRegistered = false;
|
|
150
|
-
var ScatterChart = function(_0) {
|
|
150
|
+
var ScatterChart = function ScatterChart(_0) {
|
|
151
151
|
var data = _0.data, _0_width = _0.width, width = _0_width === void 0 ? 600 : _0_width, _0_height = _0.height, height = _0_height === void 0 ? 400 : _0_height, className = _0.className, classNamesProp = _0.classNames, title = _0.title, toolbarExtra = _0.toolbarExtra, _0_renderFilterInToolbar = _0.renderFilterInToolbar, renderFilterInToolbar = _0_renderFilterInToolbar === void 0 ? false : _0_renderFilterInToolbar, dataTime = _0.dataTime, _0_xUnit = _0.xUnit, xUnit = _0_xUnit === void 0 ? '月' : _0_xUnit, yUnit = _0.yUnit, xAxisLabel = _0.xAxisLabel, yAxisLabel = _0.yAxisLabel, _0_xPosition = _0.xPosition, xPosition = _0_xPosition === void 0 ? 'bottom' : _0_xPosition, _0_yPosition = _0.yPosition, yPosition = _0_yPosition === void 0 ? 'left' : _0_yPosition, _0_hiddenX = _0.hiddenX, hiddenX = _0_hiddenX === void 0 ? false : _0_hiddenX, _0_hiddenY = _0.hiddenY, hiddenY = _0_hiddenY === void 0 ? false : _0_hiddenY, _0_showGrid = _0.showGrid, showGrid = _0_showGrid === void 0 ? true : _0_showGrid, color = _0.color, statisticConfig = _0.statistic, _0_textMaxWidth = _0.textMaxWidth, textMaxWidth = _0_textMaxWidth === void 0 ? 80 : _0_textMaxWidth, _0_loading = _0.loading, loading = _0_loading === void 0 ? false : _0_loading, props = _object_without_properties(_0, [
|
|
152
152
|
"data",
|
|
153
153
|
"width",
|
|
@@ -203,7 +203,7 @@ var ScatterChart = function(_0) {
|
|
|
203
203
|
var responsiveHeight = isMobile ? Math.min(windowWidth * 0.8, 400) : height;
|
|
204
204
|
// 监听窗口大小变化
|
|
205
205
|
useEffect(function() {
|
|
206
|
-
var handleResize = function() {
|
|
206
|
+
var handleResize = function handleResize() {
|
|
207
207
|
setWindowWidth(window.innerWidth);
|
|
208
208
|
};
|
|
209
209
|
if (typeof window !== 'undefined') {
|
|
@@ -283,7 +283,7 @@ var ScatterChart = function(_0) {
|
|
|
283
283
|
}, props.style, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.root)
|
|
284
284
|
}, /*#__PURE__*/ React.createElement(ChartToolBar, {
|
|
285
285
|
title: title || '散点图',
|
|
286
|
-
onDownload: function() {},
|
|
286
|
+
onDownload: function onDownload() {},
|
|
287
287
|
extra: toolbarExtra,
|
|
288
288
|
dataTime: dataTime,
|
|
289
289
|
loading: loading
|
|
@@ -416,7 +416,7 @@ var ScatterChart = function(_0) {
|
|
|
416
416
|
padding: isMobile ? 10 : 20,
|
|
417
417
|
usePointStyle: true,
|
|
418
418
|
pointStyle: 'rectRounded',
|
|
419
|
-
generateLabels: function(chart) {
|
|
419
|
+
generateLabels: function generateLabels(chart) {
|
|
420
420
|
var original = ChartJS.defaults.plugins.legend.labels.generateLabels(chart);
|
|
421
421
|
// 创建一个临时 canvas 来测量文字宽度
|
|
422
422
|
var canvas = document.createElement('canvas');
|
|
@@ -451,7 +451,7 @@ var ScatterChart = function(_0) {
|
|
|
451
451
|
},
|
|
452
452
|
tooltip: {
|
|
453
453
|
enabled: false,
|
|
454
|
-
external: function(context) {
|
|
454
|
+
external: function external(context) {
|
|
455
455
|
var _dataPoint_dataset_label, _dataPoint_dataset, _dataPoint_dataset_borderColor, _dataPoint_dataset1;
|
|
456
456
|
var chart = context.chart, tooltip = context.tooltip;
|
|
457
457
|
// 如果没有 tooltip 数据,隐藏
|
|
@@ -596,7 +596,7 @@ var ScatterChart = function(_0) {
|
|
|
596
596
|
duration: isMobile ? 200 : 400
|
|
597
597
|
}
|
|
598
598
|
};
|
|
599
|
-
var handleDownload = function() {
|
|
599
|
+
var handleDownload = function handleDownload() {
|
|
600
600
|
try {
|
|
601
601
|
if (chartRef.current) {
|
|
602
602
|
downloadChart(chartRef.current, 'scatter-chart');
|
|
@@ -680,7 +680,7 @@ var ScatterChart = function(_0) {
|
|
|
680
680
|
}, props.style, (_props_styles4 = props.styles) === null || _props_styles4 === void 0 ? void 0 : _props_styles4.root)
|
|
681
681
|
}, /*#__PURE__*/ React.createElement(ChartToolBar, {
|
|
682
682
|
title: title || '散点图',
|
|
683
|
-
onDownload: function() {},
|
|
683
|
+
onDownload: function onDownload() {},
|
|
684
684
|
extra: toolbarExtra,
|
|
685
685
|
dataTime: dataTime,
|
|
686
686
|
loading: loading
|
|
@@ -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;
|
|
56
56
|
return _define_property({}, "".concat(token.componentCls, "-container"), (_obj1 = {}, // 散点图容器样式
|
|
57
57
|
_define_property(_obj1, "".concat(token.componentCls, "-chart-wrapper"), {
|
|
@@ -134,7 +134,7 @@ import { useStyle } from "./style";
|
|
|
134
134
|
* - 统一的样式管理
|
|
135
135
|
* - 内置错误边界保护,防止图表错误影响整个应用
|
|
136
136
|
* - 错误边界默认启用,可通过配置禁用或自定义
|
|
137
|
-
*/ var ChartContainer = function(_0) {
|
|
137
|
+
*/ var ChartContainer = function ChartContainer(_0) {
|
|
138
138
|
var baseClassName = _0.baseClassName, className = _0.className, children = _0.children, style = _0.style, classNamesProp = _0.classNames, stylesProp = _0.styles, _0_theme = _0.theme, theme = _0_theme === void 0 ? 'light' : _0_theme, _0_variant = _0.variant, variant = _0_variant === void 0 ? 'default' : _0_variant, _0_isMobile = _0.isMobile, isMobile = _0_isMobile === void 0 ? false : _0_isMobile, _0_errorBoundary = _0.errorBoundary, errorBoundary = _0_errorBoundary === void 0 ? {
|
|
139
139
|
enabled: true
|
|
140
140
|
} : _0_errorBoundary, restProps = _object_without_properties(_0, [
|
|
@@ -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
|
position: 'relative',
|
|
@@ -116,7 +116,7 @@ var genStyle = function(token) {
|
|
|
116
116
|
* 样式钩子
|
|
117
117
|
* @param baseClassName 基础类名
|
|
118
118
|
* @returns 样式相关对象
|
|
119
|
-
*/ export var useStyle = function(baseClassName) {
|
|
119
|
+
*/ export var useStyle = function useStyle(baseClassName) {
|
|
120
120
|
return useEditorStyleRegister('Chart-Container' + baseClassName, function(token) {
|
|
121
121
|
var containerToken = _object_spread_props(_object_spread({}, token), {
|
|
122
122
|
componentCls: ".".concat(baseClassName)
|
|
@@ -56,7 +56,7 @@ import { Button, ConfigProvider, Dropdown, Segmented } from "antd";
|
|
|
56
56
|
import React, { useContext } from "react";
|
|
57
57
|
import { I18nContext } from "../../../../I18n";
|
|
58
58
|
import { useStyle } from "./style";
|
|
59
|
-
var ChartFilterComponent = function(param) {
|
|
59
|
+
var ChartFilterComponent = function ChartFilterComponent(param) {
|
|
60
60
|
var filterOptions = param.filterOptions, selectedFilter = param.selectedFilter, onFilterChange = param.onFilterChange, customOptions = param.customOptions, selectedCustomSelection = param.selectedCustomSelection, onSelectionChange = param.onSelectionChange, _param_className = param.className, className = _param_className === void 0 ? '' : _param_className, classNamesProp = param.classNames, style = param.style, styles = param.styles, _param_theme = param.theme, theme = _param_theme === void 0 ? 'light' : _param_theme, _param_variant = param.variant, variant = _param_variant === void 0 ? 'default' : _param_variant;
|
|
61
61
|
var _Object;
|
|
62
62
|
var _customOptions_find, _i18n_locale;
|
|
@@ -64,12 +64,12 @@ var ChartFilterComponent = function(param) {
|
|
|
64
64
|
var i18n = useContext(I18nContext);
|
|
65
65
|
var prefixCls = getPrefixCls('chart-filter');
|
|
66
66
|
var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
67
|
-
var handleRegionChange = function(region) {
|
|
67
|
+
var handleRegionChange = function handleRegionChange(region) {
|
|
68
68
|
if (onSelectionChange) {
|
|
69
69
|
onSelectionChange(region);
|
|
70
70
|
}
|
|
71
71
|
};
|
|
72
|
-
var handleFilterChange = function(value) {
|
|
72
|
+
var handleFilterChange = function handleFilterChange(value) {
|
|
73
73
|
if (onFilterChange) {
|
|
74
74
|
onFilterChange(value);
|
|
75
75
|
}
|
|
@@ -110,7 +110,7 @@ var ChartFilterComponent = function(param) {
|
|
|
110
110
|
disabled: item.key === selectedCustomSelection
|
|
111
111
|
};
|
|
112
112
|
}),
|
|
113
|
-
onClick: function(param) {
|
|
113
|
+
onClick: function onClick(param) {
|
|
114
114
|
var key = param.key;
|
|
115
115
|
return handleRegionChange(key);
|
|
116
116
|
}
|
|
@@ -118,7 +118,7 @@ var ChartFilterComponent = function(param) {
|
|
|
118
118
|
trigger: [
|
|
119
119
|
'click'
|
|
120
120
|
],
|
|
121
|
-
getPopupContainer: function() {
|
|
121
|
+
getPopupContainer: function getPopupContainer() {
|
|
122
122
|
return document.body;
|
|
123
123
|
}
|
|
124
124
|
}, /*#__PURE__*/ React.createElement(Button, {
|
|
@@ -144,7 +144,7 @@ var ChartFilterComponent = function(param) {
|
|
|
144
144
|
'custom-segmented',
|
|
145
145
|
hashId
|
|
146
146
|
].filter(Boolean).join(' '),
|
|
147
|
-
onChange: function(value) {
|
|
147
|
+
onChange: function onChange(value) {
|
|
148
148
|
return handleFilterChange(value);
|
|
149
149
|
}
|
|
150
150
|
})));
|
|
@@ -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;
|
|
56
56
|
return _define_property({}, token.componentCls, (_obj1 = {
|
|
57
57
|
padding: '12px 0',
|
|
@@ -80,7 +80,7 @@ import { useStyle } from "./style";
|
|
|
80
80
|
* ```
|
|
81
81
|
*
|
|
82
82
|
* @since 1.0.0
|
|
83
|
-
*/ var ChartToolBar = function(param) {
|
|
83
|
+
*/ var ChartToolBar = function ChartToolBar(param) {
|
|
84
84
|
var title = param.title, dataTime = param.dataTime, _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, onDownload = param.onDownload, extra = param.extra, filter = param.filter, _param_loading = param.loading, loading = _param_loading === void 0 ? false : _param_loading;
|
|
85
85
|
var _Object;
|
|
86
86
|
var _i18n_locale, _i18n_locale1;
|
|
@@ -88,7 +88,7 @@ import { useStyle } from "./style";
|
|
|
88
88
|
var i18n = useContext(I18nContext);
|
|
89
89
|
var prefixCls = getPrefixCls('chart-toolbar');
|
|
90
90
|
var _useStyle = useStyle(prefixCls), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
|
|
91
|
-
var handleDownload = function() {
|
|
91
|
+
var handleDownload = function handleDownload() {
|
|
92
92
|
if (onDownload) {
|
|
93
93
|
onDownload();
|
|
94
94
|
}
|
|
@@ -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;
|
|
56
56
|
return _define_property({}, token.componentCls, (_obj3 = {
|
|
57
57
|
display: 'flex',
|
|
@@ -3,7 +3,7 @@ export { default as ChartContainer } from "./ChartContainer/ChartContainer";
|
|
|
3
3
|
export { default as ChartFilter } from "./ChartFilter/ChartFilter";
|
|
4
4
|
export { default as ChartToolBar } from "./ChartToolBar/ChartToolBar";
|
|
5
5
|
// 通用图表下载工具函数
|
|
6
|
-
export var downloadChart = function(chartInstance) {
|
|
6
|
+
export var downloadChart = function downloadChart(chartInstance) {
|
|
7
7
|
var filename = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'chart', format = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 'png', quality = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
|
|
8
8
|
if (!chartInstance) {
|
|
9
9
|
console.error('Chart instance is not available');
|
|
@@ -83,7 +83,7 @@ import { getDataHash } from "../utils";
|
|
|
83
83
|
* ```
|
|
84
84
|
*
|
|
85
85
|
* @since 1.0.0
|
|
86
|
-
*/ export var useChartDataFilter = function(data) {
|
|
86
|
+
*/ export var useChartDataFilter = function useChartDataFilter(data) {
|
|
87
87
|
var safeData = Array.isArray(data) ? data : [];
|
|
88
88
|
// 使用数据哈希来优化依赖项比较
|
|
89
89
|
var dataHash = useMemo(function() {
|
|
@@ -13,7 +13,7 @@ import { useMemo } from "react";
|
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* @since 1.0.0
|
|
16
|
-
*/ export var useChartStatistics = function(statisticConfig) {
|
|
16
|
+
*/ export var useChartStatistics = function useChartStatistics(statisticConfig) {
|
|
17
17
|
return useMemo(function() {
|
|
18
18
|
if (!statisticConfig) return null;
|
|
19
19
|
return Array.isArray(statisticConfig) ? statisticConfig : [
|
|
@@ -13,7 +13,7 @@ import { useMemo } from "react";
|
|
|
13
13
|
* ```
|
|
14
14
|
*
|
|
15
15
|
* @since 1.0.0
|
|
16
|
-
*/ export var useChartTheme = function() {
|
|
16
|
+
*/ export var useChartTheme = function useChartTheme() {
|
|
17
17
|
var theme = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'light';
|
|
18
18
|
return useMemo(function() {
|
|
19
19
|
var isLight = theme === 'light';
|
|
@@ -61,14 +61,14 @@ import { useEffect, useMemo, useState } from "react";
|
|
|
61
61
|
* ```
|
|
62
62
|
*
|
|
63
63
|
* @since 1.0.0
|
|
64
|
-
*/ export var useResponsiveSize = function() {
|
|
64
|
+
*/ export var useResponsiveSize = function useResponsiveSize() {
|
|
65
65
|
var width = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 600, height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 400;
|
|
66
66
|
var _useState = _sliced_to_array(useState(typeof window !== 'undefined' ? window.innerWidth : 768), 2), windowWidth = _useState[0], setWindowWidth = _useState[1];
|
|
67
67
|
var isMobile = windowWidth <= 768;
|
|
68
68
|
var responsiveWidth = isMobile ? '100%' : width;
|
|
69
69
|
var responsiveHeight = isMobile ? Math.min(windowWidth * 0.8, 400) : height;
|
|
70
70
|
useEffect(function() {
|
|
71
|
-
var handleResize = function() {
|
|
71
|
+
var handleResize = function handleResize() {
|
|
72
72
|
setWindowWidth(window.innerWidth);
|
|
73
73
|
};
|
|
74
74
|
if (typeof window !== 'undefined') {
|
|
@@ -224,7 +224,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
224
224
|
* 转化数字,转化不成功继续用string
|
|
225
225
|
* @param {string} value - 要转换的值
|
|
226
226
|
* @returns {number|string} 转换后的数字或原字符串
|
|
227
|
-
*/ var numberString = function(value) {
|
|
227
|
+
*/ var numberString = function numberString(value) {
|
|
228
228
|
if (!value) return value;
|
|
229
229
|
try {
|
|
230
230
|
if (typeof value === 'number') return value;
|
|
@@ -243,7 +243,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
243
243
|
* @param {any[]} data - 数据数组
|
|
244
244
|
* @param {any} key - 分组键
|
|
245
245
|
* @returns {Object} 分组后的数据对象
|
|
246
|
-
*/ var groupByCategory = function(data, key) {
|
|
246
|
+
*/ var groupByCategory = function groupByCategory(data, key) {
|
|
247
247
|
return data.reduce(function(group, product) {
|
|
248
248
|
var _group_category;
|
|
249
249
|
var category = product[key];
|
|
@@ -285,7 +285,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
285
285
|
* - 支持图表配置和自定义
|
|
286
286
|
* - 集成编辑器状态管理
|
|
287
287
|
* - 提供响应式布局
|
|
288
|
-
*/ export var ChartElement = function(props) {
|
|
288
|
+
*/ export var ChartElement = function ChartElement(props) {
|
|
289
289
|
var _node_otherProps, _node_otherProps1, _node_otherProps2, _node_otherProps3, _node_otherProps4, _node_otherProps5, _node_otherProps_columns, _node_otherProps6;
|
|
290
290
|
var _useEditorStore = useEditorStore(), store = _useEditorStore.store, readonly = _useEditorStore.readonly, markdownContainerRef = _useEditorStore.markdownContainerRef, rootContainer = _useEditorStore.rootContainer;
|
|
291
291
|
var editor = useSlate();
|
|
@@ -397,7 +397,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
397
397
|
var htmlRef = React.useRef(null);
|
|
398
398
|
var _React_useState1 = _sliced_to_array(React.useState(256), 2), minWidth = _React_useState1[0], setMinWidth = _React_useState1[1];
|
|
399
399
|
useEffect(function() {
|
|
400
|
-
var updateWidth = function() {
|
|
400
|
+
var updateWidth = function updateWidth() {
|
|
401
401
|
var _rootContainer_current, _htmlRef_current_parentElement, _htmlRef_current;
|
|
402
402
|
var width = Math.max((rootContainer === null || rootContainer === void 0 ? void 0 : (_rootContainer_current = rootContainer.current) === null || _rootContainer_current === void 0 ? void 0 : _rootContainer_current.clientWidth) || ((_htmlRef_current = htmlRef.current) === null || _htmlRef_current === void 0 ? void 0 : (_htmlRef_current_parentElement = _htmlRef_current.parentElement) === null || _htmlRef_current_parentElement === void 0 ? void 0 : _htmlRef_current_parentElement.clientWidth) || 256, 256);
|
|
403
403
|
setMinWidth(width || 256);
|
|
@@ -425,7 +425,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
425
425
|
overflow: 'hidden'
|
|
426
426
|
},
|
|
427
427
|
ref: htmlRef,
|
|
428
|
-
onDragStart: function(e) {
|
|
428
|
+
onDragStart: function onDragStart(e) {
|
|
429
429
|
return store.dragStart(e, markdownContainerRef.current);
|
|
430
430
|
}
|
|
431
431
|
}), /*#__PURE__*/ React.createElement(DragHandle, null), /*#__PURE__*/ React.createElement("div", {
|
|
@@ -464,10 +464,10 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
464
464
|
userSelect: 'none'
|
|
465
465
|
},
|
|
466
466
|
contentEditable: false,
|
|
467
|
-
onClick: function(e) {
|
|
467
|
+
onClick: function onClick(e) {
|
|
468
468
|
e.stopPropagation();
|
|
469
469
|
},
|
|
470
|
-
onKeyDown: function(e) {
|
|
470
|
+
onKeyDown: function onKeyDown(e) {
|
|
471
471
|
e.stopPropagation();
|
|
472
472
|
}
|
|
473
473
|
}, config.map(function(_0, _1) {
|
|
@@ -582,7 +582,7 @@ export { ChartFilter, ChartToolBar, downloadChart } from "./components";
|
|
|
582
582
|
maxWidth: '100%',
|
|
583
583
|
flex: 1
|
|
584
584
|
},
|
|
585
|
-
onClick: function(e) {
|
|
585
|
+
onClick: function onClick(e) {
|
|
586
586
|
e.stopPropagation();
|
|
587
587
|
}
|
|
588
588
|
}, itemList);
|
|
@@ -173,7 +173,7 @@ function _ts_generator(thisArg, body) {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
var runtimeLoader = null;
|
|
176
|
-
export var loadChartRuntime = function() {
|
|
176
|
+
export var loadChartRuntime = function loadChartRuntime() {
|
|
177
177
|
return _async_to_generator(function() {
|
|
178
178
|
return _ts_generator(this, function(_state) {
|
|
179
179
|
if (typeof window === 'undefined') {
|
|
@@ -28,7 +28,7 @@ import { BarElement, CategoryScale, Chart as ChartJS, Filler, Legend, LinearScal
|
|
|
28
28
|
* ```
|
|
29
29
|
*
|
|
30
30
|
* @since 1.0.0
|
|
31
|
-
*/ export var registerChartComponents = function(componentName, registerFn) {
|
|
31
|
+
*/ export var registerChartComponents = function registerChartComponents(componentName, registerFn) {
|
|
32
32
|
if (registeredComponents.has(componentName)) {
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
@@ -40,14 +40,14 @@ import { BarElement, CategoryScale, Chart as ChartJS, Filler, Legend, LinearScal
|
|
|
40
40
|
};
|
|
41
41
|
/**
|
|
42
42
|
* 注册折线图/面积图所需的组件
|
|
43
|
-
*/ export var registerLineChartComponents = function() {
|
|
43
|
+
*/ export var registerLineChartComponents = function registerLineChartComponents() {
|
|
44
44
|
registerChartComponents('line-chart', function() {
|
|
45
45
|
ChartJS.register(CategoryScale, LinearScale, PointElement, LineElement, Filler, Tooltip, Legend);
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
48
|
/**
|
|
49
49
|
* 注册柱状图所需的组件
|
|
50
|
-
*/ export var registerBarChartComponents = function() {
|
|
50
|
+
*/ export var registerBarChartComponents = function registerBarChartComponents() {
|
|
51
51
|
registerChartComponents('bar-chart', function() {
|
|
52
52
|
ChartJS.register(CategoryScale, LinearScale, BarElement, Tooltip, Legend);
|
|
53
53
|
});
|