@xxlabs/antd-plus 1.1.0 → 1.3.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 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 react_jsx_runtime18 from "react/jsx-runtime";
9
+ import * as react_jsx_runtime16 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>) => react_jsx_runtime18.JSX.Element;
515
+ declare const Group$1: (props: PropsWithChildren<CardProps>) => react_jsx_runtime16.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> | react_jsx_runtime18.JSX.Element | 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_runtime16.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) => react_jsx_runtime18.JSX.Element;
959
+ declare const InlineErrorFormItem: (props: InlineErrorFormItemProps) => react_jsx_runtime16.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[] | (react_jsx_runtime18.JSX.Element | undefined)[];
1161
+ }) => ReactNode[] | (react_jsx_runtime16.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> | react_jsx_runtime18.JSX.Element | 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_runtime16.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[] | (react_jsx_runtime18.JSX.Element | undefined)[];
1976
+ actionRender: (key: RecordKey, config?: ActionTypeText<RecordType>) => ReactNode[] | (react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
2079
+ <RecordType extends Record<string, any>, ValueType = "text">(props: ProDescriptionsProps<RecordType, ValueType>): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
3000
+ }: ProFormDependencyProps<T>): react_jsx_runtime16.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
- }): react_jsx_runtime18.JSX.Element;
3623
+ }): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
3733
+ declare function LightFilter<T = Record<string, any>>(props: LightFilterProps<T>): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
3888
+ }: ModalFormProps<T, U>): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
4020
+ declare function StepForm<T = Record<string, any>>(stepNativeProps: StepFormProps<T>): react_jsx_runtime16.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
- }): react_jsx_runtime18.JSX.Element;
4075
+ }): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
4197
+ declare function BetaSchemaForm<T, ValueType = 'text'>(props: FormSchema<T, ValueType>): react_jsx_runtime16.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
- }) => react_jsx_runtime18.JSX.Element | null;
5251
+ }) => react_jsx_runtime16.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>) => react_jsx_runtime18.JSX.Element;
6083
+ }: ProHelpProps<ValueTypeMap>) => react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
6674
+ declare function FieldEditableTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
6682
+ declare function CellEditorTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
6685
+ declare function RowEditorTable<DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = 'text'>(props: EditableProTableProps<DataType, Params, ValueType>): react_jsx_runtime16.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: () => react_jsx_runtime18.JSX.Element;
6721
+ render: () => react_jsx_runtime16.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>): react_jsx_runtime18.JSX.Element;
6731
+ <DataType extends Record<string, any>, Params extends ParamsType = ParamsType, ValueType = "text">(props: ProTableProps<DataType, Params, ValueType>): react_jsx_runtime16.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>): 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;
6823
+ declare function BaseProList<RecordType extends Record<string, any>, U extends Record<string, any> = Record<string, any>>(props: ProListProps<RecordType, U>): react_jsx_runtime16.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_runtime16.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
- }) => react_jsx_runtime18.JSX.Element;
6843
+ }) => react_jsx_runtime16.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
- }) => react_jsx_runtime18.JSX.Element;
6857
+ }) => react_jsx_runtime16.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
- }) => react_jsx_runtime18.JSX.Element;
6879
+ }) => react_jsx_runtime16.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
- }) => react_jsx_runtime18.JSX.Element;
6897
+ }) => react_jsx_runtime16.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,91 +14892,183 @@ var Captcha_default = ProFormCaptcha;
14892
14892
  //#endregion
14893
14893
  //#region src/form/components/Field/index.tsx
