@epam/ai-dial-scheduled-tasks 1.1.0-dev.447 → 1.1.0-dev.456
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/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts +5 -0
- package/components/ScheduledTaskConfigurationSection/ScheduledTaskConfigurationSection.d.ts.map +1 -0
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts +6 -3
- package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
- package/components/ScheduledTaskDetailsSection/ScheduledTaskDetailsSection.d.ts +5 -0
- package/components/ScheduledTaskDetailsSection/ScheduledTaskDetailsSection.d.ts.map +1 -0
- package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts +5 -0
- package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts.map +1 -0
- package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
- package/index.css +1 -1
- package/index.js +536 -433
- package/models/scheduled-task-configuration-section-props.d.ts +13 -0
- package/models/scheduled-task-configuration-section-props.d.ts.map +1 -0
- package/models/scheduled-task-detail-view-props.d.ts +3 -1
- package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
- package/models/scheduled-task-details-section-props.d.ts +29 -0
- package/models/scheduled-task-details-section-props.d.ts.map +1 -0
- package/models/scheduled-task-history-section-props.d.ts +67 -0
- package/models/scheduled-task-history-section-props.d.ts.map +1 -0
- package/package.json +3 -3
- package/types/scheduled-task-detail-tab.d.ts +10 -0
- package/types/scheduled-task-detail-tab.d.ts.map +1 -0
- package/types/scheduled-task-history-section-variant.d.ts +8 -0
- package/types/scheduled-task-history-section-variant.d.ts.map +1 -0
package/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as t, MDMessageViewer as n, PanelEmptyState as r, buildCssVars as i, mergeClasses as a, useAvailableHeightCap as o } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import { ButtonAppearance as
|
|
3
|
-
import { IconAlertTriangle as
|
|
4
|
-
import { Suspense as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
import { BuilderFormContainer as
|
|
7
|
-
import { LazyMarkdownEditor as
|
|
8
|
-
var
|
|
1
|
+
import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as e, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as t, MDMessageViewer as n, PanelEmptyState as r, buildCssVars as i, mergeClasses as a, useAvailableHeightCap as o, useIsMobile as s } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { ButtonAppearance as c, ButtonDropdown as l, ButtonVariant as u, Calendar as d, CalendarMode as f, CardShell as p, DIAL_ICON_SIZE as m, DIAL_KIT_ICON_STROKE as h, ElementSize as g, FolderPath as _, GhostButton as v, GhostIconButton as y, Highlight as b, Input as x, Label as S, MenuItemMark as C, NeutralButton as w, NumberInput as T, PrimaryButton as E, Search as D, Select as ee, Skeleton as O, SkeletonVariant as k, Spinner as A, Switch as j, Tabs as te, Textarea as ne } from "@epam/ai-dial-ui-kit";
|
|
3
|
+
import { IconAlertTriangle as M, IconArrowLeft as re, IconCalendarTime as ie, IconCircleCheck as ae, IconCircleX as oe, IconClipboardX as se, IconPencilMinus as ce, IconPlayerPause as N, IconPlus as le, IconTrashX as ue } from "@tabler/icons-react";
|
|
4
|
+
import { Suspense as de, lazy as P, useCallback as F, useEffect as fe, useId as I, useLayoutEffect as pe, useMemo as L, useRef as me, useState as he } from "react";
|
|
5
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
6
|
+
import { BuilderFormContainer as ge } from "@epam/ai-dial-builder-form";
|
|
7
|
+
import { LazyMarkdownEditor as V } from "@epam/ai-dial-ui-kit/editors";
|
|
8
|
+
var H = {
|
|
9
9
|
title: "_title_1hxc3_1",
|
|
10
10
|
description: "_description_1hxc3_5",
|
|
11
11
|
schedulePill: "_schedulePill_1hxc3_9",
|
|
@@ -16,8 +16,8 @@ var K = {
|
|
|
16
16
|
pausedPill: "_pausedPill_1hxc3_31",
|
|
17
17
|
pausedLabel: "_pausedLabel_1hxc3_36",
|
|
18
18
|
locationDivider: "_locationDivider_1hxc3_40"
|
|
19
|
-
},
|
|
20
|
-
let c = r?.newBadgeLabel ?? "NEW", l = r?.pausedBadgeLabel ?? "Paused", { colors: u, typography: d } = o ?? {},
|
|
19
|
+
}, U = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: o, className: s }) => {
|
|
20
|
+
let c = r?.newBadgeLabel ?? "NEW", l = r?.pausedBadgeLabel ?? "Paused", { colors: u, typography: d } = o ?? {}, f = d?.titleClassName ?? "dial-body-semi-text", g = d?.descriptionClassName ?? "dial-small-text", v = d?.descriptionSizeClassName ?? "dial-tiny-text", y = d?.scheduleLabelClassName ?? "dial-tiny-text", x = d?.locationLabelClassName ?? "dial-tiny-text", S = d?.locationLeafClassName ?? "dial-tiny-semi-text", C = d?.newBadgeClassName ?? "dial-tiny-semi-text", w = d?.pausedBadgeClassName ?? "dial-tiny-text", T = i({
|
|
21
21
|
"--stc-title-text": u?.titleText,
|
|
22
22
|
"--stc-desc-text": u?.descriptionText,
|
|
23
23
|
"--stc-pill-bg": u?.schedulePillBackground,
|
|
@@ -38,130 +38,141 @@ var K = {
|
|
|
38
38
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e.id));
|
|
39
39
|
}
|
|
40
40
|
} : {};
|
|
41
|
-
return /* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ B(p, {
|
|
42
42
|
role: n ? "button" : "group",
|
|
43
43
|
"aria-label": e.displayName,
|
|
44
44
|
style: T,
|
|
45
45
|
className: a("h-[232px]", n && "cursor-pointer", s),
|
|
46
46
|
...E,
|
|
47
47
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ B("div", {
|
|
49
49
|
className: "flex min-w-0 shrink-0 items-center gap-2",
|
|
50
|
-
children: [/* @__PURE__ */
|
|
50
|
+
children: [/* @__PURE__ */ z(b, {
|
|
51
51
|
text: e.displayName,
|
|
52
52
|
query: t,
|
|
53
53
|
maxLines: 1,
|
|
54
|
-
className: a(
|
|
55
|
-
}), e.isNew && /* @__PURE__ */
|
|
56
|
-
className: a("shrink-0 rounded-full px-2 py-0.5", C,
|
|
54
|
+
className: a(f, H.title)
|
|
55
|
+
}), e.isNew && /* @__PURE__ */ z("span", {
|
|
56
|
+
className: a("shrink-0 rounded-full px-2 py-0.5", C, H.newBadge),
|
|
57
57
|
children: c
|
|
58
58
|
})]
|
|
59
59
|
}),
|
|
60
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
61
|
-
className: a("line-clamp-4 min-h-0 flex-1 overflow-hidden", v,
|
|
60
|
+
e.descriptionPreview && /* @__PURE__ */ z("p", {
|
|
61
|
+
className: a("line-clamp-4 min-h-0 flex-1 overflow-hidden", v, g, H.description),
|
|
62
62
|
children: e.descriptionPreview
|
|
63
63
|
}),
|
|
64
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ B("div", {
|
|
65
65
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
66
|
-
children: [/* @__PURE__ */
|
|
66
|
+
children: [/* @__PURE__ */ z("div", {
|
|
67
67
|
className: "flex min-h-[28px] items-center",
|
|
68
|
-
children: e.isActive === !1 ? /* @__PURE__ */
|
|
69
|
-
className: a("inline-flex items-center gap-1.5 rounded-full border px-2 py-1",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
71
|
-
size:
|
|
68
|
+
children: e.isActive === !1 ? /* @__PURE__ */ B("span", {
|
|
69
|
+
className: a("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", H.pausedPill, w, H.pausedLabel),
|
|
70
|
+
children: [/* @__PURE__ */ z(N, {
|
|
71
|
+
size: m.SM,
|
|
72
72
|
"aria-hidden": !0,
|
|
73
|
-
stroke:
|
|
73
|
+
stroke: h
|
|
74
74
|
}), l]
|
|
75
|
-
}) : /* @__PURE__ */
|
|
76
|
-
className: a("inline-block rounded-lg border px-2 py-1",
|
|
75
|
+
}) : /* @__PURE__ */ z("span", {
|
|
76
|
+
className: a("inline-block rounded-lg border px-2 py-1", H.schedulePill, y, H.scheduleLabel),
|
|
77
77
|
children: e.scheduleLabel
|
|
78
78
|
})
|
|
79
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */
|
|
79
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ z(_, {
|
|
80
80
|
segments: e.locationSegments,
|
|
81
|
-
labelClassName: a(x,
|
|
82
|
-
leafClassName: a(S,
|
|
83
|
-
className: a("pt-3",
|
|
81
|
+
labelClassName: a(x, H.locationLabel),
|
|
82
|
+
leafClassName: a(S, H.locationLeaf),
|
|
83
|
+
className: a("pt-3", H.locationDivider)
|
|
84
84
|
})]
|
|
85
85
|
})
|
|
86
86
|
]
|
|
87
87
|
});
|
|
88
|
-
},
|
|
88
|
+
}, _e = { card: "_card_11bez_1" }, ve = [
|
|
89
89
|
"100%",
|
|
90
90
|
"100%",
|
|
91
91
|
"61%"
|
|
92
|
-
],
|
|
92
|
+
], W = "var(--stcs-skeleton-bg)", G = ({ styles: e }) => /* @__PURE__ */ B(p, {
|
|
93
93
|
"aria-hidden": !0,
|
|
94
94
|
style: i({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
95
|
-
className: a("h-[232px]",
|
|
95
|
+
className: a("h-[232px]", _e.card),
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ z(O, {
|
|
98
98
|
variant: k.Rectangular,
|
|
99
99
|
width: "60%",
|
|
100
100
|
height: "20px",
|
|
101
|
-
color:
|
|
101
|
+
color: W,
|
|
102
102
|
className: "shrink-0"
|
|
103
103
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ z("div", {
|
|
105
105
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
106
|
-
children:
|
|
106
|
+
children: ve.map((e, t) => /* @__PURE__ */ z(O, {
|
|
107
107
|
variant: k.Rectangular,
|
|
108
108
|
width: e,
|
|
109
109
|
height: "16px",
|
|
110
|
-
color:
|
|
110
|
+
color: W
|
|
111
111
|
}, t))
|
|
112
112
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ z(O, {
|
|
114
114
|
variant: k.Rectangular,
|
|
115
115
|
width: "110px",
|
|
116
116
|
height: "28px",
|
|
117
|
-
color:
|
|
117
|
+
color: W,
|
|
118
118
|
className: "shrink-0 rounded-lg"
|
|
119
119
|
})
|
|
120
120
|
]
|
|
121
|
-
}),
|
|
121
|
+
}), ye = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o }) => /* @__PURE__ */ B("div", {
|
|
122
122
|
className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
|
|
123
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
123
|
+
children: [e.map((e) => /* @__PURE__ */ z(U, {
|
|
124
124
|
item: e,
|
|
125
125
|
searchQuery: t,
|
|
126
126
|
onCardClick: n,
|
|
127
127
|
labels: r,
|
|
128
128
|
styles: i
|
|
129
|
-
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */
|
|
130
|
-
}),
|
|
131
|
-
container: "
|
|
132
|
-
subtitle: "
|
|
133
|
-
sortButton: "
|
|
134
|
-
|
|
129
|
+
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ z(G, { styles: o }, `skeleton-${t}`))]
|
|
130
|
+
}), K = {
|
|
131
|
+
container: "_container_1ct1h_2",
|
|
132
|
+
subtitle: "_subtitle_1ct1h_6",
|
|
133
|
+
sortButton: "_sortButton_1ct1h_10",
|
|
134
|
+
createButton: "_createButton_1ct1h_19",
|
|
135
|
+
sortControlHidden: "_sortControlHidden_1ct1h_40"
|
|
136
|
+
}, be = (e, t, n, r, i, a) => {
|
|
135
137
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
136
|
-
},
|
|
138
|
+
}, xe = (e) => {
|
|
137
139
|
if (!e || e === document.body) return null;
|
|
138
140
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
139
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
140
|
-
},
|
|
141
|
-
let { colors:
|
|
142
|
-
"--st-bg":
|
|
143
|
-
"--st-subtitle-text":
|
|
144
|
-
"--st-sort-text":
|
|
145
|
-
}),
|
|
141
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : xe(e.parentElement);
|
|
142
|
+
}, Se = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: o, sortKey: s, onSortChange: d, items: f, isLoading: p = !1, error: _, onRetry: y, hasMore: b = !1, isLoadingMore: x = !1, skeletonCount: S = 6, onLoadMore: w, onCardClick: T, banner: ee, styles: O }) => {
|
|
143
|
+
let { colors: k, typography: j, emptyStateIconSize: te = 48 } = O ?? {}, ne = j?.titleClassName ?? "dial-h1-text", M = j?.subtitleClassName ?? "dial-body-text", re = i({
|
|
144
|
+
"--st-bg": k?.background,
|
|
145
|
+
"--st-subtitle-text": k?.subtitleText,
|
|
146
|
+
"--st-sort-text": k?.sortButtonText
|
|
147
|
+
}), ae = (e) => {
|
|
146
148
|
o(e ?? "");
|
|
147
|
-
},
|
|
149
|
+
}, [oe, se] = he(!1), [ce, N] = he(!1), ue = me(null), de = F(() => {
|
|
150
|
+
N(!0);
|
|
151
|
+
}, []), P = F(() => {
|
|
152
|
+
N(!1);
|
|
153
|
+
}, []);
|
|
154
|
+
pe(() => {
|
|
155
|
+
let e = ue.current;
|
|
156
|
+
ce && oe && e != null && e.offsetParent == null && se(!1);
|
|
157
|
+
}, [ce, oe]);
|
|
158
|
+
let I = e.sortOptions.find((e) => e.value === s)?.label ?? e.sortLabel, R = L(() => e.sortOptions.map((e) => ({
|
|
148
159
|
key: e.value,
|
|
149
160
|
label: e.label,
|
|
150
|
-
mark:
|
|
151
|
-
checked: e.value ===
|
|
161
|
+
mark: C.Check,
|
|
162
|
+
checked: e.value === s,
|
|
152
163
|
onClick: () => d(e.value)
|
|
153
164
|
})), [
|
|
154
165
|
e.sortOptions,
|
|
155
|
-
|
|
166
|
+
s,
|
|
156
167
|
d
|
|
157
|
-
]),
|
|
158
|
-
|
|
159
|
-
let e =
|
|
168
|
+
]), ge = be(p, x, !!_, f.length, n.trim().length > 0, e), V = me(null);
|
|
169
|
+
fe(() => {
|
|
170
|
+
let e = V.current;
|
|
160
171
|
if (!e || !w) return;
|
|
161
|
-
let t =
|
|
172
|
+
let t = xe(e.parentElement);
|
|
162
173
|
if (!t) return;
|
|
163
174
|
let n = () => {
|
|
164
|
-
if (x ||
|
|
175
|
+
if (x || p || !b) return;
|
|
165
176
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
166
177
|
r.top < n.bottom && r.bottom > n.top && w();
|
|
167
178
|
};
|
|
@@ -169,136 +180,144 @@ var K = {
|
|
|
169
180
|
}, [
|
|
170
181
|
b,
|
|
171
182
|
x,
|
|
172
|
-
|
|
183
|
+
p,
|
|
173
184
|
w
|
|
174
185
|
]);
|
|
175
|
-
let
|
|
186
|
+
let H = () => p ? /* @__PURE__ */ z(A, {}) : _ ? /* @__PURE__ */ B("div", {
|
|
176
187
|
className: "flex flex-col items-center gap-3",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
178
|
-
className: a(
|
|
188
|
+
children: [/* @__PURE__ */ z("p", {
|
|
189
|
+
className: a(M, K.subtitle),
|
|
179
190
|
children: e.errorLabel
|
|
180
|
-
}), /* @__PURE__ */
|
|
191
|
+
}), /* @__PURE__ */ z(v, {
|
|
181
192
|
label: e.retryLabel,
|
|
182
193
|
onClick: y
|
|
183
194
|
})]
|
|
184
|
-
}) : f.length === 0 ? n.trim() ? /* @__PURE__ */
|
|
185
|
-
className: a(
|
|
195
|
+
}) : f.length === 0 ? n.trim() ? /* @__PURE__ */ z("p", {
|
|
196
|
+
className: a(M, K.subtitle),
|
|
186
197
|
children: e.noResultsLabel
|
|
187
|
-
}) : /* @__PURE__ */
|
|
188
|
-
icon: /* @__PURE__ */
|
|
198
|
+
}) : /* @__PURE__ */ z(r, {
|
|
199
|
+
icon: /* @__PURE__ */ z(ie, {
|
|
189
200
|
"aria-hidden": !0,
|
|
190
|
-
size:
|
|
201
|
+
size: te,
|
|
191
202
|
stroke: 1
|
|
192
203
|
}),
|
|
193
204
|
label: e.emptyStateLabel
|
|
194
|
-
}) : /* @__PURE__ */
|
|
205
|
+
}) : /* @__PURE__ */ B("div", {
|
|
195
206
|
className: "flex w-full flex-col gap-6",
|
|
196
|
-
children: [/* @__PURE__ */
|
|
207
|
+
children: [/* @__PURE__ */ z(ye, {
|
|
197
208
|
items: f,
|
|
198
209
|
searchQuery: n,
|
|
199
|
-
onCardClick:
|
|
210
|
+
onCardClick: T,
|
|
200
211
|
labels: e.cardLabels,
|
|
201
|
-
trailingSkeletonCount: x ?
|
|
202
|
-
skeletonStyles: { colors: { skeletonColor:
|
|
203
|
-
}), /* @__PURE__ */
|
|
204
|
-
ref:
|
|
212
|
+
trailingSkeletonCount: x ? S : 0,
|
|
213
|
+
skeletonStyles: { colors: { skeletonColor: k?.skeletonColor } }
|
|
214
|
+
}), /* @__PURE__ */ z("div", {
|
|
215
|
+
ref: V,
|
|
205
216
|
"aria-hidden": !0,
|
|
206
217
|
className: "h-px w-full"
|
|
207
218
|
})]
|
|
208
|
-
}),
|
|
209
|
-
return /* @__PURE__ */
|
|
210
|
-
style:
|
|
211
|
-
className: a("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4",
|
|
219
|
+
}), U = p || !!_ || f.length === 0;
|
|
220
|
+
return /* @__PURE__ */ B("div", {
|
|
221
|
+
style: re,
|
|
222
|
+
className: a("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", K.container),
|
|
212
223
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ B("div", {
|
|
214
225
|
className: "flex items-start justify-between gap-4",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
226
|
+
children: [/* @__PURE__ */ B("div", {
|
|
216
227
|
className: "min-w-0 gap-2",
|
|
217
|
-
children: [/* @__PURE__ */
|
|
218
|
-
className: a("truncate",
|
|
228
|
+
children: [/* @__PURE__ */ z("h1", {
|
|
229
|
+
className: a("truncate", ne),
|
|
219
230
|
children: e.title
|
|
220
|
-
}), /* @__PURE__ */
|
|
221
|
-
className: a("mt-1",
|
|
231
|
+
}), /* @__PURE__ */ z("p", {
|
|
232
|
+
className: a("mt-1", M, K.subtitle),
|
|
222
233
|
children: e.subtitle
|
|
223
234
|
})]
|
|
224
|
-
}), /* @__PURE__ */
|
|
235
|
+
}), /* @__PURE__ */ z(E, {
|
|
225
236
|
label: e.createButtonLabel,
|
|
226
|
-
|
|
227
|
-
|
|
237
|
+
textClassName: "hidden desktop:inline",
|
|
238
|
+
"aria-label": e.createButtonLabel,
|
|
239
|
+
iconBefore: /* @__PURE__ */ z(le, {
|
|
240
|
+
size: m.SM,
|
|
228
241
|
"aria-hidden": !0,
|
|
229
|
-
stroke:
|
|
242
|
+
stroke: h
|
|
230
243
|
}),
|
|
231
244
|
onClick: t,
|
|
232
|
-
className: "shrink-0"
|
|
245
|
+
className: a("shrink-0", K.createButton)
|
|
233
246
|
})]
|
|
234
247
|
}),
|
|
235
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ B("div", {
|
|
236
249
|
className: "flex flex-wrap items-center gap-3",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
250
|
+
children: [/* @__PURE__ */ z("div", {
|
|
238
251
|
role: "search",
|
|
239
252
|
className: "flex-1",
|
|
240
|
-
children: /* @__PURE__ */
|
|
253
|
+
children: /* @__PURE__ */ z(D, {
|
|
241
254
|
value: n,
|
|
242
|
-
onChange:
|
|
255
|
+
onChange: ae,
|
|
243
256
|
placeholder: e.searchPlaceholder,
|
|
244
257
|
clearLabel: e.clearSearchLabel,
|
|
245
258
|
"aria-label": e.searchAriaLabel,
|
|
246
|
-
size:
|
|
259
|
+
size: g.Large,
|
|
260
|
+
onFocus: de,
|
|
261
|
+
onBlur: P
|
|
262
|
+
})
|
|
263
|
+
}), e.sortOptions.length > 0 && /* @__PURE__ */ z("div", {
|
|
264
|
+
ref: ue,
|
|
265
|
+
className: a(ce && K.sortControlHidden),
|
|
266
|
+
children: /* @__PURE__ */ z(l, {
|
|
267
|
+
items: R,
|
|
268
|
+
label: I,
|
|
269
|
+
variant: u.Primary,
|
|
270
|
+
appearance: c.Ghost,
|
|
271
|
+
className: K.sortButton
|
|
247
272
|
})
|
|
248
|
-
}), e.sortOptions.length > 0 && /* @__PURE__ */ H(c, {
|
|
249
|
-
items: I,
|
|
250
|
-
label: re,
|
|
251
|
-
variant: l.Primary,
|
|
252
|
-
appearance: s.Ghost,
|
|
253
|
-
className: q.sortButton
|
|
254
273
|
})]
|
|
255
274
|
}),
|
|
256
|
-
|
|
257
|
-
/* @__PURE__ */
|
|
275
|
+
ee,
|
|
276
|
+
/* @__PURE__ */ z("span", {
|
|
258
277
|
role: "status",
|
|
259
278
|
"aria-live": "polite",
|
|
260
279
|
className: "sr-only",
|
|
261
|
-
children:
|
|
280
|
+
children: ge
|
|
262
281
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
264
|
-
className: a("mx-auto flex size-full w-full max-w-[1180px] flex-col",
|
|
265
|
-
children:
|
|
282
|
+
/* @__PURE__ */ z("div", {
|
|
283
|
+
className: a("mx-auto flex size-full w-full max-w-[1180px] flex-col", U && "items-center justify-center"),
|
|
284
|
+
children: H()
|
|
266
285
|
})
|
|
267
286
|
]
|
|
268
287
|
});
|
|
269
|
-
},
|
|
288
|
+
}, Ce = /* @__PURE__ */ function(e) {
|
|
270
289
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
271
|
-
}({}),
|
|
290
|
+
}({}), we = 500, q = /* @__PURE__ */ function(e) {
|
|
272
291
|
return e.OneTime = "oneTime", e.Hourly = "hourly", e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
273
|
-
}({}),
|
|
292
|
+
}({}), J = (e) => String(e).padStart(2, "0"), Te = (e) => e ? new Date(e) : null, Ee = (e) => {
|
|
274
293
|
if (e == null) return "";
|
|
275
294
|
let t = e instanceof Date ? e : new Date(e);
|
|
276
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${
|
|
277
|
-
},
|
|
295
|
+
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${J(t.getMonth() + 1)}-${J(t.getDate())}T${J(t.getHours())}:${J(t.getMinutes())}`;
|
|
296
|
+
}, De = (e) => {
|
|
278
297
|
if (!e) return null;
|
|
279
298
|
let [t, n, r] = e.split("-").map(Number);
|
|
280
299
|
return new Date(t, n - 1, r);
|
|
281
|
-
},
|
|
300
|
+
}, Oe = (e) => {
|
|
282
301
|
if (e == null) return "";
|
|
283
302
|
let t = e instanceof Date ? e : new Date(e);
|
|
284
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${
|
|
285
|
-
},
|
|
303
|
+
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${J(t.getMonth() + 1)}-${J(t.getDate())}`;
|
|
304
|
+
}, ke = (e) => {
|
|
286
305
|
let t = Number(e);
|
|
287
306
|
return e && Number.isFinite(t) ? String(t + 1) : null;
|
|
288
|
-
},
|
|
307
|
+
}, Ae = (e) => {
|
|
289
308
|
let t = typeof e == "string" ? Number(e) : NaN;
|
|
290
309
|
return Number.isFinite(t) ? String(t - 1) : "";
|
|
291
|
-
},
|
|
310
|
+
}, Y = {
|
|
292
311
|
detailsColumn: "_detailsColumn_1mg3v_1",
|
|
293
312
|
sectionSubtitle: "_sectionSubtitle_1mg3v_5",
|
|
294
313
|
instructionsError: "_instructionsError_1mg3v_9"
|
|
295
|
-
},
|
|
296
|
-
let y =
|
|
314
|
+
}, je = P(async () => ({ default: (await V()).MarkdownEditor })), Me = ({ labels: n, values: r, errors: s, modelSelector: c, modelLabelId: l, onFieldChange: u, onBack: p, onCancel: m, onSubmit: h, isSubmitting: g = !1, markdownEditorTheme: _, styles: v }) => {
|
|
315
|
+
let y = I(), b = o(), { colors: C, typography: w } = v ?? {}, E = w?.titleClassName ?? "dial-h1-text", D = w?.sectionTitleClassName ?? "dial-body-semi-text", O = w?.sectionSubtitleClassName ?? "dial-tiny-text", k = w?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", j = w?.instructionsErrorClassName ?? "dial-small-text", te = i({
|
|
297
316
|
"--stcf-details-border": C?.detailsColumnBorder,
|
|
298
317
|
"--stcf-subtitle-text": C?.sectionSubtitleText,
|
|
299
318
|
"--stcf-error-text": C?.instructionsErrorText
|
|
300
|
-
}),
|
|
301
|
-
return /* @__PURE__ */
|
|
319
|
+
}), M = g || !r.displayName.trim() || !r.modelId || !r.prompt.trim();
|
|
320
|
+
return /* @__PURE__ */ z(ge, {
|
|
302
321
|
labels: {
|
|
303
322
|
title: n.pageTitle,
|
|
304
323
|
backButtonLabel: n.backButtonLabel,
|
|
@@ -310,7 +329,7 @@ var K = {
|
|
|
310
329
|
onCancel: m,
|
|
311
330
|
onSubmit: h,
|
|
312
331
|
isCancelDisabled: g,
|
|
313
|
-
isSubmitDisabled:
|
|
332
|
+
isSubmitDisabled: M,
|
|
314
333
|
isSubmitting: g,
|
|
315
334
|
styles: {
|
|
316
335
|
colors: { background: C?.background },
|
|
@@ -318,27 +337,27 @@ var K = {
|
|
|
318
337
|
colors: { borderColor: C?.headerBorder },
|
|
319
338
|
typography: { fontClassName: E }
|
|
320
339
|
},
|
|
321
|
-
cssVars:
|
|
340
|
+
cssVars: te
|
|
322
341
|
},
|
|
323
|
-
left: /* @__PURE__ */
|
|
342
|
+
left: /* @__PURE__ */ B("div", {
|
|
324
343
|
role: "group",
|
|
325
344
|
"aria-label": n.detailsSectionTitle,
|
|
326
|
-
className: a("flex flex-1 flex-col gap-5 border-e px-
|
|
345
|
+
className: a("flex flex-1 flex-col gap-5 border-e px-4 py-6 desktop:px-8", Y.detailsColumn),
|
|
327
346
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ B("div", {
|
|
329
348
|
className: "flex flex-col gap-1",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
331
|
-
className:
|
|
349
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
350
|
+
className: D,
|
|
332
351
|
children: n.detailsSectionTitle
|
|
333
|
-
}), /* @__PURE__ */
|
|
334
|
-
className: a(
|
|
352
|
+
}), /* @__PURE__ */ z("p", {
|
|
353
|
+
className: a(O, Y.sectionSubtitle),
|
|
335
354
|
children: n.detailsSectionSubtitle
|
|
336
355
|
})]
|
|
337
356
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ z(x, {
|
|
339
358
|
id: "scheduled-task-display-name",
|
|
340
359
|
value: r.displayName,
|
|
341
|
-
onChange: (e) =>
|
|
360
|
+
onChange: (e) => u("displayName", e ?? ""),
|
|
342
361
|
labelProps: {
|
|
343
362
|
label: n.displayNameLabel,
|
|
344
363
|
required: !0
|
|
@@ -346,99 +365,99 @@ var K = {
|
|
|
346
365
|
invalid: !!s.displayName,
|
|
347
366
|
error: s.displayName
|
|
348
367
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ z(ne, {
|
|
350
369
|
id: "scheduled-task-description",
|
|
351
370
|
value: r.description ?? "",
|
|
352
|
-
onChange: (e) =>
|
|
371
|
+
onChange: (e) => u("description", e),
|
|
353
372
|
labelProps: { label: n.descriptionLabel },
|
|
354
373
|
maxLength: 500,
|
|
355
374
|
invalid: !!s.description,
|
|
356
375
|
error: s.description,
|
|
357
376
|
caption: r.description ? `${r.description.length}/500` : void 0
|
|
358
377
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ B("div", {
|
|
360
379
|
className: "flex flex-col gap-1",
|
|
361
380
|
children: [
|
|
362
|
-
/* @__PURE__ */
|
|
381
|
+
/* @__PURE__ */ z(S, {
|
|
363
382
|
id: l,
|
|
364
383
|
label: n.modelOrAgentLabel,
|
|
365
384
|
required: !0
|
|
366
385
|
}),
|
|
367
386
|
c,
|
|
368
|
-
s.modelId && /* @__PURE__ */
|
|
369
|
-
className: a(
|
|
387
|
+
s.modelId && /* @__PURE__ */ z("p", {
|
|
388
|
+
className: a(j, Y.instructionsError),
|
|
370
389
|
children: s.modelId
|
|
371
390
|
})
|
|
372
391
|
]
|
|
373
392
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ B("div", {
|
|
375
394
|
className: "flex flex-col gap-3",
|
|
376
395
|
children: [
|
|
377
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ z(ee, {
|
|
378
397
|
labelProps: { label: n.repeatLabel },
|
|
379
398
|
value: r.repeat,
|
|
380
|
-
onChange: (e) =>
|
|
399
|
+
onChange: (e) => u("repeat", e),
|
|
381
400
|
options: n.repeatOptions.map((e) => ({
|
|
382
401
|
value: e.key,
|
|
383
402
|
label: e.label
|
|
384
403
|
}))
|
|
385
404
|
}),
|
|
386
|
-
r.repeat ===
|
|
405
|
+
r.repeat === q.OneTime && /* @__PURE__ */ B("div", {
|
|
387
406
|
className: "flex flex-col gap-1",
|
|
388
|
-
children: [/* @__PURE__ */
|
|
407
|
+
children: [/* @__PURE__ */ z(d, {
|
|
389
408
|
id: "scheduled-task-run-at",
|
|
390
|
-
mode:
|
|
391
|
-
value:
|
|
392
|
-
onChange: (e) =>
|
|
409
|
+
mode: f.DateTime,
|
|
410
|
+
value: Te(r.runAt),
|
|
411
|
+
onChange: (e) => u("runAt", Ee(e)),
|
|
393
412
|
labelProps: {
|
|
394
413
|
label: n.runAtLabel,
|
|
395
414
|
required: !0
|
|
396
415
|
},
|
|
397
416
|
invalid: !!s.runAt
|
|
398
|
-
}), s.runAt && /* @__PURE__ */
|
|
399
|
-
className: a(
|
|
417
|
+
}), s.runAt && /* @__PURE__ */ z("p", {
|
|
418
|
+
className: a(j, Y.instructionsError),
|
|
400
419
|
children: s.runAt
|
|
401
420
|
})]
|
|
402
421
|
}),
|
|
403
|
-
r.repeat !==
|
|
404
|
-
r.repeat !==
|
|
422
|
+
r.repeat !== q.OneTime && /* @__PURE__ */ B(R, { children: [
|
|
423
|
+
r.repeat !== q.Hourly && /* @__PURE__ */ B("div", {
|
|
405
424
|
className: "flex flex-col gap-1",
|
|
406
|
-
children: [/* @__PURE__ */
|
|
425
|
+
children: [/* @__PURE__ */ z(d, {
|
|
407
426
|
id: "scheduled-task-time",
|
|
408
|
-
mode:
|
|
427
|
+
mode: f.Time,
|
|
409
428
|
value: r.time,
|
|
410
|
-
onChange: (e) =>
|
|
429
|
+
onChange: (e) => u("time", typeof e == "string" ? e : ""),
|
|
411
430
|
labelProps: {
|
|
412
431
|
label: n.timeLabel,
|
|
413
432
|
required: !0
|
|
414
433
|
},
|
|
415
434
|
invalid: !!s.time
|
|
416
|
-
}), s.time && /* @__PURE__ */
|
|
417
|
-
className: a(
|
|
435
|
+
}), s.time && /* @__PURE__ */ z("p", {
|
|
436
|
+
className: a(j, Y.instructionsError),
|
|
418
437
|
children: s.time
|
|
419
438
|
})]
|
|
420
439
|
}),
|
|
421
|
-
r.repeat ===
|
|
440
|
+
r.repeat === q.Weekly && /* @__PURE__ */ B("div", {
|
|
422
441
|
className: "flex flex-col gap-1",
|
|
423
|
-
children: [/* @__PURE__ */
|
|
442
|
+
children: [/* @__PURE__ */ z(d, {
|
|
424
443
|
id: "scheduled-task-day-of-week",
|
|
425
|
-
mode:
|
|
426
|
-
value:
|
|
427
|
-
onChange: (e) =>
|
|
444
|
+
mode: f.Weekday,
|
|
445
|
+
value: ke(r.dayOfWeek),
|
|
446
|
+
onChange: (e) => u("dayOfWeek", Ae(e)),
|
|
428
447
|
labelProps: {
|
|
429
448
|
label: n.dayOfWeekLabel,
|
|
430
449
|
required: !0
|
|
431
450
|
},
|
|
432
451
|
invalid: !!s.dayOfWeek
|
|
433
|
-
}), s.dayOfWeek && /* @__PURE__ */
|
|
434
|
-
className: a(
|
|
452
|
+
}), s.dayOfWeek && /* @__PURE__ */ z("p", {
|
|
453
|
+
className: a(j, Y.instructionsError),
|
|
435
454
|
children: s.dayOfWeek
|
|
436
455
|
})]
|
|
437
456
|
}),
|
|
438
|
-
r.repeat ===
|
|
457
|
+
r.repeat === q.Monthly && /* @__PURE__ */ z(x, {
|
|
439
458
|
id: "scheduled-task-day-of-month",
|
|
440
459
|
value: r.dayOfMonth ?? "",
|
|
441
|
-
onChange: (e) =>
|
|
460
|
+
onChange: (e) => u("dayOfMonth", e ?? ""),
|
|
442
461
|
labelProps: {
|
|
443
462
|
label: n.dayOfMonthLabel,
|
|
444
463
|
required: !0
|
|
@@ -446,13 +465,13 @@ var K = {
|
|
|
446
465
|
invalid: !!s.dayOfMonth,
|
|
447
466
|
error: s.dayOfMonth
|
|
448
467
|
}),
|
|
449
|
-
r.repeat ===
|
|
468
|
+
r.repeat === q.Hourly && /* @__PURE__ */ z(T, {
|
|
450
469
|
id: "scheduled-task-minute",
|
|
451
470
|
integer: !0,
|
|
452
471
|
min: 0,
|
|
453
472
|
max: 59,
|
|
454
473
|
value: r.minute ?? "",
|
|
455
|
-
onChange: (e) =>
|
|
474
|
+
onChange: (e) => u("minute", e == null ? "" : String(e)),
|
|
456
475
|
labelProps: {
|
|
457
476
|
label: n.minuteLabel,
|
|
458
477
|
required: !0
|
|
@@ -460,34 +479,34 @@ var K = {
|
|
|
460
479
|
invalid: !!s.minute,
|
|
461
480
|
error: s.minute
|
|
462
481
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
464
|
-
className: "flex flex-
|
|
465
|
-
children: [/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ B("div", {
|
|
483
|
+
className: "flex flex-row gap-3 desktop:flex-col",
|
|
484
|
+
children: [/* @__PURE__ */ B("div", {
|
|
466
485
|
className: "flex flex-1 flex-col gap-1",
|
|
467
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ z(d, {
|
|
468
487
|
id: "scheduled-task-start-date",
|
|
469
|
-
mode:
|
|
470
|
-
value:
|
|
471
|
-
onChange: (e) =>
|
|
488
|
+
mode: f.Date,
|
|
489
|
+
value: De(r.startDate),
|
|
490
|
+
onChange: (e) => u("startDate", Oe(e)),
|
|
472
491
|
labelProps: { label: n.startDateLabel },
|
|
473
492
|
placeholder: n.startDatePlaceholder,
|
|
474
493
|
invalid: !!s.startDate
|
|
475
|
-
}), s.startDate && /* @__PURE__ */
|
|
476
|
-
className: a(
|
|
494
|
+
}), s.startDate && /* @__PURE__ */ z("p", {
|
|
495
|
+
className: a(j, Y.instructionsError),
|
|
477
496
|
children: s.startDate
|
|
478
497
|
})]
|
|
479
|
-
}), /* @__PURE__ */
|
|
498
|
+
}), /* @__PURE__ */ B("div", {
|
|
480
499
|
className: "flex flex-1 flex-col gap-1",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
500
|
+
children: [/* @__PURE__ */ z(d, {
|
|
482
501
|
id: "scheduled-task-end-date",
|
|
483
|
-
mode:
|
|
484
|
-
value:
|
|
485
|
-
onChange: (e) =>
|
|
502
|
+
mode: f.Date,
|
|
503
|
+
value: De(r.endDate),
|
|
504
|
+
onChange: (e) => u("endDate", Oe(e)),
|
|
486
505
|
labelProps: { label: n.endDateLabel },
|
|
487
506
|
placeholder: n.endDatePlaceholder,
|
|
488
507
|
invalid: !!s.endDate
|
|
489
|
-
}), s.endDate && /* @__PURE__ */
|
|
490
|
-
className: a(
|
|
508
|
+
}), s.endDate && /* @__PURE__ */ z("p", {
|
|
509
|
+
className: a(j, Y.instructionsError),
|
|
491
510
|
children: s.endDate
|
|
492
511
|
})]
|
|
493
512
|
})]
|
|
@@ -497,50 +516,103 @@ var K = {
|
|
|
497
516
|
})
|
|
498
517
|
]
|
|
499
518
|
}),
|
|
500
|
-
children: /* @__PURE__ */
|
|
519
|
+
children: /* @__PURE__ */ B("div", {
|
|
501
520
|
role: "group",
|
|
502
521
|
"aria-label": n.configurationSectionTitle,
|
|
503
|
-
className: "flex flex-1 flex-col gap-5 px-
|
|
504
|
-
children: [/* @__PURE__ */
|
|
522
|
+
className: "flex flex-1 flex-col gap-5 px-4 py-6 desktop:px-8",
|
|
523
|
+
children: [/* @__PURE__ */ B("div", {
|
|
505
524
|
className: "flex flex-col gap-1",
|
|
506
|
-
children: [/* @__PURE__ */
|
|
507
|
-
className:
|
|
525
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
526
|
+
className: D,
|
|
508
527
|
children: n.configurationSectionTitle
|
|
509
|
-
}), /* @__PURE__ */
|
|
510
|
-
className: a(
|
|
528
|
+
}), /* @__PURE__ */ z("p", {
|
|
529
|
+
className: a(O, Y.sectionSubtitle),
|
|
511
530
|
children: n.configurationSectionSubtitle
|
|
512
531
|
})]
|
|
513
|
-
}), /* @__PURE__ */
|
|
532
|
+
}), /* @__PURE__ */ B("div", {
|
|
514
533
|
className: "flex flex-1 flex-col gap-1",
|
|
515
534
|
children: [
|
|
516
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ z("label", {
|
|
517
536
|
htmlFor: y,
|
|
518
|
-
className:
|
|
537
|
+
className: k,
|
|
519
538
|
children: n.instructionsLabel
|
|
520
539
|
}),
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
ref:
|
|
540
|
+
/* @__PURE__ */ z("div", {
|
|
541
|
+
ref: b,
|
|
523
542
|
className: a(e, t),
|
|
524
|
-
children: /* @__PURE__ */
|
|
525
|
-
fallback: /* @__PURE__ */
|
|
526
|
-
children: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ z(de, {
|
|
544
|
+
fallback: /* @__PURE__ */ z(A, {}),
|
|
545
|
+
children: /* @__PURE__ */ z(je, {
|
|
527
546
|
id: y,
|
|
528
547
|
value: r.prompt,
|
|
529
|
-
onChange: (e) =>
|
|
548
|
+
onChange: (e) => u("prompt", e),
|
|
530
549
|
height: 480,
|
|
531
550
|
theme: _
|
|
532
551
|
})
|
|
533
552
|
})
|
|
534
553
|
}),
|
|
535
|
-
s.prompt && /* @__PURE__ */
|
|
536
|
-
className: a(
|
|
554
|
+
s.prompt && /* @__PURE__ */ z("p", {
|
|
555
|
+
className: a(j, Y.instructionsError),
|
|
537
556
|
children: s.prompt
|
|
538
557
|
})
|
|
539
558
|
]
|
|
540
559
|
})]
|
|
541
560
|
})
|
|
542
561
|
});
|
|
543
|
-
},
|
|
562
|
+
}, X = /* @__PURE__ */ function(e) {
|
|
563
|
+
return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
|
|
564
|
+
}({}), Ne = /* @__PURE__ */ function(e) {
|
|
565
|
+
return e.Card = "card", e.Flow = "flow", e;
|
|
566
|
+
}({}), Pe = { subtitleText: "_subtitleText_1i4x2_3" }, Fe = ({ instructionsLabel: e, instructionsMarkdown: t, renderInstructions: r, fieldLabelClassName: i = "dial-tiny-text" }) => /* @__PURE__ */ B("div", {
|
|
567
|
+
role: "group",
|
|
568
|
+
"aria-label": e,
|
|
569
|
+
className: "flex flex-col gap-1",
|
|
570
|
+
children: [/* @__PURE__ */ z("span", {
|
|
571
|
+
className: a(i, Pe.subtitleText),
|
|
572
|
+
children: e
|
|
573
|
+
}), t && (r ? r(t) : /* @__PURE__ */ z(n, { content: t }))]
|
|
574
|
+
}), Ie = { subtitleText: "_subtitleText_1i4x2_3" }, Le = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, fieldLabelClassName: o = "dial-tiny-text", fieldValueClassName: s = "dial-small-text" }) => /* @__PURE__ */ B(R, { children: [
|
|
575
|
+
t && /* @__PURE__ */ B("div", {
|
|
576
|
+
className: "flex flex-col gap-1",
|
|
577
|
+
children: [/* @__PURE__ */ z("span", {
|
|
578
|
+
className: a(o, Ie.subtitleText),
|
|
579
|
+
children: e.descriptionLabel
|
|
580
|
+
}), /* @__PURE__ */ z("p", {
|
|
581
|
+
className: s,
|
|
582
|
+
children: t
|
|
583
|
+
})]
|
|
584
|
+
}),
|
|
585
|
+
n && /* @__PURE__ */ B("div", {
|
|
586
|
+
className: "flex flex-col gap-1",
|
|
587
|
+
children: [/* @__PURE__ */ z("span", {
|
|
588
|
+
className: a(o, Ie.subtitleText),
|
|
589
|
+
children: e.modelLabel
|
|
590
|
+
}), /* @__PURE__ */ z("p", {
|
|
591
|
+
className: s,
|
|
592
|
+
children: n
|
|
593
|
+
})]
|
|
594
|
+
}),
|
|
595
|
+
r && /* @__PURE__ */ B("div", {
|
|
596
|
+
className: "flex flex-col gap-1",
|
|
597
|
+
children: [/* @__PURE__ */ z("span", {
|
|
598
|
+
className: a(o, Ie.subtitleText),
|
|
599
|
+
children: e.repeatsLabel
|
|
600
|
+
}), /* @__PURE__ */ z("p", {
|
|
601
|
+
className: s,
|
|
602
|
+
children: r
|
|
603
|
+
})]
|
|
604
|
+
}),
|
|
605
|
+
i && /* @__PURE__ */ B("div", {
|
|
606
|
+
className: "flex flex-col gap-1",
|
|
607
|
+
children: [/* @__PURE__ */ z("span", {
|
|
608
|
+
className: a(o, Ie.subtitleText),
|
|
609
|
+
children: e.activeWindowLabel
|
|
610
|
+
}), /* @__PURE__ */ z("p", {
|
|
611
|
+
className: s,
|
|
612
|
+
children: i
|
|
613
|
+
})]
|
|
614
|
+
})
|
|
615
|
+
] }), Z = /* @__PURE__ */ function(e) {
|
|
544
616
|
return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
|
|
545
617
|
}({}), Q = {
|
|
546
618
|
subtitleText: "_subtitleText_1bug5_1",
|
|
@@ -549,34 +621,34 @@ var K = {
|
|
|
549
621
|
missedIcon: "_missedIcon_1bug5_13",
|
|
550
622
|
currentRun: "_currentRun_1bug5_17",
|
|
551
623
|
unreadDot: "_unreadDot_1bug5_21"
|
|
552
|
-
},
|
|
624
|
+
}, Re = ({ status: e }) => {
|
|
553
625
|
switch (e) {
|
|
554
|
-
case Z.Success: return /* @__PURE__ */
|
|
555
|
-
size:
|
|
626
|
+
case Z.Success: return /* @__PURE__ */ z(ae, {
|
|
627
|
+
size: m.SM,
|
|
556
628
|
className: Q.successIcon,
|
|
557
629
|
"aria-hidden": !0,
|
|
558
|
-
stroke:
|
|
630
|
+
stroke: h
|
|
559
631
|
});
|
|
560
|
-
case Z.Error: return /* @__PURE__ */
|
|
561
|
-
size:
|
|
632
|
+
case Z.Error: return /* @__PURE__ */ z(oe, {
|
|
633
|
+
size: m.SM,
|
|
562
634
|
className: Q.errorIcon,
|
|
563
635
|
"aria-hidden": !0,
|
|
564
|
-
stroke:
|
|
636
|
+
stroke: h
|
|
565
637
|
});
|
|
566
|
-
case Z.InProgress: return /* @__PURE__ */
|
|
638
|
+
case Z.InProgress: return /* @__PURE__ */ z("span", {
|
|
567
639
|
"aria-hidden": !0,
|
|
568
|
-
children: /* @__PURE__ */
|
|
640
|
+
children: /* @__PURE__ */ z(A, { size: m.SM })
|
|
569
641
|
});
|
|
570
|
-
case Z.Missed: return /* @__PURE__ */
|
|
571
|
-
size:
|
|
642
|
+
case Z.Missed: return /* @__PURE__ */ z(M, {
|
|
643
|
+
size: m.SM,
|
|
572
644
|
className: Q.missedIcon,
|
|
573
645
|
"aria-hidden": !0,
|
|
574
|
-
stroke:
|
|
646
|
+
stroke: h
|
|
575
647
|
});
|
|
576
648
|
default: return null;
|
|
577
649
|
}
|
|
578
|
-
},
|
|
579
|
-
let { colors: p, typography:
|
|
650
|
+
}, ze = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: o, onRetry: s, currentRunId: c, onRunClick: l, labels: u, footer: d, styles: f }) => {
|
|
651
|
+
let { colors: p, typography: m } = f ?? {}, g = m?.runTimestampClassName ?? "dial-small-text", _ = m?.subtitleClassName ?? "dial-body-text", y = u.unreadIndicatorLabel ?? "Unread", b = i({
|
|
580
652
|
"--strhl-success-icon": p?.successIconColor,
|
|
581
653
|
"--strhl-error-icon": p?.errorIconColor,
|
|
582
654
|
"--strhl-missed-icon": p?.missedIconColor,
|
|
@@ -585,7 +657,7 @@ var K = {
|
|
|
585
657
|
"--strhl-unread-dot": p?.unreadDotColor
|
|
586
658
|
}), x = (e) => {
|
|
587
659
|
let t = u.runStatusLabels[e.status], n = e.id === c, r = [e.isUnread ? y : void 0, n ? u.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), o = !!e.conversationId && !!l;
|
|
588
|
-
return /* @__PURE__ */
|
|
660
|
+
return /* @__PURE__ */ B("li", {
|
|
589
661
|
...o ? {
|
|
590
662
|
role: "button",
|
|
591
663
|
tabIndex: 0,
|
|
@@ -597,345 +669,376 @@ var K = {
|
|
|
597
669
|
"aria-label": i,
|
|
598
670
|
"aria-current": n ? "true" : void 0,
|
|
599
671
|
className: a("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", n && Q.currentRun, o && "cursor-pointer"),
|
|
600
|
-
children: [/* @__PURE__ */
|
|
672
|
+
children: [/* @__PURE__ */ B("span", {
|
|
601
673
|
className: "flex items-center gap-2 truncate",
|
|
602
|
-
children: [/* @__PURE__ */
|
|
674
|
+
children: [/* @__PURE__ */ z("span", {
|
|
603
675
|
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
604
|
-
children: e.isUnread && /* @__PURE__ */
|
|
676
|
+
children: e.isUnread && /* @__PURE__ */ z("span", {
|
|
605
677
|
className: a("size-[5.33px] rounded-full", Q.unreadDot),
|
|
606
678
|
"aria-hidden": !0
|
|
607
679
|
})
|
|
608
|
-
}), /* @__PURE__ */
|
|
680
|
+
}), /* @__PURE__ */ z("span", {
|
|
609
681
|
className: a(g, "truncate"),
|
|
610
682
|
children: e.timestampLabel
|
|
611
683
|
})]
|
|
612
|
-
}), /* @__PURE__ */
|
|
684
|
+
}), /* @__PURE__ */ z("span", {
|
|
613
685
|
className: "flex h-8 w-14 shrink-0 items-center justify-end",
|
|
614
|
-
children: /* @__PURE__ */
|
|
686
|
+
children: /* @__PURE__ */ z(Re, { status: e.status })
|
|
615
687
|
})]
|
|
616
688
|
}, e.id);
|
|
617
|
-
}, S = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */
|
|
689
|
+
}, S = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ B("li", {
|
|
618
690
|
"aria-hidden": "true",
|
|
619
691
|
className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
|
|
620
|
-
children: [/* @__PURE__ */
|
|
692
|
+
children: [/* @__PURE__ */ z(O, {
|
|
621
693
|
variant: k.Rectangular,
|
|
622
694
|
width: "160px",
|
|
623
695
|
height: "16px"
|
|
624
|
-
}), /* @__PURE__ */
|
|
696
|
+
}), /* @__PURE__ */ z(O, {
|
|
625
697
|
variant: k.Rectangular,
|
|
626
698
|
width: "16px",
|
|
627
699
|
height: "16px",
|
|
628
700
|
className: "shrink-0 rounded-full"
|
|
629
701
|
})]
|
|
630
702
|
}, `history-skeleton-${t}`));
|
|
631
|
-
return t && e.length === 0 ? /* @__PURE__ */
|
|
703
|
+
return t && e.length === 0 ? /* @__PURE__ */ z("ul", {
|
|
632
704
|
style: b,
|
|
633
705
|
"aria-label": u.historyTitle,
|
|
634
706
|
className: "flex flex-col gap-0.5",
|
|
635
707
|
children: S(r)
|
|
636
|
-
}) : o && e.length === 0 ? /* @__PURE__ */
|
|
708
|
+
}) : o && e.length === 0 ? /* @__PURE__ */ B("div", {
|
|
637
709
|
style: b,
|
|
638
710
|
className: "flex flex-col items-start gap-3",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
711
|
+
children: [/* @__PURE__ */ z("p", {
|
|
640
712
|
role: "alert",
|
|
641
|
-
className: a(
|
|
713
|
+
className: a(_, Q.subtitleText),
|
|
642
714
|
children: u.errorLabel
|
|
643
|
-
}), /* @__PURE__ */
|
|
715
|
+
}), /* @__PURE__ */ z(v, {
|
|
644
716
|
label: u.retryLabel,
|
|
645
717
|
onClick: s
|
|
646
718
|
})]
|
|
647
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
719
|
+
}) : e.length === 0 ? /* @__PURE__ */ B("div", {
|
|
648
720
|
style: b,
|
|
649
721
|
className: "flex w-full flex-col items-center justify-center gap-2 py-4",
|
|
650
|
-
children: [/* @__PURE__ */
|
|
722
|
+
children: [/* @__PURE__ */ z(se, {
|
|
651
723
|
size: 44,
|
|
652
|
-
stroke:
|
|
724
|
+
stroke: h,
|
|
653
725
|
className: Q.subtitleText,
|
|
654
726
|
"aria-hidden": !0
|
|
655
|
-
}), /* @__PURE__ */
|
|
727
|
+
}), /* @__PURE__ */ z("p", {
|
|
656
728
|
role: "status",
|
|
657
729
|
className: g,
|
|
658
730
|
children: u.emptyLabel
|
|
659
731
|
})]
|
|
660
|
-
}) : /* @__PURE__ */
|
|
732
|
+
}) : /* @__PURE__ */ B("ul", {
|
|
661
733
|
style: b,
|
|
662
734
|
"aria-label": u.historyTitle,
|
|
663
735
|
className: "flex flex-col gap-0.5",
|
|
664
736
|
children: [
|
|
665
737
|
e.map(x),
|
|
666
738
|
n && S(r),
|
|
667
|
-
o ? /* @__PURE__ */
|
|
739
|
+
o ? /* @__PURE__ */ B("li", {
|
|
668
740
|
className: "flex flex-col items-start gap-3 px-5 py-2",
|
|
669
|
-
children: [/* @__PURE__ */
|
|
741
|
+
children: [/* @__PURE__ */ z("p", {
|
|
670
742
|
role: "alert",
|
|
671
|
-
className: a(
|
|
743
|
+
className: a(_, Q.subtitleText),
|
|
672
744
|
children: u.errorLabel
|
|
673
|
-
}), /* @__PURE__ */
|
|
745
|
+
}), /* @__PURE__ */ z(v, {
|
|
674
746
|
label: u.retryLabel,
|
|
675
747
|
onClick: s
|
|
676
748
|
})]
|
|
677
749
|
}) : d
|
|
678
750
|
]
|
|
679
751
|
});
|
|
680
|
-
},
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
let { colors: R, typography: z } = oe ?? {}, se = z?.titleClassName ?? "dial-h2-text", B = z?.sectionTitleClassName ?? "dial-body-semi-text", V = z?.fieldLabelClassName ?? "dial-tiny-text", W = z?.fieldValueClassName ?? "dial-small-text", G = z?.runTimestampClassName ?? "dial-small-text", K = i({
|
|
691
|
-
"--stdv-bg": R?.background,
|
|
692
|
-
"--stdv-header-border": R?.headerBorder,
|
|
693
|
-
"--stdv-details-border": R?.detailsColumnBorder,
|
|
694
|
-
"--stdv-subtitle-text": R?.subtitleText,
|
|
695
|
-
"--stdv-success-icon": R?.successIconColor,
|
|
696
|
-
"--stdv-error-icon": R?.errorIconColor,
|
|
697
|
-
"--stdv-missed-icon": R?.missedIconColor,
|
|
698
|
-
"--stdv-history-bg": R?.historyCardBackground
|
|
699
|
-
}), ce = ie && I && e.historyShowMoreLabel ? /* @__PURE__ */ H("li", {
|
|
700
|
-
className: a("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", $.historyCard),
|
|
701
|
-
children: /* @__PURE__ */ H(_, {
|
|
702
|
-
label: e.historyShowMoreLabel,
|
|
703
|
-
onClick: ie,
|
|
704
|
-
disabled: P
|
|
752
|
+
}, Be = {
|
|
753
|
+
historyCard: "_historyCard_qqobi_4",
|
|
754
|
+
subtitleText: "_subtitleText_qqobi_8"
|
|
755
|
+
}, Ve = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: o = !1, skeletonCount: s = 6, error: c, onRetry: l, hasMore: u = !1, onLoadMore: d, onRunClick: f, runTimestampClassName: p = "dial-small-text", sectionTitleClassName: m = "dial-body-semi-text", colors: h }) => {
|
|
756
|
+
let g = e === Ne.Card, _ = g ? a("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", Be.historyCard) : "pt-2", y = d && u && t.historyShowMoreLabel ? /* @__PURE__ */ z("li", {
|
|
757
|
+
className: _,
|
|
758
|
+
children: /* @__PURE__ */ z(v, {
|
|
759
|
+
label: t.historyShowMoreLabel,
|
|
760
|
+
onClick: d,
|
|
761
|
+
disabled: o
|
|
705
762
|
})
|
|
706
|
-
}) : void 0
|
|
707
|
-
|
|
708
|
-
|
|
763
|
+
}) : void 0, b = n ? /* @__PURE__ */ z("p", {
|
|
764
|
+
className: a(p, Be.subtitleText),
|
|
765
|
+
children: n
|
|
766
|
+
}) : void 0, x = t.historyLoadingMoreLabel ? /* @__PURE__ */ z("span", {
|
|
767
|
+
role: "status",
|
|
768
|
+
"aria-live": "polite",
|
|
769
|
+
className: "sr-only",
|
|
770
|
+
children: o ? t.historyLoadingMoreLabel : ""
|
|
771
|
+
}) : void 0, S = /* @__PURE__ */ z(ze, {
|
|
772
|
+
items: r,
|
|
773
|
+
isLoading: i,
|
|
774
|
+
isLoadingMore: o,
|
|
775
|
+
skeletonCount: s,
|
|
776
|
+
error: c,
|
|
777
|
+
onRetry: l,
|
|
778
|
+
onRunClick: f,
|
|
779
|
+
labels: {
|
|
780
|
+
historyTitle: t.historyTitle,
|
|
781
|
+
emptyLabel: t.historyEmptyLabel,
|
|
782
|
+
errorLabel: t.historyErrorLabel,
|
|
783
|
+
retryLabel: t.historyRetryLabel,
|
|
784
|
+
runStatusLabels: t.runStatusLabels,
|
|
785
|
+
unreadIndicatorLabel: t.unreadIndicatorLabel
|
|
786
|
+
},
|
|
787
|
+
footer: y,
|
|
788
|
+
styles: {
|
|
789
|
+
typography: { runTimestampClassName: p },
|
|
790
|
+
colors: h
|
|
791
|
+
}
|
|
792
|
+
});
|
|
793
|
+
return g ? /* @__PURE__ */ B("div", {
|
|
794
|
+
className: a("flex max-h-[70vh] w-full flex-col overflow-y-auto rounded-xl shadow-md desktop:w-[360px]", Be.historyCard),
|
|
795
|
+
children: [/* @__PURE__ */ B("div", {
|
|
796
|
+
className: a("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", Be.historyCard),
|
|
797
|
+
children: [
|
|
798
|
+
/* @__PURE__ */ z("h2", {
|
|
799
|
+
className: m,
|
|
800
|
+
children: t.historyTitle
|
|
801
|
+
}),
|
|
802
|
+
b,
|
|
803
|
+
x
|
|
804
|
+
]
|
|
805
|
+
}), /* @__PURE__ */ z("div", {
|
|
806
|
+
className: "flex flex-1 flex-col gap-4 px-6 pb-2",
|
|
807
|
+
children: S
|
|
808
|
+
})]
|
|
809
|
+
}) : /* @__PURE__ */ B("div", {
|
|
810
|
+
className: "flex flex-col gap-4",
|
|
811
|
+
children: [
|
|
812
|
+
b,
|
|
813
|
+
x,
|
|
814
|
+
S
|
|
815
|
+
]
|
|
816
|
+
});
|
|
817
|
+
}, $ = {
|
|
818
|
+
container: "_container_178k1_1",
|
|
819
|
+
header: "_header_178k1_8",
|
|
820
|
+
detailsColumn: "_detailsColumn_178k1_12",
|
|
821
|
+
subtitleText: "_subtitleText_178k1_16"
|
|
822
|
+
}, He = ({ labels: e, onBack: t, onEdit: n, onDelete: r, isDeleting: o = !1, isDeleted: c = !1, isActive: l, isActiveUpdating: d = !1, isActiveDisabled: f = !1, onActiveChange: p, displayName: g, isLoading: _ = !1, error: b, onRetry: x, description: S, modelLabel: C, repeatsLabel: T, activeWindowLabel: E, nextRunLabel: D, instructionsMarkdown: ee, renderInstructions: O, runs: k, runsIsLoading: ne = !1, runsIsLoadingMore: M = !1, runsSkeletonCount: ie = 6, runsError: ae, onRunsRetry: oe, runsHasMore: se = !1, onRunsLoadMore: N, onRunClick: le, styles: de }) => {
|
|
823
|
+
let { colors: P, typography: F } = de ?? {}, fe = F?.titleClassName ?? "dial-h2-text", I = F?.sectionTitleClassName ?? "dial-body-semi-text", pe = F?.fieldLabelClassName ?? "dial-tiny-text", L = F?.fieldValueClassName ?? "dial-small-text", me = F?.runTimestampClassName ?? "dial-small-text", R = i({
|
|
824
|
+
"--stdv-bg": P?.background,
|
|
825
|
+
"--stdv-header-border": P?.headerBorder,
|
|
826
|
+
"--stdv-details-border": P?.detailsColumnBorder,
|
|
827
|
+
"--stdv-subtitle-text": P?.subtitleText,
|
|
828
|
+
"--stdv-history-bg": P?.historyCardBackground
|
|
829
|
+
}), ge = s(), [V, H] = he(X.Details), U = [
|
|
830
|
+
{
|
|
831
|
+
id: X.Details,
|
|
832
|
+
label: e.detailsTitle
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
id: X.Configuration,
|
|
836
|
+
label: e.configurationTitle
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
id: X.History,
|
|
840
|
+
label: e.historyTitle
|
|
841
|
+
}
|
|
842
|
+
], _e = U.find((e) => e.id === V)?.label ?? e.detailsTitle, ve = /* @__PURE__ */ z(Le, {
|
|
843
|
+
labels: {
|
|
844
|
+
descriptionLabel: e.descriptionLabel,
|
|
845
|
+
modelLabel: e.modelLabel,
|
|
846
|
+
repeatsLabel: e.repeatsLabel,
|
|
847
|
+
activeWindowLabel: e.activeWindowLabel
|
|
848
|
+
},
|
|
849
|
+
description: S,
|
|
850
|
+
modelLabel: C,
|
|
851
|
+
repeatsLabel: T,
|
|
852
|
+
activeWindowLabel: E,
|
|
853
|
+
fieldLabelClassName: pe,
|
|
854
|
+
fieldValueClassName: L
|
|
855
|
+
}), W = /* @__PURE__ */ z(Fe, {
|
|
856
|
+
instructionsLabel: e.instructionsLabel,
|
|
857
|
+
instructionsMarkdown: ee,
|
|
858
|
+
renderInstructions: O,
|
|
859
|
+
fieldLabelClassName: pe
|
|
860
|
+
}), G = (t) => /* @__PURE__ */ z(Ve, {
|
|
861
|
+
variant: t,
|
|
862
|
+
labels: {
|
|
863
|
+
historyTitle: e.historyTitle,
|
|
864
|
+
historyEmptyLabel: e.historyEmptyLabel,
|
|
865
|
+
historyErrorLabel: e.historyErrorLabel,
|
|
866
|
+
historyRetryLabel: e.historyRetryLabel,
|
|
867
|
+
historyLoadingMoreLabel: e.historyLoadingMoreLabel,
|
|
868
|
+
historyShowMoreLabel: e.historyShowMoreLabel,
|
|
869
|
+
runStatusLabels: e.runStatusLabels,
|
|
870
|
+
unreadIndicatorLabel: e.unreadIndicatorLabel
|
|
871
|
+
},
|
|
872
|
+
nextRunLabel: D,
|
|
873
|
+
items: k,
|
|
874
|
+
isLoading: ne,
|
|
875
|
+
isLoadingMore: M,
|
|
876
|
+
skeletonCount: ie,
|
|
877
|
+
error: ae,
|
|
878
|
+
onRetry: oe,
|
|
879
|
+
hasMore: se,
|
|
880
|
+
onLoadMore: N,
|
|
881
|
+
onRunClick: le,
|
|
882
|
+
runTimestampClassName: me,
|
|
883
|
+
sectionTitleClassName: I,
|
|
884
|
+
colors: P
|
|
885
|
+
});
|
|
886
|
+
return /* @__PURE__ */ B("div", {
|
|
887
|
+
style: R,
|
|
709
888
|
className: a("flex h-full w-full flex-col overflow-y-auto", $.container),
|
|
710
889
|
children: [
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
className: a("flex h-16 shrink-0 items-center justify-between gap-2 border-
|
|
713
|
-
children: [/* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ B("div", {
|
|
891
|
+
className: a("flex h-16 shrink-0 items-center justify-between gap-2 border-t px-8 desktop:border-b desktop:border-t-0", $.header),
|
|
892
|
+
children: [/* @__PURE__ */ B("div", {
|
|
714
893
|
className: "flex min-w-0 items-center gap-2",
|
|
715
894
|
children: [
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
icon: /* @__PURE__ */
|
|
718
|
-
size:
|
|
895
|
+
/* @__PURE__ */ z(y, {
|
|
896
|
+
icon: /* @__PURE__ */ z(re, {
|
|
897
|
+
size: m.LG,
|
|
719
898
|
className: "rtl:scale-x-[-1]",
|
|
720
899
|
"aria-hidden": !0,
|
|
721
|
-
stroke:
|
|
900
|
+
stroke: h
|
|
722
901
|
}),
|
|
723
902
|
"aria-label": e.backAriaLabel,
|
|
724
903
|
onClick: t
|
|
725
904
|
}),
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
className: a("truncate",
|
|
905
|
+
/* @__PURE__ */ z("h1", {
|
|
906
|
+
className: a("hidden truncate desktop:block", fe),
|
|
728
907
|
children: g
|
|
729
908
|
}),
|
|
730
|
-
c && /* @__PURE__ */
|
|
731
|
-
className: a("shrink-0",
|
|
909
|
+
c && /* @__PURE__ */ z("span", {
|
|
910
|
+
className: a("hidden shrink-0 desktop:inline", L, $.subtitleText),
|
|
732
911
|
children: e.deletedStateLabel
|
|
733
912
|
})
|
|
734
913
|
]
|
|
735
|
-
}), /* @__PURE__ */
|
|
914
|
+
}), /* @__PURE__ */ B("div", {
|
|
736
915
|
className: "flex shrink-0 items-center gap-2",
|
|
737
916
|
children: [
|
|
738
|
-
!c &&
|
|
917
|
+
!c && l !== void 0 && /* @__PURE__ */ z(j, {
|
|
739
918
|
id: "scheduled-task-active-switch",
|
|
740
919
|
labelProps: { label: e.activeStatusLabel },
|
|
741
|
-
isOn:
|
|
742
|
-
disabled: d || f ||
|
|
743
|
-
onChange: (e) =>
|
|
920
|
+
isOn: l,
|
|
921
|
+
disabled: d || f || o,
|
|
922
|
+
onChange: (e) => p?.(e)
|
|
744
923
|
}),
|
|
745
|
-
!c &&
|
|
746
|
-
variant:
|
|
924
|
+
!c && r && /* @__PURE__ */ z(v, {
|
|
925
|
+
variant: u.Danger,
|
|
747
926
|
label: e.deleteButtonLabel,
|
|
748
|
-
iconBefore: /* @__PURE__ */
|
|
749
|
-
size:
|
|
927
|
+
iconBefore: /* @__PURE__ */ z(ue, {
|
|
928
|
+
size: m.SM,
|
|
750
929
|
"aria-hidden": !0,
|
|
751
|
-
stroke:
|
|
930
|
+
stroke: h
|
|
752
931
|
}),
|
|
753
|
-
onClick:
|
|
754
|
-
disabled:
|
|
932
|
+
onClick: r,
|
|
933
|
+
disabled: o,
|
|
755
934
|
className: "shrink-0"
|
|
756
935
|
}),
|
|
757
|
-
!c &&
|
|
936
|
+
!c && n && /* @__PURE__ */ z(w, {
|
|
758
937
|
label: e.editButtonLabel,
|
|
759
|
-
iconBefore: /* @__PURE__ */
|
|
760
|
-
size:
|
|
938
|
+
iconBefore: /* @__PURE__ */ z(ce, {
|
|
939
|
+
size: m.SM,
|
|
761
940
|
"aria-hidden": !0,
|
|
762
|
-
stroke:
|
|
941
|
+
stroke: h
|
|
763
942
|
}),
|
|
764
|
-
onClick:
|
|
765
|
-
disabled:
|
|
943
|
+
onClick: n,
|
|
944
|
+
disabled: o,
|
|
766
945
|
className: "shrink-0"
|
|
767
946
|
})
|
|
768
947
|
]
|
|
769
948
|
})]
|
|
770
949
|
}),
|
|
771
|
-
|
|
950
|
+
/* @__PURE__ */ B("div", {
|
|
951
|
+
className: "flex min-w-0 items-center gap-2 px-8 py-3 desktop:hidden",
|
|
952
|
+
children: [/* @__PURE__ */ z("h1", {
|
|
953
|
+
className: a("truncate", fe),
|
|
954
|
+
children: g
|
|
955
|
+
}), c && /* @__PURE__ */ z("span", {
|
|
956
|
+
className: a("shrink-0", L, $.subtitleText),
|
|
957
|
+
children: e.deletedStateLabel
|
|
958
|
+
})]
|
|
959
|
+
}),
|
|
960
|
+
e.activeStatusAnnouncement != null && /* @__PURE__ */ z("span", {
|
|
772
961
|
role: "status",
|
|
773
962
|
"aria-live": "polite",
|
|
774
963
|
className: "sr-only",
|
|
775
964
|
children: e.activeStatusAnnouncement
|
|
776
965
|
}),
|
|
777
|
-
|
|
966
|
+
_ && /* @__PURE__ */ z("div", {
|
|
778
967
|
className: "flex flex-1 items-center justify-center",
|
|
779
|
-
children: /* @__PURE__ */
|
|
968
|
+
children: /* @__PURE__ */ z(A, {})
|
|
780
969
|
}),
|
|
781
|
-
!
|
|
970
|
+
!_ && b && /* @__PURE__ */ B("div", {
|
|
782
971
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
783
|
-
children: [/* @__PURE__ */
|
|
784
|
-
className: a(
|
|
972
|
+
children: [/* @__PURE__ */ z("p", {
|
|
973
|
+
className: a(L, $.subtitleText),
|
|
785
974
|
children: e.errorLabel
|
|
786
|
-
}), /* @__PURE__ */
|
|
975
|
+
}), /* @__PURE__ */ z(v, {
|
|
787
976
|
label: e.retryLabel,
|
|
788
977
|
onClick: x
|
|
789
978
|
})]
|
|
790
979
|
}),
|
|
791
|
-
!
|
|
980
|
+
!_ && !b && (ge ? /* @__PURE__ */ B("div", {
|
|
981
|
+
className: "flex flex-1 flex-col",
|
|
982
|
+
children: [/* @__PURE__ */ z(te, {
|
|
983
|
+
ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
|
|
984
|
+
className: "px-8",
|
|
985
|
+
tabs: U,
|
|
986
|
+
activeTabId: V,
|
|
987
|
+
onTabChange: H
|
|
988
|
+
}), /* @__PURE__ */ z("div", {
|
|
989
|
+
role: "tabpanel",
|
|
990
|
+
"aria-label": _e,
|
|
991
|
+
className: "flex flex-1 flex-col gap-5 px-8 py-6",
|
|
992
|
+
children: V === X.Configuration ? W : V === X.History ? G(Ne.Flow) : ve
|
|
993
|
+
})]
|
|
994
|
+
}) : /* @__PURE__ */ B("div", {
|
|
792
995
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
793
996
|
children: [
|
|
794
|
-
/* @__PURE__ */
|
|
997
|
+
/* @__PURE__ */ B("div", {
|
|
795
998
|
role: "group",
|
|
796
999
|
"aria-label": e.detailsTitle,
|
|
797
1000
|
className: a("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
|
|
798
|
-
children: [
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
}),
|
|
803
|
-
S && /* @__PURE__ */ U("div", {
|
|
804
|
-
className: "flex flex-col gap-1",
|
|
805
|
-
children: [/* @__PURE__ */ H("span", {
|
|
806
|
-
className: a(V, $.subtitleText),
|
|
807
|
-
children: e.descriptionLabel
|
|
808
|
-
}), /* @__PURE__ */ H("p", {
|
|
809
|
-
className: W,
|
|
810
|
-
children: S
|
|
811
|
-
})]
|
|
812
|
-
}),
|
|
813
|
-
w && /* @__PURE__ */ U("div", {
|
|
814
|
-
className: "flex flex-col gap-1",
|
|
815
|
-
children: [/* @__PURE__ */ H("span", {
|
|
816
|
-
className: a(V, $.subtitleText),
|
|
817
|
-
children: e.modelLabel
|
|
818
|
-
}), /* @__PURE__ */ H("p", {
|
|
819
|
-
className: W,
|
|
820
|
-
children: w
|
|
821
|
-
})]
|
|
822
|
-
}),
|
|
823
|
-
T && /* @__PURE__ */ U("div", {
|
|
824
|
-
className: "flex flex-col gap-1",
|
|
825
|
-
children: [/* @__PURE__ */ H("span", {
|
|
826
|
-
className: a(V, $.subtitleText),
|
|
827
|
-
children: e.repeatsLabel
|
|
828
|
-
}), /* @__PURE__ */ H("p", {
|
|
829
|
-
className: W,
|
|
830
|
-
children: T
|
|
831
|
-
})]
|
|
832
|
-
}),
|
|
833
|
-
E && /* @__PURE__ */ U("div", {
|
|
834
|
-
className: "flex flex-col gap-1",
|
|
835
|
-
children: [/* @__PURE__ */ H("span", {
|
|
836
|
-
className: a(V, $.subtitleText),
|
|
837
|
-
children: e.activeWindowLabel
|
|
838
|
-
}), /* @__PURE__ */ H("p", {
|
|
839
|
-
className: W,
|
|
840
|
-
children: E
|
|
841
|
-
})]
|
|
842
|
-
})
|
|
843
|
-
]
|
|
1001
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
1002
|
+
className: I,
|
|
1003
|
+
children: e.detailsTitle
|
|
1004
|
+
}), ve]
|
|
844
1005
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
1006
|
+
/* @__PURE__ */ B("div", {
|
|
846
1007
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
847
|
-
children: [/* @__PURE__ */
|
|
848
|
-
className:
|
|
1008
|
+
children: [/* @__PURE__ */ z("h2", {
|
|
1009
|
+
className: I,
|
|
849
1010
|
children: e.configurationTitle
|
|
850
|
-
}),
|
|
851
|
-
role: "group",
|
|
852
|
-
"aria-label": e.instructionsLabel,
|
|
853
|
-
className: "flex flex-col gap-1",
|
|
854
|
-
children: [/* @__PURE__ */ H("span", {
|
|
855
|
-
className: a(V, $.subtitleText),
|
|
856
|
-
children: e.instructionsLabel
|
|
857
|
-
}), O && ((e) => k ? k(e) : /* @__PURE__ */ H(n, { content: e }))(O)]
|
|
858
|
-
})]
|
|
1011
|
+
}), W]
|
|
859
1012
|
}),
|
|
860
|
-
/* @__PURE__ */
|
|
1013
|
+
/* @__PURE__ */ z("div", {
|
|
861
1014
|
className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
|
|
862
|
-
children:
|
|
863
|
-
className: a("flex max-h-[70vh] w-full flex-col overflow-y-auto rounded-xl shadow-md desktop:w-[360px]", $.historyCard),
|
|
864
|
-
children: [/* @__PURE__ */ U("div", {
|
|
865
|
-
className: a("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", $.historyCard),
|
|
866
|
-
children: [
|
|
867
|
-
/* @__PURE__ */ H("h2", {
|
|
868
|
-
className: B,
|
|
869
|
-
children: e.historyTitle
|
|
870
|
-
}),
|
|
871
|
-
D && /* @__PURE__ */ H("p", {
|
|
872
|
-
className: a(G, $.subtitleText),
|
|
873
|
-
children: D
|
|
874
|
-
}),
|
|
875
|
-
e.historyLoadingMoreLabel && /* @__PURE__ */ H("span", {
|
|
876
|
-
role: "status",
|
|
877
|
-
"aria-live": "polite",
|
|
878
|
-
className: "sr-only",
|
|
879
|
-
children: P ? e.historyLoadingMoreLabel : ""
|
|
880
|
-
})
|
|
881
|
-
]
|
|
882
|
-
}), /* @__PURE__ */ H("div", {
|
|
883
|
-
className: "flex flex-1 flex-col gap-4 px-6 pb-2",
|
|
884
|
-
children: /* @__PURE__ */ H(Oe, {
|
|
885
|
-
items: M,
|
|
886
|
-
isLoading: N,
|
|
887
|
-
isLoadingMore: P,
|
|
888
|
-
skeletonCount: F,
|
|
889
|
-
error: te,
|
|
890
|
-
onRetry: ne,
|
|
891
|
-
onRunClick: L,
|
|
892
|
-
labels: {
|
|
893
|
-
historyTitle: e.historyTitle,
|
|
894
|
-
emptyLabel: e.historyEmptyLabel,
|
|
895
|
-
errorLabel: e.historyErrorLabel,
|
|
896
|
-
retryLabel: e.historyRetryLabel,
|
|
897
|
-
runStatusLabels: e.runStatusLabels,
|
|
898
|
-
unreadIndicatorLabel: e.unreadIndicatorLabel
|
|
899
|
-
},
|
|
900
|
-
footer: ce,
|
|
901
|
-
styles: {
|
|
902
|
-
typography: { runTimestampClassName: G },
|
|
903
|
-
colors: {
|
|
904
|
-
successIconColor: R?.successIconColor,
|
|
905
|
-
errorIconColor: R?.errorIconColor,
|
|
906
|
-
missedIconColor: R?.missedIconColor,
|
|
907
|
-
unreadDotColor: R?.unreadDotColor
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
})
|
|
911
|
-
})]
|
|
912
|
-
})
|
|
1015
|
+
children: G(Ne.Card)
|
|
913
1016
|
})
|
|
914
1017
|
]
|
|
915
|
-
})
|
|
1018
|
+
}))
|
|
916
1019
|
]
|
|
917
1020
|
});
|
|
918
|
-
},
|
|
1021
|
+
}, Ue = ({ modelLabel: e, instructionsLabel: t, modelDisplayName: r, instructionsMarkdown: i, renderInstructions: a, styles: o }) => {
|
|
919
1022
|
let s = o?.typography?.fieldLabelClassName ?? "dial-tiny-text", c = o?.typography?.fieldValueClassName ?? "dial-body-text";
|
|
920
|
-
return /* @__PURE__ */
|
|
1023
|
+
return /* @__PURE__ */ B("div", {
|
|
921
1024
|
className: "flex flex-col gap-3",
|
|
922
|
-
children: [r && /* @__PURE__ */
|
|
1025
|
+
children: [r && /* @__PURE__ */ B("div", {
|
|
923
1026
|
className: "flex flex-col gap-2",
|
|
924
|
-
children: [/* @__PURE__ */
|
|
1027
|
+
children: [/* @__PURE__ */ z("span", {
|
|
925
1028
|
className: s,
|
|
926
1029
|
children: e
|
|
927
|
-
}), /* @__PURE__ */
|
|
1030
|
+
}), /* @__PURE__ */ z("p", {
|
|
928
1031
|
className: c,
|
|
929
1032
|
children: r
|
|
930
1033
|
})]
|
|
931
|
-
}), i && /* @__PURE__ */
|
|
1034
|
+
}), i && /* @__PURE__ */ B("div", {
|
|
932
1035
|
className: "flex flex-col gap-2",
|
|
933
|
-
children: [/* @__PURE__ */
|
|
1036
|
+
children: [/* @__PURE__ */ z("span", {
|
|
934
1037
|
className: s,
|
|
935
1038
|
children: t
|
|
936
|
-
}), ((e) => a ? a(e) : /* @__PURE__ */
|
|
1039
|
+
}), ((e) => a ? a(e) : /* @__PURE__ */ z(n, { content: e }))(i)]
|
|
937
1040
|
})]
|
|
938
1041
|
});
|
|
939
1042
|
};
|
|
940
1043
|
//#endregion
|
|
941
|
-
export {
|
|
1044
|
+
export { we as DESCRIPTION_MAX_LENGTH, U as ScheduledTaskCard, ye as ScheduledTaskCardGrid, G as ScheduledTaskCardSkeleton, Me as ScheduledTaskCreateForm, He as ScheduledTaskDetailView, Ue as ScheduledTaskDetailsSummary, q as ScheduledTaskRepeat, ze as ScheduledTaskRunHistoryList, Z as ScheduledTaskRunStatus, Se as ScheduledTasks, Ce as ScheduledTasksSortKey };
|