@yoka-ui/ui 1.0.10-test → 1.1.1
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/@Docs-yoka/exports.generated.md +68 -62
- package/LICENSE +21 -0
- package/README.md +40 -189
- package/dist/es/assets/image/skills.zip +0 -0
- package/dist/es/business/AiChat/aichat-logo.svg +1 -0
- package/dist/es/business/AiChat/index.d.ts +3 -3
- package/dist/es/business/AiChat/index.js +322 -137
- package/dist/es/business/AiChat/index.js.map +3 -3
- package/dist/es/business/AiChat/index.module.less +24 -0
- package/dist/es/business/AiChat/intentRecognizer.js.map +1 -1
- package/dist/es/business/AiChat/navigationManager.js +6 -6
- package/dist/es/business/AiChat/navigationManager.js.map +2 -2
- package/dist/es/business/AiChat/sse.d.ts +15 -0
- package/dist/es/business/AiChat/sse.js +118 -7
- package/dist/es/business/AiChat/sse.js.map +2 -2
- package/dist/es/business/AiChat/type.d.ts +22 -23
- package/dist/es/business/AiChat/useAiChat.js +105 -75
- package/dist/es/business/AiChat/useAiChat.js.map +3 -3
- package/dist/es/business/AiChat/useTaskWorkflow.d.ts +1 -2
- package/dist/es/business/AiChat/useTaskWorkflow.js +2 -36
- package/dist/es/business/AiChat/useTaskWorkflow.js.map +2 -2
- package/dist/es/business/DrawerPageInfo/index.js.map +1 -1
- package/dist/es/business/Editor/index.d.ts +1 -1
- package/dist/es/business/Editor/index.js.map +2 -2
- package/dist/es/business/Empty/index.js +1 -1
- package/dist/es/business/Empty/index.js.map +1 -1
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +3 -3
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +2 -2
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
- package/dist/es/business/ModCommonFilter/index.d.ts +1 -1
- package/dist/es/business/ModCommonFilter/index.js.map +2 -2
- package/dist/es/business/YkCharts/Area.d.ts +18 -0
- package/dist/es/business/YkCharts/Area.js +336 -0
- package/dist/es/business/YkCharts/Area.js.map +7 -0
- package/dist/es/business/YkCharts/Bar.d.ts +21 -0
- package/dist/es/business/YkCharts/Bar.js +316 -0
- package/dist/es/business/YkCharts/Bar.js.map +7 -0
- package/dist/es/business/YkCharts/BarProperty.d.ts +21 -0
- package/dist/es/business/YkCharts/BarProperty.js +357 -0
- package/dist/es/business/YkCharts/BarProperty.js.map +7 -0
- package/dist/es/business/YkCharts/BarTotal.d.ts +21 -0
- package/dist/es/business/YkCharts/BarTotal.js +292 -0
- package/dist/es/business/YkCharts/BarTotal.js.map +7 -0
- package/dist/es/business/YkCharts/Line.d.ts +21 -0
- package/dist/es/business/YkCharts/Line.js +342 -0
- package/dist/es/business/YkCharts/Line.js.map +7 -0
- package/dist/es/business/YkCharts/Pie.d.ts +19 -0
- package/dist/es/business/YkCharts/Pie.js +107 -0
- package/dist/es/business/YkCharts/Pie.js.map +7 -0
- package/dist/es/business/YkCharts/PieProperty.d.ts +18 -0
- package/dist/es/business/YkCharts/PieProperty.js +180 -0
- package/dist/es/business/YkCharts/PieProperty.js.map +7 -0
- package/dist/es/business/YkCharts/Pies.d.ts +26 -0
- package/dist/es/business/YkCharts/Pies.js +352 -0
- package/dist/es/business/YkCharts/Pies.js.map +7 -0
- package/dist/es/business/YkCharts/constants.d.ts +1 -0
- package/dist/es/business/YkCharts/constants.js +47 -0
- package/dist/es/business/YkCharts/constants.js.map +7 -0
- package/dist/es/business/YkCharts/hooks.d.ts +4 -0
- package/dist/es/business/YkCharts/hooks.js +37 -0
- package/dist/es/business/YkCharts/hooks.js.map +7 -0
- package/dist/es/business/YkCharts/index.d.ts +9 -0
- package/dist/es/business/YkCharts/index.js +20 -0
- package/dist/es/business/YkCharts/index.js.map +7 -0
- package/dist/es/business/YkCharts/index.module.less +164 -0
- package/dist/es/business/YkCharts/tooltip.less +92 -0
- package/dist/es/business/YkCharts/transformData.js +16 -0
- package/dist/es/business/YkCharts/transformData.js.map +7 -0
- package/dist/es/business/YkCharts/typing.d.ts +74 -0
- package/dist/es/business/YkCharts/typing.js +1 -0
- package/dist/es/business/YkCharts/typing.js.map +7 -0
- package/dist/es/business/YkCharts/utils.d.ts +4 -0
- package/dist/es/business/YkCharts/utils.js +109 -0
- package/dist/es/business/YkCharts/utils.js.map +7 -0
- package/dist/es/business/YkCharts/variables.less +13 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js +178 -0
- package/dist/es/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/es/business/YkLoginModule/index.d.ts +48 -0
- package/dist/es/business/YkLoginModule/index.js +198 -0
- package/dist/es/business/YkLoginModule/index.js.map +7 -0
- package/dist/es/business/YkLoginModule/styles.module.less +169 -0
- package/dist/es/business/YkPorjectSelect/index.d.ts +1 -1
- package/dist/es/business/YkPorjectSelect/index.js +2 -2
- package/dist/es/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/es/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/es/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/es/business/YkSqlEdit/index.js +180 -0
- package/dist/es/business/YkSqlEdit/index.js.map +7 -0
- package/dist/es/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/es/business/YkSqlEdit/sql-language.js +1460 -0
- package/dist/es/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/es/components/DebounceInput/index.js.map +2 -2
- package/dist/es/components/MultipleSelect/index.d.ts +14 -0
- package/dist/es/components/MultipleSelect/index.js +1 -1
- package/dist/es/components/MultipleSelect/index.js.map +2 -2
- package/dist/es/components/RefreshButton/index.js.map +2 -2
- package/dist/es/components/SearchWithHistory/index.js +1 -1
- package/dist/es/components/SearchWithHistory/index.js.map +2 -2
- package/dist/es/components/TextWithToolTip/index.d.ts +1 -1
- package/dist/es/components/TextWithToolTip/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/index.d.ts +1 -24
- package/dist/es/components/TreeTransfer/index.js +8 -8
- package/dist/es/components/TreeTransfer/index.js.map +2 -2
- package/dist/es/components/TreeTransfer/utils/index.d.ts +1 -1
- package/dist/es/components/TreeTransfer/utils/index.js.map +2 -2
- package/dist/es/components/YKMarkdown/index.d.ts +11 -0
- package/dist/es/components/YKMarkdown/index.js +236 -0
- package/dist/es/components/YKMarkdown/index.js.map +7 -0
- package/dist/es/components/YKMarkdown/index.module.less +83 -0
- package/dist/es/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
- package/dist/es/components/YkDateRangePicker/index.d.ts +9 -1
- package/dist/es/components/YkDateRangePicker/index.js +127 -61
- package/dist/es/components/YkDateRangePicker/index.js.map +2 -2
- package/dist/es/components/YkDateRangePicker/index.module.less +33 -9
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +23 -3
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.d.ts +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.js.map +2 -2
- package/dist/es/components/YkRangeDateWithVS/index.module.less +22 -4
- package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +1 -1
- package/dist/es/components/YkRangeTimeWithRecent/index.js.map +2 -2
- package/dist/es/creative/ArcCheckbox/index.d.ts +12 -0
- package/dist/es/creative/ArcCheckbox/index.js +49 -0
- package/dist/es/creative/ArcCheckbox/index.js.map +7 -0
- package/dist/es/creative/ArcCheckbox/index.module.less +102 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js.map +1 -1
- package/dist/es/creative/ButtonWithProgress/index.d.ts +1 -1
- package/dist/es/creative/ButtonWithProgress/index.js.map +2 -2
- package/dist/es/creative/GlassSegmentedRadio/index.d.ts +24 -0
- package/dist/es/creative/GlassSegmentedRadio/index.js +75 -0
- package/dist/es/creative/GlassSegmentedRadio/index.js.map +7 -0
- package/dist/es/creative/GlassSegmentedRadio/index.module.less +241 -0
- package/dist/es/creative/SkillsWriter/index.d.ts +3 -0
- package/dist/es/creative/SkillsWriter/index.js +191 -0
- package/dist/es/creative/SkillsWriter/index.js.map +7 -0
- package/dist/es/creative/SkillsWriter/index.module.less +21 -0
- package/dist/es/index.d.ts +32 -24
- package/dist/es/index.js +90 -80
- package/dist/es/index.js.map +2 -2
- package/dist/es/index.less +45 -0
- package/dist/es/layout/FlexGrid/index.d.ts +1 -1
- package/dist/es/layout/FlexGrid/index.js.map +2 -2
- package/dist/es/layout/YkContainer/index.js.map +1 -1
- package/dist/es/layout/YkDrawer/index.d.ts +1 -1
- package/dist/es/layout/YkDrawer/index.js.map +2 -2
- package/dist/es/ui/LabelSelect/demo.js +1 -1
- package/dist/es/ui/LabelSelect/demo.js.map +2 -2
- package/dist/es/ui/LabelSelect/index.d.ts +1 -1
- package/dist/es/ui/LabelSelect/index.js +1 -1
- package/dist/es/ui/LabelSelect/index.js.map +2 -2
- package/dist/es/ui/LogicOperator/index.d.ts +1 -1
- package/dist/es/ui/LogicOperator/index.js.map +2 -2
- package/dist/es/ui/YkButton/index.d.ts +1 -1
- package/dist/es/ui/YkButton/index.js.map +2 -2
- package/dist/es/ui/YkCard/index.d.ts +1 -1
- package/dist/es/ui/YkCard/index.js +1 -1
- package/dist/es/ui/YkCard/index.js.map +2 -2
- package/dist/es/ui/YkCheckbox/index.d.ts +1 -1
- package/dist/es/ui/YkCheckbox/index.js.map +2 -2
- package/dist/es/ui/YkDescriptions/index.d.ts +1 -1
- package/dist/es/ui/YkDescriptions/index.js.map +2 -2
- package/dist/es/ui/YkPagination/index.d.ts +1 -1
- package/dist/es/ui/YkPagination/index.js.map +2 -2
- package/dist/es/ui/YkRadio/index.d.ts +1 -1
- package/dist/es/ui/YkRadio/index.js.map +2 -2
- package/dist/es/ui/YkSegmented/index.d.ts +1 -1
- package/dist/es/ui/YkSegmented/index.js.map +2 -2
- package/dist/es/ui/YkSelect/index.d.ts +1 -1
- package/dist/es/ui/YkSelect/index.js.map +2 -2
- package/dist/es/ui/YkSpin/index.d.ts +1 -1
- package/dist/es/ui/YkSpin/index.js.map +2 -2
- package/dist/es/ui/YkStatistic/index.d.ts +1 -1
- package/dist/es/ui/YkStatistic/index.js.map +2 -2
- package/dist/es/ui/YkSwitch/index.d.ts +1 -1
- package/dist/es/ui/YkSwitch/index.js.map +2 -2
- package/dist/es/ui/YkTabs/index.d.ts +1 -1
- package/dist/es/ui/YkTabs/index.js.map +2 -2
- package/dist/es/ui/YkTooltip/index.d.ts +1 -1
- package/dist/es/ui/YkTooltip/index.js.map +2 -2
- package/dist/es/utils/styleUtils.js.map +2 -2
- package/dist/es/utils/ykStorybookDoc.d.ts +15 -0
- package/dist/es/utils/ykStorybookDoc.js +24 -2
- package/dist/es/utils/ykStorybookDoc.js.map +2 -2
- package/dist/lib/assets/image/skills.zip +0 -0
- package/dist/lib/business/AiChat/aichat-logo.svg +1 -0
- package/dist/lib/business/AiChat/index.d.ts +3 -3
- package/dist/lib/business/AiChat/index.js +311 -129
- package/dist/lib/business/AiChat/index.js.map +3 -3
- package/dist/lib/business/AiChat/index.module.less +24 -0
- package/dist/lib/business/AiChat/intentRecognizer.js.map +1 -1
- package/dist/lib/business/AiChat/navigationManager.js +6 -6
- package/dist/lib/business/AiChat/navigationManager.js.map +2 -2
- package/dist/lib/business/AiChat/sse.d.ts +15 -0
- package/dist/lib/business/AiChat/sse.js +117 -7
- package/dist/lib/business/AiChat/sse.js.map +2 -2
- package/dist/lib/business/AiChat/type.d.ts +22 -23
- package/dist/lib/business/AiChat/type.js.map +1 -1
- package/dist/lib/business/AiChat/useAiChat.js +104 -74
- package/dist/lib/business/AiChat/useAiChat.js.map +3 -3
- package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +1 -2
- package/dist/lib/business/AiChat/useTaskWorkflow.js +0 -34
- package/dist/lib/business/AiChat/useTaskWorkflow.js.map +2 -2
- package/dist/lib/business/DrawerPageInfo/index.js.map +1 -1
- package/dist/lib/business/Editor/index.d.ts +1 -1
- package/dist/lib/business/Editor/index.js.map +2 -2
- package/dist/lib/business/Empty/index.js +1 -1
- package/dist/lib/business/Empty/index.js.map +1 -1
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +3 -3
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +4 -4
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +3 -3
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +2 -2
- package/dist/lib/business/ModCommonFilter/index.d.ts +1 -1
- package/dist/lib/business/ModCommonFilter/index.js.map +2 -2
- package/dist/lib/business/YkCharts/Area.d.ts +18 -0
- package/dist/lib/business/YkCharts/Area.js +346 -0
- package/dist/lib/business/YkCharts/Area.js.map +7 -0
- package/dist/lib/business/YkCharts/Bar.d.ts +21 -0
- package/dist/lib/business/YkCharts/Bar.js +323 -0
- package/dist/lib/business/YkCharts/Bar.js.map +7 -0
- package/dist/lib/business/YkCharts/BarProperty.d.ts +21 -0
- package/dist/lib/business/YkCharts/BarProperty.js +370 -0
- package/dist/lib/business/YkCharts/BarProperty.js.map +7 -0
- package/dist/lib/business/YkCharts/BarTotal.d.ts +21 -0
- package/dist/lib/business/YkCharts/BarTotal.js +298 -0
- package/dist/lib/business/YkCharts/BarTotal.js.map +7 -0
- package/dist/lib/business/YkCharts/Line.d.ts +21 -0
- package/dist/lib/business/YkCharts/Line.js +349 -0
- package/dist/lib/business/YkCharts/Line.js.map +7 -0
- package/dist/lib/business/YkCharts/Pie.d.ts +19 -0
- package/dist/lib/business/YkCharts/Pie.js +117 -0
- package/dist/lib/business/YkCharts/Pie.js.map +7 -0
- package/dist/lib/business/YkCharts/PieProperty.d.ts +18 -0
- package/dist/lib/business/YkCharts/PieProperty.js +193 -0
- package/dist/lib/business/YkCharts/PieProperty.js.map +7 -0
- package/dist/lib/business/YkCharts/Pies.d.ts +26 -0
- package/dist/lib/business/YkCharts/Pies.js +341 -0
- package/dist/lib/business/YkCharts/Pies.js.map +7 -0
- package/dist/lib/business/YkCharts/constants.d.ts +1 -0
- package/dist/lib/business/YkCharts/constants.js +71 -0
- package/dist/lib/business/YkCharts/constants.js.map +7 -0
- package/dist/lib/business/YkCharts/hooks.d.ts +4 -0
- package/dist/lib/business/YkCharts/hooks.js +62 -0
- package/dist/lib/business/YkCharts/hooks.js.map +7 -0
- package/dist/lib/business/YkCharts/index.d.ts +9 -0
- package/dist/lib/business/YkCharts/index.js +61 -0
- package/dist/lib/business/YkCharts/index.js.map +7 -0
- package/dist/lib/business/YkCharts/index.module.less +164 -0
- package/dist/lib/business/YkCharts/tooltip.less +92 -0
- package/dist/lib/business/YkCharts/transformData.js +40 -0
- package/dist/lib/business/YkCharts/transformData.js.map +7 -0
- package/dist/lib/business/YkCharts/typing.d.ts +74 -0
- package/dist/lib/business/YkCharts/typing.js +18 -0
- package/dist/lib/business/YkCharts/typing.js.map +7 -0
- package/dist/lib/business/YkCharts/utils.d.ts +4 -0
- package/dist/lib/business/YkCharts/utils.js +143 -0
- package/dist/lib/business/YkCharts/utils.js.map +7 -0
- package/dist/lib/business/YkCharts/variables.less +13 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.d.ts +25 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js +171 -0
- package/dist/lib/business/YkLoginModule/SmsLoginForm.js.map +7 -0
- package/dist/lib/business/YkLoginModule/index.d.ts +48 -0
- package/dist/lib/business/YkLoginModule/index.js +206 -0
- package/dist/lib/business/YkLoginModule/index.js.map +7 -0
- package/dist/lib/business/YkLoginModule/styles.module.less +169 -0
- package/dist/lib/business/YkPorjectSelect/index.d.ts +1 -1
- package/dist/lib/business/YkPorjectSelect/index.js +3 -3
- package/dist/lib/business/YkPorjectSelect/index.js.map +2 -2
- package/dist/lib/business/YkSqlEdit/code-mirror-custom.module.less +154 -0
- package/dist/lib/business/YkSqlEdit/index.d.ts +20 -0
- package/dist/lib/business/YkSqlEdit/index.js +202 -0
- package/dist/lib/business/YkSqlEdit/index.js.map +7 -0
- package/dist/lib/business/YkSqlEdit/sql-language.d.ts +11 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js +1493 -0
- package/dist/lib/business/YkSqlEdit/sql-language.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.js.map +2 -2
- package/dist/lib/components/MultipleSelect/index.d.ts +14 -0
- package/dist/lib/components/MultipleSelect/index.js +1 -1
- package/dist/lib/components/MultipleSelect/index.js.map +2 -2
- package/dist/lib/components/RefreshButton/index.js.map +2 -2
- package/dist/lib/components/SearchWithHistory/index.js +1 -1
- package/dist/lib/components/SearchWithHistory/index.js.map +2 -2
- package/dist/lib/components/TextWithToolTip/index.d.ts +1 -1
- package/dist/lib/components/TextWithToolTip/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +1 -24
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +2 -2
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/index.d.ts +1 -24
- package/dist/lib/components/TreeTransfer/index.js +3 -3
- package/dist/lib/components/TreeTransfer/index.js.map +2 -2
- package/dist/lib/components/TreeTransfer/utils/index.d.ts +1 -1
- package/dist/lib/components/TreeTransfer/utils/index.js.map +2 -2
- package/dist/lib/components/YKMarkdown/index.d.ts +11 -0
- package/dist/lib/components/YKMarkdown/index.js +188 -0
- package/dist/lib/components/YKMarkdown/index.js.map +7 -0
- package/dist/lib/components/YKMarkdown/index.module.less +83 -0
- package/dist/lib/components/YkDateRangePicker/YkDateRangePicker.mdx +194 -0
- package/dist/lib/components/YkDateRangePicker/index.d.ts +9 -1
- package/dist/lib/components/YkDateRangePicker/index.js +127 -61
- package/dist/lib/components/YkDateRangePicker/index.js.map +2 -2
- package/dist/lib/components/YkDateRangePicker/index.module.less +33 -9
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +3 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +22 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +1 -1
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.d.ts +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.js.map +2 -2
- package/dist/lib/components/YkRangeDateWithVS/index.module.less +22 -4
- package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +1 -1
- package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +2 -2
- package/dist/lib/creative/ArcCheckbox/index.d.ts +12 -0
- package/dist/lib/creative/ArcCheckbox/index.js +50 -0
- package/dist/lib/creative/ArcCheckbox/index.js.map +7 -0
- package/dist/lib/creative/ArcCheckbox/index.module.less +102 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +1 -1
- package/dist/lib/creative/ButtonWithProgress/index.d.ts +1 -1
- package/dist/lib/creative/ButtonWithProgress/index.js.map +2 -2
- package/dist/lib/creative/GlassSegmentedRadio/index.d.ts +24 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.js +78 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.js.map +7 -0
- package/dist/lib/creative/GlassSegmentedRadio/index.module.less +241 -0
- package/dist/lib/creative/SkillsWriter/index.d.ts +3 -0
- package/dist/lib/creative/SkillsWriter/index.js +200 -0
- package/dist/lib/creative/SkillsWriter/index.js.map +7 -0
- package/dist/lib/creative/SkillsWriter/index.module.less +21 -0
- package/dist/lib/index.d.ts +32 -24
- package/dist/lib/index.js +39 -24
- package/dist/lib/index.js.map +2 -2
- package/dist/lib/index.less +45 -0
- package/dist/lib/layout/FlexGrid/index.d.ts +1 -1
- package/dist/lib/layout/FlexGrid/index.js.map +2 -2
- package/dist/lib/layout/YkContainer/index.js.map +1 -1
- package/dist/lib/layout/YkDrawer/index.d.ts +1 -1
- package/dist/lib/layout/YkDrawer/index.js.map +2 -2
- package/dist/lib/ui/LabelSelect/demo.js +1 -1
- package/dist/lib/ui/LabelSelect/demo.js.map +2 -2
- package/dist/lib/ui/LabelSelect/index.d.ts +1 -1
- package/dist/lib/ui/LabelSelect/index.js +1 -1
- package/dist/lib/ui/LabelSelect/index.js.map +2 -2
- package/dist/lib/ui/LogicOperator/index.d.ts +1 -1
- package/dist/lib/ui/LogicOperator/index.js.map +2 -2
- package/dist/lib/ui/YkButton/index.d.ts +1 -1
- package/dist/lib/ui/YkButton/index.js.map +2 -2
- package/dist/lib/ui/YkCard/index.d.ts +1 -1
- package/dist/lib/ui/YkCard/index.js.map +2 -2
- package/dist/lib/ui/YkCheckbox/index.d.ts +1 -1
- package/dist/lib/ui/YkCheckbox/index.js.map +2 -2
- package/dist/lib/ui/YkDescriptions/index.d.ts +1 -1
- package/dist/lib/ui/YkDescriptions/index.js.map +2 -2
- package/dist/lib/ui/YkPagination/index.d.ts +1 -1
- package/dist/lib/ui/YkPagination/index.js.map +2 -2
- package/dist/lib/ui/YkRadio/index.d.ts +1 -1
- package/dist/lib/ui/YkRadio/index.js.map +2 -2
- package/dist/lib/ui/YkSegmented/index.d.ts +1 -1
- package/dist/lib/ui/YkSegmented/index.js.map +2 -2
- package/dist/lib/ui/YkSelect/index.d.ts +1 -1
- package/dist/lib/ui/YkSelect/index.js.map +2 -2
- package/dist/lib/ui/YkSpin/index.d.ts +1 -1
- package/dist/lib/ui/YkSpin/index.js.map +2 -2
- package/dist/lib/ui/YkStatistic/index.d.ts +1 -1
- package/dist/lib/ui/YkStatistic/index.js.map +2 -2
- package/dist/lib/ui/YkSwitch/index.d.ts +1 -1
- package/dist/lib/ui/YkSwitch/index.js.map +2 -2
- package/dist/lib/ui/YkTabs/index.d.ts +1 -1
- package/dist/lib/ui/YkTabs/index.js.map +2 -2
- package/dist/lib/ui/YkTooltip/index.d.ts +1 -1
- package/dist/lib/ui/YkTooltip/index.js.map +2 -2
- package/dist/lib/utils/styleUtils.js.map +2 -2
- package/dist/lib/utils/ykStorybookDoc.d.ts +15 -0
- package/dist/lib/utils/ykStorybookDoc.js +23 -1
- package/dist/lib/utils/ykStorybookDoc.js.map +2 -2
- package/package.json +151 -144
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
2
4
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
6
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -14,6 +16,7 @@ var __spreadValues = (a, b) => {
|
|
|
14
16
|
}
|
|
15
17
|
return a;
|
|
16
18
|
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
17
20
|
var __async = (__this, __arguments, generator) => {
|
|
18
21
|
return new Promise((resolve, reject) => {
|
|
19
22
|
var fulfilled = (value) => {
|
|
@@ -37,41 +40,49 @@ var __async = (__this, __arguments, generator) => {
|
|
|
37
40
|
|
|
38
41
|
// src/business/AiChat/index.tsx
|
|
39
42
|
import {
|
|
40
|
-
|
|
43
|
+
CloseOutlined,
|
|
44
|
+
CompressOutlined,
|
|
41
45
|
CopyOutlined,
|
|
42
46
|
DeleteOutlined,
|
|
43
|
-
|
|
47
|
+
ExpandOutlined,
|
|
48
|
+
FileImageOutlined,
|
|
44
49
|
MenuOutlined,
|
|
45
50
|
MessageOutlined,
|
|
51
|
+
PaperClipOutlined,
|
|
46
52
|
PlusOutlined,
|
|
47
53
|
ReloadOutlined,
|
|
48
54
|
SendOutlined,
|
|
49
|
-
StopOutlined
|
|
50
|
-
SwitcherOutlined
|
|
55
|
+
StopOutlined
|
|
51
56
|
} from "@ant-design/icons";
|
|
52
|
-
import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography } from "antd";
|
|
57
|
+
import { Button, Input, List, message, Popconfirm, Space, Tooltip, Typography, Upload } from "antd";
|
|
53
58
|
import React, { useCallback, useEffect, useRef, useState } from "react";
|
|
59
|
+
import AiChatLogo from "./aichat-logo.svg";
|
|
60
|
+
import styles from "./index.module.less";
|
|
61
|
+
import { generateSuggestions, isTaskCreationIntent, recognizeIntent } from "./intentRecognizer";
|
|
54
62
|
import MarkdownRender from "./MarkdownRender";
|
|
55
63
|
import { useAiChat } from "./useAiChat";
|
|
56
64
|
import { useTaskWorkflow } from "./useTaskWorkflow";
|
|
57
|
-
import {
|
|
65
|
+
import { generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription, recognizeIntent as recognizeIntent2 } from "./intentRecognizer";
|
|
66
|
+
import { delay, NavigationManager } from "./navigationManager";
|
|
58
67
|
import { useAiChat as useAiChat2 } from "./useAiChat";
|
|
59
68
|
import { useTaskWorkflow as useTaskWorkflow2 } from "./useTaskWorkflow";
|
|
60
|
-
import { recognizeIntent as recognizeIntent2, generateSuggestions as generateSuggestions2, isTaskCreationIntent as isTaskCreationIntent2, parseTaskDescription } from "./intentRecognizer";
|
|
61
|
-
import { NavigationManager, delay } from "./navigationManager";
|
|
62
69
|
var { TextArea } = Input;
|
|
63
70
|
var { Title } = Typography;
|
|
64
71
|
var AiChat = ({
|
|
65
72
|
apiPath = "/api/ai/chat-stream",
|
|
66
73
|
storageKey = "ai_chat_sessions",
|
|
67
|
-
position = { bottom: 24, right: 24 },
|
|
74
|
+
position: initialPosition = { bottom: 24, right: 24 },
|
|
68
75
|
buttonSize = 56,
|
|
69
76
|
zIndex = 1080,
|
|
70
77
|
showSessionPanel = true,
|
|
71
|
-
showExport = true,
|
|
72
78
|
onBeforeSend,
|
|
73
79
|
onError,
|
|
74
80
|
onSuccess,
|
|
81
|
+
onFetchSessions,
|
|
82
|
+
onFetchSessionDetail,
|
|
83
|
+
onCreateSession,
|
|
84
|
+
onSendMessage,
|
|
85
|
+
onUploadFile,
|
|
75
86
|
className,
|
|
76
87
|
style,
|
|
77
88
|
renderTrigger,
|
|
@@ -93,22 +104,21 @@ var AiChat = ({
|
|
|
93
104
|
sendQuestion,
|
|
94
105
|
regenerateAnswer,
|
|
95
106
|
deleteSingleMsg,
|
|
96
|
-
clearCurrentSession,
|
|
97
|
-
exportCurrentSession,
|
|
98
107
|
cancelRequest,
|
|
99
108
|
toggleVisible
|
|
100
|
-
} = useAiChat({
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
109
|
+
} = useAiChat({
|
|
110
|
+
apiPath,
|
|
111
|
+
storageKey,
|
|
112
|
+
onBeforeSend,
|
|
113
|
+
onError,
|
|
114
|
+
onSuccess,
|
|
115
|
+
onFetchSessions,
|
|
116
|
+
onFetchSessionDetail,
|
|
117
|
+
onCreateSession,
|
|
118
|
+
onSendMessage,
|
|
119
|
+
onUploadFile
|
|
120
|
+
});
|
|
121
|
+
const { updateUrlWithTaskId, executeTaskCreationWorkflow } = useTaskWorkflow({
|
|
112
122
|
enabled: taskWorkflow == null ? void 0 : taskWorkflow.enabled,
|
|
113
123
|
createTaskApi: taskWorkflow == null ? void 0 : taskWorkflow.createTaskApi,
|
|
114
124
|
supportedTaskTypes: taskWorkflow == null ? void 0 : taskWorkflow.supportedTaskTypes,
|
|
@@ -116,14 +126,8 @@ var AiChat = ({
|
|
|
116
126
|
refreshDelay: navConfig == null ? void 0 : navConfig.refreshDelay,
|
|
117
127
|
taskIdParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskIdParamName,
|
|
118
128
|
taskTypeParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskTypeParamName,
|
|
119
|
-
onTaskCreated: (taskId
|
|
129
|
+
onTaskCreated: (taskId) => {
|
|
120
130
|
if (activeSession) {
|
|
121
|
-
const systemMsg = {
|
|
122
|
-
id: `${Date.now()}_sys`,
|
|
123
|
-
role: "system",
|
|
124
|
-
content: `任务创建成功,ID: ${taskId}`,
|
|
125
|
-
taskId
|
|
126
|
-
};
|
|
127
131
|
}
|
|
128
132
|
},
|
|
129
133
|
onError
|
|
@@ -131,11 +135,62 @@ var AiChat = ({
|
|
|
131
135
|
const [inputValue, setInputValue] = useState("");
|
|
132
136
|
const [showSessions, setShowSessions] = useState(false);
|
|
133
137
|
const [suggestions, setSuggestions] = useState([]);
|
|
138
|
+
const [fileList, setFileList] = useState([]);
|
|
139
|
+
const [isMaximized, setIsMaximized] = useState(false);
|
|
140
|
+
const [dialogPosition, setDialogPosition] = useState({ x: 0, y: 0 });
|
|
141
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
142
|
+
const dragOffset = useRef({ x: 0, y: 0 });
|
|
134
143
|
const messagesEndRef = useRef(null);
|
|
144
|
+
const triggerRef = useRef(null);
|
|
135
145
|
useEffect(() => {
|
|
136
146
|
var _a;
|
|
137
147
|
(_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
138
148
|
}, [activeSession == null ? void 0 : activeSession.messages]);
|
|
149
|
+
const handleTriggerMouseDown = useCallback(
|
|
150
|
+
(e) => {
|
|
151
|
+
if (visible)
|
|
152
|
+
return;
|
|
153
|
+
const target = e.target;
|
|
154
|
+
if (target.closest(".ant-upload, .ant-btn"))
|
|
155
|
+
return;
|
|
156
|
+
e.preventDefault();
|
|
157
|
+
const triggerEl = triggerRef.current;
|
|
158
|
+
if (!triggerEl)
|
|
159
|
+
return;
|
|
160
|
+
const rect = triggerEl.getBoundingClientRect();
|
|
161
|
+
dragOffset.current = {
|
|
162
|
+
x: e.clientX - rect.left,
|
|
163
|
+
y: e.clientY - rect.top
|
|
164
|
+
};
|
|
165
|
+
setIsDragging(true);
|
|
166
|
+
},
|
|
167
|
+
[visible]
|
|
168
|
+
);
|
|
169
|
+
const handleTriggerMouseMove = useCallback(
|
|
170
|
+
(e) => {
|
|
171
|
+
if (!isDragging || visible)
|
|
172
|
+
return;
|
|
173
|
+
setDialogPosition({
|
|
174
|
+
x: e.clientX - dragOffset.current.x,
|
|
175
|
+
y: e.clientY - dragOffset.current.y
|
|
176
|
+
});
|
|
177
|
+
},
|
|
178
|
+
[isDragging, visible]
|
|
179
|
+
);
|
|
180
|
+
const handleTriggerMouseUp = useCallback(() => {
|
|
181
|
+
setIsDragging(false);
|
|
182
|
+
}, []);
|
|
183
|
+
useEffect(() => {
|
|
184
|
+
if (isDragging && !visible) {
|
|
185
|
+
document.addEventListener("mousemove", handleTriggerMouseMove);
|
|
186
|
+
document.addEventListener("mouseup", handleTriggerMouseUp);
|
|
187
|
+
return () => {
|
|
188
|
+
document.removeEventListener("mousemove", handleTriggerMouseMove);
|
|
189
|
+
document.removeEventListener("mouseup", handleTriggerMouseUp);
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
return void 0;
|
|
193
|
+
}, [isDragging, visible, handleTriggerMouseMove, handleTriggerMouseUp]);
|
|
139
194
|
const handleInputChange = useCallback((e) => {
|
|
140
195
|
const value = e.target.value;
|
|
141
196
|
setInputValue(value);
|
|
@@ -147,25 +202,70 @@ var AiChat = ({
|
|
|
147
202
|
setSuggestions([]);
|
|
148
203
|
}
|
|
149
204
|
}, []);
|
|
205
|
+
const handleFileChange = useCallback(
|
|
206
|
+
(info) => __async(void 0, null, function* () {
|
|
207
|
+
const uploadFile = info.file;
|
|
208
|
+
if (!uploadFile || !uploadFile.originFileObj) {
|
|
209
|
+
setFileList(info.fileList);
|
|
210
|
+
return;
|
|
211
|
+
}
|
|
212
|
+
const file = uploadFile.originFileObj;
|
|
213
|
+
const isImage = file.type.startsWith("image/");
|
|
214
|
+
const fileType = isImage ? "image" : "document";
|
|
215
|
+
try {
|
|
216
|
+
if (onUploadFile && activeSession) {
|
|
217
|
+
const result = yield onUploadFile({
|
|
218
|
+
sessionId: activeSession.id,
|
|
219
|
+
file,
|
|
220
|
+
type: fileType
|
|
221
|
+
});
|
|
222
|
+
const uploadedFile = {
|
|
223
|
+
uid: file.name,
|
|
224
|
+
name: result.name || file.name,
|
|
225
|
+
status: "done",
|
|
226
|
+
url: result.url
|
|
227
|
+
};
|
|
228
|
+
setFileList([...fileList, uploadedFile]);
|
|
229
|
+
message.success(`${fileType === "image" ? "图片" : "文件"}上传成功`);
|
|
230
|
+
} else {
|
|
231
|
+
setFileList([...fileList, uploadFile]);
|
|
232
|
+
}
|
|
233
|
+
} catch (err) {
|
|
234
|
+
console.error("文件上传失败:", err);
|
|
235
|
+
message.error("文件上传失败");
|
|
236
|
+
setFileList(fileList.filter((f) => f.uid !== file.name));
|
|
237
|
+
}
|
|
238
|
+
}),
|
|
239
|
+
[fileList, activeSession, onUploadFile]
|
|
240
|
+
);
|
|
150
241
|
const handleSend = useCallback(() => __async(void 0, null, function* () {
|
|
151
|
-
if (!inputValue.trim()) {
|
|
152
|
-
message.warning("
|
|
242
|
+
if (!inputValue.trim() && fileList.length === 0) {
|
|
243
|
+
message.warning("请输入问题或上传文件");
|
|
153
244
|
return;
|
|
154
245
|
}
|
|
155
|
-
|
|
246
|
+
let content = inputValue.trim();
|
|
247
|
+
if (fileList.length > 0) {
|
|
248
|
+
const fileInfo = fileList.map((f) => f.name).join(", ");
|
|
249
|
+
content += `
|
|
250
|
+
[附件: ${fileInfo}]`;
|
|
251
|
+
}
|
|
156
252
|
setInputValue("");
|
|
157
253
|
setSuggestions([]);
|
|
254
|
+
setFileList([]);
|
|
158
255
|
const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
|
|
159
256
|
if (intentEnabled && isTaskCreationIntent(content)) {
|
|
160
257
|
yield executeTaskCreationWorkflow(content);
|
|
161
258
|
return;
|
|
162
259
|
}
|
|
163
260
|
sendQuestion(content);
|
|
164
|
-
}), [inputValue, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
261
|
+
}), [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
165
262
|
const copyMsg = (c) => {
|
|
166
263
|
navigator.clipboard.writeText(c);
|
|
167
264
|
message.success("复制成功");
|
|
168
265
|
};
|
|
266
|
+
const toggleMaximize = useCallback(() => {
|
|
267
|
+
setIsMaximized((prev) => !prev);
|
|
268
|
+
}, []);
|
|
169
269
|
const renderMsg = (item) => /* @__PURE__ */ React.createElement(
|
|
170
270
|
List.Item,
|
|
171
271
|
{
|
|
@@ -200,16 +300,29 @@ var AiChat = ({
|
|
|
200
300
|
flexShrink: 0
|
|
201
301
|
}
|
|
202
302
|
}
|
|
203
|
-
)) : item.role === "system" ? /* @__PURE__ */ React.createElement(
|
|
204
|
-
|
|
303
|
+
)) : item.role === "system" ? /* @__PURE__ */ React.createElement(
|
|
304
|
+
"div",
|
|
205
305
|
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
306
|
+
style: {
|
|
307
|
+
display: "flex",
|
|
308
|
+
alignItems: "center",
|
|
309
|
+
gap: 8,
|
|
310
|
+
fontSize: 13
|
|
311
|
+
}
|
|
210
312
|
},
|
|
211
|
-
"
|
|
212
|
-
|
|
313
|
+
/* @__PURE__ */ React.createElement("span", { style: { color: "#52c41a" } }, "✓"),
|
|
314
|
+
/* @__PURE__ */ React.createElement("span", null, item.content),
|
|
315
|
+
item.taskId && /* @__PURE__ */ React.createElement(
|
|
316
|
+
Button,
|
|
317
|
+
{
|
|
318
|
+
type: "link",
|
|
319
|
+
size: "small",
|
|
320
|
+
style: { padding: 0, fontSize: 12 },
|
|
321
|
+
onClick: () => updateUrlWithTaskId(item.taskId)
|
|
322
|
+
},
|
|
323
|
+
"查看任务"
|
|
324
|
+
)
|
|
325
|
+
) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ React.createElement(MarkdownRender, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ React.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ React.createElement(Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ React.createElement(Tooltip, { title: "复制" }, /* @__PURE__ */ React.createElement(CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ React.createElement(Tooltip, { title: "重新生成" }, /* @__PURE__ */ React.createElement(ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
|
|
213
326
|
)
|
|
214
327
|
);
|
|
215
328
|
const renderSession = (s) => /* @__PURE__ */ React.createElement(
|
|
@@ -221,14 +334,14 @@ var AiChat = ({
|
|
|
221
334
|
return;
|
|
222
335
|
}
|
|
223
336
|
switchSession(s.id);
|
|
224
|
-
setShowSessions(false);
|
|
225
337
|
},
|
|
226
338
|
style: {
|
|
227
339
|
padding: "10px 12px",
|
|
228
340
|
borderRadius: 8,
|
|
229
341
|
cursor: "pointer",
|
|
230
342
|
backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
|
|
231
|
-
transition: "all 0.2s"
|
|
343
|
+
transition: "all 0.2s",
|
|
344
|
+
marginBottom: 8
|
|
232
345
|
}
|
|
233
346
|
},
|
|
234
347
|
/* @__PURE__ */ React.createElement(
|
|
@@ -273,66 +386,113 @@ var AiChat = ({
|
|
|
273
386
|
)
|
|
274
387
|
)
|
|
275
388
|
);
|
|
389
|
+
const getDialogStyle = () => {
|
|
390
|
+
if (isMaximized) {
|
|
391
|
+
return {
|
|
392
|
+
position: "fixed",
|
|
393
|
+
top: 0,
|
|
394
|
+
left: 0,
|
|
395
|
+
width: "100vw",
|
|
396
|
+
height: "100vh",
|
|
397
|
+
borderRadius: 0
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
const baseStyle = {
|
|
401
|
+
position: "relative",
|
|
402
|
+
width: showSessions ? 960 : 720,
|
|
403
|
+
height: 680,
|
|
404
|
+
borderRadius: 12
|
|
405
|
+
};
|
|
406
|
+
if (dialogPosition.x !== 0 || dialogPosition.y !== 0) {
|
|
407
|
+
return __spreadProps(__spreadValues({}, baseStyle), {
|
|
408
|
+
transform: `translate(${dialogPosition.x}px, ${dialogPosition.y}px)`
|
|
409
|
+
});
|
|
410
|
+
}
|
|
411
|
+
return baseStyle;
|
|
412
|
+
};
|
|
276
413
|
return /* @__PURE__ */ React.createElement(
|
|
277
414
|
"div",
|
|
278
415
|
{
|
|
279
416
|
className,
|
|
280
417
|
style: __spreadValues({
|
|
281
418
|
position: "fixed",
|
|
282
|
-
bottom:
|
|
283
|
-
right:
|
|
419
|
+
bottom: initialPosition.bottom,
|
|
420
|
+
right: initialPosition.right,
|
|
284
421
|
zIndex,
|
|
285
422
|
display: "flex",
|
|
286
423
|
flexDirection: "column",
|
|
287
|
-
alignItems: "flex-end"
|
|
424
|
+
alignItems: "flex-end",
|
|
425
|
+
transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0
|
|
288
426
|
}, style)
|
|
289
427
|
},
|
|
290
|
-
!visible ? renderTrigger ? /* @__PURE__ */ React.createElement(
|
|
291
|
-
|
|
428
|
+
!visible ? renderTrigger ? /* @__PURE__ */ React.createElement(
|
|
429
|
+
"div",
|
|
292
430
|
{
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
width: buttonSize,
|
|
300
|
-
height: buttonSize,
|
|
301
|
-
boxShadow: "0 4px 16px rgba(22, 119, 255, 0.4)"
|
|
302
|
-
}
|
|
303
|
-
}
|
|
431
|
+
ref: triggerRef,
|
|
432
|
+
onMouseDown: handleTriggerMouseDown,
|
|
433
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
434
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
435
|
+
},
|
|
436
|
+
renderTrigger
|
|
304
437
|
) : /* @__PURE__ */ React.createElement(
|
|
305
438
|
"div",
|
|
306
439
|
{
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
440
|
+
ref: triggerRef,
|
|
441
|
+
onMouseDown: handleTriggerMouseDown,
|
|
442
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
443
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
444
|
+
},
|
|
445
|
+
/* @__PURE__ */ React.createElement("div", { className: styles["ai-chat-btn"] }, /* @__PURE__ */ React.createElement("img", { src: AiChatLogo, width: 28, height: 28 }))
|
|
446
|
+
) : /* @__PURE__ */ React.createElement(
|
|
447
|
+
"div",
|
|
448
|
+
{
|
|
449
|
+
style: __spreadProps(__spreadValues({}, getDialogStyle()), {
|
|
310
450
|
background: "#fff",
|
|
311
|
-
borderRadius: 12,
|
|
312
451
|
boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
|
|
313
452
|
overflow: "hidden",
|
|
314
453
|
display: "flex",
|
|
315
454
|
flexDirection: "row",
|
|
316
|
-
marginBottom: 12,
|
|
317
|
-
transition: "
|
|
318
|
-
|
|
319
|
-
}
|
|
455
|
+
marginBottom: isMaximized ? 0 : 12,
|
|
456
|
+
transition: "all 0.3s ease"
|
|
457
|
+
})
|
|
320
458
|
},
|
|
321
|
-
/* @__PURE__ */ React.createElement(
|
|
322
|
-
|
|
459
|
+
showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
|
|
460
|
+
"div",
|
|
323
461
|
{
|
|
324
|
-
type: "text",
|
|
325
|
-
icon: /* @__PURE__ */ React.createElement(SwitcherOutlined, null),
|
|
326
|
-
onClick: () => toggleVisible(false),
|
|
327
462
|
style: {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
463
|
+
width: 280,
|
|
464
|
+
borderRight: "1px solid #f0f0f0",
|
|
465
|
+
background: "#fafafa",
|
|
466
|
+
display: "flex",
|
|
467
|
+
flexDirection: "column",
|
|
468
|
+
flexShrink: 0
|
|
334
469
|
}
|
|
335
|
-
}
|
|
470
|
+
},
|
|
471
|
+
/* @__PURE__ */ React.createElement(
|
|
472
|
+
"div",
|
|
473
|
+
{
|
|
474
|
+
style: {
|
|
475
|
+
padding: "12px 16px",
|
|
476
|
+
borderBottom: "1px solid #f0f0f0",
|
|
477
|
+
display: "flex",
|
|
478
|
+
justifyContent: "space-between",
|
|
479
|
+
alignItems: "center"
|
|
480
|
+
}
|
|
481
|
+
},
|
|
482
|
+
/* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0, fontSize: 16 } }, "历史会话"),
|
|
483
|
+
/* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => setShowSessions(false) })
|
|
484
|
+
),
|
|
485
|
+
/* @__PURE__ */ React.createElement("div", { style: { flex: 1, padding: 16, overflowY: "auto" } }, /* @__PURE__ */ React.createElement(
|
|
486
|
+
Button,
|
|
487
|
+
{
|
|
488
|
+
type: "primary",
|
|
489
|
+
block: true,
|
|
490
|
+
icon: /* @__PURE__ */ React.createElement(PlusOutlined, null),
|
|
491
|
+
onClick: createNewSession,
|
|
492
|
+
style: { marginBottom: 12 }
|
|
493
|
+
},
|
|
494
|
+
"新建会话"
|
|
495
|
+
), /* @__PURE__ */ React.createElement(List, { dataSource: sessions, renderItem: renderSession, locale: { emptyText: "暂无会话" } }))
|
|
336
496
|
),
|
|
337
497
|
/* @__PURE__ */ React.createElement(
|
|
338
498
|
"div",
|
|
@@ -347,6 +507,7 @@ var AiChat = ({
|
|
|
347
507
|
renderHeader || /* @__PURE__ */ React.createElement(
|
|
348
508
|
"div",
|
|
349
509
|
{
|
|
510
|
+
className: "ai-chat-header",
|
|
350
511
|
style: {
|
|
351
512
|
padding: "12px 16px",
|
|
352
513
|
background: "#fafafa",
|
|
@@ -357,16 +518,25 @@ var AiChat = ({
|
|
|
357
518
|
flexShrink: 0
|
|
358
519
|
}
|
|
359
520
|
},
|
|
360
|
-
/* @__PURE__ */ React.createElement(Space, null,
|
|
361
|
-
/* @__PURE__ */ React.createElement(Space, null, showExport && /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: exportCurrentSession }, "导出"), (taskWorkflow == null ? void 0 : taskWorkflow.enabled) && /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(ExportOutlined, null), onClick: () => exportTasks("json") }, "导出任务")), showSessionPanel && /* @__PURE__ */ React.createElement(
|
|
521
|
+
/* @__PURE__ */ React.createElement(Space, null, showSessionPanel && /* @__PURE__ */ React.createElement(
|
|
362
522
|
Button,
|
|
363
523
|
{
|
|
364
524
|
type: showSessions ? "primary" : "text",
|
|
365
525
|
icon: /* @__PURE__ */ React.createElement(MenuOutlined, null),
|
|
526
|
+
size: "small",
|
|
366
527
|
onClick: () => setShowSessions(!showSessions)
|
|
367
528
|
},
|
|
368
|
-
showSessions ? "
|
|
369
|
-
))
|
|
529
|
+
showSessions ? "收起" : "会话"
|
|
530
|
+
), /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(PlusOutlined, null), onClick: createNewSession, size: "small" }, "新会话")),
|
|
531
|
+
/* @__PURE__ */ React.createElement(Space, null, /* @__PURE__ */ React.createElement(Tooltip, { title: isMaximized ? "还原" : "最大化" }, /* @__PURE__ */ React.createElement(
|
|
532
|
+
Button,
|
|
533
|
+
{
|
|
534
|
+
type: "text",
|
|
535
|
+
icon: isMaximized ? /* @__PURE__ */ React.createElement(CompressOutlined, null) : /* @__PURE__ */ React.createElement(ExpandOutlined, null),
|
|
536
|
+
onClick: toggleMaximize,
|
|
537
|
+
size: "small"
|
|
538
|
+
}
|
|
539
|
+
)), /* @__PURE__ */ React.createElement(Tooltip, { title: "关闭" }, /* @__PURE__ */ React.createElement(Button, { type: "text", icon: /* @__PURE__ */ React.createElement(CloseOutlined, null), onClick: () => toggleVisible(false), size: "small" })))
|
|
370
540
|
),
|
|
371
541
|
/* @__PURE__ */ React.createElement(
|
|
372
542
|
"div",
|
|
@@ -387,7 +557,7 @@ var AiChat = ({
|
|
|
387
557
|
}
|
|
388
558
|
},
|
|
389
559
|
/* @__PURE__ */ React.createElement(MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
|
|
390
|
-
/* @__PURE__ */ React.createElement("div", { style: { marginTop: 16 } }, "开始你的 AI 对话"),
|
|
560
|
+
/* @__PURE__ */ React.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
|
|
391
561
|
/* @__PURE__ */ React.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
|
|
392
562
|
/* @__PURE__ */ React.createElement(Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
|
|
393
563
|
) : /* @__PURE__ */ React.createElement(List, { dataSource: activeSession.messages, renderItem: renderMsg }),
|
|
@@ -425,7 +595,33 @@ var AiChat = ({
|
|
|
425
595
|
suggestion
|
|
426
596
|
))
|
|
427
597
|
),
|
|
428
|
-
/* @__PURE__ */ React.createElement(
|
|
598
|
+
fileList.length > 0 && /* @__PURE__ */ React.createElement("div", { style: { marginBottom: 8 } }, fileList.map((file) => /* @__PURE__ */ React.createElement(
|
|
599
|
+
"div",
|
|
600
|
+
{
|
|
601
|
+
key: file.uid,
|
|
602
|
+
style: {
|
|
603
|
+
display: "inline-block",
|
|
604
|
+
padding: "4px 8px",
|
|
605
|
+
background: "#e6f7ff",
|
|
606
|
+
borderRadius: 4,
|
|
607
|
+
marginRight: 8,
|
|
608
|
+
fontSize: 12
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
file.name,
|
|
612
|
+
/* @__PURE__ */ React.createElement(
|
|
613
|
+
CloseOutlined,
|
|
614
|
+
{
|
|
615
|
+
style: {
|
|
616
|
+
marginLeft: 8,
|
|
617
|
+
cursor: "pointer",
|
|
618
|
+
fontSize: 10
|
|
619
|
+
},
|
|
620
|
+
onClick: () => setFileList(fileList.filter((f) => f.uid !== file.uid))
|
|
621
|
+
}
|
|
622
|
+
)
|
|
623
|
+
))),
|
|
624
|
+
/* @__PURE__ */ React.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ React.createElement(
|
|
429
625
|
TextArea,
|
|
430
626
|
{
|
|
431
627
|
value: inputValue,
|
|
@@ -438,69 +634,58 @@ var AiChat = ({
|
|
|
438
634
|
handleSend();
|
|
439
635
|
}
|
|
440
636
|
},
|
|
441
|
-
style: {
|
|
637
|
+
style: {
|
|
638
|
+
marginBottom: 8,
|
|
639
|
+
borderRadius: 8,
|
|
640
|
+
paddingRight: 80
|
|
641
|
+
},
|
|
442
642
|
disabled: loading
|
|
443
643
|
}
|
|
444
|
-
),
|
|
445
|
-
/* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "取消"), /* @__PURE__ */ React.createElement(
|
|
446
|
-
Button,
|
|
447
|
-
{
|
|
448
|
-
type: "primary",
|
|
449
|
-
icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
|
|
450
|
-
onClick: handleSend,
|
|
451
|
-
loading,
|
|
452
|
-
disabled: !inputValue.trim(),
|
|
453
|
-
size: "small"
|
|
454
|
-
},
|
|
455
|
-
"发送"
|
|
456
|
-
)))
|
|
457
|
-
),
|
|
458
|
-
showSessionPanel && showSessions && /* @__PURE__ */ React.createElement(
|
|
459
|
-
"div",
|
|
460
|
-
{
|
|
461
|
-
style: {
|
|
462
|
-
width: 240,
|
|
463
|
-
borderLeft: "1px solid #f0f0f0",
|
|
464
|
-
padding: 16,
|
|
465
|
-
background: "#fafafa",
|
|
466
|
-
overflowY: "auto",
|
|
467
|
-
flexShrink: 0
|
|
468
|
-
}
|
|
469
|
-
},
|
|
470
|
-
/* @__PURE__ */ React.createElement(
|
|
644
|
+
), /* @__PURE__ */ React.createElement(
|
|
471
645
|
"div",
|
|
472
646
|
{
|
|
473
647
|
style: {
|
|
648
|
+
position: "absolute",
|
|
649
|
+
right: 12,
|
|
650
|
+
bottom: 16,
|
|
474
651
|
display: "flex",
|
|
475
|
-
|
|
476
|
-
alignItems: "center",
|
|
477
|
-
marginBottom: 16
|
|
652
|
+
gap: 8
|
|
478
653
|
}
|
|
479
654
|
},
|
|
480
|
-
/* @__PURE__ */ React.createElement(Title, { level: 5, style: { margin: 0 } }, "我的会话"),
|
|
481
655
|
/* @__PURE__ */ React.createElement(
|
|
482
|
-
|
|
656
|
+
Upload,
|
|
483
657
|
{
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
style: { padding: 0 }
|
|
658
|
+
fileList,
|
|
659
|
+
onChange: handleFileChange,
|
|
660
|
+
beforeUpload: () => false,
|
|
661
|
+
showUploadList: false,
|
|
662
|
+
accept: "image/*"
|
|
490
663
|
},
|
|
491
|
-
"
|
|
664
|
+
/* @__PURE__ */ React.createElement(Tooltip, { title: "上传图片" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(FileImageOutlined, null) }))
|
|
665
|
+
),
|
|
666
|
+
/* @__PURE__ */ React.createElement(
|
|
667
|
+
Upload,
|
|
668
|
+
{
|
|
669
|
+
fileList,
|
|
670
|
+
onChange: handleFileChange,
|
|
671
|
+
beforeUpload: () => false,
|
|
672
|
+
showUploadList: false
|
|
673
|
+
},
|
|
674
|
+
/* @__PURE__ */ React.createElement(Tooltip, { title: "上传文件" }, /* @__PURE__ */ React.createElement(Button, { type: "text", size: "small", icon: /* @__PURE__ */ React.createElement(PaperClipOutlined, null) }))
|
|
492
675
|
)
|
|
493
|
-
),
|
|
494
|
-
/* @__PURE__ */ React.createElement(
|
|
495
|
-
|
|
676
|
+
)),
|
|
677
|
+
/* @__PURE__ */ React.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ React.createElement(Space, null, loading && /* @__PURE__ */ React.createElement(Button, { danger: true, icon: /* @__PURE__ */ React.createElement(StopOutlined, null), onClick: cancelRequest, size: "small" }, "终止"), /* @__PURE__ */ React.createElement(
|
|
678
|
+
Button,
|
|
496
679
|
{
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
680
|
+
type: "primary",
|
|
681
|
+
icon: /* @__PURE__ */ React.createElement(SendOutlined, null),
|
|
682
|
+
onClick: handleSend,
|
|
683
|
+
loading,
|
|
684
|
+
disabled: !inputValue.trim() && fileList.length === 0,
|
|
685
|
+
size: "small"
|
|
686
|
+
},
|
|
687
|
+
"发送"
|
|
688
|
+
)))
|
|
504
689
|
)
|
|
505
690
|
)
|
|
506
691
|
)
|