@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
|
@@ -43,27 +43,33 @@ module.exports = __toCommonJS(AiChat_exports);
|
|
|
43
43
|
var import_icons = require("@ant-design/icons");
|
|
44
44
|
var import_antd = require("antd");
|
|
45
45
|
var import_react = __toESM(require("react"));
|
|
46
|
+
var import_aichat_logo = __toESM(require("./aichat-logo.svg"));
|
|
47
|
+
var import_index_module = __toESM(require("./index.module.less"));
|
|
48
|
+
var import_intentRecognizer = require("./intentRecognizer");
|
|
46
49
|
var import_MarkdownRender = __toESM(require("./MarkdownRender"));
|
|
47
50
|
var import_useAiChat = require("./useAiChat");
|
|
48
51
|
var import_useTaskWorkflow = require("./useTaskWorkflow");
|
|
49
|
-
var import_intentRecognizer = require("./intentRecognizer");
|
|
50
|
-
var import_useAiChat2 = require("./useAiChat");
|
|
51
|
-
var import_useTaskWorkflow2 = require("./useTaskWorkflow");
|
|
52
52
|
var import_intentRecognizer2 = require("./intentRecognizer");
|
|
53
53
|
var import_navigationManager = require("./navigationManager");
|
|
54
|
+
var import_useAiChat2 = require("./useAiChat");
|
|
55
|
+
var import_useTaskWorkflow2 = require("./useTaskWorkflow");
|
|
54
56
|
var { TextArea } = import_antd.Input;
|
|
55
57
|
var { Title } = import_antd.Typography;
|
|
56
58
|
var AiChat = ({
|
|
57
59
|
apiPath = "/api/ai/chat-stream",
|
|
58
60
|
storageKey = "ai_chat_sessions",
|
|
59
|
-
position = { bottom: 24, right: 24 },
|
|
61
|
+
position: initialPosition = { bottom: 24, right: 24 },
|
|
60
62
|
buttonSize = 56,
|
|
61
63
|
zIndex = 1080,
|
|
62
64
|
showSessionPanel = true,
|
|
63
|
-
showExport = true,
|
|
64
65
|
onBeforeSend,
|
|
65
66
|
onError,
|
|
66
67
|
onSuccess,
|
|
68
|
+
onFetchSessions,
|
|
69
|
+
onFetchSessionDetail,
|
|
70
|
+
onCreateSession,
|
|
71
|
+
onSendMessage,
|
|
72
|
+
onUploadFile,
|
|
67
73
|
className,
|
|
68
74
|
style,
|
|
69
75
|
renderTrigger,
|
|
@@ -85,22 +91,21 @@ var AiChat = ({
|
|
|
85
91
|
sendQuestion,
|
|
86
92
|
regenerateAnswer,
|
|
87
93
|
deleteSingleMsg,
|
|
88
|
-
clearCurrentSession,
|
|
89
|
-
exportCurrentSession,
|
|
90
94
|
cancelRequest,
|
|
91
95
|
toggleVisible
|
|
92
|
-
} = (0, import_useAiChat.useAiChat)({
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
96
|
+
} = (0, import_useAiChat.useAiChat)({
|
|
97
|
+
apiPath,
|
|
98
|
+
storageKey,
|
|
99
|
+
onBeforeSend,
|
|
100
|
+
onError,
|
|
101
|
+
onSuccess,
|
|
102
|
+
onFetchSessions,
|
|
103
|
+
onFetchSessionDetail,
|
|
104
|
+
onCreateSession,
|
|
105
|
+
onSendMessage,
|
|
106
|
+
onUploadFile
|
|
107
|
+
});
|
|
108
|
+
const { updateUrlWithTaskId, executeTaskCreationWorkflow } = (0, import_useTaskWorkflow.useTaskWorkflow)({
|
|
104
109
|
enabled: taskWorkflow == null ? void 0 : taskWorkflow.enabled,
|
|
105
110
|
createTaskApi: taskWorkflow == null ? void 0 : taskWorkflow.createTaskApi,
|
|
106
111
|
supportedTaskTypes: taskWorkflow == null ? void 0 : taskWorkflow.supportedTaskTypes,
|
|
@@ -108,14 +113,8 @@ var AiChat = ({
|
|
|
108
113
|
refreshDelay: navConfig == null ? void 0 : navConfig.refreshDelay,
|
|
109
114
|
taskIdParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskIdParamName,
|
|
110
115
|
taskTypeParamName: taskWorkflow == null ? void 0 : taskWorkflow.taskTypeParamName,
|
|
111
|
-
onTaskCreated: (taskId
|
|
116
|
+
onTaskCreated: (taskId) => {
|
|
112
117
|
if (activeSession) {
|
|
113
|
-
const systemMsg = {
|
|
114
|
-
id: `${Date.now()}_sys`,
|
|
115
|
-
role: "system",
|
|
116
|
-
content: `任务创建成功,ID: ${taskId}`,
|
|
117
|
-
taskId
|
|
118
|
-
};
|
|
119
118
|
}
|
|
120
119
|
},
|
|
121
120
|
onError
|
|
@@ -123,11 +122,62 @@ var AiChat = ({
|
|
|
123
122
|
const [inputValue, setInputValue] = (0, import_react.useState)("");
|
|
124
123
|
const [showSessions, setShowSessions] = (0, import_react.useState)(false);
|
|
125
124
|
const [suggestions, setSuggestions] = (0, import_react.useState)([]);
|
|
125
|
+
const [fileList, setFileList] = (0, import_react.useState)([]);
|
|
126
|
+
const [isMaximized, setIsMaximized] = (0, import_react.useState)(false);
|
|
127
|
+
const [dialogPosition, setDialogPosition] = (0, import_react.useState)({ x: 0, y: 0 });
|
|
128
|
+
const [isDragging, setIsDragging] = (0, import_react.useState)(false);
|
|
129
|
+
const dragOffset = (0, import_react.useRef)({ x: 0, y: 0 });
|
|
126
130
|
const messagesEndRef = (0, import_react.useRef)(null);
|
|
131
|
+
const triggerRef = (0, import_react.useRef)(null);
|
|
127
132
|
(0, import_react.useEffect)(() => {
|
|
128
133
|
var _a;
|
|
129
134
|
(_a = messagesEndRef.current) == null ? void 0 : _a.scrollIntoView({ behavior: "smooth" });
|
|
130
135
|
}, [activeSession == null ? void 0 : activeSession.messages]);
|
|
136
|
+
const handleTriggerMouseDown = (0, import_react.useCallback)(
|
|
137
|
+
(e) => {
|
|
138
|
+
if (visible)
|
|
139
|
+
return;
|
|
140
|
+
const target = e.target;
|
|
141
|
+
if (target.closest(".ant-upload, .ant-btn"))
|
|
142
|
+
return;
|
|
143
|
+
e.preventDefault();
|
|
144
|
+
const triggerEl = triggerRef.current;
|
|
145
|
+
if (!triggerEl)
|
|
146
|
+
return;
|
|
147
|
+
const rect = triggerEl.getBoundingClientRect();
|
|
148
|
+
dragOffset.current = {
|
|
149
|
+
x: e.clientX - rect.left,
|
|
150
|
+
y: e.clientY - rect.top
|
|
151
|
+
};
|
|
152
|
+
setIsDragging(true);
|
|
153
|
+
},
|
|
154
|
+
[visible]
|
|
155
|
+
);
|
|
156
|
+
const handleTriggerMouseMove = (0, import_react.useCallback)(
|
|
157
|
+
(e) => {
|
|
158
|
+
if (!isDragging || visible)
|
|
159
|
+
return;
|
|
160
|
+
setDialogPosition({
|
|
161
|
+
x: e.clientX - dragOffset.current.x,
|
|
162
|
+
y: e.clientY - dragOffset.current.y
|
|
163
|
+
});
|
|
164
|
+
},
|
|
165
|
+
[isDragging, visible]
|
|
166
|
+
);
|
|
167
|
+
const handleTriggerMouseUp = (0, import_react.useCallback)(() => {
|
|
168
|
+
setIsDragging(false);
|
|
169
|
+
}, []);
|
|
170
|
+
(0, import_react.useEffect)(() => {
|
|
171
|
+
if (isDragging && !visible) {
|
|
172
|
+
document.addEventListener("mousemove", handleTriggerMouseMove);
|
|
173
|
+
document.addEventListener("mouseup", handleTriggerMouseUp);
|
|
174
|
+
return () => {
|
|
175
|
+
document.removeEventListener("mousemove", handleTriggerMouseMove);
|
|
176
|
+
document.removeEventListener("mouseup", handleTriggerMouseUp);
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return void 0;
|
|
180
|
+
}, [isDragging, visible, handleTriggerMouseMove, handleTriggerMouseUp]);
|
|
131
181
|
const handleInputChange = (0, import_react.useCallback)((e) => {
|
|
132
182
|
const value = e.target.value;
|
|
133
183
|
setInputValue(value);
|
|
@@ -139,25 +189,70 @@ var AiChat = ({
|
|
|
139
189
|
setSuggestions([]);
|
|
140
190
|
}
|
|
141
191
|
}, []);
|
|
192
|
+
const handleFileChange = (0, import_react.useCallback)(
|
|
193
|
+
async (info) => {
|
|
194
|
+
const uploadFile = info.file;
|
|
195
|
+
if (!uploadFile || !uploadFile.originFileObj) {
|
|
196
|
+
setFileList(info.fileList);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const file = uploadFile.originFileObj;
|
|
200
|
+
const isImage = file.type.startsWith("image/");
|
|
201
|
+
const fileType = isImage ? "image" : "document";
|
|
202
|
+
try {
|
|
203
|
+
if (onUploadFile && activeSession) {
|
|
204
|
+
const result = await onUploadFile({
|
|
205
|
+
sessionId: activeSession.id,
|
|
206
|
+
file,
|
|
207
|
+
type: fileType
|
|
208
|
+
});
|
|
209
|
+
const uploadedFile = {
|
|
210
|
+
uid: file.name,
|
|
211
|
+
name: result.name || file.name,
|
|
212
|
+
status: "done",
|
|
213
|
+
url: result.url
|
|
214
|
+
};
|
|
215
|
+
setFileList([...fileList, uploadedFile]);
|
|
216
|
+
import_antd.message.success(`${fileType === "image" ? "图片" : "文件"}上传成功`);
|
|
217
|
+
} else {
|
|
218
|
+
setFileList([...fileList, uploadFile]);
|
|
219
|
+
}
|
|
220
|
+
} catch (err) {
|
|
221
|
+
console.error("文件上传失败:", err);
|
|
222
|
+
import_antd.message.error("文件上传失败");
|
|
223
|
+
setFileList(fileList.filter((f) => f.uid !== file.name));
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
[fileList, activeSession, onUploadFile]
|
|
227
|
+
);
|
|
142
228
|
const handleSend = (0, import_react.useCallback)(async () => {
|
|
143
|
-
if (!inputValue.trim()) {
|
|
144
|
-
import_antd.message.warning("
|
|
229
|
+
if (!inputValue.trim() && fileList.length === 0) {
|
|
230
|
+
import_antd.message.warning("请输入问题或上传文件");
|
|
145
231
|
return;
|
|
146
232
|
}
|
|
147
|
-
|
|
233
|
+
let content = inputValue.trim();
|
|
234
|
+
if (fileList.length > 0) {
|
|
235
|
+
const fileInfo = fileList.map((f) => f.name).join(", ");
|
|
236
|
+
content += `
|
|
237
|
+
[附件: ${fileInfo}]`;
|
|
238
|
+
}
|
|
148
239
|
setInputValue("");
|
|
149
240
|
setSuggestions([]);
|
|
241
|
+
setFileList([]);
|
|
150
242
|
const intentEnabled = (intentConfig == null ? void 0 : intentConfig.enabled) !== false;
|
|
151
243
|
if (intentEnabled && (0, import_intentRecognizer.isTaskCreationIntent)(content)) {
|
|
152
244
|
await executeTaskCreationWorkflow(content);
|
|
153
245
|
return;
|
|
154
246
|
}
|
|
155
247
|
sendQuestion(content);
|
|
156
|
-
}, [inputValue, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
248
|
+
}, [inputValue, fileList, intentConfig == null ? void 0 : intentConfig.enabled, executeTaskCreationWorkflow, sendQuestion]);
|
|
157
249
|
const copyMsg = (c) => {
|
|
158
250
|
navigator.clipboard.writeText(c);
|
|
159
251
|
import_antd.message.success("复制成功");
|
|
160
252
|
};
|
|
253
|
+
const toggleMaximize = (0, import_react.useCallback)(() => {
|
|
254
|
+
setIsMaximized((prev) => !prev);
|
|
255
|
+
}, []);
|
|
161
256
|
const renderMsg = (item) => /* @__PURE__ */ import_react.default.createElement(
|
|
162
257
|
import_antd.List.Item,
|
|
163
258
|
{
|
|
@@ -192,16 +287,29 @@ var AiChat = ({
|
|
|
192
287
|
flexShrink: 0
|
|
193
288
|
}
|
|
194
289
|
}
|
|
195
|
-
)) : item.role === "system" ? /* @__PURE__ */ import_react.default.createElement(
|
|
196
|
-
|
|
290
|
+
)) : item.role === "system" ? /* @__PURE__ */ import_react.default.createElement(
|
|
291
|
+
"div",
|
|
197
292
|
{
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
293
|
+
style: {
|
|
294
|
+
display: "flex",
|
|
295
|
+
alignItems: "center",
|
|
296
|
+
gap: 8,
|
|
297
|
+
fontSize: 13
|
|
298
|
+
}
|
|
202
299
|
},
|
|
203
|
-
"
|
|
204
|
-
|
|
300
|
+
/* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#52c41a" } }, "✓"),
|
|
301
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, item.content),
|
|
302
|
+
item.taskId && /* @__PURE__ */ import_react.default.createElement(
|
|
303
|
+
import_antd.Button,
|
|
304
|
+
{
|
|
305
|
+
type: "link",
|
|
306
|
+
size: "small",
|
|
307
|
+
style: { padding: 0, fontSize: 12 },
|
|
308
|
+
onClick: () => updateUrlWithTaskId(item.taskId)
|
|
309
|
+
},
|
|
310
|
+
"查看任务"
|
|
311
|
+
)
|
|
312
|
+
) : /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { style: { minHeight: 20 } }, /* @__PURE__ */ import_react.default.createElement(import_MarkdownRender.default, { content: item.content, msgId: item.id, isAi: true, onDelete: deleteSingleMsg })), item.loading && /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#1677ff", fontSize: 12 } }, " 思考中..."), !item.loading && /* @__PURE__ */ import_react.default.createElement(import_antd.Space, { size: 8, style: { fontSize: 12, marginTop: 6, display: "flex" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "复制" }, /* @__PURE__ */ import_react.default.createElement(import_icons.CopyOutlined, { onClick: () => copyMsg(item.content), style: { cursor: "pointer", color: "#999" } })), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "重新生成" }, /* @__PURE__ */ import_react.default.createElement(import_icons.ReloadOutlined, { onClick: () => regenerateAnswer(item), style: { cursor: "pointer", color: "#999" } }))))
|
|
205
313
|
)
|
|
206
314
|
);
|
|
207
315
|
const renderSession = (s) => /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -213,14 +321,14 @@ var AiChat = ({
|
|
|
213
321
|
return;
|
|
214
322
|
}
|
|
215
323
|
switchSession(s.id);
|
|
216
|
-
setShowSessions(false);
|
|
217
324
|
},
|
|
218
325
|
style: {
|
|
219
326
|
padding: "10px 12px",
|
|
220
327
|
borderRadius: 8,
|
|
221
328
|
cursor: "pointer",
|
|
222
329
|
backgroundColor: (activeSession == null ? void 0 : activeSession.id) === s.id ? "#e6f7ff" : "#fff",
|
|
223
|
-
transition: "all 0.2s"
|
|
330
|
+
transition: "all 0.2s",
|
|
331
|
+
marginBottom: 8
|
|
224
332
|
}
|
|
225
333
|
},
|
|
226
334
|
/* @__PURE__ */ import_react.default.createElement(
|
|
@@ -265,67 +373,116 @@ var AiChat = ({
|
|
|
265
373
|
)
|
|
266
374
|
)
|
|
267
375
|
);
|
|
376
|
+
const getDialogStyle = () => {
|
|
377
|
+
if (isMaximized) {
|
|
378
|
+
return {
|
|
379
|
+
position: "fixed",
|
|
380
|
+
top: 0,
|
|
381
|
+
left: 0,
|
|
382
|
+
width: "100vw",
|
|
383
|
+
height: "100vh",
|
|
384
|
+
borderRadius: 0
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
const baseStyle = {
|
|
388
|
+
position: "relative",
|
|
389
|
+
width: showSessions ? 960 : 720,
|
|
390
|
+
height: 680,
|
|
391
|
+
borderRadius: 12
|
|
392
|
+
};
|
|
393
|
+
if (dialogPosition.x !== 0 || dialogPosition.y !== 0) {
|
|
394
|
+
return {
|
|
395
|
+
...baseStyle,
|
|
396
|
+
transform: `translate(${dialogPosition.x}px, ${dialogPosition.y}px)`
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
return baseStyle;
|
|
400
|
+
};
|
|
268
401
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
269
402
|
"div",
|
|
270
403
|
{
|
|
271
404
|
className,
|
|
272
405
|
style: {
|
|
273
406
|
position: "fixed",
|
|
274
|
-
bottom:
|
|
275
|
-
right:
|
|
407
|
+
bottom: initialPosition.bottom,
|
|
408
|
+
right: initialPosition.right,
|
|
276
409
|
zIndex,
|
|
277
410
|
display: "flex",
|
|
278
411
|
flexDirection: "column",
|
|
279
412
|
alignItems: "flex-end",
|
|
413
|
+
transform: dialogPosition.x !== 0 || dialogPosition.y !== 0 ? `translate(${dialogPosition.x}px, ${dialogPosition.y}px)` : void 0,
|
|
280
414
|
...style
|
|
281
415
|
}
|
|
282
416
|
},
|
|
283
|
-
!visible ? renderTrigger ? /* @__PURE__ */ import_react.default.createElement(
|
|
284
|
-
|
|
417
|
+
!visible ? renderTrigger ? /* @__PURE__ */ import_react.default.createElement(
|
|
418
|
+
"div",
|
|
285
419
|
{
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
420
|
+
ref: triggerRef,
|
|
421
|
+
onMouseDown: handleTriggerMouseDown,
|
|
422
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
423
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
424
|
+
},
|
|
425
|
+
renderTrigger
|
|
426
|
+
) : /* @__PURE__ */ import_react.default.createElement(
|
|
427
|
+
"div",
|
|
428
|
+
{
|
|
429
|
+
ref: triggerRef,
|
|
430
|
+
onMouseDown: handleTriggerMouseDown,
|
|
431
|
+
onClick: () => !isDragging && toggleVisible(true),
|
|
432
|
+
style: { cursor: isDragging ? "grabbing" : "grab" }
|
|
433
|
+
},
|
|
434
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default["ai-chat-btn"] }, /* @__PURE__ */ import_react.default.createElement("img", { src: import_aichat_logo.default, width: 28, height: 28 }))
|
|
297
435
|
) : /* @__PURE__ */ import_react.default.createElement(
|
|
298
436
|
"div",
|
|
299
437
|
{
|
|
300
438
|
style: {
|
|
301
|
-
|
|
302
|
-
height: 680,
|
|
439
|
+
...getDialogStyle(),
|
|
303
440
|
background: "#fff",
|
|
304
|
-
borderRadius: 12,
|
|
305
441
|
boxShadow: "0 4px 20px rgba(0,0,0,0.15)",
|
|
306
442
|
overflow: "hidden",
|
|
307
443
|
display: "flex",
|
|
308
444
|
flexDirection: "row",
|
|
309
|
-
marginBottom: 12,
|
|
310
|
-
transition: "
|
|
311
|
-
position: "relative"
|
|
445
|
+
marginBottom: isMaximized ? 0 : 12,
|
|
446
|
+
transition: "all 0.3s ease"
|
|
312
447
|
}
|
|
313
448
|
},
|
|
314
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
315
|
-
|
|
449
|
+
showSessionPanel && showSessions && /* @__PURE__ */ import_react.default.createElement(
|
|
450
|
+
"div",
|
|
316
451
|
{
|
|
317
|
-
type: "text",
|
|
318
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SwitcherOutlined, null),
|
|
319
|
-
onClick: () => toggleVisible(false),
|
|
320
452
|
style: {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
453
|
+
width: 280,
|
|
454
|
+
borderRight: "1px solid #f0f0f0",
|
|
455
|
+
background: "#fafafa",
|
|
456
|
+
display: "flex",
|
|
457
|
+
flexDirection: "column",
|
|
458
|
+
flexShrink: 0
|
|
327
459
|
}
|
|
328
|
-
}
|
|
460
|
+
},
|
|
461
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
462
|
+
"div",
|
|
463
|
+
{
|
|
464
|
+
style: {
|
|
465
|
+
padding: "12px 16px",
|
|
466
|
+
borderBottom: "1px solid #f0f0f0",
|
|
467
|
+
display: "flex",
|
|
468
|
+
justifyContent: "space-between",
|
|
469
|
+
alignItems: "center"
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
/* @__PURE__ */ import_react.default.createElement(Title, { level: 5, style: { margin: 0, fontSize: 16 } }, "历史会话"),
|
|
473
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", size: "small", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null), onClick: () => setShowSessions(false) })
|
|
474
|
+
),
|
|
475
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { flex: 1, padding: 16, overflowY: "auto" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
476
|
+
import_antd.Button,
|
|
477
|
+
{
|
|
478
|
+
type: "primary",
|
|
479
|
+
block: true,
|
|
480
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null),
|
|
481
|
+
onClick: createNewSession,
|
|
482
|
+
style: { marginBottom: 12 }
|
|
483
|
+
},
|
|
484
|
+
"新建会话"
|
|
485
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.List, { dataSource: sessions, renderItem: renderSession, locale: { emptyText: "暂无会话" } }))
|
|
329
486
|
),
|
|
330
487
|
/* @__PURE__ */ import_react.default.createElement(
|
|
331
488
|
"div",
|
|
@@ -340,6 +497,7 @@ var AiChat = ({
|
|
|
340
497
|
renderHeader || /* @__PURE__ */ import_react.default.createElement(
|
|
341
498
|
"div",
|
|
342
499
|
{
|
|
500
|
+
className: "ai-chat-header",
|
|
343
501
|
style: {
|
|
344
502
|
padding: "12px 16px",
|
|
345
503
|
background: "#fafafa",
|
|
@@ -350,16 +508,25 @@ var AiChat = ({
|
|
|
350
508
|
flexShrink: 0
|
|
351
509
|
}
|
|
352
510
|
},
|
|
353
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null,
|
|
354
|
-
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, showExport && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ExportOutlined, null), onClick: exportCurrentSession }, "导出"), (taskWorkflow == null ? void 0 : taskWorkflow.enabled) && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.ExportOutlined, null), onClick: () => exportTasks("json") }, "导出任务")), showSessionPanel && /* @__PURE__ */ import_react.default.createElement(
|
|
511
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, showSessionPanel && /* @__PURE__ */ import_react.default.createElement(
|
|
355
512
|
import_antd.Button,
|
|
356
513
|
{
|
|
357
514
|
type: showSessions ? "primary" : "text",
|
|
358
515
|
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.MenuOutlined, null),
|
|
516
|
+
size: "small",
|
|
359
517
|
onClick: () => setShowSessions(!showSessions)
|
|
360
518
|
},
|
|
361
|
-
showSessions ? "
|
|
362
|
-
))
|
|
519
|
+
showSessions ? "收起" : "会话"
|
|
520
|
+
), /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PlusOutlined, null), onClick: createNewSession, size: "small" }, "新会话")),
|
|
521
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: isMaximized ? "还原" : "最大化" }, /* @__PURE__ */ import_react.default.createElement(
|
|
522
|
+
import_antd.Button,
|
|
523
|
+
{
|
|
524
|
+
type: "text",
|
|
525
|
+
icon: isMaximized ? /* @__PURE__ */ import_react.default.createElement(import_icons.CompressOutlined, null) : /* @__PURE__ */ import_react.default.createElement(import_icons.ExpandOutlined, null),
|
|
526
|
+
onClick: toggleMaximize,
|
|
527
|
+
size: "small"
|
|
528
|
+
}
|
|
529
|
+
)), /* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "关闭" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.CloseOutlined, null), onClick: () => toggleVisible(false), size: "small" })))
|
|
363
530
|
),
|
|
364
531
|
/* @__PURE__ */ import_react.default.createElement(
|
|
365
532
|
"div",
|
|
@@ -380,7 +547,7 @@ var AiChat = ({
|
|
|
380
547
|
}
|
|
381
548
|
},
|
|
382
549
|
/* @__PURE__ */ import_react.default.createElement(import_icons.MessageOutlined, { style: { fontSize: 48, color: "#d9d9d9" } }),
|
|
383
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16 } }, "开始你的 AI 对话"),
|
|
550
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 16, fontSize: 16 } }, "开始你的 AI 对话"),
|
|
384
551
|
/* @__PURE__ */ import_react.default.createElement("div", { style: { marginTop: 8, fontSize: 13, color: "#bfbfbf" } }, "我可以帮你解答问题、创建任务"),
|
|
385
552
|
/* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "primary", onClick: createNewSession, style: { marginTop: 20 } }, "新建会话")
|
|
386
553
|
) : /* @__PURE__ */ import_react.default.createElement(import_antd.List, { dataSource: activeSession.messages, renderItem: renderMsg }),
|
|
@@ -418,7 +585,33 @@ var AiChat = ({
|
|
|
418
585
|
suggestion
|
|
419
586
|
))
|
|
420
587
|
),
|
|
421
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
588
|
+
fileList.length > 0 && /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8 } }, fileList.map((file) => /* @__PURE__ */ import_react.default.createElement(
|
|
589
|
+
"div",
|
|
590
|
+
{
|
|
591
|
+
key: file.uid,
|
|
592
|
+
style: {
|
|
593
|
+
display: "inline-block",
|
|
594
|
+
padding: "4px 8px",
|
|
595
|
+
background: "#e6f7ff",
|
|
596
|
+
borderRadius: 4,
|
|
597
|
+
marginRight: 8,
|
|
598
|
+
fontSize: 12
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
file.name,
|
|
602
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
603
|
+
import_icons.CloseOutlined,
|
|
604
|
+
{
|
|
605
|
+
style: {
|
|
606
|
+
marginLeft: 8,
|
|
607
|
+
cursor: "pointer",
|
|
608
|
+
fontSize: 10
|
|
609
|
+
},
|
|
610
|
+
onClick: () => setFileList(fileList.filter((f) => f.uid !== file.uid))
|
|
611
|
+
}
|
|
612
|
+
)
|
|
613
|
+
))),
|
|
614
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { position: "relative" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
422
615
|
TextArea,
|
|
423
616
|
{
|
|
424
617
|
value: inputValue,
|
|
@@ -431,69 +624,58 @@ var AiChat = ({
|
|
|
431
624
|
handleSend();
|
|
432
625
|
}
|
|
433
626
|
},
|
|
434
|
-
style: {
|
|
627
|
+
style: {
|
|
628
|
+
marginBottom: 8,
|
|
629
|
+
borderRadius: 8,
|
|
630
|
+
paddingRight: 80
|
|
631
|
+
},
|
|
435
632
|
disabled: loading
|
|
436
633
|
}
|
|
437
|
-
),
|
|
438
|
-
/* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, loading && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { danger: true, icon: /* @__PURE__ */ import_react.default.createElement(import_icons.StopOutlined, null), onClick: cancelRequest, size: "small" }, "取消"), /* @__PURE__ */ import_react.default.createElement(
|
|
439
|
-
import_antd.Button,
|
|
440
|
-
{
|
|
441
|
-
type: "primary",
|
|
442
|
-
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SendOutlined, null),
|
|
443
|
-
onClick: handleSend,
|
|
444
|
-
loading,
|
|
445
|
-
disabled: !inputValue.trim(),
|
|
446
|
-
size: "small"
|
|
447
|
-
},
|
|
448
|
-
"发送"
|
|
449
|
-
)))
|
|
450
|
-
),
|
|
451
|
-
showSessionPanel && showSessions && /* @__PURE__ */ import_react.default.createElement(
|
|
452
|
-
"div",
|
|
453
|
-
{
|
|
454
|
-
style: {
|
|
455
|
-
width: 240,
|
|
456
|
-
borderLeft: "1px solid #f0f0f0",
|
|
457
|
-
padding: 16,
|
|
458
|
-
background: "#fafafa",
|
|
459
|
-
overflowY: "auto",
|
|
460
|
-
flexShrink: 0
|
|
461
|
-
}
|
|
462
|
-
},
|
|
463
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
634
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
464
635
|
"div",
|
|
465
636
|
{
|
|
466
637
|
style: {
|
|
638
|
+
position: "absolute",
|
|
639
|
+
right: 12,
|
|
640
|
+
bottom: 16,
|
|
467
641
|
display: "flex",
|
|
468
|
-
|
|
469
|
-
alignItems: "center",
|
|
470
|
-
marginBottom: 16
|
|
642
|
+
gap: 8
|
|
471
643
|
}
|
|
472
644
|
},
|
|
473
|
-
/* @__PURE__ */ import_react.default.createElement(Title, { level: 5, style: { margin: 0 } }, "我的会话"),
|
|
474
645
|
/* @__PURE__ */ import_react.default.createElement(
|
|
475
|
-
import_antd.
|
|
646
|
+
import_antd.Upload,
|
|
476
647
|
{
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
style: { padding: 0 }
|
|
648
|
+
fileList,
|
|
649
|
+
onChange: handleFileChange,
|
|
650
|
+
beforeUpload: () => false,
|
|
651
|
+
showUploadList: false,
|
|
652
|
+
accept: "image/*"
|
|
483
653
|
},
|
|
484
|
-
"
|
|
654
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "上传图片" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", size: "small", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.FileImageOutlined, null) }))
|
|
655
|
+
),
|
|
656
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
657
|
+
import_antd.Upload,
|
|
658
|
+
{
|
|
659
|
+
fileList,
|
|
660
|
+
onChange: handleFileChange,
|
|
661
|
+
beforeUpload: () => false,
|
|
662
|
+
showUploadList: false
|
|
663
|
+
},
|
|
664
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Tooltip, { title: "上传文件" }, /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { type: "text", size: "small", icon: /* @__PURE__ */ import_react.default.createElement(import_icons.PaperClipOutlined, null) }))
|
|
485
665
|
)
|
|
486
|
-
),
|
|
487
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
488
|
-
import_antd.
|
|
666
|
+
)),
|
|
667
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", justifyContent: "flex-end" } }, /* @__PURE__ */ import_react.default.createElement(import_antd.Space, null, loading && /* @__PURE__ */ import_react.default.createElement(import_antd.Button, { danger: true, icon: /* @__PURE__ */ import_react.default.createElement(import_icons.StopOutlined, null), onClick: cancelRequest, size: "small" }, "终止"), /* @__PURE__ */ import_react.default.createElement(
|
|
668
|
+
import_antd.Button,
|
|
489
669
|
{
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
670
|
+
type: "primary",
|
|
671
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.SendOutlined, null),
|
|
672
|
+
onClick: handleSend,
|
|
673
|
+
loading,
|
|
674
|
+
disabled: !inputValue.trim() && fileList.length === 0,
|
|
675
|
+
size: "small"
|
|
676
|
+
},
|
|
677
|
+
"发送"
|
|
678
|
+
)))
|
|
497
679
|
)
|
|
498
680
|
)
|
|
499
681
|
)
|