@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
@@ -1,236 +1,240 @@
1
1
  import { getApiErrorDetails as e, getApiErrorStatus as t } from "../api-error/api-error.js";
2
2
  import { SKILL_TEXT_FIELD_MAX_LENGTHS as n, buildSkillFilesPayload as r, buildSkillManifestForSubmit as i, getSkillFieldLengthViolations as a, isValidSkillRelativePath as o, normalizeSkillName as s, startsWithFrontmatterBlock as c } from "./skill.js";
3
3
  import { ResourceSaveError as l } from "../catalog/resource-save-adapter.js";
4
- import { useCallback as u, useRef as d, useState as f } from "react";
5
- import { NotificationVariant as p } from "@epam/ai-dial-ui-kit";
4
+ import { createOrgUnitWriter as u } from "../catalog/resource-save-adapters.js";
5
+ import { useCallback as d, useMemo as f, useRef as p, useState as m } from "react";
6
+ import { NotificationVariant as h } from "@epam/ai-dial-ui-kit";
6
7
  //#region src/skill/useSkillEditorSubmit.ts
7
- var m = (e, t, n) => JSON.stringify({
8
+ var g = (e, t, n) => JSON.stringify({
8
9
  values: e,
9
10
  files: [...t].sort((e, t) => e.path.localeCompare(t.path)),
10
11
  contentRevisions: Object.entries(n).sort(([e], [t]) => e.localeCompare(t))
11
- }), h = {}, g = ({ bucket: g, isEditMode: _, files: v, filesContentRef: y, contentRevisions: b = h, frontmatterRef: x, loadedPathRef: S, etagRef: C, returnUrl: w, getCreateReturnUrl: T, refetchSkills: E, client: D, messages: O, onNavigate: k, onNotify: A, onSaveRequest: j }) => {
12
- let [M, N] = f({}), [P, F] = f(), [I, L] = f(!1), [R, z] = f(), [B, V] = f("idle"), H = d(null), U = d(null), W = u(async (n) => {
12
+ }), _ = {}, v = ({ bucket: v, isEditMode: y, files: b, filesContentRef: x, contentRevisions: S = _, frontmatterRef: C, loadedPathRef: w, etagRef: T, returnUrl: E, getCreateReturnUrl: D, refetchSkills: O, client: k, publishClient: A, messages: j, onNavigate: M, onNotify: N, onSaveRequest: P }) => {
13
+ let [F, I] = m({}), [L, R] = m(), [z, B] = m(!1), [V, H] = m(), [U, W] = m("idle"), G = p(null), K = p(null), q = d(async (n) => {
13
14
  switch (t(n)) {
14
15
  case 409:
15
- N({ name: O.nameConflict });
16
+ I({ name: j.nameConflict });
16
17
  return;
17
18
  case 412:
18
- N({ name: O.nameConflict });
19
+ I({ name: j.nameConflict });
19
20
  return;
20
21
  case 413:
21
- F(O.archiveTooLarge);
22
+ R(j.archiveTooLarge);
22
23
  return;
23
24
  case 503:
24
- F(O.serviceUnavailable), L(!0);
25
+ R(j.serviceUnavailable), B(!0);
25
26
  return;
26
27
  case 400: {
27
28
  let { message: t } = await e(n);
28
- F(t ?? O.pathInvalid);
29
+ R(t ?? j.pathInvalid);
29
30
  return;
30
31
  }
31
32
  default: {
32
33
  let { traceId: t } = await e(n);
33
- F(O.saveError), A({
34
- variant: p.Error,
35
- message: O.saveError,
34
+ R(j.saveError), N({
35
+ variant: h.Error,
36
+ message: j.saveError,
36
37
  requestId: t
37
38
  });
38
39
  }
39
40
  }
40
- }, [O, A]), G = u(async (e) => {
41
+ }, [j, N]), J = d(async (e) => {
41
42
  let t = s(e.name);
42
43
  if (!t || !o(t)) {
43
- N({ name: O.nameInvalid });
44
+ I({ name: j.nameInvalid });
44
45
  return;
45
46
  }
46
- let n = m(e, v, b), a = H.current, c = a != null && a.fingerprint === n, l = t, u, d, f;
47
- c ? {skillManifest: u, filePaths: d, files: f} = a : (u = i(x.current, t, e.description, e.instructions), {filePaths: d, files: f} = r(v, y.current)), V("submitting"), H.current = {
47
+ let n = g(e, b, S), a = G.current, c = a != null && a.fingerprint === n, l = t, u, d, f;
48
+ c ? {skillManifest: u, filePaths: d, files: f} = a : (u = i(C.current, t, e.description, e.instructions), {filePaths: d, files: f} = r(b, x.current)), W("submitting"), G.current = {
48
49
  fingerprint: n,
49
- bucket: g,
50
+ bucket: v,
50
51
  path: l,
51
52
  skillManifest: u,
52
53
  filePaths: d,
53
54
  files: f
54
55
  };
55
56
  try {
56
- await D.createSkill(g, l, u, d, f), await E(), V("success"), A({
57
- variant: p.Success,
58
- title: O.saveSuccessTitle,
59
- message: O.createSuccess(t)
60
- }), k(T?.(l) ?? w);
57
+ await k.createSkill(v, l, u, d, f), await O(), W("success"), N({
58
+ variant: h.Success,
59
+ title: j.saveSuccessTitle,
60
+ message: j.createSuccess(t)
61
+ }), M(D?.(l) ?? E);
61
62
  } catch (e) {
62
- V("failure"), await W(e);
63
+ W("failure"), await q(e);
63
64
  }
64
65
  }, [
65
- g,
66
66
  v,
67
- y,
68
67
  b,
69
68
  x,
70
- O,
71
- D,
72
- A,
69
+ S,
70
+ C,
71
+ j,
73
72
  k,
74
- w,
75
- T,
73
+ N,
74
+ M,
76
75
  E,
77
- W
78
- ]), K = u(async (e) => {
79
- let n = S.current, a = C.current;
76
+ D,
77
+ O,
78
+ q
79
+ ]), Y = d(async (e) => {
80
+ let n = w.current, a = T.current;
80
81
  if (!n || !a) {
81
- F(O.saveError);
82
+ R(j.saveError);
82
83
  return;
83
84
  }
84
- let o = i(x.current, e.name, e.description, e.instructions), { filePaths: s, files: c } = r(v, y.current);
85
- V("submitting");
85
+ let o = i(C.current, e.name, e.description, e.instructions), { filePaths: s, files: c } = r(b, x.current);
86
+ W("submitting");
86
87
  try {
87
- C.current = (await D.updateSkill(g, n, o, s, c, a)).etag ?? a, await E(), V("success"), A({
88
- variant: p.Success,
89
- title: O.updateSuccessTitle,
90
- message: O.updateSuccess(e.name)
91
- }), k(w);
88
+ T.current = (await k.updateSkill(v, n, o, s, c, a)).etag ?? a, await O(), W("success"), N({
89
+ variant: h.Success,
90
+ title: j.updateSuccessTitle,
91
+ message: j.updateSuccess(e.name)
92
+ }), M(E);
92
93
  } catch (e) {
93
- if (V("failure"), t(e) === 412) {
94
- z({ message: O.conflictMessage });
94
+ if (W("failure"), t(e) === 412) {
95
+ H({ message: j.conflictMessage });
95
96
  return;
96
97
  }
97
- await W(e);
98
+ await q(e);
98
99
  }
99
100
  }, [
100
- g,
101
101
  v,
102
- y,
102
+ b,
103
103
  x,
104
- S,
105
104
  C,
106
- O,
107
- D,
108
- A,
109
- k,
110
105
  w,
106
+ T,
107
+ j,
108
+ k,
109
+ N,
110
+ M,
111
111
  E,
112
- W
113
- ]), q = u(async (n, r) => {
112
+ O,
113
+ q
114
+ ]), X = d(async (n, r) => {
114
115
  let i = t(n);
115
- if (i === 412 && r) return z({ message: O.conflictMessage }), new l(O.conflictMessage);
116
- if (i === 409 || i === 412) return new l(O.nameConflict);
117
- if (i === 413) return new l(O.archiveTooLarge);
118
- if (i === 503) return new l(O.serviceUnavailable);
116
+ if (i === 412 && r) return H({ message: j.conflictMessage }), new l(j.conflictMessage);
117
+ if (i === 409 || i === 412) return new l(j.nameConflict);
118
+ if (i === 413) return new l(j.archiveTooLarge);
119
+ if (i === 503) return new l(j.serviceUnavailable);
119
120
  if (i === 400) {
120
121
  let { message: t } = await e(n);
121
- return new l(t ?? O.pathInvalid);
122
+ return new l(t ?? j.pathInvalid);
122
123
  }
123
- return new l(O.saveError);
124
- }, [O]), J = u((e) => {
125
- let t = g, { filePaths: n, files: a } = r(v, y.current);
126
- if (!_) {
124
+ return new l(j.saveError);
125
+ }, [j]), Z = f(() => u(A, "skill"), [A]), Q = d((e) => {
126
+ let t = v, { filePaths: n, files: a } = r(b, x.current);
127
+ if (!y) {
127
128
  let r = s(e.name);
128
129
  if (!r || !o(r)) {
129
- N({ name: O.nameInvalid });
130
+ I({ name: j.nameInvalid });
130
131
  return;
131
132
  }
132
- let c = i(x.current, r, e.description, e.instructions);
133
+ let c = i(C.current, r, e.description, e.instructions);
133
134
  return {
134
135
  publishEntityType: "skill",
135
136
  isVersioned: !1,
136
137
  createIn: async (e) => {
137
138
  let i = [...e, r].join("/");
138
139
  try {
139
- await D.createSkill(t, i, c, n, a);
140
+ await k.createSkill(t, i, c, n, a);
140
141
  } catch (e) {
141
- throw await q(e, !1);
142
+ throw await X(e, !1);
142
143
  }
143
- return await E().catch(() => void 0), { id: `skills/${t}/${i}` };
144
- }
144
+ return await O().catch(() => void 0), { id: `skills/${t}/${i}` };
145
+ },
146
+ ...Z
145
147
  };
146
148
  }
147
- let c = S.current, u = C.current;
149
+ let c = w.current, u = T.current;
148
150
  if (!c || !u) {
149
- F(O.saveError);
151
+ R(j.saveError);
150
152
  return;
151
153
  }
152
- let d = i(x.current, e.name, e.description, e.instructions);
154
+ let d = i(C.current, e.name, e.description, e.instructions);
153
155
  return {
154
156
  publishEntityType: "skill",
155
157
  isVersioned: !1,
156
158
  saveInPlace: async () => {
157
159
  try {
158
- C.current = (await D.updateSkill(t, c, d, n, a, C.current ?? u)).etag ?? u;
160
+ T.current = (await k.updateSkill(t, c, d, n, a, T.current ?? u)).etag ?? u;
159
161
  } catch (e) {
160
- throw await q(e, !0);
162
+ throw await X(e, !0);
161
163
  }
162
- return await E().catch(() => void 0), { id: `skills/${t}/${c}` };
164
+ return await O().catch(() => void 0), { id: `skills/${t}/${c}` };
163
165
  },
164
166
  move: async (e, t) => {
165
- if (!D.moveSkill) throw new l(O.saveError);
167
+ if (!k.moveSkill) throw new l(j.saveError);
166
168
  try {
167
- return await D.moveSkill(c, t.join("/"));
169
+ return await k.moveSkill(c, t.join("/"));
168
170
  } catch (e) {
169
- throw await q(e, !1);
171
+ throw await X(e, !1);
170
172
  }
171
- }
173
+ },
174
+ ...Z
172
175
  };
173
176
  }, [
174
- g,
175
- D,
176
- C,
177
177
  v,
178
- y,
178
+ k,
179
+ Z,
180
+ T,
181
+ b,
179
182
  x,
180
- _,
181
- S,
183
+ C,
184
+ y,
185
+ w,
186
+ j,
182
187
  O,
183
- E,
184
- q
185
- ]), Y = u((e) => {
188
+ X
189
+ ]), ee = d((e) => {
186
190
  let t = c(e.instructions), r = a(e);
187
- N((e) => {
191
+ I((e) => {
188
192
  let i = { ...e };
189
193
  for (let e of Object.keys(n)) {
190
- let t = O.tooLong(n[e]);
194
+ let t = j.tooLong(n[e]);
191
195
  r[e] ? i[e] = t : i[e] === t && delete i[e];
192
196
  }
193
197
  if (!r.instructions) {
194
- let e = i.instructions === O.instructionsFrontmatter;
195
- t && !e ? i.instructions = O.instructionsFrontmatter : !t && e && delete i.instructions;
198
+ let e = i.instructions === j.instructionsFrontmatter;
199
+ t && !e ? i.instructions = j.instructionsFrontmatter : !t && e && delete i.instructions;
196
200
  }
197
201
  return Object.keys(i).length === Object.keys(e).length && Object.keys(i).every((t) => i[t] === e[t]) ? e : i;
198
202
  });
199
- }, [O]), X = u(async (e) => {
200
- if (B === "submitting" || !g) return;
203
+ }, [j]), $ = d(async (e) => {
204
+ if (U === "submitting" || !v) return;
201
205
  let t = {};
202
- e.name.trim() || (t.name = O.required), e.description.trim() || (t.description = O.required), e.instructions.trim() ? c(e.instructions) && (t.instructions = O.instructionsFrontmatter) : t.instructions = O.required;
206
+ e.name.trim() || (t.name = j.required), e.description.trim() || (t.description = j.required), e.instructions.trim() ? c(e.instructions) && (t.instructions = j.instructionsFrontmatter) : t.instructions = j.required;
203
207
  let r = a(e);
204
- for (let e of Object.keys(r)) t[e] ??= O.tooLong(n[e]);
205
- if (Object.keys(t).length > 0) N(t);
206
- else if (N({}), F(void 0), L(!1), z(void 0), U.current = e, j) {
207
- let t = J(e);
208
- t && j(t, e);
209
- } else _ ? await K(e) : await G(e);
208
+ for (let e of Object.keys(r)) t[e] ??= j.tooLong(n[e]);
209
+ if (Object.keys(t).length > 0) I(t);
210
+ else if (I({}), R(void 0), B(!1), H(void 0), K.current = e, P) {
211
+ let t = Q(e);
212
+ t && P(t, e);
213
+ } else y ? await Y(e) : await J(e);
210
214
  }, [
211
- B,
212
- g,
213
- O,
214
- _,
215
+ U,
216
+ v,
215
217
  j,
216
- J,
217
- K,
218
- G
218
+ y,
219
+ P,
220
+ Q,
221
+ Y,
222
+ J
219
223
  ]);
220
224
  return {
221
- phase: B,
222
- errors: M,
223
- submitError: P,
224
- isSubmitErrorRetryable: I,
225
- retrySubmit: u(() => {
226
- let e = U.current;
227
- e != null && X(e);
228
- }, [X]),
229
- conflict: R,
230
- clearConflict: () => z(void 0),
231
- handleSubmit: X,
232
- handleValuesChange: Y
225
+ phase: U,
226
+ errors: F,
227
+ submitError: L,
228
+ isSubmitErrorRetryable: z,
229
+ retrySubmit: d(() => {
230
+ let e = K.current;
231
+ e != null && $(e);
232
+ }, [$]),
233
+ conflict: V,
234
+ clearConflict: () => H(void 0),
235
+ handleSubmit: $,
236
+ handleValuesChange: ee
233
237
  };
234
238
  };
235
239
  //#endregion
236
- export { g as useSkillEditorSubmit };
240
+ export { v as useSkillEditorSubmit };
package/utils.js CHANGED
@@ -7,19 +7,22 @@ import { formatCalendarDate as v, padTwoDigits as y } from "./shared/formatting.
7
7
  import { PromptSource as b, parsePromptResourceUrl as x } from "./prompt/prompt-resource.js";
8
8
  import { getRunnerSchemas as S, isCustomAppSchema as C, isQuickAppSchema as w } from "./shared/application-schema.js";
9
9
  import { buildExternalServiceScopeId as T, getExternalServiceFallbackName as E, parseExternalServiceUrl as D } from "./shared/external-services.js";
10
- import { buildPromptExportEnvelope as O, buildPromptExportFileName as k, serializePromptExport as A } from "./prompt/export-prompt.js";
11
- import { PROMPT_CONTENT_MAX_LENGTH as j, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as M, PROMPT_DESCRIPTION_MAX_LENGTH as N, PROMPT_FIELD_VALIDATORS as P, PROMPT_NAME_MAX_LENGTH as F, PromptFieldError as I, buildPromptPath as L, getRemainingCharacters as R, validatePromptContent as z, validatePromptDescription as B, validatePromptName as V } from "./prompt/prompt.js";
12
- import { usePromptsState as H } from "./prompt/usePromptsState/usePromptsState.js";
13
- import { apSchedulerDayToJsDay as U, jsDayToApSchedulerDay as W } from "./shared/cron-weekday.js";
14
- import { getBrowserTimezone as G } from "./shared/browser-timezone.js";
15
- import { isValidAbsoluteUrl as K, isValidFeaturesData as q, parseFeaturesData as J } from "./shared/custom-apps.js";
16
- import { EXTERNAL_SERVICE_SIGNIN_METHOD as Y, PendingSigninEventKind as X, TOOLSET_SIGNIN_METHOD as Z } from "./shared/client-channel.js";
17
- import { ColorScheme as Q, applyThemeColors as $, getOsPreferredTheme as ee } from "./shared/theme-colors.js";
18
- import { useUsageData as te } from "./usage/useUsageData/useUsageData.js";
19
- import { triggerBrowserDownload as ne } from "./files/browser-download.js";
20
- import { usePersistedState as re } from "./shared/usePersistedState/usePersistedState.js";
21
- import { useAppVersionCheck as ie } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
22
- import { getCleanedLocationTarget as ae } from "./shared/url-cleanup.js";
23
- import { OrgUnitsStatus as oe } from "./org-units/types.js";
24
- import { useOrgUnits as se } from "./org-units/useOrgUnits/useOrgUnits.js";
25
- export { Q as ColorScheme, Y as EXTERNAL_SERVICE_SIGNIN_METHOD, oe as OrgUnitsStatus, j as PROMPT_CONTENT_MAX_LENGTH, M as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, N as PROMPT_DESCRIPTION_MAX_LENGTH, P as PROMPT_FIELD_VALIDATORS, F as PROMPT_NAME_MAX_LENGTH, X as PendingSigninEventKind, I as PromptFieldError, b as PromptSource, Z as TOOLSET_SIGNIN_METHOD, U as apSchedulerDayToJsDay, f as appendLocaleCode, $ as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, O as buildPromptExportEnvelope, k as buildPromptExportFileName, L as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, G as getBrowserTimezone, ae as getCleanedLocationTarget, E as getExternalServiceFallbackName, ee as getOsPreferredTheme, R as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, K as isValidAbsoluteUrl, q as isValidFeaturesData, W as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, J as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, A as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, ne as triggerBrowserDownload, ie as useAppVersionCheck, se as useOrgUnits, re as usePersistedState, H as usePromptsState, te as useUsageData, z as validatePromptContent, B as validatePromptDescription, V as validatePromptName };
10
+ import { SaveDestinationRoot as O } from "./catalog/save-destination-root.js";
11
+ import { buildPromptExportEnvelope as k, buildPromptExportFileName as A, serializePromptExport as j } from "./prompt/export-prompt.js";
12
+ import { PROMPT_CONTENT_MAX_LENGTH as M, PROMPT_COUNTER_ANNOUNCE_THRESHOLD as N, PROMPT_DESCRIPTION_MAX_LENGTH as P, PROMPT_FIELD_VALIDATORS as F, PROMPT_NAME_MAX_LENGTH as I, PromptFieldError as L, buildPromptPath as R, getRemainingCharacters as z, validatePromptContent as B, validatePromptDescription as V, validatePromptName as H } from "./prompt/prompt.js";
13
+ import { usePromptsState as U } from "./prompt/usePromptsState/usePromptsState.js";
14
+ import { getBrowserTimezone as W } from "./shared/browser-timezone.js";
15
+ import { apSchedulerDayToJsDay as G, jsDayToApSchedulerDay as K } from "./shared/cron-weekday.js";
16
+ import { isValidAbsoluteUrl as q, isValidFeaturesData as J, parseFeaturesData as Y } from "./shared/custom-apps.js";
17
+ import { EXTERNAL_SERVICE_SIGNIN_METHOD as X, PendingSigninEventKind as Z, TOOLSET_SIGNIN_METHOD as Q } from "./shared/client-channel.js";
18
+ import { ColorScheme as $, applyThemeColors as ee, getOsPreferredTheme as te } from "./shared/theme-colors.js";
19
+ import { useUsageData as ne } from "./usage/useUsageData/useUsageData.js";
20
+ import { triggerBrowserDownload as re } from "./files/browser-download.js";
21
+ import { usePersistedState as ie } from "./shared/usePersistedState/usePersistedState.js";
22
+ import { useAppVersionCheck as ae } from "./shared/useAppVersionCheck/useAppVersionCheck.js";
23
+ import { getCleanedLocationTarget as oe } from "./shared/url-cleanup.js";
24
+ import { OrgUnitsStatus as se } from "./org-units/types.js";
25
+ import { useOrgUnits as ce } from "./org-units/useOrgUnits/useOrgUnits.js";
26
+ import { OrgUnitFolderGuardPurpose as le, buildFolderGuards as ue, getOrgUnitNamespace as de, toPublishDisabledReason as fe } from "./org-units/org-unit-guards.js";
27
+ import { useFolderGuards as pe } from "./org-units/useFolderGuards/useFolderGuards.js";
28
+ export { $ as ColorScheme, X as EXTERNAL_SERVICE_SIGNIN_METHOD, le as OrgUnitFolderGuardPurpose, se as OrgUnitsStatus, M as PROMPT_CONTENT_MAX_LENGTH, N as PROMPT_COUNTER_ANNOUNCE_THRESHOLD, P as PROMPT_DESCRIPTION_MAX_LENGTH, F as PROMPT_FIELD_VALIDATORS, I as PROMPT_NAME_MAX_LENGTH, Z as PendingSigninEventKind, L as PromptFieldError, b as PromptSource, O as SaveDestinationRoot, Q as TOOLSET_SIGNIN_METHOD, G as apSchedulerDayToJsDay, f as appendLocaleCode, ee as applyThemeColors, p as buildAdditionalLocaleOptions, T as buildExternalServiceScopeId, ue as buildFolderGuards, k as buildPromptExportEnvelope, A as buildPromptExportFileName, R as buildPromptPath, m as composeLocalePayload, a as createCsrfMiddleware, o as createUnauthorizedMiddleware, h as decomposeLocalizedFields, v as formatCalendarDate, e as getAcceptInvitationErrorItemName, t as getApiErrorDetails, n as getApiErrorMessage, r as getApiErrorStatus, W as getBrowserTimezone, oe as getCleanedLocationTarget, E as getExternalServiceFallbackName, de as getOrgUnitNamespace, te as getOsPreferredTheme, z as getRemainingCharacters, S as getRunnerSchemas, s as includesIgnoreCase, i as isConversationNotFoundError, C as isCustomAppSchema, w as isQuickAppSchema, q as isValidAbsoluteUrl, J as isValidFeaturesData, K as jsDayToApSchedulerDay, y as padTwoDigits, D as parseExternalServiceUrl, Y as parseFeaturesData, x as parsePromptResourceUrl, g as resolveLocalizedText, c as safeDecodeURI, l as safeDecodeURIComponent, j as serializePromptExport, u as stripSurroundingSlashes, d as stripTrailingSlashes, _ as toBaseLocale, fe as toPublishDisabledReason, re as triggerBrowserDownload, ae as useAppVersionCheck, pe as useFolderGuards, ce as useOrgUnits, ie as usePersistedState, U as usePromptsState, ne as useUsageData, B as validatePromptContent, V as validatePromptDescription, H as validatePromptName };
@@ -1,21 +0,0 @@
1
- /** APScheduler `day` expression for the last day of the month. */
2
- export declare const CRON_LAST_DAY_OF_MONTH = "last";
3
- /**
4
- * Calendar days between `date`'s UTC date and its local date: `-1` when UTC is
5
- * still on the previous day (east of UTC), `1` when it has reached the next.
6
- */
7
- export declare const getUtcDayShift: (date: Date) => number;
8
- /**
9
- * Converts a local day-of-month to the UTC `day` cron value. The local 1st
10
- * shifted back is always the previous month's last day, hence `'last'`. The
11
- * local 31st shifted forward stays `'1'`: a single cron field cannot express
12
- * "the 1st after a 31-day month only".
13
- */
14
- export declare const toUtcCronDayOfMonth: (localDay: number, utcDayShift: number) => string;
15
- /**
16
- * Inverts {@link toUtcCronDayOfMonth}; returns `undefined` for a value the
17
- * form cannot represent. A UTC 31st shifted forward maps to the 1st, so tasks
18
- * saved before `'last'` was emitted still open in the editor.
19
- */
20
- export declare const toLocalDayOfMonth: (utcDay: string, utcDayShift: number) => string | undefined;
21
- //# sourceMappingURL=cron-day-of-month.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cron-day-of-month.d.ts","sourceRoot":"","sources":["../../src/shared/cron-day-of-month.ts"],"names":[],"mappings":"AAQA,kEAAkE;AAClE,eAAO,MAAM,sBAAsB,SAAS,CAAC;AAK7C;;;GAGG;AACH,eAAO,MAAM,cAAc,GAAI,MAAM,IAAI,KAAG,MAKzC,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,aAAa,MAAM,KAClB,MAKF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,MAAM,EACd,aAAa,MAAM,KAClB,MAAM,GAAG,SAcX,CAAC"}
@@ -1,13 +0,0 @@
1
- //#region src/shared/cron-day-of-month.ts
2
- var e = "last", t = (e) => Math.round((Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate()) - Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())) / 864e5), n = (t, n) => {
3
- let r = t + n;
4
- return r < 1 ? e : r > 31 ? "1" : String(r);
5
- }, r = (e, t) => {
6
- if (e === "last") return t === -1 ? "1" : void 0;
7
- let n = Number(e);
8
- if (!/^\d+$/.test(e) || n < 1 || n > 31) return;
9
- let r = n - t;
10
- return r < 1 ? "31" : r > 31 ? "1" : String(r);
11
- };
12
- //#endregion
13
- export { e as CRON_LAST_DAY_OF_MONTH, t as getUtcDayShift, r as toLocalDayOfMonth, n as toUtcCronDayOfMonth };