@cloudtower/eagle 0.32.30 → 0.32.32
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/BitPerSecond/index.js +3 -3
- package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +9 -0
- package/dist/cjs/coreX/CheckPointList/index.js +90 -0
- package/dist/cjs/coreX/InfoRowList/InfoRow.js +31 -0
- package/dist/cjs/coreX/InfoRowList/InfoRowList.js +60 -0
- package/dist/cjs/index.js +44 -39
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +4035 -3875
- package/dist/esm/core/BitPerSecond/index.js +3 -3
- package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +5 -0
- package/dist/esm/coreX/CheckPointList/index.js +83 -0
- package/dist/esm/coreX/InfoRowList/InfoRow.js +25 -0
- package/dist/esm/coreX/InfoRowList/InfoRowList.js +54 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/src/core/Alert/alert.type.d.ts +5 -4
- package/dist/src/core/BitPerSecond/index.d.ts +2 -2
- package/dist/src/coreX/CheckPointList/checkpointlist.style.d.ts +3 -0
- package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +93 -0
- package/dist/src/coreX/CheckPointList/index.d.ts +8 -0
- package/dist/src/coreX/InfoRowList/InfoRow.d.ts +7 -0
- package/dist/src/coreX/InfoRowList/InfoRowList.d.ts +3 -0
- package/dist/src/coreX/InfoRowList/InfoRowList.type.d.ts +63 -0
- package/dist/src/coreX/InfoRowList/index.d.ts +1 -0
- package/dist/src/coreX/index.d.ts +5 -3
- package/dist/stories/docs/coreX/CheckPointList.stories.d.ts +67 -0
- package/dist/stories/docs/coreX/InfoRowList.stories.d.ts +36 -0
- package/dist/style.css +4021 -3883
- package/package.json +4 -4
|
@@ -21,7 +21,7 @@ var __spreadValues = (a, b) => {
|
|
|
21
21
|
}
|
|
22
22
|
return a;
|
|
23
23
|
};
|
|
24
|
-
const
|
|
24
|
+
const BitPerSecond = ({
|
|
25
25
|
rawValue,
|
|
26
26
|
decimals,
|
|
27
27
|
valueClassName,
|
|
@@ -34,6 +34,6 @@ const BitPerSeconds = ({
|
|
|
34
34
|
const { value, unit } = formatBitPerSecond(rawValue, decimals);
|
|
35
35
|
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", UnitStyle, unitClassName) }, ` ${unit}`));
|
|
36
36
|
};
|
|
37
|
-
var BitPerSecond =
|
|
37
|
+
var BitPerSecond$1 = BitPerSecond;
|
|
38
38
|
|
|
39
|
-
export { BitPerSecond as default };
|
|
39
|
+
export { BitPerSecond$1 as default };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React__default, { useState, useCallback } from 'react';
|
|
2
|
+
import useParrotTranslation from '../../hooks/useParrotTranslation.js';
|
|
3
|
+
import { XmarkFailedSeriousWarningFill16RedIcon, CheckmarkDoneSuccessCircleFill16GreenIcon, Loading16GradientBlueIcon, NoticeTriangleFill16YellowIcon } from '@cloudtower/icons-react';
|
|
4
|
+
import { List } from 'antd5';
|
|
5
|
+
import { cx } from '@linaria/core';
|
|
6
|
+
import { CheckPointItemStyle, CheckPointListStyle, EmptyWrapper } from './checkpointlist.style.js';
|
|
7
|
+
import { Show } from '../Show/index.js';
|
|
8
|
+
import Icon from '../../core/Icon/index.js';
|
|
9
|
+
import { Typo } from '../../core/Typo/index.js';
|
|
10
|
+
import Tag from '../../core/Tag/index.js';
|
|
11
|
+
import Alert from '../../core/Alert/index.js';
|
|
12
|
+
import Switch from '../../core/Switch/index.js';
|
|
13
|
+
|
|
14
|
+
var __defProp = Object.defineProperty;
|
|
15
|
+
var __defProps = Object.defineProperties;
|
|
16
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
17
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
18
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
20
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21
|
+
var __spreadValues = (a, b) => {
|
|
22
|
+
for (var prop in b || (b = {}))
|
|
23
|
+
if (__hasOwnProp.call(b, prop))
|
|
24
|
+
__defNormalProp(a, prop, b[prop]);
|
|
25
|
+
if (__getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
27
|
+
if (__propIsEnum.call(b, prop))
|
|
28
|
+
__defNormalProp(a, prop, b[prop]);
|
|
29
|
+
}
|
|
30
|
+
return a;
|
|
31
|
+
};
|
|
32
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
33
|
+
const CheckPointItem = ({
|
|
34
|
+
description,
|
|
35
|
+
status,
|
|
36
|
+
key,
|
|
37
|
+
tagProps,
|
|
38
|
+
alertProps
|
|
39
|
+
}) => {
|
|
40
|
+
const icon = {
|
|
41
|
+
failed: XmarkFailedSeriousWarningFill16RedIcon,
|
|
42
|
+
success: CheckmarkDoneSuccessCircleFill16GreenIcon,
|
|
43
|
+
loading: Loading16GradientBlueIcon,
|
|
44
|
+
warning: NoticeTriangleFill16YellowIcon
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(List.Item, { className: cx(CheckPointItemStyle), key }, /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(icon) }, /* @__PURE__ */ React__default.createElement(
|
|
47
|
+
Icon,
|
|
48
|
+
{
|
|
49
|
+
src: icon[status],
|
|
50
|
+
className: "icon-wrapper",
|
|
51
|
+
isRotate: status === "loading"
|
|
52
|
+
}
|
|
53
|
+
)), /* @__PURE__ */ React__default.createElement("span", { className: cx(Typo.Label.l4_regular, "description") }, description), /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(tagProps) }, /* @__PURE__ */ React__default.createElement(Tag, __spreadValues({}, tagProps)))), /* @__PURE__ */ React__default.createElement(Show, { condition: Boolean(alertProps) }, /* @__PURE__ */ React__default.createElement(Alert, __spreadValues({ showIcon: false }, alertProps))));
|
|
54
|
+
};
|
|
55
|
+
const CheckPointList = ({
|
|
56
|
+
items = [],
|
|
57
|
+
showSwitchControl = true,
|
|
58
|
+
title,
|
|
59
|
+
switchText,
|
|
60
|
+
emptyRender,
|
|
61
|
+
emptyText,
|
|
62
|
+
emptyTextClassName,
|
|
63
|
+
onClickSwitch
|
|
64
|
+
}) => {
|
|
65
|
+
const { t } = useParrotTranslation();
|
|
66
|
+
const [checked, setChecked] = useState(false);
|
|
67
|
+
const onClickSwitchFn = useCallback(() => {
|
|
68
|
+
const nextChecked = !checked;
|
|
69
|
+
setChecked(nextChecked);
|
|
70
|
+
onClickSwitch == null ? void 0 : onClickSwitch(checked);
|
|
71
|
+
}, [onClickSwitch, checked]);
|
|
72
|
+
const isEmpty = !items.length;
|
|
73
|
+
return /* @__PURE__ */ React__default.createElement("div", { className: cx(CheckPointListStyle) }, /* @__PURE__ */ React__default.createElement("header", { className: cx(Typo.Label.l4_bold) }, title, /* @__PURE__ */ React__default.createElement(Show, { condition: showSwitchControl }, /* @__PURE__ */ React__default.createElement("span", { className: "switch-text" }, /* @__PURE__ */ React__default.createElement(Switch, { checked, onChange: onClickSwitchFn, size: "small" }), /* @__PURE__ */ React__default.createElement("span", null, switchText || t("common.show_unpassed"))))), /* @__PURE__ */ React__default.createElement(
|
|
74
|
+
Show,
|
|
75
|
+
{
|
|
76
|
+
condition: isEmpty,
|
|
77
|
+
fallback: /* @__PURE__ */ React__default.createElement(List, { split: false, bordered: false }, items.map((item, index) => /* @__PURE__ */ React__default.createElement(CheckPointItem, __spreadProps(__spreadValues({}, item), { key: `checklist-item-${index}` }))))
|
|
78
|
+
},
|
|
79
|
+
emptyRender ? emptyRender(emptyText) : /* @__PURE__ */ React__default.createElement("div", { className: cx(EmptyWrapper, emptyTextClassName) }, emptyText)
|
|
80
|
+
));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
export { CheckPointItem, CheckPointList };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { styled } from '@linaria/react';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
const InfoRow = ({
|
|
5
|
+
label,
|
|
6
|
+
content,
|
|
7
|
+
className,
|
|
8
|
+
onClick
|
|
9
|
+
}) => {
|
|
10
|
+
return /* @__PURE__ */React__default.createElement(Col, {
|
|
11
|
+
className,
|
|
12
|
+
onClick
|
|
13
|
+
}, /* @__PURE__ */React__default.createElement("div", {
|
|
14
|
+
className: "col-label"
|
|
15
|
+
}, label), /* @__PURE__ */React__default.createElement("div", {
|
|
16
|
+
className: "col-content"
|
|
17
|
+
}, content));
|
|
18
|
+
};
|
|
19
|
+
const Col = /*#__PURE__*/styled('div')({
|
|
20
|
+
name: "Col",
|
|
21
|
+
class: "E_c14ouk5o",
|
|
22
|
+
propsAsIs: false
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export { InfoRow };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cx } from '@linaria/core';
|
|
2
|
+
import { styled } from '@linaria/react';
|
|
3
|
+
import Loading from '../../core/Loading/index.js';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import { InfoRow } from './InfoRow.js';
|
|
6
|
+
|
|
7
|
+
const InfoListRowStyle = "E_i5w779o";
|
|
8
|
+
const LooseStyle = "E_l18dja44";
|
|
9
|
+
const ContentWrapper = /*#__PURE__*/styled('div')({
|
|
10
|
+
name: "ContentWrapper",
|
|
11
|
+
class: "E_c8c2hys",
|
|
12
|
+
propsAsIs: false
|
|
13
|
+
});
|
|
14
|
+
const NullText = /*#__PURE__*/styled('div')({
|
|
15
|
+
name: "NullText",
|
|
16
|
+
class: "E_n4m6c4d",
|
|
17
|
+
propsAsIs: false
|
|
18
|
+
});
|
|
19
|
+
const InfoRowList = React__default.forwardRef(function InfoList(props, ref) {
|
|
20
|
+
const {
|
|
21
|
+
loading,
|
|
22
|
+
data,
|
|
23
|
+
className,
|
|
24
|
+
rowClassName,
|
|
25
|
+
compact
|
|
26
|
+
} = props;
|
|
27
|
+
if (loading) {
|
|
28
|
+
return /* @__PURE__ */React__default.createElement("div", {
|
|
29
|
+
ref,
|
|
30
|
+
className
|
|
31
|
+
}, /* @__PURE__ */React__default.createElement(Loading, null));
|
|
32
|
+
}
|
|
33
|
+
return /* @__PURE__ */React__default.createElement("div", {
|
|
34
|
+
ref,
|
|
35
|
+
className
|
|
36
|
+
}, data.map(item => {
|
|
37
|
+
const {
|
|
38
|
+
key,
|
|
39
|
+
value,
|
|
40
|
+
name,
|
|
41
|
+
action,
|
|
42
|
+
hidden
|
|
43
|
+
} = item;
|
|
44
|
+
if (hidden) return null;
|
|
45
|
+
return /* @__PURE__ */React__default.createElement(InfoRow, {
|
|
46
|
+
key,
|
|
47
|
+
className: cx(compact ? "" : LooseStyle, InfoListRowStyle, rowClassName),
|
|
48
|
+
label: /* @__PURE__ */React__default.createElement("div", null, name || key),
|
|
49
|
+
content: /* @__PURE__ */React__default.createElement(ContentWrapper, null, value || /* @__PURE__ */React__default.createElement(NullText, null, "-"), action)
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
export { InfoRowList };
|
package/dist/esm/index.js
CHANGED
|
@@ -111,6 +111,7 @@ export { Typo } from './core/Typo/index.js';
|
|
|
111
111
|
export { default as BarChart, getWidth } from './coreX/BarChart/index.js';
|
|
112
112
|
export { default as BatchOperation, renderBatchOperationMenuItem } from './coreX/BatchOperation/index.js';
|
|
113
113
|
export { default as ChartWithTooltip, ChartWithUnit } from './coreX/ChartWithTooltip/index.js';
|
|
114
|
+
export { default as CircleLoading } from './coreX/CircleLoading/index.js';
|
|
114
115
|
export { default as Counting } from './coreX/Counting/index.js';
|
|
115
116
|
export { default as CronCalendar } from './coreX/CronCalendar/index.js';
|
|
116
117
|
export { default as CronPlan, stringifyPlan } from './coreX/CronPlan/index.js';
|
|
@@ -128,13 +129,14 @@ export { default as SummaryTable, SummaryTableRow } from './coreX/SummaryTable/i
|
|
|
128
129
|
export { default as SwitchWithText } from './coreX/SwitchWithText/index.js';
|
|
129
130
|
export { default as TabMenu } from './coreX/TabMenu/index.js';
|
|
130
131
|
export { default as UnitWithChart, UnitWrapper } from './coreX/UnitWithChart/index.js';
|
|
131
|
-
export { default as CircleLoading } from './coreX/CircleLoading/index.js';
|
|
132
132
|
export { getCalendarTitle } from './coreX/common/getCalendarTitle.js';
|
|
133
133
|
export { default as AbsoluteDate } from './coreX/DateRangePicker/AbsoluteDate.js';
|
|
134
134
|
export { default as DateRangePickerCalendar } from './coreX/DateRangePicker/Calendar.js';
|
|
135
135
|
export { default as InputTime } from './coreX/DateRangePicker/InputTime.js';
|
|
136
136
|
export { default as RelativeTime } from './coreX/DateRangePicker/RelativeTime.js';
|
|
137
|
+
export { InfoRowList } from './coreX/InfoRowList/InfoRowList.js';
|
|
137
138
|
export { Show } from './coreX/Show/index.js';
|
|
139
|
+
export { CheckPointItem, CheckPointList } from './coreX/CheckPointList/index.js';
|
|
138
140
|
export { Animation, Keyframes } from './styles/token/animation.js';
|
|
139
141
|
export { Color } from './styles/token/color.js';
|
|
140
142
|
export { zIndices } from './styles/token/zIndices.js';
|