@faasjs/ant-design 0.0.3-beta.3 → 0.0.3-beta.30

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/README.md CHANGED
@@ -42,58 +42,62 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
42
42
  ### Namespaces
43
43
 
44
44
  - [Form](modules/Form.md)
45
+ - [FormItem](modules/FormItem.md)
46
+
47
+ ### Interfaces
48
+
49
+ - [BaseItemProps](interfaces/BaseItemProps.md)
50
+ - [BlankProps](interfaces/BlankProps.md)
51
+ - [ConfigProviderProps](interfaces/ConfigProviderProps.md)
52
+ - [DescriptionItemContentProps](interfaces/DescriptionItemContentProps.md)
53
+ - [DescriptionItemProps](interfaces/DescriptionItemProps.md)
54
+ - [DescriptionProps](interfaces/DescriptionProps.md)
55
+ - [DrawerProps](interfaces/DrawerProps.md)
56
+ - [ExtendDescriptionTypeProps](interfaces/ExtendDescriptionTypeProps.md)
57
+ - [FaasItemProps](interfaces/FaasItemProps.md)
58
+ - [FormItemProps](interfaces/FormItemProps.md)
59
+ - [FormProps](interfaces/FormProps.md)
60
+ - [LinkProps](interfaces/LinkProps.md)
61
+ - [ModalProps](interfaces/ModalProps.md)
62
+ - [RoutesProps](interfaces/RoutesProps.md)
63
+ - [TableItemProps](interfaces/TableItemProps.md)
64
+ - [TitleProps](interfaces/TitleProps.md)
45
65
 
46
66
  ### Type Aliases
47
67
 
