@myunisoft/design-system 1.3.4-tmp1 → 1.4.0-rev414
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/dist/components/Autocomplete/Autocomplete/types.d.ts +4 -0
- package/dist/components/DocumentComposer/Treeview/SkeletonTreeItem.d.ts +3 -0
- package/dist/components/DocumentComposer/Treeview/slots/LabelInputSlot.d.ts +1 -0
- package/dist/components/DocumentComposer/Treeview/types.d.ts +6 -0
- package/dist/components/DocumentComposer/hooks/useTemporarySection.d.ts +2 -2
- package/dist/index.js +5 -5
- package/package.json +115 -115
|
@@ -24,6 +24,10 @@ export type AutocompleteBaseProps<T = OptionType> = {
|
|
|
24
24
|
selectAllHidden?: boolean;
|
|
25
25
|
selectAllLabel?: string;
|
|
26
26
|
allSelectedLabel?: string;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use disabled instead
|
|
29
|
+
*/
|
|
30
|
+
isDisabled?: boolean;
|
|
27
31
|
expandSelectedTagsOnEdition?: false;
|
|
28
32
|
InputProps?: StandardInputProps;
|
|
29
33
|
onIsSearchingChange?: (isOpen: boolean) => void;
|
|
@@ -6,6 +6,7 @@ declare const LabelInputSlot: import("react").ForwardRefExoticComponent<InputHTM
|
|
|
6
6
|
isEditing?: boolean;
|
|
7
7
|
onTemporarySectionValidation?: (label: string) => void;
|
|
8
8
|
onTemporarySectionCancel?: () => void;
|
|
9
|
+
onItemLabelChange?: (itemId: string, newLabel: string) => void;
|
|
9
10
|
apiRef?: RichTreeViewProApiRef;
|
|
10
11
|
onEditingEnd?: () => void;
|
|
11
12
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -41,10 +41,16 @@ export type TreeviewProps<T> = {
|
|
|
41
41
|
defaultExpandedItems: string[];
|
|
42
42
|
checkboxSelection?: boolean;
|
|
43
43
|
onItemSelect?: (itemId: string | null) => void;
|
|
44
|
+
loading?: boolean;
|
|
44
45
|
} & CustomTreeviewItemProps<T>;
|
|
45
46
|
export type TreeviewItemProps<T> = {
|
|
46
47
|
itemId: string;
|
|
47
48
|
label?: React.ReactNode;
|
|
48
49
|
children?: React.ReactNode;
|
|
49
50
|
} & CustomTreeviewItemProps<T>;
|
|
51
|
+
export type SkeletonItem = {
|
|
52
|
+
id: string;
|
|
53
|
+
label: string;
|
|
54
|
+
children?: SkeletonItem[];
|
|
55
|
+
};
|
|
50
56
|
export {};
|
|
@@ -9,7 +9,7 @@ type UseTemporarySectionParams = {
|
|
|
9
9
|
apiRef: RichTreeViewProApiRef;
|
|
10
10
|
getSectionById: (sectionId: string) => DocumentSection | null;
|
|
11
11
|
onSectionCreate?: (parentId: string | null, title: string) => string | Promise<string>;
|
|
12
|
-
|
|
12
|
+
treeviewWrapperRef?: React.RefObject<HTMLDivElement | null>;
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Flow:
|
|
@@ -21,7 +21,7 @@ type UseTemporarySectionParams = {
|
|
|
21
21
|
* 4. User presses Escape or leaves empty → `cancel()` is called
|
|
22
22
|
* 5. Server responds → temporary section is cleared, real section replaces it
|
|
23
23
|
*/
|
|
24
|
-
export declare const useTemporarySection: ({ apiRef, getSectionById, onSectionCreate,
|
|
24
|
+
export declare const useTemporarySection: ({ apiRef, getSectionById, onSectionCreate, treeviewWrapperRef }: UseTemporarySectionParams) => {
|
|
25
25
|
temporarySection: TemporarySection | null;
|
|
26
26
|
create: (parentId?: string | null) => void;
|
|
27
27
|
validate: (title: string) => void;
|