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