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