@cloudtower/eagle 0.27.6 → 0.27.9

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.
@@ -63,7 +63,7 @@ import { IDonutChartProps } from "../coreX/DonutChart";
63
63
  import { IUnitWithChartProps } from "../coreX/UnitWithChart";
64
64
  import { SerializableObject } from "../utils/tower";
65
65
  import { FieldRenderProps } from "./react-final-form";
66
- import { Architecture, DropdownTransitionProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps, PropsFrom } from "./type";
66
+ import { Architecture, DropdownTransitionProps, HistoryType, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps, PropsFrom } from "./type";
67
67
  export type AntdTableComponentType = <RecordType extends object = any>(props: AntdTableProps<RecordType>) => JSX.Element;
68
68
  export type AntdTreeSelectComponentType<T> = TreeSelect<T>;
69
69
  interface EmptyType extends React.FC<EmptyProps> {
@@ -654,7 +654,7 @@ export type SwitchWithTextProps = PropsFrom<Kit["switch"]> & {
654
654
  };
655
655
  };
656
656
  export type GoBackButtonType = {
657
- history: History;
657
+ history: History | HistoryType;
658
658
  title?: string;
659
659
  onClick?: () => void;
660
660
  path?: string;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import type { History, Location as HistoryLocation } from "history";
2
3
  import { CSSTransitionProps } from "react-transition-group/CSSTransition";
3
4
  export declare enum Architecture {
4
5
  Aarch64 = "AARCH64",
@@ -69,3 +70,13 @@ export interface ICircleProgressProps {
69
70
  className?: string;
70
71
  }
71
72
  export type PropsFrom<TComponent> = TComponent extends React.FC<infer Props> ? Props : TComponent extends React.Component<infer Props> ? Props : never;
73
+ export type HistoryType = Omit<History, "push" | "replace" | "location" | "length"> & {
74
+ push: {
75
+ (path: string, state?: HistoryLocation["state"]): void;
76
+ (location: any): void;
77
+ };
78
+ replace: {
79
+ (path: string, state?: HistoryLocation["state"]): void;
80
+ (location: any): void;
81
+ };
82
+ };