ados-rcm 1.1.714 → 1.1.716

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.
@@ -3,10 +3,9 @@ import { TUseValues } from '../../AHooks/useValues';
3
3
  import { TCanCallback } from '../../AUtils/cbF';
4
4
  import { IItem } from '../../AUtils/objF';
5
5
  import { IABaseProps } from '../ABase/ABase';
6
- import { TIcons } from '../AIcon/AIcon';
7
6
  import { Resources } from '../AResource/AResource';
8
7
  import { EDir4, TActionRef } from '../ATypes/ATypes';
9
- import { IATreeItemProps, IIndentProps } from './ATreeItem';
8
+ import { IATreeItemProps, IIndentProps, TIconsConfig } from './ATreeItem';
10
9
  export interface IATreeSearchResult<T> {
11
10
  /**
12
11
  * item? : T
@@ -130,19 +129,11 @@ export interface IATreeProps<T extends IATreeItem<T>> extends IABaseProps {
130
129
  */
131
130
  height?: number;
132
131
  /**
133
- * iconWidth? : number
134
- *
135
- * Description : iconWidth of ATree
136
- */
137
- iconWidth?: number;
138
- /**
139
- * icons? : { noChild?: TIcons; collapsed?: TIcons; expanded?: TIcons }
132
+ * icons? : { noChild?: TTreeIconConfig; collapsed?: TTreeIconConfig; expanded?: TTreeIconConfig }
140
133
  *
141
134
  * Description : icons of ATree
142
135
  */
143
- icons?: TCanCallback<IATreeItemProps<T>, {
144
- [key in TExpandState]?: TIcons | Exclude<React.ReactNode, string>;
145
- } | undefined>;
136
+ icons?: TCanCallback<IATreeItemProps<T>, TIconsConfig | undefined>;
146
137
  /**
147
138
  * indents? : { collapsed?: React.ReactNode; expanded?: React.ReactNode; isLast?: React.ReactNode }
148
139
  *
@@ -5,6 +5,13 @@ import { TIcons } from '../AIcon/AIcon';
5
5
  import { Resources } from '../AResource/AResource';
6
6
  import { EDir4 } from '../ATypes/ATypes';
7
7
  import { IATreeItem, IATreeSearchResult, TExpandState } from './ATree';
8
+ export type TTreeIconValue = TIcons | Exclude<React.ReactNode, string>;
9
+ export type TTreeIconConfig = TTreeIconValue;
10
+ export type TIconsConfig = {
11
+ [key in TExpandState]?: TTreeIconConfig;
12
+ } & {
13
+ iconWidth?: number;
14
+ };
8
15
  export interface IATreeItemProps<T> {
9
16
  ContentRenderer: (props: IATreeItemProps<T>) => React.ReactNode;
10
17
  RightStickyAddon?: TCanCallback<IATreeItemProps<T>, React.ReactNode>;
@@ -20,10 +27,7 @@ export interface IATreeItemProps<T> {
20
27
  getItemId?: (item: T) => string;
21
28
  height: number;
22
29
  hoverdItem: T | null;
23
- iconWidth: number;
24
- icons: TCanCallback<IATreeItemProps<T>, {
25
- [key in TExpandState]?: TIcons | Exclude<React.ReactNode, string>;
26
- } | undefined>;
30
+ icons: TCanCallback<IATreeItemProps<T>, TIconsConfig | undefined>;
27
31
  indents: EIndentState[];
28
32
  isChildOfDragItem?: (item: T) => boolean;
29
33
  isDragSrcItem?: boolean;