@cloudtower/eagle 4100.0.18 → 4100.0.19

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.
Files changed (266) hide show
  1. package/dist/cjs/core/AccordionCard/index.js +1 -1
  2. package/dist/cjs/core/Alert/alert.style.js +2 -2
  3. package/dist/cjs/core/Antd5Tree/Antd5Tree.style.js +1 -1
  4. package/dist/cjs/core/Avatar/index.js +1 -1
  5. package/dist/cjs/core/Banner/banner.style.js +4 -4
  6. package/dist/cjs/core/BasicCTError/BasicCTError.style.js +1 -1
  7. package/dist/cjs/core/BlankState/style.js +1 -1
  8. package/dist/cjs/core/Breadcrumb/index.js +1 -1
  9. package/dist/cjs/core/Button/index.js +1 -1
  10. package/dist/cjs/core/ButtonGroup/index.js +2 -2
  11. package/dist/cjs/core/Card/CardBody.js +1 -1
  12. package/dist/cjs/core/Card/CardTitle.js +1 -1
  13. package/dist/cjs/core/Card/CardWrapper.js +2 -2
  14. package/dist/cjs/core/Cascader/cascader.style.js +11 -11
  15. package/dist/cjs/core/Checkbox/checkbox.style.js +1 -1
  16. package/dist/cjs/core/DetailCard/index.js +1 -1
  17. package/dist/cjs/core/DonutChart/index.js +2 -2
  18. package/dist/cjs/core/DropdownMenu/index.js +1 -1
  19. package/dist/cjs/core/ExpandableList/ExpandIcon.js +1 -1
  20. package/dist/cjs/core/ExpandableList/ExpandableContainer.js +1 -1
  21. package/dist/cjs/core/ExpandableList/ExpandableItem.js +2 -2
  22. package/dist/cjs/core/ExpandableList/RoundOrder.js +1 -1
  23. package/dist/cjs/core/FailedLoad/index.js +1 -1
  24. package/dist/cjs/core/FormItem/index.js +1 -1
  25. package/dist/cjs/core/Icon/index.js +1 -1
  26. package/dist/cjs/core/ImmersiveDialog/styles.js +14 -14
  27. package/dist/cjs/core/Input/index.js +1 -1
  28. package/dist/cjs/core/InputGroup/index.js +1 -1
  29. package/dist/cjs/core/InputInteger/index.js +1 -1
  30. package/dist/cjs/core/InputNumber/index.js +1 -1
  31. package/dist/cjs/core/InputPassword/index.js +1 -1
  32. package/dist/cjs/core/InputTagItem/index.js +1 -1
  33. package/dist/cjs/core/LegacySelect/select.style.js +1 -1
  34. package/dist/cjs/core/Legend/index.js +5 -5
  35. package/dist/cjs/core/LineChart/AreaHighlightLayer.js +122 -0
  36. package/dist/cjs/core/LineChart/ForecastLineLayer.js +134 -0
  37. package/dist/cjs/core/LineChart/LineChartActions.js +2 -2
  38. package/dist/cjs/core/LineChart/RenderChart.js +274 -20
  39. package/dist/cjs/core/LineChart/ThresholdIntersectionLayer.js +144 -0
  40. package/dist/cjs/core/LineChart/TooltipFormatter.js +44 -39
  41. package/dist/cjs/core/LineChart/areaHighlightUtils.js +89 -0
  42. package/dist/cjs/core/LineChart/index.js +20 -2
  43. package/dist/cjs/core/LineChart/lineChartDisplayUtils.js +32 -0
  44. package/dist/cjs/core/LineChart/lineSegments.js +90 -0
  45. package/dist/cjs/core/LineChart/styled.js +21 -9
  46. package/dist/cjs/core/LineChart/utils.js +93 -4
  47. package/dist/cjs/core/Link/index.js +1 -1
  48. package/dist/cjs/core/Loading/style.js +4 -4
  49. package/dist/cjs/core/LocalUpload/LocalUpload.style.js +2 -2
  50. package/dist/cjs/core/LogView/LogView.style.js +5 -5
  51. package/dist/cjs/core/MediumDialog/MediumDialog.js +1 -1
  52. package/dist/cjs/core/Metric/styled.js +8 -8
  53. package/dist/cjs/core/Nav/index.js +1 -1
  54. package/dist/cjs/core/Nav/style.js +2 -2
  55. package/dist/cjs/core/Overflow/index.js +2 -2
  56. package/dist/cjs/core/Pagination/index.js +2 -2
  57. package/dist/cjs/core/Progress/components.js +2 -2
  58. package/dist/cjs/core/Progress/index.js +2 -2
  59. package/dist/cjs/core/Progress/progress.style.js +4 -4
  60. package/dist/cjs/core/Progress/progress.widgets.js +2 -2
  61. package/dist/cjs/core/Radio/index.js +3 -3
  62. package/dist/cjs/core/SearchInput/SearchInput.style.js +5 -5
  63. package/dist/cjs/core/SegmentControl/index.js +4 -4
  64. package/dist/cjs/core/Select/select.style.js +4 -4
  65. package/dist/cjs/core/Select/select.widgets.js +3 -3
  66. package/dist/cjs/core/SimplePagination/index.js +2 -2
  67. package/dist/cjs/core/Skeleton/Content.js +1 -1
  68. package/dist/cjs/core/SmallDialog/SmallDialog.style.js +7 -7
  69. package/dist/cjs/core/StatusCapsule/index.js +2 -2
  70. package/dist/cjs/core/StepProgress/index.js +1 -1
  71. package/dist/cjs/core/Steps/style.js +5 -5
  72. package/dist/cjs/core/Styled/index.js +40 -40
  73. package/dist/cjs/core/Switch/index.js +2 -2
  74. package/dist/cjs/core/Tab/Tab.js +1 -1
  75. package/dist/cjs/core/Tab/Tab.style.js +4 -4
  76. package/dist/cjs/core/Table/TableSkeleton.js +1 -1
  77. package/dist/cjs/core/Table/TableWidget.js +1 -1
  78. package/dist/cjs/core/Table/index.js +3 -3
  79. package/dist/cjs/core/TableForm/Columns/FormItem.js +1 -1
  80. package/dist/cjs/core/TableForm/style.js +7 -7
  81. package/dist/cjs/core/Tag/SplitTag.js +1 -1
  82. package/dist/cjs/core/Tag/style.js +5 -5
  83. package/dist/cjs/core/Time/index.js +1 -1
  84. package/dist/cjs/core/TimeZoneSelect/index.js +7 -7
  85. package/dist/cjs/core/Timeline/Timeline.style.js +5 -5
  86. package/dist/cjs/core/Token/index.js +4 -4
  87. package/dist/cjs/core/Token/style.js +1 -1
  88. package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +1 -1
  89. package/dist/cjs/core/Tooltip/index.js +1 -1
  90. package/dist/cjs/core/Truncate/index.js +1 -1
  91. package/dist/cjs/core/Typo/index.js +58 -58
  92. package/dist/cjs/core/WizardDialog/styles.js +4 -4
  93. package/dist/cjs/coreX/BarChart/index.js +1 -1
  94. package/dist/cjs/coreX/BatchOperation/index.js +2 -2
  95. package/dist/cjs/coreX/ChartWithTooltip/index.js +6 -6
  96. package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +3 -3
  97. package/dist/cjs/coreX/CircleLoading/index.js +1 -1
  98. package/dist/cjs/coreX/CronCalendar/index.js +4 -4
  99. package/dist/cjs/coreX/CronPlan/index.js +4 -4
  100. package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  101. package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +9 -6
  102. package/dist/cjs/coreX/DateRangePicker/common.js +104 -5
  103. package/dist/cjs/coreX/DateRangePicker/index.js +107 -47
  104. package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  105. package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  106. package/dist/cjs/coreX/GoBackButton/index.js +1 -1
  107. package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
  108. package/dist/cjs/coreX/InfoRowList/InfoRow.js +1 -1
  109. package/dist/cjs/coreX/InfoRowList/InfoRowList.js +4 -4
  110. package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  111. package/dist/cjs/coreX/NamesTooltip/index.js +3 -3
  112. package/dist/cjs/coreX/OverflowTooltip/index.js +4 -4
  113. package/dist/cjs/coreX/Sider/index.js +3 -3
  114. package/dist/cjs/coreX/SummaryTable/index.js +5 -5
  115. package/dist/cjs/coreX/SwitchWithText/index.js +1 -1
  116. package/dist/cjs/coreX/TabMenu/index.js +2 -2
  117. package/dist/cjs/coreX/UnderlineTootip/index.js +1 -1
  118. package/dist/cjs/coreX/UnitWithChart/index.js +3 -3
  119. package/dist/cjs/index.js +13 -0
  120. package/dist/cjs/stats1.html +1 -1
  121. package/dist/components.css +4504 -4480
  122. package/dist/esm/core/AccordionCard/index.js +1 -1
  123. package/dist/esm/core/Alert/alert.style.js +2 -2
  124. package/dist/esm/core/Antd5Tree/Antd5Tree.style.js +1 -1
  125. package/dist/esm/core/Avatar/index.js +1 -1
  126. package/dist/esm/core/Banner/banner.style.js +4 -4
  127. package/dist/esm/core/BasicCTError/BasicCTError.style.js +1 -1
  128. package/dist/esm/core/BlankState/style.js +1 -1
  129. package/dist/esm/core/Breadcrumb/index.js +1 -1
  130. package/dist/esm/core/Button/index.js +1 -1
  131. package/dist/esm/core/ButtonGroup/index.js +2 -2
  132. package/dist/esm/core/Card/CardBody.js +1 -1
  133. package/dist/esm/core/Card/CardTitle.js +1 -1
  134. package/dist/esm/core/Card/CardWrapper.js +2 -2
  135. package/dist/esm/core/Cascader/cascader.style.js +11 -11
  136. package/dist/esm/core/Checkbox/checkbox.style.js +1 -1
  137. package/dist/esm/core/DetailCard/index.js +1 -1
  138. package/dist/esm/core/DonutChart/index.js +2 -2
  139. package/dist/esm/core/DropdownMenu/index.js +1 -1
  140. package/dist/esm/core/ExpandableList/ExpandIcon.js +1 -1
  141. package/dist/esm/core/ExpandableList/ExpandableContainer.js +1 -1
  142. package/dist/esm/core/ExpandableList/ExpandableItem.js +2 -2
  143. package/dist/esm/core/ExpandableList/RoundOrder.js +1 -1
  144. package/dist/esm/core/FailedLoad/index.js +1 -1
  145. package/dist/esm/core/FormItem/index.js +1 -1
  146. package/dist/esm/core/Icon/index.js +1 -1
  147. package/dist/esm/core/ImmersiveDialog/styles.js +14 -14
  148. package/dist/esm/core/Input/index.js +1 -1
  149. package/dist/esm/core/InputGroup/index.js +1 -1
  150. package/dist/esm/core/InputInteger/index.js +1 -1
  151. package/dist/esm/core/InputNumber/index.js +1 -1
  152. package/dist/esm/core/InputPassword/index.js +1 -1
  153. package/dist/esm/core/InputTagItem/index.js +1 -1
  154. package/dist/esm/core/LegacySelect/select.style.js +1 -1
  155. package/dist/esm/core/Legend/index.js +5 -5
  156. package/dist/esm/core/LineChart/AreaHighlightLayer.js +115 -0
  157. package/dist/esm/core/LineChart/ForecastLineLayer.js +124 -0
  158. package/dist/esm/core/LineChart/LineChartActions.js +2 -2
  159. package/dist/esm/core/LineChart/RenderChart.js +276 -23
  160. package/dist/esm/core/LineChart/ThresholdIntersectionLayer.js +134 -0
  161. package/dist/esm/core/LineChart/TooltipFormatter.js +41 -39
  162. package/dist/esm/core/LineChart/areaHighlightUtils.js +87 -0
  163. package/dist/esm/core/LineChart/index.js +21 -3
  164. package/dist/esm/core/LineChart/lineChartDisplayUtils.js +26 -0
  165. package/dist/esm/core/LineChart/lineSegments.js +87 -0
  166. package/dist/esm/core/LineChart/styled.js +20 -10
  167. package/dist/esm/core/LineChart/utils.js +91 -5
  168. package/dist/esm/core/Link/index.js +1 -1
  169. package/dist/esm/core/Loading/style.js +4 -4
  170. package/dist/esm/core/LocalUpload/LocalUpload.style.js +2 -2
  171. package/dist/esm/core/LogView/LogView.style.js +5 -5
  172. package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
  173. package/dist/esm/core/Metric/styled.js +8 -8
  174. package/dist/esm/core/Nav/index.js +1 -1
  175. package/dist/esm/core/Nav/style.js +2 -2
  176. package/dist/esm/core/Overflow/index.js +2 -2
  177. package/dist/esm/core/Pagination/index.js +2 -2
  178. package/dist/esm/core/Progress/components.js +2 -2
  179. package/dist/esm/core/Progress/index.js +2 -2
  180. package/dist/esm/core/Progress/progress.style.js +4 -4
  181. package/dist/esm/core/Progress/progress.widgets.js +2 -2
  182. package/dist/esm/core/Radio/index.js +3 -3
  183. package/dist/esm/core/SearchInput/SearchInput.style.js +5 -5
  184. package/dist/esm/core/SegmentControl/index.js +4 -4
  185. package/dist/esm/core/Select/select.style.js +4 -4
  186. package/dist/esm/core/Select/select.widgets.js +3 -3
  187. package/dist/esm/core/SimplePagination/index.js +2 -2
  188. package/dist/esm/core/Skeleton/Content.js +1 -1
  189. package/dist/esm/core/SmallDialog/SmallDialog.style.js +7 -7
  190. package/dist/esm/core/StatusCapsule/index.js +2 -2
  191. package/dist/esm/core/StepProgress/index.js +1 -1
  192. package/dist/esm/core/Steps/style.js +5 -5
  193. package/dist/esm/core/Styled/index.js +40 -40
  194. package/dist/esm/core/Switch/index.js +2 -2
  195. package/dist/esm/core/Tab/Tab.js +1 -1
  196. package/dist/esm/core/Tab/Tab.style.js +4 -4
  197. package/dist/esm/core/Table/TableSkeleton.js +1 -1
  198. package/dist/esm/core/Table/TableWidget.js +1 -1
  199. package/dist/esm/core/Table/index.js +3 -3
  200. package/dist/esm/core/TableForm/Columns/FormItem.js +1 -1
  201. package/dist/esm/core/TableForm/style.js +7 -7
  202. package/dist/esm/core/Tag/SplitTag.js +1 -1
  203. package/dist/esm/core/Tag/style.js +5 -5
  204. package/dist/esm/core/Time/index.js +1 -1
  205. package/dist/esm/core/TimeZoneSelect/index.js +7 -7
  206. package/dist/esm/core/Timeline/Timeline.style.js +5 -5
  207. package/dist/esm/core/Token/index.js +4 -4
  208. package/dist/esm/core/Token/style.js +1 -1
  209. package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +1 -1
  210. package/dist/esm/core/Tooltip/index.js +1 -1
  211. package/dist/esm/core/Truncate/index.js +1 -1
  212. package/dist/esm/core/Typo/index.js +58 -58
  213. package/dist/esm/core/WizardDialog/styles.js +4 -4
  214. package/dist/esm/coreX/BarChart/index.js +1 -1
  215. package/dist/esm/coreX/BatchOperation/index.js +2 -2
  216. package/dist/esm/coreX/ChartWithTooltip/index.js +6 -6
  217. package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +3 -3
  218. package/dist/esm/coreX/CircleLoading/index.js +1 -1
  219. package/dist/esm/coreX/CronCalendar/index.js +4 -4
  220. package/dist/esm/coreX/CronPlan/index.js +4 -4
  221. package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
  222. package/dist/esm/coreX/DateRangePicker/RelativeTime.js +10 -7
  223. package/dist/esm/coreX/DateRangePicker/common.js +99 -6
  224. package/dist/esm/coreX/DateRangePicker/index.js +108 -48
  225. package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
  226. package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
  227. package/dist/esm/coreX/GoBackButton/index.js +1 -1
  228. package/dist/esm/coreX/I18nNameTag/index.js +1 -1
  229. package/dist/esm/coreX/InfoRowList/InfoRow.js +1 -1
  230. package/dist/esm/coreX/InfoRowList/InfoRowList.js +4 -4
  231. package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
  232. package/dist/esm/coreX/NamesTooltip/index.js +3 -3
  233. package/dist/esm/coreX/OverflowTooltip/index.js +4 -4
  234. package/dist/esm/coreX/Sider/index.js +3 -3
  235. package/dist/esm/coreX/SummaryTable/index.js +5 -5
  236. package/dist/esm/coreX/SwitchWithText/index.js +1 -1
  237. package/dist/esm/coreX/TabMenu/index.js +2 -2
  238. package/dist/esm/coreX/UnderlineTootip/index.js +1 -1
  239. package/dist/esm/coreX/UnitWithChart/index.js +3 -3
  240. package/dist/esm/index.js +4 -1
  241. package/dist/esm/stats1.html +1 -1
  242. package/dist/linaria.merged.scss +5086 -5060
  243. package/dist/src/core/LineChart/AreaHighlightLayer.d.ts +31 -0
  244. package/dist/src/core/LineChart/ForecastLineLayer.d.ts +24 -0
  245. package/dist/src/core/LineChart/RenderChart.d.ts +5 -1
  246. package/dist/src/core/LineChart/ThresholdIntersectionLayer.d.ts +19 -0
  247. package/dist/src/core/LineChart/TooltipFormatter.d.ts +10 -0
  248. package/dist/src/core/LineChart/__test__/AreaHighlightLayer.test.d.ts +1 -0
  249. package/dist/src/core/LineChart/__test__/ForecastLineLayer.test.d.ts +1 -0
  250. package/dist/src/core/LineChart/__test__/utils.test.d.ts +1 -0
  251. package/dist/src/core/LineChart/areaHighlightUtils.d.ts +6 -0
  252. package/dist/src/core/LineChart/lineChartDisplayUtils.d.ts +7 -0
  253. package/dist/src/core/LineChart/lineSegments.d.ts +16 -0
  254. package/dist/src/core/LineChart/styled.d.ts +2 -0
  255. package/dist/src/core/LineChart/type.d.ts +94 -8
  256. package/dist/src/core/LineChart/utils.d.ts +31 -4
  257. package/dist/src/coreX/DateRangePicker/__tests__/AbsoluteDate.test.d.ts +1 -0
  258. package/dist/src/coreX/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
  259. package/dist/src/coreX/DateRangePicker/__tests__/RelativeTime.test.d.ts +1 -0
  260. package/dist/src/coreX/DateRangePicker/__tests__/common.test.d.ts +1 -0
  261. package/dist/src/coreX/DateRangePicker/common.d.ts +12 -3
  262. package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +5 -1
  263. package/dist/stories/docs/core/LineChart.stories.d.ts +4 -0
  264. package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +1 -0
  265. package/dist/style.css +4515 -4491
  266. package/package.json +3 -3
