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