@epam/ai-dial-chat-hooks 1.2.0-dev.28 → 1.2.0-dev.284
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/api-error/api-error.js +7 -4
- package/attachment/useAttachmentValidation/useAttachmentValidation.js +26 -19
- package/attachments.d.ts +10 -4
- package/catalog/catalog-derivations.js +1 -1
- package/catalog/deployment-id.js +8 -2
- package/catalog/map-deployment-limits-to-catalog.js +16 -24
- package/catalog/map-deployment-limits-to-input.js +81 -9
- package/catalog/map-deployment-to-catalog-item.js +34 -34
- package/catalog/map-entity-details-to-catalog.js +7 -0
- package/catalog/map-skill-to-catalog-item.js +55 -48
- package/catalog/publish.js +6 -5
- package/catalog/useApplicationCredentials/useApplicationCredentials.js +39 -0
- package/catalog/useCatalogEditNavigation/useCatalogEditNavigation.js +122 -101
- package/catalog/usePublishFolders/usePublishFolders.js +1 -1
- package/catalog/useSkillDetailsPanelData/useSkillDetailsPanelData.js +39 -39
- package/catalog/useSkillItemDetails.js +17 -13
- package/catalog.d.ts +139 -34
- package/catalog.js +23 -22
- package/conversation/conversation-transfer/export-conversation.js +24 -16
- package/conversation/conversation-transfer/import-conversation.js +80 -31
- package/conversation/conversation-transfer/queue.js +8 -5
- package/conversation/create-chat-stream-api.js +85 -49
- package/conversation/message-utils.js +44 -2
- package/conversation/stage.js +27 -0
- package/conversation/useActiveConversationSync/useActiveConversationSync.js +7 -8
- package/conversation/useConversationExport/useConversationExport.js +9 -9
- package/conversation/useConversationHandlers/useConversationHandlers.js +73 -57
- package/conversation/useConversationImport/useConversationImport.js +123 -121
- package/conversation/useConversationPanelItems/useConversationPanelItems.js +50 -32
- package/conversation/useConversationScroll/useConversationScroll.js +68 -64
- package/conversation/useConversationStream/apply-chunk.js +1 -1
- package/conversation/useConversationStream/frame-scheduler.js +39 -0
- package/conversation/useConversationStream/generation-resume.js +122 -64
- package/conversation/useConversationStream/useConversationStream.js +265 -116
- package/conversation/useMessageSelectionReply/useMessageSelectionReply.js +189 -0
- package/conversation-sources/useConversationSources/useConversationSources.js +31 -24
- package/conversation-sources.d.ts +1 -1
- package/conversation-transfer.d.ts +2 -1
- package/conversation.d.ts +295 -17
- package/conversation.js +32 -29
- package/file-manager-canvas.d.ts +53 -5
- package/file-manager.d.ts +156 -26
- package/file-manager.js +25 -23
- package/files/attachment-canvas.js +74 -40
- package/files/attachment-types.js +14 -13
- package/files/dial-file-manager-mapping.util.js +2 -1
- package/files/dial-file-manager-path.util.js +23 -1
- package/files/dial-file-manager.model.js +23 -19
- package/files/dial-file-manager.types.js +3 -3
- package/files/useDialFileListing/useDialFileListing.js +139 -127
- package/files/useDialFileManager/useDialFileManager.js +132 -128
- package/files/useDialFileManagerSections/useDialFileManagerSections.js +155 -0
- package/files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js +20 -19
- package/files/useDialFileMutations/useDialFileMutations.js +33 -32
- package/files/useDialFileUploadBatch/useDialFileUploadBatch.js +117 -110
- package/files/useFileAttachmentPicker/useFileAttachmentPicker.js +49 -0
- package/index.d.ts +1178 -112
- package/index.js +136 -122
- package/mcp-apps/useMcpAppHostAdapter/useMcpAppHostAdapter.js +7 -5
- package/mcp-apps/useMcpAppHostContext/useMcpAppHostContext.js +1 -1
- package/mcp-apps/useMcpAppTools/useMcpAppTools.js +1 -1
- package/mcp-apps/useOpenMcpAppCanvas/useOpenMcpAppCanvas.js +25 -23
- package/mcp-apps.d.ts +8 -6
- package/oauth/toolset-id.js +5 -3
- package/oauth/useToolsetLogin/useToolsetLogin.js +8 -8
- package/oauth.d.ts +32 -0
- package/oauth.js +9 -9
- package/package.json +26 -21
- package/scheduled-task/scheduled-task-description.js +81 -0
- package/scheduled-task/scheduled-task-preparation.js +24 -0
- package/scheduled-task/scheduled-task-trigger.js +74 -71
- package/scheduled-task/scheduled-tasks-api-client.js +19 -0
- package/scheduled-task/use-scheduled-task-runs.js +194 -0
- package/scheduled-task/use-scheduled-tasks.js +93 -0
- package/scheduled-tasks.d.ts +197 -3
- package/scheduled-tasks.js +7 -2
- package/shared/application-schema.js +5 -2
- package/shared/cron-day-of-month.js +13 -0
- package/skill/skill-archive.js +19 -0
- package/skill/skill-types.js +8 -7
- package/skill/skill.js +53 -27
- package/skill/useSkillArchiveImport/useSkillArchiveImport.js +79 -0
- package/skill/useSkillEditorLoad.js +65 -59
- package/skill/useSkillEditorSubmit.js +108 -84
- package/skill/useSkillFileActions.js +70 -58
- package/skill-editor.d.ts +160 -8
- package/skill-editor.js +9 -8
- package/usage/map-usage-data-to-dashboard.js +66 -0
- package/usage/map-user-usage-to-model-limits.js +202 -0
- package/usage.d.ts +125 -0
- package/usage.js +3 -0
- package/usePageFileDrag/usePageFileDrag.js +3 -3
- package/utils.d.ts +26 -6
- package/utils.js +10 -10
|
@@ -2,29 +2,35 @@ import { getApiErrorStatus as e } from "../../api-error/api-error.js";
|
|
|
2
2
|
import { FileManagerNotificationReason as t } from "../dial-file-manager.types.js";
|
|
3
3
|
import { buildSharedItemVirtualPath as n, dialCorePathToRelative as r, findFolderByVirtualPath as i, normalizeVirtualPath as a } from "../dial-file-manager-path.util.js";
|
|
4
4
|
import { getParentFolderPath as ee, virtualPathToApiPath as o } from "../resolve-dial-file-api-path.js";
|
|
5
|
-
import { buildFromCache as te, fetchByTab as s, fetchForSearch as
|
|
6
|
-
import { useCallback as
|
|
7
|
-
import { ListFilesItemDtoNodeTypeEnum as
|
|
8
|
-
import { NotificationVariant as
|
|
9
|
-
import { DialFileManagerTabs as
|
|
5
|
+
import { buildFromCache as te, fetchByTab as s, fetchForSearch as ne, mapCorePermissions as re, mapSearchItem as c, mergeCreatedFolderIntoCache as ie } from "../dial-file-manager-mapping.util.js";
|
|
6
|
+
import { useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as p } from "react";
|
|
7
|
+
import { ListFilesItemDtoNodeTypeEnum as m } from "@epam/ai-dial-chat-api-client";
|
|
8
|
+
import { NotificationVariant as h } from "@epam/ai-dial-ui-kit";
|
|
9
|
+
import { DialFileManagerTabs as g, DialFileNodeType as ae } from "@epam/ai-dial-react-file-manager";
|
|
10
10
|
//#region src/files/useDialFileListing/useDialFileListing.ts
|
|
11
|
-
var
|
|
12
|
-
let [C, w] =
|
|
13
|
-
|
|
11
|
+
var _ = ({ filesApi: _, bucket: v, rootLabel: y, activeTab: b, onNotification: x, isActive: S = !0, sessionKey: oe }) => {
|
|
12
|
+
let [C, w] = p(""), [T, E] = p(() => /* @__PURE__ */ new Map()), D = f(T);
|
|
13
|
+
u(() => {
|
|
14
14
|
D.current = T;
|
|
15
15
|
}, [T]);
|
|
16
|
-
let [O, k] =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
let [O, k] = p(() => /* @__PURE__ */ new Map()), [se, A] = p(S), [ce, le] = p(S);
|
|
17
|
+
ce !== S && (le(S), A(S));
|
|
18
|
+
let [ue, j] = p(null), [M, N] = p(0), [P, F] = p(void 0), [de, I] = p(() => /* @__PURE__ */ new Set()), L = f(/* @__PURE__ */ new Map()), [fe, R] = p(!1), [pe, z] = p(null), B = f(null), V = f(null), H = f(/* @__PURE__ */ new Set()), U = f(/* @__PURE__ */ new Set()), [W, G] = p(() => /* @__PURE__ */ new Set()), [me, K] = p(() => /* @__PURE__ */ new Set()), [q, J] = p(() => /* @__PURE__ */ new Set()), Y = `${b}|${oe ?? ""}`, X = f(Y);
|
|
19
|
+
u(() => {
|
|
20
|
+
X.current !== Y && (X.current = Y, E(/* @__PURE__ */ new Map()), k(/* @__PURE__ */ new Map()), w(""), F(void 0), L.current = /* @__PURE__ */ new Map(), H.current = /* @__PURE__ */ new Set(), U.current = /* @__PURE__ */ new Set(), K(/* @__PURE__ */ new Set()), J(/* @__PURE__ */ new Set()), B.current != null && (clearTimeout(B.current), B.current = null), V.current?.(), V.current = null, z(null), R(!1), G(/* @__PURE__ */ new Set()), N((e) => e + 1));
|
|
21
|
+
}, [Y]), u(() => () => {
|
|
20
22
|
B.current != null && clearTimeout(B.current), V.current?.();
|
|
21
|
-
}, []),
|
|
23
|
+
}, []), u(() => {
|
|
24
|
+
if (!S) {
|
|
25
|
+
A(!1);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
22
28
|
let t = !1;
|
|
23
|
-
return A(!0), j(null), s(
|
|
29
|
+
return A(!0), j(null), s(_, b, v, C, L.current).then(({ items: e, permissions: i }) => {
|
|
24
30
|
t || (E((t) => {
|
|
25
31
|
let n = new Map(t);
|
|
26
32
|
return n.set(C, e), n;
|
|
27
|
-
}), k((e) => new Map(e).set(C, i)),
|
|
33
|
+
}), k((e) => new Map(e).set(C, i)), b === g.Shared && C === "" && (F(e.map((e) => n(r(e.path, e.bucket ?? ""), y, e.nodeType === m.Folder))), L.current = new Map(e.map((e) => [e.name, {
|
|
28
34
|
bucket: e.bucket ?? "",
|
|
29
35
|
dialCorePath: e.path
|
|
30
36
|
}]))));
|
|
@@ -42,53 +48,55 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
42
48
|
t = !0;
|
|
43
49
|
};
|
|
44
50
|
}, [
|
|
45
|
-
|
|
46
|
-
y,
|
|
51
|
+
b,
|
|
47
52
|
v,
|
|
53
|
+
_,
|
|
48
54
|
C,
|
|
55
|
+
S,
|
|
49
56
|
M,
|
|
50
|
-
|
|
51
|
-
]),
|
|
52
|
-
if (
|
|
57
|
+
y
|
|
58
|
+
]), u(() => {
|
|
59
|
+
if (!S || b !== g.MyFiles) {
|
|
53
60
|
I(/* @__PURE__ */ new Set());
|
|
54
61
|
return;
|
|
55
62
|
}
|
|
56
63
|
let e = !1;
|
|
57
|
-
return
|
|
58
|
-
e || I(new Set(t.items.map((e) => n(r(e.path,
|
|
64
|
+
return _.listSharedByMe(v).then((t) => {
|
|
65
|
+
e || I(new Set(t.items.map((e) => n(r(e.path, v), y, e.nodeType === m.Folder))));
|
|
59
66
|
}).catch(() => {
|
|
60
67
|
e || I(/* @__PURE__ */ new Set());
|
|
61
68
|
}), () => {
|
|
62
69
|
e = !0;
|
|
63
70
|
};
|
|
64
71
|
}, [
|
|
65
|
-
|
|
66
|
-
y,
|
|
72
|
+
b,
|
|
67
73
|
v,
|
|
74
|
+
_,
|
|
75
|
+
S,
|
|
68
76
|
M,
|
|
69
|
-
|
|
77
|
+
y
|
|
70
78
|
]);
|
|
71
|
-
let
|
|
72
|
-
id:
|
|
73
|
-
name:
|
|
74
|
-
path: `/${
|
|
79
|
+
let Z = d(() => [{
|
|
80
|
+
id: v,
|
|
81
|
+
name: y,
|
|
82
|
+
path: `/${y}`,
|
|
75
83
|
parentPath: "",
|
|
76
|
-
nodeType:
|
|
77
|
-
folderId:
|
|
78
|
-
permissions:
|
|
79
|
-
items: te(T, O, "", `/${
|
|
84
|
+
nodeType: ae.FOLDER,
|
|
85
|
+
folderId: v,
|
|
86
|
+
permissions: re(O.get("")),
|
|
87
|
+
items: te(T, O, "", `/${y}`, v)
|
|
80
88
|
}], [
|
|
81
89
|
T,
|
|
82
90
|
O,
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
]),
|
|
91
|
+
y,
|
|
92
|
+
v
|
|
93
|
+
]), he = l((e) => {
|
|
86
94
|
if (e == null) {
|
|
87
95
|
w("");
|
|
88
96
|
return;
|
|
89
97
|
}
|
|
90
|
-
let t = `/${
|
|
91
|
-
if (e === `/${
|
|
98
|
+
let t = `/${y}/`, n = `${y}/`;
|
|
99
|
+
if (e === `/${y}` || e === t || e === y || e === n) {
|
|
92
100
|
w("");
|
|
93
101
|
return;
|
|
94
102
|
}
|
|
@@ -100,11 +108,11 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
100
108
|
r = t.startsWith(n) ? t.slice(n.length) : t;
|
|
101
109
|
}
|
|
102
110
|
w(r && !r.endsWith("/") ? `${r}/` : r);
|
|
103
|
-
}, [
|
|
111
|
+
}, [y]), Q = l(() => {
|
|
104
112
|
N((e) => e + 1);
|
|
105
|
-
}, []),
|
|
113
|
+
}, []), ge = Q, _e = l((e) => {
|
|
106
114
|
if (e.length === 0) return;
|
|
107
|
-
let n = new Set([...W].map((e) => o(e,
|
|
115
|
+
let n = new Set([...W].map((e) => o(e, y))), r = (e) => e === C || C.startsWith(e) || n.has(e), i = e.filter((e) => !r(e)), a = e.filter((e) => r(e) && e !== C);
|
|
108
116
|
i.length > 0 && (E((e) => {
|
|
109
117
|
let t = new Map(e);
|
|
110
118
|
return i.forEach((e) => t.delete(e)), t;
|
|
@@ -114,28 +122,29 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
114
122
|
})), a.forEach((e) => {
|
|
115
123
|
(async () => {
|
|
116
124
|
try {
|
|
117
|
-
let { items: t, permissions: n } = await s(
|
|
125
|
+
let { items: t, permissions: n } = await s(_, b, v, e, L.current);
|
|
118
126
|
E((n) => new Map(n).set(e, t)), n != null && k((t) => new Map(t).set(e, n));
|
|
119
127
|
} catch {
|
|
120
|
-
|
|
121
|
-
variant:
|
|
128
|
+
x?.({
|
|
129
|
+
variant: h.Error,
|
|
122
130
|
reason: t.FolderLoadFailed
|
|
123
131
|
});
|
|
124
132
|
}
|
|
125
133
|
})();
|
|
126
134
|
});
|
|
127
135
|
}, [
|
|
128
|
-
|
|
129
|
-
y,
|
|
136
|
+
b,
|
|
130
137
|
v,
|
|
138
|
+
_,
|
|
131
139
|
C,
|
|
132
140
|
W,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
]),
|
|
136
|
-
E((r) =>
|
|
137
|
-
}, []),
|
|
138
|
-
|
|
141
|
+
y,
|
|
142
|
+
x
|
|
143
|
+
]), ve = l((e, t, n) => {
|
|
144
|
+
E((r) => ie(r, e, t, n));
|
|
145
|
+
}, []), ye = l((e) => {
|
|
146
|
+
if (!S) return;
|
|
147
|
+
let n = e == null ? "" : o(e, y), r = e ?? `/${y}`;
|
|
139
148
|
if (J((e) => {
|
|
140
149
|
if (e.has(r)) return e;
|
|
141
150
|
let t = new Set(e);
|
|
@@ -153,11 +162,11 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
153
162
|
return t.add(r), t;
|
|
154
163
|
}), (async () => {
|
|
155
164
|
try {
|
|
156
|
-
let { items: e, permissions: t } = await s(
|
|
165
|
+
let { items: e, permissions: t } = await s(_, b, v, n, L.current);
|
|
157
166
|
E((t) => new Map(t).set(n, e)), t != null && k((e) => new Map(e).set(n, t)), U.current.delete(n);
|
|
158
167
|
} catch {
|
|
159
|
-
|
|
160
|
-
variant:
|
|
168
|
+
x?.({
|
|
169
|
+
variant: h.Error,
|
|
161
170
|
reason: t.FolderLoadFailed
|
|
162
171
|
});
|
|
163
172
|
} finally {
|
|
@@ -169,15 +178,16 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
169
178
|
})();
|
|
170
179
|
}
|
|
171
180
|
}, [
|
|
172
|
-
|
|
173
|
-
y,
|
|
181
|
+
b,
|
|
174
182
|
v,
|
|
183
|
+
_,
|
|
175
184
|
S,
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
x,
|
|
186
|
+
y
|
|
187
|
+
]), be = d(() => {
|
|
178
188
|
let e = /* @__PURE__ */ new Set(), t = new Set([...W, ...q]);
|
|
179
189
|
for (let n of t) {
|
|
180
|
-
let t = o(n,
|
|
190
|
+
let t = o(n, y);
|
|
181
191
|
T.has(t) && e.add(n);
|
|
182
192
|
}
|
|
183
193
|
return e;
|
|
@@ -185,22 +195,22 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
185
195
|
W,
|
|
186
196
|
q,
|
|
187
197
|
T,
|
|
188
|
-
|
|
189
|
-
]),
|
|
190
|
-
W.forEach((t) => {
|
|
191
|
-
e.has(t) || U.current.delete(o(t,
|
|
198
|
+
y
|
|
199
|
+
]), xe = l((e) => {
|
|
200
|
+
S && (W.forEach((t) => {
|
|
201
|
+
e.has(t) || U.current.delete(o(t, y));
|
|
192
202
|
}), G(e), [...e].filter((e) => {
|
|
193
|
-
let t = o(e,
|
|
203
|
+
let t = o(e, y);
|
|
194
204
|
return !D.current.has(t) && !H.current.has(t) && !U.current.has(t);
|
|
195
205
|
}).forEach((e) => {
|
|
196
|
-
let n = o(e,
|
|
206
|
+
let n = o(e, y);
|
|
197
207
|
H.current.add(n), (async () => {
|
|
198
208
|
try {
|
|
199
|
-
let { items: e, permissions: t } = await s(
|
|
209
|
+
let { items: e, permissions: t } = await s(_, b, v, n, L.current);
|
|
200
210
|
E((t) => new Map(t).set(n, e)), t != null && k((e) => new Map(e).set(n, t));
|
|
201
211
|
} catch {
|
|
202
|
-
U.current.add(n),
|
|
203
|
-
variant:
|
|
212
|
+
U.current.add(n), x?.({
|
|
213
|
+
variant: h.Error,
|
|
204
214
|
reason: t.FolderLoadFailed
|
|
205
215
|
});
|
|
206
216
|
} finally {
|
|
@@ -210,86 +220,88 @@ var v = ({ filesApi: v, bucket: y, rootLabel: b, activeTab: x, onNotification: S
|
|
|
210
220
|
});
|
|
211
221
|
}
|
|
212
222
|
})();
|
|
213
|
-
});
|
|
223
|
+
}));
|
|
214
224
|
}, [
|
|
215
|
-
|
|
216
|
-
y,
|
|
225
|
+
b,
|
|
217
226
|
v,
|
|
227
|
+
_,
|
|
218
228
|
W,
|
|
219
229
|
S,
|
|
220
|
-
|
|
221
|
-
|
|
230
|
+
x,
|
|
231
|
+
y
|
|
232
|
+
]), Se = l(() => {
|
|
222
233
|
B.current != null && (clearTimeout(B.current), B.current = null), V.current?.(), V.current = null, z(null), R(!1);
|
|
223
|
-
}, []),
|
|
224
|
-
if (
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
B.current = setTimeout(() => {
|
|
229
|
-
B.current = null;
|
|
230
|
-
let e = t.toLowerCase();
|
|
231
|
-
if (x === _.Shared && C === "") {
|
|
232
|
-
V.current?.(), V.current = null, R(!0), z((T.get("") ?? []).filter((t) => t.name.toLowerCase().includes(e)).map((e) => l(e, e.bucket ?? y, b))), R(!1);
|
|
234
|
+
}, []), Ce = l((e, t) => {
|
|
235
|
+
if (S) {
|
|
236
|
+
if (B.current != null && (clearTimeout(B.current), B.current = null), V.current?.(), V.current = null, !t.trim()) {
|
|
237
|
+
z(null), R(!1);
|
|
233
238
|
return;
|
|
234
239
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
try {
|
|
240
|
-
let { items: t } = await c(v, x, y, C, L.current);
|
|
241
|
-
if (n) return;
|
|
242
|
-
z(t.filter((t) => t.name.toLowerCase().includes(e)).map((e) => l(e, e.bucket ?? y, b)));
|
|
243
|
-
} catch {
|
|
244
|
-
n || z([]);
|
|
245
|
-
} finally {
|
|
246
|
-
n || R(!1);
|
|
240
|
+
B.current = setTimeout(() => {
|
|
241
|
+
if (B.current = null, b === g.Shared && C === "") {
|
|
242
|
+
V.current?.(), V.current = null, R(!0), z((T.get("") ?? []).map((e) => c(e, e.bucket ?? v, y))), R(!1);
|
|
243
|
+
return;
|
|
247
244
|
}
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
let e = !1;
|
|
246
|
+
V.current = () => {
|
|
247
|
+
e = !0;
|
|
248
|
+
}, R(!0), (async () => {
|
|
249
|
+
try {
|
|
250
|
+
let { items: t } = await ne(_, b, v, C, L.current);
|
|
251
|
+
if (e) return;
|
|
252
|
+
z(t.map((e) => c(e, e.bucket ?? v, y)));
|
|
253
|
+
} catch {
|
|
254
|
+
e || z([]);
|
|
255
|
+
} finally {
|
|
256
|
+
e || R(!1);
|
|
257
|
+
}
|
|
258
|
+
})();
|
|
259
|
+
}, 300);
|
|
260
|
+
}
|
|
250
261
|
}, [
|
|
251
|
-
|
|
252
|
-
y,
|
|
253
|
-
T,
|
|
262
|
+
b,
|
|
254
263
|
v,
|
|
264
|
+
T,
|
|
265
|
+
_,
|
|
255
266
|
C,
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
267
|
+
S,
|
|
268
|
+
y
|
|
269
|
+
]), $ = C ? `/${y}/${C}` : `/${y}`, we = d(() => {
|
|
270
|
+
let e = Z[0];
|
|
271
|
+
if (e) return a($) === a(`/${y}`) ? e : i(e.items ?? [], $);
|
|
260
272
|
}, [
|
|
261
|
-
|
|
273
|
+
Z,
|
|
262
274
|
$,
|
|
263
|
-
|
|
275
|
+
y
|
|
264
276
|
]);
|
|
265
277
|
return {
|
|
266
|
-
items:
|
|
267
|
-
isLoading:
|
|
268
|
-
error:
|
|
278
|
+
items: Z,
|
|
279
|
+
isLoading: se,
|
|
280
|
+
error: ue,
|
|
269
281
|
path: $,
|
|
270
282
|
folderPath: C,
|
|
271
|
-
onPathChange:
|
|
272
|
-
retry:
|
|
273
|
-
onSearchFiles:
|
|
274
|
-
isSearching:
|
|
275
|
-
searchResults:
|
|
276
|
-
clearSearchResults:
|
|
283
|
+
onPathChange: he,
|
|
284
|
+
retry: Q,
|
|
285
|
+
onSearchFiles: Ce,
|
|
286
|
+
isSearching: fe,
|
|
287
|
+
searchResults: pe,
|
|
288
|
+
clearSearchResults: Se,
|
|
277
289
|
expandedPaths: W,
|
|
278
|
-
loadedPaths:
|
|
279
|
-
onExpandedPathsChange:
|
|
280
|
-
onFolderPopupPathChange:
|
|
281
|
-
folderPopupLoadingPaths:
|
|
282
|
-
sharedWithMeIds:
|
|
283
|
-
sharedByMePaths:
|
|
284
|
-
currentFolder:
|
|
290
|
+
loadedPaths: be,
|
|
291
|
+
onExpandedPathsChange: xe,
|
|
292
|
+
onFolderPopupPathChange: ye,
|
|
293
|
+
folderPopupLoadingPaths: me,
|
|
294
|
+
sharedWithMeIds: d(() => b === g.Shared ? P : void 0, [b, P]),
|
|
295
|
+
sharedByMePaths: de,
|
|
296
|
+
currentFolder: we,
|
|
285
297
|
cache: T,
|
|
286
298
|
listingPermissionsCache: O,
|
|
287
299
|
sharedRootMetaRef: L,
|
|
288
300
|
setFolderPath: w,
|
|
289
|
-
invalidateFolders:
|
|
290
|
-
mergeCreatedFolder:
|
|
291
|
-
bumpRetry:
|
|
301
|
+
invalidateFolders: _e,
|
|
302
|
+
mergeCreatedFolder: ve,
|
|
303
|
+
bumpRetry: ge
|
|
292
304
|
};
|
|
293
305
|
};
|
|
294
306
|
//#endregion
|
|
295
|
-
export {
|
|
307
|
+
export { _ as useDialFileListing };
|