@@ -37,29 +37,29 @@ const units = {
37
37
  };
38
38
  const ChartContent = /*#__PURE__*/react.styled('div')({
39
39
  name: "ChartContent",
40
- class: "E_4100_0_18_c18bcrac",
40
+ class: "E_4100_0_19_c18bcrac",
41
41
  propsAsIs: false
42
42
  });
43
43
  const ChartTooltipContainer = /*#__PURE__*/react.styled('div')({
44
44
  name: "ChartTooltipContainer",
45
- class: "E_4100_0_18_cro7kg2",
45
+ class: "E_4100_0_19_cro7kg2",
46
46
  propsAsIs: false
47
47
  });
48
48
  const ChartTooltipRow = /*#__PURE__*/react.styled('div')({
49
49
  name: "ChartTooltipRow",
50
- class: "E_4100_0_18_c14wcxf0",
50
+ class: "E_4100_0_19_c14wcxf0",
51
51
  propsAsIs: false
52
52
  });
53
53
  const _exp = /*#__PURE__*/() => ChartTooltipRow;
54
54
  const ChartTooltipTitle = /*#__PURE__*/react.styled(_exp())({
55
55
  name: "ChartTooltipTitle",
56
- class: "E_4100_0_18_coy29mj",
56
+ class: "E_4100_0_19_coy29mj",
57
57
  propsAsIs: true
58
58
  });
