@faasjs/ant-design 8.0.0-beta.19 → 8.0.0-beta.20
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 +37 -37
- package/dist/index.mjs +19 -9
- package/package.json +5 -6
- package/dist/index.cjs +0 -2087
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ErrorBoundaryProps, FaasDataInjection as FaasDataInjection$1, FaasDataWrapperProps as FaasDataWrapperProps$1, FaasDataWrapperRef, FaasReactClient, FaasReactClientOptions, faas, useFaas } from "@faasjs/react";
|
|
2
2
|
import { ButtonProps, ConfigProviderProps as ConfigProviderProps$1, DatePickerProps, DescriptionsProps, Drawer, DrawerProps as DrawerProps$1, FormInstance, FormItemProps as FormItemProps$1, FormProps as FormProps$1, GlobalToken, InputNumberProps, InputProps, Modal, ModalProps as ModalProps$1, RadioProps, SelectProps, SwitchProps, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1, TabsProps as TabsProps$1 } from "antd";
|
|
3
3
|
import { BrowserRouterProps, RouteProps } from "react-router-dom";
|
|
4
|
-
import * as react from "react";
|
|
4
|
+
import * as _$react from "react";
|
|
5
5
|
import { CSSProperties, ComponentType, Dispatch, FC, JSX, LazyExoticComponent, ReactElement, ReactNode, SetStateAction, lazy } from "react";
|
|
6
|
-
import
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
7
|
import { Dayjs } from "dayjs";
|
|
8
|
-
import * as antd_es_form_FormItem0 from "antd/es/form/FormItem";
|
|
9
|
-
import * as antd_es_form0 from "antd/es/form";
|
|
10
|
-
import { RuleObject } from "antd/es/form";
|
|
11
|
-
import { FilterValue, SorterResult, TableCurrentDataSource } from "antd/es/table/interface";
|
|
12
|
-
import * as antd_es_form_Form0 from "antd/es/form/Form";
|
|
13
|
-
import * as antd_es_form_hooks_useFormInstance0 from "antd/es/form/hooks/useFormInstance";
|
|
14
|
-
import * as _rc_component_form0 from "@rc-component/form";
|
|
15
|
-
import * as antd_es_form_context0 from "antd/es/form/context";
|
|
16
|
-
import { Tab } from "@rc-component/tabs/lib/interface";
|
|
17
|
-
import { MessageInstance } from "antd/es/message/interface";
|
|
18
|
-
import { NotificationInstance } from "antd/es/notification/interface";
|
|
8
|
+
import * as _$antd_es_form_FormItem0 from "antd/es/form/FormItem/index.js";
|
|
9
|
+
import * as _$antd_es_form0 from "antd/es/form/index.js";
|
|
10
|
+
import { RuleObject } from "antd/es/form/index.js";
|
|
11
|
+
import { FilterValue, SorterResult, TableCurrentDataSource } from "antd/es/table/interface.js";
|
|
12
|
+
import * as _$antd_es_form_Form0 from "antd/es/form/Form.js";
|
|
13
|
+
import * as _$antd_es_form_hooks_useFormInstance0 from "antd/es/form/hooks/useFormInstance.js";
|
|
14
|
+
import * as _$_rc_component_form0 from "@rc-component/form";
|
|
15
|
+
import * as _$antd_es_form_context0 from "antd/es/form/context.js";
|
|
16
|
+
import { Tab } from "@rc-component/tabs/lib/interface.js";
|
|
17
|
+
import { MessageInstance } from "antd/es/message/interface.js";
|
|
18
|
+
import { NotificationInstance } from "antd/es/notification/interface.js";
|
|
19
19
|
|
|
20
20
|
//#region ../types/src/index.d.ts
|
|
21
21
|
/**
|
|
@@ -111,7 +111,7 @@ type LoadingProps = {
|
|
|
111
111
|
* }
|
|
112
112
|
* ```
|
|
113
113
|
*/
|
|
114
|
-
declare function Loading(props: LoadingProps): react_jsx_runtime0.JSX.Element;
|
|
114
|
+
declare function Loading(props: LoadingProps): _$react_jsx_runtime0.JSX.Element;
|
|
115
115
|
//#endregion
|
|
116
116
|
//#region src/FaasDataWrapper.d.ts
|
|
117
117
|
/**
|
|
@@ -330,7 +330,7 @@ interface ConfigProviderProps {
|
|
|
330
330
|
/**
|
|
331
331
|
* React context storing the resolved FaasJS Ant Design theme.
|
|
332
332
|
*/
|
|
333
|
-
declare const ConfigContext: react.Context<ConfigContextValue>;
|
|
333
|
+
declare const ConfigContext: _$react.Context<ConfigContextValue>;
|
|
334
334
|
/**
|
|
335
335
|
* Provide theme overrides and optional FaasJS client initialization for descendants.
|
|
336
336
|
*
|
|
@@ -352,7 +352,7 @@ declare const ConfigContext: react.Context<ConfigContextValue>;
|
|
|
352
352
|
* }
|
|
353
353
|
* ```
|
|
354
354
|
*/
|
|
355
|
-
declare function ConfigProvider(props: ConfigProviderProps): react_jsx_runtime0.JSX.Element | null;
|
|
355
|
+
declare function ConfigProvider(props: ConfigProviderProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
356
356
|
/**
|
|
357
357
|
* Read the current `@faasjs/ant-design` config context.
|
|
358
358
|
*
|
|
@@ -401,7 +401,7 @@ declare function useConfigContext(): ConfigContextValue;
|
|
|
401
401
|
* }
|
|
402
402
|
* ```
|
|
403
403
|
*/
|
|
404
|
-
declare function ErrorBoundary(props: ErrorBoundaryProps): react_jsx_runtime0.JSX.Element;
|
|
404
|
+
declare function ErrorBoundary(props: ErrorBoundaryProps): _$react_jsx_runtime0.JSX.Element;
|
|
405
405
|
//#endregion
|
|
406
406
|
//#region src/App.d.ts
|
|
407
407
|
/**
|
|
@@ -467,7 +467,7 @@ interface AppProps {
|
|
|
467
467
|
* }
|
|
468
468
|
* ```
|
|
469
469
|
*/
|
|
470
|
-
declare function App(props: AppProps): react_jsx_runtime0.JSX.Element;
|
|
470
|
+
declare function App(props: AppProps): _$react_jsx_runtime0.JSX.Element;
|
|
471
471
|
//#endregion
|
|
472
472
|
//#region src/Blank.d.ts
|
|
473
473
|
/**
|
|
@@ -632,10 +632,10 @@ interface ExtendFormItemProps extends Omit<FormItemProps, 'type'> {
|
|
|
632
632
|
* }
|
|
633
633
|
* ```
|
|
634
634
|
*/
|
|
635
|
-
declare function FormItem<T = any>(props: FormItemProps<T>): react_jsx_runtime0.JSX.Element | null;
|
|
635
|
+
declare function FormItem<T = any>(props: FormItemProps<T>): _$react_jsx_runtime0.JSX.Element | null;
|
|
636
636
|
declare namespace FormItem {
|
|
637
637
|
var useStatus: () => {
|
|
638
|
-
status?: antd_es_form_FormItem0.ValidateStatus;
|
|
638
|
+
status?: _$antd_es_form_FormItem0.ValidateStatus;
|
|
639
639
|
errors: React.ReactNode[];
|
|
640
640
|
warnings: React.ReactNode[];
|
|
641
641
|
};
|
|
@@ -760,7 +760,7 @@ type TableFaasDataResponse<T = any> = {
|
|
|
760
760
|
* }
|
|
761
761
|
* ```
|
|
762
762
|
*/
|
|
763
|
-
declare function Table<T extends Record<string, any>, ExtendTypes = any>(props: TableProps<T, ExtendTypes>): react_jsx_runtime0.JSX.Element | null;
|
|
763
|
+
declare function Table<T extends Record<string, any>, ExtendTypes = any>(props: TableProps<T, ExtendTypes>): _$react_jsx_runtime0.JSX.Element | null;
|
|
764
764
|
//#endregion
|
|
765
765
|
//#region src/data.d.ts
|
|
766
766
|
/**
|
|
@@ -1047,7 +1047,7 @@ interface UnionFaasItemProps<Value = any, Values = any> extends FormItemProps, D
|
|
|
1047
1047
|
* })
|
|
1048
1048
|
* ```
|
|
1049
1049
|
*/
|
|
1050
|
-
declare function cloneUnionFaasItemElement(element: UnionFaasItemElement, props: any): ReactElement<UnionFaasItemInjection<any, any>, string | react.JSXElementConstructor<any>>;
|
|
1050
|
+
declare function cloneUnionFaasItemElement(element: UnionFaasItemElement, props: any): ReactElement<UnionFaasItemInjection<any, any>, string | _$react.JSXElementConstructor<any>>;
|
|
1051
1051
|
//#endregion
|
|
1052
1052
|
//#region src/Description.d.ts
|
|
1053
1053
|
/**
|
|
@@ -1152,7 +1152,7 @@ interface DescriptionItemContentProps<T = any> {
|
|
|
1152
1152
|
* }
|
|
1153
1153
|
* ```
|
|
1154
1154
|
*/
|
|
1155
|
-
declare function Description<T extends Record<string, any> = any>(props: DescriptionProps<T>): react_jsx_runtime0.JSX.Element;
|
|
1155
|
+
declare function Description<T extends Record<string, any> = any>(props: DescriptionProps<T>): _$react_jsx_runtime0.JSX.Element;
|
|
1156
1156
|
declare namespace Description {
|
|
1157
1157
|
var displayName: string;
|
|
1158
1158
|
}
|
|
@@ -1198,7 +1198,7 @@ type setDrawerProps = Dispatch<SetStateAction<DrawerProps>>;
|
|
|
1198
1198
|
* ```
|
|
1199
1199
|
*/
|
|
1200
1200
|
declare function useDrawer(init?: DrawerProps): {
|
|
1201
|
-
drawer: react_jsx_runtime0.JSX.Element;
|
|
1201
|
+
drawer: _$react_jsx_runtime0.JSX.Element;
|
|
1202
1202
|
drawerProps: DrawerProps;
|
|
1203
1203
|
setDrawerProps: setDrawerProps;
|
|
1204
1204
|
};
|
|
@@ -1311,15 +1311,15 @@ type FormProps<Values extends Record<string, any> = any, ExtendItemProps extends
|
|
|
1311
1311
|
* }
|
|
1312
1312
|
* ```
|
|
1313
1313
|
*/
|
|
1314
|
-
declare function Form<Values extends Record<string, any> = any>(props: FormProps<Values>): react_jsx_runtime0.JSX.Element | null;
|
|
1314
|
+
declare function Form<Values extends Record<string, any> = any>(props: FormProps<Values>): _$react_jsx_runtime0.JSX.Element | null;
|
|
1315
1315
|
declare namespace Form {
|
|
1316
|
-
var useForm: typeof antd_es_form_Form0.useForm;
|
|
1317
|
-
var useFormInstance: typeof antd_es_form_hooks_useFormInstance0.default;
|
|
1318
|
-
var useWatch: typeof _rc_component_form0.useWatch;
|
|
1316
|
+
var useForm: typeof _$antd_es_form_Form0.useForm;
|
|
1317
|
+
var useFormInstance: typeof _$antd_es_form_hooks_useFormInstance0.default;
|
|
1318
|
+
var useWatch: typeof _$_rc_component_form0.useWatch;
|
|
1319
1319
|
var Item: typeof FormItem;
|
|
1320
|
-
var List: react.FC<antd_es_form0.FormListProps>;
|
|
1321
|
-
var ErrorList: react.FC<antd_es_form0.ErrorListProps>;
|
|
1322
|
-
var Provider: react.FC<antd_es_form_context0.FormProviderProps>;
|
|
1320
|
+
var List: _$react.FC<_$antd_es_form0.FormListProps>;
|
|
1321
|
+
var ErrorList: _$react.FC<_$antd_es_form0.ErrorListProps>;
|
|
1322
|
+
var Provider: _$react.FC<_$antd_es_form_context0.FormProviderProps>;
|
|
1323
1323
|
}
|
|
1324
1324
|
//#endregion
|
|
1325
1325
|
//#region src/Link.d.ts
|
|
@@ -1370,7 +1370,7 @@ interface LinkProps {
|
|
|
1370
1370
|
* }
|
|
1371
1371
|
* ```
|
|
1372
1372
|
*/
|
|
1373
|
-
declare function Link(props: LinkProps): react_jsx_runtime0.JSX.Element;
|
|
1373
|
+
declare function Link(props: LinkProps): _$react_jsx_runtime0.JSX.Element;
|
|
1374
1374
|
//#endregion
|
|
1375
1375
|
//#region src/Modal.d.ts
|
|
1376
1376
|
/**
|
|
@@ -1413,7 +1413,7 @@ type setModalProps = Dispatch<SetStateAction<ModalProps>>;
|
|
|
1413
1413
|
* ```
|
|
1414
1414
|
*/
|
|
1415
1415
|
declare function useModal(init?: ModalProps): {
|
|
1416
|
-
modal: react_jsx_runtime0.JSX.Element;
|
|
1416
|
+
modal: _$react_jsx_runtime0.JSX.Element;
|
|
1417
1417
|
modalProps: ModalProps;
|
|
1418
1418
|
setModalProps: setModalProps;
|
|
1419
1419
|
};
|
|
@@ -1436,7 +1436,7 @@ declare function useModal(init?: ModalProps): {
|
|
|
1436
1436
|
* }
|
|
1437
1437
|
* ```
|
|
1438
1438
|
*/
|
|
1439
|
-
declare function PageNotFound(): react_jsx_runtime0.JSX.Element;
|
|
1439
|
+
declare function PageNotFound(): _$react_jsx_runtime0.JSX.Element;
|
|
1440
1440
|
/**
|
|
1441
1441
|
* Props for the lazy-loading {@link Routes} wrapper.
|
|
1442
1442
|
*/
|
|
@@ -1479,7 +1479,7 @@ interface RoutesProps {
|
|
|
1479
1479
|
* }
|
|
1480
1480
|
* ```
|
|
1481
1481
|
*/
|
|
1482
|
-
declare function Routes(props: RoutesProps): react_jsx_runtime0.JSX.Element;
|
|
1482
|
+
declare function Routes(props: RoutesProps): _$react_jsx_runtime0.JSX.Element;
|
|
1483
1483
|
//#endregion
|
|
1484
1484
|
//#region src/Tabs.d.ts
|
|
1485
1485
|
/**
|
|
@@ -1529,7 +1529,7 @@ interface TabsProps extends Omit<TabsProps$1, 'items'> {
|
|
|
1529
1529
|
* }
|
|
1530
1530
|
* ```
|
|
1531
1531
|
*/
|
|
1532
|
-
declare function Tabs(props: TabsProps): react_jsx_runtime0.JSX.Element;
|
|
1532
|
+
declare function Tabs(props: TabsProps): _$react_jsx_runtime0.JSX.Element;
|
|
1533
1533
|
//#endregion
|
|
1534
1534
|
//#region src/Title.d.ts
|
|
1535
1535
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -805,15 +805,25 @@ DescriptionItemContent.displayName = "DescriptionItemContent";
|
|
|
805
805
|
*/
|
|
806
806
|
function Description(props) {
|
|
807
807
|
const { faasData, dataSource, renderTitle, extendTypes, ...descriptionProps } = props;
|
|
808
|
-
if (faasData && !dataSource)
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
808
|
+
if (faasData && !dataSource) {
|
|
809
|
+
const faasDataProps = {
|
|
810
|
+
action: faasData.action,
|
|
811
|
+
render: ({ data }) => /* @__PURE__ */ jsx(Description, {
|
|
812
|
+
...descriptionProps,
|
|
813
|
+
dataSource: data,
|
|
814
|
+
...renderTitle ? { renderTitle } : {},
|
|
815
|
+
...extendTypes ? { extendTypes } : {}
|
|
816
|
+
})
|
|
817
|
+
};
|
|
818
|
+
if (faasData.baseUrl !== void 0) faasDataProps.baseUrl = faasData.baseUrl;
|
|
819
|
+
if (faasData.data !== void 0) faasDataProps.data = faasData.data;
|
|
820
|
+
if (faasData.fallback !== void 0) faasDataProps.fallback = faasData.fallback;
|
|
821
|
+
if (faasData.onDataChange !== void 0) faasDataProps.onDataChange = (args) => faasData.onDataChange?.(args);
|
|
822
|
+
if (faasData.params !== void 0) faasDataProps.params = faasData.params;
|
|
823
|
+
if (faasData.ref !== void 0) faasDataProps.ref = faasData.ref;
|
|
824
|
+
if (faasData.setData !== void 0) faasDataProps.setData = faasData.setData;
|
|
825
|
+
return /* @__PURE__ */ jsx(FaasDataWrapper, { ...faasDataProps });
|
|
826
|
+
}
|
|
817
827
|
return /* @__PURE__ */ jsx(Descriptions, {
|
|
818
828
|
...descriptionProps,
|
|
819
829
|
title: typeof renderTitle === "function" ? renderTitle(dataSource) : descriptionProps.title,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@faasjs/ant-design",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.20",
|
|
4
4
|
"homepage": "https://faasjs.com/doc/ant-design",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/faasjs/faasjs/issues"
|
|
@@ -16,19 +16,18 @@
|
|
|
16
16
|
"dist"
|
|
17
17
|
],
|
|
18
18
|
"type": "module",
|
|
19
|
-
"main": "dist/index.
|
|
19
|
+
"main": "dist/index.mjs",
|
|
20
20
|
"module": "dist/index.mjs",
|
|
21
21
|
"types": "dist/index.d.ts",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
|
-
"
|
|
26
|
-
"require": "./dist/index.cjs"
|
|
25
|
+
"default": "./dist/index.mjs"
|
|
27
26
|
}
|
|
28
27
|
},
|
|
29
28
|
"devDependencies": {
|
|
30
29
|
"@ant-design/icons": "*",
|
|
31
|
-
"@faasjs/react": ">=8.0.0-beta.
|
|
30
|
+
"@faasjs/react": ">=8.0.0-beta.20",
|
|
32
31
|
"@types/lodash-es": "*",
|
|
33
32
|
"@types/react": "^19.0.0",
|
|
34
33
|
"@types/react-dom": "^19.0.0",
|
|
@@ -40,7 +39,7 @@
|
|
|
40
39
|
},
|
|
41
40
|
"peerDependencies": {
|
|
42
41
|
"@ant-design/icons": "*",
|
|
43
|
-
"@faasjs/react": ">=8.0.0-beta.
|
|
42
|
+
"@faasjs/react": ">=8.0.0-beta.20",
|
|
44
43
|
"antd": "^6.0.0",
|
|
45
44
|
"lodash-es": "*",
|
|
46
45
|
"react": "^19.0.0",
|