@cloudtower/eagle 0.27.55 → 0.27.56
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/components.css +2259 -3151
- package/dist/esm/index.js +10233 -34
- package/dist/esm/stats1.html +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/styles/token/token.d.ts +1 -0
- package/dist/style.css +2226 -2226
- package/dist/token.css +209 -415
- package/dist/umd/index.js +10322 -0
- package/dist/{cjs → umd}/stats1.html +1 -1
- package/package.json +5 -7
- package/dist/cjs/UIKitProvider/index.js +0 -77
- package/dist/cjs/core/AccordionCard/index.js +0 -59
- package/dist/cjs/core/Alert/index.js +0 -80
- package/dist/cjs/core/Arch/index.js +0 -17
- package/dist/cjs/core/Badge/index.js +0 -51
- package/dist/cjs/core/BaseIcon/index.js +0 -76
- package/dist/cjs/core/Bit/index.js +0 -40
- package/dist/cjs/core/BitPerSecond/index.js +0 -40
- package/dist/cjs/core/Bps/index.js +0 -40
- package/dist/cjs/core/Breadcrumb/index.js +0 -58
- package/dist/cjs/core/Button/HoverableElement.js +0 -14
- package/dist/cjs/core/Button/index.js +0 -89
- package/dist/cjs/core/ButtonGroup/index.js +0 -110
- package/dist/cjs/core/Byte/index.js +0 -49
- package/dist/cjs/core/Calendar/index.js +0 -25
- package/dist/cjs/core/Card/CardBody.js +0 -12
- package/dist/cjs/core/Card/CardTitle.js +0 -12
- package/dist/cjs/core/Card/CardWrapper.js +0 -55
- package/dist/cjs/core/Card/index.js +0 -94
- package/dist/cjs/core/Cascader/cascader.style.js +0 -23
- package/dist/cjs/core/Cascader/cascader.widget.js +0 -86
- package/dist/cjs/core/Cascader/index.js +0 -74
- package/dist/cjs/core/Checkbox/checkbox.style.js +0 -5
- package/dist/cjs/core/Checkbox/index.js +0 -53
- package/dist/cjs/core/DetailCard/index.js +0 -23
- package/dist/cjs/core/DonutChart/index.js +0 -167
- package/dist/cjs/core/DropdownMenu/index.js +0 -66
- package/dist/cjs/core/Empty/index.js +0 -11
- package/dist/cjs/core/ExpandableList/ExpandIcon.js +0 -17
- package/dist/cjs/core/ExpandableList/ExpandableContainer.js +0 -17
- package/dist/cjs/core/ExpandableList/ExpandableItem.js +0 -48
- package/dist/cjs/core/ExpandableList/RoundOrder.js +0 -22
- package/dist/cjs/core/FailedLoad/index.js +0 -32
- package/dist/cjs/core/Fields/FieldsBoolean/index.js +0 -47
- package/dist/cjs/core/Fields/FieldsDateTime/index.js +0 -24
- package/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +0 -50
- package/dist/cjs/core/Fields/FieldsEnum/index.js +0 -60
- package/dist/cjs/core/Fields/FieldsFloat/index.js +0 -60
- package/dist/cjs/core/Fields/FieldsInt/index.js +0 -78
- package/dist/cjs/core/Fields/FieldsInteger/index.js +0 -57
- package/dist/cjs/core/Fields/FieldsString/index.js +0 -116
- package/dist/cjs/core/Fields/FieldsTextArea/index.js +0 -64
- package/dist/cjs/core/Fields/FieldsTimePicker/index.js +0 -54
- package/dist/cjs/core/Fields/index.js +0 -28
- package/dist/cjs/core/Form/index.js +0 -10
- package/dist/cjs/core/FormItem/index.js +0 -38
- package/dist/cjs/core/Frequency/index.js +0 -40
- package/dist/cjs/core/Icon/index.js +0 -117
- package/dist/cjs/core/Input/index.js +0 -66
- package/dist/cjs/core/InputGroup/index.js +0 -14
- package/dist/cjs/core/InputInteger/formatterInteger.js +0 -15
- package/dist/cjs/core/InputInteger/index.js +0 -97
- package/dist/cjs/core/InputNumber/index.js +0 -90
- package/dist/cjs/core/InputTagItem/index.js +0 -12
- package/dist/cjs/core/KitStoreProvider/index.js +0 -23
- package/dist/cjs/core/Link/index.js +0 -56
- package/dist/cjs/core/Loading/index.js +0 -33
- package/dist/cjs/core/Loading/style.js +0 -11
- package/dist/cjs/core/Metric/metric.js +0 -21
- package/dist/cjs/core/Modal/index.js +0 -214
- package/dist/cjs/core/ModalStack/index.js +0 -47
- package/dist/cjs/core/Overflow/index.js +0 -117
- package/dist/cjs/core/Pagination/index.js +0 -120
- package/dist/cjs/core/ParrotTrans/index.js +0 -28
- package/dist/cjs/core/Percent/index.js +0 -41
- package/dist/cjs/core/Progress/index.js +0 -25
- package/dist/cjs/core/Radio/index.js +0 -142
- package/dist/cjs/core/SearchInput/index.js +0 -50
- package/dist/cjs/core/Second/index.js +0 -43
- package/dist/cjs/core/SegmentControl/index.js +0 -43
- package/dist/cjs/core/Select/index.js +0 -140
- package/dist/cjs/core/SimplePagination/index.js +0 -90
- package/dist/cjs/core/Speed/index.js +0 -40
- package/dist/cjs/core/StatusCapsule/index.js +0 -100
- package/dist/cjs/core/StepProgress/index.js +0 -44
- package/dist/cjs/core/Steps/index.js +0 -126
- package/dist/cjs/core/Steps/style.js +0 -13
- package/dist/cjs/core/Styled/index.js +0 -57
- package/dist/cjs/core/Switch/index.js +0 -61
- package/dist/cjs/core/Table/TableWidget.js +0 -47
- package/dist/cjs/core/Table/common.js +0 -46
- package/dist/cjs/core/Table/index.js +0 -112
- package/dist/cjs/core/TableForm/AddRowButton.js +0 -108
- package/dist/cjs/core/TableForm/Columns/AffixColumn.js +0 -48
- package/dist/cjs/core/TableForm/Columns/CheckboxColumn.js +0 -35
- package/dist/cjs/core/TableForm/Columns/FormItem.js +0 -20
- package/dist/cjs/core/TableForm/Columns/InputColumn.js +0 -117
- package/dist/cjs/core/TableForm/Columns/TextColumn.js +0 -44
- package/dist/cjs/core/TableForm/Columns/index.js +0 -24
- package/dist/cjs/core/TableForm/TableFormBodyCell.js +0 -165
- package/dist/cjs/core/TableForm/TableFormBodyRows.js +0 -215
- package/dist/cjs/core/TableForm/TableFormHeaderCell.js +0 -93
- package/dist/cjs/core/TableForm/index.js +0 -187
- package/dist/cjs/core/TableForm/style.js +0 -35
- package/dist/cjs/core/TableForm/types.js +0 -10
- package/dist/cjs/core/TableForm/utils.js +0 -36
- package/dist/cjs/core/Tag/SplitTag.js +0 -64
- package/dist/cjs/core/Tag/const.js +0 -12
- package/dist/cjs/core/Tag/index.js +0 -96
- package/dist/cjs/core/Tag/style.js +0 -14
- package/dist/cjs/core/TextArea/index.js +0 -72
- package/dist/cjs/core/Time/index.js +0 -31
- package/dist/cjs/core/TimePicker/index.js +0 -66
- package/dist/cjs/core/TimeZoneSelect/index.js +0 -165
- package/dist/cjs/core/Token/index.js +0 -86
- package/dist/cjs/core/Token/style.js +0 -5
- package/dist/cjs/core/Tooltip/index.js +0 -89
- package/dist/cjs/core/Truncate/index.js +0 -49
- package/dist/cjs/core/Typo/index.js +0 -130
- package/dist/cjs/core/antd.js +0 -208
- package/dist/cjs/core/message/index.js +0 -203
- package/dist/cjs/core/message-group/index.js +0 -147
- package/dist/cjs/coreX/BarChart/index.js +0 -39
- package/dist/cjs/coreX/BatchOperation/index.js +0 -149
- package/dist/cjs/coreX/ChartWithTooltip/index.js +0 -154
- package/dist/cjs/coreX/Counting/index.js +0 -22
- package/dist/cjs/coreX/CronCalendar/index.js +0 -105
- package/dist/cjs/coreX/CronPlan/index.js +0 -462
- package/dist/cjs/coreX/DateRangePicker/AbsoluteDate.js +0 -179
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +0 -286
- package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +0 -84
- package/dist/cjs/coreX/DateRangePicker/InputTime.js +0 -151
- package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +0 -53
- package/dist/cjs/coreX/DateRangePicker/common.js +0 -195
- package/dist/cjs/coreX/DateRangePicker/index.js +0 -331
- package/dist/cjs/coreX/DeprecatedDonutChart/index.js +0 -39
- package/dist/cjs/coreX/DropdownTransition/index.js +0 -73
- package/dist/cjs/coreX/GoBackButton/index.js +0 -45
- package/dist/cjs/coreX/I18nNameTag/index.js +0 -37
- package/dist/cjs/coreX/NamesTooltip/index.js +0 -34
- package/dist/cjs/coreX/OverflowTooltip/index.js +0 -92
- package/dist/cjs/coreX/SidebarSubtitle/index.js +0 -13
- package/dist/cjs/coreX/SortableList/index.js +0 -33
- package/dist/cjs/coreX/SummaryTable/index.js +0 -113
- package/dist/cjs/coreX/SwitchWithText/index.js +0 -59
- package/dist/cjs/coreX/TabMenu/index.js +0 -152
- package/dist/cjs/coreX/TruncatedTextWithTooltip/index.js +0 -69
- package/dist/cjs/coreX/UnitWithChart/index.js +0 -118
- package/dist/cjs/coreX/common/getCalendarTitle.js +0 -26
- package/dist/cjs/hooks/useElementIntersectionRatio.js +0 -30
- package/dist/cjs/hooks/useElementResize.js +0 -69
- package/dist/cjs/hooks/useElementsSize.js +0 -58
- package/dist/cjs/hooks/useMemoCompare.js +0 -17
- package/dist/cjs/hooks/useParrotTranslation.js +0 -13
- package/dist/cjs/index.js +0 -120
- package/dist/cjs/spec/type.js +0 -9
- package/dist/cjs/store/chart.js +0 -65
- package/dist/cjs/store/index.js +0 -48
- package/dist/cjs/store/modal.js +0 -67
- package/dist/cjs/styles/token/color.js +0 -273
- package/dist/cjs/utils/constants.js +0 -8
- package/dist/cjs/utils/cron-time.js +0 -450
- package/dist/cjs/utils/dom.js +0 -16
- package/dist/cjs/utils/icon.js +0 -22
- package/dist/cjs/utils/isEmpty.js +0 -12
- package/dist/cjs/utils/time.js +0 -86
- package/dist/cjs/utils/tower.js +0 -188
- package/dist/esm/UIKitProvider/index.js +0 -71
- package/dist/esm/core/AccordionCard/index.js +0 -57
- package/dist/esm/core/Alert/index.js +0 -78
- package/dist/esm/core/Arch/index.js +0 -15
- package/dist/esm/core/Badge/index.js +0 -49
- package/dist/esm/core/BaseIcon/index.js +0 -74
- package/dist/esm/core/Bit/index.js +0 -38
- package/dist/esm/core/BitPerSecond/index.js +0 -38
- package/dist/esm/core/Bps/index.js +0 -38
- package/dist/esm/core/Breadcrumb/index.js +0 -53
- package/dist/esm/core/Button/HoverableElement.js +0 -12
- package/dist/esm/core/Button/index.js +0 -87
- package/dist/esm/core/ButtonGroup/index.js +0 -105
- package/dist/esm/core/Byte/index.js +0 -47
- package/dist/esm/core/Calendar/index.js +0 -23
- package/dist/esm/core/Card/CardBody.js +0 -10
- package/dist/esm/core/Card/CardTitle.js +0 -10
- package/dist/esm/core/Card/CardWrapper.js +0 -53
- package/dist/esm/core/Card/index.js +0 -92
- package/dist/esm/core/Cascader/cascader.style.js +0 -12
- package/dist/esm/core/Cascader/cascader.widget.js +0 -79
- package/dist/esm/core/Cascader/index.js +0 -72
- package/dist/esm/core/Checkbox/checkbox.style.js +0 -3
- package/dist/esm/core/Checkbox/index.js +0 -51
- package/dist/esm/core/DetailCard/index.js +0 -21
- package/dist/esm/core/DonutChart/index.js +0 -161
- package/dist/esm/core/DropdownMenu/index.js +0 -61
- package/dist/esm/core/Empty/index.js +0 -9
- package/dist/esm/core/ExpandableList/ExpandIcon.js +0 -15
- package/dist/esm/core/ExpandableList/ExpandableContainer.js +0 -15
- package/dist/esm/core/ExpandableList/ExpandableItem.js +0 -46
- package/dist/esm/core/ExpandableList/RoundOrder.js +0 -20
- package/dist/esm/core/FailedLoad/index.js +0 -30
- package/dist/esm/core/Fields/FieldsBoolean/index.js +0 -45
- package/dist/esm/core/Fields/FieldsDateTime/index.js +0 -22
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +0 -48
- package/dist/esm/core/Fields/FieldsEnum/index.js +0 -58
- package/dist/esm/core/Fields/FieldsFloat/index.js +0 -58
- package/dist/esm/core/Fields/FieldsInt/index.js +0 -76
- package/dist/esm/core/Fields/FieldsInteger/index.js +0 -55
- package/dist/esm/core/Fields/FieldsString/index.js +0 -114
- package/dist/esm/core/Fields/FieldsTextArea/index.js +0 -62
- package/dist/esm/core/Fields/FieldsTimePicker/index.js +0 -52
- package/dist/esm/core/Fields/index.js +0 -26
- package/dist/esm/core/Form/index.js +0 -8
- package/dist/esm/core/FormItem/index.js +0 -36
- package/dist/esm/core/Frequency/index.js +0 -38
- package/dist/esm/core/Icon/index.js +0 -115
- package/dist/esm/core/Input/index.js +0 -64
- package/dist/esm/core/InputGroup/index.js +0 -12
- package/dist/esm/core/InputInteger/formatterInteger.js +0 -13
- package/dist/esm/core/InputInteger/index.js +0 -92
- package/dist/esm/core/InputNumber/index.js +0 -85
- package/dist/esm/core/InputTagItem/index.js +0 -10
- package/dist/esm/core/KitStoreProvider/index.js +0 -17
- package/dist/esm/core/Link/index.js +0 -54
- package/dist/esm/core/Loading/index.js +0 -31
- package/dist/esm/core/Loading/style.js +0 -6
- package/dist/esm/core/Metric/metric.js +0 -19
- package/dist/esm/core/Modal/index.js +0 -212
- package/dist/esm/core/ModalStack/index.js +0 -45
- package/dist/esm/core/Overflow/index.js +0 -112
- package/dist/esm/core/Pagination/index.js +0 -115
- package/dist/esm/core/ParrotTrans/index.js +0 -26
- package/dist/esm/core/Percent/index.js +0 -39
- package/dist/esm/core/Progress/index.js +0 -23
- package/dist/esm/core/Radio/index.js +0 -136
- package/dist/esm/core/SearchInput/index.js +0 -48
- package/dist/esm/core/Second/index.js +0 -41
- package/dist/esm/core/SegmentControl/index.js +0 -41
- package/dist/esm/core/Select/index.js +0 -138
- package/dist/esm/core/SimplePagination/index.js +0 -88
- package/dist/esm/core/Speed/index.js +0 -38
- package/dist/esm/core/StatusCapsule/index.js +0 -94
- package/dist/esm/core/StepProgress/index.js +0 -42
- package/dist/esm/core/Steps/index.js +0 -124
- package/dist/esm/core/Steps/style.js +0 -7
- package/dist/esm/core/Styled/index.js +0 -45
- package/dist/esm/core/Switch/index.js +0 -59
- package/dist/esm/core/Table/TableWidget.js +0 -44
- package/dist/esm/core/Table/common.js +0 -44
- package/dist/esm/core/Table/index.js +0 -104
- package/dist/esm/core/TableForm/AddRowButton.js +0 -106
- package/dist/esm/core/TableForm/Columns/AffixColumn.js +0 -46
- package/dist/esm/core/TableForm/Columns/CheckboxColumn.js +0 -32
- package/dist/esm/core/TableForm/Columns/FormItem.js +0 -18
- package/dist/esm/core/TableForm/Columns/InputColumn.js +0 -114
- package/dist/esm/core/TableForm/Columns/TextColumn.js +0 -41
- package/dist/esm/core/TableForm/Columns/index.js +0 -21
- package/dist/esm/core/TableForm/TableFormBodyCell.js +0 -163
- package/dist/esm/core/TableForm/TableFormBodyRows.js +0 -213
- package/dist/esm/core/TableForm/TableFormHeaderCell.js +0 -91
- package/dist/esm/core/TableForm/index.js +0 -185
- package/dist/esm/core/TableForm/style.js +0 -27
- package/dist/esm/core/TableForm/types.js +0 -8
- package/dist/esm/core/TableForm/utils.js +0 -32
- package/dist/esm/core/Tag/SplitTag.js +0 -62
- package/dist/esm/core/Tag/const.js +0 -10
- package/dist/esm/core/Tag/index.js +0 -91
- package/dist/esm/core/Tag/style.js +0 -9
- package/dist/esm/core/TextArea/index.js +0 -70
- package/dist/esm/core/Time/index.js +0 -29
- package/dist/esm/core/TimePicker/index.js +0 -64
- package/dist/esm/core/TimeZoneSelect/index.js +0 -163
- package/dist/esm/core/Token/index.js +0 -81
- package/dist/esm/core/Token/style.js +0 -3
- package/dist/esm/core/Tooltip/index.js +0 -87
- package/dist/esm/core/Truncate/index.js +0 -47
- package/dist/esm/core/Typo/index.js +0 -128
- package/dist/esm/core/antd.js +0 -205
- package/dist/esm/core/message/index.js +0 -179
- package/dist/esm/core/message-group/index.js +0 -143
- package/dist/esm/coreX/BarChart/index.js +0 -34
- package/dist/esm/coreX/BatchOperation/index.js +0 -144
- package/dist/esm/coreX/ChartWithTooltip/index.js +0 -149
- package/dist/esm/coreX/Counting/index.js +0 -20
- package/dist/esm/coreX/CronCalendar/index.js +0 -103
- package/dist/esm/coreX/CronPlan/index.js +0 -457
- package/dist/esm/coreX/DateRangePicker/AbsoluteDate.js +0 -177
- package/dist/esm/coreX/DateRangePicker/Calendar.js +0 -284
- package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +0 -77
- package/dist/esm/coreX/DateRangePicker/InputTime.js +0 -149
- package/dist/esm/coreX/DateRangePicker/RelativeTime.js +0 -51
- package/dist/esm/coreX/DateRangePicker/common.js +0 -183
- package/dist/esm/coreX/DateRangePicker/index.js +0 -325
- package/dist/esm/coreX/DeprecatedDonutChart/index.js +0 -37
- package/dist/esm/coreX/DropdownTransition/index.js +0 -71
- package/dist/esm/coreX/GoBackButton/index.js +0 -43
- package/dist/esm/coreX/I18nNameTag/index.js +0 -35
- package/dist/esm/coreX/NamesTooltip/index.js +0 -32
- package/dist/esm/coreX/OverflowTooltip/index.js +0 -90
- package/dist/esm/coreX/SidebarSubtitle/index.js +0 -11
- package/dist/esm/coreX/SortableList/index.js +0 -31
- package/dist/esm/coreX/SummaryTable/index.js +0 -108
- package/dist/esm/coreX/SwitchWithText/index.js +0 -57
- package/dist/esm/coreX/TabMenu/index.js +0 -150
- package/dist/esm/coreX/TruncatedTextWithTooltip/index.js +0 -67
- package/dist/esm/coreX/UnitWithChart/index.js +0 -113
- package/dist/esm/coreX/common/getCalendarTitle.js +0 -24
- package/dist/esm/hooks/useElementIntersectionRatio.js +0 -28
- package/dist/esm/hooks/useElementResize.js +0 -67
- package/dist/esm/hooks/useElementsSize.js +0 -56
- package/dist/esm/hooks/useMemoCompare.js +0 -15
- package/dist/esm/hooks/useParrotTranslation.js +0 -11
- package/dist/esm/spec/type.js +0 -7
- package/dist/esm/store/chart.js +0 -62
- package/dist/esm/store/index.js +0 -37
- package/dist/esm/store/modal.js +0 -63
- package/dist/esm/styles/token/color.js +0 -271
- package/dist/esm/utils/constants.js +0 -5
- package/dist/esm/utils/cron-time.js +0 -448
- package/dist/esm/utils/dom.js +0 -14
- package/dist/esm/utils/icon.js +0 -20
- package/dist/esm/utils/isEmpty.js +0 -10
- package/dist/esm/utils/time.js +0 -76
- package/dist/esm/utils/tower.js +0 -173
package/dist/cjs/utils/tower.js
DELETED
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const MAGIC_METRIC_NULL = -2;
|
|
4
|
-
function formatBits(bits, decimals = 2) {
|
|
5
|
-
if (bits <= 0 || bits === MAGIC_METRIC_NULL) {
|
|
6
|
-
return {
|
|
7
|
-
value: 0,
|
|
8
|
-
unit: "b"
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
const k = 1e3;
|
|
12
|
-
const units = ["b", "Kb", "Mb", "Gb", "Tb", "Pb"];
|
|
13
|
-
let i = Math.floor(Math.log(bits) / Math.log(k));
|
|
14
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
15
|
-
return {
|
|
16
|
-
value: parseFloat((bits / Math.pow(k, i)).toFixed(decimals)),
|
|
17
|
-
unit: units[i]
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function formatFrequency(frequency, decimals = 2) {
|
|
21
|
-
if (frequency <= 0 || frequency === MAGIC_METRIC_NULL) {
|
|
22
|
-
return {
|
|
23
|
-
value: 0,
|
|
24
|
-
unit: "Hz"
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
const k = 1e3;
|
|
28
|
-
const units = ["Hz", "KHz", "MHz", "GHz", "THz"];
|
|
29
|
-
let i = Math.floor(Math.log(frequency) / Math.log(k));
|
|
30
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
31
|
-
return {
|
|
32
|
-
value: parseFloat((frequency / Math.pow(k, i)).toFixed(decimals)),
|
|
33
|
-
unit: units[i]
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
const SECOND = 1;
|
|
37
|
-
const MINUTE = 60 * SECOND;
|
|
38
|
-
const HOUR = 60 * MINUTE;
|
|
39
|
-
const DAY = 24 * HOUR;
|
|
40
|
-
const WEEK = 7 * DAY;
|
|
41
|
-
function formatSeconds(seconds, decimals = 0) {
|
|
42
|
-
if (seconds <= MAGIC_METRIC_NULL) {
|
|
43
|
-
seconds = 0;
|
|
44
|
-
}
|
|
45
|
-
const units = [
|
|
46
|
-
{
|
|
47
|
-
value: WEEK,
|
|
48
|
-
unit: "week"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
value: DAY,
|
|
52
|
-
unit: "day"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
value: HOUR,
|
|
56
|
-
unit: "hour"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
value: MINUTE,
|
|
60
|
-
unit: "minute"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
value: SECOND,
|
|
64
|
-
unit: "second"
|
|
65
|
-
}
|
|
66
|
-
];
|
|
67
|
-
for (const unit of units) {
|
|
68
|
-
if (seconds > unit.value) {
|
|
69
|
-
return {
|
|
70
|
-
value: parseFloat((seconds / unit.value).toFixed(decimals)),
|
|
71
|
-
unit: unit.unit
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
return {
|
|
76
|
-
value: parseFloat((seconds / SECOND).toFixed(decimals)),
|
|
77
|
-
unit: "second"
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
function formatBitPerSecond(input, decimals = 1) {
|
|
81
|
-
if (input <= 0 || input === MAGIC_METRIC_NULL) {
|
|
82
|
-
return {
|
|
83
|
-
value: 0,
|
|
84
|
-
unit: "bps"
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
const k = 1e3;
|
|
88
|
-
const units = ["bps", "Kbps", "Mbps", "Gbps", "Tbps"];
|
|
89
|
-
let i = Math.floor(Math.log(input) / Math.log(k));
|
|
90
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
91
|
-
return {
|
|
92
|
-
value: parseFloat((input / Math.pow(k, i)).toFixed(decimals)),
|
|
93
|
-
unit: units[i]
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
function formatBps(input, decimals = 1) {
|
|
97
|
-
if (input <= 0 || input === MAGIC_METRIC_NULL) {
|
|
98
|
-
return {
|
|
99
|
-
value: 0,
|
|
100
|
-
unit: "Bps"
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
const k = 1e3;
|
|
104
|
-
const units = ["Bps", "KBps", "MBps", "GBps", "TBps"];
|
|
105
|
-
let i = Math.floor(Math.log(input) / Math.log(k));
|
|
106
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
107
|
-
return {
|
|
108
|
-
value: parseFloat((input / Math.pow(k, i)).toFixed(decimals)),
|
|
109
|
-
unit: units[i]
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
function formatBytes(bytes, decimals = 2) {
|
|
113
|
-
if (bytes <= 0 || bytes === MAGIC_METRIC_NULL) {
|
|
114
|
-
return {
|
|
115
|
-
value: 0,
|
|
116
|
-
unit: "B"
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
const k = 1024;
|
|
120
|
-
const units = ["B", "KiB", "MiB", "GiB", "TiB", "PiB"];
|
|
121
|
-
let i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
122
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
123
|
-
return {
|
|
124
|
-
value: parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)),
|
|
125
|
-
unit: units[i]
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
function formatPercent(input, decimals = 2, saturated = true) {
|
|
129
|
-
if (input === MAGIC_METRIC_NULL) {
|
|
130
|
-
input = 0;
|
|
131
|
-
}
|
|
132
|
-
if (saturated) {
|
|
133
|
-
if (input <= 0) {
|
|
134
|
-
input = 0;
|
|
135
|
-
}
|
|
136
|
-
if (input > 100) {
|
|
137
|
-
input = 100;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const value = input.toFixed(decimals);
|
|
141
|
-
if (parseFloat(value) === 0 && input > 0) {
|
|
142
|
-
if (decimals >= 1) {
|
|
143
|
-
return {
|
|
144
|
-
value: `0.${"0".repeat(decimals - 1)}1`,
|
|
145
|
-
numberValue: parseFloat(`0.${"0".repeat(decimals - 1)}1`),
|
|
146
|
-
unit: "%"
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
return {
|
|
150
|
-
value: "1",
|
|
151
|
-
numberValue: 1,
|
|
152
|
-
unit: "%"
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
return {
|
|
156
|
-
value,
|
|
157
|
-
numberValue: parseFloat(input.toFixed(decimals)),
|
|
158
|
-
unit: "%"
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
function formatSpeed(input, decimals = 0) {
|
|
162
|
-
input /= 1e3;
|
|
163
|
-
if (input < 1)
|
|
164
|
-
return { value: "-", unit: "" };
|
|
165
|
-
const units = ["KbE", "MbE", "GbE", "TbE"];
|
|
166
|
-
const k = 1e3;
|
|
167
|
-
let i = Math.floor(Math.log(input) / Math.log(k));
|
|
168
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
169
|
-
return {
|
|
170
|
-
value: parseFloat((input / Math.pow(k, i)).toFixed(decimals)),
|
|
171
|
-
unit: units[i]
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
exports.DAY = DAY;
|
|
176
|
-
exports.HOUR = HOUR;
|
|
177
|
-
exports.MAGIC_METRIC_NULL = MAGIC_METRIC_NULL;
|
|
178
|
-
exports.MINUTE = MINUTE;
|
|
179
|
-
exports.SECOND = SECOND;
|
|
180
|
-
exports.WEEK = WEEK;
|
|
181
|
-
exports.formatBitPerSecond = formatBitPerSecond;
|
|
182
|
-
exports.formatBits = formatBits;
|
|
183
|
-
exports.formatBps = formatBps;
|
|
184
|
-
exports.formatBytes = formatBytes;
|
|
185
|
-
exports.formatFrequency = formatFrequency;
|
|
186
|
-
exports.formatPercent = formatPercent;
|
|
187
|
-
exports.formatSeconds = formatSeconds;
|
|
188
|
-
exports.formatSpeed = formatSpeed;
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { parrotI18n } from '@cloudtower/parrot';
|
|
2
|
-
import { antdKit } from '../core/antd.js';
|
|
3
|
-
import _message from '../core/message/index.js';
|
|
4
|
-
import { ConfigProvider } from 'antd';
|
|
5
|
-
import enUS from 'antd/lib/locale/en_US';
|
|
6
|
-
import zhCN from 'antd/lib/locale/zh_CN';
|
|
7
|
-
import React__default, { createContext, useMemo, useEffect, useContext } from 'react';
|
|
8
|
-
import { createBatchMessageMethods } from '../core/message-group/index.js';
|
|
9
|
-
|
|
10
|
-
var __defProp = Object.defineProperty;
|
|
11
|
-
var __defProps = Object.defineProperties;
|
|
12
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
13
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
14
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
15
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
16
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
17
|
-
var __spreadValues = (a, b) => {
|
|
18
|
-
for (var prop in b || (b = {}))
|
|
19
|
-
if (__hasOwnProp.call(b, prop))
|
|
20
|
-
__defNormalProp(a, prop, b[prop]);
|
|
21
|
-
if (__getOwnPropSymbols)
|
|
22
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
23
|
-
if (__propIsEnum.call(b, prop))
|
|
24
|
-
__defNormalProp(a, prop, b[prop]);
|
|
25
|
-
}
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
28
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
29
|
-
const kitContext = createContext(antdKit);
|
|
30
|
-
const UIKitProvider = (props) => {
|
|
31
|
-
const {
|
|
32
|
-
children,
|
|
33
|
-
kit = antdKit,
|
|
34
|
-
message,
|
|
35
|
-
lng = "en-US",
|
|
36
|
-
getPopupContainer
|
|
37
|
-
} = props;
|
|
38
|
-
const _kit = useMemo(() => {
|
|
39
|
-
if ((message == null ? void 0 : message.batch) != null) {
|
|
40
|
-
return __spreadProps(__spreadValues({}, kit), {
|
|
41
|
-
message: createBatchMessageMethods(_message, message.batch)
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
return kit;
|
|
45
|
-
}, [kit, message == null ? void 0 : message.batch]);
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
_message.config({
|
|
48
|
-
maxCount: message == null ? void 0 : message.maxCount
|
|
49
|
-
});
|
|
50
|
-
}, [message == null ? void 0 : message.maxCount]);
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (parrotI18n.language !== lng) {
|
|
53
|
-
parrotI18n.changeLanguage(lng);
|
|
54
|
-
}
|
|
55
|
-
}, [lng]);
|
|
56
|
-
return /* @__PURE__ */ React__default.createElement(kitContext.Provider, { value: _kit }, /* @__PURE__ */ React__default.createElement(
|
|
57
|
-
ConfigProvider,
|
|
58
|
-
{
|
|
59
|
-
autoInsertSpaceInButton: false,
|
|
60
|
-
locale: lng === "zh-CN" ? zhCN : enUS,
|
|
61
|
-
getPopupContainer
|
|
62
|
-
},
|
|
63
|
-
children
|
|
64
|
-
));
|
|
65
|
-
};
|
|
66
|
-
var UIKitProvider$1 = UIKitProvider;
|
|
67
|
-
const useUIKit = () => {
|
|
68
|
-
return useContext(kitContext);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export { UIKitProvider$1 as default, kitContext, useUIKit };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { XmarkRemove24SecondaryIcon } from '@cloudtower/icons-react';
|
|
2
|
-
import { styled } from '@linaria/react';
|
|
3
|
-
import Icon from '../Icon/index.js';
|
|
4
|
-
import cs from 'classnames';
|
|
5
|
-
import React__default, { useState } from 'react';
|
|
6
|
-
import DropdownTransition from '../../coreX/DropdownTransition/index.js';
|
|
7
|
-
|
|
8
|
-
const Card = /*#__PURE__*/styled('div')({
|
|
9
|
-
name: "Card",
|
|
10
|
-
class: "c18gxmrl",
|
|
11
|
-
propsAsIs: false
|
|
12
|
-
});
|
|
13
|
-
const CloseButton = props => {
|
|
14
|
-
const {
|
|
15
|
-
className,
|
|
16
|
-
onClick
|
|
17
|
-
} = props;
|
|
18
|
-
return /* @__PURE__ */React__default.createElement(Icon, {
|
|
19
|
-
src: XmarkRemove24SecondaryIcon,
|
|
20
|
-
iconHeight: 24,
|
|
21
|
-
iconWidth: 24,
|
|
22
|
-
className,
|
|
23
|
-
onClick: e => {
|
|
24
|
-
e.stopPropagation();
|
|
25
|
-
onClick == null ? void 0 : onClick(e);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
const AccordionCard = props => {
|
|
30
|
-
const {
|
|
31
|
-
header,
|
|
32
|
-
expand,
|
|
33
|
-
className,
|
|
34
|
-
defaultExpand = true,
|
|
35
|
-
mountOnEnter,
|
|
36
|
-
unmountOnExit
|
|
37
|
-
} = props;
|
|
38
|
-
const [active, setActive] = useState(defaultExpand);
|
|
39
|
-
return /* @__PURE__ */React__default.createElement(Card, {
|
|
40
|
-
className: cs(active && "active", className)
|
|
41
|
-
}, /* @__PURE__ */React__default.createElement("header", {
|
|
42
|
-
onClick: () => setActive(!active),
|
|
43
|
-
className: "show-close"
|
|
44
|
-
}, typeof header === "function" ? header(active) : header), /* @__PURE__ */React__default.createElement(DropdownTransition, {
|
|
45
|
-
visible: active,
|
|
46
|
-
timeout: 200,
|
|
47
|
-
classNames: "topo-dropdown",
|
|
48
|
-
mountOnEnter,
|
|
49
|
-
unmountOnExit
|
|
50
|
-
}, /* @__PURE__ */React__default.createElement("div", {
|
|
51
|
-
className: "expand"
|
|
52
|
-
}, expand)));
|
|
53
|
-
};
|
|
54
|
-
AccordionCard.CloseButton = CloseButton;
|
|
55
|
-
var AccordionCard$1 = AccordionCard;
|
|
56
|
-
|
|
57
|
-
export { AccordionCard$1 as default };
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import Icon from '../Icon/index.js';
|
|
2
|
-
import { Alert as Alert$2 } from 'antd';
|
|
3
|
-
import cs from 'classnames';
|
|
4
|
-
import React__default from 'react';
|
|
5
|
-
import { getAlertIcon } from '../../utils/icon.js';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __defProps = Object.defineProperties;
|
|
9
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
configurable: true,
|
|
16
|
-
writable: true,
|
|
17
|
-
value
|
|
18
|
-
}) : obj[key] = value;
|
|
19
|
-
var __spreadValues = (a, b) => {
|
|
20
|
-
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
21
|
-
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
22
|
-
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
23
|
-
}
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
26
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
-
var __objRest = (source, exclude) => {
|
|
28
|
-
var target = {};
|
|
29
|
-
for (var prop in source) if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
30
|
-
if (source != null && __getOwnPropSymbols) for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop)) target[prop] = source[prop];
|
|
32
|
-
}
|
|
33
|
-
return target;
|
|
34
|
-
};
|
|
35
|
-
const MessageWrapperStyle = "m74vjol";
|
|
36
|
-
const AlertStyle = "a1o35uvh";
|
|
37
|
-
const Alert = _a => {
|
|
38
|
-
var _b = _a,
|
|
39
|
-
{
|
|
40
|
-
type,
|
|
41
|
-
icon,
|
|
42
|
-
showIcon = true,
|
|
43
|
-
className,
|
|
44
|
-
onClose,
|
|
45
|
-
closeText,
|
|
46
|
-
action,
|
|
47
|
-
message
|
|
48
|
-
} = _b,
|
|
49
|
-
props = __objRest(_b, ["type", "icon", "showIcon", "className", "onClose", "closeText", "action", "message"]);
|
|
50
|
-
const _icon = /* @__PURE__ */React__default.createElement(Icon, {
|
|
51
|
-
alt: type,
|
|
52
|
-
src: getAlertIcon(type)
|
|
53
|
-
});
|
|
54
|
-
const _type = type === "normal" ? "info" : type;
|
|
55
|
-
return /* @__PURE__ */React__default.createElement(Alert$2, __spreadProps(__spreadValues({}, props), {
|
|
56
|
-
className: cs(AlertStyle, type ? `alert-${type}` : "", className, {
|
|
57
|
-
action
|
|
58
|
-
}),
|
|
59
|
-
type: _type,
|
|
60
|
-
message: /* @__PURE__ */React__default.createElement("div", {
|
|
61
|
-
className: MessageWrapperStyle
|
|
62
|
-
}, /* @__PURE__ */React__default.createElement("span", {
|
|
63
|
-
style: {
|
|
64
|
-
flex: 1
|
|
65
|
-
}
|
|
66
|
-
}, message), action ? /* @__PURE__ */React__default.createElement("span", {
|
|
67
|
-
className: cs("action")
|
|
68
|
-
}, action) : null),
|
|
69
|
-
icon: icon || _icon,
|
|
70
|
-
showIcon,
|
|
71
|
-
onClose,
|
|
72
|
-
closeText,
|
|
73
|
-
closable: !!onClose
|
|
74
|
-
}));
|
|
75
|
-
};
|
|
76
|
-
var Alert$1 = Alert;
|
|
77
|
-
|
|
78
|
-
export { Alert$1 as default };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
|
|
4
|
-
const Arch = (props) => {
|
|
5
|
-
const { t } = useParrotTranslation();
|
|
6
|
-
const { architecture } = props;
|
|
7
|
-
let text = "";
|
|
8
|
-
if (architecture) {
|
|
9
|
-
text = t(`components.Architecture_${architecture}`);
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */ React__default.createElement("span", null, text);
|
|
12
|
-
};
|
|
13
|
-
var Arch$1 = Arch;
|
|
14
|
-
|
|
15
|
-
export { Arch$1 as default };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { cx } from '@linaria/core';
|
|
2
|
-
import { Badge as Badge$2 } from 'antd';
|
|
3
|
-
import React__default from 'react';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __defProps = Object.defineProperties;
|
|
7
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
-
var __objRest = (source, exclude) => {
|
|
25
|
-
var target = {};
|
|
26
|
-
for (var prop in source)
|
|
27
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
-
target[prop] = source[prop];
|
|
29
|
-
if (source != null && __getOwnPropSymbols)
|
|
30
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
-
target[prop] = source[prop];
|
|
33
|
-
}
|
|
34
|
-
return target;
|
|
35
|
-
};
|
|
36
|
-
const Badge = (_a) => {
|
|
37
|
-
var _b = _a, { type = "error", className } = _b, props = __objRest(_b, ["type", "className"]);
|
|
38
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
39
|
-
Badge$2,
|
|
40
|
-
__spreadProps(__spreadValues({
|
|
41
|
-
className: cx(`badge-${type}`, className)
|
|
42
|
-
}, props), {
|
|
43
|
-
showZero: false
|
|
44
|
-
})
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
var Badge$1 = Badge;
|
|
48
|
-
|
|
49
|
-
export { Badge$1 as default };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import _ from 'lodash';
|
|
2
|
-
import React__default from 'react';
|
|
3
|
-
import { SVGUniqueID } from 'react-svg-unique-id';
|
|
4
|
-
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
-
var __spreadValues = (a, b) => {
|
|
11
|
-
for (var prop in b || (b = {}))
|
|
12
|
-
if (__hasOwnProp.call(b, prop))
|
|
13
|
-
__defNormalProp(a, prop, b[prop]);
|
|
14
|
-
if (__getOwnPropSymbols)
|
|
15
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
-
if (__propIsEnum.call(b, prop))
|
|
17
|
-
__defNormalProp(a, prop, b[prop]);
|
|
18
|
-
}
|
|
19
|
-
return a;
|
|
20
|
-
};
|
|
21
|
-
var __objRest = (source, exclude) => {
|
|
22
|
-
var target = {};
|
|
23
|
-
for (var prop in source)
|
|
24
|
-
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
-
target[prop] = source[prop];
|
|
26
|
-
if (source != null && __getOwnPropSymbols)
|
|
27
|
-
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
-
target[prop] = source[prop];
|
|
30
|
-
}
|
|
31
|
-
return target;
|
|
32
|
-
};
|
|
33
|
-
const BaseIcon = React__default.forwardRef(
|
|
34
|
-
(props, ref) => {
|
|
35
|
-
const _a = props, {
|
|
36
|
-
alt,
|
|
37
|
-
className,
|
|
38
|
-
width,
|
|
39
|
-
height,
|
|
40
|
-
cursor,
|
|
41
|
-
style,
|
|
42
|
-
children,
|
|
43
|
-
prefixNode,
|
|
44
|
-
suffixIconSrc: SuffixSrc,
|
|
45
|
-
src: Src
|
|
46
|
-
} = _a, HTMLSpanElementProps = __objRest(_a, [
|
|
47
|
-
"alt",
|
|
48
|
-
"className",
|
|
49
|
-
"width",
|
|
50
|
-
"height",
|
|
51
|
-
"cursor",
|
|
52
|
-
"style",
|
|
53
|
-
"children",
|
|
54
|
-
"prefixNode",
|
|
55
|
-
"suffixIconSrc",
|
|
56
|
-
"src"
|
|
57
|
-
]);
|
|
58
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
59
|
-
"span",
|
|
60
|
-
__spreadValues({
|
|
61
|
-
ref,
|
|
62
|
-
className,
|
|
63
|
-
style: _.pickBy(__spreadValues({ cursor }, style))
|
|
64
|
-
}, HTMLSpanElementProps),
|
|
65
|
-
prefixNode,
|
|
66
|
-
/* @__PURE__ */ React__default.createElement("span", { className: "icon-inner" }, typeof Src === "string" ? /* @__PURE__ */ React__default.createElement("img", { alt, src: Src, width, height }) : /* @__PURE__ */ React__default.createElement(SVGUniqueID, null, Src({ width, height }))),
|
|
67
|
-
children && /* @__PURE__ */ React__default.createElement("span", { className: "icon-children" }, children),
|
|
68
|
-
SuffixSrc && /* @__PURE__ */ React__default.createElement("span", { className: "icon-inner suffix" }, typeof SuffixSrc === "string" ? /* @__PURE__ */ React__default.createElement("img", { alt, src: SuffixSrc, width, height }) : /* @__PURE__ */ React__default.createElement(SVGUniqueID, null, SuffixSrc({ width, height })))
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
var BaseIcon$1 = BaseIcon;
|
|
73
|
-
|
|
74
|
-
export { BaseIcon$1 as default };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { cx } from '@linaria/core';
|
|
2
|
-
import Empty from '../Empty/index.js';
|
|
3
|
-
import isEmpty from '../../utils/isEmpty.js';
|
|
4
|
-
import { formatBits } from '../../utils/tower.js';
|
|
5
|
-
import React__default from 'react';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
const Bit = ({
|
|
24
|
-
rawValue,
|
|
25
|
-
decimals,
|
|
26
|
-
unitClassName,
|
|
27
|
-
valueClassName,
|
|
28
|
-
emptyProps
|
|
29
|
-
}) => {
|
|
30
|
-
if (isEmpty(rawValue)) {
|
|
31
|
-
return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues({}, emptyProps));
|
|
32
|
-
}
|
|
33
|
-
const { value, unit } = formatBits(rawValue, decimals);
|
|
34
|
-
return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
|
|
35
|
-
};
|
|
36
|
-
var Bit$1 = Bit;
|
|
37
|
-
|
|
38
|
-
export { Bit$1 as default };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { cx } from '@linaria/core';
|
|
2
|
-
import Empty from '../Empty/index.js';
|
|
3
|
-
import isEmpty from '../../utils/isEmpty.js';
|
|
4
|
-
import { formatBitPerSecond } from '../../utils/tower.js';
|
|
5
|
-
import React__default from 'react';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
const BitPerSeconds = ({
|
|
24
|
-
rawValue,
|
|
25
|
-
decimals,
|
|
26
|
-
valueClassName,
|
|
27
|
-
unitClassName,
|
|
28
|
-
emptyProps
|
|
29
|
-
}) => {
|
|
30
|
-
if (isEmpty(rawValue)) {
|
|
31
|
-
return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues({}, emptyProps));
|
|
32
|
-
}
|
|
33
|
-
const { value, unit } = formatBitPerSecond(rawValue, decimals);
|
|
34
|
-
return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
|
|
35
|
-
};
|
|
36
|
-
var BitPerSecond = BitPerSeconds;
|
|
37
|
-
|
|
38
|
-
export { BitPerSecond as default };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { cx } from '@linaria/core';
|
|
2
|
-
import Empty from '../Empty/index.js';
|
|
3
|
-
import isEmpty from '../../utils/isEmpty.js';
|
|
4
|
-
import { formatBps } from '../../utils/tower.js';
|
|
5
|
-
import React__default from 'react';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
-
var __spreadValues = (a, b) => {
|
|
13
|
-
for (var prop in b || (b = {}))
|
|
14
|
-
if (__hasOwnProp.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
if (__getOwnPropSymbols)
|
|
17
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
-
if (__propIsEnum.call(b, prop))
|
|
19
|
-
__defNormalProp(a, prop, b[prop]);
|
|
20
|
-
}
|
|
21
|
-
return a;
|
|
22
|
-
};
|
|
23
|
-
const Bps = ({
|
|
24
|
-
rawValue,
|
|
25
|
-
decimals,
|
|
26
|
-
valueClassName,
|
|
27
|
-
unitClassName,
|
|
28
|
-
emptyProps
|
|
29
|
-
}) => {
|
|
30
|
-
if (isEmpty(rawValue)) {
|
|
31
|
-
return /* @__PURE__ */ React__default.createElement(Empty, __spreadValues({}, emptyProps));
|
|
32
|
-
}
|
|
33
|
-
const { value, unit } = formatBps(rawValue, decimals);
|
|
34
|
-
return /* @__PURE__ */ React__default.createElement("span", null, /* @__PURE__ */ React__default.createElement("span", { className: cx("value", valueClassName) }, value), /* @__PURE__ */ React__default.createElement("span", { className: cx("unit", unitClassName) }, ` ${unit}`));
|
|
35
|
-
};
|
|
36
|
-
var Bps$1 = Bps;
|
|
37
|
-
|
|
38
|
-
export { Bps$1 as default };
|