59
59
  const _exp2 = /*#__PURE__*/() => props => props.color;
60
60
  const SpaceStatus = /*#__PURE__*/react.styled('i')({
61
61
  name: "SpaceStatus",
62
- class: "E_4100_0_18_s11212zy",
62
+ class: "E_4100_0_19_s11212zy",
63
63
  propsAsIs: false,
64
64
  vars: {
65
65
  "s11212zy-0": [_exp2()]
@@ -67,7 +67,7 @@ const SpaceStatus = /*#__PURE__*/react.styled('i')({
67
67
  });
68
68
  const PrimaryUnit = /*#__PURE__*/react.styled('div')({
69
69
  name: "PrimaryUnit",
70
- class: "E_4100_0_18_p1lyky6c",
70
+ class: "E_4100_0_19_p1lyky6c",
71
71
  propsAsIs: false
72
72
  });
73
73
  const ChartWithUnit = props => {
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const CheckPointListStyle = "E_4100_0_18_cyms3br";
4
- const CheckPointItemStyle = "E_4100_0_18_c157gu4z";
5
- const EmptyWrapper = "E_4100_0_18_eu1sysj";
3
+ const CheckPointListStyle = "E_4100_0_19_cyms3br";
4
+ const CheckPointItemStyle = "E_4100_0_19_c157gu4z";
5
+ const EmptyWrapper = "E_4100_0_19_eu1sysj";
6
6
 
7
7
  exports.CheckPointItemStyle = CheckPointItemStyle;
8
8
  exports.CheckPointListStyle = CheckPointListStyle;
@@ -39,7 +39,7 @@ var __objRest = (source, exclude) => {
39
39
  }
40
40
  return target;
41
41
  };
42
- const LoadingWrapper = "E_4100_0_18_l12xdkhl";
42
+ const LoadingWrapper = "E_4100_0_19_l12xdkhl";
43
43
  const CircleLoading = _a => {
44
44
  var _b = _a,
45
45
  {
@@ -18,10 +18,10 @@ var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
18
18
  var moment__default = /*#__PURE__*/_interopDefault(moment);
19
19
  var React__default = /*#__PURE__*/_interopDefault(React);
20
20
 
21
- const CronCalendarWrapper = "E_4100_0_18_clm1wy1";
22
- const Title = "E_4100_0_18_t1tsm00v";
23
- const Control = "E_4100_0_18_c167wnad";
24
- const Cell = "E_4100_0_18_cxhf7dh";
21
+ const CronCalendarWrapper = "E_4100_0_19_clm1wy1";
22
+ const Title = "E_4100_0_19_t1tsm00v";
23
+ const Control = "E_4100_0_19_c167wnad";
24
+ const Cell = "E_4100_0_19_cxhf7dh";
25
25
  const CronCalendar = ({
26
26
  plans
27
27
  }) => {
@@ -48,10 +48,10 @@ var __spreadValues = (a, b) => {
48
48
  return a;
49
49
  };
50
50
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
51
- const CronPlanWrapper = "E_4100_0_18_c1up1pdz";
52
- const CronPlanHeader = "E_4100_0_18_c156wh19";
53
- const ModeTabs = "E_4100_0_18_m126spxy";
54
- const Wrapper = "E_4100_0_18_wpbf4pq";
51
+ const CronPlanWrapper = "E_4100_0_19_c1up1pdz";
52
+ const CronPlanHeader = "E_4100_0_19_c156wh19";
53
+ const ModeTabs = "E_4100_0_19_m126spxy";
54
+ const Wrapper = "E_4100_0_19_wpbf4pq";
55
55
  const stringifyPlan = (mode, daily, weekly, monthly, i18n) => {
56
56
  const isZh = i18n.language === parrot.ParrotLngs.zh;
57
57
  const mark = i18n.t("components.date_mark");
@@ -4,22 +4,22 @@ var react = require('@linaria/react');
4
4
 
5
5
  const CalendarWrapper = /*#__PURE__*/react.styled('div')({
6
6
  name: "CalendarWrapper",
7
- class: "E_4100_0_18_c1kchka8",
7
+ class: "E_4100_0_19_c1kchka8",
8
8
  propsAsIs: false
9
9
  });
10
10
  const CalendarYearWrapper = /*#__PURE__*/react.styled('div')({
11
11
  name: "CalendarYearWrapper",
12
- class: "E_4100_0_18_ctdb951",
12
+ class: "E_4100_0_19_ctdb951",
13
13
  propsAsIs: false
14
14
  });
15
15
  const CalendarWeekWrapper = /*#__PURE__*/react.styled('ul')({
16
16
  name: "CalendarWeekWrapper",
17
- class: "E_4100_0_18_cvgtyx0",
17
+ class: "E_4100_0_19_cvgtyx0",
18
18
  propsAsIs: false
19
19
  });
20
20
  const CalendarMonthWrapper = /*#__PURE__*/react.styled('div')({
21
21
  name: "CalendarMonthWrapper",
22
- class: "E_4100_0_18_crprfvb",
22
+ class: "E_4100_0_19_crprfvb",
23
23
  propsAsIs: false
24
24
  });
25
25
  const CalendarStyle = {
@@ -30,7 +30,7 @@ const CalendarStyle = {
30
30
  };
31
31
  const InputTimeWrapper = /*#__PURE__*/react.styled('div')({
32
32
  name: "InputTimeWrapper",
33
- class: "E_4100_0_18_ipbxcfl",
33
+ class: "E_4100_0_19_ipbxcfl",
34
34
  propsAsIs: false
35
35
  });
36
36
  const InputTimeStyle = {
@@ -38,12 +38,12 @@ const InputTimeStyle = {
38
38
  };
39
39
  const AbsoluteTimeWrapper = /*#__PURE__*/react.styled('div')({
40
40
  name: "AbsoluteTimeWrapper",
41
- class: "E_4100_0_18_a120uq8m",
41
+ class: "E_4100_0_19_a120uq8m",
42
42
  propsAsIs: false
43
43
  });
44
44
  const AbsoluteTimeSectionWrapper = /*#__PURE__*/react.styled('div')({
45
45
  name: "AbsoluteTimeSectionWrapper",
46
- class: "E_4100_0_18_a15s9m0d",
46
+ class: "E_4100_0_19_a15s9m0d",
47
47
  propsAsIs: false
48
48
  });
49
49
  const AbsoluteTimeStyle = {
@@ -52,7 +52,7 @@ const AbsoluteTimeStyle = {
52
52
  };
53
53
  const RelativeTimeWrapper = /*#__PURE__*/react.styled('div')({
54
54
  name: "RelativeTimeWrapper",
55
- class: "E_4100_0_18_r5hl59d",
55
+ class: "E_4100_0_19_r5hl59d",
56
56
  propsAsIs: false
57
57
  });
58
58
  const RelativeTimeStyle = {
@@ -60,13 +60,13 @@ const RelativeTimeStyle = {
60
60
  };
61
61
  const DateRangePickerWrapper = /*#__PURE__*/react.styled('div')({
62
62
  name: "DateRangePickerWrapper",
63
- class: "E_4100_0_18_dhqt3dw",
63
+ class: "E_4100_0_19_dhqt3dw",
64
64
  propsAsIs: false
65
65
  });
66
- const DateRangePickerPopover = "E_4100_0_18_d956d92";
66
+ const DateRangePickerPopover = "E_4100_0_19_d956d92";
67
67
  const DateRangePickerHistory = /*#__PURE__*/react.styled('div')({
68
68
  name: "DateRangePickerHistory",
69
- class: "E_4100_0_18_d1tc7lgk",
69
+ class: "E_4100_0_19_d1tc7lgk",
70
70
  propsAsIs: false
71
71
  });
72
72
  const DateRangePickerStyle = {
@@ -74,7 +74,7 @@ const DateRangePickerStyle = {
74
74
  Popover: DateRangePickerPopover,
75
75
  History: DateRangePickerHistory
76
76
  };
77
- const ResetPopoverStyle = "E_4100_0_18_rzaik16";
77
+ const ResetPopoverStyle = "E_4100_0_19_rzaik16";
78
78
 
79
79
  exports.AbsoluteTimeStyle = AbsoluteTimeStyle;
80
80
  exports.CalendarStyle = CalendarStyle;
@@ -14,12 +14,13 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
14
14
  var React__default = /*#__PURE__*/_interopDefault(React);
15
15
  var Highlighter__default = /*#__PURE__*/_interopDefault(Highlighter);
16
16
 
17
- const HighlightKeywordStyle = "E_4100_0_18_h1ol2wl7";
17
+ const HighlightKeywordStyle = "E_4100_0_19_h1ol2wl7";
18
18
  const RelativeTime = props => {
19
19
  const {
20
20
  value,
21
21
  config,
22
22
  search,
23
+ type = "past",
23
24
  onChange
24
25
  } = props;
25
26
  const {
@@ -27,8 +28,9 @@ const RelativeTime = props => {
27
28
  } = useParrotTranslation();
28
29
  const configRef = React.useRef(config || common.BASIC_RELATIVE_TIME_CONFIG);
29
30
  const [keyword, setKeyword] = React.useState("");
31
+ const normalizedValue = value ? common.normalizeRelativeTime(value, type) : void 0;
30
32
  const configList = configRef.current.filter(config2 => {
31
- const text = common.getDateText(config2, t);
33
+ const text = common.getDateText(config2, t, type);
32
34
  return text.indexOf(keyword) > -1;
33
35
  });
34
36
  return /* @__PURE__ */React__default.default.createElement(DateRangePicker_style.RelativeTimeStyle.Wrapper, null, search ? /* @__PURE__ */React__default.default.createElement(index, {
@@ -39,12 +41,13 @@ const RelativeTime = props => {
39
41
  }) : null, /* @__PURE__ */React__default.default.createElement("ul", {
40
42
  className: core.cx("past-time-list", !search && "no-search")
41
43
  }, configList.map((config2, index) => {
42
- const selected = config2.unit === (value == null ? void 0 : value.unit) && config2.value === (value == null ? void 0 : value.value);
43
- const text = common.getDateText(config2, t);
44
+ const normalizedConfig = common.normalizeRelativeTime(config2, type);
45
+ const selected = normalizedConfig.unit === (normalizedValue == null ? void 0 : normalizedValue.unit) && normalizedConfig.value === (normalizedValue == null ? void 0 : normalizedValue.value) && normalizedConfig.type === (normalizedValue == null ? void 0 : normalizedValue.type);
46
+ const text = common.getDateText(normalizedConfig, t, type);
44
47
  return /* @__PURE__ */React__default.default.createElement("li", {
45
48
  key: index,
46
- className: core.cx(index$1.Typo.Label.l2_regular, selected && "selected", config2.disabled && "disabled"),
47
- onClick: () => onChange == null ? void 0 : onChange(config2)
49
+ className: core.cx(index$1.Typo.Label.l2_regular, selected && "selected", normalizedConfig.disabled && "disabled"),
50
+ onClick: () => onChange == null ? void 0 : onChange(normalizedConfig)
48
51
  }, /* @__PURE__ */React__default.default.createElement(Highlighter__default.default, {
49
52
  highlightClassName: core.cx(HighlightKeywordStyle, "highlight"),
50
53
  searchWords: [keyword],
@@ -8,6 +8,25 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
8
8
 
9
9
  var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
10
10
 
11
+ var __defProp = Object.defineProperty;
12
+ var __defProps = Object.defineProperties;
13
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
14
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
17
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
18
+ var __spreadValues = (a, b) => {
19
+ for (var prop in b || (b = {}))
20
+ if (__hasOwnProp.call(b, prop))
21
+ __defNormalProp(a, prop, b[prop]);
22
+ if (__getOwnPropSymbols)
23
+ for (var prop of __getOwnPropSymbols(b)) {
24
+ if (__propIsEnum.call(b, prop))
25
+ __defNormalProp(a, prop, b[prop]);
26
+ }
27
+ return a;
28
+ };
29
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
11
30
  const BASIC_RELATIVE_TIME_CONFIG = [
12
31
  {
13
32
  unit: "m",
@@ -144,15 +163,89 @@ function time2string(time) {
144
163
  return _time;
145
164
  }
146
165
  }
147
- function getDateText(date, t) {
148
- const count = date.value;
166
+ function normalizeRelativeTime(date, defaultType = "past") {
167
+ if (date.type) {
168
+ return date;
169
+ }
170
+ return __spreadProps(__spreadValues({}, date), {
171
+ type: defaultType
172
+ });
173
+ }
174
+ function getRelativeTimeRange(date, defaultType = "past", nowDate = dayjs__default.default()) {
175
+ const normalizedDate = normalizeRelativeTime(date, defaultType);
176
+ const rangeEnd = normalizedDate.type === "future" ? nowDate.add(normalizedDate.value, normalizedDate.unit) : nowDate.subtract(normalizedDate.value, normalizedDate.unit);
177
+ return [nowDate, rangeEnd];
178
+ }
179
+ function getEffectiveAbsoluteTimeBounds(type = "past", minDate, maxDate, nowDate = dayjs__default.default()) {
180
+ if (type !== "future") {
181
+ return {
182
+ minDate,
183
+ maxDate
184
+ };
185
+ }
186
+ let effectiveMinDate = nowDate.startOf("day");
187
+ let effectiveMaxDate = nowDate.add(1, "year");
188
+ if (minDate) {
189
+ const parsedMinDate = dayjs__default.default(minDate);
190
+ if (parsedMinDate.isValid() && parsedMinDate.isAfter(effectiveMinDate)) {
191
+ effectiveMinDate = parsedMinDate;
192
+ }
193
+ }
194
+ if (maxDate) {
195
+ const parsedMaxDate = dayjs__default.default(maxDate);
196
+ if (parsedMaxDate.isValid() && parsedMaxDate.isBefore(effectiveMaxDate)) {
197
+ effectiveMaxDate = parsedMaxDate;
198
+ }
199
+ }
200
+ return {
201
+ minDate: effectiveMinDate,
202
+ maxDate: effectiveMaxDate
203
+ };
204
+ }
205
+ function isAbsoluteTimeRangeWithinBounds(range, minDate, maxDate) {
206
+ const [start, end] = range;
207
+ const min = minDate ? dayjs__default.default(minDate) : void 0;
208
+ const max = maxDate ? dayjs__default.default(maxDate) : void 0;
209
+ if (!(start == null ? void 0 : start.isValid()) || !(end == null ? void 0 : end.isValid()) || start.isAfter(end) || min && !min.isValid() || max && !max.isValid() || min && max && min.isAfter(max)) {
210
+ return false;
211
+ }
212
+ return (!min || !start.isBefore(min)) && (!max || !end.isAfter(max));
213
+ }
214
+ function hasAbsoluteTimeRangeIntersection(range, minDate, maxDate) {
215
+ const [start, end] = range;
216
+ const min = minDate ? dayjs__default.default(minDate) : void 0;
217
+ const max = maxDate ? dayjs__default.default(maxDate) : void 0;
218
+ if (!(start == null ? void 0 : start.isValid()) || !(end == null ? void 0 : end.isValid()) || start.isAfter(end) || min && !min.isValid() || max && !max.isValid() || min && max && min.isAfter(max)) {
219
+ return false;
220
+ }
221
+ return (!min || !end.isBefore(min)) && (!max || !start.isAfter(max));
222
+ }
223
+ function clampAbsoluteTimeRangeToBounds(range, minDate, maxDate) {
224
+ if (!hasAbsoluteTimeRangeIntersection(range, minDate, maxDate)) {
225
+ return void 0;
226
+ }
227
+ const [start, end] = range;
228
+ const min = minDate ? dayjs__default.default(minDate) : void 0;
229
+ const max = maxDate ? dayjs__default.default(maxDate) : void 0;
230
+ const clampedRange = [
231
+ min && start.isBefore(min) ? min : start,
232
+ max && end.isAfter(max) ? max : end
233
+ ];
234
+ return isAbsoluteTimeRangeWithinBounds(clampedRange, minDate, maxDate) ? clampedRange : void 0;
235
+ }
236
+ function getDateText(date, t, defaultType = "past") {
237
+ const normalizedDate = normalizeRelativeTime(date, defaultType);
238
+ const count = normalizedDate.value;
149
239
  const dateString = {
150
240
  d: t("common.day_count", { count }),
151
241
  h: t("common.hour_count", { count }),
152
242
  m: t("common.minute_count", { count }),
153
- M: t("common.month_measure_count", { count })
154
- }[date.unit];
155
- return `${t("components.past")} ${dateString}`;
243
+ M: t("common.month_measure_count", { count }),
244
+ y: t("common.year_count", { count })
245
+ }[normalizedDate.unit];
246
+ return `${t(
247
+ normalizedDate.type === "future" ? "components.future" : "components.past"
248
+ )} ${dateString}`;
156
249
  }
157
250
  function checkDateNotInRange(date, minDate, maxDate) {
158
251
  if (!minDate && !maxDate) {
@@ -190,12 +283,18 @@ function copyDay(day) {
190
283
 
191
284
  exports.BASIC_RELATIVE_TIME_CONFIG = BASIC_RELATIVE_TIME_CONFIG;
192
285
  exports.checkDateNotInRange = checkDateNotInRange;
286
+ exports.clampAbsoluteTimeRangeToBounds = clampAbsoluteTimeRangeToBounds;
193
287
  exports.copyDay = copyDay;
194
288
  exports.getClassNameForDateBlock = getClassNameForDateBlock;
195
289
  exports.getDateText = getDateText;
196
290
  exports.getDiffMonthAndDate = getDiffMonthAndDate;
291
+ exports.getEffectiveAbsoluteTimeBounds = getEffectiveAbsoluteTimeBounds;
292
+ exports.getRelativeTimeRange = getRelativeTimeRange;
197
293
  exports.getTime = getTime;
294
+ exports.hasAbsoluteTimeRangeIntersection = hasAbsoluteTimeRangeIntersection;
295
+ exports.isAbsoluteTimeRangeWithinBounds = isAbsoluteTimeRangeWithinBounds;
198
296
  exports.isSameDate = isSameDate;
297
+ exports.normalizeRelativeTime = normalizeRelativeTime;
199
298
  exports.time2string = time2string;
200
299
  exports.time2stringByUnit = time2stringByUnit;
201
300
  exports.trimTime = trimTime;
@@ -45,7 +45,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
45
45
  const TimeRange = (props) => {
46
46
  const {
47
47
  visible,
48
- type,
48
+ panelType,
49
+ direction,
49
50
  relativeTime,
50
51
  range,
51
52
  mode = ["relative", "absolute"],
@@ -71,6 +72,7 @@ const TimeRange = (props) => {
71
72
  RelativeTime,
72
73
  {
73
74
  value: relativeTime,
75
+ type: direction,
74
76
  onChange: (time) => onRelativeTimeChange == null ? void 0 : onRelativeTimeChange(time),
75
77
  config: relativeTimeSelectOptions
76
78
  }
@@ -83,6 +85,7 @@ const TimeRange = (props) => {
83
85
  range: range || [null, null],
84
86
  minDate,
85
87
  maxDate,
88
+ maxRange,
86
89
  onChange: (range2) => onAbsoluteTimeChange == null ? void 0 : onAbsoluteTimeChange(range2),
87
90
  onOk: (range2) => onAbsoluteTimeOk == null ? void 0 : onAbsoluteTimeOk(range2)
88
91
  }
@@ -96,6 +99,7 @@ const TimeRange = (props) => {
96
99
  RelativeTime,
97
100
  {
98
101
  value: relativeTime,
102
+ type: direction,
99
103
  onChange: (time) => onRelativeTimeChange == null ? void 0 : onRelativeTimeChange(time),
100
104
  config: relativeTimeSelectOptions
101
105
  }
@@ -121,7 +125,7 @@ const TimeRange = (props) => {
121
125
  return /* @__PURE__ */ React__default.default.createElement(
122
126
  index$2,
123
127
  {
124
- selectedKey: type,
128
+ selectedKey: panelType,
125
129
  tabs,
126
130
  onChange: onTypeChange,
127
131
  size: "small"
@@ -130,23 +134,48 @@ const TimeRange = (props) => {
130
134
  }
131
135
  };
132
136
  const TimePickerHistory = (props) => {
133
- const { history, onSelect } = props;
137
+ const { history, type, minDate, maxDate, onSelect } = props;
134
138
  const { t } = useParrotTranslation();
135
139
  function contentRender() {
136
- if (!history.length) {
140
+ const filteredHistory = history.filter((item) => {
141
+ if (Array.isArray(item.value)) {
142
+ if (type !== "future") {
143
+ return true;
144
+ }
145
+ if (item.value.length !== 2 || !item.value[0] || !item.value[1]) {
146
+ return false;
147
+ }
148
+ return common.hasAbsoluteTimeRangeIntersection(
149
+ [dayjs__default.default(item.value[0]), dayjs__default.default(item.value[1])],
150
+ minDate,
151
+ maxDate
152
+ );
153
+ }
154
+ return common.normalizeRelativeTime(item.value, "past").type === type;
155
+ }).sort((a, b) => b.timestamp - a.timestamp);
156
+ if (!filteredHistory.length) {
137
157
  return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, t("components.empty_search_history"));
138
158
  }
139
- return history.sort((a, b) => b.timestamp - a.timestamp).map((item, index) => {
159
+ return filteredHistory.map((item, index) => {
160
+ const normalizedRelativeTime = Array.isArray(item.value) ? void 0 : common.normalizeRelativeTime(item.value, "past");
140
161
  const text = Array.isArray(item.value) ? `${dayjs__default.default(item.value[0]).format("YYYY-MM-DD hh:mm:ss")} - ${dayjs__default.default(
141
162
  item.value[1]
142
- ).format("YYYY-MM-DD hh:mm:ss")}` : common.getDateText(item.value, t);
143
- const obj = Array.isArray(item.value) ? [dayjs__default.default(item.value[0]), dayjs__default.default(item.value[1])] : item.value;
163
+ ).format("YYYY-MM-DD hh:mm:ss")}` : common.getDateText(normalizedRelativeTime, t);
144
164
  return /* @__PURE__ */ React__default.default.createElement(
145
165
  "li",
146
166
  {
147
167
  key: index,
148
168
  className: index$3.Typo.Label.l2_regular,
149
- onClick: () => onSelect(obj)
169
+ onClick: () => {
170
+ if (Array.isArray(item.value)) {
171
+ onSelect([
172
+ dayjs__default.default(item.value[0]),
173
+ dayjs__default.default(item.value[1])
174
+ ]);
175
+ return;
176
+ }
177
+ onSelect(normalizedRelativeTime);
178
+ }
150
179
  },
151
180
  text
152
181
  );
@@ -159,6 +188,7 @@ const DateRangePicker = (props) => {
159
188
  const {
160
189
  size = "medium",
161
190
  value,
191
+ type: relativeTimeType = "past",
162
192
  history,
163
193
  mode = ["relative", "absolute"],
164
194
  minDate,
@@ -169,35 +199,48 @@ const DateRangePicker = (props) => {
169
199
  } = props;
170
200
  const { t } = useParrotTranslation();
171
201
  const [datePickerVisible, setDatePickerVisible] = React.useState(false);
172
- const [type, setType] = React.useState("relative");
202
+ const [panelType, setPanelType] = React.useState("relative");
173
203
  const [range, setRange] = React.useState(
174
204
  Array.isArray(value) ? value : void 0
175
205
  );
176
- const relativeTime = !Array.isArray(value) ? value : void 0;
177
- const isRelativeValue = value && !Array.isArray(value);
206
+ const relativeTime = value && !Array.isArray(value) ? common.normalizeRelativeTime(value, relativeTimeType) : void 0;
207
+ const { minDate: effectiveMinDate, maxDate: effectiveMaxDate } = common.getEffectiveAbsoluteTimeBounds(relativeTimeType, minDate, maxDate);
178
208
  const isAbsoluteValue = value && Array.isArray(value);
179
- function handleChange(type2, time) {
209
+ function handleChange(type, time) {
180
210
  var _a2, _b;
181
211
  const rangeHistory = [
182
212
  ...(_a2 = history == null ? void 0 : history.dateRangeHistories[history.scope]) != null ? _a2 : []
183
213
  ];
184
- if (type2 === "absolute" && Array.isArray(time)) {
214
+ if (type === "absolute" && Array.isArray(time)) {
215
+ if (relativeTimeType === "future" && !common.isAbsoluteTimeRangeWithinBounds(
216
+ time,
217
+ effectiveMinDate,
218
+ effectiveMaxDate
219
+ )) {
220
+ return;
221
+ }
185
222
  const value2 = time.map((item) => (item == null ? void 0 : item.format()) || "");
186
223
  rangeHistory.push({
187
- type: type2,
224
+ type,
188
225
  value: value2,
189
226
  timestamp: Date.now()
190
227
  });
191
- onChange == null ? void 0 : onChange(type2, time, time);
192
- } else if (type2 === "relative" && !Array.isArray(time)) {
228
+ onChange == null ? void 0 : onChange(type, time, time);
229
+ } else if (type === "relative" && !Array.isArray(time)) {
230
+ const normalizedRelativeTime = common.normalizeRelativeTime(
231
+ time,
232
+ relativeTimeType
233
+ );
193
234
  rangeHistory.push({
194
- type: type2,
195
- value: time,
235
+ type,
236
+ value: normalizedRelativeTime,
196
237
  timestamp: Date.now()
197
238
  });
198
- const today = dayjs__default.default();
199
- const pastDay = dayjs__default.default().subtract(time.value, time.unit);
200
- onChange == null ? void 0 : onChange(type2, time, [today, pastDay]);
239
+ onChange == null ? void 0 : onChange(
240
+ type,
241
+ normalizedRelativeTime,
242
+ common.getRelativeTimeRange(normalizedRelativeTime)
243
+ );
201
244
  }
202
245
  history == null ? void 0 : history.setDateRangeHistory(__spreadProps(__spreadValues({}, (_b = history == null ? void 0 : history.dateRangeHistories) != null ? _b : {}), {
203
246
  [history.scope]: rangeHistory
@@ -205,21 +248,19 @@ const DateRangePicker = (props) => {
205
248
  setDatePickerVisible(false);
206
249
  }
207
250
  React.useEffect(() => {
208
- if (isRelativeValue) {
209
- const today = dayjs__default.default();
210
- const pastDay = dayjs__default.default().subtract(value.value, value.unit);
211
- setType("relative");
212
- onChange == null ? void 0 : onChange("relative", value, [today, pastDay]);
213
- } else if (isAbsoluteValue) {
251
+ if (relativeTime) {
252
+ setPanelType("relative");
253
+ onChange == null ? void 0 : onChange("relative", relativeTime, common.getRelativeTimeRange(relativeTime));
254
+ } else if (Array.isArray(value)) {
214
255
  setRange(value);
215
- setType("absolute");
256
+ setPanelType("absolute");
216
257
  onChange == null ? void 0 : onChange("absolute", value, value);
217
258
  }
218
- }, [value]);
259
+ }, [relativeTimeType, value]);
219
260
  function displayRangeRender() {
220
261
  var _a2, _b;
221
- if (isRelativeValue) {
222
- return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, common.getDateText(value, t));
262
+ if (relativeTime) {
263
+ return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, common.getDateText(relativeTime, t));
223
264
  } else if (isAbsoluteValue) {
224
265
  return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, /* @__PURE__ */ React__default.default.createElement(
225
266
  index$4,
@@ -239,21 +280,36 @@ const DateRangePicker = (props) => {
239
280
  }
240
281
  }
241
282
  function handleSelectHistory(value2) {
242
- const type2 = Array.isArray(value2) ? "absolute" : "relative";
243
- if (type2 === "absolute" && Array.isArray(value2)) {
244
- const _value = [...value2];
245
- const [start, end] = _value;
246
- if (minDate && start) {
247
- const _minDate = dayjs__default.default(minDate);
248
- _value[0] = start.isBefore(_minDate) ? _minDate : start;
283
+ if (Array.isArray(value2)) {
284
+ let selectedRange = [...value2];
285
+ if (relativeTimeType === "future") {
286
+ selectedRange = common.clampAbsoluteTimeRangeToBounds(
287
+ value2,
288
+ effectiveMinDate,
289
+ effectiveMaxDate
290
+ );
291
+ } else {
292
+ const [start, end] = selectedRange;
293
+ if (minDate && start) {
294
+ const parsedMinDate = dayjs__default.default(minDate);
295
+ selectedRange[0] = start.isBefore(parsedMinDate) ? parsedMinDate : start;
296
+ }
297
+ if (maxDate && end) {
298
+ const parsedMaxDate = dayjs__default.default(maxDate);
299
+ selectedRange[1] = end.isAfter(parsedMaxDate) ? parsedMaxDate : end;
300
+ }
249
301
  }
250
- if (maxDate && end) {
251
- const _maxDate = dayjs__default.default(maxDate);
252
- _value[1] = end.isAfter(_maxDate) ? _maxDate : end;
302
+ if (!selectedRange) {
303
+ return;
253
304
  }
254
- handleChange(type2, _value);
305
+ const [selectedStart, selectedEnd] = selectedRange;
306
+ if (!(selectedStart == null ? void 0 : selectedStart.isValid()) || !(selectedEnd == null ? void 0 : selectedEnd.isValid()) || selectedStart.isAfter(selectedEnd)) {
307
+ return;
308
+ }
309
+ handleChange("absolute", selectedRange);
310
+ return;
255
311
  }
256
- handleChange(type2, value2);
312
+ handleChange("relative", common.normalizeRelativeTime(value2, "past"));
257
313
  }
258
314
  return /* @__PURE__ */ React__default.default.createElement(
259
315
  DateRangePicker_style.DateRangePickerStyle.Wrapper,
@@ -292,14 +348,15 @@ const DateRangePicker = (props) => {
292
348
  TimeRange,
293
349
  {
294
350
  visible: datePickerVisible,
295
- type,
351
+ panelType,
352
+ direction: relativeTimeType,
296
353
  range,
297
354
  relativeTime,
298
355
  mode,
299
- minDate,
300
- maxDate,
356
+ minDate: effectiveMinDate,
357
+ maxDate: effectiveMaxDate,
301
358
  maxRange,
302
- onTypeChange: setType,
359
+ onTypeChange: setPanelType,
303
360
  onRelativeTimeChange: (time) => {
304
361
  handleChange("relative", time);
305
362
  },
@@ -330,6 +387,9 @@ const DateRangePicker = (props) => {
330
387
  TimePickerHistory,
331
388
  {
332
389
  history: (_a = history.dateRangeHistories[history.scope]) != null ? _a : [],
390
+ type: relativeTimeType,
391
+ minDate: effectiveMinDate,
392
+ maxDate: effectiveMaxDate,
333
393
  onSelect: handleSelectHistory
334
394
  }
335
395
  ),
@@ -10,8 +10,8 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
 
11
11
  var React__default = /*#__PURE__*/_interopDefault(React);
12
12
 
13
- const ContentStyle = "E_4100_0_18_cevhqx7";
14
- const SecondaryDescStyle = "E_4100_0_18_snbqlt4";
13
+ const ContentStyle = "E_4100_0_19_cevhqx7";
14
+ const SecondaryDescStyle = "E_4100_0_19_snbqlt4";
15
15
  const DeleteDialog = props => {
16
16
  const {
17
17
  t