@jiaozhiye/qm-design-react 1.1.0-beta.2 → 1.1.0-beta.5
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 -0
- package/lib/button/src/button.d.ts +2 -1
- package/lib/form/src/form-cascader.d.ts +1 -0
- package/lib/form/src/form-checkbox-group.d.ts +1 -0
- package/lib/form/src/form-input.d.ts +1 -1
- package/lib/form/src/form-radio.d.ts +1 -0
- package/lib/form/src/form-select.d.ts +1 -0
- package/lib/form/src/form-tree-select.d.ts +1 -0
- package/lib/form/src/form.d.ts +8 -6
- package/lib/form/src/types.d.ts +2 -0
- package/lib/index.esm.js +2 -2
- package/lib/index.full.js +1 -1
- package/lib/index.js +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/useTableState.d.ts +3 -0
- package/lib/table/src/table/props.d.ts +3 -0
- package/lib/table/src/table/types.d.ts +3 -0
- package/package.json +15 -15
package/lib/_utils/util.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export declare const isValid: (val: string) => boolean;
|
|
|
21
21
|
export declare const getValueByPath: (obj: AnyObject<any>, paths?: string) => unknown;
|
|
22
22
|
export declare const getParserWidth: (val: number | string) => string;
|
|
23
23
|
export declare const flatJson: <T extends Record<string, any>>(jsonObject: T) => T;
|
|
24
|
+
export declare const getAuthValue: (code: string) => Record<string, any> | undefined;
|
|
@@ -2,6 +2,7 @@ import React, { Component } from 'react';
|
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { ButtonProps } from '../../antd';
|
|
4
4
|
declare type IProps = ButtonProps & {
|
|
5
|
+
authCode?: string;
|
|
5
6
|
click?: () => Promise<void> | void;
|
|
6
7
|
confirm?: {
|
|
7
8
|
title?: string;
|
|
@@ -25,6 +26,6 @@ declare class QmButton extends Component<IProps, IState> {
|
|
|
25
26
|
static contextType: React.Context<import("../../config-provider/context").IConfig>;
|
|
26
27
|
state: IState;
|
|
27
28
|
clickHandle: () => Promise<void>;
|
|
28
|
-
render(): React.ReactElement;
|
|
29
|
+
render(): React.ReactElement | null;
|
|
29
30
|
}
|
|
30
31
|
export default QmButton;
|
|
@@ -13,6 +13,7 @@ declare class FormCascader extends Component<IProps, IState> {
|
|
|
13
13
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
14
14
|
state: IState;
|
|
15
15
|
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
16
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
17
18
|
createViewText(val: string | string[], items: IDict[]): string;
|
|
18
19
|
getItemList(): Promise<void>;
|
|
@@ -11,6 +11,7 @@ declare class FormCheckboxGroup extends Component<IProps, IState> {
|
|
|
11
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
12
|
state: IState;
|
|
13
13
|
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
14
15
|
componentDidUpdate(prevProps: IProps): void;
|
|
15
16
|
getItemList(): Promise<void>;
|
|
16
17
|
render(): React.ReactElement;
|
|
@@ -11,7 +11,7 @@ declare type IInputProps<T = string> = IProps & {
|
|
|
11
11
|
declare class VInput extends Component<IInputProps> {
|
|
12
12
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
13
13
|
triggerChange: (value: string) => void;
|
|
14
|
-
render():
|
|
14
|
+
render(): React.ReactElement;
|
|
15
15
|
}
|
|
16
16
|
declare class FormInput extends Component<IProps> {
|
|
17
17
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
@@ -11,6 +11,7 @@ declare class FormRadio extends Component<IProps, IState> {
|
|
|
11
11
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
12
12
|
state: IState;
|
|
13
13
|
componentDidMount(): void;
|
|
14
|
+
componentWillUnmount(): void;
|
|
14
15
|
componentDidUpdate(prevProps: IProps): void;
|
|
15
16
|
getItemList(): Promise<void>;
|
|
16
17
|
render(): React.ReactElement;
|
|
@@ -13,6 +13,7 @@ declare class FormSelect extends Component<IProps, IState> {
|
|
|
13
13
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
14
14
|
state: IState;
|
|
15
15
|
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
16
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
17
18
|
createViewText(val: any, list: IDict[]): string | undefined;
|
|
18
19
|
getItemList(): Promise<void>;
|
|
@@ -13,6 +13,7 @@ declare class FormTreeSelect extends Component<IProps, IState> {
|
|
|
13
13
|
static contextType: React.Context<import("./context").IFormContext | undefined>;
|
|
14
14
|
state: IState;
|
|
15
15
|
componentDidMount(): void;
|
|
16
|
+
componentWillUnmount(): void;
|
|
16
17
|
componentDidUpdate(prevProps: IProps): void;
|
|
17
18
|
getItemText(val: any, items: IDict[]): any;
|
|
18
19
|
createViewText(val: any, items: IDict[]): any;
|
package/lib/form/src/form.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
32
32
|
labelAlign: import("prop-types").Requireable<string>;
|
|
33
33
|
formType: import("prop-types").Requireable<string>;
|
|
34
34
|
uniqueKey: import("prop-types").Requireable<string>;
|
|
35
|
+
authCode: import("prop-types").Requireable<string>;
|
|
35
36
|
defaultRows: import("prop-types").Requireable<number>;
|
|
36
37
|
authConfig: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
37
38
|
fetch: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
@@ -114,7 +115,8 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
114
115
|
type: any;
|
|
115
116
|
fieldName: any;
|
|
116
117
|
}): boolean;
|
|
117
|
-
formatFormValue
|
|
118
|
+
formatFormValue(values: IFormData): IFormData;
|
|
119
|
+
createFormAuth(): void;
|
|
118
120
|
getFormAuth(): Promise<void>;
|
|
119
121
|
INPUT(option: IFormItem): JSXElement;
|
|
120
122
|
RANGE_INPUT(option: IFormItem): JSXElement;
|
|
@@ -155,8 +157,8 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
155
157
|
createFormLayout(): (JSX.Element | null)[];
|
|
156
158
|
createSearchButtonLayout(lastCols?: number): JSX.Element | null;
|
|
157
159
|
createFormButtonLayout(): JSX.Element | null;
|
|
158
|
-
createFieldsDefine
|
|
159
|
-
setExpandHandle
|
|
160
|
+
createFieldsDefine(): JSX.Element;
|
|
161
|
+
setExpandHandle(collapse: boolean): void;
|
|
160
162
|
valuesChangeHandle: (changedValues: IFormData, allValues: IFormData) => void;
|
|
161
163
|
fieldsChangeHandle: (changedFields: IFieldData[], allFields: IFieldData[]) => void;
|
|
162
164
|
finishHandle: (values: IFormData) => void;
|
|
@@ -168,12 +170,12 @@ declare class QmForm extends Component<IProps, IState> {
|
|
|
168
170
|
get_fields_other(fields?: string[]): IFormData;
|
|
169
171
|
SET_FIELDS_VALUE(values: IFormData): void;
|
|
170
172
|
GET_FIELDS_VALUE(fields?: string[]): IFormData;
|
|
171
|
-
GET_FORM_DATA
|
|
173
|
+
GET_FORM_DATA(): Promise<any[]>;
|
|
172
174
|
SET_FIELDS_EXTRA(values: IExtraData): void;
|
|
173
175
|
GET_FIELDS_EXTRA(fields?: string[]): IExtraData;
|
|
174
176
|
GET_FIELDS_TOUCHED(fields?: string[]): boolean;
|
|
175
|
-
SUBMIT_FORM
|
|
176
|
-
RESET_FORM
|
|
177
|
+
SUBMIT_FORM(): void;
|
|
178
|
+
RESET_FORM(): void;
|
|
177
179
|
render(): React.ReactElement;
|
|
178
180
|
}
|
|
179
181
|
export default QmForm;
|
package/lib/form/src/types.d.ts
CHANGED
|
@@ -198,6 +198,7 @@ export declare type IFormProps = {
|
|
|
198
198
|
labelAlign?: ILabelAlign;
|
|
199
199
|
formType?: IFormType;
|
|
200
200
|
uniqueKey?: string;
|
|
201
|
+
authCode?: string;
|
|
201
202
|
defaultRows?: number;
|
|
202
203
|
authConfig?: IAuthConfig;
|
|
203
204
|
isAutoFocus?: boolean;
|
|
@@ -227,6 +228,7 @@ export declare const propTypes: {
|
|
|
227
228
|
labelAlign: PropTypes.Requireable<string>;
|
|
228
229
|
formType: PropTypes.Requireable<string>;
|
|
229
230
|
uniqueKey: PropTypes.Requireable<string>;
|
|
231
|
+
authCode: PropTypes.Requireable<string>;
|
|
230
232
|
defaultRows: PropTypes.Requireable<number>;
|
|
231
233
|
authConfig: PropTypes.Requireable<PropTypes.InferProps<{
|
|
232
234
|
fetch: PropTypes.Requireable<PropTypes.InferProps<{
|