shineout 2.0.0-rc.5 → 2.0.0-rc.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/css/Cascader/Node.d.ts +2 -2
  2. package/css/Checkbox/Group.d.ts +2 -2
  3. package/css/Checkbox/Props.d.ts +3 -1
  4. package/css/DataList/List.d.ts +2 -2
  5. package/css/Form/Props.d.ts +2 -0
  6. package/css/Modal/Props.d.ts +2 -1
  7. package/css/Radio/Group.d.ts +2 -2
  8. package/css/Radio/Props.d.ts +2 -0
  9. package/css/Scroll/Props.d.ts +2 -0
  10. package/css/Select/Select.js +0 -1
  11. package/css/Table/Props.d.ts +3 -2
  12. package/css/Table/Tbody.d.ts +1 -1
  13. package/css/Table/Td.d.ts +5 -5
  14. package/css/Transfer/Props.d.ts +8 -1
  15. package/css/Tree/Props.d.ts +4 -3
  16. package/css/Upload/Props.d.ts +2 -0
  17. package/css/index.js +1 -1
  18. package/dist/shineout.js +3134 -3147
  19. package/dist/shineout.js.map +1 -1
  20. package/dist/shineout.min.js +1 -1
  21. package/esm/Cascader/Node.d.ts +2 -2
  22. package/esm/Checkbox/Group.d.ts +2 -2
  23. package/esm/Checkbox/Props.d.ts +3 -1
  24. package/esm/DataList/List.d.ts +2 -2
  25. package/esm/Form/Props.d.ts +2 -0
  26. package/esm/Modal/Props.d.ts +2 -1
  27. package/esm/Radio/Group.d.ts +2 -2
  28. package/esm/Radio/Props.d.ts +2 -0
  29. package/esm/Scroll/Props.d.ts +2 -0
  30. package/esm/Select/Select.js +0 -1
  31. package/esm/Table/Props.d.ts +3 -2
  32. package/esm/Table/Tbody.d.ts +1 -1
  33. package/esm/Table/Td.d.ts +5 -5
  34. package/esm/Transfer/Props.d.ts +8 -1
  35. package/esm/Tree/Props.d.ts +4 -3
  36. package/esm/Upload/Props.d.ts +2 -0
  37. package/esm/index.js +1 -1
  38. package/lib/Cascader/Node.d.ts +2 -2
  39. package/lib/Checkbox/Group.d.ts +2 -2
  40. package/lib/Checkbox/Props.d.ts +3 -1
  41. package/lib/DataList/List.d.ts +2 -2
  42. package/lib/Form/Props.d.ts +2 -0
  43. package/lib/Modal/Props.d.ts +2 -1
  44. package/lib/Radio/Group.d.ts +2 -2
  45. package/lib/Radio/Props.d.ts +2 -0
  46. package/lib/Scroll/Props.d.ts +2 -0
  47. package/lib/Select/Select.js +0 -1
  48. package/lib/Table/Props.d.ts +3 -2
  49. package/lib/Table/Tbody.d.ts +1 -1
  50. package/lib/Table/Td.d.ts +5 -5
  51. package/lib/Transfer/Props.d.ts +8 -1
  52. package/lib/Tree/Props.d.ts +4 -3
  53. package/lib/Upload/Props.d.ts +2 -0
  54. package/lib/index.js +1 -1
  55. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { CascaderBaseValue, NodeProps } from './Props';
3
3
  import { PureComponent } from '../component';
4
4
  interface NodeState {
@@ -13,7 +13,7 @@ declare class Node<U, T extends CascaderBaseValue> extends PureComponent<NodePro
13
13
  handlePathChange(): void;
14
14
  handleChange(_: any, checked: boolean): void;
15
15
  handleSelect(e: MouseEvent): void;
16
- renderContent(): React.ReactNode;
16
+ renderContent(): ReactNode;
17
17
  render(): JSX.Element;
18
18
  }
