@epam/ai-dial-chat-hooks 1.3.5 → 1.4.0-dev.101

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 (105) hide show
  1. package/attachment/useAttachmentAction/useAttachmentAction.d.ts +1 -1
  2. package/attachment/useAttachmentAction/useAttachmentAction.d.ts.map +1 -1
  3. package/attachment/useAttachmentAction/useAttachmentAction.js +35 -44
  4. package/catalog/create-publish-api.d.ts +9 -1
  5. package/catalog/create-publish-api.d.ts.map +1 -1
  6. package/catalog/create-publish-api.js +9 -0
  7. package/catalog/publish.d.ts +2 -0
  8. package/catalog/publish.d.ts.map +1 -1
  9. package/catalog/publish.js +4 -4
  10. package/catalog/resource-save-adapter.d.ts +7 -2
  11. package/catalog/resource-save-adapter.d.ts.map +1 -1
  12. package/catalog/resource-save-adapters.d.ts +32 -7
  13. package/catalog/resource-save-adapters.d.ts.map +1 -1
  14. package/catalog/resource-save-adapters.js +47 -41
  15. package/catalog/resource-save.d.ts +17 -9
  16. package/catalog/resource-save.d.ts.map +1 -1
  17. package/catalog/resource-save.js +34 -25
  18. package/catalog/save-destination-root.d.ts +12 -0
  19. package/catalog/save-destination-root.d.ts.map +1 -0
  20. package/catalog/save-destination-root.js +6 -0
  21. package/catalog/usePublishFolders/usePublishFolders.d.ts +8 -2
  22. package/catalog/usePublishFolders/usePublishFolders.d.ts.map +1 -1
  23. package/catalog/usePublishFolders/usePublishFolders.js +29 -29
  24. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts +7 -3
  25. package/catalog/useResourceSavePanel/useResourceSavePanel.d.ts.map +1 -1
  26. package/catalog/useResourceSavePanel/useResourceSavePanel.js +107 -97
  27. package/catalog/useVersionHistory/useVersionHistory.d.ts +38 -0
  28. package/catalog/useVersionHistory/useVersionHistory.d.ts.map +1 -0
  29. package/catalog/useVersionHistory/useVersionHistory.js +49 -0
  30. package/catalog/useVersionHistory/useVersionHistorySection.d.ts +30 -0
  31. package/catalog/useVersionHistory/useVersionHistorySection.d.ts.map +1 -0
  32. package/catalog/useVersionHistory/useVersionHistorySection.js +31 -0
  33. package/catalog/version-history.d.ts +42 -0
  34. package/catalog/version-history.d.ts.map +1 -0
  35. package/catalog/version-history.js +27 -0
  36. package/catalog.js +37 -33
  37. package/conversation/conversation-transfer/zip-export.d.ts +1 -1
  38. package/conversation/conversation-transfer/zip-export.d.ts.map +1 -1
  39. package/conversation/conversation-transfer/zip-export.js +7 -8
  40. package/conversation/conversation-transfer/zip-import.d.ts.map +1 -1
  41. package/conversation/conversation-transfer/zip-import.js +8 -9
  42. package/conversation/useConversationExport/useConversationExport.d.ts.map +1 -1
  43. package/conversation/useConversationExport/useConversationExport.js +3 -1
  44. package/conversation/useConversationStream/generation-resume.d.ts.map +1 -1
  45. package/conversation/useConversationStream/generation-resume.js +119 -96
  46. package/entry-points/catalog.d.ts +3 -0
  47. package/entry-points/catalog.d.ts.map +1 -1
  48. package/entry-points/scheduled-tasks.d.ts +1 -0
  49. package/entry-points/scheduled-tasks.d.ts.map +1 -1
  50. package/entry-points/utils.d.ts +3 -0
  51. package/entry-points/utils.d.ts.map +1 -1
  52. package/file-manager.js +33 -33
  53. package/files/annotation.d.ts +3 -3
  54. package/files/annotation.d.ts.map +1 -1
  55. package/files/annotation.js +12 -11
  56. package/files/attachment-canvas.d.ts +1 -1
  57. package/files/attachment-canvas.d.ts.map +1 -1
  58. package/files/attachment-canvas.js +135 -135
  59. package/files/dial-file.d.ts +18 -0
  60. package/files/dial-file.d.ts.map +1 -1
  61. package/files/dial-file.js +30 -5
  62. package/index.d.ts +7 -0
  63. package/index.d.ts.map +1 -1
  64. package/index.js +259 -252
  65. package/org-units/models.d.ts +3 -1
  66. package/org-units/models.d.ts.map +1 -1
  67. package/org-units/org-unit-guards.d.ts +64 -0
  68. package/org-units/org-unit-guards.d.ts.map +1 -0
  69. package/org-units/org-unit-guards.js +28 -0
  70. package/org-units/useFolderGuards/useFolderGuards.d.ts +31 -0
  71. package/org-units/useFolderGuards/useFolderGuards.d.ts.map +1 -0
  72. package/org-units/useFolderGuards/useFolderGuards.js +50 -0
  73. package/org-units/useOrgUnits/useOrgUnits.d.ts +18 -3
  74. package/org-units/useOrgUnits/useOrgUnits.d.ts.map +1 -1
  75. package/org-units/useOrgUnits/useOrgUnits.js +43 -23
  76. package/package.json +19 -19
  77. package/scheduled-task/scheduled-task-description.d.ts +19 -13
  78. package/scheduled-task/scheduled-task-description.d.ts.map +1 -1
  79. package/scheduled-task/scheduled-task-description.js +39 -55
  80. package/scheduled-task/scheduled-task-display.d.ts +19 -5
  81. package/scheduled-task/scheduled-task-display.d.ts.map +1 -1
  82. package/scheduled-task/scheduled-task-display.js +43 -38
  83. package/scheduled-task/scheduled-task-next-occurrence.d.ts +7 -5
  84. package/scheduled-task/scheduled-task-next-occurrence.d.ts.map +1 -1
  85. package/scheduled-task/scheduled-task-next-occurrence.js +15 -15
  86. package/scheduled-task/scheduled-task-trigger.d.ts +6 -4
  87. package/scheduled-task/scheduled-task-trigger.d.ts.map +1 -1
  88. package/scheduled-task/scheduled-task-trigger.js +92 -115
  89. package/scheduled-tasks.js +14 -13
  90. package/shared/timezones.d.ts +30 -0
  91. package/shared/timezones.d.ts.map +1 -0
  92. package/shared/timezones.js +102 -0
  93. package/skill/skill-archive.d.ts.map +1 -1
  94. package/skill/skill-archive.js +6 -7
  95. package/skill/skill.d.ts +2 -2
  96. package/skill/skill.d.ts.map +1 -1
  97. package/skill/skill.js +33 -34
  98. package/skill/useSkillEditorLoad.js +1 -1
  99. package/skill/useSkillEditorSubmit.d.ts +4 -1
  100. package/skill/useSkillEditorSubmit.d.ts.map +1 -1
  101. package/skill/useSkillEditorSubmit.js +125 -121
  102. package/utils.js +19 -16
  103. package/shared/cron-day-of-month.d.ts +0 -21
  104. package/shared/cron-day-of-month.d.ts.map +0 -1
  105. package/shared/cron-day-of-month.js +0 -13
