@jiaozhiye/qm-design-react 1.6.1 → 1.6.2
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/_utils/resize-event.d.ts +2 -2
- package/lib/_utils/types.d.ts +15 -15
- package/lib/anchor/src/anchor-item.d.ts +3 -3
- package/lib/anchor/src/anchor-nav.d.ts +2 -2
- package/lib/anchor/src/anchor.d.ts +5 -5
- package/lib/antd/TimePicker.d.ts +1 -1
- package/lib/button/src/button.d.ts +4 -4
- package/lib/collapse/src/collapse.d.ts +2 -2
- package/lib/config-provider/context.d.ts +1 -1
- package/lib/config-provider/src/config-provider.d.ts +4 -4
- package/lib/copy-to-clipboard/src/copy-to-clipboard.d.ts +2 -2
- package/lib/countup/src/countup.d.ts +3 -3
- package/lib/cropper/src/cropper.d.ts +4 -4
- package/lib/divider/src/divider.d.ts +4 -4
- package/lib/download/src/download.d.ts +9 -9
- package/lib/drawer/src/drawer.d.ts +6 -6
- package/lib/empty/src/empty.d.ts +3 -3
- package/lib/form/src/context.d.ts +1 -1
- package/lib/form/src/fields-filter.d.ts +4 -4
- package/lib/form/src/form-cascader.d.ts +3 -3
- package/lib/form/src/form-checkbox-group.d.ts +3 -3
- package/lib/form/src/form-checkbox.d.ts +2 -2
- package/lib/form/src/form-city-select.d.ts +2 -2
- package/lib/form/src/form-date.d.ts +2 -2
- package/lib/form/src/form-divider.d.ts +2 -2
- package/lib/form/src/form-immediate.d.ts +3 -3
- package/lib/form/src/form-input-number.d.ts +2 -2
- package/lib/form/src/form-input.d.ts +2 -2
- package/lib/form/src/form-item-view.d.ts +1 -1
- package/lib/form/src/form-multiple-search-helper.d.ts +3 -3
- package/lib/form/src/form-multiple-tree-table-helper.d.ts +3 -3
- package/lib/form/src/form-radio.d.ts +3 -3
- package/lib/form/src/form-range-date.d.ts +2 -2
- package/lib/form/src/form-range-input-number.d.ts +2 -2
- package/lib/form/src/form-range-input.d.ts +2 -2
- package/lib/form/src/form-range-search-helper.d.ts +3 -3
- package/lib/form/src/form-range-time.d.ts +2 -2
- package/lib/form/src/form-rate.d.ts +2 -2
- package/lib/form/src/form-region-select.d.ts +2 -2
- package/lib/form/src/form-search-helper.d.ts +3 -3
- package/lib/form/src/form-select.d.ts +3 -3
- package/lib/form/src/form-switch.d.ts +2 -2
- package/lib/form/src/form-text-area.d.ts +2 -2
- package/lib/form/src/form-time.d.ts +2 -2
- package/lib/form/src/form-tinymce.d.ts +2 -2
- package/lib/form/src/form-tree-select.d.ts +3 -3
- package/lib/form/src/form-tree-table-helper.d.ts +3 -3
- package/lib/form/src/form-upload-file.d.ts +2 -2
- package/lib/form/src/form-upload-img.d.ts +2 -2
- package/lib/form/src/form.d.ts +13 -13
- package/lib/form/src/types.d.ts +25 -25
- package/lib/form/style/index.less +1 -1
- package/lib/hooks/useDebounce.d.ts +1 -1
- package/lib/index.esm.js +2 -2
- package/lib/index.full.js +1 -1
- package/lib/index.js +2 -2
- package/lib/locale/index.d.ts +2 -2
- package/lib/locale/index.js +5 -5
- package/lib/modal/src/modal.d.ts +6 -6
- package/lib/print/src/container.d.ts +2 -2
- package/lib/print/src/context.d.ts +1 -1
- package/lib/print/src/preview.d.ts +3 -3
- package/lib/print/src/print.d.ts +6 -6
- package/lib/print/src/setting.d.ts +3 -3
- package/lib/range-table-helper/src/range-table-helper.d.ts +3 -3
- package/lib/search-helper/src/search-helper.d.ts +3 -3
- package/lib/search-tree/src/search-tree.d.ts +3 -3
- package/lib/space/src/space.d.ts +3 -3
- package/lib/spin/src/spin.d.ts +4 -4
- package/lib/split/src/context.d.ts +1 -1
- package/lib/split/src/resize-bar.d.ts +1 -1
- package/lib/split/src/split-pane.d.ts +2 -2
- package/lib/split/src/split.d.ts +2 -2
- package/lib/style/index.css +2 -2
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/alert/index.d.ts +1 -1
- package/lib/table/src/body/index.d.ts +1 -1
- package/lib/table/src/body/useMergeCell.d.ts +2 -1
- package/lib/table/src/clipboard/index.d.ts +1 -1
- package/lib/table/src/clipboard/setting.d.ts +1 -1
- package/lib/table/src/column-filter/index.d.ts +1 -1
- package/lib/table/src/context/index.d.ts +1 -1
- package/lib/table/src/edit/InputNumber.d.ts +1 -1
- package/lib/table/src/edit/index.d.ts +1 -1
- package/lib/table/src/expandable/all.d.ts +1 -1
- package/lib/table/src/expandable/index.d.ts +1 -1
- package/lib/table/src/export/define.d.ts +1 -1
- package/lib/table/src/export/index.d.ts +2 -2
- package/lib/table/src/export/setting.d.ts +1 -1
- package/lib/table/src/export/useExport.d.ts +2 -2
- package/lib/table/src/fast-search/index.d.ts +1 -1
- package/lib/table/src/fast-search/setting.d.ts +1 -1
- package/lib/table/src/filter/index.d.ts +1 -1
- package/lib/table/src/footer/index.d.ts +1 -1
- package/lib/table/src/full-screen/index.d.ts +1 -1
- package/lib/table/src/group-summary/index.d.ts +1 -1
- package/lib/table/src/group-summary/result.d.ts +1 -1
- package/lib/table/src/group-summary/setting.d.ts +1 -1
- package/lib/table/src/header/index.d.ts +1 -1
- package/lib/table/src/hooks/useImperativeMethod.d.ts +1 -1
- package/lib/table/src/hooks/useTableCore.d.ts +1 -1
- package/lib/table/src/hooks/useTableEffect.d.ts +1 -1
- package/lib/table/src/hooks/useTableLayout.d.ts +1 -1
- package/lib/table/src/hooks/useTableMemo.d.ts +1 -1
- package/lib/table/src/hooks/useTableRef.d.ts +2 -2
- package/lib/table/src/hooks/useTableState.d.ts +1 -1
- package/lib/table/src/import/SelectFile.d.ts +1 -1
- package/lib/table/src/import/index.d.ts +1 -1
- package/lib/table/src/import/setting.d.ts +1 -1
- package/lib/table/src/manager/index.d.ts +1 -1
- package/lib/table/src/pager/index.d.ts +1 -1
- package/lib/table/src/print/index.d.ts +1 -1
- package/lib/table/src/reload/index.d.ts +1 -1
- package/lib/table/src/resizable/index.d.ts +1 -1
- package/lib/table/src/select-collection/index.d.ts +1 -1
- package/lib/table/src/select-collection/result.d.ts +1 -1
- package/lib/table/src/selection/all.d.ts +1 -1
- package/lib/table/src/selection/index.d.ts +1 -1
- package/lib/table/src/store/index.d.ts +2 -2
- package/lib/table/src/super-search/index.d.ts +1 -1
- package/lib/table/src/super-search/result.d.ts +1 -1
- package/lib/table/src/table/index.d.ts +1 -1
- package/lib/table/src/table/props.d.ts +5 -5
- package/lib/table/src/table/types.d.ts +45 -45
- package/lib/table/src/toolbox/index.d.ts +1 -1
- package/lib/tabs/src/tab-pane.d.ts +4 -4
- package/lib/tabs/src/tabs.d.ts +3 -3
- package/lib/tinymce/src/Events.d.ts +2 -2
- package/lib/tinymce/src/ScriptLoader.d.ts +1 -1
- package/lib/tinymce/src/Utils.d.ts +1 -1
- package/lib/tinymce/src/components/Editor.d.ts +1 -1
- package/lib/tinymce/src/components/EditorPropTypes.d.ts +2 -2
- package/lib/tinymce/src/index.d.ts +3 -3
- package/lib/tree-helper/src/tree-helper.d.ts +2 -2
- package/lib/tree-table-helper/src/tree-table-helper.d.ts +3 -3
- package/lib/upload-file/src/upload-file.d.ts +5 -5
- package/lib/upload-img/src/cropper-preview.d.ts +4 -4
- package/lib/upload-img/src/upload-img.d.ts +5 -5
- package/package.json +19 -19
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type IState = {
|
|
7
7
|
searchHelper: IFormItem['searchHelper'];
|
|
8
8
|
};
|
|
9
9
|
declare class FormMultipleTreeTableHelper extends Component<IProps, IState> {
|
|
@@ -15,6 +15,6 @@ declare class FormMultipleTreeTableHelper extends Component<IProps, IState> {
|
|
|
15
15
|
});
|
|
16
16
|
waiting: () => Promise<void>;
|
|
17
17
|
getHelperConfig: ($configContext: any) => void;
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export default FormMultipleTreeTableHelper;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
3
|
import type { IDict } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
option: IFormItem;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type IState = {
|
|
8
8
|
itemList: IDict[];
|
|
9
9
|
};
|
|
10
10
|
declare class FormRadio extends Component<IProps, IState> {
|
|
@@ -14,6 +14,6 @@ declare class FormRadio extends Component<IProps, IState> {
|
|
|
14
14
|
componentWillUnmount(): void;
|
|
15
15
|
componentDidUpdate(prevProps: IProps): void;
|
|
16
16
|
getItemList: () => Promise<void>;
|
|
17
|
-
render(): JSX.Element;
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
18
|
}
|
|
19
19
|
export default FormRadio;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormRangeDate extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormRangeDate;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormRangeInputNumber extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormRangeInputNumber;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormRangeInput extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormRangeInput;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type IState = {
|
|
7
7
|
searchHelper: IFormItem['searchHelper'];
|
|
8
8
|
};
|
|
9
9
|
declare class FormRangeSearchHelper extends Component<IProps, IState> {
|
|
@@ -15,6 +15,6 @@ declare class FormRangeSearchHelper extends Component<IProps, IState> {
|
|
|
15
15
|
});
|
|
16
16
|
waiting: () => Promise<void>;
|
|
17
17
|
getHelperConfig: ($configContext: any) => void;
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export default FormRangeSearchHelper;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormRangeTime extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormRangeTime;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormRate extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormRate;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormRegionSelect extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormRegionSelect;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type IState = {
|
|
7
7
|
searchHelper: IFormItem['searchHelper'];
|
|
8
8
|
};
|
|
9
9
|
declare class FormSearchHelper extends Component<IProps, IState> {
|
|
@@ -16,6 +16,6 @@ declare class FormSearchHelper extends Component<IProps, IState> {
|
|
|
16
16
|
});
|
|
17
17
|
waiting: () => Promise<void>;
|
|
18
18
|
getHelperConfig: ($configContext: any) => void;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
export default FormSearchHelper;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
3
|
import type { IDict } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
option: IFormItem;
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type IState = {
|
|
9
9
|
itemList: IDict[];
|
|
10
10
|
loading: boolean;
|
|
11
11
|
};
|
|
@@ -16,6 +16,6 @@ declare class FormSelect extends Component<IProps, IState> {
|
|
|
16
16
|
componentWillUnmount(): void;
|
|
17
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
18
18
|
getItemList: () => Promise<void>;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
export default FormSelect;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormSwitch extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormSwitch;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormTextArea extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormTextArea;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormTime extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormTime;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
declare class FormTinymce extends Component<IProps> {
|
|
7
7
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
}
|
|
10
10
|
export default FormTinymce;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
3
|
import type { IDict } from '../../_utils/types';
|
|
4
|
-
|
|
4
|
+
type IProps = {
|
|
5
5
|
option: IFormItem;
|
|
6
6
|
multiple?: boolean;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type IState = {
|
|
9
9
|
itemList: IDict[];
|
|
10
10
|
loading: boolean;
|
|
11
11
|
};
|
|
@@ -16,6 +16,6 @@ declare class FormTreeSelect extends Component<IProps, IState> {
|
|
|
16
16
|
componentWillUnmount(): void;
|
|
17
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
18
18
|
getItemList: () => Promise<void>;
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
export default FormTreeSelect;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type IState = {
|
|
7
7
|
searchHelper: IFormItem['searchHelper'];
|
|
8
8
|
};
|
|
9
9
|
declare class FormTreeTableHelper extends Component<IProps, IState> {
|
|
@@ -15,6 +15,6 @@ declare class FormTreeTableHelper extends Component<IProps, IState> {
|
|
|
15
15
|
});
|
|
16
16
|
waiting: () => Promise<void>;
|
|
17
17
|
getHelperConfig: ($configContext: any) => void;
|
|
18
|
-
render(): JSX.Element;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
19
|
}
|
|
20
20
|
export default FormTreeTableHelper;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
export interface UploadFile {
|
|
@@ -13,6 +13,6 @@ export interface UploadFile {
|
|
|
13
13
|
}
|
|
14
14
|
declare class FormUploadFile extends Component<IProps> {
|
|
15
15
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
17
|
}
|
|
18
18
|
export default FormUploadFile;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import type { IFormItem } from './types';
|
|
3
|
-
|
|
3
|
+
type IProps = {
|
|
4
4
|
option: IFormItem;
|
|
5
5
|
};
|
|
6
6
|
export interface UploadFile {
|
|
@@ -13,6 +13,6 @@ export interface UploadFile {
|
|
|
13
13
|
}
|
|
14
14
|
declare class FormUploadImg extends Component<IProps> {
|
|
15
15
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
17
|
}
|
|
18
18
|
export default FormUploadImg;
|
package/lib/form/src/form.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { IFieldData } from './types';
|
|
|
4
4
|
import type { IFormProps, IFormData, IFormItem, IExtraData, IViewData, IExpandData, IFieldAuthItem } from './types';
|
|
5
5
|
import type { JSXElement, ValueOf, IDict } from '../../_utils/types';
|
|
6
6
|
import type { FormProps } from '../../antd';
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
type IProps = FormProps & IFormProps;
|
|
8
|
+
type IState = {
|
|
9
9
|
formData: IFormData;
|
|
10
10
|
viewData: IViewData;
|
|
11
11
|
other: IFormData;
|
|
@@ -14,8 +14,8 @@ declare type IState = {
|
|
|
14
14
|
flexCols: number;
|
|
15
15
|
collapse: boolean;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type QmFormProps = IProps;
|
|
18
|
+
export type FormRef = QmForm;
|
|
19
19
|
declare class QmForm extends Component<IProps, IState> {
|
|
20
20
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
21
21
|
static propTypes: {
|
|
@@ -30,7 +30,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
30
30
|
cols: import("prop-types").Requireable<number>;
|
|
31
31
|
customClass: import("prop-types").Requireable<string>;
|
|
32
32
|
compactMode: import("prop-types").Requireable<boolean>;
|
|
33
|
-
labelWidth: import("prop-types").Requireable<string | number
|
|
33
|
+
labelWidth: import("prop-types").Requireable<NonNullable<string | number | null | undefined>>;
|
|
34
34
|
labelAlign: import("prop-types").Requireable<string>;
|
|
35
35
|
labelWrap: import("prop-types").Requireable<boolean>;
|
|
36
36
|
formType: import("prop-types").Requireable<string>;
|
|
@@ -156,17 +156,17 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
156
156
|
UPLOAD_FILE(option: IFormItem): JSXElement;
|
|
157
157
|
UPLOAD_IMG(option: IFormItem): JSXElement;
|
|
158
158
|
TINYMCE(option: IFormItem): JSXElement;
|
|
159
|
-
renderFormLabel(label: IFormItem | string): string | JSX.Element;
|
|
159
|
+
renderFormLabel(label: IFormItem | string): string | React.JSX.Element;
|
|
160
160
|
renderFormItemExtra(option: IFormItem['extra'] & {
|
|
161
161
|
fieldName: string;
|
|
162
|
-
}): JSX.Element;
|
|
162
|
+
}): React.JSX.Element;
|
|
163
163
|
renderFormItemButton(fieldName: string, buttonAfter: IFormItem['buttonAfter']): JSXElement;
|
|
164
|
-
renderFormItem(option: IFormItem): JSX.Element | null;
|
|
164
|
+
renderFormItem(option: IFormItem): React.JSX.Element | null;
|
|
165
165
|
createFormItem(item: IFormItem): JSXElement;
|
|
166
|
-
createFormLayout(): (JSX.Element | null)[];
|
|
167
|
-
createSearchButtonLayout(lastCols?: number): JSX.Element | null;
|
|
168
|
-
createFormButtonLayout(): JSX.Element | null;
|
|
169
|
-
createFieldsDefine(): JSX.Element;
|
|
166
|
+
createFormLayout(): (React.JSX.Element | null)[];
|
|
167
|
+
createSearchButtonLayout(lastCols?: number): React.JSX.Element | null;
|
|
168
|
+
createFormButtonLayout(): React.JSX.Element | null;
|
|
169
|
+
createFieldsDefine(): React.JSX.Element;
|
|
170
170
|
valuesChangeHandle: (changedValues: IFormData, allValues: IFormData) => void;
|
|
171
171
|
fieldsChangeHandle: (changedFields: IFieldData[], allFields: IFieldData[]) => void;
|
|
172
172
|
finishHandle: (values: IFormData) => void;
|
|
@@ -191,6 +191,6 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
191
191
|
RESET_FORM(): void;
|
|
192
192
|
CREATE_FOCUS(fieldName: string): void;
|
|
193
193
|
SET_FORM_ITEM(fieldName: string, option: Record<string, any>, forceUpdate?: boolean): void;
|
|
194
|
-
render(): JSX.Element;
|
|
194
|
+
render(): React.JSX.Element;
|
|
195
195
|
}
|
|
196
196
|
export default QmForm;
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -10,26 +10,26 @@ export declare const DEFAULT_COL_WIDTH = 300;
|
|
|
10
10
|
export declare const DEFAULT_TRUE_VALUE = "1";
|
|
11
11
|
export declare const DEFAULT_FALSE_VALUE = "0";
|
|
12
12
|
export declare const DEFAULT_LIST_HEIGHT = 400;
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
13
|
+
export type IRecord = Record<string, any>;
|
|
14
|
+
export type IFormLayout = 'horizontal' | 'vertical';
|
|
15
|
+
export type ILabelAlign = 'left' | 'right';
|
|
16
|
+
export type IFormType = 'default' | 'search' | 'onlyShow';
|
|
17
|
+
export type IValidateTrigger = 'onChange' | 'onBlur';
|
|
18
|
+
export type ICheckStrategy = 'SHOW_ALL' | 'SHOW_PARENT' | 'SHOW_CHILD';
|
|
19
|
+
export type IFormItemType = 'DIVIDER' | 'INPUT' | 'TEXT_AREA' | 'RANGE_INPUT' | 'INPUT_NUMBER' | 'RANGE_INPUT_NUMBER' | 'CHECKBOX' | 'MULTIPLE_CHECKBOX' | 'RADIO' | 'SWITCH' | 'RATE' | 'DATE' | 'RANGE_DATE' | 'TIME' | 'RANGE_TIME' | 'SELECT' | 'MULTIPLE_SELECT' | 'IMMEDIATE' | 'SEARCH_HELPER' | 'MULTIPLE_SEARCH_HELPER' | 'TREE_TABLE_HELPER' | 'MULTIPLE_TREE_TABLE_HELPER' | 'RANGE_SEARCH_HELPER' | 'TREE_SELECT' | 'MULTIPLE_TREE_SELECT' | 'CASCADER' | 'MULTIPLE_CASCADER' | 'CITY_SELECT' | 'REGION_SELECT' | 'UPLOAD_FILE' | 'UPLOAD_IMG' | 'TINYMCE';
|
|
20
20
|
export declare const ARRAY_TYPE: IFormItemType[];
|
|
21
21
|
export declare const BUILT_IN_PLACEMENTS: BuildInPlacements;
|
|
22
|
-
export
|
|
22
|
+
export type IFieldsDefine = {
|
|
23
23
|
valueKey: string;
|
|
24
24
|
displayKey?: string;
|
|
25
25
|
extraKey?: string;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type IFieldAuthItem = {
|
|
28
28
|
visible: number;
|
|
29
29
|
disabled?: number;
|
|
30
30
|
secretName?: string;
|
|
31
31
|
};
|
|
32
|
-
export
|
|
32
|
+
export type IDateType = 'date' | 'datetime' | 'exactdate' | 'week' | 'month' | 'quarter' | 'year';
|
|
33
33
|
export declare enum EDateType {
|
|
34
34
|
'date' = "date",
|
|
35
35
|
'datetime' = "date",
|
|
@@ -48,35 +48,35 @@ export declare enum EDateFormat {
|
|
|
48
48
|
'quarter' = "YYYY-[Q]Q",
|
|
49
49
|
'year' = "YYYY"
|
|
50
50
|
}
|
|
51
|
-
export
|
|
51
|
+
export type ITimeType = 'hour' | 'hour-minute' | 'hour-minute-second';
|
|
52
52
|
export declare enum ETimeFormat {
|
|
53
53
|
'hour' = "HH",
|
|
54
54
|
'hour-minute' = "HH:mm",
|
|
55
55
|
'hour-minute-second' = "HH:mm:ss"
|
|
56
56
|
}
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
57
|
+
export type IFormData = Record<string, string | number | any[] | undefined>;
|
|
58
|
+
export type IFetchHeader = Record<string, string>;
|
|
59
|
+
export type IFetchParams = Record<string, any>;
|
|
60
|
+
export type IFieldData = {
|
|
61
61
|
name: string[];
|
|
62
62
|
errors?: string[];
|
|
63
63
|
touched?: boolean;
|
|
64
64
|
validating?: boolean;
|
|
65
65
|
value?: ValueOf<IFormData>;
|
|
66
66
|
};
|
|
67
|
-
export
|
|
68
|
-
export
|
|
69
|
-
export
|
|
70
|
-
export
|
|
71
|
-
export
|
|
72
|
-
export
|
|
67
|
+
export type IExtraData = Record<string, string | number>;
|
|
68
|
+
export type IViewData = Record<string, string>;
|
|
69
|
+
export type IExpandData = Record<string, boolean>;
|
|
70
|
+
export type IFetchFn = (params?: Record<string, unknown>) => Promise<AjaxResponse>;
|
|
71
|
+
export type IFetchFnMaker = (url: string, type?: 'post' | 'get') => IFetchFn;
|
|
72
|
+
export type IRequest = {
|
|
73
73
|
fetchApi?: IFetchFn;
|
|
74
74
|
params?: IFetchParams;
|
|
75
75
|
formatter?: (params: IFetchParams) => IFetchParams;
|
|
76
76
|
dataKey?: string;
|
|
77
77
|
callback?: (itemList: IRecord[]) => void;
|
|
78
78
|
};
|
|
79
|
-
export
|
|
79
|
+
export type IAuthConfig = {
|
|
80
80
|
fetch?: {
|
|
81
81
|
api: IFetchFn;
|
|
82
82
|
params?: IFetchParams;
|
|
@@ -84,7 +84,7 @@ export declare type IAuthConfig = {
|
|
|
84
84
|
};
|
|
85
85
|
fieldList?: IAuth[];
|
|
86
86
|
};
|
|
87
|
-
export
|
|
87
|
+
export type IFormItem = {
|
|
88
88
|
type: IFormItemType;
|
|
89
89
|
fieldName: string;
|
|
90
90
|
label?: string | IFormItem;
|
|
@@ -253,7 +253,7 @@ export declare type IFormItem = {
|
|
|
253
253
|
onBlur?: (value: ValueOf<IFormData>) => void;
|
|
254
254
|
onEnter?: (value: ValueOf<IFormData>) => void;
|
|
255
255
|
};
|
|
256
|
-
export
|
|
256
|
+
export type IFormProps = {
|
|
257
257
|
items: IFormItem[];
|
|
258
258
|
initialValues?: IFormData;
|
|
259
259
|
initialExtras?: IExtraData;
|
|
@@ -297,7 +297,7 @@ export declare const propTypes: {
|
|
|
297
297
|
cols: PropTypes.Requireable<number>;
|
|
298
298
|
customClass: PropTypes.Requireable<string>;
|
|
299
299
|
compactMode: PropTypes.Requireable<boolean>;
|
|
300
|
-
labelWidth: PropTypes.Requireable<string | number
|
|
300
|
+
labelWidth: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
301
301
|
labelAlign: PropTypes.Requireable<string>;
|
|
302
302
|
labelWrap: PropTypes.Requireable<boolean>;
|
|
303
303
|
formType: PropTypes.Requireable<string>;
|