19
19
  export default Node;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { PureComponent } from '../component';
3
3
  import { BaseCheckboxGroupProps, CheckValueType } from './Props';
4
4
  declare class CheckboxGroup<DataItem, Value> extends PureComponent<BaseCheckboxGroupProps<DataItem, Value>, {}> {
@@ -8,7 +8,7 @@ declare class CheckboxGroup<DataItem, Value> extends PureComponent<BaseCheckboxG
8
8
  constructor(props: BaseCheckboxGroupProps<DataItem, Value>);
9
9
  componentDidMount(): void;
10
10
  componentWillUnmount(): void;
11
- getContent(d: DataItem): React.ReactNode;
11
+ getContent(d: DataItem): ReactNode;
12
12
  handleUpdate(): void;
13
13
  handleClick(_val: unknown, checked: CheckValueType, index: number): void;
14
14
  handleRawChange(value: DataItem, checked: CheckValueType): void;
@@ -6,6 +6,7 @@ import { GetDatumListProps } from '../Datum/Props';
6
6
  export declare type CheckValueType = boolean | 'indeterminate';
7
7
  export declare type CheckType = 'radio' | 'switch' | 'checkbox';
8
8
  export interface CheckItemProps extends StandardProps {
9
+ children?: ReactNode;
9
10
  /**
10
11
  * disable checkbox
11
12
  *
@@ -67,7 +68,7 @@ export declare type SimpleRadioProps = Omit<CheckItemProps, 'content' | 'onChang
67
68
  checked?: boolean | ((htmlValue: any) => boolean);
68
69
  onChange?: ((value: any, checked: CheckValueType, index?: number) => void);
69
70
  };
70
- export declare type SimpleSwitchProps = Omit<CheckItemProps, 'onChange' | 'onRawChange' | 'inputable' | 'value'> & {
71
+ export declare type SimpleSwitchProps = Omit<CheckItemProps, 'onChange' | 'onRawChange' | 'inputable' | 'value' | 'children'> & {
71
72
  checked?: boolean | ((htmlValue: any) => boolean);
72
73
  onChange?: ((value: boolean) => void);
73
74
  };
@@ -77,6 +78,7 @@ export interface CheckboxContextProvider {
77
78
  }
78
79
  export declare type CheckboxProviderProps<U> = Omit<U, 'onRawChange'>;
79
80
  export interface BaseCheckboxGroupProps<DataItem, Value> extends StandardProps {
81
+ children?: ReactNode;
80
82
  /**
81
83
  * When it is a string, return d[string]. When it is a function, return the result of the function.
82
84
  *
@@ -1,4 +1,4 @@
1
- import React, { Component } from 'react';
1
+ import { Component, ReactNode } from 'react';
2
2
  import { BaseListProps } from './Props';
3
3
  declare class Index<U, T> extends Component<BaseListProps<U, T>> {
4
4
  static defaultProps: {
@@ -13,7 +13,7 @@ declare class Index<U, T> extends Component<BaseListProps<U, T>> {
13
13
  constructor(props: BaseListProps<U, T>);
14
14
  componentWillUnmount(): void;
15
15
  getItemClassName(value: U, index: number, flag?: boolean): string;
16
- getContent(value: U, index: number): React.ReactNode;
16
+ getContent(value: U, index: number): ReactNode;
17
17
  scrollLoading(): void;
18
18
  bindNode(node: HTMLDivElement): void;
19
19
  bindObserver(node: HTMLDivElement): void;
@@ -210,6 +210,7 @@ export interface FormModeProps {
210
210
  /** ----------------form-----------------------* */
211
211
  export declare type formStatus = 'disabled' | 'pending' | '';
212
212
  export interface SimpleFormProps<Value = ObjectType> extends StandardProps {
213
+ children?: ReactNode;
213
214
  /**
214
215
  * Form value
215
216
  *
@@ -355,6 +356,7 @@ export interface ItemProps extends StandardProps {
355
356
  tip?: React.ReactNode;
356
357
  formDatum?: FormDatum<any>;
357
358
  labelVerticalAlign?: 'top' | 'middle' | 'bottom';
359
+ children?: React.ReactNode;
358
360
  }
359
361
  /** ----------------formButton-----------------------* */
360
362
  export interface FormButtonProps extends Omit<ButtonProps, 'htmlType' | 'onRef'> {
@@ -223,7 +223,7 @@ export interface ModalProps extends StandardProps {
223
223
  drawer?: boolean;
224
224
  children?: ReactNode;
225
225
  }
226
- export interface ModalPanelProps extends StandardProps, Pick<ModalProps, 'footer' | 'maskCloseAble' | 'noPadding' | 'onClose' | 'padding' | 'position' | 'title' | 'type' | 'width' | 'moveable' | 'resizable' | 'hideClose' | 'zoom' | 'events' | 'fullScreen' | 'top' | 'bodyStyle'> {
226
+ export interface ModalPanelProps extends StandardProps, Pick<ModalProps, 'children' | 'footer' | 'maskCloseAble' | 'noPadding' | 'onClose' | 'padding' | 'position' | 'title' | 'type' | 'width' | 'moveable' | 'resizable' | 'hideClose' | 'zoom' | 'events' | 'fullScreen' | 'top' | 'bodyStyle'> {
227
227
  id?: string;
228
228
  from?: string;
229
229
  container?: Element;
@@ -291,6 +291,7 @@ export interface ModalFunctionOptions extends Omit<ModalProps, 'usePortal' | 'de
291
291
  * default: -
292
292
  */
293
293
  noPadding?: boolean;
294
+ children?: ReactNode;
294
295
  }
295
296
  export declare type Options = ModalFunctionOptions & {
296
297
  id: string;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { PureComponent } from '../component';
3
3
  import { BaseRadioGroupProps } from './Props';
4
4
  import { CheckValueType } from '../Checkbox/Props';
@@ -10,7 +10,7 @@ declare class RadioGroup<DataItem, Value> extends PureComponent<BaseRadioGroupPr
10
10
  constructor(props: BaseRadioGroupProps<DataItem, Value>);
11
11
  componentDidMount(): void;
12
12
  componentWillUnmount(): void;
13
- getContent(d: DataItem, index: number): React.ReactNode;
13
+ getContent(d: DataItem, index: number): ReactNode;
14
14
  handleClick(_val: any, _checked: CheckValueType, index: number): void;
15
15
  handleRawChange(value: DataItem): void;
16
16
  render(): JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { GetInputableProps } from '../Form/Props';
3
4
  import { GetDatumListProps } from '../Datum/Props';
4
5
  import { LiteralUnion, RegularAttributes } from '../@types/common';
@@ -6,6 +7,7 @@ import { SimpleRadioProps } from '../Checkbox/Props';
6
7
  import { KeygenType, StandardProps } from '../@types/common';
7
8
  import ListDatum from '../Datum/List';
8
9
  export interface BaseRadioGroupProps<DataItem, Value> extends StandardProps {
10
+ children?: ReactNode;
9
11
  /**
10
12
  * When it is a string, return d[string]. When it is a function, return the result of the function.
11
13
  *
@@ -21,6 +21,7 @@ export interface ScrollProps {
21
21
  innerScrollAttr?: string[];
22
22
  className?: string;
23
23
  style?: CSSProperties;
24
+ children?: ReactNode;
24
25
  }
25
26
  /** ------ bar ------ */
26
27
  export interface BarProps {
@@ -41,4 +42,5 @@ export interface ScrollIndexProps extends Omit<ScrollProps, 'left' | 'top' | 'sc
41
42
  scrollLeft?: number;
42
43
  scrollTop?: number;
43
44
  scroll?: ScrollFixedType;
45
+ children?: ReactNode;
44
46
  }
@@ -298,7 +298,6 @@ function (_PureComponent) {
298
298
  _proto.handleChange = function handleChange(_isActive, data, fromInput) {
299
299
  var _this2 = this;
300
300
 
301
- console.log('fromInput', fromInput);
302
301
  var _this$props4 = this.props,
303
302
  datum = _this$props4.datum,
304
303
  multiple = _this$props4.multiple,
@@ -277,9 +277,10 @@ export declare class Table<DataItem, Value> extends React.Component<TableProps<D
277
277
  export declare type TableType = typeof Table;
278
278
  /** ------ simpleTable ---------- */
279
279
  export interface SimpleTableProps<DataItem, Value> {
280
+ children?: ReactNode;
280
281
  width?: number;
281
282
  dataChangeResize?: boolean;
282
- externalExpandRender?: (rowData: DataItem, index: number) => ReactNode;
283
+ externalExpandRender?: (rowData: DataItem, index: number) => () => ReactNode;
283
284
  expandKeys?: KeygenResult[];
284
285
  keygen: StructKeygenType<DataItem>;
285
286
  resetFixAuto: (is?: boolean) => boolean;
@@ -403,7 +404,7 @@ export interface Row<DataItem> {
403
404
  }
404
405
  /** ------ tr ---------- */
405
406
  export interface TrProps<DataItem, Value> extends Omit<TbodyProps<DataItem, Value>, 'data' | 'keygen' | 'sorter' | 'expandKeys' | 'colgroup'> {
406
- onExpand: (key: KeygenResult, expanded?: ReactNode) => void;
407
+ onExpand: (key: KeygenResult, expanded?: () => ReactNode) => void;
407
408
  expandRender?: ((rowData: DataItem, index?: number) => ReactNode) | ReactNode;
408
409
  rowKey?: string | number;
409
410
  rowData: DataItem;
@@ -19,7 +19,7 @@ declare class Tbody<DataItem, Value> extends PureComponent<TbodyProps<DataItem,
19
19
  componentDidUpdate(prevProps: TbodyProps<DataItem, Value>): void;
20
20
  bodyRender(): void;
21
21
  bindBody(el: HTMLTableSectionElement): void;
22
- handleExpand(key: KeygenResult, render: ReactNode): void;
22
+ handleExpand(key: KeygenResult, render: () => ReactNode): void;
23
23
  findExpandFunc(key: KeygenResult, i: number): React.ReactNode;
24
24
  renderTr(row: Row<DataItem>[], i: number): JSX.Element;
25
25
  renderPlaceholderTr(): JSX.Element;
package/css/Table/Td.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import React, { PureComponent, ReactNode } from 'react';
1
+ import { PureComponent, ReactNode } from 'react';
2
2
  import { TdProps } from './Props';
3
3
  export declare const CLASS_FIXED_LEFT = "fixed-left";
4
4
  export declare const CLASS_FIXED_RIGHT = "fixed-right";
5
5
  declare class Td<DataItem, Value> extends PureComponent<TdProps<DataItem, Value>> {
6
6
  static defaultProps: any;
7
- cachedRender: ReactNode;
7
+ cachedRender: () => ReactNode;
8
8
  constructor(props: TdProps<DataItem, Value>);
9
9
  handleExpandClick(): void;
10
10
  handleTreeExpand(): void;
11
- renderCheckbox(): React.ReactNode;
11
+ renderCheckbox(): ReactNode;
12
12
  renderExpand(index: number): JSX.Element | null;
13
13
  renderTreeExpand(content: ReactNode): JSX.Element;
14
- renderResult(): React.ReactNode;
15
- renderContent(): React.ReactNode;
14
+ renderResult(): ReactNode;
15
+ renderContent(): ReactNode;
16
16
  render(): JSX.Element;
17
17
  }
18
18
  export default Td;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import ListDatum from '../Datum/List';
3
4
  import { GetDatumListProps } from '../Datum/Props';
4
5
  import { KeygenResult, LiteralUnion, StructKeygenType } from '../@types/common';
@@ -123,7 +124,13 @@ export interface BaseTransferProps<DataItem, Value extends any[]> {
123
124
  * default: -
124
125
  */
125
126
  renderFilter?: (value: filterProps) => React.ReactNode;
126
- children?: React.ReactNode;
127
+ children?: (props: {
128
+ onSelected: (keys: KeygenResult) => void;
129
+ direction: 'left' | 'right';
130
+ selectedKeys: KeygenResult[];
131
+ value: Value;
132
+ filterText: string;
133
+ }) => ReactNode;
127
134
  }
128
135
  /** ----------- btns ------------*/
129
136
  export interface BtnProps<DataItem, Value extends any[]> extends Pick<BaseTransferProps<DataItem, Value>, 'datum' | 'keygen' | 'operationIcon' | 'data' | 'disabled'>, Required<Pick<BaseTransferProps<DataItem, Value>, 'operations' | 'data'>> {
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
- import { ComponentType } from 'react';
3
2
  import * as CSS from 'csstype';
4
3
  import { KeygenResult, LiteralUnion, StandardProps, ValueItem } from '../@types/common';
5
4
  import DatumTree, { TreePathType, TreeModeType } from '../Datum/Tree';
6
5
  import { GetInputableProps } from '../Form/Props';
6
+ declare type ExpandIconType<Item> = React.ReactNode | ((d: Item) => React.ReactNode);
7
7
  /** ------------ Tree -------------- */
8
8
  export interface TreeProps<DataItem, Value extends any[]> extends StandardProps {
9
9
  /**
@@ -137,7 +137,7 @@ export interface TreeProps<DataItem, Value extends any[]> extends StandardProps
137
137
  *
138
138
  * default: none
139
139
  */
140
- expandIcons?: React.ReactNode[];
140
+ expandIcons?: [ExpandIconType<DataItem>, ExpandIconType<DataItem>];
141
141
  /**
142
142
  * desc: style when drap images
143
143
  *
@@ -269,7 +269,7 @@ export interface NodeProps<DataItem, Value extends any[]> extends Omit<ListProps
269
269
  id: KeygenResult;
270
270
  data: DataItem;
271
271
  index: number;
272
- listComponent: ComponentType<ListProps<DataItem, Value>>;
272
+ listComponent: React.ComponentType<ListProps<DataItem, Value>>;
273
273
  }
274
274
  /** ------------ Content -------------- */
275
275
  export interface ContentProps<DataItem, Value extends any[]> extends Omit<NodeProps<DataItem, Value>, 'listComponent' | 'onDrop' | 'childrenClass' | 'leafClass' | 'nodeClass'> {
@@ -289,3 +289,4 @@ export declare class TreeField<DataItem, Value extends any[]> extends React.Comp
289
289
  render: () => JSX.Element;
290
290
  }
291
291
  export declare type TreeFieldType = typeof TreeField;
292
+ export {};
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ReactNode } from 'react';
2
3
  import { ObjectType, StandardProps } from '../@types/common';
3
4
  import { PopoverConfirmProps } from '../Popover/Props';
4
5
  import { GapProps } from '../Gap/Props';
@@ -445,6 +446,7 @@ export interface DropProps<ValueItem> extends Pick<AcceptUpload<ValueItem>, 'dro
445
446
  dropData?: any;
446
447
  onDrop?: (files: File[], index: number) => void;
447
448
  className?: string;
449
+ children?: ReactNode;
448
450
  }
449
451
  export interface FileProps {
450
452
  id: string;
package/css/index.js CHANGED
@@ -220,6 +220,6 @@ exports.Upload = _Upload.default;
220
220
  // Created by scripts/src-index.js.
221
221
  var _default = {
222
222
  utils: utils,
223
- version: '2.0.0-rc.5'
223
+ version: '2.0.0-rc.6'
224
224
  };
225
225
  exports.default = _default;