14894
14894
  const BaseProFormField = (props) => {
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;
14895
+ const $ = c(46);
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, 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;
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;
14896
14959
  const modeContext = useContext(EditOrReadOnlyContext);
14897
- const propsParams = useMemo(() => {
14898
- return dependenciesValues && restProps.request ? {
14960
+ let t2;
14961
+ if ($[15] !== dependenciesValues || $[16] !== params || $[17] !== restProps.request) {
14962
+ t2 = dependenciesValues && restProps.request ? {
14899
14963
  ...params,
14900
14964
  ...dependenciesValues || {}
14901
14965
  } : params;
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
- ]);
14966
+ $[15] = dependenciesValues;
14967
+ $[16] = params;
14968
+ $[17] = restProps.request;
14969
+ $[18] = t2;
14970
+ } else t2 = $[18];
14971
+ const propsParams = t2;
14972
+ let t3;
14973
+ if ($[19] !== fieldProps?.onChange) {
14974
+ t3 = (...t4$1) => {
14975
+ const restParams = t4$1;
14976
+ if (fieldProps?.onChange) {
14977
+ (fieldProps?.onChange)?.(...restParams);
14978
+ return;
14979
+ }
14980
+ };
14981
+ $[19] = fieldProps?.onChange;
14982
+ $[20] = t3;
14983
+ } else t3 = $[20];
14984
+ const memoUnChange = useRefFunction(t3);
14985
+ let t4;
14986
+ if ($[21] !== autoFocus || $[22] !== fieldProps || $[23] !== memoUnChange) {
14987
+ t4 = {
14988
+ autoFocus,
14989
+ ...fieldProps,
14990
+ onChange: memoUnChange
14991
+ };
14992
+ $[21] = autoFocus;
14993
+ $[22] = fieldProps;
14994
+ $[23] = memoUnChange;
14995
+ $[24] = t4;
14996
+ } else t4 = $[24];
14997
+ const memoFieldProps = t4;
14998
+ let t5;
14999
+ if ($[25] !== children || $[26] !== fieldProps?.onChange || $[27] !== onChange || $[28] !== restProps) {
15000
+ t5 = () => {
15001
+ if (children) {
15002
+ if (isValidElement(children)) return cloneElement(children, {
15003
+ ...restProps,
15004
+ onChange: (...t6$1) => {
15005
+ const restParams_0 = t6$1;
15006
+ if (fieldProps?.onChange) {
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;
14943
15031
  if (childrenRender) return childrenRender;
14944
15032
  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, {
15033
+ const t7 = formItemRender;
15034
+ const t8 = render;
15035
+ const t9 = fieldProps?.[valuePropName];
15036
+ let t10;
15037
+ if ($[32] !== valueEnum) {
15038
+ t10 = runFunction(valueEnum);
15039
+ $[32] = valueEnum;
15040
+ $[33] = t10;
15041
+ } else t10 = $[33];
15042
+ const t11 = valueType$15 || "text";
15043
+ let t12;
15044
+ if ($[34] !== cacheForSwr || $[35] !== memoFieldProps || $[36] !== mode || $[37] !== proFieldProps$1 || $[38] !== propsParams || $[39] !== restProps || $[40] !== t10 || $[41] !== t11 || $[42] !== t7 || $[43] !== t8 || $[44] !== t9) {
15045
+ t12 = /* @__PURE__ */ jsx(PureProField, {
14954
15046
  cacheForSwr,
14955
15047
  fieldProps: memoFieldProps,
14956
- formItemRender,
14957
- render,
14958
- text: fieldProps?.[valuePropName],
14959
- valueEnum: runFunction(valueEnum),
14960
- valueType: valueType$15 || "text",
15048
+ formItemRender: t7,
15049
+ render: t8,
15050
+ text: t9,
15051
+ valueEnum: t10,
15052
+ valueType: t11,
14961
15053
  ...proFieldProps$1,
14962
15054
  ...restProps,
14963
15055
  mode,
14964
15056
  params: propsParams
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
- });
15057
+ });
15058
+ $[34] = cacheForSwr;
15059
+ $[35] = memoFieldProps;
15060
+ $[36] = mode;
15061
+ $[37] = proFieldProps$1;
15062
+ $[38] = propsParams;
15063
+ $[39] = restProps;
15064
+ $[40] = t10;
15065
+ $[41] = t11;
15066
+ $[42] = t7;
15067
+ $[43] = t8;
15068
+ $[44] = t9;
15069
+ $[45] = t12;
15070
+ } else t12 = $[45];
15071
+ return t12;
14980
15072
  };
14981
15073
  const ProFormField = warpField_default?.(memo(BaseProFormField, (prevProps, nextProps) => {
14982
15074
  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.1.0",
3
+ "version": "1.3.0",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "type": "module",
@@ -44,7 +44,7 @@
44
44
  "antd": "^6.2.0",
45
45
  "clsx": "^2.1.1",
46
46
  "dayjs": "^1.11.19",
47
- "es-toolkit": "^1.43.0",
47
+ "es-toolkit": "^1.44.0",
48
48
  "path-to-regexp": "^8.3.0",
49
49
  "react": "^19.2.3",
50
50
  "react-dom": "^19.2.3",
@@ -65,7 +65,7 @@
65
65
  "@semantic-release/github": "^12.0.2",
66
66
  "@semantic-release/npm": "^13.1.3",
67
67
  "@semantic-release/release-notes-generator": "^14.1.0",
68
- "@types/node": "^22.19.5",
68
+ "@types/node": "^22.19.7",
69
69
  "@types/react": "^19.2.8",
70
70
  "@types/react-dom": "^19.2.3",
71
71
  "babel-plugin-react-compiler": "^1.0.0",