wargerm 0.6.24 → 0.7.0

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.
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import 'moment/locale/zh-cn';
2
+ import 'dayjs/locale/zh-cn';
3
3
  declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>>;
4
4
  export default _default;
@@ -1,21 +1,21 @@
1
- import { Moment } from 'moment';
2
- export declare function getMonthDays(date?: string | Moment): number;
1
+ import { Dayjs } from 'dayjs';
2
+ export declare function getMonthDays(date?: string | Dayjs): number;
3
3
  /**
4
4
  * 获取当前月第一天是星期几
5
5
  */
6
- export declare function getWeekDays(date?: Moment): number;
6
+ export declare function getWeekDays(date?: Dayjs): number;
7
7
  /**
8
8
  * 获取当前星期第一天到星期天
9
9
  */
10
- export declare function getWeekList(date?: Moment): string[];
10
+ export declare function getWeekList(date?: Dayjs): string[];
11
11
  /**
12
12
  * 获取上个月份
13
13
  */
14
- export declare function getLastMonth(date?: Moment): string;
14
+ export declare function getLastMonth(date?: Dayjs): string;
15
15
  /**
16
16
  * 获取下个月份
17
17
  */
18
- export declare function getNextMonth(date?: Moment): string;
18
+ export declare function getNextMonth(date?: Dayjs): string;
19
19
  /**
20
20
  * 格式化日期为两个单词,例如:‘1’号 格式为 ‘01’
21
21
  * @param {*} dateNumber
@@ -24,7 +24,7 @@ export declare const formatDayWithTwoWords: (dateNumber: number) => string | num
24
24
  /**
25
25
  * 初始化日历
26
26
  */
