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