@jiaozhiye/qm-design-react 1.9.8 → 1.9.10
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.
- package/lib/anchor/src/anchor.d.ts +2 -0
- package/lib/button/src/button.d.ts +2 -0
- package/lib/collapse/src/Content.d.ts +1 -1
- package/lib/countup/src/countup.d.ts +2 -0
- package/lib/divider/src/divider.d.ts +2 -0
- package/lib/download/src/download.d.ts +2 -0
- package/lib/drawer/src/drawer.d.ts +2 -0
- package/lib/empty/src/empty.d.ts +2 -0
- package/lib/form/src/fields-filter.d.ts +2 -0
- package/lib/form/src/form-cascader.d.ts +2 -0
- package/lib/form/src/form-checkbox-group.d.ts +2 -0
- package/lib/form/src/form-checkbox.d.ts +2 -0
- package/lib/form/src/form-city-select.d.ts +2 -0
- package/lib/form/src/form-date.d.ts +2 -0
- package/lib/form/src/form-divider.d.ts +2 -0
- package/lib/form/src/form-immediate.d.ts +2 -0
- package/lib/form/src/form-input-number.d.ts +2 -0
- package/lib/form/src/form-input.d.ts +2 -0
- package/lib/form/src/form-multiple-search-helper.d.ts +2 -0
- package/lib/form/src/form-multiple-tree-table-helper.d.ts +2 -0
- package/lib/form/src/form-radio.d.ts +2 -0
- package/lib/form/src/form-range-date.d.ts +2 -0
- package/lib/form/src/form-range-input-number.d.ts +2 -0
- package/lib/form/src/form-range-input.d.ts +2 -0
- package/lib/form/src/form-range-search-helper.d.ts +2 -0
- package/lib/form/src/form-range-time.d.ts +2 -0
- package/lib/form/src/form-rate.d.ts +2 -0
- package/lib/form/src/form-region-select.d.ts +2 -0
- package/lib/form/src/form-search-helper.d.ts +2 -0
- package/lib/form/src/form-select.d.ts +2 -0
- package/lib/form/src/form-switch.d.ts +2 -0
- package/lib/form/src/form-text-area.d.ts +2 -0
- package/lib/form/src/form-time.d.ts +2 -0
- package/lib/form/src/form-tinymce.d.ts +2 -0
- package/lib/form/src/form-tree-select.d.ts +2 -0
- package/lib/form/src/form-tree-table-helper.d.ts +2 -0
- package/lib/form/src/form-upload-file.d.ts +2 -0
- package/lib/form/src/form-upload-img.d.ts +2 -0
- package/lib/form/src/form.d.ts +5 -4
- package/lib/form/src/types.d.ts +0 -1
- package/lib/hooks/useDebounce.d.ts +2 -3
- package/lib/hooks/useThrottle.d.ts +2 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/modal/src/modal.d.ts +3 -1
- package/lib/print/src/container.d.ts +1 -1
- package/lib/print/src/preview.d.ts +3 -1
- package/lib/print/src/print.d.ts +3 -1
- package/lib/print/src/setting.d.ts +2 -0
- package/lib/space/src/space.d.ts +2 -0
- package/lib/split/src/split-pane.d.ts +1 -0
- package/lib/table/src/hooks/useTableCore.d.ts +2 -2
- package/lib/tabs/src/tabs.d.ts +2 -0
- package/lib/tinymce/src/index.d.ts +2 -0
- package/lib/upload-file/src/upload-file.d.ts +3 -1
- package/lib/upload-img/src/cropper-preview.d.ts +3 -0
- package/lib/upload-img/src/upload-img.d.ts +3 -1
- package/package.json +6 -6
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
4
5
|
type ILabelItem = {
|
|
5
6
|
id: string;
|
|
@@ -40,6 +41,7 @@ declare class QmAnchor extends Component<IProps, IState> {
|
|
|
40
41
|
tabPosition: string;
|
|
41
42
|
};
|
|
42
43
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
44
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
43
45
|
private currentState;
|
|
44
46
|
private itemsTotal;
|
|
45
47
|
private timer;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import type { IAuth } from '../../_utils/types';
|
|
4
5
|
import type { ButtonProps as AntButtonProps } from '../../antd';
|
|
5
6
|
type IProps = AntButtonProps & {
|
|
@@ -25,6 +26,7 @@ declare class QmButton extends Component<IProps, IState> {
|
|
|
25
26
|
}>>;
|
|
26
27
|
};
|
|
27
28
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
29
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
28
30
|
state: IState;
|
|
29
31
|
clickHandle: (ev: any) => Promise<void>;
|
|
30
32
|
render(): React.JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const PanelContent: React.ForwardRefExoticComponent<
|
|
2
|
+
declare const PanelContent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export default PanelContent;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { CountUpProps } from 'react-countup/build/CountUp';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
4
5
|
type IProps = CountUpProps & {
|
|
5
6
|
size?: ComponentSize;
|
|
@@ -12,6 +13,7 @@ declare class QmCountup extends Component<IProps> {
|
|
|
12
13
|
duration: number;
|
|
13
14
|
};
|
|
14
15
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
16
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
15
17
|
render(): React.JSX.Element;
|
|
16
18
|
}
|
|
17
19
|
export default QmCountup;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import type { ComponentSize, CSSProperties, JSXElement } from '../../_utils/types';
|
|
4
5
|
type IProps = {
|
|
5
6
|
label: string;
|
|
@@ -16,6 +17,7 @@ type IProps = {
|
|
|
16
17
|
export type DividerProps = IProps;
|
|
17
18
|
declare class QmDivider extends Component<IProps> {
|
|
18
19
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
20
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
19
21
|
static propTypes: {
|
|
20
22
|
label: PropTypes.Requireable<string>;
|
|
21
23
|
size: (props: any, propName: any, componentName: any) => void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import type { AnyObject, AjaxResponse, ComponentSize } from '../../_utils/types';
|
|
4
5
|
import type { ButtonProps } from '../../antd';
|
|
5
6
|
export type HttpRequestHeader = {
|
|
@@ -45,6 +46,7 @@ declare class QmDownload extends Component<IProps, IState> {
|
|
|
45
46
|
withCredentials: boolean;
|
|
46
47
|
};
|
|
47
48
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
49
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
48
50
|
state: IState;
|
|
49
51
|
getActionUrl(): Promise<string>;
|
|
50
52
|
downloadHandle: () => Promise<void>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import type { ComponentSize, Nullable } from '../../_utils/types';
|
|
4
5
|
import type { DrawerProps as AntDrawerProps } from '../../antd';
|
|
5
6
|
type EventType = React.MouseEvent<HTMLElement>;
|
|
@@ -21,6 +22,7 @@ type IState = {
|
|
|
21
22
|
export type DrawerProps = IProps;
|
|
22
23
|
declare class QmDrawer extends Component<IProps, IState> {
|
|
23
24
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
25
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
24
26
|
static propTypes: {
|
|
25
27
|
size: (props: any, propName: any, componentName: any) => void;
|
|
26
28
|
spinning: PropTypes.Requireable<boolean>;
|
package/lib/empty/src/empty.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { ComponentSize } from '../../_utils/types';
|
|
3
4
|
import type { EmptyProps as AntEmptyProps } from '../../antd';
|
|
4
5
|
type IProps = AntEmptyProps & {
|
|
@@ -7,6 +8,7 @@ type IProps = AntEmptyProps & {
|
|
|
7
8
|
export type EmptyProps = IProps;
|
|
8
9
|
declare class QmEmpty extends Component<IProps> {
|
|
9
10
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
11
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
10
12
|
static propTypes: {
|
|
11
13
|
size: (props: any, propName: any, componentName: any) => void;
|
|
12
14
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
uniqueKey?: string;
|
|
@@ -10,6 +11,7 @@ type IState = {
|
|
|
10
11
|
};
|
|
11
12
|
declare class FieldsFilter extends Component<IProps, IState> {
|
|
12
13
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
14
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
13
15
|
private linkRef;
|
|
14
16
|
state: IState;
|
|
15
17
|
get formUniqueKey(): string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
import type { IDict } from '../../_utils/types';
|
|
4
5
|
type IProps = {
|
|
@@ -11,6 +12,7 @@ type IState = {
|
|
|
11
12
|
};
|
|
12
13
|
declare class FormCascader extends Component<IProps, IState> {
|
|
13
14
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
15
|
+
context: React.ContextType<typeof FormContext>;
|
|
14
16
|
state: IState;
|
|
15
17
|
componentDidMount(): void;
|
|
16
18
|
componentWillUnmount(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
import type { IDict } from '../../_utils/types';
|
|
4
5
|
type IProps = {
|
|
@@ -9,6 +10,7 @@ type IState = {
|
|
|
9
10
|
};
|
|
10
11
|
declare class FormCheckboxGroup extends Component<IProps, IState> {
|
|
11
12
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
13
|
+
context: React.ContextType<typeof FormContext>;
|
|
12
14
|
state: IState;
|
|
13
15
|
componentDidMount(): void;
|
|
14
16
|
componentWillUnmount(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -11,6 +12,7 @@ type ICheckboxProps<T = string | number> = IProps & {
|
|
|
11
12
|
export declare const VCheckbox: React.FC<ICheckboxProps>;
|
|
12
13
|
declare class FormCheckbox extends Component<IProps> {
|
|
13
14
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
15
|
+
context: React.ContextType<typeof FormContext>;
|
|
14
16
|
render(): React.JSX.Element;
|
|
15
17
|
}
|
|
16
18
|
export default FormCheckbox;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormCitySelect extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormCitySelect;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormDate extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormDate;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormDivider extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormDivider;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -8,6 +9,7 @@ type IState = {
|
|
|
8
9
|
};
|
|
9
10
|
declare class FormImmediate extends Component<IProps, IState> {
|
|
10
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
|
+
context: React.ContextType<typeof FormContext>;
|
|
11
13
|
private promiseRef;
|
|
12
14
|
state: IState;
|
|
13
15
|
constructor(props: IProps, { $$form }: {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormInputNumber extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
focus: () => void;
|
|
9
11
|
render(): React.JSX.Element;
|
|
10
12
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormInput extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
focus: () => void;
|
|
9
11
|
render(): React.JSX.Element;
|
|
10
12
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -8,6 +9,7 @@ type IState = {
|
|
|
8
9
|
};
|
|
9
10
|
declare class FormMultipleSearchHelper extends Component<IProps, IState> {
|
|
10
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
|
+
context: React.ContextType<typeof FormContext>;
|
|
11
13
|
private promiseRef;
|
|
12
14
|
state: IState;
|
|
13
15
|
constructor(props: IProps, { $$form }: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -8,6 +9,7 @@ type IState = {
|
|
|
8
9
|
};
|
|
9
10
|
declare class FormMultipleTreeTableHelper extends Component<IProps, IState> {
|
|
10
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
|
+
context: React.ContextType<typeof FormContext>;
|
|
11
13
|
private promiseRef;
|
|
12
14
|
state: IState;
|
|
13
15
|
constructor(props: IProps, { $$form }: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
import type { IDict } from '../../_utils/types';
|
|
4
5
|
type IProps = {
|
|
@@ -9,6 +10,7 @@ type IState = {
|
|
|
9
10
|
};
|
|
10
11
|
declare class FormRadio extends Component<IProps, IState> {
|
|
11
12
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
13
|
+
context: React.ContextType<typeof FormContext>;
|
|
12
14
|
state: IState;
|
|
13
15
|
componentDidMount(): void;
|
|
14
16
|
componentWillUnmount(): void;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormRangeDate extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormRangeDate;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormRangeInputNumber extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormRangeInputNumber;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormRangeInput extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormRangeInput;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -8,6 +9,7 @@ type IState = {
|
|
|
8
9
|
};
|
|
9
10
|
declare class FormRangeSearchHelper extends Component<IProps, IState> {
|
|
10
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
|
+
context: React.ContextType<typeof FormContext>;
|
|
11
13
|
private promiseRef;
|
|
12
14
|
state: IState;
|
|
13
15
|
constructor(props: IProps, { $$form }: {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormRangeTime extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormRangeTime;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormRate extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormRate;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormRegionSelect extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormRegionSelect;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -8,6 +9,7 @@ type IState = {
|
|
|
8
9
|
};
|
|
9
10
|
declare class FormSearchHelper extends Component<IProps, IState> {
|
|
10
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
|
+
context: React.ContextType<typeof FormContext>;
|
|
11
13
|
private promiseRef;
|
|
12
14
|
searchRef: any;
|
|
13
15
|
state: IState;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
import type { IDict } from '../../_utils/types';
|
|
4
5
|
type IProps = {
|
|
@@ -19,6 +20,7 @@ type IVSelectProps<T = string | string[]> = IProps & {
|
|
|
19
20
|
export declare const VSelect: React.FC<IVSelectProps>;
|
|
20
21
|
declare class FormSelect extends Component<IProps, IState> {
|
|
21
22
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
23
|
+
context: React.ContextType<typeof FormContext>;
|
|
22
24
|
state: IState;
|
|
23
25
|
componentDidMount(): void;
|
|
24
26
|
componentWillUnmount(): void;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormSwitch extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormSwitch;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormTextArea extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormTextArea;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormTime extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormTime;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormTinymce extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormTinymce;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
import type { IDict } from '../../_utils/types';
|
|
4
5
|
type IProps = {
|
|
@@ -11,6 +12,7 @@ type IState = {
|
|
|
11
12
|
};
|
|
12
13
|
declare class FormTreeSelect extends Component<IProps, IState> {
|
|
13
14
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
15
|
+
context: React.ContextType<typeof FormContext>;
|
|
14
16
|
state: IState;
|
|
15
17
|
componentDidMount(): void;
|
|
16
18
|
componentWillUnmount(): void;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
@@ -8,6 +9,7 @@ type IState = {
|
|
|
8
9
|
};
|
|
9
10
|
declare class FormTreeTableHelper extends Component<IProps, IState> {
|
|
10
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
|
+
context: React.ContextType<typeof FormContext>;
|
|
11
13
|
private promiseRef;
|
|
12
14
|
state: IState;
|
|
13
15
|
constructor(props: IProps, { $$form }: {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormUploadFile extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormUploadFile;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import FormContext from './context';
|
|
2
3
|
import type { IFormItem } from './types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
option: IFormItem;
|
|
5
6
|
};
|
|
6
7
|
declare class FormUploadImg extends Component<IProps> {
|
|
7
8
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
9
|
+
context: React.ContextType<typeof FormContext>;
|
|
8
10
|
render(): React.JSX.Element;
|
|
9
11
|
}
|
|
10
12
|
export default FormUploadImg;
|
package/lib/form/src/form.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="lodash" />
|
|
2
2
|
import React, { Component } from 'react';
|
|
3
|
+
import ConfigContext from '../../config-provider/context';
|
|
3
4
|
import { IFieldData } from './types';
|
|
4
5
|
import type { IFormProps, IFormData, IFormItem, IExtraData, IViewData, IExpandData, IFieldAuthItem } from './types';
|
|
5
6
|
import type { JSXElement, ValueOf, IDict } from '../../_utils/types';
|
|
@@ -18,6 +19,7 @@ export type FormProps = IProps;
|
|
|
18
19
|
export type FormRef = QmForm;
|
|
19
20
|
declare class QmForm extends Component<IProps, IState> {
|
|
20
21
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
22
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
21
23
|
static propTypes: {
|
|
22
24
|
items: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
23
25
|
type: import("prop-types").Validator<string>;
|
|
@@ -71,7 +73,6 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
71
73
|
onFinishFailed: () => void;
|
|
72
74
|
onReset: () => void;
|
|
73
75
|
onCollapse: () => void;
|
|
74
|
-
onFormItemsChange: () => void;
|
|
75
76
|
};
|
|
76
77
|
private provide;
|
|
77
78
|
private _initialValues;
|
|
@@ -83,7 +84,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
83
84
|
private originItems;
|
|
84
85
|
state: IState;
|
|
85
86
|
constructor(props: IProps);
|
|
86
|
-
get $size():
|
|
87
|
+
get $size(): import("../../_utils/types").ComponentSize;
|
|
87
88
|
get verticalLayout(): boolean;
|
|
88
89
|
get formItems(): IFormItem[];
|
|
89
90
|
get flattenItems(): IFormItem[];
|
|
@@ -120,7 +121,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
120
121
|
getViewValue(fieldName: string): string;
|
|
121
122
|
setExpandHandle(collapse: boolean): void;
|
|
122
123
|
createInputFocus(): void;
|
|
123
|
-
getFormItemLabel
|
|
124
|
+
getFormItemLabel<T extends React.ReactNode>(label: T | IFormItem): string;
|
|
124
125
|
getBlockDerivedItems(): Pick<IFormItem, "label" | "fieldName">[][];
|
|
125
126
|
getFormItemDisplay({ type, fieldName }: {
|
|
126
127
|
type: any;
|
|
@@ -161,7 +162,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
161
162
|
UPLOAD_FILE(option: IFormItem): JSXElement;
|
|
162
163
|
UPLOAD_IMG(option: IFormItem): JSXElement;
|
|
163
164
|
TINYMCE(option: IFormItem): JSXElement;
|
|
164
|
-
renderFormLabel
|
|
165
|
+
renderFormLabel<T extends React.ReactNode>(label: T | IFormItem): React.ReactNode;
|
|
165
166
|
renderFormItemExtra(option: IFormItem['extra'] & {
|
|
166
167
|
fieldName: string;
|
|
167
168
|
}): React.JSX.Element;
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
type
|
|
2
|
-
export default function useDebounce<T extends
|
|
3
|
-
export {};
|
|
1
|
+
import type { AnyFunction } from '../_utils/types';
|
|
2
|
+
export default function useDebounce<T extends AnyFunction<any>>(fn: T, delay?: number): (...args: Parameters<T>) => void;
|