@cloudtower/eagle 0.35.9 → 481.0.3
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/Cascader/cascader.widget.js +12 -12
- package/dist/cjs/core/MediumDialog/MediumDialog.js +1 -1
- package/dist/cjs/core/SearchInput/SearchInput.hook.js +124 -0
- package/dist/cjs/core/SearchInput/SearchInput.js +253 -0
- package/dist/cjs/core/SearchInput/SearchInput.style.js +13 -0
- package/dist/cjs/core/index.js +12 -15
- package/dist/cjs/coreX/Dialogs/RejectDialog/RejectDialog.js +4 -16
- package/dist/cjs/index.js +245 -253
- package/dist/cjs/legacy-antd.js +89 -89
- package/dist/cjs/stats1.html +1 -1
- package/dist/components.css +2423 -2578
- package/dist/esm/core/Cascader/cascader.widget.js +1 -1
- package/dist/esm/core/MediumDialog/MediumDialog.js +1 -1
- package/dist/esm/core/SearchInput/SearchInput.hook.js +117 -0
- package/dist/esm/core/SearchInput/SearchInput.js +247 -0
- package/dist/esm/core/SearchInput/SearchInput.style.js +7 -0
- package/dist/esm/core/index.js +2 -4
- package/dist/esm/coreX/Dialogs/RejectDialog/RejectDialog.js +4 -16
- package/dist/esm/index.js +1 -5
- package/dist/esm/legacy-antd.js +1 -1
- package/dist/esm/stats1.html +1 -1
- package/dist/linaria.merged.scss +3680 -3841
- package/dist/src/core/Cascader/cascader.type.d.ts +1 -1
- package/dist/src/core/SearchInput/SearchInput.d.ts +2 -0
- package/dist/src/core/SearchInput/SearchInput.hook.d.ts +9 -0
- package/dist/src/core/SearchInput/SearchInput.style.d.ts +5 -0
- package/dist/src/core/SearchInput/{searchInput.type.d.ts → SearchInput.type.d.ts} +18 -2
- package/dist/src/core/SearchInput/index.d.ts +2 -4
- package/dist/src/core/index.d.ts +0 -6
- package/dist/src/coreX/Dialogs/RejectDialog/RejectDialog.type.d.ts +1 -5
- package/dist/src/coreX/index.d.ts +0 -3
- package/dist/src/hooks/index.d.ts +0 -1
- package/dist/src/utils/index.d.ts +0 -1
- package/dist/stories/docs/core/SearchInput.stories.d.ts +6 -1
- package/dist/stories/docs/coreX/Dialogs/RejectDialog.stories.d.ts +1 -3
- package/dist/style.css +2423 -2578
- package/package.json +4 -6
- package/dist/cjs/core/Duration/index.js +0 -78
- package/dist/cjs/core/LocalUpload/LocalUpload.hooks.js +0 -66
- package/dist/cjs/core/LocalUpload/LocalUpload.js +0 -103
- package/dist/cjs/core/LocalUpload/LocalUpload.style.js +0 -13
- package/dist/cjs/core/LocalUpload/LocalUpload.widget.js +0 -379
- package/dist/cjs/core/SearchInput/index.js +0 -164
- package/dist/cjs/coreX/Copy/CopyButton.js +0 -40
- package/dist/cjs/coreX/Copy/CopyTooltip.js +0 -66
- package/dist/cjs/hooks/useFormatDuration.js +0 -35
- package/dist/cjs/utils/formatDuration.js +0 -67
- package/dist/esm/core/Duration/index.js +0 -72
- package/dist/esm/core/LocalUpload/LocalUpload.hooks.js +0 -63
- package/dist/esm/core/LocalUpload/LocalUpload.js +0 -97
- package/dist/esm/core/LocalUpload/LocalUpload.style.js +0 -10
- package/dist/esm/core/LocalUpload/LocalUpload.widget.js +0 -365
- package/dist/esm/core/SearchInput/index.js +0 -157
- package/dist/esm/coreX/Copy/CopyButton.js +0 -34
- package/dist/esm/coreX/Copy/CopyTooltip.js +0 -59
- package/dist/esm/hooks/useFormatDuration.js +0 -33
- package/dist/esm/utils/formatDuration.js +0 -65
- package/dist/src/core/Duration/duration.type.d.ts +0 -42
- package/dist/src/core/Duration/index.d.ts +0 -4
- package/dist/src/core/LocalUpload/LocalUpload.d.ts +0 -15
- package/dist/src/core/LocalUpload/LocalUpload.hooks.d.ts +0 -32
- package/dist/src/core/LocalUpload/LocalUpload.style.d.ts +0 -3
- package/dist/src/core/LocalUpload/LocalUpload.type.d.ts +0 -175
- package/dist/src/core/LocalUpload/LocalUpload.widget.d.ts +0 -23
- package/dist/src/core/LocalUpload/index.d.ts +0 -2
- package/dist/src/coreX/Copy/CopyButton.d.ts +0 -5
- package/dist/src/coreX/Copy/CopyButton.type.d.ts +0 -8
- package/dist/src/coreX/Copy/CopyTooltip.d.ts +0 -5
- package/dist/src/coreX/Copy/CopyTooltip.typs.d.ts +0 -16
- package/dist/src/coreX/Copy/index.d.ts +0 -2
- package/dist/src/hooks/useFormatDuration.d.ts +0 -31
- package/dist/src/utils/__test__/formatDuration.spec.d.ts +0 -1
- package/dist/src/utils/formatDuration.d.ts +0 -28
- package/dist/stories/docs/core/Duration.stories.d.ts +0 -88
- package/dist/stories/docs/core/LocalUpload.stories.d.ts +0 -74
- package/dist/stories/docs/coreX/Copy/CopyButton.stories.d.ts +0 -66
- package/dist/stories/docs/coreX/Copy/CopyTooltip.stories.d.ts +0 -66
- /package/dist/src/{hooks/__tests__/useFormatDuration.test.d.ts → core/SearchInput/__test__/SearchInput.hook.test.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { CascaderProps as Antd5CascaderProps } from "antd5/lib/cascader";
|
|
3
|
-
import { SearchInputProps } from "../SearchInput
|
|
3
|
+
import { SearchInputProps } from "../SearchInput";
|
|
4
4
|
export type { Antd5SizeType } from "../../utils/type";
|
|
5
5
|
export type PresetCascaderRenderProps = {
|
|
6
6
|
menus: Parameters<NonNullable<CascaderProps["dropdownRender"]>>[0];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type DebouncedFunc } from "lodash";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import type { SearchInputProps } from "./SearchInput.type";
|
|
4
|
+
export declare const searchInputRecentSearchLocalStorageKey = "search-input-recent-search";
|
|
5
|
+
export declare const useRecentSearch: (recentSearchLocalStorageKey: SearchInputProps["recentSearchLocalStorageKey"], maxRecentCount: number, setValue: React.Dispatch<React.SetStateAction<string>>, onChange: SearchInputProps["onChange"]) => {
|
|
6
|
+
recentSearchKeys: string[];
|
|
7
|
+
setRecentSearchKeysDebounceRef: React.MutableRefObject<DebouncedFunc<(val: string) => void> | undefined>;
|
|
8
|
+
antd5DropdownMenu: import("antd5").MenuProps | undefined;
|
|
9
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const SearchInputStyles: import("@linaria/core").LinariaClassName;
|
|
2
|
+
export declare const CountTextStyles: import("@linaria/core").LinariaClassName;
|
|
3
|
+
export declare const IconContainerStyles: import("@linaria/core").LinariaClassName;
|
|
4
|
+
export declare const DisabledIconStyles: import("@linaria/core").LinariaClassName;
|
|
5
|
+
export declare const SearchInputDropdownStyles: import("@linaria/core").LinariaClassName;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { InputProps } from "antd/lib/input";
|
|
3
3
|
import { SrcType } from "../BaseIcon";
|
|
4
|
-
export type SearchInputProps = Omit<InputProps, "onChange"> & {
|
|
4
|
+
export type SearchInputProps = Omit<InputProps, "value" | "onChange"> & {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 配置 value 时,需把 debounceWait 设置为 0 ,否则输入时会有卡顿的问题
|
|
7
|
+
*/
|
|
8
|
+
value?: InputProps["value"];
|
|
9
|
+
/**
|
|
10
|
+
* 防抖延迟的时间,单位为毫秒,默认为 300ms
|
|
7
11
|
*/
|
|
8
12
|
debounceWait?: number;
|
|
9
13
|
/**
|
|
@@ -59,5 +63,17 @@ export type SearchInputProps = Omit<InputProps, "onChange"> & {
|
|
|
59
63
|
* 搜索框高度,默认为 276
|
|
60
64
|
*/
|
|
61
65
|
width?: number | string;
|
|
66
|
+
/**
|
|
67
|
+
* 是否开启最近搜索功能
|
|
68
|
+
*/
|
|
69
|
+
enableRecentSearch?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* 最近搜索的本地存储键
|
|
72
|
+
*/
|
|
73
|
+
recentSearchLocalStorageKey?: string;
|
|
74
|
+
/**
|
|
75
|
+
* 最多展示多少条最新的搜索记录,默认 5 条
|
|
76
|
+
*/
|
|
77
|
+
maxRecentCount?: number;
|
|
62
78
|
};
|
|
63
79
|
export type SearchInputComponentType = React.FC<SearchInputProps>;
|
package/dist/src/core/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export * from "./AccordionCard";
|
|
3
2
|
export * from "./Alert";
|
|
4
3
|
export * from "./Antd5Anchor";
|
|
@@ -29,7 +28,6 @@ export * from "./DeprecatedProgress";
|
|
|
29
28
|
export * from "./DetailCard";
|
|
30
29
|
export * from "./DonutChart";
|
|
31
30
|
export * from "./DropdownMenu";
|
|
32
|
-
export * from "./Duration";
|
|
33
31
|
export * from "./Empty";
|
|
34
32
|
export * from "./ErrorBoundary";
|
|
35
33
|
export * from "./ExpandableList";
|
|
@@ -53,7 +51,6 @@ export * from "./Legend";
|
|
|
53
51
|
export * from "./LineChart";
|
|
54
52
|
export * from "./Link";
|
|
55
53
|
export * from "./Loading";
|
|
56
|
-
export * from "./LocalUpload";
|
|
57
54
|
export * from "./MediumDialog";
|
|
58
55
|
export * from "./message";
|
|
59
56
|
export * from "./message-group";
|
|
@@ -105,7 +102,6 @@ export declare const units: {
|
|
|
105
102
|
BitPerSecond: import("./Units").UnitFn;
|
|
106
103
|
Bit: import("./Units").UnitFn;
|
|
107
104
|
Second: import("./Units").UnitFn;
|
|
108
|
-
Duration: import("react").FC<import("./Duration/duration.type").DurationProps>;
|
|
109
105
|
};
|
|
110
106
|
export { units as Units };
|
|
111
107
|
export { default as AccordionCard } from "./AccordionCard";
|
|
@@ -131,7 +127,6 @@ export { default as DeprecatedProgress } from "./DeprecatedProgress";
|
|
|
131
127
|
export { default as DetailCard } from "./DetailCard";
|
|
132
128
|
export { default as DonutChart } from "./DonutChart";
|
|
133
129
|
export { default as DropdownMenu } from "./DropdownMenu";
|
|
134
|
-
export { default as Duration } from "./Duration";
|
|
135
130
|
export { default as Empty } from "./Empty";
|
|
136
131
|
export { default as Error } from "./Error";
|
|
137
132
|
export { default as ErrorBoundary } from "./ErrorBoundary";
|
|
@@ -162,7 +157,6 @@ export { default as Overflow } from "./Overflow";
|
|
|
162
157
|
export { default as Pagination } from "./Pagination";
|
|
163
158
|
export { default as Percent } from "./Percent";
|
|
164
159
|
export { default as Radio } from "./Radio";
|
|
165
|
-
export { default as SearchInput } from "./SearchInput";
|
|
166
160
|
export { default as Second } from "./Second";
|
|
167
161
|
export { default as SegmentControl } from "./SegmentControl";
|
|
168
162
|
export { default as Select } from "./Select";
|
|
@@ -33,11 +33,7 @@ interface SingleRejectDialogProps extends BaseRejectDialogProps {
|
|
|
33
33
|
/** 拒绝原因,可以是单个字符串或字符串数组 */
|
|
34
34
|
content: string | string[];
|
|
35
35
|
/** 列表类型 */
|
|
36
|
-
listType?: "ordered" | "unordered"
|
|
37
|
-
/** 灰色的进一步描述 */
|
|
38
|
-
secondaryDesc?: React.ReactNode;
|
|
39
|
-
/** 资源图标 */
|
|
40
|
-
resourceIcon?: React.ReactNode;
|
|
36
|
+
listType?: "ordered" | "unordered";
|
|
41
37
|
}
|
|
42
38
|
interface MultiAllRejectDialogProps extends BaseRejectDialogProps {
|
|
43
39
|
type: RejectDialogType.All;
|
|
@@ -4,7 +4,6 @@ export * from "./ChartWithTooltip";
|
|
|
4
4
|
export * from "./CheckPointList";
|
|
5
5
|
export * from "./CircleLoading";
|
|
6
6
|
export * from "./common";
|
|
7
|
-
export * from "./Copy";
|
|
8
7
|
export * from "./Counting";
|
|
9
8
|
export * from "./CronCalendar";
|
|
10
9
|
export * from "./CronPlan";
|
|
@@ -31,8 +30,6 @@ export { default as BarChart } from "./BarChart";
|
|
|
31
30
|
export { default as BatchOperation } from "./BatchOperation";
|
|
32
31
|
export { default as ChartWithTooltip } from "./ChartWithTooltip";
|
|
33
32
|
export { default as CircleLoading } from "./CircleLoading";
|
|
34
|
-
export { default as CopyButton } from "./Copy/CopyButton";
|
|
35
|
-
export { default as CopyTooltip } from "./Copy/CopyTooltip";
|
|
36
33
|
export { default as Counting } from "./Counting";
|
|
37
34
|
export { default as CronCalendar } from "./CronCalendar";
|
|
38
35
|
export { default as CronPlan } from "./CronPlan";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import SearchInput from "../../../src/core/SearchInput";
|
|
1
|
+
import { SearchInput } from "../../../src/core/SearchInput";
|
|
2
2
|
import type { StoryObj } from "@storybook/react";
|
|
3
3
|
/**
|
|
4
4
|
* * tower legacy 组件, 带 debounce 的搜索框
|
|
@@ -45,3 +45,8 @@ export declare const withTotal: Story;
|
|
|
45
45
|
* 展示如何使用 current prop 控制搜索项目的当前索引
|
|
46
46
|
*/
|
|
47
47
|
export declare const ExternallyControlled: Story;
|
|
48
|
+
/**
|
|
49
|
+
* 带最近搜索的示例
|
|
50
|
+
* 展示如何使用 enableRecentSearch prop 启用最近搜索功能
|
|
51
|
+
*/
|
|
52
|
+
export declare const withRecentSearch: Story;
|
|
@@ -11,9 +11,7 @@ declare const meta: {
|
|
|
11
11
|
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, {
|
|
12
12
|
type: RejectDialogType.Single;
|
|
13
13
|
content: string | string[];
|
|
14
|
-
listType?: "
|
|
15
|
-
secondaryDesc?: React.ReactNode;
|
|
16
|
-
resourceIcon?: React.ReactNode;
|
|
14
|
+
listType?: "ordered" | "unordered" | undefined;
|
|
17
15
|
title: React.ReactNode;
|
|
18
16
|
beforeDescription?: React.ReactNode;
|
|
19
17
|
description?: React.ReactNode;
|