@xxlabs/antd-plus 1.0.0 → 1.1.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.
- package/dist/index.d.ts +28 -28
- package/dist/index.js +75 -167
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { CSSInterpolation, CSSObject } from "@ant-design/cssinjs";
|
|
|
6
6
|
import dayjs from "dayjs";
|
|
7
7
|
import "dayjs/locale/zh-cn";
|
|
8
8
|
import { useMergedState } from "@rc-component/util";
|
|
9
|
-
import * as
|
|
9
|
+
import * as react_jsx_runtime18 from "react/jsx-runtime";
|
|
10
10
|
import * as safe_stable_stringify0 from "safe-stable-stringify";
|
|
11
11
|
import * as _rc_component_form0 from "@rc-component/form";
|
|
12
12
|
import { MenuDataItem as MenuDataItem$1 } from "@umijs/route-utils";
|
|
@@ -512,7 +512,7 @@ type ProCardType = CardType & {
|
|
|
512
512
|
Divider: typeof ProCardDivider;
|
|
513
513
|
Group: typeof Group$1;
|
|
514
514
|
};
|
|
515
|
-
declare const Group$1: (props: PropsWithChildren<CardProps>) =>
|
|
515
|
+
declare const Group$1: (props: PropsWithChildren<CardProps>) => react_jsx_runtime18.JSX.Element;
|
|
516
516
|
declare const ProCard: ProCardType;
|
|
517
517
|
//#endregion
|
|
518
518
|
//#region src/provider/intl.d.ts
|
|
@@ -898,7 +898,7 @@ declare class ErrorBoundary extends Component<{
|
|
|
898
898
|
errorInfo: string;
|
|
899
899
|
};
|
|
900
900
|
componentDidCatch(): void;
|
|
901
|
-
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react11.ReactPortal | react11.ReactElement<unknown, string | react11.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> |
|
|
901
|
+
render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react11.ReactPortal | react11.ReactElement<unknown, string | react11.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime18.JSX.Element | null | undefined;
|
|
902
902
|
}
|
|
903
903
|
//#endregion
|
|
904
904
|
//#region src/utils/components/FieldLabel/index.d.ts
|
|
@@ -956,7 +956,7 @@ interface InlineErrorFormItemProps extends FormItemProps {
|
|
|
956
956
|
popoverProps?: PopoverProps;
|
|
957
957
|
children: any;
|
|
958
958
|
}
|
|
959
|
-
declare const InlineErrorFormItem: (props: InlineErrorFormItemProps) =>
|
|
959
|
+
declare const InlineErrorFormItem: (props: InlineErrorFormItemProps) => react_jsx_runtime18.JSX.Element;
|
|
960
960
|
//#endregion
|
|
961
961
|
//#region src/utils/components/LabelIconTip/index.d.ts
|
|
962
962
|
/**
|
|
@@ -1158,7 +1158,7 @@ declare function useEditableArray<RecordType extends AnyObject>(props: RowEditab
|
|
|
1158
1158
|
};
|
|
1159
1159
|
actionRender: (row: RecordType & {
|
|
1160
1160
|
index: number;
|
|
1161
|
-
}) => ReactNode[] | (
|
|
1161
|
+
}) => ReactNode[] | (react_jsx_runtime18.JSX.Element | undefined)[];
|
|
1162
1162
|
startEditable: (recordKey: Key, record?: RecordType | undefined) => boolean;
|
|
1163
1163
|
cancelEditable: (recordKey: RecordKey, needReTry?: boolean | undefined) => Promise<boolean>;
|
|
1164
1164
|
addEditRecord: (row: RecordType, options?: AddLineOptions | undefined) => boolean;
|
|
@@ -1764,7 +1764,7 @@ declare const dateArrayFormatter: (value: any[], format: FormatType | FormatType
|
|
|
1764
1764
|
* @param item
|
|
1765
1765
|
* @param text
|
|
1766
1766
|
*/
|
|
1767
|
-
declare const genCopyable: (dom: ReactNode, item: any, text: string) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react11.ReactPortal | react11.ReactElement<unknown, string | react11.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> |
|
|
1767
|
+
declare const genCopyable: (dom: ReactNode, item: any, text: string) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react11.ReactPortal | react11.ReactElement<unknown, string | react11.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime18.JSX.Element | null | undefined;
|
|
1768
1768
|
//#endregion
|
|
1769
1769
|
//#region src/utils/getFieldPropsOrFormItemProps/index.d.ts
|
|
1770
1770
|
/**
|
|
@@ -1973,7 +1973,7 @@ declare function useEditableMap<RecordType>(props: RowEditableConfig<RecordType>
|
|
|
1973
1973
|
editableKeys: Key[];
|
|
1974
1974
|
setEditableRowKeys: (updater: Key[] | ((origin: Key[]) => Key[]), ignoreDestroy?: boolean) => void;
|
|
1975
1975
|
isEditable: (recordKey: RecordKey) => boolean;
|
|
1976
|
-
actionRender: (key: RecordKey, config?: ActionTypeText<RecordType>) => ReactNode[] | (
|
|
1976
|
+
actionRender: (key: RecordKey, config?: ActionTypeText<RecordType>) => ReactNode[] | (react_jsx_runtime18.JSX.Element | undefined)[];
|
|
1977
1977
|
startEditable: (recordKey: RecordKey, recordValue?: any) => boolean;
|
|
1978
1978
|
cancelEditable: (recordKey: RecordKey) => boolean;
|
|
1979
1979
|
};
|
|
@@ -2076,7 +2076,7 @@ declare const FieldRender: FC<ProDescriptionsItemProps<any> & {
|
|
|
2076
2076
|
emptyText?: ReactNode;
|
|
2077
2077
|
}>;
|
|
2078
2078
|
declare const ProDescriptions: {
|
|
2079
|
-
<RecordType extends Record<string, any>, ValueType = "text">(props: ProDescriptionsProps<RecordType, ValueType>):
|
|
2079
|
+
<RecordType extends Record<string, any>, ValueType = "text">(props: ProDescriptionsProps<RecordType, ValueType>): react_jsx_runtime18.JSX.Element;
|
|
2080
2080
|
Item: FC<ProDescriptionsItemProps<Record<string, any>, "text">>;
|
|
2081
2081
|
};
|
|
2082
2082
|
//#endregion
|
|
@@ -2997,7 +2997,7 @@ declare const ProFormDependency: {
|
|
|
2997
2997
|
children,
|
|
2998
2998
|
ignoreFormListField,
|
|
2999
2999
|
...rest
|
|
3000
|
-
}: ProFormDependencyProps<T>):
|
|
3000
|
+
}: ProFormDependencyProps<T>): react_jsx_runtime18.JSX.Element;
|
|
3001
3001
|
displayName: string;
|
|
3002
3002
|
};
|
|
3003
3003
|
//#endregion
|
|
@@ -3620,7 +3620,7 @@ declare const ProFormRate: FC<ProFormFieldItemProps<RateProps>>;
|
|
|
3620
3620
|
type ProFormProps<T = Record<string, any>, U = Record<string, any>> = Omit<FormProps<T>, 'onFinish'> & CommonFormProps<T, U>;
|
|
3621
3621
|
declare function ProForm<T = Record<string, any>>(props: ProFormProps<T> & {
|
|
3622
3622
|
children?: ReactNode | ReactNode[];
|
|
3623
|
-
}):
|
|
3623
|
+
}): react_jsx_runtime18.JSX.Element;
|
|
3624
3624
|
declare namespace ProForm {
|
|
3625
3625
|
var Group: react11.FC<ProFormBaseGroupProps & ProFormGridConfig & {
|
|
3626
3626
|
ref?: react11.Ref<any>;
|
|
@@ -3730,7 +3730,7 @@ type LightFilterProps<T, U = Record<string, any>> = {
|
|
|
3730
3730
|
*/
|
|
3731
3731
|
popoverProps?: Omit<PopoverProps, 'children' | 'content' | 'trigger' | 'open' | 'onOpenChange' | 'placement'>;
|
|
3732
3732
|
} & Omit<FormProps<T>, 'onFinish'> & CommonFormProps<T, U>;
|
|
3733
|
-
declare function LightFilter<T = Record<string, any>>(props: LightFilterProps<T>):
|
|
3733
|
+
declare function LightFilter<T = Record<string, any>>(props: LightFilterProps<T>): react_jsx_runtime18.JSX.Element;
|
|
3734
3734
|
//#endregion
|
|
3735
3735
|
//#region src/form/layouts/LoginForm/index.d.ts
|
|
3736
3736
|
type LoginFormProps<T> = {
|
|
@@ -3885,7 +3885,7 @@ declare function ModalForm<T = Record<string, any>, U = Record<string, any>>({
|
|
|
3885
3885
|
width,
|
|
3886
3886
|
open: propsOpen,
|
|
3887
3887
|
...rest
|
|
3888
|
-
}: ModalFormProps<T, U>):
|
|
3888
|
+
}: ModalFormProps<T, U>): react_jsx_runtime18.JSX.Element;
|
|
3889
3889
|
//#endregion
|
|
3890
3890
|
//#region src/form/layouts/QueryFilter/Actions.d.ts
|
|
3891
3891
|
type ActionsProps = {
|
|
@@ -4017,7 +4017,7 @@ type StepFormProps<T = Record<string, any>, U = Record<string, any>> = {
|
|
|
4017
4017
|
stepProps?: NonNullable<StepsProps['items']>[number];
|
|
4018
4018
|
index?: number;
|
|
4019
4019
|
} & Omit<FormProps<T>, 'onFinish' | 'form'> & Omit<CommonFormProps<T, U>, 'submitter' | 'form'>;
|
|
4020
|
-
declare function StepForm<T = Record<string, any>>(stepNativeProps: StepFormProps<T>):
|
|
4020
|
+
declare function StepForm<T = Record<string, any>>(stepNativeProps: StepFormProps<T>): react_jsx_runtime18.JSX.Element;
|
|
4021
4021
|
//#endregion
|
|
4022
4022
|
//#region src/form/layouts/StepsForm/index.d.ts
|
|
4023
4023
|
type StepsFormProps<T = Record<string, any>> = {
|
|
@@ -4072,7 +4072,7 @@ type StepsFormProps<T = Record<string, any>> = {
|
|
|
4072
4072
|
} & Omit<FormProviderProps, 'children'>;
|
|
4073
4073
|
declare function StepsFormWarp<T = Record<string, any>>(props: StepsFormProps<T> & {
|
|
4074
4074
|
children: any;
|
|
4075
|
-
}):
|
|
4075
|
+
}): react_jsx_runtime18.JSX.Element;
|
|
4076
4076
|
declare namespace StepsFormWarp {
|
|
4077
4077
|
var StepForm: typeof StepForm;
|
|
4078
4078
|
var useForm: typeof antd_es_form_Form0.useForm;
|
|
@@ -4194,7 +4194,7 @@ type FormSchema<T = Record<string, any>, ValueType = 'text'> = {
|
|
|
4194
4194
|
*
|
|
4195
4195
|
* @see 此组件仍为 beta 版本,api 可能发生变化
|
|
4196
4196
|
*/
|
|
4197
|
-
declare function BetaSchemaForm<T, ValueType = 'text'>(props: FormSchema<T, ValueType>):
|
|
4197
|
+
declare function BetaSchemaForm<T, ValueType = 'text'>(props: FormSchema<T, ValueType>): react_jsx_runtime18.JSX.Element;
|
|
4198
4198
|
//#endregion
|
|
4199
4199
|
//#region src/form/components/Segmented/index.d.ts
|
|
4200
4200
|
/**
|
|
@@ -5248,7 +5248,7 @@ declare const ProBreadcrumb: FC<BreadcrumbProps>;
|
|
|
5248
5248
|
declare const PageContainer: FC<PageContainerProps>;
|
|
5249
5249
|
declare const ProPageHeader: (props: PageContainerProps & {
|
|
5250
5250
|
prefixedClassName: string;
|
|
5251
|
-
}) =>
|
|
5251
|
+
}) => react_jsx_runtime18.JSX.Element | null;
|
|
5252
5252
|
//#endregion
|
|
5253
5253
|
//#region src/layout/components/PageLoading/index.d.ts
|
|
5254
5254
|
declare const PageLoading: FC<SpinProps & any>;
|
|
@@ -6080,7 +6080,7 @@ declare const ProHelp: <ValueTypeMap = {
|
|
|
6080
6080
|
valueTypeMap,
|
|
6081
6081
|
onLoadContext,
|
|
6082
6082
|
...props
|
|
6083
|
-
}: ProHelpProps<ValueTypeMap>) =>
|
|
6083
|
+
}: ProHelpProps<ValueTypeMap>) => react_jsx_runtime18.JSX.Element;
|
|
6084
6084
|
//#endregion
|
|
6085
6085
|
//#region src/table/components/Alert/index.d.ts
|
|
6086
6086
|
type AlertRenderType<T> = ((props: {
|
|
@@ -6671,7 +6671,7 @@ type EditableProTableProps<T, U extends ParamsType, ValueType = 'text'> = Omit<P
|
|
|
6671
6671
|
* A React component that is used to create a table.
|
|
6672
6672
|
* @param props
|
|
6673
6673
|
*/
|
|
6674
|
-
declare function FieldEditableTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>):
|
|
6674
|
+
declare function FieldEditableTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): react_jsx_runtime18.JSX.Element;
|
|
6675
6675
|
declare namespace FieldEditableTable {
|
|
6676
6676
|
var RecordCreator: <T = Record<string, any>>(props: RecordCreatorProps<T> & {
|
|
6677
6677
|
children: JSX.Element;
|
|
@@ -6679,10 +6679,10 @@ declare namespace FieldEditableTable {
|
|
|
6679
6679
|
}
|
|
6680
6680
|
//#endregion
|
|
6681
6681
|
//#region src/table/components/EditableTable/CellEditorTable.d.ts
|
|
6682
|
-
declare function CellEditorTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>):
|
|
6682
|
+
declare function CellEditorTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): react_jsx_runtime18.JSX.Element;
|
|
6683
6683
|
//#endregion
|
|
6684
6684
|
//#region src/table/components/EditableTable/RowEditorTable.d.ts
|
|
6685
|
-
declare function RowEditorTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>):
|
|
6685
|
+
declare function RowEditorTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): react_jsx_runtime18.JSX.Element;
|
|
6686
6686
|
//#endregion
|
|
6687
6687
|
//#region src/table/components/Form/index.d.ts
|
|
6688
6688
|
type BaseFormProps<T, U> = {
|
|
@@ -6718,7 +6718,7 @@ declare class FormSearch<T, U> extends Component<BaseFormProps<T, U> & {
|
|
|
6718
6718
|
*/
|
|
6719
6719
|
isEqual: (next: BaseFormProps<T, U>) => boolean;
|
|
6720
6720
|
shouldComponentUpdate: (next: BaseFormProps<T, U>) => boolean;
|
|
6721
|
-
render: () =>
|
|
6721
|
+
render: () => react_jsx_runtime18.JSX.Element;
|
|
6722
6722
|
}
|
|
6723
6723
|
//#endregion
|
|
6724
6724
|
//#region src/table/Table.d.ts
|
|
@@ -6728,7 +6728,7 @@ declare class FormSearch<T, U> extends Component<BaseFormProps<T, U> & {
|
|
|
6728
6728
|
* @param props
|
|
6729
6729
|
*/
|
|
6730
6730
|
declare const ProviderTableContainer: {
|
|
6731
|
-
<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = "text">(props: ProTableProps<DataType, Params, ValueType>):
|
|
6731
|
+
<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = "text">(props: ProTableProps<DataType, Params, ValueType>): react_jsx_runtime18.JSX.Element;
|
|
6732
6732
|
Summary: react11.FC<react11.PropsWithChildren<_rc_component_table_lib_Footer_Summary0.SummaryProps>> & {
|
|
6733
6733
|
Row: React.FC<React.PropsWithChildren<_rc_component_table_lib_Footer_Row0.FooterRowProps>>;
|
|
6734
6734
|
Cell: React.FC<React.PropsWithChildren<_rc_component_table_lib_Footer_Cell0.SummaryCellProps>>;
|
|
@@ -6820,8 +6820,8 @@ type ProListProps<RecordType = any, Params = Record<string, any>, ValueType = 't
|
|
|
6820
6820
|
itemTitleRender?: ItemProps<RecordType>['itemTitleRender'];
|
|
6821
6821
|
};
|
|
6822
6822
|
type TriggerEventHandler<RecordType> = (record: RecordType) => void;
|
|
6823
|
-
declare function BaseProList<RecordType extends Record<string, any>, U extends Record<string, any> = Record<string, any>>(props: ProListProps<RecordType, U>):
|
|
6824
|
-
declare function ProList<RecordType extends Record<string, any>, U extends Record<string, any> = Record<string, any>>(props: ProListProps<RecordType, U>):
|
|
6823
|
+
declare function BaseProList<RecordType extends Record<string, any>, U extends Record<string, any> = Record<string, any>>(props: ProListProps<RecordType, U>): react_jsx_runtime18.JSX.Element;
|
|
6824
|
+
declare function ProList<RecordType extends Record<string, any>, U extends Record<string, any> = Record<string, any>>(props: ProListProps<RecordType, U>): react_jsx_runtime18.JSX.Element;
|
|
6825
6825
|
//#endregion
|
|
6826
6826
|
//#region src/skeleton/components/Descriptions/index.d.ts
|
|
6827
6827
|
type DescriptionsPageSkeletonProps = {
|
|
@@ -6840,7 +6840,7 @@ declare const TableItemSkeleton: ({
|
|
|
6840
6840
|
}: {
|
|
6841
6841
|
active: boolean;
|
|
6842
6842
|
header?: boolean;
|
|
6843
|
-
}) =>
|
|
6843
|
+
}) => react_jsx_runtime18.JSX.Element;
|
|
6844
6844
|
/**
|
|
6845
6845
|
* Table 骨架屏
|
|
6846
6846
|
*
|
|
@@ -6854,7 +6854,7 @@ declare const DescriptionsSkeleton: ({
|
|
|
6854
6854
|
active
|
|
6855
6855
|
}: {
|
|
6856
6856
|
active: boolean;
|
|
6857
|
-
}) =>
|
|
6857
|
+
}) => react_jsx_runtime18.JSX.Element;
|
|
6858
6858
|
//#endregion
|
|
6859
6859
|
//#region src/skeleton/components/List/index.d.ts
|
|
6860
6860
|
/** 列表子项目骨架屏 */
|
|
@@ -6876,7 +6876,7 @@ declare const PageHeaderSkeleton: ({
|
|
|
6876
6876
|
active
|
|
6877
6877
|
}: {
|
|
6878
6878
|
active: boolean;
|
|
6879
|
-
}) =>
|
|
6879
|
+
}) => react_jsx_runtime18.JSX.Element;
|
|
6880
6880
|
type ListPageSkeletonProps = {
|
|
6881
6881
|
active?: boolean;
|
|
6882
6882
|
pageHeader?: false;
|
|
@@ -6894,7 +6894,7 @@ declare const ListToolbarSkeleton: ({
|
|
|
6894
6894
|
active
|
|
6895
6895
|
}: {
|
|
6896
6896
|
active: boolean;
|
|
6897
|
-
}) =>
|
|
6897
|
+
}) => react_jsx_runtime18.JSX.Element;
|
|
6898
6898
|
declare const ListPageSkeleton: FC<ListPageSkeletonProps>;
|
|
6899
6899
|
//#endregion
|
|
6900
6900
|
//#region src/skeleton/index.d.ts
|
package/dist/index.js
CHANGED
|
@@ -14892,183 +14892,91 @@ var Captcha_default = ProFormCaptcha;
|
|
|
14892
14892
|
//#endregion
|
|
14893
14893
|
//#region src/form/components/Field/index.tsx
|
|
14894
14894
|
const BaseProFormField = (props) => {
|
|
14895
|
-
const $ =
|
|
14896
|
-
let autoFocus;
|
|
14897
|
-
let children;
|
|
14898
|
-
let dependenciesValues;
|
|
14899
|
-
let fieldProps;
|
|
14900
|
-
let formItemRender;
|
|
14901
|
-
let onChange;
|
|
14902
|
-
let params;
|
|
14903
|
-
let proFieldProps$1;
|
|
14904
|
-
let render;
|
|
14905
|
-
let restProps;
|
|
14906
|
-
let t0;
|
|
14907
|
-
let t1;
|
|
14908
|
-
let valueEnum;
|
|
14909
|
-
let valueType$15;
|
|
14910
|
-
if ($[0] !== props) {
|
|
14911
|
-
const { fieldProps: t2$1, children: t3$1, labelCol, label, autoFocus: t4$1, isDefaultDom, render: t5$1, proFieldProps: t6$1, formItemRender: t7$1, valueType: t8$1, initialValue, onChange: t9$1, valueEnum: t10$1, params: t11$1, name, dependenciesValues: t12$1, cacheForSwr: t13$1, valuePropName: t14, ...t15 } = props;
|
|
14912
|
-
fieldProps = t2$1;
|
|
14913
|
-
children = t3$1;
|
|
14914
|
-
autoFocus = t4$1;
|
|
14915
|
-
render = t5$1;
|
|
14916
|
-
proFieldProps$1 = t6$1;
|
|
14917
|
-
formItemRender = t7$1;
|
|
14918
|
-
valueType$15 = t8$1;
|
|
14919
|
-
onChange = t9$1;
|
|
14920
|
-
valueEnum = t10$1;
|
|
14921
|
-
params = t11$1;
|
|
14922
|
-
dependenciesValues = t12$1;
|
|
14923
|
-
t0 = t13$1;
|
|
14924
|
-
t1 = t14;
|
|
14925
|
-
restProps = t15;
|
|
14926
|
-
$[0] = props;
|
|
14927
|
-
$[1] = autoFocus;
|
|
14928
|
-
$[2] = children;
|
|
14929
|
-
$[3] = dependenciesValues;
|
|
14930
|
-
$[4] = fieldProps;
|
|
14931
|
-
$[5] = formItemRender;
|
|
14932
|
-
$[6] = onChange;
|
|
14933
|
-
$[7] = params;
|
|
14934
|
-
$[8] = proFieldProps$1;
|
|
14935
|
-
$[9] = render;
|
|
14936
|
-
$[10] = restProps;
|
|
14937
|
-
$[11] = t0;
|
|
14938
|
-
$[12] = t1;
|
|
14939
|
-
$[13] = valueEnum;
|
|
14940
|
-
$[14] = valueType$15;
|
|
14941
|
-
} else {
|
|
14942
|
-
autoFocus = $[1];
|
|
14943
|
-
children = $[2];
|
|
14944
|
-
dependenciesValues = $[3];
|
|
14945
|
-
fieldProps = $[4];
|
|
14946
|
-
formItemRender = $[5];
|
|
14947
|
-
onChange = $[6];
|
|
14948
|
-
params = $[7];
|
|
14949
|
-
proFieldProps$1 = $[8];
|
|
14950
|
-
render = $[9];
|
|
14951
|
-
restProps = $[10];
|
|
14952
|
-
t0 = $[11];
|
|
14953
|
-
t1 = $[12];
|
|
14954
|
-
valueEnum = $[13];
|
|
14955
|
-
valueType$15 = $[14];
|
|
14956
|
-
}
|
|
14957
|
-
const cacheForSwr = t0 === void 0 ? false : t0;
|
|
14958
|
-
const valuePropName = t1 === void 0 ? "value" : t1;
|
|
14895
|
+
const { fieldProps, children, labelCol, label, autoFocus, isDefaultDom, render, proFieldProps: proFieldProps$1, formItemRender, valueType: valueType$15, initialValue, onChange, valueEnum, params, name, dependenciesValues, cacheForSwr = false, valuePropName = "value", ...restProps } = props;
|
|
14959
14896
|
const modeContext = useContext(EditOrReadOnlyContext);
|
|
14960
|
-
|
|
14961
|
-
|
|
14962
|
-
t2 = dependenciesValues && restProps.request ? {
|
|
14897
|
+
const propsParams = useMemo(() => {
|
|
14898
|
+
return dependenciesValues && restProps.request ? {
|
|
14963
14899
|
...params,
|
|
14964
14900
|
...dependenciesValues || {}
|
|
14965
14901
|
} : params;
|
|
14966
|
-
|
|
14967
|
-
|
|
14968
|
-
|
|
14969
|
-
|
|
14970
|
-
|
|
14971
|
-
const
|
|
14972
|
-
|
|
14973
|
-
|
|
14974
|
-
|
|
14975
|
-
|
|
14976
|
-
|
|
14977
|
-
|
|
14978
|
-
|
|
14979
|
-
|
|
14980
|
-
|
|
14981
|
-
|
|
14982
|
-
|
|
14983
|
-
|
|
14984
|
-
|
|
14985
|
-
|
|
14986
|
-
|
|
14987
|
-
|
|
14988
|
-
|
|
14989
|
-
|
|
14990
|
-
|
|
14991
|
-
|
|
14992
|
-
|
|
14993
|
-
|
|
14994
|
-
|
|
14995
|
-
|
|
14996
|
-
|
|
14997
|
-
|
|
14998
|
-
|
|
14999
|
-
|
|
15000
|
-
|
|
15001
|
-
|
|
15002
|
-
|
|
15003
|
-
|
|
15004
|
-
|
|
15005
|
-
|
|
15006
|
-
|
|
15007
|
-
(fieldProps?.onChange)?.(...restParams_0);
|
|
15008
|
-
return;
|
|
15009
|
-
}
|
|
15010
|
-
onChange?.(...restParams_0);
|
|
15011
|
-
},
|
|
15012
|
-
...children?.props || {}
|
|
15013
|
-
});
|
|
15014
|
-
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
15015
|
-
}
|
|
15016
|
-
};
|
|
15017
|
-
$[25] = children;
|
|
15018
|
-
$[26] = fieldProps?.onChange;
|
|
15019
|
-
$[27] = onChange;
|
|
15020
|
-
$[28] = restProps;
|
|
15021
|
-
$[29] = t5;
|
|
15022
|
-
} else t5 = $[29];
|
|
15023
|
-
fieldProps?.onChange;
|
|
15024
|
-
let t6;
|
|
15025
|
-
if ($[30] !== t5) {
|
|
15026
|
-
t6 = t5();
|
|
15027
|
-
$[30] = t5;
|
|
15028
|
-
$[31] = t6;
|
|
15029
|
-
} else t6 = $[31];
|
|
15030
|
-
const childrenRender = t6;
|
|
14902
|
+
}, [
|
|
14903
|
+
dependenciesValues,
|
|
14904
|
+
params,
|
|
14905
|
+
restProps.request
|
|
14906
|
+
]);
|
|
14907
|
+
const memoUnChange = useRefFunction((...restParams) => {
|
|
14908
|
+
if (fieldProps?.onChange) {
|
|
14909
|
+
(fieldProps?.onChange)?.(...restParams);
|
|
14910
|
+
return;
|
|
14911
|
+
}
|
|
14912
|
+
});
|
|
14913
|
+
const memoFieldProps = useMemo(() => ({
|
|
14914
|
+
autoFocus,
|
|
14915
|
+
...fieldProps,
|
|
14916
|
+
onChange: memoUnChange
|
|
14917
|
+
}), [
|
|
14918
|
+
autoFocus,
|
|
14919
|
+
fieldProps,
|
|
14920
|
+
memoUnChange
|
|
14921
|
+
]);
|
|
14922
|
+
const childrenRender = useMemo(() => {
|
|
14923
|
+
if (children) {
|
|
14924
|
+
if (isValidElement(children)) return cloneElement(children, {
|
|
14925
|
+
...restProps,
|
|
14926
|
+
onChange: (...restParams_0) => {
|
|
14927
|
+
if (fieldProps?.onChange) {
|
|
14928
|
+
(fieldProps?.onChange)?.(...restParams_0);
|
|
14929
|
+
return;
|
|
14930
|
+
}
|
|
14931
|
+
onChange?.(...restParams_0);
|
|
14932
|
+
},
|
|
14933
|
+
...children?.props || {}
|
|
14934
|
+
});
|
|
14935
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
14936
|
+
}
|
|
14937
|
+
}, [
|
|
14938
|
+
children,
|
|
14939
|
+
fieldProps?.onChange,
|
|
14940
|
+
onChange,
|
|
14941
|
+
restProps
|
|
14942
|
+
]);
|
|
15031
14943
|
if (childrenRender) return childrenRender;
|
|
15032
|
-
const
|
|
15033
|
-
const
|
|
15034
|
-
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15038
|
-
|
|
15039
|
-
|
|
15040
|
-
|
|
15041
|
-
|
|
15042
|
-
const t12 = proFieldProps$1?.mode || modeContext.mode || "edit";
|
|
15043
|
-
let t13;
|
|
15044
|
-
if ($[34] !== cacheForSwr || $[35] !== memoFieldProps || $[36] !== proFieldProps$1 || $[37] !== propsParams || $[38] !== restProps || $[39] !== t10 || $[40] !== t11 || $[41] !== t12 || $[42] !== t7 || $[43] !== t8 || $[44] !== t9) {
|
|
15045
|
-
t13 = /* @__PURE__ */ jsx(PureProField, {
|
|
14944
|
+
const mode = proFieldProps$1?.mode || modeContext.mode || "edit";
|
|
14945
|
+
const token = theme.useToken();
|
|
14946
|
+
if (mode === "read") return /* @__PURE__ */ jsx("div", {
|
|
14947
|
+
style: {
|
|
14948
|
+
padding: token.cssVar.paddingXXS,
|
|
14949
|
+
borderRadius: token.cssVar.borderRadius,
|
|
14950
|
+
background: token.cssVar.colorBgLayout,
|
|
14951
|
+
width: "100%"
|
|
14952
|
+
},
|
|
14953
|
+
children: /* @__PURE__ */ jsx(PureProField, {
|
|
15046
14954
|
cacheForSwr,
|
|
15047
14955
|
fieldProps: memoFieldProps,
|
|
15048
|
-
formItemRender
|
|
15049
|
-
render
|
|
15050
|
-
text:
|
|
15051
|
-
valueEnum:
|
|
15052
|
-
valueType:
|
|
14956
|
+
formItemRender,
|
|
14957
|
+
render,
|
|
14958
|
+
text: fieldProps?.[valuePropName],
|
|
14959
|
+
valueEnum: runFunction(valueEnum),
|
|
14960
|
+
valueType: valueType$15 || "text",
|
|
15053
14961
|
...proFieldProps$1,
|
|
15054
14962
|
...restProps,
|
|
15055
|
-
mode
|
|
14963
|
+
mode,
|
|
15056
14964
|
params: propsParams
|
|
15057
|
-
})
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
|
|
15063
|
-
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
$
|
|
15067
|
-
$
|
|
15068
|
-
|
|
15069
|
-
|
|
15070
|
-
|
|
15071
|
-
|
|
14965
|
+
})
|
|
14966
|
+
});
|
|
14967
|
+
return /* @__PURE__ */ jsx(PureProField, {
|
|
14968
|
+
cacheForSwr,
|
|
14969
|
+
fieldProps: memoFieldProps,
|
|
14970
|
+
formItemRender,
|
|
14971
|
+
render,
|
|
14972
|
+
text: fieldProps?.[valuePropName],
|
|
14973
|
+
valueEnum: runFunction(valueEnum),
|
|
14974
|
+
valueType: valueType$15 || "text",
|
|
14975
|
+
...proFieldProps$1,
|
|
14976
|
+
...restProps,
|
|
14977
|
+
mode,
|
|
14978
|
+
params: propsParams
|
|
14979
|
+
});
|
|
15072
14980
|
};
|
|
15073
14981
|
const ProFormField = warpField_default?.(memo(BaseProFormField, (prevProps, nextProps) => {
|
|
15074
14982
|
return isDeepEqualReact(nextProps, prevProps, ["onChange", "onBlur"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xxlabs/antd-plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"tsc": "tsc --noEmit"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@ant-design/cssinjs": "^2.0.
|
|
30
|
+
"@ant-design/cssinjs": "^2.0.3",
|
|
31
31
|
"@ant-design/icons": "^6.1.0",
|
|
32
32
|
"@ctrl/tinycolor": "^4.2.0",
|
|
33
33
|
"@dnd-kit/core": "^6.3.1",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
"@dnd-kit/sortable": "^10.0.0",
|
|
36
36
|
"@dnd-kit/utilities": "^3.2.2",
|
|
37
37
|
"@rc-component/form": "^1.6.2",
|
|
38
|
-
"@rc-component/resize-observer": "^1.
|
|
38
|
+
"@rc-component/resize-observer": "^1.1.1",
|
|
39
39
|
"@rc-component/steps": "^1.2.2",
|
|
40
40
|
"@rc-component/table": "^1.9.1",
|
|
41
41
|
"@rc-component/util": "^1.7.0",
|
|
42
42
|
"@umijs/route-utils": "^4.0.3",
|
|
43
43
|
"@umijs/use-params": "^1.0.9",
|
|
44
|
-
"antd": "^6.
|
|
44
|
+
"antd": "^6.2.0",
|
|
45
45
|
"clsx": "^2.1.1",
|
|
46
46
|
"dayjs": "^1.11.19",
|
|
47
47
|
"es-toolkit": "^1.43.0",
|
|
@@ -74,18 +74,18 @@
|
|
|
74
74
|
"eslint-plugin-react": "^7.37.5",
|
|
75
75
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
76
76
|
"globals": "^17.0.0",
|
|
77
|
-
"lefthook": "^2.0.
|
|
78
|
-
"prettier": "^3.
|
|
77
|
+
"lefthook": "^2.0.15",
|
|
78
|
+
"prettier": "^3.8.0",
|
|
79
79
|
"prettier-plugin-organize-imports": "^4.3.0",
|
|
80
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
80
|
+
"prettier-plugin-packagejson": "^2.5.21",
|
|
81
81
|
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
82
82
|
"semantic-release": "^25.0.2",
|
|
83
83
|
"tsdown": "^0.19.0",
|
|
84
84
|
"typescript": "^5.9.3",
|
|
85
|
-
"typescript-eslint": "^8.
|
|
85
|
+
"typescript-eslint": "^8.53.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
|
-
"antd": ">=6.
|
|
88
|
+
"antd": ">=6.2.0",
|
|
89
89
|
"react": ">=19.2.3",
|
|
90
90
|
"react-dom": ">=19.2.3"
|
|
91
91
|
},
|