@yoka-ui/ui 1.0.10-test
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 +92 -0
- package/@Docs-yoka/llms.txt +23 -0
- package/README.md +291 -0
- package/dist/es/Themes/InputTheme/index.d.ts +6 -0
- package/dist/es/Themes/InputTheme/index.js +22 -0
- package/dist/es/Themes/InputTheme/index.js.map +7 -0
- package/dist/es/Themes/TableTheme/index.d.ts +7 -0
- package/dist/es/Themes/TableTheme/index.js +31 -0
- package/dist/es/Themes/TableTheme/index.js.map +7 -0
- package/dist/es/Themes/TableTheme/index.less +46 -0
- package/dist/es/assets/image/YKUI-logo.png +0 -0
- package/dist/es/assets/less/ant-reset.less +402 -0
- package/dist/es/assets/less/index.less +1 -0
- package/dist/es/assets/less/variables.less +16 -0
- package/dist/es/business/AiChat/MarkdownRender.d.ts +9 -0
- package/dist/es/business/AiChat/MarkdownRender.js +72 -0
- package/dist/es/business/AiChat/MarkdownRender.js.map +7 -0
- package/dist/es/business/AiChat/index.d.ts +16 -0
- package/dist/es/business/AiChat/index.js +521 -0
- package/dist/es/business/AiChat/index.js.map +7 -0
- package/dist/es/business/AiChat/intentRecognizer.d.ts +33 -0
- package/dist/es/business/AiChat/intentRecognizer.js +166 -0
- package/dist/es/business/AiChat/intentRecognizer.js.map +7 -0
- package/dist/es/business/AiChat/navigationManager.d.ts +94 -0
- package/dist/es/business/AiChat/navigationManager.js +208 -0
- package/dist/es/business/AiChat/navigationManager.js.map +7 -0
- package/dist/es/business/AiChat/sse.d.ts +1 -0
- package/dist/es/business/AiChat/sse.js +60 -0
- package/dist/es/business/AiChat/sse.js.map +7 -0
- package/dist/es/business/AiChat/type.d.ts +157 -0
- package/dist/es/business/AiChat/type.js +1 -0
- package/dist/es/business/AiChat/type.js.map +7 -0
- package/dist/es/business/AiChat/useAiChat.d.ts +2 -0
- package/dist/es/business/AiChat/useAiChat.js +238 -0
- package/dist/es/business/AiChat/useAiChat.js.map +7 -0
- package/dist/es/business/AiChat/useTaskWorkflow.d.ts +26 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js +230 -0
- package/dist/es/business/AiChat/useTaskWorkflow.js.map +7 -0
- package/dist/es/business/DrawerPageInfo/index.d.ts +35 -0
- package/dist/es/business/DrawerPageInfo/index.js +133 -0
- package/dist/es/business/DrawerPageInfo/index.js.map +7 -0
- package/dist/es/business/DrawerPageInfo/index.module.less +87 -0
- package/dist/es/business/DrawerPageInfo/test.png +0 -0
- package/dist/es/business/Editor/index.d.ts +11 -0
- package/dist/es/business/Editor/index.js +86 -0
- package/dist/es/business/Editor/index.js.map +7 -0
- package/dist/es/business/Editor/index.less +31 -0
- package/dist/es/business/Empty/empty.png +0 -0
- package/dist/es/business/Empty/index.d.ts +19 -0
- package/dist/es/business/Empty/index.js +51 -0
- package/dist/es/business/Empty/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/assets/images/empty.png +0 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.d.ts +13 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.js +51 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconClose.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.d.ts +13 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.js +51 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/IconXiala.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.d.ts +25 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.js +30 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/FilterButton/index.module.less +97 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.d.ts +18 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js +74 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Category.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.d.ts +37 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js +216 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Content.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.d.ts +26 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js +102 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/Selected.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.d.ts +51 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.js +71 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/components/PopoverContent/index.module.less +260 -0
- package/dist/es/business/ModCommonFilter/index.d.ts +53 -0
- package/dist/es/business/ModCommonFilter/index.js +129 -0
- package/dist/es/business/ModCommonFilter/index.js.map +7 -0
- package/dist/es/business/ModCommonFilter/index.module.less +7 -0
- package/dist/es/business/ModCommonFilter/typing.d.ts +20 -0
- package/dist/es/business/ModCommonFilter/typing.js +1 -0
- package/dist/es/business/ModCommonFilter/typing.js.map +7 -0
- package/dist/es/business/YkPorjectSelect/icon-product.png +0 -0
- package/dist/es/business/YkPorjectSelect/index.d.ts +51 -0
- package/dist/es/business/YkPorjectSelect/index.js +260 -0
- package/dist/es/business/YkPorjectSelect/index.js.map +7 -0
- package/dist/es/business/YkPorjectSelect/index.module.less +334 -0
- package/dist/es/business/YkPorjectSelect/product-close.png +0 -0
- package/dist/es/components/Clock/index.d.ts +19 -0
- package/dist/es/components/Clock/index.js +55 -0
- package/dist/es/components/Clock/index.js.map +7 -0
- package/dist/es/components/DebounceInput/index.d.ts +16 -0
- package/dist/es/components/DebounceInput/index.js +77 -0
- package/dist/es/components/DebounceInput/index.js.map +7 -0
- package/dist/es/components/DebounceInput/index.module.less +23 -0
- package/dist/es/components/MultipleSelect/index.d.ts +23 -0
- package/dist/es/components/MultipleSelect/index.js +249 -0
- package/dist/es/components/MultipleSelect/index.js.map +7 -0
- package/dist/es/components/MultipleSelect/index.module.less +174 -0
- package/dist/es/components/NumericInput/index.d.ts +19 -0
- package/dist/es/components/NumericInput/index.js +56 -0
- package/dist/es/components/NumericInput/index.js.map +7 -0
- package/dist/es/components/RefreshButton/index.d.ts +8 -0
- package/dist/es/components/RefreshButton/index.js +21 -0
- package/dist/es/components/RefreshButton/index.js.map +7 -0
- package/dist/es/components/SearchWithHistory/index.d.ts +21 -0
- package/dist/es/components/SearchWithHistory/index.js +115 -0
- package/dist/es/components/SearchWithHistory/index.js.map +7 -0
- package/dist/es/components/SearchWithHistory/index.module.less +64 -0
- package/dist/es/components/TextWithInput/index.d.ts +15 -0
- package/dist/es/components/TextWithInput/index.js +35 -0
- package/dist/es/components/TextWithInput/index.js.map +7 -0
- package/dist/es/components/TextWithToolTip/index.d.ts +17 -0
- package/dist/es/components/TextWithToolTip/index.js +118 -0
- package/dist/es/components/TextWithToolTip/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +28 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js +161 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/components/TreeTransferPanel/index.less +151 -0
- package/dist/es/components/TreeTransfer/index.d.ts +28 -0
- package/dist/es/components/TreeTransfer/index.js +210 -0
- package/dist/es/components/TreeTransfer/index.js.map +7 -0
- package/dist/es/components/TreeTransfer/index.less +69 -0
- package/dist/es/components/TreeTransfer/types.d.ts +122 -0
- package/dist/es/components/TreeTransfer/types.js +6 -0
- package/dist/es/components/TreeTransfer/types.js.map +7 -0
- package/dist/es/components/TreeTransfer/utils/index.d.ts +120 -0
- package/dist/es/components/TreeTransfer/utils/index.js +195 -0
- package/dist/es/components/TreeTransfer/utils/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/index.d.ts +57 -0
- package/dist/es/components/YkDateRangePicker/index.js +261 -0
- package/dist/es/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/es/components/YkDateRangePicker/index.module.less +281 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +16 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +193 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +31 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +556 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +16 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js +55 -0
- package/dist/es/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/index.d.ts +62 -0
- package/dist/es/components/YkRangeDateWithVS/index.js +130 -0
- package/dist/es/components/YkRangeDateWithVS/index.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/index.module.less +548 -0
- package/dist/es/components/YkRangeDateWithVS/styles.d.ts +2 -0
- package/dist/es/components/YkRangeDateWithVS/styles.js +18 -0
- package/dist/es/components/YkRangeDateWithVS/styles.js.map +7 -0
- package/dist/es/components/YkRangeDateWithVS/typing.d.ts +15 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.d.ts +48 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.js +288 -0
- package/dist/es/components/YkRangeTimeWithRecent/constants.js.map +7 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.d.ts +26 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.js +647 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.js.map +7 -0
- package/dist/es/components/YkRangeTimeWithRecent/index.module.less +263 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.d.ts +17 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js +103 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.js.map +7 -0
- package/dist/es/creative/ButtonRadioWithInfo/index.less +106 -0
- package/dist/es/creative/ButtonWithProgress/index.d.ts +11 -0
- package/dist/es/creative/ButtonWithProgress/index.js +79 -0
- package/dist/es/creative/ButtonWithProgress/index.js.map +7 -0
- package/dist/es/creative/ButtonWithProgress/index.less +66 -0
- package/dist/es/global.less +12 -0
- package/dist/es/index.d.ts +41 -0
- package/dist/es/index.js +85 -0
- package/dist/es/index.js.map +7 -0
- package/dist/es/layout/FlexGrid/index.d.ts +25 -0
- package/dist/es/layout/FlexGrid/index.js +63 -0
- package/dist/es/layout/FlexGrid/index.js.map +7 -0
- package/dist/es/layout/YkContainer/index.d.ts +27 -0
- package/dist/es/layout/YkContainer/index.js +79 -0
- package/dist/es/layout/YkContainer/index.js.map +7 -0
- package/dist/es/layout/YkDrawer/index.d.ts +22 -0
- package/dist/es/layout/YkDrawer/index.js +160 -0
- package/dist/es/layout/YkDrawer/index.js.map +7 -0
- package/dist/es/layout/YkDrawer/index.module.less +45 -0
- package/dist/es/ui/LabelSelect/demo.d.ts +3 -0
- package/dist/es/ui/LabelSelect/demo.js +83 -0
- package/dist/es/ui/LabelSelect/demo.js.map +7 -0
- package/dist/es/ui/LabelSelect/index.d.ts +41 -0
- package/dist/es/ui/LabelSelect/index.js +136 -0
- package/dist/es/ui/LabelSelect/index.js.map +7 -0
- package/dist/es/ui/LogicOperator/index.d.ts +10 -0
- package/dist/es/ui/LogicOperator/index.js +12 -0
- package/dist/es/ui/LogicOperator/index.js.map +7 -0
- package/dist/es/ui/LogicOperator/index.module.less +97 -0
- package/dist/es/ui/YkButton/index.d.ts +9 -0
- package/dist/es/ui/YkButton/index.js +59 -0
- package/dist/es/ui/YkButton/index.js.map +7 -0
- package/dist/es/ui/YkCard/index.d.ts +4 -0
- package/dist/es/ui/YkCard/index.js +79 -0
- package/dist/es/ui/YkCard/index.js.map +7 -0
- package/dist/es/ui/YkCard/index.module.less +30 -0
- package/dist/es/ui/YkCheckbox/index.d.ts +4 -0
- package/dist/es/ui/YkCheckbox/index.js +45 -0
- package/dist/es/ui/YkCheckbox/index.js.map +7 -0
- package/dist/es/ui/YkCheckbox/index.module.less +22 -0
- package/dist/es/ui/YkDescriptions/index.d.ts +4 -0
- package/dist/es/ui/YkDescriptions/index.js +41 -0
- package/dist/es/ui/YkDescriptions/index.js.map +7 -0
- package/dist/es/ui/YkPagination/index.d.ts +4 -0
- package/dist/es/ui/YkPagination/index.js +63 -0
- package/dist/es/ui/YkPagination/index.js.map +7 -0
- package/dist/es/ui/YkPagination/index.module.less +22 -0
- package/dist/es/ui/YkRadio/index.d.ts +4 -0
- package/dist/es/ui/YkRadio/index.js +51 -0
- package/dist/es/ui/YkRadio/index.js.map +7 -0
- package/dist/es/ui/YkRadio/index.module.less +22 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.d.ts +15 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.js +23 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.js.map +7 -0
- package/dist/es/ui/YkRadioBtnSpecial/index.module.less +112 -0
- package/dist/es/ui/YkSegmented/index.d.ts +4 -0
- package/dist/es/ui/YkSegmented/index.js +41 -0
- package/dist/es/ui/YkSegmented/index.js.map +7 -0
- package/dist/es/ui/YkSelect/index.d.ts +7 -0
- package/dist/es/ui/YkSelect/index.js +54 -0
- package/dist/es/ui/YkSelect/index.js.map +7 -0
- package/dist/es/ui/YkSpin/index.d.ts +4 -0
- package/dist/es/ui/YkSpin/index.js +41 -0
- package/dist/es/ui/YkSpin/index.js.map +7 -0
- package/dist/es/ui/YkStatistic/index.d.ts +4 -0
- package/dist/es/ui/YkStatistic/index.js +41 -0
- package/dist/es/ui/YkStatistic/index.js.map +7 -0
- package/dist/es/ui/YkSwitch/index.d.ts +4 -0
- package/dist/es/ui/YkSwitch/index.js +51 -0
- package/dist/es/ui/YkSwitch/index.js.map +7 -0
- package/dist/es/ui/YkTabs/index.d.ts +12 -0
- package/dist/es/ui/YkTabs/index.js +75 -0
- package/dist/es/ui/YkTabs/index.js.map +7 -0
- package/dist/es/ui/YkTabs/index.module.less +11 -0
- package/dist/es/ui/YkTooltip/index.d.ts +4 -0
- package/dist/es/ui/YkTooltip/index.js +50 -0
- package/dist/es/ui/YkTooltip/index.js.map +7 -0
- package/dist/es/utils/styleUtils.d.ts +18 -0
- package/dist/es/utils/styleUtils.js +57 -0
- package/dist/es/utils/styleUtils.js.map +7 -0
- package/dist/es/utils/ykStorybookDoc.d.ts +17 -0
- package/dist/es/utils/ykStorybookDoc.js +18 -0
- package/dist/es/utils/ykStorybookDoc.js.map +7 -0
- package/dist/lib/Themes/InputTheme/index.d.ts +6 -0
- package/dist/lib/Themes/InputTheme/index.js +52 -0
- package/dist/lib/Themes/InputTheme/index.js.map +7 -0
- package/dist/lib/Themes/TableTheme/index.d.ts +7 -0
- package/dist/lib/Themes/TableTheme/index.js +61 -0
- package/dist/lib/Themes/TableTheme/index.js.map +7 -0
- package/dist/lib/Themes/TableTheme/index.less +46 -0
- package/dist/lib/assets/image/YKUI-logo.png +0 -0
- package/dist/lib/assets/less/ant-reset.less +402 -0
- package/dist/lib/assets/less/index.less +1 -0
- package/dist/lib/assets/less/variables.less +16 -0
- package/dist/lib/business/AiChat/MarkdownRender.d.ts +9 -0
- package/dist/lib/business/AiChat/MarkdownRender.js +102 -0
- package/dist/lib/business/AiChat/MarkdownRender.js.map +7 -0
- package/dist/lib/business/AiChat/index.d.ts +16 -0
- package/dist/lib/business/AiChat/index.js +514 -0
- package/dist/lib/business/AiChat/index.js.map +7 -0
- package/dist/lib/business/AiChat/intentRecognizer.d.ts +33 -0
- package/dist/lib/business/AiChat/intentRecognizer.js +193 -0
- package/dist/lib/business/AiChat/intentRecognizer.js.map +7 -0
- package/dist/lib/business/AiChat/navigationManager.d.ts +94 -0
- package/dist/lib/business/AiChat/navigationManager.js +214 -0
- package/dist/lib/business/AiChat/navigationManager.js.map +7 -0
- package/dist/lib/business/AiChat/sse.d.ts +1 -0
- package/dist/lib/business/AiChat/sse.js +61 -0
- package/dist/lib/business/AiChat/sse.js.map +7 -0
- package/dist/lib/business/AiChat/type.d.ts +157 -0
- package/dist/lib/business/AiChat/type.js +18 -0
- package/dist/lib/business/AiChat/type.js.map +7 -0
- package/dist/lib/business/AiChat/useAiChat.d.ts +2 -0
- package/dist/lib/business/AiChat/useAiChat.js +222 -0
- package/dist/lib/business/AiChat/useAiChat.js.map +7 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.d.ts +26 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js +216 -0
- package/dist/lib/business/AiChat/useTaskWorkflow.js.map +7 -0
- package/dist/lib/business/DrawerPageInfo/index.d.ts +35 -0
- package/dist/lib/business/DrawerPageInfo/index.js +163 -0
- package/dist/lib/business/DrawerPageInfo/index.js.map +7 -0
- package/dist/lib/business/DrawerPageInfo/index.module.less +87 -0
- package/dist/lib/business/DrawerPageInfo/test.png +0 -0
- package/dist/lib/business/Editor/index.d.ts +11 -0
- package/dist/lib/business/Editor/index.js +99 -0
- package/dist/lib/business/Editor/index.js.map +7 -0
- package/dist/lib/business/Editor/index.less +31 -0
- package/dist/lib/business/Empty/empty.png +0 -0
- package/dist/lib/business/Empty/index.d.ts +19 -0
- package/dist/lib/business/Empty/index.js +65 -0
- package/dist/lib/business/Empty/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/assets/images/empty.png +0 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.d.ts +13 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.js +50 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconClose.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.d.ts +13 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.js +50 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/IconXiala.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.d.ts +25 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.js +60 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/FilterButton/index.module.less +97 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.d.ts +18 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js +69 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Category.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.d.ts +37 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js +211 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Content.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.d.ts +26 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js +97 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/Selected.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.d.ts +51 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.js +101 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/components/PopoverContent/index.module.less +260 -0
- package/dist/lib/business/ModCommonFilter/index.d.ts +53 -0
- package/dist/lib/business/ModCommonFilter/index.js +143 -0
- package/dist/lib/business/ModCommonFilter/index.js.map +7 -0
- package/dist/lib/business/ModCommonFilter/index.module.less +7 -0
- package/dist/lib/business/ModCommonFilter/typing.d.ts +20 -0
- package/dist/lib/business/ModCommonFilter/typing.js +18 -0
- package/dist/lib/business/ModCommonFilter/typing.js.map +7 -0
- package/dist/lib/business/YkPorjectSelect/icon-product.png +0 -0
- package/dist/lib/business/YkPorjectSelect/index.d.ts +51 -0
- package/dist/lib/business/YkPorjectSelect/index.js +235 -0
- package/dist/lib/business/YkPorjectSelect/index.js.map +7 -0
- package/dist/lib/business/YkPorjectSelect/index.module.less +334 -0
- package/dist/lib/business/YkPorjectSelect/product-close.png +0 -0
- package/dist/lib/components/Clock/index.d.ts +19 -0
- package/dist/lib/components/Clock/index.js +85 -0
- package/dist/lib/components/Clock/index.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.d.ts +16 -0
- package/dist/lib/components/DebounceInput/index.js +107 -0
- package/dist/lib/components/DebounceInput/index.js.map +7 -0
- package/dist/lib/components/DebounceInput/index.module.less +23 -0
- package/dist/lib/components/MultipleSelect/index.d.ts +23 -0
- package/dist/lib/components/MultipleSelect/index.js +279 -0
- package/dist/lib/components/MultipleSelect/index.js.map +7 -0
- package/dist/lib/components/MultipleSelect/index.module.less +174 -0
- package/dist/lib/components/NumericInput/index.d.ts +19 -0
- package/dist/lib/components/NumericInput/index.js +67 -0
- package/dist/lib/components/NumericInput/index.js.map +7 -0
- package/dist/lib/components/RefreshButton/index.d.ts +8 -0
- package/dist/lib/components/RefreshButton/index.js +51 -0
- package/dist/lib/components/RefreshButton/index.js.map +7 -0
- package/dist/lib/components/SearchWithHistory/index.d.ts +21 -0
- package/dist/lib/components/SearchWithHistory/index.js +145 -0
- package/dist/lib/components/SearchWithHistory/index.js.map +7 -0
- package/dist/lib/components/SearchWithHistory/index.module.less +64 -0
- package/dist/lib/components/TextWithInput/index.d.ts +15 -0
- package/dist/lib/components/TextWithInput/index.js +65 -0
- package/dist/lib/components/TextWithInput/index.js.map +7 -0
- package/dist/lib/components/TextWithToolTip/index.d.ts +17 -0
- package/dist/lib/components/TextWithToolTip/index.js +134 -0
- package/dist/lib/components/TextWithToolTip/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.d.ts +28 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js +191 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/components/TreeTransferPanel/index.less +151 -0
- package/dist/lib/components/TreeTransfer/index.d.ts +28 -0
- package/dist/lib/components/TreeTransfer/index.js +214 -0
- package/dist/lib/components/TreeTransfer/index.js.map +7 -0
- package/dist/lib/components/TreeTransfer/index.less +69 -0
- package/dist/lib/components/TreeTransfer/types.d.ts +122 -0
- package/dist/lib/components/TreeTransfer/types.js +30 -0
- package/dist/lib/components/TreeTransfer/types.js.map +7 -0
- package/dist/lib/components/TreeTransfer/utils/index.d.ts +120 -0
- package/dist/lib/components/TreeTransfer/utils/index.js +208 -0
- package/dist/lib/components/TreeTransfer/utils/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/index.d.ts +57 -0
- package/dist/lib/components/YkDateRangePicker/index.js +282 -0
- package/dist/lib/components/YkDateRangePicker/index.js.map +7 -0
- package/dist/lib/components/YkDateRangePicker/index.module.less +281 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.d.ts +16 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js +223 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSCompare.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.d.ts +31 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js +567 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSRange.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.d.ts +16 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js +85 -0
- package/dist/lib/components/YkRangeDateWithVS/YkRangeDateWithVSSelect.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/index.d.ts +62 -0
- package/dist/lib/components/YkRangeDateWithVS/index.js +140 -0
- package/dist/lib/components/YkRangeDateWithVS/index.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/index.module.less +548 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.d.ts +2 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.js +48 -0
- package/dist/lib/components/YkRangeDateWithVS/styles.js.map +7 -0
- package/dist/lib/components/YkRangeDateWithVS/typing.d.ts +15 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.d.ts +48 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.js +333 -0
- package/dist/lib/components/YkRangeTimeWithRecent/constants.js.map +7 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.d.ts +26 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.js +647 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.js.map +7 -0
- package/dist/lib/components/YkRangeTimeWithRecent/index.module.less +263 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.d.ts +17 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js +102 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.js.map +7 -0
- package/dist/lib/creative/ButtonRadioWithInfo/index.less +106 -0
- package/dist/lib/creative/ButtonWithProgress/index.d.ts +11 -0
- package/dist/lib/creative/ButtonWithProgress/index.js +70 -0
- package/dist/lib/creative/ButtonWithProgress/index.js.map +7 -0
- package/dist/lib/creative/ButtonWithProgress/index.less +66 -0
- package/dist/lib/global.less +12 -0
- package/dist/lib/index.d.ts +41 -0
- package/dist/lib/index.js +158 -0
- package/dist/lib/index.js.map +7 -0
- package/dist/lib/layout/FlexGrid/index.d.ts +25 -0
- package/dist/lib/layout/FlexGrid/index.js +77 -0
- package/dist/lib/layout/FlexGrid/index.js.map +7 -0
- package/dist/lib/layout/YkContainer/index.d.ts +27 -0
- package/dist/lib/layout/YkContainer/index.js +79 -0
- package/dist/lib/layout/YkContainer/index.js.map +7 -0
- package/dist/lib/layout/YkDrawer/index.d.ts +22 -0
- package/dist/lib/layout/YkDrawer/index.js +152 -0
- package/dist/lib/layout/YkDrawer/index.js.map +7 -0
- package/dist/lib/layout/YkDrawer/index.module.less +45 -0
- package/dist/lib/ui/LabelSelect/demo.d.ts +3 -0
- package/dist/lib/ui/LabelSelect/demo.js +113 -0
- package/dist/lib/ui/LabelSelect/demo.js.map +7 -0
- package/dist/lib/ui/LabelSelect/index.d.ts +41 -0
- package/dist/lib/ui/LabelSelect/index.js +124 -0
- package/dist/lib/ui/LabelSelect/index.js.map +7 -0
- package/dist/lib/ui/LogicOperator/index.d.ts +10 -0
- package/dist/lib/ui/LogicOperator/index.js +42 -0
- package/dist/lib/ui/LogicOperator/index.js.map +7 -0
- package/dist/lib/ui/LogicOperator/index.module.less +97 -0
- package/dist/lib/ui/YkButton/index.d.ts +9 -0
- package/dist/lib/ui/YkButton/index.js +55 -0
- package/dist/lib/ui/YkButton/index.js.map +7 -0
- package/dist/lib/ui/YkCard/index.d.ts +4 -0
- package/dist/lib/ui/YkCard/index.js +76 -0
- package/dist/lib/ui/YkCard/index.js.map +7 -0
- package/dist/lib/ui/YkCard/index.module.less +30 -0
- package/dist/lib/ui/YkCheckbox/index.d.ts +4 -0
- package/dist/lib/ui/YkCheckbox/index.js +42 -0
- package/dist/lib/ui/YkCheckbox/index.js.map +7 -0
- package/dist/lib/ui/YkCheckbox/index.module.less +22 -0
- package/dist/lib/ui/YkDescriptions/index.d.ts +4 -0
- package/dist/lib/ui/YkDescriptions/index.js +41 -0
- package/dist/lib/ui/YkDescriptions/index.js.map +7 -0
- package/dist/lib/ui/YkPagination/index.d.ts +4 -0
- package/dist/lib/ui/YkPagination/index.js +60 -0
- package/dist/lib/ui/YkPagination/index.js.map +7 -0
- package/dist/lib/ui/YkPagination/index.module.less +22 -0
- package/dist/lib/ui/YkRadio/index.d.ts +4 -0
- package/dist/lib/ui/YkRadio/index.js +51 -0
- package/dist/lib/ui/YkRadio/index.js.map +7 -0
- package/dist/lib/ui/YkRadio/index.module.less +22 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.d.ts +15 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.js +53 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.js.map +7 -0
- package/dist/lib/ui/YkRadioBtnSpecial/index.module.less +112 -0
- package/dist/lib/ui/YkSegmented/index.d.ts +4 -0
- package/dist/lib/ui/YkSegmented/index.js +41 -0
- package/dist/lib/ui/YkSegmented/index.js.map +7 -0
- package/dist/lib/ui/YkSelect/index.d.ts +7 -0
- package/dist/lib/ui/YkSelect/index.js +54 -0
- package/dist/lib/ui/YkSelect/index.js.map +7 -0
- package/dist/lib/ui/YkSpin/index.d.ts +4 -0
- package/dist/lib/ui/YkSpin/index.js +41 -0
- package/dist/lib/ui/YkSpin/index.js.map +7 -0
- package/dist/lib/ui/YkStatistic/index.d.ts +4 -0
- package/dist/lib/ui/YkStatistic/index.js +41 -0
- package/dist/lib/ui/YkStatistic/index.js.map +7 -0
- package/dist/lib/ui/YkSwitch/index.d.ts +4 -0
- package/dist/lib/ui/YkSwitch/index.js +51 -0
- package/dist/lib/ui/YkSwitch/index.js.map +7 -0
- package/dist/lib/ui/YkTabs/index.d.ts +12 -0
- package/dist/lib/ui/YkTabs/index.js +70 -0
- package/dist/lib/ui/YkTabs/index.js.map +7 -0
- package/dist/lib/ui/YkTabs/index.module.less +11 -0
- package/dist/lib/ui/YkTooltip/index.d.ts +4 -0
- package/dist/lib/ui/YkTooltip/index.js +45 -0
- package/dist/lib/ui/YkTooltip/index.js.map +7 -0
- package/dist/lib/utils/styleUtils.d.ts +18 -0
- package/dist/lib/utils/styleUtils.js +84 -0
- package/dist/lib/utils/styleUtils.js.map +7 -0
- package/dist/lib/utils/ykStorybookDoc.d.ts +17 -0
- package/dist/lib/utils/ykStorybookDoc.js +41 -0
- package/dist/lib/utils/ykStorybookDoc.js.map +7 -0
- package/package.json +147 -0
|
@@ -0,0 +1,647 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/YkRangeTimeWithRecent/index.tsx
|
|
30
|
+
var YkRangeTimeWithRecent_exports = {};
|
|
31
|
+
__export(YkRangeTimeWithRecent_exports, {
|
|
32
|
+
default: () => YkRangeTimeWithRecent_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(YkRangeTimeWithRecent_exports);
|
|
35
|
+
var import_icons = require("@ant-design/icons");
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_zh_CN = __toESM(require("antd/es/date-picker/locale/zh_CN"));
|
|
38
|
+
var import_zh_CN2 = __toESM(require("antd/locale/zh_CN"));
|
|
39
|
+
var import_classnames = __toESM(require("classnames"));
|
|
40
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
41
|
+
var import_zh_cn = require("dayjs/locale/zh-cn");
|
|
42
|
+
var import_isoWeek = __toESM(require("dayjs/plugin/isoWeek"));
|
|
43
|
+
var import_weekOfYear = __toESM(require("dayjs/plugin/weekOfYear"));
|
|
44
|
+
var import_react = __toESM(require("react"));
|
|
45
|
+
var import_constants = require("./constants");
|
|
46
|
+
var import_index_module = __toESM(require("./index.module.less"));
|
|
47
|
+
import_dayjs.default.extend(import_isoWeek.default);
|
|
48
|
+
import_dayjs.default.extend(import_weekOfYear.default);
|
|
49
|
+
import_dayjs.default.locale({
|
|
50
|
+
...import_dayjs.default.Ls["zh-cn"],
|
|
51
|
+
weekStart: 1
|
|
52
|
+
});
|
|
53
|
+
var { RangePicker } = import_antd.DatePicker;
|
|
54
|
+
var timeTypeKeys = {
|
|
55
|
+
0: "合计",
|
|
56
|
+
1: "按小时",
|
|
57
|
+
2: "按天",
|
|
58
|
+
3: "按周",
|
|
59
|
+
4: "按月"
|
|
60
|
+
};
|
|
61
|
+
function normalizeTimeTypeForTimeTypes(timeType, timeTypes) {
|
|
62
|
+
const raw = typeof timeType === "number" ? timeType : 2;
|
|
63
|
+
if (Array.isArray(timeTypes) && !timeTypes.includes("合计") && raw === 0) {
|
|
64
|
+
return 2;
|
|
65
|
+
}
|
|
66
|
+
return raw;
|
|
67
|
+
}
|
|
68
|
+
var YkRangeTimeWithRecent = ({
|
|
69
|
+
value,
|
|
70
|
+
onChange,
|
|
71
|
+
timeTypes,
|
|
72
|
+
style,
|
|
73
|
+
clearable,
|
|
74
|
+
placement = "bottomLeft",
|
|
75
|
+
placeholder = "开始时间 ~ 结束时间",
|
|
76
|
+
noTimeFilter = false,
|
|
77
|
+
noIcon = false,
|
|
78
|
+
dateFieldOptionName = ""
|
|
79
|
+
}) => {
|
|
80
|
+
const formatTime = (time) => {
|
|
81
|
+
switch (normalizeTimeTypeForTimeTypes(value.time_type, timeTypes)) {
|
|
82
|
+
case 1:
|
|
83
|
+
return (0, import_dayjs.default)(time).format("YYYY-MM-DD HH:mm");
|
|
84
|
+
case 3:
|
|
85
|
+
return (0, import_dayjs.default)(time).format("YYYY-MM-DD");
|
|
86
|
+
case 4:
|
|
87
|
+
return (0, import_dayjs.default)(time).format("YYYY-MM");
|
|
88
|
+
case 2:
|
|
89
|
+
case 0:
|
|
90
|
+
default:
|
|
91
|
+
return (0, import_dayjs.default)(time).format("YYYY-MM-DD");
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
95
|
+
const triggerWrapRef = (0, import_react.useRef)(null);
|
|
96
|
+
const [active, setActive] = (0, import_react.useState)("start");
|
|
97
|
+
const [timeFilterType, setTimeFilterType] = (0, import_react.useState)(0);
|
|
98
|
+
const [localValue, setLocalValue] = (0, import_react.useState)(null);
|
|
99
|
+
const [startWeekDate, setStartWeekDate] = (0, import_react.useState)(null);
|
|
100
|
+
const [startMonth, setStartMonth] = (0, import_react.useState)(null);
|
|
101
|
+
const [localTimeType, setLocalTimeType] = (0, import_react.useState)(
|
|
102
|
+
() => normalizeTimeTypeForTimeTypes(value == null ? void 0 : value.time_type, timeTypes)
|
|
103
|
+
);
|
|
104
|
+
const localTimeTypeName = (0, import_react.useMemo)(() => {
|
|
105
|
+
const type = typeof localTimeType === "number" ? localTimeType : 2;
|
|
106
|
+
return timeTypeKeys[type] || timeTypeKeys[2];
|
|
107
|
+
}, [localTimeType]);
|
|
108
|
+
const getFormattedTimeRange = (recent, type) => {
|
|
109
|
+
const today = (0, import_dayjs.default)();
|
|
110
|
+
switch (localTimeType) {
|
|
111
|
+
case 1:
|
|
112
|
+
return today.subtract(recent, "day").format(`YYYY-MM-DD ${type === "start" ? "00:00" : "23:59"}`);
|
|
113
|
+
case 3:
|
|
114
|
+
return `${today.subtract(recent, "week").format("YYYY")}年-${today.subtract(recent, "week").week()}周 (${today.subtract(recent, "week").startOf("week").format("MM.DD")}-${today.subtract(recent, "week").endOf("week").format("MM.DD")})`;
|
|
115
|
+
case 4:
|
|
116
|
+
return today.subtract(recent, "month").format("YYYY-MM月");
|
|
117
|
+
default:
|
|
118
|
+
return today.subtract(recent, "day").format("YYYY-MM-DD");
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
const getFormattedRecentTime = (recent, type) => {
|
|
122
|
+
const today = (0, import_dayjs.default)();
|
|
123
|
+
switch (localTimeType) {
|
|
124
|
+
case 1:
|
|
125
|
+
return today.subtract(recent, "day").format(`YYYY-MM-DD ${type === "start" ? "00:00" : "23:59"}`);
|
|
126
|
+
case 3:
|
|
127
|
+
return `${today.subtract(recent, "week").format("YYYY")}年-${today.subtract(recent, "week").week()}周`;
|
|
128
|
+
case 4:
|
|
129
|
+
return today.subtract(recent, "month").format("YYYY-MM月");
|
|
130
|
+
default:
|
|
131
|
+
return today.subtract(recent, "day").format("YYYY-MM-DD");
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
const [recentStart, setRecentStart] = (0, import_react.useState)(0);
|
|
135
|
+
const [recentEnd, setRecentEnd] = (0, import_react.useState)(0);
|
|
136
|
+
(0, import_react.useEffect)(() => {
|
|
137
|
+
setRecentStart((value == null ? void 0 : value.recent_day) ? Number(value.recent_day.split("|")[1]) : 0);
|
|
138
|
+
setRecentEnd((value == null ? void 0 : value.recent_day) ? Number(value.recent_day.split("|")[2]) : 0);
|
|
139
|
+
}, [value == null ? void 0 : value.recent_day]);
|
|
140
|
+
const showRangeTime = (0, import_react.useMemo)(() => {
|
|
141
|
+
var _a;
|
|
142
|
+
if ((value == null ? void 0 : value.time_range) && (value == null ? void 0 : value.time_range.length) === 2) {
|
|
143
|
+
return formatTime(value.time_range[0]) + " ~ " + formatTime(value.time_range[1]);
|
|
144
|
+
} else if (value == null ? void 0 : value.recent_day) {
|
|
145
|
+
const [type, start, end] = value.recent_day.split("|");
|
|
146
|
+
let showTimeText = "";
|
|
147
|
+
const unit = type === "D" ? "天" : type === "W" ? "周" : "月";
|
|
148
|
+
const options = import_constants.recentOptionsMap[localTimeType || 2].options;
|
|
149
|
+
if (options.map((m) => m.value).includes(value.recent_day)) {
|
|
150
|
+
showTimeText = ((_a = options.find((m) => m.value === value.recent_day)) == null ? void 0 : _a.label) || "";
|
|
151
|
+
} else if (end === "0") {
|
|
152
|
+
showTimeText = "近" + (Number(start) - Number(end) + 1) + unit;
|
|
153
|
+
} else {
|
|
154
|
+
showTimeText = start + unit + "前 ~ " + end + unit + "前";
|
|
155
|
+
}
|
|
156
|
+
if (value.time_type !== void 0 && [0, 1, 2].includes(normalizeTimeTypeForTimeTypes(value.time_type, timeTypes)) && (value.recent_day.split("|")[0] === "W" || value.recent_day.split("|")[0] === "M")) {
|
|
157
|
+
const today = (0, import_dayjs.default)();
|
|
158
|
+
const lastDayOfLastMonth = today.subtract(1, "month").endOf("month");
|
|
159
|
+
const daysToLastMonthStart = today.diff(lastDayOfLastMonth.startOf("month"), "day");
|
|
160
|
+
const daysToLastMonthEnd = today.diff(lastDayOfLastMonth, "day") + 1;
|
|
161
|
+
let startNum, endNum;
|
|
162
|
+
switch (value.recent_day) {
|
|
163
|
+
case "W|0|0":
|
|
164
|
+
startNum = today.day() === 0 ? 6 : today.day() - 1;
|
|
165
|
+
endNum = 0;
|
|
166
|
+
showTimeText = "本周";
|
|
167
|
+
break;
|
|
168
|
+
case "W|1|1":
|
|
169
|
+
startNum = today.day() === 0 ? 13 : today.day() + 6;
|
|
170
|
+
endNum = today.day() === 0 ? 7 : today.day();
|
|
171
|
+
showTimeText = "上周";
|
|
172
|
+
break;
|
|
173
|
+
case "M|0|0":
|
|
174
|
+
startNum = today.date() - 1;
|
|
175
|
+
endNum = 0;
|
|
176
|
+
showTimeText = "本月";
|
|
177
|
+
break;
|
|
178
|
+
case "M|1|1":
|
|
179
|
+
startNum = daysToLastMonthStart;
|
|
180
|
+
endNum = daysToLastMonthEnd;
|
|
181
|
+
showTimeText = "上月";
|
|
182
|
+
break;
|
|
183
|
+
default:
|
|
184
|
+
startNum = 0;
|
|
185
|
+
endNum = 0;
|
|
186
|
+
showTimeText = "";
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showTimeText, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical" }), getFormattedRecentTime(startNum, "start"), " ~ ", getFormattedRecentTime(endNum, "end"));
|
|
190
|
+
}
|
|
191
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, showTimeText, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical" }), getFormattedRecentTime(Number(start), "start"), " ~ ", getFormattedRecentTime(Number(end), "end"));
|
|
192
|
+
}
|
|
193
|
+
return "";
|
|
194
|
+
}, [value, timeTypes, localTimeType]);
|
|
195
|
+
const recentType = (0, import_react.useMemo)(() => {
|
|
196
|
+
switch (localTimeType) {
|
|
197
|
+
case 3:
|
|
198
|
+
return "W";
|
|
199
|
+
case 4:
|
|
200
|
+
return "M";
|
|
201
|
+
default:
|
|
202
|
+
return "D";
|
|
203
|
+
}
|
|
204
|
+
}, [localTimeType]);
|
|
205
|
+
const showRecentStart = (0, import_react.useMemo)(() => {
|
|
206
|
+
return getFormattedTimeRange(recentStart, "start");
|
|
207
|
+
}, [recentStart, localTimeType]);
|
|
208
|
+
const showRecentEnd = (0, import_react.useMemo)(() => {
|
|
209
|
+
return getFormattedTimeRange(recentEnd, "end");
|
|
210
|
+
}, [recentEnd, localTimeType]);
|
|
211
|
+
const timeTypeOptions = (0, import_react.useMemo)(() => {
|
|
212
|
+
return (timeTypes == null ? void 0 : timeTypes.map((item) => ({
|
|
213
|
+
key: item,
|
|
214
|
+
label: item,
|
|
215
|
+
children: null
|
|
216
|
+
}))) || [];
|
|
217
|
+
}, [timeTypes]);
|
|
218
|
+
const picker = (0, import_react.useMemo)(() => {
|
|
219
|
+
return localTimeType ? import_constants.pickerMap[localTimeType] : "date";
|
|
220
|
+
}, [localTimeType]);
|
|
221
|
+
const presetsTime = (0, import_react.useMemo)(() => {
|
|
222
|
+
if (timeFilterType === 1) {
|
|
223
|
+
return import_constants.recentOptionsMap[localTimeType || 2];
|
|
224
|
+
}
|
|
225
|
+
return import_constants.optionsMap[localTimeType || 2];
|
|
226
|
+
}, [localTimeType, timeFilterType]);
|
|
227
|
+
const startTime = (0, import_react.useMemo)(() => {
|
|
228
|
+
var _a;
|
|
229
|
+
return Number((_a = localValue == null ? void 0 : localValue[0]) == null ? void 0 : _a.format("HH")) || 0;
|
|
230
|
+
}, [localValue]);
|
|
231
|
+
const endTime = (0, import_react.useMemo)(() => {
|
|
232
|
+
var _a;
|
|
233
|
+
return Number((_a = localValue == null ? void 0 : localValue[1]) == null ? void 0 : _a.format("HH")) || 0;
|
|
234
|
+
}, [localValue]);
|
|
235
|
+
const disabledStartHours = (0, import_react.useMemo)(() => {
|
|
236
|
+
if ((localValue == null ? void 0 : localValue[0]) && (0, import_dayjs.default)(localValue[0]).isSame((0, import_dayjs.default)(), "day")) {
|
|
237
|
+
const currentHour = (0, import_dayjs.default)().hour();
|
|
238
|
+
return import_constants.startTimeOptions.filter((option) => option.value <= currentHour);
|
|
239
|
+
}
|
|
240
|
+
return import_constants.startTimeOptions;
|
|
241
|
+
}, [localValue]);
|
|
242
|
+
const disabledEndHours = (0, import_react.useMemo)(() => {
|
|
243
|
+
if ((localValue == null ? void 0 : localValue[1]) && (0, import_dayjs.default)(localValue[1]).isSame((0, import_dayjs.default)(), "day")) {
|
|
244
|
+
const currentHour = (0, import_dayjs.default)().hour();
|
|
245
|
+
return import_constants.endTimeOptions.filter((option) => option.value <= currentHour);
|
|
246
|
+
}
|
|
247
|
+
return import_constants.endTimeOptions;
|
|
248
|
+
}, [localValue]);
|
|
249
|
+
(0, import_react.useEffect)(() => {
|
|
250
|
+
if (value == null ? void 0 : value.recent_day) {
|
|
251
|
+
setTimeFilterType(1);
|
|
252
|
+
}
|
|
253
|
+
}, [value == null ? void 0 : value.recent_day]);
|
|
254
|
+
(0, import_react.useEffect)(() => {
|
|
255
|
+
if (!open)
|
|
256
|
+
return;
|
|
257
|
+
const onPointerDownCapture = (e) => {
|
|
258
|
+
var _a;
|
|
259
|
+
const el = e.target;
|
|
260
|
+
if (!(el instanceof Element))
|
|
261
|
+
return;
|
|
262
|
+
if ((_a = triggerWrapRef.current) == null ? void 0 : _a.contains(el))
|
|
263
|
+
return;
|
|
264
|
+
if (el.closest("[data-yk-range-time-with-recent-content]"))
|
|
265
|
+
return;
|
|
266
|
+
setOpen(false);
|
|
267
|
+
};
|
|
268
|
+
document.addEventListener("pointerdown", onPointerDownCapture, true);
|
|
269
|
+
return () => document.removeEventListener("pointerdown", onPointerDownCapture, true);
|
|
270
|
+
}, [open]);
|
|
271
|
+
(0, import_react.useEffect)(() => {
|
|
272
|
+
var _a, _b;
|
|
273
|
+
if (open) {
|
|
274
|
+
setActive("start");
|
|
275
|
+
setStartWeekDate(null);
|
|
276
|
+
setStartMonth(null);
|
|
277
|
+
const rangeStart = document.getElementById("RangeStart");
|
|
278
|
+
setTimeout(() => {
|
|
279
|
+
rangeStart == null ? void 0 : rangeStart.focus();
|
|
280
|
+
}, 10);
|
|
281
|
+
setLocalTimeType(normalizeTimeTypeForTimeTypes(value == null ? void 0 : value.time_type, timeTypes));
|
|
282
|
+
if (value == null ? void 0 : value.recent_day) {
|
|
283
|
+
if (value.time_type !== void 0 && [0, 1, 2].includes(normalizeTimeTypeForTimeTypes(value.time_type, timeTypes)) && (value.recent_day.split("|")[0] === "W" || value.recent_day.split("|")[0] === "M")) {
|
|
284
|
+
const today = (0, import_dayjs.default)();
|
|
285
|
+
const lastDayOfLastMonth = today.subtract(1, "month").endOf("month");
|
|
286
|
+
const daysToLastMonthStart = today.diff(lastDayOfLastMonth.startOf("month"), "day");
|
|
287
|
+
const daysToLastMonthEnd = today.diff(lastDayOfLastMonth, "day") + 1;
|
|
288
|
+
switch (value.recent_day) {
|
|
289
|
+
case "W|0|0":
|
|
290
|
+
setRecentStart(today.day() === 0 ? 6 : today.day() - 1);
|
|
291
|
+
setRecentEnd(0);
|
|
292
|
+
break;
|
|
293
|
+
case "W|1|1":
|
|
294
|
+
setRecentStart(today.day() === 0 ? 13 : today.day() + 6);
|
|
295
|
+
setRecentEnd(today.day() === 0 ? 7 : today.day());
|
|
296
|
+
break;
|
|
297
|
+
case "M|0|0":
|
|
298
|
+
setRecentStart(today.date() - 1);
|
|
299
|
+
setRecentEnd(0);
|
|
300
|
+
break;
|
|
301
|
+
case "M|1|1":
|
|
302
|
+
setRecentStart(daysToLastMonthStart);
|
|
303
|
+
setRecentEnd(daysToLastMonthEnd);
|
|
304
|
+
break;
|
|
305
|
+
default:
|
|
306
|
+
setRecentStart(0);
|
|
307
|
+
setRecentEnd(0);
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
setRecentStart(Number(value.recent_day.split("|")[1]));
|
|
312
|
+
setRecentEnd(Number(value.recent_day.split("|")[2]));
|
|
313
|
+
}
|
|
314
|
+
} else {
|
|
315
|
+
setLocalValue([(0, import_dayjs.default)((_a = value == null ? void 0 : value.time_range) == null ? void 0 : _a[0]), (0, import_dayjs.default)((_b = value == null ? void 0 : value.time_range) == null ? void 0 : _b[1])]);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}, [open]);
|
|
319
|
+
const timeChange = (hour, type) => {
|
|
320
|
+
const [start, end] = localValue || [];
|
|
321
|
+
if (type === "start") {
|
|
322
|
+
setLocalValue([(0, import_dayjs.default)(start).hour(hour), end]);
|
|
323
|
+
} else {
|
|
324
|
+
setLocalValue([start, (0, import_dayjs.default)(end).hour(hour)]);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
const presetClick = (item) => {
|
|
328
|
+
var _a, _b, _c, _d, _e;
|
|
329
|
+
setLocalValue((_a = item.value()) == null ? void 0 : _a.map((time) => (0, import_dayjs.default)(time)));
|
|
330
|
+
switch (localTimeType) {
|
|
331
|
+
case 1:
|
|
332
|
+
onChange({
|
|
333
|
+
time_range: [
|
|
334
|
+
(0, import_dayjs.default)((_b = item.value()) == null ? void 0 : _b[0]).format("YYYY-MM-DD HH:00"),
|
|
335
|
+
(0, import_dayjs.default)((_c = item.value()) == null ? void 0 : _c[1]).format("YYYY-MM-DD HH:59")
|
|
336
|
+
],
|
|
337
|
+
recent_day: null,
|
|
338
|
+
time_type: localTimeType
|
|
339
|
+
});
|
|
340
|
+
break;
|
|
341
|
+
default:
|
|
342
|
+
onChange({
|
|
343
|
+
time_range: [(0, import_dayjs.default)((_d = item.value()) == null ? void 0 : _d[0]).format("YYYY-MM-DD"), (0, import_dayjs.default)((_e = item.value()) == null ? void 0 : _e[1]).format("YYYY-MM-DD")],
|
|
344
|
+
recent_day: null,
|
|
345
|
+
time_type: localTimeType
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
setOpen(false);
|
|
349
|
+
};
|
|
350
|
+
const cellClick = (current, type) => {
|
|
351
|
+
const handleInputFocus = (isStart) => {
|
|
352
|
+
const element = document.getElementById("YkRangeTimeWithRecent");
|
|
353
|
+
const inputs = element == null ? void 0 : element.querySelectorAll("input");
|
|
354
|
+
inputs == null ? void 0 : inputs[isStart ? 0 : 1].focus();
|
|
355
|
+
};
|
|
356
|
+
const handleDateChange = (start, end, closePopup = true) => {
|
|
357
|
+
setLocalValue([start, end]);
|
|
358
|
+
setActive(active === "start" ? "end" : "start");
|
|
359
|
+
handleInputFocus(active === "end");
|
|
360
|
+
if (closePopup) {
|
|
361
|
+
const format = localTimeType === 4 ? "YYYY-MM" : "YYYY-MM-DD";
|
|
362
|
+
onChange({
|
|
363
|
+
time_range: [(0, import_dayjs.default)(start).format(format), (0, import_dayjs.default)(end).format(format)],
|
|
364
|
+
recent_day: null,
|
|
365
|
+
time_type: localTimeType
|
|
366
|
+
});
|
|
367
|
+
setOpen(false);
|
|
368
|
+
}
|
|
369
|
+
};
|
|
370
|
+
const dateTypeHandlers = {
|
|
371
|
+
month: () => {
|
|
372
|
+
const selectedMonth = current.startOf("month");
|
|
373
|
+
if (active === "start") {
|
|
374
|
+
setStartMonth(selectedMonth);
|
|
375
|
+
setActive("end");
|
|
376
|
+
handleInputFocus(false);
|
|
377
|
+
} else {
|
|
378
|
+
if (!startMonth)
|
|
379
|
+
return;
|
|
380
|
+
const endMonth = selectedMonth;
|
|
381
|
+
const [start, end] = endMonth.isAfter(startMonth) || endMonth.isSame(startMonth) ? [startMonth, endMonth] : [endMonth, startMonth.endOf("month")];
|
|
382
|
+
handleDateChange(start, end);
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
week: () => {
|
|
386
|
+
if (active === "start") {
|
|
387
|
+
setStartWeekDate(current.startOf("week"));
|
|
388
|
+
setActive("end");
|
|
389
|
+
handleInputFocus(false);
|
|
390
|
+
} else {
|
|
391
|
+
if (!startWeekDate)
|
|
392
|
+
return;
|
|
393
|
+
const startWeekStart = startWeekDate;
|
|
394
|
+
const endWeekStart = current.startOf("week");
|
|
395
|
+
if (endWeekStart.isAfter(startWeekStart) || endWeekStart.isSame(startWeekStart)) {
|
|
396
|
+
const start = startWeekStart;
|
|
397
|
+
const end = endWeekStart.isSame((0, import_dayjs.default)().startOf("week")) ? (0, import_dayjs.default)() : endWeekStart.endOf("week");
|
|
398
|
+
handleDateChange(start, end);
|
|
399
|
+
} else {
|
|
400
|
+
const start = endWeekStart;
|
|
401
|
+
const end = startWeekStart.endOf("week");
|
|
402
|
+
const finalEnd = end.isAfter((0, import_dayjs.default)()) ? (0, import_dayjs.default)() : end;
|
|
403
|
+
handleDateChange(start, finalEnd);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
date: () => {
|
|
408
|
+
if (active === "start") {
|
|
409
|
+
handleDateChange(current, (localValue == null ? void 0 : localValue[1]) || current, false);
|
|
410
|
+
} else {
|
|
411
|
+
if (!(localValue == null ? void 0 : localValue[0]))
|
|
412
|
+
return;
|
|
413
|
+
const [start, end] = localValue[0] > current ? [current, localValue[0]] : [localValue[0], current];
|
|
414
|
+
handleDateChange(start, end, localTimeType !== 1);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
const handler = dateTypeHandlers[type];
|
|
419
|
+
if (handler)
|
|
420
|
+
handler();
|
|
421
|
+
};
|
|
422
|
+
const cellRender = (current, info) => {
|
|
423
|
+
if (typeof current === "number" || typeof current === "string") {
|
|
424
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "ant-picker-cell-inner" }, current);
|
|
425
|
+
}
|
|
426
|
+
if (info.type !== "date") {
|
|
427
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 36 }, onClick: () => cellClick(current, info.type) }, info.originNode);
|
|
428
|
+
}
|
|
429
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "ant-picker-cell-inner", style: { width: 36 }, onClick: () => cellClick(current, info.type) }, current.date());
|
|
430
|
+
};
|
|
431
|
+
const content = /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.popoverContent, "data-yk-range-time-with-recent-content": true }, !timeTypes && noTimeFilter ? null : /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.header }, timeTypes && timeTypes.length > 0 && /* @__PURE__ */ import_react.default.createElement(
|
|
432
|
+
import_antd.Tabs,
|
|
433
|
+
{
|
|
434
|
+
activeKey: localTimeTypeName,
|
|
435
|
+
items: timeTypeOptions,
|
|
436
|
+
onChange: (key) => {
|
|
437
|
+
var _a, _b;
|
|
438
|
+
const timeTypeKey = (_a = Object.entries(timeTypeKeys).find(([_, label]) => label === key)) == null ? void 0 : _a[0];
|
|
439
|
+
setLocalTimeType(Number(timeTypeKey));
|
|
440
|
+
setLocalValue(
|
|
441
|
+
(_b = import_constants.optionsMap[timeTypeKey !== void 0 ? Number(timeTypeKey) : 2].default()) == null ? void 0 : _b.map((time) => (0, import_dayjs.default)(time))
|
|
442
|
+
);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
), !noTimeFilter && /* @__PURE__ */ import_react.default.createElement(
|
|
446
|
+
import_antd.Radio.Group,
|
|
447
|
+
{
|
|
448
|
+
optionType: "button",
|
|
449
|
+
value: timeFilterType,
|
|
450
|
+
style: {
|
|
451
|
+
marginLeft: "auto"
|
|
452
|
+
},
|
|
453
|
+
onChange: (e) => {
|
|
454
|
+
setTimeFilterType(e.target.value);
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
458
|
+
import_antd.Radio,
|
|
459
|
+
{
|
|
460
|
+
value: 0,
|
|
461
|
+
style: {
|
|
462
|
+
borderRadius: "2px 0 0 2px",
|
|
463
|
+
height: 26,
|
|
464
|
+
lineHeight: "24px",
|
|
465
|
+
padding: "0 10px"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"静态时间"
|
|
469
|
+
),
|
|
470
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
471
|
+
import_antd.Radio,
|
|
472
|
+
{
|
|
473
|
+
value: 1,
|
|
474
|
+
style: {
|
|
475
|
+
borderRadius: "0 2px 2px 0",
|
|
476
|
+
height: 26,
|
|
477
|
+
lineHeight: "24px",
|
|
478
|
+
padding: "0 10px"
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
"动态时间"
|
|
482
|
+
)
|
|
483
|
+
)), /* @__PURE__ */ import_react.default.createElement(
|
|
484
|
+
"div",
|
|
485
|
+
{
|
|
486
|
+
className: (0, import_classnames.default)(import_index_module.default.body, {
|
|
487
|
+
[import_index_module.default.showTimes]: localTimeType === 1 && timeFilterType === 0
|
|
488
|
+
})
|
|
489
|
+
},
|
|
490
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.left }, presetsTime.options.map((item) => /* @__PURE__ */ import_react.default.createElement(
|
|
491
|
+
import_antd.Button,
|
|
492
|
+
{
|
|
493
|
+
key: item.label,
|
|
494
|
+
className: import_index_module.default.presetBtn,
|
|
495
|
+
onClick: () => {
|
|
496
|
+
if (timeFilterType === 1) {
|
|
497
|
+
onChange({
|
|
498
|
+
time_range: null,
|
|
499
|
+
recent_day: item.value,
|
|
500
|
+
time_type: localTimeType
|
|
501
|
+
});
|
|
502
|
+
setOpen(false);
|
|
503
|
+
} else {
|
|
504
|
+
presetClick(item);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
item.label
|
|
509
|
+
))),
|
|
510
|
+
timeFilterType === 0 ? /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.right, id: "YkRangeTimeWithRecent", key: open ? "open" : "close" }, /* @__PURE__ */ import_react.default.createElement(
|
|
511
|
+
RangePicker,
|
|
512
|
+
{
|
|
513
|
+
id: "RangeStart",
|
|
514
|
+
locale: import_zh_CN.default,
|
|
515
|
+
className: import_index_module.default.rangePicker,
|
|
516
|
+
getPopupContainer: (triggerNode) => triggerNode.parentElement,
|
|
517
|
+
open,
|
|
518
|
+
cellRender,
|
|
519
|
+
picker,
|
|
520
|
+
autoFocus: true,
|
|
521
|
+
showWeek: false,
|
|
522
|
+
onOpenChange: () => {
|
|
523
|
+
},
|
|
524
|
+
classNames: { popup: { root: import_index_module.default.rangePickerPopup } },
|
|
525
|
+
value: localValue,
|
|
526
|
+
placement: "bottomLeft"
|
|
527
|
+
}
|
|
528
|
+
), localTimeType === 1 && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.boxTimes }, /* @__PURE__ */ import_react.default.createElement(
|
|
529
|
+
import_antd.Select,
|
|
530
|
+
{
|
|
531
|
+
options: disabledStartHours,
|
|
532
|
+
value: startTime,
|
|
533
|
+
defaultValue: import_constants.startTimeOptions[0].value,
|
|
534
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.ClockCircleOutlined, null),
|
|
535
|
+
className: import_index_module.default.timeSelectItem,
|
|
536
|
+
getPopupContainer: (triggerNode) => triggerNode.parentElement,
|
|
537
|
+
onChange: (hour) => {
|
|
538
|
+
timeChange(hour, "start");
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
542
|
+
import_antd.Select,
|
|
543
|
+
{
|
|
544
|
+
options: disabledEndHours,
|
|
545
|
+
value: endTime,
|
|
546
|
+
defaultValue: import_constants.endTimeOptions[import_constants.endTimeOptions.length - 1].value,
|
|
547
|
+
prefix: /* @__PURE__ */ import_react.default.createElement(import_icons.ClockCircleOutlined, null),
|
|
548
|
+
className: import_index_module.default.timeSelectItem,
|
|
549
|
+
getPopupContainer: (triggerNode) => triggerNode.parentElement,
|
|
550
|
+
onChange: (hour) => {
|
|
551
|
+
timeChange(hour, "end");
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
))) : /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.rightDynamic }, /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.dynamicItem }, /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.dynamicItemTitle }, /* @__PURE__ */ import_react.default.createElement("span", null, "开始时间:", showRecentStart)), /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.dynamicItemContent }, /* @__PURE__ */ import_react.default.createElement(
|
|
555
|
+
import_antd.InputNumber,
|
|
556
|
+
{
|
|
557
|
+
min: 0,
|
|
558
|
+
className: import_index_module.default.inputNumber,
|
|
559
|
+
value: recentStart,
|
|
560
|
+
onChange: (next) => {
|
|
561
|
+
const newStart = next || 0;
|
|
562
|
+
if (newStart < recentEnd) {
|
|
563
|
+
setRecentStart(newStart);
|
|
564
|
+
setRecentEnd(newStart);
|
|
565
|
+
} else {
|
|
566
|
+
setRecentStart(newStart);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
), /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#333" } }, recentType === "D" ? "天" : recentType === "W" ? "周" : "月", "前"))), /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.dynamicItem }, /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.dynamicItemTitle }, /* @__PURE__ */ import_react.default.createElement("span", null, "结束时间:", showRecentEnd)), /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.dynamicItemContent }, /* @__PURE__ */ import_react.default.createElement(
|
|
571
|
+
import_antd.InputNumber,
|
|
572
|
+
{
|
|
573
|
+
min: 0,
|
|
574
|
+
className: import_index_module.default.inputNumber,
|
|
575
|
+
value: recentEnd,
|
|
576
|
+
onChange: (next) => {
|
|
577
|
+
const newEnd = next || 0;
|
|
578
|
+
if (newEnd > recentStart) {
|
|
579
|
+
setRecentEnd(newEnd);
|
|
580
|
+
setRecentStart(newEnd);
|
|
581
|
+
} else {
|
|
582
|
+
setRecentEnd(newEnd);
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
), /* @__PURE__ */ import_react.default.createElement("span", { style: { color: "#333" } }, recentType === "D" ? "天" : recentType === "W" ? "周" : "月", "前"))))
|
|
587
|
+
), (localTimeType === 1 || timeFilterType === 1) && /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.footer }, /* @__PURE__ */ import_react.default.createElement(
|
|
588
|
+
import_antd.Button,
|
|
589
|
+
{
|
|
590
|
+
onClick: () => {
|
|
591
|
+
if (timeFilterType === 1) {
|
|
592
|
+
onChange({
|
|
593
|
+
time_range: null,
|
|
594
|
+
recent_day: `${recentType}|${recentStart}|${recentEnd}`,
|
|
595
|
+
time_type: localTimeType
|
|
596
|
+
});
|
|
597
|
+
} else {
|
|
598
|
+
if (localTimeType === 1) {
|
|
599
|
+
if ((0, import_dayjs.default)(localValue == null ? void 0 : localValue[1]).isBefore((0, import_dayjs.default)(localValue == null ? void 0 : localValue[0]))) {
|
|
600
|
+
import_antd.message.warning("结束时间不能早于开始时间");
|
|
601
|
+
return;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
onChange({
|
|
605
|
+
time_range: [
|
|
606
|
+
(0, import_dayjs.default)(localValue == null ? void 0 : localValue[0]).format("YYYY-MM-DD HH:00"),
|
|
607
|
+
(0, import_dayjs.default)(localValue == null ? void 0 : localValue[1]).format("YYYY-MM-DD HH:59")
|
|
608
|
+
],
|
|
609
|
+
recent_day: null,
|
|
610
|
+
time_type: localTimeType
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
setOpen(false);
|
|
614
|
+
},
|
|
615
|
+
type: "primary"
|
|
616
|
+
},
|
|
617
|
+
"确认"
|
|
618
|
+
)));
|
|
619
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.ConfigProvider, { locale: import_zh_CN2.default }, /* @__PURE__ */ import_react.default.createElement(
|
|
620
|
+
import_antd.Popover,
|
|
621
|
+
{
|
|
622
|
+
open,
|
|
623
|
+
onOpenChange: setOpen,
|
|
624
|
+
content,
|
|
625
|
+
arrow: false,
|
|
626
|
+
placement,
|
|
627
|
+
trigger: "click",
|
|
628
|
+
styles: { body: { borderRadius: 2, padding: 0 } }
|
|
629
|
+
},
|
|
630
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.btnRange, style, ref: triggerWrapRef }, timeTypes && timeTypes.length > 0 && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("span", { className: import_index_module.default.btnTimeType }, timeTypeKeys[normalizeTimeTypeForTimeTypes(value.time_type, timeTypes)]), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical" })), dateFieldOptionName && /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("span", { className: import_index_module.default.btnTimeType }, dateFieldOptionName), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { type: "vertical" })), !noIcon && /* @__PURE__ */ import_react.default.createElement("i", { className: "iconfont icon-date", style: { color: "#3B86F9" } }), showRangeTime ? /* @__PURE__ */ import_react.default.createElement("span", { className: import_index_module.default.btnRangeValue, style: !noIcon ? { marginLeft: 5 } : void 0 }, showRangeTime) : placeholder ? /* @__PURE__ */ import_react.default.createElement("div", { className: import_index_module.default.placeholder }, placeholder) : null, clearable && (value.time_range || value.recent_day) && /* @__PURE__ */ import_react.default.createElement(
|
|
631
|
+
"i",
|
|
632
|
+
{
|
|
633
|
+
onClick: (e) => {
|
|
634
|
+
e.stopPropagation();
|
|
635
|
+
onChange({
|
|
636
|
+
time_range: null,
|
|
637
|
+
recent_day: null,
|
|
638
|
+
time_type: localTimeType
|
|
639
|
+
});
|
|
640
|
+
},
|
|
641
|
+
className: (0, import_classnames.default)(import_index_module.default.clearIcon, "iconfont icon-guanbi1")
|
|
642
|
+
}
|
|
643
|
+
))
|
|
644
|
+
));
|
|
645
|
+
};
|
|
646
|
+
var YkRangeTimeWithRecent_default = YkRangeTimeWithRecent;
|
|
647
|
+
//# sourceMappingURL=index.js.map
|