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