@cloudtower/eagle 0.25.9 → 0.25.10

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.
@@ -6,9 +6,7 @@ interface IProps {
6
6
  kit?: Kit;
7
7
  message?: {
8
8
  batch?: BatchHelper;
9
- config?: {
10
- maxCount?: number;
11
- };
9
+ maxCount?: number;
12
10
  };
13
11
  lng?: ParrotI18nSupportLng;
14
12
  getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
@@ -4,7 +4,7 @@ declare const Button: React.ForwardRefExoticComponent<{
4
4
  hoverPrefixIcon?: JSX.Element | undefined;
5
5
  suffixIcon?: JSX.Element | undefined;
6
6
  hoverSuffixIcon?: JSX.Element | undefined;
7
- type?: "link" | "text" | "default" | "primary" | "ghost" | "dashed" | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet" | undefined;
7
+ type?: "default" | "dashed" | "text" | "link" | "primary" | "ghost" | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet" | undefined;
8
8
  } & Omit<Partial<{
9
9
  href: string;
10
10
  target?: string | undefined;
@@ -1,33 +1,33 @@
1
1
  /// <reference types="react" />
2
2
  export declare const ColumnHeaderImpls: {
3
3
  text: import("react").FC<import("../types").ColumnHeaderCellProps>;
4
- input: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
4
+ input: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onBlur" | "onChange"> & {
5
5
  onChange: (value: any) => void;
6
6
  onBlur: () => void;
7
7
  }>;
8
- password: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
8
+ password: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onBlur" | "onChange"> & {
9
9
  onChange: (value: any) => void;
10
10
  onBlur: () => void;
11
11
  }>;
12
- affix: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
12
+ affix: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onBlur" | "onChange"> & {
13
13
  onChange: (value: any) => void;
14
14
  onBlur: () => void;
15
15
  }>;
16
- checkbox: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onChange" | "onBlur"> & {
16
+ checkbox: import("react").FC<Omit<import("../types").ColumnHeaderCellProps, "onBlur" | "onChange"> & {
17
17
  onChange: (value: any, shouldUpdateData?: boolean | undefined) => void;
18
18
  }>;
19
19
  };
20
20
  export declare const ColumnBodyImpls: {
21
21
  text: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "column" | "index">>;
22
- input: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "latestData" | "column" | "disabled" | "index" | "visible"> & {
22
+ input: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "disabled" | "data" | "visible" | "column" | "latestData" | "index"> & {
23
23
  onChange: (value: any) => void;
24
24
  onBlur: () => void;
25
25
  }>;
26
- password: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "latestData" | "column" | "disabled" | "index" | "visible"> & {
26
+ password: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "disabled" | "data" | "visible" | "column" | "latestData" | "index"> & {
27
27
  onChange: (value: any) => void;
28
28
  onBlur: () => void;
29
29
  }>;
30
- affix: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "data" | "latestData" | "column" | "disabled" | "index" | "visible"> & {
30
+ affix: import("react").FC<Pick<import("../types").ColumnBodyCellProps, "disabled" | "data" | "visible" | "column" | "latestData" | "index"> & {
31
31
  onChange: (value: any) => void;
32
32
  onBlur: () => void;
33
33
  }>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,52 @@
1
+ import * as React from "react";
2
+ type NoticeType = "info" | "success" | "error" | "warning" | "loading";
3
+ export declare function getKeyThenIncreaseKey(): number;
4
+ export interface ConfigOptions {
5
+ top?: number;
6
+ duration?: number;
7
+ prefixCls?: string;
8
+ getContainer?: () => HTMLElement;
9
+ transitionName?: string;
10
+ maxCount?: number;
11
+ rtl?: boolean;
12
+ }
13
+ export interface ThenableArgument {
14
+ (val: any): void;
15
+ }
16
+ export interface MessageType {
17
+ (): void;
18
+ then: (fill: ThenableArgument, reject: ThenableArgument) => Promise<void>;
19
+ promise: Promise<void>;
20
+ }
21
+ export interface ArgsProps {
22
+ content: React.ReactNode;
23
+ duration: number | null;
24
+ type?: NoticeType;
25
+ prefixCls?: string;
26
+ onClose?: () => void;
27
+ icon?: React.ReactNode;
28
+ key?: string | number;
29
+ style?: React.CSSProperties;
30
+ className?: string;
31
+ }
32
+ type ConfigContent = React.ReactNode | string;
33
+ type ConfigDuration = number | (() => void);
34
+ type JointContent = ConfigContent | ArgsProps;
35
+ export type ConfigOnClose = () => void;
36
+ export declare function attachTypeApi(originalApi: any, type: string): void;
37
+ export interface MessageInstance {
38
+ info(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
39
+ success(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
40
+ error(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
41
+ warning(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
42
+ loading(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
43
+ open(args: ArgsProps): MessageType;
44
+ }
45
+ export interface MessageApi extends MessageInstance {
46
+ warn(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose): MessageType;
47
+ config(options: ConfigOptions): void;
48
+ destroy(): void;
49
+ useMessage(): [MessageInstance, React.ReactElement];
50
+ }
51
+ declare const _default: MessageApi;
52
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import "../../style/index.less";
2
+ import "./index.less";
@@ -1,6 +1,6 @@
1
- import { message } from "antd";
2
- import { ArgsProps } from "antd/lib/message";
1
+ import { ArgsProps, ConfigOnClose, MessageType } from "antd/lib/message";
3
2
  import { ReactNode } from "react";
3
+ import { MessageApi } from "../message";
4
4
  export declare function makeUUID(length?: number): string;
5
5
  export type BatchHelper = {
6
6
  getBatchKey: (content: ReactNode) => string | undefined;
@@ -9,15 +9,19 @@ export type BatchHelper = {
9
9
  type KeyedArgsProps = ArgsProps & {
10
10
  key: string;
11
11
  };
12
+ declare type ConfigContent = React.ReactNode | string;
13
+ declare type ConfigDuration = number | (() => void);
14
+ declare type JointContent = ConfigContent | ArgsProps;
15
+ type OriginalMethod = (content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) => MessageType;
12
16
  export declare class Batcher {
13
17
  private batchSize;
14
18
  private batchTime;
15
19
  private scheduler;
16
20
  private originalMethod;
17
21
  private batchHelper;
18
- constructor(originalMethod: typeof message["success"], batchHelper: BatchHelper);
22
+ constructor(originalMethod: OriginalMethod, batchHelper: BatchHelper);
19
23
  addMessage(originContent: KeyedArgsProps): void;
20
24
  private applyContent;
21
25
  }
22
- export declare function createBatchMessageMethods(batchHelper?: BatchHelper): typeof message;
26
+ export declare function createBatchMessageMethods(message: MessageApi, batchHelper: BatchHelper): MessageApi;
23
27
  export {};