48
- - [BaseItemProps](#baseitemprops)
49
68
  - [BaseOption](#baseoption)
50
- - [BlankProps](#blankprops)
51
- - [CalendarProps](#calendarprops)
52
- - [ConfigProviderProps](#configproviderprops)
53
- - [DatePickerProps](#datepickerprops)
54
- - [DescriptionItemProps](#descriptionitemprops)
55
- - [DescriptionProps](#descriptionprops)
56
- - [DrawerProps](#drawerprops)
57
69
  - [ExtendDescriptionItemProps](#extenddescriptionitemprops)
58
- - [ExtendDescriptionTypeProps](#extenddescriptiontypeprops)
59
70
  - [ExtendFormItemProps](#extendformitemprops)
60
71
  - [ExtendFormTypeProps](#extendformtypeprops)
61
72
  - [ExtendTableItemProps](#extendtableitemprops)
62
73
  - [ExtendTableTypeProps](#extendtabletypeprops)
63
74
  - [ExtendTypes](#extendtypes)
64
- - [FaasItemProps](#faasitemprops)
75
+ - [FaasDataInjection](#faasdatainjection)
76
+ - [FaasDataWrapperProps](#faasdatawrapperprops)
65
77
  - [FaasItemType](#faasitemtype)
66
78
  - [FaasItemTypeValue](#faasitemtypevalue)
67
- - [FormItemProps](#formitemprops)
68
- - [FormProps](#formprops)
69
- - [LinkProps](#linkprops)
70
- - [ModalProps](#modalprops)
71
- - [RoutesProps](#routesprops)
72
- - [TableItemProps](#tableitemprops)
79
+ - [FormSubmitProps](#formsubmitprops)
73
80
  - [TableProps](#tableprops)
74
- - [TimePickerProps](#timepickerprops)
75
- - [TitleProps](#titleprops)
76
81
  - [setDrawerProps](#setdrawerprops)
77
82
  - [setModalProps](#setmodalprops)
78
83
 
79
84
  ### Variables
80
85
 
81
86
  - [ConfigContext](#configcontext)
82
- - [DatePicker](#datepicker)
83
87
 
84
88
  ### Functions
85
89
 
86
90
  - [Blank](#blank)
87
- - [Calendar](#calendar)
88
91
  - [ConfigProvider](#configprovider)
89
92
  - [Description](#description)
93
+ - [FaasDataWrapper](#faasdatawrapper)
90
94
  - [Form](#form)
91
95
  - [FormItem](#formitem)
92
96
  - [Link](#link)
97
+ - [Loading](#loading)
93
98
  - [PageNotFound](#pagenotfound)
94
99
  - [Routes](#routes)
95
100
  - [Table](#table)
96
- - [TimePicker](#timepicker)
97
101
  - [Title](#title)
98
102
  - [transferOptions](#transferoptions)
99
103
  - [transferValue](#transfervalue)
@@ -103,88 +107,39 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
103
107
 
104
108
  ## Type Aliases
105
109
 
106
- ### BaseItemProps
107
-
108
- Ƭ **BaseItemProps**: `Object`
109
-
110
- #### Type declaration
111
-
112
- | Name | Type |
113
- | :------ | :------ |
114
- | `id` | `string` |
115
- | `options?` | [`BaseOption`](#baseoption)[] |
116
- | `title?` | `string` |
117
-
118
- ___
119
-
120
110
  ### BaseOption
121
111
 
122
112
  Ƭ **BaseOption**: `string` \| `number` \| { `label`: `string` ; `value?`: `string` \| `number` }
123
113
 
124
114
  ___
125
115
 
126
- ### BlankProps
127
-
128
- Ƭ **BlankProps**: `Object`
129
-
130
- #### Type declaration
116
+ ### ExtendDescriptionItemProps
131
117
 
132
- | Name | Type |
133
- | :------ | :------ |
134
- | `text?` | `string` |
135
- | `value?` | `any` |
118
+ Ƭ **ExtendDescriptionItemProps**: [`BaseItemProps`](interfaces/BaseItemProps.md)
136
119
 
137
120
  ___
138
121
 
139
- ### CalendarProps
122
+ ### ExtendFormItemProps
140
123
 
141
- Ƭ **CalendarProps**: `AntdProps`<`Dayjs`\>
124
+ Ƭ **ExtendFormItemProps**: [`BaseItemProps`](interfaces/BaseItemProps.md) & `AntdFormItemProps`
142
125
 
143
126
  ___
144
127
 
145
- ### ConfigProviderProps
128
+ ### ExtendFormTypeProps
146
129
 
147
- Ƭ **ConfigProviderProps**: `Object`
130
+ Ƭ **ExtendFormTypeProps**: `Object`
148
131
 
149
132
  #### Type declaration
150
133
 
151
134
  | Name | Type |
152
135
  | :------ | :------ |
153
- | `Blank?` | { `text?`: `string` } |
154
- | `Blank.text?` | `string` |
155
- | `Form?` | { `submit?`: { `text?`: `string` } } |
156
- | `Form.submit?` | { `text?`: `string` } |
157
- | `Form.submit.text?` | `string` |
158
- | `Link?` | { `style?`: `CSSProperties` ; `target?`: `string` } |
159
- | `Link.style?` | `CSSProperties` |
160
- | `Link.target?` | `string` |
161
- | `Title?` | { `separator?`: `string` ; `suffix?`: `string` } |
162
- | `Title.separator?` | `string` |
163
- | `Title.suffix?` | `string` |
164
- | `antd?` | `AntdConfigProviderProps` |
165
- | `common?` | { `add?`: `string` ; `all?`: `string` ; `blank?`: `string` ; `delete?`: `string` ; `pageNotFound?`: `string` ; `required?`: `string` ; `reset?`: `string` ; `search?`: `string` ; `submit?`: `string` } |
166
- | `common.add?` | `string` |
167
- | `common.all?` | `string` |
168
- | `common.blank?` | `string` |
169
- | `common.delete?` | `string` |
170
- | `common.pageNotFound?` | `string` |
171
- | `common.required?` | `string` |
172
- | `common.reset?` | `string` |
173
- | `common.search?` | `string` |
174
- | `common.submit?` | `string` |
175
- | `lang?` | `string` |
176
-
177
- ___
178
-
179
- ### DatePickerProps
180
-
181
- Ƭ **DatePickerProps**: `PickerDateProps`<`Dayjs`\>
136
+ | `children?` | `ReactNode` |
182
137
 
183
138
  ___
184
139
 
185
- ### DescriptionItemProps
140
+ ### ExtendTableItemProps
186
141
 
187
- Ƭ **DescriptionItemProps**<`T`\>: { `children?`: `JSX.Element` ; `if?`: (`values`: `Record`<`string`, `any`\>) => `boolean` ; `render?`: (`value`: `T`, `values`: `any`) => `ReactNode` \| `JSX.Element` } & [`FaasItemProps`](#faasitemprops) & { `object?`: [`DescriptionItemProps`](#descriptionitemprops)[] }
142
+ Ƭ **ExtendTableItemProps**<`T`\>: [`BaseItemProps`](interfaces/BaseItemProps.md) & `Omit`<`AntdTableColumnProps`<`T`\>, ``"children"``\>
188
143
 
189
144
  #### Type parameters
190
145
 
@@ -194,100 +149,81 @@ ___
194
149
 
195
150
  ___
196
151
 
197
- ### DescriptionProps
152
+ ### ExtendTableTypeProps
198
153
 
199
- Ƭ **DescriptionProps**<`T`, `ExtendItemProps`\>: { `dataSource?`: `T` ; `extendTypes?`: { `[key: string]`: [`ExtendDescriptionTypeProps`](#extenddescriptiontypeprops); } ; `faasData?`: `FaasDataWrapperProps`<`T`\> ; `items`: ([`DescriptionItemProps`](#descriptionitemprops) \| `ExtendItemProps`)[] ; `renderTitle?`: (`values`: `T`) => `ReactNode` \| `JSX.Element` } & `DescriptionsProps`
154
+ Ƭ **ExtendTableTypeProps**: `Object`
200
155
 
201
- #### Type parameters
156
+ #### Type declaration
202
157
 
203
158
  | Name | Type |
204
159
  | :------ | :------ |
205
- | `T` | `any` |
206
- | `ExtendItemProps` | `any` |
160
+ | `children?` | `JSX.Element` |
161
+ | `render?` | (`value`: `any`, `values`: `any`, `index`: `number`) => `JSX.Element` \| `string` \| `number` \| `boolean` \| ``null`` |
207
162
 
208
163
  ___
209
164
 
210
- ### DrawerProps
211
-
212
- Ƭ **DrawerProps**: `AntdDrawerProps` & { `children?`: `JSX.Element` \| `JSX.Element`[] }
165
+ ### ExtendTypes
213
166
 
214
- ___
167
+ Ƭ **ExtendTypes**: `Object`
215
168
 
216
- ### ExtendDescriptionItemProps
169
+ #### Index signature
217
170
 
218
- Ƭ **ExtendDescriptionItemProps**: [`BaseItemProps`](#baseitemprops)
171
+ [type: `string`]: [`ExtendFormTypeProps`](#extendformtypeprops)
219
172
 
220
173
  ___
221
174
 
222
- ### ExtendDescriptionTypeProps
175
+ ### FaasDataInjection
223
176
 
224
- Ƭ **ExtendDescriptionTypeProps**: `Object`
177
+ Ƭ **FaasDataInjection**<`Data`\>: `Object`
225
178
 
226
- #### Type declaration
179
+ Injects FaasData props.
180
+
181
+ #### Type parameters
227
182
 
228
183
  | Name | Type |
229
184
  | :------ | :------ |
230
- | `children?` | `JSX.Element` \| ``null`` |
231
- | `render?` | (`value`: `any`, `values`: `any`) => `ReactNode` \| `JSX.Element` |
232
-
233
- ___
234
-
235
- ### ExtendFormItemProps
236
-
237
- Ƭ **ExtendFormItemProps**: [`BaseItemProps`](#baseitemprops) & `AntdFormItemProps`
238
-
239
- ___
240
-
241
- ### ExtendFormTypeProps
242
-
243
- Ƭ **ExtendFormTypeProps**: `Object`
185
+ | `Data` | `any` |
244
186
 
245
187
  #### Type declaration
246
188
 
247
189
  | Name | Type |
248
190
  | :------ | :------ |
249
- | `children?` | `ReactNode` |
191
+ | `action` | `string` \| `any` |
192
+ | `data` | `Data` |
193
+ | `error` | `any` |
194
+ | `loading` | `boolean` |
195
+ | `params` | `Record`<`string`, `any`\> |
196
+ | `promise` | `Promise`<`Response`<`Data`\>\> |
197
+ | `setData` | `React.Dispatch`<`React.SetStateAction`<`Data`\>\> |
198
+ | `setError` | `React.Dispatch`<`React.SetStateAction`<`any`\>\> |
199
+ | `setLoading` | `React.Dispatch`<`React.SetStateAction`<`boolean`\>\> |
200
+ | `setPromise` | `React.Dispatch`<`React.SetStateAction`<`Promise`<`Response`<`Data`\>\>\>\> |
201
+ | `reload` | (`params?`: `Record`<`string`, `any`\>) => `Promise`<`Response`<`Data`\>\> |
250
202
 
251
203
  ___
252
204
 
253
- ### ExtendTableItemProps
205
+ ### FaasDataWrapperProps
254
206
 
255
- Ƭ **ExtendTableItemProps**<`T`\>: [`BaseItemProps`](#baseitemprops) & `Omit`<`AntdTableColumnProps`<`T`\>, ``"children"``\>
207
+ Ƭ **FaasDataWrapperProps**<`PathOrData`\>: `Object`
256
208
 
257
209
  #### Type parameters
258
210
 
259
211
  | Name | Type |
260
212
  | :------ | :------ |
261
- | `T` | `any` |
262
-
263
- ___
264
-
265
- ### ExtendTableTypeProps
266
-
267
- Ƭ **ExtendTableTypeProps**: `Object`
213
+ | `PathOrData` | extends `FaasAction` |
268
214
 
269
215
  #### Type declaration
270
216
 
271
- | Name | Type |
272
- | :------ | :------ |
273
- | `children?` | `JSX.Element` \| ``null`` |
274
- | `render?` | (`value`: `any`, `values`: `any`, `index`: `number`) => `JSX.Element` \| `string` \| `number` \| `boolean` \| ``null`` |
275
-
276
- ___
277
-
278
- ### ExtendTypes
279
-
280
- Ƭ **ExtendTypes**: `Object`
281
-
282
- #### Index signature
283
-
284
- ▪ [type: `string`]: [`ExtendFormTypeProps`](#extendformtypeprops)
285
-
286
- ___
287
-
288
- ### FaasItemProps
289
-
290
- Ƭ **FaasItemProps**: [`BaseItemProps`](#baseitemprops) & { `type?`: [`FaasItemType`](#faasitemtype) }
217
+ | Name | Type | Description |
218
+ | :------ | :------ | :------ |
219
+ | `action` | `string` | - |
220
+ | `children?` | `JSX.Element` | - |
221
+ | `data?` | `FaasData`<`PathOrData`\> | use custom data, should work with setData |
222
+ | `fallback?` | `JSX.Element` \| ``false`` | - |
223
+ | `params?` | `FaasParams`<`PathOrData`\> | - |
224
+ | `setData?` | `React.Dispatch`<`React.SetStateAction`<`FaasData`<`PathOrData`\>\>\> | use custom setData, should work with data |
225
+ | `onDataChange?` | (`args`: [`FaasDataInjection`](#faasdatainjection)<`FaasData`<`PathOrData`\>\>) => `void` | - |
226
+ | `render?` | (`args`: [`FaasDataInjection`](#faasdatainjection)<`FaasData`<`PathOrData`\>\>) => `Element` \| `Element`[] | - |
291
227
 
292
228
  ___
293
229
 
@@ -319,83 +255,27 @@ FaasItemType's value type
319
255
 
320
256
  ___
321
257
 
322
- ### FormItemProps
323
-
324
- Ƭ **FormItemProps**<`T`\>: { `children?`: `ReactNode` ; `extendTypes?`: [`ExtendTypes`](#extendtypes) ; `if?`: (`values`: `Record`<`string`, `any`\>) => `boolean` ; `label?`: `string` \| ``false`` ; `onValueChange?`: (`value`: `T`, `values`: `any`, `form`: `FormInstance`) => `void` ; `render?`: (`value?`: `T`) => `ReactNode` \| `JSX.Element` ; `rules?`: `RuleObject`[] } & `FormItemInputProps` & [`FaasItemProps`](#faasitemprops) & `Omit`<`AntdFormItemProps`<`T`\>, ``"children"``\>
325
-
326
- #### Type parameters
327
-
328
- | Name | Type |
329
- | :------ | :------ |
330
- | `T` | `any` |
331
-
332
- ___
333
-
334
- ### FormProps
335
-
336
- Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `children?`: `ReactNode` ; `extendTypes?`: [`ExtendTypes`](#extendtypes) ; `footer?`: `JSX.Element` \| `JSX.Element`[] ; `initialValues?`: `Values` ; `items?`: ([`FormItemProps`](#formitemprops) \| `ExtendItemProps`)[] ; `onFinish?`: (`values`: `Values`, `submit?`: (`values`: `any`) => `Promise`<`any`\>) => `Promise`<`any`\> ; `submit?`: ``false`` \| { `text?`: `string` ; `to?`: { `action`: `string` ; `params?`: `Record`<`string`, `any`\> } } } & `Omit`<`AntdFormProps`<`Values`\>, ``"onFinish"`` \| ``"children"`` \| ``"initialValues"``\>
337
-
338
- #### Type parameters
339
-
340
- | Name | Type |
341
- | :------ | :------ |
342
- | `Values` | extends `Record`<`string`, `any`\> = `any` |
343
- | `ExtendItemProps` | `any` |
344
-
345
- ___
346
-
347
- ### LinkProps
348
-
349
- Ƭ **LinkProps**: `Object`
350
-
351
- #### Type declaration
352
-
353
- | Name | Type |
354
- | :------ | :------ |
355
- | `button?` | `ButtonProps` |
356
- | `children?` | `ReactNode` |
357
- | `href` | `string` |
358
- | `style?` | `CSSProperties` |
359
- | `target?` | `string` |
360
- | `text?` | `string` \| `number` |
361
-
362
- ___
363
-
364
- ### ModalProps
365
-
366
- Ƭ **ModalProps**: `AntdModalProps` & { `children?`: `JSX.Element` \| `JSX.Element`[] \| `string` }
258
+ ### FormSubmitProps
367
259
 
368
- ___
369
-
370
- ### RoutesProps
371
-
372
- Ƭ **RoutesProps**: `Object`
260
+ Ƭ **FormSubmitProps**: `Object`
373
261
 
374
262
  #### Type declaration
375
263
 
376
- | Name | Type |
377
- | :------ | :------ |
378
- | `fallback?` | `JSX.Element` |
379
- | `notFound?` | `JSX.Element` |
380
- | `routes` | `RouteProps` & { `page?`: `LazyExoticComponent`<`ComponentType`<`any`\>\> }[] |
381
-
382
- ___
383
-
384
- ### TableItemProps
385
-
386
- Ƭ **TableItemProps**<`T`\>: { `children?`: `JSX.Element` \| ``null`` ; `object?`: [`TableItemProps`](#tableitemprops)[] ; `optionsType?`: ``"auto"`` } & [`FaasItemProps`](#faasitemprops) & `Omit`<`AntdTableColumnProps`<`T`\>, ``"children"``\>
387
-
388
- #### Type parameters
389
-
390
- | Name | Type |
391
- | :------ | :------ |
392
- | `T` | `any` |
264
+ | Name | Type | Description |
265
+ | :------ | :------ | :------ |
266
+ | `text?` | `string` | Default: Submit |
267
+ | `to?` | { `action`: `string` ; `catch?`: (`error`: `any`) => `void` ; `finally?`: () => `void` ; `params?`: `Record`<`string`, `any`\> ; `then?`: (`result`: `any`) => `void` } | Submit to FaasJS server. If use onFinish, you should call submit manually. ```ts { submit: { to: { action: 'action_name' } }, onFinish: (values, submit) => { // do something before submit // submit await submit({ ...values, extraProps: 'some extra props' }) // do something after submit } } ``` |
268
+ | `to.action` | `string` | - |
269
+ | `to.catch?` | (`error`: `any`) => `void` | - |
270
+ | `to.finally?` | () => `void` | - |
271
+ | `to.params?` | `Record`<`string`, `any`\> | params will overwrite form values before submit |
272
+ | `to.then?` | (`result`: `any`) => `void` | - |
393
273
 
394
274
  ___
395
275
 
396
276
  ### TableProps
397
277
 
398
- Ƭ **TableProps**<`T`, `ExtendTypes`\>: { `extendTypes?`: { `[key: string]`: [`ExtendTableTypeProps`](#extendtabletypeprops); } ; `faasData?`: `FaasDataWrapperProps`<`T`\> ; `items`: ([`TableItemProps`](#tableitemprops) \| `ExtendTypes` & [`ExtendTableItemProps`](#extendtableitemprops))[] ; `onChange?`: (`pagination`: `TablePaginationConfig`, `filters`: `Record`<`string`, `FilterValue` \| ``null``\>, `sorter`: `SorterResult`<`T`\> \| `SorterResult`<`T`\>[], `extra`: `TableCurrentDataSource`<`T`\>) => { `extra`: `TableCurrentDataSource`<`T`\> ; `filters`: `Record`<`string`, `FilterValue` \| ``null``\> ; `pagination`: `TablePaginationConfig` ; `sorter`: `SorterResult`<`T`\> \| `SorterResult`<`T`\>[] } } & `AntdTableProps`<`T`\>
278
+ Ƭ **TableProps**<`T`, `ExtendTypes`\>: { `extendTypes?`: { `[key: string]`: [`ExtendTableTypeProps`](#extendtabletypeprops); } ; `faasData?`: [`FaasDataWrapperProps`](#faasdatawrapperprops)<`T`\> ; `items`: ([`TableItemProps`](interfaces/TableItemProps.md) \| `ExtendTypes` & [`ExtendTableItemProps`](#extendtableitemprops))[] ; `onChange?`: (`pagination`: `TablePaginationConfig`, `filters`: `Record`<`string`, `FilterValue` \| ``null``\>, `sorter`: `SorterResult`<`T`\> \| `SorterResult`<`T`\>[], `extra`: `TableCurrentDataSource`<`T`\>) => { `extra`: `TableCurrentDataSource`<`T`\> ; `filters`: `Record`<`string`, `FilterValue` \| ``null``\> ; `pagination`: `TablePaginationConfig` ; `sorter`: `SorterResult`<`T`\> \| `SorterResult`<`T`\>[] } } & `AntdTableProps`<`T`\>
399
279
 
400
280
  #### Type parameters
401
281
 
@@ -406,33 +286,9 @@ ___
406
286
 
407
287
  ___
408
288
 
409
- ### TimePickerProps
410
-
411
- Ƭ **TimePickerProps**: `Omit`<`PickerTimeProps`<`Dayjs`\>, ``"picker"``\>
412
-
413
- ___
414
-
415
- ### TitleProps
416
-
417
- Ƭ **TitleProps**: `Object`
418
-
419
- #### Type declaration
420
-
421
- | Name | Type | Description |
422
- | :------ | :------ | :------ |
423
- | `children?` | `JSX.Element` | return children |
424
- | `h1?` | `boolean` \| { `className?`: `string` ; `style?`: `React.CSSProperties` } | return a h1 element |
425
- | `header?` | `PageHeaderProps` | return a PageHeader element |
426
- | `plain?` | `boolean` | return a pure text element |
427
- | `separator?` | `string` | ` - ` as default |
428
- | `suffix?` | `string` | - |
429
- | `title` | `string` \| `string`[] | - |
430
-
431
- ___
432
-
433
289
  ### setDrawerProps
434
290
 
435
- Ƭ **setDrawerProps**: (`changes`: `Partial`<[`DrawerProps`](#drawerprops)\>) => `void`
291
+ Ƭ **setDrawerProps**: (`changes`: `Partial`<[`DrawerProps`](interfaces/DrawerProps.md)\>) => `void`
436
292
 
437
293
  #### Type declaration
438
294
 
@@ -442,7 +298,7 @@ ___
442
298
 
443
299
  | Name | Type |
444
300
  | :------ | :------ |
445
- | `changes` | `Partial`<[`DrawerProps`](#drawerprops)\> |
301
+ | `changes` | `Partial`<[`DrawerProps`](interfaces/DrawerProps.md)\> |
446
302
 
447
303
  ##### Returns
448
304
 
@@ -452,7 +308,7 @@ ___
452
308
 
453
309
  ### setModalProps
454
310
 
455
- Ƭ **setModalProps**: (`changes`: `Partial`<[`ModalProps`](#modalprops)\>) => `void`
311
+ Ƭ **setModalProps**: (`changes`: `Partial`<[`ModalProps`](interfaces/ModalProps.md)\>) => `void`
456
312
 
457
313
  #### Type declaration
458
314
 
@@ -462,7 +318,7 @@ ___
462
318
 
463
319
  | Name | Type |
464
320
  | :------ | :------ |
465
- | `changes` | `Partial`<[`ModalProps`](#modalprops)\> |
321
+ | `changes` | `Partial`<[`ModalProps`](interfaces/ModalProps.md)\> |
466
322
 
467
323
  ##### Returns
468
324
 
@@ -472,13 +328,7 @@ ___
472
328
 
473
329
  ### ConfigContext
474
330
 
475
- • `Const` **ConfigContext**: `Context`<[`ConfigProviderProps`](#configproviderprops)\>
476
-
477
- ___
478
-
479
- ### DatePicker
480
-
481
- • `Const` **DatePicker**: `PickerComponentClass`<`Object`, `unknown`\> & {}
331
+ • `Const` **ConfigContext**: `Context`<[`ConfigProviderProps`](interfaces/ConfigProviderProps.md)\>
482
332
 
483
333
  ## Functions
484
334
 
@@ -486,13 +336,15 @@ ___
486
336
 
487
337
  ▸ **Blank**(`options?`): `JSX.Element`
488
338
 
339
+ Blank component.
340
+
489
341
  If value is undefined or null, return text, otherwise return value.
490
342
 
491
343
  #### Parameters
492
344
 
493
345
  | Name | Type | Description |
494
346
  | :------ | :------ | :------ |
495
- | `options?` | [`BlankProps`](#blankprops) | {object} |
347
+ | `options?` | [`BlankProps`](interfaces/BlankProps.md) | {object} |
496
348
 
497
349
  #### Returns
498
350
 
@@ -504,25 +356,9 @@ If value is undefined or null, return text, otherwise return value.
504
356
 
505
357
  ___
506
358
 
507
- ### Calendar
508
-
509
- ▸ **Calendar**(`props`): `Element`
510
-
511
- #### Parameters
512
-
513
- | Name | Type |
514
- | :------ | :------ |
515
- | `props` | `CalendarProps`<`Dayjs`\> |
516
-
517
- #### Returns
518
-
519
- `Element`
520
-
521
- ___
522
-
523
359
  ### ConfigProvider
524
360
 
525
- ▸ **ConfigProvider**(`__namedParameters`): `Element`
361
+ ▸ **ConfigProvider**(`«destructured»`): `Element`
526
362
 
527
363
  Config for @faasjs/ant-design components.
528
364
 
@@ -540,9 +376,9 @@ Config for @faasjs/ant-design components.
540
376
 
541
377
  | Name | Type |
542
378
  | :------ | :------ |
543
- | `__namedParameters` | `Object` |
544
- | `__namedParameters.children` | `ReactNode` |
545
- | `__namedParameters.config` | [`ConfigProviderProps`](#configproviderprops) |
379
+ | `«destructured»` | `Object` |
380
+ | › `children` | `ReactNode` |
381
+ | › `config` | [`ConfigProviderProps`](interfaces/ConfigProviderProps.md) |
546
382
 
547
383
  #### Returns
548
384
 
@@ -554,6 +390,8 @@ ___
554
390
 
555
391
  ▸ **Description**<`T`\>(`props`): `Element`
556
392
 
393
+ Description component.
394
+
557
395
  #### Type parameters
558
396
 
559
397
  | Name | Type |
@@ -564,7 +402,7 @@ ___
564
402
 
565
403
  | Name | Type |
566
404
  | :------ | :------ |
567
- | `props` | [`DescriptionProps`](#descriptionprops)<`T`, `any`\> |
405
+ | `props` | [`DescriptionProps`](interfaces/DescriptionProps.md)<`T`, `any`\> |
568
406
 
569
407
  #### Returns
570
408
 
@@ -572,6 +410,30 @@ ___
572
410
 
573
411
  ___
574
412
 
413
+ ### FaasDataWrapper
414
+
415
+ ▸ **FaasDataWrapper**<`T`\>(`props`): `JSX.Element`
416
+
417
+ FaasDataWrapper component with Loading and ErrorBoundary
418
+
419
+ #### Type parameters
420
+
421
+ | Name | Type |
422
+ | :------ | :------ |
423
+ | `T` | `any` |
424
+
425
+ #### Parameters
426
+
427
+ | Name | Type |
428
+ | :------ | :------ |
429
+ | `props` | [`FaasDataWrapperProps`](#faasdatawrapperprops)<`T`\> |
430
+
431
+ #### Returns
432
+
433
+ `JSX.Element`
434
+
435
+ ___
436
+
575
437
  ### Form
576
438
 
577
439
  ▸ **Form**<`Values`\>(`props`): `Element`
@@ -592,7 +454,7 @@ https://ant.design/components/form/
592
454
 
593
455
  | Name | Type |
594
456
  | :------ | :------ |
595
- | `props` | [`FormProps`](#formprops)<`Values`, `any`\> |
457
+ | `props` | [`FormProps`](interfaces/FormProps.md)<`Values`, `any`\> |
596
458
 
597
459
  #### Returns
598
460
 
@@ -608,10 +470,10 @@ FormItem, can be used without Form.
608
470
 
609
471
  ```ts
610
472
  // use inline type
611
- <FormItem item={{ type: 'string', id: 'name' }} />
473
+ <FormItem type='string' id='name' />
612
474
 
613
475
  // use custom type
614
- <FormItem item={{ id: 'password' }}>
476
+ <FormItem id='password'>
615
477
  <Input.Password />
616
478
  </>
617
479
  ```
@@ -626,7 +488,7 @@ FormItem, can be used without Form.
626
488
 
627
489
  | Name | Type |
628
490
  | :------ | :------ |
629
- | `props` | [`FormItemProps`](#formitemprops)<`T`\> |
491
+ | `props` | [`FormItemProps`](interfaces/FormItemProps.md)<`T`\> |
630
492
 
631
493
  #### Returns
632
494
 
@@ -636,21 +498,43 @@ ___
636
498
 
637
499
  ### Link
638
500
 
639
- ▸ **Link**(`__namedParameters`): `Element`
501
+ ▸ **Link**(`«destructured»`): `Element`
502
+
503
+ Link component with button.
640
504
 
641
505
  ```ts
642
506
  // pure link
643
507
  <Link href="/">Home</Link>
644
508
 
645
509
  // link with button
646
- <Link href="/" button={{type:'primary'}}>Home</Link>
510
+ <Link href="/" button={{ type:'primary' }}>Home</Link>
647
511
  ```
648
512
 
649
513
  #### Parameters
650
514
 
651
515
  | Name | Type |
652
516
  | :------ | :------ |
653
- | `__namedParameters` | [`LinkProps`](#linkprops) |
517
+ | `«destructured»` | [`LinkProps`](interfaces/LinkProps.md) |
518
+
519
+ #### Returns
520
+
521
+ `Element`
522
+
523
+ ___
524
+
525
+ ### Loading
526
+
527
+ ▸ **Loading**(`props`): `Element`
528
+
529
+ Loading component based on Spin
530
+
531
+ #### Parameters
532
+
533
+ | Name | Type |
534
+ | :------ | :------ |
535
+ | `props` | `Object` |
536
+ | `props.size?` | ``"default"`` \| ``"small"`` \| ``"large"`` |
537
+ | `props.style?` | `CSSProperties` |
654
538
 
655
539
  #### Returns
656
540
 
@@ -694,7 +578,7 @@ export function App () {
694
578
 
695
579
  | Name | Type |
696
580
  | :------ | :------ |
697
- | `props` | [`RoutesProps`](#routesprops) |
581
+ | `props` | [`RoutesProps`](interfaces/RoutesProps.md) |
698
582
 
699
583
  #### Returns
700
584
 
@@ -731,24 +615,6 @@ https://ant.design/components/table/
731
615
 
732
616
  ___
733
617
 
734
- ### TimePicker
735
-
736
- ▸ **TimePicker**(`props`): `ReactElement`<`any`, `string` \| `JSXElementConstructor`<`any`\>\>
737
-
738
- **NOTE**: Exotic components are not callable.
739
-
740
- #### Parameters
741
-
742
- | Name | Type |
743
- | :------ | :------ |
744
- | `props` | [`TimePickerProps`](#timepickerprops) & `RefAttributes`<`any`\> |
745
-
746
- #### Returns
747
-
748
- `ReactElement`<`any`, `string` \| `JSXElementConstructor`<`any`\>\>
749
-
750
- ___
751
-
752
618
  ### Title
753
619
 
754
620
  ▸ **Title**(`props`): `JSX.Element`
@@ -773,7 +639,7 @@ Return null by default.
773
639
 
774
640
  | Name | Type |
775
641
  | :------ | :------ |
776
- | `props` | [`TitleProps`](#titleprops) |
642
+ | `props` | [`TitleProps`](interfaces/TitleProps.md) |
777
643
 
778
644
  #### Returns
779
645
 
@@ -816,11 +682,11 @@ ___
816
682
 
817
683
  ### useConfigContext
818
684
 
819
- ▸ **useConfigContext**(): [`ConfigProviderProps`](#configproviderprops)
685
+ ▸ **useConfigContext**(): [`ConfigProviderProps`](interfaces/ConfigProviderProps.md)
820
686
 
821
687
  #### Returns
822
688
 
823
- [`ConfigProviderProps`](#configproviderprops)
689
+ [`ConfigProviderProps`](interfaces/ConfigProviderProps.md)
824
690
 
825
691
  ___
826
692
 
@@ -834,7 +700,7 @@ Hook style drawer.
834
700
 
835
701
  | Name | Type | Description |
836
702
  | :------ | :------ | :------ |
837
- | `init?` | [`DrawerProps`](#drawerprops) | initial props ```ts function Example() { const { drawer, setDrawerProps } = useDrawer() return <> <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }> Toggle </Button> {drawer} </> } ``` |
703
+ | `init?` | [`DrawerProps`](interfaces/DrawerProps.md) | initial props ```ts function Example() { const { drawer, setDrawerProps } = useDrawer() return <> <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }> Toggle </Button> {drawer} </> } ``` |
838
704
 
839
705
  #### Returns
840
706
 
@@ -843,8 +709,8 @@ Hook style drawer.
843
709
  | Name | Type |
844
710
  | :------ | :------ |
845
711
  | `drawer` | `Element` |
846
- | `drawerProps` | [`DrawerProps`](#drawerprops) |
847
- | `setDrawerProps` | (`changes`: `Partial`<[`DrawerProps`](#drawerprops)\>) => `void` |
712
+ | `drawerProps` | [`DrawerProps`](interfaces/DrawerProps.md) |
713
+ | `setDrawerProps` | (`changes`: `Partial`<[`DrawerProps`](interfaces/DrawerProps.md)\>) => `void` |
848
714
 
849
715
  ___
850
716
 
@@ -858,7 +724,7 @@ Hook style modal.
858
724
 
859
725
  | Name | Type | Description |
860
726
  | :------ | :------ | :------ |
861
- | `init?` | [`ModalProps`](#modalprops) | initial props ```ts function Example() { const { modal, setModalProps } = useModal() return <> <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button> {modal}</> } ``` |
727
+ | `init?` | [`ModalProps`](interfaces/ModalProps.md) | initial props ```ts function Example() { const { modal, setModalProps } = useModal() return <> <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button> {modal}</> } ``` |
862
728
 
863
729
  #### Returns
864
730
 
@@ -867,5 +733,5 @@ Hook style modal.
867
733
  | Name | Type |
868
734
  | :------ | :------ |
869
735
  | `modal` | `Element` |
870
- | `modalProps` | [`ModalProps`](#modalprops) |
871
- | `setModalProps` | (`changes`: `Partial`<[`ModalProps`](#modalprops)\>) => `void` |
736
+ | `modalProps` | [`ModalProps`](interfaces/ModalProps.md) |
737
+ | `setModalProps` | (`changes`: `Partial`<[`ModalProps`](interfaces/ModalProps.md)\>) => `void` |