@cloudtower/eagle 0.31.9 → 0.32.0
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/index.js +12 -15
- package/dist/cjs/coreX/ChartWithTooltip/index.js +12 -14
- package/dist/cjs/coreX/UnitWithChart/index.js +12 -14
- package/dist/cjs/index.js +237 -239
- package/dist/cjs/legacy-antd.js +109 -111
- package/dist/cjs/stats1.html +1 -1
- package/dist/cjs/utils/tower.js +0 -17
- package/dist/components.css +1017 -1034
- package/dist/esm/core/index.js +1 -3
- package/dist/esm/coreX/ChartWithTooltip/index.js +0 -2
- package/dist/esm/coreX/UnitWithChart/index.js +0 -2
- package/dist/esm/index.js +0 -1
- package/dist/esm/legacy-antd.js +0 -2
- package/dist/esm/stats1.html +1 -1
- package/dist/esm/utils/tower.js +1 -17
- package/dist/src/core/Tooltip/index.d.ts +0 -1
- package/dist/src/core/index.d.ts +0 -3
- package/dist/src/coreX/UnitWithChart/index.d.ts +0 -1
- package/dist/src/spec/base.d.ts +0 -1
- package/dist/src/utils/tower.d.ts +0 -1
- package/dist/style.css +938 -953
- package/package.json +4 -4
- package/dist/cjs/core/BytePerSecond/index.js +0 -45
- package/dist/esm/core/BytePerSecond/index.js +0 -39
- package/dist/src/core/BytePerSecond/index.d.ts +0 -3
- package/dist/stories/docs/core/BytePerSecond.stories.d.ts +0 -17
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/core/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ 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";
|
|
@@ -91,7 +90,6 @@ export * from "./Skeleton";
|
|
|
91
90
|
export declare const units: {
|
|
92
91
|
Percent: import("./Units").PercentFn;
|
|
93
92
|
Byte: import("./Units").UnitFn;
|
|
94
|
-
BytePerSecond: import("./Units").UnitFn;
|
|
95
93
|
Frequency: import("./Units").UnitFn;
|
|
96
94
|
Speed: import("./Units").UnitFn;
|
|
97
95
|
Bps: import("./Units").UnitFn;
|
|
@@ -114,7 +112,6 @@ export { default as Breadcrumb } from "./Breadcrumb";
|
|
|
114
112
|
export { default as Button } from "./Button";
|
|
115
113
|
export { default as ButtonGroup } from "./ButtonGroup";
|
|
116
114
|
export { default as Byte } from "./Byte";
|
|
117
|
-
export { default as BytePerSecond } from "./BytePerSecond";
|
|
118
115
|
export { default as Calendar } from "./Calendar";
|
|
119
116
|
export { default as Card } from "./Card";
|
|
120
117
|
export { default as Checkbox } from "./Checkbox";
|
package/dist/src/spec/base.d.ts
CHANGED
|
@@ -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;
|