@epam/ai-dial-scheduled-tasks 1.1.0-dev.134 → 1.1.0-dev.138

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