@epam/ai-dial-scheduled-tasks 1.3.0-dev.37 → 1.3.0-dev.372
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-WOdrwh6p.js +33 -0
- package/components/ScheduledTaskBoundaryField/ScheduledTaskBoundaryField.d.ts +24 -0
- package/components/ScheduledTaskBoundaryField/ScheduledTaskBoundaryField.d.ts.map +1 -0
- package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts +3 -1
- package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -1
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts.map +1 -1
- package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts.map +1 -1
- package/components/ScheduledTaskConversationBanner/ScheduledTaskConversationBanner.d.ts +5 -0
- package/components/ScheduledTaskConversationBanner/ScheduledTaskConversationBanner.d.ts.map +1 -0
- package/components/ScheduledTaskConversationDetailsSection/ScheduledTaskConversationDetailsSection.d.ts +82 -0
- package/components/ScheduledTaskConversationDetailsSection/ScheduledTaskConversationDetailsSection.d.ts.map +1 -0
- package/components/ScheduledTaskConversationHistorySection/ScheduledTaskConversationHistorySection.d.ts +80 -0
- package/components/ScheduledTaskConversationHistorySection/ScheduledTaskConversationHistorySection.d.ts.map +1 -0
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +5 -1
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -1
- package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
- package/components/ScheduledTaskDetailsSection/ScheduledTaskDetailsSection.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 +6 -2
- package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts.map +1 -1
- package/components/ScheduledTaskRunAtTimeField/ScheduledTaskRunAtTimeField.d.ts +5 -0
- package/components/ScheduledTaskRunAtTimeField/ScheduledTaskRunAtTimeField.d.ts.map +1 -0
- package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts +4 -3
- package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts.map +1 -1
- package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
- package/components/ScheduledTasksLimitedAccessBanner/ScheduledTasksLimitedAccessBanner.d.ts +20 -0
- package/components/ScheduledTasksLimitedAccessBanner/ScheduledTasksLimitedAccessBanner.d.ts.map +1 -0
- package/components/ScheduledTasksLoginBanner/ScheduledTasksLoginBanner.d.ts +32 -0
- package/components/ScheduledTasksLoginBanner/ScheduledTasksLoginBanner.d.ts.map +1 -0
- package/components/SectionAccordionTitle/SectionAccordionTitle.d.ts +15 -0
- package/components/SectionAccordionTitle/SectionAccordionTitle.d.ts.map +1 -0
- package/constants/scheduled-task-create-form.d.ts +3 -0
- package/constants/scheduled-task-create-form.d.ts.map +1 -1
- package/index.css +3 -2
- package/index.d.ts +16 -4
- package/index.d.ts.map +1 -1
- package/index.js +1254 -848
- package/models/scheduled-task-card-grid-props.d.ts +3 -1
- package/models/scheduled-task-card-grid-props.d.ts.map +1 -1
- package/models/scheduled-task-card-props.d.ts +3 -3
- package/models/scheduled-task-card-props.d.ts.map +1 -1
- package/models/scheduled-task-configuration-section-props.d.ts +2 -0
- package/models/scheduled-task-configuration-section-props.d.ts.map +1 -1
- package/models/scheduled-task-conversation-banner-props.d.ts +72 -0
- package/models/scheduled-task-conversation-banner-props.d.ts.map +1 -0
- package/models/scheduled-task-create-form-props.d.ts +30 -7
- package/models/scheduled-task-create-form-props.d.ts.map +1 -1
- package/models/scheduled-task-detail-view-props.d.ts +12 -0
- package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
- package/models/scheduled-task-details-section-props.d.ts +4 -1
- package/models/scheduled-task-details-section-props.d.ts.map +1 -1
- package/models/scheduled-task-details-summary-props.d.ts +19 -1
- package/models/scheduled-task-details-summary-props.d.ts.map +1 -1
- package/models/scheduled-task-history-section-props.d.ts +17 -3
- package/models/scheduled-task-history-section-props.d.ts.map +1 -1
- package/models/scheduled-task-item.d.ts +2 -0
- package/models/scheduled-task-item.d.ts.map +1 -1
- package/models/scheduled-task-run-history-list-props.d.ts +20 -4
- package/models/scheduled-task-run-history-list-props.d.ts.map +1 -1
- package/models/scheduled-task-run-item.d.ts +5 -1
- package/models/scheduled-task-run-item.d.ts.map +1 -1
- package/models/scheduled-tasks-props.d.ts +8 -2
- package/models/scheduled-tasks-props.d.ts.map +1 -1
- package/package.json +6 -6
- package/types/scheduled-task-schedule.d.ts +3 -1
- package/types/scheduled-task-schedule.d.ts.map +1 -1
- package/utils/aria.d.ts +3 -0
- package/utils/aria.d.ts.map +1 -0
- package/utils/calendar-value.d.ts +3 -1
- package/utils/calendar-value.d.ts.map +1 -1
- package/validation/index.d.ts +2 -2
- package/validation/index.d.ts.map +1 -1
- package/validation/scheduled-task-validation.d.ts +14 -5
- package/validation/scheduled-task-validation.d.ts.map +1 -1
- package/validation.js +18 -16
- package/calendar-value-B41Uk26Z.js +0 -24
package/index.js
CHANGED
|
@@ -1,89 +1,92 @@
|
|
|
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-
|
|
2
|
-
import { ConfirmationDialog as
|
|
3
|
-
import { ButtonAppearance as
|
|
4
|
-
import { IconAlertTriangle as
|
|
5
|
-
import { Suspense as
|
|
6
|
-
import { Fragment as
|
|
7
|
-
import { BuilderFormContainer as
|
|
8
|
-
import { LazyMarkdownEditor as
|
|
9
|
-
//#region src/
|
|
10
|
-
var
|
|
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, u as l } from "./calendar-value-WOdrwh6p.js";
|
|
2
|
+
import { COMPACT_MARKDOWN_CLASS_NAMES as u, ConfirmationDialog as d, ConfirmationIdentityRow as f, MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as p, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as m, MDMessageViewer as h, PanelEmptyState as g, ResourceSummary as _, TextRefinementField as v, buildCssVars as y, mergeClasses as b, useAvailableHeightCap as x, useControlErrorAssociation as S, useIsMobile as C, useTextRefinement as w, useUnsavedChangesGuard as T } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { Accordion as E, Button as D, ButtonAppearance as ee, ButtonDropdown as te, ButtonVariant as ne, Calendar as re, CalendarMode as O, CardShell as ie, ConfirmationPopupVariant as ae, DIAL_ICON_SIZE as k, DIAL_KIT_ICON_STROKE as A, ElementSize as oe, EllipsisTooltip as se, ErrorMessageNotification as ce, ErrorText as j, FolderPath as le, GhostButton as M, GhostIconButton as ue, Highlight as N, Input as de, Label as fe, LinkButton as pe, LiveRegion as P, LiveRegionElement as F, LiveRegionPoliteness as me, MenuItemMark as he, NeutralButton as ge, NoDataContent as _e, Notification as I, NotificationSurface as ve, NotificationType as ye, NotificationVariant as L, NumberInput as be, PrimaryButton as R, Search as z, Select as xe, Skeleton as B, SkeletonVariant as V, Spinner as Se, Switch as Ce, Tabs as we, Textarea as Te, WarningMessageNotification as Ee } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconAlertTriangle as De, IconArrowNarrowLeft as Oe, IconArrowRight as ke, IconArrowsSort as Ae, IconCheck as je, IconChevronDown as Me, IconChevronRight as H, IconCircleX as U, IconPencilMinus as Ne, IconPlayerPause as Pe, IconPlayerPlay as Fe, IconPlus as Ie, IconTrashX as Le } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as Re, lazy as W, memo as ze, useCallback as Be, useEffect as Ve, useId as G, useLayoutEffect as He, useMemo as Ue, useRef as We, useState as Ge } from "react";
|
|
6
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
7
|
+
import { BuilderFormContainer as Ke } from "@epam/ai-dial-builder-form";
|
|
8
|
+
import { LazyMarkdownEditor as qe } from "@epam/ai-dial-ui-kit/editors";
|
|
9
|
+
//#region src/models/scheduled-task-card-grid-props.ts
|
|
10
|
+
var Je = "1180px", Ye = {
|
|
11
11
|
card: "dial-scheduled-tasks-card",
|
|
12
12
|
cardGrid: "dial-scheduled-tasks-card-grid",
|
|
13
13
|
refineFeedback: "dial-scheduled-tasks-refine-feedback"
|
|
14
|
-
},
|
|
14
|
+
}, Y = /* @__PURE__ */ function(e) {
|
|
15
15
|
return e.Scheduled = "scheduled", e.Paused = "paused", e.Completed = "completed", e;
|
|
16
|
-
}({}),
|
|
16
|
+
}({}), Xe = /* @__PURE__ */ function(e) {
|
|
17
17
|
return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
|
|
18
|
-
}({}),
|
|
18
|
+
}({}), Ze = (e) => {
|
|
19
19
|
switch (e.presentationStatus) {
|
|
20
|
-
case
|
|
21
|
-
case
|
|
22
|
-
case
|
|
20
|
+
case Xe.Active: return Y.Scheduled;
|
|
21
|
+
case Xe.Paused: return Y.Paused;
|
|
22
|
+
case Xe.Completed: return Y.Completed;
|
|
23
23
|
}
|
|
24
|
-
return e.isCompleted ?
|
|
25
|
-
},
|
|
26
|
-
schedulePill: "
|
|
27
|
-
scheduleLabel: "
|
|
28
|
-
pausedPill: "
|
|
29
|
-
pausedLabel: "
|
|
30
|
-
completedPill: "
|
|
31
|
-
completedLabel: "
|
|
32
|
-
},
|
|
33
|
-
[
|
|
24
|
+
return e.isCompleted ? Y.Completed : e.isActive === !1 ? Y.Paused : Y.Scheduled;
|
|
25
|
+
}, Qe = {
|
|
26
|
+
schedulePill: "_schedulePill_1cwco_1",
|
|
27
|
+
scheduleLabel: "_scheduleLabel_1cwco_6",
|
|
28
|
+
pausedPill: "_pausedPill_1cwco_10",
|
|
29
|
+
pausedLabel: "_pausedLabel_1cwco_15",
|
|
30
|
+
completedPill: "_completedPill_1cwco_19",
|
|
31
|
+
completedLabel: "_completedLabel_1cwco_24"
|
|
32
|
+
}, $e = {
|
|
33
|
+
[Y.Scheduled]: {
|
|
34
34
|
pillClassName: "inline-block rounded-lg border px-2 py-1",
|
|
35
|
-
wrapperClassName:
|
|
36
|
-
labelClassName:
|
|
35
|
+
wrapperClassName: Qe.schedulePill,
|
|
36
|
+
labelClassName: Qe.scheduleLabel
|
|
37
37
|
},
|
|
38
|
-
[
|
|
38
|
+
[Y.Paused]: {
|
|
39
39
|
pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
|
|
40
|
-
wrapperClassName:
|
|
41
|
-
labelClassName:
|
|
42
|
-
renderIcon: () => /* @__PURE__ */
|
|
43
|
-
size:
|
|
40
|
+
wrapperClassName: Qe.pausedPill,
|
|
41
|
+
labelClassName: Qe.pausedLabel,
|
|
42
|
+
renderIcon: () => /* @__PURE__ */ q(Pe, {
|
|
43
|
+
size: k.SM,
|
|
44
44
|
"aria-hidden": !0,
|
|
45
|
-
stroke:
|
|
45
|
+
stroke: A
|
|
46
46
|
})
|
|
47
47
|
},
|
|
48
|
-
[
|
|
48
|
+
[Y.Completed]: {
|
|
49
49
|
pillClassName: "inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
|
|
50
|
-
wrapperClassName:
|
|
51
|
-
labelClassName:
|
|
52
|
-
renderIcon: () => /* @__PURE__ */
|
|
53
|
-
size:
|
|
50
|
+
wrapperClassName: Qe.completedPill,
|
|
51
|
+
labelClassName: Qe.completedLabel,
|
|
52
|
+
renderIcon: () => /* @__PURE__ */ q(je, {
|
|
53
|
+
size: k.SM,
|
|
54
54
|
"aria-hidden": !0,
|
|
55
|
-
stroke:
|
|
55
|
+
stroke: A
|
|
56
56
|
})
|
|
57
57
|
}
|
|
58
|
-
},
|
|
59
|
-
let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } =
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
className:
|
|
58
|
+
}, et = ({ status: e, text: t, textClassName: n = "dial-tiny-text", className: r }) => {
|
|
59
|
+
let { pillClassName: i, wrapperClassName: a, labelClassName: o, renderIcon: s } = $e[e];
|
|
60
|
+
return /* @__PURE__ */ J("span", {
|
|
61
|
+
className: b(i, n, a, o, r),
|
|
62
62
|
children: [s && s(), t]
|
|
63
63
|
});
|
|
64
|
-
},
|
|
65
|
-
title: "
|
|
66
|
-
description: "
|
|
67
|
-
locationLabel: "
|
|
68
|
-
locationLeaf: "
|
|
69
|
-
newBadge: "
|
|
70
|
-
locationDivider: "
|
|
71
|
-
card: "
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
64
|
+
}, X = {
|
|
65
|
+
title: "_title_p4ova_2",
|
|
66
|
+
description: "_description_p4ova_6",
|
|
67
|
+
locationLabel: "_locationLabel_p4ova_10",
|
|
68
|
+
locationLeaf: "_locationLeaf_p4ova_14",
|
|
69
|
+
newBadge: "_newBadge_p4ova_18",
|
|
70
|
+
locationDivider: "_locationDivider_p4ova_23",
|
|
71
|
+
card: "_card_p4ova_34",
|
|
72
|
+
cardButton: "_cardButton_p4ova_48",
|
|
73
|
+
aboveButton: "_aboveButton_p4ova_60",
|
|
74
|
+
interactive: "_interactive_p4ova_65"
|
|
75
|
+
}, tt = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
|
|
76
|
+
let o = C(), s = e.newBadgeLabel ?? r?.newBadgeLabel ?? "NEW", c = r?.pausedBadgeLabel ?? "Paused", l = r?.completedBadgeLabel ?? "Completed", { colors: u, typography: d } = i ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", p = d?.descriptionClassName ?? "dial-small-paragraph-text", m = d?.scheduleLabelClassName ?? "dial-tiny-text", h = d?.pausedBadgeClassName ?? "dial-tiny-text", g = d?.completedBadgeClassName ?? "dial-tiny-text", _ = d?.locationLabelClassName ?? "dial-tiny-text", v = d?.locationLeafClassName ?? "dial-tiny-semi-text", x = d?.newBadgeClassName ?? "dial-tiny-semi-text", S = Ze(e), { text: w, textClassName: T } = {
|
|
77
|
+
[Y.Scheduled]: {
|
|
75
78
|
text: e.scheduleLabel,
|
|
76
|
-
textClassName:
|
|
79
|
+
textClassName: m
|
|
77
80
|
},
|
|
78
|
-
[
|
|
81
|
+
[Y.Paused]: {
|
|
79
82
|
text: c,
|
|
80
|
-
textClassName:
|
|
83
|
+
textClassName: h
|
|
81
84
|
},
|
|
82
|
-
[
|
|
85
|
+
[Y.Completed]: {
|
|
83
86
|
text: l,
|
|
84
|
-
textClassName:
|
|
87
|
+
textClassName: g
|
|
85
88
|
}
|
|
86
|
-
}[S],
|
|
89
|
+
}[S], E = y({
|
|
87
90
|
"--stc-title-text": u?.titleText,
|
|
88
91
|
"--stc-desc-text": u?.descriptionText,
|
|
89
92
|
"--stc-pill-bg": u?.schedulePillBackground,
|
|
@@ -99,89 +102,90 @@ var W = {
|
|
|
99
102
|
"--stc-paused-text": u?.pausedBadgeText,
|
|
100
103
|
"--stc-completed-bg": u?.completedBadgeBackground,
|
|
101
104
|
"--stc-completed-border": u?.completedBadgeBorder,
|
|
102
|
-
"--stc-completed-text": u?.completedBadgeText
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
return /* @__PURE__ */
|
|
111
|
-
role: n ? "button" : "group",
|
|
105
|
+
"--stc-completed-text": u?.completedBadgeText,
|
|
106
|
+
"--stc-focus-outline": u?.focusOutline
|
|
107
|
+
}), D = /* @__PURE__ */ q(N, {
|
|
108
|
+
text: e.displayName,
|
|
109
|
+
query: t,
|
|
110
|
+
maxLines: o ? 2 : 1,
|
|
111
|
+
className: b(f, X.title, n && X.aboveButton)
|
|
112
|
+
});
|
|
113
|
+
return /* @__PURE__ */ J(ie, {
|
|
112
114
|
"aria-label": e.displayName,
|
|
113
|
-
style:
|
|
114
|
-
className:
|
|
115
|
-
...E,
|
|
115
|
+
style: E,
|
|
116
|
+
className: b("h-(--st-card-height,232px) min-w-0", X.card, n && "relative has-focus-visible:translate-y-[-3px] has-focus-visible:shadow-lg motion-reduce:has-focus-visible:translate-y-0", n && X.interactive, a, Ye.card),
|
|
116
117
|
children: [
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ J("div", {
|
|
118
119
|
className: "flex min-w-0 shrink-0 items-start gap-2 desktop:items-center",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}), e.isNew && /* @__PURE__ */
|
|
125
|
-
className:
|
|
120
|
+
children: [n ? /* @__PURE__ */ q("button", {
|
|
121
|
+
type: "button",
|
|
122
|
+
onClick: () => n(e.id),
|
|
123
|
+
className: b("min-w-0 text-start", X.cardButton),
|
|
124
|
+
children: D
|
|
125
|
+
}) : D, e.isNew && /* @__PURE__ */ q("span", {
|
|
126
|
+
className: b("shrink-0 rounded-full px-2 py-0.5", x, X.newBadge),
|
|
126
127
|
children: s
|
|
127
128
|
})]
|
|
128
129
|
}),
|
|
129
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
130
|
-
className:
|
|
130
|
+
e.descriptionPreview && /* @__PURE__ */ q("p", {
|
|
131
|
+
className: b("line-clamp-3 min-h-0 min-w-0 overflow-hidden wrap-anywhere", p, X.description),
|
|
131
132
|
children: e.descriptionPreview
|
|
132
133
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ J("div", {
|
|
134
135
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
136
|
+
children: [/* @__PURE__ */ q("div", {
|
|
136
137
|
className: "flex min-h-[28px] items-center",
|
|
137
|
-
children: /* @__PURE__ */
|
|
138
|
+
children: /* @__PURE__ */ q(et, {
|
|
138
139
|
status: S,
|
|
139
|
-
text:
|
|
140
|
-
textClassName:
|
|
140
|
+
text: w,
|
|
141
|
+
textClassName: T
|
|
141
142
|
})
|
|
142
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */
|
|
143
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ q(le, {
|
|
143
144
|
segments: e.locationSegments,
|
|
144
|
-
labelClassName:
|
|
145
|
-
leafClassName: v
|
|
146
|
-
className:
|
|
145
|
+
labelClassName: b(_, X.locationLabel),
|
|
146
|
+
leafClassName: b(v, X.locationLeaf),
|
|
147
|
+
className: b("pt-3", X.locationDivider)
|
|
147
148
|
})]
|
|
148
149
|
})
|
|
149
150
|
]
|
|
150
151
|
});
|
|
151
|
-
},
|
|
152
|
+
}, nt = { card: "_card_18ivt_1" }, rt = [
|
|
152
153
|
"100%",
|
|
153
154
|
"100%",
|
|
154
155
|
"61%"
|
|
155
|
-
],
|
|
156
|
-
"
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
})
|
|
156
|
+
], it = "var(--stcs-skeleton-bg)", at = ({ styles: e }) => {
|
|
157
|
+
let t = y({ "--stcs-skeleton-bg": e?.colors?.skeletonColor });
|
|
158
|
+
return /* @__PURE__ */ J(ie, {
|
|
159
|
+
"aria-hidden": !0,
|
|
160
|
+
style: t,
|
|
161
|
+
className: b("h-(--st-card-height,232px)", nt.card),
|
|
162
|
+
children: [
|
|
163
|
+
/* @__PURE__ */ q(B, {
|
|
164
|
+
variant: V.Rectangular,
|
|
165
|
+
width: "60%",
|
|
166
|
+
height: "20px",
|
|
167
|
+
color: it,
|
|
168
|
+
className: "shrink-0"
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ q("div", {
|
|
171
|
+
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
172
|
+
children: rt.map((e, t) => /* @__PURE__ */ q(B, {
|
|
173
|
+
variant: V.Rectangular,
|
|
174
|
+
width: e,
|
|
175
|
+
height: "16px",
|
|
176
|
+
color: it
|
|
177
|
+
}, t))
|
|
178
|
+
}),
|
|
179
|
+
/* @__PURE__ */ q(B, {
|
|
180
|
+
variant: V.Rectangular,
|
|
181
|
+
width: "110px",
|
|
182
|
+
height: "28px",
|
|
183
|
+
color: it,
|
|
184
|
+
className: "shrink-0 rounded-lg"
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
});
|
|
188
|
+
}, ot = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ J("div", {
|
|
185
189
|
style: {
|
|
186
190
|
"--st-grid-min-card-width": s?.minCardWidth,
|
|
187
191
|
"--st-grid-gap": s?.gap,
|
|
@@ -191,62 +195,58 @@ var W = {
|
|
|
191
195
|
gap: "var(--st-grid-gap, 20px)",
|
|
192
196
|
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))"
|
|
193
197
|
},
|
|
194
|
-
className:
|
|
195
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
198
|
+
className: b("mx-auto grid w-full min-w-0", Ye.cardGrid),
|
|
199
|
+
children: [e.map((e) => /* @__PURE__ */ q(tt, {
|
|
196
200
|
item: e,
|
|
197
201
|
searchQuery: t,
|
|
198
202
|
onCardClick: n,
|
|
199
203
|
labels: r,
|
|
200
204
|
styles: i
|
|
201
|
-
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */
|
|
202
|
-
}),
|
|
205
|
+
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ q(at, { styles: o }, `skeleton-${t}`))]
|
|
206
|
+
}), st = {
|
|
203
207
|
container: "_container_3vz4t_2",
|
|
204
208
|
subtitle: "_subtitle_3vz4t_6",
|
|
205
209
|
createButtonLabel: "_createButtonLabel_3vz4t_10",
|
|
206
210
|
sortButton: "_sortButton_3vz4t_19",
|
|
207
211
|
createButton: "_createButton_3vz4t_10",
|
|
208
212
|
sortControlHidden: "_sortControlHidden_3vz4t_49"
|
|
209
|
-
},
|
|
210
|
-
size: 48,
|
|
211
|
-
stroke: 1,
|
|
212
|
-
"aria-hidden": !0
|
|
213
|
-
}), Ue = (e, t, n, r, i, a) => {
|
|
213
|
+
}, ct = (e, t, n, r, i, a) => {
|
|
214
214
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
215
|
-
},
|
|
215
|
+
}, lt = (e) => {
|
|
216
216
|
if (!e || e === document.body) return null;
|
|
217
217
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
218
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
219
|
-
},
|
|
220
|
-
let { colors: E, typography:
|
|
218
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : lt(e.parentElement);
|
|
219
|
+
}, ut = ({ 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: f = 6, onLoadMore: p, onCardClick: m, banner: h, styles: _, sortIcon: v, className: x, gridLayout: S, cardStyles: C, loadMoreError: w, onRetryLoadMore: T }) => {
|
|
220
|
+
let { colors: E, typography: D } = _ ?? {}, re = D?.titleClassName ?? "dial-h1-text", O = D?.subtitleClassName ?? "dial-body-text", ie = y({
|
|
221
221
|
"--st-bg": E?.background,
|
|
222
222
|
"--st-subtitle-text": E?.subtitleText,
|
|
223
223
|
"--st-sort-text": E?.sortButtonText
|
|
224
|
-
}),
|
|
224
|
+
}), ae = (e) => {
|
|
225
225
|
r(e ?? "");
|
|
226
|
-
}, [
|
|
227
|
-
|
|
228
|
-
}, []),
|
|
229
|
-
|
|
226
|
+
}, [se, j] = Ge(!1), [le, ue] = Ge(!1), N = We(null), de = Be(() => {
|
|
227
|
+
ue(!0);
|
|
228
|
+
}, []), fe = Be(() => {
|
|
229
|
+
ue(!1);
|
|
230
230
|
}, []);
|
|
231
|
-
|
|
232
|
-
let e =
|
|
233
|
-
|
|
234
|
-
}, [
|
|
235
|
-
let
|
|
231
|
+
He(() => {
|
|
232
|
+
let e = N.current;
|
|
233
|
+
le && se && e != null && e.offsetParent == null && j(!1);
|
|
234
|
+
}, [le, se]);
|
|
235
|
+
let pe = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, me = Ue(() => e.sortOptions.map((e) => ({
|
|
236
236
|
key: e.value,
|
|
237
237
|
label: e.label,
|
|
238
|
-
mark:
|
|
238
|
+
mark: he.Check,
|
|
239
239
|
checked: e.value === i,
|
|
240
240
|
onClick: () => a(e.value)
|
|
241
241
|
})), [
|
|
242
242
|
e.sortOptions,
|
|
243
243
|
i,
|
|
244
244
|
a
|
|
245
|
-
]),
|
|
246
|
-
|
|
247
|
-
let e =
|
|
245
|
+
]), ge = ct(s, d, !!c, o.length, n.trim().length > 0, e), _e = We(null);
|
|
246
|
+
Ve(() => {
|
|
247
|
+
let e = _e.current;
|
|
248
248
|
if (!e || !p) return;
|
|
249
|
-
let t =
|
|
249
|
+
let t = lt(e.parentElement);
|
|
250
250
|
if (!t) return;
|
|
251
251
|
let n = () => {
|
|
252
252
|
if (d || s || w || !u) return;
|
|
@@ -261,149 +261,192 @@ var W = {
|
|
|
261
261
|
w,
|
|
262
262
|
p
|
|
263
263
|
]);
|
|
264
|
-
let
|
|
264
|
+
let I = () => s ? /* @__PURE__ */ q(Se, { ariaLabel: e.loadingAriaLabel ?? "Loading scheduled tasks" }) : c ? /* @__PURE__ */ J("div", {
|
|
265
265
|
className: "flex flex-col items-center gap-3",
|
|
266
|
-
children: [/* @__PURE__ */
|
|
267
|
-
className:
|
|
266
|
+
children: [/* @__PURE__ */ q("p", {
|
|
267
|
+
className: b(O, st.subtitle),
|
|
268
268
|
children: e.errorLabel
|
|
269
|
-
}), /* @__PURE__ */
|
|
269
|
+
}), /* @__PURE__ */ q(M, {
|
|
270
270
|
label: e.retryLabel,
|
|
271
271
|
onClick: l
|
|
272
272
|
})]
|
|
273
|
-
}) : o.length === 0 ? n.trim() ? /* @__PURE__ */
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
}) : /* @__PURE__ */
|
|
273
|
+
}) : o.length === 0 ? n.trim() ? /* @__PURE__ */ q(g, {
|
|
274
|
+
label: e.noResultsLabel,
|
|
275
|
+
description: e.noResultsDescription
|
|
276
|
+
}) : /* @__PURE__ */ q(g, {
|
|
277
277
|
label: e.emptyStateLabel,
|
|
278
|
-
|
|
279
|
-
}) : /* @__PURE__ */
|
|
278
|
+
description: e.emptyStateDescription
|
|
279
|
+
}) : /* @__PURE__ */ J("div", {
|
|
280
280
|
className: "flex w-full flex-col gap-6",
|
|
281
281
|
children: [
|
|
282
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ q(ot, {
|
|
283
283
|
items: o,
|
|
284
284
|
searchQuery: n,
|
|
285
|
-
onCardClick:
|
|
285
|
+
onCardClick: m,
|
|
286
286
|
labels: e.cardLabels,
|
|
287
287
|
trailingSkeletonCount: d ? f : 0,
|
|
288
288
|
skeletonStyles: { colors: { skeletonColor: E?.skeletonColor } },
|
|
289
289
|
cardStyles: C,
|
|
290
|
-
layout:
|
|
290
|
+
layout: S
|
|
291
291
|
}),
|
|
292
|
-
w && /* @__PURE__ */
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
children: e.loadMoreErrorLabel ?? e.errorLabel
|
|
298
|
-
}), /* @__PURE__ */ V(k, {
|
|
292
|
+
w && /* @__PURE__ */ q(ce, {
|
|
293
|
+
message: e.loadMoreErrorLabel ?? e.errorLabel,
|
|
294
|
+
textClassName: O,
|
|
295
|
+
iconStroke: A,
|
|
296
|
+
action: /* @__PURE__ */ q(M, {
|
|
299
297
|
label: e.retryLabel,
|
|
300
298
|
onClick: T
|
|
301
|
-
})
|
|
299
|
+
})
|
|
302
300
|
}),
|
|
303
|
-
/* @__PURE__ */
|
|
304
|
-
ref:
|
|
301
|
+
/* @__PURE__ */ q("div", {
|
|
302
|
+
ref: _e,
|
|
305
303
|
"aria-hidden": !0,
|
|
306
304
|
className: "h-px w-full"
|
|
307
305
|
})
|
|
308
306
|
]
|
|
309
|
-
}),
|
|
310
|
-
return /* @__PURE__ */
|
|
311
|
-
style:
|
|
312
|
-
className:
|
|
307
|
+
}), ve = s || !!c || o.length === 0;
|
|
308
|
+
return /* @__PURE__ */ J("div", {
|
|
309
|
+
style: ie,
|
|
310
|
+
className: b("flex h-full w-full flex-col gap-4 overflow-y-auto px-4 py-4 desktop:gap-6 desktop:px-8", st.container, x),
|
|
313
311
|
children: [
|
|
314
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ J("div", {
|
|
315
313
|
className: "flex items-start justify-between gap-4",
|
|
316
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ J("div", {
|
|
317
315
|
className: "min-w-0 gap-2",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
319
|
-
className:
|
|
316
|
+
children: [/* @__PURE__ */ q("h1", {
|
|
317
|
+
className: b("truncate", re),
|
|
320
318
|
children: e.title
|
|
321
|
-
}), /* @__PURE__ */
|
|
322
|
-
className:
|
|
319
|
+
}), /* @__PURE__ */ q("p", {
|
|
320
|
+
className: b("mt-1", O, st.subtitle),
|
|
323
321
|
children: e.subtitle
|
|
324
322
|
})]
|
|
325
|
-
}), /* @__PURE__ */
|
|
323
|
+
}), t != null && /* @__PURE__ */ q(R, {
|
|
326
324
|
label: e.createButtonLabel,
|
|
327
|
-
textClassName:
|
|
325
|
+
textClassName: st.createButtonLabel,
|
|
328
326
|
"aria-label": e.createButtonLabel,
|
|
329
|
-
iconBefore: /* @__PURE__ */
|
|
330
|
-
size:
|
|
327
|
+
iconBefore: /* @__PURE__ */ q(Ie, {
|
|
328
|
+
size: k.SM,
|
|
331
329
|
"aria-hidden": !0,
|
|
332
|
-
stroke:
|
|
330
|
+
stroke: A
|
|
333
331
|
}),
|
|
334
332
|
onClick: t,
|
|
335
|
-
className:
|
|
333
|
+
className: b("shrink-0", st.createButton)
|
|
336
334
|
})]
|
|
337
335
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ J("div", {
|
|
339
337
|
className: "flex flex-wrap items-center gap-3",
|
|
340
|
-
children: [/* @__PURE__ */
|
|
338
|
+
children: [/* @__PURE__ */ q("div", {
|
|
341
339
|
role: "search",
|
|
342
340
|
className: "flex-1",
|
|
343
|
-
children: /* @__PURE__ */
|
|
341
|
+
children: /* @__PURE__ */ q(z, {
|
|
344
342
|
value: n,
|
|
345
|
-
onChange:
|
|
343
|
+
onChange: ae,
|
|
346
344
|
placeholder: e.searchPlaceholder,
|
|
347
345
|
clearLabel: e.clearSearchLabel,
|
|
348
346
|
"aria-label": e.searchAriaLabel,
|
|
349
|
-
size:
|
|
350
|
-
onFocus:
|
|
351
|
-
onBlur:
|
|
347
|
+
size: oe.Large,
|
|
348
|
+
onFocus: de,
|
|
349
|
+
onBlur: fe
|
|
352
350
|
})
|
|
353
|
-
}), e.sortOptions.length > 0 && /* @__PURE__ */
|
|
354
|
-
ref:
|
|
355
|
-
className:
|
|
356
|
-
children: /* @__PURE__ */
|
|
357
|
-
items:
|
|
358
|
-
label:
|
|
351
|
+
}), e.sortOptions.length > 0 && /* @__PURE__ */ q("div", {
|
|
352
|
+
ref: N,
|
|
353
|
+
className: b(le && st.sortControlHidden),
|
|
354
|
+
children: /* @__PURE__ */ q(te, {
|
|
355
|
+
items: me,
|
|
356
|
+
label: pe,
|
|
359
357
|
variant: ne.Primary,
|
|
360
|
-
appearance:
|
|
361
|
-
iconBefore:
|
|
362
|
-
size:
|
|
358
|
+
appearance: ee.Ghost,
|
|
359
|
+
iconBefore: v === void 0 ? /* @__PURE__ */ q(Ae, {
|
|
360
|
+
size: k.SM,
|
|
363
361
|
"aria-hidden": !0,
|
|
364
|
-
stroke:
|
|
365
|
-
}) :
|
|
366
|
-
className:
|
|
362
|
+
stroke: A
|
|
363
|
+
}) : v,
|
|
364
|
+
className: st.sortButton
|
|
367
365
|
})
|
|
368
366
|
})]
|
|
369
367
|
}),
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
className: "sr-only",
|
|
375
|
-
children: ye
|
|
368
|
+
h != null && typeof h != "boolean" && /* @__PURE__ */ q("div", {
|
|
369
|
+
className: "mx-auto w-full min-w-0",
|
|
370
|
+
style: { maxWidth: S?.maxWidth ?? "1180px" },
|
|
371
|
+
children: h
|
|
376
372
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
378
|
-
|
|
379
|
-
|
|
373
|
+
/* @__PURE__ */ q(P, {
|
|
374
|
+
visuallyHidden: !0,
|
|
375
|
+
as: F.Span,
|
|
376
|
+
children: ge
|
|
377
|
+
}),
|
|
378
|
+
/* @__PURE__ */ q("div", {
|
|
379
|
+
className: b("mx-auto flex size-full w-full min-w-0 flex-col", ve && "items-center justify-center"),
|
|
380
|
+
children: I()
|
|
380
381
|
})
|
|
381
382
|
]
|
|
382
383
|
});
|
|
383
|
-
},
|
|
384
|
+
}, dt = /* @__PURE__ */ function(e) {
|
|
384
385
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
385
|
-
}({}),
|
|
386
|
-
let n = new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
387
|
-
for (let r of n) if (
|
|
386
|
+
}({}), ft = (e) => Array.from(document.querySelectorAll("[aria-labelledby]")).find((t) => (t.getAttribute("aria-labelledby") ?? "").split(/\s+/).includes(e)) ?? null, pt = (e) => e == null ? "" : typeof e == "string" ? e.trim() : Array.isArray(e) ? e.length ? JSON.stringify(e) : "" : JSON.stringify(e), mt = (e, t) => {
|
|
387
|
+
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
388
|
+
for (let r of n) if (pt(e[r]) !== pt(t[r])) return !0;
|
|
388
389
|
return !1;
|
|
389
|
-
},
|
|
390
|
-
let
|
|
391
|
-
return /* @__PURE__ */
|
|
390
|
+
}, ht = { error: "_error_v2pfn_4" }, gt = ({ id: t, label: n, placeholder: r, value: a, onChange: o, minDate: s, error: c, errorClassName: l, disabled: u }) => {
|
|
391
|
+
let d = (e) => o(i(e)), f = G();
|
|
392
|
+
return S(() => document.getElementById(t), f, !!c), /* @__PURE__ */ J("div", {
|
|
393
|
+
className: "flex flex-1 flex-col gap-1",
|
|
394
|
+
children: [/* @__PURE__ */ q(re, {
|
|
395
|
+
id: t,
|
|
396
|
+
mode: O.Date,
|
|
397
|
+
value: e(a),
|
|
398
|
+
onChange: d,
|
|
399
|
+
minDate: s,
|
|
400
|
+
labelProps: { label: n },
|
|
401
|
+
placeholder: r,
|
|
402
|
+
invalid: !!c,
|
|
403
|
+
disabled: u
|
|
404
|
+
}), /* @__PURE__ */ q(j, {
|
|
405
|
+
announce: me.Assertive,
|
|
406
|
+
id: f,
|
|
407
|
+
className: b(l, ht.error),
|
|
408
|
+
text: c ?? ""
|
|
409
|
+
})]
|
|
410
|
+
});
|
|
411
|
+
}, _t = ({ value: e, onChange: t, onBlur: n, disabled: r, invalid: i, ariaLabel: a }) => /* @__PURE__ */ q(re, {
|
|
412
|
+
mode: O.Time,
|
|
413
|
+
value: e,
|
|
414
|
+
onChange: (e) => {
|
|
415
|
+
typeof e == "string" && t(e);
|
|
416
|
+
},
|
|
417
|
+
onBlur: n,
|
|
418
|
+
disabled: r,
|
|
419
|
+
invalid: i,
|
|
420
|
+
labelProps: {
|
|
421
|
+
label: a,
|
|
422
|
+
className: "sr-only"
|
|
423
|
+
},
|
|
424
|
+
className: "w-[120px] gap-y-0",
|
|
425
|
+
fieldClassName: "px-3 py-1.5 pe-9",
|
|
426
|
+
pickerButtonClassName: "size-6 inset-e-1.5"
|
|
427
|
+
}), vt = { error: "_error_v2pfn_4" }, yt = (e) => /* @__PURE__ */ q(_t, { ...e }), bt = ({ label: e, placeholder: t, value: r, onChange: i, disabled: a, error: o, errorClassName: c = "dial-tiny-text" }) => {
|
|
428
|
+
let l = We(/* @__PURE__ */ new Date()).current, u = (e) => i(n(e)), d = G();
|
|
429
|
+
return S(() => document.getElementById("scheduled-task-run-at"), d, !!o), /* @__PURE__ */ J("div", {
|
|
392
430
|
className: "flex flex-col gap-1",
|
|
393
|
-
children: [/* @__PURE__ */
|
|
431
|
+
children: [/* @__PURE__ */ q(re, {
|
|
394
432
|
id: "scheduled-task-run-at",
|
|
395
|
-
mode:
|
|
396
|
-
value: s(
|
|
397
|
-
onChange:
|
|
398
|
-
minDate:
|
|
433
|
+
mode: O.DateTime,
|
|
434
|
+
value: s(r),
|
|
435
|
+
onChange: u,
|
|
436
|
+
minDate: l,
|
|
399
437
|
labelProps: {
|
|
400
438
|
label: e,
|
|
401
439
|
required: !0
|
|
402
440
|
},
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
441
|
+
placeholder: t,
|
|
442
|
+
invalid: !!o,
|
|
443
|
+
disabled: a,
|
|
444
|
+
renderTimeField: yt
|
|
445
|
+
}), /* @__PURE__ */ q(j, {
|
|
446
|
+
announce: me.Assertive,
|
|
447
|
+
id: d,
|
|
448
|
+
className: b(c, vt.error),
|
|
449
|
+
text: o ?? ""
|
|
407
450
|
})]
|
|
408
451
|
});
|
|
409
452
|
}, Z = {
|
|
@@ -413,264 +456,304 @@ var W = {
|
|
|
413
456
|
instructionsError: "_instructionsError_1253x_18",
|
|
414
457
|
refineFeedback: "_refineFeedback_1253x_22",
|
|
415
458
|
refineError: "_refineError_1253x_26"
|
|
416
|
-
},
|
|
417
|
-
let ue =
|
|
418
|
-
if (
|
|
419
|
-
|
|
459
|
+
}, xt = W(async () => ({ default: (await qe()).MarkdownEditor })), St = ({ labels: e, values: t, initialValues: n, errors: r, modelSelector: i, modelLabelId: s, skillSelector: u, onFieldChange: f, onBack: h, onCancel: g, onSubmit: _, isSubmitting: E = !1, isSubmitDisabled: te = !1, onRefineDescription: ie, onRefineInstructions: oe, markdownEditorTheme: se, backIcon: ce, className: le, styles: M }) => {
|
|
460
|
+
let ue = G(), N = G(), pe = G(), P = G(), F = G(), he = G(), ge = G(), _e = G(), I = We(void 0), ve = (e) => e ? async (t, n) => {
|
|
461
|
+
if (I.current && !I.current.aborted) throw new DOMException("Busy", "AbortError");
|
|
462
|
+
I.current = n;
|
|
420
463
|
try {
|
|
421
464
|
return await e(t, n);
|
|
422
465
|
} finally {
|
|
423
|
-
|
|
466
|
+
I.current === n && (I.current = void 0);
|
|
424
467
|
}
|
|
425
|
-
} : void 0,
|
|
426
|
-
value:
|
|
427
|
-
onChange: (e) =>
|
|
428
|
-
onRefine:
|
|
429
|
-
disabled:
|
|
430
|
-
}),
|
|
431
|
-
value:
|
|
432
|
-
onChange: (e) =>
|
|
433
|
-
onRefine:
|
|
434
|
-
disabled:
|
|
435
|
-
}),
|
|
436
|
-
|
|
437
|
-
},
|
|
438
|
-
|
|
439
|
-
}),
|
|
440
|
-
|
|
441
|
-
}),
|
|
442
|
-
"--stcf-details-border":
|
|
443
|
-
"--stcf-subtitle-text":
|
|
444
|
-
"--stcf-error-text":
|
|
445
|
-
"--stcf-refine-action-text":
|
|
446
|
-
"--stcf-refine-error-text":
|
|
447
|
-
}),
|
|
448
|
-
feedbackClassName:
|
|
468
|
+
} : void 0, ye = w({
|
|
469
|
+
value: t.description ?? "",
|
|
470
|
+
onChange: (e) => f("description", e),
|
|
471
|
+
onRefine: ve(ie),
|
|
472
|
+
disabled: E
|
|
473
|
+
}), L = w({
|
|
474
|
+
value: t.prompt,
|
|
475
|
+
onChange: (e) => f("prompt", e),
|
|
476
|
+
onRefine: ve(oe),
|
|
477
|
+
disabled: E
|
|
478
|
+
}), R = ye.isPending || L.isPending, z = () => {
|
|
479
|
+
ye.reset(), L.reset();
|
|
480
|
+
}, B = !!(n && mt(t, n)), V = T(B), Ce = C(), we = () => V.guard(() => {
|
|
481
|
+
z(), h();
|
|
482
|
+
}), Ee = () => V.guard(() => {
|
|
483
|
+
z(), g();
|
|
484
|
+
}), De = x(), ke = !t.skillUrls?.length, [Ae, je] = Ge(), Me = We(/* @__PURE__ */ new Date()).current, { colors: H, typography: U, layout: Ne } = M ?? {}, Pe = U?.titleClassName ?? "dial-h1-text", Fe = U?.sectionTitleClassName ?? "dial-body-semi-text", Ie = U?.sectionSubtitleClassName ?? "dial-tiny-text", Le = U?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", W = U?.instructionsErrorClassName ?? "dial-tiny-text", ze = y({
|
|
485
|
+
"--stcf-details-border": H?.detailsColumnBorder,
|
|
486
|
+
"--stcf-subtitle-text": H?.sectionSubtitleText,
|
|
487
|
+
"--stcf-error-text": H?.instructionsErrorText,
|
|
488
|
+
"--stcf-refine-action-text": H?.refineActionText,
|
|
489
|
+
"--stcf-refine-error-text": H?.refineErrorText
|
|
490
|
+
}), Be = {
|
|
491
|
+
feedbackClassName: b(H?.refineActionText && Z.refineFeedback, U?.refineFeedbackClassName, Ye.refineFeedback),
|
|
449
492
|
errorClassName: Z.refineError
|
|
450
|
-
},
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
|
|
493
|
+
}, He = (t) => {
|
|
494
|
+
let n = c.test(t.target.value) ? void 0 : e.timeInvalidLabel;
|
|
495
|
+
je(n), f("time", t.target.value);
|
|
496
|
+
}, Ue = (e) => {
|
|
497
|
+
je(void 0), f("time", typeof e == "string" ? e : "");
|
|
498
|
+
}, qe = (e) => {
|
|
499
|
+
f("repeat", e);
|
|
500
|
+
}, Je = t.repeat !== l.OneTime && t.repeat !== l.Hourly, Y = t.repeat === l.Custom, Xe = Y && !t.daysOfWeek?.length;
|
|
501
|
+
Ve(() => {
|
|
502
|
+
Je || je(void 0);
|
|
503
|
+
}, [Je]);
|
|
504
|
+
let Ze = Je ? Ae ?? r.time : void 0;
|
|
505
|
+
S(() => ft(s), P, !!r.modelId), S(() => document.getElementById(N), _e, !!r.prompt);
|
|
506
|
+
let Qe = (e) => f("runAt", e), $e = (e) => {
|
|
507
|
+
let n = t.daysOfWeek ?? [];
|
|
508
|
+
n.includes(e) ? n.length > 1 && f("daysOfWeek", n.filter((t) => t !== e)) : f("daysOfWeek", [...n, e].sort((e, t) => Number(e) - Number(t)));
|
|
509
|
+
}, et = te || !!r.modelId || E || R || !t.displayName.trim() || !t.modelId || !t.prompt.trim() && !t.skillUrls?.length || !!r.skillUrls || t.repeat === l.OneTime && (!t.runAt || !!r.runAt) || Je && !t.time || Xe || !!Ze;
|
|
510
|
+
return /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ke, {
|
|
460
511
|
labels: {
|
|
461
|
-
title:
|
|
462
|
-
backButtonLabel:
|
|
463
|
-
cancelButtonLabel:
|
|
464
|
-
submitButtonLabel:
|
|
465
|
-
submittingLabel:
|
|
512
|
+
title: e.pageTitle,
|
|
513
|
+
backButtonLabel: e.backButtonLabel,
|
|
514
|
+
cancelButtonLabel: e.cancelButtonLabel,
|
|
515
|
+
submitButtonLabel: e.createButtonLabel,
|
|
516
|
+
submittingLabel: e.submittingLabel ?? "Saving"
|
|
466
517
|
},
|
|
467
|
-
onBack:
|
|
468
|
-
onCancel:
|
|
518
|
+
onBack: we,
|
|
519
|
+
onCancel: Ee,
|
|
469
520
|
onSubmit: () => {
|
|
470
|
-
!
|
|
521
|
+
!et && (!I.current || I.current.aborted) && _();
|
|
471
522
|
},
|
|
472
|
-
isCancelDisabled:
|
|
473
|
-
isSubmitDisabled:
|
|
474
|
-
isSubmitting:
|
|
475
|
-
backIcon:
|
|
476
|
-
size:
|
|
477
|
-
stroke:
|
|
523
|
+
isCancelDisabled: E,
|
|
524
|
+
isSubmitDisabled: et,
|
|
525
|
+
isSubmitting: E,
|
|
526
|
+
backIcon: ce === void 0 ? /* @__PURE__ */ q(Oe, {
|
|
527
|
+
size: k.LG,
|
|
528
|
+
stroke: A,
|
|
478
529
|
"aria-hidden": !0,
|
|
479
530
|
className: "rtl:scale-x-[-1]"
|
|
480
|
-
}) :
|
|
531
|
+
}) : ce,
|
|
481
532
|
layout: {
|
|
482
|
-
sideColumnWidth:
|
|
483
|
-
columnGap:
|
|
533
|
+
sideColumnWidth: Ne?.detailsWidth,
|
|
534
|
+
columnGap: Ne?.columnGap,
|
|
484
535
|
reserveEndColumn: !1
|
|
485
536
|
},
|
|
486
|
-
className:
|
|
537
|
+
className: le,
|
|
487
538
|
styles: {
|
|
488
|
-
colors: { background:
|
|
539
|
+
colors: { background: H?.background },
|
|
489
540
|
header: {
|
|
490
|
-
colors: { borderColor:
|
|
491
|
-
typography: { fontClassName:
|
|
541
|
+
colors: { borderColor: H?.headerBorder },
|
|
542
|
+
typography: { fontClassName: Pe }
|
|
492
543
|
},
|
|
493
|
-
cssVars:
|
|
544
|
+
cssVars: ze
|
|
494
545
|
},
|
|
495
|
-
left: /* @__PURE__ */
|
|
546
|
+
left: /* @__PURE__ */ J("div", {
|
|
496
547
|
role: "group",
|
|
497
|
-
"aria-label":
|
|
498
|
-
className:
|
|
548
|
+
"aria-label": e.detailsSectionTitle,
|
|
549
|
+
className: b("flex flex-1 flex-col gap-5 py-6 desktop:border-e", Z.detailsColumn, Z.formColumn),
|
|
499
550
|
children: [
|
|
500
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ J("div", {
|
|
501
552
|
className: "flex flex-col gap-1",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
503
|
-
className:
|
|
504
|
-
children:
|
|
505
|
-
}), /* @__PURE__ */
|
|
506
|
-
className:
|
|
507
|
-
children:
|
|
553
|
+
children: [/* @__PURE__ */ q("h2", {
|
|
554
|
+
className: Fe,
|
|
555
|
+
children: e.detailsSectionTitle
|
|
556
|
+
}), /* @__PURE__ */ q("p", {
|
|
557
|
+
className: b(Ie, Z.sectionSubtitle),
|
|
558
|
+
children: e.detailsSectionSubtitle
|
|
508
559
|
})]
|
|
509
560
|
}),
|
|
510
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ q(de, {
|
|
511
562
|
id: "scheduled-task-display-name",
|
|
512
|
-
value:
|
|
513
|
-
onChange: (e) =>
|
|
563
|
+
value: t.displayName,
|
|
564
|
+
onChange: (e) => f("displayName", e ?? ""),
|
|
514
565
|
labelProps: {
|
|
515
|
-
label:
|
|
566
|
+
label: e.displayNameLabel,
|
|
516
567
|
required: !0
|
|
517
568
|
},
|
|
518
|
-
invalid: !!
|
|
519
|
-
error:
|
|
569
|
+
invalid: !!r.displayName,
|
|
570
|
+
error: r.displayName
|
|
520
571
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
isEnabled: !!
|
|
572
|
+
/* @__PURE__ */ q(v, {
|
|
573
|
+
isEnabled: !!ie,
|
|
523
574
|
fieldId: ue,
|
|
524
|
-
label:
|
|
525
|
-
labels:
|
|
526
|
-
refinement:
|
|
527
|
-
disabled:
|
|
528
|
-
|
|
529
|
-
|
|
575
|
+
label: e.descriptionLabel,
|
|
576
|
+
labels: e,
|
|
577
|
+
refinement: ye,
|
|
578
|
+
disabled: E || R,
|
|
579
|
+
caption: `${(t.description ?? "").length}/500`,
|
|
580
|
+
...Be,
|
|
581
|
+
children: /* @__PURE__ */ q(Te, {
|
|
530
582
|
id: ue,
|
|
531
|
-
value:
|
|
583
|
+
value: t.description ?? "",
|
|
532
584
|
onChange: (e) => {
|
|
533
|
-
|
|
585
|
+
ye.reset(), f("description", e);
|
|
534
586
|
},
|
|
535
|
-
labelProps:
|
|
587
|
+
labelProps: ie ? void 0 : { label: e.descriptionLabel },
|
|
536
588
|
maxLength: 500,
|
|
537
|
-
invalid: !!
|
|
538
|
-
error:
|
|
539
|
-
caption: r.description ? `${r.description.length}/500` : void 0
|
|
589
|
+
invalid: !!r.description,
|
|
590
|
+
error: r.description
|
|
540
591
|
})
|
|
541
592
|
}),
|
|
542
|
-
/* @__PURE__ */
|
|
593
|
+
/* @__PURE__ */ J("div", {
|
|
543
594
|
className: "flex flex-col gap-1",
|
|
544
595
|
children: [
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
id:
|
|
547
|
-
label:
|
|
596
|
+
/* @__PURE__ */ q(fe, {
|
|
597
|
+
id: s,
|
|
598
|
+
label: e.modelOrAgentLabel,
|
|
548
599
|
required: !0
|
|
549
600
|
}),
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
601
|
+
i,
|
|
602
|
+
r.modelId && /* @__PURE__ */ q(j, {
|
|
603
|
+
id: P,
|
|
604
|
+
className: b(W, Z.instructionsError),
|
|
605
|
+
text: r.modelId
|
|
554
606
|
})
|
|
555
607
|
]
|
|
556
608
|
}),
|
|
557
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ J("div", {
|
|
558
610
|
className: "flex flex-col gap-3",
|
|
559
611
|
children: [
|
|
560
|
-
/* @__PURE__ */
|
|
561
|
-
labelProps: { label:
|
|
562
|
-
value:
|
|
563
|
-
onChange:
|
|
564
|
-
options:
|
|
612
|
+
/* @__PURE__ */ q(xe, {
|
|
613
|
+
labelProps: { label: e.repeatLabel },
|
|
614
|
+
value: t.repeat,
|
|
615
|
+
onChange: qe,
|
|
616
|
+
options: e.repeatOptions.map((e) => ({
|
|
565
617
|
value: e.key,
|
|
566
618
|
label: e.label
|
|
567
619
|
}))
|
|
568
620
|
}),
|
|
569
|
-
|
|
570
|
-
label:
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
621
|
+
t.repeat === l.OneTime && /* @__PURE__ */ q(bt, {
|
|
622
|
+
label: e.runAtLabel,
|
|
623
|
+
placeholder: e.runAtPlaceholder,
|
|
624
|
+
value: t.runAt ?? "",
|
|
625
|
+
onChange: Qe,
|
|
626
|
+
error: r.runAt,
|
|
627
|
+
errorClassName: W,
|
|
628
|
+
disabled: E
|
|
575
629
|
}),
|
|
576
|
-
|
|
577
|
-
|
|
630
|
+
t.repeat !== l.OneTime && /* @__PURE__ */ J(K, { children: [
|
|
631
|
+
t.repeat === l.Weekly && /* @__PURE__ */ J("div", {
|
|
578
632
|
className: "flex flex-col gap-1",
|
|
579
|
-
children: [/* @__PURE__ */
|
|
580
|
-
id: "scheduled-task-
|
|
581
|
-
mode:
|
|
582
|
-
value:
|
|
583
|
-
onChange:
|
|
584
|
-
onBlur: Pe,
|
|
633
|
+
children: [/* @__PURE__ */ q(re, {
|
|
634
|
+
id: "scheduled-task-day-of-week",
|
|
635
|
+
mode: O.Weekday,
|
|
636
|
+
value: a(t.dayOfWeek),
|
|
637
|
+
onChange: (e) => f("dayOfWeek", o(e)),
|
|
585
638
|
labelProps: {
|
|
586
|
-
label:
|
|
639
|
+
label: e.dayOfWeekLabel,
|
|
587
640
|
required: !0
|
|
588
641
|
},
|
|
589
|
-
invalid: !!
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
className:
|
|
594
|
-
|
|
642
|
+
invalid: !!r.dayOfWeek,
|
|
643
|
+
ariaDescribedBy: r.dayOfWeek ? F : void 0
|
|
644
|
+
}), r.dayOfWeek && /* @__PURE__ */ q(j, {
|
|
645
|
+
id: F,
|
|
646
|
+
className: b(W, Z.instructionsError),
|
|
647
|
+
text: r.dayOfWeek
|
|
595
648
|
})]
|
|
596
649
|
}),
|
|
597
|
-
|
|
650
|
+
Je && /* @__PURE__ */ J("div", {
|
|
598
651
|
className: "flex flex-col gap-1",
|
|
599
|
-
children: [/* @__PURE__ */
|
|
600
|
-
id: "scheduled-task-
|
|
601
|
-
mode:
|
|
602
|
-
value:
|
|
603
|
-
onChange:
|
|
652
|
+
children: [/* @__PURE__ */ q(re, {
|
|
653
|
+
id: "scheduled-task-time",
|
|
654
|
+
mode: O.Time,
|
|
655
|
+
value: t.time,
|
|
656
|
+
onChange: Ue,
|
|
657
|
+
onBlur: He,
|
|
604
658
|
labelProps: {
|
|
605
|
-
label:
|
|
659
|
+
label: e.timeLabel,
|
|
606
660
|
required: !0
|
|
607
661
|
},
|
|
608
|
-
invalid: !!
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
662
|
+
invalid: !!Ze,
|
|
663
|
+
ariaDescribedBy: Ze ? ge : void 0,
|
|
664
|
+
disabled: E,
|
|
665
|
+
showTimezone: !0
|
|
666
|
+
}), Ze && /* @__PURE__ */ q(j, {
|
|
667
|
+
id: ge,
|
|
668
|
+
className: b(W, Z.instructionsError),
|
|
669
|
+
text: Ze
|
|
612
670
|
})]
|
|
613
671
|
}),
|
|
614
|
-
|
|
672
|
+
Y && /* @__PURE__ */ J("div", {
|
|
673
|
+
className: "flex flex-col gap-1",
|
|
674
|
+
children: [
|
|
675
|
+
/* @__PURE__ */ q(fe, {
|
|
676
|
+
id: pe,
|
|
677
|
+
label: e.daysOfWeekLabel,
|
|
678
|
+
required: !0
|
|
679
|
+
}),
|
|
680
|
+
/* @__PURE__ */ q("div", {
|
|
681
|
+
role: "group",
|
|
682
|
+
"aria-labelledby": pe,
|
|
683
|
+
className: "flex gap-0.5",
|
|
684
|
+
children: e.customDayOptions.map((e) => {
|
|
685
|
+
let n = !!t.daysOfWeek?.includes(e.value);
|
|
686
|
+
return /* @__PURE__ */ q(D, {
|
|
687
|
+
"aria-label": e.fullName,
|
|
688
|
+
"aria-pressed": n,
|
|
689
|
+
"aria-describedby": r.daysOfWeek ? he : void 0,
|
|
690
|
+
variant: n ? ne.Primary : ne.Neutral,
|
|
691
|
+
appearance: ee.Solid,
|
|
692
|
+
className: "w-10 rounded-full",
|
|
693
|
+
label: e.shortLabel,
|
|
694
|
+
onClick: () => $e(e.value),
|
|
695
|
+
disabled: E
|
|
696
|
+
}, e.value);
|
|
697
|
+
})
|
|
698
|
+
}),
|
|
699
|
+
r.daysOfWeek && /* @__PURE__ */ q(j, {
|
|
700
|
+
id: he,
|
|
701
|
+
className: b(W, Z.instructionsError),
|
|
702
|
+
text: r.daysOfWeek
|
|
703
|
+
})
|
|
704
|
+
]
|
|
705
|
+
}),
|
|
706
|
+
t.repeat === l.Monthly && /* @__PURE__ */ q(be, {
|
|
615
707
|
id: "scheduled-task-day-of-month",
|
|
616
708
|
integer: !0,
|
|
617
709
|
min: 1,
|
|
618
710
|
max: 31,
|
|
619
|
-
value:
|
|
620
|
-
onChange: (e) =>
|
|
711
|
+
value: t.dayOfMonth ?? "",
|
|
712
|
+
onChange: (e) => f("dayOfMonth", e == null ? "" : String(e)),
|
|
621
713
|
labelProps: {
|
|
622
|
-
label:
|
|
714
|
+
label: e.dayOfMonthLabel,
|
|
623
715
|
required: !0
|
|
624
716
|
},
|
|
625
|
-
invalid: !!
|
|
626
|
-
error:
|
|
717
|
+
invalid: !!r.dayOfMonth,
|
|
718
|
+
error: r.dayOfMonth
|
|
627
719
|
}),
|
|
628
|
-
|
|
720
|
+
t.repeat === l.Hourly && /* @__PURE__ */ q(be, {
|
|
629
721
|
id: "scheduled-task-minute",
|
|
630
722
|
integer: !0,
|
|
631
723
|
min: 0,
|
|
632
724
|
max: 59,
|
|
633
|
-
|
|
634
|
-
|
|
725
|
+
wrapperClassName: "w-[142px]",
|
|
726
|
+
value: t.minute ?? "",
|
|
727
|
+
onChange: (e) => f("minute", e == null ? "" : String(e)),
|
|
635
728
|
labelProps: {
|
|
636
|
-
label:
|
|
729
|
+
label: e.minuteLabel,
|
|
637
730
|
required: !0
|
|
638
731
|
},
|
|
639
|
-
invalid: !!
|
|
640
|
-
error:
|
|
732
|
+
invalid: !!r.minute,
|
|
733
|
+
error: r.minute
|
|
641
734
|
}),
|
|
642
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ J("div", {
|
|
643
736
|
className: "flex flex-row gap-3",
|
|
644
|
-
children: [/* @__PURE__ */
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
value: e(r.endDate),
|
|
665
|
-
onChange: (e) => b("endDate", i(e)),
|
|
666
|
-
minDate: I,
|
|
667
|
-
labelProps: { label: n.endDateLabel },
|
|
668
|
-
placeholder: n.endDatePlaceholder,
|
|
669
|
-
invalid: !!u.endDate
|
|
670
|
-
}), u.endDate && /* @__PURE__ */ V("p", {
|
|
671
|
-
className: v(U, Z.instructionsError),
|
|
672
|
-
children: u.endDate
|
|
673
|
-
})]
|
|
737
|
+
children: [/* @__PURE__ */ q(gt, {
|
|
738
|
+
id: "scheduled-task-start-date",
|
|
739
|
+
label: e.startDateLabel,
|
|
740
|
+
placeholder: e.startDatePlaceholder,
|
|
741
|
+
value: t.startDate,
|
|
742
|
+
onChange: (e) => f("startDate", e),
|
|
743
|
+
minDate: Me,
|
|
744
|
+
error: r.startDate,
|
|
745
|
+
errorClassName: W,
|
|
746
|
+
disabled: E
|
|
747
|
+
}), /* @__PURE__ */ q(gt, {
|
|
748
|
+
id: "scheduled-task-end-date",
|
|
749
|
+
label: e.endDateLabel,
|
|
750
|
+
placeholder: e.endDatePlaceholder,
|
|
751
|
+
value: t.endDate,
|
|
752
|
+
onChange: (e) => f("endDate", e),
|
|
753
|
+
minDate: Me,
|
|
754
|
+
error: r.endDate,
|
|
755
|
+
errorClassName: W,
|
|
756
|
+
disabled: E
|
|
674
757
|
})]
|
|
675
758
|
})
|
|
676
759
|
] })
|
|
@@ -678,72 +761,68 @@ var W = {
|
|
|
678
761
|
})
|
|
679
762
|
]
|
|
680
763
|
}),
|
|
681
|
-
children: /* @__PURE__ */
|
|
764
|
+
children: /* @__PURE__ */ J("div", {
|
|
682
765
|
role: "group",
|
|
683
|
-
"aria-label":
|
|
684
|
-
className:
|
|
766
|
+
"aria-label": e.configurationSectionTitle,
|
|
767
|
+
className: b("flex flex-1 flex-col gap-5 py-6", Z.formColumn),
|
|
685
768
|
children: [
|
|
686
|
-
/* @__PURE__ */
|
|
769
|
+
/* @__PURE__ */ q("div", {
|
|
687
770
|
className: "flex flex-col gap-1",
|
|
688
|
-
children:
|
|
689
|
-
className:
|
|
690
|
-
children:
|
|
691
|
-
}), /* @__PURE__ */ V("p", {
|
|
692
|
-
className: v(ke, Z.sectionSubtitle),
|
|
693
|
-
children: n.configurationSectionSubtitle
|
|
694
|
-
})]
|
|
695
|
-
}),
|
|
696
|
-
h == null ? u.skillUrls && /* @__PURE__ */ V("div", {
|
|
697
|
-
"aria-live": "polite",
|
|
698
|
-
children: /* @__PURE__ */ V("p", {
|
|
699
|
-
className: v(U, Z.instructionsError),
|
|
700
|
-
children: u.skillUrls
|
|
771
|
+
children: /* @__PURE__ */ q("h2", {
|
|
772
|
+
className: Fe,
|
|
773
|
+
children: e.configurationSectionTitle
|
|
701
774
|
})
|
|
702
|
-
}) : /* @__PURE__ */ V("div", {
|
|
703
|
-
className: "w-full min-w-0 max-w-[996px]",
|
|
704
|
-
children: h
|
|
705
775
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
776
|
+
u == null ? /* @__PURE__ */ q(j, {
|
|
777
|
+
announce: me.Polite,
|
|
778
|
+
className: b(W, Z.instructionsError),
|
|
779
|
+
text: r.skillUrls ?? ""
|
|
780
|
+
}) : /* @__PURE__ */ q("div", {
|
|
781
|
+
className: "w-full max-w-[996px] min-w-0",
|
|
782
|
+
children: u
|
|
783
|
+
}),
|
|
784
|
+
/* @__PURE__ */ q("div", {
|
|
785
|
+
className: "flex w-full max-w-[996px] min-w-0 flex-col",
|
|
786
|
+
children: /* @__PURE__ */ q(v, {
|
|
787
|
+
isEnabled: !!oe,
|
|
788
|
+
fieldId: N,
|
|
789
|
+
labelClassName: Le,
|
|
790
|
+
label: e.instructionsLabel,
|
|
791
|
+
required: ke,
|
|
792
|
+
labels: e,
|
|
793
|
+
refinement: L,
|
|
794
|
+
disabled: E || R,
|
|
795
|
+
...Be,
|
|
796
|
+
children: /* @__PURE__ */ J("div", {
|
|
719
797
|
className: "flex flex-1 flex-col gap-1",
|
|
720
798
|
children: [
|
|
721
|
-
!
|
|
722
|
-
htmlFor:
|
|
723
|
-
className:
|
|
724
|
-
label:
|
|
725
|
-
required:
|
|
799
|
+
!oe && /* @__PURE__ */ q(fe, {
|
|
800
|
+
htmlFor: N,
|
|
801
|
+
className: Le,
|
|
802
|
+
label: e.instructionsLabel,
|
|
803
|
+
required: ke
|
|
726
804
|
}),
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
ref:
|
|
729
|
-
className:
|
|
730
|
-
children: /* @__PURE__ */
|
|
731
|
-
fallback: /* @__PURE__ */
|
|
732
|
-
children: /* @__PURE__ */
|
|
733
|
-
id:
|
|
734
|
-
value:
|
|
805
|
+
/* @__PURE__ */ q("div", {
|
|
806
|
+
ref: De,
|
|
807
|
+
className: b("w-full", p, m),
|
|
808
|
+
children: /* @__PURE__ */ q(Re, {
|
|
809
|
+
fallback: /* @__PURE__ */ q(Se, { ariaLabel: e.editorLoadingAriaLabel ?? "Loading editor" }),
|
|
810
|
+
children: /* @__PURE__ */ q(xt, {
|
|
811
|
+
id: N,
|
|
812
|
+
value: t.prompt,
|
|
735
813
|
onChange: (e) => {
|
|
736
|
-
|
|
814
|
+
L.reset(), f("prompt", e);
|
|
737
815
|
},
|
|
738
816
|
height: 480,
|
|
739
|
-
theme:
|
|
740
|
-
placeholder:
|
|
817
|
+
theme: se,
|
|
818
|
+
placeholder: e.instructionsPlaceholder
|
|
741
819
|
})
|
|
742
820
|
})
|
|
743
821
|
}),
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
822
|
+
r.prompt && /* @__PURE__ */ q(j, {
|
|
823
|
+
id: _e,
|
|
824
|
+
className: b(W, Z.instructionsError),
|
|
825
|
+
text: r.prompt
|
|
747
826
|
})
|
|
748
827
|
]
|
|
749
828
|
})
|
|
@@ -751,278 +830,352 @@ var W = {
|
|
|
751
830
|
})
|
|
752
831
|
]
|
|
753
832
|
})
|
|
754
|
-
}),
|
|
833
|
+
}), V.isConfirmOpen && /* @__PURE__ */ q(d, {
|
|
755
834
|
open: !0,
|
|
756
|
-
title:
|
|
757
|
-
message:
|
|
758
|
-
confirmLabel:
|
|
759
|
-
cancelLabel:
|
|
760
|
-
variant:
|
|
761
|
-
onConfirm:
|
|
762
|
-
onClose:
|
|
835
|
+
title: e.discardTitle ?? "Discard unsaved changes?",
|
|
836
|
+
message: e.discardMessage ?? "You have unsaved changes. Leaving now will discard them.",
|
|
837
|
+
confirmLabel: Ce ? e.discardConfirmMobileLabel ?? "Discard" : e.discardConfirmLabel ?? "Discard changes",
|
|
838
|
+
cancelLabel: e.discardCancelLabel ?? "Keep editing",
|
|
839
|
+
variant: ae.Danger,
|
|
840
|
+
onConfirm: V.confirm,
|
|
841
|
+
onClose: V.dismiss
|
|
763
842
|
})] });
|
|
764
|
-
},
|
|
843
|
+
}, Ct = /* @__PURE__ */ function(e) {
|
|
765
844
|
return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
|
|
766
|
-
}({}),
|
|
845
|
+
}({}), wt = /* @__PURE__ */ function(e) {
|
|
767
846
|
return e.Card = "card", e.Flow = "flow", e;
|
|
768
|
-
}({}),
|
|
847
|
+
}({}), Tt = { subtitleText: "_subtitleText_1i4x2_3" }, Et = {
|
|
848
|
+
...u,
|
|
849
|
+
ul: "dial-small-paragraph-text mb-3 space-y-1",
|
|
850
|
+
ol: "dial-small-paragraph-text mb-3 space-y-1"
|
|
851
|
+
}, Dt = ({ skillLabel: e, skillDisplayNames: t, renderSkillName: n, instructionsLabel: r, instructionsMarkdown: i, renderInstructions: a, markdownLabels: o, fieldLabelClassName: s = "dial-tiny-text" }) => /* @__PURE__ */ J("div", {
|
|
769
852
|
className: "flex min-w-0 flex-col gap-5",
|
|
770
|
-
children: [!!t?.length && /* @__PURE__ */
|
|
853
|
+
children: [!!t?.length && /* @__PURE__ */ J("div", {
|
|
771
854
|
role: "group",
|
|
772
855
|
"aria-label": e,
|
|
773
856
|
className: "flex min-w-0 flex-col gap-1",
|
|
774
|
-
children: [/* @__PURE__ */
|
|
775
|
-
className:
|
|
857
|
+
children: [/* @__PURE__ */ q("span", {
|
|
858
|
+
className: b(s, Tt.subtitleText),
|
|
776
859
|
children: e
|
|
777
|
-
}), /* @__PURE__ */
|
|
778
|
-
className: "whitespace-normal
|
|
779
|
-
children: t?.map((e, t) => /* @__PURE__ */
|
|
860
|
+
}), /* @__PURE__ */ q("p", {
|
|
861
|
+
className: "wrap-anywhere whitespace-normal",
|
|
862
|
+
children: t?.map((e, t) => /* @__PURE__ */ q("span", {
|
|
780
863
|
className: "block",
|
|
781
|
-
children: e
|
|
864
|
+
children: n ? n(e, t) : e
|
|
782
865
|
}, `${t}:${e}`))
|
|
783
866
|
})]
|
|
784
|
-
}),
|
|
867
|
+
}), i && /* @__PURE__ */ J("div", {
|
|
785
868
|
role: "group",
|
|
786
|
-
"aria-label":
|
|
869
|
+
"aria-label": r,
|
|
787
870
|
className: "flex min-w-0 flex-col gap-1",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
789
|
-
className:
|
|
790
|
-
children: n
|
|
791
|
-
}), i ? i(r) : /* @__PURE__ */ V(p, {
|
|
792
|
-
content: r,
|
|
793
|
-
...a
|
|
794
|
-
})]
|
|
795
|
-
})]
|
|
796
|
-
}), rt = { subtitleText: "_subtitleText_1i4x2_3" }, it = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, completedLabel: a, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ H(Me, { children: [
|
|
797
|
-
t && /* @__PURE__ */ H("div", {
|
|
798
|
-
className: "flex flex-col gap-1",
|
|
799
|
-
children: [/* @__PURE__ */ V("span", {
|
|
800
|
-
className: v(o, rt.subtitleText),
|
|
801
|
-
children: e.descriptionLabel
|
|
802
|
-
}), /* @__PURE__ */ V("p", {
|
|
803
|
-
className: s,
|
|
804
|
-
children: t
|
|
805
|
-
})]
|
|
806
|
-
}),
|
|
807
|
-
a && /* @__PURE__ */ H("div", {
|
|
808
|
-
className: "flex flex-col gap-1",
|
|
809
|
-
children: [/* @__PURE__ */ V("span", {
|
|
810
|
-
className: v(o, rt.subtitleText),
|
|
811
|
-
children: e.completedFieldLabel
|
|
812
|
-
}), /* @__PURE__ */ V("p", {
|
|
813
|
-
className: s,
|
|
814
|
-
children: a
|
|
815
|
-
})]
|
|
816
|
-
}),
|
|
817
|
-
n && /* @__PURE__ */ H("div", {
|
|
818
|
-
className: "flex flex-col gap-1",
|
|
819
|
-
children: [/* @__PURE__ */ V("span", {
|
|
820
|
-
className: v(o, rt.subtitleText),
|
|
821
|
-
children: e.modelLabel
|
|
822
|
-
}), /* @__PURE__ */ V("p", {
|
|
823
|
-
className: s,
|
|
824
|
-
children: n
|
|
825
|
-
})]
|
|
826
|
-
}),
|
|
827
|
-
r && /* @__PURE__ */ H("div", {
|
|
828
|
-
className: "flex flex-col gap-1",
|
|
829
|
-
children: [/* @__PURE__ */ V("span", {
|
|
830
|
-
className: v(o, rt.subtitleText),
|
|
831
|
-
children: e.repeatsLabel
|
|
832
|
-
}), /* @__PURE__ */ V("p", {
|
|
833
|
-
className: s,
|
|
871
|
+
children: [/* @__PURE__ */ q("span", {
|
|
872
|
+
className: b(s, Tt.subtitleText),
|
|
834
873
|
children: r
|
|
874
|
+
}), a ? a(i) : /* @__PURE__ */ q(h, {
|
|
875
|
+
content: i,
|
|
876
|
+
classNames: Et,
|
|
877
|
+
...o
|
|
835
878
|
})]
|
|
836
|
-
})
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
879
|
+
})]
|
|
880
|
+
}), Ot = {
|
|
881
|
+
subtitleText: "_subtitleText_1ncri_4",
|
|
882
|
+
description: "_description_1ncri_10"
|
|
883
|
+
}, kt = ({ labels: e, description: t, modelLabel: n, renderModelName: r, repeatsLabel: i, activeWindowLabel: a, completedLabel: o, fieldLabelClassName: s = "dial-tiny-text", fieldValueClassName: c = "dial-small-text" }) => {
|
|
884
|
+
let l = t?.trim();
|
|
885
|
+
return /* @__PURE__ */ J(K, { children: [
|
|
886
|
+
l && /* @__PURE__ */ J("div", {
|
|
887
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
888
|
+
children: [/* @__PURE__ */ q("span", {
|
|
889
|
+
className: b(s, Ot.subtitleText),
|
|
890
|
+
children: e.descriptionLabel
|
|
891
|
+
}), /* @__PURE__ */ q("p", {
|
|
892
|
+
className: b(c, "wrap-anywhere whitespace-pre-wrap", Ot.description),
|
|
893
|
+
children: l
|
|
894
|
+
})]
|
|
895
|
+
}),
|
|
896
|
+
o && /* @__PURE__ */ J("div", {
|
|
897
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
898
|
+
children: [/* @__PURE__ */ q("span", {
|
|
899
|
+
className: b(s, Ot.subtitleText),
|
|
900
|
+
children: e.completedFieldLabel
|
|
901
|
+
}), /* @__PURE__ */ q("p", {
|
|
902
|
+
className: c,
|
|
903
|
+
children: o
|
|
904
|
+
})]
|
|
905
|
+
}),
|
|
906
|
+
n && /* @__PURE__ */ J("div", {
|
|
907
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
908
|
+
children: [/* @__PURE__ */ q("span", {
|
|
909
|
+
className: b(s, Ot.subtitleText),
|
|
910
|
+
children: e.modelLabel
|
|
911
|
+
}), /* @__PURE__ */ q("p", {
|
|
912
|
+
className: c,
|
|
913
|
+
children: r ? r(n) : n
|
|
914
|
+
})]
|
|
915
|
+
}),
|
|
916
|
+
i && /* @__PURE__ */ J("div", {
|
|
917
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
918
|
+
children: [/* @__PURE__ */ q("span", {
|
|
919
|
+
className: b(s, Ot.subtitleText),
|
|
920
|
+
children: e.repeatsLabel
|
|
921
|
+
}), /* @__PURE__ */ q("p", {
|
|
922
|
+
className: c,
|
|
923
|
+
children: i
|
|
924
|
+
})]
|
|
925
|
+
}),
|
|
926
|
+
a && /* @__PURE__ */ J("div", {
|
|
927
|
+
className: "flex min-w-0 flex-col gap-1",
|
|
928
|
+
children: [/* @__PURE__ */ q("span", {
|
|
929
|
+
className: b(s, Ot.subtitleText),
|
|
930
|
+
children: e.activeWindowLabel
|
|
931
|
+
}), /* @__PURE__ */ q("p", {
|
|
932
|
+
className: c,
|
|
933
|
+
children: a
|
|
934
|
+
})]
|
|
935
|
+
})
|
|
936
|
+
] });
|
|
937
|
+
}, At = /* @__PURE__ */ function(e) {
|
|
848
938
|
return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
|
|
849
939
|
}({}), Q = {
|
|
850
|
-
subtitleText: "
|
|
851
|
-
successIcon: "
|
|
852
|
-
errorIcon: "
|
|
853
|
-
missedIcon: "
|
|
854
|
-
currentRun: "
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
940
|
+
subtitleText: "_subtitleText_1sc83_1",
|
|
941
|
+
successIcon: "_successIcon_1sc83_5",
|
|
942
|
+
errorIcon: "_errorIcon_1sc83_9",
|
|
943
|
+
missedIcon: "_missedIcon_1sc83_13",
|
|
944
|
+
currentRun: "_currentRun_1sc83_17",
|
|
945
|
+
expandedRow: "_expandedRow_1sc83_22",
|
|
946
|
+
interactiveRow: "_interactiveRow_1sc83_33",
|
|
947
|
+
unreadDot: "_unreadDot_1sc83_44",
|
|
948
|
+
chevronIcon: "_chevronIcon_1sc83_48",
|
|
949
|
+
errorDetailsText: "_errorDetailsText_1sc83_52"
|
|
950
|
+
}, jt = ({ status: e }) => {
|
|
859
951
|
switch (e) {
|
|
860
|
-
case
|
|
861
|
-
size:
|
|
952
|
+
case At.Success: return /* @__PURE__ */ q(je, {
|
|
953
|
+
size: k.SM,
|
|
862
954
|
className: Q.successIcon,
|
|
863
955
|
"aria-hidden": !0,
|
|
864
|
-
stroke:
|
|
956
|
+
stroke: A
|
|
865
957
|
});
|
|
866
|
-
case
|
|
867
|
-
size:
|
|
958
|
+
case At.Error: return /* @__PURE__ */ q(U, {
|
|
959
|
+
size: k.SM,
|
|
868
960
|
className: Q.errorIcon,
|
|
869
961
|
"aria-hidden": !0,
|
|
870
|
-
stroke:
|
|
962
|
+
stroke: A
|
|
871
963
|
});
|
|
872
|
-
case
|
|
964
|
+
case At.InProgress: return /* @__PURE__ */ q("span", {
|
|
873
965
|
"aria-hidden": !0,
|
|
874
|
-
children: /* @__PURE__ */
|
|
966
|
+
children: /* @__PURE__ */ q(Se, { size: k.SM })
|
|
875
967
|
});
|
|
876
|
-
case
|
|
877
|
-
size:
|
|
968
|
+
case At.Missed: return /* @__PURE__ */ q(De, {
|
|
969
|
+
size: k.SM,
|
|
878
970
|
className: Q.missedIcon,
|
|
879
971
|
"aria-hidden": !0,
|
|
880
|
-
stroke:
|
|
972
|
+
stroke: A
|
|
881
973
|
});
|
|
882
974
|
default: return null;
|
|
883
975
|
}
|
|
884
|
-
},
|
|
885
|
-
let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-text", m = f?.subtitleClassName ?? "dial-body-text",
|
|
976
|
+
}, Mt = ({ 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 }) => {
|
|
977
|
+
let { colors: d, typography: f } = u ?? {}, p = f?.runTimestampClassName ?? "dial-small-paragraph-text", m = f?.runTimestampUnreadClassName ?? "dial-small-paragraph-semi-text", h = f?.subtitleClassName ?? "dial-body-text", g = f?.errorDetailsClassName ?? "dial-tiny-text", _ = c.unreadIndicatorLabel ?? "Unread", v = c.openConversationLabel ?? "Open conversation", x = G(), [S, C] = Ge(() => /* @__PURE__ */ new Set()), w = (e) => {
|
|
978
|
+
C((t) => {
|
|
979
|
+
let n = new Set(t);
|
|
980
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
981
|
+
});
|
|
982
|
+
}, T = y({
|
|
886
983
|
"--strhl-success-icon": d?.successIconColor,
|
|
887
984
|
"--strhl-error-icon": d?.errorIconColor,
|
|
888
985
|
"--strhl-missed-icon": d?.missedIconColor,
|
|
889
986
|
"--strhl-subtitle-text": d?.subtitleTextColor,
|
|
890
987
|
"--strhl-current-run-bg": d?.currentRunBackground,
|
|
988
|
+
"--strhl-current-run-subtitle-text": d?.currentRunSubtitleTextColor,
|
|
891
989
|
"--strhl-unread-dot": d?.unreadDotColor,
|
|
990
|
+
"--strhl-error-details-text": d?.errorDetailsTextColor,
|
|
991
|
+
"--strhl-chevron-icon": d?.chevronIconColor,
|
|
892
992
|
"--strhl-row-hover-bg": u?.rowHoverBackground,
|
|
893
993
|
"--strhl-row-focus-bg": u?.rowFocusBackground,
|
|
894
|
-
"--strhl-row-focus-outline": u?.rowFocusOutline
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
"aria-current": n ? "true" : void 0,
|
|
908
|
-
className: v("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),
|
|
909
|
-
children: [/* @__PURE__ */ H("span", {
|
|
910
|
-
className: "flex items-center gap-2 truncate",
|
|
911
|
-
children: [/* @__PURE__ */ V("span", {
|
|
912
|
-
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
913
|
-
children: e.isUnread && /* @__PURE__ */ V("span", {
|
|
914
|
-
className: v("size-[5.33px] rounded-full", Q.unreadDot),
|
|
915
|
-
"aria-hidden": !0
|
|
916
|
-
})
|
|
917
|
-
}), /* @__PURE__ */ V("span", {
|
|
918
|
-
className: v(p, "truncate"),
|
|
994
|
+
"--strhl-row-focus-outline": u?.rowFocusOutline,
|
|
995
|
+
"--strhl-row-expanded-bg": u?.rowExpandedBackground
|
|
996
|
+
}), E = (e) => {
|
|
997
|
+
let t = c.runStatusLabels[e.status], n = e.id === o, r = e.status === At.Error && e.errorText ? e.errorText : void 0, i = !!r, a = i && S.has(e.id), l = [e.isUnread ? _ : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), u = [[
|
|
998
|
+
t,
|
|
999
|
+
e.timestampLabel,
|
|
1000
|
+
e.durationLabel
|
|
1001
|
+
].filter(Boolean).join(" "), ...l].join(" — "), d = !!e.conversationId && !!s, f = !i && d, h = f || i, y = "-mx-(--strhl-row-bleed,0px)", C = b("flex min-h-(--strhl-row-min-height,32px) items-center justify-between gap-2 rounded-full px-3", n && Q.currentRun, a && Q.expandedRow, h && "w-full cursor-pointer text-start", h && Q.interactiveRow), T = /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("span", {
|
|
1002
|
+
className: "flex min-w-0 items-center gap-1",
|
|
1003
|
+
children: [/* @__PURE__ */ q(jt, { status: e.status }), /* @__PURE__ */ J("span", {
|
|
1004
|
+
className: "flex min-w-0 items-center gap-1",
|
|
1005
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1006
|
+
className: b(e.isUnread ? m : p, "truncate"),
|
|
919
1007
|
children: e.timestampLabel
|
|
1008
|
+
}), e.durationLabel && /* @__PURE__ */ q("span", {
|
|
1009
|
+
className: b(p, Q.subtitleText, "shrink-0"),
|
|
1010
|
+
children: e.durationLabel
|
|
920
1011
|
})]
|
|
921
|
-
}), /* @__PURE__ */ V("span", {
|
|
922
|
-
className: "flex min-h-[var(--strhl-row-min-height,32px)] w-14 shrink-0 items-center justify-end",
|
|
923
|
-
children: /* @__PURE__ */ V(ot, { status: e.status })
|
|
924
1012
|
})]
|
|
1013
|
+
}), /* @__PURE__ */ J("span", {
|
|
1014
|
+
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
1015
|
+
children: [i && /* @__PURE__ */ q(Me, {
|
|
1016
|
+
size: k.SM,
|
|
1017
|
+
stroke: A,
|
|
1018
|
+
"aria-hidden": !0,
|
|
1019
|
+
className: b("shrink-0 transition-transform duration-200 motion-reduce:transition-none", Q.chevronIcon, a && "rotate-180")
|
|
1020
|
+
}), !i && e.isUnread && /* @__PURE__ */ q("span", {
|
|
1021
|
+
className: b("size-[5.33px] rounded-full", Q.unreadDot),
|
|
1022
|
+
"aria-hidden": !0
|
|
1023
|
+
})]
|
|
1024
|
+
})] });
|
|
1025
|
+
if (i) {
|
|
1026
|
+
let t = `${x}-${e.id}-header`, i = `${x}-${e.id}-details`;
|
|
1027
|
+
return /* @__PURE__ */ J("li", {
|
|
1028
|
+
className: b(y, "flex flex-col"),
|
|
1029
|
+
children: [/* @__PURE__ */ q("button", {
|
|
1030
|
+
type: "button",
|
|
1031
|
+
id: t,
|
|
1032
|
+
"aria-label": u,
|
|
1033
|
+
"aria-current": n ? "true" : void 0,
|
|
1034
|
+
"aria-expanded": a,
|
|
1035
|
+
"aria-controls": i,
|
|
1036
|
+
className: C,
|
|
1037
|
+
onClick: () => w(e.id),
|
|
1038
|
+
children: T
|
|
1039
|
+
}), /* @__PURE__ */ q("div", {
|
|
1040
|
+
inert: !a,
|
|
1041
|
+
className: b("grid transition-[grid-template-rows] duration-200 ease-out motion-reduce:transition-none", a ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
1042
|
+
children: /* @__PURE__ */ q("div", {
|
|
1043
|
+
className: "min-h-0 overflow-hidden",
|
|
1044
|
+
children: /* @__PURE__ */ J("div", {
|
|
1045
|
+
id: i,
|
|
1046
|
+
role: "region",
|
|
1047
|
+
"aria-labelledby": t,
|
|
1048
|
+
className: "flex min-w-0 flex-col items-start gap-1 ps-8 pe-3 pt-1 pb-2",
|
|
1049
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1050
|
+
className: b(g, Q.errorDetailsText, "max-w-full wrap-break-word whitespace-pre-wrap"),
|
|
1051
|
+
children: r
|
|
1052
|
+
}), d && /* @__PURE__ */ q(pe, {
|
|
1053
|
+
label: v,
|
|
1054
|
+
onClick: () => s?.(e)
|
|
1055
|
+
})]
|
|
1056
|
+
})
|
|
1057
|
+
})
|
|
1058
|
+
})]
|
|
1059
|
+
}, e.id);
|
|
1060
|
+
}
|
|
1061
|
+
return f ? /* @__PURE__ */ q("li", { children: /* @__PURE__ */ q("button", {
|
|
1062
|
+
type: "button",
|
|
1063
|
+
"aria-label": u,
|
|
1064
|
+
"aria-current": n ? "true" : void 0,
|
|
1065
|
+
className: b(y, C),
|
|
1066
|
+
onClick: () => s?.(e),
|
|
1067
|
+
children: T
|
|
1068
|
+
}) }, e.id) : /* @__PURE__ */ q("li", {
|
|
1069
|
+
"aria-label": u,
|
|
1070
|
+
"aria-current": n ? "true" : void 0,
|
|
1071
|
+
className: b(y, C),
|
|
1072
|
+
children: T
|
|
925
1073
|
}, e.id);
|
|
926
|
-
},
|
|
1074
|
+
}, D = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ J("li", {
|
|
927
1075
|
"aria-hidden": "true",
|
|
928
|
-
className:
|
|
929
|
-
children: [/* @__PURE__ */
|
|
930
|
-
variant:
|
|
1076
|
+
className: "-mx-(--strhl-row-bleed,0px) flex min-h-(--strhl-row-min-height,32px) items-center justify-between gap-2 px-3",
|
|
1077
|
+
children: [/* @__PURE__ */ q(B, {
|
|
1078
|
+
variant: V.Rectangular,
|
|
931
1079
|
width: "160px",
|
|
932
1080
|
height: "16px"
|
|
933
|
-
}), /* @__PURE__ */
|
|
934
|
-
variant:
|
|
1081
|
+
}), /* @__PURE__ */ q(B, {
|
|
1082
|
+
variant: V.Rectangular,
|
|
935
1083
|
width: "16px",
|
|
936
1084
|
height: "16px",
|
|
937
1085
|
className: "shrink-0 rounded-full"
|
|
938
1086
|
})]
|
|
939
|
-
}, `history-skeleton-${t}`))
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
1087
|
+
}, `history-skeleton-${t}`)), ee = {
|
|
1088
|
+
...T,
|
|
1089
|
+
"--strhl-row-min-height": u?.rowMinHeight
|
|
1090
|
+
}, te = !t && i != null && e.length === 0, ne;
|
|
1091
|
+
return ne = t && e.length === 0 ? /* @__PURE__ */ q("ul", {
|
|
1092
|
+
style: ee,
|
|
945
1093
|
"aria-label": c.historyTitle,
|
|
946
1094
|
className: "flex flex-col gap-0.5",
|
|
947
|
-
children:
|
|
948
|
-
}) :
|
|
949
|
-
style:
|
|
1095
|
+
children: D(r)
|
|
1096
|
+
}) : te ? /* @__PURE__ */ J("div", {
|
|
1097
|
+
style: T,
|
|
950
1098
|
className: "flex flex-col items-start gap-3",
|
|
951
|
-
children: [/* @__PURE__ */
|
|
952
|
-
|
|
953
|
-
className:
|
|
1099
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1100
|
+
"aria-hidden": !0,
|
|
1101
|
+
className: b(h, Q.subtitleText),
|
|
954
1102
|
children: c.errorLabel
|
|
955
|
-
}), /* @__PURE__ */
|
|
1103
|
+
}), /* @__PURE__ */ q(M, {
|
|
956
1104
|
label: c.retryLabel,
|
|
957
1105
|
onClick: a
|
|
958
1106
|
})]
|
|
959
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
960
|
-
style:
|
|
961
|
-
className: "
|
|
962
|
-
children:
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
className: p,
|
|
970
|
-
children: c.emptyLabel
|
|
971
|
-
})]
|
|
972
|
-
}) : /* @__PURE__ */ H("ul", {
|
|
973
|
-
style: {
|
|
974
|
-
...g,
|
|
975
|
-
"--strhl-row-min-height": u?.rowMinHeight
|
|
976
|
-
},
|
|
1107
|
+
}) : e.length === 0 ? /* @__PURE__ */ q("div", {
|
|
1108
|
+
style: T,
|
|
1109
|
+
className: "w-full py-4",
|
|
1110
|
+
children: /* @__PURE__ */ q(_e, {
|
|
1111
|
+
title: c.emptyLabel,
|
|
1112
|
+
description: c.emptyDescription,
|
|
1113
|
+
live: !0
|
|
1114
|
+
})
|
|
1115
|
+
}) : /* @__PURE__ */ J("ul", {
|
|
1116
|
+
style: ee,
|
|
977
1117
|
"aria-label": c.historyTitle,
|
|
978
1118
|
className: "flex flex-col gap-0.5",
|
|
979
1119
|
children: [
|
|
980
|
-
e.map(
|
|
981
|
-
n &&
|
|
982
|
-
i ? /* @__PURE__ */
|
|
1120
|
+
e.map(E),
|
|
1121
|
+
n && D(r),
|
|
1122
|
+
i ? /* @__PURE__ */ J("li", {
|
|
983
1123
|
className: "flex flex-col items-start gap-3 px-5 py-2",
|
|
984
|
-
children: [/* @__PURE__ */
|
|
985
|
-
|
|
986
|
-
className: v(m, Q.subtitleText),
|
|
1124
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1125
|
+
className: b(h, Q.subtitleText),
|
|
987
1126
|
children: c.errorLabel
|
|
988
|
-
}), /* @__PURE__ */
|
|
1127
|
+
}), /* @__PURE__ */ q(M, {
|
|
989
1128
|
label: c.retryLabel,
|
|
990
1129
|
onClick: a
|
|
991
1130
|
})]
|
|
992
1131
|
}) : l
|
|
993
1132
|
]
|
|
994
|
-
})
|
|
995
|
-
|
|
1133
|
+
}), /* @__PURE__ */ J(K, { children: [
|
|
1134
|
+
ne,
|
|
1135
|
+
/* @__PURE__ */ q(P, {
|
|
1136
|
+
visuallyHidden: !0,
|
|
1137
|
+
as: F.Span,
|
|
1138
|
+
children: te ? c.errorLabel : ""
|
|
1139
|
+
}),
|
|
1140
|
+
/* @__PURE__ */ q(P, {
|
|
1141
|
+
politeness: me.Assertive,
|
|
1142
|
+
visuallyHidden: !0,
|
|
1143
|
+
as: F.Span,
|
|
1144
|
+
children: i && e.length > 0 ? c.errorLabel : ""
|
|
1145
|
+
})
|
|
1146
|
+
] });
|
|
1147
|
+
}, Nt = {
|
|
996
1148
|
historyCard: "_historyCard_153p9_4",
|
|
997
1149
|
subtitleText: "_subtitleText_153p9_8",
|
|
998
1150
|
cardLayout: "_cardLayout_153p9_13"
|
|
999
|
-
},
|
|
1000
|
-
let
|
|
1001
|
-
className:
|
|
1002
|
-
children: [/* @__PURE__ */
|
|
1003
|
-
role: "alert",
|
|
1004
|
-
children: t.historyLoadMoreErrorLabel ?? t.historyErrorLabel
|
|
1005
|
-
}), u && /* @__PURE__ */ V(k, {
|
|
1151
|
+
}, Pt = ({ 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", runTimestampUnreadClassName: h = "dial-small-semi-text", errorDetailsClassName: g = "dial-tiny-text", sectionTitleClassName: _ = "dial-body-semi-text", colors: v, styles: y }) => {
|
|
1152
|
+
let x = e === wt.Card, S = x ? b("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", Nt.historyCard) : "pt-2", C = t.historyLoadMoreErrorLabel ?? t.historyErrorLabel, w = l ? /* @__PURE__ */ J("li", {
|
|
1153
|
+
className: S,
|
|
1154
|
+
children: [/* @__PURE__ */ q("p", { children: C }), u && /* @__PURE__ */ q(M, {
|
|
1006
1155
|
label: t.historyRetryLabel,
|
|
1007
1156
|
onClick: u,
|
|
1008
1157
|
disabled: a
|
|
1009
1158
|
})]
|
|
1010
|
-
}) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */
|
|
1011
|
-
className:
|
|
1012
|
-
children: /* @__PURE__ */
|
|
1159
|
+
}) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ q("li", {
|
|
1160
|
+
className: S,
|
|
1161
|
+
children: /* @__PURE__ */ q(M, {
|
|
1013
1162
|
label: t.historyShowMoreLabel,
|
|
1014
1163
|
onClick: f,
|
|
1015
1164
|
disabled: a
|
|
1016
1165
|
})
|
|
1017
|
-
}) : void 0,
|
|
1018
|
-
className:
|
|
1166
|
+
}) : void 0, T = n ? /* @__PURE__ */ q("p", {
|
|
1167
|
+
className: b(m, Nt.subtitleText),
|
|
1019
1168
|
children: n
|
|
1020
|
-
}) : void 0,
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1169
|
+
}) : void 0, E = /* @__PURE__ */ q(P, {
|
|
1170
|
+
politeness: me.Assertive,
|
|
1171
|
+
visuallyHidden: !0,
|
|
1172
|
+
as: F.Span,
|
|
1173
|
+
children: l ? C : ""
|
|
1174
|
+
}), D = t.historyLoadingMoreLabel ? /* @__PURE__ */ q(P, {
|
|
1175
|
+
visuallyHidden: !0,
|
|
1176
|
+
as: F.Span,
|
|
1024
1177
|
children: a ? t.historyLoadingMoreLabel : ""
|
|
1025
|
-
}) : void 0,
|
|
1178
|
+
}) : void 0, ee = /* @__PURE__ */ q(Mt, {
|
|
1026
1179
|
items: r,
|
|
1027
1180
|
isLoading: i,
|
|
1028
1181
|
isLoadingMore: a,
|
|
@@ -1033,44 +1186,54 @@ var W = {
|
|
|
1033
1186
|
labels: {
|
|
1034
1187
|
historyTitle: t.historyTitle,
|
|
1035
1188
|
emptyLabel: t.historyEmptyLabel,
|
|
1189
|
+
emptyDescription: t.historyEmptyDescription,
|
|
1036
1190
|
errorLabel: t.historyErrorLabel,
|
|
1037
1191
|
retryLabel: t.historyRetryLabel,
|
|
1038
1192
|
runStatusLabels: t.runStatusLabels,
|
|
1039
|
-
unreadIndicatorLabel: t.unreadIndicatorLabel
|
|
1193
|
+
unreadIndicatorLabel: t.unreadIndicatorLabel,
|
|
1194
|
+
openConversationLabel: t.openConversationLabel
|
|
1040
1195
|
},
|
|
1041
|
-
footer:
|
|
1196
|
+
footer: w,
|
|
1042
1197
|
styles: {
|
|
1043
|
-
typography: {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1198
|
+
typography: {
|
|
1199
|
+
runTimestampClassName: m,
|
|
1200
|
+
runTimestampUnreadClassName: h,
|
|
1201
|
+
errorDetailsClassName: g
|
|
1202
|
+
},
|
|
1203
|
+
colors: y?.colors ?? v,
|
|
1204
|
+
rowMinHeight: y?.rowMinHeight,
|
|
1205
|
+
rowHoverBackground: y?.rowHoverBackground,
|
|
1206
|
+
rowFocusBackground: y?.rowFocusBackground,
|
|
1207
|
+
rowFocusOutline: y?.rowFocusOutline,
|
|
1208
|
+
rowExpandedBackground: y?.rowExpandedBackground
|
|
1049
1209
|
}
|
|
1050
1210
|
});
|
|
1051
|
-
return
|
|
1052
|
-
className:
|
|
1053
|
-
style: { "--st-history-max-height":
|
|
1054
|
-
children: [/* @__PURE__ */
|
|
1055
|
-
className:
|
|
1211
|
+
return x ? /* @__PURE__ */ J("div", {
|
|
1212
|
+
className: b("flex max-h-(--st-history-max-height,70vh) w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", Nt.historyCard, Nt.cardLayout),
|
|
1213
|
+
style: { "--st-history-max-height": y?.maxHeight },
|
|
1214
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1215
|
+
className: b("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pt-5 pb-2", Nt.historyCard),
|
|
1056
1216
|
children: [
|
|
1057
|
-
/* @__PURE__ */
|
|
1058
|
-
className:
|
|
1217
|
+
/* @__PURE__ */ q("h2", {
|
|
1218
|
+
className: _,
|
|
1059
1219
|
children: t.historyTitle
|
|
1060
1220
|
}),
|
|
1061
|
-
|
|
1062
|
-
|
|
1221
|
+
T,
|
|
1222
|
+
D,
|
|
1223
|
+
E
|
|
1063
1224
|
]
|
|
1064
|
-
}), /* @__PURE__ */
|
|
1225
|
+
}), /* @__PURE__ */ q("div", {
|
|
1065
1226
|
className: "flex flex-1 flex-col gap-4 px-6 pb-2",
|
|
1066
|
-
|
|
1227
|
+
style: { "--strhl-row-bleed": "12px" },
|
|
1228
|
+
children: ee
|
|
1067
1229
|
})]
|
|
1068
|
-
}) : /* @__PURE__ */
|
|
1230
|
+
}) : /* @__PURE__ */ J("div", {
|
|
1069
1231
|
className: "flex flex-col gap-4",
|
|
1070
1232
|
children: [
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1233
|
+
T,
|
|
1234
|
+
D,
|
|
1235
|
+
E,
|
|
1236
|
+
ee
|
|
1074
1237
|
]
|
|
1075
1238
|
});
|
|
1076
1239
|
}, $ = {
|
|
@@ -1086,27 +1249,28 @@ var W = {
|
|
|
1086
1249
|
actionButton: "_actionButton_hdn5b_75",
|
|
1087
1250
|
roundActionButton: "_roundActionButton_hdn5b_82",
|
|
1088
1251
|
stickyTabs: "_stickyTabs_hdn5b_88"
|
|
1089
|
-
},
|
|
1090
|
-
let { colors:
|
|
1091
|
-
"--stdv-bg":
|
|
1092
|
-
"--stdv-header-border":
|
|
1093
|
-
"--stdv-details-border":
|
|
1094
|
-
"--stdv-subtitle-text":
|
|
1095
|
-
"--stdv-
|
|
1096
|
-
|
|
1252
|
+
}, Ft = "min-w-0 max-w-[600px]", It = ({ labels: e, onBack: t, onEdit: n, onStartNow: r, isStarting: i = !1, isStartNowDisabled: a = !1, isStartNowBusy: o = !1, onDelete: s, isDeleting: c = !1, isDeleted: l = !1, isCompleted: u = !1, isActive: d, isActiveUpdating: f = !1, isActiveDisabled: p = !1, activeDisabledReason: m, onActiveChange: h, displayName: g, isLoading: _ = !1, error: v, onRetry: x, description: S, modelLabel: w, renderModelName: T, repeatsLabel: E, activeWindowLabel: D, completedLabel: ee, nextRunLabel: te, instructionsMarkdown: re, skillDisplayNames: O, renderSkillName: ie, renderInstructions: ae, runs: oe, runsIsLoading: ce = !1, runsIsLoadingMore: j = !1, runsSkeletonCount: le = 6, runsError: N, onRunsRetry: de, runsLoadMoreError: fe, onRunsRetryLoadMore: pe, runsHasMore: me = !1, onRunsLoadMore: he, onRunClick: _e, styles: I, className: ve, backIcon: ye, layout: L, historyStyles: be }) => {
|
|
1253
|
+
let { colors: R, typography: z } = I ?? {}, xe = z?.titleClassName ?? "dial-h2-text", B = z?.sectionTitleClassName ?? "dial-body-semi-text", V = z?.fieldLabelClassName ?? "dial-tiny-text", Te = z?.fieldValueClassName ?? "dial-small-text", Ee = z?.runTimestampClassName ?? "dial-small-text", De = y({
|
|
1254
|
+
"--stdv-bg": R?.background,
|
|
1255
|
+
"--stdv-header-border": R?.headerBorder,
|
|
1256
|
+
"--stdv-details-border": R?.detailsColumnBorder,
|
|
1257
|
+
"--stdv-subtitle-text": R?.subtitleText,
|
|
1258
|
+
"--stdv-description-text": R?.descriptionText,
|
|
1259
|
+
"--stdv-history-bg": R?.historyCardBackground
|
|
1260
|
+
}), ke = C(), [Ae, je] = Ge(Ct.Details), Me = G(), H = o && !i ? e.startNowBusyLabel : void 0, U = [
|
|
1097
1261
|
{
|
|
1098
|
-
id:
|
|
1262
|
+
id: Ct.Details,
|
|
1099
1263
|
label: e.detailsTitle
|
|
1100
1264
|
},
|
|
1101
1265
|
{
|
|
1102
|
-
id:
|
|
1266
|
+
id: Ct.Configuration,
|
|
1103
1267
|
label: e.configurationTitle
|
|
1104
1268
|
},
|
|
1105
1269
|
{
|
|
1106
|
-
id:
|
|
1270
|
+
id: Ct.History,
|
|
1107
1271
|
label: e.historyTitle
|
|
1108
1272
|
}
|
|
1109
|
-
],
|
|
1273
|
+
], Pe = U.find((e) => e.id === Ae)?.label ?? e.detailsTitle, Ie = /* @__PURE__ */ q(kt, {
|
|
1110
1274
|
labels: {
|
|
1111
1275
|
descriptionLabel: e.descriptionLabel,
|
|
1112
1276
|
modelLabel: e.modelLabel,
|
|
@@ -1114,19 +1278,21 @@ var W = {
|
|
|
1114
1278
|
activeWindowLabel: e.activeWindowLabel,
|
|
1115
1279
|
completedFieldLabel: e.completedFieldLabel
|
|
1116
1280
|
},
|
|
1117
|
-
description:
|
|
1118
|
-
modelLabel:
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1281
|
+
description: S,
|
|
1282
|
+
modelLabel: w,
|
|
1283
|
+
renderModelName: T,
|
|
1284
|
+
repeatsLabel: E,
|
|
1285
|
+
activeWindowLabel: D,
|
|
1286
|
+
completedLabel: ee,
|
|
1287
|
+
fieldLabelClassName: V,
|
|
1288
|
+
fieldValueClassName: Te
|
|
1289
|
+
}), Re = /* @__PURE__ */ q(Dt, {
|
|
1125
1290
|
instructionsLabel: e.instructionsLabel,
|
|
1126
1291
|
skillLabel: e.skillLabel,
|
|
1127
|
-
skillDisplayNames:
|
|
1292
|
+
skillDisplayNames: O,
|
|
1293
|
+
renderSkillName: ie,
|
|
1128
1294
|
instructionsMarkdown: re,
|
|
1129
|
-
renderInstructions:
|
|
1295
|
+
renderInstructions: ae,
|
|
1130
1296
|
markdownLabels: {
|
|
1131
1297
|
codeBlockCopyLabel: e.codeBlockCopyLabel,
|
|
1132
1298
|
codeBlockCopiedLabel: e.codeBlockCopiedLabel,
|
|
@@ -1134,281 +1300,521 @@ var W = {
|
|
|
1134
1300
|
tableScrollRegionAriaLabel: e.tableScrollRegionAriaLabel,
|
|
1135
1301
|
mathScrollRegionAriaLabel: e.mathScrollRegionAriaLabel
|
|
1136
1302
|
},
|
|
1137
|
-
fieldLabelClassName:
|
|
1138
|
-
}),
|
|
1303
|
+
fieldLabelClassName: V
|
|
1304
|
+
}), W = (t) => /* @__PURE__ */ q(Pt, {
|
|
1139
1305
|
variant: t,
|
|
1140
1306
|
labels: {
|
|
1141
1307
|
historyTitle: e.historyTitle,
|
|
1142
1308
|
historyEmptyLabel: e.historyEmptyLabel,
|
|
1309
|
+
historyEmptyDescription: e.historyEmptyDescription,
|
|
1143
1310
|
historyErrorLabel: e.historyErrorLabel,
|
|
1144
1311
|
historyLoadMoreErrorLabel: e.historyLoadMoreErrorLabel,
|
|
1145
1312
|
historyRetryLabel: e.historyRetryLabel,
|
|
1146
1313
|
historyLoadingMoreLabel: e.historyLoadingMoreLabel,
|
|
1147
1314
|
historyShowMoreLabel: e.historyShowMoreLabel,
|
|
1148
1315
|
runStatusLabels: e.runStatusLabels,
|
|
1149
|
-
unreadIndicatorLabel: e.unreadIndicatorLabel
|
|
1316
|
+
unreadIndicatorLabel: e.unreadIndicatorLabel,
|
|
1317
|
+
openConversationLabel: e.openConversationLabel
|
|
1150
1318
|
},
|
|
1151
|
-
nextRunLabel:
|
|
1152
|
-
items:
|
|
1319
|
+
nextRunLabel: te,
|
|
1320
|
+
items: oe,
|
|
1153
1321
|
isLoading: ce,
|
|
1154
|
-
isLoadingMore:
|
|
1155
|
-
skeletonCount:
|
|
1156
|
-
error:
|
|
1157
|
-
onRetry:
|
|
1158
|
-
loadMoreError:
|
|
1159
|
-
onRetryLoadMore:
|
|
1160
|
-
hasMore:
|
|
1161
|
-
onLoadMore:
|
|
1162
|
-
onRunClick:
|
|
1163
|
-
runTimestampClassName:
|
|
1164
|
-
sectionTitleClassName:
|
|
1165
|
-
colors:
|
|
1166
|
-
styles:
|
|
1322
|
+
isLoadingMore: j,
|
|
1323
|
+
skeletonCount: le,
|
|
1324
|
+
error: N,
|
|
1325
|
+
onRetry: de,
|
|
1326
|
+
loadMoreError: fe,
|
|
1327
|
+
onRetryLoadMore: pe,
|
|
1328
|
+
hasMore: me,
|
|
1329
|
+
onLoadMore: he,
|
|
1330
|
+
onRunClick: _e,
|
|
1331
|
+
runTimestampClassName: Ee,
|
|
1332
|
+
sectionTitleClassName: B,
|
|
1333
|
+
colors: R,
|
|
1334
|
+
styles: be
|
|
1167
1335
|
});
|
|
1168
|
-
return /* @__PURE__ */
|
|
1169
|
-
style:
|
|
1170
|
-
className:
|
|
1336
|
+
return /* @__PURE__ */ J("div", {
|
|
1337
|
+
style: De,
|
|
1338
|
+
className: b("flex h-full min-h-0 w-full flex-col overflow-hidden", $.container, ve),
|
|
1171
1339
|
children: [
|
|
1172
|
-
/* @__PURE__ */
|
|
1173
|
-
className:
|
|
1174
|
-
children: [/* @__PURE__ */
|
|
1340
|
+
/* @__PURE__ */ J("div", {
|
|
1341
|
+
className: b("flex min-h-16 shrink-0 items-start justify-between gap-2 px-4 py-2 desktop:h-16 desktop:flex-nowrap desktop:items-center desktop:px-8 desktop:py-0", $.header),
|
|
1342
|
+
children: [/* @__PURE__ */ J("div", {
|
|
1175
1343
|
className: "flex min-w-0 items-center gap-2",
|
|
1176
1344
|
children: [
|
|
1177
|
-
/* @__PURE__ */
|
|
1178
|
-
icon:
|
|
1179
|
-
size:
|
|
1345
|
+
/* @__PURE__ */ q(ue, {
|
|
1346
|
+
icon: ye === void 0 ? /* @__PURE__ */ q(Oe, {
|
|
1347
|
+
size: k.LG,
|
|
1180
1348
|
className: "rtl:scale-x-[-1]",
|
|
1181
1349
|
"aria-hidden": !0,
|
|
1182
|
-
stroke:
|
|
1183
|
-
}) :
|
|
1350
|
+
stroke: A
|
|
1351
|
+
}) : ye,
|
|
1184
1352
|
"aria-label": e.backAriaLabel,
|
|
1185
1353
|
onClick: t
|
|
1186
1354
|
}),
|
|
1187
|
-
/* @__PURE__ */
|
|
1188
|
-
className:
|
|
1189
|
-
children:
|
|
1355
|
+
/* @__PURE__ */ q("h1", {
|
|
1356
|
+
className: b(Ft, $.desktopTitle),
|
|
1357
|
+
children: /* @__PURE__ */ q(se, {
|
|
1358
|
+
text: g,
|
|
1359
|
+
className: xe
|
|
1360
|
+
})
|
|
1190
1361
|
}),
|
|
1191
|
-
l && /* @__PURE__ */
|
|
1192
|
-
className:
|
|
1362
|
+
l && /* @__PURE__ */ q("span", {
|
|
1363
|
+
className: b("shrink-0", $.desktopBadge, Te, $.subtitleText),
|
|
1193
1364
|
children: e.deletedStateLabel
|
|
1194
1365
|
})
|
|
1195
1366
|
]
|
|
1196
|
-
}), /* @__PURE__ */
|
|
1197
|
-
className:
|
|
1367
|
+
}), /* @__PURE__ */ J("div", {
|
|
1368
|
+
className: b("flex min-w-0 flex-1 flex-wrap items-center justify-end gap-2 desktop:flex-none desktop:flex-nowrap", $.headerActions),
|
|
1198
1369
|
children: [
|
|
1199
|
-
!l && !u && d !== void 0 && /* @__PURE__ */
|
|
1370
|
+
!l && !u && d !== void 0 && /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ q(Ce, {
|
|
1200
1371
|
id: "scheduled-task-active-switch",
|
|
1201
1372
|
labelProps: { label: e.activeStatusLabel },
|
|
1202
1373
|
isOn: d,
|
|
1203
1374
|
disabled: f || p || c,
|
|
1204
1375
|
onChange: (e) => h?.(e)
|
|
1205
|
-
}), p && m && /* @__PURE__ */
|
|
1206
|
-
className:
|
|
1376
|
+
}), p && m && /* @__PURE__ */ q("span", {
|
|
1377
|
+
className: b(Te, $.subtitleText),
|
|
1207
1378
|
children: m
|
|
1208
1379
|
})] }),
|
|
1209
|
-
!l && s && /* @__PURE__ */
|
|
1380
|
+
!l && s && /* @__PURE__ */ q(M, {
|
|
1210
1381
|
variant: ne.Danger,
|
|
1211
1382
|
label: e.deleteButtonLabel,
|
|
1212
|
-
iconBefore: /* @__PURE__ */
|
|
1213
|
-
size:
|
|
1383
|
+
iconBefore: /* @__PURE__ */ q(Le, {
|
|
1384
|
+
size: k.SM,
|
|
1214
1385
|
"aria-hidden": !0,
|
|
1215
|
-
stroke:
|
|
1386
|
+
stroke: A
|
|
1216
1387
|
}),
|
|
1217
1388
|
onClick: s,
|
|
1218
1389
|
disabled: c,
|
|
1219
1390
|
textClassName: $.actionLabel,
|
|
1220
|
-
className:
|
|
1391
|
+
className: b("min-h-11 shrink-0", $.actionButton)
|
|
1221
1392
|
}),
|
|
1222
|
-
!l && n && /* @__PURE__ */
|
|
1393
|
+
!l && n && /* @__PURE__ */ q(ge, {
|
|
1223
1394
|
label: e.editButtonLabel,
|
|
1224
|
-
iconBefore: /* @__PURE__ */
|
|
1225
|
-
size:
|
|
1395
|
+
iconBefore: /* @__PURE__ */ q(Ne, {
|
|
1396
|
+
size: k.SM,
|
|
1226
1397
|
"aria-hidden": !0,
|
|
1227
|
-
stroke:
|
|
1398
|
+
stroke: A
|
|
1228
1399
|
}),
|
|
1229
1400
|
onClick: n,
|
|
1230
1401
|
disabled: c,
|
|
1231
1402
|
textClassName: $.actionLabel,
|
|
1232
|
-
className:
|
|
1403
|
+
className: b("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
|
|
1233
1404
|
}),
|
|
1234
|
-
!l && r && e.startNowButtonLabel && /* @__PURE__ */
|
|
1405
|
+
!l && r && e.startNowButtonLabel && /* @__PURE__ */ J("div", {
|
|
1235
1406
|
"aria-busy": i,
|
|
1236
|
-
children: [
|
|
1237
|
-
id:
|
|
1407
|
+
children: [H && /* @__PURE__ */ q("span", {
|
|
1408
|
+
id: Me,
|
|
1238
1409
|
className: "sr-only",
|
|
1239
|
-
children:
|
|
1240
|
-
}), /* @__PURE__ */
|
|
1410
|
+
children: H
|
|
1411
|
+
}), /* @__PURE__ */ q(ge, {
|
|
1241
1412
|
label: i ? e.startingLabel ?? e.startNowButtonLabel : e.startNowButtonLabel,
|
|
1242
|
-
iconBefore: /* @__PURE__ */
|
|
1243
|
-
size:
|
|
1413
|
+
iconBefore: /* @__PURE__ */ q(Fe, {
|
|
1414
|
+
size: k.SM,
|
|
1244
1415
|
"aria-hidden": !0,
|
|
1245
|
-
stroke:
|
|
1416
|
+
stroke: A
|
|
1246
1417
|
}),
|
|
1247
1418
|
onClick: r,
|
|
1248
1419
|
disabled: c || i || a || o,
|
|
1249
|
-
"aria-describedby":
|
|
1250
|
-
tooltipProps:
|
|
1420
|
+
"aria-describedby": H ? Me : void 0,
|
|
1421
|
+
tooltipProps: H ? { tooltip: H } : void 0,
|
|
1251
1422
|
textClassName: $.actionLabel,
|
|
1252
|
-
className:
|
|
1423
|
+
className: b("min-h-11 shrink-0", $.actionButton, $.roundActionButton)
|
|
1253
1424
|
})]
|
|
1254
1425
|
})
|
|
1255
1426
|
]
|
|
1256
1427
|
})]
|
|
1257
1428
|
}),
|
|
1258
|
-
/* @__PURE__ */
|
|
1259
|
-
className:
|
|
1260
|
-
children: [/* @__PURE__ */
|
|
1261
|
-
className:
|
|
1262
|
-
children:
|
|
1263
|
-
|
|
1264
|
-
|
|
1429
|
+
/* @__PURE__ */ J("div", {
|
|
1430
|
+
className: b("min-w-0 items-center gap-2 px-4 py-3", $.mobileTitleRow),
|
|
1431
|
+
children: [/* @__PURE__ */ q("h1", {
|
|
1432
|
+
className: Ft,
|
|
1433
|
+
children: /* @__PURE__ */ q(se, {
|
|
1434
|
+
text: g,
|
|
1435
|
+
className: xe
|
|
1436
|
+
})
|
|
1437
|
+
}), l && /* @__PURE__ */ q("span", {
|
|
1438
|
+
className: b("shrink-0", Te, $.subtitleText),
|
|
1265
1439
|
children: e.deletedStateLabel
|
|
1266
1440
|
})]
|
|
1267
1441
|
}),
|
|
1268
|
-
e.activeStatusAnnouncement != null && /* @__PURE__ */
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
className: "sr-only",
|
|
1442
|
+
e.activeStatusAnnouncement != null && /* @__PURE__ */ q(P, {
|
|
1443
|
+
visuallyHidden: !0,
|
|
1444
|
+
as: F.Span,
|
|
1272
1445
|
children: e.activeStatusAnnouncement
|
|
1273
1446
|
}),
|
|
1274
|
-
e.startStatusAnnouncement != null && /* @__PURE__ */
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
className: "sr-only",
|
|
1447
|
+
e.startStatusAnnouncement != null && /* @__PURE__ */ q(P, {
|
|
1448
|
+
visuallyHidden: !0,
|
|
1449
|
+
as: F.Span,
|
|
1278
1450
|
children: e.startStatusAnnouncement
|
|
1279
1451
|
}),
|
|
1280
|
-
|
|
1452
|
+
_ && /* @__PURE__ */ q("div", {
|
|
1281
1453
|
className: "flex flex-1 items-center justify-center",
|
|
1282
|
-
children: /* @__PURE__ */
|
|
1454
|
+
children: /* @__PURE__ */ q(Se, { ariaLabel: e.loadingAriaLabel ?? "Loading scheduled task" })
|
|
1283
1455
|
}),
|
|
1284
|
-
!
|
|
1456
|
+
!_ && v && /* @__PURE__ */ J("div", {
|
|
1285
1457
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
1286
|
-
children: [/* @__PURE__ */
|
|
1287
|
-
className:
|
|
1458
|
+
children: [/* @__PURE__ */ q("p", {
|
|
1459
|
+
className: b(Te, $.subtitleText),
|
|
1288
1460
|
children: e.errorLabel
|
|
1289
|
-
}), /* @__PURE__ */
|
|
1461
|
+
}), /* @__PURE__ */ q(M, {
|
|
1290
1462
|
label: e.retryLabel,
|
|
1291
|
-
onClick:
|
|
1463
|
+
onClick: x
|
|
1292
1464
|
})]
|
|
1293
1465
|
}),
|
|
1294
|
-
!
|
|
1466
|
+
!_ && !v && (ke ? /* @__PURE__ */ J("div", {
|
|
1295
1467
|
className: "flex min-h-0 flex-1 flex-col overflow-y-auto",
|
|
1296
|
-
children: [/* @__PURE__ */
|
|
1297
|
-
className:
|
|
1298
|
-
children: /* @__PURE__ */
|
|
1468
|
+
children: [/* @__PURE__ */ q("div", {
|
|
1469
|
+
className: b("sticky top-0 z-10", $.stickyTabs),
|
|
1470
|
+
children: /* @__PURE__ */ q(we, {
|
|
1299
1471
|
ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
|
|
1300
1472
|
className: "px-4",
|
|
1301
|
-
tabs:
|
|
1302
|
-
activeTabId:
|
|
1303
|
-
onTabChange:
|
|
1473
|
+
tabs: U,
|
|
1474
|
+
activeTabId: Ae,
|
|
1475
|
+
onTabChange: je
|
|
1304
1476
|
})
|
|
1305
|
-
}), /* @__PURE__ */
|
|
1477
|
+
}), /* @__PURE__ */ q("div", {
|
|
1306
1478
|
role: "tabpanel",
|
|
1307
|
-
"aria-label":
|
|
1479
|
+
"aria-label": Pe,
|
|
1308
1480
|
className: "flex flex-1 flex-col gap-5 px-4 py-6",
|
|
1309
|
-
children:
|
|
1481
|
+
children: Ae === Ct.Configuration ? Re : Ae === Ct.History ? W(wt.Flow) : Ie
|
|
1310
1482
|
})]
|
|
1311
|
-
}) : /* @__PURE__ */
|
|
1483
|
+
}) : /* @__PURE__ */ J("div", {
|
|
1312
1484
|
style: {
|
|
1313
1485
|
flexDirection: "row",
|
|
1314
|
-
"--st-details-width":
|
|
1315
|
-
"--st-history-width":
|
|
1316
|
-
"--st-history-max-height":
|
|
1317
|
-
"--st-configuration-min-width":
|
|
1486
|
+
"--st-details-width": L?.detailsWidth,
|
|
1487
|
+
"--st-history-width": L?.historyWidth,
|
|
1488
|
+
"--st-history-max-height": L?.historyMaxHeight,
|
|
1489
|
+
"--st-configuration-min-width": L?.configurationMinWidth
|
|
1318
1490
|
},
|
|
1319
1491
|
className: "flex min-h-0 flex-1 overflow-y-auto desktop:overflow-hidden",
|
|
1320
1492
|
children: [
|
|
1321
|
-
/* @__PURE__ */
|
|
1493
|
+
/* @__PURE__ */ J("div", {
|
|
1322
1494
|
role: "group",
|
|
1323
1495
|
"aria-label": e.detailsTitle,
|
|
1324
1496
|
style: {
|
|
1325
|
-
flex: `0 1 ${
|
|
1497
|
+
flex: `0 1 ${L?.detailsWidth ?? "360px"}`,
|
|
1326
1498
|
maxWidth: "100%"
|
|
1327
1499
|
},
|
|
1328
|
-
className:
|
|
1329
|
-
children: [/* @__PURE__ */
|
|
1330
|
-
className:
|
|
1500
|
+
className: b("flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto border-e px-8 py-6", $.detailsColumn),
|
|
1501
|
+
children: [/* @__PURE__ */ q("h2", {
|
|
1502
|
+
className: B,
|
|
1331
1503
|
children: e.detailsTitle
|
|
1332
|
-
}),
|
|
1504
|
+
}), Ie]
|
|
1333
1505
|
}),
|
|
1334
|
-
/* @__PURE__ */
|
|
1506
|
+
/* @__PURE__ */ J("div", {
|
|
1335
1507
|
style: {
|
|
1336
|
-
flex: `1 1 ${
|
|
1508
|
+
flex: `1 1 ${L?.configurationMinWidth ?? "320px"}`,
|
|
1337
1509
|
minWidth: 0
|
|
1338
1510
|
},
|
|
1339
1511
|
className: "flex min-h-0 w-full min-w-0 flex-col gap-5 overflow-y-auto px-8 py-6",
|
|
1340
|
-
children: [/* @__PURE__ */
|
|
1341
|
-
className:
|
|
1512
|
+
children: [/* @__PURE__ */ q("h2", {
|
|
1513
|
+
className: B,
|
|
1342
1514
|
children: e.configurationTitle
|
|
1343
|
-
}),
|
|
1515
|
+
}), Re]
|
|
1344
1516
|
}),
|
|
1345
|
-
/* @__PURE__ */
|
|
1517
|
+
/* @__PURE__ */ q("div", {
|
|
1346
1518
|
style: {
|
|
1347
|
-
flex: `0 1 calc(${
|
|
1519
|
+
flex: `0 1 calc(${L?.historyWidth ?? "360px"} + 48px)`,
|
|
1348
1520
|
minWidth: 0
|
|
1349
1521
|
},
|
|
1350
1522
|
className: "flex min-h-0 w-full items-start justify-center overflow-y-auto p-6",
|
|
1351
|
-
children:
|
|
1523
|
+
children: W(wt.Card)
|
|
1352
1524
|
})
|
|
1353
1525
|
]
|
|
1354
1526
|
}))
|
|
1355
1527
|
]
|
|
1356
1528
|
});
|
|
1357
|
-
},
|
|
1358
|
-
|
|
1359
|
-
|
|
1529
|
+
}, Lt = { fieldLabel: "_fieldLabel_8nxg8_1" }, Rt = {
|
|
1530
|
+
h1: "mb-3 mt-6 first:mt-0 [text-wrap:balance]",
|
|
1531
|
+
h2: "mb-2 mt-5 first:mt-0 [text-wrap:balance]",
|
|
1532
|
+
h3: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
|
|
1533
|
+
h4: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
|
|
1534
|
+
h5: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
|
|
1535
|
+
h6: "mb-2 mt-4 first:mt-0 [text-wrap:balance]",
|
|
1536
|
+
p: "mb-3 break-words [overflow-wrap:anywhere] [text-wrap:pretty] last:mb-0",
|
|
1537
|
+
ul: "mb-3 space-y-1",
|
|
1538
|
+
ol: "mb-3 space-y-1",
|
|
1539
|
+
codeInline: "mx-0.5 px-1.5 break-words [overflow-wrap:anywhere]",
|
|
1540
|
+
blockquote: "my-4",
|
|
1541
|
+
link: "break-words [overflow-wrap:anywhere]",
|
|
1542
|
+
tableWrapper: "my-4",
|
|
1543
|
+
mathBlock: "my-4"
|
|
1544
|
+
}, zt = ({ modelLabel: e, renderModelName: t, skillLabel: n, skillDisplayNames: r, renderSkillName: i, instructionsLabel: a, modelDisplayName: o, instructionsMarkdown: s, renderInstructions: c, instructionsClassNames: l, markdownLabels: u, styles: d }) => {
|
|
1545
|
+
let f = b(d?.typography?.fieldLabelClassName ?? "dial-tiny-text", Lt.fieldLabel), p = d?.typography?.fieldValueClassName ?? "dial-small-text", m = d?.typography?.instructionsHeadingClassName ?? "dial-small-semi-text", g = d?.typography?.instructionsTextClassName ?? "dial-small-text", _ = Ue(() => {
|
|
1546
|
+
let e = Rt;
|
|
1547
|
+
return {
|
|
1548
|
+
...e,
|
|
1549
|
+
h1: b(m, e.h1),
|
|
1550
|
+
h2: b(m, e.h2),
|
|
1551
|
+
h3: b(m, e.h3),
|
|
1552
|
+
h4: b(m, e.h4),
|
|
1553
|
+
h5: b(m, e.h5),
|
|
1554
|
+
h6: b(m, e.h6),
|
|
1555
|
+
p: b(g, e.p),
|
|
1556
|
+
ul: b(g, e.ul),
|
|
1557
|
+
ol: b(g, e.ol),
|
|
1558
|
+
...l
|
|
1559
|
+
};
|
|
1560
|
+
}, [
|
|
1561
|
+
m,
|
|
1562
|
+
g,
|
|
1563
|
+
l
|
|
1564
|
+
]), v = y({ "--stds-field-label": d?.colors?.fieldLabel });
|
|
1565
|
+
return /* @__PURE__ */ J("div", {
|
|
1360
1566
|
className: "flex flex-col gap-3",
|
|
1567
|
+
style: v,
|
|
1361
1568
|
children: [
|
|
1362
|
-
|
|
1569
|
+
o && /* @__PURE__ */ J("div", {
|
|
1363
1570
|
className: "flex flex-col gap-2",
|
|
1364
|
-
children: [/* @__PURE__ */
|
|
1365
|
-
className:
|
|
1571
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1572
|
+
className: f,
|
|
1366
1573
|
children: e
|
|
1367
|
-
}), /* @__PURE__ */
|
|
1368
|
-
className:
|
|
1369
|
-
children:
|
|
1574
|
+
}), /* @__PURE__ */ q("p", {
|
|
1575
|
+
className: p,
|
|
1576
|
+
children: t ? t(o) : o
|
|
1370
1577
|
})]
|
|
1371
1578
|
}),
|
|
1372
|
-
!!
|
|
1579
|
+
!!r?.length && /* @__PURE__ */ J("div", {
|
|
1373
1580
|
className: "flex min-w-0 flex-col gap-2",
|
|
1374
|
-
children: [/* @__PURE__ */
|
|
1375
|
-
className:
|
|
1376
|
-
children:
|
|
1377
|
-
}), /* @__PURE__ */
|
|
1378
|
-
className:
|
|
1379
|
-
children:
|
|
1581
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1582
|
+
className: f,
|
|
1583
|
+
children: n
|
|
1584
|
+
}), /* @__PURE__ */ q("p", {
|
|
1585
|
+
className: b(p, "wrap-anywhere whitespace-normal"),
|
|
1586
|
+
children: r?.map((e, t) => /* @__PURE__ */ q("span", {
|
|
1380
1587
|
className: "block",
|
|
1381
|
-
children: e
|
|
1588
|
+
children: i ? i(e, t) : e
|
|
1382
1589
|
}, `${t}:${e}`))
|
|
1383
1590
|
})]
|
|
1384
1591
|
}),
|
|
1385
|
-
|
|
1592
|
+
s && /* @__PURE__ */ J("div", {
|
|
1386
1593
|
className: "flex flex-col gap-2",
|
|
1387
|
-
children: [/* @__PURE__ */
|
|
1388
|
-
className:
|
|
1389
|
-
children:
|
|
1390
|
-
}), ((e) =>
|
|
1594
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1595
|
+
className: f,
|
|
1596
|
+
children: a
|
|
1597
|
+
}), ((e) => c ? c(e) : /* @__PURE__ */ q(h, {
|
|
1391
1598
|
content: e,
|
|
1392
|
-
|
|
1393
|
-
|
|
1599
|
+
classNames: _,
|
|
1600
|
+
...u
|
|
1601
|
+
}))(s)]
|
|
1394
1602
|
})
|
|
1395
1603
|
]
|
|
1396
1604
|
});
|
|
1397
|
-
},
|
|
1605
|
+
}, Bt = ({ className: e, children: t }) => /* @__PURE__ */ q("span", {
|
|
1606
|
+
className: b(e, "block truncate py-1"),
|
|
1607
|
+
children: t
|
|
1608
|
+
}), Vt = { unavailableText: "_unavailableText_1ifqz_1" }, Ht = ({ scheduleId: e, items: t, isLoading: n = !1, isLoadingMore: r = !1, skeletonCount: i = 6, error: a, onRetry: o, isUnavailable: s = !1, hasMore: c = !1, onLoadMore: l, currentRunId: u, onRunClick: d, labels: f, titleClassName: p = "dial-tiny-semi-text", contentClassName: m = "ps-3", unavailableTextClassName: h = "dial-body-text", colors: g }) => {
|
|
1609
|
+
let [_, v] = Ge(!0);
|
|
1610
|
+
Ve(() => {
|
|
1611
|
+
v(!0);
|
|
1612
|
+
}, [e]);
|
|
1613
|
+
let x = c && !n && l && f.showMoreLabel ? /* @__PURE__ */ q("li", {
|
|
1614
|
+
className: "pt-2",
|
|
1615
|
+
children: /* @__PURE__ */ q(M, {
|
|
1616
|
+
variant: ne.Primary,
|
|
1617
|
+
label: f.showMoreLabel,
|
|
1618
|
+
onClick: l,
|
|
1619
|
+
disabled: r
|
|
1620
|
+
})
|
|
1621
|
+
}) : void 0;
|
|
1622
|
+
return /* @__PURE__ */ J(E, {
|
|
1623
|
+
title: /* @__PURE__ */ q(Bt, {
|
|
1624
|
+
className: p,
|
|
1625
|
+
children: f.title
|
|
1626
|
+
}),
|
|
1627
|
+
expanded: _,
|
|
1628
|
+
onToggle: v,
|
|
1629
|
+
contentClassName: m,
|
|
1630
|
+
children: [/* @__PURE__ */ q(P, {
|
|
1631
|
+
as: F.P,
|
|
1632
|
+
className: b(h, Vt.unavailableText),
|
|
1633
|
+
style: y({ "--stch-unavailable-text": g?.unavailableText }),
|
|
1634
|
+
children: s && f.unavailableLabel
|
|
1635
|
+
}), !s && /* @__PURE__ */ q(Mt, {
|
|
1636
|
+
items: t,
|
|
1637
|
+
isLoading: n,
|
|
1638
|
+
isLoadingMore: r,
|
|
1639
|
+
skeletonCount: i,
|
|
1640
|
+
error: a,
|
|
1641
|
+
onRetry: o,
|
|
1642
|
+
currentRunId: u,
|
|
1643
|
+
onRunClick: d,
|
|
1644
|
+
footer: x,
|
|
1645
|
+
labels: {
|
|
1646
|
+
historyTitle: f.title,
|
|
1647
|
+
emptyLabel: f.emptyLabel,
|
|
1648
|
+
errorLabel: f.errorLabel,
|
|
1649
|
+
retryLabel: f.retryLabel,
|
|
1650
|
+
runStatusLabels: f.runStatusLabels,
|
|
1651
|
+
currentRunLabel: f.currentRunLabel,
|
|
1652
|
+
unreadIndicatorLabel: f.unreadIndicatorLabel,
|
|
1653
|
+
openConversationLabel: f.openConversationLabel
|
|
1654
|
+
}
|
|
1655
|
+
})]
|
|
1656
|
+
});
|
|
1657
|
+
}, Ut = { unavailableText: "_unavailableText_j7lij_1" }, Wt = /* @__PURE__ */ function(e) {
|
|
1658
|
+
return e.Ready = "ready", e.Error = "error", e.Unavailable = "unavailable", e;
|
|
1659
|
+
}({}), Gt = ({ scheduleId: e, state: t, onRetry: n, modelDisplayName: r, renderModelName: i, skillDisplayNames: a, renderSkillName: o, instructionsMarkdown: s, renderInstructions: c, instructionsClassNames: l, markdownLabels: u, summaryStyles: d, labels: f, titleClassName: p = "dial-tiny-semi-text", unavailableTextClassName: m = "dial-body-text", colors: h }) => {
|
|
1660
|
+
let [g, _] = Ge(!1);
|
|
1661
|
+
Ve(() => {
|
|
1662
|
+
_(!1);
|
|
1663
|
+
}, [e]);
|
|
1664
|
+
let v = t === "error" || t === "unavailable", x = t === "error" && n != null, S = /* @__PURE__ */ J(K, { children: [
|
|
1665
|
+
/* @__PURE__ */ q(P, {
|
|
1666
|
+
as: F.P,
|
|
1667
|
+
className: b(m, Ut.unavailableText),
|
|
1668
|
+
style: y({ "--stcd-unavailable-text": h?.unavailableText }),
|
|
1669
|
+
children: v && f.unavailableLabel
|
|
1670
|
+
}),
|
|
1671
|
+
x && /* @__PURE__ */ q("div", {
|
|
1672
|
+
className: "mt-2",
|
|
1673
|
+
children: /* @__PURE__ */ q(M, {
|
|
1674
|
+
label: f.retryLabel,
|
|
1675
|
+
onClick: n
|
|
1676
|
+
})
|
|
1677
|
+
}),
|
|
1678
|
+
!v && /* @__PURE__ */ q(zt, {
|
|
1679
|
+
modelLabel: f.modelLabel,
|
|
1680
|
+
instructionsLabel: f.instructionsLabel,
|
|
1681
|
+
skillLabel: f.skillLabel,
|
|
1682
|
+
skillDisplayNames: a,
|
|
1683
|
+
renderSkillName: o,
|
|
1684
|
+
modelDisplayName: r,
|
|
1685
|
+
renderModelName: i,
|
|
1686
|
+
instructionsMarkdown: s,
|
|
1687
|
+
renderInstructions: c,
|
|
1688
|
+
instructionsClassNames: l,
|
|
1689
|
+
markdownLabels: u,
|
|
1690
|
+
styles: d
|
|
1691
|
+
})
|
|
1692
|
+
] });
|
|
1693
|
+
return /* @__PURE__ */ q(E, {
|
|
1694
|
+
title: /* @__PURE__ */ q(Bt, {
|
|
1695
|
+
className: p,
|
|
1696
|
+
children: f.title
|
|
1697
|
+
}),
|
|
1698
|
+
expanded: g,
|
|
1699
|
+
onToggle: _,
|
|
1700
|
+
children: S
|
|
1701
|
+
});
|
|
1702
|
+
}, Kt = {
|
|
1703
|
+
card: "_card_abja7_1",
|
|
1704
|
+
text: "_text_abja7_6",
|
|
1705
|
+
detailsLink: "_detailsLink_abja7_10",
|
|
1706
|
+
deleted: "_deleted_abja7_21"
|
|
1707
|
+
}, qt = "flex items-center justify-between gap-2 rounded-xl border py-3 ps-4 pe-2 desktop:ps-6", Jt = "flex h-6 shrink-0 items-center gap-1 rounded-full px-2", Yt = (e) => `View task details for ${e}`, Xt = ze(({ isLoading: e = !1, isUnavailable: t = !1, isTaskDeleted: n = !1, displayName: r, timestampLabel: i, renderDetailsLink: a, onRetry: o, labels: s, colors: c, nameClassName: l = "dial-small-semi-text", textClassName: u = "dial-small-text", actionClassName: d = "dial-tiny-semi-text", className: f }) => {
|
|
1708
|
+
let { loadingLabel: p = "Loading task details…", unavailableLabel: m = "Task details are unavailable", retryLabel: h = "Retry", taskDetailsLabel: g = "Task details", taskDetailsAriaLabel: _ = Yt, taskDeletedLabel: v = "Task was deleted" } = s ?? {}, x = y({
|
|
1709
|
+
"--stcb-surface": c?.surface,
|
|
1710
|
+
"--stcb-border": c?.border,
|
|
1711
|
+
"--stcb-text": c?.text,
|
|
1712
|
+
"--stcb-details-link": c?.detailsLink,
|
|
1713
|
+
"--stcb-details-link-hover-surface": c?.detailsLinkHoverSurface,
|
|
1714
|
+
"--stcb-focus-outline": c?.focusOutline,
|
|
1715
|
+
"--stcb-deleted-text": c?.deletedText
|
|
1716
|
+
}), S = !e && t, C = null;
|
|
1717
|
+
return C = e ? /* @__PURE__ */ q("div", {
|
|
1718
|
+
className: "flex h-5 items-center",
|
|
1719
|
+
"aria-hidden": !0,
|
|
1720
|
+
children: /* @__PURE__ */ q(B, {
|
|
1721
|
+
variant: V.Rectangular,
|
|
1722
|
+
width: "220px",
|
|
1723
|
+
height: "16px"
|
|
1724
|
+
})
|
|
1725
|
+
}) : t ? o && /* @__PURE__ */ q(M, {
|
|
1726
|
+
label: h,
|
|
1727
|
+
onClick: o
|
|
1728
|
+
}) : /* @__PURE__ */ J(K, { children: [/* @__PURE__ */ J("p", {
|
|
1729
|
+
className: b(Kt.text, l, "min-w-0 flex-1 wrap-break-word"),
|
|
1730
|
+
children: [r, i && /* @__PURE__ */ J("span", {
|
|
1731
|
+
className: b(u, "block desktop:inline"),
|
|
1732
|
+
children: [" ", i]
|
|
1733
|
+
})]
|
|
1734
|
+
}), n ? /* @__PURE__ */ q("p", {
|
|
1735
|
+
className: b(Kt.deleted, d, "flex h-6 shrink-0 items-center px-2"),
|
|
1736
|
+
children: v
|
|
1737
|
+
}) : a({
|
|
1738
|
+
className: b(Kt.detailsLink, d, Jt),
|
|
1739
|
+
"aria-label": _(r),
|
|
1740
|
+
children: /* @__PURE__ */ J(K, { children: [g, /* @__PURE__ */ q(H, {
|
|
1741
|
+
size: k.SM,
|
|
1742
|
+
stroke: A,
|
|
1743
|
+
className: "rtl:scale-x-[-1]",
|
|
1744
|
+
"aria-hidden": !0
|
|
1745
|
+
})] })
|
|
1746
|
+
})] }), /* @__PURE__ */ J("div", {
|
|
1747
|
+
className: b(Kt.card, qt, f),
|
|
1748
|
+
style: x,
|
|
1749
|
+
children: [
|
|
1750
|
+
/* @__PURE__ */ q(P, {
|
|
1751
|
+
visuallyHidden: !0,
|
|
1752
|
+
children: e ? p : ""
|
|
1753
|
+
}),
|
|
1754
|
+
/* @__PURE__ */ q(P, {
|
|
1755
|
+
as: F.P,
|
|
1756
|
+
className: b(Kt.text, u),
|
|
1757
|
+
children: S ? m : ""
|
|
1758
|
+
}),
|
|
1759
|
+
C
|
|
1760
|
+
]
|
|
1761
|
+
});
|
|
1762
|
+
}), Zt = (e, t, n) => e ? n?.loggingIn ?? "Logging in…" : t == null ? n?.logIn ?? "Log in" : n?.retry ?? "Retry", Qt = ze(({ isVisible: e, isLoggingIn: t = !1, retryMessage: n, liveAnnouncement: r = "", labels: i, onLogIn: a }) => /* @__PURE__ */ J(K, { children: [e && /* @__PURE__ */ q(Ee, {
|
|
1763
|
+
surface: ve.Neutral,
|
|
1764
|
+
title: i?.title ?? "Log in required.",
|
|
1765
|
+
message: i?.body ?? "Scheduled tasks need authorization to run offline.",
|
|
1766
|
+
action: a && /* @__PURE__ */ q(pe, {
|
|
1767
|
+
label: Zt(t, n, i),
|
|
1768
|
+
disabled: t,
|
|
1769
|
+
iconAfter: /* @__PURE__ */ q(ke, {
|
|
1770
|
+
size: k.SM,
|
|
1771
|
+
stroke: A,
|
|
1772
|
+
"aria-hidden": !0,
|
|
1773
|
+
className: "rtl:scale-x-[-1]"
|
|
1774
|
+
}),
|
|
1775
|
+
onClick: a,
|
|
1776
|
+
className: "min-h-11 min-w-11"
|
|
1777
|
+
})
|
|
1778
|
+
}), /* @__PURE__ */ q(P, {
|
|
1779
|
+
visuallyHidden: !0,
|
|
1780
|
+
as: F.Span,
|
|
1781
|
+
children: n ?? r
|
|
1782
|
+
})] })), $t = ze(({ labels: e, titleClassName: t = "dial-small-paragraph-semi-text", bodyClassName: n = "dial-small-paragraph-text" }) => /* @__PURE__ */ q(I, {
|
|
1783
|
+
variant: L.Error,
|
|
1784
|
+
type: ye.SectionMessage,
|
|
1785
|
+
message: /* @__PURE__ */ J("span", {
|
|
1786
|
+
className: "flex min-w-0 flex-wrap items-baseline gap-x-1",
|
|
1787
|
+
children: [/* @__PURE__ */ q("span", {
|
|
1788
|
+
className: b("min-w-0 wrap-break-word", t),
|
|
1789
|
+
children: e?.title ?? "Limited access."
|
|
1790
|
+
}), /* @__PURE__ */ q("span", {
|
|
1791
|
+
className: b("min-w-0 wrap-break-word", n),
|
|
1792
|
+
children: e?.body ?? "You can't create or edit tasks. Contact your administrator for more details."
|
|
1793
|
+
})]
|
|
1794
|
+
})
|
|
1795
|
+
})), en = ({ taskName: e, icon: t, typeLabel: n, body: r, pendingLabel: i, isDeleting: a = !1, styles: o, ...s }) => /* @__PURE__ */ q(d, {
|
|
1398
1796
|
...s,
|
|
1399
|
-
variant:
|
|
1797
|
+
variant: ae.Danger,
|
|
1400
1798
|
popupClassName: o?.popupClassName,
|
|
1401
|
-
titleClassName: o?.titleClassName,
|
|
1799
|
+
titleClassName: o?.titleClassName ?? "dial-body-semi-text",
|
|
1402
1800
|
messageClassName: o?.messageClassName ?? "dial-body-paragraph-text",
|
|
1801
|
+
viewClassName: "pt-0",
|
|
1802
|
+
footerStyles: { colors: { border: "transparent" } },
|
|
1403
1803
|
message: r,
|
|
1404
1804
|
isLoading: a,
|
|
1405
1805
|
loadingStatusLabel: i,
|
|
1406
|
-
identity: /* @__PURE__ */
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1806
|
+
identity: /* @__PURE__ */ q(_, {
|
|
1807
|
+
styles: { colors: {
|
|
1808
|
+
background: o?.colors?.summaryBackground ?? "var(--bg-error, #f3d6d8)",
|
|
1809
|
+
border: o?.colors?.summaryBorder ?? "var(--stroke-error-alpha, #ae2f2f73)"
|
|
1810
|
+
} },
|
|
1811
|
+
children: /* @__PURE__ */ q(f, {
|
|
1812
|
+
icon: t,
|
|
1813
|
+
typeLabel: n,
|
|
1814
|
+
name: e,
|
|
1815
|
+
styles: { colors: o?.colors }
|
|
1816
|
+
})
|
|
1817
|
+
})
|
|
1412
1818
|
});
|
|
1413
1819
|
//#endregion
|
|
1414
|
-
export {
|
|
1820
|
+
export { t as DESCRIPTION_MAX_LENGTH, Ye as SCHEDULED_TASKS_CLASS, Je as SCHEDULED_TASKS_GRID_DEFAULT_MAX_WIDTH, r as SCHEDULED_TASK_CREATE_DEFAULT_VALUES, tt as ScheduledTaskCard, ot as ScheduledTaskCardGrid, at as ScheduledTaskCardSkeleton, Xt as ScheduledTaskConversationBanner, Gt as ScheduledTaskConversationDetailsSection, Wt as ScheduledTaskConversationDetailsState, Ht as ScheduledTaskConversationHistorySection, St as ScheduledTaskCreateForm, en as ScheduledTaskDeleteConfirmation, It as ScheduledTaskDetailView, zt as ScheduledTaskDetailsSummary, Pt as ScheduledTaskHistorySection, Xe as ScheduledTaskPresentationStatus, l as ScheduledTaskRepeat, Mt as ScheduledTaskRunHistoryList, At as ScheduledTaskRunStatus, Y as ScheduledTaskStatus, ut as ScheduledTasks, $t as ScheduledTasksLimitedAccessBanner, Qt as ScheduledTasksLoginBanner, dt as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN, i as calendarValueToDateValue, n as calendarValueToRunAt, e as dateValueToCalendarValue, Ze as getScheduledTaskStatus, mt as hasScheduledTaskFormChanges, s as runAtToCalendarValue };
|