@epam/ai-dial-react-file-manager 0.3.0-dev.24 → 0.3.0-dev.25

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.
@@ -73,9 +73,13 @@ export interface FileTreeOptions extends Omit<DialFoldersTreeProps, 'items' | 's
73
73
  }
74
74
  export interface DeleteConfirmationOptions {
75
75
  cancelLabel?: string;
76
- titleRenderer?: (fileNames: string[]) => ReactNode;
76
+ /** Receives the names and the items, so a host can title a folder and a file differently by `nodeType`. */
77
+ titleRenderer?: (fileNames: string[], items: DialFile[]) => ReactNode;
77
78
  confirmLabel?: string;
78
- contentRenderer?: (fileNames: string[]) => ReactNode;
79
+ /** Accessible name of the header close control. Defaults to `"Close dialog"`. */
80
+ closeLabel?: string;
81
+ /** Receives the names and the items, like `titleRenderer`. */
82
+ contentRenderer?: (fileNames: string[], items: DialFile[]) => ReactNode;
79
83
  }
80
84
  /**
81
85
  * The breadcrumb trail and the search field are configured together but render
@@ -7,12 +7,15 @@ export interface FileManagerDeleteConfirmationPopupProps {
7
7
  onConfirm: () => void;
8
8
  cancelLabel?: string;
9
9
  confirmLabel?: string;
10
- titleRenderer?: (fileNames: string[]) => ReactNode;
11
- contentRenderer?: (fileNames: string[]) => ReactNode;
10
+ closeLabel?: string;
11
+ titleRenderer?: (fileNames: string[], items: DialFile[]) => ReactNode;
12
+ contentRenderer?: (fileNames: string[], items: DialFile[]) => ReactNode;
12
13
  }
13
14
  /**
14
15
  * Confirmation popup for deleting files in FileManager.
15
- * Shows a list of files to be deleted with customizable title and content.
16
+ * Shows a list of files to be deleted with customizable title and content,
17
+ * a close control in the header, a text Cancel, and a danger Delete with a
18
+ * leading trash icon.
16
19
  *
17
20
  * @param open - Controls visibility of the popup
18
21
  * @param itemsToDelete - Array of files to be deleted
@@ -20,7 +23,8 @@ export interface FileManagerDeleteConfirmationPopupProps {
20
23
  * @param onConfirm - Callback when delete is confirmed
21
24
  * @param [cancelLabel='Cancel'] - Label for cancel button
22
25
  * @param [confirmLabel='Delete'] - Label for confirm button
23
- * @param [titleRenderer] - Custom title renderer function
24
- * @param [contentRenderer] - Custom content renderer function
26
+ * @param [closeLabel='Close dialog'] - Accessible name of the header close control
27
+ * @param [titleRenderer] - Custom title renderer; receives the names and the items, so it can tell a folder from a file by `nodeType`
28
+ * @param [contentRenderer] - Custom content renderer; receives the names and the items
25
29
  */
26
30
  export declare const FileManagerDeleteConfirmationPopup: FC<FileManagerDeleteConfirmationPopupProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-react-file-manager",
3
- "version": "0.3.0-dev.24",
3
+ "version": "0.3.0-dev.25",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "description": "React file manager package for AI DIAL interfaces",