@yoka-ui/ui 1.0.10-test → 1.1.0
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/README.md +40 -189
- package/dist/es/assets/image/skills.zip +0 -0
- package/dist/es/business/AiChat/index.d.ts +3 -3
- package/dist/es/business/AiChat/index.js +331 -119
- package/dist/es/business/AiChat/index.js.map +3 -3
- 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 +44 -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/index.d.ts +3 -3
- package/dist/lib/business/AiChat/index.js +320 -111
- package/dist/lib/business/AiChat/index.js.map +3 -3
- 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 +44 -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 +152 -144
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
.chartBody {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
width: 100%;
|
|
8
|
+
|
|
9
|
+
.chartBodyHeader {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
gap: 10px;
|
|
14
|
+
margin-bottom: 20px;
|
|
15
|
+
|
|
16
|
+
.chartType {
|
|
17
|
+
position: relative;
|
|
18
|
+
margin-left: auto;
|
|
19
|
+
|
|
20
|
+
.radioButton {
|
|
21
|
+
position: relative;
|
|
22
|
+
height: 30px;
|
|
23
|
+
line-height: 28px;
|
|
24
|
+
|
|
25
|
+
&:first-child {
|
|
26
|
+
border-start-start-radius: 2px;
|
|
27
|
+
border-end-start-radius: 2px;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&:last-child {
|
|
31
|
+
border-start-end-radius: 2px;
|
|
32
|
+
border-end-end-radius: 2px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.chartBodyContent {
|
|
39
|
+
position: relative;
|
|
40
|
+
display: flex;
|
|
41
|
+
flex: 1;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
min-height: 300px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.echarts {
|
|
49
|
+
position: relative;
|
|
50
|
+
flex: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.tooltip {
|
|
54
|
+
position: relative;
|
|
55
|
+
min-width: 200px;
|
|
56
|
+
padding: 10px 0 0 10px;
|
|
57
|
+
box-shadow: rgb(71 71 71 / 10%) 0 2px 12px 0;
|
|
58
|
+
|
|
59
|
+
.title {
|
|
60
|
+
position: relative;
|
|
61
|
+
z-index: 2;
|
|
62
|
+
display: flex;
|
|
63
|
+
gap: 10px;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
margin-bottom: 10px;
|
|
67
|
+
color: #333;
|
|
68
|
+
font-weight: 600;
|
|
69
|
+
font-size: 12px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.content {
|
|
73
|
+
position: relative;
|
|
74
|
+
max-height: 200px;
|
|
75
|
+
overflow-y: auto;
|
|
76
|
+
|
|
77
|
+
.item {
|
|
78
|
+
position: relative;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
height: 20px;
|
|
82
|
+
margin-bottom: 5px;
|
|
83
|
+
padding: 0 0 0 10px;
|
|
84
|
+
padding-right: 10px;
|
|
85
|
+
color: #666;
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
line-height: 20px;
|
|
89
|
+
border-radius: 4px;
|
|
90
|
+
|
|
91
|
+
.point {
|
|
92
|
+
position: relative;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
width: 13px;
|
|
97
|
+
height: 2px;
|
|
98
|
+
margin-right: 10px;
|
|
99
|
+
border-top-width: 2px;
|
|
100
|
+
|
|
101
|
+
&.pointBar {
|
|
102
|
+
width: 10px;
|
|
103
|
+
height: 10px;
|
|
104
|
+
border-radius: 2px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.category {
|
|
109
|
+
margin-right: 20px;
|
|
110
|
+
white-space: nowrap;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.value {
|
|
114
|
+
flex: 1;
|
|
115
|
+
color: #333;
|
|
116
|
+
text-align: right;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.pieLegend {
|
|
123
|
+
position: relative;
|
|
124
|
+
width: 100%;
|
|
125
|
+
height: 100%;
|
|
126
|
+
|
|
127
|
+
.pieSlider {
|
|
128
|
+
width: 100%;
|
|
129
|
+
overflow: hidden;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
:global {
|
|
133
|
+
.swiper-button-prev::after,
|
|
134
|
+
.swiper-button-next::after {
|
|
135
|
+
font-size: 30px !important;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.empty {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
height: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.percentRadio {
|
|
148
|
+
position: relative;
|
|
149
|
+
margin-left: auto;
|
|
150
|
+
|
|
151
|
+
.radioButton {
|
|
152
|
+
position: relative;
|
|
153
|
+
|
|
154
|
+
&:first-child {
|
|
155
|
+
border-start-start-radius: 2px;
|
|
156
|
+
border-end-start-radius: 2px;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&:last-child {
|
|
160
|
+
border-start-end-radius: 2px;
|
|
161
|
+
border-end-end-radius: 2px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
@import './variables.less';
|
|
2
|
+
|
|
3
|
+
.g2-tooltip {
|
|
4
|
+
background-color: transparent !important;
|
|
5
|
+
box-shadow: none !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.yk-charts-tooltip {
|
|
9
|
+
position: relative;
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
padding: 15px 20px 5px 15px;
|
|
12
|
+
border: none;
|
|
13
|
+
box-shadow: rgb(71 71 71 / 10%) 0 2px 12px 0;
|
|
14
|
+
|
|
15
|
+
.ant-card-body {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: 5px;
|
|
20
|
+
padding: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.yk-charts-tooltip-title {
|
|
24
|
+
margin-bottom: 10px;
|
|
25
|
+
color: #333;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
font-family: @ykFontFamilyMedium;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.yk-charts-tooltip-box {
|
|
32
|
+
margin-bottom: 5px;
|
|
33
|
+
|
|
34
|
+
.yk-charts-tooltip-item {
|
|
35
|
+
position: relative;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
height: 20px;
|
|
39
|
+
margin-bottom: 5px;
|
|
40
|
+
padding: 0 0 0 10px;
|
|
41
|
+
color: #666;
|
|
42
|
+
font-weight: 400;
|
|
43
|
+
font-size: 12px;
|
|
44
|
+
font-family: @ykFontFamilyRegular;
|
|
45
|
+
line-height: 20px;
|
|
46
|
+
border-radius: 4px;
|
|
47
|
+
|
|
48
|
+
.item-point {
|
|
49
|
+
position: relative;
|
|
50
|
+
display: flex;
|
|
51
|
+
align-items: center;
|
|
52
|
+
justify-content: center;
|
|
53
|
+
width: 13px;
|
|
54
|
+
height: 1px;
|
|
55
|
+
margin-right: 10px;
|
|
56
|
+
border-top-width: 2px;
|
|
57
|
+
|
|
58
|
+
&-svg {
|
|
59
|
+
width: 14px;
|
|
60
|
+
height: 5px;
|
|
61
|
+
margin-right: 10px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.item-square {
|
|
66
|
+
position: relative;
|
|
67
|
+
display: flex;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-content: center;
|
|
70
|
+
width: 10px;
|
|
71
|
+
height: 10px;
|
|
72
|
+
margin-right: 10px;
|
|
73
|
+
background-size: 5px 5px !important;
|
|
74
|
+
border-top-width: 2px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.item-key {
|
|
78
|
+
margin-right: 5px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.item-category {
|
|
82
|
+
margin-right: 30px;
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.item-value {
|
|
87
|
+
flex: 1;
|
|
88
|
+
text-align: right;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/business/YkCharts/transformData.js
|
|
2
|
+
var transformBaseToSeries = (baseData) => {
|
|
3
|
+
const intervals = Object.keys(baseData[0]).filter((key) => key !== "数据日期" && key !== "设备数");
|
|
4
|
+
return intervals.map((interval) => ({
|
|
5
|
+
name: interval,
|
|
6
|
+
type: "line",
|
|
7
|
+
smooth: true,
|
|
8
|
+
areaStyle: {},
|
|
9
|
+
showSymbol: false,
|
|
10
|
+
data: baseData.map((item) => item[interval])
|
|
11
|
+
}));
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
transformBaseToSeries
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=transformData.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/transformData.js"],
|
|
4
|
+
"sourcesContent": ["/**\n * 将base数据转换为series格式\n * @param {Array} baseData - 原始数据数组\n * @returns {Array} - 转换后的series数据\n */\nexport const transformBaseToSeries = (baseData) => {\n // 获取所有区间名称(排除数据日期和设备数字段)\n const intervals = Object.keys(baseData[0]).filter((key) => key !== '数据日期' && key !== '设备数');\n\n // 为每个区间创建series对象\n return intervals.map((interval) => ({\n name: interval,\n type: 'line',\n smooth: true,\n areaStyle: {},\n showSymbol: false,\n data: baseData.map((item) => item[interval]),\n }));\n};\n"],
|
|
5
|
+
"mappings": ";AAKO,IAAM,wBAAwB,CAAC,aAAa;AAEjD,QAAM,YAAY,OAAO,KAAK,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,QAAQ,UAAU,QAAQ,KAAK;AAG1F,SAAO,UAAU,IAAI,CAAC,cAAc;AAAA,IAClC,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,WAAW,CAAC;AAAA,IACZ,YAAY;AAAA,IACZ,MAAM,SAAS,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC;AAAA,EAC7C,EAAE;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export type GroupByItem = {
|
|
2
|
+
key: string;
|
|
3
|
+
options: string[];
|
|
4
|
+
selected: string[];
|
|
5
|
+
};
|
|
6
|
+
export type Format = 'integer' | 'string' | 'datetime' | 'decimal' | 'percent' | 'currency';
|
|
7
|
+
export type ColumnConfig = {
|
|
8
|
+
width?: number;
|
|
9
|
+
tooltip?: string;
|
|
10
|
+
sortable?: 'number' | 'string';
|
|
11
|
+
fixed?: 'left' | 'right';
|
|
12
|
+
hide_compare?: boolean;
|
|
13
|
+
align?: 'left' | 'right' | 'center';
|
|
14
|
+
name_group?: string;
|
|
15
|
+
format?: Format;
|
|
16
|
+
is_heatmap?: boolean;
|
|
17
|
+
sort_order?: 'ascend' | 'descend';
|
|
18
|
+
is_heap?: boolean;
|
|
19
|
+
hidden?: boolean;
|
|
20
|
+
resize?: boolean;
|
|
21
|
+
disable_sort?: boolean;
|
|
22
|
+
sort_method?: 'number' | 'string' | '';
|
|
23
|
+
show_icon?: boolean;
|
|
24
|
+
titletip?: string;
|
|
25
|
+
tip_id?: string | string;
|
|
26
|
+
type?: 'string' | 'numeric' | 'date' | 'boolean' | 'number';
|
|
27
|
+
};
|
|
28
|
+
type Compare = {
|
|
29
|
+
end: string;
|
|
30
|
+
start: string;
|
|
31
|
+
value: number | null;
|
|
32
|
+
label: string;
|
|
33
|
+
time: string;
|
|
34
|
+
};
|
|
35
|
+
type KpiData = {
|
|
36
|
+
huan_bi: Compare;
|
|
37
|
+
tong_bi: Compare;
|
|
38
|
+
last: Compare;
|
|
39
|
+
};
|
|
40
|
+
export type TableData = {
|
|
41
|
+
ds_id: number;
|
|
42
|
+
metric: string[];
|
|
43
|
+
group_by: string[] | null;
|
|
44
|
+
chart_types: string[];
|
|
45
|
+
column_config: ColumnConfig[];
|
|
46
|
+
x: string[];
|
|
47
|
+
x_field: string;
|
|
48
|
+
table_summary: (string | number)[];
|
|
49
|
+
table_body: (string | number | boolean)[][];
|
|
50
|
+
table_head: string[];
|
|
51
|
+
kpi_data?: KpiData;
|
|
52
|
+
last_refresh_time?: string;
|
|
53
|
+
total_column?: string;
|
|
54
|
+
duration_ms?: number;
|
|
55
|
+
debug_sql?: string;
|
|
56
|
+
meta_data?: SqlMetaConfig[];
|
|
57
|
+
};
|
|
58
|
+
export type SqlFormatType = 'normal' | 'number' | 'percent' | 'currency';
|
|
59
|
+
export type SqlFormat = {
|
|
60
|
+
type: SqlFormatType;
|
|
61
|
+
decimals: number;
|
|
62
|
+
thousand_separator: boolean;
|
|
63
|
+
unit: number;
|
|
64
|
+
prefix?: string;
|
|
65
|
+
suffix?: string;
|
|
66
|
+
};
|
|
67
|
+
export type SqlMetaConfig = {
|
|
68
|
+
show: boolean;
|
|
69
|
+
field: string;
|
|
70
|
+
display_name: string;
|
|
71
|
+
is_numeric: boolean;
|
|
72
|
+
format: SqlFormat;
|
|
73
|
+
};
|
|
74
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=typing.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Format, SqlFormat } from './typing';
|
|
2
|
+
export declare const formatValue: (value: string | number, format: Format | undefined | null) => string;
|
|
3
|
+
export declare function formatNumber(num: number | string, isInteger?: boolean): [string, string];
|
|
4
|
+
export declare function sqlFormat(value: string | number | boolean, format: SqlFormat | undefined | null): string;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
var __pow = Math.pow;
|
|
2
|
+
|
|
3
|
+
// src/business/YkCharts/utils.ts
|
|
4
|
+
import Decimal from "decimal.js";
|
|
5
|
+
var formatValue = (value, format) => {
|
|
6
|
+
if (value === null || value === void 0 || value === "-") {
|
|
7
|
+
return "-";
|
|
8
|
+
}
|
|
9
|
+
if (!format || format === null) {
|
|
10
|
+
return value.toString();
|
|
11
|
+
}
|
|
12
|
+
const numValue = Number(value);
|
|
13
|
+
if (format === "percent") {
|
|
14
|
+
return new Decimal(numValue).mul(100).toFixed(2) + "%";
|
|
15
|
+
}
|
|
16
|
+
if (format === "decimal") {
|
|
17
|
+
return new Decimal(numValue).toFixed(2);
|
|
18
|
+
}
|
|
19
|
+
if (format === "integer") {
|
|
20
|
+
return new Intl.NumberFormat().format(numValue);
|
|
21
|
+
}
|
|
22
|
+
return numValue.toString();
|
|
23
|
+
};
|
|
24
|
+
function formatNumber(num, isInteger = false) {
|
|
25
|
+
const numberValue = typeof num === "string" ? parseFloat(num) : num;
|
|
26
|
+
if (Number.isNaN(numberValue)) {
|
|
27
|
+
return [(num == null ? void 0 : num.toString()) || "", ""];
|
|
28
|
+
}
|
|
29
|
+
let result = "";
|
|
30
|
+
let unit = "";
|
|
31
|
+
function setFixed(v, dot) {
|
|
32
|
+
const multiplier = __pow(10, dot);
|
|
33
|
+
return Math.floor(v * multiplier) / multiplier;
|
|
34
|
+
}
|
|
35
|
+
if (numberValue < 1e3) {
|
|
36
|
+
result = new Decimal(numberValue).toFixed(1);
|
|
37
|
+
} else if (numberValue < 1e4) {
|
|
38
|
+
result = numberValue.toLocaleString("en-US", {
|
|
39
|
+
minimumFractionDigits: isInteger ? 0 : 1,
|
|
40
|
+
maximumFractionDigits: isInteger ? 0 : 1
|
|
41
|
+
});
|
|
42
|
+
} else if (numberValue < 1e8) {
|
|
43
|
+
const v = setFixed(numberValue / 1e4, 2);
|
|
44
|
+
result = v.toLocaleString("en-US", {
|
|
45
|
+
minimumFractionDigits: isInteger ? 1 : 2,
|
|
46
|
+
maximumFractionDigits: isInteger ? 1 : 2
|
|
47
|
+
});
|
|
48
|
+
unit = " 万";
|
|
49
|
+
} else {
|
|
50
|
+
const v = setFixed(numberValue / 1e8, 2);
|
|
51
|
+
result = v.toLocaleString("en-US", {
|
|
52
|
+
minimumFractionDigits: isInteger ? 1 : 2,
|
|
53
|
+
maximumFractionDigits: isInteger ? 1 : 2
|
|
54
|
+
});
|
|
55
|
+
unit = " 亿";
|
|
56
|
+
}
|
|
57
|
+
if (isInteger) {
|
|
58
|
+
result = result.replace(/\.0+(?=\D*$)/, "");
|
|
59
|
+
}
|
|
60
|
+
return [result, unit];
|
|
61
|
+
}
|
|
62
|
+
function sqlFormat(value, format) {
|
|
63
|
+
if (value === null || value === void 0 || value === "-") {
|
|
64
|
+
return "-";
|
|
65
|
+
}
|
|
66
|
+
if (!format) {
|
|
67
|
+
return value == null ? void 0 : value.toString();
|
|
68
|
+
}
|
|
69
|
+
if (typeof value === "boolean") {
|
|
70
|
+
return value == null ? void 0 : value.toString();
|
|
71
|
+
}
|
|
72
|
+
const { type, decimals = 0, thousand_separator = true, unit = 0, prefix = "", suffix = "" } = format;
|
|
73
|
+
switch (type) {
|
|
74
|
+
case "number": {
|
|
75
|
+
let result;
|
|
76
|
+
if (thousand_separator) {
|
|
77
|
+
result = value ? value == null ? void 0 : value.toLocaleString("en-US", {
|
|
78
|
+
minimumFractionDigits: decimals,
|
|
79
|
+
maximumFractionDigits: decimals
|
|
80
|
+
}) : "0";
|
|
81
|
+
} else {
|
|
82
|
+
result = new Decimal(value || 0).toFixed(decimals);
|
|
83
|
+
}
|
|
84
|
+
return `${prefix}${result}${suffix}`;
|
|
85
|
+
}
|
|
86
|
+
case "percent": {
|
|
87
|
+
const result = new Decimal(value || 0).mul(100).toFixed(decimals) + "%";
|
|
88
|
+
return `${prefix}${result}${suffix}`;
|
|
89
|
+
}
|
|
90
|
+
case "currency": {
|
|
91
|
+
const numericValue = new Decimal(value || 0).div(__pow(10, unit)).toNumber();
|
|
92
|
+
const unitValue = numericValue.toLocaleString("en-US", {
|
|
93
|
+
minimumFractionDigits: decimals,
|
|
94
|
+
maximumFractionDigits: decimals
|
|
95
|
+
});
|
|
96
|
+
const unitLabel = unit === 0 ? "" : unit === 4 ? "万" : unit === 8 ? "亿" : "";
|
|
97
|
+
return `${prefix}${unitValue}${unitLabel}${suffix}`;
|
|
98
|
+
}
|
|
99
|
+
case "normal":
|
|
100
|
+
default:
|
|
101
|
+
return (value == null ? void 0 : value.toString()) || "-";
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
formatNumber,
|
|
106
|
+
formatValue,
|
|
107
|
+
sqlFormat
|
|
108
|
+
};
|
|
109
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/business/YkCharts/utils.ts"],
|
|
4
|
+
"sourcesContent": ["import Decimal from 'decimal.js';\nimport type { Format, SqlFormat } from './typing';\n\nexport const formatValue = (value: string | number, format: Format | undefined | null): string => {\n if (value === null || value === undefined || value === '-') {\n return '-';\n }\n if (!format || format === null) {\n return value.toString();\n }\n const numValue = Number(value);\n if (format === 'percent') {\n return new Decimal(numValue).mul(100).toFixed(2) + '%';\n }\n if (format === 'decimal') {\n return new Decimal(numValue).toFixed(2);\n }\n if (format === 'integer') {\n return new Intl.NumberFormat().format(numValue);\n }\n return numValue.toString();\n};\n\nexport function formatNumber(num: number | string, isInteger: boolean = false): [string, string] {\n const numberValue = typeof num === 'string' ? parseFloat(num) : num;\n if (Number.isNaN(numberValue)) {\n return [num?.toString() || '', ''];\n }\n let result: string = '';\n let unit: string = '';\n function setFixed(v: number, dot: number) {\n const multiplier = 10 ** dot;\n return Math.floor(v * multiplier) / multiplier;\n }\n if (numberValue < 1000) {\n result = new Decimal(numberValue).toFixed(1);\n } else if (numberValue < 10000) {\n result = numberValue.toLocaleString('en-US', {\n minimumFractionDigits: isInteger ? 0 : 1,\n maximumFractionDigits: isInteger ? 0 : 1,\n });\n } else if (numberValue < 100000000) {\n const v = setFixed(numberValue / 10000, 2);\n result = v.toLocaleString('en-US', {\n minimumFractionDigits: isInteger ? 1 : 2,\n maximumFractionDigits: isInteger ? 1 : 2,\n });\n unit = ' 万';\n } else {\n const v = setFixed(numberValue / 100000000, 2);\n result = v.toLocaleString('en-US', {\n minimumFractionDigits: isInteger ? 1 : 2,\n maximumFractionDigits: isInteger ? 1 : 2,\n });\n unit = ' 亿';\n }\n if (isInteger) {\n result = result.replace(/\\.0+(?=\\D*$)/, '');\n }\n return [result, unit];\n}\n\nexport function sqlFormat(value: string | number | boolean, format: SqlFormat | undefined | null): string {\n if (value === null || value === undefined || value === '-') {\n return '-';\n }\n if (!format) {\n return value?.toString();\n }\n if (typeof value === 'boolean') {\n return value?.toString();\n }\n const { type, decimals = 0, thousand_separator = true, unit = 0, prefix = '', suffix = '' } = format;\n switch (type) {\n case 'number': {\n let result: string;\n if (thousand_separator) {\n result = value\n ? value?.toLocaleString('en-US', {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n })\n : '0';\n } else {\n result = new Decimal(value || 0).toFixed(decimals);\n }\n return `${prefix}${result}${suffix}`;\n }\n case 'percent': {\n const result = new Decimal(value || 0).mul(100).toFixed(decimals) + '%';\n return `${prefix}${result}${suffix}`;\n }\n case 'currency': {\n const numericValue = new Decimal(value || 0).div(10 ** unit).toNumber();\n const unitValue = numericValue.toLocaleString('en-US', {\n minimumFractionDigits: decimals,\n maximumFractionDigits: decimals,\n });\n const unitLabel = unit === 0 ? '' : unit === 4 ? '万' : unit === 8 ? '亿' : '';\n return `${prefix}${unitValue}${unitLabel}${suffix}`;\n }\n case 'normal':\n default:\n return value?.toString() || '-';\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@primaryColor: #3b86f9;
|
|
2
|
+
@iconPrimaryColor: #0a6bfd;
|
|
3
|
+
@fontPrimaryColor: #0a6bfd;
|
|
4
|
+
@borderPrimaryColor: #b0cffe;
|
|
5
|
+
@globalBgColor: #edeff4;
|
|
6
|
+
|
|
7
|
+
@ykFontFamilySemibold: 'PingFangSC-Semibold', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
8
|
+
sans-serif;
|
|
9
|
+
@ykFontFamilyRegular: 'PingFangSC-Regular', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
10
|
+
sans-serif;
|
|
11
|
+
@ykFontFamilyMedium: 'PingFangSC-Medium', 'PingFang SC', 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial,
|
|
12
|
+
sans-serif;
|
|
13
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type SmsLoginFormApi = {
|
|
3
|
+
sendSms: (payload: Record<string, unknown>) => Promise<{
|
|
4
|
+
code: number;
|
|
5
|
+
msg: string;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
8
|
+
declare global {
|
|
9
|
+
interface Window {
|
|
10
|
+
sliderVerify: (element: 'pop' | HTMLElement, success: (res: {
|
|
11
|
+
token: string;
|
|
12
|
+
captchaVerification: string;
|
|
13
|
+
}) => void, options: {
|
|
14
|
+
appKey: string;
|
|
15
|
+
locale?: string;
|
|
16
|
+
}) => void;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export type SmsLoginFormProps = {
|
|
20
|
+
inputClassName: string;
|
|
21
|
+
api: SmsLoginFormApi;
|
|
22
|
+
appKey: string;
|
|
23
|
+
};
|
|
24
|
+
declare const SmsLogin: React.FC<SmsLoginFormProps>;
|
|
25
|
+
export default SmsLogin;
|