@epam/ai-dial-scheduled-tasks 1.2.0-dev.14 → 1.2.0-dev.142
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/calendar-value-B41Uk26Z.js +24 -0
- package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -1
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts +1 -1
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts.map +1 -1
- package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts +1 -1
- package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts.map +1 -1
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts +7 -6
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +27 -0
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -0
- package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
- package/components/ScheduledTaskDetailsSummary/ScheduledTaskDetailsSummary.d.ts.map +1 -1
- package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts.map +1 -1
- package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts +16 -0
- package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts.map +1 -0
- package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts.map +1 -1
- package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
- package/constants/public-class-names.d.ts +12 -0
- package/constants/public-class-names.d.ts.map +1 -0
- package/index.css +2 -2
- package/index.d.ts +9 -2
- package/index.d.ts.map +1 -1
- package/index.js +888 -612
- package/models/scheduled-task-card-grid-props.d.ts +12 -5
- package/models/scheduled-task-card-grid-props.d.ts.map +1 -1
- package/models/scheduled-task-card-props.d.ts +9 -0
- package/models/scheduled-task-card-props.d.ts.map +1 -1
- package/models/scheduled-task-configuration-section-props.d.ts +4 -0
- package/models/scheduled-task-configuration-section-props.d.ts.map +1 -1
- package/models/scheduled-task-create-form-props.d.ts +40 -4
- package/models/scheduled-task-create-form-props.d.ts.map +1 -1
- package/models/scheduled-task-detail-view-props.d.ts +24 -0
- package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
- package/models/scheduled-task-details-summary-props.d.ts +4 -0
- package/models/scheduled-task-details-summary-props.d.ts.map +1 -1
- package/models/scheduled-task-history-section-props.d.ts +15 -2
- package/models/scheduled-task-history-section-props.d.ts.map +1 -1
- package/models/scheduled-task-item.d.ts +7 -0
- package/models/scheduled-task-item.d.ts.map +1 -1
- package/models/scheduled-task-run-history-list-props.d.ts +3 -0
- package/models/scheduled-task-run-history-list-props.d.ts.map +1 -1
- package/models/scheduled-tasks-props.d.ts +9 -1
- package/models/scheduled-tasks-props.d.ts.map +1 -1
- package/package.json +9 -4
- package/utils/calendar-value.d.ts +2 -0
- package/utils/calendar-value.d.ts.map +1 -1
- package/validation/index.d.ts +3 -0
- package/validation/index.d.ts.map +1 -0
- package/validation/scheduled-task-validation.d.ts +35 -0
- package/validation/scheduled-task-validation.d.ts.map +1 -0
- package/validation.d.ts +3 -0
- package/validation.d.ts.map +1 -0
- package/validation.js +22 -0
package/index.js
CHANGED
|
@@ -1,316 +1,400 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"--stc-
|
|
32
|
-
"--stc-
|
|
33
|
-
"--stc-
|
|
34
|
-
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-value-B41Uk26Z.js";
|
|
2
|
+
import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as l, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as u, MDMessageViewer as d, PanelEmptyState as f, TextRefinementField as p, buildCssVars as m, mergeClasses as h, useAvailableHeightCap as g, useIsMobile as _, useTextRefinement as v } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { ButtonAppearance as y, ButtonDropdown as b, ButtonVariant as x, Calendar as S, CalendarMode as C, CardShell as w, DIAL_ICON_SIZE as T, DIAL_KIT_ICON_STROKE as E, ElementSize as ee, FolderPath as te, GhostButton as D, GhostIconButton as ne, Highlight as O, Input as re, Label as k, MenuItemMark as ie, NeutralButton as ae, NumberInput as oe, Popup as A, PrimaryButton as se, Search as ce, Select as le, Skeleton as j, SkeletonVariant as M, Spinner as ue, Switch as de, Tabs as N, Textarea as fe } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconAlertTriangle as P, IconArrowNarrowLeft as pe, IconArrowsSort as F, IconCircleCheck as me, IconCircleX as I, IconClipboardX as L, IconPencilMinus as he, IconPlayerPause as R, IconPlus as z, IconTrashX as ge } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as _e, lazy as B, useCallback as ve, useEffect as ye, useId as be, useLayoutEffect as V, useMemo as xe, useRef as Se, useState as Ce } from "react";
|
|
6
|
+
import { Fragment as we, jsx as H, jsxs as U } from "react/jsx-runtime";
|
|
7
|
+
import { BuilderFormContainer as Te } from "@epam/ai-dial-builder-form";
|
|
8
|
+
import { LazyMarkdownEditor as W } from "@epam/ai-dial-ui-kit/editors";
|
|
9
|
+
//#region src/constants/public-class-names.ts
|
|
10
|
+
var Ee = {
|
|
11
|
+
card: "dial-scheduled-tasks-card",
|
|
12
|
+
cardGrid: "dial-scheduled-tasks-card-grid",
|
|
13
|
+
refineFeedback: "dial-scheduled-tasks-refine-feedback"
|
|
14
|
+
}, G = /* @__PURE__ */ function(e) {
|
|
15
|
+
return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
|
|
16
|
+
}({}), K = {
|
|
17
|
+
title: "_title_7q7a6_1",
|
|
18
|
+
description: "_description_7q7a6_5",
|
|
19
|
+
schedulePill: "_schedulePill_7q7a6_9",
|
|
20
|
+
scheduleLabel: "_scheduleLabel_7q7a6_14",
|
|
21
|
+
locationLabel: "_locationLabel_7q7a6_18",
|
|
22
|
+
locationLeaf: "_locationLeaf_7q7a6_22",
|
|
23
|
+
newBadge: "_newBadge_7q7a6_26",
|
|
24
|
+
pausedPill: "_pausedPill_7q7a6_31",
|
|
25
|
+
pausedLabel: "_pausedLabel_7q7a6_36",
|
|
26
|
+
completedPill: "_completedPill_7q7a6_40",
|
|
27
|
+
completedLabel: "_completedLabel_7q7a6_45",
|
|
28
|
+
locationDivider: "_locationDivider_7q7a6_49"
|
|
29
|
+
}, De = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
|
|
30
|
+
let o = r?.newBadgeLabel ?? "NEW", s = r?.pausedBadgeLabel ?? "Paused", c = r?.completedBadgeLabel ?? "Completed", { colors: l, typography: u } = i ?? {}, d = u?.titleClassName ?? "dial-body-semi-text", f = u?.descriptionClassName ?? "dial-small-text", p = u?.descriptionSizeClassName ?? "dial-tiny-text", g = u?.scheduleLabelClassName ?? "dial-tiny-text", _ = u?.locationLabelClassName ?? "dial-tiny-text", v = u?.locationLeafClassName ?? "dial-tiny-semi-text", y = u?.newBadgeClassName ?? "dial-tiny-semi-text", b = u?.pausedBadgeClassName ?? "dial-tiny-text", x = u?.completedBadgeClassName ?? "dial-tiny-text", S = e.presentationStatus ?? (e.isActive === !1 ? G.Paused : G.Active), C = m({
|
|
31
|
+
"--stc-title-text": (S === G.Paused ? l?.pausedTitleText : S === G.Completed ? l?.completedTitleText : void 0) ?? l?.titleText,
|
|
32
|
+
"--stc-desc-text": l?.descriptionText,
|
|
33
|
+
"--stc-pill-bg": l?.schedulePillBackground,
|
|
34
|
+
"--stc-pill-border": l?.schedulePillBorder,
|
|
35
|
+
"--stc-schedule-label-text": l?.scheduleLabelText,
|
|
36
|
+
"--stc-location-label-text": l?.locationLabelText,
|
|
37
|
+
"--stc-location-leaf-text": l?.locationLeafText,
|
|
38
|
+
"--stc-new-badge-bg": l?.newBadgeBackground,
|
|
39
|
+
"--stc-new-badge-text": l?.newBadgeText,
|
|
40
|
+
"--stc-location-divider-border": l?.locationDividerBorder,
|
|
41
|
+
"--stc-paused-bg": l?.pausedBadgeBackground,
|
|
42
|
+
"--stc-paused-border": l?.pausedBadgeBorder,
|
|
43
|
+
"--stc-paused-text": l?.pausedBadgeText,
|
|
44
|
+
"--stc-completed-bg": l?.completedBadgeBackground,
|
|
45
|
+
"--stc-completed-border": l?.completedBadgeBorder,
|
|
46
|
+
"--stc-completed-text": l?.completedBadgeText
|
|
47
|
+
}), ee = n ? {
|
|
35
48
|
tabIndex: 0,
|
|
36
49
|
onClick: () => n(e.id),
|
|
37
50
|
onKeyDown: (t) => {
|
|
38
51
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e.id));
|
|
39
52
|
}
|
|
40
53
|
} : {};
|
|
41
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ U(w, {
|
|
42
55
|
role: n ? "button" : "group",
|
|
43
56
|
"aria-label": e.displayName,
|
|
44
|
-
style:
|
|
45
|
-
className:
|
|
46
|
-
...
|
|
57
|
+
style: C,
|
|
58
|
+
className: h("h-[var(--st-card-height,232px)]", n && "cursor-pointer", a, Ee.card),
|
|
59
|
+
...ee,
|
|
47
60
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ U("div", {
|
|
49
62
|
className: "flex min-w-0 shrink-0 items-center gap-2",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ H(O, {
|
|
51
64
|
text: e.displayName,
|
|
52
65
|
query: t,
|
|
53
66
|
maxLines: 1,
|
|
54
|
-
className:
|
|
55
|
-
}), e.isNew && /* @__PURE__ */
|
|
56
|
-
className:
|
|
57
|
-
children:
|
|
67
|
+
className: h(d, K.title)
|
|
68
|
+
}), e.isNew && /* @__PURE__ */ H("span", {
|
|
69
|
+
className: h("shrink-0 rounded-full px-2 py-0.5", y, K.newBadge),
|
|
70
|
+
children: o
|
|
58
71
|
})]
|
|
59
72
|
}),
|
|
60
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
61
|
-
className:
|
|
73
|
+
e.descriptionPreview && /* @__PURE__ */ H("p", {
|
|
74
|
+
className: h("line-clamp-4 min-h-0 flex-1 overflow-hidden", p, f, K.description),
|
|
62
75
|
children: e.descriptionPreview
|
|
63
76
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
77
|
+
/* @__PURE__ */ U("div", {
|
|
65
78
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
79
|
+
children: [/* @__PURE__ */ H("div", {
|
|
67
80
|
className: "flex min-h-[28px] items-center",
|
|
68
|
-
children:
|
|
69
|
-
className:
|
|
70
|
-
children: [/* @__PURE__ */
|
|
71
|
-
size:
|
|
81
|
+
children: S === G.Paused ? /* @__PURE__ */ U("span", {
|
|
82
|
+
className: h("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", K.pausedPill, b, K.pausedLabel),
|
|
83
|
+
children: [/* @__PURE__ */ H(R, {
|
|
84
|
+
size: T.SM,
|
|
72
85
|
"aria-hidden": !0,
|
|
73
|
-
stroke:
|
|
74
|
-
}),
|
|
75
|
-
}) : /* @__PURE__ */
|
|
76
|
-
className:
|
|
86
|
+
stroke: E
|
|
87
|
+
}), s]
|
|
88
|
+
}) : S === G.Completed ? /* @__PURE__ */ H("span", {
|
|
89
|
+
className: h("inline-flex items-center rounded-full border px-2 py-1", K.completedPill, x, K.completedLabel),
|
|
90
|
+
children: c
|
|
91
|
+
}) : /* @__PURE__ */ H("span", {
|
|
92
|
+
className: h("inline-block rounded-lg border px-2 py-1", K.schedulePill, g, K.scheduleLabel),
|
|
77
93
|
children: e.scheduleLabel
|
|
78
94
|
})
|
|
79
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */
|
|
95
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ H(te, {
|
|
80
96
|
segments: e.locationSegments,
|
|
81
|
-
labelClassName:
|
|
82
|
-
leafClassName:
|
|
83
|
-
className:
|
|
97
|
+
labelClassName: h(_, K.locationLabel),
|
|
98
|
+
leafClassName: h(v, K.locationLeaf),
|
|
99
|
+
className: h("pt-3", K.locationDivider)
|
|
84
100
|
})]
|
|
85
101
|
})
|
|
86
102
|
]
|
|
87
103
|
});
|
|
88
|
-
},
|
|
104
|
+
}, Oe = { card: "_card_11bez_1" }, q = [
|
|
89
105
|
"100%",
|
|
90
106
|
"100%",
|
|
91
107
|
"61%"
|
|
92
|
-
],
|
|
108
|
+
], J = "var(--stcs-skeleton-bg)", ke = ({ styles: e }) => /* @__PURE__ */ U(w, {
|
|
93
109
|
"aria-hidden": !0,
|
|
94
|
-
style:
|
|
95
|
-
className:
|
|
110
|
+
style: m({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
111
|
+
className: h("h-[var(--st-card-height,232px)]", Oe.card),
|
|
96
112
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
variant:
|
|
113
|
+
/* @__PURE__ */ H(j, {
|
|
114
|
+
variant: M.Rectangular,
|
|
99
115
|
width: "60%",
|
|
100
116
|
height: "20px",
|
|
101
|
-
color:
|
|
117
|
+
color: J,
|
|
102
118
|
className: "shrink-0"
|
|
103
119
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ H("div", {
|
|
105
121
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
106
|
-
children:
|
|
107
|
-
variant:
|
|
122
|
+
children: q.map((e, t) => /* @__PURE__ */ H(j, {
|
|
123
|
+
variant: M.Rectangular,
|
|
108
124
|
width: e,
|
|
109
125
|
height: "16px",
|
|
110
|
-
color:
|
|
126
|
+
color: J
|
|
111
127
|
}, t))
|
|
112
128
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
variant:
|
|
129
|
+
/* @__PURE__ */ H(j, {
|
|
130
|
+
variant: M.Rectangular,
|
|
115
131
|
width: "110px",
|
|
116
132
|
height: "28px",
|
|
117
|
-
color:
|
|
133
|
+
color: J,
|
|
118
134
|
className: "shrink-0 rounded-lg"
|
|
119
135
|
})
|
|
120
136
|
]
|
|
121
|
-
}),
|
|
122
|
-
|
|
123
|
-
|
|
137
|
+
}), Ae = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ U("div", {
|
|
138
|
+
style: {
|
|
139
|
+
"--st-grid-min-card-width": s?.minCardWidth,
|
|
140
|
+
"--st-grid-gap": s?.gap,
|
|
141
|
+
"--st-card-height": s?.cardHeight,
|
|
142
|
+
"--st-grid-columns": s?.maxColumns ?? 3,
|
|
143
|
+
maxWidth: s?.maxWidth ?? "1180px",
|
|
144
|
+
gap: "var(--st-grid-gap, 20px)",
|
|
145
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, max(var(--st-grid-min-card-width, 320px), calc((100% - (var(--st-grid-columns) - 1) * var(--st-grid-gap, 20px)) / var(--st-grid-columns)))), 1fr))"
|
|
146
|
+
},
|
|
147
|
+
className: h("mx-auto grid w-full min-w-0", Ee.cardGrid),
|
|
148
|
+
children: [e.map((e) => /* @__PURE__ */ H(De, {
|
|
124
149
|
item: e,
|
|
125
150
|
searchQuery: t,
|
|
126
151
|
onCardClick: n,
|
|
127
152
|
labels: r,
|
|
128
153
|
styles: i
|
|
129
|
-
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */
|
|
130
|
-
}),
|
|
131
|
-
container: "
|
|
132
|
-
subtitle: "
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
154
|
+
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ H(ke, { styles: o }, `skeleton-${t}`))]
|
|
155
|
+
}), Y = {
|
|
156
|
+
container: "_container_3vz4t_2",
|
|
157
|
+
subtitle: "_subtitle_3vz4t_6",
|
|
158
|
+
createButtonLabel: "_createButtonLabel_3vz4t_10",
|
|
159
|
+
sortButton: "_sortButton_3vz4t_19",
|
|
160
|
+
createButton: "_createButton_3vz4t_10",
|
|
161
|
+
sortControlHidden: "_sortControlHidden_3vz4t_49"
|
|
162
|
+
}, je = (e, t, n, r, i, a) => {
|
|
137
163
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
138
|
-
},
|
|
164
|
+
}, Me = (e) => {
|
|
139
165
|
if (!e || e === document.body) return null;
|
|
140
166
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
141
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
142
|
-
},
|
|
143
|
-
let { colors:
|
|
144
|
-
"--st-bg":
|
|
145
|
-
"--st-subtitle-text":
|
|
146
|
-
"--st-sort-text":
|
|
147
|
-
}),
|
|
148
|
-
|
|
149
|
-
}, [M,
|
|
150
|
-
|
|
151
|
-
}, []),
|
|
152
|
-
|
|
167
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Me(e.parentElement);
|
|
168
|
+
}, Ne = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: r, sortKey: i, onSortChange: a, items: o, isLoading: s = !1, error: c, onRetry: l, hasMore: u = !1, isLoadingMore: d = !1, skeletonCount: p = 6, onLoadMore: g, onCardClick: _, banner: v, styles: S, sortIcon: C, className: w, gridLayout: te, cardStyles: ne, loadMoreError: O, onRetryLoadMore: re }) => {
|
|
169
|
+
let { colors: k, typography: ae } = S ?? {}, oe = ae?.titleClassName ?? "dial-h1-text", A = ae?.subtitleClassName ?? "dial-body-text", le = m({
|
|
170
|
+
"--st-bg": k?.background,
|
|
171
|
+
"--st-subtitle-text": k?.subtitleText,
|
|
172
|
+
"--st-sort-text": k?.sortButtonText
|
|
173
|
+
}), j = (e) => {
|
|
174
|
+
r(e ?? "");
|
|
175
|
+
}, [M, de] = Ce(!1), [N, fe] = Ce(!1), P = Se(null), pe = ve(() => {
|
|
176
|
+
fe(!0);
|
|
177
|
+
}, []), me = ve(() => {
|
|
178
|
+
fe(!1);
|
|
153
179
|
}, []);
|
|
154
|
-
|
|
155
|
-
let e =
|
|
156
|
-
N && M && e != null && e.offsetParent == null &&
|
|
180
|
+
V(() => {
|
|
181
|
+
let e = P.current;
|
|
182
|
+
N && M && e != null && e.offsetParent == null && de(!1);
|
|
157
183
|
}, [N, M]);
|
|
158
|
-
let
|
|
184
|
+
let I = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, L = xe(() => e.sortOptions.map((e) => ({
|
|
159
185
|
key: e.value,
|
|
160
186
|
label: e.label,
|
|
161
|
-
mark:
|
|
162
|
-
checked: e.value ===
|
|
163
|
-
onClick: () =>
|
|
187
|
+
mark: ie.Check,
|
|
188
|
+
checked: e.value === i,
|
|
189
|
+
onClick: () => a(e.value)
|
|
164
190
|
})), [
|
|
165
191
|
e.sortOptions,
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
]),
|
|
169
|
-
|
|
170
|
-
let e =
|
|
171
|
-
if (!e || !
|
|
172
|
-
let t =
|
|
192
|
+
i,
|
|
193
|
+
a
|
|
194
|
+
]), he = je(s, d, !!c, o.length, n.trim().length > 0, e), R = Se(null);
|
|
195
|
+
ye(() => {
|
|
196
|
+
let e = R.current;
|
|
197
|
+
if (!e || !g) return;
|
|
198
|
+
let t = Me(e.parentElement);
|
|
173
199
|
if (!t) return;
|
|
174
200
|
let n = () => {
|
|
175
|
-
if (
|
|
201
|
+
if (d || s || O || !u) return;
|
|
176
202
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
177
|
-
r.top < n.bottom && r.bottom > n.top &&
|
|
203
|
+
r.top < n.bottom && r.bottom > n.top && g();
|
|
178
204
|
};
|
|
179
205
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
180
206
|
}, [
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
207
|
+
u,
|
|
208
|
+
d,
|
|
209
|
+
s,
|
|
210
|
+
O,
|
|
211
|
+
g
|
|
185
212
|
]);
|
|
186
|
-
let
|
|
213
|
+
let ge = () => s ? /* @__PURE__ */ H(ue, {}) : c ? /* @__PURE__ */ U("div", {
|
|
187
214
|
className: "flex flex-col items-center gap-3",
|
|
188
|
-
children: [/* @__PURE__ */
|
|
189
|
-
className:
|
|
215
|
+
children: [/* @__PURE__ */ H("p", {
|
|
216
|
+
className: h(A, Y.subtitle),
|
|
190
217
|
children: e.errorLabel
|
|
191
|
-
}), /* @__PURE__ */
|
|
218
|
+
}), /* @__PURE__ */ H(D, {
|
|
192
219
|
label: e.retryLabel,
|
|
193
|
-
onClick:
|
|
220
|
+
onClick: l
|
|
194
221
|
})]
|
|
195
|
-
}) :
|
|
196
|
-
className:
|
|
222
|
+
}) : o.length === 0 ? n.trim() ? /* @__PURE__ */ H("p", {
|
|
223
|
+
className: h(A, Y.subtitle),
|
|
197
224
|
children: e.noResultsLabel
|
|
198
|
-
}) : /* @__PURE__ */
|
|
225
|
+
}) : /* @__PURE__ */ H(f, { label: e.emptyStateLabel }) : /* @__PURE__ */ U("div", {
|
|
199
226
|
className: "flex w-full flex-col gap-6",
|
|
200
|
-
children: [/* @__PURE__ */ B(ve, {
|
|
201
|
-
items: f,
|
|
202
|
-
searchQuery: n,
|
|
203
|
-
onCardClick: ee,
|
|
204
|
-
labels: e.cardLabels,
|
|
205
|
-
trailingSkeletonCount: x ? S : 0,
|
|
206
|
-
skeletonStyles: { colors: { skeletonColor: D?.skeletonColor } }
|
|
207
|
-
}), /* @__PURE__ */ B("div", {
|
|
208
|
-
ref: H,
|
|
209
|
-
"aria-hidden": !0,
|
|
210
|
-
className: "h-px w-full"
|
|
211
|
-
})]
|
|
212
|
-
}), U = p || !!_ || f.length === 0;
|
|
213
|
-
return /* @__PURE__ */ V("div", {
|
|
214
|
-
style: j,
|
|
215
|
-
className: a("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", K.container),
|
|
216
227
|
children: [
|
|
217
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ H(Ae, {
|
|
229
|
+
items: o,
|
|
230
|
+
searchQuery: n,
|
|
231
|
+
onCardClick: _,
|
|
232
|
+
labels: e.cardLabels,
|
|
233
|
+
trailingSkeletonCount: d ? p : 0,
|
|
234
|
+
skeletonStyles: { colors: { skeletonColor: k?.skeletonColor } },
|
|
235
|
+
cardStyles: ne,
|
|
236
|
+
layout: te
|
|
237
|
+
}),
|
|
238
|
+
O && /* @__PURE__ */ U("div", {
|
|
239
|
+
role: "alert",
|
|
240
|
+
className: "flex items-center gap-3",
|
|
241
|
+
children: [/* @__PURE__ */ H("span", {
|
|
242
|
+
className: h(A, Y.subtitle),
|
|
243
|
+
children: e.loadMoreErrorLabel ?? e.errorLabel
|
|
244
|
+
}), /* @__PURE__ */ H(D, {
|
|
245
|
+
label: e.retryLabel,
|
|
246
|
+
onClick: re
|
|
247
|
+
})]
|
|
248
|
+
}),
|
|
249
|
+
/* @__PURE__ */ H("div", {
|
|
250
|
+
ref: R,
|
|
251
|
+
"aria-hidden": !0,
|
|
252
|
+
className: "h-px w-full"
|
|
253
|
+
})
|
|
254
|
+
]
|
|
255
|
+
}), _e = s || !!c || o.length === 0;
|
|
256
|
+
return /* @__PURE__ */ U("div", {
|
|
257
|
+
style: le,
|
|
258
|
+
className: h("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", Y.container, w),
|
|
259
|
+
children: [
|
|
260
|
+
/* @__PURE__ */ U("div", {
|
|
218
261
|
className: "flex items-start justify-between gap-4",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ U("div", {
|
|
220
263
|
className: "min-w-0 gap-2",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
222
|
-
className:
|
|
264
|
+
children: [/* @__PURE__ */ H("h1", {
|
|
265
|
+
className: h("truncate", oe),
|
|
223
266
|
children: e.title
|
|
224
|
-
}), /* @__PURE__ */
|
|
225
|
-
className:
|
|
267
|
+
}), /* @__PURE__ */ H("p", {
|
|
268
|
+
className: h("mt-1", A, Y.subtitle),
|
|
226
269
|
children: e.subtitle
|
|
227
270
|
})]
|
|
228
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ H(se, {
|
|
229
272
|
label: e.createButtonLabel,
|
|
230
|
-
textClassName:
|
|
273
|
+
textClassName: Y.createButtonLabel,
|
|
231
274
|
"aria-label": e.createButtonLabel,
|
|
232
|
-
iconBefore: /* @__PURE__ */
|
|
233
|
-
size:
|
|
275
|
+
iconBefore: /* @__PURE__ */ H(z, {
|
|
276
|
+
size: T.SM,
|
|
234
277
|
"aria-hidden": !0,
|
|
235
|
-
stroke:
|
|
278
|
+
stroke: E
|
|
236
279
|
}),
|
|
237
280
|
onClick: t,
|
|
238
|
-
className:
|
|
281
|
+
className: h("shrink-0", Y.createButton)
|
|
239
282
|
})]
|
|
240
283
|
}),
|
|
241
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ U("div", {
|
|
242
285
|
className: "flex flex-wrap items-center gap-3",
|
|
243
|
-
children: [/* @__PURE__ */
|
|
286
|
+
children: [/* @__PURE__ */ H("div", {
|
|
244
287
|
role: "search",
|
|
245
288
|
className: "flex-1",
|
|
246
|
-
children: /* @__PURE__ */
|
|
289
|
+
children: /* @__PURE__ */ H(ce, {
|
|
247
290
|
value: n,
|
|
248
|
-
onChange:
|
|
291
|
+
onChange: j,
|
|
249
292
|
placeholder: e.searchPlaceholder,
|
|
250
293
|
clearLabel: e.clearSearchLabel,
|
|
251
294
|
"aria-label": e.searchAriaLabel,
|
|
252
|
-
size:
|
|
253
|
-
onFocus:
|
|
254
|
-
onBlur:
|
|
295
|
+
size: ee.Large,
|
|
296
|
+
onFocus: pe,
|
|
297
|
+
onBlur: me
|
|
255
298
|
})
|
|
256
|
-
}), e.sortOptions.length > 0 && /* @__PURE__ */
|
|
257
|
-
ref:
|
|
258
|
-
className:
|
|
259
|
-
children: /* @__PURE__ */
|
|
260
|
-
items:
|
|
261
|
-
label:
|
|
262
|
-
variant:
|
|
263
|
-
appearance:
|
|
264
|
-
|
|
299
|
+
}), e.sortOptions.length > 0 && /* @__PURE__ */ H("div", {
|
|
300
|
+
ref: P,
|
|
301
|
+
className: h(N && Y.sortControlHidden),
|
|
302
|
+
children: /* @__PURE__ */ H(b, {
|
|
303
|
+
items: L,
|
|
304
|
+
label: I,
|
|
305
|
+
variant: x.Primary,
|
|
306
|
+
appearance: y.Ghost,
|
|
307
|
+
iconBefore: C === void 0 ? /* @__PURE__ */ H(F, {
|
|
308
|
+
size: T.SM,
|
|
309
|
+
"aria-hidden": !0,
|
|
310
|
+
stroke: E
|
|
311
|
+
}) : C,
|
|
312
|
+
className: Y.sortButton
|
|
265
313
|
})
|
|
266
314
|
})]
|
|
267
315
|
}),
|
|
268
|
-
|
|
269
|
-
/* @__PURE__ */
|
|
316
|
+
v,
|
|
317
|
+
/* @__PURE__ */ H("span", {
|
|
270
318
|
role: "status",
|
|
271
319
|
"aria-live": "polite",
|
|
272
320
|
className: "sr-only",
|
|
273
|
-
children:
|
|
321
|
+
children: he
|
|
274
322
|
}),
|
|
275
|
-
/* @__PURE__ */
|
|
276
|
-
className:
|
|
277
|
-
children:
|
|
323
|
+
/* @__PURE__ */ H("div", {
|
|
324
|
+
className: h("mx-auto flex size-full w-full min-w-0 flex-col", _e && "items-center justify-center"),
|
|
325
|
+
children: ge()
|
|
278
326
|
})
|
|
279
327
|
]
|
|
280
328
|
});
|
|
281
|
-
},
|
|
329
|
+
}, Pe = /* @__PURE__ */ function(e) {
|
|
282
330
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
283
|
-
}({}),
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
},
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
331
|
+
}({}), Fe = { error: "_error_v2pfn_4" }, Ie = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
|
|
332
|
+
let o = xe(() => /* @__PURE__ */ new Date(), []);
|
|
333
|
+
return /* @__PURE__ */ U("div", {
|
|
334
|
+
className: "flex flex-col gap-1",
|
|
335
|
+
children: [/* @__PURE__ */ H(S, {
|
|
336
|
+
id: "scheduled-task-run-at",
|
|
337
|
+
mode: C.DateTime,
|
|
338
|
+
value: s(t),
|
|
339
|
+
onChange: (e) => r(n(e)),
|
|
340
|
+
minDate: o,
|
|
341
|
+
labelProps: {
|
|
342
|
+
label: e,
|
|
343
|
+
required: !0
|
|
344
|
+
},
|
|
345
|
+
invalid: !!i
|
|
346
|
+
}), i && /* @__PURE__ */ H("p", {
|
|
347
|
+
className: h(a, Fe.error),
|
|
348
|
+
children: i
|
|
349
|
+
})]
|
|
350
|
+
});
|
|
351
|
+
}, X = {
|
|
352
|
+
formColumn: "_formColumn_1gu82_1",
|
|
353
|
+
detailsColumn: "_detailsColumn_1gu82_10",
|
|
354
|
+
sectionSubtitle: "_sectionSubtitle_1gu82_14",
|
|
355
|
+
instructionsError: "_instructionsError_1gu82_18",
|
|
356
|
+
refineFeedback: "_refineFeedback_1gu82_22",
|
|
357
|
+
refineError: "_refineError_1gu82_26"
|
|
358
|
+
}, Le = B(async () => ({ default: (await W()).MarkdownEditor })), Re = ({ labels: n, values: r, errors: s, modelSelector: d, modelLabelId: f, skillSelector: _, skillLabelId: y, skillErrorId: b, onFieldChange: x, onBack: w, onCancel: ee, onSubmit: te, isSubmitting: D = !1, onRefineDescription: ne, onRefineInstructions: O, markdownEditorTheme: ie, backIcon: ae, className: A, styles: se }) => {
|
|
359
|
+
let ce = be(), j = be(), M = Se(void 0), de = (e) => e ? async (t, n) => {
|
|
360
|
+
if (M.current && !M.current.aborted) throw new DOMException("Busy", "AbortError");
|
|
361
|
+
M.current = n;
|
|
362
|
+
try {
|
|
363
|
+
return await e(t, n);
|
|
364
|
+
} finally {
|
|
365
|
+
M.current === n && (M.current = void 0);
|
|
366
|
+
}
|
|
367
|
+
} : void 0, N = v({
|
|
368
|
+
value: r.description ?? "",
|
|
369
|
+
onChange: (e) => x("description", e),
|
|
370
|
+
onRefine: de(ne),
|
|
371
|
+
disabled: D
|
|
372
|
+
}), P = v({
|
|
373
|
+
value: r.prompt,
|
|
374
|
+
onChange: (e) => x("prompt", e),
|
|
375
|
+
onRefine: de(O),
|
|
376
|
+
disabled: D
|
|
377
|
+
}), F = N.isPending || P.isPending, me = () => {
|
|
378
|
+
N.reset(), P.reset();
|
|
379
|
+
}, I = g(), [L, he] = Ce(), { colors: R, typography: z, layout: ge } = se ?? {}, B = z?.titleClassName ?? "dial-h1-text", ve = z?.sectionTitleClassName ?? "dial-body-semi-text", V = z?.sectionSubtitleClassName ?? "dial-tiny-text", xe = z?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", W = z?.instructionsErrorClassName ?? "dial-small-text", G = m({
|
|
380
|
+
"--stcf-details-border": R?.detailsColumnBorder,
|
|
381
|
+
"--stcf-subtitle-text": R?.sectionSubtitleText,
|
|
382
|
+
"--stcf-error-text": R?.instructionsErrorText,
|
|
383
|
+
"--stcf-refine-action-text": R?.refineActionText,
|
|
384
|
+
"--stcf-refine-error-text": R?.refineErrorText
|
|
385
|
+
}), K = {
|
|
386
|
+
feedbackClassName: h(X.refineFeedback, z?.refineFeedbackClassName ?? "dial-small-text", Ee.refineFeedback),
|
|
387
|
+
errorClassName: X.refineError
|
|
388
|
+
}, De = (e) => {
|
|
389
|
+
he(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), x("time", e.target.value);
|
|
390
|
+
}, Oe = (e) => {
|
|
391
|
+
he(void 0), x("time", typeof e == "string" ? e : "");
|
|
392
|
+
}, q = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
|
|
393
|
+
ye(() => {
|
|
394
|
+
q || he(void 0);
|
|
395
|
+
}, [q]);
|
|
396
|
+
let J = q ? L ?? s.time : void 0, ke = (e) => x("runAt", e), Ae = D || F || !r.displayName.trim() || !r.modelId || !r.prompt.trim() && !r.skillUrl?.trim() || !!s.skillUrl || q && !r.time || !!J;
|
|
397
|
+
return /* @__PURE__ */ H(Te, {
|
|
314
398
|
labels: {
|
|
315
399
|
title: n.pageTitle,
|
|
316
400
|
backButtonLabel: n.backButtonLabel,
|
|
@@ -318,39 +402,57 @@ var U = {
|
|
|
318
402
|
submitButtonLabel: n.createButtonLabel,
|
|
319
403
|
submittingLabel: n.submittingLabel ?? "Saving"
|
|
320
404
|
},
|
|
321
|
-
onBack:
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
405
|
+
onBack: () => {
|
|
406
|
+
me(), w();
|
|
407
|
+
},
|
|
408
|
+
onCancel: () => {
|
|
409
|
+
me(), ee();
|
|
410
|
+
},
|
|
411
|
+
onSubmit: () => {
|
|
412
|
+
!Ae && (!M.current || M.current.aborted) && te();
|
|
413
|
+
},
|
|
414
|
+
isCancelDisabled: D,
|
|
415
|
+
isSubmitDisabled: Ae,
|
|
416
|
+
isSubmitting: D,
|
|
417
|
+
backIcon: ae === void 0 ? /* @__PURE__ */ H(pe, {
|
|
418
|
+
size: T.LG,
|
|
419
|
+
stroke: E,
|
|
420
|
+
"aria-hidden": !0,
|
|
421
|
+
className: "rtl:scale-x-[-1]"
|
|
422
|
+
}) : ae,
|
|
423
|
+
layout: {
|
|
424
|
+
sideColumnWidth: ge?.detailsWidth,
|
|
425
|
+
columnGap: ge?.columnGap,
|
|
426
|
+
reserveEndColumn: !1
|
|
427
|
+
},
|
|
428
|
+
className: A,
|
|
327
429
|
styles: {
|
|
328
|
-
colors: { background:
|
|
430
|
+
colors: { background: R?.background },
|
|
329
431
|
header: {
|
|
330
|
-
colors: { borderColor:
|
|
331
|
-
typography: { fontClassName:
|
|
432
|
+
colors: { borderColor: R?.headerBorder },
|
|
433
|
+
typography: { fontClassName: B }
|
|
332
434
|
},
|
|
333
|
-
cssVars:
|
|
435
|
+
cssVars: G
|
|
334
436
|
},
|
|
335
|
-
left: /* @__PURE__ */
|
|
437
|
+
left: /* @__PURE__ */ U("div", {
|
|
336
438
|
role: "group",
|
|
337
439
|
"aria-label": n.detailsSectionTitle,
|
|
338
|
-
className:
|
|
440
|
+
className: h("flex flex-1 flex-col gap-5 border-e py-6", X.detailsColumn, X.formColumn),
|
|
339
441
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ U("div", {
|
|
341
443
|
className: "flex flex-col gap-1",
|
|
342
|
-
children: [/* @__PURE__ */
|
|
343
|
-
className:
|
|
444
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
445
|
+
className: ve,
|
|
344
446
|
children: n.detailsSectionTitle
|
|
345
|
-
}), /* @__PURE__ */
|
|
346
|
-
className:
|
|
447
|
+
}), /* @__PURE__ */ H("p", {
|
|
448
|
+
className: h(V, X.sectionSubtitle),
|
|
347
449
|
children: n.detailsSectionSubtitle
|
|
348
450
|
})]
|
|
349
451
|
}),
|
|
350
|
-
/* @__PURE__ */
|
|
452
|
+
/* @__PURE__ */ H(re, {
|
|
351
453
|
id: "scheduled-task-display-name",
|
|
352
454
|
value: r.displayName,
|
|
353
|
-
onChange: (e) =>
|
|
455
|
+
onChange: (e) => x("displayName", e ?? ""),
|
|
354
456
|
labelProps: {
|
|
355
457
|
label: n.displayNameLabel,
|
|
356
458
|
required: !0
|
|
@@ -358,99 +460,103 @@ var U = {
|
|
|
358
460
|
invalid: !!s.displayName,
|
|
359
461
|
error: s.displayName
|
|
360
462
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
463
|
+
/* @__PURE__ */ H(p, {
|
|
464
|
+
isEnabled: !!ne,
|
|
465
|
+
fieldId: ce,
|
|
466
|
+
label: n.descriptionLabel,
|
|
467
|
+
labels: n,
|
|
468
|
+
refinement: N,
|
|
469
|
+
disabled: D || F,
|
|
470
|
+
...K,
|
|
471
|
+
children: /* @__PURE__ */ H(fe, {
|
|
472
|
+
id: ce,
|
|
473
|
+
value: r.description ?? "",
|
|
474
|
+
onChange: (e) => {
|
|
475
|
+
N.reset(), x("description", e);
|
|
476
|
+
},
|
|
477
|
+
labelProps: ne ? void 0 : { label: n.descriptionLabel },
|
|
478
|
+
maxLength: 500,
|
|
479
|
+
invalid: !!s.description,
|
|
480
|
+
error: s.description,
|
|
481
|
+
caption: r.description ? `${r.description.length}/500` : void 0
|
|
482
|
+
})
|
|
370
483
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
484
|
+
/* @__PURE__ */ U("div", {
|
|
372
485
|
className: "flex flex-col gap-1",
|
|
373
486
|
children: [
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
id:
|
|
487
|
+
/* @__PURE__ */ H(k, {
|
|
488
|
+
id: f,
|
|
376
489
|
label: n.modelOrAgentLabel,
|
|
377
490
|
required: !0
|
|
378
491
|
}),
|
|
379
|
-
|
|
380
|
-
s.modelId && /* @__PURE__ */
|
|
381
|
-
className:
|
|
492
|
+
d,
|
|
493
|
+
s.modelId && /* @__PURE__ */ H("p", {
|
|
494
|
+
className: h(W, X.instructionsError),
|
|
382
495
|
children: s.modelId
|
|
383
496
|
})
|
|
384
497
|
]
|
|
385
498
|
}),
|
|
386
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ U("div", {
|
|
387
500
|
className: "flex flex-col gap-3",
|
|
388
501
|
children: [
|
|
389
|
-
/* @__PURE__ */
|
|
502
|
+
/* @__PURE__ */ H(le, {
|
|
390
503
|
labelProps: { label: n.repeatLabel },
|
|
391
504
|
value: r.repeat,
|
|
392
|
-
onChange: (e) =>
|
|
505
|
+
onChange: (e) => x("repeat", e),
|
|
393
506
|
options: n.repeatOptions.map((e) => ({
|
|
394
507
|
value: e.key,
|
|
395
508
|
label: e.label
|
|
396
509
|
}))
|
|
397
510
|
}),
|
|
398
|
-
r.repeat ===
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
onChange: (e) => u("runAt", Te(e)),
|
|
405
|
-
labelProps: {
|
|
406
|
-
label: n.runAtLabel,
|
|
407
|
-
required: !0
|
|
408
|
-
},
|
|
409
|
-
invalid: !!s.runAt
|
|
410
|
-
}), s.runAt && /* @__PURE__ */ B("p", {
|
|
411
|
-
className: a(k, Y.instructionsError),
|
|
412
|
-
children: s.runAt
|
|
413
|
-
})]
|
|
511
|
+
r.repeat === t.OneTime && /* @__PURE__ */ H(Ie, {
|
|
512
|
+
label: n.runAtLabel,
|
|
513
|
+
value: r.runAt ?? "",
|
|
514
|
+
onChange: ke,
|
|
515
|
+
error: s.runAt,
|
|
516
|
+
errorClassName: W
|
|
414
517
|
}),
|
|
415
|
-
r.repeat !==
|
|
416
|
-
|
|
518
|
+
r.repeat !== t.OneTime && /* @__PURE__ */ U(we, { children: [
|
|
519
|
+
q && /* @__PURE__ */ U("div", {
|
|
417
520
|
className: "flex flex-col gap-1",
|
|
418
|
-
children: [/* @__PURE__ */
|
|
521
|
+
children: [/* @__PURE__ */ H(S, {
|
|
419
522
|
id: "scheduled-task-time",
|
|
420
|
-
mode:
|
|
523
|
+
mode: C.Time,
|
|
421
524
|
value: r.time,
|
|
422
|
-
onChange:
|
|
525
|
+
onChange: Oe,
|
|
526
|
+
onBlur: De,
|
|
423
527
|
labelProps: {
|
|
424
528
|
label: n.timeLabel,
|
|
425
529
|
required: !0
|
|
426
530
|
},
|
|
427
|
-
invalid: !!
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
531
|
+
invalid: !!J,
|
|
532
|
+
disabled: D,
|
|
533
|
+
showTimezone: !0
|
|
534
|
+
}), J && /* @__PURE__ */ H("p", {
|
|
535
|
+
className: h(W, X.instructionsError),
|
|
536
|
+
children: J
|
|
431
537
|
})]
|
|
432
538
|
}),
|
|
433
|
-
r.repeat ===
|
|
539
|
+
r.repeat === t.Weekly && /* @__PURE__ */ U("div", {
|
|
434
540
|
className: "flex flex-col gap-1",
|
|
435
|
-
children: [/* @__PURE__ */
|
|
541
|
+
children: [/* @__PURE__ */ H(S, {
|
|
436
542
|
id: "scheduled-task-day-of-week",
|
|
437
|
-
mode:
|
|
438
|
-
value:
|
|
439
|
-
onChange: (e) =>
|
|
543
|
+
mode: C.Weekday,
|
|
544
|
+
value: a(r.dayOfWeek),
|
|
545
|
+
onChange: (e) => x("dayOfWeek", o(e)),
|
|
440
546
|
labelProps: {
|
|
441
547
|
label: n.dayOfWeekLabel,
|
|
442
548
|
required: !0
|
|
443
549
|
},
|
|
444
550
|
invalid: !!s.dayOfWeek
|
|
445
|
-
}), s.dayOfWeek && /* @__PURE__ */
|
|
446
|
-
className:
|
|
551
|
+
}), s.dayOfWeek && /* @__PURE__ */ H("p", {
|
|
552
|
+
className: h(W, X.instructionsError),
|
|
447
553
|
children: s.dayOfWeek
|
|
448
554
|
})]
|
|
449
555
|
}),
|
|
450
|
-
r.repeat ===
|
|
556
|
+
r.repeat === t.Monthly && /* @__PURE__ */ H(re, {
|
|
451
557
|
id: "scheduled-task-day-of-month",
|
|
452
558
|
value: r.dayOfMonth ?? "",
|
|
453
|
-
onChange: (e) =>
|
|
559
|
+
onChange: (e) => x("dayOfMonth", e ?? ""),
|
|
454
560
|
labelProps: {
|
|
455
561
|
label: n.dayOfMonthLabel,
|
|
456
562
|
required: !0
|
|
@@ -458,13 +564,13 @@ var U = {
|
|
|
458
564
|
invalid: !!s.dayOfMonth,
|
|
459
565
|
error: s.dayOfMonth
|
|
460
566
|
}),
|
|
461
|
-
r.repeat ===
|
|
567
|
+
r.repeat === t.Hourly && /* @__PURE__ */ H(oe, {
|
|
462
568
|
id: "scheduled-task-minute",
|
|
463
569
|
integer: !0,
|
|
464
570
|
min: 0,
|
|
465
571
|
max: 59,
|
|
466
572
|
value: r.minute ?? "",
|
|
467
|
-
onChange: (e) =>
|
|
573
|
+
onChange: (e) => x("minute", e == null ? "" : String(e)),
|
|
468
574
|
labelProps: {
|
|
469
575
|
label: n.minuteLabel,
|
|
470
576
|
required: !0
|
|
@@ -472,34 +578,34 @@ var U = {
|
|
|
472
578
|
invalid: !!s.minute,
|
|
473
579
|
error: s.minute
|
|
474
580
|
}),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
className: "flex flex-row gap-3
|
|
477
|
-
children: [/* @__PURE__ */
|
|
581
|
+
/* @__PURE__ */ U("div", {
|
|
582
|
+
className: "flex flex-row gap-3",
|
|
583
|
+
children: [/* @__PURE__ */ U("div", {
|
|
478
584
|
className: "flex flex-1 flex-col gap-1",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
585
|
+
children: [/* @__PURE__ */ H(S, {
|
|
480
586
|
id: "scheduled-task-start-date",
|
|
481
|
-
mode:
|
|
482
|
-
value:
|
|
483
|
-
onChange: (e) =>
|
|
587
|
+
mode: C.Date,
|
|
588
|
+
value: e(r.startDate),
|
|
589
|
+
onChange: (e) => x("startDate", i(e)),
|
|
484
590
|
labelProps: { label: n.startDateLabel },
|
|
485
591
|
placeholder: n.startDatePlaceholder,
|
|
486
592
|
invalid: !!s.startDate
|
|
487
|
-
}), s.startDate && /* @__PURE__ */
|
|
488
|
-
className:
|
|
593
|
+
}), s.startDate && /* @__PURE__ */ H("p", {
|
|
594
|
+
className: h(W, X.instructionsError),
|
|
489
595
|
children: s.startDate
|
|
490
596
|
})]
|
|
491
|
-
}), /* @__PURE__ */
|
|
597
|
+
}), /* @__PURE__ */ U("div", {
|
|
492
598
|
className: "flex flex-1 flex-col gap-1",
|
|
493
|
-
children: [/* @__PURE__ */
|
|
599
|
+
children: [/* @__PURE__ */ H(S, {
|
|
494
600
|
id: "scheduled-task-end-date",
|
|
495
|
-
mode:
|
|
496
|
-
value:
|
|
497
|
-
onChange: (e) =>
|
|
601
|
+
mode: C.Date,
|
|
602
|
+
value: e(r.endDate),
|
|
603
|
+
onChange: (e) => x("endDate", i(e)),
|
|
498
604
|
labelProps: { label: n.endDateLabel },
|
|
499
605
|
placeholder: n.endDatePlaceholder,
|
|
500
606
|
invalid: !!s.endDate
|
|
501
|
-
}), s.endDate && /* @__PURE__ */
|
|
502
|
-
className:
|
|
607
|
+
}), s.endDate && /* @__PURE__ */ H("p", {
|
|
608
|
+
className: h(W, X.instructionsError),
|
|
503
609
|
children: s.endDate
|
|
504
610
|
})]
|
|
505
611
|
})]
|
|
@@ -509,266 +615,334 @@ var U = {
|
|
|
509
615
|
})
|
|
510
616
|
]
|
|
511
617
|
}),
|
|
512
|
-
children: /* @__PURE__ */
|
|
618
|
+
children: /* @__PURE__ */ U("div", {
|
|
513
619
|
role: "group",
|
|
514
620
|
"aria-label": n.configurationSectionTitle,
|
|
515
|
-
className: "flex flex-1 flex-col gap-5
|
|
516
|
-
children: [
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
621
|
+
className: h("flex flex-1 flex-col gap-5 py-6", X.formColumn),
|
|
622
|
+
children: [
|
|
623
|
+
/* @__PURE__ */ U("div", {
|
|
624
|
+
className: "flex flex-col gap-1",
|
|
625
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
626
|
+
className: ve,
|
|
627
|
+
children: n.configurationSectionTitle
|
|
628
|
+
}), /* @__PURE__ */ H("p", {
|
|
629
|
+
className: h(V, X.sectionSubtitle),
|
|
630
|
+
children: n.configurationSectionSubtitle
|
|
631
|
+
})]
|
|
632
|
+
}),
|
|
633
|
+
_ != null && /* @__PURE__ */ U("div", {
|
|
634
|
+
className: "flex w-full min-w-0 max-w-[996px] flex-col gap-1",
|
|
635
|
+
children: [/* @__PURE__ */ H("span", {
|
|
636
|
+
id: y,
|
|
637
|
+
className: xe,
|
|
638
|
+
children: n.skillLabel
|
|
639
|
+
}), _]
|
|
640
|
+
}),
|
|
641
|
+
/* @__PURE__ */ H("div", {
|
|
642
|
+
id: b,
|
|
643
|
+
"aria-live": "polite",
|
|
644
|
+
className: s.skillUrl ? void 0 : "sr-only",
|
|
645
|
+
children: s.skillUrl && /* @__PURE__ */ H("p", {
|
|
646
|
+
className: h(W, X.instructionsError),
|
|
647
|
+
children: s.skillUrl
|
|
648
|
+
})
|
|
649
|
+
}),
|
|
650
|
+
/* @__PURE__ */ H(p, {
|
|
651
|
+
isEnabled: !!O,
|
|
652
|
+
fieldId: j,
|
|
653
|
+
labelClassName: xe,
|
|
654
|
+
label: n.instructionsLabel,
|
|
655
|
+
labels: n,
|
|
656
|
+
refinement: P,
|
|
657
|
+
disabled: D || F,
|
|
658
|
+
...K,
|
|
659
|
+
children: /* @__PURE__ */ U("div", {
|
|
660
|
+
className: "flex flex-1 flex-col gap-1",
|
|
661
|
+
children: [
|
|
662
|
+
!O && /* @__PURE__ */ H("label", {
|
|
663
|
+
htmlFor: j,
|
|
664
|
+
className: xe,
|
|
665
|
+
children: n.instructionsLabel
|
|
666
|
+
}),
|
|
667
|
+
/* @__PURE__ */ H("div", {
|
|
668
|
+
ref: I,
|
|
669
|
+
className: h("w-full max-w-[996px]", l, u),
|
|
670
|
+
children: /* @__PURE__ */ H(_e, {
|
|
671
|
+
fallback: /* @__PURE__ */ H(ue, {}),
|
|
672
|
+
children: /* @__PURE__ */ H(Le, {
|
|
673
|
+
id: j,
|
|
674
|
+
value: r.prompt,
|
|
675
|
+
onChange: (e) => {
|
|
676
|
+
P.reset(), x("prompt", e);
|
|
677
|
+
},
|
|
678
|
+
height: 480,
|
|
679
|
+
theme: ie,
|
|
680
|
+
placeholder: n.instructionsPlaceholder
|
|
681
|
+
})
|
|
682
|
+
})
|
|
683
|
+
}),
|
|
684
|
+
s.prompt && /* @__PURE__ */ H("p", {
|
|
685
|
+
className: h(W, X.instructionsError),
|
|
686
|
+
children: s.prompt
|
|
544
687
|
})
|
|
545
|
-
|
|
546
|
-
}),
|
|
547
|
-
s.prompt && /* @__PURE__ */ B("p", {
|
|
548
|
-
className: a(k, Y.instructionsError),
|
|
549
|
-
children: s.prompt
|
|
688
|
+
]
|
|
550
689
|
})
|
|
551
|
-
|
|
552
|
-
|
|
690
|
+
})
|
|
691
|
+
]
|
|
553
692
|
})
|
|
554
693
|
});
|
|
555
|
-
},
|
|
694
|
+
}, Z = /* @__PURE__ */ function(e) {
|
|
556
695
|
return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
|
|
557
|
-
}({}),
|
|
696
|
+
}({}), ze = /* @__PURE__ */ function(e) {
|
|
558
697
|
return e.Card = "card", e.Flow = "flow", e;
|
|
559
|
-
}({}),
|
|
560
|
-
|
|
561
|
-
"
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
className:
|
|
565
|
-
children:
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
698
|
+
}({}), Be = { subtitleText: "_subtitleText_1i4x2_3" }, Ve = ({ skillLabel: e, skillDisplayName: t, instructionsLabel: n, instructionsMarkdown: r, renderInstructions: i, fieldLabelClassName: a = "dial-tiny-text" }) => /* @__PURE__ */ U("div", {
|
|
699
|
+
className: "flex min-w-0 flex-col gap-5",
|
|
700
|
+
children: [t && /* @__PURE__ */ U("div", {
|
|
701
|
+
role: "group",
|
|
702
|
+
"aria-label": e,
|
|
703
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
704
|
+
children: [/* @__PURE__ */ H("span", {
|
|
705
|
+
className: h(a, Be.subtitleText),
|
|
706
|
+
children: e
|
|
707
|
+
}), /* @__PURE__ */ H("p", {
|
|
708
|
+
className: "whitespace-normal break-all",
|
|
709
|
+
children: t
|
|
710
|
+
})]
|
|
711
|
+
}), r && /* @__PURE__ */ U("div", {
|
|
712
|
+
role: "group",
|
|
713
|
+
"aria-label": n,
|
|
714
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
715
|
+
children: [/* @__PURE__ */ H("span", {
|
|
716
|
+
className: h(a, Be.subtitleText),
|
|
717
|
+
children: n
|
|
718
|
+
}), i ? i(r) : /* @__PURE__ */ H(d, { content: r })]
|
|
719
|
+
})]
|
|
720
|
+
}), He = { subtitleText: "_subtitleText_1i4x2_3" }, Ue = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, fieldLabelClassName: a = "dial-tiny-text", fieldValueClassName: o = "dial-small-text" }) => /* @__PURE__ */ U(we, { children: [
|
|
721
|
+
t && /* @__PURE__ */ U("div", {
|
|
569
722
|
className: "flex flex-col gap-1",
|
|
570
|
-
children: [/* @__PURE__ */
|
|
571
|
-
className: a
|
|
723
|
+
children: [/* @__PURE__ */ H("span", {
|
|
724
|
+
className: h(a, He.subtitleText),
|
|
572
725
|
children: e.descriptionLabel
|
|
573
|
-
}), /* @__PURE__ */
|
|
574
|
-
className:
|
|
726
|
+
}), /* @__PURE__ */ H("p", {
|
|
727
|
+
className: o,
|
|
575
728
|
children: t
|
|
576
729
|
})]
|
|
577
730
|
}),
|
|
578
|
-
n && /* @__PURE__ */
|
|
731
|
+
n && /* @__PURE__ */ U("div", {
|
|
579
732
|
className: "flex flex-col gap-1",
|
|
580
|
-
children: [/* @__PURE__ */
|
|
581
|
-
className: a
|
|
733
|
+
children: [/* @__PURE__ */ H("span", {
|
|
734
|
+
className: h(a, He.subtitleText),
|
|
582
735
|
children: e.modelLabel
|
|
583
|
-
}), /* @__PURE__ */
|
|
584
|
-
className:
|
|
736
|
+
}), /* @__PURE__ */ H("p", {
|
|
737
|
+
className: o,
|
|
585
738
|
children: n
|
|
586
739
|
})]
|
|
587
740
|
}),
|
|
588
|
-
r && /* @__PURE__ */
|
|
741
|
+
r && /* @__PURE__ */ U("div", {
|
|
589
742
|
className: "flex flex-col gap-1",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
591
|
-
className: a
|
|
743
|
+
children: [/* @__PURE__ */ H("span", {
|
|
744
|
+
className: h(a, He.subtitleText),
|
|
592
745
|
children: e.repeatsLabel
|
|
593
|
-
}), /* @__PURE__ */
|
|
594
|
-
className:
|
|
746
|
+
}), /* @__PURE__ */ H("p", {
|
|
747
|
+
className: o,
|
|
595
748
|
children: r
|
|
596
749
|
})]
|
|
597
750
|
}),
|
|
598
|
-
i && /* @__PURE__ */
|
|
751
|
+
i && /* @__PURE__ */ U("div", {
|
|
599
752
|
className: "flex flex-col gap-1",
|
|
600
|
-
children: [/* @__PURE__ */
|
|
601
|
-
className: a
|
|
753
|
+
children: [/* @__PURE__ */ H("span", {
|
|
754
|
+
className: h(a, He.subtitleText),
|
|
602
755
|
children: e.activeWindowLabel
|
|
603
|
-
}), /* @__PURE__ */
|
|
604
|
-
className:
|
|
756
|
+
}), /* @__PURE__ */ H("p", {
|
|
757
|
+
className: o,
|
|
605
758
|
children: i
|
|
606
759
|
})]
|
|
607
760
|
})
|
|
608
|
-
] }),
|
|
761
|
+
] }), We = /* @__PURE__ */ function(e) {
|
|
609
762
|
return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
|
|
610
763
|
}({}), Q = {
|
|
611
|
-
subtitleText: "
|
|
612
|
-
successIcon: "
|
|
613
|
-
errorIcon: "
|
|
614
|
-
missedIcon: "
|
|
615
|
-
currentRun: "
|
|
616
|
-
|
|
617
|
-
|
|
764
|
+
subtitleText: "_subtitleText_1naww_1",
|
|
765
|
+
successIcon: "_successIcon_1naww_5",
|
|
766
|
+
errorIcon: "_errorIcon_1naww_9",
|
|
767
|
+
missedIcon: "_missedIcon_1naww_13",
|
|
768
|
+
currentRun: "_currentRun_1naww_17",
|
|
769
|
+
interactiveRow: "_interactiveRow_1naww_21",
|
|
770
|
+
unreadDot: "_unreadDot_1naww_29",
|
|
771
|
+
rowLayout: "_rowLayout_1naww_33"
|
|
772
|
+
}, Ge = ({ status: e }) => {
|
|
618
773
|
switch (e) {
|
|
619
|
-
case
|
|
620
|
-
size:
|
|
774
|
+
case We.Success: return /* @__PURE__ */ H(me, {
|
|
775
|
+
size: T.SM,
|
|
621
776
|
className: Q.successIcon,
|
|
622
777
|
"aria-hidden": !0,
|
|
623
|
-
stroke:
|
|
778
|
+
stroke: E
|
|
624
779
|
});
|
|
625
|
-
case
|
|
626
|
-
size:
|
|
780
|
+
case We.Error: return /* @__PURE__ */ H(I, {
|
|
781
|
+
size: T.SM,
|
|
627
782
|
className: Q.errorIcon,
|
|
628
783
|
"aria-hidden": !0,
|
|
629
|
-
stroke:
|
|
784
|
+
stroke: E
|
|
630
785
|
});
|
|
631
|
-
case
|
|
786
|
+
case We.InProgress: return /* @__PURE__ */ H("span", {
|
|
632
787
|
"aria-hidden": !0,
|
|
633
|
-
children: /* @__PURE__ */
|
|
788
|
+
children: /* @__PURE__ */ H(ue, { size: T.SM })
|
|
634
789
|
});
|
|
635
|
-
case
|
|
636
|
-
size:
|
|
790
|
+
case We.Missed: return /* @__PURE__ */ H(P, {
|
|
791
|
+
size: T.SM,
|
|
637
792
|
className: Q.missedIcon,
|
|
638
793
|
"aria-hidden": !0,
|
|
639
|
-
stroke:
|
|
794
|
+
stroke: E
|
|
640
795
|
});
|
|
641
796
|
default: return null;
|
|
642
797
|
}
|
|
643
|
-
},
|
|
644
|
-
let { colors:
|
|
645
|
-
"--strhl-success-icon":
|
|
646
|
-
"--strhl-error-icon":
|
|
647
|
-
"--strhl-missed-icon":
|
|
648
|
-
"--strhl-subtitle-text":
|
|
649
|
-
"--strhl-current-run-bg":
|
|
650
|
-
"--strhl-unread-dot":
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
798
|
+
}, Ke = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: i, onRetry: a, currentRunId: o, onRunClick: s, labels: c, footer: l, styles: u }) => {
|
|
799
|
+
let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-text", g = f?.subtitleClassName ?? "dial-body-text", _ = c.unreadIndicatorLabel ?? "Unread", v = m({
|
|
800
|
+
"--strhl-success-icon": d?.successIconColor,
|
|
801
|
+
"--strhl-error-icon": d?.errorIconColor,
|
|
802
|
+
"--strhl-missed-icon": d?.missedIconColor,
|
|
803
|
+
"--strhl-subtitle-text": d?.subtitleTextColor,
|
|
804
|
+
"--strhl-current-run-bg": d?.currentRunBackground,
|
|
805
|
+
"--strhl-unread-dot": d?.unreadDotColor,
|
|
806
|
+
"--strhl-row-hover-bg": u?.rowHoverBackground,
|
|
807
|
+
"--strhl-row-focus-bg": u?.rowFocusBackground
|
|
808
|
+
}), y = (e) => {
|
|
809
|
+
let t = c.runStatusLabels[e.status], n = e.id === o, r = [e.isUnread ? _ : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), a = !!e.conversationId && !!s;
|
|
810
|
+
return /* @__PURE__ */ U("li", {
|
|
811
|
+
...a ? {
|
|
655
812
|
role: "button",
|
|
656
813
|
tabIndex: 0,
|
|
657
|
-
onClick: () =>
|
|
814
|
+
onClick: () => s?.(e),
|
|
658
815
|
onKeyDown: (t) => {
|
|
659
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
816
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), s?.(e));
|
|
660
817
|
}
|
|
661
818
|
} : {},
|
|
662
819
|
"aria-label": i,
|
|
663
820
|
"aria-current": n ? "true" : void 0,
|
|
664
|
-
className:
|
|
665
|
-
children: [/* @__PURE__ */
|
|
821
|
+
className: h("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full pe-2", Q.rowLayout, n && Q.currentRun, a && "cursor-pointer", a && Q.interactiveRow),
|
|
822
|
+
children: [/* @__PURE__ */ U("span", {
|
|
666
823
|
className: "flex items-center gap-2 truncate",
|
|
667
|
-
children: [/* @__PURE__ */
|
|
824
|
+
children: [/* @__PURE__ */ H("span", {
|
|
668
825
|
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
669
|
-
children: e.isUnread && /* @__PURE__ */
|
|
670
|
-
className:
|
|
826
|
+
children: e.isUnread && /* @__PURE__ */ H("span", {
|
|
827
|
+
className: h("size-[5.33px] rounded-full", Q.unreadDot),
|
|
671
828
|
"aria-hidden": !0
|
|
672
829
|
})
|
|
673
|
-
}), /* @__PURE__ */
|
|
674
|
-
className:
|
|
830
|
+
}), /* @__PURE__ */ H("span", {
|
|
831
|
+
className: h(p, "truncate"),
|
|
675
832
|
children: e.timestampLabel
|
|
676
833
|
})]
|
|
677
|
-
}), /* @__PURE__ */
|
|
678
|
-
className: "flex h-
|
|
679
|
-
children: /* @__PURE__ */
|
|
834
|
+
}), /* @__PURE__ */ H("span", {
|
|
835
|
+
className: "flex min-h-[var(--strhl-row-min-height,32px)] w-14 shrink-0 items-center justify-end",
|
|
836
|
+
children: /* @__PURE__ */ H(Ge, { status: e.status })
|
|
680
837
|
})]
|
|
681
838
|
}, e.id);
|
|
682
|
-
},
|
|
839
|
+
}, b = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ U("li", {
|
|
683
840
|
"aria-hidden": "true",
|
|
684
|
-
className: "flex h-
|
|
685
|
-
children: [/* @__PURE__ */
|
|
686
|
-
variant:
|
|
841
|
+
className: h("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 pe-2", Q.rowLayout),
|
|
842
|
+
children: [/* @__PURE__ */ H(j, {
|
|
843
|
+
variant: M.Rectangular,
|
|
687
844
|
width: "160px",
|
|
688
845
|
height: "16px"
|
|
689
|
-
}), /* @__PURE__ */
|
|
690
|
-
variant:
|
|
846
|
+
}), /* @__PURE__ */ H(j, {
|
|
847
|
+
variant: M.Rectangular,
|
|
691
848
|
width: "16px",
|
|
692
849
|
height: "16px",
|
|
693
850
|
className: "shrink-0 rounded-full"
|
|
694
851
|
})]
|
|
695
852
|
}, `history-skeleton-${t}`));
|
|
696
|
-
return t && e.length === 0 ? /* @__PURE__ */
|
|
697
|
-
style:
|
|
698
|
-
|
|
853
|
+
return t && e.length === 0 ? /* @__PURE__ */ H("ul", {
|
|
854
|
+
style: {
|
|
855
|
+
...v,
|
|
856
|
+
"--strhl-row-min-height": u?.rowMinHeight
|
|
857
|
+
},
|
|
858
|
+
"aria-label": c.historyTitle,
|
|
699
859
|
className: "flex flex-col gap-0.5",
|
|
700
|
-
children:
|
|
701
|
-
}) :
|
|
702
|
-
style:
|
|
860
|
+
children: b(r)
|
|
861
|
+
}) : i && e.length === 0 ? /* @__PURE__ */ U("div", {
|
|
862
|
+
style: v,
|
|
703
863
|
className: "flex flex-col items-start gap-3",
|
|
704
|
-
children: [/* @__PURE__ */
|
|
864
|
+
children: [/* @__PURE__ */ H("p", {
|
|
705
865
|
role: "alert",
|
|
706
|
-
className:
|
|
707
|
-
children:
|
|
708
|
-
}), /* @__PURE__ */
|
|
709
|
-
label:
|
|
710
|
-
onClick:
|
|
866
|
+
className: h(g, Q.subtitleText),
|
|
867
|
+
children: c.errorLabel
|
|
868
|
+
}), /* @__PURE__ */ H(D, {
|
|
869
|
+
label: c.retryLabel,
|
|
870
|
+
onClick: a
|
|
711
871
|
})]
|
|
712
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
713
|
-
style:
|
|
872
|
+
}) : e.length === 0 ? /* @__PURE__ */ U("div", {
|
|
873
|
+
style: v,
|
|
714
874
|
className: "flex w-full flex-col items-center justify-center gap-2 py-4",
|
|
715
|
-
children: [/* @__PURE__ */
|
|
875
|
+
children: [/* @__PURE__ */ H(L, {
|
|
716
876
|
size: 44,
|
|
717
|
-
stroke:
|
|
877
|
+
stroke: E,
|
|
718
878
|
className: Q.subtitleText,
|
|
719
879
|
"aria-hidden": !0
|
|
720
|
-
}), /* @__PURE__ */
|
|
880
|
+
}), /* @__PURE__ */ H("p", {
|
|
721
881
|
role: "status",
|
|
722
|
-
className:
|
|
723
|
-
children:
|
|
882
|
+
className: p,
|
|
883
|
+
children: c.emptyLabel
|
|
724
884
|
})]
|
|
725
|
-
}) : /* @__PURE__ */
|
|
726
|
-
style:
|
|
727
|
-
|
|
885
|
+
}) : /* @__PURE__ */ U("ul", {
|
|
886
|
+
style: {
|
|
887
|
+
...v,
|
|
888
|
+
"--strhl-row-min-height": u?.rowMinHeight
|
|
889
|
+
},
|
|
890
|
+
"aria-label": c.historyTitle,
|
|
728
891
|
className: "flex flex-col gap-0.5",
|
|
729
892
|
children: [
|
|
730
|
-
e.map(
|
|
731
|
-
n &&
|
|
732
|
-
|
|
893
|
+
e.map(y),
|
|
894
|
+
n && b(r),
|
|
895
|
+
i ? /* @__PURE__ */ U("li", {
|
|
733
896
|
className: "flex flex-col items-start gap-3 px-5 py-2",
|
|
734
|
-
children: [/* @__PURE__ */
|
|
897
|
+
children: [/* @__PURE__ */ H("p", {
|
|
735
898
|
role: "alert",
|
|
736
|
-
className:
|
|
737
|
-
children:
|
|
738
|
-
}), /* @__PURE__ */
|
|
739
|
-
label:
|
|
740
|
-
onClick:
|
|
899
|
+
className: h(g, Q.subtitleText),
|
|
900
|
+
children: c.errorLabel
|
|
901
|
+
}), /* @__PURE__ */ H(D, {
|
|
902
|
+
label: c.retryLabel,
|
|
903
|
+
onClick: a
|
|
741
904
|
})]
|
|
742
|
-
}) :
|
|
905
|
+
}) : l
|
|
743
906
|
]
|
|
744
907
|
});
|
|
745
|
-
},
|
|
746
|
-
historyCard: "
|
|
747
|
-
subtitleText: "
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
908
|
+
}, qe = {
|
|
909
|
+
historyCard: "_historyCard_153p9_4",
|
|
910
|
+
subtitleText: "_subtitleText_153p9_8",
|
|
911
|
+
cardLayout: "_cardLayout_153p9_13"
|
|
912
|
+
}, Je = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: a = !1, skeletonCount: o = 6, error: s, onRetry: c, loadMoreError: l, onRetryLoadMore: u, hasMore: d = !1, onLoadMore: f, onRunClick: p, runTimestampClassName: m = "dial-small-text", sectionTitleClassName: g = "dial-body-semi-text", colors: _, styles: v }) => {
|
|
913
|
+
let y = e === ze.Card, b = y ? h("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", qe.historyCard) : "pt-2", x = l ? /* @__PURE__ */ U("li", {
|
|
914
|
+
className: b,
|
|
915
|
+
children: [/* @__PURE__ */ H("p", {
|
|
916
|
+
role: "alert",
|
|
917
|
+
children: t.historyLoadMoreErrorLabel ?? t.historyErrorLabel
|
|
918
|
+
}), u && /* @__PURE__ */ H(D, {
|
|
919
|
+
label: t.historyRetryLabel,
|
|
920
|
+
onClick: u,
|
|
921
|
+
disabled: a
|
|
922
|
+
})]
|
|
923
|
+
}) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ H("li", {
|
|
924
|
+
className: b,
|
|
925
|
+
children: /* @__PURE__ */ H(D, {
|
|
752
926
|
label: t.historyShowMoreLabel,
|
|
753
|
-
onClick:
|
|
754
|
-
disabled:
|
|
927
|
+
onClick: f,
|
|
928
|
+
disabled: a
|
|
755
929
|
})
|
|
756
|
-
}) : void 0,
|
|
757
|
-
className:
|
|
930
|
+
}) : void 0, S = n ? /* @__PURE__ */ H("p", {
|
|
931
|
+
className: h(m, qe.subtitleText),
|
|
758
932
|
children: n
|
|
759
|
-
}) : void 0,
|
|
933
|
+
}) : void 0, C = t.historyLoadingMoreLabel ? /* @__PURE__ */ H("span", {
|
|
760
934
|
role: "status",
|
|
761
935
|
"aria-live": "polite",
|
|
762
936
|
className: "sr-only",
|
|
763
|
-
children:
|
|
764
|
-
}) : void 0,
|
|
937
|
+
children: a ? t.historyLoadingMoreLabel : ""
|
|
938
|
+
}) : void 0, w = /* @__PURE__ */ H(Ke, {
|
|
765
939
|
items: r,
|
|
766
940
|
isLoading: i,
|
|
767
|
-
isLoadingMore:
|
|
768
|
-
skeletonCount:
|
|
769
|
-
error:
|
|
770
|
-
onRetry:
|
|
771
|
-
onRunClick:
|
|
941
|
+
isLoadingMore: a,
|
|
942
|
+
skeletonCount: o,
|
|
943
|
+
error: s,
|
|
944
|
+
onRetry: c,
|
|
945
|
+
onRunClick: p,
|
|
772
946
|
labels: {
|
|
773
947
|
historyTitle: t.historyTitle,
|
|
774
948
|
emptyLabel: t.historyEmptyLabel,
|
|
@@ -777,261 +951,363 @@ var U = {
|
|
|
777
951
|
runStatusLabels: t.runStatusLabels,
|
|
778
952
|
unreadIndicatorLabel: t.unreadIndicatorLabel
|
|
779
953
|
},
|
|
780
|
-
footer:
|
|
954
|
+
footer: x,
|
|
781
955
|
styles: {
|
|
782
|
-
typography: { runTimestampClassName:
|
|
783
|
-
colors:
|
|
956
|
+
typography: { runTimestampClassName: m },
|
|
957
|
+
colors: v?.colors ?? _,
|
|
958
|
+
rowMinHeight: v?.rowMinHeight,
|
|
959
|
+
rowHoverBackground: v?.rowHoverBackground,
|
|
960
|
+
rowFocusBackground: v?.rowFocusBackground
|
|
784
961
|
}
|
|
785
962
|
});
|
|
786
|
-
return
|
|
787
|
-
className:
|
|
788
|
-
|
|
789
|
-
|
|
963
|
+
return y ? /* @__PURE__ */ U("div", {
|
|
964
|
+
className: h("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", qe.historyCard, qe.cardLayout),
|
|
965
|
+
style: { "--st-history-max-height": v?.maxHeight },
|
|
966
|
+
children: [/* @__PURE__ */ U("div", {
|
|
967
|
+
className: h("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", qe.historyCard),
|
|
790
968
|
children: [
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
-
className:
|
|
969
|
+
/* @__PURE__ */ H("h2", {
|
|
970
|
+
className: g,
|
|
793
971
|
children: t.historyTitle
|
|
794
972
|
}),
|
|
795
|
-
|
|
796
|
-
|
|
973
|
+
S,
|
|
974
|
+
C
|
|
797
975
|
]
|
|
798
|
-
}), /* @__PURE__ */
|
|
976
|
+
}), /* @__PURE__ */ H("div", {
|
|
799
977
|
className: "flex flex-1 flex-col gap-4 px-6 pb-2",
|
|
800
|
-
children:
|
|
978
|
+
children: w
|
|
801
979
|
})]
|
|
802
|
-
}) : /* @__PURE__ */
|
|
980
|
+
}) : /* @__PURE__ */ U("div", {
|
|
803
981
|
className: "flex flex-col gap-4",
|
|
804
982
|
children: [
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
983
|
+
S,
|
|
984
|
+
C,
|
|
985
|
+
w
|
|
808
986
|
]
|
|
809
987
|
});
|
|
810
988
|
}, $ = {
|
|
811
|
-
container: "
|
|
812
|
-
header: "
|
|
813
|
-
detailsColumn: "
|
|
814
|
-
subtitleText: "
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
"--stdv-
|
|
821
|
-
"--stdv-
|
|
822
|
-
|
|
989
|
+
container: "_container_1v896_1",
|
|
990
|
+
header: "_header_1v896_8",
|
|
991
|
+
detailsColumn: "_detailsColumn_1v896_22",
|
|
992
|
+
subtitleText: "_subtitleText_1v896_26",
|
|
993
|
+
desktopTitle: "_desktopTitle_1v896_31",
|
|
994
|
+
desktopBadge: "_desktopBadge_1v896_32",
|
|
995
|
+
mobileTitleRow: "_mobileTitleRow_1v896_36"
|
|
996
|
+
}, Ye = ({ labels: e, onBack: t, onEdit: n, onDelete: r, isDeleting: i = !1, isDeleted: a = !1, isActive: o, isActiveUpdating: s = !1, isActiveDisabled: c = !1, onActiveChange: l, displayName: u, isLoading: d = !1, error: f, onRetry: p, description: g, modelLabel: v, repeatsLabel: y, activeWindowLabel: b, nextRunLabel: S, instructionsMarkdown: C, skillDisplayName: w, renderInstructions: ee, runs: te, runsIsLoading: O = !1, runsIsLoadingMore: re = !1, runsSkeletonCount: k = 6, runsError: ie, onRunsRetry: oe, runsLoadMoreError: A, onRunsRetryLoadMore: se, runsHasMore: ce = !1, onRunsLoadMore: le, onRunClick: j, styles: M, className: fe, backIcon: P, layout: F, historyStyles: me }) => {
|
|
997
|
+
let { colors: I, typography: L } = M ?? {}, R = L?.titleClassName ?? "dial-h2-text", z = L?.sectionTitleClassName ?? "dial-body-semi-text", _e = L?.fieldLabelClassName ?? "dial-tiny-text", B = L?.fieldValueClassName ?? "dial-small-text", ve = L?.runTimestampClassName ?? "dial-small-text", ye = m({
|
|
998
|
+
"--stdv-bg": I?.background,
|
|
999
|
+
"--stdv-header-border": I?.headerBorder,
|
|
1000
|
+
"--stdv-details-border": I?.detailsColumnBorder,
|
|
1001
|
+
"--stdv-subtitle-text": I?.subtitleText,
|
|
1002
|
+
"--stdv-history-bg": I?.historyCardBackground
|
|
1003
|
+
}), be = _(), [V, xe] = Ce(Z.Details), Se = [
|
|
823
1004
|
{
|
|
824
|
-
id:
|
|
1005
|
+
id: Z.Details,
|
|
825
1006
|
label: e.detailsTitle
|
|
826
1007
|
},
|
|
827
1008
|
{
|
|
828
|
-
id:
|
|
1009
|
+
id: Z.Configuration,
|
|
829
1010
|
label: e.configurationTitle
|
|
830
1011
|
},
|
|
831
1012
|
{
|
|
832
|
-
id:
|
|
1013
|
+
id: Z.History,
|
|
833
1014
|
label: e.historyTitle
|
|
834
1015
|
}
|
|
835
|
-
],
|
|
1016
|
+
], we = Se.find((e) => e.id === V)?.label ?? e.detailsTitle, Te = /* @__PURE__ */ H(Ue, {
|
|
836
1017
|
labels: {
|
|
837
1018
|
descriptionLabel: e.descriptionLabel,
|
|
838
1019
|
modelLabel: e.modelLabel,
|
|
839
1020
|
repeatsLabel: e.repeatsLabel,
|
|
840
1021
|
activeWindowLabel: e.activeWindowLabel
|
|
841
1022
|
},
|
|
842
|
-
description:
|
|
843
|
-
modelLabel:
|
|
844
|
-
repeatsLabel:
|
|
845
|
-
activeWindowLabel:
|
|
846
|
-
fieldLabelClassName:
|
|
847
|
-
fieldValueClassName:
|
|
848
|
-
}),
|
|
1023
|
+
description: g,
|
|
1024
|
+
modelLabel: v,
|
|
1025
|
+
repeatsLabel: y,
|
|
1026
|
+
activeWindowLabel: b,
|
|
1027
|
+
fieldLabelClassName: _e,
|
|
1028
|
+
fieldValueClassName: B
|
|
1029
|
+
}), W = /* @__PURE__ */ H(Ve, {
|
|
849
1030
|
instructionsLabel: e.instructionsLabel,
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
1031
|
+
skillLabel: e.skillLabel,
|
|
1032
|
+
skillDisplayName: w,
|
|
1033
|
+
instructionsMarkdown: C,
|
|
1034
|
+
renderInstructions: ee,
|
|
1035
|
+
fieldLabelClassName: _e
|
|
1036
|
+
}), Ee = (t) => /* @__PURE__ */ H(Je, {
|
|
854
1037
|
variant: t,
|
|
855
1038
|
labels: {
|
|
856
1039
|
historyTitle: e.historyTitle,
|
|
857
1040
|
historyEmptyLabel: e.historyEmptyLabel,
|
|
858
1041
|
historyErrorLabel: e.historyErrorLabel,
|
|
1042
|
+
historyLoadMoreErrorLabel: e.historyLoadMoreErrorLabel,
|
|
859
1043
|
historyRetryLabel: e.historyRetryLabel,
|
|
860
1044
|
historyLoadingMoreLabel: e.historyLoadingMoreLabel,
|
|
861
1045
|
historyShowMoreLabel: e.historyShowMoreLabel,
|
|
862
1046
|
runStatusLabels: e.runStatusLabels,
|
|
863
1047
|
unreadIndicatorLabel: e.unreadIndicatorLabel
|
|
864
1048
|
},
|
|
865
|
-
nextRunLabel:
|
|
866
|
-
items:
|
|
867
|
-
isLoading:
|
|
868
|
-
isLoadingMore:
|
|
869
|
-
skeletonCount:
|
|
870
|
-
error:
|
|
871
|
-
onRetry:
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
1049
|
+
nextRunLabel: S,
|
|
1050
|
+
items: te,
|
|
1051
|
+
isLoading: O,
|
|
1052
|
+
isLoadingMore: re,
|
|
1053
|
+
skeletonCount: k,
|
|
1054
|
+
error: ie,
|
|
1055
|
+
onRetry: oe,
|
|
1056
|
+
loadMoreError: A,
|
|
1057
|
+
onRetryLoadMore: se,
|
|
1058
|
+
hasMore: ce,
|
|
1059
|
+
onLoadMore: le,
|
|
1060
|
+
onRunClick: j,
|
|
1061
|
+
runTimestampClassName: ve,
|
|
1062
|
+
sectionTitleClassName: z,
|
|
1063
|
+
colors: I,
|
|
1064
|
+
styles: me
|
|
878
1065
|
});
|
|
879
|
-
return /* @__PURE__ */
|
|
880
|
-
style:
|
|
881
|
-
className:
|
|
1066
|
+
return /* @__PURE__ */ U("div", {
|
|
1067
|
+
style: ye,
|
|
1068
|
+
className: h("flex h-full w-full flex-col overflow-y-auto", $.container, fe),
|
|
882
1069
|
children: [
|
|
883
|
-
/* @__PURE__ */
|
|
884
|
-
className:
|
|
885
|
-
children: [/* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ U("div", {
|
|
1071
|
+
className: h("flex h-16 shrink-0 items-center justify-between gap-2 px-8", $.header),
|
|
1072
|
+
children: [/* @__PURE__ */ U("div", {
|
|
886
1073
|
className: "flex min-w-0 items-center gap-2",
|
|
887
1074
|
children: [
|
|
888
|
-
/* @__PURE__ */
|
|
889
|
-
icon: /* @__PURE__ */
|
|
890
|
-
size:
|
|
1075
|
+
/* @__PURE__ */ H(ne, {
|
|
1076
|
+
icon: P === void 0 ? /* @__PURE__ */ H(pe, {
|
|
1077
|
+
size: T.LG,
|
|
891
1078
|
className: "rtl:scale-x-[-1]",
|
|
892
1079
|
"aria-hidden": !0,
|
|
893
|
-
stroke:
|
|
894
|
-
}),
|
|
1080
|
+
stroke: E
|
|
1081
|
+
}) : P,
|
|
895
1082
|
"aria-label": e.backAriaLabel,
|
|
896
1083
|
onClick: t
|
|
897
1084
|
}),
|
|
898
|
-
/* @__PURE__ */
|
|
899
|
-
className:
|
|
900
|
-
children:
|
|
1085
|
+
/* @__PURE__ */ H("h1", {
|
|
1086
|
+
className: h("truncate", $.desktopTitle, R),
|
|
1087
|
+
children: u
|
|
901
1088
|
}),
|
|
902
|
-
|
|
903
|
-
className:
|
|
1089
|
+
a && /* @__PURE__ */ H("span", {
|
|
1090
|
+
className: h("shrink-0", $.desktopBadge, B, $.subtitleText),
|
|
904
1091
|
children: e.deletedStateLabel
|
|
905
1092
|
})
|
|
906
1093
|
]
|
|
907
|
-
}), /* @__PURE__ */
|
|
1094
|
+
}), /* @__PURE__ */ U("div", {
|
|
908
1095
|
className: "flex shrink-0 items-center gap-2",
|
|
909
1096
|
children: [
|
|
910
|
-
!
|
|
1097
|
+
!a && o !== void 0 && /* @__PURE__ */ H(de, {
|
|
911
1098
|
id: "scheduled-task-active-switch",
|
|
912
1099
|
labelProps: { label: e.activeStatusLabel },
|
|
913
|
-
isOn:
|
|
914
|
-
disabled:
|
|
915
|
-
onChange: (e) =>
|
|
1100
|
+
isOn: o,
|
|
1101
|
+
disabled: s || c || i,
|
|
1102
|
+
onChange: (e) => l?.(e)
|
|
916
1103
|
}),
|
|
917
|
-
!
|
|
918
|
-
variant:
|
|
1104
|
+
!a && r && /* @__PURE__ */ H(D, {
|
|
1105
|
+
variant: x.Danger,
|
|
919
1106
|
label: e.deleteButtonLabel,
|
|
920
|
-
iconBefore: /* @__PURE__ */
|
|
921
|
-
size:
|
|
1107
|
+
iconBefore: /* @__PURE__ */ H(ge, {
|
|
1108
|
+
size: T.SM,
|
|
922
1109
|
"aria-hidden": !0,
|
|
923
|
-
stroke:
|
|
1110
|
+
stroke: E
|
|
924
1111
|
}),
|
|
925
1112
|
onClick: r,
|
|
926
|
-
disabled:
|
|
1113
|
+
disabled: i,
|
|
927
1114
|
className: "shrink-0"
|
|
928
1115
|
}),
|
|
929
|
-
!
|
|
1116
|
+
!a && n && /* @__PURE__ */ H(ae, {
|
|
930
1117
|
label: e.editButtonLabel,
|
|
931
|
-
iconBefore: /* @__PURE__ */
|
|
932
|
-
size:
|
|
1118
|
+
iconBefore: /* @__PURE__ */ H(he, {
|
|
1119
|
+
size: T.SM,
|
|
933
1120
|
"aria-hidden": !0,
|
|
934
|
-
stroke:
|
|
1121
|
+
stroke: E
|
|
935
1122
|
}),
|
|
936
1123
|
onClick: n,
|
|
937
|
-
disabled:
|
|
1124
|
+
disabled: i,
|
|
938
1125
|
className: "shrink-0"
|
|
939
1126
|
})
|
|
940
1127
|
]
|
|
941
1128
|
})]
|
|
942
1129
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
944
|
-
className: "
|
|
945
|
-
children: [/* @__PURE__ */
|
|
946
|
-
className:
|
|
947
|
-
children:
|
|
948
|
-
}),
|
|
949
|
-
className:
|
|
1130
|
+
/* @__PURE__ */ U("div", {
|
|
1131
|
+
className: h("min-w-0 items-center gap-2 px-8 py-3", $.mobileTitleRow),
|
|
1132
|
+
children: [/* @__PURE__ */ H("h1", {
|
|
1133
|
+
className: h("truncate", R),
|
|
1134
|
+
children: u
|
|
1135
|
+
}), a && /* @__PURE__ */ H("span", {
|
|
1136
|
+
className: h("shrink-0", B, $.subtitleText),
|
|
950
1137
|
children: e.deletedStateLabel
|
|
951
1138
|
})]
|
|
952
1139
|
}),
|
|
953
|
-
e.activeStatusAnnouncement != null && /* @__PURE__ */
|
|
1140
|
+
e.activeStatusAnnouncement != null && /* @__PURE__ */ H("span", {
|
|
954
1141
|
role: "status",
|
|
955
1142
|
"aria-live": "polite",
|
|
956
1143
|
className: "sr-only",
|
|
957
1144
|
children: e.activeStatusAnnouncement
|
|
958
1145
|
}),
|
|
959
|
-
|
|
1146
|
+
d && /* @__PURE__ */ H("div", {
|
|
960
1147
|
className: "flex flex-1 items-center justify-center",
|
|
961
|
-
children: /* @__PURE__ */
|
|
1148
|
+
children: /* @__PURE__ */ H(ue, {})
|
|
962
1149
|
}),
|
|
963
|
-
!
|
|
1150
|
+
!d && f && /* @__PURE__ */ U("div", {
|
|
964
1151
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
965
|
-
children: [/* @__PURE__ */
|
|
966
|
-
className:
|
|
1152
|
+
children: [/* @__PURE__ */ H("p", {
|
|
1153
|
+
className: h(B, $.subtitleText),
|
|
967
1154
|
children: e.errorLabel
|
|
968
|
-
}), /* @__PURE__ */
|
|
1155
|
+
}), /* @__PURE__ */ H(D, {
|
|
969
1156
|
label: e.retryLabel,
|
|
970
|
-
onClick:
|
|
1157
|
+
onClick: p
|
|
971
1158
|
})]
|
|
972
1159
|
}),
|
|
973
|
-
!
|
|
1160
|
+
!d && !f && (be ? /* @__PURE__ */ U("div", {
|
|
974
1161
|
className: "flex flex-1 flex-col",
|
|
975
|
-
children: [/* @__PURE__ */
|
|
1162
|
+
children: [/* @__PURE__ */ H(N, {
|
|
976
1163
|
ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
|
|
977
1164
|
className: "px-8",
|
|
978
|
-
tabs:
|
|
979
|
-
activeTabId:
|
|
980
|
-
onTabChange:
|
|
981
|
-
}), /* @__PURE__ */
|
|
1165
|
+
tabs: Se,
|
|
1166
|
+
activeTabId: V,
|
|
1167
|
+
onTabChange: xe
|
|
1168
|
+
}), /* @__PURE__ */ H("div", {
|
|
982
1169
|
role: "tabpanel",
|
|
983
|
-
"aria-label":
|
|
1170
|
+
"aria-label": we,
|
|
984
1171
|
className: "flex flex-1 flex-col gap-5 px-8 py-6",
|
|
985
|
-
children:
|
|
1172
|
+
children: V === Z.Configuration ? W : V === Z.History ? Ee(ze.Flow) : Te
|
|
986
1173
|
})]
|
|
987
|
-
}) : /* @__PURE__ */
|
|
988
|
-
|
|
1174
|
+
}) : /* @__PURE__ */ U("div", {
|
|
1175
|
+
style: {
|
|
1176
|
+
flexDirection: "row",
|
|
1177
|
+
flexWrap: "wrap",
|
|
1178
|
+
"--st-details-width": F?.detailsWidth,
|
|
1179
|
+
"--st-history-width": F?.historyWidth,
|
|
1180
|
+
"--st-history-max-height": F?.historyMaxHeight,
|
|
1181
|
+
"--st-configuration-min-width": F?.configurationMinWidth
|
|
1182
|
+
},
|
|
1183
|
+
className: "flex flex-1",
|
|
989
1184
|
children: [
|
|
990
|
-
/* @__PURE__ */
|
|
1185
|
+
/* @__PURE__ */ U("div", {
|
|
991
1186
|
role: "group",
|
|
992
1187
|
"aria-label": e.detailsTitle,
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1188
|
+
style: {
|
|
1189
|
+
flex: `0 1 ${F?.detailsWidth ?? "360px"}`,
|
|
1190
|
+
maxWidth: "100%"
|
|
1191
|
+
},
|
|
1192
|
+
className: h("flex w-full flex-col gap-5 border-e px-8 py-6", $.detailsColumn),
|
|
1193
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
1194
|
+
className: z,
|
|
996
1195
|
children: e.detailsTitle
|
|
997
|
-
}),
|
|
1196
|
+
}), Te]
|
|
998
1197
|
}),
|
|
999
|
-
/* @__PURE__ */
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1198
|
+
/* @__PURE__ */ U("div", {
|
|
1199
|
+
style: {
|
|
1200
|
+
flex: `1 1 ${F?.configurationMinWidth ?? "320px"}`,
|
|
1201
|
+
minWidth: 0
|
|
1202
|
+
},
|
|
1203
|
+
className: "flex w-full min-w-0 flex-col gap-5 px-8 py-6",
|
|
1204
|
+
children: [/* @__PURE__ */ H("h2", {
|
|
1205
|
+
className: z,
|
|
1003
1206
|
children: e.configurationTitle
|
|
1004
|
-
}),
|
|
1207
|
+
}), W]
|
|
1005
1208
|
}),
|
|
1006
|
-
/* @__PURE__ */
|
|
1007
|
-
|
|
1008
|
-
|
|
1209
|
+
/* @__PURE__ */ H("div", {
|
|
1210
|
+
style: {
|
|
1211
|
+
flex: `0 1 calc(${F?.historyWidth ?? "360px"} + 48px)`,
|
|
1212
|
+
minWidth: 0
|
|
1213
|
+
},
|
|
1214
|
+
className: "flex w-full items-start justify-center p-6",
|
|
1215
|
+
children: Ee(ze.Card)
|
|
1009
1216
|
})
|
|
1010
1217
|
]
|
|
1011
1218
|
}))
|
|
1012
1219
|
]
|
|
1013
1220
|
});
|
|
1014
|
-
},
|
|
1015
|
-
let
|
|
1016
|
-
return /* @__PURE__ */
|
|
1221
|
+
}, Xe = ({ modelLabel: e, skillLabel: t, skillDisplayName: n, instructionsLabel: r, modelDisplayName: i, instructionsMarkdown: a, renderInstructions: o, styles: s }) => {
|
|
1222
|
+
let c = s?.typography?.fieldLabelClassName ?? "dial-tiny-text", l = s?.typography?.fieldValueClassName ?? "dial-body-text";
|
|
1223
|
+
return /* @__PURE__ */ U("div", {
|
|
1017
1224
|
className: "flex flex-col gap-3",
|
|
1018
|
-
children: [
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
className:
|
|
1031
|
-
children:
|
|
1032
|
-
|
|
1033
|
-
|
|
1225
|
+
children: [
|
|
1226
|
+
i && /* @__PURE__ */ U("div", {
|
|
1227
|
+
className: "flex flex-col gap-2",
|
|
1228
|
+
children: [/* @__PURE__ */ H("span", {
|
|
1229
|
+
className: c,
|
|
1230
|
+
children: e
|
|
1231
|
+
}), /* @__PURE__ */ H("p", {
|
|
1232
|
+
className: l,
|
|
1233
|
+
children: i
|
|
1234
|
+
})]
|
|
1235
|
+
}),
|
|
1236
|
+
n && /* @__PURE__ */ U("div", {
|
|
1237
|
+
className: "flex min-w-0 flex-col gap-2",
|
|
1238
|
+
children: [/* @__PURE__ */ H("span", {
|
|
1239
|
+
className: c,
|
|
1240
|
+
children: t
|
|
1241
|
+
}), /* @__PURE__ */ H("p", {
|
|
1242
|
+
className: `${l} whitespace-normal break-all`,
|
|
1243
|
+
children: n
|
|
1244
|
+
})]
|
|
1245
|
+
}),
|
|
1246
|
+
a && /* @__PURE__ */ U("div", {
|
|
1247
|
+
className: "flex flex-col gap-2",
|
|
1248
|
+
children: [/* @__PURE__ */ H("span", {
|
|
1249
|
+
className: c,
|
|
1250
|
+
children: r
|
|
1251
|
+
}), ((e) => o ? o(e) : /* @__PURE__ */ H(d, { content: e }))(a)]
|
|
1252
|
+
})
|
|
1253
|
+
]
|
|
1254
|
+
});
|
|
1255
|
+
}, Ze = ({ open: e, taskName: t, title: n, body: r, consequences: i = [], cancelLabel: a, cancelAppearance: o = y.Ghost, confirmLabel: s, pendingLabel: c, isDeleting: l = !1, onConfirm: u, onClose: d, styles: f }) => {
|
|
1256
|
+
let p = () => {
|
|
1257
|
+
l || d();
|
|
1258
|
+
};
|
|
1259
|
+
return /* @__PURE__ */ H(A, {
|
|
1260
|
+
open: e,
|
|
1261
|
+
className: f?.popupClassName,
|
|
1262
|
+
header: /* @__PURE__ */ H("span", {
|
|
1263
|
+
className: f?.titleClassName,
|
|
1264
|
+
children: n
|
|
1265
|
+
}),
|
|
1266
|
+
onClose: p,
|
|
1267
|
+
mainButtons: [{
|
|
1268
|
+
label: a,
|
|
1269
|
+
onClick: p,
|
|
1270
|
+
disabled: l,
|
|
1271
|
+
appearance: o
|
|
1272
|
+
}, {
|
|
1273
|
+
label: l ? c ?? s : s,
|
|
1274
|
+
onClick: () => {
|
|
1275
|
+
l || u();
|
|
1276
|
+
},
|
|
1277
|
+
disabled: l,
|
|
1278
|
+
variant: x.Danger,
|
|
1279
|
+
className: f?.actionClassName
|
|
1280
|
+
}],
|
|
1281
|
+
children: /* @__PURE__ */ U("div", {
|
|
1282
|
+
className: "flex flex-col gap-4 px-6 pb-4 pt-2",
|
|
1283
|
+
children: [
|
|
1284
|
+
/* @__PURE__ */ H("div", {
|
|
1285
|
+
className: "flex h-11 items-center rounded-lg border border-error-alpha bg-error px-3",
|
|
1286
|
+
children: /* @__PURE__ */ H("span", {
|
|
1287
|
+
className: "dial-small-semi-text truncate",
|
|
1288
|
+
children: t
|
|
1289
|
+
})
|
|
1290
|
+
}),
|
|
1291
|
+
/* @__PURE__ */ H("div", {
|
|
1292
|
+
className: "dial-body-paragraph-text break-words",
|
|
1293
|
+
children: r
|
|
1294
|
+
}),
|
|
1295
|
+
i.length > 0 && /* @__PURE__ */ H("ul", {
|
|
1296
|
+
className: "flex flex-col gap-2 ps-[18px]",
|
|
1297
|
+
children: i.map((e, t) => /* @__PURE__ */ H("li", {
|
|
1298
|
+
className: "dial-body-paragraph-text list-disc text-secondary marker:text-secondary",
|
|
1299
|
+
children: e
|
|
1300
|
+
}, t))
|
|
1301
|
+
}),
|
|
1302
|
+
l && /* @__PURE__ */ H("span", {
|
|
1303
|
+
role: "status",
|
|
1304
|
+
"aria-live": "polite",
|
|
1305
|
+
className: "sr-only",
|
|
1306
|
+
children: c ?? s
|
|
1307
|
+
})
|
|
1308
|
+
]
|
|
1309
|
+
})
|
|
1034
1310
|
});
|
|
1035
1311
|
};
|
|
1036
1312
|
//#endregion
|
|
1037
|
-
export {
|
|
1313
|
+
export { r as DESCRIPTION_MAX_LENGTH, Ee as SCHEDULED_TASKS_CLASS, De as ScheduledTaskCard, Ae as ScheduledTaskCardGrid, ke as ScheduledTaskCardSkeleton, Re as ScheduledTaskCreateForm, Ze as ScheduledTaskDeleteConfirmation, Ye as ScheduledTaskDetailView, Xe as ScheduledTaskDetailsSummary, Je as ScheduledTaskHistorySection, G as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, Ke as ScheduledTaskRunHistoryList, We as ScheduledTaskRunStatus, Ne as ScheduledTasks, Pe as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN };
|