@epam/ai-dial-scheduled-tasks 1.1.0-dev.127 → 1.1.0-dev.128
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":"ScheduledTaskCardSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCardSkeleton/ScheduledTaskCardSkeleton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScheduledTaskCardSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCardSkeleton/ScheduledTaskCardSkeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAStG;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CA0CxE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledTaskCreateForm.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAuC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"ScheduledTaskCreateForm.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAuC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AA2B7F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAqYpE,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MDMessageViewer as e, PanelEmptyState as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
import { SearchBar as i } from "@epam/ai-dial-kit";
|
|
3
|
-
import { ButtonAppearance as a, ButtonDropdown as o, ButtonVariant as s, Calendar as c, CalendarMode as l, CardShell as u, DIAL_ICON_SIZE as d,
|
|
3
|
+
import { ButtonAppearance as a, ButtonDropdown as o, ButtonVariant as s, Calendar as c, CalendarMode as l, CardShell as u, DIAL_ICON_SIZE as d, Dropdown as f, FolderPath as p, GhostButton as m, GhostIconButton as h, Highlight as g, IconButton as _, Input as v, LazyMarkdownEditor as y, NeutralButton as b, PrimaryButton as x, Select as S, Skeleton as C, SkeletonVariant as w, Spinner as T, Textarea as E } from "@epam/ai-dial-ui-kit";
|
|
4
4
|
import { IconAlertTriangle as D, IconArrowLeft as O, IconCalendarTime as k, IconCircleCheck as A, IconCircleX as j, IconDotsVertical as M, IconEdit as N, IconPencilMinus as P, IconPlayerPlay as F, IconPlus as I, IconTrash as L } from "@tabler/icons-react";
|
|
5
5
|
import { Suspense as ee, lazy as R, useEffect as te, useMemo as z, useRef as ne } from "react";
|
|
6
6
|
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
@@ -16,8 +16,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
16
16
|
locationLeaf: "_locationLeaf_1xv9i_22",
|
|
17
17
|
newBadge: "_newBadge_1xv9i_26",
|
|
18
18
|
locationDivider: "_locationDivider_1xv9i_31"
|
|
19
|
-
}, G = ({ item: e, searchQuery: t = "", onEdit: i, onRunNow: a, onDelete: o, onCardClick: s, labels: c, styles: l, className:
|
|
20
|
-
let
|
|
19
|
+
}, G = ({ item: e, searchQuery: t = "", onEdit: i, onRunNow: a, onDelete: o, onCardClick: s, labels: c, styles: l, className: m }) => {
|
|
20
|
+
let h = c?.newBadgeLabel ?? "NEW", v = c?.actionsLabel ?? "More actions", y = c?.editActionLabel ?? "Edit", b = c?.runNowActionLabel ?? "Run now", x = c?.deleteActionLabel ?? "Delete", { colors: S, typography: C } = l ?? {}, w = C?.titleClassName ?? "dial-body-semi-text", T = C?.descriptionClassName ?? "dial-small-text", E = C?.scheduleLabelClassName ?? "dial-tiny-text", D = C?.locationLabelClassName ?? "dial-tiny-text", O = C?.locationLeafClassName ?? "dial-tiny-semi-text", k = C?.newBadgeClassName ?? "dial-tiny-semi-text", A = n({
|
|
21
21
|
"--stc-title-text": S?.titleText,
|
|
22
22
|
"--stc-desc-text": S?.descriptionText,
|
|
23
23
|
"--stc-pill-bg": S?.schedulePillBackground,
|
|
@@ -31,7 +31,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
31
31
|
}), j = [];
|
|
32
32
|
i && j.push({
|
|
33
33
|
key: "edit",
|
|
34
|
-
label:
|
|
34
|
+
label: y,
|
|
35
35
|
icon: /* @__PURE__ */ V(N, {
|
|
36
36
|
size: d.SM,
|
|
37
37
|
"aria-hidden": !0
|
|
@@ -41,7 +41,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
41
41
|
}
|
|
42
42
|
}), a && j.push({
|
|
43
43
|
key: "runNow",
|
|
44
|
-
label:
|
|
44
|
+
label: b,
|
|
45
45
|
icon: /* @__PURE__ */ V(F, {
|
|
46
46
|
size: d.SM,
|
|
47
47
|
"aria-hidden": !0
|
|
@@ -72,32 +72,32 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
72
72
|
role: s ? "button" : "group",
|
|
73
73
|
"aria-label": e.displayName,
|
|
74
74
|
style: A,
|
|
75
|
-
className: r("h-[232px]", s && "cursor-pointer",
|
|
75
|
+
className: r("h-[232px]", s && "cursor-pointer", m),
|
|
76
76
|
...P,
|
|
77
77
|
children: [
|
|
78
78
|
/* @__PURE__ */ H("div", {
|
|
79
79
|
className: "flex shrink-0 items-start justify-between gap-2",
|
|
80
80
|
children: [/* @__PURE__ */ H("div", {
|
|
81
81
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
82
|
-
children: [/* @__PURE__ */ V(
|
|
82
|
+
children: [/* @__PURE__ */ V(g, {
|
|
83
83
|
text: e.displayName,
|
|
84
84
|
query: t,
|
|
85
85
|
maxLines: 1,
|
|
86
86
|
className: r(w, W.title)
|
|
87
87
|
}), e.isNew && /* @__PURE__ */ V("span", {
|
|
88
88
|
className: r("shrink-0 rounded-full px-2 py-0.5", k, W.newBadge),
|
|
89
|
-
children:
|
|
89
|
+
children: h
|
|
90
90
|
})]
|
|
91
91
|
}), j.length > 0 && /* @__PURE__ */ V(f, {
|
|
92
92
|
items: j,
|
|
93
93
|
matchReferenceWidth: !1,
|
|
94
94
|
placement: "bottom-end",
|
|
95
|
-
children: /* @__PURE__ */ V(
|
|
95
|
+
children: /* @__PURE__ */ V(_, {
|
|
96
96
|
icon: /* @__PURE__ */ V(M, {
|
|
97
97
|
size: d.SM,
|
|
98
98
|
"aria-hidden": !0
|
|
99
99
|
}),
|
|
100
|
-
"aria-label":
|
|
100
|
+
"aria-label": v,
|
|
101
101
|
className: "shrink-0",
|
|
102
102
|
onClick: (e) => e.stopPropagation()
|
|
103
103
|
})
|
|
@@ -115,7 +115,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
115
115
|
className: r("inline-block rounded-lg border px-2 py-1", W.schedulePill, E, W.scheduleLabel),
|
|
116
116
|
children: e.scheduleLabel
|
|
117
117
|
})
|
|
118
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ V(
|
|
118
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ V(p, {
|
|
119
119
|
segments: e.locationSegments,
|
|
120
120
|
labelClassName: r(D, W.locationLabel),
|
|
121
121
|
leafClassName: r(O, W.locationLeaf),
|
|
@@ -133,8 +133,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
133
133
|
style: n({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
134
134
|
className: r("h-[232px]", re.card),
|
|
135
135
|
children: [
|
|
136
|
-
/* @__PURE__ */ V(
|
|
137
|
-
variant:
|
|
136
|
+
/* @__PURE__ */ V(C, {
|
|
137
|
+
variant: w.Rectangular,
|
|
138
138
|
width: "60%",
|
|
139
139
|
height: "20px",
|
|
140
140
|
color: K,
|
|
@@ -142,15 +142,15 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
142
142
|
}),
|
|
143
143
|
/* @__PURE__ */ V("div", {
|
|
144
144
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
145
|
-
children: ie.map((e, t) => /* @__PURE__ */ V(
|
|
146
|
-
variant:
|
|
145
|
+
children: ie.map((e, t) => /* @__PURE__ */ V(C, {
|
|
146
|
+
variant: w.Rectangular,
|
|
147
147
|
width: e,
|
|
148
148
|
height: "16px",
|
|
149
149
|
color: K
|
|
150
150
|
}, t))
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */ V(
|
|
153
|
-
variant:
|
|
152
|
+
/* @__PURE__ */ V(C, {
|
|
153
|
+
variant: w.Rectangular,
|
|
154
154
|
width: "110px",
|
|
155
155
|
height: "28px",
|
|
156
156
|
color: K,
|
|
@@ -199,7 +199,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
199
199
|
if (!e || e === document.body) return null;
|
|
200
200
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
201
201
|
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : de(e.parentElement);
|
|
202
|
-
}, fe = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items:
|
|
202
|
+
}, fe = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items: h, isLoading: g = !1, error: _, onRetry: v, hasMore: y = !1, isLoadingMore: b = !1, skeletonCount: S = 6, onLoadMore: C, onEdit: w, onRunNow: E, onDelete: D, onCardClick: O, styles: A }) => {
|
|
203
203
|
let { colors: j, typography: M, emptyStateIconSize: N = 48 } = A ?? {}, P = M?.titleClassName ?? "dial-h1-text", F = M?.subtitleClassName ?? "dial-body-text", L = n({
|
|
204
204
|
"--st-bg": j?.background,
|
|
205
205
|
"--st-subtitle-text": j?.subtitleText,
|
|
@@ -209,39 +209,39 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
209
209
|
return le.map((e) => ({
|
|
210
210
|
key: e,
|
|
211
211
|
title: t[e],
|
|
212
|
-
items:
|
|
212
|
+
items: h.filter((t) => t.sectionKey === e)
|
|
213
213
|
})).filter((e) => e.items.length > 0);
|
|
214
|
-
}, [
|
|
214
|
+
}, [h, e.sharedSectionTitle]), B = ue(g, b, !!_, h.length, l.trim().length > 0, e), W = ne(null);
|
|
215
215
|
te(() => {
|
|
216
216
|
let e = W.current;
|
|
217
|
-
if (!e || !
|
|
217
|
+
if (!e || !C) return;
|
|
218
218
|
let t = de(e.parentElement);
|
|
219
219
|
if (!t) return;
|
|
220
220
|
let n = () => {
|
|
221
|
-
if (b ||
|
|
221
|
+
if (b || g || !y) return;
|
|
222
222
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
223
|
-
r.top < n.bottom && r.bottom > n.top &&
|
|
223
|
+
r.top < n.bottom && r.bottom > n.top && C();
|
|
224
224
|
};
|
|
225
225
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
226
226
|
}, [
|
|
227
227
|
y,
|
|
228
228
|
b,
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
g,
|
|
230
|
+
C
|
|
231
231
|
]);
|
|
232
232
|
let G = () => {
|
|
233
|
-
if (
|
|
234
|
-
if (
|
|
233
|
+
if (g) return /* @__PURE__ */ V(T, {});
|
|
234
|
+
if (_) return /* @__PURE__ */ H("div", {
|
|
235
235
|
className: "flex flex-col items-center gap-3",
|
|
236
236
|
children: [/* @__PURE__ */ V("p", {
|
|
237
237
|
className: r(F, q.subtitle),
|
|
238
238
|
children: e.errorLabel
|
|
239
|
-
}), /* @__PURE__ */ V(
|
|
239
|
+
}), /* @__PURE__ */ V(m, {
|
|
240
240
|
label: e.retryLabel,
|
|
241
241
|
onClick: v
|
|
242
242
|
})]
|
|
243
243
|
});
|
|
244
|
-
if (
|
|
244
|
+
if (h.length === 0) return l.trim() ? /* @__PURE__ */ V("p", {
|
|
245
245
|
className: r(F, q.subtitle),
|
|
246
246
|
children: e.noResultsLabel
|
|
247
247
|
}) : /* @__PURE__ */ V(t, {
|
|
@@ -261,12 +261,12 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
261
261
|
children: /* @__PURE__ */ V(oe, {
|
|
262
262
|
items: t.items,
|
|
263
263
|
searchQuery: l,
|
|
264
|
-
onEdit:
|
|
264
|
+
onEdit: w,
|
|
265
265
|
onRunNow: E,
|
|
266
266
|
onDelete: D,
|
|
267
267
|
onCardClick: O,
|
|
268
268
|
labels: e.cardLabels,
|
|
269
|
-
trailingSkeletonCount: b && r === n ?
|
|
269
|
+
trailingSkeletonCount: b && r === n ? S : 0,
|
|
270
270
|
skeletonStyles: { colors: { skeletonColor: j?.skeletonColor } }
|
|
271
271
|
})
|
|
272
272
|
}, t.key)), /* @__PURE__ */ V("div", {
|
|
@@ -275,7 +275,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
275
275
|
className: "h-px w-full"
|
|
276
276
|
})]
|
|
277
277
|
});
|
|
278
|
-
}, re =
|
|
278
|
+
}, re = g || !!_ || h.length === 0;
|
|
279
279
|
return /* @__PURE__ */ H("div", {
|
|
280
280
|
style: L,
|
|
281
281
|
className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", q.container),
|
|
@@ -291,7 +291,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
291
291
|
className: r("mt-1", F, q.subtitle),
|
|
292
292
|
children: e.subtitle
|
|
293
293
|
})]
|
|
294
|
-
}), /* @__PURE__ */ V(
|
|
294
|
+
}), /* @__PURE__ */ V(x, {
|
|
295
295
|
label: e.createButtonLabel,
|
|
296
296
|
iconBefore: /* @__PURE__ */ V(I, {
|
|
297
297
|
size: d.SM,
|
|
@@ -347,48 +347,48 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
347
347
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
348
348
|
}({}), me = 500, J = /* @__PURE__ */ function(e) {
|
|
349
349
|
return e.Once = "once", e.Recurring = "recurring", e;
|
|
350
|
-
}({}),
|
|
350
|
+
}({}), he = /* @__PURE__ */ function(e) {
|
|
351
351
|
return e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
352
|
-
}({}),
|
|
352
|
+
}({}), Y = (e) => String(e).padStart(2, "0"), ge = (e) => e ? new Date(e) : null, _e = (e) => {
|
|
353
353
|
if (e == null) return "";
|
|
354
354
|
let t = e instanceof Date ? e : new Date(e);
|
|
355
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${
|
|
356
|
-
},
|
|
355
|
+
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${Y(t.getMonth() + 1)}-${Y(t.getDate())}T${Y(t.getHours())}:${Y(t.getMinutes())}`;
|
|
356
|
+
}, ve = (e) => {
|
|
357
357
|
if (!e) return null;
|
|
358
358
|
let [t, n, r] = e.split("-").map(Number);
|
|
359
359
|
return new Date(t, n - 1, r);
|
|
360
|
-
},
|
|
360
|
+
}, ye = (e) => {
|
|
361
361
|
if (e == null) return "";
|
|
362
362
|
let t = e instanceof Date ? e : new Date(e);
|
|
363
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${
|
|
364
|
-
},
|
|
363
|
+
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${Y(t.getMonth() + 1)}-${Y(t.getDate())}`;
|
|
364
|
+
}, be = (e) => {
|
|
365
365
|
let t = Number(e);
|
|
366
366
|
return e && Number.isFinite(t) ? String(t + 1) : null;
|
|
367
|
-
},
|
|
367
|
+
}, xe = (e) => {
|
|
368
368
|
let t = typeof e == "string" ? Number(e) : NaN;
|
|
369
369
|
return Number.isFinite(t) ? String(t - 1) : "";
|
|
370
|
-
},
|
|
370
|
+
}, X = {
|
|
371
371
|
container: "_container_sq3dp_1",
|
|
372
372
|
header: "_header_sq3dp_5",
|
|
373
373
|
detailsColumn: "_detailsColumn_sq3dp_9",
|
|
374
374
|
sectionSubtitle: "_sectionSubtitle_sq3dp_13",
|
|
375
375
|
instructionsError: "_instructionsError_sq3dp_17"
|
|
376
|
-
},
|
|
377
|
-
let { colors: _, typography: y } = g ?? {},
|
|
376
|
+
}, Z = (e) => `${e} *`, Se = R(async () => ({ default: (await y()).MarkdownEditor })), Ce = ({ labels: e, values: t, errors: i, modelOptions: a, onFieldChange: o, onBack: s, onCancel: u, onSubmit: f, isSubmitting: p = !1, markdownEditorTheme: m, styles: g }) => {
|
|
377
|
+
let { colors: _, typography: y } = g ?? {}, C = y?.titleClassName ?? "dial-h1-text", w = y?.sectionTitleClassName ?? "dial-body-semi-text", D = y?.sectionSubtitleClassName ?? "dial-tiny-text", k = y?.scheduleSectionLabelClassName ?? "dial-body-semi-text mb-1", A = y?.instructionsErrorClassName ?? "dial-small-text", j = n({
|
|
378
378
|
"--stcf-bg": _?.background,
|
|
379
379
|
"--stcf-header-border": _?.headerBorder,
|
|
380
380
|
"--stcf-details-border": _?.detailsColumnBorder,
|
|
381
381
|
"--stcf-subtitle-text": _?.sectionSubtitleText,
|
|
382
382
|
"--stcf-error-text": _?.instructionsErrorText
|
|
383
|
-
}), M =
|
|
383
|
+
}), M = p || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
|
|
384
384
|
return /* @__PURE__ */ H("div", {
|
|
385
385
|
style: j,
|
|
386
|
-
className: r("flex h-full w-full flex-col overflow-y-auto",
|
|
386
|
+
className: r("flex h-full w-full flex-col overflow-y-auto", X.container),
|
|
387
387
|
children: [/* @__PURE__ */ H("div", {
|
|
388
|
-
className: r("flex h-16 items-center justify-between gap-6 border-b px-8",
|
|
388
|
+
className: r("flex h-16 items-center justify-between gap-6 border-b px-8", X.header),
|
|
389
389
|
children: [/* @__PURE__ */ H("div", {
|
|
390
390
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
391
|
-
children: [/* @__PURE__ */ V(
|
|
391
|
+
children: [/* @__PURE__ */ V(h, {
|
|
392
392
|
icon: /* @__PURE__ */ V(O, {
|
|
393
393
|
size: d.LG,
|
|
394
394
|
className: "rtl:scale-x-[-1]",
|
|
@@ -397,16 +397,16 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
397
397
|
"aria-label": e.backButtonLabel,
|
|
398
398
|
onClick: s
|
|
399
399
|
}), /* @__PURE__ */ V("h1", {
|
|
400
|
-
className: r("truncate",
|
|
400
|
+
className: r("truncate", C),
|
|
401
401
|
children: e.pageTitle
|
|
402
402
|
})]
|
|
403
403
|
}), /* @__PURE__ */ H("div", {
|
|
404
404
|
className: "flex items-center gap-2",
|
|
405
|
-
children: [/* @__PURE__ */ V(
|
|
405
|
+
children: [/* @__PURE__ */ V(b, {
|
|
406
406
|
label: e.cancelButtonLabel,
|
|
407
407
|
onClick: u,
|
|
408
|
-
disabled:
|
|
409
|
-
}), /* @__PURE__ */ V(
|
|
408
|
+
disabled: p
|
|
409
|
+
}), /* @__PURE__ */ V(x, {
|
|
410
410
|
label: e.createButtonLabel,
|
|
411
411
|
onClick: f,
|
|
412
412
|
disabled: M
|
|
@@ -418,19 +418,19 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
418
418
|
/* @__PURE__ */ H("div", {
|
|
419
419
|
role: "group",
|
|
420
420
|
"aria-label": e.detailsSectionTitle,
|
|
421
|
-
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0",
|
|
421
|
+
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", X.detailsColumn),
|
|
422
422
|
children: [
|
|
423
423
|
/* @__PURE__ */ H("div", {
|
|
424
424
|
className: "flex flex-col gap-1",
|
|
425
425
|
children: [/* @__PURE__ */ V("h2", {
|
|
426
|
-
className:
|
|
426
|
+
className: w,
|
|
427
427
|
children: e.detailsSectionTitle
|
|
428
428
|
}), /* @__PURE__ */ V("p", {
|
|
429
|
-
className: r(D,
|
|
429
|
+
className: r(D, X.sectionSubtitle),
|
|
430
430
|
children: e.detailsSectionSubtitle
|
|
431
431
|
})]
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */ V(
|
|
433
|
+
/* @__PURE__ */ V(v, {
|
|
434
434
|
id: "scheduled-task-display-name",
|
|
435
435
|
value: t.displayName,
|
|
436
436
|
onChange: (e) => o("displayName", e ?? ""),
|
|
@@ -451,9 +451,11 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
451
451
|
error: i.description,
|
|
452
452
|
caption: t.description ? `${t.description.length}/500` : void 0
|
|
453
453
|
}),
|
|
454
|
-
/* @__PURE__ */ V(
|
|
455
|
-
|
|
456
|
-
|
|
454
|
+
/* @__PURE__ */ V(S, {
|
|
455
|
+
labelProps: {
|
|
456
|
+
label: e.modelOrAgentLabel,
|
|
457
|
+
required: !0
|
|
458
|
+
},
|
|
457
459
|
value: t.modelId,
|
|
458
460
|
placeholder: e.modelPlaceholder,
|
|
459
461
|
onChange: (e) => o("modelId", e),
|
|
@@ -470,8 +472,8 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
470
472
|
className: k,
|
|
471
473
|
children: e.scheduleSectionLabel
|
|
472
474
|
}),
|
|
473
|
-
/* @__PURE__ */ V(
|
|
474
|
-
label: e.scheduleTypeAriaLabel,
|
|
475
|
+
/* @__PURE__ */ V(S, {
|
|
476
|
+
labelProps: { label: e.scheduleTypeAriaLabel },
|
|
475
477
|
value: t.scheduleType,
|
|
476
478
|
onChange: (e) => o("scheduleType", e),
|
|
477
479
|
options: [{
|
|
@@ -487,18 +489,18 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
487
489
|
children: [/* @__PURE__ */ V(c, {
|
|
488
490
|
id: "scheduled-task-run-at",
|
|
489
491
|
mode: l.DateTime,
|
|
490
|
-
value:
|
|
491
|
-
onChange: (e) => o("runAt",
|
|
492
|
-
label:
|
|
492
|
+
value: ge(t.runAt),
|
|
493
|
+
onChange: (e) => o("runAt", _e(e)),
|
|
494
|
+
label: Z(e.runAtLabel),
|
|
493
495
|
invalid: !!i.runAt
|
|
494
496
|
}), i.runAt && /* @__PURE__ */ V("p", {
|
|
495
|
-
className: r(A,
|
|
497
|
+
className: r(A, X.instructionsError),
|
|
496
498
|
children: i.runAt
|
|
497
499
|
})]
|
|
498
500
|
}),
|
|
499
501
|
t.scheduleType === J.Recurring && /* @__PURE__ */ H(B, { children: [
|
|
500
|
-
/* @__PURE__ */ V(
|
|
501
|
-
label: e.frequencyLabel,
|
|
502
|
+
/* @__PURE__ */ V(S, {
|
|
503
|
+
labelProps: { label: e.frequencyLabel },
|
|
502
504
|
value: t.frequency,
|
|
503
505
|
onChange: (e) => o("frequency", e),
|
|
504
506
|
options: e.frequencyOptions.map((e) => ({
|
|
@@ -513,28 +515,28 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
513
515
|
mode: l.Time,
|
|
514
516
|
value: t.time,
|
|
515
517
|
onChange: (e) => o("time", typeof e == "string" ? e : ""),
|
|
516
|
-
label:
|
|
518
|
+
label: Z(e.timeLabel),
|
|
517
519
|
invalid: !!i.time
|
|
518
520
|
}), i.time && /* @__PURE__ */ V("p", {
|
|
519
|
-
className: r(A,
|
|
521
|
+
className: r(A, X.instructionsError),
|
|
520
522
|
children: i.time
|
|
521
523
|
})]
|
|
522
524
|
}),
|
|
523
|
-
t.frequency ===
|
|
525
|
+
t.frequency === he.Weekly && /* @__PURE__ */ H("div", {
|
|
524
526
|
className: "flex flex-col gap-1",
|
|
525
527
|
children: [/* @__PURE__ */ V(c, {
|
|
526
528
|
id: "scheduled-task-day-of-week",
|
|
527
529
|
mode: l.Weekday,
|
|
528
|
-
value:
|
|
529
|
-
onChange: (e) => o("dayOfWeek",
|
|
530
|
-
label:
|
|
530
|
+
value: be(t.dayOfWeek),
|
|
531
|
+
onChange: (e) => o("dayOfWeek", xe(e)),
|
|
532
|
+
label: Z(e.dayOfWeekLabel),
|
|
531
533
|
invalid: !!i.dayOfWeek
|
|
532
534
|
}), i.dayOfWeek && /* @__PURE__ */ V("p", {
|
|
533
|
-
className: r(A,
|
|
535
|
+
className: r(A, X.instructionsError),
|
|
534
536
|
children: i.dayOfWeek
|
|
535
537
|
})]
|
|
536
538
|
}),
|
|
537
|
-
t.frequency ===
|
|
539
|
+
t.frequency === he.Monthly && /* @__PURE__ */ V(v, {
|
|
538
540
|
id: "scheduled-task-day-of-month",
|
|
539
541
|
value: t.dayOfMonth ?? "",
|
|
540
542
|
onChange: (e) => o("dayOfMonth", e ?? ""),
|
|
@@ -552,13 +554,13 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
552
554
|
children: [/* @__PURE__ */ V(c, {
|
|
553
555
|
id: "scheduled-task-start-date",
|
|
554
556
|
mode: l.Date,
|
|
555
|
-
value:
|
|
556
|
-
onChange: (e) => o("startDate",
|
|
557
|
+
value: ve(t.startDate),
|
|
558
|
+
onChange: (e) => o("startDate", ye(e)),
|
|
557
559
|
label: e.startDateLabel,
|
|
558
560
|
placeholder: e.startDatePlaceholder,
|
|
559
561
|
invalid: !!i.startDate
|
|
560
562
|
}), i.startDate && /* @__PURE__ */ V("p", {
|
|
561
|
-
className: r(A,
|
|
563
|
+
className: r(A, X.instructionsError),
|
|
562
564
|
children: i.startDate
|
|
563
565
|
})]
|
|
564
566
|
}), /* @__PURE__ */ H("div", {
|
|
@@ -566,13 +568,13 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
566
568
|
children: [/* @__PURE__ */ V(c, {
|
|
567
569
|
id: "scheduled-task-end-date",
|
|
568
570
|
mode: l.Date,
|
|
569
|
-
value:
|
|
570
|
-
onChange: (e) => o("endDate",
|
|
571
|
+
value: ve(t.endDate),
|
|
572
|
+
onChange: (e) => o("endDate", ye(e)),
|
|
571
573
|
label: e.endDateLabel,
|
|
572
574
|
placeholder: e.endDatePlaceholder,
|
|
573
575
|
invalid: !!i.endDate
|
|
574
576
|
}), i.endDate && /* @__PURE__ */ V("p", {
|
|
575
|
-
className: r(A,
|
|
577
|
+
className: r(A, X.instructionsError),
|
|
576
578
|
children: i.endDate
|
|
577
579
|
})]
|
|
578
580
|
})]
|
|
@@ -589,10 +591,10 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
589
591
|
children: [/* @__PURE__ */ H("div", {
|
|
590
592
|
className: "flex flex-col gap-1",
|
|
591
593
|
children: [/* @__PURE__ */ V("h2", {
|
|
592
|
-
className:
|
|
594
|
+
className: w,
|
|
593
595
|
children: e.configurationSectionTitle
|
|
594
596
|
}), /* @__PURE__ */ V("p", {
|
|
595
|
-
className: r(D,
|
|
597
|
+
className: r(D, X.sectionSubtitle),
|
|
596
598
|
children: e.configurationSectionSubtitle
|
|
597
599
|
})]
|
|
598
600
|
}), /* @__PURE__ */ H("div", {
|
|
@@ -610,11 +612,11 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
610
612
|
value: t.prompt,
|
|
611
613
|
onChange: (e) => o("prompt", e),
|
|
612
614
|
height: 480,
|
|
613
|
-
theme:
|
|
615
|
+
theme: m
|
|
614
616
|
})
|
|
615
617
|
}),
|
|
616
618
|
i.prompt && /* @__PURE__ */ V("p", {
|
|
617
|
-
className: r(A,
|
|
619
|
+
className: r(A, X.instructionsError),
|
|
618
620
|
children: i.prompt
|
|
619
621
|
})
|
|
620
622
|
]
|
|
@@ -665,7 +667,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
665
667
|
});
|
|
666
668
|
default: return null;
|
|
667
669
|
}
|
|
668
|
-
}, Ee = ({ labels: t, onBack: i, onEdit: a, displayName: o, isLoading: s = !1, error: c, onRetry: l, description: u, modelLabel: f, repeatsLabel: p, activeWindowLabel: g, nextRunLabel:
|
|
670
|
+
}, Ee = ({ labels: t, onBack: i, onEdit: a, displayName: o, isLoading: s = !1, error: c, onRetry: l, description: u, modelLabel: f, repeatsLabel: p, activeWindowLabel: g, nextRunLabel: _, instructionsMarkdown: v, renderInstructions: y, runs: x, runsIsLoading: S = !1, runsIsLoadingMore: E = !1, runsSkeletonCount: D = 6, runsError: k, onRunsRetry: A, runsHasMore: j = !1, onRunsLoadMore: M, onRunClick: N, styles: F }) => {
|
|
669
671
|
let { colors: I, typography: L } = F ?? {}, ee = L?.titleClassName ?? "dial-h1-text", R = L?.sectionTitleClassName ?? "dial-body-semi-text", z = L?.fieldLabelClassName ?? "dial-tiny-text", B = L?.fieldValueClassName ?? "dial-body-text", U = L?.runTimestampClassName ?? "dial-small-text", W = n({
|
|
670
672
|
"--stdv-bg": I?.background,
|
|
671
673
|
"--stdv-header-border": I?.headerBorder,
|
|
@@ -682,7 +684,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
682
684
|
let t = we(e.parentElement);
|
|
683
685
|
if (!t) return;
|
|
684
686
|
let n = () => {
|
|
685
|
-
if (E ||
|
|
687
|
+
if (E || S || !j) return;
|
|
686
688
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
687
689
|
r.top < n.bottom && r.bottom > n.top && M();
|
|
688
690
|
};
|
|
@@ -690,10 +692,10 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
690
692
|
}, [
|
|
691
693
|
j,
|
|
692
694
|
E,
|
|
693
|
-
|
|
695
|
+
S,
|
|
694
696
|
M
|
|
695
697
|
]);
|
|
696
|
-
let re = (t) =>
|
|
698
|
+
let re = (t) => y ? y(t) : /* @__PURE__ */ V(e, { content: t }), ie = (e) => {
|
|
697
699
|
let n = `${t.runStatusLabels[e.status]} ${e.timestampLabel}`, i = !!N;
|
|
698
700
|
return /* @__PURE__ */ H("li", {
|
|
699
701
|
...i ? {
|
|
@@ -717,12 +719,12 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
717
719
|
}, K = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ H("li", {
|
|
718
720
|
"aria-hidden": "true",
|
|
719
721
|
className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
|
|
720
|
-
children: [/* @__PURE__ */ V(
|
|
721
|
-
variant:
|
|
722
|
+
children: [/* @__PURE__ */ V(C, {
|
|
723
|
+
variant: w.Rectangular,
|
|
722
724
|
width: "160px",
|
|
723
725
|
height: "16px"
|
|
724
|
-
}), /* @__PURE__ */ V(
|
|
725
|
-
variant:
|
|
726
|
+
}), /* @__PURE__ */ V(C, {
|
|
727
|
+
variant: w.Rectangular,
|
|
726
728
|
width: "16px",
|
|
727
729
|
height: "16px",
|
|
728
730
|
className: "shrink-0 rounded-full"
|
|
@@ -736,7 +738,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
736
738
|
className: r("flex h-16 shrink-0 items-center justify-between gap-2 border-b px-8", $.header),
|
|
737
739
|
children: [/* @__PURE__ */ H("div", {
|
|
738
740
|
className: "flex min-w-0 items-center gap-2",
|
|
739
|
-
children: [/* @__PURE__ */ V(
|
|
741
|
+
children: [/* @__PURE__ */ V(h, {
|
|
740
742
|
icon: /* @__PURE__ */ V(O, {
|
|
741
743
|
size: d.LG,
|
|
742
744
|
className: "rtl:scale-x-[-1]",
|
|
@@ -748,7 +750,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
748
750
|
className: r("truncate", ee),
|
|
749
751
|
children: o
|
|
750
752
|
})]
|
|
751
|
-
}), a && /* @__PURE__ */ V(
|
|
753
|
+
}), a && /* @__PURE__ */ V(b, {
|
|
752
754
|
label: t.editButtonLabel,
|
|
753
755
|
iconBefore: /* @__PURE__ */ V(P, {
|
|
754
756
|
size: d.SM,
|
|
@@ -767,7 +769,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
767
769
|
children: [/* @__PURE__ */ V("p", {
|
|
768
770
|
className: r(B, $.subtitleText),
|
|
769
771
|
children: t.errorLabel
|
|
770
|
-
}), /* @__PURE__ */ V(
|
|
772
|
+
}), /* @__PURE__ */ V(m, {
|
|
771
773
|
label: t.retryLabel,
|
|
772
774
|
onClick: l
|
|
773
775
|
})]
|
|
@@ -838,7 +840,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
838
840
|
children: [/* @__PURE__ */ V("span", {
|
|
839
841
|
className: z,
|
|
840
842
|
children: t.instructionsLabel
|
|
841
|
-
}),
|
|
843
|
+
}), v && re(v)]
|
|
842
844
|
})]
|
|
843
845
|
}),
|
|
844
846
|
/* @__PURE__ */ V("div", {
|
|
@@ -850,9 +852,9 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
850
852
|
className: R,
|
|
851
853
|
children: t.historyTitle
|
|
852
854
|
}),
|
|
853
|
-
|
|
855
|
+
_ && /* @__PURE__ */ V("p", {
|
|
854
856
|
className: r(U, $.subtitleText),
|
|
855
|
-
children:
|
|
857
|
+
children: _
|
|
856
858
|
}),
|
|
857
859
|
t.historyLoadingMoreLabel && /* @__PURE__ */ V("span", {
|
|
858
860
|
role: "status",
|
|
@@ -860,7 +862,7 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
860
862
|
className: "sr-only",
|
|
861
863
|
children: E ? t.historyLoadingMoreLabel : ""
|
|
862
864
|
}),
|
|
863
|
-
|
|
865
|
+
S && x.length === 0 ? /* @__PURE__ */ V("ul", {
|
|
864
866
|
"aria-label": t.historyTitle,
|
|
865
867
|
children: K(D)
|
|
866
868
|
}) : k ? /* @__PURE__ */ H("div", {
|
|
@@ -868,17 +870,17 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
868
870
|
children: [/* @__PURE__ */ V("p", {
|
|
869
871
|
className: r(B, $.subtitleText),
|
|
870
872
|
children: t.historyErrorLabel
|
|
871
|
-
}), /* @__PURE__ */ V(
|
|
873
|
+
}), /* @__PURE__ */ V(m, {
|
|
872
874
|
label: t.historyRetryLabel,
|
|
873
875
|
onClick: A
|
|
874
876
|
})]
|
|
875
|
-
}) :
|
|
877
|
+
}) : x.length === 0 ? /* @__PURE__ */ V("p", {
|
|
876
878
|
className: r(B, $.subtitleText),
|
|
877
879
|
children: t.historyEmptyLabel
|
|
878
880
|
}) : /* @__PURE__ */ H("ul", {
|
|
879
881
|
"aria-label": t.historyTitle,
|
|
880
882
|
children: [
|
|
881
|
-
|
|
883
|
+
x.map(ie),
|
|
882
884
|
E && K(D),
|
|
883
885
|
/* @__PURE__ */ V("li", {
|
|
884
886
|
ref: G,
|
|
@@ -896,4 +898,4 @@ var U = /* @__PURE__ */ function(e) {
|
|
|
896
898
|
});
|
|
897
899
|
};
|
|
898
900
|
//#endregion
|
|
899
|
-
export { me as DESCRIPTION_MAX_LENGTH, G as ScheduledTaskCard, oe as ScheduledTaskCardGrid, ae as ScheduledTaskCardSkeleton, Ce as ScheduledTaskCreateForm, Ee as ScheduledTaskDetailView,
|
|
901
|
+
export { me as DESCRIPTION_MAX_LENGTH, G as ScheduledTaskCard, oe as ScheduledTaskCardGrid, ae as ScheduledTaskCardSkeleton, Ce as ScheduledTaskCreateForm, Ee as ScheduledTaskDetailView, he as ScheduledTaskFrequency, Q as ScheduledTaskRunStatus, J as ScheduledTaskScheduleType, ce as ScheduledTaskSection, U as ScheduledTaskSectionKey, fe as ScheduledTasks, pe as ScheduledTasksSortKey };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Color overrides for the {@link ScheduledTaskCardSkeleton} component.
|
|
3
|
-
* `
|
|
3
|
+
* `Skeleton`'s own default color token (`bg-layer-raised`) has no visible
|
|
4
4
|
* contrast against the card background in apps that don't override it, so
|
|
5
5
|
* this component requires an explicit color rather than relying on that
|
|
6
6
|
* default — callers can still override it via this prop.
|
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.128",
|
|
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-chat-shared": "1.1.0-dev.
|
|
21
|
-
"@epam/ai-dial-kit": "1.1.0-dev.
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.128",
|
|
21
|
+
"@epam/ai-dial-kit": "1.1.0-dev.128",
|
|
22
22
|
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
|
|
23
23
|
"@tabler/icons-react": "^3.44.0",
|
|
24
24
|
"react": "^19.0.0"
|