@cloudtower/eagle 0.27.2 → 0.27.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.
@@ -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, ICircleProgressProps, 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> {
@@ -526,6 +527,9 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
526
527
  Counting: React.FC<ICountingProps>;
527
528
  Breadcrumb: React.FC<IBreadcrumbProps>;
528
529
  CircleProgress: React.FC<ICircleProgressProps>;
530
+ SwitchWithText: React.FC<SwitchWithTextProps>;
531
+ CronPlan: React.FC<CronPlanProps>;
532
+ NamesTooltip: React.FC<NamesTooltipType>;
529
533
  }
530
534
  export type ArchComponentType = React.FC<{
531
535
  architecture?: Architecture;
@@ -608,4 +612,28 @@ export type I18nNameTagType = {
608
612
  i18nKey: string;
609
613
  [key: string]: unknown;
610
614
  };
615
+ export type CronPlanState = {
616
+ expression: string;
617
+ retain: number;
618
+ startAt: Dayjs;
619
+ enabled: boolean;
620
+ empty: boolean;
621
+ };
622
+ export type CronPlanProps = {
623
+ value: CronPlanState;
624
+ onChange: (value: CronPlanState) => unknown;
625
+ onRemove?: () => void;
626
+ };
627
+ export type NamesTooltipType = {
628
+ names: {
629
+ id: string;
630
+ name?: string;
631
+ }[];
632
+ };
633
+ export type SwitchWithTextProps = PropsFrom<Kit["switch"]> & {
634
+ text?: {
635
+ checked: React.ReactNode;
636
+ unchecked: React.ReactNode;
637
+ };
638
+ };
611
639
  export {};
@@ -68,3 +68,4 @@ export interface ICircleProgressProps {
68
68
  color?: string;
69
69
  className?: string;
70
70
  }
71
+ export type PropsFrom<TComponent> = TComponent extends React.FC<infer Props> ? Props : TComponent extends React.Component<infer Props> ? Props : never;