27
- export declare function initCalendar(date?: Moment): {
27
+ export declare function initCalendar(date?: Dayjs): {
28
28
  date: string;
29
29
  text: string | number;
30
30
  isCurrentMonth: boolean;
@@ -33,7 +33,7 @@ export declare function initCalendar(date?: Moment): {
33
33
  /**
34
34
  * 初始化日历
35
35
  */
36
- export declare function initWeekCalendar(type: string, date?: Moment): ({
36
+ export declare function initWeekCalendar(type: string, date?: Dayjs): ({
37
37
  text: string;
38
38
  date?: undefined;
39
39
  } | {
@@ -1,9 +1,9 @@
1
1
  import { FC } from 'react';
2
- import { CascaderProps } from 'antd/lib/Cascader';
3
- export interface ICascader extends CascaderProps<any> {
2
+ import { CascaderProps } from 'antd';
3
+ export declare type ICascader = CascaderProps<any> & {
4
4
  request?: () => Promise<any>;
5
5
  onLoad?: (options: Record<string, any>[]) => void;
6
6
  params?: Record<string, any>;
7
- }
7
+ };
8
8
  declare const WCascader: FC<ICascader>;
9
9
  export default WCascader;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DatePickerProps, RangePickerProps } from 'antd/lib/date-picker';
3
- import 'moment/locale/zh-cn';
3
+ import 'dayjs/locale/zh-cn';
4
4
  export declare type IRangePickerProps = RangePickerProps & {
5
5
  getRangePickerValue?: (value: any) => void;
6
6
  panelType?: string;
@@ -4,11 +4,11 @@ declare type Props = {
4
4
  children?: string | ReactNode;
5
5
  closeIcon?: ReactNode;
6
6
  onClose?: () => void;
7
- visible: boolean;
7
+ open: boolean;
8
8
  isDrag?: boolean;
9
9
  isResize?: boolean;
10
10
  className?: string;
11
11
  style?: React.CSSProperties;
12
12
  };
13
- export default function DragBox({ title, children, closeIcon, onClose, visible, isDrag, isResize, className, style, }: Props): JSX.Element;
13
+ export default function DragBox({ title, children, closeIcon, onClose, open, isDrag, isResize, className, style, }: Props): JSX.Element;
14
14
  export {};
@@ -12,12 +12,12 @@ declare type Props = {
12
12
  destroyOnClose?: boolean;
13
13
  hiddenMask?: boolean;
14
14
  isResize?: boolean;
15
- visible?: boolean;
15
+ open?: boolean;
16
16
  width?: number;
17
17
  className?: string;
18
18
  style?: React.CSSProperties;
19
19
  children?: ReactNode;
20
20
  ref?: any;
21
21
  };
22
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "width" | "visible" | "destroyOnClose" | "closeCb" | "onClose" | "hiddenMask" | "isResize" | "className" | "style" | "title" | "onOk" | "onCancel" | "footer" | "content" | "okText" | "cancelText" | "children"> & React.RefAttributes<unknown>>;
22
+ declare const _default: React.ForwardRefExoticComponent<Pick<Props, "width" | "open" | "destroyOnClose" | "closeCb" | "onClose" | "hiddenMask" | "isResize" | "className" | "style" | "title" | "onOk" | "onCancel" | "footer" | "content" | "okText" | "cancelText" | "children"> & React.RefAttributes<unknown>>;
23
23
  export default _default;
@@ -9,7 +9,7 @@ declare type Props = {
9
9
  onClose?: () => void;
10
10
  okText?: string;
11
11
  cancelText?: string;
12
- visible?: boolean;
12
+ open?: boolean;
13
13
  renderClose?: ReactNode;
14
14
  destroyOnClose?: boolean;
15
15
  hiddenMask?: boolean;
@@ -9,7 +9,7 @@ declare type Props = {
9
9
  onClose?: () => void;
10
10
  okText?: string;
11
11
  cancelText?: string;
12
- visible?: boolean;
12
+ open?: boolean;
13
13
  width?: number;
14
14
  className?: string;
15
15
  style?: React.CSSProperties;
@@ -10,7 +10,7 @@ declare type Props = {
10
10
  onClose?: () => void;
11
11
  okText?: string;
12
12
  cancelText?: string;
13
- visible?: boolean;
13
+ open?: boolean;
14
14
  isLoading?: boolean;
15
15
  width?: number;
16
16
  className?: string;
@@ -12,5 +12,5 @@ export interface ISelect extends SelectProps<any> {
12
12
  export declare type IWSelectComponent = React.FC<ISelect> & {
13
13
  Option?: React.FC<IOptionProps>;
14
14
  };
15
- declare const _default: React.NamedExoticComponent<ISelect>;
16
- export default _default;
15
+ declare let Index: IWSelectComponent;
16
+ export default Index;
@@ -16,7 +16,7 @@ interface VideoProps extends Omit<IPlayerOptions, 'url' | 'loop'> {
16
16
  /** 是否循环播放 */
17
17
  isLoop?: boolean;
18
18
  /** 是否可见 */
19
- visible?: boolean;
19
+ open?: boolean;
20
20
  /** 是否静音播放 */
21
21
  muted?: boolean;
22
22
  /** 初始化显示首帧 */
@@ -31,5 +31,5 @@ interface VideoProps extends Omit<IPlayerOptions, 'url' | 'loop'> {
31
31
  style?: CSSProperties;
32
32
  className?: string;
33
33
  }
34
- declare const _default: ({ id, videoUrls, definitionList, isLoop, muted, currentIndex: parentIndex, setCurrentIndex: setParentIndex, className, style, visible, autoplay, videoInit, enableMemory, lastPlayTimeHideDelay, ...props }: VideoProps) => JSX.Element;
34
+ declare const _default: ({ id, videoUrls, definitionList, isLoop, muted, currentIndex: parentIndex, setCurrentIndex: setParentIndex, className, style, open, autoplay, videoInit, enableMemory, lastPlayTimeHideDelay, ...props }: VideoProps) => JSX.Element;
35
35
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { DatePickerProps, RangePickerProps } from 'antd/lib/date-picker';
3
- import 'moment/locale/zh-cn';
3
+ import 'dayjs/locale/zh-cn';
4
4
  export declare type IndexComponent = React.FC<DatePickerProps> & {
5
5
  RangePicker: React.FC<RangePickerProps>;
6
6
  showTime: Object | boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * 需要得到一个不变的函数引用,但是这个不变的函数执行的时候,执行的是传递的最新的函数
3
+ * @param callback 传递最新的函数
4
+ * @returns 返回不变的函数
5
+ */
6
+ export declare function useCallbackRef<T extends (...args: any[]) => void>(callback: T): T;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function useForceUpdate(): import("react").DispatchWithoutAction;
3
+ export default useForceUpdate;