@epam/ai-dial-scheduled-tasks 1.3.0-dev.90 → 1.3.0-dev.96
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/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-value-B41Uk26Z.js";
|
|
2
2
|
import { ConfirmationDialog as l, ConfirmationIdentityRow as u, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as d, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as f, MDMessageViewer as p, PanelEmptyState as m, ResourceSummary as h, TextRefinementField as g, buildCssVars as _, mergeClasses as v, useAvailableHeightCap as y, useIsMobile as b, useTextRefinement as x, useUnsavedChangesGuard as ee } from "@epam/ai-dial-chat-shared";
|
|
3
|
-
import { Accordion as S, ButtonAppearance as C, ButtonDropdown as te, ButtonVariant as w, Calendar as T, CalendarMode as E, CardShell as D, ConfirmationPopupVariant as ne, DIAL_ICON_SIZE as O, DIAL_KIT_ICON_STROKE as k, ElementSize as re, FolderPath as ie, GhostButton as A, GhostIconButton as ae, Highlight as oe, Input as se, Label as ce, MenuItemMark as le, NeutralButton as
|
|
4
|
-
import { IconAlertTriangle as
|
|
5
|
-
import { Suspense as Te, lazy as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { BuilderFormContainer as
|
|
8
|
-
import { LazyMarkdownEditor as
|
|
3
|
+
import { Accordion as S, ButtonAppearance as C, ButtonDropdown as te, ButtonVariant as w, Calendar as T, CalendarMode as E, CardShell as D, ConfirmationPopupVariant as ne, DIAL_ICON_SIZE as O, DIAL_KIT_ICON_STROKE as k, ElementSize as re, FolderPath as ie, GhostButton as A, GhostIconButton as ae, Highlight as oe, Input as se, Label as ce, MenuItemMark as le, NeutralButton as j, NumberInput as ue, PrimaryButton as M, Search as de, Select as fe, Skeleton as N, SkeletonVariant as P, Spinner as pe, Switch as me, Tabs as he, Textarea as ge, Tooltip as F } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconAlertTriangle as _e, IconArrowNarrowLeft as ve, IconArrowsSort as ye, IconCheck as I, IconCircleCheck as be, IconCircleX as L, IconClipboardX as R, IconClockHour3 as xe, IconPencilMinus as z, IconPlayerPause as B, IconPlayerPlay as Se, IconPlus as Ce, IconTrashX as we } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as Te, lazy as Ee, useCallback as De, useEffect as Oe, useId as ke, useLayoutEffect as V, useMemo as Ae, useRef as H, useState as je } from "react";
|
|
6
|
+
import { Fragment as Me, jsx as U, jsxs as W } from "react/jsx-runtime";
|
|
7
|
+
import { BuilderFormContainer as Ne } from "@epam/ai-dial-builder-form";
|
|
8
|
+
import { LazyMarkdownEditor as Pe } from "@epam/ai-dial-ui-kit/editors";
|
|
9
9
|
//#region src/constants/public-class-names.ts
|
|
10
|
-
var
|
|
10
|
+
var Fe = {
|
|
11
11
|
card: "dial-scheduled-tasks-card",
|
|
12
12
|
cardGrid: "dial-scheduled-tasks-card-grid",
|
|
13
13
|
refineFeedback: "dial-scheduled-tasks-refine-feedback"
|
|
14
|
-
},
|
|
14
|
+
}, G = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.Scheduled = "scheduled", e.Paused = "paused", e.Completed = "completed", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), K = /* @__PURE__ */ function(e) {
|
|
17
17
|
return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
|
|
18
|
-
}({}),
|
|
18
|
+
}({}), q = (e) => {
|
|
19
19
|
switch (e.presentationStatus) {
|
|
20
|
-
case
|
|
21
|
-
case
|
|
22
|
-
case
|
|
20
|
+
case K.Active: return G.Scheduled;
|
|
21
|
+
case K.Paused: return G.Paused;
|
|
22
|
+
case K.Completed: return G.Completed;
|
|
23
23
|
}
|
|
24
|
-
return e.isCompleted ?
|
|
24
|
+
return e.isCompleted ? G.Completed : e.isActive === !1 ? G.Paused : G.Scheduled;
|
|
25
25
|
}, J = {
|
|
26
26
|
schedulePill: "_schedulePill_1cwco_1",
|
|
27
27
|
scheduleLabel: "_scheduleLabel_1cwco_6",
|
|
@@ -29,34 +29,34 @@ var Ne = {
|
|
|
29
29
|
pausedLabel: "_pausedLabel_1cwco_15",
|
|
30
30
|
completedPill: "_completedPill_1cwco_19",
|
|
31
31
|
completedLabel: "_completedLabel_1cwco_24"
|
|
32
|
-
},
|
|
33
|
-
[
|
|
32
|
+
}, Ie = {
|
|
33
|
+
[G.Scheduled]: {
|
|
34
34
|
pillClassName: "inline-block rounded-lg border px-2 py-1",
|
|
35
35
|
wrapperClassName: J.schedulePill,
|
|
36
36
|
labelClassName: J.scheduleLabel
|
|
37
37
|
},
|
|
38
|
-
[
|
|
38
|
+
[G.Paused]: {
|
|
39
39
|
pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
|
|
40
40
|
wrapperClassName: J.pausedPill,
|
|
41
41
|
labelClassName: J.pausedLabel,
|
|
42
|
-
renderIcon: () => /* @__PURE__ */ U(
|
|
42
|
+
renderIcon: () => /* @__PURE__ */ U(B, {
|
|
43
43
|
size: O.SM,
|
|
44
44
|
"aria-hidden": !0,
|
|
45
45
|
stroke: k
|
|
46
46
|
})
|
|
47
47
|
},
|
|
48
|
-
[
|
|
48
|
+
[G.Completed]: {
|
|
49
49
|
pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
|
|
50
50
|
wrapperClassName: J.completedPill,
|
|
51
51
|
labelClassName: J.completedLabel,
|
|
52
|
-
renderIcon: () => /* @__PURE__ */ U(
|
|
52
|
+
renderIcon: () => /* @__PURE__ */ U(I, {
|
|
53
53
|
size: O.SM,
|
|
54
54
|
"aria-hidden": !0,
|
|
55
55
|
stroke: k
|
|
56
56
|
})
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } =
|
|
58
|
+
}, Le = ({ status: e, text: t, textClassName: n = "dial-tiny-text", className: r }) => {
|
|
59
|
+
let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } = Ie[e];
|
|
60
60
|
return /* @__PURE__ */ W("span", {
|
|
61
61
|
className: v(i, n, a, o, r),
|
|
62
62
|
children: [s && s(), t]
|
|
@@ -69,17 +69,17 @@ var Ne = {
|
|
|
69
69
|
newBadge: "_newBadge_hmbo0_18",
|
|
70
70
|
locationDivider: "_locationDivider_hmbo0_23",
|
|
71
71
|
card: "_card_hmbo0_34"
|
|
72
|
-
},
|
|
73
|
-
let o = b(), s = r?.newBadgeLabel ?? "NEW", c = r?.pausedBadgeLabel ?? "Paused", l = r?.completedBadgeLabel ?? "Completed", { colors: u, typography: d } = i ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", p = d?.descriptionClassName ?? "dial-small-text", m = d?.descriptionSizeClassName ?? "dial-tiny-text", h = d?.scheduleLabelClassName ?? "dial-tiny-text", g = d?.pausedBadgeClassName ?? "dial-tiny-text", y = d?.completedBadgeClassName ?? "dial-tiny-text", x = d?.locationLabelClassName ?? "dial-tiny-text", ee = d?.locationLeafClassName ?? "dial-tiny-semi-text", S = d?.newBadgeClassName ?? "dial-tiny-semi-text", C =
|
|
74
|
-
[
|
|
72
|
+
}, Re = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
|
|
73
|
+
let o = b(), s = r?.newBadgeLabel ?? "NEW", c = r?.pausedBadgeLabel ?? "Paused", l = r?.completedBadgeLabel ?? "Completed", { colors: u, typography: d } = i ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", p = d?.descriptionClassName ?? "dial-small-text", m = d?.descriptionSizeClassName ?? "dial-tiny-text", h = d?.scheduleLabelClassName ?? "dial-tiny-text", g = d?.pausedBadgeClassName ?? "dial-tiny-text", y = d?.completedBadgeClassName ?? "dial-tiny-text", x = d?.locationLabelClassName ?? "dial-tiny-text", ee = d?.locationLeafClassName ?? "dial-tiny-semi-text", S = d?.newBadgeClassName ?? "dial-tiny-semi-text", C = q(e), { text: te, textClassName: w } = {
|
|
74
|
+
[G.Scheduled]: {
|
|
75
75
|
text: e.scheduleLabel,
|
|
76
76
|
textClassName: h
|
|
77
77
|
},
|
|
78
|
-
[
|
|
78
|
+
[G.Paused]: {
|
|
79
79
|
text: c,
|
|
80
80
|
textClassName: g
|
|
81
81
|
},
|
|
82
|
-
[
|
|
82
|
+
[G.Completed]: {
|
|
83
83
|
text: l,
|
|
84
84
|
textClassName: y
|
|
85
85
|
}
|
|
@@ -111,7 +111,7 @@ var Ne = {
|
|
|
111
111
|
role: n ? "button" : "group",
|
|
112
112
|
"aria-label": e.displayName,
|
|
113
113
|
style: T,
|
|
114
|
-
className: v("h-[var(--st-card-height,232px)]", Y.card, n && "cursor-pointer", a,
|
|
114
|
+
className: v("h-[var(--st-card-height,232px)]", Y.card, n && "cursor-pointer", a, Fe.card),
|
|
115
115
|
...E,
|
|
116
116
|
children: [
|
|
117
117
|
/* @__PURE__ */ W("div", {
|
|
@@ -134,7 +134,7 @@ var Ne = {
|
|
|
134
134
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
135
135
|
children: [/* @__PURE__ */ U("div", {
|
|
136
136
|
className: "flex min-h-[28px] items-center",
|
|
137
|
-
children: /* @__PURE__ */ U(
|
|
137
|
+
children: /* @__PURE__ */ U(Le, {
|
|
138
138
|
status: C,
|
|
139
139
|
text: te,
|
|
140
140
|
textClassName: w
|
|
@@ -148,40 +148,40 @@ var Ne = {
|
|
|
148
148
|
})
|
|
149
149
|
]
|
|
150
150
|
});
|
|
151
|
-
},
|
|
151
|
+
}, ze = { card: "_card_18ivt_1" }, Be = [
|
|
152
152
|
"100%",
|
|
153
153
|
"100%",
|
|
154
154
|
"61%"
|
|
155
|
-
],
|
|
155
|
+
], Ve = "var(--stcs-skeleton-bg)", He = ({ styles: e }) => /* @__PURE__ */ W(D, {
|
|
156
156
|
"aria-hidden": !0,
|
|
157
157
|
style: _({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
158
|
-
className: v("h-[var(--st-card-height,232px)]",
|
|
158
|
+
className: v("h-[var(--st-card-height,232px)]", ze.card),
|
|
159
159
|
children: [
|
|
160
|
-
/* @__PURE__ */ U(
|
|
161
|
-
variant:
|
|
160
|
+
/* @__PURE__ */ U(N, {
|
|
161
|
+
variant: P.Rectangular,
|
|
162
162
|
width: "60%",
|
|
163
163
|
height: "20px",
|
|
164
|
-
color:
|
|
164
|
+
color: Ve,
|
|
165
165
|
className: "shrink-0"
|
|
166
166
|
}),
|
|
167
167
|
/* @__PURE__ */ U("div", {
|
|
168
168
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
169
|
-
children:
|
|
170
|
-
variant:
|
|
169
|
+
children: Be.map((e, t) => /* @__PURE__ */ U(N, {
|
|
170
|
+
variant: P.Rectangular,
|
|
171
171
|
width: e,
|
|
172
172
|
height: "16px",
|
|
173
|
-
color:
|
|
173
|
+
color: Ve
|
|
174
174
|
}, t))
|
|
175
175
|
}),
|
|
176
|
-
/* @__PURE__ */ U(
|
|
177
|
-
variant:
|
|
176
|
+
/* @__PURE__ */ U(N, {
|
|
177
|
+
variant: P.Rectangular,
|
|
178
178
|
width: "110px",
|
|
179
179
|
height: "28px",
|
|
180
|
-
color:
|
|
180
|
+
color: Ve,
|
|
181
181
|
className: "shrink-0 rounded-lg"
|
|
182
182
|
})
|
|
183
183
|
]
|
|
184
|
-
}),
|
|
184
|
+
}), Ue = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ W("div", {
|
|
185
185
|
style: {
|
|
186
186
|
"--st-grid-min-card-width": s?.minCardWidth,
|
|
187
187
|
"--st-grid-gap": s?.gap,
|
|
@@ -191,14 +191,14 @@ var Ne = {
|
|
|
191
191
|
gap: "var(--st-grid-gap, 20px)",
|
|
192
192
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, max(var(--st-grid-min-card-width, 320px), calc((100% - (var(--st-grid-columns) - 1) * var(--st-grid-gap, 20px)) / var(--st-grid-columns)))), 1fr))"
|
|
193
193
|
},
|
|
194
|
-
className: v("mx-auto grid w-full min-w-0",
|
|
195
|
-
children: [e.map((e) => /* @__PURE__ */ U(
|
|
194
|
+
className: v("mx-auto grid w-full min-w-0", Fe.cardGrid),
|
|
195
|
+
children: [e.map((e) => /* @__PURE__ */ U(Re, {
|
|
196
196
|
item: e,
|
|
197
197
|
searchQuery: t,
|
|
198
198
|
onCardClick: n,
|
|
199
199
|
labels: r,
|
|
200
200
|
styles: i
|
|
201
|
-
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ U(
|
|
201
|
+
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ U(He, { styles: o }, `skeleton-${t}`))]
|
|
202
202
|
}), X = {
|
|
203
203
|
container: "_container_3vz4t_2",
|
|
204
204
|
subtitle: "_subtitle_3vz4t_6",
|
|
@@ -206,33 +206,33 @@ var Ne = {
|
|
|
206
206
|
sortButton: "_sortButton_3vz4t_19",
|
|
207
207
|
createButton: "_createButton_3vz4t_10",
|
|
208
208
|
sortControlHidden: "_sortControlHidden_3vz4t_49"
|
|
209
|
-
},
|
|
209
|
+
}, We = /* @__PURE__ */ U(xe, {
|
|
210
210
|
size: 48,
|
|
211
211
|
stroke: 1,
|
|
212
212
|
"aria-hidden": !0
|
|
213
|
-
}),
|
|
213
|
+
}), Ge = (e, t, n, r, i, a) => {
|
|
214
214
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
215
|
-
},
|
|
215
|
+
}, Ke = (e) => {
|
|
216
216
|
if (!e || e === document.body) return null;
|
|
217
217
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
218
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
219
|
-
},
|
|
218
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Ke(e.parentElement);
|
|
219
|
+
}, qe = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: r, sortKey: i, onSortChange: a, items: o, isLoading: s = !1, error: c, onRetry: l, hasMore: u = !1, isLoadingMore: d = !1, skeletonCount: f = 6, onLoadMore: p, onCardClick: h, banner: g, styles: y, sortIcon: b, className: x, gridLayout: ee, cardStyles: S, loadMoreError: T, onRetryLoadMore: E }) => {
|
|
220
220
|
let { colors: D, typography: ne } = y ?? {}, ie = ne?.titleClassName ?? "dial-h1-text", ae = ne?.subtitleClassName ?? "dial-body-text", oe = _({
|
|
221
221
|
"--st-bg": D?.background,
|
|
222
222
|
"--st-subtitle-text": D?.subtitleText,
|
|
223
223
|
"--st-sort-text": D?.sortButtonText
|
|
224
224
|
}), se = (e) => {
|
|
225
225
|
r(e ?? "");
|
|
226
|
-
}, [ce,
|
|
227
|
-
|
|
228
|
-
}, []),
|
|
229
|
-
|
|
226
|
+
}, [ce, j] = je(!1), [ue, fe] = je(!1), N = H(null), P = De(() => {
|
|
227
|
+
fe(!0);
|
|
228
|
+
}, []), me = De(() => {
|
|
229
|
+
fe(!1);
|
|
230
230
|
}, []);
|
|
231
|
-
|
|
232
|
-
let e =
|
|
233
|
-
|
|
234
|
-
}, [
|
|
235
|
-
let
|
|
231
|
+
V(() => {
|
|
232
|
+
let e = N.current;
|
|
233
|
+
ue && ce && e != null && e.offsetParent == null && j(!1);
|
|
234
|
+
}, [ue, ce]);
|
|
235
|
+
let he = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, ge = Ae(() => e.sortOptions.map((e) => ({
|
|
236
236
|
key: e.value,
|
|
237
237
|
label: e.label,
|
|
238
238
|
mark: le.Check,
|
|
@@ -242,11 +242,11 @@ var Ne = {
|
|
|
242
242
|
e.sortOptions,
|
|
243
243
|
i,
|
|
244
244
|
a
|
|
245
|
-
]),
|
|
246
|
-
|
|
247
|
-
let e =
|
|
245
|
+
]), F = Ge(s, d, !!c, o.length, n.trim().length > 0, e), _e = H(null);
|
|
246
|
+
Oe(() => {
|
|
247
|
+
let e = _e.current;
|
|
248
248
|
if (!e || !p) return;
|
|
249
|
-
let t =
|
|
249
|
+
let t = Ke(e.parentElement);
|
|
250
250
|
if (!t) return;
|
|
251
251
|
let n = () => {
|
|
252
252
|
if (d || s || T || !u) return;
|
|
@@ -261,7 +261,7 @@ var Ne = {
|
|
|
261
261
|
T,
|
|
262
262
|
p
|
|
263
263
|
]);
|
|
264
|
-
let
|
|
264
|
+
let ve = () => s ? /* @__PURE__ */ U(pe, {}) : c ? /* @__PURE__ */ W("div", {
|
|
265
265
|
className: "flex flex-col items-center gap-3",
|
|
266
266
|
children: [/* @__PURE__ */ U("p", {
|
|
267
267
|
className: v(ae, X.subtitle),
|
|
@@ -275,11 +275,11 @@ var Ne = {
|
|
|
275
275
|
children: e.noResultsLabel
|
|
276
276
|
}) : /* @__PURE__ */ U(m, {
|
|
277
277
|
label: e.emptyStateLabel,
|
|
278
|
-
icon:
|
|
278
|
+
icon: We
|
|
279
279
|
}) : /* @__PURE__ */ W("div", {
|
|
280
280
|
className: "flex w-full flex-col gap-6",
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */ U(
|
|
282
|
+
/* @__PURE__ */ U(Ue, {
|
|
283
283
|
items: o,
|
|
284
284
|
searchQuery: n,
|
|
285
285
|
onCardClick: h,
|
|
@@ -301,12 +301,12 @@ var Ne = {
|
|
|
301
301
|
})]
|
|
302
302
|
}),
|
|
303
303
|
/* @__PURE__ */ U("div", {
|
|
304
|
-
ref:
|
|
304
|
+
ref: _e,
|
|
305
305
|
"aria-hidden": !0,
|
|
306
306
|
className: "h-px w-full"
|
|
307
307
|
})
|
|
308
308
|
]
|
|
309
|
-
}),
|
|
309
|
+
}), I = s || !!c || o.length === 0;
|
|
310
310
|
return /* @__PURE__ */ W("div", {
|
|
311
311
|
style: oe,
|
|
312
312
|
className: v("flex h-full w-full flex-col gap-4 overflow-y-auto px-4 py-4 desktop:gap-6 desktop:px-8", X.container, x),
|
|
@@ -322,7 +322,7 @@ var Ne = {
|
|
|
322
322
|
className: v("mt-1", ae, X.subtitle),
|
|
323
323
|
children: e.subtitle
|
|
324
324
|
})]
|
|
325
|
-
}), /* @__PURE__ */ U(
|
|
325
|
+
}), /* @__PURE__ */ U(M, {
|
|
326
326
|
label: e.createButtonLabel,
|
|
327
327
|
textClassName: X.createButtonLabel,
|
|
328
328
|
"aria-label": e.createButtonLabel,
|
|
@@ -340,22 +340,22 @@ var Ne = {
|
|
|
340
340
|
children: [/* @__PURE__ */ U("div", {
|
|
341
341
|
role: "search",
|
|
342
342
|
className: "flex-1",
|
|
343
|
-
children: /* @__PURE__ */ U(
|
|
343
|
+
children: /* @__PURE__ */ U(de, {
|
|
344
344
|
value: n,
|
|
345
345
|
onChange: se,
|
|
346
346
|
placeholder: e.searchPlaceholder,
|
|
347
347
|
clearLabel: e.clearSearchLabel,
|
|
348
348
|
"aria-label": e.searchAriaLabel,
|
|
349
349
|
size: re.Large,
|
|
350
|
-
onFocus:
|
|
351
|
-
onBlur:
|
|
350
|
+
onFocus: P,
|
|
351
|
+
onBlur: me
|
|
352
352
|
})
|
|
353
353
|
}), e.sortOptions.length > 0 && /* @__PURE__ */ U("div", {
|
|
354
|
-
ref:
|
|
355
|
-
className: v(
|
|
354
|
+
ref: N,
|
|
355
|
+
className: v(ue && X.sortControlHidden),
|
|
356
356
|
children: /* @__PURE__ */ U(te, {
|
|
357
|
-
items:
|
|
358
|
-
label:
|
|
357
|
+
items: ge,
|
|
358
|
+
label: he,
|
|
359
359
|
variant: w.Primary,
|
|
360
360
|
appearance: C.Ghost,
|
|
361
361
|
iconBefore: b === void 0 ? /* @__PURE__ */ U(ye, {
|
|
@@ -372,21 +372,21 @@ var Ne = {
|
|
|
372
372
|
role: "status",
|
|
373
373
|
"aria-live": "polite",
|
|
374
374
|
className: "sr-only",
|
|
375
|
-
children:
|
|
375
|
+
children: F
|
|
376
376
|
}),
|
|
377
377
|
/* @__PURE__ */ U("div", {
|
|
378
|
-
className: v("mx-auto flex size-full w-full min-w-0 flex-col",
|
|
379
|
-
children:
|
|
378
|
+
className: v("mx-auto flex size-full w-full min-w-0 flex-col", I && "items-center justify-center"),
|
|
379
|
+
children: ve()
|
|
380
380
|
})
|
|
381
381
|
]
|
|
382
382
|
});
|
|
383
|
-
},
|
|
383
|
+
}, Je = /* @__PURE__ */ function(e) {
|
|
384
384
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
385
|
-
}({}),
|
|
385
|
+
}({}), Ye = (e) => e == null ? "" : typeof e == "string" ? e.trim() : Array.isArray(e) ? e.length ? JSON.stringify(e) : "" : JSON.stringify(e), Xe = (e, t) => {
|
|
386
386
|
let n = new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
387
|
-
for (let r of n) if (
|
|
387
|
+
for (let r of n) if (Ye(e[r]) !== Ye(t[r])) return !0;
|
|
388
388
|
return !1;
|
|
389
|
-
},
|
|
389
|
+
}, Ze = { error: "_error_v2pfn_4" }, Qe = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
|
|
390
390
|
let o = H(/* @__PURE__ */ new Date()).current;
|
|
391
391
|
return /* @__PURE__ */ W("div", {
|
|
392
392
|
className: "flex flex-col gap-1",
|
|
@@ -402,7 +402,7 @@ var Ne = {
|
|
|
402
402
|
},
|
|
403
403
|
invalid: !!i
|
|
404
404
|
}), i && /* @__PURE__ */ U("p", {
|
|
405
|
-
className: v(a,
|
|
405
|
+
className: v(a, Ze.error),
|
|
406
406
|
children: i
|
|
407
407
|
})]
|
|
408
408
|
});
|
|
@@ -413,50 +413,50 @@ var Ne = {
|
|
|
413
413
|
instructionsError: "_instructionsError_1253x_18",
|
|
414
414
|
refineFeedback: "_refineFeedback_1253x_22",
|
|
415
415
|
refineError: "_refineError_1253x_26"
|
|
416
|
-
},
|
|
417
|
-
let le =
|
|
418
|
-
if (
|
|
419
|
-
|
|
416
|
+
}, $e = Ee(async () => ({ default: (await Pe()).MarkdownEditor })), et = ({ labels: n, values: r, initialValues: s, errors: u, modelSelector: p, modelLabelId: m, skillSelector: h, onFieldChange: b, onBack: S, onCancel: C, onSubmit: te, isSubmitting: w = !1, onRefineDescription: D, onRefineInstructions: re, markdownEditorTheme: ie, backIcon: A, className: ae, styles: oe }) => {
|
|
417
|
+
let le = ke(), j = ke(), M = H(void 0), de = (e) => e ? async (t, n) => {
|
|
418
|
+
if (M.current && !M.current.aborted) throw new DOMException("Busy", "AbortError");
|
|
419
|
+
M.current = n;
|
|
420
420
|
try {
|
|
421
421
|
return await e(t, n);
|
|
422
422
|
} finally {
|
|
423
|
-
|
|
423
|
+
M.current === n && (M.current = void 0);
|
|
424
424
|
}
|
|
425
|
-
} : void 0,
|
|
425
|
+
} : void 0, N = x({
|
|
426
426
|
value: r.description ?? "",
|
|
427
427
|
onChange: (e) => b("description", e),
|
|
428
|
-
onRefine:
|
|
428
|
+
onRefine: de(D),
|
|
429
429
|
disabled: w
|
|
430
|
-
}),
|
|
430
|
+
}), P = x({
|
|
431
431
|
value: r.prompt,
|
|
432
432
|
onChange: (e) => b("prompt", e),
|
|
433
|
-
onRefine:
|
|
433
|
+
onRefine: de(re),
|
|
434
434
|
disabled: w
|
|
435
|
-
}),
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
|
|
439
|
-
}),
|
|
440
|
-
|
|
441
|
-
}),
|
|
442
|
-
"--stcf-details-border":
|
|
443
|
-
"--stcf-subtitle-text":
|
|
444
|
-
"--stcf-error-text":
|
|
445
|
-
"--stcf-refine-action-text":
|
|
446
|
-
"--stcf-refine-error-text":
|
|
447
|
-
}),
|
|
448
|
-
feedbackClassName: v(
|
|
435
|
+
}), me = N.isPending || P.isPending, he = () => {
|
|
436
|
+
N.reset(), P.reset();
|
|
437
|
+
}, F = ee(!!(s && Xe(r, s))), _e = () => F.guard(() => {
|
|
438
|
+
he(), S();
|
|
439
|
+
}), ye = () => F.guard(() => {
|
|
440
|
+
he(), C();
|
|
441
|
+
}), I = y(), be = !r.skillUrls?.length, [L, R] = je(), xe = H(/* @__PURE__ */ new Date()).current, { colors: z, typography: B, layout: Se } = oe ?? {}, Ce = B?.titleClassName ?? "dial-h1-text", we = B?.sectionTitleClassName ?? "dial-body-semi-text", Ee = B?.sectionSubtitleClassName ?? "dial-tiny-text", De = B?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", V = B?.instructionsErrorClassName ?? "dial-small-text", Ae = _({
|
|
442
|
+
"--stcf-details-border": z?.detailsColumnBorder,
|
|
443
|
+
"--stcf-subtitle-text": z?.sectionSubtitleText,
|
|
444
|
+
"--stcf-error-text": z?.instructionsErrorText,
|
|
445
|
+
"--stcf-refine-action-text": z?.refineActionText,
|
|
446
|
+
"--stcf-refine-error-text": z?.refineErrorText
|
|
447
|
+
}), Pe = {
|
|
448
|
+
feedbackClassName: v(z?.refineActionText && Z.refineFeedback, B?.refineFeedbackClassName, Fe.refineFeedback),
|
|
449
449
|
errorClassName: Z.refineError
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
},
|
|
453
|
-
|
|
454
|
-
},
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}, [
|
|
458
|
-
let
|
|
459
|
-
return /* @__PURE__ */ W(
|
|
450
|
+
}, G = (e) => {
|
|
451
|
+
R(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), b("time", e.target.value);
|
|
452
|
+
}, K = (e) => {
|
|
453
|
+
R(void 0), b("time", typeof e == "string" ? e : "");
|
|
454
|
+
}, q = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
|
|
455
|
+
Oe(() => {
|
|
456
|
+
q || R(void 0);
|
|
457
|
+
}, [q]);
|
|
458
|
+
let J = q ? L ?? u.time : void 0, Ie = (e) => b("runAt", e), Le = w || me || !r.displayName.trim() || !r.modelId || !r.prompt.trim() && !r.skillUrls?.length || !!u.skillUrls || q && !r.time || !!J;
|
|
459
|
+
return /* @__PURE__ */ W(Me, { children: [/* @__PURE__ */ U(Ne, {
|
|
460
460
|
labels: {
|
|
461
461
|
title: n.pageTitle,
|
|
462
462
|
backButtonLabel: n.backButtonLabel,
|
|
@@ -464,13 +464,13 @@ var Ne = {
|
|
|
464
464
|
submitButtonLabel: n.createButtonLabel,
|
|
465
465
|
submittingLabel: n.submittingLabel ?? "Saving"
|
|
466
466
|
},
|
|
467
|
-
onBack:
|
|
468
|
-
onCancel:
|
|
467
|
+
onBack: _e,
|
|
468
|
+
onCancel: ye,
|
|
469
469
|
onSubmit: () => {
|
|
470
|
-
!
|
|
470
|
+
!Le && (!M.current || M.current.aborted) && te();
|
|
471
471
|
},
|
|
472
472
|
isCancelDisabled: w,
|
|
473
|
-
isSubmitDisabled:
|
|
473
|
+
isSubmitDisabled: Le,
|
|
474
474
|
isSubmitting: w,
|
|
475
475
|
backIcon: A === void 0 ? /* @__PURE__ */ U(ve, {
|
|
476
476
|
size: O.LG,
|
|
@@ -479,18 +479,18 @@ var Ne = {
|
|
|
479
479
|
className: "rtl:scale-x-[-1]"
|
|
480
480
|
}) : A,
|
|
481
481
|
layout: {
|
|
482
|
-
sideColumnWidth:
|
|
483
|
-
columnGap:
|
|
482
|
+
sideColumnWidth: Se?.detailsWidth,
|
|
483
|
+
columnGap: Se?.columnGap,
|
|
484
484
|
reserveEndColumn: !1
|
|
485
485
|
},
|
|
486
486
|
className: ae,
|
|
487
487
|
styles: {
|
|
488
|
-
colors: { background:
|
|
488
|
+
colors: { background: z?.background },
|
|
489
489
|
header: {
|
|
490
|
-
colors: { borderColor:
|
|
491
|
-
typography: { fontClassName:
|
|
490
|
+
colors: { borderColor: z?.headerBorder },
|
|
491
|
+
typography: { fontClassName: Ce }
|
|
492
492
|
},
|
|
493
|
-
cssVars:
|
|
493
|
+
cssVars: Ae
|
|
494
494
|
},
|
|
495
495
|
left: /* @__PURE__ */ W("div", {
|
|
496
496
|
role: "group",
|
|
@@ -500,7 +500,7 @@ var Ne = {
|
|
|
500
500
|
/* @__PURE__ */ W("div", {
|
|
501
501
|
className: "flex flex-col gap-1",
|
|
502
502
|
children: [/* @__PURE__ */ U("h2", {
|
|
503
|
-
className:
|
|
503
|
+
className: we,
|
|
504
504
|
children: n.detailsSectionTitle
|
|
505
505
|
}), /* @__PURE__ */ U("p", {
|
|
506
506
|
className: v(Ee, Z.sectionSubtitle),
|
|
@@ -523,14 +523,14 @@ var Ne = {
|
|
|
523
523
|
fieldId: le,
|
|
524
524
|
label: n.descriptionLabel,
|
|
525
525
|
labels: n,
|
|
526
|
-
refinement:
|
|
527
|
-
disabled: w ||
|
|
528
|
-
...
|
|
529
|
-
children: /* @__PURE__ */ U(
|
|
526
|
+
refinement: N,
|
|
527
|
+
disabled: w || me,
|
|
528
|
+
...Pe,
|
|
529
|
+
children: /* @__PURE__ */ U(ge, {
|
|
530
530
|
id: le,
|
|
531
531
|
value: r.description ?? "",
|
|
532
532
|
onChange: (e) => {
|
|
533
|
-
|
|
533
|
+
N.reset(), b("description", e);
|
|
534
534
|
},
|
|
535
535
|
labelProps: D ? void 0 : { label: n.descriptionLabel },
|
|
536
536
|
maxLength: 500,
|
|
@@ -557,7 +557,7 @@ var Ne = {
|
|
|
557
557
|
/* @__PURE__ */ W("div", {
|
|
558
558
|
className: "flex flex-col gap-3",
|
|
559
559
|
children: [
|
|
560
|
-
/* @__PURE__ */ U(
|
|
560
|
+
/* @__PURE__ */ U(fe, {
|
|
561
561
|
labelProps: { label: n.repeatLabel },
|
|
562
562
|
value: r.repeat,
|
|
563
563
|
onChange: (e) => b("repeat", e),
|
|
@@ -566,32 +566,32 @@ var Ne = {
|
|
|
566
566
|
label: e.label
|
|
567
567
|
}))
|
|
568
568
|
}),
|
|
569
|
-
r.repeat === t.OneTime && /* @__PURE__ */ U(
|
|
569
|
+
r.repeat === t.OneTime && /* @__PURE__ */ U(Qe, {
|
|
570
570
|
label: n.runAtLabel,
|
|
571
571
|
value: r.runAt ?? "",
|
|
572
572
|
onChange: Ie,
|
|
573
573
|
error: u.runAt,
|
|
574
574
|
errorClassName: V
|
|
575
575
|
}),
|
|
576
|
-
r.repeat !== t.OneTime && /* @__PURE__ */ W(
|
|
577
|
-
|
|
576
|
+
r.repeat !== t.OneTime && /* @__PURE__ */ W(Me, { children: [
|
|
577
|
+
q && /* @__PURE__ */ W("div", {
|
|
578
578
|
className: "flex flex-col gap-1",
|
|
579
579
|
children: [/* @__PURE__ */ U(T, {
|
|
580
580
|
id: "scheduled-task-time",
|
|
581
581
|
mode: E.Time,
|
|
582
582
|
value: r.time,
|
|
583
|
-
onChange:
|
|
584
|
-
onBlur:
|
|
583
|
+
onChange: K,
|
|
584
|
+
onBlur: G,
|
|
585
585
|
labelProps: {
|
|
586
586
|
label: n.timeLabel,
|
|
587
587
|
required: !0
|
|
588
588
|
},
|
|
589
|
-
invalid: !!
|
|
589
|
+
invalid: !!J,
|
|
590
590
|
disabled: w,
|
|
591
591
|
showTimezone: !0
|
|
592
|
-
}),
|
|
592
|
+
}), J && /* @__PURE__ */ U("p", {
|
|
593
593
|
className: v(V, Z.instructionsError),
|
|
594
|
-
children:
|
|
594
|
+
children: J
|
|
595
595
|
})]
|
|
596
596
|
}),
|
|
597
597
|
r.repeat === t.Weekly && /* @__PURE__ */ W("div", {
|
|
@@ -611,7 +611,7 @@ var Ne = {
|
|
|
611
611
|
children: u.dayOfWeek
|
|
612
612
|
})]
|
|
613
613
|
}),
|
|
614
|
-
r.repeat === t.Monthly && /* @__PURE__ */ U(
|
|
614
|
+
r.repeat === t.Monthly && /* @__PURE__ */ U(ue, {
|
|
615
615
|
id: "scheduled-task-day-of-month",
|
|
616
616
|
integer: !0,
|
|
617
617
|
min: 1,
|
|
@@ -625,7 +625,7 @@ var Ne = {
|
|
|
625
625
|
invalid: !!u.dayOfMonth,
|
|
626
626
|
error: u.dayOfMonth
|
|
627
627
|
}),
|
|
628
|
-
r.repeat === t.Hourly && /* @__PURE__ */ U(
|
|
628
|
+
r.repeat === t.Hourly && /* @__PURE__ */ U(ue, {
|
|
629
629
|
id: "scheduled-task-minute",
|
|
630
630
|
integer: !0,
|
|
631
631
|
min: 0,
|
|
@@ -648,7 +648,7 @@ var Ne = {
|
|
|
648
648
|
mode: E.Date,
|
|
649
649
|
value: e(r.startDate),
|
|
650
650
|
onChange: (e) => b("startDate", i(e)),
|
|
651
|
-
minDate:
|
|
651
|
+
minDate: xe,
|
|
652
652
|
labelProps: { label: n.startDateLabel },
|
|
653
653
|
placeholder: n.startDatePlaceholder,
|
|
654
654
|
invalid: !!u.startDate
|
|
@@ -663,7 +663,7 @@ var Ne = {
|
|
|
663
663
|
mode: E.Date,
|
|
664
664
|
value: e(r.endDate),
|
|
665
665
|
onChange: (e) => b("endDate", i(e)),
|
|
666
|
-
minDate:
|
|
666
|
+
minDate: xe,
|
|
667
667
|
labelProps: { label: n.endDateLabel },
|
|
668
668
|
placeholder: n.endDatePlaceholder,
|
|
669
669
|
invalid: !!u.endDate
|
|
@@ -686,7 +686,7 @@ var Ne = {
|
|
|
686
686
|
/* @__PURE__ */ W("div", {
|
|
687
687
|
className: "flex flex-col gap-1",
|
|
688
688
|
children: [/* @__PURE__ */ U("h2", {
|
|
689
|
-
className:
|
|
689
|
+
className: we,
|
|
690
690
|
children: n.configurationSectionTitle
|
|
691
691
|
}), /* @__PURE__ */ U("p", {
|
|
692
692
|
className: v(Ee, Z.sectionSubtitle),
|
|
@@ -707,33 +707,33 @@ var Ne = {
|
|
|
707
707
|
className: "flex w-full max-w-[996px] min-w-0 flex-col",
|
|
708
708
|
children: /* @__PURE__ */ U(g, {
|
|
709
709
|
isEnabled: !!re,
|
|
710
|
-
fieldId:
|
|
711
|
-
labelClassName:
|
|
710
|
+
fieldId: j,
|
|
711
|
+
labelClassName: De,
|
|
712
712
|
label: n.instructionsLabel,
|
|
713
|
-
required:
|
|
713
|
+
required: be,
|
|
714
714
|
labels: n,
|
|
715
|
-
refinement:
|
|
716
|
-
disabled: w ||
|
|
717
|
-
...
|
|
715
|
+
refinement: P,
|
|
716
|
+
disabled: w || me,
|
|
717
|
+
...Pe,
|
|
718
718
|
children: /* @__PURE__ */ W("div", {
|
|
719
719
|
className: "flex flex-1 flex-col gap-1",
|
|
720
720
|
children: [
|
|
721
721
|
!re && /* @__PURE__ */ U(ce, {
|
|
722
|
-
htmlFor:
|
|
723
|
-
className:
|
|
722
|
+
htmlFor: j,
|
|
723
|
+
className: De,
|
|
724
724
|
label: n.instructionsLabel,
|
|
725
|
-
required:
|
|
725
|
+
required: be
|
|
726
726
|
}),
|
|
727
727
|
/* @__PURE__ */ U("div", {
|
|
728
|
-
ref:
|
|
728
|
+
ref: I,
|
|
729
729
|
className: v("w-full", d, f),
|
|
730
730
|
children: /* @__PURE__ */ U(Te, {
|
|
731
|
-
fallback: /* @__PURE__ */ U(
|
|
732
|
-
children: /* @__PURE__ */ U(
|
|
733
|
-
id:
|
|
731
|
+
fallback: /* @__PURE__ */ U(pe, {}),
|
|
732
|
+
children: /* @__PURE__ */ U($e, {
|
|
733
|
+
id: j,
|
|
734
734
|
value: r.prompt,
|
|
735
735
|
onChange: (e) => {
|
|
736
|
-
|
|
736
|
+
P.reset(), b("prompt", e);
|
|
737
737
|
},
|
|
738
738
|
height: 480,
|
|
739
739
|
theme: ie,
|
|
@@ -751,28 +751,28 @@ var Ne = {
|
|
|
751
751
|
})
|
|
752
752
|
]
|
|
753
753
|
})
|
|
754
|
-
}),
|
|
754
|
+
}), F.isConfirmOpen && /* @__PURE__ */ U(l, {
|
|
755
755
|
open: !0,
|
|
756
756
|
title: n.discardTitle ?? "Discard unsaved changes?",
|
|
757
757
|
message: n.discardMessage ?? "You have unsaved changes. Leaving now will discard them.",
|
|
758
758
|
confirmLabel: n.discardConfirmLabel ?? "Discard changes",
|
|
759
759
|
cancelLabel: n.discardCancelLabel ?? "Keep editing",
|
|
760
760
|
variant: ne.Danger,
|
|
761
|
-
onConfirm:
|
|
762
|
-
onClose:
|
|
761
|
+
onConfirm: F.confirm,
|
|
762
|
+
onClose: F.dismiss
|
|
763
763
|
})] });
|
|
764
|
-
},
|
|
764
|
+
}, tt = /* @__PURE__ */ function(e) {
|
|
765
765
|
return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
|
|
766
|
-
}({}),
|
|
766
|
+
}({}), nt = /* @__PURE__ */ function(e) {
|
|
767
767
|
return e.Card = "card", e.Flow = "flow", e;
|
|
768
|
-
}({}),
|
|
768
|
+
}({}), rt = { subtitleText: "_subtitleText_1i4x2_3" }, it = ({ skillLabel: e, skillDisplayNames: t, instructionsLabel: n, instructionsMarkdown: r, renderInstructions: i, markdownLabels: a, fieldLabelClassName: o = "dial-tiny-text" }) => /* @__PURE__ */ W("div", {
|
|
769
769
|
className: "flex min-w-0 flex-col gap-5",
|
|
770
770
|
children: [!!t?.length && /* @__PURE__ */ W("div", {
|
|
771
771
|
role: "group",
|
|
772
772
|
"aria-label": e,
|
|
773
773
|
className: "flex min-w-0 flex-col gap-1",
|
|
774
774
|
children: [/* @__PURE__ */ U("span", {
|
|
775
|
-
className: v(o,
|
|
775
|
+
className: v(o, rt.subtitleText),
|
|
776
776
|
children: e
|
|
777
777
|
}), /* @__PURE__ */ U("p", {
|
|
778
778
|
className: "break-all whitespace-normal",
|
|
@@ -786,18 +786,18 @@ var Ne = {
|
|
|
786
786
|
"aria-label": n,
|
|
787
787
|
className: "flex min-w-0 flex-col gap-1",
|
|
788
788
|
children: [/* @__PURE__ */ U("span", {
|
|
789
|
-
className: v(o,
|
|
789
|
+
className: v(o, rt.subtitleText),
|
|
790
790
|
children: n
|
|
791
791
|
}), i ? i(r) : /* @__PURE__ */ U(p, {
|
|
792
792
|
content: r,
|
|
793
793
|
...a
|
|
794
794
|
})]
|
|
795
795
|
})]
|
|
796
|
-
}),
|
|
796
|
+
}), at = { subtitleText: "_subtitleText_1i4x2_3" }, ot = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, completedLabel: a, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ W(Me, { children: [
|
|
797
797
|
t && /* @__PURE__ */ W("div", {
|
|
798
798
|
className: "flex flex-col gap-1",
|
|
799
799
|
children: [/* @__PURE__ */ U("span", {
|
|
800
|
-
className: v(o,
|
|
800
|
+
className: v(o, at.subtitleText),
|
|
801
801
|
children: e.descriptionLabel
|
|
802
802
|
}), /* @__PURE__ */ U("p", {
|
|
803
803
|
className: s,
|
|
@@ -807,7 +807,7 @@ var Ne = {
|
|
|
807
807
|
a && /* @__PURE__ */ W("div", {
|
|
808
808
|
className: "flex flex-col gap-1",
|
|
809
809
|
children: [/* @__PURE__ */ U("span", {
|
|
810
|
-
className: v(o,
|
|
810
|
+
className: v(o, at.subtitleText),
|
|
811
811
|
children: e.completedFieldLabel
|
|
812
812
|
}), /* @__PURE__ */ U("p", {
|
|
813
813
|
className: s,
|
|
@@ -817,7 +817,7 @@ var Ne = {
|
|
|
817
817
|
n && /* @__PURE__ */ W("div", {
|
|
818
818
|
className: "flex flex-col gap-1",
|
|
819
819
|
children: [/* @__PURE__ */ U("span", {
|
|
820
|
-
className: v(o,
|
|
820
|
+
className: v(o, at.subtitleText),
|
|
821
821
|
children: e.modelLabel
|
|
822
822
|
}), /* @__PURE__ */ U("p", {
|
|
823
823
|
className: s,
|
|
@@ -827,7 +827,7 @@ var Ne = {
|
|
|
827
827
|
r && /* @__PURE__ */ W("div", {
|
|
828
828
|
className: "flex flex-col gap-1",
|
|
829
829
|
children: [/* @__PURE__ */ U("span", {
|
|
830
|
-
className: v(o,
|
|
830
|
+
className: v(o, at.subtitleText),
|
|
831
831
|
children: e.repeatsLabel
|
|
832
832
|
}), /* @__PURE__ */ U("p", {
|
|
833
833
|
className: s,
|
|
@@ -837,14 +837,14 @@ var Ne = {
|
|
|
837
837
|
i && /* @__PURE__ */ W("div", {
|
|
838
838
|
className: "flex flex-col gap-1",
|
|
839
839
|
children: [/* @__PURE__ */ U("span", {
|
|
840
|
-
className: v(o,
|
|
840
|
+
className: v(o, at.subtitleText),
|
|
841
841
|
children: e.activeWindowLabel
|
|
842
842
|
}), /* @__PURE__ */ U("p", {
|
|
843
843
|
className: s,
|
|
844
844
|
children: i
|
|
845
845
|
})]
|
|
846
846
|
})
|
|
847
|
-
] }),
|
|
847
|
+
] }), st = /* @__PURE__ */ function(e) {
|
|
848
848
|
return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
|
|
849
849
|
}({}), Q = {
|
|
850
850
|
subtitleText: "_subtitleText_fh12s_1",
|
|
@@ -854,25 +854,25 @@ var Ne = {
|
|
|
854
854
|
currentRun: "_currentRun_fh12s_17",
|
|
855
855
|
interactiveRow: "_interactiveRow_fh12s_22",
|
|
856
856
|
unreadDot: "_unreadDot_fh12s_33"
|
|
857
|
-
},
|
|
857
|
+
}, ct = ({ status: e }) => {
|
|
858
858
|
switch (e) {
|
|
859
|
-
case
|
|
859
|
+
case st.Success: return /* @__PURE__ */ U(be, {
|
|
860
860
|
size: O.MD,
|
|
861
861
|
className: Q.successIcon,
|
|
862
862
|
"aria-hidden": !0,
|
|
863
863
|
stroke: k
|
|
864
864
|
});
|
|
865
|
-
case
|
|
865
|
+
case st.Error: return /* @__PURE__ */ U(L, {
|
|
866
866
|
size: O.MD,
|
|
867
867
|
className: Q.errorIcon,
|
|
868
868
|
"aria-hidden": !0,
|
|
869
869
|
stroke: k
|
|
870
870
|
});
|
|
871
|
-
case
|
|
871
|
+
case st.InProgress: return /* @__PURE__ */ U("span", {
|
|
872
872
|
"aria-hidden": !0,
|
|
873
|
-
children: /* @__PURE__ */ U(
|
|
873
|
+
children: /* @__PURE__ */ U(pe, { size: O.MD })
|
|
874
874
|
});
|
|
875
|
-
case
|
|
875
|
+
case st.Missed: return /* @__PURE__ */ U(_e, {
|
|
876
876
|
size: O.MD,
|
|
877
877
|
className: Q.missedIcon,
|
|
878
878
|
"aria-hidden": !0,
|
|
@@ -880,7 +880,7 @@ var Ne = {
|
|
|
880
880
|
});
|
|
881
881
|
default: return null;
|
|
882
882
|
}
|
|
883
|
-
},
|
|
883
|
+
}, lt = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: i, onRetry: a, currentRunId: o, onRunClick: s, labels: c, footer: l, styles: u }) => {
|
|
884
884
|
let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-paragraph-text", m = f?.runTimestampUnreadClassName ?? "dial-small-paragraph-semi-text", h = f?.subtitleClassName ?? "dial-body-text", g = c.unreadIndicatorLabel ?? "Unread", y = _({
|
|
885
885
|
"--strhl-success-icon": d?.successIconColor,
|
|
886
886
|
"--strhl-error-icon": d?.errorIconColor,
|
|
@@ -892,9 +892,13 @@ var Ne = {
|
|
|
892
892
|
"--strhl-row-focus-bg": u?.rowFocusBackground,
|
|
893
893
|
"--strhl-row-focus-outline": u?.rowFocusOutline
|
|
894
894
|
}), b = (e) => {
|
|
895
|
-
let t = c.runStatusLabels[e.status], n = e.id === o, r =
|
|
895
|
+
let t = c.runStatusLabels[e.status], n = e.id === o, r = e.status === st.Error && e.errorText ? e.errorText : void 0, i = [
|
|
896
|
+
r,
|
|
897
|
+
e.isUnread ? g : void 0,
|
|
898
|
+
n ? c.currentRunLabel : void 0
|
|
899
|
+
].filter((e) => !!e), a = [`${t} ${e.timestampLabel}`, ...i].join(" — "), l = !!e.conversationId && !!s;
|
|
896
900
|
return /* @__PURE__ */ W("li", {
|
|
897
|
-
...
|
|
901
|
+
...l ? {
|
|
898
902
|
role: "button",
|
|
899
903
|
tabIndex: 0,
|
|
900
904
|
onClick: () => s?.(e),
|
|
@@ -902,12 +906,21 @@ var Ne = {
|
|
|
902
906
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), s?.(e));
|
|
903
907
|
}
|
|
904
908
|
} : {},
|
|
905
|
-
"aria-label":
|
|
909
|
+
"aria-label": a,
|
|
906
910
|
"aria-current": n ? "true" : void 0,
|
|
907
|
-
className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full px-3", n && Q.currentRun,
|
|
911
|
+
className: v("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full px-3", n && Q.currentRun, l && "cursor-pointer", l && Q.interactiveRow),
|
|
908
912
|
children: [/* @__PURE__ */ W("span", {
|
|
909
913
|
className: "flex min-w-0 items-center gap-2",
|
|
910
|
-
children: [
|
|
914
|
+
children: [r ? /* @__PURE__ */ U(F, {
|
|
915
|
+
tooltip: r,
|
|
916
|
+
asChild: !0,
|
|
917
|
+
contentClassName: "max-w-[320px] whitespace-pre-wrap break-words",
|
|
918
|
+
children: /* @__PURE__ */ U("span", {
|
|
919
|
+
className: "flex shrink-0",
|
|
920
|
+
tabIndex: l ? void 0 : 0,
|
|
921
|
+
children: /* @__PURE__ */ U(ct, { status: e.status })
|
|
922
|
+
})
|
|
923
|
+
}) : /* @__PURE__ */ U(ct, { status: e.status }), /* @__PURE__ */ U("span", {
|
|
911
924
|
className: v(e.isUnread ? m : p, "truncate"),
|
|
912
925
|
children: e.timestampLabel
|
|
913
926
|
})]
|
|
@@ -922,12 +935,12 @@ var Ne = {
|
|
|
922
935
|
}, x = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ W("li", {
|
|
923
936
|
"aria-hidden": "true",
|
|
924
937
|
className: "flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 px-3",
|
|
925
|
-
children: [/* @__PURE__ */ U(
|
|
926
|
-
variant:
|
|
938
|
+
children: [/* @__PURE__ */ U(N, {
|
|
939
|
+
variant: P.Rectangular,
|
|
927
940
|
width: "160px",
|
|
928
941
|
height: "16px"
|
|
929
|
-
}), /* @__PURE__ */ U(
|
|
930
|
-
variant:
|
|
942
|
+
}), /* @__PURE__ */ U(N, {
|
|
943
|
+
variant: P.Rectangular,
|
|
931
944
|
width: "16px",
|
|
932
945
|
height: "16px",
|
|
933
946
|
className: "shrink-0 rounded-full"
|
|
@@ -955,7 +968,7 @@ var Ne = {
|
|
|
955
968
|
}) : e.length === 0 ? /* @__PURE__ */ W("div", {
|
|
956
969
|
style: y,
|
|
957
970
|
className: "flex w-full flex-col items-center justify-center gap-2 py-4",
|
|
958
|
-
children: [/* @__PURE__ */ U(
|
|
971
|
+
children: [/* @__PURE__ */ U(R, {
|
|
959
972
|
size: 44,
|
|
960
973
|
stroke: k,
|
|
961
974
|
className: Q.subtitleText,
|
|
@@ -988,12 +1001,12 @@ var Ne = {
|
|
|
988
1001
|
}) : l
|
|
989
1002
|
]
|
|
990
1003
|
});
|
|
991
|
-
},
|
|
1004
|
+
}, ut = {
|
|
992
1005
|
historyCard: "_historyCard_153p9_4",
|
|
993
1006
|
subtitleText: "_subtitleText_153p9_8",
|
|
994
1007
|
cardLayout: "_cardLayout_153p9_13"
|
|
995
|
-
},
|
|
996
|
-
let b = e ===
|
|
1008
|
+
}, dt = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: a = !1, skeletonCount: o = 6, error: s, onRetry: c, loadMoreError: l, onRetryLoadMore: u, hasMore: d = !1, onLoadMore: f, onRunClick: p, runTimestampClassName: m = "dial-small-text", runTimestampUnreadClassName: h = "dial-small-semi-text", sectionTitleClassName: g = "dial-body-semi-text", colors: _, styles: y }) => {
|
|
1009
|
+
let b = e === nt.Card, x = b ? v("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", ut.historyCard) : "pt-2", ee = l ? /* @__PURE__ */ W("li", {
|
|
997
1010
|
className: x,
|
|
998
1011
|
children: [/* @__PURE__ */ U("p", {
|
|
999
1012
|
role: "alert",
|
|
@@ -1011,14 +1024,14 @@ var Ne = {
|
|
|
1011
1024
|
disabled: a
|
|
1012
1025
|
})
|
|
1013
1026
|
}) : void 0, S = n ? /* @__PURE__ */ U("p", {
|
|
1014
|
-
className: v(m,
|
|
1027
|
+
className: v(m, ut.subtitleText),
|
|
1015
1028
|
children: n
|
|
1016
1029
|
}) : void 0, C = t.historyLoadingMoreLabel ? /* @__PURE__ */ U("span", {
|
|
1017
1030
|
role: "status",
|
|
1018
1031
|
"aria-live": "polite",
|
|
1019
1032
|
className: "sr-only",
|
|
1020
1033
|
children: a ? t.historyLoadingMoreLabel : ""
|
|
1021
|
-
}) : void 0, te = /* @__PURE__ */ U(
|
|
1034
|
+
}) : void 0, te = /* @__PURE__ */ U(lt, {
|
|
1022
1035
|
items: r,
|
|
1023
1036
|
isLoading: i,
|
|
1024
1037
|
isLoadingMore: a,
|
|
@@ -1048,10 +1061,10 @@ var Ne = {
|
|
|
1048
1061
|
}
|
|
1049
1062
|
});
|
|
1050
1063
|
return b ? /* @__PURE__ */ W("div", {
|
|
1051
|
-
className: v("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md",
|
|
1064
|
+
className: v("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", ut.historyCard, ut.cardLayout),
|
|
1052
1065
|
style: { "--st-history-max-height": y?.maxHeight },
|
|
1053
1066
|
children: [/* @__PURE__ */ W("div", {
|
|
1054
|
-
className: v("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pt-5 pb-2",
|
|
1067
|
+
className: v("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pt-5 pb-2", ut.historyCard),
|
|
1055
1068
|
children: [
|
|
1056
1069
|
/* @__PURE__ */ U("h2", {
|
|
1057
1070
|
className: g,
|
|
@@ -1085,27 +1098,27 @@ var Ne = {
|
|
|
1085
1098
|
actionButton: "_actionButton_hdn5b_75",
|
|
1086
1099
|
roundActionButton: "_roundActionButton_hdn5b_82",
|
|
1087
1100
|
stickyTabs: "_stickyTabs_hdn5b_88"
|
|
1088
|
-
},
|
|
1089
|
-
let { colors:
|
|
1090
|
-
"--stdv-bg":
|
|
1091
|
-
"--stdv-header-border":
|
|
1092
|
-
"--stdv-details-border":
|
|
1093
|
-
"--stdv-subtitle-text":
|
|
1094
|
-
"--stdv-history-bg":
|
|
1095
|
-
}),
|
|
1101
|
+
}, ft = ({ labels: e, onBack: t, onEdit: n, onStartNow: r, isStarting: i = !1, isStartNowDisabled: a = !1, isStartNowBusy: o = !1, onDelete: s, isDeleting: c = !1, isDeleted: l = !1, isCompleted: u = !1, isActive: d, isActiveUpdating: f = !1, isActiveDisabled: p = !1, activeDisabledReason: m, onActiveChange: h, displayName: g, isLoading: y = !1, error: x, onRetry: ee, description: S, modelLabel: C, repeatsLabel: te, activeWindowLabel: T, completedLabel: E, nextRunLabel: D, instructionsMarkdown: ne, skillDisplayNames: re, renderInstructions: ie, runs: oe, runsIsLoading: se = !1, runsIsLoadingMore: ce = !1, runsSkeletonCount: le = 6, runsError: ue, onRunsRetry: M, runsLoadMoreError: de, onRunsRetryLoadMore: fe, runsHasMore: N = !1, onRunsLoadMore: P, onRunClick: ge, styles: F, className: _e, backIcon: ye, layout: I, historyStyles: be }) => {
|
|
1102
|
+
let { colors: L, typography: R } = F ?? {}, xe = R?.titleClassName ?? "dial-h2-text", B = R?.sectionTitleClassName ?? "dial-body-semi-text", Ce = R?.fieldLabelClassName ?? "dial-tiny-text", Te = R?.fieldValueClassName ?? "dial-small-text", Ee = R?.runTimestampClassName ?? "dial-small-text", De = _({
|
|
1103
|
+
"--stdv-bg": L?.background,
|
|
1104
|
+
"--stdv-header-border": L?.headerBorder,
|
|
1105
|
+
"--stdv-details-border": L?.detailsColumnBorder,
|
|
1106
|
+
"--stdv-subtitle-text": L?.subtitleText,
|
|
1107
|
+
"--stdv-history-bg": L?.historyCardBackground
|
|
1108
|
+
}), Oe = b(), [V, Ae] = je(tt.Details), H = ke(), Ne = o && !i ? e.startNowBusyLabel : void 0, Pe = [
|
|
1096
1109
|
{
|
|
1097
|
-
id:
|
|
1110
|
+
id: tt.Details,
|
|
1098
1111
|
label: e.detailsTitle
|
|
1099
1112
|
},
|
|
1100
1113
|
{
|
|
1101
|
-
id:
|
|
1114
|
+
id: tt.Configuration,
|
|
1102
1115
|
label: e.configurationTitle
|
|
1103
1116
|
},
|
|
1104
1117
|
{
|
|
1105
|
-
id:
|
|
1118
|
+
id: tt.History,
|
|
1106
1119
|
label: e.historyTitle
|
|
1107
1120
|
}
|
|
1108
|
-
],
|
|
1121
|
+
], Fe = Pe.find((e) => e.id === V)?.label ?? e.detailsTitle, G = /* @__PURE__ */ U(ot, {
|
|
1109
1122
|
labels: {
|
|
1110
1123
|
descriptionLabel: e.descriptionLabel,
|
|
1111
1124
|
modelLabel: e.modelLabel,
|
|
@@ -1118,9 +1131,9 @@ var Ne = {
|
|
|
1118
1131
|
repeatsLabel: te,
|
|
1119
1132
|
activeWindowLabel: T,
|
|
1120
1133
|
completedLabel: E,
|
|
1121
|
-
fieldLabelClassName:
|
|
1122
|
-
fieldValueClassName:
|
|
1123
|
-
}),
|
|
1134
|
+
fieldLabelClassName: Ce,
|
|
1135
|
+
fieldValueClassName: Te
|
|
1136
|
+
}), K = /* @__PURE__ */ U(it, {
|
|
1124
1137
|
instructionsLabel: e.instructionsLabel,
|
|
1125
1138
|
skillLabel: e.skillLabel,
|
|
1126
1139
|
skillDisplayNames: re,
|
|
@@ -1133,8 +1146,8 @@ var Ne = {
|
|
|
1133
1146
|
tableScrollRegionAriaLabel: e.tableScrollRegionAriaLabel,
|
|
1134
1147
|
mathScrollRegionAriaLabel: e.mathScrollRegionAriaLabel
|
|
1135
1148
|
},
|
|
1136
|
-
fieldLabelClassName:
|
|
1137
|
-
}),
|
|
1149
|
+
fieldLabelClassName: Ce
|
|
1150
|
+
}), q = (t) => /* @__PURE__ */ U(dt, {
|
|
1138
1151
|
variant: t,
|
|
1139
1152
|
labels: {
|
|
1140
1153
|
historyTitle: e.historyTitle,
|
|
@@ -1152,21 +1165,21 @@ var Ne = {
|
|
|
1152
1165
|
isLoading: se,
|
|
1153
1166
|
isLoadingMore: ce,
|
|
1154
1167
|
skeletonCount: le,
|
|
1155
|
-
error:
|
|
1156
|
-
onRetry:
|
|
1157
|
-
loadMoreError:
|
|
1158
|
-
onRetryLoadMore:
|
|
1159
|
-
hasMore:
|
|
1160
|
-
onLoadMore:
|
|
1161
|
-
onRunClick:
|
|
1168
|
+
error: ue,
|
|
1169
|
+
onRetry: M,
|
|
1170
|
+
loadMoreError: de,
|
|
1171
|
+
onRetryLoadMore: fe,
|
|
1172
|
+
hasMore: N,
|
|
1173
|
+
onLoadMore: P,
|
|
1174
|
+
onRunClick: ge,
|
|
1162
1175
|
runTimestampClassName: Ee,
|
|
1163
|
-
sectionTitleClassName:
|
|
1164
|
-
colors:
|
|
1165
|
-
styles:
|
|
1176
|
+
sectionTitleClassName: B,
|
|
1177
|
+
colors: L,
|
|
1178
|
+
styles: be
|
|
1166
1179
|
});
|
|
1167
1180
|
return /* @__PURE__ */ W("div", {
|
|
1168
1181
|
style: De,
|
|
1169
|
-
className: v("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container,
|
|
1182
|
+
className: v("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container, _e),
|
|
1170
1183
|
children: [
|
|
1171
1184
|
/* @__PURE__ */ W("div", {
|
|
1172
1185
|
className: v("flex min-h-16 shrink-0 items-start justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:items-center desktop:px-8 desktop:py-0", $.header),
|
|
@@ -1174,35 +1187,35 @@ var Ne = {
|
|
|
1174
1187
|
className: "flex min-w-0 items-center gap-2",
|
|
1175
1188
|
children: [
|
|
1176
1189
|
/* @__PURE__ */ U(ae, {
|
|
1177
|
-
icon:
|
|
1190
|
+
icon: ye === void 0 ? /* @__PURE__ */ U(ve, {
|
|
1178
1191
|
size: O.LG,
|
|
1179
1192
|
className: "rtl:scale-x-[-1]",
|
|
1180
1193
|
"aria-hidden": !0,
|
|
1181
1194
|
stroke: k
|
|
1182
|
-
}) :
|
|
1195
|
+
}) : ye,
|
|
1183
1196
|
"aria-label": e.backAriaLabel,
|
|
1184
1197
|
onClick: t
|
|
1185
1198
|
}),
|
|
1186
1199
|
/* @__PURE__ */ U("h1", {
|
|
1187
|
-
className: v("truncate", $.desktopTitle,
|
|
1200
|
+
className: v("truncate", $.desktopTitle, xe),
|
|
1188
1201
|
children: g
|
|
1189
1202
|
}),
|
|
1190
1203
|
l && /* @__PURE__ */ U("span", {
|
|
1191
|
-
className: v("shrink-0", $.desktopBadge,
|
|
1204
|
+
className: v("shrink-0", $.desktopBadge, Te, $.subtitleText),
|
|
1192
1205
|
children: e.deletedStateLabel
|
|
1193
1206
|
})
|
|
1194
1207
|
]
|
|
1195
1208
|
}), /* @__PURE__ */ W("div", {
|
|
1196
1209
|
className: v("flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2 desktop:flex-none desktop:flex-nowrap", $.headerActions),
|
|
1197
1210
|
children: [
|
|
1198
|
-
!l && !u && d !== void 0 && /* @__PURE__ */ W(
|
|
1211
|
+
!l && !u && d !== void 0 && /* @__PURE__ */ W(Me, { children: [/* @__PURE__ */ U(me, {
|
|
1199
1212
|
id: "scheduled-task-active-switch",
|
|
1200
1213
|
labelProps: { label: e.activeStatusLabel },
|
|
1201
1214
|
isOn: d,
|
|
1202
1215
|
disabled: f || p || c,
|
|
1203
1216
|
onChange: (e) => h?.(e)
|
|
1204
1217
|
}), p && m && /* @__PURE__ */ U("span", {
|
|
1205
|
-
className: v(
|
|
1218
|
+
className: v(Te, $.subtitleText),
|
|
1206
1219
|
children: m
|
|
1207
1220
|
})] }),
|
|
1208
1221
|
!l && s && /* @__PURE__ */ U(A, {
|
|
@@ -1218,9 +1231,9 @@ var Ne = {
|
|
|
1218
1231
|
textClassName: $.actionLabel,
|
|
1219
1232
|
className: v("min-h-11 shrink-0", $.actionButton)
|
|
1220
1233
|
}),
|
|
1221
|
-
!l && n && /* @__PURE__ */ U(
|
|
1234
|
+
!l && n && /* @__PURE__ */ U(j, {
|
|
1222
1235
|
label: e.editButtonLabel,
|
|
1223
|
-
iconBefore: /* @__PURE__ */ U(
|
|
1236
|
+
iconBefore: /* @__PURE__ */ U(z, {
|
|
1224
1237
|
size: O.SM,
|
|
1225
1238
|
"aria-hidden": !0,
|
|
1226
1239
|
stroke: k
|
|
@@ -1232,21 +1245,21 @@ var Ne = {
|
|
|
1232
1245
|
}),
|
|
1233
1246
|
!l && r && e.startNowButtonLabel && /* @__PURE__ */ W("div", {
|
|
1234
1247
|
"aria-busy": i,
|
|
1235
|
-
children: [
|
|
1236
|
-
id:
|
|
1248
|
+
children: [Ne && /* @__PURE__ */ U("span", {
|
|
1249
|
+
id: H,
|
|
1237
1250
|
className: "sr-only",
|
|
1238
|
-
children:
|
|
1239
|
-
}), /* @__PURE__ */ U(
|
|
1251
|
+
children: Ne
|
|
1252
|
+
}), /* @__PURE__ */ U(j, {
|
|
1240
1253
|
label: i ? e.startingLabel ?? e.startNowButtonLabel : e.startNowButtonLabel,
|
|
1241
|
-
iconBefore: /* @__PURE__ */ U(
|
|
1254
|
+
iconBefore: /* @__PURE__ */ U(Se, {
|
|
1242
1255
|
size: O.SM,
|
|
1243
1256
|
"aria-hidden": !0,
|
|
1244
1257
|
stroke: k
|
|
1245
1258
|
}),
|
|
1246
1259
|
onClick: r,
|
|
1247
1260
|
disabled: c || i || a || o,
|
|
1248
|
-
"aria-describedby":
|
|
1249
|
-
tooltipProps:
|
|
1261
|
+
"aria-describedby": Ne ? H : void 0,
|
|
1262
|
+
tooltipProps: Ne ? { tooltip: Ne } : void 0,
|
|
1250
1263
|
textClassName: $.actionLabel,
|
|
1251
1264
|
className: v("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
|
|
1252
1265
|
})]
|
|
@@ -1257,10 +1270,10 @@ var Ne = {
|
|
|
1257
1270
|
/* @__PURE__ */ W("div", {
|
|
1258
1271
|
className: v("min-w-0 items-center gap-2 px-4 py-3", $.mobileTitleRow),
|
|
1259
1272
|
children: [/* @__PURE__ */ U("h1", {
|
|
1260
|
-
className: v("truncate",
|
|
1273
|
+
className: v("truncate", xe),
|
|
1261
1274
|
children: g
|
|
1262
1275
|
}), l && /* @__PURE__ */ U("span", {
|
|
1263
|
-
className: v("shrink-0",
|
|
1276
|
+
className: v("shrink-0", Te, $.subtitleText),
|
|
1264
1277
|
children: e.deletedStateLabel
|
|
1265
1278
|
})]
|
|
1266
1279
|
}),
|
|
@@ -1278,42 +1291,42 @@ var Ne = {
|
|
|
1278
1291
|
}),
|
|
1279
1292
|
y && /* @__PURE__ */ U("div", {
|
|
1280
1293
|
className: "flex flex-1 items-center justify-center",
|
|
1281
|
-
children: /* @__PURE__ */ U(
|
|
1294
|
+
children: /* @__PURE__ */ U(pe, {})
|
|
1282
1295
|
}),
|
|
1283
1296
|
!y && x && /* @__PURE__ */ W("div", {
|
|
1284
1297
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
1285
1298
|
children: [/* @__PURE__ */ U("p", {
|
|
1286
|
-
className: v(
|
|
1299
|
+
className: v(Te, $.subtitleText),
|
|
1287
1300
|
children: e.errorLabel
|
|
1288
1301
|
}), /* @__PURE__ */ U(A, {
|
|
1289
1302
|
label: e.retryLabel,
|
|
1290
1303
|
onClick: ee
|
|
1291
1304
|
})]
|
|
1292
1305
|
}),
|
|
1293
|
-
!y && !x && (
|
|
1306
|
+
!y && !x && (Oe ? /* @__PURE__ */ W("div", {
|
|
1294
1307
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
|
|
1295
1308
|
children: [/* @__PURE__ */ U("div", {
|
|
1296
1309
|
className: v("sticky top-0 z-10", $.stickyTabs),
|
|
1297
|
-
children: /* @__PURE__ */ U(
|
|
1310
|
+
children: /* @__PURE__ */ U(he, {
|
|
1298
1311
|
ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
|
|
1299
1312
|
className: "px-4",
|
|
1300
|
-
tabs:
|
|
1313
|
+
tabs: Pe,
|
|
1301
1314
|
activeTabId: V,
|
|
1302
|
-
onTabChange:
|
|
1315
|
+
onTabChange: Ae
|
|
1303
1316
|
})
|
|
1304
1317
|
}), /* @__PURE__ */ U("div", {
|
|
1305
1318
|
role: "tabpanel",
|
|
1306
|
-
"aria-label":
|
|
1319
|
+
"aria-label": Fe,
|
|
1307
1320
|
className: "flex flex-1 flex-col gap-5 px-4 py-6",
|
|
1308
|
-
children: V ===
|
|
1321
|
+
children: V === tt.Configuration ? K : V === tt.History ? q(nt.Flow) : G
|
|
1309
1322
|
})]
|
|
1310
1323
|
}) : /* @__PURE__ */ W("div", {
|
|
1311
1324
|
style: {
|
|
1312
1325
|
flexDirection: "row",
|
|
1313
|
-
"--st-details-width":
|
|
1314
|
-
"--st-history-width":
|
|
1315
|
-
"--st-history-max-height":
|
|
1316
|
-
"--st-configuration-min-width":
|
|
1326
|
+
"--st-details-width": I?.detailsWidth,
|
|
1327
|
+
"--st-history-width": I?.historyWidth,
|
|
1328
|
+
"--st-history-max-height": I?.historyMaxHeight,
|
|
1329
|
+
"--st-configuration-min-width": I?.configurationMinWidth
|
|
1317
1330
|
},
|
|
1318
1331
|
className: "flex min-h-0 flex-1 overflow-y-auto desktop:overflow-hidden",
|
|
1319
1332
|
children: [
|
|
@@ -1321,39 +1334,39 @@ var Ne = {
|
|
|
1321
1334
|
role: "group",
|
|
1322
1335
|
"aria-label": e.detailsTitle,
|
|
1323
1336
|
style: {
|
|
1324
|
-
flex: `0 1 ${
|
|
1337
|
+
flex: `0 1 ${I?.detailsWidth ?? "360px"}`,
|
|
1325
1338
|
maxWidth: "100%"
|
|
1326
1339
|
},
|
|
1327
1340
|
className: v("flex min-h-0 w-full flex-col gap-5 overflow-y-auto border-e px-8 py-6", $.detailsColumn),
|
|
1328
1341
|
children: [/* @__PURE__ */ U("h2", {
|
|
1329
|
-
className:
|
|
1342
|
+
className: B,
|
|
1330
1343
|
children: e.detailsTitle
|
|
1331
|
-
}),
|
|
1344
|
+
}), G]
|
|
1332
1345
|
}),
|
|
1333
1346
|
/* @__PURE__ */ W("div", {
|
|
1334
1347
|
style: {
|
|
1335
|
-
flex: `1 1 ${
|
|
1348
|
+
flex: `1 1 ${I?.configurationMinWidth ?? "320px"}`,
|
|
1336
1349
|
minWidth: 0
|
|
1337
1350
|
},
|
|
1338
1351
|
className: "flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto px-8 py-6",
|
|
1339
1352
|
children: [/* @__PURE__ */ U("h2", {
|
|
1340
|
-
className:
|
|
1353
|
+
className: B,
|
|
1341
1354
|
children: e.configurationTitle
|
|
1342
|
-
}),
|
|
1355
|
+
}), K]
|
|
1343
1356
|
}),
|
|
1344
1357
|
/* @__PURE__ */ U("div", {
|
|
1345
1358
|
style: {
|
|
1346
|
-
flex: `0 1 calc(${
|
|
1359
|
+
flex: `0 1 calc(${I?.historyWidth ?? "360px"} + 48px)`,
|
|
1347
1360
|
minWidth: 0
|
|
1348
1361
|
},
|
|
1349
1362
|
className: "flex min-h-0 w-full items-start justify-center overflow-y-auto p-6",
|
|
1350
|
-
children:
|
|
1363
|
+
children: q(nt.Card)
|
|
1351
1364
|
})
|
|
1352
1365
|
]
|
|
1353
1366
|
}))
|
|
1354
1367
|
]
|
|
1355
1368
|
});
|
|
1356
|
-
},
|
|
1369
|
+
}, pt = {
|
|
1357
1370
|
h1: "dial-small-semi-text mb-3 mt-6 first:mt-0 [text-wrap:balance]",
|
|
1358
1371
|
h2: "dial-small-semi-text mb-2 mt-5 first:mt-0 [text-wrap:balance]",
|
|
1359
1372
|
h3: "dial-small-semi-text mb-2 mt-4 first:mt-0 [text-wrap:balance]",
|
|
@@ -1368,7 +1381,7 @@ var Ne = {
|
|
|
1368
1381
|
link: "break-words [overflow-wrap:anywhere]",
|
|
1369
1382
|
tableWrapper: "my-4",
|
|
1370
1383
|
mathBlock: "my-4"
|
|
1371
|
-
},
|
|
1384
|
+
}, mt = ({ modelLabel: e, skillLabel: t, skillDisplayNames: n, instructionsLabel: r, modelDisplayName: i, instructionsMarkdown: a, renderInstructions: o, instructionsClassNames: s = pt, markdownLabels: c, styles: l }) => {
|
|
1372
1385
|
let u = l?.typography?.fieldLabelClassName ?? "dial-tiny-text text-secondary", d = l?.typography?.fieldValueClassName ?? "dial-small-text";
|
|
1373
1386
|
return /* @__PURE__ */ W("div", {
|
|
1374
1387
|
className: "flex flex-col gap-3",
|
|
@@ -1409,12 +1422,12 @@ var Ne = {
|
|
|
1409
1422
|
})
|
|
1410
1423
|
]
|
|
1411
1424
|
});
|
|
1412
|
-
},
|
|
1425
|
+
}, ht = ({ className: e, children: t }) => /* @__PURE__ */ U("span", {
|
|
1413
1426
|
className: v(e, "block truncate py-1"),
|
|
1414
1427
|
children: t
|
|
1415
|
-
}),
|
|
1416
|
-
let [m, h] =
|
|
1417
|
-
|
|
1428
|
+
}), gt = ({ scheduleId: e, items: t, isLoading: n = !1, isLoadingMore: r = !1, skeletonCount: i = 6, error: a, onRetry: o, hasMore: s = !1, onLoadMore: c, currentRunId: l, onRunClick: u, labels: d, titleClassName: f = "dial-tiny-semi-text", contentClassName: p = "ps-3" }) => {
|
|
1429
|
+
let [m, h] = je(!0);
|
|
1430
|
+
Oe(() => {
|
|
1418
1431
|
h(!0);
|
|
1419
1432
|
}, [e]);
|
|
1420
1433
|
let g = s && !n && c && d.showMoreLabel ? /* @__PURE__ */ U("li", {
|
|
@@ -1427,14 +1440,14 @@ var Ne = {
|
|
|
1427
1440
|
})
|
|
1428
1441
|
}) : void 0;
|
|
1429
1442
|
return /* @__PURE__ */ U(S, {
|
|
1430
|
-
title: /* @__PURE__ */ U(
|
|
1443
|
+
title: /* @__PURE__ */ U(ht, {
|
|
1431
1444
|
className: f,
|
|
1432
1445
|
children: d.title
|
|
1433
1446
|
}),
|
|
1434
1447
|
expanded: m,
|
|
1435
1448
|
onToggle: h,
|
|
1436
1449
|
contentClassName: p,
|
|
1437
|
-
children: /* @__PURE__ */ U(
|
|
1450
|
+
children: /* @__PURE__ */ U(lt, {
|
|
1438
1451
|
items: t,
|
|
1439
1452
|
isLoading: n,
|
|
1440
1453
|
isLoadingMore: r,
|
|
@@ -1455,11 +1468,11 @@ var Ne = {
|
|
|
1455
1468
|
}
|
|
1456
1469
|
})
|
|
1457
1470
|
});
|
|
1458
|
-
},
|
|
1471
|
+
}, _t = /* @__PURE__ */ function(e) {
|
|
1459
1472
|
return e.Ready = "ready", e.Error = "error", e.Unavailable = "unavailable", e;
|
|
1460
|
-
}({}),
|
|
1461
|
-
let [p, m] =
|
|
1462
|
-
|
|
1473
|
+
}({}), vt = ({ scheduleId: e, state: t, onRetry: n, modelDisplayName: r, skillDisplayNames: i, instructionsMarkdown: a, renderInstructions: o, instructionsClassNames: s, markdownLabels: c, summaryStyles: l, labels: u, titleClassName: d = "dial-tiny-semi-text", unavailableTextClassName: f = "dial-body-text text-secondary" }) => {
|
|
1474
|
+
let [p, m] = je(!1);
|
|
1475
|
+
Oe(() => {
|
|
1463
1476
|
m(!1);
|
|
1464
1477
|
}, [e]);
|
|
1465
1478
|
let h = t === "error" || t === "unavailable" ? /* @__PURE__ */ W("div", {
|
|
@@ -1472,7 +1485,7 @@ var Ne = {
|
|
|
1472
1485
|
label: u.retryLabel,
|
|
1473
1486
|
onClick: n
|
|
1474
1487
|
})]
|
|
1475
|
-
}) : /* @__PURE__ */ U(
|
|
1488
|
+
}) : /* @__PURE__ */ U(mt, {
|
|
1476
1489
|
modelLabel: u.modelLabel,
|
|
1477
1490
|
instructionsLabel: u.instructionsLabel,
|
|
1478
1491
|
skillLabel: u.skillLabel,
|
|
@@ -1485,7 +1498,7 @@ var Ne = {
|
|
|
1485
1498
|
styles: l
|
|
1486
1499
|
});
|
|
1487
1500
|
return /* @__PURE__ */ U(S, {
|
|
1488
|
-
title: /* @__PURE__ */ U(
|
|
1501
|
+
title: /* @__PURE__ */ U(ht, {
|
|
1489
1502
|
className: d,
|
|
1490
1503
|
children: u.title
|
|
1491
1504
|
}),
|
|
@@ -1493,7 +1506,7 @@ var Ne = {
|
|
|
1493
1506
|
onToggle: m,
|
|
1494
1507
|
children: h
|
|
1495
1508
|
});
|
|
1496
|
-
},
|
|
1509
|
+
}, yt = ({ taskName: e, icon: t, typeLabel: n, body: r, pendingLabel: i, isDeleting: a = !1, styles: o, ...s }) => /* @__PURE__ */ U(l, {
|
|
1497
1510
|
...s,
|
|
1498
1511
|
variant: ne.Danger,
|
|
1499
1512
|
popupClassName: o?.popupClassName,
|
|
@@ -1510,4 +1523,4 @@ var Ne = {
|
|
|
1510
1523
|
}) })
|
|
1511
1524
|
});
|
|
1512
1525
|
//#endregion
|
|
1513
|
-
export { r as DESCRIPTION_MAX_LENGTH,
|
|
1526
|
+
export { r as DESCRIPTION_MAX_LENGTH, Fe as SCHEDULED_TASKS_CLASS, Re as ScheduledTaskCard, Ue as ScheduledTaskCardGrid, He as ScheduledTaskCardSkeleton, vt as ScheduledTaskConversationDetailsSection, _t as ScheduledTaskConversationDetailsState, gt as ScheduledTaskConversationHistorySection, et as ScheduledTaskCreateForm, yt as ScheduledTaskDeleteConfirmation, ft as ScheduledTaskDetailView, mt as ScheduledTaskDetailsSummary, dt as ScheduledTaskHistorySection, K as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, lt as ScheduledTaskRunHistoryList, st as ScheduledTaskRunStatus, G as ScheduledTaskStatus, qe as ScheduledTasks, Je as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN, q as getScheduledTaskStatus, Xe as hasScheduledTaskFormChanges };
|