@faasjs/ant-design 0.0.2-beta.394 → 0.0.2-beta.397

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
@@ -41,7 +41,7 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
41
41
 
42
42
  - [Form](modules/Form.md)
43
43
 
44
- ### Type aliases
44
+ ### Type Aliases
45
45
 
46
46
  - [BaseItemProps](#baseitemprops)
47
47
  - [BaseOption](#baseoption)
@@ -76,7 +76,6 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
76
76
 
77
77
  - [ConfigContext](#configcontext)
78
78
  - [DatePicker](#datepicker)
79
- - [TimePicker](#timepicker)
80
79
 
81
80
  ### Functions
82
81
 
@@ -88,13 +87,14 @@ Form are based on [Ant Design's Form.Item component](https://ant.design/componen
88
87
  - [FormItem](#formitem)
89
88
  - [Routes](#routes)
90
89
  - [Table](#table)
90
+ - [TimePicker](#timepicker)
91
91
  - [Title](#title)
92
92
  - [transferOptions](#transferoptions)
93
93
  - [useConfigContext](#useconfigcontext)
94
94
  - [useDrawer](#usedrawer)
95
95
  - [useModal](#usemodal)
96
96
 
97
- ## Type aliases
97
+ ## Type Aliases
98
98
 
99
99
  ### BaseItemProps
100
100
 
@@ -143,7 +143,7 @@ ___
143
143
 
144
144
  ### DescriptionItemProps
145
145
 
146
- Ƭ **DescriptionItemProps**<`T`\>: { `children?`: `JSX.Element` ; `render?`: (`value`: `T`, `values`: `any`) => `string` \| `number` \| `boolean` \| `Element` } & [`FaasItemProps`](#faasitemprops)
146
+ Ƭ **DescriptionItemProps**<`T`\>: { `children?`: `JSX.Element` ; `render?`: (`value`: `T`, `values`: `any`) => `JSX.Element` \| `string` \| `number` \| `boolean` \| ``null`` } & [`FaasItemProps`](#faasitemprops)
147
147
 
148
148
  #### Type parameters
149
149
 
@@ -187,7 +187,7 @@ ___
187
187
  | Name | Type |
188
188
  | :------ | :------ |
189
189
  | `children?` | `JSX.Element` \| ``null`` |
190
- | `render?` | (`value`: `any`, `values`: `any`) => `string` \| `number` \| `boolean` \| `Element` |
190
+ | `render?` | (`value`: `any`, `values`: `any`) => `JSX.Element` \| `string` \| `number` \| `boolean` \| ``null`` |
191
191
 
192
192
  ___
193
193
 
@@ -230,7 +230,7 @@ ___
230
230
  | Name | Type |
231
231
  | :------ | :------ |
232
232
  | `children?` | `JSX.Element` \| ``null`` |
233
- | `render?` | (`value`: `any`, `values`: `any`, `index`: `number`) => `string` \| `number` \| `boolean` \| `Element` |
233
+ | `render?` | (`value`: `any`, `values`: `any`, `index`: `number`) => `JSX.Element` \| `string` \| `number` \| `boolean` \| ``null`` |
234
234
 
235
235
  ___
236
236
 
@@ -296,7 +296,7 @@ ___
296
296
 
297
297
  ### FormItemProps
298
298
 
299
- Ƭ **FormItemProps**<`T`\>: { `children?`: `JSX.Element` \| ``null`` ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `label?`: `string` \| ``false`` ; `rules?`: `RuleObject`[] ; `render?`: () => `Element` } & `FormItemInputProps` & [`FaasItemProps`](#faasitemprops) & `Omit`<`AntdFormItemProps`<`T`\>, ``"children"``\>
299
+ Ƭ **FormItemProps**<`T`\>: { `children?`: `JSX.Element` \| ``null`` ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `label?`: `string` \| ``false`` ; `render?`: () => `JSX.Element` \| ``null`` ; `rules?`: `RuleObject`[] } & `FormItemInputProps` & [`FaasItemProps`](#faasitemprops) & `Omit`<`AntdFormItemProps`<`T`\>, ``"children"``\>
300
300
 
301
301
  #### Type parameters
302
302
 
@@ -308,7 +308,7 @@ ___
308
308
 
309
309
  ### FormProps
310
310
 
311
- Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `children?`: `ReactNode` ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `footer?`: `JSX.Element` \| `JSX.Element`[] ; `items?`: ([`FormItemProps`](#formitemprops) \| `ExtendItemProps`)[] ; `submit?`: ``false`` \| { `text?`: `string` ; `to?`: { `action`: `string` ; `params?`: `Record`<`string`, `any`\> } } ; `onFinish?`: (`values`: `Values`, `submit?`: (`values`: `any`) => `Promise`<`any`\>) => `Promise`<`any`\> } & `Omit`<`AntdFormProps`<`Values`\>, ``"onFinish"`` \| ``"children"``\>
311
+ Ƭ **FormProps**<`Values`, `ExtendItemProps`\>: { `beforeItems?`: `JSX.Element` \| `JSX.Element`[] ; `children?`: `ReactNode` ; `extendTypes?`: { `[type: string]`: [`ExtendFormTypeProps`](#extendformtypeprops); } ; `footer?`: `JSX.Element` \| `JSX.Element`[] ; `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"``\>
312
312
 
313
313
  #### Type parameters
314
314
 
@@ -353,7 +353,7 @@ ___
353
353
 
354
354
  ### TableProps
355
355
 
356
- Ƭ **TableProps**<`T`, `ExtendTypes`\>: { `extendTypes?`: { `[key: string]`: [`ExtendTableTypeProps`](#extendtabletypeprops); } ; `faasData?`: `FaasDataWrapperProps`<`T`\> ; `items`: ([`TableItemProps`](#tableitemprops) \| `ExtendTypes` & [`ExtendTableItemProps`](#extendtableitemprops))[] ; `onChange?`: (`pagination`: `TablePaginationConfig`, `filters`: `Record`<`string`, `FilterValue`\>, `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`\>
356
+ Ƭ **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
357
 
358
358
  #### Type parameters
359
359
 
@@ -436,12 +436,6 @@ ___
436
436
 
437
437
  • `Const` **DatePicker**: `PickerComponentClass`<`Omit`<`PickerBaseProps`<`Dayjs`\>, ``"locale"`` \| ``"generateConfig"`` \| ``"hideHeader"`` \| ``"components"``\> & {} & {} & `Omit`<`PickerDateProps`<`Dayjs`\>, ``"locale"`` \| ``"generateConfig"`` \| ``"hideHeader"`` \| ``"components"``\> & {} & {} & `Omit`<`PickerTimeProps`<`Dayjs`\>, ``"locale"`` \| ``"generateConfig"`` \| ``"hideHeader"`` \| ``"components"``\> & {} & {}, `unknown`\> & {}
438
438
 
439
- ___
440
-
441
- ### TimePicker
442
-
443
- • `Const` **TimePicker**: `ForwardRefExoticComponent`<[`TimePickerProps`](#timepickerprops) & `RefAttributes`<`any`\>\>
444
-
445
439
  ## Functions
446
440
 
447
441
  ### Blank
@@ -452,9 +446,9 @@ If value is undefined or null, return text, otherwise return value.
452
446
 
453
447
  #### Parameters
454
448
 
455
- | Name | Type |
456
- | :------ | :------ |
457
- | `options?` | [`BlankProps`](#blankprops) |
449
+ | Name | Type | Description |
450
+ | :------ | :------ | :------ |
451
+ | `options?` | [`BlankProps`](#blankprops) | {object} |
458
452
 
459
453
  #### Returns
460
454
 
@@ -484,32 +478,32 @@ ___
484
478
 
485
479
  ### ConfigProvider
486
480
 
487
- ▸ **ConfigProvider**(`props`): `Element`
481
+ ▸ **ConfigProvider**(`__namedParameters`): `Element`
488
482
 
489
483
  Config for @faasjs/ant-design components.
490
484
 
485
+ ```ts
486
+ <ConfigProvider config={{
487
+ common: {
488
+ blank: 'Empty',
489
+ },
490
+ }}>
491
+ <Blank />
492
+ </ConfigProvider>
493
+ ```
494
+
491
495
  #### Parameters
492
496
 
493
497
  | Name | Type |
494
498
  | :------ | :------ |
495
- | `props` | `Object` |
496
- | `props.children` | `ReactNode` |
497
- | `props.config` | `Partial`<[`FaasState`](#faasstate)\> |
499
+ | `__namedParameters` | `Object` |
500
+ | `__namedParameters.children` | `ReactNode` |
501
+ | `__namedParameters.config` | `Partial`<[`FaasState`](#faasstate)\> |
498
502
 
499
503
  #### Returns
500
504
 
501
505
  `Element`
502
506
 
503
- ```ts
504
- <ConfigProvider config={{
505
- common: {
506
- blank: '空',
507
- },
508
- }}>
509
- <Blank />
510
- </ConfigProvider>
511
- ```
512
-
513
507
  ___
514
508
 
515
509
  ### Description
@@ -629,6 +623,24 @@ ___
629
623
 
630
624
  ___
631
625
 
626
+ ### TimePicker
627
+
628
+ ▸ **TimePicker**(`props`): `ReactElement`<`any`, `string` \| `JSXElementConstructor`<`any`\>\>
629
+
630
+ **NOTE**: Exotic components are not callable.
631
+
632
+ #### Parameters
633
+
634
+ | Name | Type |
635
+ | :------ | :------ |
636
+ | `props` | [`TimePickerProps`](#timepickerprops) & `RefAttributes`<`any`\> |
637
+
638
+ #### Returns
639
+
640
+ `ReactElement`<`any`, `string` \| `JSXElementConstructor`<`any`\>\>
641
+
642
+ ___
643
+
632
644
  ### Title
633
645
 
634
646
  ▸ **Title**(`props`): `JSX.Element`
package/dist/index.d.ts CHANGED
@@ -61,17 +61,14 @@ declare type FaasState = {
61
61
  declare const ConfigContext: react.Context<FaasState>;
62
62
  /**
63
63
  * Config for @faasjs/ant-design components.
64
- * @param props {object}
65
- * @param props.config {Partial<FaasState>}
66
- * @returns {null}
67
64
  *
68
65
  * ```ts
69
66
  * <ConfigProvider config={{
70
- * common: {
71
- * blank: '',
72
- * },
67
+ * common: {
68
+ * blank: 'Empty',
69
+ * },
73
70
  * }}>
74
- * <Blank />
71
+ * <Blank />
75
72
  * </ConfigProvider>
76
73
  * ```
77
74
  */