@cloudtower/eagle 0.33.1 → 0.33.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.
Files changed (78) hide show
  1. package/dist/cjs/antd.js +6 -6
  2. package/dist/cjs/core/BitPerSecond/index.js +3 -3
  3. package/dist/cjs/core/KitStoreProvider/index.js +10 -0
  4. package/dist/cjs/core/Modal/index.js +53 -42
  5. package/dist/cjs/core/ModalStack/index.js +6 -0
  6. package/dist/cjs/core/Progress/progress.widgets.js +2 -5
  7. package/dist/cjs/core/SearchInput/index.js +21 -11
  8. package/dist/cjs/core/Timeline/Timeline.style.js +13 -0
  9. package/dist/cjs/core/Timeline/Timeline.widget.js +114 -0
  10. package/dist/cjs/core/Timeline/index.js +122 -0
  11. package/dist/cjs/coreX/CheckPointList/checkpointlist.style.js +9 -0
  12. package/dist/cjs/coreX/CheckPointList/index.js +90 -0
  13. package/dist/cjs/coreX/DateRangePicker/common.js +7 -5
  14. package/dist/cjs/coreX/DateRangePicker/index.js +10 -5
  15. package/dist/cjs/coreX/InfoRowList/InfoRow.js +31 -0
  16. package/dist/cjs/coreX/InfoRowList/InfoRowList.js +60 -0
  17. package/dist/cjs/coreX/Show/index.js +20 -0
  18. package/dist/cjs/index.js +122 -112
  19. package/dist/cjs/stats1.html +1 -1
  20. package/dist/cjs/store/modal.js +3 -0
  21. package/dist/cjs/utils/constants.js +11 -0
  22. package/dist/components.css +3326 -3077
  23. package/dist/esm/antd.js +3 -3
  24. package/dist/esm/core/BitPerSecond/index.js +3 -3
  25. package/dist/esm/core/KitStoreProvider/index.js +10 -1
  26. package/dist/esm/core/Modal/index.js +53 -42
  27. package/dist/esm/core/ModalStack/index.js +7 -1
  28. package/dist/esm/core/Progress/progress.widgets.js +1 -4
  29. package/dist/esm/core/SearchInput/index.js +21 -11
  30. package/dist/esm/core/Timeline/Timeline.style.js +7 -0
  31. package/dist/esm/core/Timeline/Timeline.widget.js +107 -0
  32. package/dist/esm/core/Timeline/index.js +115 -0
  33. package/dist/esm/coreX/CheckPointList/checkpointlist.style.js +5 -0
  34. package/dist/esm/coreX/CheckPointList/index.js +83 -0
  35. package/dist/esm/coreX/DateRangePicker/common.js +7 -5
  36. package/dist/esm/coreX/DateRangePicker/index.js +10 -5
  37. package/dist/esm/coreX/InfoRowList/InfoRow.js +25 -0
  38. package/dist/esm/coreX/InfoRowList/InfoRowList.js +54 -0
  39. package/dist/esm/coreX/Show/index.js +14 -0
  40. package/dist/esm/index.js +8 -4
  41. package/dist/esm/stats1.html +1 -1
  42. package/dist/esm/store/modal.js +3 -0
  43. package/dist/esm/utils/constants.js +7 -1
  44. package/dist/src/antd.d.ts +2 -2
  45. package/dist/src/core/Alert/alert.type.d.ts +5 -4
  46. package/dist/src/core/BitPerSecond/index.d.ts +2 -2
  47. package/dist/src/core/KitStoreProvider/index.d.ts +1 -0
  48. package/dist/src/core/Modal/modal.type.d.ts +25 -2
  49. package/dist/src/core/SearchInput/searchInput.type.d.ts +33 -0
  50. package/dist/src/core/Timeline/Timeline.style.d.ts +5 -0
  51. package/dist/src/core/Timeline/Timeline.type.d.ts +209 -0
  52. package/dist/src/core/Timeline/Timeline.widget.d.ts +5 -0
  53. package/dist/src/core/Timeline/index.d.ts +10 -0
  54. package/dist/src/core/index.d.ts +1 -0
  55. package/dist/src/coreX/CheckPointList/checkpointlist.style.d.ts +3 -0
  56. package/dist/src/coreX/CheckPointList/checkpointlist.type.d.ts +93 -0
  57. package/dist/src/coreX/CheckPointList/index.d.ts +8 -0
  58. package/dist/src/coreX/DateRangePicker/dateRangePicker.type.d.ts +6 -1
  59. package/dist/src/coreX/InfoRowList/InfoRow.d.ts +7 -0
  60. package/dist/src/coreX/InfoRowList/InfoRowList.d.ts +3 -0
  61. package/dist/src/coreX/InfoRowList/InfoRowList.type.d.ts +63 -0
  62. package/dist/src/coreX/InfoRowList/index.d.ts +1 -0
  63. package/dist/src/coreX/Show/index.d.ts +3 -0
  64. package/dist/src/coreX/Show/show.type.d.ts +13 -0
  65. package/dist/src/coreX/index.d.ts +5 -2
  66. package/dist/src/store/modal.d.ts +8 -2
  67. package/dist/src/utils/constants.d.ts +2 -0
  68. package/dist/stories/docs/core/Button.stories.d.ts +11 -0
  69. package/dist/stories/docs/core/KitStoreProvider.stories.d.ts +1 -1
  70. package/dist/stories/docs/core/Modal.stories.d.ts +4 -0
  71. package/dist/stories/docs/core/Timeline.stories.d.ts +38 -0
  72. package/dist/stories/docs/coreX/CheckPointList.stories.d.ts +67 -0
  73. package/dist/stories/docs/coreX/DateRangePicker.stories.d.ts +1 -0
  74. package/dist/stories/docs/coreX/I18nNameTag.stories.d.ts +8 -0
  75. package/dist/stories/docs/coreX/InfoRowList.stories.d.ts +36 -0
  76. package/dist/stories/docs/coreX/Show.stories.d.ts +31 -0
  77. package/dist/style.css +2818 -2599
  78. package/package.json +4 -4
