@cloudtower/eagle 0.27.2-alpha.0 → 0.27.2-calendar

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.
Files changed (36) hide show
  1. package/dist/components/Calendar/index.d.ts +3 -0
  2. package/dist/components/Fields/FieldsString/FieldsString.stories.d.ts +1 -1
  3. package/dist/components/I18nNameTag/index.d.ts +2 -8
  4. package/dist/components/Loading/style.d.ts +4 -0
  5. package/dist/components/Metric/metric.d.ts +1 -1
  6. package/dist/components/Tag/Tag.stories.d.ts +2 -2
  7. package/dist/components/Tag/style.d.ts +1 -0
  8. package/dist/components.css +1031 -1071
  9. package/dist/core/StepProgress/StepProgress.stories.d.ts +8 -0
  10. package/dist/core/StepProgress/index.d.ts +3 -0
  11. package/dist/coreX/CronCalendar/CronCalendar.stories.d.ts +6 -0
  12. package/dist/coreX/CronCalendar/index.d.ts +4 -0
  13. package/dist/coreX/CronPlan/CronPlan.stories.d.ts +9 -0
  14. package/dist/coreX/CronPlan/index.d.ts +18 -0
  15. package/dist/coreX/SwitchWithText/SwitchWithText.stories.d.ts +9 -0
  16. package/dist/coreX/SwitchWithText/__tests__/h5_css.test.d.ts +1 -0
  17. package/dist/coreX/SwitchWithText/index.d.ts +4 -0
  18. package/dist/coreX/common/getCalendarTitle.d.ts +2 -0
  19. package/dist/esm/index.js +3802 -2635
  20. package/dist/esm/stats1.html +1 -1
  21. package/dist/spec/base.d.ts +50 -9
  22. package/dist/spec/type.d.ts +6 -0
  23. package/dist/style.css +1448 -1488
  24. package/dist/umd/index.js +3770 -2604
  25. package/dist/umd/stats1.html +1 -1
  26. package/dist/utils/__test__/compute.spec.d.ts +1 -0
  27. package/dist/utils/__test__/cron-time.spec.d.ts +1 -0
  28. package/dist/utils/__test__/time.spec.d.ts +1 -0
  29. package/dist/utils/compute.d.ts +1 -0
  30. package/dist/utils/cron-time.d.ts +65 -0
  31. package/dist/utils/icon.d.ts +2 -1
  32. package/dist/utils/index.d.ts +3 -0
  33. package/dist/utils/time.d.ts +25 -0
  34. package/dist/variables.scss +2 -0
  35. package/package.json +6 -6
  36. package/dist/components/images/index.d.ts +0 -15
@@ -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> {
@@ -487,9 +488,9 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
487
488
  tableForm: React.ForwardRefExoticComponent<TableFormProps & React.RefAttributes<TableFormHandle>>;
488
489
  token: TokenComponentType;
489
490
  overflowTooltip: React.FC<OverflowTooltipProps>;
490
- I18nNameTag: React.FC<any>;
491
+ I18nNameTag: React.FC<I18nNameTagType>;
491
492
  uploadDragger: React.ComponentType<DraggerProps>;
492
- calendar: React.FC<CalendarProps<Moment>>;
493
+ calendar: CalendarComponentType;
493
494
  timePicker: React.FC<TimePickerProps>;
494
495
  datePicker: React.ComponentType<DatePickerProps>;
495
496
  tabs: React.FC<TabsProps>;
@@ -525,6 +526,10 @@ 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
+ SwitchWithText: React.FC<SwitchWithTextProps>;
531
+ CronPlan: React.FC<CronPlanProps>;
532
+ CronCalendar: React.FC<CronCalendarProps>;
528
533
  }
529
534
  export type ArchComponentType = React.FC<{
530
535
  architecture?: Architecture;
@@ -555,12 +560,23 @@ export type EnumProps<V = any, T extends HTMLElement = HTMLElement> = {
555
560
  } & BaseEnumProps;
556
561
  export type TableFormPropsType = React.ForwardRefExoticComponent<TableFormProps & React.RefAttributes<TableFormHandle>>;
557
562
  export type TagColor = "red" | "yellow" | "green" | "blue" | "purple" | "gray" | "red-ontint" | "green-ontint" | "error" | "warning" | "processing" | "default" | "success";
563
+ export type SplitTagComponentType = React.FC<Omit<TagProps, "closable" | "closeIcon" | "onClose" | "visible"> & {
564
+ color?: "red" | "yellow" | "green" | "blue" | "purple" | "gray";
565
+ size?: "small" | "medium";
566
+ primaryContent: React.ReactNode;
567
+ secondaryContent: React.ReactNode;
568
+ }>;
569
+ export interface NameTagType extends Omit<React.HTMLAttributes<HTMLSpanElement>, "color"> {
570
+ className?: string;
571
+ style?: React.CSSProperties;
572
+ }
558
573
  export type TagComponentType = React.FC<Omit<TagProps, "closable" | "closeIcon" | "onClose"> & {
559
574
  color?: TagColor;
560
575
  size?: "small" | "medium";
561
576
  hoverable?: boolean;
562
577
  }> & {
563
578
  SplitTag: SplitTagComponentType;
579
+ NameTag: React.FC<NameTagType>;
564
580
  };
565
581
  export type StatusCapsuleColor = "red" | "yellow" | "green" | "blue" | "gray" | "success" | "danger" | "warning";
566
582
  export type StatusCapsuleComponentType = React.FC<Omit<TagProps, "closable" | "closeIcon" | "onClose" | "icon" | "size"> & {
@@ -570,12 +586,6 @@ export type StatusCapsuleComponentType = React.FC<Omit<TagProps, "closable" | "c
570
586
  offWhiteMode?: boolean;
571
587
  number?: number;
572
588
  }>;
573
- export type SplitTagComponentType = React.FC<Omit<TagProps, "closable" | "closeIcon" | "onClose" | "visible"> & {
574
- color?: "red" | "yellow" | "green" | "blue" | "purple" | "gray";
575
- size?: "small" | "medium";
576
- primaryContent: React.ReactNode;
577
- secondaryContent: React.ReactNode;
578
- }>;
579
589
  export type TokenColor = "red" | "yellow" | "green" | "blue" | "gray" | "purple";
580
590
  export type TokenType = Omit<TagProps, "closeIcon"> & {
581
591
  color?: TokenColor;
@@ -597,4 +607,35 @@ export type TruncateTextWithTooltipType = {
597
607
  text: string;
598
608
  textWrapperCls?: string;
599
609
  } & Omit<TooltipProps, "title">;
610
+ export type I18nNameTagType = {
611
+ name: string;
612
+ i18nKey: string;
613
+ [key: string]: unknown;
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 CronCalendarProps = {
628
+ plans: {
629
+ expression: string;
630
+ startAt: Dayjs;
631
+ empty: boolean;
632
+ }[];
633
+ };
634
+ export type SwitchWithTextProps = PropsFrom<Kit["switch"]> & {
635
+ text?: {
636
+ checked: React.ReactNode;
637
+ unchecked: React.ReactNode;
638
+ };
639
+ };
640
+ export type CalendarComponentType = React.FC<CalendarProps<Moment>>;
600
641
  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;