@cloudtower/eagle 0.27.53 → 0.27.55
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/UIKitProvider/index.js +77 -0
- package/dist/cjs/core/AccordionCard/index.js +59 -0
- package/dist/cjs/core/Alert/index.js +80 -0
- package/dist/cjs/core/Arch/index.js +17 -0
- package/dist/cjs/core/Badge/index.js +51 -0
- package/dist/cjs/core/BaseIcon/index.js +76 -0
- package/dist/cjs/core/Bit/index.js +40 -0
- package/dist/cjs/core/BitPerSecond/index.js +40 -0
- package/dist/cjs/core/Bps/index.js +40 -0
- package/dist/cjs/core/Breadcrumb/index.js +58 -0
- package/dist/cjs/core/Button/HoverableElement.js +14 -0
- package/dist/cjs/core/Button/index.js +89 -0
- package/dist/cjs/core/ButtonGroup/index.js +110 -0
- package/dist/cjs/core/Byte/index.js +49 -0
- package/dist/cjs/core/Calendar/index.js +25 -0
- package/dist/cjs/core/Card/CardBody.js +12 -0
- package/dist/cjs/core/Card/CardTitle.js +12 -0
- package/dist/cjs/core/Card/CardWrapper.js +55 -0
- package/dist/cjs/core/Card/index.js +94 -0
- package/dist/cjs/core/Cascader/cascader.style.js +23 -0
- package/dist/cjs/core/Cascader/cascader.widget.js +86 -0
- package/dist/cjs/core/Cascader/index.js +74 -0
- package/dist/cjs/core/Checkbox/checkbox.style.js +5 -0
- package/dist/cjs/core/Checkbox/index.js +53 -0
- package/dist/cjs/core/DetailCard/index.js +23 -0
- package/dist/cjs/core/DonutChart/index.js +167 -0
- package/dist/cjs/core/DropdownMenu/index.js +66 -0
- package/dist/cjs/core/Empty/index.js +11 -0
- package/dist/cjs/core/ExpandableList/ExpandIcon.js +17 -0
- package/dist/cjs/core/ExpandableList/ExpandableContainer.js +17 -0
- package/dist/cjs/core/ExpandableList/ExpandableItem.js +48 -0
- package/dist/cjs/core/ExpandableList/RoundOrder.js +22 -0
- package/dist/cjs/core/FailedLoad/index.js +32 -0
- package/dist/cjs/core/Fields/FieldsBoolean/index.js +47 -0
- package/dist/cjs/core/Fields/FieldsDateTime/index.js +24 -0
- package/dist/cjs/core/Fields/FieldsDateTimeRange/index.js +50 -0
- package/dist/cjs/core/Fields/FieldsEnum/index.js +60 -0
- package/dist/cjs/core/Fields/FieldsFloat/index.js +60 -0
- package/dist/cjs/core/Fields/FieldsInt/index.js +78 -0
- package/dist/cjs/core/Fields/FieldsInteger/index.js +57 -0
- package/dist/cjs/core/Fields/FieldsString/index.js +116 -0
- package/dist/cjs/core/Fields/FieldsTextArea/index.js +64 -0
- package/dist/cjs/core/Fields/FieldsTimePicker/index.js +54 -0
- package/dist/cjs/core/Fields/index.js +28 -0
- package/dist/cjs/core/Form/index.js +10 -0
- package/dist/cjs/core/FormItem/index.js +38 -0
- package/dist/cjs/core/Frequency/index.js +40 -0
- package/dist/cjs/core/Icon/index.js +117 -0
- package/dist/cjs/core/Input/index.js +66 -0
- package/dist/cjs/core/InputGroup/index.js +14 -0
- package/dist/cjs/core/InputInteger/formatterInteger.js +15 -0
- package/dist/cjs/core/InputInteger/index.js +97 -0
- package/dist/cjs/core/InputNumber/index.js +90 -0
- package/dist/cjs/core/InputTagItem/index.js +12 -0
- package/dist/cjs/core/KitStoreProvider/index.js +23 -0
- package/dist/cjs/core/Link/index.js +56 -0
- package/dist/cjs/core/Loading/index.js +33 -0
- package/dist/cjs/core/Loading/style.js +11 -0
- package/dist/cjs/core/Metric/metric.js +21 -0
- package/dist/cjs/core/Modal/index.js +214 -0
- package/dist/cjs/core/ModalStack/index.js +47 -0
- package/dist/cjs/core/Overflow/index.js +117 -0
- package/dist/cjs/core/Pagination/index.js +120 -0
- package/dist/cjs/core/ParrotTrans/index.js +28 -0
- package/dist/cjs/core/Percent/index.js +41 -0
- package/dist/cjs/core/Progress/index.js +25 -0
- package/dist/cjs/core/Radio/index.js +142 -0
- package/dist/cjs/core/SearchInput/index.js +50 -0
- package/dist/cjs/core/Second/index.js +43 -0
- package/dist/cjs/core/SegmentControl/index.js +43 -0
- package/dist/cjs/core/Select/index.js +140 -0
- package/dist/cjs/core/SimplePagination/index.js +90 -0
- package/dist/cjs/core/Speed/index.js +40 -0
- package/dist/cjs/core/StatusCapsule/index.js +100 -0
- package/dist/cjs/core/StepProgress/index.js +44 -0
- package/dist/cjs/core/Steps/index.js +126 -0
- package/dist/cjs/core/Steps/style.js +13 -0
- package/dist/cjs/core/Styled/index.js +57 -0
- package/dist/cjs/core/Switch/index.js +61 -0
- package/dist/cjs/core/Table/TableWidget.js +47 -0
- package/dist/cjs/core/Table/common.js +46 -0
- package/dist/cjs/core/Table/index.js +112 -0
- package/dist/cjs/core/TableForm/AddRowButton.js +108 -0
- package/dist/cjs/core/TableForm/Columns/AffixColumn.js +48 -0
- package/dist/cjs/core/TableForm/Columns/CheckboxColumn.js +35 -0
- package/dist/cjs/core/TableForm/Columns/FormItem.js +20 -0
- package/dist/cjs/core/TableForm/Columns/InputColumn.js +117 -0
- package/dist/cjs/core/TableForm/Columns/TextColumn.js +44 -0
- package/dist/cjs/core/TableForm/Columns/index.js +24 -0
- package/dist/cjs/core/TableForm/TableFormBodyCell.js +165 -0
- package/dist/cjs/core/TableForm/TableFormBodyRows.js +215 -0
- package/dist/cjs/core/TableForm/TableFormHeaderCell.js +93 -0
- package/dist/cjs/core/TableForm/index.js +187 -0
- package/dist/cjs/core/TableForm/style.js +35 -0
- package/dist/cjs/core/TableForm/types.js +10 -0
- package/dist/cjs/core/TableForm/utils.js +36 -0
- package/dist/cjs/core/Tag/SplitTag.js +64 -0
- package/dist/cjs/core/Tag/const.js +12 -0
- package/dist/cjs/core/Tag/index.js +96 -0
- package/dist/cjs/core/Tag/style.js +14 -0
- package/dist/cjs/core/TextArea/index.js +72 -0
- package/dist/cjs/core/Time/index.js +31 -0
- package/dist/cjs/core/TimePicker/index.js +66 -0
- package/dist/cjs/core/TimeZoneSelect/index.js +165 -0
- package/dist/cjs/core/Token/index.js +86 -0
- package/dist/cjs/core/Token/style.js +5 -0
- package/dist/cjs/core/Tooltip/index.js +89 -0
- package/dist/cjs/core/Truncate/index.js +49 -0
- package/dist/cjs/core/Typo/index.js +130 -0
- package/dist/cjs/core/antd.js +208 -0
- package/dist/cjs/core/message/index.js +203 -0
- package/dist/cjs/core/message-group/index.js +147 -0
- package/dist/cjs/coreX/BarChart/index.js +39 -0
- package/dist/cjs/coreX/BatchOperation/index.js +149 -0
- package/dist/cjs/coreX/ChartWithTooltip/index.js +154 -0
- package/dist/cjs/coreX/Counting/index.js +22 -0
- package/dist/cjs/coreX/CronCalendar/index.js +105 -0
- package/dist/cjs/coreX/CronPlan/index.js +462 -0
- package/dist/cjs/coreX/DateRangePicker/AbsoluteDate.js +179 -0
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +286 -0
- package/dist/cjs/coreX/DateRangePicker/DateRangePicker.style.js +84 -0
- package/dist/cjs/coreX/DateRangePicker/InputTime.js +151 -0
- package/dist/cjs/coreX/DateRangePicker/RelativeTime.js +53 -0
- package/dist/cjs/coreX/DateRangePicker/common.js +195 -0
- package/dist/cjs/coreX/DateRangePicker/index.js +331 -0
- package/dist/cjs/coreX/DeprecatedDonutChart/index.js +39 -0
- package/dist/cjs/coreX/DropdownTransition/index.js +73 -0
- package/dist/cjs/coreX/GoBackButton/index.js +45 -0
- package/dist/cjs/coreX/I18nNameTag/index.js +37 -0
- package/dist/cjs/coreX/NamesTooltip/index.js +34 -0
- package/dist/cjs/coreX/OverflowTooltip/index.js +92 -0
- package/dist/cjs/coreX/SidebarSubtitle/index.js +13 -0
- package/dist/cjs/coreX/SortableList/index.js +33 -0
- package/dist/cjs/coreX/SummaryTable/index.js +113 -0
- package/dist/cjs/coreX/SwitchWithText/index.js +59 -0
- package/dist/cjs/coreX/TabMenu/index.js +152 -0
- package/dist/cjs/coreX/TruncatedTextWithTooltip/index.js +69 -0
- package/dist/cjs/coreX/UnitWithChart/index.js +118 -0
- package/dist/cjs/coreX/common/getCalendarTitle.js +26 -0
- package/dist/cjs/hooks/useElementIntersectionRatio.js +30 -0
- package/dist/cjs/hooks/useElementResize.js +69 -0
- package/dist/cjs/hooks/useElementsSize.js +58 -0
- package/dist/cjs/hooks/useMemoCompare.js +17 -0
- package/dist/cjs/hooks/useParrotTranslation.js +13 -0
- package/dist/cjs/index.js +120 -0
- package/dist/cjs/spec/type.js +9 -0
- package/dist/{umd → cjs}/stats1.html +1 -1
- package/dist/cjs/store/chart.js +65 -0
- package/dist/cjs/store/index.js +48 -0
- package/dist/cjs/store/modal.js +67 -0
- package/dist/cjs/styles/token/color.js +273 -0
- package/dist/cjs/utils/constants.js +8 -0
- package/dist/cjs/utils/cron-time.js +450 -0
- package/dist/cjs/utils/dom.js +16 -0
- package/dist/cjs/utils/icon.js +22 -0
- package/dist/cjs/utils/isEmpty.js +12 -0
- package/dist/cjs/utils/time.js +86 -0
- package/dist/cjs/utils/tower.js +188 -0
- package/dist/components.css +3101 -2209
- package/dist/esm/UIKitProvider/index.js +71 -0
- package/dist/esm/core/AccordionCard/index.js +57 -0
- package/dist/esm/core/Alert/index.js +78 -0
- package/dist/esm/core/Arch/index.js +15 -0
- package/dist/esm/core/Badge/index.js +49 -0
- package/dist/esm/core/BaseIcon/index.js +74 -0
- package/dist/esm/core/Bit/index.js +38 -0
- package/dist/esm/core/BitPerSecond/index.js +38 -0
- package/dist/esm/core/Bps/index.js +38 -0
- package/dist/esm/core/Breadcrumb/index.js +53 -0
- package/dist/esm/core/Button/HoverableElement.js +12 -0
- package/dist/esm/core/Button/index.js +87 -0
- package/dist/esm/core/ButtonGroup/index.js +105 -0
- package/dist/esm/core/Byte/index.js +47 -0
- package/dist/esm/core/Calendar/index.js +23 -0
- package/dist/esm/core/Card/CardBody.js +10 -0
- package/dist/esm/core/Card/CardTitle.js +10 -0
- package/dist/esm/core/Card/CardWrapper.js +53 -0
- package/dist/esm/core/Card/index.js +92 -0
- package/dist/esm/core/Cascader/cascader.style.js +12 -0
- package/dist/esm/core/Cascader/cascader.widget.js +79 -0
- package/dist/esm/core/Cascader/index.js +72 -0
- package/dist/esm/core/Checkbox/checkbox.style.js +3 -0
- package/dist/esm/core/Checkbox/index.js +51 -0
- package/dist/esm/core/DetailCard/index.js +21 -0
- package/dist/esm/core/DonutChart/index.js +161 -0
- package/dist/esm/core/DropdownMenu/index.js +61 -0
- package/dist/esm/core/Empty/index.js +9 -0
- package/dist/esm/core/ExpandableList/ExpandIcon.js +15 -0
- package/dist/esm/core/ExpandableList/ExpandableContainer.js +15 -0
- package/dist/esm/core/ExpandableList/ExpandableItem.js +46 -0
- package/dist/esm/core/ExpandableList/RoundOrder.js +20 -0
- package/dist/esm/core/FailedLoad/index.js +30 -0
- package/dist/esm/core/Fields/FieldsBoolean/index.js +45 -0
- package/dist/esm/core/Fields/FieldsDateTime/index.js +22 -0
- package/dist/esm/core/Fields/FieldsDateTimeRange/index.js +48 -0
- package/dist/esm/core/Fields/FieldsEnum/index.js +58 -0
- package/dist/esm/core/Fields/FieldsFloat/index.js +58 -0
- package/dist/esm/core/Fields/FieldsInt/index.js +76 -0
- package/dist/esm/core/Fields/FieldsInteger/index.js +55 -0
- package/dist/esm/core/Fields/FieldsString/index.js +114 -0
- package/dist/esm/core/Fields/FieldsTextArea/index.js +62 -0
- package/dist/esm/core/Fields/FieldsTimePicker/index.js +52 -0
- package/dist/esm/core/Fields/index.js +26 -0
- package/dist/esm/core/Form/index.js +8 -0
- package/dist/esm/core/FormItem/index.js +36 -0
- package/dist/esm/core/Frequency/index.js +38 -0
- package/dist/esm/core/Icon/index.js +115 -0
- package/dist/esm/core/Input/index.js +64 -0
- package/dist/esm/core/InputGroup/index.js +12 -0
- package/dist/esm/core/InputInteger/formatterInteger.js +13 -0
- package/dist/esm/core/InputInteger/index.js +92 -0
- package/dist/esm/core/InputNumber/index.js +85 -0
- package/dist/esm/core/InputTagItem/index.js +10 -0
- package/dist/esm/core/KitStoreProvider/index.js +17 -0
- package/dist/esm/core/Link/index.js +54 -0
- package/dist/esm/core/Loading/index.js +31 -0
- package/dist/esm/core/Loading/style.js +6 -0
- package/dist/esm/core/Metric/metric.js +19 -0
- package/dist/esm/core/Modal/index.js +212 -0
- package/dist/esm/core/ModalStack/index.js +45 -0
- package/dist/esm/core/Overflow/index.js +112 -0
- package/dist/esm/core/Pagination/index.js +115 -0
- package/dist/esm/core/ParrotTrans/index.js +26 -0
- package/dist/esm/core/Percent/index.js +39 -0
- package/dist/esm/core/Progress/index.js +23 -0
- package/dist/esm/core/Radio/index.js +136 -0
- package/dist/esm/core/SearchInput/index.js +48 -0
- package/dist/esm/core/Second/index.js +41 -0
- package/dist/esm/core/SegmentControl/index.js +41 -0
- package/dist/esm/core/Select/index.js +138 -0
- package/dist/esm/core/SimplePagination/index.js +88 -0
- package/dist/esm/core/Speed/index.js +38 -0
- package/dist/esm/core/StatusCapsule/index.js +94 -0
- package/dist/esm/core/StepProgress/index.js +42 -0
- package/dist/esm/core/Steps/index.js +124 -0
- package/dist/esm/core/Steps/style.js +7 -0
- package/dist/esm/core/Styled/index.js +45 -0
- package/dist/esm/core/Switch/index.js +59 -0
- package/dist/esm/core/Table/TableWidget.js +44 -0
- package/dist/esm/core/Table/common.js +44 -0
- package/dist/esm/core/Table/index.js +104 -0
- package/dist/esm/core/TableForm/AddRowButton.js +106 -0
- package/dist/esm/core/TableForm/Columns/AffixColumn.js +46 -0
- package/dist/esm/core/TableForm/Columns/CheckboxColumn.js +32 -0
- package/dist/esm/core/TableForm/Columns/FormItem.js +18 -0
- package/dist/esm/core/TableForm/Columns/InputColumn.js +114 -0
- package/dist/esm/core/TableForm/Columns/TextColumn.js +41 -0
- package/dist/esm/core/TableForm/Columns/index.js +21 -0
- package/dist/esm/core/TableForm/TableFormBodyCell.js +163 -0
- package/dist/esm/core/TableForm/TableFormBodyRows.js +213 -0
- package/dist/esm/core/TableForm/TableFormHeaderCell.js +91 -0
- package/dist/esm/core/TableForm/index.js +185 -0
- package/dist/esm/core/TableForm/style.js +27 -0
- package/dist/esm/core/TableForm/types.js +8 -0
- package/dist/esm/core/TableForm/utils.js +32 -0
- package/dist/esm/core/Tag/SplitTag.js +62 -0
- package/dist/esm/core/Tag/const.js +10 -0
- package/dist/esm/core/Tag/index.js +91 -0
- package/dist/esm/core/Tag/style.js +9 -0
- package/dist/esm/core/TextArea/index.js +70 -0
- package/dist/esm/core/Time/index.js +29 -0
- package/dist/esm/core/TimePicker/index.js +64 -0
- package/dist/esm/core/TimeZoneSelect/index.js +163 -0
- package/dist/esm/core/Token/index.js +81 -0
- package/dist/esm/core/Token/style.js +3 -0
- package/dist/esm/core/Tooltip/index.js +87 -0
- package/dist/esm/core/Truncate/index.js +47 -0
- package/dist/esm/core/Typo/index.js +128 -0
- package/dist/esm/core/antd.js +205 -0
- package/dist/esm/core/message/index.js +179 -0
- package/dist/esm/core/message-group/index.js +143 -0
- package/dist/esm/coreX/BarChart/index.js +34 -0
- package/dist/esm/coreX/BatchOperation/index.js +144 -0
- package/dist/esm/coreX/ChartWithTooltip/index.js +149 -0
- package/dist/esm/coreX/Counting/index.js +20 -0
- package/dist/esm/coreX/CronCalendar/index.js +103 -0
- package/dist/esm/coreX/CronPlan/index.js +457 -0
- package/dist/esm/coreX/DateRangePicker/AbsoluteDate.js +177 -0
- package/dist/esm/coreX/DateRangePicker/Calendar.js +284 -0
- package/dist/esm/coreX/DateRangePicker/DateRangePicker.style.js +77 -0
- package/dist/esm/coreX/DateRangePicker/InputTime.js +149 -0
- package/dist/esm/coreX/DateRangePicker/RelativeTime.js +51 -0
- package/dist/esm/coreX/DateRangePicker/common.js +183 -0
- package/dist/esm/coreX/DateRangePicker/index.js +325 -0
- package/dist/esm/coreX/DeprecatedDonutChart/index.js +37 -0
- package/dist/esm/coreX/DropdownTransition/index.js +71 -0
- package/dist/esm/coreX/GoBackButton/index.js +43 -0
- package/dist/esm/coreX/I18nNameTag/index.js +35 -0
- package/dist/esm/coreX/NamesTooltip/index.js +32 -0
- package/dist/esm/coreX/OverflowTooltip/index.js +90 -0
- package/dist/esm/coreX/SidebarSubtitle/index.js +11 -0
- package/dist/esm/coreX/SortableList/index.js +31 -0
- package/dist/esm/coreX/SummaryTable/index.js +108 -0
- package/dist/esm/coreX/SwitchWithText/index.js +57 -0
- package/dist/esm/coreX/TabMenu/index.js +150 -0
- package/dist/esm/coreX/TruncatedTextWithTooltip/index.js +67 -0
- package/dist/esm/coreX/UnitWithChart/index.js +113 -0
- package/dist/esm/coreX/common/getCalendarTitle.js +24 -0
- package/dist/esm/hooks/useElementIntersectionRatio.js +28 -0
- package/dist/esm/hooks/useElementResize.js +67 -0
- package/dist/esm/hooks/useElementsSize.js +56 -0
- package/dist/esm/hooks/useMemoCompare.js +15 -0
- package/dist/esm/hooks/useParrotTranslation.js +11 -0
- package/dist/esm/index.js +34 -10233
- package/dist/esm/spec/type.js +7 -0
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/store/chart.js +62 -0
- package/dist/esm/store/index.js +37 -0
- package/dist/esm/store/modal.js +63 -0
- package/dist/esm/styles/token/color.js +271 -0
- package/dist/esm/utils/constants.js +5 -0
- package/dist/esm/utils/cron-time.js +448 -0
- package/dist/esm/utils/dom.js +14 -0
- package/dist/esm/utils/icon.js +20 -0
- package/dist/esm/utils/isEmpty.js +10 -0
- package/dist/esm/utils/time.js +76 -0
- package/dist/esm/utils/tower.js +173 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/style.css +2011 -2011
- package/dist/token.css +209 -415
- package/package.json +8 -6
- package/dist/src/styles/token/token.d.ts +0 -1
- package/dist/umd/index.js +0 -10322
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { ArrowChevronDown16SecondaryIcon, MoreEllipsis316BoldBlueIcon, XmarkRemove16SecondaryIcon, XmarkRemove16BlueIcon } from '@cloudtower/icons-react';
|
|
2
|
+
import Button from '../../core/Button/index.js';
|
|
3
|
+
import Icon from '../../core/Icon/index.js';
|
|
4
|
+
import { ExtraOverflow } from '../../core/Overflow/index.js';
|
|
5
|
+
import Tooltip from '../../core/Tooltip/index.js';
|
|
6
|
+
import { Typo } from '../../core/Typo/index.js';
|
|
7
|
+
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
8
|
+
import { Menu, Dropdown } from 'antd';
|
|
9
|
+
import cs from 'classnames';
|
|
10
|
+
import React__default, { useMemo, useCallback } from 'react';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
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, {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value
|
|
21
|
+
}) : obj[key] = value;
|
|
22
|
+
var __spreadValues = (a, b) => {
|
|
23
|
+
for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
24
|
+
if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
+
if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]);
|
|
26
|
+
}
|
|
27
|
+
return a;
|
|
28
|
+
};
|
|
29
|
+
const SelectToolbar = "s1ebs0ra";
|
|
30
|
+
const renderBatchOperationMenuItem = (act, idx = 0) => {
|
|
31
|
+
if (act === "divider") {
|
|
32
|
+
return /* @__PURE__ */React__default.createElement(Menu.Divider, {
|
|
33
|
+
key: `divider-${idx}`
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
if ("children" in act) {
|
|
37
|
+
return /* @__PURE__ */React__default.createElement(Menu.SubMenu, {
|
|
38
|
+
className: cs(Typo.Label.l4_regular),
|
|
39
|
+
key: act.key,
|
|
40
|
+
title: (act == null ? void 0 : act.icon) ? React__default.cloneElement(act.icon, {}, act.title) : /* @__PURE__ */React__default.createElement("span", null, act.title)
|
|
41
|
+
}, act.children.map(renderBatchOperationMenuItem));
|
|
42
|
+
}
|
|
43
|
+
const Inner = props => {
|
|
44
|
+
return /* @__PURE__ */React__default.createElement("span", __spreadValues({}, props), act.icon ? React__default.cloneElement(act.icon, {}, act.title) : null, (act == null ? void 0 : act.count) && /* @__PURE__ */React__default.createElement("span", null, act.count));
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */React__default.createElement(Menu.Item, {
|
|
47
|
+
key: act.key,
|
|
48
|
+
onClick: act.onClick,
|
|
49
|
+
danger: act.danger,
|
|
50
|
+
disabled: !!(act == null ? void 0 : act.disabled),
|
|
51
|
+
className: (act == null ? void 0 : act.danger) && act.disabled ? "item-danger-disabled" : ""
|
|
52
|
+
}, "tooltip" in act && act.tooltip ? /* @__PURE__ */React__default.createElement(Tooltip, {
|
|
53
|
+
title: act.tooltip
|
|
54
|
+
}, /* @__PURE__ */React__default.createElement(Inner, null)) : /* @__PURE__ */React__default.createElement(Inner, null));
|
|
55
|
+
};
|
|
56
|
+
const BatchOperation = props => {
|
|
57
|
+
const {
|
|
58
|
+
count,
|
|
59
|
+
onClearSelection,
|
|
60
|
+
actions
|
|
61
|
+
} = props;
|
|
62
|
+
const {
|
|
63
|
+
t
|
|
64
|
+
} = useParrotTranslation();
|
|
65
|
+
const els = useMemo(() => {
|
|
66
|
+
return actions.map((act, idx) => {
|
|
67
|
+
if (act === "divider") {
|
|
68
|
+
return /* @__PURE__ */React__default.createElement(Menu.Divider, {
|
|
69
|
+
key: `divider-${idx}`
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if ("children" in act) {
|
|
73
|
+
return /* @__PURE__ */React__default.createElement(Dropdown, {
|
|
74
|
+
key: act.key,
|
|
75
|
+
trigger: ["click"],
|
|
76
|
+
placement: "bottomRight",
|
|
77
|
+
overlay: /* @__PURE__ */React__default.createElement(Menu, null, act.children.map(renderBatchOperationMenuItem))
|
|
78
|
+
}, /* @__PURE__ */React__default.createElement(Button, {
|
|
79
|
+
key: act.key,
|
|
80
|
+
type: "ordinary-onTint",
|
|
81
|
+
prefixIcon: act.icon != null ? act.icon : void 0,
|
|
82
|
+
danger: act == null ? void 0 : act.danger,
|
|
83
|
+
className: `sub-menu-${act.key}`,
|
|
84
|
+
suffixIcon: /* @__PURE__ */React__default.createElement(Icon, {
|
|
85
|
+
src: ArrowChevronDown16SecondaryIcon
|
|
86
|
+
})
|
|
87
|
+
}, act.title));
|
|
88
|
+
}
|
|
89
|
+
if (act.tooltip) {
|
|
90
|
+
return /* @__PURE__ */React__default.createElement(Tooltip, {
|
|
91
|
+
title: act.tooltip
|
|
92
|
+
}, /* @__PURE__ */React__default.createElement(Button, {
|
|
93
|
+
key: act.key,
|
|
94
|
+
type: "ordinary-onTint",
|
|
95
|
+
danger: act.danger,
|
|
96
|
+
onClick: act.onClick,
|
|
97
|
+
disabled: act.disabled,
|
|
98
|
+
prefixIcon: act.icon != null ? act.icon : void 0
|
|
99
|
+
}, act.title));
|
|
100
|
+
}
|
|
101
|
+
return /* @__PURE__ */React__default.createElement(Button, {
|
|
102
|
+
key: act.key,
|
|
103
|
+
type: "ordinary-onTint",
|
|
104
|
+
danger: act.danger,
|
|
105
|
+
onClick: act.onClick,
|
|
106
|
+
disabled: act.disabled,
|
|
107
|
+
prefixIcon: act.icon != null ? act.icon : void 0
|
|
108
|
+
}, act.title);
|
|
109
|
+
});
|
|
110
|
+
}, [actions]);
|
|
111
|
+
const getExtraEl = useCallback(end => /* @__PURE__ */React__default.createElement(Dropdown, {
|
|
112
|
+
overlay: /* @__PURE__ */React__default.createElement(Menu, null, actions.slice(end).map((act, idx) => {
|
|
113
|
+
return act === "divider" ? /* @__PURE__ */React__default.createElement(Menu.Divider, {
|
|
114
|
+
key: `divider-${idx}`
|
|
115
|
+
}) : "children" in act ? /* @__PURE__ */React__default.createElement(Menu.SubMenu, {
|
|
116
|
+
className: cs(Typo.Label.l4_regular),
|
|
117
|
+
key: act.key,
|
|
118
|
+
title: (act == null ? void 0 : act.icon) ? React__default.cloneElement(act.icon, {}, act.title) : /* @__PURE__ */React__default.createElement("span", null, act.title)
|
|
119
|
+
}, act.children.map(renderBatchOperationMenuItem)) : renderBatchOperationMenuItem(act);
|
|
120
|
+
}))
|
|
121
|
+
}, /* @__PURE__ */React__default.createElement(Icon, {
|
|
122
|
+
className: "more-btn",
|
|
123
|
+
src: MoreEllipsis316BoldBlueIcon
|
|
124
|
+
})), [actions]);
|
|
125
|
+
return /* @__PURE__ */React__default.createElement("div", {
|
|
126
|
+
className: SelectToolbar
|
|
127
|
+
}, /* @__PURE__ */React__default.createElement("span", {
|
|
128
|
+
className: "select-total"
|
|
129
|
+
}, t("components.selected_item_with_count", {
|
|
130
|
+
count
|
|
131
|
+
}), /* @__PURE__ */React__default.createElement(Icon, {
|
|
132
|
+
src: XmarkRemove16SecondaryIcon,
|
|
133
|
+
hoverSrc: XmarkRemove16BlueIcon,
|
|
134
|
+
onClick: onClearSelection
|
|
135
|
+
})), /* @__PURE__ */React__default.createElement(ExtraOverflow, {
|
|
136
|
+
className: "action-group",
|
|
137
|
+
reverse: true,
|
|
138
|
+
els,
|
|
139
|
+
extraEl: getExtraEl
|
|
140
|
+
}));
|
|
141
|
+
};
|
|
142
|
+
var BatchOperation$1 = BatchOperation;
|
|
143
|
+
|
|
144
|
+
export { BatchOperation$1 as default, renderBatchOperationMenuItem };
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { styled } from '@linaria/react';
|
|
2
|
+
import Bit from '../../core/Bit/index.js';
|
|
3
|
+
import BitPerSecond from '../../core/BitPerSecond/index.js';
|
|
4
|
+
import Bps from '../../core/Bps/index.js';
|
|
5
|
+
import Byte from '../../core/Byte/index.js';
|
|
6
|
+
import Frequency from '../../core/Frequency/index.js';
|
|
7
|
+
import Percent from '../../core/Percent/index.js';
|
|
8
|
+
import Second from '../../core/Second/index.js';
|
|
9
|
+
import Speed from '../../core/Speed/index.js';
|
|
10
|
+
import { TertiaryText } from '../../core/Styled/index.js';
|
|
11
|
+
import Tooltip from '../../core/Tooltip/index.js';
|
|
12
|
+
import UnitWithChart, { UnitWrapper } from '../UnitWithChart/index.js';
|
|
13
|
+
import { formatPercent } from '../../utils/tower.js';
|
|
14
|
+
import _ from 'lodash';
|
|
15
|
+
import React__default from 'react';
|
|
16
|
+
|
|
17
|
+
const units = {
|
|
18
|
+
Percent,
|
|
19
|
+
Byte,
|
|
20
|
+
Frequency,
|
|
21
|
+
Speed,
|
|
22
|
+
Bps,
|
|
23
|
+
BitPerSecond,
|
|
24
|
+
Bit,
|
|
25
|
+
Second
|
|
26
|
+
};
|
|
27
|
+
const ChartContent = /*#__PURE__*/styled('div')({
|
|
28
|
+
name: "ChartContent",
|
|
29
|
+
class: "c18bcrac",
|
|
30
|
+
propsAsIs: false
|
|
31
|
+
});
|
|
32
|
+
const ChartTooltipContainer = /*#__PURE__*/styled('div')({
|
|
33
|
+
name: "ChartTooltipContainer",
|
|
34
|
+
class: "cro7kg2",
|
|
35
|
+
propsAsIs: false
|
|
36
|
+
});
|
|
37
|
+
const ChartTooltipRow = /*#__PURE__*/styled('div')({
|
|
38
|
+
name: "ChartTooltipRow",
|
|
39
|
+
class: "c14wcxf0",
|
|
40
|
+
propsAsIs: false
|
|
41
|
+
});
|
|
42
|
+
const _exp = () => ChartTooltipRow;
|
|
43
|
+
const ChartTooltipTitle = /*#__PURE__*/styled(_exp())({
|
|
44
|
+
name: "ChartTooltipTitle",
|
|
45
|
+
class: "coy29mj",
|
|
46
|
+
propsAsIs: true
|
|
47
|
+
});
|
|
48
|
+
const _exp2 = () => props => props.color;
|
|
49
|
+
const SpaceStatus = /*#__PURE__*/styled('i')({
|
|
50
|
+
name: "SpaceStatus",
|
|
51
|
+
class: "s11212zy",
|
|
52
|
+
propsAsIs: false,
|
|
53
|
+
vars: {
|
|
54
|
+
"s11212zy-0": [_exp2()]
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
const PrimaryUnit = /*#__PURE__*/styled('div')({
|
|
58
|
+
name: "PrimaryUnit",
|
|
59
|
+
class: "p1lyky6c",
|
|
60
|
+
propsAsIs: false
|
|
61
|
+
});
|
|
62
|
+
const ChartWithUnit = props => {
|
|
63
|
+
const {
|
|
64
|
+
items,
|
|
65
|
+
rawValue,
|
|
66
|
+
unit,
|
|
67
|
+
chartType,
|
|
68
|
+
tableUnit,
|
|
69
|
+
total
|
|
70
|
+
} = props;
|
|
71
|
+
const finalTableUnit = tableUnit != null ? tableUnit : unit;
|
|
72
|
+
const emptyDisplay = rawValue2 => {
|
|
73
|
+
if (_.isNil(rawValue2)) {
|
|
74
|
+
return /* @__PURE__ */React__default.createElement(TertiaryText, null, "-");
|
|
75
|
+
}
|
|
76
|
+
return finalTableUnit === "Percent" ?
|
|
77
|
+
// process 0.0%
|
|
78
|
+
/* @__PURE__ */
|
|
79
|
+
React__default.createElement("span", {
|
|
80
|
+
className: UnitWrapper
|
|
81
|
+
}, /* @__PURE__ */React__default.createElement(Percent, {
|
|
82
|
+
rawValue: rawValue2,
|
|
83
|
+
decimals: 1
|
|
84
|
+
})) : rawValue2;
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */React__default.createElement(ChartContent, null, rawValue || rawValue === 0 ? /* @__PURE__ */React__default.createElement(UnitWithChart, {
|
|
87
|
+
unit: finalTableUnit,
|
|
88
|
+
rawValue: chartType === "barChart" ? formatPercent(rawValue / total * 100, 1).numberValue : rawValue,
|
|
89
|
+
total,
|
|
90
|
+
chartType,
|
|
91
|
+
data: items
|
|
92
|
+
}) : emptyDisplay(rawValue));
|
|
93
|
+
};
|
|
94
|
+
const ChartWithTooltip = props => {
|
|
95
|
+
const {
|
|
96
|
+
title,
|
|
97
|
+
items,
|
|
98
|
+
rawValue,
|
|
99
|
+
unit,
|
|
100
|
+
chartType,
|
|
101
|
+
tableUnit,
|
|
102
|
+
saturated
|
|
103
|
+
} = props;
|
|
104
|
+
const KitUnit = units[unit];
|
|
105
|
+
const total = title.value || 0;
|
|
106
|
+
const finalTableUnit = tableUnit != null ? tableUnit : unit;
|
|
107
|
+
const emptyDisplay = rawValue2 => {
|
|
108
|
+
if (_.isNil(rawValue2)) {
|
|
109
|
+
return /* @__PURE__ */React__default.createElement(TertiaryText, null, "-");
|
|
110
|
+
}
|
|
111
|
+
return finalTableUnit === "Percent" ?
|
|
112
|
+
// process 0.0%
|
|
113
|
+
/* @__PURE__ */
|
|
114
|
+
React__default.createElement(Percent, {
|
|
115
|
+
rawValue: rawValue2,
|
|
116
|
+
decimals: 1
|
|
117
|
+
}) : rawValue2;
|
|
118
|
+
};
|
|
119
|
+
return /* @__PURE__ */React__default.createElement(Tooltip, {
|
|
120
|
+
title: /* @__PURE__ */React__default.createElement(ChartTooltipContainer, null, /* @__PURE__ */React__default.createElement(ChartTooltipTitle, null, /* @__PURE__ */React__default.createElement("label", null, title.label), /* @__PURE__ */React__default.createElement(KitUnit, {
|
|
121
|
+
rawValue: total
|
|
122
|
+
})), items.map(item => {
|
|
123
|
+
var _a;
|
|
124
|
+
return /* @__PURE__ */React__default.createElement(ChartTooltipRow, {
|
|
125
|
+
key: item.label
|
|
126
|
+
}, /* @__PURE__ */React__default.createElement("label", null, /* @__PURE__ */React__default.createElement(SpaceStatus, {
|
|
127
|
+
color: item.color
|
|
128
|
+
}), /* @__PURE__ */React__default.createElement("span", null, item.label)), /* @__PURE__ */React__default.createElement(PrimaryUnit, {
|
|
129
|
+
className: "value"
|
|
130
|
+
}, /* @__PURE__ */React__default.createElement(KitUnit, {
|
|
131
|
+
rawValue: item.value || 0
|
|
132
|
+
}), /* @__PURE__ */React__default.createElement("span", null, "(", total ? (item.value ? formatPercent((item.value || 0) / total * 100, 1, (_a = item.saturated) != null ? _a : true).value : 0) + "%" : "-", ")")));
|
|
133
|
+
})),
|
|
134
|
+
overlayStyle: {
|
|
135
|
+
maxWidth: 500,
|
|
136
|
+
minWidth: 246
|
|
137
|
+
}
|
|
138
|
+
}, /* @__PURE__ */React__default.createElement(ChartContent, null, total ? rawValue ? /* @__PURE__ */React__default.createElement(UnitWithChart, {
|
|
139
|
+
unit: finalTableUnit,
|
|
140
|
+
rawValue: chartType === "barChart" ? formatPercent(rawValue / total * 100, 1, saturated != null ? saturated : true).numberValue : rawValue,
|
|
141
|
+
total,
|
|
142
|
+
chartType,
|
|
143
|
+
data: items,
|
|
144
|
+
saturated
|
|
145
|
+
}) : emptyDisplay(rawValue) : emptyDisplay(null)));
|
|
146
|
+
};
|
|
147
|
+
var ChartWithTooltip$1 = ChartWithTooltip;
|
|
148
|
+
|
|
149
|
+
export { ChartWithUnit, ChartWithTooltip$1 as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React__default, { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const Counting = (props) => {
|
|
4
|
+
const { stop, interval = 1e3, render } = props;
|
|
5
|
+
const [, setState] = useState(true);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (stop)
|
|
8
|
+
return;
|
|
9
|
+
const timer = setInterval(() => {
|
|
10
|
+
setState((state) => !state);
|
|
11
|
+
}, interval);
|
|
12
|
+
return () => {
|
|
13
|
+
clearInterval(timer);
|
|
14
|
+
};
|
|
15
|
+
}, [stop, interval]);
|
|
16
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, render());
|
|
17
|
+
};
|
|
18
|
+
var Counting$1 = Counting;
|
|
19
|
+
|
|
20
|
+
export { Counting$1 as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
|
|
2
|
+
import { cx } from '@linaria/core';
|
|
3
|
+
import Calendar from '../../core/Calendar/index.js';
|
|
4
|
+
import Tooltip from '../../core/Tooltip/index.js';
|
|
5
|
+
import { Typo } from '../../core/Typo/index.js';
|
|
6
|
+
import { getCalendarTitle } from '../common/getCalendarTitle.js';
|
|
7
|
+
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
8
|
+
import { CronTime } from '../../utils/cron-time.js';
|
|
9
|
+
import dayjs from 'dayjs';
|
|
10
|
+
import moment from 'moment';
|
|
11
|
+
import React__default, { useState, useMemo } from 'react';
|
|
12
|
+
|
|
13
|
+
const CronCalendarWrapper = "clm1wy1";
|
|
14
|
+
const Title = "t1tsm00v";
|
|
15
|
+
const Control = "c167wnad";
|
|
16
|
+
const Cell = "cxhf7dh";
|
|
17
|
+
const CronCalendar = ({
|
|
18
|
+
plans
|
|
19
|
+
}) => {
|
|
20
|
+
const {
|
|
21
|
+
t,
|
|
22
|
+
i18n
|
|
23
|
+
} = useParrotTranslation();
|
|
24
|
+
const [value, setValue] = useState(moment());
|
|
25
|
+
const days = useMemo(() => {
|
|
26
|
+
const sendAt = [];
|
|
27
|
+
const lastDayOfMonth = dayjs(value.valueOf()).endOf("month");
|
|
28
|
+
for (const plan of plans) {
|
|
29
|
+
if (plan.empty) {
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
const cronTime = new CronTime(plan.expression, plan.startAt);
|
|
33
|
+
let current = cronTime["getNextDateFromWithValidation"](dayjs());
|
|
34
|
+
while (current.isBefore(lastDayOfMonth)) {
|
|
35
|
+
sendAt.push(current);
|
|
36
|
+
cronTime.setLastSendAt(current);
|
|
37
|
+
current = cronTime["getNextDateFromWithValidation"](current);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return sendAt;
|
|
41
|
+
}, [value, plans]);
|
|
42
|
+
return /* @__PURE__ */React__default.createElement("div", {
|
|
43
|
+
className: CronCalendarWrapper
|
|
44
|
+
}, /* @__PURE__ */React__default.createElement(Calendar, {
|
|
45
|
+
onChange: setValue,
|
|
46
|
+
value,
|
|
47
|
+
fullscreen: false,
|
|
48
|
+
headerRender: ({
|
|
49
|
+
value: value2,
|
|
50
|
+
onChange
|
|
51
|
+
}) => /* @__PURE__ */React__default.createElement(React__default.Fragment, null, /* @__PURE__ */React__default.createElement("div", {
|
|
52
|
+
className: cx(Title, Typo.Label.l4_bold)
|
|
53
|
+
}, t("components.generate_date_preview")), /* @__PURE__ */React__default.createElement("div", {
|
|
54
|
+
className: cx(Control, Typo.Label.l4_regular)
|
|
55
|
+
}, /* @__PURE__ */React__default.createElement(LeftOutlined, {
|
|
56
|
+
onClick: () => onChange(value2.clone().subtract(1, "month"))
|
|
57
|
+
}), t("components.date_with_year_and_month", {
|
|
58
|
+
year: value2.format("YYYY"),
|
|
59
|
+
month: getCalendarTitle(value2.format("M"), t, i18n),
|
|
60
|
+
interpolation: {
|
|
61
|
+
escapeValue: false
|
|
62
|
+
}
|
|
63
|
+
}), /* @__PURE__ */React__default.createElement(RightOutlined, {
|
|
64
|
+
onClick: () => onChange(value2.clone().add(1, "month"))
|
|
65
|
+
}))),
|
|
66
|
+
dateFullCellRender: date => {
|
|
67
|
+
const activeDays = days.filter(d => d.startOf("day").isSame(dayjs(date.valueOf()).startOf("day")));
|
|
68
|
+
return /* @__PURE__ */React__default.createElement(Tooltip, {
|
|
69
|
+
title: activeDays.length === 0 ? null : activeDays.length === 1 ?
|
|
70
|
+
// TODO pass the callback via props and remove this
|
|
71
|
+
t("components.will_generate_one_reporte_with_date_and_time", {
|
|
72
|
+
date: activeDays[0].format("YYYY/M/D"),
|
|
73
|
+
time: activeDays[0].format("HH:mm"),
|
|
74
|
+
interpolation: {
|
|
75
|
+
escapeValue: false
|
|
76
|
+
}
|
|
77
|
+
}) : /* @__PURE__ */React__default.createElement(React__default.Fragment, null, t("components.will_generate_report_will_date_and_count", {
|
|
78
|
+
date: activeDays[0].format("YYYY/M/D"),
|
|
79
|
+
count: activeDays.length,
|
|
80
|
+
interpolation: {
|
|
81
|
+
escapeValue: false
|
|
82
|
+
}
|
|
83
|
+
}), /* @__PURE__ */React__default.createElement("br", null), activeDays.map((d, idx) => /* @__PURE__ */React__default.createElement("div", {
|
|
84
|
+
key: idx
|
|
85
|
+
}, d.format("HH:mm"), /* @__PURE__ */React__default.createElement("br", null)))),
|
|
86
|
+
placement: "bottom"
|
|
87
|
+
}, /* @__PURE__ */React__default.createElement("div", {
|
|
88
|
+
className: cx(Cell, Typo.Label.l4_regular, activeDays.length > 0 && "active"),
|
|
89
|
+
title: ""
|
|
90
|
+
}, date.date(), /* @__PURE__ */React__default.createElement("div", {
|
|
91
|
+
className: "dots"
|
|
92
|
+
}, activeDays.length < 4 && activeDays.map((_, idx) => /* @__PURE__ */React__default.createElement("span", {
|
|
93
|
+
className: "dot",
|
|
94
|
+
key: idx
|
|
95
|
+
})), activeDays.length >= 4 && /* @__PURE__ */React__default.createElement("div", {
|
|
96
|
+
className: "bar"
|
|
97
|
+
}))));
|
|
98
|
+
}
|
|
99
|
+
}));
|
|
100
|
+
};
|
|
101
|
+
var CronCalendar$1 = CronCalendar;
|
|
102
|
+
|
|
103
|
+
export { CronCalendar$1 as default };
|