@cloudtower/eagle 0.33.22 → 0.33.24

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.
@@ -1,3 +1 @@
1
- import React from "react";
2
- import { Antd5TreeProps } from "./Antd5Tree.type";
3
- export declare const Antd5Tree: React.FC<Antd5TreeProps>;
1
+ export { Tree as Antd5Tree } from "antd5";
@@ -1,2 +1,4 @@
1
- import { TreeProps } from "antd5";
1
+ import { TreeDataNode, TreeNodeProps, TreeProps } from "antd5";
2
2
  export type Antd5TreeProps = TreeProps;
3
+ export type Antd5TreeDataNode = TreeDataNode;
4
+ export type Antd5TreeNodeProps = TreeNodeProps;
@@ -11,6 +11,7 @@ export type CalendarProps = {
11
11
  range?: PickerDateRange;
12
12
  minDate?: string | Dayjs | undefined;
13
13
  maxDate?: string | Dayjs | undefined;
14
+ maxRange?: string;
14
15
  onChange?: (range: PickerDateRange) => void;
15
16
  };
16
17
  export type InputTimeProps = {
@@ -25,6 +26,7 @@ export type AbsoluteTimeProps = {
25
26
  range: PickerDateRange;
26
27
  minDate?: string | Dayjs | undefined;
27
28
  maxDate?: string | Dayjs | undefined;
29
+ maxRange?: string;
28
30
  onChange: (range: PickerDateRange) => void;
29
31
  onOk: (range: PickerDateRange) => void;
30
32
  };
@@ -55,11 +57,17 @@ export type DateRangePickerProps = {
55
57
  mode?: ("relative" | "absolute")[] | "relative" | "absolute" | undefined;
56
58
  minDate?: string | Dayjs | undefined;
57
59
  maxDate?: string | Dayjs | undefined;
60
+ /**
61
+ * The maximum range of the absolute time range selected by the user
62
+ * the maxRange only limit the date selection, not the time selection
63
+ * example: 1d, 1w, 1m, 1y
64
+ */
65
+ maxRange?: string;
58
66
  onChange?: (type: "relative" | "absolute", time: DateRangePickerValue, range: PickerDateRange) => void;
59
67
  onAbsoluteTimeChange?: (range: PickerDateRange) => void;
60
68
  /**
61
- * Customize an array of relative time select options
62
- */
69
+ * Customize an array of relative time select options
70
+ */
63
71
  relativeTimeSelectOptions?: PastTime[];
64
72
  };
65
73
  export type PastTime = {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ /**
2
+ * 解析字符串中的数字和单位
3
+ * @param str 要解析的字符串
4
+ * @returns 包含数字和单位的对象,如果解析失败返回 null
5
+ * @example
6
+ * parseNumberAndUnit("123px") // { number: 123, unit: "px" }
7
+ * parseNumberAndUnit("45.67%") // { number: 45.67, unit: "%" }
8
+ * parseNumberAndUnit("100") // { number: 100, unit: "" }
9
+ * parseNumberAndUnit("abc") // null
10
+ */
11
+ export declare function parseNumberAndUnit(str: string): {
12
+ number: number;
13
+ unit: string;
14
+ } | null;
@@ -8,7 +8,14 @@ import React from "react";
8
8
  * * 更多 props 请参考:https://ant.design/components/tree-cn#API
9
9
  */
10
10
  declare const meta: {
11
- component: React.FC<import("../../../src/core").Antd5TreeProps>;
11
+ component: (<T extends import("rc-tree").BasicDataNode | import("antd5").TreeDataNode = import("antd5").TreeDataNode>(props: import("antd5").TreeProps<T> & {
12
+ children?: React.ReactNode;
13
+ } & React.RefAttributes<import("rc-tree/lib/Tree").default<import("antd5").TreeDataNode>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & {
14
+ TreeNode: React.FC<import("rc-tree").TreeNodeProps<import("antd5").TreeDataNode>>;
15
+ DirectoryTree: (<T_1 extends import("rc-tree").BasicDataNode | import("antd5").TreeDataNode = import("antd5").TreeDataNode>(props: import("antd5/es/tree").DirectoryTreeProps<T_1> & {
16
+ children?: React.ReactNode;
17
+ } & React.RefAttributes<import("rc-tree/lib/Tree").default<import("antd5").TreeDataNode>>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Pick<React.FC<{}>, "displayName">;
18
+ };
12
19
  title: "Core/Antd5Tree | 树形控件";
13
20
  parameters: {
14
21
  design: {
@@ -31,3 +38,7 @@ export declare const Checkable: Story;
31
38
  * 默认展开部分节点
32
39
  */
33
40
  export declare const DefaultExpanded: Story;
41
+ /**
42
+ * 使用 TreeNode 组件手动构建树
43
+ */
44
+ export declare const TreeNodeUsage: Story;
@@ -6,3 +6,4 @@ type Story = StoryObj<typeof DateRangePicker>;
6
6
  export declare const Demo: Story;
7
7
  export declare const WithRange: Story;
8
8
  export declare const WithRelative: Story;
9
+ export declare const WithMaxRange: Story;