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