@faasjs/ant-design 0.0.3-beta.46 → 0.0.3-beta.48

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +15 -3
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4,8 +4,7 @@ import { Dayjs } from 'dayjs';
4
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
5
  export { Drawer, Modal } from 'antd';
6
6
  import { RuleObject } from 'rc-field-form/lib/interface';
7
- import { FaasDataWrapperProps as FaasDataWrapperProps$1 } from '@faasjs/react';
8
- export { FaasDataInjection } from '@faasjs/react';
7
+ import { FaasDataInjection as FaasDataInjection$1, FaasDataWrapperProps as FaasDataWrapperProps$1 } from '@faasjs/react';
9
8
  import { FilterValue, SorterResult, TableCurrentDataSource } from 'antd/es/table/interface';
10
9
  import * as antd_es_form_context from 'antd/es/form/context';
11
10
  import * as antd_es_form_ErrorList from 'antd/es/form/ErrorList';
@@ -152,12 +151,25 @@ type LoadingProps = {
152
151
  */
153
152
  declare function Loading(props: LoadingProps): JSX.Element;
154
153
 
154
+ type FaasDataInjection<T = any> = Partial<FaasDataInjection$1<T>>;
155
155
  interface FaasDataWrapperProps<T = any> extends FaasDataWrapperProps$1<T> {
156
156
  loadingProps?: LoadingProps;
157
157
  loading?: JSX.Element;
158
158
  }
159
159
  /**
160
160
  * FaasDataWrapper component with Loading
161
+ *
162
+ * ```tsx
163
+ * function MyComponent (props: FaasDataInjection) {
164
+ * return <div>{ props.data }</div>
165
+ * }
166
+ *
167
+ * function MyPage () {
168
+ * return <FaasDataWrapper action="test" params={{ a: 1 }}>
169
+ * <MyComponent />
170
+ * </FaasDataWrapper>
171
+ * }
172
+ * ```
161
173
  */
162
174
  declare function FaasDataWrapper<T = any>(props: FaasDataWrapperProps<T>): JSX.Element;
163
175
 
@@ -499,4 +511,4 @@ interface TitleProps {
499
511
  */
500
512
  declare function Title(props: TitleProps): JSX.Element;
501
513
 
502
- export { BaseItemProps, BaseOption, Blank, BlankProps, ConfigContext, ConfigProvider, ConfigProviderProps, Description, DescriptionItemContentProps, DescriptionItemProps, DescriptionProps, DrawerProps, ErrorBoundary, ErrorBoundaryProps, ExtendDescriptionItemProps, ExtendDescriptionTypeProps, ExtendFormItemProps, ExtendFormTypeProps, ExtendTableItemProps, ExtendTableTypeProps, ExtendTypes, 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 };
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "0.0.3-beta.46",
3
+ "version": "0.0.3-beta.48",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",