@epam/ai-dial-ui-kit 0.5.0-rc.44 → 0.5.0-rc.46
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/dial-ui-kit.es.js
CHANGED
|
@@ -48676,30 +48676,39 @@ const I8 = ({ selectionLabel: e, onClearSelection: t, actions: s }) => {
|
|
|
48676
48676
|
setCurrentPath: o,
|
|
48677
48677
|
handlePathChange: n
|
|
48678
48678
|
};
|
|
48679
|
-
}, G8 = ({
|
|
48680
|
-
|
|
48681
|
-
|
|
48682
|
-
|
|
48679
|
+
}, G8 = ({
|
|
48680
|
+
onDeleteFiles: e,
|
|
48681
|
+
onDeleteSuccess: t
|
|
48682
|
+
}) => {
|
|
48683
|
+
const [s, i] = I(!1), [o, n] = I([]), [r, a] = I(""), l = k(
|
|
48684
|
+
(u, h) => {
|
|
48685
|
+
n(u), a(h), i(!0);
|
|
48683
48686
|
},
|
|
48684
48687
|
[]
|
|
48685
|
-
),
|
|
48686
|
-
|
|
48687
|
-
}, []),
|
|
48688
|
-
if (e &&
|
|
48689
|
-
const
|
|
48690
|
-
sourceUrl:
|
|
48691
|
-
nodeType:
|
|
48688
|
+
), c = k(() => {
|
|
48689
|
+
i(!1), n([]);
|
|
48690
|
+
}, []), d = k(() => {
|
|
48691
|
+
if (e && o.length > 0) {
|
|
48692
|
+
const u = o.map((h) => ({
|
|
48693
|
+
sourceUrl: h.path,
|
|
48694
|
+
nodeType: h.nodeType
|
|
48692
48695
|
}));
|
|
48693
|
-
e(
|
|
48696
|
+
e(u, r), t?.();
|
|
48694
48697
|
}
|
|
48695
|
-
|
|
48696
|
-
}, [
|
|
48698
|
+
c();
|
|
48699
|
+
}, [
|
|
48700
|
+
o,
|
|
48701
|
+
e,
|
|
48702
|
+
t,
|
|
48703
|
+
c,
|
|
48704
|
+
r
|
|
48705
|
+
]);
|
|
48697
48706
|
return {
|
|
48698
|
-
deleteConfirmationOpen:
|
|
48699
|
-
itemsToDelete:
|
|
48700
|
-
openDeleteConfirmation:
|
|
48701
|
-
closeDeleteConfirmation:
|
|
48702
|
-
confirmDelete:
|
|
48707
|
+
deleteConfirmationOpen: s,
|
|
48708
|
+
itemsToDelete: o,
|
|
48709
|
+
openDeleteConfirmation: l,
|
|
48710
|
+
closeDeleteConfirmation: c,
|
|
48711
|
+
confirmDelete: d
|
|
48703
48712
|
};
|
|
48704
48713
|
}, B8 = ({
|
|
48705
48714
|
onDownloadFiles: e
|
|
@@ -49147,7 +49156,8 @@ const _8 = ({
|
|
|
49147
49156
|
closeDeleteConfirmation: Kr,
|
|
49148
49157
|
confirmDelete: qr
|
|
49149
49158
|
} = G8({
|
|
49150
|
-
onDeleteFiles: b
|
|
49159
|
+
onDeleteFiles: b,
|
|
49160
|
+
onDeleteSuccess: re
|
|
49151
49161
|
}), { handleDownloadFiles: Xo } = B8({
|
|
49152
49162
|
onDownloadFiles: S
|
|
49153
49163
|
}), {
|
|
@@ -2,8 +2,9 @@ import { DialFile } from '../../../models/file';
|
|
|
2
2
|
import { DialDeletedItem } from '../../../models/file-manager';
|
|
3
3
|
export interface UseFileDeleteOptions {
|
|
4
4
|
onDeleteFiles?: (items: DialDeletedItem[], sourceFolder: string) => void;
|
|
5
|
+
onDeleteSuccess?: () => void;
|
|
5
6
|
}
|
|
6
|
-
export declare const useFileDelete: ({ onDeleteFiles }: UseFileDeleteOptions) => {
|
|
7
|
+
export declare const useFileDelete: ({ onDeleteFiles, onDeleteSuccess, }: UseFileDeleteOptions) => {
|
|
7
8
|
deleteConfirmationOpen: boolean;
|
|
8
9
|
itemsToDelete: DialFile[];
|
|
9
10
|
openDeleteConfirmation: (items: DialFile[], parentFolderPath: string) => void;
|