@@ -1,6 +1,7 @@
1
1
  export * from "./BarChart";
2
2
  export * from "./BatchOperation";
3
3
  export * from "./ChartWithTooltip";
4
+ export * from "./CircleLoading";
4
5
  export * from "./common";
5
6
  export * from "./Counting";
6
7
  export * from "./CronCalendar";
@@ -10,8 +11,10 @@ export * from "./DeprecatedDonutChart";
10
11
  export * from "./DropdownTransition";
11
12
  export * from "./GoBackButton";
12
13
  export * from "./I18nNameTag";
14
+ export * from "./InfoRowList";
13
15
  export * from "./NamesTooltip";
14
16
  export * from "./OverflowTooltip";
17
+ export * from "./Show";
15
18
  export * from "./SidebarSubtitle";
16
19
  export * from "./Sider";
17
20
  export * from "./SortableList";
@@ -19,10 +22,11 @@ export * from "./SummaryTable";
19
22
  export * from "./SwitchWithText";
20
23
  export * from "./TabMenu";
21
24
  export * from "./UnitWithChart";
22
- export * from "./CircleLoading";
25
+ export * from "./CheckPointList";
23
26
  export { default as BarChart } from "./BarChart";
24
27
  export { default as BatchOperation } from "./BatchOperation";
25
28
  export { default as ChartWithTooltip } from "./ChartWithTooltip";
29
+ export { default as CircleLoading } from "./CircleLoading";
26
30
  export { default as Counting } from "./Counting";
27
31
  export { default as CronCalendar } from "./CronCalendar";
28
32
  export { default as CronPlan } from "./CronPlan";
@@ -40,4 +44,3 @@ export { default as SummaryTable } from "./SummaryTable";
40
44
  export { default as SwitchWithText } from "./SwitchWithText";
41
45
  export { default as TabMenu } from "./TabMenu";
42
46
  export { default as UnitWithChart } from "./UnitWithChart";
