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