dcp-design-react 1.9.7 → 1.9.9
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/util.d.ts +1 -1
- 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 -3
- 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/utils/index.d.ts +8 -0
- 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
package/lib/modal/src/modal.d.ts
CHANGED
|
@@ -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 } from '../../_utils/types';
|
|
4
5
|
import type { ModalProps as AntModalProps } from '../../antd';
|
|
5
6
|
type EventType = React.MouseEvent<HTMLElement>;
|
|
@@ -35,6 +36,7 @@ type IState = {
|
|
|
35
36
|
export type ModalProps = IProps;
|
|
36
37
|
declare class QmModal extends Component<IProps, IState> {
|
|
37
38
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
39
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
38
40
|
static propTypes: {
|
|
39
41
|
size: (props: any, propName: any, componentName: any) => void;
|
|
40
42
|
spinning: PropTypes.Requireable<boolean>;
|
|
@@ -53,7 +55,7 @@ declare class QmModal extends Component<IProps, IState> {
|
|
|
53
55
|
};
|
|
54
56
|
draggleRef: React.RefObject<HTMLDivElement>;
|
|
55
57
|
private opened;
|
|
56
|
-
get $size():
|
|
58
|
+
get $size(): ComponentSize;
|
|
57
59
|
get defaultHeight(): string;
|
|
58
60
|
state: IState;
|
|
59
61
|
componentDidUpdate(prevProps: IProps, prevState: IState): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { IDict } from '../../_utils/types';
|
|
3
4
|
type IProps = {
|
|
4
|
-
templateRender?: () => React.
|
|
5
|
+
templateRender?: () => React.ReactNode;
|
|
5
6
|
uniqueKey?: string;
|
|
6
7
|
defaultConfig?: Record<string, any>;
|
|
7
8
|
preview?: boolean;
|
|
@@ -35,6 +36,7 @@ type IState = {
|
|
|
35
36
|
};
|
|
36
37
|
declare class Preview extends Component<IProps, IState> {
|
|
37
38
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
39
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
38
40
|
private provide;
|
|
39
41
|
containRef: React.RefObject<any>;
|
|
40
42
|
state: IState;
|
package/lib/print/src/print.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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 { CSSProperties, ComponentSize } from '../../_utils/types';
|
|
4
5
|
import type { ButtonProps } from '../../antd';
|
|
5
6
|
type IProps = ButtonProps & {
|
|
6
7
|
size?: ComponentSize;
|
|
7
|
-
templateRender?: () => React.
|
|
8
|
+
templateRender?: () => React.ReactNode;
|
|
8
9
|
uniqueKey?: string;
|
|
9
10
|
defaultConfig?: Record<string, any>;
|
|
10
11
|
preview?: boolean;
|
|
@@ -29,6 +30,7 @@ declare class QmPrint extends Component<IProps, IState> {
|
|
|
29
30
|
icon: React.JSX.Element;
|
|
30
31
|
};
|
|
31
32
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
33
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
32
34
|
previewRef: React.RefObject<any>;
|
|
33
35
|
state: IState;
|
|
34
36
|
clickHandle: () => Promise<void>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import { QmForm, QmFormItem } from '../../index';
|
|
3
4
|
type IProps = {
|
|
4
5
|
setting: {
|
|
@@ -22,6 +23,7 @@ type IState = {
|
|
|
22
23
|
};
|
|
23
24
|
declare class Setting extends Component<IProps, IState> {
|
|
24
25
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
26
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
25
27
|
formRef: React.RefObject<QmForm>;
|
|
26
28
|
createFormList: () => QmFormItem[];
|
|
27
29
|
getInitialvalue: () => {
|
package/lib/space/src/space.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 { SpaceProps as AntSpaceProps } from '../../antd';
|
|
4
5
|
type IProps = Omit<AntSpaceProps, 'size'> & {
|
|
@@ -7,6 +8,7 @@ type IProps = Omit<AntSpaceProps, 'size'> & {
|
|
|
7
8
|
export type SpaceProps = IProps;
|
|
8
9
|
declare class QmSpace extends Component<IProps> {
|
|
9
10
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
11
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
10
12
|
render(): React.JSX.Element;
|
|
11
13
|
}
|
|
12
14
|
export default QmSpace;
|
|
@@ -45,3 +45,11 @@ export declare const deepFindRecord: (arr: IRecord[], fn: (node: IRecord) => boo
|
|
|
45
45
|
export declare const deepTreeFilter: (tree: any[], fn: (node: unknown) => boolean) => any[];
|
|
46
46
|
export declare const flatToTree: (list: any[], id: string, pid: string) => any[];
|
|
47
47
|
export declare const sortableFormatter: <T>(items: T[]) => T[];
|
|
48
|
+
/**
|
|
49
|
+
* 深度比较两个对象字面量
|
|
50
|
+
* @param obj1 对象1
|
|
51
|
+
* @param obj2 对象2
|
|
52
|
+
* @param shallow 是否浅比较
|
|
53
|
+
* @returns
|
|
54
|
+
*/
|
|
55
|
+
export declare const equalFn: <T = any>(obj1: T, obj2: T, shallow?: boolean) => boolean;
|
package/lib/tabs/src/tabs.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 { IAuth } from '../../_utils/types';
|
|
3
4
|
import type { TabsProps as AntTabsProps } from '../../antd';
|
|
4
5
|
type IProps = AntTabsProps & {
|
|
@@ -11,6 +12,7 @@ export type TabsProps = IProps;
|
|
|
11
12
|
declare class QmTabs extends Component<IProps> {
|
|
12
13
|
static TabPane: React.ClassicComponentClass<import("rc-tabs/lib/TabPanelList/TabPane").TabPaneProps>;
|
|
13
14
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
15
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
14
16
|
static defaultProps: {
|
|
15
17
|
tabPosition: string;
|
|
16
18
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { ComponentSize, CSSProperties } from '../../_utils/types';
|
|
3
4
|
import type { IFetchHeader } from '../../form/src/types';
|
|
4
5
|
type IProps = {
|
|
@@ -25,6 +26,7 @@ type IProps = {
|
|
|
25
26
|
export type TinymceProps = IProps;
|
|
26
27
|
declare class QmTinymce extends Component<IProps> {
|
|
27
28
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
29
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
28
30
|
static propTypes: {
|
|
29
31
|
size: (props: any, propName: any, componentName: any) => void;
|
|
30
32
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { HttpRequestHeader } from '../../download/src/download';
|
|
3
4
|
import type { UploadProps, ButtonProps } from '../../antd';
|
|
4
5
|
export interface UploadFile {
|
|
@@ -24,6 +25,7 @@ export type UploadFileProps = IProps;
|
|
|
24
25
|
export declare const downloadFile: (url: string, { fileName, headers, params }: any) => Promise<void>;
|
|
25
26
|
declare class QmUploadFile extends Component<IProps> {
|
|
26
27
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
28
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
27
29
|
static defaultProps: {
|
|
28
30
|
name: string;
|
|
29
31
|
multiple: boolean;
|
|
@@ -34,7 +36,7 @@ declare class QmUploadFile extends Component<IProps> {
|
|
|
34
36
|
showRemoveIcon: boolean;
|
|
35
37
|
};
|
|
36
38
|
};
|
|
37
|
-
get $size():
|
|
39
|
+
get $size(): import("../../_utils/types").ComponentSize;
|
|
38
40
|
beforeUpload: (file: any, fileList: any) => Promise<any>;
|
|
39
41
|
doDownload: (file: any) => Promise<void>;
|
|
40
42
|
render(): React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { CSSProperties } from '../../_utils/types';
|
|
3
4
|
type IProps = {
|
|
4
5
|
fixedSize?: [number, number];
|
|
@@ -7,12 +8,14 @@ type IProps = {
|
|
|
7
8
|
fileSize?: number;
|
|
8
9
|
className?: string;
|
|
9
10
|
beforeCrop?: (file: any, fileList: any[]) => Promise<boolean>;
|
|
11
|
+
children?: React.ReactNode;
|
|
10
12
|
};
|
|
11
13
|
type IState = {
|
|
12
14
|
src: string;
|
|
13
15
|
};
|
|
14
16
|
declare class CropperPreview extends Component<IProps, IState> {
|
|
15
17
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
18
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
16
19
|
private cropperRef;
|
|
17
20
|
private beforeUploadRef;
|
|
18
21
|
private fileRef;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
+
import ConfigContext from '../../config-provider/context';
|
|
2
3
|
import type { UploadProps } from '../../antd';
|
|
3
4
|
export interface UploadFile {
|
|
4
5
|
uid: string;
|
|
@@ -25,6 +26,7 @@ type IState = {
|
|
|
25
26
|
export type UploadImgProps = IProps;
|
|
26
27
|
declare class QmUploadImg extends Component<IProps, IState> {
|
|
27
28
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
29
|
+
context: React.ContextType<typeof ConfigContext>;
|
|
28
30
|
static defaultProps: {
|
|
29
31
|
name: string;
|
|
30
32
|
multiple: boolean;
|
|
@@ -35,7 +37,7 @@ declare class QmUploadImg extends Component<IProps, IState> {
|
|
|
35
37
|
};
|
|
36
38
|
state: IState;
|
|
37
39
|
private isFocused;
|
|
38
|
-
get $size():
|
|
40
|
+
get $size(): import("../../_utils/types").ComponentSize;
|
|
39
41
|
get showUploadButton(): boolean;
|
|
40
42
|
componentDidMount(): void;
|
|
41
43
|
componentDidUpdate(prevProps: IProps): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dcp-design-react",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.9",
|
|
4
4
|
"description": "A Component Library for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"React",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@rc-component/portal": "^1.1.2",
|
|
54
|
-
"@rc-component/trigger": "^
|
|
54
|
+
"@rc-component/trigger": "^2.2.0",
|
|
55
55
|
"add-dom-event-listener": "^1.1.0",
|
|
56
56
|
"antd": "4.24.16",
|
|
57
57
|
"big.js": "^6.2.1",
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
"@rollup/plugin-terser": "^0.4.4",
|
|
93
93
|
"@rollup/plugin-typescript": "^8.5.0",
|
|
94
94
|
"@types/lodash-es": "^4.17.6",
|
|
95
|
-
"@types/react": "^
|
|
96
|
-
"@types/react-dom": "^
|
|
95
|
+
"@types/react": "^18.3.0",
|
|
96
|
+
"@types/react-dom": "^18.3.0",
|
|
97
97
|
"@typescript-eslint/eslint-plugin": "^5.30.0",
|
|
98
98
|
"@typescript-eslint/parser": "^5.30.0",
|
|
99
99
|
"autoprefixer": "^10.4.14",
|
|
@@ -122,8 +122,8 @@
|
|
|
122
122
|
"lint-staged": "^10.5.4",
|
|
123
123
|
"mockjs": "^1.1.0",
|
|
124
124
|
"prettier": "^2.8.8",
|
|
125
|
-
"react": "
|
|
126
|
-
"react-dom": "
|
|
125
|
+
"react": "18.2.0",
|
|
126
|
+
"react-dom": "18.2.0",
|
|
127
127
|
"rimraf": "^3.0.2",
|
|
128
128
|
"rollup": "^2.79.1",
|
|
129
129
|
"style-loader": "^3.3.4",
|