@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.
- package/dist/cjs/core/AccordionCard/index.js +1 -1
- package/dist/cjs/core/Alert/alert.style.js +2 -2
- package/dist/cjs/core/Antd5Tree/Antd5Tree.style.js +1 -1
- package/dist/cjs/core/Avatar/index.js +1 -1
- package/dist/cjs/core/Banner/banner.style.js +4 -4
- package/dist/cjs/core/BasicCTError/BasicCTError.style.js +1 -1
- package/dist/cjs/core/BlankState/style.js +1 -1
- package/dist/cjs/core/Breadcrumb/index.js +1 -1
- package/dist/cjs/core/Button/index.js +1 -1
- package/dist/cjs/core/ButtonGroup/index.js +2 -2
- package/dist/cjs/core/Card/CardBody.js +1 -1
- package/dist/cjs/core/Card/CardTitle.js +1 -1
- package/dist/cjs/core/Card/CardWrapper.js +2 -2
- package/dist/cjs/core/Cascader/cascader.style.js +11 -11
- package/dist/cjs/core/Checkbox/checkbox.style.js +1 -1
- package/dist/cjs/core/DetailCard/index.js +1 -1
- package/dist/cjs/core/DonutChart/index.js +2 -2
- package/dist/cjs/core/DropdownMenu/index.js +1 -1
- package/dist/cjs/core/ExpandableList/ExpandIcon.js +1 -1
- package/dist/cjs/core/ExpandableList/ExpandableContainer.js +1 -1
- package/dist/cjs/core/ExpandableList/ExpandableItem.js +2 -2
- package/dist/cjs/core/ExpandableList/RoundOrder.js +1 -1
- package/dist/cjs/core/FailedLoad/index.js +1 -1
- package/dist/cjs/core/FormItem/index.js +1 -1
- package/dist/cjs/core/Icon/index.js +1 -1
- package/dist/cjs/core/ImmersiveDialog/styles.js +14 -14
- package/dist/cjs/core/Input/index.js +1 -1
- package/dist/cjs/core/InputGroup/index.js +1 -1
- package/dist/cjs/core/InputInteger/index.js +1 -1
- package/dist/cjs/core/InputNumber/index.js +1 -1
- package/dist/cjs/core/InputPassword/index.js +1 -1
- package/dist/cjs/core/InputTagItem/index.js +1 -1
- package/dist/cjs/core/LegacySelect/select.style.js +1 -1
- package/dist/cjs/core/Legend/index.js +5 -5
- package/dist/cjs/core/LineChart/AreaHighlightLayer.js +122 -0
- package/dist/cjs/core/LineChart/ForecastLineLayer.js +134 -0
- package/dist/cjs/core/LineChart/LineChartActions.js +2 -2
- package/dist/cjs/core/LineChart/RenderChart.js +274 -20
- package/dist/cjs/core/LineChart/ThresholdIntersectionLayer.js +144 -0
- package/dist/cjs/core/LineChart/TooltipFormatter.js +44 -39
- package/dist/cjs/core/LineChart/areaHighlightUtils.js +89 -0
- package/dist/cjs/core/LineChart/index.js +20 -2
- package/dist/cjs/core/LineChart/lineChartDisplayUtils.js +32 -0
- package/dist/cjs/core/LineChart/lineSegments.js +90 -0
- package/dist/cjs/core/LineChart/styled.js +21 -9
- package/dist/cjs/core/LineChart/utils.js +93 -4
- package/dist/cjs/core/Link/index.js +1 -1
- package/dist/cjs/core/Loading/style.js +4 -4
- package/dist/cjs/core/LocalUpload/LocalUpload.style.js +2 -2
- package/dist/cjs/core/LogView/LogView.style.js +5 -5
- package/dist/cjs/core/MediumDialog/MediumDialog.js +1 -1
- package/dist/cjs/core/Metric/styled.js +8 -8
- package/dist/cjs/core/Nav/index.js +1 -1
- package/dist/cjs/core/Nav/style.js +2 -2
- package/dist/cjs/core/Overflow/index.js +2 -2
- package/dist/cjs/core/Pagination/index.js +2 -2
- package/dist/cjs/core/Progress/components.js +2 -2
- package/dist/cjs/core/Progress/index.js +2 -2
- package/dist/cjs/core/Progress/progress.style.js +4 -4
- package/dist/cjs/core/Progress/progress.widgets.js +2 -2
- package/dist/cjs/core/Radio/index.js +3 -3
- package/dist/cjs/core/SearchInput/SearchInput.style.js +5 -5
- package/dist/cjs/core/SegmentControl/index.js +4 -4
- package/dist/cjs/core/Select/select.style.js +4 -4
- package/dist/cjs/core/Select/select.widgets.js +3 -3
- package/dist/cjs/core/SimplePagination/index.js +2 -2
- package/dist/cjs/core/Skeleton/Content.js +1 -1
- package/dist/cjs/core/SmallDialog/SmallDialog.style.js +7 -7
- package/dist/cjs/core/StatusCapsule/index.js +2 -2
- package/dist/cjs/core/StepProgress/index.js +1 -1
- package/dist/cjs/core/Steps/style.js +5 -5
- package/dist/cjs/core/Styled/index.js +40 -40
- package/dist/cjs/core/Switch/index.js +2 -2
- package/dist/cjs/core/Tab/Tab.js +1 -1
- package/dist/cjs/core/Tab/Tab.style.js +4 -4
- package/dist/cjs/core/Table/TableSkeleton.js +1 -1
- package/dist/cjs/core/Table/TableWidget.js +1 -1
- package/dist/cjs/core/Table/index.js +3 -3
- package/dist/cjs/core/TableForm/Columns/FormItem.js +1 -1
- package/dist/cjs/core/TableForm/style.js +7 -7
- package/dist/cjs/core/Tag/SplitTag.js +1 -1
- package/dist/cjs/core/Tag/style.js +5 -5
- package/dist/cjs/core/Time/index.js +1 -1
- package/dist/cjs/core/TimeZoneSelect/index.js +7 -7
- package/dist/cjs/core/Timeline/Timeline.style.js +5 -5
- package/dist/cjs/core/Token/index.js +4 -4
- package/dist/cjs/core/Token/style.js +1 -1
- package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +1 -1
- package/dist/cjs/core/Tooltip/index.js +1 -1
- package/dist/cjs/core/Truncate/index.js +1 -1
- package/dist/cjs/core/Typo/index.js +58 -58
- package/dist/cjs/core/WizardDialog/styles.js +4 -4
- package/dist/cjs/coreX/BarChart/index.js +1 -1
- package/dist/cjs/coreX/BatchOperation/index.js +2 -2
- package/dist/cjs/coreX/ChartWithTooltip/index.js +6 -6
- package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +3 -3
- package/dist/cjs/coreX/CircleLoading/index.js +1 -1
- package/dist/cjs/coreX/CronCalendar/index.js +4 -4
- package/dist/cjs/coreX/CronPlan/index.js +4 -4
- package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
- package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +9 -6
- package/dist/cjs/coreX/DateRangePicker/common.js +104 -5
- package/dist/cjs/coreX/DateRangePicker/index.js +107 -47
- package/dist/cjs/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
- package/dist/cjs/coreX/GoBackButton/index.js +1 -1
- package/dist/cjs/coreX/I18nNameTag/index.js +1 -1
- package/dist/cjs/coreX/InfoRowList/InfoRow.js +1 -1
- package/dist/cjs/coreX/InfoRowList/InfoRowList.js +4 -4
- package/dist/cjs/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
- package/dist/cjs/coreX/NamesTooltip/index.js +3 -3
- package/dist/cjs/coreX/OverflowTooltip/index.js +4 -4
- package/dist/cjs/coreX/Sider/index.js +3 -3
- package/dist/cjs/coreX/SummaryTable/index.js +5 -5
- package/dist/cjs/coreX/SwitchWithText/index.js +1 -1
- package/dist/cjs/coreX/TabMenu/index.js +2 -2
- package/dist/cjs/coreX/UnderlineTootip/index.js +1 -1
- package/dist/cjs/coreX/UnitWithChart/index.js +3 -3
- package/dist/cjs/index.js +13 -0
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +4504 -4480
- package/dist/esm/core/AccordionCard/index.js +1 -1
- package/dist/esm/core/Alert/alert.style.js +2 -2
- package/dist/esm/core/Antd5Tree/Antd5Tree.style.js +1 -1
- package/dist/esm/core/Avatar/index.js +1 -1
- package/dist/esm/core/Banner/banner.style.js +4 -4
- package/dist/esm/core/BasicCTError/BasicCTError.style.js +1 -1
- package/dist/esm/core/BlankState/style.js +1 -1
- package/dist/esm/core/Breadcrumb/index.js +1 -1
- package/dist/esm/core/Button/index.js +1 -1
- package/dist/esm/core/ButtonGroup/index.js +2 -2
- package/dist/esm/core/Card/CardBody.js +1 -1
- package/dist/esm/core/Card/CardTitle.js +1 -1
- package/dist/esm/core/Card/CardWrapper.js +2 -2
- package/dist/esm/core/Cascader/cascader.style.js +11 -11
- package/dist/esm/core/Checkbox/checkbox.style.js +1 -1
- package/dist/esm/core/DetailCard/index.js +1 -1
- package/dist/esm/core/DonutChart/index.js +2 -2
- package/dist/esm/core/DropdownMenu/index.js +1 -1
- package/dist/esm/core/ExpandableList/ExpandIcon.js +1 -1
- package/dist/esm/core/ExpandableList/ExpandableContainer.js +1 -1
- package/dist/esm/core/ExpandableList/ExpandableItem.js +2 -2
- package/dist/esm/core/ExpandableList/RoundOrder.js +1 -1
- package/dist/esm/core/FailedLoad/index.js +1 -1
- package/dist/esm/core/FormItem/index.js +1 -1
- package/dist/esm/core/Icon/index.js +1 -1
- package/dist/esm/core/ImmersiveDialog/styles.js +14 -14
- package/dist/esm/core/Input/index.js +1 -1
- package/dist/esm/core/InputGroup/index.js +1 -1
- package/dist/esm/core/InputInteger/index.js +1 -1
- package/dist/esm/core/InputNumber/index.js +1 -1
- package/dist/esm/core/InputPassword/index.js +1 -1
- package/dist/esm/core/InputTagItem/index.js +1 -1
- package/dist/esm/core/LegacySelect/select.style.js +1 -1
- package/dist/esm/core/Legend/index.js +5 -5
- package/dist/esm/core/LineChart/AreaHighlightLayer.js +115 -0
- package/dist/esm/core/LineChart/ForecastLineLayer.js +124 -0
- package/dist/esm/core/LineChart/LineChartActions.js +2 -2
- package/dist/esm/core/LineChart/RenderChart.js +276 -23
- package/dist/esm/core/LineChart/ThresholdIntersectionLayer.js +134 -0
- package/dist/esm/core/LineChart/TooltipFormatter.js +41 -39
- package/dist/esm/core/LineChart/areaHighlightUtils.js +87 -0
- package/dist/esm/core/LineChart/index.js +21 -3
- package/dist/esm/core/LineChart/lineChartDisplayUtils.js +26 -0
- package/dist/esm/core/LineChart/lineSegments.js +87 -0
- package/dist/esm/core/LineChart/styled.js +20 -10
- package/dist/esm/core/LineChart/utils.js +91 -5
- package/dist/esm/core/Link/index.js +1 -1
- package/dist/esm/core/Loading/style.js +4 -4
- package/dist/esm/core/LocalUpload/LocalUpload.style.js +2 -2
- package/dist/esm/core/LogView/LogView.style.js +5 -5
- package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
- package/dist/esm/core/Metric/styled.js +8 -8
- package/dist/esm/core/Nav/index.js +1 -1
- package/dist/esm/core/Nav/style.js +2 -2
- package/dist/esm/core/Overflow/index.js +2 -2
- package/dist/esm/core/Pagination/index.js +2 -2
- package/dist/esm/core/Progress/components.js +2 -2
- package/dist/esm/core/Progress/index.js +2 -2
- package/dist/esm/core/Progress/progress.style.js +4 -4
- package/dist/esm/core/Progress/progress.widgets.js +2 -2
- package/dist/esm/core/Radio/index.js +3 -3
- package/dist/esm/core/SearchInput/SearchInput.style.js +5 -5
- package/dist/esm/core/SegmentControl/index.js +4 -4
- package/dist/esm/core/Select/select.style.js +4 -4
- package/dist/esm/core/Select/select.widgets.js +3 -3
- package/dist/esm/core/SimplePagination/index.js +2 -2
- package/dist/esm/core/Skeleton/Content.js +1 -1
- package/dist/esm/core/SmallDialog/SmallDialog.style.js +7 -7
- package/dist/esm/core/StatusCapsule/index.js +2 -2
- package/dist/esm/core/StepProgress/index.js +1 -1
- package/dist/esm/core/Steps/style.js +5 -5
- package/dist/esm/core/Styled/index.js +40 -40
- package/dist/esm/core/Switch/index.js +2 -2
- package/dist/esm/core/Tab/Tab.js +1 -1
- package/dist/esm/core/Tab/Tab.style.js +4 -4
- package/dist/esm/core/Table/TableSkeleton.js +1 -1
- package/dist/esm/core/Table/TableWidget.js +1 -1
- package/dist/esm/core/Table/index.js +3 -3
- package/dist/esm/core/TableForm/Columns/FormItem.js +1 -1
- package/dist/esm/core/TableForm/style.js +7 -7
- package/dist/esm/core/Tag/SplitTag.js +1 -1
- package/dist/esm/core/Tag/style.js +5 -5
- package/dist/esm/core/Time/index.js +1 -1
- package/dist/esm/core/TimeZoneSelect/index.js +7 -7
- package/dist/esm/core/Timeline/Timeline.style.js +5 -5
- package/dist/esm/core/Token/index.js +4 -4
- package/dist/esm/core/Token/style.js +1 -1
- package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +1 -1
- package/dist/esm/core/Tooltip/index.js +1 -1
- package/dist/esm/core/Truncate/index.js +1 -1
- package/dist/esm/core/Typo/index.js +58 -58
- package/dist/esm/core/WizardDialog/styles.js +4 -4
- package/dist/esm/coreX/BarChart/index.js +1 -1
- package/dist/esm/coreX/BatchOperation/index.js +2 -2
- package/dist/esm/coreX/ChartWithTooltip/index.js +6 -6
- package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +3 -3
- package/dist/esm/coreX/CircleLoading/index.js +1 -1
- package/dist/esm/coreX/CronCalendar/index.js +4 -4
- package/dist/esm/coreX/CronPlan/index.js +4 -4
- package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +12 -12
- package/dist/esm/coreX/DateRangePicker/RelativeTime.js +10 -7
- package/dist/esm/coreX/DateRangePicker/common.js +99 -6
- package/dist/esm/coreX/DateRangePicker/index.js +108 -48
- package/dist/esm/coreX/Dialogs/DeleteDialog/DeleteDialog.js +2 -2
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +6 -6
- package/dist/esm/coreX/GoBackButton/index.js +1 -1
- package/dist/esm/coreX/I18nNameTag/index.js +1 -1
- package/dist/esm/coreX/InfoRowList/InfoRow.js +1 -1
- package/dist/esm/coreX/InfoRowList/InfoRowList.js +4 -4
- package/dist/esm/coreX/KubeConfigModal/KubeConfigModal.style.js +8 -8
- package/dist/esm/coreX/NamesTooltip/index.js +3 -3
- package/dist/esm/coreX/OverflowTooltip/index.js +4 -4
- package/dist/esm/coreX/Sider/index.js +3 -3
- package/dist/esm/coreX/SummaryTable/index.js +5 -5
- package/dist/esm/coreX/SwitchWithText/index.js +1 -1
- package/dist/esm/coreX/TabMenu/index.js +2 -2
- package/dist/esm/coreX/UnderlineTootip/index.js +1 -1
- package/dist/esm/coreX/UnitWithChart/index.js +3 -3
- package/dist/esm/index.js +4 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +5086 -5060
- package/dist/src/core/LineChart/AreaHighlightLayer.d.ts +31 -0
- package/dist/src/core/LineChart/ForecastLineLayer.d.ts +24 -0
- package/dist/src/core/LineChart/RenderChart.d.ts +5 -1
- package/dist/src/core/LineChart/ThresholdIntersectionLayer.d.ts +19 -0
- package/dist/src/core/LineChart/TooltipFormatter.d.ts +10 -0
- package/dist/src/core/LineChart/__test__/AreaHighlightLayer.test.d.ts +1 -0
- package/dist/src/core/LineChart/__test__/ForecastLineLayer.test.d.ts +1 -0
- package/dist/src/core/LineChart/__test__/utils.test.d.ts +1 -0
- package/dist/src/core/LineChart/areaHighlightUtils.d.ts +6 -0
- package/dist/src/core/LineChart/lineChartDisplayUtils.d.ts +7 -0
- package/dist/src/core/LineChart/lineSegments.d.ts +16 -0
- package/dist/src/core/LineChart/styled.d.ts +2 -0
- package/dist/src/core/LineChart/type.d.ts +94 -8
- package/dist/src/core/LineChart/utils.d.ts +31 -4
- package/dist/src/coreX/DateRangePicker/__tests__/AbsoluteDate.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/__tests__/DateRangePicker.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/__tests__/RelativeTime.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/__tests__/common.test.d.ts +1 -0
- package/dist/src/coreX/DateRangePicker/common.d.ts +12 -3
- package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +5 -1
- package/dist/stories/docs/core/LineChart.stories.d.ts +4 -0
- package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +1 -0
- package/dist/style.css +4515 -4491
- package/package.json +3 -3
|
@@ -12,7 +12,7 @@ import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
|
12
12
|
import { Popover } from 'antd';
|
|
13
13
|
import dayjs from 'dayjs';
|
|
14
14
|
import React__default, { useState, useEffect, useRef } from 'react';
|
|
15
|
-
import { getDateText } from './common.js';
|
|
15
|
+
import { normalizeRelativeTime, getEffectiveAbsoluteTimeBounds, getRelativeTimeRange, isAbsoluteTimeRangeWithinBounds, getDateText, clampAbsoluteTimeRangeToBounds, hasAbsoluteTimeRangeIntersection } from './common.js';
|
|
16
16
|
|
|
17
17
|
var __defProp = Object.defineProperty;
|
|
18
18
|
var __defProps = Object.defineProperties;
|
|
@@ -36,7 +36,8 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
|
36
36
|
const TimeRange = (props) => {
|
|
37
37
|
const {
|
|
38
38
|
visible,
|
|
39
|
-
|
|
39
|
+
panelType,
|
|
40
|
+
direction,
|
|
40
41
|
relativeTime,
|
|
41
42
|
range,
|
|
42
43
|
mode = ["relative", "absolute"],
|
|
@@ -62,6 +63,7 @@ const TimeRange = (props) => {
|
|
|
62
63
|
RelativeTime,
|
|
63
64
|
{
|
|
64
65
|
value: relativeTime,
|
|
66
|
+
type: direction,
|
|
65
67
|
onChange: (time) => onRelativeTimeChange == null ? void 0 : onRelativeTimeChange(time),
|
|
66
68
|
config: relativeTimeSelectOptions
|
|
67
69
|
}
|
|
@@ -74,6 +76,7 @@ const TimeRange = (props) => {
|
|
|
74
76
|
range: range || [null, null],
|
|
75
77
|
minDate,
|
|
76
78
|
maxDate,
|
|
79
|
+
maxRange,
|
|
77
80
|
onChange: (range2) => onAbsoluteTimeChange == null ? void 0 : onAbsoluteTimeChange(range2),
|
|
78
81
|
onOk: (range2) => onAbsoluteTimeOk == null ? void 0 : onAbsoluteTimeOk(range2)
|
|
79
82
|
}
|
|
@@ -87,6 +90,7 @@ const TimeRange = (props) => {
|
|
|
87
90
|
RelativeTime,
|
|
88
91
|
{
|
|
89
92
|
value: relativeTime,
|
|
93
|
+
type: direction,
|
|
90
94
|
onChange: (time) => onRelativeTimeChange == null ? void 0 : onRelativeTimeChange(time),
|
|
91
95
|
config: relativeTimeSelectOptions
|
|
92
96
|
}
|
|
@@ -112,7 +116,7 @@ const TimeRange = (props) => {
|
|
|
112
116
|
return /* @__PURE__ */ React__default.createElement(
|
|
113
117
|
TabMenu,
|
|
114
118
|
{
|
|
115
|
-
selectedKey:
|
|
119
|
+
selectedKey: panelType,
|
|
116
120
|
tabs,
|
|
117
121
|
onChange: onTypeChange,
|
|
118
122
|
size: "small"
|
|
@@ -121,23 +125,48 @@ const TimeRange = (props) => {
|
|
|
121
125
|
}
|
|
122
126
|
};
|
|
123
127
|
const TimePickerHistory = (props) => {
|
|
124
|
-
const { history, onSelect } = props;
|
|
128
|
+
const { history, type, minDate, maxDate, onSelect } = props;
|
|
125
129
|
const { t } = useParrotTranslation();
|
|
126
130
|
function contentRender() {
|
|
127
|
-
|
|
131
|
+
const filteredHistory = history.filter((item) => {
|
|
132
|
+
if (Array.isArray(item.value)) {
|
|
133
|
+
if (type !== "future") {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
if (item.value.length !== 2 || !item.value[0] || !item.value[1]) {
|
|
137
|
+
return false;
|
|
138
|
+
}
|
|
139
|
+
return hasAbsoluteTimeRangeIntersection(
|
|
140
|
+
[dayjs(item.value[0]), dayjs(item.value[1])],
|
|
141
|
+
minDate,
|
|
142
|
+
maxDate
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
return normalizeRelativeTime(item.value, "past").type === type;
|
|
146
|
+
}).sort((a, b) => b.timestamp - a.timestamp);
|
|
147
|
+
if (!filteredHistory.length) {
|
|
128
148
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, t("components.empty_search_history"));
|
|
129
149
|
}
|
|
130
|
-
return
|
|
150
|
+
return filteredHistory.map((item, index) => {
|
|
151
|
+
const normalizedRelativeTime = Array.isArray(item.value) ? void 0 : normalizeRelativeTime(item.value, "past");
|
|
131
152
|
const text = Array.isArray(item.value) ? `${dayjs(item.value[0]).format("YYYY-MM-DD hh:mm:ss")} - ${dayjs(
|
|
132
153
|
item.value[1]
|
|
133
|
-
).format("YYYY-MM-DD hh:mm:ss")}` : getDateText(
|
|
134
|
-
const obj = Array.isArray(item.value) ? [dayjs(item.value[0]), dayjs(item.value[1])] : item.value;
|
|
154
|
+
).format("YYYY-MM-DD hh:mm:ss")}` : getDateText(normalizedRelativeTime, t);
|
|
135
155
|
return /* @__PURE__ */ React__default.createElement(
|
|
136
156
|
"li",
|
|
137
157
|
{
|
|
138
158
|
key: index,
|
|
139
159
|
className: Typo.Label.l2_regular,
|
|
140
|
-
onClick: () =>
|
|
160
|
+
onClick: () => {
|
|
161
|
+
if (Array.isArray(item.value)) {
|
|
162
|
+
onSelect([
|
|
163
|
+
dayjs(item.value[0]),
|
|
164
|
+
dayjs(item.value[1])
|
|
165
|
+
]);
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
onSelect(normalizedRelativeTime);
|
|
169
|
+
}
|
|
141
170
|
},
|
|
142
171
|
text
|
|
143
172
|
);
|
|
@@ -150,6 +179,7 @@ const DateRangePicker = (props) => {
|
|
|
150
179
|
const {
|
|
151
180
|
size = "medium",
|
|
152
181
|
value,
|
|
182
|
+
type: relativeTimeType = "past",
|
|
153
183
|
history,
|
|
154
184
|
mode = ["relative", "absolute"],
|
|
155
185
|
minDate,
|
|
@@ -160,35 +190,48 @@ const DateRangePicker = (props) => {
|
|
|
160
190
|
} = props;
|
|
161
191
|
const { t } = useParrotTranslation();
|
|
162
192
|
const [datePickerVisible, setDatePickerVisible] = useState(false);
|
|
163
|
-
const [
|
|
193
|
+
const [panelType, setPanelType] = useState("relative");
|
|
164
194
|
const [range, setRange] = useState(
|
|
165
195
|
Array.isArray(value) ? value : void 0
|
|
166
196
|
);
|
|
167
|
-
const relativeTime = !Array.isArray(value) ? value : void 0;
|
|
168
|
-
const
|
|
197
|
+
const relativeTime = value && !Array.isArray(value) ? normalizeRelativeTime(value, relativeTimeType) : void 0;
|
|
198
|
+
const { minDate: effectiveMinDate, maxDate: effectiveMaxDate } = getEffectiveAbsoluteTimeBounds(relativeTimeType, minDate, maxDate);
|
|
169
199
|
const isAbsoluteValue = value && Array.isArray(value);
|
|
170
|
-
function handleChange(
|
|
200
|
+
function handleChange(type, time) {
|
|
171
201
|
var _a2, _b;
|
|
172
202
|
const rangeHistory = [
|
|
173
203
|
...(_a2 = history == null ? void 0 : history.dateRangeHistories[history.scope]) != null ? _a2 : []
|
|
174
204
|
];
|
|
175
|
-
if (
|
|
205
|
+
if (type === "absolute" && Array.isArray(time)) {
|
|
206
|
+
if (relativeTimeType === "future" && !isAbsoluteTimeRangeWithinBounds(
|
|
207
|
+
time,
|
|
208
|
+
effectiveMinDate,
|
|
209
|
+
effectiveMaxDate
|
|
210
|
+
)) {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
176
213
|
const value2 = time.map((item) => (item == null ? void 0 : item.format()) || "");
|
|
177
214
|
rangeHistory.push({
|
|
178
|
-
type
|
|
215
|
+
type,
|
|
179
216
|
value: value2,
|
|
180
217
|
timestamp: Date.now()
|
|
181
218
|
});
|
|
182
|
-
onChange == null ? void 0 : onChange(
|
|
183
|
-
} else if (
|
|
219
|
+
onChange == null ? void 0 : onChange(type, time, time);
|
|
220
|
+
} else if (type === "relative" && !Array.isArray(time)) {
|
|
221
|
+
const normalizedRelativeTime = normalizeRelativeTime(
|
|
222
|
+
time,
|
|
223
|
+
relativeTimeType
|
|
224
|
+
);
|
|
184
225
|
rangeHistory.push({
|
|
185
|
-
type
|
|
186
|
-
value:
|
|
226
|
+
type,
|
|
227
|
+
value: normalizedRelativeTime,
|
|
187
228
|
timestamp: Date.now()
|
|
188
229
|
});
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
230
|
+
onChange == null ? void 0 : onChange(
|
|
231
|
+
type,
|
|
232
|
+
normalizedRelativeTime,
|
|
233
|
+
getRelativeTimeRange(normalizedRelativeTime)
|
|
234
|
+
);
|
|
192
235
|
}
|
|
193
236
|
history == null ? void 0 : history.setDateRangeHistory(__spreadProps(__spreadValues({}, (_b = history == null ? void 0 : history.dateRangeHistories) != null ? _b : {}), {
|
|
194
237
|
[history.scope]: rangeHistory
|
|
@@ -196,21 +239,19 @@ const DateRangePicker = (props) => {
|
|
|
196
239
|
setDatePickerVisible(false);
|
|
197
240
|
}
|
|
198
241
|
useEffect(() => {
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
onChange == null ? void 0 : onChange("relative", value, [today, pastDay]);
|
|
204
|
-
} else if (isAbsoluteValue) {
|
|
242
|
+
if (relativeTime) {
|
|
243
|
+
setPanelType("relative");
|
|
244
|
+
onChange == null ? void 0 : onChange("relative", relativeTime, getRelativeTimeRange(relativeTime));
|
|
245
|
+
} else if (Array.isArray(value)) {
|
|
205
246
|
setRange(value);
|
|
206
|
-
|
|
247
|
+
setPanelType("absolute");
|
|
207
248
|
onChange == null ? void 0 : onChange("absolute", value, value);
|
|
208
249
|
}
|
|
209
|
-
}, [value]);
|
|
250
|
+
}, [relativeTimeType, value]);
|
|
210
251
|
function displayRangeRender() {
|
|
211
252
|
var _a2, _b;
|
|
212
|
-
if (
|
|
213
|
-
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, getDateText(
|
|
253
|
+
if (relativeTime) {
|
|
254
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, getDateText(relativeTime, t));
|
|
214
255
|
} else if (isAbsoluteValue) {
|
|
215
256
|
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(
|
|
216
257
|
Input,
|
|
@@ -230,21 +271,36 @@ const DateRangePicker = (props) => {
|
|
|
230
271
|
}
|
|
231
272
|
}
|
|
232
273
|
function handleSelectHistory(value2) {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
274
|
+
if (Array.isArray(value2)) {
|
|
275
|
+
let selectedRange = [...value2];
|
|
276
|
+
if (relativeTimeType === "future") {
|
|
277
|
+
selectedRange = clampAbsoluteTimeRangeToBounds(
|
|
278
|
+
value2,
|
|
279
|
+
effectiveMinDate,
|
|
280
|
+
effectiveMaxDate
|
|
281
|
+
);
|
|
282
|
+
} else {
|
|
283
|
+
const [start, end] = selectedRange;
|
|
284
|
+
if (minDate && start) {
|
|
285
|
+
const parsedMinDate = dayjs(minDate);
|
|
286
|
+
selectedRange[0] = start.isBefore(parsedMinDate) ? parsedMinDate : start;
|
|
287
|
+
}
|
|
288
|
+
if (maxDate && end) {
|
|
289
|
+
const parsedMaxDate = dayjs(maxDate);
|
|
290
|
+
selectedRange[1] = end.isAfter(parsedMaxDate) ? parsedMaxDate : end;
|
|
291
|
+
}
|
|
240
292
|
}
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
_value[1] = end.isAfter(_maxDate) ? _maxDate : end;
|
|
293
|
+
if (!selectedRange) {
|
|
294
|
+
return;
|
|
244
295
|
}
|
|
245
|
-
|
|
296
|
+
const [selectedStart, selectedEnd] = selectedRange;
|
|
297
|
+
if (!(selectedStart == null ? void 0 : selectedStart.isValid()) || !(selectedEnd == null ? void 0 : selectedEnd.isValid()) || selectedStart.isAfter(selectedEnd)) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
handleChange("absolute", selectedRange);
|
|
301
|
+
return;
|
|
246
302
|
}
|
|
247
|
-
handleChange(
|
|
303
|
+
handleChange("relative", normalizeRelativeTime(value2, "past"));
|
|
248
304
|
}
|
|
249
305
|
return /* @__PURE__ */ React__default.createElement(
|
|
250
306
|
DateRangePickerStyle.Wrapper,
|
|
@@ -283,14 +339,15 @@ const DateRangePicker = (props) => {
|
|
|
283
339
|
TimeRange,
|
|
284
340
|
{
|
|
285
341
|
visible: datePickerVisible,
|
|
286
|
-
|
|
342
|
+
panelType,
|
|
343
|
+
direction: relativeTimeType,
|
|
287
344
|
range,
|
|
288
345
|
relativeTime,
|
|
289
346
|
mode,
|
|
290
|
-
minDate,
|
|
291
|
-
maxDate,
|
|
347
|
+
minDate: effectiveMinDate,
|
|
348
|
+
maxDate: effectiveMaxDate,
|
|
292
349
|
maxRange,
|
|
293
|
-
onTypeChange:
|
|
350
|
+
onTypeChange: setPanelType,
|
|
294
351
|
onRelativeTimeChange: (time) => {
|
|
295
352
|
handleChange("relative", time);
|
|
296
353
|
},
|
|
@@ -321,6 +378,9 @@ const DateRangePicker = (props) => {
|
|
|
321
378
|
TimePickerHistory,
|
|
322
379
|
{
|
|
323
380
|
history: (_a = history.dateRangeHistories[history.scope]) != null ? _a : [],
|
|
381
|
+
type: relativeTimeType,
|
|
382
|
+
minDate: effectiveMinDate,
|
|
383
|
+
maxDate: effectiveMaxDate,
|
|
324
384
|
onSelect: handleSelectHistory
|
|
325
385
|
}
|
|
326
386
|
),
|
|
@@ -4,8 +4,8 @@ import { Typo } from '../../../core/Typo/index.js';
|
|
|
4
4
|
import useParrotTranslation from '../../../hooks/useParrotTranslation.js';
|
|
5
5
|
import React__default from 'react';
|
|
6
6
|
|
|
7
|
-
const ContentStyle = "
|
|
8
|
-
const SecondaryDescStyle = "
|
|
7
|
+
const ContentStyle = "E_4100_0_19_cevhqx7";
|
|
8
|
+
const SecondaryDescStyle = "E_4100_0_19_snbqlt4";
|
|
9
9
|
const DeleteDialog = props => {
|
|
10
10
|
const {
|
|
11
11
|
t
|
|
@@ -22,12 +22,12 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
}
|
|
23
23
|
return a;
|
|
24
24
|
};
|
|
25
|
-
const ContentList = "
|
|
26
|
-
const MultiRejectContentList = "
|
|
27
|
-
const Description = "
|
|
28
|
-
const PartialDescription = "
|
|
29
|
-
const SecondaryDesc = "
|
|
30
|
-
const Divider = "
|
|
25
|
+
const ContentList = "E_4100_0_19_c1ss4prm";
|
|
26
|
+
const MultiRejectContentList = "E_4100_0_19_ms3tlei";
|
|
27
|
+
const Description = "E_4100_0_19_du44iy7";
|
|
28
|
+
const PartialDescription = "E_4100_0_19_p1qmhanr";
|
|
29
|
+
const SecondaryDesc = "E_4100_0_19_srje1h0";
|
|
30
|
+
const Divider = "E_4100_0_19_di3zi7v";
|
|
31
31
|
const SingleRejectContent = ({
|
|
32
32
|
content,
|
|
33
33
|
listType = "ordered",
|
|
@@ -4,7 +4,7 @@ import Icon from '../../core/Icon/index.js';
|
|
|
4
4
|
import { Typo } from '../../core/Typo/index.js';
|
|
5
5
|
import React__default from 'react';
|
|
6
6
|
|
|
7
|
-
const GobackButtonStyle = "
|
|
7
|
+
const GobackButtonStyle = "E_4100_0_19_gmyahx3";
|
|
8
8
|
const GobackButton = props => {
|
|
9
9
|
const {
|
|
10
10
|
onClick,
|
|
@@ -4,16 +4,16 @@ import Loading from '../../core/Loading/index.js';
|
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import { InfoRow } from './InfoRow.js';
|
|
6
6
|
|
|
7
|
-
const InfoListRowStyle = "
|
|
8
|
-
const LooseStyle = "
|
|
7
|
+
const InfoListRowStyle = "E_4100_0_19_i5w779o";
|
|
8
|
+
const LooseStyle = "E_4100_0_19_l18dja44";
|
|
9
9
|
const ContentWrapper = /*#__PURE__*/styled('div')({
|
|
10
10
|
name: "ContentWrapper",
|
|
11
|
-
class: "
|
|
11
|
+
class: "E_4100_0_19_c8c2hys",
|
|
12
12
|
propsAsIs: false
|
|
13
13
|
});
|
|
14
14
|
const NullText = /*#__PURE__*/styled('div')({
|
|
15
15
|
name: "NullText",
|
|
16
|
-
class: "
|
|
16
|
+
class: "E_4100_0_19_n4m6c4d",
|
|
17
17
|
propsAsIs: false
|
|
18
18
|
});
|
|
19
19
|
const InfoRowList = React__default.forwardRef(function InfoList(props, ref) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { styled } from '@linaria/react';
|
|
2
2
|
|
|
3
|
-
const KubeConfigModalStyle = "
|
|
4
|
-
const KubeConfigWrapperStyle = "
|
|
5
|
-
const KubeConfigTitleStyle = "
|
|
6
|
-
const KubeConfigTipStyle = "
|
|
7
|
-
const KubeConfigContentStyle = "
|
|
8
|
-
const KubeConfigFooterStyle = "
|
|
3
|
+
const KubeConfigModalStyle = "E_4100_0_19_kr6am0s";
|
|
4
|
+
const KubeConfigWrapperStyle = "E_4100_0_19_k1h3cl5q";
|
|
5
|
+
const KubeConfigTitleStyle = "E_4100_0_19_k1a6j97w";
|
|
6
|
+
const KubeConfigTipStyle = "E_4100_0_19_k1uim1fg";
|
|
7
|
+
const KubeConfigContentStyle = "E_4100_0_19_kobelzt";
|
|
8
|
+
const KubeConfigFooterStyle = "E_4100_0_19_kxzv3id";
|
|
9
9
|
const ErrorWrapper = /*#__PURE__*/styled('div')({
|
|
10
10
|
name: "ErrorWrapper",
|
|
11
|
-
class: "
|
|
11
|
+
class: "E_4100_0_19_eld9lt",
|
|
12
12
|
propsAsIs: false
|
|
13
13
|
});
|
|
14
14
|
const ErrorContentWrapper = /*#__PURE__*/styled('div')({
|
|
15
15
|
name: "ErrorContentWrapper",
|
|
16
|
-
class: "
|
|
16
|
+
class: "E_4100_0_19_e1505fqc",
|
|
17
17
|
propsAsIs: false
|
|
18
18
|
});
|
|
19
19
|
|
|
@@ -4,15 +4,15 @@ import React__default from 'react';
|
|
|
4
4
|
|
|
5
5
|
const NameItem = /*#__PURE__*/styled('div')({
|
|
6
6
|
name: "NameItem",
|
|
7
|
-
class: "
|
|
7
|
+
class: "E_4100_0_19_n12mqh7z",
|
|
8
8
|
propsAsIs: false
|
|
9
9
|
});
|
|
10
10
|
const TooltipText = /*#__PURE__*/styled('span')({
|
|
11
11
|
name: "TooltipText",
|
|
12
|
-
class: "
|
|
12
|
+
class: "E_4100_0_19_tf5bynu",
|
|
13
13
|
propsAsIs: false
|
|
14
14
|
});
|
|
15
|
-
const ToolTipStyle = "
|
|
15
|
+
const ToolTipStyle = "E_4100_0_19_tcckoz1";
|
|
16
16
|
const NamesTooltip = props => {
|
|
17
17
|
const {
|
|
18
18
|
names,
|
|
@@ -32,20 +32,20 @@ var __objRest = (source, exclude) => {
|
|
|
32
32
|
}
|
|
33
33
|
return target;
|
|
34
34
|
};
|
|
35
|
-
const OverflowText = "
|
|
36
|
-
const SingleLineStyle = "
|
|
35
|
+
const OverflowText = "E_4100_0_19_ou7iq30";
|
|
36
|
+
const SingleLineStyle = "E_4100_0_19_s1tui002";
|
|
37
37
|
const _exp = /*#__PURE__*/() => ({
|
|
38
38
|
lineClamp = 2
|
|
39
39
|
}) => lineClamp;
|
|
40
40
|
const MultipleLine = /*#__PURE__*/styled('div')({
|
|
41
41
|
name: "MultipleLine",
|
|
42
|
-
class: "
|
|
42
|
+
class: "E_4100_0_19_mxrc2zg",
|
|
43
43
|
propsAsIs: false,
|
|
44
44
|
vars: {
|
|
45
45
|
"mxrc2zg-0": [_exp()]
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
-
const TooltipDefaultClass = "
|
|
48
|
+
const TooltipDefaultClass = "E_4100_0_19_t1vv6d68";
|
|
49
49
|
const OverflowTooltip = props => {
|
|
50
50
|
const _a = props,
|
|
51
51
|
{
|
|
@@ -22,9 +22,9 @@ var __spreadValues = (a, b) => {
|
|
|
22
22
|
}
|
|
23
23
|
return a;
|
|
24
24
|
};
|
|
25
|
-
const SiderStyle = "
|
|
26
|
-
const ShrinkStyle = "
|
|
27
|
-
const NavLinkStyle = "
|
|
25
|
+
const SiderStyle = "E_4100_0_19_s1at6qmn";
|
|
26
|
+
const ShrinkStyle = "E_4100_0_19_s1wu0lms";
|
|
27
|
+
const NavLinkStyle = "E_4100_0_19_n1ugzfva";
|
|
28
28
|
const NormalWidth = 256;
|
|
29
29
|
const ShrinkWidth = 52;
|
|
30
30
|
const Sider = ({
|
|
@@ -7,28 +7,28 @@ import React__default from 'react';
|
|
|
7
7
|
|
|
8
8
|
const Table = /*#__PURE__*/styled('div')({
|
|
9
9
|
name: "Table",
|
|
10
|
-
class: "
|
|
10
|
+
class: "E_4100_0_19_t1sqg15u",
|
|
11
11
|
propsAsIs: false
|
|
12
12
|
});
|
|
13
13
|
const TableHeader = /*#__PURE__*/styled('header')({
|
|
14
14
|
name: "TableHeader",
|
|
15
|
-
class: "
|
|
15
|
+
class: "E_4100_0_19_t4zczcp",
|
|
16
16
|
propsAsIs: false
|
|
17
17
|
});
|
|
18
18
|
const TableContent = /*#__PURE__*/styled('div')({
|
|
19
19
|
name: "TableContent",
|
|
20
|
-
class: "
|
|
20
|
+
class: "E_4100_0_19_t1s7goww",
|
|
21
21
|
propsAsIs: false
|
|
22
22
|
});
|
|
23
23
|
const TableRow = /*#__PURE__*/styled('div')({
|
|
24
24
|
name: "TableRow",
|
|
25
|
-
class: "
|
|
25
|
+
class: "E_4100_0_19_t93e4cf",
|
|
26
26
|
propsAsIs: false
|
|
27
27
|
});
|
|
28
28
|
const _exp = /*#__PURE__*/() => props => props.width;
|
|
29
29
|
const RowLabel = /*#__PURE__*/styled('label')({
|
|
30
30
|
name: "RowLabel",
|
|
31
|
-
class: "
|
|
31
|
+
class: "E_4100_0_19_rhz2uv5",
|
|
32
32
|
propsAsIs: false,
|
|
33
33
|
vars: {
|
|
34
34
|
"rhz2uv5-0": [_exp()]
|
|
@@ -4,8 +4,8 @@ import { Dropdown, Menu } from 'antd';
|
|
|
4
4
|
import cs from 'classnames';
|
|
5
5
|
import React__default, { useRef, useMemo, useState, useEffect } from 'react';
|
|
6
6
|
|
|
7
|
-
const TabMenuStyle = "
|
|
8
|
-
const TabMenuSubMenu = "
|
|
7
|
+
const TabMenuStyle = "E_4100_0_19_t160l1cm";
|
|
8
|
+
const TabMenuSubMenu = "E_4100_0_19_t14npdqr";
|
|
9
9
|
const renderExpandArrow = (size, isBold) => {
|
|
10
10
|
if (size === "medium" && !isBold) return /* @__PURE__ */React__default.createElement(ArrowChevronDown16BlueIcon, {
|
|
11
11
|
className: "expand-arrow"
|
|
@@ -43,11 +43,11 @@ const units = {
|
|
|
43
43
|
};
|
|
44
44
|
const Wrapper = /*#__PURE__*/styled('div')({
|
|
45
45
|
name: "Wrapper",
|
|
46
|
-
class: "
|
|
46
|
+
class: "E_4100_0_19_wg1tsps",
|
|
47
47
|
propsAsIs: false
|
|
48
48
|
});
|
|
49
|
-
const BarChartWrapper = "
|
|
50
|
-
const UnitWrapper = "
|
|
49
|
+
const BarChartWrapper = "E_4100_0_19_b1ctd5xy";
|
|
50
|
+
const UnitWrapper = "E_4100_0_19_u1p8acpn";
|
|
51
51
|
const Sizes = {
|
|
52
52
|
small: {
|
|
53
53
|
width: 22,
|
package/dist/esm/index.js
CHANGED
|
@@ -100,7 +100,10 @@ export { default as RoundOrder } from './core/ExpandableList/RoundOrder.js';
|
|
|
100
100
|
export { ImmersiveDialog } from './core/ImmersiveDialog/index.js';
|
|
101
101
|
export { LineChartColorBlock, default as LineChartLegend } from './core/LineChart/LineChartLegend.js';
|
|
102
102
|
export { ILineChartGraphType, ILineChartMetricUnit, ILineChartTimeUnit } from './core/LineChart/type.js';
|
|
103
|
-
export {
|
|
103
|
+
export { DEFAULT_LINE_CHART_STROKE, getLineChartDefaultYAxisTicks, getLineChartLegacyThresholdTooltipInfo, getLineChartStreamStroke } from './core/LineChart/lineChartDisplayUtils.js';
|
|
104
|
+
export { getLineChartAreaHighlightRuns } from './core/LineChart/areaHighlightUtils.js';
|
|
105
|
+
export { getLineChartLinePath, getLineChartLineSegments } from './core/LineChart/lineSegments.js';
|
|
106
|
+
export { UNIT_FORMATTER, addMissingDataWithZero, convertLineChartDataStruct, convertLineChartUnit, deletePointsOutOfRange, filterLineChartDataOverlapping, filterLineChartOverlappingMetric, filterLineChartPointsByDateRange, getFirstExpectedTimestamp, getLineChartAreaHighlightRanges, getLineChartMetricPayloadMatches, getLineChartRangeTimestamp, getLineChartStep, getLineChartThresholdIntersections, getLineChartXAxisDomain, getLineChartYDataMax, getYAxisDomain, getYAxisUpperBound, lineChartTickFormatter, lineChartXaxisCal, lineChartYaxisTickFormatter, parseLineChartRange } from './core/LineChart/utils.js';
|
|
104
107
|
export { LocalUpload } from './core/LocalUpload/LocalUpload.js';
|
|
105
108
|
export { LogView } from './core/LogView/LogView.js';
|
|
106
109
|
export { MediumDialog } from './core/MediumDialog/MediumDialog.js';
|