@epam/ai-dial-scheduled-tasks 1.1.0-dev.128 → 1.1.0-dev.129
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/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +275 -279
- package/models/scheduled-task-create-form-props.d.ts +32 -36
- package/models/scheduled-task-create-form-props.d.ts.map +1 -1
- package/package.json +3 -3
- package/types/scheduled-task-schedule.d.ts +5 -8
- package/types/scheduled-task-schedule.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MDMessageViewer as e, PanelEmptyState as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { SearchBar as i } from "@epam/ai-dial-kit";
|
|
3
|
-
import { ButtonAppearance as a, ButtonDropdown as o, ButtonVariant as s, Calendar as c, CalendarMode as l, CardShell as u, DIAL_ICON_SIZE as d, Dropdown as f, FolderPath as p, GhostButton as m, GhostIconButton as h, Highlight as g, IconButton as _, Input as v, LazyMarkdownEditor as y, NeutralButton as b,
|
|
4
|
-
import { IconAlertTriangle as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { Fragment as
|
|
3
|
+
import { ButtonAppearance as a, ButtonDropdown as o, ButtonVariant as s, Calendar as c, CalendarMode as l, CardShell as u, DIAL_ICON_SIZE as d, Dropdown as f, FolderPath as p, GhostButton as m, GhostIconButton as h, Highlight as g, IconButton as _, Input as v, LazyMarkdownEditor as y, NeutralButton as b, NumberInput as x, PrimaryButton as S, Select as C, Skeleton as w, SkeletonVariant as T, Spinner as E, Textarea as D } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconAlertTriangle as O, IconArrowLeft as k, IconCalendarTime as A, IconCircleCheck as j, IconCircleX as M, IconDotsVertical as N, IconEdit as P, IconPencilMinus as F, IconPlayerPlay as I, IconPlus as L, IconTrash as ee } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as R, lazy as z, useEffect as te, useMemo as B, useRef as ne } from "react";
|
|
6
|
+
import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
7
7
|
//#region src/models/scheduled-task-item.ts
|
|
8
|
-
var
|
|
8
|
+
var W = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Shared = "shared", e.MyTasks = "myTasks", e;
|
|
10
|
-
}({}),
|
|
10
|
+
}({}), G = {
|
|
11
11
|
title: "_title_1xv9i_1",
|
|
12
12
|
description: "_description_1xv9i_5",
|
|
13
13
|
schedulePill: "_schedulePill_1xv9i_9",
|
|
@@ -16,7 +16,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
16
16
|
locationLeaf: "_locationLeaf_1xv9i_22",
|
|
17
17
|
newBadge: "_newBadge_1xv9i_26",
|
|
18
18
|
locationDivider: "_locationDivider_1xv9i_31"
|
|
19
|
-
},
|
|
19
|
+
}, K = ({ item: e, searchQuery: t = "", onEdit: i, onRunNow: a, onDelete: o, onCardClick: s, labels: c, styles: l, className: m }) => {
|
|
20
20
|
let h = c?.newBadgeLabel ?? "NEW", v = c?.actionsLabel ?? "More actions", y = c?.editActionLabel ?? "Edit", b = c?.runNowActionLabel ?? "Run now", x = c?.deleteActionLabel ?? "Delete", { colors: S, typography: C } = l ?? {}, w = C?.titleClassName ?? "dial-body-semi-text", T = C?.descriptionClassName ?? "dial-small-text", E = C?.scheduleLabelClassName ?? "dial-tiny-text", D = C?.locationLabelClassName ?? "dial-tiny-text", O = C?.locationLeafClassName ?? "dial-tiny-semi-text", k = C?.newBadgeClassName ?? "dial-tiny-semi-text", A = n({
|
|
21
21
|
"--stc-title-text": S?.titleText,
|
|
22
22
|
"--stc-desc-text": S?.descriptionText,
|
|
@@ -32,7 +32,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
32
32
|
i && j.push({
|
|
33
33
|
key: "edit",
|
|
34
34
|
label: y,
|
|
35
|
-
icon: /* @__PURE__ */
|
|
35
|
+
icon: /* @__PURE__ */ H(P, {
|
|
36
36
|
size: d.SM,
|
|
37
37
|
"aria-hidden": !0
|
|
38
38
|
}),
|
|
@@ -42,7 +42,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
42
42
|
}), a && j.push({
|
|
43
43
|
key: "runNow",
|
|
44
44
|
label: b,
|
|
45
|
-
icon: /* @__PURE__ */
|
|
45
|
+
icon: /* @__PURE__ */ H(I, {
|
|
46
46
|
size: d.SM,
|
|
47
47
|
"aria-hidden": !0
|
|
48
48
|
}),
|
|
@@ -52,7 +52,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
52
52
|
}), o && j.push({
|
|
53
53
|
key: "delete",
|
|
54
54
|
label: x,
|
|
55
|
-
icon: /* @__PURE__ */
|
|
55
|
+
icon: /* @__PURE__ */ H(ee, {
|
|
56
56
|
size: d.SM,
|
|
57
57
|
"aria-hidden": !0
|
|
58
58
|
}),
|
|
@@ -61,39 +61,39 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
61
61
|
t.stopPropagation(), o(e.id);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
64
|
-
let
|
|
64
|
+
let M = s ? {
|
|
65
65
|
tabIndex: 0,
|
|
66
66
|
onClick: () => s(e.id),
|
|
67
67
|
onKeyDown: (t) => {
|
|
68
68
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), s(e.id));
|
|
69
69
|
}
|
|
70
70
|
} : {};
|
|
71
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ U(u, {
|
|
72
72
|
role: s ? "button" : "group",
|
|
73
73
|
"aria-label": e.displayName,
|
|
74
74
|
style: A,
|
|
75
75
|
className: r("h-[232px]", s && "cursor-pointer", m),
|
|
76
|
-
...
|
|
76
|
+
...M,
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ U("div", {
|
|
79
79
|
className: "flex shrink-0 items-start justify-between gap-2",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ U("div", {
|
|
81
81
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ H(g, {
|
|
83
83
|
text: e.displayName,
|
|
84
84
|
query: t,
|
|
85
85
|
maxLines: 1,
|
|
86
|
-
className: r(w,
|
|
87
|
-
}), e.isNew && /* @__PURE__ */
|
|
88
|
-
className: r("shrink-0 rounded-full px-2 py-0.5", k,
|
|
86
|
+
className: r(w, G.title)
|
|
87
|
+
}), e.isNew && /* @__PURE__ */ H("span", {
|
|
88
|
+
className: r("shrink-0 rounded-full px-2 py-0.5", k, G.newBadge),
|
|
89
89
|
children: h
|
|
90
90
|
})]
|
|
91
|
-
}), j.length > 0 && /* @__PURE__ */
|
|
91
|
+
}), j.length > 0 && /* @__PURE__ */ H(f, {
|
|
92
92
|
items: j,
|
|
93
93
|
matchReferenceWidth: !1,
|
|
94
94
|
placement: "bottom-end",
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
icon: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ H(_, {
|
|
96
|
+
icon: /* @__PURE__ */ H(N, {
|
|
97
97
|
size: d.SM,
|
|
98
98
|
"aria-hidden": !0
|
|
99
99
|
}),
|
|
@@ -103,63 +103,63 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
103
103
|
})
|
|
104
104
|
})]
|
|
105
105
|
}),
|
|
106
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
107
|
-
className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", T,
|
|
106
|
+
e.descriptionPreview && /* @__PURE__ */ H("p", {
|
|
107
|
+
className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", T, G.description),
|
|
108
108
|
children: e.descriptionPreview
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ U("div", {
|
|
111
111
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ H("div", {
|
|
113
113
|
className: "flex min-h-[28px] items-center",
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
className: r("inline-block rounded-lg border px-2 py-1",
|
|
114
|
+
children: /* @__PURE__ */ H("span", {
|
|
115
|
+
className: r("inline-block rounded-lg border px-2 py-1", G.schedulePill, E, G.scheduleLabel),
|
|
116
116
|
children: e.scheduleLabel
|
|
117
117
|
})
|
|
118
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */
|
|
118
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ H(p, {
|
|
119
119
|
segments: e.locationSegments,
|
|
120
|
-
labelClassName: r(D,
|
|
121
|
-
leafClassName: r(O,
|
|
122
|
-
className: r("pt-3",
|
|
120
|
+
labelClassName: r(D, G.locationLabel),
|
|
121
|
+
leafClassName: r(O, G.locationLeaf),
|
|
122
|
+
className: r("pt-3", G.locationDivider)
|
|
123
123
|
})]
|
|
124
124
|
})
|
|
125
125
|
]
|
|
126
126
|
});
|
|
127
|
-
}, re = { card: "_card_1a43j_1" },
|
|
127
|
+
}, re = { card: "_card_1a43j_1" }, q = [
|
|
128
128
|
"100%",
|
|
129
129
|
"100%",
|
|
130
130
|
"61%"
|
|
131
|
-
],
|
|
131
|
+
], ie = "var(--stcs-skeleton-bg)", ae = ({ styles: e }) => /* @__PURE__ */ U(u, {
|
|
132
132
|
"aria-hidden": !0,
|
|
133
133
|
style: n({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
134
134
|
className: r("h-[232px]", re.card),
|
|
135
135
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
variant:
|
|
136
|
+
/* @__PURE__ */ H(w, {
|
|
137
|
+
variant: T.Rectangular,
|
|
138
138
|
width: "60%",
|
|
139
139
|
height: "20px",
|
|
140
|
-
color:
|
|
140
|
+
color: ie,
|
|
141
141
|
className: "shrink-0"
|
|
142
142
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ H("div", {
|
|
144
144
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
145
|
-
children:
|
|
146
|
-
variant:
|
|
145
|
+
children: q.map((e, t) => /* @__PURE__ */ H(w, {
|
|
146
|
+
variant: T.Rectangular,
|
|
147
147
|
width: e,
|
|
148
148
|
height: "16px",
|
|
149
|
-
color:
|
|
149
|
+
color: ie
|
|
150
150
|
}, t))
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
variant:
|
|
152
|
+
/* @__PURE__ */ H(w, {
|
|
153
|
+
variant: T.Rectangular,
|
|
154
154
|
width: "110px",
|
|
155
155
|
height: "28px",
|
|
156
|
-
color:
|
|
156
|
+
color: ie,
|
|
157
157
|
className: "shrink-0 rounded-lg"
|
|
158
158
|
})
|
|
159
159
|
]
|
|
160
|
-
}), oe = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, onCardClick: a, labels: o, cardStyles: s, trailingSkeletonCount: c = 0, skeletonStyles: l }) => /* @__PURE__ */
|
|
160
|
+
}), oe = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, onCardClick: a, labels: o, cardStyles: s, trailingSkeletonCount: c = 0, skeletonStyles: l }) => /* @__PURE__ */ U("div", {
|
|
161
161
|
className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
|
|
162
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
162
|
+
children: [e.map((e) => /* @__PURE__ */ H(K, {
|
|
163
163
|
item: e,
|
|
164
164
|
searchQuery: t,
|
|
165
165
|
onEdit: n,
|
|
@@ -168,52 +168,52 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
168
168
|
onCardClick: a,
|
|
169
169
|
labels: o,
|
|
170
170
|
styles: s
|
|
171
|
-
}, e.id)), Array.from({ length: c }, (e, t) => /* @__PURE__ */
|
|
171
|
+
}, e.id)), Array.from({ length: c }, (e, t) => /* @__PURE__ */ H(ae, { styles: l }, `skeleton-${t}`))]
|
|
172
172
|
}), se = { countBadge: "_countBadge_4bnxj_1" }, ce = ({ title: e, count: t, children: i, styles: a }) => {
|
|
173
173
|
let o = a?.typography?.titleClassName ?? "dial-small-semi-text", s = a?.typography?.countBadgeClassName ?? "dial-tiny-text", c = n({
|
|
174
174
|
"--sts-badge-bg": a?.colors?.countBadgeBackground,
|
|
175
175
|
"--sts-badge-text": a?.colors?.countBadgeText
|
|
176
176
|
});
|
|
177
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ U("section", {
|
|
178
178
|
...e ? { "aria-label": e } : {},
|
|
179
179
|
style: c,
|
|
180
180
|
className: "flex flex-col gap-3",
|
|
181
|
-
children: [e && /* @__PURE__ */
|
|
181
|
+
children: [e && /* @__PURE__ */ U("div", {
|
|
182
182
|
className: "flex items-center gap-2 rtl:flex-row-reverse",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
184
184
|
className: o,
|
|
185
185
|
children: e
|
|
186
|
-
}), /* @__PURE__ */
|
|
186
|
+
}), /* @__PURE__ */ H("span", {
|
|
187
187
|
className: r("rounded-full px-2 py-0.5", s, se.countBadge),
|
|
188
188
|
children: t
|
|
189
189
|
})]
|
|
190
190
|
}), i]
|
|
191
191
|
});
|
|
192
|
-
},
|
|
192
|
+
}, J = {
|
|
193
193
|
container: "_container_r5sk9_1",
|
|
194
194
|
subtitle: "_subtitle_r5sk9_5",
|
|
195
195
|
sortButton: "_sortButton_r5sk9_9"
|
|
196
|
-
}, le = [
|
|
196
|
+
}, le = [W.Shared, W.MyTasks], ue = (e, t, n, r, i, a) => {
|
|
197
197
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
198
198
|
}, de = (e) => {
|
|
199
199
|
if (!e || e === document.body) return null;
|
|
200
200
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
201
201
|
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : de(e.parentElement);
|
|
202
|
-
}, fe = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items: h, isLoading: g = !1, error: _, onRetry: v, hasMore: y = !1, isLoadingMore: b = !1, skeletonCount:
|
|
203
|
-
let { colors: j, typography: M, emptyStateIconSize: N = 48 } =
|
|
202
|
+
}, fe = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items: h, isLoading: g = !1, error: _, onRetry: v, hasMore: y = !1, isLoadingMore: b = !1, skeletonCount: x = 6, onLoadMore: C, onEdit: w, onRunNow: T, onDelete: D, onCardClick: O, styles: k }) => {
|
|
203
|
+
let { colors: j, typography: M, emptyStateIconSize: N = 48 } = k ?? {}, P = M?.titleClassName ?? "dial-h1-text", F = M?.subtitleClassName ?? "dial-body-text", I = n({
|
|
204
204
|
"--st-bg": j?.background,
|
|
205
205
|
"--st-subtitle-text": j?.subtitleText,
|
|
206
206
|
"--st-sort-text": j?.sortButtonText
|
|
207
|
-
}), ee = e.sortOptions.find((e) => e.key === f)?.label ?? "", R =
|
|
208
|
-
let t = { [
|
|
207
|
+
}), ee = e.sortOptions.find((e) => e.key === f)?.label ?? "", R = B(() => {
|
|
208
|
+
let t = { [W.Shared]: e.sharedSectionTitle };
|
|
209
209
|
return le.map((e) => ({
|
|
210
210
|
key: e,
|
|
211
211
|
title: t[e],
|
|
212
212
|
items: h.filter((t) => t.sectionKey === e)
|
|
213
213
|
})).filter((e) => e.items.length > 0);
|
|
214
|
-
}, [h, e.sharedSectionTitle]),
|
|
214
|
+
}, [h, e.sharedSectionTitle]), z = ue(g, b, !!_, h.length, l.trim().length > 0, e), V = ne(null);
|
|
215
215
|
te(() => {
|
|
216
|
-
let e =
|
|
216
|
+
let e = V.current;
|
|
217
217
|
if (!e || !C) return;
|
|
218
218
|
let t = de(e.parentElement);
|
|
219
219
|
if (!t) return;
|
|
@@ -230,22 +230,22 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
230
230
|
C
|
|
231
231
|
]);
|
|
232
232
|
let G = () => {
|
|
233
|
-
if (g) return /* @__PURE__ */
|
|
234
|
-
if (_) return /* @__PURE__ */
|
|
233
|
+
if (g) return /* @__PURE__ */ H(E, {});
|
|
234
|
+
if (_) return /* @__PURE__ */ U("div", {
|
|
235
235
|
className: "flex flex-col items-center gap-3",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
237
|
-
className: r(F,
|
|
236
|
+
children: [/* @__PURE__ */ H("p", {
|
|
237
|
+
className: r(F, J.subtitle),
|
|
238
238
|
children: e.errorLabel
|
|
239
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ H(m, {
|
|
240
240
|
label: e.retryLabel,
|
|
241
241
|
onClick: v
|
|
242
242
|
})]
|
|
243
243
|
});
|
|
244
|
-
if (h.length === 0) return l.trim() ? /* @__PURE__ */
|
|
245
|
-
className: r(F,
|
|
244
|
+
if (h.length === 0) return l.trim() ? /* @__PURE__ */ H("p", {
|
|
245
|
+
className: r(F, J.subtitle),
|
|
246
246
|
children: e.noResultsLabel
|
|
247
|
-
}) : /* @__PURE__ */
|
|
248
|
-
icon: /* @__PURE__ */
|
|
247
|
+
}) : /* @__PURE__ */ H(t, {
|
|
248
|
+
icon: /* @__PURE__ */ H(A, {
|
|
249
249
|
"aria-hidden": !0,
|
|
250
250
|
size: N,
|
|
251
251
|
stroke: 1
|
|
@@ -253,47 +253,47 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
253
253
|
label: e.emptyStateLabel
|
|
254
254
|
});
|
|
255
255
|
let n = R.length - 1;
|
|
256
|
-
return /* @__PURE__ */
|
|
256
|
+
return /* @__PURE__ */ U("div", {
|
|
257
257
|
className: "flex w-full flex-col gap-6",
|
|
258
|
-
children: [R.map((t, r) => /* @__PURE__ */
|
|
258
|
+
children: [R.map((t, r) => /* @__PURE__ */ H(ce, {
|
|
259
259
|
title: t.title,
|
|
260
260
|
count: t.items.length,
|
|
261
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ H(oe, {
|
|
262
262
|
items: t.items,
|
|
263
263
|
searchQuery: l,
|
|
264
264
|
onEdit: w,
|
|
265
|
-
onRunNow:
|
|
265
|
+
onRunNow: T,
|
|
266
266
|
onDelete: D,
|
|
267
267
|
onCardClick: O,
|
|
268
268
|
labels: e.cardLabels,
|
|
269
|
-
trailingSkeletonCount: b && r === n ?
|
|
269
|
+
trailingSkeletonCount: b && r === n ? x : 0,
|
|
270
270
|
skeletonStyles: { colors: { skeletonColor: j?.skeletonColor } }
|
|
271
271
|
})
|
|
272
|
-
}, t.key)), /* @__PURE__ */
|
|
273
|
-
ref:
|
|
272
|
+
}, t.key)), /* @__PURE__ */ H("div", {
|
|
273
|
+
ref: V,
|
|
274
274
|
"aria-hidden": !0,
|
|
275
275
|
className: "h-px w-full"
|
|
276
276
|
})]
|
|
277
277
|
});
|
|
278
|
-
},
|
|
279
|
-
return /* @__PURE__ */
|
|
280
|
-
style:
|
|
281
|
-
className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4",
|
|
278
|
+
}, K = g || !!_ || h.length === 0;
|
|
279
|
+
return /* @__PURE__ */ U("div", {
|
|
280
|
+
style: I,
|
|
281
|
+
className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", J.container),
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ U("div", {
|
|
284
284
|
className: "flex items-start justify-between gap-4",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ U("div", {
|
|
286
286
|
className: "min-w-0 gap-2",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ H("h1", {
|
|
288
288
|
className: r("truncate", P),
|
|
289
289
|
children: e.title
|
|
290
|
-
}), /* @__PURE__ */
|
|
291
|
-
className: r("mt-1", F,
|
|
290
|
+
}), /* @__PURE__ */ H("p", {
|
|
291
|
+
className: r("mt-1", F, J.subtitle),
|
|
292
292
|
children: e.subtitle
|
|
293
293
|
})]
|
|
294
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ H(S, {
|
|
295
295
|
label: e.createButtonLabel,
|
|
296
|
-
iconBefore: /* @__PURE__ */
|
|
296
|
+
iconBefore: /* @__PURE__ */ H(L, {
|
|
297
297
|
size: d.SM,
|
|
298
298
|
"aria-hidden": !0
|
|
299
299
|
}),
|
|
@@ -301,11 +301,11 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
301
301
|
className: "shrink-0"
|
|
302
302
|
})]
|
|
303
303
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ U("div", {
|
|
305
305
|
className: "flex flex-wrap items-center gap-3",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ H("div", {
|
|
307
307
|
className: "flex-1",
|
|
308
|
-
children: /* @__PURE__ */
|
|
308
|
+
children: /* @__PURE__ */ H(i, {
|
|
309
309
|
value: l,
|
|
310
310
|
onChange: u,
|
|
311
311
|
labels: {
|
|
@@ -321,7 +321,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
321
321
|
clearButtonClassName: "size-11 desktop:size-auto"
|
|
322
322
|
}
|
|
323
323
|
})
|
|
324
|
-
}), e.sortOptions.length > 0 && /* @__PURE__ */
|
|
324
|
+
}), e.sortOptions.length > 0 && /* @__PURE__ */ H(o, {
|
|
325
325
|
label: ee,
|
|
326
326
|
variant: s.Primary,
|
|
327
327
|
appearance: a.Ghost,
|
|
@@ -331,106 +331,104 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
331
331
|
}))
|
|
332
332
|
})]
|
|
333
333
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ H("span", {
|
|
335
335
|
role: "status",
|
|
336
336
|
"aria-live": "polite",
|
|
337
337
|
className: "sr-only",
|
|
338
|
-
children:
|
|
338
|
+
children: z
|
|
339
339
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col",
|
|
340
|
+
/* @__PURE__ */ H("div", {
|
|
341
|
+
className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col", K && "items-center justify-center"),
|
|
342
342
|
children: G()
|
|
343
343
|
})
|
|
344
344
|
]
|
|
345
345
|
});
|
|
346
346
|
}, pe = /* @__PURE__ */ function(e) {
|
|
347
347
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
348
|
-
}({}), me = 500,
|
|
349
|
-
return e.
|
|
350
|
-
}({}), he =
|
|
351
|
-
return e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
352
|
-
}({}), Y = (e) => String(e).padStart(2, "0"), ge = (e) => e ? new Date(e) : null, _e = (e) => {
|
|
348
|
+
}({}), me = 500, Y = /* @__PURE__ */ function(e) {
|
|
349
|
+
return e.OneTime = "oneTime", e.Hourly = "hourly", e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
350
|
+
}({}), X = (e) => String(e).padStart(2, "0"), he = (e) => e ? new Date(e) : null, ge = (e) => {
|
|
353
351
|
if (e == null) return "";
|
|
354
352
|
let t = e instanceof Date ? e : new Date(e);
|
|
355
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${
|
|
356
|
-
},
|
|
353
|
+
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${X(t.getMonth() + 1)}-${X(t.getDate())}T${X(t.getHours())}:${X(t.getMinutes())}`;
|
|
354
|
+
}, _e = (e) => {
|
|
357
355
|
if (!e) return null;
|
|
358
356
|
let [t, n, r] = e.split("-").map(Number);
|
|
359
357
|
return new Date(t, n - 1, r);
|
|
360
|
-
},
|
|
358
|
+
}, ve = (e) => {
|
|
361
359
|
if (e == null) return "";
|
|
362
360
|
let t = e instanceof Date ? e : new Date(e);
|
|
363
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${
|
|
364
|
-
},
|
|
361
|
+
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${X(t.getMonth() + 1)}-${X(t.getDate())}`;
|
|
362
|
+
}, ye = (e) => {
|
|
365
363
|
let t = Number(e);
|
|
366
364
|
return e && Number.isFinite(t) ? String(t + 1) : null;
|
|
367
|
-
},
|
|
365
|
+
}, be = (e) => {
|
|
368
366
|
let t = typeof e == "string" ? Number(e) : NaN;
|
|
369
367
|
return Number.isFinite(t) ? String(t - 1) : "";
|
|
370
|
-
},
|
|
368
|
+
}, Z = {
|
|
371
369
|
container: "_container_sq3dp_1",
|
|
372
370
|
header: "_header_sq3dp_5",
|
|
373
371
|
detailsColumn: "_detailsColumn_sq3dp_9",
|
|
374
372
|
sectionSubtitle: "_sectionSubtitle_sq3dp_13",
|
|
375
373
|
instructionsError: "_instructionsError_sq3dp_17"
|
|
376
|
-
},
|
|
377
|
-
let { colors: _, typography: y } = g ?? {},
|
|
374
|
+
}, xe = (e) => `${e} *`, Se = z(async () => ({ default: (await y()).MarkdownEditor })), Ce = ({ labels: e, values: t, errors: i, modelOptions: a, onFieldChange: o, onBack: s, onCancel: u, onSubmit: f, isSubmitting: p = !1, markdownEditorTheme: m, styles: g }) => {
|
|
375
|
+
let { colors: _, typography: y } = g ?? {}, w = y?.titleClassName ?? "dial-h1-text", T = y?.sectionTitleClassName ?? "dial-body-semi-text", O = y?.sectionSubtitleClassName ?? "dial-tiny-text", A = y?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", j = y?.instructionsErrorClassName ?? "dial-small-text", M = n({
|
|
378
376
|
"--stcf-bg": _?.background,
|
|
379
377
|
"--stcf-header-border": _?.headerBorder,
|
|
380
378
|
"--stcf-details-border": _?.detailsColumnBorder,
|
|
381
379
|
"--stcf-subtitle-text": _?.sectionSubtitleText,
|
|
382
380
|
"--stcf-error-text": _?.instructionsErrorText
|
|
383
|
-
}),
|
|
384
|
-
return /* @__PURE__ */
|
|
385
|
-
style:
|
|
386
|
-
className: r("flex h-full w-full flex-col overflow-y-auto",
|
|
387
|
-
children: [/* @__PURE__ */
|
|
388
|
-
className: r("flex h-16 items-center justify-between gap-6 border-b px-8",
|
|
389
|
-
children: [/* @__PURE__ */
|
|
381
|
+
}), N = p || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
|
|
382
|
+
return /* @__PURE__ */ U("div", {
|
|
383
|
+
style: M,
|
|
384
|
+
className: r("flex h-full w-full flex-col overflow-y-auto", Z.container),
|
|
385
|
+
children: [/* @__PURE__ */ U("div", {
|
|
386
|
+
className: r("flex h-16 items-center justify-between gap-6 border-b px-8", Z.header),
|
|
387
|
+
children: [/* @__PURE__ */ U("div", {
|
|
390
388
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
392
|
-
icon: /* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ H(h, {
|
|
390
|
+
icon: /* @__PURE__ */ H(k, {
|
|
393
391
|
size: d.LG,
|
|
394
392
|
className: "rtl:scale-x-[-1]",
|
|
395
393
|
"aria-hidden": !0
|
|
396
394
|
}),
|
|
397
395
|
"aria-label": e.backButtonLabel,
|
|
398
396
|
onClick: s
|
|
399
|
-
}), /* @__PURE__ */
|
|
400
|
-
className: r("truncate",
|
|
397
|
+
}), /* @__PURE__ */ H("h1", {
|
|
398
|
+
className: r("truncate", w),
|
|
401
399
|
children: e.pageTitle
|
|
402
400
|
})]
|
|
403
|
-
}), /* @__PURE__ */
|
|
401
|
+
}), /* @__PURE__ */ U("div", {
|
|
404
402
|
className: "flex items-center gap-2",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ H(b, {
|
|
406
404
|
label: e.cancelButtonLabel,
|
|
407
405
|
onClick: u,
|
|
408
406
|
disabled: p
|
|
409
|
-
}), /* @__PURE__ */
|
|
407
|
+
}), /* @__PURE__ */ H(S, {
|
|
410
408
|
label: e.createButtonLabel,
|
|
411
409
|
onClick: f,
|
|
412
|
-
disabled:
|
|
410
|
+
disabled: N
|
|
413
411
|
})]
|
|
414
412
|
})]
|
|
415
|
-
}), /* @__PURE__ */
|
|
413
|
+
}), /* @__PURE__ */ U("div", {
|
|
416
414
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
417
415
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
416
|
+
/* @__PURE__ */ U("div", {
|
|
419
417
|
role: "group",
|
|
420
418
|
"aria-label": e.detailsSectionTitle,
|
|
421
|
-
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0",
|
|
419
|
+
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", Z.detailsColumn),
|
|
422
420
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ U("div", {
|
|
424
422
|
className: "flex flex-col gap-1",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
-
className:
|
|
423
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
424
|
+
className: T,
|
|
427
425
|
children: e.detailsSectionTitle
|
|
428
|
-
}), /* @__PURE__ */
|
|
429
|
-
className: r(
|
|
426
|
+
}), /* @__PURE__ */ H("p", {
|
|
427
|
+
className: r(O, Z.sectionSubtitle),
|
|
430
428
|
children: e.detailsSectionSubtitle
|
|
431
429
|
})]
|
|
432
430
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ H(v, {
|
|
434
432
|
id: "scheduled-task-display-name",
|
|
435
433
|
value: t.displayName,
|
|
436
434
|
onChange: (e) => o("displayName", e ?? ""),
|
|
@@ -441,7 +439,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
441
439
|
invalid: !!i.displayName,
|
|
442
440
|
error: i.displayName
|
|
443
441
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ H(D, {
|
|
445
443
|
id: "scheduled-task-description",
|
|
446
444
|
value: t.description ?? "",
|
|
447
445
|
onChange: (e) => o("description", e),
|
|
@@ -451,7 +449,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
451
449
|
error: i.description,
|
|
452
450
|
caption: t.description ? `${t.description.length}/500` : void 0
|
|
453
451
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ H(C, {
|
|
455
453
|
labelProps: {
|
|
456
454
|
label: e.modelOrAgentLabel,
|
|
457
455
|
required: !0
|
|
@@ -465,78 +463,62 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
465
463
|
label: e.label
|
|
466
464
|
}))
|
|
467
465
|
}),
|
|
468
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ U("div", {
|
|
469
467
|
className: "flex flex-col gap-3",
|
|
470
468
|
children: [
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
options: [{
|
|
480
|
-
value: J.Once,
|
|
481
|
-
label: e.scheduleTypeOnceLabel
|
|
482
|
-
}, {
|
|
483
|
-
value: J.Recurring,
|
|
484
|
-
label: e.scheduleTypeRecurringLabel
|
|
485
|
-
}]
|
|
469
|
+
/* @__PURE__ */ H(C, {
|
|
470
|
+
labelProps: { label: e.repeatLabel },
|
|
471
|
+
value: t.repeat,
|
|
472
|
+
onChange: (e) => o("repeat", e),
|
|
473
|
+
options: e.repeatOptions.map((e) => ({
|
|
474
|
+
value: e.key,
|
|
475
|
+
label: e.label
|
|
476
|
+
}))
|
|
486
477
|
}),
|
|
487
|
-
t.
|
|
478
|
+
t.repeat === Y.OneTime && /* @__PURE__ */ U("div", {
|
|
488
479
|
className: "flex flex-col gap-1",
|
|
489
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ H(c, {
|
|
490
481
|
id: "scheduled-task-run-at",
|
|
491
482
|
mode: l.DateTime,
|
|
492
|
-
value:
|
|
493
|
-
onChange: (e) => o("runAt",
|
|
494
|
-
label:
|
|
483
|
+
value: he(t.runAt),
|
|
484
|
+
onChange: (e) => o("runAt", ge(e)),
|
|
485
|
+
label: xe(e.runAtLabel),
|
|
495
486
|
invalid: !!i.runAt
|
|
496
|
-
}), i.runAt && /* @__PURE__ */
|
|
497
|
-
className: r(
|
|
487
|
+
}), i.runAt && /* @__PURE__ */ H("p", {
|
|
488
|
+
className: r(j, Z.instructionsError),
|
|
498
489
|
children: i.runAt
|
|
499
490
|
})]
|
|
500
491
|
}),
|
|
501
|
-
t.
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
labelProps: { label: e.frequencyLabel },
|
|
504
|
-
value: t.frequency,
|
|
505
|
-
onChange: (e) => o("frequency", e),
|
|
506
|
-
options: e.frequencyOptions.map((e) => ({
|
|
507
|
-
value: e.key,
|
|
508
|
-
label: e.label
|
|
509
|
-
}))
|
|
510
|
-
}),
|
|
511
|
-
/* @__PURE__ */ H("div", {
|
|
492
|
+
t.repeat !== Y.OneTime && /* @__PURE__ */ U(V, { children: [
|
|
493
|
+
t.repeat !== Y.Hourly && /* @__PURE__ */ U("div", {
|
|
512
494
|
className: "flex flex-col gap-1",
|
|
513
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ H(c, {
|
|
514
496
|
id: "scheduled-task-time",
|
|
515
497
|
mode: l.Time,
|
|
516
498
|
value: t.time,
|
|
517
499
|
onChange: (e) => o("time", typeof e == "string" ? e : ""),
|
|
518
|
-
label:
|
|
500
|
+
label: xe(e.timeLabel),
|
|
519
501
|
invalid: !!i.time
|
|
520
|
-
}), i.time && /* @__PURE__ */
|
|
521
|
-
className: r(
|
|
502
|
+
}), i.time && /* @__PURE__ */ H("p", {
|
|
503
|
+
className: r(j, Z.instructionsError),
|
|
522
504
|
children: i.time
|
|
523
505
|
})]
|
|
524
506
|
}),
|
|
525
|
-
t.
|
|
507
|
+
t.repeat === Y.Weekly && /* @__PURE__ */ U("div", {
|
|
526
508
|
className: "flex flex-col gap-1",
|
|
527
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ H(c, {
|
|
528
510
|
id: "scheduled-task-day-of-week",
|
|
529
511
|
mode: l.Weekday,
|
|
530
|
-
value:
|
|
531
|
-
onChange: (e) => o("dayOfWeek",
|
|
532
|
-
label:
|
|
512
|
+
value: ye(t.dayOfWeek),
|
|
513
|
+
onChange: (e) => o("dayOfWeek", be(e)),
|
|
514
|
+
label: xe(e.dayOfWeekLabel),
|
|
533
515
|
invalid: !!i.dayOfWeek
|
|
534
|
-
}), i.dayOfWeek && /* @__PURE__ */
|
|
535
|
-
className: r(
|
|
516
|
+
}), i.dayOfWeek && /* @__PURE__ */ H("p", {
|
|
517
|
+
className: r(j, Z.instructionsError),
|
|
536
518
|
children: i.dayOfWeek
|
|
537
519
|
})]
|
|
538
520
|
}),
|
|
539
|
-
t.
|
|
521
|
+
t.repeat === Y.Monthly && /* @__PURE__ */ H(v, {
|
|
540
522
|
id: "scheduled-task-day-of-month",
|
|
541
523
|
value: t.dayOfMonth ?? "",
|
|
542
524
|
onChange: (e) => o("dayOfMonth", e ?? ""),
|
|
@@ -547,34 +529,48 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
547
529
|
invalid: !!i.dayOfMonth,
|
|
548
530
|
error: i.dayOfMonth
|
|
549
531
|
}),
|
|
550
|
-
/* @__PURE__ */ H(
|
|
532
|
+
t.repeat === Y.Hourly && /* @__PURE__ */ H(x, {
|
|
533
|
+
id: "scheduled-task-minute",
|
|
534
|
+
integer: !0,
|
|
535
|
+
min: 0,
|
|
536
|
+
max: 59,
|
|
537
|
+
value: t.minute ?? "",
|
|
538
|
+
onChange: (e) => o("minute", e == null ? "" : String(e)),
|
|
539
|
+
labelProps: {
|
|
540
|
+
label: e.minuteLabel,
|
|
541
|
+
required: !0
|
|
542
|
+
},
|
|
543
|
+
invalid: !!i.minute,
|
|
544
|
+
error: i.minute
|
|
545
|
+
}),
|
|
546
|
+
/* @__PURE__ */ U("div", {
|
|
551
547
|
className: "flex flex-col gap-3 desktop:flex-row",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ U("div", {
|
|
553
549
|
className: "flex flex-1 flex-col gap-1",
|
|
554
|
-
children: [/* @__PURE__ */
|
|
550
|
+
children: [/* @__PURE__ */ H(c, {
|
|
555
551
|
id: "scheduled-task-start-date",
|
|
556
552
|
mode: l.Date,
|
|
557
|
-
value:
|
|
558
|
-
onChange: (e) => o("startDate",
|
|
553
|
+
value: _e(t.startDate),
|
|
554
|
+
onChange: (e) => o("startDate", ve(e)),
|
|
559
555
|
label: e.startDateLabel,
|
|
560
556
|
placeholder: e.startDatePlaceholder,
|
|
561
557
|
invalid: !!i.startDate
|
|
562
|
-
}), i.startDate && /* @__PURE__ */
|
|
563
|
-
className: r(
|
|
558
|
+
}), i.startDate && /* @__PURE__ */ H("p", {
|
|
559
|
+
className: r(j, Z.instructionsError),
|
|
564
560
|
children: i.startDate
|
|
565
561
|
})]
|
|
566
|
-
}), /* @__PURE__ */
|
|
562
|
+
}), /* @__PURE__ */ U("div", {
|
|
567
563
|
className: "flex flex-1 flex-col gap-1",
|
|
568
|
-
children: [/* @__PURE__ */
|
|
564
|
+
children: [/* @__PURE__ */ H(c, {
|
|
569
565
|
id: "scheduled-task-end-date",
|
|
570
566
|
mode: l.Date,
|
|
571
|
-
value:
|
|
572
|
-
onChange: (e) => o("endDate",
|
|
567
|
+
value: _e(t.endDate),
|
|
568
|
+
onChange: (e) => o("endDate", ve(e)),
|
|
573
569
|
label: e.endDateLabel,
|
|
574
570
|
placeholder: e.endDatePlaceholder,
|
|
575
571
|
invalid: !!i.endDate
|
|
576
|
-
}), i.endDate && /* @__PURE__ */
|
|
577
|
-
className: r(
|
|
572
|
+
}), i.endDate && /* @__PURE__ */ H("p", {
|
|
573
|
+
className: r(j, Z.instructionsError),
|
|
578
574
|
children: i.endDate
|
|
579
575
|
})]
|
|
580
576
|
})]
|
|
@@ -584,45 +580,45 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
584
580
|
})
|
|
585
581
|
]
|
|
586
582
|
}),
|
|
587
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ U("div", {
|
|
588
584
|
role: "group",
|
|
589
585
|
"aria-label": e.configurationSectionTitle,
|
|
590
586
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ U("div", {
|
|
592
588
|
className: "flex flex-col gap-1",
|
|
593
|
-
children: [/* @__PURE__ */
|
|
594
|
-
className:
|
|
589
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
590
|
+
className: T,
|
|
595
591
|
children: e.configurationSectionTitle
|
|
596
|
-
}), /* @__PURE__ */
|
|
597
|
-
className: r(
|
|
592
|
+
}), /* @__PURE__ */ H("p", {
|
|
593
|
+
className: r(O, Z.sectionSubtitle),
|
|
598
594
|
children: e.configurationSectionSubtitle
|
|
599
595
|
})]
|
|
600
|
-
}), /* @__PURE__ */
|
|
596
|
+
}), /* @__PURE__ */ U("div", {
|
|
601
597
|
role: "group",
|
|
602
598
|
"aria-label": e.instructionsLabel,
|
|
603
599
|
className: "flex flex-1 flex-col gap-1",
|
|
604
600
|
children: [
|
|
605
|
-
/* @__PURE__ */
|
|
606
|
-
className:
|
|
601
|
+
/* @__PURE__ */ H("span", {
|
|
602
|
+
className: A,
|
|
607
603
|
children: e.instructionsLabel
|
|
608
604
|
}),
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
fallback: /* @__PURE__ */
|
|
611
|
-
children: /* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ H(R, {
|
|
606
|
+
fallback: /* @__PURE__ */ H(E, {}),
|
|
607
|
+
children: /* @__PURE__ */ H(Se, {
|
|
612
608
|
value: t.prompt,
|
|
613
609
|
onChange: (e) => o("prompt", e),
|
|
614
610
|
height: 480,
|
|
615
611
|
theme: m
|
|
616
612
|
})
|
|
617
613
|
}),
|
|
618
|
-
i.prompt && /* @__PURE__ */
|
|
619
|
-
className: r(
|
|
614
|
+
i.prompt && /* @__PURE__ */ H("p", {
|
|
615
|
+
className: r(j, Z.instructionsError),
|
|
620
616
|
children: i.prompt
|
|
621
617
|
})
|
|
622
618
|
]
|
|
623
619
|
})]
|
|
624
620
|
}),
|
|
625
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ H("div", {
|
|
626
622
|
"aria-hidden": !0,
|
|
627
623
|
className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
|
|
628
624
|
})
|
|
@@ -646,29 +642,29 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
646
642
|
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : we(e.parentElement);
|
|
647
643
|
}, Te = ({ status: e }) => {
|
|
648
644
|
switch (e) {
|
|
649
|
-
case Q.Success: return /* @__PURE__ */
|
|
645
|
+
case Q.Success: return /* @__PURE__ */ H(j, {
|
|
650
646
|
size: d.SM,
|
|
651
647
|
className: $.successIcon,
|
|
652
648
|
"aria-hidden": !0
|
|
653
649
|
});
|
|
654
|
-
case Q.Error: return /* @__PURE__ */
|
|
650
|
+
case Q.Error: return /* @__PURE__ */ H(M, {
|
|
655
651
|
size: d.SM,
|
|
656
652
|
className: $.errorIcon,
|
|
657
653
|
"aria-hidden": !0
|
|
658
654
|
});
|
|
659
|
-
case Q.InProgress: return /* @__PURE__ */
|
|
655
|
+
case Q.InProgress: return /* @__PURE__ */ H("span", {
|
|
660
656
|
"aria-hidden": !0,
|
|
661
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ H(E, { size: d.SM })
|
|
662
658
|
});
|
|
663
|
-
case Q.Missed: return /* @__PURE__ */
|
|
659
|
+
case Q.Missed: return /* @__PURE__ */ H(O, {
|
|
664
660
|
size: d.SM,
|
|
665
661
|
className: $.missedIcon,
|
|
666
662
|
"aria-hidden": !0
|
|
667
663
|
});
|
|
668
664
|
default: return null;
|
|
669
665
|
}
|
|
670
|
-
}, Ee = ({ labels: t, onBack: i, onEdit: a, displayName: o, isLoading: s = !1, error: c, onRetry: l, description: u, modelLabel: f, repeatsLabel: p, activeWindowLabel: g, nextRunLabel: _, instructionsMarkdown: v, renderInstructions: y, runs: x, runsIsLoading: S = !1, runsIsLoadingMore:
|
|
671
|
-
let { colors: I, typography: L } =
|
|
666
|
+
}, Ee = ({ labels: t, onBack: i, onEdit: a, displayName: o, isLoading: s = !1, error: c, onRetry: l, description: u, modelLabel: f, repeatsLabel: p, activeWindowLabel: g, nextRunLabel: _, instructionsMarkdown: v, renderInstructions: y, runs: x, runsIsLoading: S = !1, runsIsLoadingMore: C = !1, runsSkeletonCount: D = 6, runsError: O, onRunsRetry: A, runsHasMore: j = !1, onRunsLoadMore: M, onRunClick: N, styles: P }) => {
|
|
667
|
+
let { colors: I, typography: L } = P ?? {}, ee = L?.titleClassName ?? "dial-h1-text", R = L?.sectionTitleClassName ?? "dial-body-semi-text", z = L?.fieldLabelClassName ?? "dial-tiny-text", B = L?.fieldValueClassName ?? "dial-body-text", V = L?.runTimestampClassName ?? "dial-small-text", W = n({
|
|
672
668
|
"--stdv-bg": I?.background,
|
|
673
669
|
"--stdv-header-border": I?.headerBorder,
|
|
674
670
|
"--stdv-details-border": I?.detailsColumnBorder,
|
|
@@ -684,20 +680,20 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
684
680
|
let t = we(e.parentElement);
|
|
685
681
|
if (!t) return;
|
|
686
682
|
let n = () => {
|
|
687
|
-
if (
|
|
683
|
+
if (C || S || !j) return;
|
|
688
684
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
689
685
|
r.top < n.bottom && r.bottom > n.top && M();
|
|
690
686
|
};
|
|
691
687
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
692
688
|
}, [
|
|
693
689
|
j,
|
|
694
|
-
|
|
690
|
+
C,
|
|
695
691
|
S,
|
|
696
692
|
M
|
|
697
693
|
]);
|
|
698
|
-
let
|
|
694
|
+
let K = (t) => y ? y(t) : /* @__PURE__ */ H(e, { content: t }), re = (e) => {
|
|
699
695
|
let n = `${t.runStatusLabels[e.status]} ${e.timestampLabel}`, i = !!N;
|
|
700
|
-
return /* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ U("li", {
|
|
701
697
|
...i ? {
|
|
702
698
|
role: "button",
|
|
703
699
|
tabIndex: 0,
|
|
@@ -708,51 +704,51 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
708
704
|
} : {},
|
|
709
705
|
"aria-label": n,
|
|
710
706
|
className: r("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", i && "cursor-pointer"),
|
|
711
|
-
children: [/* @__PURE__ */
|
|
712
|
-
className: r(
|
|
707
|
+
children: [/* @__PURE__ */ H("span", {
|
|
708
|
+
className: r(V, "truncate"),
|
|
713
709
|
children: e.timestampLabel
|
|
714
|
-
}), /* @__PURE__ */
|
|
710
|
+
}), /* @__PURE__ */ H("span", {
|
|
715
711
|
className: "flex h-8 w-14 shrink-0 items-center justify-end",
|
|
716
|
-
children: /* @__PURE__ */
|
|
712
|
+
children: /* @__PURE__ */ H(Te, { status: e.status })
|
|
717
713
|
})]
|
|
718
714
|
}, e.id);
|
|
719
|
-
},
|
|
715
|
+
}, q = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ U("li", {
|
|
720
716
|
"aria-hidden": "true",
|
|
721
717
|
className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
|
|
722
|
-
children: [/* @__PURE__ */
|
|
723
|
-
variant:
|
|
718
|
+
children: [/* @__PURE__ */ H(w, {
|
|
719
|
+
variant: T.Rectangular,
|
|
724
720
|
width: "160px",
|
|
725
721
|
height: "16px"
|
|
726
|
-
}), /* @__PURE__ */
|
|
727
|
-
variant:
|
|
722
|
+
}), /* @__PURE__ */ H(w, {
|
|
723
|
+
variant: T.Rectangular,
|
|
728
724
|
width: "16px",
|
|
729
725
|
height: "16px",
|
|
730
726
|
className: "shrink-0 rounded-full"
|
|
731
727
|
})]
|
|
732
728
|
}, `history-skeleton-${t}`));
|
|
733
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ U("div", {
|
|
734
730
|
style: W,
|
|
735
731
|
className: r("flex h-full w-full flex-col overflow-y-auto", $.container),
|
|
736
732
|
children: [
|
|
737
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ U("div", {
|
|
738
734
|
className: r("flex h-16 shrink-0 items-center justify-between gap-2 border-b px-8", $.header),
|
|
739
|
-
children: [/* @__PURE__ */
|
|
735
|
+
children: [/* @__PURE__ */ U("div", {
|
|
740
736
|
className: "flex min-w-0 items-center gap-2",
|
|
741
|
-
children: [/* @__PURE__ */
|
|
742
|
-
icon: /* @__PURE__ */
|
|
737
|
+
children: [/* @__PURE__ */ H(h, {
|
|
738
|
+
icon: /* @__PURE__ */ H(k, {
|
|
743
739
|
size: d.LG,
|
|
744
740
|
className: "rtl:scale-x-[-1]",
|
|
745
741
|
"aria-hidden": !0
|
|
746
742
|
}),
|
|
747
743
|
"aria-label": t.backAriaLabel,
|
|
748
744
|
onClick: i
|
|
749
|
-
}), /* @__PURE__ */
|
|
745
|
+
}), /* @__PURE__ */ H("h1", {
|
|
750
746
|
className: r("truncate", ee),
|
|
751
747
|
children: o
|
|
752
748
|
})]
|
|
753
|
-
}), a && /* @__PURE__ */
|
|
749
|
+
}), a && /* @__PURE__ */ H(b, {
|
|
754
750
|
label: t.editButtonLabel,
|
|
755
|
-
iconBefore: /* @__PURE__ */
|
|
751
|
+
iconBefore: /* @__PURE__ */ H(F, {
|
|
756
752
|
size: d.SM,
|
|
757
753
|
"aria-hidden": !0
|
|
758
754
|
}),
|
|
@@ -760,129 +756,129 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
760
756
|
className: "shrink-0"
|
|
761
757
|
})]
|
|
762
758
|
}),
|
|
763
|
-
s && /* @__PURE__ */
|
|
759
|
+
s && /* @__PURE__ */ H("div", {
|
|
764
760
|
className: "flex flex-1 items-center justify-center",
|
|
765
|
-
children: /* @__PURE__ */
|
|
761
|
+
children: /* @__PURE__ */ H(E, {})
|
|
766
762
|
}),
|
|
767
|
-
!s && c && /* @__PURE__ */
|
|
763
|
+
!s && c && /* @__PURE__ */ U("div", {
|
|
768
764
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
769
|
-
children: [/* @__PURE__ */
|
|
765
|
+
children: [/* @__PURE__ */ H("p", {
|
|
770
766
|
className: r(B, $.subtitleText),
|
|
771
767
|
children: t.errorLabel
|
|
772
|
-
}), /* @__PURE__ */
|
|
768
|
+
}), /* @__PURE__ */ H(m, {
|
|
773
769
|
label: t.retryLabel,
|
|
774
770
|
onClick: l
|
|
775
771
|
})]
|
|
776
772
|
}),
|
|
777
|
-
!s && !c && /* @__PURE__ */
|
|
773
|
+
!s && !c && /* @__PURE__ */ U("div", {
|
|
778
774
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
779
775
|
children: [
|
|
780
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ U("div", {
|
|
781
777
|
role: "group",
|
|
782
778
|
"aria-label": t.detailsTitle,
|
|
783
779
|
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
|
|
784
780
|
children: [
|
|
785
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ H("h2", {
|
|
786
782
|
className: R,
|
|
787
783
|
children: t.detailsTitle
|
|
788
784
|
}),
|
|
789
|
-
u && /* @__PURE__ */
|
|
785
|
+
u && /* @__PURE__ */ U("div", {
|
|
790
786
|
className: "flex flex-col gap-1",
|
|
791
|
-
children: [/* @__PURE__ */
|
|
787
|
+
children: [/* @__PURE__ */ H("span", {
|
|
792
788
|
className: z,
|
|
793
789
|
children: t.descriptionLabel
|
|
794
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ H("p", {
|
|
795
791
|
className: B,
|
|
796
792
|
children: u
|
|
797
793
|
})]
|
|
798
794
|
}),
|
|
799
|
-
f && /* @__PURE__ */
|
|
795
|
+
f && /* @__PURE__ */ U("div", {
|
|
800
796
|
className: "flex flex-col gap-1",
|
|
801
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ H("span", {
|
|
802
798
|
className: z,
|
|
803
799
|
children: t.modelLabel
|
|
804
|
-
}), /* @__PURE__ */
|
|
800
|
+
}), /* @__PURE__ */ H("p", {
|
|
805
801
|
className: B,
|
|
806
802
|
children: f
|
|
807
803
|
})]
|
|
808
804
|
}),
|
|
809
|
-
p && /* @__PURE__ */
|
|
805
|
+
p && /* @__PURE__ */ U("div", {
|
|
810
806
|
className: "flex flex-col gap-1",
|
|
811
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ H("span", {
|
|
812
808
|
className: z,
|
|
813
809
|
children: t.repeatsLabel
|
|
814
|
-
}), /* @__PURE__ */
|
|
810
|
+
}), /* @__PURE__ */ H("p", {
|
|
815
811
|
className: B,
|
|
816
812
|
children: p
|
|
817
813
|
})]
|
|
818
814
|
}),
|
|
819
|
-
g && /* @__PURE__ */
|
|
815
|
+
g && /* @__PURE__ */ U("div", {
|
|
820
816
|
className: "flex flex-col gap-1",
|
|
821
|
-
children: [/* @__PURE__ */
|
|
817
|
+
children: [/* @__PURE__ */ H("span", {
|
|
822
818
|
className: z,
|
|
823
819
|
children: t.activeWindowLabel
|
|
824
|
-
}), /* @__PURE__ */
|
|
820
|
+
}), /* @__PURE__ */ H("p", {
|
|
825
821
|
className: B,
|
|
826
822
|
children: g
|
|
827
823
|
})]
|
|
828
824
|
})
|
|
829
825
|
]
|
|
830
826
|
}),
|
|
831
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ U("div", {
|
|
832
828
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
833
|
-
children: [/* @__PURE__ */
|
|
829
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
834
830
|
className: R,
|
|
835
831
|
children: t.configurationTitle
|
|
836
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ U("div", {
|
|
837
833
|
role: "group",
|
|
838
834
|
"aria-label": t.instructionsLabel,
|
|
839
835
|
className: "flex flex-col gap-1",
|
|
840
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ H("span", {
|
|
841
837
|
className: z,
|
|
842
838
|
children: t.instructionsLabel
|
|
843
|
-
}), v &&
|
|
839
|
+
}), v && K(v)]
|
|
844
840
|
})]
|
|
845
841
|
}),
|
|
846
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ H("div", {
|
|
847
843
|
className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
|
|
848
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ U("div", {
|
|
849
845
|
className: r("flex w-full flex-col gap-4 overflow-y-auto rounded-xl px-6 py-5 shadow-md desktop:max-h-[70vh] desktop:w-[360px]", $.historyCard),
|
|
850
846
|
children: [
|
|
851
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ H("h2", {
|
|
852
848
|
className: R,
|
|
853
849
|
children: t.historyTitle
|
|
854
850
|
}),
|
|
855
|
-
_ && /* @__PURE__ */
|
|
856
|
-
className: r(
|
|
851
|
+
_ && /* @__PURE__ */ H("p", {
|
|
852
|
+
className: r(V, $.subtitleText),
|
|
857
853
|
children: _
|
|
858
854
|
}),
|
|
859
|
-
t.historyLoadingMoreLabel && /* @__PURE__ */
|
|
855
|
+
t.historyLoadingMoreLabel && /* @__PURE__ */ H("span", {
|
|
860
856
|
role: "status",
|
|
861
857
|
"aria-live": "polite",
|
|
862
858
|
className: "sr-only",
|
|
863
|
-
children:
|
|
859
|
+
children: C ? t.historyLoadingMoreLabel : ""
|
|
864
860
|
}),
|
|
865
|
-
S && x.length === 0 ? /* @__PURE__ */
|
|
861
|
+
S && x.length === 0 ? /* @__PURE__ */ H("ul", {
|
|
866
862
|
"aria-label": t.historyTitle,
|
|
867
|
-
children:
|
|
868
|
-
}) :
|
|
863
|
+
children: q(D)
|
|
864
|
+
}) : O ? /* @__PURE__ */ U("div", {
|
|
869
865
|
className: "flex flex-col items-start gap-3",
|
|
870
|
-
children: [/* @__PURE__ */
|
|
866
|
+
children: [/* @__PURE__ */ H("p", {
|
|
871
867
|
className: r(B, $.subtitleText),
|
|
872
868
|
children: t.historyErrorLabel
|
|
873
|
-
}), /* @__PURE__ */
|
|
869
|
+
}), /* @__PURE__ */ H(m, {
|
|
874
870
|
label: t.historyRetryLabel,
|
|
875
871
|
onClick: A
|
|
876
872
|
})]
|
|
877
|
-
}) : x.length === 0 ? /* @__PURE__ */
|
|
873
|
+
}) : x.length === 0 ? /* @__PURE__ */ H("p", {
|
|
878
874
|
className: r(B, $.subtitleText),
|
|
879
875
|
children: t.historyEmptyLabel
|
|
880
|
-
}) : /* @__PURE__ */
|
|
876
|
+
}) : /* @__PURE__ */ U("ul", {
|
|
881
877
|
"aria-label": t.historyTitle,
|
|
882
878
|
children: [
|
|
883
|
-
x.map(
|
|
884
|
-
|
|
885
|
-
/* @__PURE__ */
|
|
879
|
+
x.map(re),
|
|
880
|
+
C && q(D),
|
|
881
|
+
/* @__PURE__ */ H("li", {
|
|
886
882
|
ref: G,
|
|
887
883
|
"aria-hidden": !0,
|
|
888
884
|
className: "h-px w-full"
|
|
@@ -898,4 +894,4 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
898
894
|
});
|
|
899
895
|
};
|
|
900
896
|
//#endregion
|
|
901
|
-
export { me as DESCRIPTION_MAX_LENGTH,
|
|
897
|
+
export { me as DESCRIPTION_MAX_LENGTH, K as ScheduledTaskCard, oe as ScheduledTaskCardGrid, ae as ScheduledTaskCardSkeleton, Ce as ScheduledTaskCreateForm, Ee as ScheduledTaskDetailView, Y as ScheduledTaskRepeat, Q as ScheduledTaskRunStatus, ce as ScheduledTaskSection, W as ScheduledTaskSectionKey, fe as ScheduledTasks, pe as ScheduledTasksSortKey };
|