@@ -13,165 +13,188 @@ var u = (e) => {
13
13
  if (d(e) !== -1 || f(e) !== -1) return !0;
14
14
  let t = e.messages[e.messages.length - 1];
15
15
  return !!t && t.role === l.Assistant && !u(t) && t.streamErrorMessage == null && !t.wasStoppedByUser;
16
- }, m = 3e5, h = "awaiting-resume", g = [
16
+ }, m = 3e5, h = 1e3, g = "awaiting-resume", _ = [
17
17
  1e3,
18
18
  2e3,
19
19
  4e3,
20
20
  8e3,
21
21
  16e3
22
- ], _ = (e) => new Promise((t) => {
22
+ ], v = (e) => new Promise((t) => {
23
23
  let n = typeof window < "u", r = () => {
24
24
  clearTimeout(i), n && window.removeEventListener("online", r), t();
25
25
  }, i = setTimeout(r, e);
26
26
  n && window.addEventListener("online", r);
27
- }), v = async (e, t, n) => {
28
- for (let r = 0; r <= g.length; r++) {
27
+ }), y = async (e, t, n) => {
28
+ for (let r = 0; r <= _.length; r++) {
29
29
  if (t()) return null;
30
30
  try {
31
31
  let t = await e();
32
32
  if (!n?.(t)) return t;
33
33
  } catch {}
34
- if (r === g.length) return null;
35
- await _(g[r]);
34
+ if (r === _.length) return null;
35
+ await v(_[r]);
36
36
  }
37
37
  return null;
38
- }, y = ({ transport: c, setConversation: l, conversationRef: g, resumingPathsRef: _, bufferedGenerationsRef: v, addStreamingPath: y, removeStreamingPath: b, isPathDisplayed: x, generationPersistenceErrorMessage: S = n, generationInterruptedMessage: C = t, frameScheduler: w, stoppedGenerationIdsRef: T, rememberResumedGenerationId: E, forgetResumedGenerationId: D, onReloadError: O, onReloadSuccess: k }) => (t, n, A = {}) => {
38
+ }, b = ({ transport: c, setConversation: l, conversationRef: _, resumingPathsRef: v, bufferedGenerationsRef: y, addStreamingPath: b, removeStreamingPath: x, isPathDisplayed: S, generationPersistenceErrorMessage: C = n, generationInterruptedMessage: w = t, frameScheduler: T, stoppedGenerationIdsRef: E, rememberResumedGenerationId: D, forgetResumedGenerationId: O, onReloadError: k, onReloadSuccess: A }) => (t, n, j = {}) => {
39
39
  if (!p(n)) {
40
- A.onSettled?.();
40
+ j.onSettled?.();
41
41
  return;
42
42
  }
43
- let j = a(t);
44
- if (!A.skipDedupe && _.current.has(j)) return;
45
- _.current.add(j), y(j);
46
- let M = d(n), N = M !== -1, P = N ? -1 : f(n), F = n.messages.length - 1;
47
- N ? F = M : P !== -1 && (F = P);
48
- let I = {
49
- generationId: h,
50
- messageIndex: F,
51
- message: A.seedMessage ?? n.messages[F]
43
+ let M = a(t);
44
+ if (!j.skipDedupe && v.current.has(M)) return;
45
+ v.current.add(M), b(M);
46
+ let N = d(n), P = N !== -1, F = P ? -1 : f(n), I = n.messages.length - 1;
47
+ P ? I = N : F !== -1 && (I = F);
48
+ let L = {
49
+ generationId: g,
50
+ messageIndex: I,
51
+ message: j.seedMessage ?? n.messages[I]
52
52
  };
53
- v.current.set(j, I);
54
- let L = () => v.current.get(j) === I, R = N ? n.messages[F].backgroundGeneration?.generationId : void 0, z, B = () => {
55
- let e = R ?? z;
56
- return e != null && (T?.current.has(e) ?? !1);
57
- }, V = (e) => {
58
- A.trackAttachGenerationId && !N && e != null && L() && (z = e, E?.(j, e));
59
- }, H = () => {
60
- if (z == null) return;
61
- let e = z;
62
- z = void 0, T?.current.delete(e), D?.(j, e);
53
+ y.current.set(M, L);
54
+ let R = () => y.current.get(M) === L, z = P ? n.messages[I].backgroundGeneration?.generationId : void 0, B, V = () => {
55
+ let e = z ?? B;
56
+ return e != null && (E?.current.has(e) ?? !1);
57
+ }, H = (e) => {
58
+ j.trackAttachGenerationId && !P && e != null && R() && (B = e, D?.(M, e));
59
+ }, U = () => {
60
+ if (B == null) return;
61
+ let e = B;
62
+ B = void 0, E?.current.delete(e), O?.(M, e);
63
63
  };
64
- P !== -1 && V(n.messages[P].foregroundGeneration?.generationId);
65
- let U = (e) => !!A.shouldMarkOrphanedAsInterrupted && !N && !!e && e.messages.length - 1 === F && d(e) === -1 && f(e) === -1 && p(e) && !u(I.message), W = () => {
66
- I.message = {
67
- ...I.message,
68
- streamErrorMessage: C
64
+ F !== -1 && H(n.messages[F].foregroundGeneration?.generationId);
65
+ let W = (e) => !!j.shouldMarkOrphanedAsInterrupted && !P && !!e && e.messages.length - 1 === I && d(e) === -1 && f(e) === -1 && p(e) && !u(L.message), G = () => {
66
+ L.message = {
67
+ ...L.message,
68
+ streamErrorMessage: w
69
69
  };
70
- }, G = () => {
71
- L() && (W(), _.current.delete(j), b(j), H(), x(j) && l((e) => {
72
- if (!e || !L() || !x(j)) return e;
73
- let t = s(e, I);
74
- return g.current = t, t;
70
+ }, K = () => {
71
+ R() && (G(), v.current.delete(M), x(M), U(), S(M) && l((e) => {
72
+ if (!e || !R() || !S(M)) return e;
73
+ let t = s(e, L);
74
+ return _.current = t, t;
75
75
  }));
76
- }, K = (e, t = !1) => {
77
- if (w?.flush(j), R != null && T?.current.delete(R), H(), !L()) return;
78
- _.current.delete(j), b(j);
79
- let n = !N && e && e.messages.length - 1 === F && p(e) && u(I.message);
80
- if (t || n) I.message = {
81
- ...I.message,
82
- streamErrorMessage: S
83
- }, x(j) && l((e) => {
84
- if (!e || !L() || !x(j)) return e;
85
- let t = s(e, I);
86
- return g.current = t, t;
76
+ }, q = (e, t = !1) => {
77
+ if (T?.flush(M), z != null && E?.current.delete(z), U(), !R()) return;
78
+ v.current.delete(M), x(M);
79
+ let n = !P && e && e.messages.length - 1 === I && p(e) && u(L.message);
80
+ if (t || n) L.message = {
81
+ ...L.message,
82
+ streamErrorMessage: C
83
+ }, S(M) && l((e) => {
84
+ if (!e || !R() || !S(M)) return e;
85
+ let t = s(e, L);
86
+ return _.current = t, t;
87
87
  });
88
- else if (v.current.delete(j), e && x(j)) {
89
- let t = U(e);
90
- t && W();
91
- let n = t ? s(e, I) : e;
92
- l(n), g.current = n;
88
+ else if (y.current.delete(M), e && S(M)) {
89
+ let t = W(e);
90
+ t && G();
91
+ let n = t ? s(e, L) : e;
92
+ l(n), _.current = n;
93
93
  }
94
- }, q = async () => {
95
- if (L()) try {
94
+ }, J = async () => {
95
+ if (R()) try {
96
96
  let n = await c.getConversation(e(t));
97
- if (!L()) return;
98
- k?.(j), K(n);
97
+ if (!R()) return;
98
+ A?.(M), q(n);
99
99
  } catch {
100
- if (!L()) return;
101
- w?.flush(j), _.current.delete(j), b(j), R != null && T?.current.delete(R), H(), O?.(j, q, L);
100
+ if (!R()) return;
101
+ T?.flush(M), v.current.delete(M), x(M), z != null && E?.current.delete(z), U(), k?.(M, J, R);
102
102
  }
103
- }, J = (e) => {
104
- w?.cancel(j), L() && (I.message = e, x(j) && l((e) => {
105
- if (!e || !L() || !x(j)) return e;
106
- let t = s(e, I);
107
- return g.current = t, t;
103
+ }, Y = (e) => {
104
+ T?.cancel(M), R() && (L.message = e, S(M) && l((e) => {
105
+ if (!e || !R() || !S(M)) return e;
106
+ let t = s(e, L);
107
+ return _.current = t, t;
108
108
  }));
109
- }, Y = () => l((e) => {
110
- if (!e || !L() || !x(j)) return e;
111
- let t = s(e, I);
112
- return g.current = t, t;
113
- }), X = (e) => {
114
- if (!L() || B()) return;
115
- let t = o([I.message], 0, e);
116
- t && (I.message = t[0]), x(j) && (w ? w.schedule(j, Y) : Y());
117
- }, Z = async () => {
118
- let n = new AbortController(), r;
109
+ }, X = () => l((e) => {
110
+ if (!e || !R() || !S(M)) return e;
111
+ let t = s(e, L);
112
+ return _.current = t, t;
113
+ }), Z = (e) => {
114
+ if (!R() || V()) return;
115
+ let t = o([L.message], 0, e);
116
+ t && (L.message = t[0]), S(M) && (T ? T.schedule(M, X) : X());
117
+ }, Q = async () => {
118
+ let r = new AbortController(), a;
119
119
  try {
120
- r = await c.watchConversation(j, n.signal);
120
+ a = await c.watchConversation(M, r.signal);
121
121
  } catch {
122
- await q();
122
+ await J();
123
123
  return;
124
124
  }
125
+ let o;
125
126
  try {
126
- let i = await c.getConversation(e(t));
127
- if (!p(i)) {
128
- n.abort(), r.cancel().catch(() => void 0), K(i);
127
+ let n = await c.getConversation(e(t));
128
+ if (!p(n)) {
129
+ r.abort(), a.cancel().catch(() => void 0), q(n);
129
130
  return;
130
131
  }
131
- U(i) && G();
132
+ W(n) && K(), o = n;
132
133
  } catch {}
133
- let a = !1, o = window.setTimeout(() => {
134
- n.abort();
135
- }, m);
134
+ let s = !1, l = window.setTimeout(() => {
135
+ r.abort();
136
+ }, m), u, d = 0, g = (n, i = !1) => {
137
+ i || window.clearTimeout(u);
138
+ let o = f(n);
139
+ if (o === -1) return;
140
+ let l = n.messages[o].foregroundGeneration?.expiresAt;
141
+ if (l == null || i && l <= d) return;
142
+ d = l, window.clearTimeout(u);
143
+ let m = Math.max(l - Date.now() + h, h);
144
+ u = window.setTimeout(async () => {
145
+ if (!s && R()) try {
146
+ let n = await c.getConversation(e(t));
147
+ if (s || !R()) return;
148
+ if (!p(n)) {
149
+ s = !0, r.abort(), a.cancel().catch(() => void 0), q(n);
150
+ return;
151
+ }
152
+ W(n) && K(), g(n, !0);
153
+ } catch {}
154
+ }, m);
155
+ };
156
+ o ? g(o) : F !== -1 && g(n);
136
157
  try {
137
- await i(r, async (n) => {
158
+ await i(a, async (n) => {
138
159
  if (n?.action !== "UPDATE") return !1;
139
160
  try {
140
161
  let n = await c.getConversation(e(t));
141
- if (!p(n)) return K(n), a = !0, !0;
162
+ if (s) return !0;
163
+ if (!p(n)) return q(n), s = !0, !0;
164
+ g(n);
142
165
  } catch {}
143
166
  return !1;
144
167
  });
145
168
  } finally {
146
- clearTimeout(o);
169
+ window.clearTimeout(l), window.clearTimeout(u);
147
170
  }
148
- a || await q();
149
- }, Q = async () => {
171
+ s || await J();
172
+ }, $ = async () => {
150
173
  let e = new AbortController(), t;
151
174
  try {
152
- t = await c.attachToGeneration(j, e.signal);
175
+ t = await c.attachToGeneration(M, e.signal);
153
176
  } catch {
154
177
  return !1;
155
178
  }
156
179
  let n = !1, a = !1;
157
180
  return await i(t, (e) => {
158
- if (!L()) return !0;
181
+ if (!R()) return !0;
159
182
  switch (e.type) {
160
- case "snapshot": return V(e.generationId), J(e.message), !1;
161
- case "chunk": return X(e.chunk), !1;
183
+ case "snapshot": return H(e.generationId), Y(e.message), !1;
184
+ case "chunk": return Z(e.chunk), !1;
162
185
  case "done":
163
186
  case "error":
164
187
  case "stopped": return a = e.type === "error" && e.errorType === r.type, n = !0, !0;
165
188
  }
166
- }), n ? (a ? K(void 0, !0) : await q(), !0) : (H(), !L());
189
+ }), n ? (a ? q(void 0, !0) : await J(), !0) : (U(), !R());
167
190
  };
168
191
  (async () => {
169
192
  try {
170
- await Q() || await Z();
193
+ await $() || await Q();
171
194
  } finally {
172
- A.onSettled?.();
195
+ j.onSettled?.();
173
196
  }
174
197
  })();
175
198
  };
176
199
  //#endregion
177
- export { g as RECOVERY_REFETCH_DELAYS_MS, y as createResumeIfAwaitingGeneration, v as fetchConversationForRecovery, f as findLiveForegroundMessageIndex, d as findPendingBackgroundMessageIndex, u as hasGeneratedPayload, p as isAwaitingGenerationResume };
200
+ export { _ as RECOVERY_REFETCH_DELAYS_MS, b as createResumeIfAwaitingGeneration, y as fetchConversationForRecovery, f as findLiveForegroundMessageIndex, d as findPendingBackgroundMessageIndex, u as hasGeneratedPayload, p as isAwaitingGenerationResume };
@@ -39,6 +39,9 @@ export * from '../catalog/resource-name-conflict';
39
39
  export * from '../catalog/resource-save';
40
40
  export * from '../catalog/resource-save-adapters';
41
41
  export * from '../catalog/useResourceSavePanel/useResourceSavePanel';
42
+ export * from '../catalog/useVersionHistory/useVersionHistory';
43
+ export * from '../catalog/useVersionHistory/useVersionHistorySection';
44
+ export * from '../catalog/version-history';
42
45
  export * from '../skill/useSkillFilePreview';
43
46
  export * from '../skill/skill-types';
44
47
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/entry-points/catalog.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oCAAoC,CAAC;AACnD,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1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,CAAC;AAC1D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,0CAA0C,CAAC;AACzD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,4DAA4D,CAAC;AAC3E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8DAA8D,CAAC;AAC7E,cAAc,sDAAsD,CAAC;AACrE,cAAc,kCAAkC,CAAC;AACjD,cAAc,sEAAsE,CAAC;AACrF,cAAc,oCAAoC,CAAC;AACnD,cAAc,gEAAgE,CAAC;AAC/E,cAAc,4EAA4E,CAAC;AAC3F,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8DAA8D,CAAC;AAC7E,cAAc,8DAA8D,CAAC;AAC7E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,kDAAkD,CAAC;AACjE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC;AAClD,cAAc,sDAAsD,CAAC;AACrE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,uDAAuD,CAAC;AACtE,cAAc,4BAA4B,CAAC;AAC3C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC"}
@@ -1,3 +1,4 @@
1
+ export * from '../shared/timezones';
1
2
  export * from '../scheduled-task/scheduled-task-mapping';
2
3
  export * from '../scheduled-task/scheduled-task-description';
3
4
  export * from '../scheduled-task/scheduled-task-display';
@@ -1 +1 @@
1
- {"version":3,"file":"scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/entry-points/scheduled-tasks.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AACjE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uFAAuF,CAAC;AAEtG,cAAc,yCAAyC,CAAC;AACxD,cAAc,iDAAiD,CAAC"}
1
+ {"version":3,"file":"scheduled-tasks.d.ts","sourceRoot":"","sources":["../../src/entry-points/scheduled-tasks.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,0CAA0C,CAAC;AACzD,cAAc,kDAAkD,CAAC;AACjE,cAAc,2DAA2D,CAAC;AAC1E,cAAc,uCAAuC,CAAC;AACtD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,uFAAuF,CAAC;AAEtG,cAAc,yCAAyC,CAAC;AACxD,cAAc,iDAAiD,CAAC"}
@@ -23,4 +23,7 @@ export * from '../shared/url-cleanup';
23
23
  export * from '../org-units/types';
24
24
  export * from '../org-units/models';
25
25
  export * from '../org-units/useOrgUnits/useOrgUnits';
26
+ export * from '../org-units/useFolderGuards/useFolderGuards';
27
+ export * from '../org-units/org-unit-guards';
28
+ export * from '../catalog/save-destination-root';
26
29
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/entry-points/utils.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yCAAyC,CAAC;AACxD,cAAc,iDAAiD,CAAC;AAChE,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/entry-points/utils.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yCAAyC,CAAC;AACxD,cAAc,iDAAiD,CAAC;AAChE,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,iDAAiD,CAAC;AAChE,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC"}
package/file-manager.js CHANGED
@@ -1,33 +1,33 @@
1
- import { FileSelectionKind as e, getFileSelectionKind as t, isDialFileId as n, isDialFolderId as r, resolveDialFileBucketAndPath as i, resolveDialFolderPath as a, resolveRelativeDialFilePath as o } from "./files/dial-file.js";
2
- import { isDialFileAcceptType as s, mimeTypesToDialFileAcceptTypes as c, mimeTypesToFileAccept as l } from "./files/attachment-types.js";
3
- import { sanitizeFileName as u, splitFileNameExtension as d, trimFileNameToByteLimit as f } from "./files/file-name.js";
4
- import { DialFilesApiUploadMode as p } from "./files/dial-files-api.js";
5
- import { FileManagerNotificationReason as m, FileNameValidationErrorReason as h, FileOperationKind as g } from "./files/dial-file-manager.types.js";
6
- import { COLUMNS_MY_FILES as _, COLUMNS_ORGANIZATION as v, COLUMNS_SHARED as y, CORE_PERMISSION_MAP as b, DATE_OPTIONS as x, DIAL_FILE_MANAGER_SECTION_TABS as S, PATH_SEPARATOR_REGEXP as C, RESERVED_MARKER_NAME as w, UPLOAD_CONCURRENCY as T } from "./files/dial-file-manager.model.js";
7
- import { buildSharedItemVirtualPath as E, dialCorePathToRelative as D, findDialFileByPath as O, findFolderByVirtualPath as k, formatOperationFolderName as A, getVirtualPathName as j, hasDialFileWritePermission as M, hasForbiddenNameSymbols as N, hasSamePaths as P, isCopyMoveDuplicateAllowed as F, isShareActionsAllowed as I, normalizeVirtualPath as L, parseNewFolderVirtualPath as R, resolveOwnerCoords as z, resolveSectionByPath as B, unionPathSets as V, withRoutableRootLabels as H } from "./files/dial-file-manager-path.util.js";
8
- import { resolveDialFileApiPath as U, virtualPathToApiPath as W } from "./files/resolve-dial-file-api-path.js";
9
- import { prepareCopyItems as G, prepareMoveRenameItems as K } from "./files/dial-file-manager-copy-move.util.js";
10
- import { UploadBodyEncoding as q, UploadNetworkError as J, createUploadFileWithProgress as Y } from "./files/create-upload-file-with-progress.js";
11
- import { buildFromCache as X, buildSharedSearchScope as Z, fetchByTab as Q, fetchForSearch as $, findFirstSuccessfulCopyMoveItem as ee, mapCorePermissions as te, mapFileMetadataToDialFile as ne, mapSearchItem as re, mergeCreatedFolderIntoCache as ie, resolveTransferFailureReason as ae, resolveUploadFailureReason as oe, updateEntry as se } from "./files/dial-file-manager-mapping.util.js";
12
- import { mimeTypesToAttachmentExtensionLabels as ce } from "./files/attachment-type-labels.js";
13
- import { createFilesApiClient as le } from "./files/create-files-api.js";
14
- import { openAnnotationAttachment as ue } from "./files/annotation.js";
15
- import { getUrlFileName as de, isExternalSourcePreviewable as fe, resolveExternalSourceContentType as pe } from "./files/source-content.js";
16
- import { annotationToDisplayAttachment as me, attachmentDtoToDisplayAttachment as he, attachmentDtosToDisplayAttachments as ge } from "./files/attachment-dto-to-display.js";
17
- import { useUnshareConfirmationState as _e } from "./files/useUnshareConfirmationState/useUnshareConfirmationState.js";
18
- import { dialFileToAttachment as ve, dialFilesToAttachments as ye, dialFolderPathToAttachment as be } from "./files/dial-file-to-attachment.js";
19
- import { DownloadDestinationType as xe } from "./files/download-destination.js";
20
- import { prepareDownloadDestination as Se } from "./files/prepare-download-destination.js";
21
- import { deriveActionProfile as Ce } from "./files/file-manager-variant.js";
22
- import { useDialFileListing as we } from "./files/useDialFileListing/useDialFileListing.js";
23
- import { useDialFileMetadata as Te } from "./files/useDialFileMetadata/useDialFileMetadata.js";
24
- import { useDialFileMutations as Ee } from "./files/useDialFileMutations/useDialFileMutations.js";
25
- import { useDialFileSharing as De } from "./files/useDialFileSharing/useDialFileSharing.js";
26
- import { useDialFileUploadBatch as Oe } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
27
- import { useDialFileManager as ke } from "./files/useDialFileManager/useDialFileManager.js";
28
- import { useDialFileManagerSections as Ae } from "./files/useDialFileManagerSections/useDialFileManagerSections.js";
29
- import { useDialFileManagerTabConfig as je } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
30
- import { useFileAttachmentPicker as Me } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
31
- import { useFileAttachmentModalState as Ne } from "./files/useFileAttachmentModalState/useFileAttachmentModalState.js";
32
- import { useGridEditingScroll as Pe } from "@epam/ai-dial-chat-shared";
33
- export { _ as COLUMNS_MY_FILES, v as COLUMNS_ORGANIZATION, y as COLUMNS_SHARED, b as CORE_PERMISSION_MAP, x as DATE_OPTIONS, S as DIAL_FILE_MANAGER_SECTION_TABS, p as DialFilesApiUploadMode, xe as DownloadDestinationType, m as FileManagerNotificationReason, h as FileNameValidationErrorReason, g as FileOperationKind, e as FileSelectionKind, C as PATH_SEPARATOR_REGEXP, w as RESERVED_MARKER_NAME, T as UPLOAD_CONCURRENCY, q as UploadBodyEncoding, J as UploadNetworkError, me as annotationToDisplayAttachment, he as attachmentDtoToDisplayAttachment, ge as attachmentDtosToDisplayAttachments, X as buildFromCache, E as buildSharedItemVirtualPath, Z as buildSharedSearchScope, le as createFilesApiClient, Y as createUploadFileWithProgress, Ce as deriveActionProfile, D as dialCorePathToRelative, ve as dialFileToAttachment, ye as dialFilesToAttachments, be as dialFolderPathToAttachment, Q as fetchByTab, $ as fetchForSearch, O as findDialFileByPath, ee as findFirstSuccessfulCopyMoveItem, k as findFolderByVirtualPath, A as formatOperationFolderName, t as getFileSelectionKind, de as getUrlFileName, j as getVirtualPathName, M as hasDialFileWritePermission, N as hasForbiddenNameSymbols, P as hasSamePaths, F as isCopyMoveDuplicateAllowed, s as isDialFileAcceptType, n as isDialFileId, r as isDialFolderId, fe as isExternalSourcePreviewable, I as isShareActionsAllowed, te as mapCorePermissions, ne as mapFileMetadataToDialFile, re as mapSearchItem, ie as mergeCreatedFolderIntoCache, ce as mimeTypesToAttachmentExtensionLabels, c as mimeTypesToDialFileAcceptTypes, l as mimeTypesToFileAccept, L as normalizeVirtualPath, ue as openAnnotationAttachment, R as parseNewFolderVirtualPath, G as prepareCopyItems, Se as prepareDownloadDestination, K as prepareMoveRenameItems, U as resolveDialFileApiPath, i as resolveDialFileBucketAndPath, a as resolveDialFolderPath, pe as resolveExternalSourceContentType, z as resolveOwnerCoords, o as resolveRelativeDialFilePath, B as resolveSectionByPath, ae as resolveTransferFailureReason, oe as resolveUploadFailureReason, u as sanitizeFileName, d as splitFileNameExtension, f as trimFileNameToByteLimit, V as unionPathSets, se as updateEntry, we as useDialFileListing, ke as useDialFileManager, Ae as useDialFileManagerSections, je as useDialFileManagerTabConfig, Te as useDialFileMetadata, Ee as useDialFileMutations, De as useDialFileSharing, Oe as useDialFileUploadBatch, Ne as useFileAttachmentModalState, Me as useFileAttachmentPicker, Pe as useGridEditingScroll, _e as useUnshareConfirmationState, W as virtualPathToApiPath, H as withRoutableRootLabels };
1
+ import { FileSelectionKind as e, getFileSelectionKind as t, isDialFileId as n, isDialFolderId as r, isDialProjectFileId as i, isDialStoredFileId as a, parseDialProjectFileId as o, resolveDialFileBucketAndPath as s, resolveDialFolderPath as c, resolveRelativeDialFilePath as l } from "./files/dial-file.js";
2
+ import { openAnnotationAttachment as u } from "./files/annotation.js";
3
+ import { isDialFileAcceptType as d, mimeTypesToDialFileAcceptTypes as f, mimeTypesToFileAccept as p } from "./files/attachment-types.js";
4
+ import { sanitizeFileName as m, splitFileNameExtension as h, trimFileNameToByteLimit as g } from "./files/file-name.js";
5
+ import { DialFilesApiUploadMode as _ } from "./files/dial-files-api.js";
6
+ import { FileManagerNotificationReason as v, FileNameValidationErrorReason as y, FileOperationKind as b } from "./files/dial-file-manager.types.js";
7
+ import { COLUMNS_MY_FILES as x, COLUMNS_ORGANIZATION as S, COLUMNS_SHARED as C, CORE_PERMISSION_MAP as w, DATE_OPTIONS as T, DIAL_FILE_MANAGER_SECTION_TABS as E, PATH_SEPARATOR_REGEXP as D, RESERVED_MARKER_NAME as O, UPLOAD_CONCURRENCY as k } from "./files/dial-file-manager.model.js";
8
+ import { buildSharedItemVirtualPath as A, dialCorePathToRelative as j, findDialFileByPath as M, findFolderByVirtualPath as N, formatOperationFolderName as P, getVirtualPathName as F, hasDialFileWritePermission as I, hasForbiddenNameSymbols as L, hasSamePaths as R, isCopyMoveDuplicateAllowed as z, isShareActionsAllowed as B, normalizeVirtualPath as V, parseNewFolderVirtualPath as H, resolveOwnerCoords as U, resolveSectionByPath as W, unionPathSets as G, withRoutableRootLabels as K } from "./files/dial-file-manager-path.util.js";
9
+ import { resolveDialFileApiPath as q, virtualPathToApiPath as J } from "./files/resolve-dial-file-api-path.js";
10
+ import { prepareCopyItems as Y, prepareMoveRenameItems as X } from "./files/dial-file-manager-copy-move.util.js";
11
+ import { UploadBodyEncoding as Z, UploadNetworkError as Q, createUploadFileWithProgress as $ } from "./files/create-upload-file-with-progress.js";
12
+ import { buildFromCache as ee, buildSharedSearchScope as te, fetchByTab as ne, fetchForSearch as re, findFirstSuccessfulCopyMoveItem as ie, mapCorePermissions as ae, mapFileMetadataToDialFile as oe, mapSearchItem as se, mergeCreatedFolderIntoCache as ce, resolveTransferFailureReason as le, resolveUploadFailureReason as ue, updateEntry as de } from "./files/dial-file-manager-mapping.util.js";
13
+ import { mimeTypesToAttachmentExtensionLabels as fe } from "./files/attachment-type-labels.js";
14
+ import { createFilesApiClient as pe } from "./files/create-files-api.js";
15
+ import { getUrlFileName as me, isExternalSourcePreviewable as he, resolveExternalSourceContentType as ge } from "./files/source-content.js";
16
+ import { annotationToDisplayAttachment as _e, attachmentDtoToDisplayAttachment as ve, attachmentDtosToDisplayAttachments as ye } from "./files/attachment-dto-to-display.js";
17
+ import { useUnshareConfirmationState as be } from "./files/useUnshareConfirmationState/useUnshareConfirmationState.js";
18
+ import { dialFileToAttachment as xe, dialFilesToAttachments as Se, dialFolderPathToAttachment as Ce } from "./files/dial-file-to-attachment.js";
19
+ import { DownloadDestinationType as we } from "./files/download-destination.js";
20
+ import { prepareDownloadDestination as Te } from "./files/prepare-download-destination.js";
21
+ import { deriveActionProfile as Ee } from "./files/file-manager-variant.js";
22
+ import { useDialFileListing as De } from "./files/useDialFileListing/useDialFileListing.js";
23
+ import { useDialFileMetadata as Oe } from "./files/useDialFileMetadata/useDialFileMetadata.js";
24
+ import { useDialFileMutations as ke } from "./files/useDialFileMutations/useDialFileMutations.js";
25
+ import { useDialFileSharing as Ae } from "./files/useDialFileSharing/useDialFileSharing.js";
26
+ import { useDialFileUploadBatch as je } from "./files/useDialFileUploadBatch/useDialFileUploadBatch.js";
27
+ import { useDialFileManager as Me } from "./files/useDialFileManager/useDialFileManager.js";
28
+ import { useDialFileManagerSections as Ne } from "./files/useDialFileManagerSections/useDialFileManagerSections.js";
29
+ import { useDialFileManagerTabConfig as Pe } from "./files/useDialFileManagerTabConfig/useDialFileManagerTabConfig.js";
30
+ import { useFileAttachmentPicker as Fe } from "./files/useFileAttachmentPicker/useFileAttachmentPicker.js";
31
+ import { useFileAttachmentModalState as Ie } from "./files/useFileAttachmentModalState/useFileAttachmentModalState.js";
32
+ import { useGridEditingScroll as Le } from "@epam/ai-dial-chat-shared";
33
+ export { x as COLUMNS_MY_FILES, S as COLUMNS_ORGANIZATION, C as COLUMNS_SHARED, w as CORE_PERMISSION_MAP, T as DATE_OPTIONS, E as DIAL_FILE_MANAGER_SECTION_TABS, _ as DialFilesApiUploadMode, we as DownloadDestinationType, v as FileManagerNotificationReason, y as FileNameValidationErrorReason, b as FileOperationKind, e as FileSelectionKind, D as PATH_SEPARATOR_REGEXP, O as RESERVED_MARKER_NAME, k as UPLOAD_CONCURRENCY, Z as UploadBodyEncoding, Q as UploadNetworkError, _e as annotationToDisplayAttachment, ve as attachmentDtoToDisplayAttachment, ye as attachmentDtosToDisplayAttachments, ee as buildFromCache, A as buildSharedItemVirtualPath, te as buildSharedSearchScope, pe as createFilesApiClient, $ as createUploadFileWithProgress, Ee as deriveActionProfile, j as dialCorePathToRelative, xe as dialFileToAttachment, Se as dialFilesToAttachments, Ce as dialFolderPathToAttachment, ne as fetchByTab, re as fetchForSearch, M as findDialFileByPath, ie as findFirstSuccessfulCopyMoveItem, N as findFolderByVirtualPath, P as formatOperationFolderName, t as getFileSelectionKind, me as getUrlFileName, F as getVirtualPathName, I as hasDialFileWritePermission, L as hasForbiddenNameSymbols, R as hasSamePaths, z as isCopyMoveDuplicateAllowed, d as isDialFileAcceptType, n as isDialFileId, r as isDialFolderId, i as isDialProjectFileId, a as isDialStoredFileId, he as isExternalSourcePreviewable, B as isShareActionsAllowed, ae as mapCorePermissions, oe as mapFileMetadataToDialFile, se as mapSearchItem, ce as mergeCreatedFolderIntoCache, fe as mimeTypesToAttachmentExtensionLabels, f as mimeTypesToDialFileAcceptTypes, p as mimeTypesToFileAccept, V as normalizeVirtualPath, u as openAnnotationAttachment, o as parseDialProjectFileId, H as parseNewFolderVirtualPath, Y as prepareCopyItems, Te as prepareDownloadDestination, X as prepareMoveRenameItems, q as resolveDialFileApiPath, s as resolveDialFileBucketAndPath, c as resolveDialFolderPath, ge as resolveExternalSourceContentType, U as resolveOwnerCoords, l as resolveRelativeDialFilePath, W as resolveSectionByPath, le as resolveTransferFailureReason, ue as resolveUploadFailureReason, m as sanitizeFileName, h as splitFileNameExtension, g as trimFileNameToByteLimit, G as unionPathSets, de as updateEntry, De as useDialFileListing, Me as useDialFileManager, Ne as useDialFileManagerSections, Pe as useDialFileManagerTabConfig, Oe as useDialFileMetadata, ke as useDialFileMutations, Ae as useDialFileSharing, je as useDialFileUploadBatch, Ie as useFileAttachmentModalState, Fe as useFileAttachmentPicker, Le as useGridEditingScroll, be as useUnshareConfirmationState, J as virtualPathToApiPath, K as withRoutableRootLabels };
@@ -2,9 +2,9 @@ import { AttachmentResource } from '@epam/ai-dial-chat-shared';
2
2
  import { ResolveDownloadUrl } from '../attachment/useAttachmentAction/useAttachmentAction';
3
3
  /**
4
4
  * Opens a cited/referenced attachment: triggers a browser download for
5
- * DIAL-hosted files (`files/...` ids) via the injected `resolveDownloadUrl`,
6
- * otherwise opens the URL in a new tab. No-ops when the attachment has no
7
- * URL or the download URL cannot be resolved.
5
+ * DIAL-hosted files (`files/...` and project file ids) via the injected
6
+ * `resolveDownloadUrl`, otherwise opens the URL in a new tab. No-ops when the
7
+ * attachment has no URL or the download URL cannot be resolved.
8
8
  */
9
9
  export declare const openAnnotationAttachment: (attachment: AttachmentResource, resolveDownloadUrl: ResolveDownloadUrl) => void;
10
10
  //# sourceMappingURL=annotation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/files/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAGhG;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,YAAY,kBAAkB,EAC9B,oBAAoB,kBAAkB,KACrC,IAeF,CAAC"}
1
+ {"version":3,"file":"annotation.d.ts","sourceRoot":"","sources":["../../src/files/annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAGxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAGhG;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,GACnC,YAAY,kBAAkB,EAC9B,oBAAoB,kBAAkB,KACrC,IAgBF,CAAC"}
@@ -1,15 +1,16 @@
1
- import { isDialFileId as e } from "./dial-file.js";
2
- import { triggerAnchorDownload as t } from "@epam/ai-dial-chat-shared";
1
+ import { isDialStoredFileId as e } from "./dial-file.js";
2
+ import { ensureDownloadFilename as t, triggerAnchorDownload as n } from "@epam/ai-dial-chat-shared";
3
3
  //#region src/files/annotation.ts
4
- var n = (n, r) => {
5
- let { url: i } = n;
6
- if (i == null) return;
7
- let a = i.split("#")[0];
8
- if (e(a)) {
9
- let e = r(a);
4
+ var r = (r, i) => {
5
+ let { url: a } = r;
6
+ if (a == null) return;
7
+ let o = a.split("#")[0];
8
+ if (e(o)) {
9
+ let e = i(o);
10
10
  if (e == null) return;
11
- t(e, n.title ?? a.split("/").pop() ?? "");
12
- } else window.open(i, "_blank", "noopener,noreferrer");
11
+ let a = r.title ?? o.split("/").pop() ?? "";
12
+ n(e, t(a, o, r.type));
13
+ } else window.open(a, "_blank", "noopener,noreferrer");
13
14
  };
14
15
  //#endregion
15
- export { n as openAnnotationAttachment };
16
+ export { r as openAnnotationAttachment };
@@ -7,7 +7,7 @@ import { AnnotationGroup } from '@epam/ai-dial-quotations';
7
7
  * file-download endpoint.
8
8
  */
9
9
  export interface AttachmentCanvasUrlResolvers {
10
- /** Resolves a DIAL Core file id to a downloadable URL. */
10
+ /** Resolves a DIAL Core file id or project file id (a citation or reference source) to a downloadable URL. */
11
11
  resolveDialFileDownloadUrl: (fileId: string) => string | undefined;
12
12
  /** Resolves the best downloadable DIAL-file URL from an attachment's `url` or `referenceUrl`. */
13
13
  resolveDialUrl: (attachment: DisplayAttachment) => string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-canvas.d.ts","sourceRoot":"","sources":["../../src/files/attachment-canvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAGlB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAIL,aAAa,EAEd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EAErB,kBA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GAGG;AACH,eAAO,MAAM,wBAAwB,GACnC,YAAY,iBAAiB,EAC7B,WAAW,4BAA4B,KACtC,OAAO,CACR,iBAAiB,GAAG,sBAAsB,GAAG,kBAAkB,GAAG,IAAI,CAYvE,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,8BAA8B,GACzC,YAAY,iBAAiB,EAC7B,WAAW,4BAA4B,EACvC,OAAO,gBAAgB,EACvB,SAAS,MAAM,KACd,OAAO,CAAC,uBAAuB,GAAG,IAAI,CA4BxC,CAAC;AAEF,wDAAwD;AACxD,MAAM,WAAW,2BAA2B;IAC1C,mFAAmF;IACnF,OAAO,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC/C,qJAAqJ;IACrJ,QAAQ,EAAE,iBAAiB,EAAE,CAAC;CAC/B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,qCAAqC,GAChD,aAAa,iBAAiB,EAAE,EAChC,oBAAoB,CAAC,UAAU,EAAE,iBAAiB,KAAK,MAAM,GAAG,SAAS,EACzE,OAAO,qBAAqB,EAC5B,SAAS,MAAM,KACd,2BAkCF,CAAC"}
1
+ {"version":3,"file":"attachment-canvas.d.ts","sourceRoot":"","sources":["../../src/files/attachment-canvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,kBAAkB,EAGlB,8BAA8B,EAC9B,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAIL,aAAa,EAEd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EACV,UAAU,EACV,qBAAqB,EAErB,kBAAkB,EAClB,gBAAgB,EAEhB,iBAAiB,EAElB,MAAM,2BAA2B,CAAC;AAMnC,OAAO,EAML,KAAK,eAAe,EAGrB,MAAM,0BAA0B,CAAC;AAIlC;;;;GAIG;AACH,MAAM,W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