43
- export { default as CircleLoading } from "./CircleLoading";
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  export type CloseCb = {
3
3
  onClose: () => void;
4
+ closeAllModal: () => void;
4
5
  modalId: number;
5
6
  };
6
7
  export type ModalType<TProps> = TProps extends void ? {
@@ -9,6 +10,7 @@ export type ModalType<TProps> = TProps extends void ? {
9
10
  component: React.FC<TProps & CloseCb>;
10
11
  props: TProps & {
11
12
  onClose?: () => void;
13
+ closeAllModal?: () => void;
12
14
  };
13
15
  };
14
16
  export type ModalState = {
@@ -21,7 +23,8 @@ export declare enum ModalActions {
21
23
  PUSH_MODAL = "PUSH_MODAL",
22
24
  POP_MODAL = "POP_MODAL",
23
25
  REMOVE_MODAL = "REMOVE_MODAL",
24
- CLOSE_MODAL = "CLOSE_MODAL"
26
+ CLOSE_MODAL = "CLOSE_MODAL",
27
+ RESET_MODAL = "RESET_MODAL"
25
28
  }
26
29
  type PUSH_MODAL<TProps> = {
27
30
  type: ModalActions.PUSH_MODAL;
@@ -38,7 +41,10 @@ type CLOSE_MODAL = {
38
41
  type: ModalActions.CLOSE_MODAL;
39
42
  id: number;
40
43
  };
41
- export type Actions = PUSH_MODAL<unknown> | POP_MODAL | REMOVE_MODAL | CLOSE_MODAL;
44
+ type RESET_MODAL = {
45
+ type: ModalActions.RESET_MODAL;
46
+ };
47
+ export type Actions = PUSH_MODAL<unknown> | POP_MODAL | REMOVE_MODAL | CLOSE_MODAL | RESET_MODAL;
42
48
  export declare const initialModalState: ModalState;
43
49
  export declare const modalReducer: (state: ModalState | undefined, action: Actions) => ModalState;
44
50
  export interface IModalProps {
@@ -1,6 +1,8 @@
1
+ import React from "react";
1
2
  export declare const EMPTY_FUNCTION: () => void;
2
3
  export declare const EMPTY_ARRAY: never[];
3
4
  export declare const EMPTY_OBJECT: {};
4
5
  export declare const EMPTY_COMPONENT: () => null;
5
6
  export declare const DAYJS_I18N_MAP: Record<string, string>;
6
7
  export declare const Antd5PrefixCls = "antd5";
8
+ export declare const splitMap: Record<string, React.ReactElement>;
@@ -21,3 +21,14 @@ export declare const CustomChildren: Story;
21
21
  * * 这里仅对已有的用法进行展示
22
22
  */
23
23
  export declare const Link: Story;
24
+ /**
25
+ * * 禁用按钮示例
26
+ * * 当 disabled 设置为 true 时,按钮将变为禁用状态
27
+ * * 禁用状态下按钮不可点击,且样式会有相应变化
28
+ */
29
+ export declare const Disabled: Story;
30
+ /**
31
+ * 按钮有三种尺寸:large、middle、small
32
+ * 可以在不同场景下选择合适的按钮尺寸
33
+ */
34
+ export declare const ButtonSizes: Story;
@@ -12,7 +12,7 @@ declare const Demo: (props: {
12
12
  *
13
13
  * ModalStack 会向上查找 KitStoreContext, 如果未查找到,会使用 eagle 提供的默认 store。
14
14
  *
15
- * usePushModal,usePopModal,useCloseModal 与 ModalStack 同理。
15
+ * usePushModal,usePopModal,useCloseModal, useResetModal 与 ModalStack 同理。
16
16
  */
17
17
  declare const meta: Meta<typeof Demo>;
18
18
  export default meta;
@@ -9,3 +9,7 @@ export declare const WithAside: {
9
9
  (): React.JSX.Element;
10
10
  args: {};
11
11
  };
12
+ /**
13
+ * 点击弹窗中的 close all modal 按钮,会清理掉页面中的所有弹窗
14
+ */
15
+ export declare const CloseAllModal: () => React.JSX.Element;
@@ -0,0 +1,38 @@
1
+ import React from "react";
2
+ import { StoryObj } from "@storybook/react";
3
+ import { Timeline } from "../../../src/core/Timeline";
4
+ /**
5
+ * * Timeline 时间线组件
6
+ * * 用于展示操作记录、系统事件的时间线
7
+ * * 支持多种状态展示:成功、失败、进行中、通知、空闲
8
+ * * 支持自定义标签和操作按钮
9
+ * * 支持使用 Area 组件灵活自定义辅助信息展示
10
+ */
11
+ declare const meta: {
12
+ component: ({ items, emptyText, emptyRender, compact, emptyTextClassName, }: import("../../../src/core/Timeline").TimelineProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
13
+ title: string;
14
+ parameters: {
15
+ docs: {
16
+ description: {
17
+ component: string;
18
+ };
19
+ source: {
20
+ type: string;
21
+ };
22
+ };
23
+ controls: {
24
+ sort: string;
25
+ };
26
+ };
27
+ };
28
+ export default meta;
29
+ type Story = StoryObj<typeof Timeline>;
30
+ export declare const SuccessTimeline: Story;
31
+ export declare const FailedTimeline: Story;
32
+ export declare const EmptyTimeline: Story;
33
+ export declare const CustomEmptyState: Story;
34
+ export declare const CustomSecondaryTextStyle: Story;
35
+ export declare const CustomErrorMessage: Story;
36
+ export declare const CustomTags: Story;
37
+ export declare const CustomInfoRender: Story;
38
+ export declare const CustomSubInfoRender: Story;
@@ -0,0 +1,67 @@
1
+ import { type StoryObj } from "@storybook/react";
2
+ import { CheckPointList } from "../../../src/coreX/CheckPointList";
3
+ import React from "react";
4
+ /**
5
+ * CheckPointList 组件
6
+ * 用于展示检查点列表,支持通过切换开关筛选未通过的检查项
7
+ * 适用于各种预检查、健康检查等场景
8
+ *
9
+ * 组件特点:
10
+ * 1. 支持四种状态展示:成功、失败、加载中、警告
11
+ * 2. 可自定义标签样式
12
+ * 3. 可自定义告警样式
13
+ * 4. 支持筛选控制
14
+ * 5. 自定义空状态展示
15
+ */
16
+ declare const meta: {
17
+ component: React.FC<import("../../../src/coreX/CheckPointList").CheckPointListProps>;
18
+ title: string;
19
+ parameters: {
20
+ design: {
21
+ type: string;
22
+ url: string;
23
+ };
24
+ };
25
+ };
26
+ export default meta;
27
+ type Story = StoryObj<typeof CheckPointList>;
28
+ /**
29
+ * 基础用法
30
+ * 展示检查点列表的基础用法,包含成功和失败的检查项
31
+ */
32
+ export declare const Basic: Story;
33
+ /**
34
+ * 自定义标签和告警样式
35
+ * 展示如何使用自定义标签和告警样式来增强视觉效果
36
+ */
37
+ export declare const CustomStyle: Story;
38
+ /**
39
+ * 所有状态类型
40
+ * 展示所有可能的状态类型:成功、失败、加载中、警告
41
+ */
42
+ export declare const AllStatusTypes: Story;
43
+ /**
44
+ * 禁用筛选控件
45
+ * 展示禁用筛选控件的情况,适用于不需要筛选功能的场景
46
+ */
47
+ export declare const DisableFilterControl: Story;
48
+ /**
49
+ * 自定义筛选开关文案
50
+ * 展示如何自定义筛选开关的文案
51
+ */
52
+ export declare const CustomSwitchText: Story;
53
+ /**
54
+ * 空状态提示
55
+ * 展示自定义空状态提示的使用方法
56
+ */
57
+ export declare const EmptyState: Story;
58
+ /**
59
+ * 自定义空状态渲染
60
+ * 展示如何使用自定义渲染函数来创建空状态
61
+ */
62
+ export declare const CustomEmptyRender: Story;
63
+ /**
64
+ * 复杂描述内容
65
+ * 展示如何在描述中使用复杂的ReactNode内容
66
+ */
67
+ export declare const ComplexDescription: Story;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof DateRangePicker>;
6
6
  export declare const Demo: Story;
7
7
  export declare const WithRange: Story;
8
+ export declare const WithRelative: Story;
@@ -3,6 +3,14 @@ import { Meta } from "@storybook/react";
3
3
  import React from "react";
4
4
  declare const meta: Meta<typeof I18nNameTag>;
5
5
  export default meta;
6
+ /**
7
+ *
8
+ * 请注意,由于 I18nNameTag 存在 typo, 使用 I18nNameTag 的词条使用的 html tag index 都需要从 1 开始用起
9
+ *
10
+ * 例如: "delete_alert_group_policy_desc": "确认要删除通知聚合策略 <1>{name}</1> 吗?",
11
+ *
12
+ * slack: https://smartx1.slack.com/archives/GD3UU318A/p1700202217700279
13
+ */
6
14
  export declare const Default: {
7
15
  name: string;
8
16
  render: ({ name }: {
@@ -0,0 +1,36 @@
1
+ import { InfoRowList } from "../../../src/coreX";
2
+ import type { StoryObj } from "@storybook/react";
3
+ import React from "react";
4
+ /**
5
+ * InfoRowList 组件用于展示一组键值对信息,支持自定义操作按钮和加载状态。
6
+ * 支持普通模式(适用于设置页面)和紧凑模式(适用于详情页面)两种展示方式。
7
+ */
8
+ declare const meta: {
9
+ component: React.ForwardRefExoticComponent<import("../../../src/coreX/InfoRowList/InfoRowList.type").InfoListProps & React.RefAttributes<HTMLDivElement>>;
10
+ title: string;
11
+ parameters: {
12
+ layout: string;
13
+ };
14
+ };
15
+ export default meta;
16
+ type Story = StoryObj<typeof InfoRowList>;
17
+ /**
18
+ * 基础用法展示了最简单的信息列表展示方式,适用于设置页面
19
+ */
20
+ export declare const Basic: Story;
21
+ /**
22
+ * 带操作按钮的用法,每行右侧可以添加自定义的操作按钮
23
+ */
24
+ export declare const WithActions: Story;
25
+ /**
26
+ * 紧凑模式的展示方式,适用于详情页面
27
+ */
28
+ export declare const Compact: Story;
29
+ /**
30
+ * 加载状态展示
31
+ */
32
+ export declare const Loading: Story;
33
+ /**
34
+ * 空值和隐藏行的展示
35
+ */
36
+ export declare const EmptyAndHidden: Story;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { StoryObj } from "@storybook/react";
3
+ import { Show } from "../../../src/coreX/Show";
4
+ /**
5
+ * * Show 条件渲染组件
6
+ * * 根据条件决定显示内容还是备用内容
7
+ * * 提供了一种声明式的方式来替代 JSX 中的条件渲染
8
+ * * 支持布尔值条件和函数条件
9
+ */
10
+ declare const meta: {
11
+ component: React.FC<import("../../../src/coreX/Show/show.type").ShowProps>;
12
+ title: string;
13
+ };
14
+ export default meta;
15
+ type Story = StoryObj<typeof Show>;
16
+ export declare const BasicTrue: Story;
17
+ export declare const BasicFalse: Story;
18
+ export declare const FunctionCondition: Story;
19
+ export declare const NoFallback: Story;
20
+ export declare const Interactive: {
21
+ name: string;
22
+ render: () => React.JSX.Element;
23
+ };
24
+ export declare const NestedShows: {
25
+ name: string;
26
+ render: () => React.JSX.Element;
27
+ };
28
+ export declare const CombinedWithOtherComponents: {
29
+ name: string;
30
+ render: () => React.JSX.Element;
31
+ };