funda-ui 4.5.677 → 4.5.682

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 (40) hide show
  1. package/ColorPicker/index.js +3 -1
  2. package/DragDropList/index.css +188 -0
  3. package/DragDropList/index.d.ts +43 -0
  4. package/DragDropList/index.js +1589 -0
  5. package/LICENSE +21 -0
  6. package/MultipleSelect/index.css +237 -144
  7. package/MultipleSelect/index.d.ts +23 -10
  8. package/MultipleSelect/index.js +2242 -1225
  9. package/README.md +3 -1
  10. package/Utils/useBoundedDrag.d.ts +127 -0
  11. package/Utils/useBoundedDrag.js +382 -0
  12. package/Utils/useDragDropPosition.d.ts +169 -0
  13. package/Utils/useDragDropPosition.js +456 -0
  14. package/all.d.ts +1 -0
  15. package/all.js +1 -0
  16. package/lib/cjs/ColorPicker/index.js +3 -1
  17. package/lib/cjs/DragDropList/index.d.ts +43 -0
  18. package/lib/cjs/DragDropList/index.js +1589 -0
  19. package/lib/cjs/MultipleSelect/index.d.ts +23 -10
  20. package/lib/cjs/MultipleSelect/index.js +2242 -1225
  21. package/lib/cjs/Utils/useBoundedDrag.d.ts +127 -0
  22. package/lib/cjs/Utils/useBoundedDrag.js +382 -0
  23. package/lib/cjs/Utils/useDragDropPosition.d.ts +169 -0
  24. package/lib/cjs/Utils/useDragDropPosition.js +456 -0
  25. package/lib/cjs/index.d.ts +1 -0
  26. package/lib/cjs/index.js +1 -0
  27. package/lib/css/DragDropList/index.css +188 -0
  28. package/lib/css/MultipleSelect/index.css +237 -144
  29. package/lib/esm/ColorPicker/index.tsx +53 -49
  30. package/lib/esm/DragDropList/index.scss +245 -0
  31. package/lib/esm/DragDropList/index.tsx +493 -0
  32. package/lib/esm/MultipleSelect/index.scss +288 -183
  33. package/lib/esm/MultipleSelect/index.tsx +304 -166
  34. package/lib/esm/MultipleSelect/utils/func.ts +21 -1
  35. package/lib/esm/Tabs/Tabs.tsx +1 -1
  36. package/lib/esm/Utils/hooks/useBoundedDrag.tsx +303 -0
  37. package/lib/esm/Utils/hooks/useDragDropPosition.tsx +420 -0
  38. package/lib/esm/index.js +1 -0
  39. package/package.json +1 -1
  40. package/lib/esm/MultipleSelect/ItemList.tsx +0 -323
@@ -1,6 +1,15 @@
1
1
  import React from 'react';
2
2
  export interface OptionConfig {
3
- [propName: string]: string | number | boolean | Function;
3
+ id: number;
4
+ parentId?: number;
5
+ label: string;
6
+ listItemLabel: string;
7
+ value: string;
8
+ queryString: string;
9
+ depth?: number;
10
+ children?: OptionConfig[];
11
+ disabled?: boolean;
12
+ extendedContent?: React.ReactNode;
4
13
  }
5
14
  export declare type MultipleSelectProps = {
6
15
  contentRef?: React.ForwardedRef<any>;
@@ -17,11 +26,6 @@ export declare type MultipleSelectProps = {
17
26
  iconAdd?: React.ReactNode | string;
18
27
  iconRemove?: React.ReactNode | string;
19
28
  unattachedSelect?: boolean;
20
- hierarchical?: boolean;
21
- indentation?: string;
22
- doubleIndent?: boolean;
23
- alternateCollapse?: boolean;
24
- arrow?: React.ReactNode;
25
29
  defaultValue?: string;
26
30
  value?: string;
27
31
  label?: React.ReactNode | string;
@@ -29,7 +33,16 @@ export declare type MultipleSelectProps = {
29
33
  options?: OptionConfig[] | string;
30
34
  disabled?: any;
31
35
  required?: any;
32
- appendControl?: React.ReactNode;
36
+ /** DragDrop List */
37
+ draggable?: boolean;
38
+ handleHide?: boolean;
39
+ handleIcon?: string;
40
+ handlePos?: 'left' | 'right';
41
+ dragMode?: 'handle' | 'block';
42
+ indentation?: string;
43
+ doubleIndent?: boolean;
44
+ alternateCollapse?: boolean;
45
+ arrow?: React.ReactNode;
33
46
  /** Whether to use square brackets to save result and initialize default value */
34
47
  extractValueByBrackets?: boolean;
35
48
  /** Incoming data, you can set the third parameter of `onFetch` */
@@ -43,9 +56,9 @@ export declare type MultipleSelectProps = {
43
56
  fetchFuncMethodParams?: any[];
44
57
  fetchCallback?: (data: any) => void;
45
58
  onFetch?: (data: any) => void;
46
- onAddAll?: (e: any, data: any, dataStr: any) => void;
47
- onRemoveAll?: (e: any, data: any, dataStr: any) => void;
48
- onChange?: (e: any, data: any, dataStr: any, currentData: any, type: string) => void;
59
+ onAddAll?: (e: HTMLElement | null, data: any[], dataStr: string, res: any[]) => void;
60
+ onRemoveAll?: (e: HTMLElement | null, data: any[], dataStr: string, res: any[]) => void;
61
+ onChange?: (e: HTMLElement | null, data: any[], dataStr: string, currentData: any, type: string, res: any[]) => void;
49
62
  };
50
63
  declare const MultipleSelect: React.ForwardRefExoticComponent<MultipleSelectProps & React.RefAttributes<unknown>>;
51
64
  export default MultipleSelect;