@cloudtower/eagle 0.31.28 → 0.32.1
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 +16 -2
- package/dist/cjs/core/ConfigProvider/index.js +1 -37
- package/dist/cjs/core/Fields/FieldsEnum/index.js +1 -1
- package/dist/cjs/core/Select/index.js +117 -106
- package/dist/cjs/core/TableForm/TableFormBodyCell.js +3 -6
- package/dist/cjs/core/TableForm/TableFormBodyRows.js +2 -7
- package/dist/cjs/core/TableForm/index.js +1 -12
- package/dist/cjs/core/TimeZoneSelect/index.js +1 -1
- package/dist/cjs/core/Tooltip/index.js +1 -4
- package/dist/cjs/core/index.js +12 -15
- package/dist/cjs/coreX/ChartWithTooltip/index.js +12 -14
- package/dist/cjs/coreX/DateRangePicker/Calendar.js +3 -4
- package/dist/cjs/coreX/DateRangePicker/index.js +2 -2
- package/dist/cjs/coreX/SummaryTable/index.js +3 -6
- package/dist/cjs/coreX/UnitWithChart/index.js +12 -14
- package/dist/cjs/index.js +239 -245
- package/dist/cjs/legacy-antd.js +133 -137
- package/dist/cjs/stats1.html +1 -1
- package/dist/cjs/utils/tower.js +0 -17
- package/dist/components.css +3150 -3348
- package/dist/esm/UIKitProvider/index.js +12 -2
- package/dist/esm/core/ConfigProvider/index.js +2 -32
- package/dist/esm/core/Fields/FieldsEnum/index.js +4 -4
- package/dist/esm/core/Select/index.js +116 -104
- package/dist/esm/core/TableForm/TableFormBodyCell.js +3 -6
- package/dist/esm/core/TableForm/TableFormBodyRows.js +2 -7
- package/dist/esm/core/TableForm/index.js +2 -13
- package/dist/esm/core/TimeZoneSelect/index.js +2 -2
- package/dist/esm/core/Tooltip/index.js +1 -4
- package/dist/esm/core/index.js +1 -3
- package/dist/esm/coreX/ChartWithTooltip/index.js +0 -2
- package/dist/esm/coreX/DateRangePicker/Calendar.js +3 -4
- package/dist/esm/coreX/DateRangePicker/index.js +3 -3
- package/dist/esm/coreX/SummaryTable/index.js +3 -6
- package/dist/esm/coreX/UnitWithChart/index.js +0 -2
- package/dist/esm/index.js +3 -6
- package/dist/esm/legacy-antd.js +0 -4
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/utils/tower.js +1 -17
- package/dist/src/UIKitProvider/UIKitProvider.stories.d.ts +2 -1
- package/dist/src/antd.d.ts +0 -1
- package/dist/src/core/ConfigProvider/index.d.ts +0 -2
- package/dist/src/core/Select/index.d.ts +0 -1
- package/dist/src/core/Select/select.type.d.ts +31 -6
- package/dist/src/core/TableForm/types.d.ts +0 -3
- package/dist/src/core/Tooltip/EllipsisTooltipContent.d.ts +1 -1
- package/dist/src/core/Tooltip/index.d.ts +1 -7
- package/dist/src/core/Tooltip/tooltip.widget.d.ts +5 -0
- package/dist/src/core/index.d.ts +2 -7
- package/dist/src/coreX/SummaryTable/index.d.ts +0 -1
- package/dist/src/coreX/UnitWithChart/index.d.ts +0 -1
- package/dist/src/spec/base.d.ts +1 -3
- package/dist/src/utils/tower.d.ts +0 -1
- package/dist/stories/docs/core/EllipsisTooltipContent.stories.d.ts +1 -1
- package/dist/stories/docs/core/{LegacySelect.Simple.stories.d.ts → Select.Simple.stories.d.ts} +3 -3
- package/dist/stories/docs/core/Tooltip.stories.d.ts +1 -3
- package/dist/style.css +3146 -3312
- package/package.json +4 -6
- package/dist/cjs/core/BytePerSecond/index.js +0 -45
- package/dist/cjs/core/LegacySelect/index.js +0 -185
- package/dist/cjs/core/LegacySelect/select.style.js +0 -5
- package/dist/cjs/core/Select/select.style.js +0 -11
- package/dist/cjs/core/Select/select.widgets.js +0 -63
- package/dist/cjs/core/Tooltip/EllipsisTooltipContent.js +0 -55
- package/dist/esm/core/BytePerSecond/index.js +0 -39
- package/dist/esm/core/LegacySelect/index.js +0 -177
- package/dist/esm/core/LegacySelect/select.style.js +0 -3
- package/dist/esm/core/Select/select.style.js +0 -6
- package/dist/esm/core/Select/select.widgets.js +0 -57
- package/dist/esm/core/Tooltip/EllipsisTooltipContent.js +0 -49
- package/dist/src/core/BytePerSecond/index.d.ts +0 -3
- package/dist/src/core/LegacySelect/index.d.ts +0 -4
- package/dist/src/core/LegacySelect/select.style.d.ts +0 -1
- package/dist/src/core/LegacySelect/select.type.d.ts +0 -31
- package/dist/src/core/Select/select.style.d.ts +0 -4
- package/dist/src/core/Select/select.widgets.d.ts +0 -7
- package/dist/stories/docs/core/BytePerSecond.stories.d.ts +0 -17
- package/dist/stories/docs/core/LegacySelect.stories.d.ts +0 -16
- package/dist/stories/docs/coreX/Calendar.stories.d.ts +0 -11
package/dist/esm/utils/tower.js
CHANGED
|
@@ -123,22 +123,6 @@ function formatBytes(bytes, decimals = 2) {
|
|
|
123
123
|
unit: units[i]
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function formatBytePerSecond(bytes, decimals = 2) {
|
|
127
|
-
if (bytes <= 0 || bytes === MAGIC_METRIC_NULL) {
|
|
128
|
-
return {
|
|
129
|
-
value: 0,
|
|
130
|
-
unit: "B/s"
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
const k = 1024;
|
|
134
|
-
const units = ["B/s", "KiB/s", "MiB/s", "GiB/s", "TiB/s", "PiB/s"];
|
|
135
|
-
let i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
136
|
-
i = i < 0 ? 0 : i > units.length - 1 ? units.length - 1 : i;
|
|
137
|
-
return {
|
|
138
|
-
value: parseFloat((bytes / Math.pow(k, i)).toFixed(decimals)),
|
|
139
|
-
unit: units[i]
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
126
|
function formatPercent(input, decimals = 2, saturated = true) {
|
|
143
127
|
if (input === MAGIC_METRIC_NULL) {
|
|
144
128
|
input = 0;
|
|
@@ -186,4 +170,4 @@ function formatSpeed(input, decimals = 0) {
|
|
|
186
170
|
};
|
|
187
171
|
}
|
|
188
172
|
|
|
189
|
-
export { DAY, HOUR, MAGIC_METRIC_NULL, MINUTE, SECOND, WEEK, formatBitPerSecond, formatBits, formatBps,
|
|
173
|
+
export { DAY, HOUR, MAGIC_METRIC_NULL, MINUTE, SECOND, WEEK, formatBitPerSecond, formatBits, formatBps, formatBytes, formatFrequency, formatPercent, formatSeconds, formatSpeed };
|
package/dist/src/antd.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { ConfigProviderProps } from "antd/lib/config-provider";
|
|
2
2
|
import { ConfigProviderProps as Antd5ConfigProviderProps } from "antd5";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import "dayjs/locale/zh-cn";
|
|
5
|
-
import "moment/locale/zh-cn";
|
|
6
4
|
export type ConfigProps = {
|
|
7
5
|
antd4Configs?: ConfigProviderProps;
|
|
8
6
|
antd5Configs?: Antd5ConfigProviderProps;
|
|
@@ -1,7 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectProps as AntdSelectProps } from "antd/lib/select";
|
|
3
|
+
import { FieldRenderProps } from "../Fields/fields.type";
|
|
4
|
+
export type KitSelectProps = {
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
error?: unknown | React.ReactNode;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
scrollBottomBuffer?: number;
|
|
10
|
+
onScrollBottom?: () => void;
|
|
11
|
+
selectLimit?: number;
|
|
12
|
+
} & AntdSelectProps<string>;
|
|
13
|
+
interface LooseFieldRenderProps<V, T extends HTMLElement> {
|
|
14
|
+
input: {
|
|
15
|
+
name?: FieldRenderProps<V, T>["input"]["name"];
|
|
16
|
+
value?: FieldRenderProps<V, T>["input"]["value"];
|
|
17
|
+
onBlur?: FieldRenderProps<V, T>["input"]["onBlur"];
|
|
18
|
+
onChange?: (value: string | string[], option: {
|
|
19
|
+
object: V;
|
|
20
|
+
} | Array<{
|
|
21
|
+
object: V;
|
|
22
|
+
}>) => void;
|
|
23
|
+
onFocus?: FieldRenderProps<V, T>["input"]["onFocus"];
|
|
24
|
+
type?: FieldRenderProps<V, T>["input"]["type"];
|
|
25
|
+
checked?: FieldRenderProps<V, T>["input"]["checked"];
|
|
26
|
+
multiple?: FieldRenderProps<V, T>["input"]["multiple"];
|
|
27
|
+
};
|
|
28
|
+
meta?: FieldRenderProps<V, T>["meta"];
|
|
29
|
+
focusIndicator?: boolean;
|
|
30
|
+
}
|
|
7
31
|
export type SelectComponentType<V = any, T extends HTMLElement = HTMLElement> = React.FunctionComponent<LooseFieldRenderProps<V, T> & KitSelectProps>;
|
|
32
|
+
export {};
|
|
@@ -117,7 +117,6 @@ export interface ColumnBodyCellProps {
|
|
|
117
117
|
getRowValidateResult: (rowData: DataType) => string | undefined;
|
|
118
118
|
validateAll: boolean;
|
|
119
119
|
error?: string | null;
|
|
120
|
-
onValidate?: (id: string, isValid: boolean) => void;
|
|
121
120
|
}
|
|
122
121
|
export type AddRowButtonProps = {
|
|
123
122
|
config: RowAddConfigurations;
|
|
@@ -141,7 +140,6 @@ export interface TableFormRowsProps extends Pick<TableFormProps, "columns" | "di
|
|
|
141
140
|
validateAll: boolean;
|
|
142
141
|
draggable?: boolean;
|
|
143
142
|
rowSplitType?: TableFormRowSplitType;
|
|
144
|
-
onValidate?: (id: string, isValid: boolean) => void;
|
|
145
143
|
}
|
|
146
144
|
export type RenderRowDescriptionProps = {
|
|
147
145
|
rowIndex: number;
|
|
@@ -256,5 +254,4 @@ export type TableFormProps = {
|
|
|
256
254
|
export type TableFormHandle = {
|
|
257
255
|
setData: (data: DataType[]) => void;
|
|
258
256
|
validateWholeFields: () => void;
|
|
259
|
-
isValid: () => boolean;
|
|
260
257
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { EllipsisContentType } from "./tooltip.type";
|
|
3
|
-
declare const EllipsisTooltipContent: React.
|
|
3
|
+
declare const EllipsisTooltipContent: ({ tooltip, maxHeight, contentWrapperClassName, ellipsisTips, }: EllipsisContentType) => React.JSX.Element;
|
|
4
4
|
export default EllipsisTooltipContent;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import EllipsisTooltipContent from "./EllipsisTooltipContent";
|
|
3
2
|
import { TooltipProps } from "./tooltip.type";
|
|
4
|
-
declare const
|
|
5
|
-
type InterTooltip = typeof InternalTooltip;
|
|
6
|
-
type CompoundedTooltip = InterTooltip & {
|
|
7
|
-
EllipsisContent: typeof EllipsisTooltipContent;
|
|
8
|
-
};
|
|
9
|
-
declare const Tooltip: CompoundedTooltip;
|
|
3
|
+
declare const Tooltip: React.FunctionComponent<TooltipProps>;
|
|
10
4
|
export default Tooltip;
|
|
11
5
|
export * from "./tooltip.type";
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -15,12 +15,10 @@ export * from "./Button";
|
|
|
15
15
|
export * from "./ButtonGroup";
|
|
16
16
|
export * from "./ButtonGroup";
|
|
17
17
|
export * from "./Byte";
|
|
18
|
-
export * from "./BytePerSecond";
|
|
19
18
|
export * from "./Calendar";
|
|
20
19
|
export * from "./Card";
|
|
21
20
|
export * from "./Cascader";
|
|
22
21
|
export * from "./Checkbox";
|
|
23
|
-
export * from "./ConfigProvider";
|
|
24
22
|
export * from "./DeprecatedProgress";
|
|
25
23
|
export * from "./DetailCard";
|
|
26
24
|
export * from "./DonutChart";
|
|
@@ -41,7 +39,6 @@ export * from "./InputNumber";
|
|
|
41
39
|
export * from "./InputPassword";
|
|
42
40
|
export * from "./InputTagItem";
|
|
43
41
|
export * from "./KitStoreProvider";
|
|
44
|
-
export * from "./LegacySelect";
|
|
45
42
|
export * from "./Link";
|
|
46
43
|
export * from "./Loading";
|
|
47
44
|
export * from "./message";
|
|
@@ -66,7 +63,6 @@ export * from "./SegmentControl";
|
|
|
66
63
|
export * from "./Select";
|
|
67
64
|
export * from "./SidebarMenu";
|
|
68
65
|
export * from "./SimplePagination";
|
|
69
|
-
export * from "./Skeleton";
|
|
70
66
|
export * from "./Space";
|
|
71
67
|
export * from "./Speed";
|
|
72
68
|
export * from "./StatusCapsule";
|
|
@@ -89,10 +85,11 @@ export * from "./Tooltip";
|
|
|
89
85
|
export * from "./Truncate";
|
|
90
86
|
export * from "./Typo";
|
|
91
87
|
export * from "./Units";
|
|
88
|
+
export * from "./ConfigProvider";
|
|
89
|
+
export * from "./Skeleton";
|
|
92
90
|
export declare const units: {
|
|
93
91
|
Percent: import("./Units").PercentFn;
|
|
94
92
|
Byte: import("./Units").UnitFn;
|
|
95
|
-
BytePerSecond: import("./Units").UnitFn;
|
|
96
93
|
Frequency: import("./Units").UnitFn;
|
|
97
94
|
Speed: import("./Units").UnitFn;
|
|
98
95
|
Bps: import("./Units").UnitFn;
|
|
@@ -115,7 +112,6 @@ export { default as Breadcrumb } from "./Breadcrumb";
|
|
|
115
112
|
export { default as Button } from "./Button";
|
|
116
113
|
export { default as ButtonGroup } from "./ButtonGroup";
|
|
117
114
|
export { default as Byte } from "./Byte";
|
|
118
|
-
export { default as BytePerSecond } from "./BytePerSecond";
|
|
119
115
|
export { default as Calendar } from "./Calendar";
|
|
120
116
|
export { default as Card } from "./Card";
|
|
121
117
|
export { default as Checkbox } from "./Checkbox";
|
|
@@ -139,7 +135,6 @@ export { default as InputNumber } from "./InputNumber";
|
|
|
139
135
|
export { default as InputPassword } from "./InputPassword";
|
|
140
136
|
export { default as InputTagItem } from "./InputTagItem";
|
|
141
137
|
export { default as KitStoreProvider } from "./KitStoreProvider";
|
|
142
|
-
export { default as LegacySelect } from "./LegacySelect";
|
|
143
138
|
export { default as Link } from "./Link";
|
|
144
139
|
export { default as Loading } from "./Loading";
|
|
145
140
|
export { default as message } from "./message";
|
package/dist/src/spec/base.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AlertComponentType, ArchComponentType, BadgeComponentType, BaseEnumProps, ButtonGroupType, ButtonProps, CalendarComponentType, CardProps, CloseButtonProps, FieldBaseProps, FieldRenderProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, IDetailCardProps, IDonutChartProps, IDropdownMenuProps, InputGroupComponentType, InputSize, IntFieldProps, ISegmentedControlProps, ISimplePaginationProps, ISpaceProps, IStepsProps, ITimeProps, ITimeZoneSelectProps,
|
|
1
|
+
import type { AlertComponentType, ArchComponentType, BadgeComponentType, BaseEnumProps, ButtonGroupType, ButtonProps, CalendarComponentType, CardProps, CloseButtonProps, FieldBaseProps, FieldRenderProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, IDetailCardProps, IDonutChartProps, IDropdownMenuProps, InputGroupComponentType, InputSize, IntFieldProps, ISegmentedControlProps, ISimplePaginationProps, ISpaceProps, IStepsProps, ITimeProps, ITimeZoneSelectProps, LinkComponentType, LoadingComponentType, MessageApi, ModalProps, PaginationProps, PercentFn, RadioButtonProps, RadioProps, SearchInputProps, SelectComponentType, StatusCapsuleComponentType, StringProps, SwitchProps, TableComponent, TableFormHandle, TableFormProps, TagComponentType, TextAreaProps, TokenComponentType, TooltipProps, TruncatePropTypes, UnitFn } from "../core";
|
|
2
2
|
import type { CronCalendarProps, CronPlanProps, DateRangePickerProps, DeprecatedIDonutChartProps, DropdownTransitionProps, GoBackButtonType, I18nNameTagType, IBatchOperation, IChartWithUnitProps, ICountingProps, ICWTProps, IUnitWithChartProps, NamesTooltipType, OverflowTooltipProps, SidebarSubtitleComponentType, SortableListComponentType, SummaryTableComponentType, SwitchWithTextProps } from "../coreX";
|
|
3
3
|
import { AutoCompleteProps } from "antd/lib/auto-complete";
|
|
4
4
|
import { BadgeProps } from "antd/lib/badge";
|
|
@@ -101,7 +101,6 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
101
101
|
error: unknown;
|
|
102
102
|
}>;
|
|
103
103
|
pagination: React.FC<PaginationProps>;
|
|
104
|
-
legacySelect: LegacySelectComponentType<V, T>;
|
|
105
104
|
select: SelectComponentType<V, T>;
|
|
106
105
|
option: OptionComponentType;
|
|
107
106
|
selectOptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
|
|
@@ -140,7 +139,6 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
140
139
|
units: {
|
|
141
140
|
Percent: PercentFn;
|
|
142
141
|
Byte: UnitFn;
|
|
143
|
-
BytePerSecond: UnitFn;
|
|
144
142
|
Frequency: UnitFn;
|
|
145
143
|
Speed: UnitFn;
|
|
146
144
|
Second: UnitFn;
|
|
@@ -47,7 +47,6 @@ export declare const GBps: number;
|
|
|
47
47
|
export declare const TBps: number;
|
|
48
48
|
export declare function formatBps(input: number, decimals?: number): FormattedResult;
|
|
49
49
|
export declare function formatBytes(bytes: number, decimals?: number): FormattedResult;
|
|
50
|
-
export declare function formatBytePerSecond(bytes: number, decimals?: number): FormattedResult;
|
|
51
50
|
export declare function formatPercent(input: number, decimals?: number, saturated?: boolean): {
|
|
52
51
|
value: string;
|
|
53
52
|
numberValue: number;
|
|
@@ -8,7 +8,7 @@ import React from "react";
|
|
|
8
8
|
* * 自定义 props 已在表格进行说明
|
|
9
9
|
*/
|
|
10
10
|
declare const meta: {
|
|
11
|
-
component:
|
|
11
|
+
component: ({ tooltip, maxHeight, contentWrapperClassName, ellipsisTips, }: import("../../../src/core/Tooltip").EllipsisContentType) => React.JSX.Element;
|
|
12
12
|
title: "Core/EllipsisTooltipContent | Tooltip content 过长省略";
|
|
13
13
|
parameters: {
|
|
14
14
|
design: {
|
package/dist/stories/docs/core/{LegacySelect.Simple.stories.d.ts → Select.Simple.stories.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Select from "../../../src/core/Select";
|
|
2
2
|
import { Meta, StoryObj } from "@storybook/react";
|
|
3
|
-
declare const meta: Meta<typeof
|
|
3
|
+
declare const meta: Meta<typeof Select>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof Select>;
|
|
6
6
|
export declare const Simple: Story;
|
|
7
7
|
export declare const Multiple: Story;
|
|
8
8
|
export declare const MultipleWithSearch: Story;
|
|
@@ -8,9 +8,7 @@ import React from "react";
|
|
|
8
8
|
*
|
|
9
9
|
*/
|
|
10
10
|
declare const meta: {
|
|
11
|
-
component: React.FunctionComponent<import("../../../src/core/Tooltip").TooltipProps
|
|
12
|
-
EllipsisContent: React.FC<import("../../../src/core/Tooltip").EllipsisContentType>;
|
|
13
|
-
};
|
|
11
|
+
component: React.FunctionComponent<import("../../../src/core/Tooltip").TooltipProps>;
|
|
14
12
|
title: "Core/Tooltip | 悬浮提示";
|
|
15
13
|
parameters: {
|
|
16
14
|
design: {
|