@faasjs/ant-design 0.0.3-beta.4 → 0.0.3-beta.41

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