@epam/ai-dial-scheduled-tasks 1.1.0-dev.127 → 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/ScheduledTaskCardSkeleton/ScheduledTaskCardSkeleton.d.ts.map +1 -1
- 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 +273 -275
- package/models/scheduled-task-card-skeleton-props.d.ts +1 -1
- 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,
|
|
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,8 +16,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
16
16
|
locationLeaf: "_locationLeaf_1xv9i_22",
|
|
17
17
|
newBadge: "_newBadge_1xv9i_26",
|
|
18
18
|
locationDivider: "_locationDivider_1xv9i_31"
|
|
19
|
-
},
|
|
20
|
-
let
|
|
19
|
+
}, K = ({ item: e, searchQuery: t = "", onEdit: i, onRunNow: a, onDelete: o, onCardClick: s, labels: c, styles: l, className: m }) => {
|
|
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,
|
|
23
23
|
"--stc-pill-bg": S?.schedulePillBackground,
|
|
@@ -31,8 +31,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
31
31
|
}), j = [];
|
|
32
32
|
i && j.push({
|
|
33
33
|
key: "edit",
|
|
34
|
-
label:
|
|
35
|
-
icon: /* @__PURE__ */
|
|
34
|
+
label: y,
|
|
35
|
+
icon: /* @__PURE__ */ H(P, {
|
|
36
36
|
size: d.SM,
|
|
37
37
|
"aria-hidden": !0
|
|
38
38
|
}),
|
|
@@ -41,8 +41,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
41
41
|
}
|
|
42
42
|
}), a && j.push({
|
|
43
43
|
key: "runNow",
|
|
44
|
-
label:
|
|
45
|
-
icon: /* @__PURE__ */
|
|
44
|
+
label: b,
|
|
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,105 +61,105 @@ 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
|
-
className: r("h-[232px]", s && "cursor-pointer",
|
|
76
|
-
...
|
|
75
|
+
className: r("h-[232px]", s && "cursor-pointer", m),
|
|
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,
|
|
89
|
-
children:
|
|
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
|
+
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
|
}),
|
|
100
|
-
"aria-label":
|
|
100
|
+
"aria-label": v,
|
|
101
101
|
className: "shrink-0",
|
|
102
102
|
onClick: (e) => e.stopPropagation()
|
|
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,84 +168,84 @@ 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:
|
|
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
|
-
items:
|
|
212
|
+
items: h.filter((t) => t.sectionKey === e)
|
|
213
213
|
})).filter((e) => e.items.length > 0);
|
|
214
|
-
}, [
|
|
214
|
+
}, [h, e.sharedSectionTitle]), z = ue(g, b, !!_, h.length, l.trim().length > 0, e), V = ne(null);
|
|
215
215
|
te(() => {
|
|
216
|
-
let e =
|
|
217
|
-
if (!e || !
|
|
216
|
+
let e = V.current;
|
|
217
|
+
if (!e || !C) return;
|
|
218
218
|
let t = de(e.parentElement);
|
|
219
219
|
if (!t) return;
|
|
220
220
|
let n = () => {
|
|
221
|
-
if (b ||
|
|
221
|
+
if (b || g || !y) return;
|
|
222
222
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
223
|
-
r.top < n.bottom && r.bottom > n.top &&
|
|
223
|
+
r.top < n.bottom && r.bottom > n.top && C();
|
|
224
224
|
};
|
|
225
225
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
226
226
|
}, [
|
|
227
227
|
y,
|
|
228
228
|
b,
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
g,
|
|
230
|
+
C
|
|
231
231
|
]);
|
|
232
232
|
let G = () => {
|
|
233
|
-
if (
|
|
234
|
-
if (
|
|
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 (
|
|
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
|
-
onEdit:
|
|
265
|
-
onRunNow:
|
|
264
|
+
onEdit: w,
|
|
265
|
+
onRunNow: T,
|
|
266
266
|
onDelete: D,
|
|
267
267
|
onCardClick: O,
|
|
268
268
|
labels: e.cardLabels,
|
|
269
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,24 +331,22 @@ 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
|
-
}({}), Y = /* @__PURE__ */ function(e) {
|
|
351
|
-
return e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", 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;
|
|
352
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);
|
|
@@ -373,64 +371,64 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
373
371
|
detailsColumn: "_detailsColumn_sq3dp_9",
|
|
374
372
|
sectionSubtitle: "_sectionSubtitle_sq3dp_13",
|
|
375
373
|
instructionsError: "_instructionsError_sq3dp_17"
|
|
376
|
-
}, xe = (e) => `${e} *`, Se =
|
|
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:
|
|
381
|
+
}), N = p || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
|
|
382
|
+
return /* @__PURE__ */ U("div", {
|
|
383
|
+
style: M,
|
|
386
384
|
className: r("flex h-full w-full flex-col overflow-y-auto", Z.container),
|
|
387
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ U("div", {
|
|
388
386
|
className: r("flex h-16 items-center justify-between gap-6 border-b px-8", Z.header),
|
|
389
|
-
children: [/* @__PURE__ */
|
|
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
|
-
disabled:
|
|
409
|
-
}), /* @__PURE__ */
|
|
406
|
+
disabled: p
|
|
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
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,9 +449,11 @@ 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__ */
|
|
455
|
-
|
|
456
|
-
|
|
452
|
+
/* @__PURE__ */ H(C, {
|
|
453
|
+
labelProps: {
|
|
454
|
+
label: e.modelOrAgentLabel,
|
|
455
|
+
required: !0
|
|
456
|
+
},
|
|
457
457
|
value: t.modelId,
|
|
458
458
|
placeholder: e.modelPlaceholder,
|
|
459
459
|
onChange: (e) => o("modelId", e),
|
|
@@ -463,78 +463,62 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
463
463
|
label: e.label
|
|
464
464
|
}))
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ U("div", {
|
|
467
467
|
className: "flex flex-col gap-3",
|
|
468
468
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
470
|
-
|
|
471
|
-
|
|
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
|
+
}))
|
|
472
477
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
label: e.scheduleTypeAriaLabel,
|
|
475
|
-
value: t.scheduleType,
|
|
476
|
-
onChange: (e) => o("scheduleType", e),
|
|
477
|
-
options: [{
|
|
478
|
-
value: J.Once,
|
|
479
|
-
label: e.scheduleTypeOnceLabel
|
|
480
|
-
}, {
|
|
481
|
-
value: J.Recurring,
|
|
482
|
-
label: e.scheduleTypeRecurringLabel
|
|
483
|
-
}]
|
|
484
|
-
}),
|
|
485
|
-
t.scheduleType === J.Once && /* @__PURE__ */ H("div", {
|
|
478
|
+
t.repeat === Y.OneTime && /* @__PURE__ */ U("div", {
|
|
486
479
|
className: "flex flex-col gap-1",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ H(c, {
|
|
488
481
|
id: "scheduled-task-run-at",
|
|
489
482
|
mode: l.DateTime,
|
|
490
483
|
value: he(t.runAt),
|
|
491
484
|
onChange: (e) => o("runAt", ge(e)),
|
|
492
485
|
label: xe(e.runAtLabel),
|
|
493
486
|
invalid: !!i.runAt
|
|
494
|
-
}), i.runAt && /* @__PURE__ */
|
|
495
|
-
className: r(
|
|
487
|
+
}), i.runAt && /* @__PURE__ */ H("p", {
|
|
488
|
+
className: r(j, Z.instructionsError),
|
|
496
489
|
children: i.runAt
|
|
497
490
|
})]
|
|
498
491
|
}),
|
|
499
|
-
t.
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
label: e.frequencyLabel,
|
|
502
|
-
value: t.frequency,
|
|
503
|
-
onChange: (e) => o("frequency", e),
|
|
504
|
-
options: e.frequencyOptions.map((e) => ({
|
|
505
|
-
value: e.key,
|
|
506
|
-
label: e.label
|
|
507
|
-
}))
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ H("div", {
|
|
492
|
+
t.repeat !== Y.OneTime && /* @__PURE__ */ U(V, { children: [
|
|
493
|
+
t.repeat !== Y.Hourly && /* @__PURE__ */ U("div", {
|
|
510
494
|
className: "flex flex-col gap-1",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
495
|
+
children: [/* @__PURE__ */ H(c, {
|
|
512
496
|
id: "scheduled-task-time",
|
|
513
497
|
mode: l.Time,
|
|
514
498
|
value: t.time,
|
|
515
499
|
onChange: (e) => o("time", typeof e == "string" ? e : ""),
|
|
516
500
|
label: xe(e.timeLabel),
|
|
517
501
|
invalid: !!i.time
|
|
518
|
-
}), i.time && /* @__PURE__ */
|
|
519
|
-
className: r(
|
|
502
|
+
}), i.time && /* @__PURE__ */ H("p", {
|
|
503
|
+
className: r(j, Z.instructionsError),
|
|
520
504
|
children: i.time
|
|
521
505
|
})]
|
|
522
506
|
}),
|
|
523
|
-
t.
|
|
507
|
+
t.repeat === Y.Weekly && /* @__PURE__ */ U("div", {
|
|
524
508
|
className: "flex flex-col gap-1",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ H(c, {
|
|
526
510
|
id: "scheduled-task-day-of-week",
|
|
527
511
|
mode: l.Weekday,
|
|
528
512
|
value: ye(t.dayOfWeek),
|
|
529
513
|
onChange: (e) => o("dayOfWeek", be(e)),
|
|
530
514
|
label: xe(e.dayOfWeekLabel),
|
|
531
515
|
invalid: !!i.dayOfWeek
|
|
532
|
-
}), i.dayOfWeek && /* @__PURE__ */
|
|
533
|
-
className: r(
|
|
516
|
+
}), i.dayOfWeek && /* @__PURE__ */ H("p", {
|
|
517
|
+
className: r(j, Z.instructionsError),
|
|
534
518
|
children: i.dayOfWeek
|
|
535
519
|
})]
|
|
536
520
|
}),
|
|
537
|
-
t.
|
|
521
|
+
t.repeat === Y.Monthly && /* @__PURE__ */ H(v, {
|
|
538
522
|
id: "scheduled-task-day-of-month",
|
|
539
523
|
value: t.dayOfMonth ?? "",
|
|
540
524
|
onChange: (e) => o("dayOfMonth", e ?? ""),
|
|
@@ -545,11 +529,25 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
545
529
|
invalid: !!i.dayOfMonth,
|
|
546
530
|
error: i.dayOfMonth
|
|
547
531
|
}),
|
|
548
|
-
/* @__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", {
|
|
549
547
|
className: "flex flex-col gap-3 desktop:flex-row",
|
|
550
|
-
children: [/* @__PURE__ */
|
|
548
|
+
children: [/* @__PURE__ */ U("div", {
|
|
551
549
|
className: "flex flex-1 flex-col gap-1",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
550
|
+
children: [/* @__PURE__ */ H(c, {
|
|
553
551
|
id: "scheduled-task-start-date",
|
|
554
552
|
mode: l.Date,
|
|
555
553
|
value: _e(t.startDate),
|
|
@@ -557,13 +555,13 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
557
555
|
label: e.startDateLabel,
|
|
558
556
|
placeholder: e.startDatePlaceholder,
|
|
559
557
|
invalid: !!i.startDate
|
|
560
|
-
}), i.startDate && /* @__PURE__ */
|
|
561
|
-
className: r(
|
|
558
|
+
}), i.startDate && /* @__PURE__ */ H("p", {
|
|
559
|
+
className: r(j, Z.instructionsError),
|
|
562
560
|
children: i.startDate
|
|
563
561
|
})]
|
|
564
|
-
}), /* @__PURE__ */
|
|
562
|
+
}), /* @__PURE__ */ U("div", {
|
|
565
563
|
className: "flex flex-1 flex-col gap-1",
|
|
566
|
-
children: [/* @__PURE__ */
|
|
564
|
+
children: [/* @__PURE__ */ H(c, {
|
|
567
565
|
id: "scheduled-task-end-date",
|
|
568
566
|
mode: l.Date,
|
|
569
567
|
value: _e(t.endDate),
|
|
@@ -571,8 +569,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
571
569
|
label: e.endDateLabel,
|
|
572
570
|
placeholder: e.endDatePlaceholder,
|
|
573
571
|
invalid: !!i.endDate
|
|
574
|
-
}), i.endDate && /* @__PURE__ */
|
|
575
|
-
className: r(
|
|
572
|
+
}), i.endDate && /* @__PURE__ */ H("p", {
|
|
573
|
+
className: r(j, Z.instructionsError),
|
|
576
574
|
children: i.endDate
|
|
577
575
|
})]
|
|
578
576
|
})]
|
|
@@ -582,45 +580,45 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
582
580
|
})
|
|
583
581
|
]
|
|
584
582
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ U("div", {
|
|
586
584
|
role: "group",
|
|
587
585
|
"aria-label": e.configurationSectionTitle,
|
|
588
586
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
587
|
+
children: [/* @__PURE__ */ U("div", {
|
|
590
588
|
className: "flex flex-col gap-1",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
592
|
-
className:
|
|
589
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
590
|
+
className: T,
|
|
593
591
|
children: e.configurationSectionTitle
|
|
594
|
-
}), /* @__PURE__ */
|
|
595
|
-
className: r(
|
|
592
|
+
}), /* @__PURE__ */ H("p", {
|
|
593
|
+
className: r(O, Z.sectionSubtitle),
|
|
596
594
|
children: e.configurationSectionSubtitle
|
|
597
595
|
})]
|
|
598
|
-
}), /* @__PURE__ */
|
|
596
|
+
}), /* @__PURE__ */ U("div", {
|
|
599
597
|
role: "group",
|
|
600
598
|
"aria-label": e.instructionsLabel,
|
|
601
599
|
className: "flex flex-1 flex-col gap-1",
|
|
602
600
|
children: [
|
|
603
|
-
/* @__PURE__ */
|
|
604
|
-
className:
|
|
601
|
+
/* @__PURE__ */ H("span", {
|
|
602
|
+
className: A,
|
|
605
603
|
children: e.instructionsLabel
|
|
606
604
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
fallback: /* @__PURE__ */
|
|
609
|
-
children: /* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ H(R, {
|
|
606
|
+
fallback: /* @__PURE__ */ H(E, {}),
|
|
607
|
+
children: /* @__PURE__ */ H(Se, {
|
|
610
608
|
value: t.prompt,
|
|
611
609
|
onChange: (e) => o("prompt", e),
|
|
612
610
|
height: 480,
|
|
613
|
-
theme:
|
|
611
|
+
theme: m
|
|
614
612
|
})
|
|
615
613
|
}),
|
|
616
|
-
i.prompt && /* @__PURE__ */
|
|
617
|
-
className: r(
|
|
614
|
+
i.prompt && /* @__PURE__ */ H("p", {
|
|
615
|
+
className: r(j, Z.instructionsError),
|
|
618
616
|
children: i.prompt
|
|
619
617
|
})
|
|
620
618
|
]
|
|
621
619
|
})]
|
|
622
620
|
}),
|
|
623
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ H("div", {
|
|
624
622
|
"aria-hidden": !0,
|
|
625
623
|
className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
|
|
626
624
|
})
|
|
@@ -644,29 +642,29 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
644
642
|
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : we(e.parentElement);
|
|
645
643
|
}, Te = ({ status: e }) => {
|
|
646
644
|
switch (e) {
|
|
647
|
-
case Q.Success: return /* @__PURE__ */
|
|
645
|
+
case Q.Success: return /* @__PURE__ */ H(j, {
|
|
648
646
|
size: d.SM,
|
|
649
647
|
className: $.successIcon,
|
|
650
648
|
"aria-hidden": !0
|
|
651
649
|
});
|
|
652
|
-
case Q.Error: return /* @__PURE__ */
|
|
650
|
+
case Q.Error: return /* @__PURE__ */ H(M, {
|
|
653
651
|
size: d.SM,
|
|
654
652
|
className: $.errorIcon,
|
|
655
653
|
"aria-hidden": !0
|
|
656
654
|
});
|
|
657
|
-
case Q.InProgress: return /* @__PURE__ */
|
|
655
|
+
case Q.InProgress: return /* @__PURE__ */ H("span", {
|
|
658
656
|
"aria-hidden": !0,
|
|
659
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ H(E, { size: d.SM })
|
|
660
658
|
});
|
|
661
|
-
case Q.Missed: return /* @__PURE__ */
|
|
659
|
+
case Q.Missed: return /* @__PURE__ */ H(O, {
|
|
662
660
|
size: d.SM,
|
|
663
661
|
className: $.missedIcon,
|
|
664
662
|
"aria-hidden": !0
|
|
665
663
|
});
|
|
666
664
|
default: return null;
|
|
667
665
|
}
|
|
668
|
-
}, 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:
|
|
669
|
-
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({
|
|
670
668
|
"--stdv-bg": I?.background,
|
|
671
669
|
"--stdv-header-border": I?.headerBorder,
|
|
672
670
|
"--stdv-details-border": I?.detailsColumnBorder,
|
|
@@ -682,20 +680,20 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
682
680
|
let t = we(e.parentElement);
|
|
683
681
|
if (!t) return;
|
|
684
682
|
let n = () => {
|
|
685
|
-
if (
|
|
683
|
+
if (C || S || !j) return;
|
|
686
684
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
687
685
|
r.top < n.bottom && r.bottom > n.top && M();
|
|
688
686
|
};
|
|
689
687
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
690
688
|
}, [
|
|
691
689
|
j,
|
|
692
|
-
|
|
693
|
-
|
|
690
|
+
C,
|
|
691
|
+
S,
|
|
694
692
|
M
|
|
695
693
|
]);
|
|
696
|
-
let
|
|
694
|
+
let K = (t) => y ? y(t) : /* @__PURE__ */ H(e, { content: t }), re = (e) => {
|
|
697
695
|
let n = `${t.runStatusLabels[e.status]} ${e.timestampLabel}`, i = !!N;
|
|
698
|
-
return /* @__PURE__ */
|
|
696
|
+
return /* @__PURE__ */ U("li", {
|
|
699
697
|
...i ? {
|
|
700
698
|
role: "button",
|
|
701
699
|
tabIndex: 0,
|
|
@@ -706,51 +704,51 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
706
704
|
} : {},
|
|
707
705
|
"aria-label": n,
|
|
708
706
|
className: r("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", i && "cursor-pointer"),
|
|
709
|
-
children: [/* @__PURE__ */
|
|
710
|
-
className: r(
|
|
707
|
+
children: [/* @__PURE__ */ H("span", {
|
|
708
|
+
className: r(V, "truncate"),
|
|
711
709
|
children: e.timestampLabel
|
|
712
|
-
}), /* @__PURE__ */
|
|
710
|
+
}), /* @__PURE__ */ H("span", {
|
|
713
711
|
className: "flex h-8 w-14 shrink-0 items-center justify-end",
|
|
714
|
-
children: /* @__PURE__ */
|
|
712
|
+
children: /* @__PURE__ */ H(Te, { status: e.status })
|
|
715
713
|
})]
|
|
716
714
|
}, e.id);
|
|
717
|
-
},
|
|
715
|
+
}, q = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ U("li", {
|
|
718
716
|
"aria-hidden": "true",
|
|
719
717
|
className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
|
|
720
|
-
children: [/* @__PURE__ */
|
|
721
|
-
variant:
|
|
718
|
+
children: [/* @__PURE__ */ H(w, {
|
|
719
|
+
variant: T.Rectangular,
|
|
722
720
|
width: "160px",
|
|
723
721
|
height: "16px"
|
|
724
|
-
}), /* @__PURE__ */
|
|
725
|
-
variant:
|
|
722
|
+
}), /* @__PURE__ */ H(w, {
|
|
723
|
+
variant: T.Rectangular,
|
|
726
724
|
width: "16px",
|
|
727
725
|
height: "16px",
|
|
728
726
|
className: "shrink-0 rounded-full"
|
|
729
727
|
})]
|
|
730
728
|
}, `history-skeleton-${t}`));
|
|
731
|
-
return /* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ U("div", {
|
|
732
730
|
style: W,
|
|
733
731
|
className: r("flex h-full w-full flex-col overflow-y-auto", $.container),
|
|
734
732
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ U("div", {
|
|
736
734
|
className: r("flex h-16 shrink-0 items-center justify-between gap-2 border-b px-8", $.header),
|
|
737
|
-
children: [/* @__PURE__ */
|
|
735
|
+
children: [/* @__PURE__ */ U("div", {
|
|
738
736
|
className: "flex min-w-0 items-center gap-2",
|
|
739
|
-
children: [/* @__PURE__ */
|
|
740
|
-
icon: /* @__PURE__ */
|
|
737
|
+
children: [/* @__PURE__ */ H(h, {
|
|
738
|
+
icon: /* @__PURE__ */ H(k, {
|
|
741
739
|
size: d.LG,
|
|
742
740
|
className: "rtl:scale-x-[-1]",
|
|
743
741
|
"aria-hidden": !0
|
|
744
742
|
}),
|
|
745
743
|
"aria-label": t.backAriaLabel,
|
|
746
744
|
onClick: i
|
|
747
|
-
}), /* @__PURE__ */
|
|
745
|
+
}), /* @__PURE__ */ H("h1", {
|
|
748
746
|
className: r("truncate", ee),
|
|
749
747
|
children: o
|
|
750
748
|
})]
|
|
751
|
-
}), a && /* @__PURE__ */
|
|
749
|
+
}), a && /* @__PURE__ */ H(b, {
|
|
752
750
|
label: t.editButtonLabel,
|
|
753
|
-
iconBefore: /* @__PURE__ */
|
|
751
|
+
iconBefore: /* @__PURE__ */ H(F, {
|
|
754
752
|
size: d.SM,
|
|
755
753
|
"aria-hidden": !0
|
|
756
754
|
}),
|
|
@@ -758,129 +756,129 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
758
756
|
className: "shrink-0"
|
|
759
757
|
})]
|
|
760
758
|
}),
|
|
761
|
-
s && /* @__PURE__ */
|
|
759
|
+
s && /* @__PURE__ */ H("div", {
|
|
762
760
|
className: "flex flex-1 items-center justify-center",
|
|
763
|
-
children: /* @__PURE__ */
|
|
761
|
+
children: /* @__PURE__ */ H(E, {})
|
|
764
762
|
}),
|
|
765
|
-
!s && c && /* @__PURE__ */
|
|
763
|
+
!s && c && /* @__PURE__ */ U("div", {
|
|
766
764
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
767
|
-
children: [/* @__PURE__ */
|
|
765
|
+
children: [/* @__PURE__ */ H("p", {
|
|
768
766
|
className: r(B, $.subtitleText),
|
|
769
767
|
children: t.errorLabel
|
|
770
|
-
}), /* @__PURE__ */
|
|
768
|
+
}), /* @__PURE__ */ H(m, {
|
|
771
769
|
label: t.retryLabel,
|
|
772
770
|
onClick: l
|
|
773
771
|
})]
|
|
774
772
|
}),
|
|
775
|
-
!s && !c && /* @__PURE__ */
|
|
773
|
+
!s && !c && /* @__PURE__ */ U("div", {
|
|
776
774
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
777
775
|
children: [
|
|
778
|
-
/* @__PURE__ */
|
|
776
|
+
/* @__PURE__ */ U("div", {
|
|
779
777
|
role: "group",
|
|
780
778
|
"aria-label": t.detailsTitle,
|
|
781
779
|
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
|
|
782
780
|
children: [
|
|
783
|
-
/* @__PURE__ */
|
|
781
|
+
/* @__PURE__ */ H("h2", {
|
|
784
782
|
className: R,
|
|
785
783
|
children: t.detailsTitle
|
|
786
784
|
}),
|
|
787
|
-
u && /* @__PURE__ */
|
|
785
|
+
u && /* @__PURE__ */ U("div", {
|
|
788
786
|
className: "flex flex-col gap-1",
|
|
789
|
-
children: [/* @__PURE__ */
|
|
787
|
+
children: [/* @__PURE__ */ H("span", {
|
|
790
788
|
className: z,
|
|
791
789
|
children: t.descriptionLabel
|
|
792
|
-
}), /* @__PURE__ */
|
|
790
|
+
}), /* @__PURE__ */ H("p", {
|
|
793
791
|
className: B,
|
|
794
792
|
children: u
|
|
795
793
|
})]
|
|
796
794
|
}),
|
|
797
|
-
f && /* @__PURE__ */
|
|
795
|
+
f && /* @__PURE__ */ U("div", {
|
|
798
796
|
className: "flex flex-col gap-1",
|
|
799
|
-
children: [/* @__PURE__ */
|
|
797
|
+
children: [/* @__PURE__ */ H("span", {
|
|
800
798
|
className: z,
|
|
801
799
|
children: t.modelLabel
|
|
802
|
-
}), /* @__PURE__ */
|
|
800
|
+
}), /* @__PURE__ */ H("p", {
|
|
803
801
|
className: B,
|
|
804
802
|
children: f
|
|
805
803
|
})]
|
|
806
804
|
}),
|
|
807
|
-
p && /* @__PURE__ */
|
|
805
|
+
p && /* @__PURE__ */ U("div", {
|
|
808
806
|
className: "flex flex-col gap-1",
|
|
809
|
-
children: [/* @__PURE__ */
|
|
807
|
+
children: [/* @__PURE__ */ H("span", {
|
|
810
808
|
className: z,
|
|
811
809
|
children: t.repeatsLabel
|
|
812
|
-
}), /* @__PURE__ */
|
|
810
|
+
}), /* @__PURE__ */ H("p", {
|
|
813
811
|
className: B,
|
|
814
812
|
children: p
|
|
815
813
|
})]
|
|
816
814
|
}),
|
|
817
|
-
g && /* @__PURE__ */
|
|
815
|
+
g && /* @__PURE__ */ U("div", {
|
|
818
816
|
className: "flex flex-col gap-1",
|
|
819
|
-
children: [/* @__PURE__ */
|
|
817
|
+
children: [/* @__PURE__ */ H("span", {
|
|
820
818
|
className: z,
|
|
821
819
|
children: t.activeWindowLabel
|
|
822
|
-
}), /* @__PURE__ */
|
|
820
|
+
}), /* @__PURE__ */ H("p", {
|
|
823
821
|
className: B,
|
|
824
822
|
children: g
|
|
825
823
|
})]
|
|
826
824
|
})
|
|
827
825
|
]
|
|
828
826
|
}),
|
|
829
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ U("div", {
|
|
830
828
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
831
|
-
children: [/* @__PURE__ */
|
|
829
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
832
830
|
className: R,
|
|
833
831
|
children: t.configurationTitle
|
|
834
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ U("div", {
|
|
835
833
|
role: "group",
|
|
836
834
|
"aria-label": t.instructionsLabel,
|
|
837
835
|
className: "flex flex-col gap-1",
|
|
838
|
-
children: [/* @__PURE__ */
|
|
836
|
+
children: [/* @__PURE__ */ H("span", {
|
|
839
837
|
className: z,
|
|
840
838
|
children: t.instructionsLabel
|
|
841
|
-
}),
|
|
839
|
+
}), v && K(v)]
|
|
842
840
|
})]
|
|
843
841
|
}),
|
|
844
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ H("div", {
|
|
845
843
|
className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
|
|
846
|
-
children: /* @__PURE__ */
|
|
844
|
+
children: /* @__PURE__ */ U("div", {
|
|
847
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),
|
|
848
846
|
children: [
|
|
849
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ H("h2", {
|
|
850
848
|
className: R,
|
|
851
849
|
children: t.historyTitle
|
|
852
850
|
}),
|
|
853
|
-
|
|
854
|
-
className: r(
|
|
855
|
-
children:
|
|
851
|
+
_ && /* @__PURE__ */ H("p", {
|
|
852
|
+
className: r(V, $.subtitleText),
|
|
853
|
+
children: _
|
|
856
854
|
}),
|
|
857
|
-
t.historyLoadingMoreLabel && /* @__PURE__ */
|
|
855
|
+
t.historyLoadingMoreLabel && /* @__PURE__ */ H("span", {
|
|
858
856
|
role: "status",
|
|
859
857
|
"aria-live": "polite",
|
|
860
858
|
className: "sr-only",
|
|
861
|
-
children:
|
|
859
|
+
children: C ? t.historyLoadingMoreLabel : ""
|
|
862
860
|
}),
|
|
863
|
-
|
|
861
|
+
S && x.length === 0 ? /* @__PURE__ */ H("ul", {
|
|
864
862
|
"aria-label": t.historyTitle,
|
|
865
|
-
children:
|
|
866
|
-
}) :
|
|
863
|
+
children: q(D)
|
|
864
|
+
}) : O ? /* @__PURE__ */ U("div", {
|
|
867
865
|
className: "flex flex-col items-start gap-3",
|
|
868
|
-
children: [/* @__PURE__ */
|
|
866
|
+
children: [/* @__PURE__ */ H("p", {
|
|
869
867
|
className: r(B, $.subtitleText),
|
|
870
868
|
children: t.historyErrorLabel
|
|
871
|
-
}), /* @__PURE__ */
|
|
869
|
+
}), /* @__PURE__ */ H(m, {
|
|
872
870
|
label: t.historyRetryLabel,
|
|
873
871
|
onClick: A
|
|
874
872
|
})]
|
|
875
|
-
}) :
|
|
873
|
+
}) : x.length === 0 ? /* @__PURE__ */ H("p", {
|
|
876
874
|
className: r(B, $.subtitleText),
|
|
877
875
|
children: t.historyEmptyLabel
|
|
878
|
-
}) : /* @__PURE__ */
|
|
876
|
+
}) : /* @__PURE__ */ U("ul", {
|
|
879
877
|
"aria-label": t.historyTitle,
|
|
880
878
|
children: [
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
/* @__PURE__ */
|
|
879
|
+
x.map(re),
|
|
880
|
+
C && q(D),
|
|
881
|
+
/* @__PURE__ */ H("li", {
|
|
884
882
|
ref: G,
|
|
885
883
|
"aria-hidden": !0,
|
|
886
884
|
className: "h-px w-full"
|
|
@@ -896,4 +894,4 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
896
894
|
});
|
|
897
895
|
};
|
|
898
896
|
//#endregion
|
|
899
|
-
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 };
|