@cloudtower/eagle 0.27.1-beta.1 → 0.27.1-dry

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.
@@ -48,6 +48,7 @@ import { TreeProps as AntdTreeProps } from "antd/lib/tree";
48
48
  import type TreeSelect from "antd/lib/tree-select";
49
49
  import { TextProps } from "antd/lib/typography/Text";
50
50
  import { DraggerProps, UploadProps } from "antd/lib/upload";
51
+ import type { Dayjs } from "dayjs";
51
52
  import type { Moment } from "moment";
52
53
  import React, { ForwardRefExoticComponent, PropsWithChildren, PropsWithoutRef, ReactNode, RefAttributes } from "react";
53
54
  import { CardProps } from "../components/Card";
@@ -58,7 +59,7 @@ import { TruncatePropTypes } from "../components/Truncate";
58
59
  import type { CloseButtonProps } from "../core/AccordionCard";
59
60
  import { SerializableObject } from "../utils/tower";
60
61
  import { FieldRenderProps } from "./react-final-form";
61
- import { Architecture, DropdownTransitionProps, IAccordionCardProps, IBreadcrumbProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps } from "./type";
62
+ import { Architecture, DropdownTransitionProps, IAccordionCardProps, IBreadcrumbProps, ICircleProgressProps, ICountingProps, IDetailCardProps, ISpaceProps, ITimeProps, ITimeZoneSelectProps, PropsFrom } from "./type";
62
63
  export type AntdTableComponentType = <RecordType extends object = any>(props: AntdTableProps<RecordType>) => JSX.Element;
63
64
  export type AntdTreeSelectComponentType<T> = TreeSelect<T>;
64
65
  interface EmptyType extends React.FC<EmptyProps> {
@@ -525,6 +526,9 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
525
526
  TruncatedTextWithTooltip: React.FC<TruncateTextWithTooltipType>;
526
527
  Counting: React.FC<ICountingProps>;
527
528
  Breadcrumb: React.FC<IBreadcrumbProps>;
529
+ CircleProgress: React.FC<ICircleProgressProps>;
530
+ CronPlan: React.FC<CronPlanProps>;
531
+ SwitchWithText: React.FC<SwitchWithTextProps>;
528
532
  }
529
533
  export type ArchComponentType = React.FC<{
530
534
  architecture?: Architecture;
@@ -597,4 +601,22 @@ export type TruncateTextWithTooltipType = {
597
601
  text: string;
598
602
  textWrapperCls?: string;
599
603
  } & Omit<TooltipProps, "title">;
604
+ export type CronPlanState = {
605
+ expression: string;
606
+ retain: number;
607
+ startAt: Dayjs;
608
+ enabled: boolean;
609
+ empty: boolean;
610
+ };
611
+ export type CronPlanProps = {
612
+ value: CronPlanState;
613
+ onChange: (value: CronPlanState) => unknown;
614
+ onRemove?: () => void;
615
+ };
616
+ export type SwitchWithTextProps = PropsFrom<Kit["switch"]> & {
617
+ text?: {
618
+ checked: React.ReactNode;
619
+ unchecked: React.ReactNode;
620
+ };
621
+ };
600
622
  export {};
@@ -63,3 +63,9 @@ export interface BreadcrumbLink {
63
63
  export interface IBreadcrumbProps {
64
64
  items: BreadcrumbLink[];
65
65
  }
66
+ export interface ICircleProgressProps {
67
+ percent: number;
68
+ color?: string;
69
+ className?: string;
70
+ }
71
+ export type PropsFrom<TComponent> = TComponent extends React.FC<infer Props> ? Props : TComponent extends React.Component<infer Props> ? Props : never;