@faasjs/ant-design 0.0.3-beta.6 → 0.0.3-beta.60

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
@@ -8,7 +8,7 @@ UI components based on [FaasJS](https://faasjs.com), [Ant Design](https://ant.de
8
8
 
9
9
  ## Install
10
10
 
11
- npm install @faasjs/ant-design
11
+ npm install @faasjs/ant-design antd react react-dom @faasjs/react react-router-dom
12
12
 
13
13
  ## Usage
14
14
 
@@ -42,58 +42,73 @@ 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
+ ### Classes
48
+
49
+ - [ErrorBoundary](classes/ErrorBoundary.md)
50
+
51
+ ### Interfaces
52
+
53
+ - [BaseItemProps](interfaces/BaseItemProps.md)
54
+ - [BlankProps](interfaces/BlankProps.md)
55
+ - [ConfigProviderProps](interfaces/ConfigProviderProps.md)
56
+ - [DescriptionItemContentProps](interfaces/DescriptionItemContentProps.md)
57
+ - [DescriptionItemProps](interfaces/DescriptionItemProps.md)
58
+ - [DescriptionProps](interfaces/DescriptionProps.md)
59
+ - [DrawerProps](interfaces/DrawerProps.md)
60
+ - [ErrorBoundaryProps](interfaces/ErrorBoundaryProps.md)
61
+ - [ExtendDescriptionTypeProps](interfaces/ExtendDescriptionTypeProps.md)
62
+ - [FaasDataInjection](interfaces/FaasDataInjection.md)
63
+ - [FaasDataWrapperProps](interfaces/FaasDataWrapperProps.md)
64
+ - [FaasItemProps](interfaces/FaasItemProps.md)
65
+ - [FormItemProps](interfaces/FormItemProps.md)
66
+ - [FormProps](interfaces/FormProps.md)
67
+ - [LinkProps](interfaces/LinkProps.md)
68
+ - [ModalProps](interfaces/ModalProps.md)
69
+ - [RoutesProps](interfaces/RoutesProps.md)
70
+ - [TableItemProps](interfaces/TableItemProps.md)
71
+ - [TitleProps](interfaces/TitleProps.md)
72
+ - [UnionFaasItemProps](interfaces/UnionFaasItemProps.md)
45
73
 
46
74
  ### Type Aliases
47
75
 
48
- - [BaseItemProps](#baseitemprops)
49
76
  - [BaseOption](#baseoption)
50
- - [BlankProps](#blankprops)
51
- - [CalendarProps](#calendarprops)
52
- - [ConfigProviderProps](#configproviderprops)
53
- - [DatePickerProps](#datepickerprops)
54
- - [DescriptionItemProps](#descriptionitemprops)
55
- - [DescriptionProps](#descriptionprops)
56
- - [DrawerProps](#drawerprops)
57
77
  - [ExtendDescriptionItemProps](#extenddescriptionitemprops)
58
- - [ExtendDescriptionTypeProps](#extenddescriptiontypeprops)
59
78
  - [ExtendFormItemProps](#extendformitemprops)
60
79
  - [ExtendFormTypeProps](#extendformtypeprops)
61
80
  - [ExtendTableItemProps](#extendtableitemprops)
62
81
  - [ExtendTableTypeProps](#extendtabletypeprops)
63
82
  - [ExtendTypes](#extendtypes)
64
- - [FaasItemProps](#faasitemprops)
65
83
  - [FaasItemType](#faasitemtype)
66
84
  - [FaasItemTypeValue](#faasitemtypevalue)
67
- - [FormItemProps](#formitemprops)
68
- - [FormProps](#formprops)
69
- - [LinkProps](#linkprops)
70
- - [ModalProps](#modalprops)
71
- - [RoutesProps](#routesprops)
72
- - [TableItemProps](#tableitemprops)
85
+ - [FormSubmitProps](#formsubmitprops)
86
+ - [LoadingProps](#loadingprops)
73
87
  - [TableProps](#tableprops)
74
- - [TimePickerProps](#timepickerprops)
75
- - [TitleProps](#titleprops)
88
+ - [UnionFaasItemElement](#unionfaasitemelement)
89
+ - [UnionFaasItemInjection](#unionfaasiteminjection)
90
+ - [UnionFaasItemRender](#unionfaasitemrender)
91
+ - [UnionScene](#unionscene)
76
92
  - [setDrawerProps](#setdrawerprops)
77
93
  - [setModalProps](#setmodalprops)
78
94
 
79
95
  ### Variables
80
96
 
81
97
  - [ConfigContext](#configcontext)
82
- - [DatePicker](#datepicker)
83
98
 
84
99
  ### Functions
85
100
 
86
101
  - [Blank](#blank)
87
- - [Calendar](#calendar)
88
102
  - [ConfigProvider](#configprovider)
89
103
  - [Description](#description)
104
+ - [FaasDataWrapper](#faasdatawrapper)
90
105
  - [Form](#form)
91
106
  - [FormItem](#formitem)
92
107
  - [Link](#link)
108
+ - [Loading](#loading)
93
109
  - [PageNotFound](#pagenotfound)
94
110
  - [Routes](#routes)
95
111
  - [Table](#table)
96
- - [TimePicker](#timepicker)
97
112
  - [Title](#title)
98
113
  - [transferOptions](#transferoptions)
99
114
  - [transferValue](#transfervalue)
@@ -103,156 +118,57 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
103
118
 
104
119
  ## Type Aliases
105
120
 
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
121
  ### BaseOption
121
122
 
122
123
  Ƭ **BaseOption**: `string` \| `number` \| { `label`: `string` ; `value?`: `string` \| `number` }
123
124
 
124
125
  ___
125
126
 
126
- ### BlankProps
127
-
128
- Ƭ **BlankProps**: `Object`
129
-
130
- #### Type declaration
131
-
132
- | Name | Type |
133
- | :------ | :------ |
134
- | `text?` | `string` |
135
- | `value?` | `any` |
136
-
137
- ___
138
-
139
- ### CalendarProps
140
-
141
- Ƭ **CalendarProps**: `AntdProps`<`Dayjs`\>
142
-
143
- ___
144
-
145
- ### ConfigProviderProps
146
-
147
- Ƭ **ConfigProviderProps**: `Object`
148
-
149
- #### Type declaration
150
-
151
- | Name | Type |
152
- | :------ | :------ |
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
127
+ ### ExtendDescriptionItemProps
180
128
 
181
- Ƭ **DatePickerProps**: `PickerDateProps`<`Dayjs`\>
129
+ Ƭ **ExtendDescriptionItemProps**: [`BaseItemProps`](interfaces/BaseItemProps.md)
182
130
 
183
131
  ___
184
132
 
185
- ### DescriptionItemProps
186
-
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)[] }
188
-
189
- #### Type parameters
133
+ ### ExtendFormItemProps
190
134
 
191
- | Name | Type |
192
- | :------ | :------ |
193
- | `T` | `any` |
135
+ Ƭ **ExtendFormItemProps**: [`BaseItemProps`](interfaces/BaseItemProps.md) & `AntdFormItemProps`
194
136
 
195
137
  ___
196
138
 
197
- ### DescriptionProps
139
+ ### ExtendFormTypeProps
198
140
 
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`
141
+ Ƭ **ExtendFormTypeProps**<`T`\>: `Object`
200
142
 
201
143
  #### Type parameters
202
144
 
203
145
  | Name | Type |
204
146
  | :------ | :------ |
205
147
  | `T` | `any` |
206
- | `ExtendItemProps` | `any` |
207
-
208
- ___
209
-
210
- ### DrawerProps
211
-
212
- Ƭ **DrawerProps**: `AntdDrawerProps` & { `children?`: `JSX.Element` \| `JSX.Element`[] }
213
-
214
- ___
215
-
216
- ### ExtendDescriptionItemProps
217
-
218
- Ƭ **ExtendDescriptionItemProps**: [`BaseItemProps`](#baseitemprops)
219
-
220
- ___
221
-
222
- ### ExtendDescriptionTypeProps
223
-
224
- Ƭ **ExtendDescriptionTypeProps**: `Object`
225
148
 
226
149
  #### Type declaration
227
150
 
228
151
  | Name | Type |
229
152
  | :------ | :------ |
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`
153
+ | `children?` | [`UnionFaasItemElement`](#unionfaasitemelement)<`T`\> |
238
154
 
239
155
  ___
240
156
 
241
- ### ExtendFormTypeProps
157
+ ### ExtendTableItemProps
242
158
 
243
- Ƭ **ExtendFormTypeProps**: `Object`
159
+ Ƭ **ExtendTableItemProps**<`T`\>: [`BaseItemProps`](interfaces/BaseItemProps.md) & `Omit`<`AntdTableColumnProps`<`T`\>, ``"children"``\>
244
160
 
245
- #### Type declaration
161
+ #### Type parameters
246
162
 
247
163
  | Name | Type |
248
164
  | :------ | :------ |
249
- | `children?` | `ReactNode` |
165
+ | `T` | `any` |
250
166
 
251
167
  ___
252
168
 
253
- ### ExtendTableItemProps
169
+ ### ExtendTableTypeProps
254
170
 
255
- Ƭ **ExtendTableItemProps**<`T`\>: [`BaseItemProps`](#baseitemprops) & `Omit`<`AntdTableColumnProps`<`T`\>, ``"children"``\>
171
+ Ƭ **ExtendTableTypeProps**<`T`\>: `Object`
256
172
 
257
173
  #### Type parameters
258
174
 
@@ -260,18 +176,12 @@ ___
260
176
  | :------ | :------ |
261
177
  | `T` | `any` |
262
178
 
263
- ___
264
-
265
- ### ExtendTableTypeProps
266
-
267
- Ƭ **ExtendTableTypeProps**: `Object`
268
-
269
179
  #### Type declaration
270
180
 
271
181
  | Name | Type |
272
182
  | :------ | :------ |
273
- | `children?` | `JSX.Element` \| ``null`` |
274
- | `render?` | (`value`: `any`, `values`: `any`, `index`: `number`) => `JSX.Element` \| `string` \| `number` \| `boolean` \| ``null`` |
183
+ | `children?` | `JSX.Element` |
184
+ | `render?` | [`UnionFaasItemRender`](#unionfaasitemrender)<`T`\> |
275
185
 
276
186
  ___
277
187
 
@@ -285,12 +195,6 @@ ___
285
195
 
286
196
  ___
287
197
 
288
- ### FaasItemProps
289
-
290
- Ƭ **FaasItemProps**: [`BaseItemProps`](#baseitemprops) & { `type?`: [`FaasItemType`](#faasitemtype) }
291
-
292
- ___
293
-
294
198
  ### FaasItemType
295
199
 
296
200
  Ƭ **FaasItemType**: ``"string"`` \| ``"string[]"`` \| ``"number"`` \| ``"number[]"`` \| ``"boolean"`` \| ``"date"`` \| ``"time"`` \| ``"object"`` \| ``"object[]"``
@@ -319,120 +223,126 @@ FaasItemType's value type
319
223
 
320
224
  ___
321
225
 
322
- ### FormItemProps
226
+ ### FormSubmitProps
323
227
 
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"``\>
228
+ Ƭ **FormSubmitProps**: `Object`
325
229
 
326
- #### Type parameters
230
+ #### Type declaration
231
+
232
+ | Name | Type | Description |
233
+ | :------ | :------ | :------ |
234
+ | `text?` | `string` | Default: Submit |
235
+ | `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 } } ``` |
236
+ | `to.action` | `string` | - |
237
+ | `to.catch?` | (`error`: `any`) => `void` | - |
238
+ | `to.finally?` | () => `void` | - |
239
+ | `to.params?` | `Record`<`string`, `any`\> | params will overwrite form values before submit |
240
+ | `to.then?` | (`result`: `any`) => `void` | - |
241
+
242
+ ___
243
+
244
+ ### LoadingProps
245
+
246
+ Ƭ **LoadingProps**: `Object`
247
+
248
+ #### Type declaration
327
249
 
328
250
  | Name | Type |
329
251
  | :------ | :------ |
330
- | `T` | `any` |
252
+ | `children?` | `React.ReactNode` |
253
+ | `loading?` | `boolean` |
254
+ | `size?` | ``"small"`` \| ``"default"`` \| ``"large"`` |
255
+ | `style?` | `React.CSSProperties` |
331
256
 
332
257
  ___
333
258
 
334
- ### FormProps
259
+ ### TableProps
335
260
 
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"``\>
261
+ Ƭ **TableProps**<`T`, `ExtendTypes`\>: { `extendTypes?`: { `[key: string]`: [`ExtendTableTypeProps`](#extendtabletypeprops); } ; `faasData?`: [`FaasDataWrapperProps`](interfaces/FaasDataWrapperProps.md)<`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`\>
337
262
 
338
263
  #### Type parameters
339
264
 
340
265
  | Name | Type |
341
266
  | :------ | :------ |
342
- | `Values` | extends `Record`<`string`, `any`\> = `any` |
343
- | `ExtendItemProps` | `any` |
267
+ | `T` | `any` |
268
+ | `ExtendTypes` | `any` |
344
269
 
345
270
  ___
346
271
 
347
- ### LinkProps
272
+ ### UnionFaasItemElement
348
273
 
349
- Ƭ **LinkProps**: `Object`
274
+ Ƭ **UnionFaasItemElement**<`Value`, `Values`\>: `ReactElement`<[`UnionFaasItemInjection`](#unionfaasiteminjection)<`Value`, `Values`\>\> \| ``null``
350
275
 
351
- #### Type declaration
276
+ #### Type parameters
352
277
 
353
278
  | Name | Type |
354
279
  | :------ | :------ |
355
- | `button?` | `ButtonProps` |
356
- | `children?` | `ReactNode` |
357
- | `href` | `string` |
358
- | `style?` | `CSSProperties` |
359
- | `target?` | `string` |
360
- | `text?` | `string` \| `number` |
280
+ | `Value` | `any` |
281
+ | `Values` | `any` |
361
282
 
362
283
  ___
363
284
 
364
- ### ModalProps
285
+ ### UnionFaasItemInjection
365
286
 
366
- Ƭ **ModalProps**: `AntdModalProps` & { `children?`: `JSX.Element` \| `JSX.Element`[] \| `string` }
287
+ Ƭ **UnionFaasItemInjection**<`Value`, `Values`\>: `Object`
367
288
 
368
- ___
369
-
370
- ### RoutesProps
289
+ #### Type parameters
371
290
 
372
- Ƭ **RoutesProps**: `Object`
291
+ | Name | Type |
292
+ | :------ | :------ |
293
+ | `Value` | `any` |
294
+ | `Values` | `any` |
373
295
 
374
296
  #### Type declaration
375
297
 
376
298
  | Name | Type |
377
299
  | :------ | :------ |
378
- | `fallback?` | `JSX.Element` |
379
- | `notFound?` | `JSX.Element` |
380
- | `routes` | `RouteProps` & { `page?`: `LazyExoticComponent`<`ComponentType`<`any`\>\> }[] |
300
+ | `index?` | `number` |
301
+ | `scene?` | [`UnionScene`](#unionscene) |
302
+ | `value?` | `Value` |
303
+ | `values?` | `Values` |
381
304
 
382
305
  ___
383
306
 
384
- ### TableItemProps
307
+ ### UnionFaasItemRender
385
308
 
386
- Ƭ **TableItemProps**<`T`\>: { `children?`: `JSX.Element` \| ``null`` ; `object?`: [`TableItemProps`](#tableitemprops)[] ; `optionsType?`: ``"auto"`` } & [`FaasItemProps`](#faasitemprops) & `Omit`<`AntdTableColumnProps`<`T`\>, ``"children"``\>
309
+ Ƭ **UnionFaasItemRender**<`Value`, `Values`\>: (`value`: `Value`, `values`: `Values`, `index`: `number`, `scene`: [`UnionScene`](#unionscene)) => `JSX.Element` \| ``null``
387
310
 
388
311
  #### Type parameters
389
312
 
390
313
  | Name | Type |
391
314
  | :------ | :------ |
392
- | `T` | `any` |
393
-
394
- ___
315
+ | `Value` | `any` |
316
+ | `Values` | `any` |
395
317
 
396
- ### TableProps
318
+ #### Type declaration
397
319
 
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`\>
320
+ (`value`, `values`, `index`, `scene`): `JSX.Element` \| ``null``
399
321
 
400
- #### Type parameters
322
+ ##### Parameters
401
323
 
402
324
  | Name | Type |
403
325
  | :------ | :------ |
404
- | `T` | `any` |
405
- | `ExtendTypes` | `any` |
406
-
407
- ___
326
+ | `value` | `Value` |
327
+ | `values` | `Values` |
328
+ | `index` | `number` |
329
+ | `scene` | [`UnionScene`](#unionscene) |
408
330
 
409
- ### TimePickerProps
331
+ ##### Returns
410
332
 
411
- Ƭ **TimePickerProps**: `Omit`<`PickerTimeProps`<`Dayjs`\>, ``"picker"``\>
333
+ `JSX.Element` \| ``null``
412
334
 
413
335
  ___
414
336
 
415
- ### TitleProps
416
-
417
- Ƭ **TitleProps**: `Object`
418
-
419
- #### Type declaration
337
+ ### UnionScene
420
338
 
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`[] | - |
339
+ Ƭ **UnionScene**: ``"form"`` \| ``"description"`` \| ``"table"``
430
340
 
431
341
  ___
432
342
 
433
343
  ### setDrawerProps
434
344
 
435
- Ƭ **setDrawerProps**: (`changes`: `Partial`<[`DrawerProps`](#drawerprops)\>) => `void`
345
+ Ƭ **setDrawerProps**: (`changes`: `Partial`<[`DrawerProps`](interfaces/DrawerProps.md)\>) => `void`
436
346
 
437
347
  #### Type declaration
438
348
 
@@ -442,7 +352,7 @@ ___
442
352
 
443
353
  | Name | Type |
444
354
  | :------ | :------ |
445
- | `changes` | `Partial`<[`DrawerProps`](#drawerprops)\> |
355
+ | `changes` | `Partial`<[`DrawerProps`](interfaces/DrawerProps.md)\> |
446
356
 
447
357
  ##### Returns
448
358
 
@@ -452,7 +362,7 @@ ___
452
362
 
453
363
  ### setModalProps
454
364
 
455
- Ƭ **setModalProps**: (`changes`: `Partial`<[`ModalProps`](#modalprops)\>) => `void`
365
+ Ƭ **setModalProps**: (`changes`: `Partial`<[`ModalProps`](interfaces/ModalProps.md)\>) => `void`
456
366
 
457
367
  #### Type declaration
458
368
 
@@ -462,7 +372,7 @@ ___
462
372
 
463
373
  | Name | Type |
464
374
  | :------ | :------ |
465
- | `changes` | `Partial`<[`ModalProps`](#modalprops)\> |
375
+ | `changes` | `Partial`<[`ModalProps`](interfaces/ModalProps.md)\> |
466
376
 
467
377
  ##### Returns
468
378
 
@@ -472,13 +382,7 @@ ___
472
382
 
473
383
  ### ConfigContext
474
384
 
475
- • `Const` **ConfigContext**: `Context`<[`ConfigProviderProps`](#configproviderprops)\>
476
-
477
- ___
478
-
479
- ### DatePicker
480
-
481
- • `Const` **DatePicker**: `PickerComponentClass`<`Object`, `unknown`\> & {}
385
+ • `Const` **ConfigContext**: `Context`<[`ConfigProviderProps`](interfaces/ConfigProviderProps.md)\>
482
386
 
483
387
  ## Functions
484
388
 
@@ -486,13 +390,15 @@ ___
486
390
 
487
391
  ▸ **Blank**(`options?`): `JSX.Element`
488
392
 
393
+ Blank component.
394
+
489
395
  If value is undefined or null, return text, otherwise return value.
490
396
 
491
397
  #### Parameters
492
398
 
493
399
  | Name | Type | Description |
494
400
  | :------ | :------ | :------ |
495
- | `options?` | [`BlankProps`](#blankprops) | {object} |
401
+ | `options?` | [`BlankProps`](interfaces/BlankProps.md) | {object} |
496
402
 
497
403
  #### Returns
498
404
 
@@ -504,25 +410,9 @@ If value is undefined or null, return text, otherwise return value.
504
410
 
505
411
  ___
506
412
 
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
413
  ### ConfigProvider
524
414
 
525
- ▸ **ConfigProvider**(`__namedParameters`): `Element`
415
+ ▸ **ConfigProvider**(`«destructured»`): `Element`
526
416
 
527
417
  Config for @faasjs/ant-design components.
528
418
 
@@ -540,9 +430,9 @@ Config for @faasjs/ant-design components.
540
430
 
541
431
  | Name | Type |
542
432
  | :------ | :------ |
543
- | `__namedParameters` | `Object` |
544
- | `__namedParameters.children` | `ReactNode` |
545
- | `__namedParameters.config` | [`ConfigProviderProps`](#configproviderprops) |
433
+ | `«destructured»` | `Object` |
434
+ | › `children` | `ReactNode` |
435
+ | › `config` | [`ConfigProviderProps`](interfaces/ConfigProviderProps.md) |
546
436
 
547
437
  #### Returns
548
438
 
@@ -554,6 +444,8 @@ ___
554
444
 
555
445
  ▸ **Description**<`T`\>(`props`): `Element`
556
446
 
447
+ Description component.
448
+
557
449
  #### Type parameters
558
450
 
559
451
  | Name | Type |
@@ -564,7 +456,7 @@ ___
564
456
 
565
457
  | Name | Type |
566
458
  | :------ | :------ |
567
- | `props` | [`DescriptionProps`](#descriptionprops)<`T`, `any`\> |
459
+ | `props` | [`DescriptionProps`](interfaces/DescriptionProps.md)<`T`, `any`\> |
568
460
 
569
461
  #### Returns
570
462
 
@@ -572,6 +464,30 @@ ___
572
464
 
573
465
  ___
574
466
 
467
+ ### FaasDataWrapper
468
+
469
+ ▸ **FaasDataWrapper**<`T`\>(`props`): `JSX.Element`
470
+
471
+ FaasDataWrapper component with Loading
472
+
473
+ #### Type parameters
474
+
475
+ | Name | Type |
476
+ | :------ | :------ |
477
+ | `T` | `any` |
478
+
479
+ #### Parameters
480
+
481
+ | Name | Type |
482
+ | :------ | :------ |
483
+ | `props` | [`FaasDataWrapperProps`](interfaces/FaasDataWrapperProps.md)<`T`\> |
484
+
485
+ #### Returns
486
+
487
+ `JSX.Element`
488
+
489
+ ___
490
+
575
491
  ### Form
576
492
 
577
493
  ▸ **Form**<`Values`\>(`props`): `Element`
@@ -592,7 +508,7 @@ https://ant.design/components/form/
592
508
 
593
509
  | Name | Type |
594
510
  | :------ | :------ |
595
- | `props` | [`FormProps`](#formprops)<`Values`, `any`\> |
511
+ | `props` | [`FormProps`](interfaces/FormProps.md)<`Values`, `any`\> |
596
512
 
597
513
  #### Returns
598
514
 
@@ -608,10 +524,10 @@ FormItem, can be used without Form.
608
524
 
609
525
  ```ts
610
526
  // use inline type
611
- <FormItem item={{ type: 'string', id: 'name' }} />
527
+ <FormItem type='string' id='name' />
612
528
 
613
529
  // use custom type
614
- <FormItem item={{ id: 'password' }}>
530
+ <FormItem id='password'>
615
531
  <Input.Password />
616
532
  </>
617
533
  ```
@@ -626,7 +542,7 @@ FormItem, can be used without Form.
626
542
 
627
543
  | Name | Type |
628
544
  | :------ | :------ |
629
- | `props` | [`FormItemProps`](#formitemprops)<`T`\> |
545
+ | `props` | [`FormItemProps`](interfaces/FormItemProps.md)<`T`\> |
630
546
 
631
547
  #### Returns
632
548
 
@@ -636,21 +552,49 @@ ___
636
552
 
637
553
  ### Link
638
554
 
639
- ▸ **Link**(`__namedParameters`): `Element`
555
+ ▸ **Link**(`props`): `Element`
556
+
557
+ Link component with button.
640
558
 
641
559
  ```ts
642
560
  // pure link
643
561
  <Link href="/">Home</Link>
644
562
 
645
563
  // link with button
646
- <Link href="/" button={{type:'primary'}}>Home</Link>
564
+ <Link href="/" button={{ type:'primary' }}>Home</Link>
647
565
  ```
648
566
 
649
567
  #### Parameters
650
568
 
651
569
  | Name | Type |
652
570
  | :------ | :------ |
653
- | `__namedParameters` | [`LinkProps`](#linkprops) |
571
+ | `props` | [`LinkProps`](interfaces/LinkProps.md) |
572
+
573
+ #### Returns
574
+
575
+ `Element`
576
+
577
+ ___
578
+
579
+ ### Loading
580
+
581
+ ▸ **Loading**(`props`): `Element`
582
+
583
+ Loading component based on Spin
584
+
585
+ ```tsx
586
+ <Loading /> // display loading
587
+
588
+ <Loading loading={ !remoteData }>
589
+ <div>{remoteData}</div>
590
+ </Loading>
591
+ ```
592
+
593
+ #### Parameters
594
+
595
+ | Name | Type |
596
+ | :------ | :------ |
597
+ | `props` | [`LoadingProps`](#loadingprops) |
654
598
 
655
599
  #### Returns
656
600
 
@@ -694,7 +638,7 @@ export function App () {
694
638
 
695
639
  | Name | Type |
696
640
  | :------ | :------ |
697
- | `props` | [`RoutesProps`](#routesprops) |
641
+ | `props` | [`RoutesProps`](interfaces/RoutesProps.md) |
698
642
 
699
643
  #### Returns
700
644
 
@@ -716,7 +660,7 @@ https://ant.design/components/table/
716
660
 
717
661
  | Name | Type |
718
662
  | :------ | :------ |
719
- | `T` | `any` |
663
+ | `T` | extends `Record`<`string`, `any`\> |
720
664
  | `ExtendTypes` | `any` |
721
665
 
722
666
  #### Parameters
@@ -731,24 +675,6 @@ https://ant.design/components/table/
731
675
 
732
676
  ___
733
677
 
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
678
  ### Title
753
679
 
754
680
  ▸ **Title**(`props`): `JSX.Element`
@@ -773,7 +699,7 @@ Return null by default.
773
699
 
774
700
  | Name | Type |
775
701
  | :------ | :------ |
776
- | `props` | [`TitleProps`](#titleprops) |
702
+ | `props` | [`TitleProps`](interfaces/TitleProps.md) |
777
703
 
778
704
  #### Returns
779
705
 
@@ -785,6 +711,8 @@ ___
785
711
 
786
712
  ▸ **transferOptions**(`options`): { `label`: `string` ; `value?`: `string` \| `number` }[]
787
713
 
714
+ convert options to { label, value }[]
715
+
788
716
  #### Parameters
789
717
 
790
718
  | Name | Type |
@@ -816,11 +744,11 @@ ___
816
744
 
817
745
  ### useConfigContext
818
746
 
819
- ▸ **useConfigContext**(): [`ConfigProviderProps`](#configproviderprops)
747
+ ▸ **useConfigContext**(): [`ConfigProviderProps`](interfaces/ConfigProviderProps.md)
820
748
 
821
749
  #### Returns
822
750
 
823
- [`ConfigProviderProps`](#configproviderprops)
751
+ [`ConfigProviderProps`](interfaces/ConfigProviderProps.md)
824
752
 
825
753
  ___
826
754
 
@@ -834,7 +762,7 @@ Hook style drawer.
834
762
 
835
763
  | Name | Type | Description |
836
764
  | :------ | :------ | :------ |
837
- | `init?` | [`DrawerProps`](#drawerprops) | initial props ```ts function Example() { const { drawer, setDrawerProps } = useDrawer() return <> <Button onClick={ () => setDrawerProps(prev => ({ open: !prev.open})) }> Toggle </Button> {drawer} </> } ``` |
765
+ | `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
766
 
839
767
  #### Returns
840
768
 
@@ -843,8 +771,8 @@ Hook style drawer.
843
771
  | Name | Type |
844
772
  | :------ | :------ |
845
773
  | `drawer` | `Element` |
846
- | `drawerProps` | [`DrawerProps`](#drawerprops) |
847
- | `setDrawerProps` | (`changes`: `Partial`<[`DrawerProps`](#drawerprops)\>) => `void` |
774
+ | `drawerProps` | [`DrawerProps`](interfaces/DrawerProps.md) |
775
+ | `setDrawerProps` | (`changes`: `Partial`<[`DrawerProps`](interfaces/DrawerProps.md)\>) => `void` |
848
776
 
849
777
  ___
850
778
 
@@ -858,7 +786,7 @@ Hook style modal.
858
786
 
859
787
  | Name | Type | Description |
860
788
  | :------ | :------ | :------ |
861
- | `init?` | [`ModalProps`](#modalprops) | initial props ```ts function Example() { const { modal, setModalProps } = useModal() return <> <Button onClick={() => setModalProps({ open: true })}>Open Modal</Button> {modal}</> } ``` |
789
+ | `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
790
 
863
791
  #### Returns
864
792
 
@@ -867,5 +795,5 @@ Hook style modal.
867
795
  | Name | Type |
868
796
  | :------ | :------ |
869
797
  | `modal` | `Element` |
870
- | `modalProps` | [`ModalProps`](#modalprops) |
871
- | `setModalProps` | (`changes`: `Partial`<[`ModalProps`](#modalprops)\>) => `void` |
798
+ | `modalProps` | [`ModalProps`](interfaces/ModalProps.md) |
799
+ | `setModalProps` | (`changes`: `Partial`<[`ModalProps`](interfaces/ModalProps.md)\>) => `void` |