@faasjs/ant-design 0.0.3-beta.51 → 0.0.3-beta.53
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 +74 -56
- package/dist/index.js +266 -206
- package/dist/index.mjs +305 -239
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ConfigProviderProps as ConfigProviderProps$1 } from 'antd/es/config-provider';
|
|
2
|
+
import { StyleProviderProps } from '@ant-design/cssinjs/lib/StyleContext';
|
|
3
|
+
import { MessageInstance } from 'antd/es/message/interface';
|
|
4
|
+
import { NotificationInstance } from 'antd/es/notification/interface';
|
|
5
|
+
import { ModalProps as ModalProps$1, DrawerProps as DrawerProps$1, FormItemProps as FormItemProps$1, InputProps, InputNumberProps, SwitchProps, SelectProps, DatePickerProps, TimePickerProps, FormInstance, DescriptionsProps, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1, FormProps as FormProps$1, ButtonProps } from 'antd';
|
|
6
|
+
export { Drawer, Modal } from 'antd';
|
|
1
7
|
import * as react from 'react';
|
|
2
8
|
import { CSSProperties, ReactNode, ReactElement, Component, LazyExoticComponent, ComponentType } from 'react';
|
|
3
9
|
import { Dayjs } from 'dayjs';
|
|
4
|
-
import { FormItemProps as FormItemProps$1, InputProps, InputNumberProps, SwitchProps, SelectProps, DatePickerProps, TimePickerProps, FormInstance, DescriptionsProps, TableColumnProps, TablePaginationConfig, TableProps as TableProps$1, DrawerProps as DrawerProps$1, FormProps as FormProps$1, ButtonProps, ModalProps as ModalProps$1 } from 'antd';
|
|
5
|
-
export { Drawer, Modal } from 'antd';
|
|
6
10
|
import { RuleObject } from 'rc-field-form/lib/interface';
|
|
7
11
|
import { FaasDataInjection as FaasDataInjection$1, FaasDataWrapperProps as FaasDataWrapperProps$1 } from '@faasjs/react';
|
|
8
12
|
import { FilterValue, SorterResult, TableCurrentDataSource } from 'antd/es/table/interface';
|
|
@@ -14,6 +18,72 @@ import * as antd_es_form_hooks_useFormInstance from 'antd/es/form/hooks/useFormI
|
|
|
14
18
|
import * as antd_es_form_Form from 'antd/es/form/Form';
|
|
15
19
|
import { RouteProps } from 'react-router-dom';
|
|
16
20
|
|
|
21
|
+
interface ModalProps extends ModalProps$1 {
|
|
22
|
+
children?: JSX.Element | JSX.Element[] | string;
|
|
23
|
+
}
|
|
24
|
+
type setModalProps = (changes: Partial<ModalProps>) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Hook style modal.
|
|
27
|
+
* @param init initial props
|
|
28
|
+
*
|
|
29
|
+
* ```ts
|
|
30
|
+
* function Example() {
|
|
31
|
+
* const { modal, setModalProps } = useModal()
|
|
32
|
+
*
|
|
33
|
+
* return <>
|
|
34
|
+
* <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button>
|
|
35
|
+
* {modal}</>
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare function useModal(init?: ModalProps): {
|
|
40
|
+
modal: JSX.Element;
|
|
41
|
+
modalProps: ModalProps;
|
|
42
|
+
setModalProps(changes: Partial<ModalProps>): void;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
interface DrawerProps extends DrawerProps$1 {
|
|
46
|
+
children?: JSX.Element | JSX.Element[];
|
|
47
|
+
}
|
|
48
|
+
type setDrawerProps = (changes: Partial<DrawerProps>) => void;
|
|
49
|
+
/**
|
|
50
|
+
* Hook style drawer.
|
|
51
|
+
*
|
|
52
|
+
* @param init initial props
|
|
53
|
+
*
|
|
54
|
+
* ```ts
|
|
55
|
+
* function Example() {
|
|
56
|
+
* const { drawer, setDrawerProps } = useDrawer()
|
|
57
|
+
*
|
|
58
|
+
* return <>
|
|
59
|
+
* <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }>
|
|
60
|
+
* Toggle
|
|
61
|
+
* </Button>
|
|
62
|
+
* {drawer}
|
|
63
|
+
* </>
|
|
64
|
+
* }
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
declare function useDrawer(init?: DrawerProps): {
|
|
68
|
+
drawer: JSX.Element;
|
|
69
|
+
drawerProps: DrawerProps;
|
|
70
|
+
setDrawerProps(changes: Partial<DrawerProps>): void;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
interface AppProps {
|
|
74
|
+
children: React.ReactNode;
|
|
75
|
+
styleProviderProps?: StyleProviderProps;
|
|
76
|
+
configProviderProps?: ConfigProviderProps$1;
|
|
77
|
+
}
|
|
78
|
+
interface useAppProps {
|
|
79
|
+
message: Partial<MessageInstance>;
|
|
80
|
+
notification: Partial<NotificationInstance>;
|
|
81
|
+
setModalProps: (changes: Partial<ModalProps>) => void;
|
|
82
|
+
setDrawerProps: (changes: Partial<DrawerProps>) => void;
|
|
83
|
+
}
|
|
84
|
+
declare function App(props: AppProps): JSX.Element;
|
|
85
|
+
declare function useApp(): useAppProps;
|
|
86
|
+
|
|
17
87
|
interface BlankProps {
|
|
18
88
|
value?: any;
|
|
19
89
|
text?: string;
|
|
@@ -128,7 +198,7 @@ interface FormItemProps<T = any> extends FaasItemProps, Omit<FormItemProps$1<T>,
|
|
|
128
198
|
declare function FormItem<T = any>(props: FormItemProps<T>): JSX.Element;
|
|
129
199
|
declare namespace FormItem {
|
|
130
200
|
var useStatus: () => {
|
|
131
|
-
status?: "" | "
|
|
201
|
+
status?: "" | "success" | "error" | "warning" | "validating";
|
|
132
202
|
};
|
|
133
203
|
}
|
|
134
204
|
|
|
@@ -293,34 +363,6 @@ interface UnionFaasItemProps<Value = any, Values = any> extends FormItemProps, D
|
|
|
293
363
|
object?: UnionFaasItemProps<Value, Values>[];
|
|
294
364
|
}
|
|
295
365
|
|
|
296
|
-
interface DrawerProps extends DrawerProps$1 {
|
|
297
|
-
children?: JSX.Element | JSX.Element[];
|
|
298
|
-
}
|
|
299
|
-
type setDrawerProps = (changes: Partial<DrawerProps>) => void;
|
|
300
|
-
/**
|
|
301
|
-
* Hook style drawer.
|
|
302
|
-
*
|
|
303
|
-
* @param init initial props
|
|
304
|
-
*
|
|
305
|
-
* ```ts
|
|
306
|
-
* function Example() {
|
|
307
|
-
* const { drawer, setDrawerProps } = useDrawer()
|
|
308
|
-
*
|
|
309
|
-
* return <>
|
|
310
|
-
* <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }>
|
|
311
|
-
* Toggle
|
|
312
|
-
* </Button>
|
|
313
|
-
* {drawer}
|
|
314
|
-
* </>
|
|
315
|
-
* }
|
|
316
|
-
* ```
|
|
317
|
-
*/
|
|
318
|
-
declare function useDrawer(init?: DrawerProps): {
|
|
319
|
-
drawer: JSX.Element;
|
|
320
|
-
drawerProps: DrawerProps;
|
|
321
|
-
setDrawerProps(changes: Partial<DrawerProps>): void;
|
|
322
|
-
};
|
|
323
|
-
|
|
324
366
|
interface ErrorBoundaryProps {
|
|
325
367
|
message?: ReactNode;
|
|
326
368
|
description?: ReactNode;
|
|
@@ -424,30 +466,6 @@ interface LinkProps {
|
|
|
424
466
|
*/
|
|
425
467
|
declare function Link(props: LinkProps): JSX.Element;
|
|
426
468
|
|
|
427
|
-
interface ModalProps extends ModalProps$1 {
|
|
428
|
-
children?: JSX.Element | JSX.Element[] | string;
|
|
429
|
-
}
|
|
430
|
-
type setModalProps = (changes: Partial<ModalProps>) => void;
|
|
431
|
-
/**
|
|
432
|
-
* Hook style modal.
|
|
433
|
-
* @param init initial props
|
|
434
|
-
*
|
|
435
|
-
* ```ts
|
|
436
|
-
* function Example() {
|
|
437
|
-
* const { modal, setModalProps } = useModal()
|
|
438
|
-
*
|
|
439
|
-
* return <>
|
|
440
|
-
* <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button>
|
|
441
|
-
* {modal}</>
|
|
442
|
-
* }
|
|
443
|
-
* ```
|
|
444
|
-
*/
|
|
445
|
-
declare function useModal(init?: ModalProps): {
|
|
446
|
-
modal: JSX.Element;
|
|
447
|
-
modalProps: ModalProps;
|
|
448
|
-
setModalProps(changes: Partial<ModalProps>): void;
|
|
449
|
-
};
|
|
450
|
-
|
|
451
469
|
declare function PageNotFound(): JSX.Element;
|
|
452
470
|
interface RoutesProps {
|
|
453
471
|
routes: (RouteProps & {
|
|
@@ -511,4 +529,4 @@ interface TitleProps {
|
|
|
511
529
|
*/
|
|
512
530
|
declare function Title(props: TitleProps): JSX.Element;
|
|
513
531
|
|
|
514
|
-
export { BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ErrorBoundaryProps, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, FaasDataInjection, FaasDataWrapper, FaasDataWrapperProps, FaasItemProps, FaasItemType, FaasItemTypeValue, Form, FormItem, FormItemProps, FormProps, FormSubmitProps, Link, LinkProps, Loading, LoadingProps, ModalProps, PageNotFound, Routes, RoutesProps, Table, TableItemProps, TableProps, Title, TitleProps, UnionFaasItemElement, UnionFaasItemInjection, UnionFaasItemProps, UnionFaasItemRender, UnionScene, setDrawerProps, setModalProps, transferOptions, transferValue, useConfigContext, useDrawer, useModal };
|
|
532
|
+
export { App, AppProps, BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ErrorBoundaryProps, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, FaasDataInjection, FaasDataWrapper, FaasDataWrapperProps, FaasItemProps, FaasItemType, FaasItemTypeValue, Form, FormItem, FormItemProps, FormProps, FormSubmitProps, Link, LinkProps, Loading, LoadingProps, ModalProps, PageNotFound, Routes, RoutesProps, Table, TableItemProps, TableProps, Title, TitleProps, UnionFaasItemElement, UnionFaasItemInjection, UnionFaasItemProps, UnionFaasItemRender, UnionScene, setDrawerProps, setModalProps, transferOptions, transferValue, useApp, useAppProps, useConfigContext, useDrawer, useModal };
|