@epam/ai-dial-scheduled-tasks 1.1.0-dev.124 → 1.1.0-dev.125
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":"AAeA,OAAO,EAAuC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AA6B7F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAoYpE,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MDMessageViewer as e, PanelEmptyState as t, buildCssVars as n, mergeClasses as r } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import {
|
|
3
|
-
import { ButtonAppearance as
|
|
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, DialDropdown as f, DialSelectField as p, DialSkeleton as m, DialSkeletonVariant as h, FolderPath as g, GhostButton as _, GhostIconButton as v, Highlight as y, IconButton as b, Input as x, LazyDialMarkdownEditor as S, NeutralButton as C, PrimaryButton 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, IconPlayerPlay as P, IconPlus as F, IconTrash as I } from "@tabler/icons-react";
|
|
5
|
-
import { Suspense as L, lazy as R, useEffect as ee, useMemo as
|
|
6
|
-
import { Fragment as
|
|
5
|
+
import { Suspense as L, lazy as R, useEffect as ee, useMemo as z, useRef as te } from "react";
|
|
6
|
+
import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
|
|
7
7
|
//#region src/models/scheduled-task-item.ts
|
|
8
|
-
var
|
|
8
|
+
var U = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Shared = "shared", e.MyTasks = "myTasks", e;
|
|
10
|
-
}({}),
|
|
10
|
+
}({}), W = {
|
|
11
11
|
title: "_title_1xv9i_1",
|
|
12
12
|
description: "_description_1xv9i_5",
|
|
13
13
|
schedulePill: "_schedulePill_1xv9i_9",
|
|
@@ -16,24 +16,24 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
16
16
|
locationLeaf: "_locationLeaf_1xv9i_22",
|
|
17
17
|
newBadge: "_newBadge_1xv9i_26",
|
|
18
18
|
locationDivider: "_locationDivider_1xv9i_31"
|
|
19
|
-
},
|
|
20
|
-
let
|
|
21
|
-
"--stc-title-text":
|
|
22
|
-
"--stc-desc-text":
|
|
23
|
-
"--stc-pill-bg":
|
|
24
|
-
"--stc-pill-border":
|
|
25
|
-
"--stc-schedule-label-text":
|
|
26
|
-
"--stc-location-label-text":
|
|
27
|
-
"--stc-location-leaf-text":
|
|
28
|
-
"--stc-new-badge-bg":
|
|
29
|
-
"--stc-new-badge-text":
|
|
30
|
-
"--stc-location-divider-border":
|
|
19
|
+
}, G = ({ item: e, searchQuery: t = "", onEdit: i, onRunNow: a, onDelete: o, onCardClick: s, labels: c, styles: l, className: p }) => {
|
|
20
|
+
let m = c?.newBadgeLabel ?? "NEW", h = c?.actionsLabel ?? "More actions", _ = c?.editActionLabel ?? "Edit", v = 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
|
+
"--stc-title-text": S?.titleText,
|
|
22
|
+
"--stc-desc-text": S?.descriptionText,
|
|
23
|
+
"--stc-pill-bg": S?.schedulePillBackground,
|
|
24
|
+
"--stc-pill-border": S?.schedulePillBorder,
|
|
25
|
+
"--stc-schedule-label-text": S?.scheduleLabelText,
|
|
26
|
+
"--stc-location-label-text": S?.locationLabelText,
|
|
27
|
+
"--stc-location-leaf-text": S?.locationLeafText,
|
|
28
|
+
"--stc-new-badge-bg": S?.newBadgeBackground,
|
|
29
|
+
"--stc-new-badge-text": S?.newBadgeText,
|
|
30
|
+
"--stc-location-divider-border": S?.locationDividerBorder
|
|
31
31
|
}), j = [];
|
|
32
32
|
i && j.push({
|
|
33
33
|
key: "edit",
|
|
34
|
-
label:
|
|
35
|
-
icon: /* @__PURE__ */
|
|
36
|
-
size:
|
|
34
|
+
label: _,
|
|
35
|
+
icon: /* @__PURE__ */ V(N, {
|
|
36
|
+
size: d.SM,
|
|
37
37
|
"aria-hidden": !0
|
|
38
38
|
}),
|
|
39
39
|
onClick: ({ domEvent: t }) => {
|
|
@@ -41,9 +41,9 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
41
41
|
}
|
|
42
42
|
}), a && j.push({
|
|
43
43
|
key: "runNow",
|
|
44
|
-
label:
|
|
45
|
-
icon: /* @__PURE__ */
|
|
46
|
-
size:
|
|
44
|
+
label: v,
|
|
45
|
+
icon: /* @__PURE__ */ V(P, {
|
|
46
|
+
size: d.SM,
|
|
47
47
|
"aria-hidden": !0
|
|
48
48
|
}),
|
|
49
49
|
onClick: ({ domEvent: t }) => {
|
|
@@ -51,9 +51,9 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
51
51
|
}
|
|
52
52
|
}), o && j.push({
|
|
53
53
|
key: "delete",
|
|
54
|
-
label:
|
|
55
|
-
icon: /* @__PURE__ */
|
|
56
|
-
size:
|
|
54
|
+
label: x,
|
|
55
|
+
icon: /* @__PURE__ */ V(I, {
|
|
56
|
+
size: d.SM,
|
|
57
57
|
"aria-hidden": !0
|
|
58
58
|
}),
|
|
59
59
|
danger: !0,
|
|
@@ -68,33 +68,33 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
68
68
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), s(e.id));
|
|
69
69
|
}
|
|
70
70
|
} : {};
|
|
71
|
-
return /* @__PURE__ */
|
|
71
|
+
return /* @__PURE__ */ H(u, {
|
|
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", p),
|
|
76
76
|
...F,
|
|
77
77
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ H("div", {
|
|
79
79
|
className: "flex shrink-0 items-start justify-between gap-2",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ H("div", {
|
|
81
81
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
82
|
-
children: [/* @__PURE__ */
|
|
82
|
+
children: [/* @__PURE__ */ V(y, {
|
|
83
83
|
text: e.displayName,
|
|
84
84
|
query: t,
|
|
85
85
|
maxLines: 1,
|
|
86
|
-
className: r(w,
|
|
87
|
-
}), e.isNew && /* @__PURE__ */
|
|
88
|
-
className: r("shrink-0 rounded-full px-2 py-0.5", k,
|
|
89
|
-
children:
|
|
86
|
+
className: r(w, W.title)
|
|
87
|
+
}), e.isNew && /* @__PURE__ */ V("span", {
|
|
88
|
+
className: r("shrink-0 rounded-full px-2 py-0.5", k, W.newBadge),
|
|
89
|
+
children: m
|
|
90
90
|
})]
|
|
91
|
-
}), j.length > 0 && /* @__PURE__ */
|
|
91
|
+
}), j.length > 0 && /* @__PURE__ */ V(f, {
|
|
92
92
|
items: j,
|
|
93
93
|
matchReferenceWidth: !1,
|
|
94
94
|
placement: "bottom-end",
|
|
95
|
-
children: /* @__PURE__ */
|
|
96
|
-
icon: /* @__PURE__ */
|
|
97
|
-
size:
|
|
95
|
+
children: /* @__PURE__ */ V(b, {
|
|
96
|
+
icon: /* @__PURE__ */ V(M, {
|
|
97
|
+
size: d.SM,
|
|
98
98
|
"aria-hidden": !0
|
|
99
99
|
}),
|
|
100
100
|
"aria-label": h,
|
|
@@ -103,63 +103,63 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
103
103
|
})
|
|
104
104
|
})]
|
|
105
105
|
}),
|
|
106
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
107
|
-
className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", T,
|
|
106
|
+
e.descriptionPreview && /* @__PURE__ */ V("p", {
|
|
107
|
+
className: r("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", T, W.description),
|
|
108
108
|
children: e.descriptionPreview
|
|
109
109
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ H("div", {
|
|
111
111
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
112
|
+
children: [/* @__PURE__ */ V("div", {
|
|
113
113
|
className: "flex min-h-[28px] items-center",
|
|
114
|
-
children: /* @__PURE__ */
|
|
115
|
-
className: r("inline-block rounded-lg border px-2 py-1",
|
|
114
|
+
children: /* @__PURE__ */ V("span", {
|
|
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__ */
|
|
118
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ V(g, {
|
|
119
119
|
segments: e.locationSegments,
|
|
120
|
-
labelClassName: r(D,
|
|
121
|
-
leafClassName: r(O,
|
|
122
|
-
className: r("pt-3",
|
|
120
|
+
labelClassName: r(D, W.locationLabel),
|
|
121
|
+
leafClassName: r(O, W.locationLeaf),
|
|
122
|
+
className: r("pt-3", W.locationDivider)
|
|
123
123
|
})]
|
|
124
124
|
})
|
|
125
125
|
]
|
|
126
126
|
});
|
|
127
|
-
},
|
|
127
|
+
}, K = { card: "_card_1a43j_1" }, ne = [
|
|
128
128
|
"100%",
|
|
129
129
|
"100%",
|
|
130
130
|
"61%"
|
|
131
|
-
],
|
|
131
|
+
], q = "var(--stcs-skeleton-bg)", re = ({ styles: e }) => /* @__PURE__ */ H(u, {
|
|
132
132
|
"aria-hidden": !0,
|
|
133
133
|
style: n({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
134
|
-
className: r("h-[232px]",
|
|
134
|
+
className: r("h-[232px]", K.card),
|
|
135
135
|
children: [
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
variant:
|
|
136
|
+
/* @__PURE__ */ V(m, {
|
|
137
|
+
variant: h.Rectangular,
|
|
138
138
|
width: "60%",
|
|
139
139
|
height: "20px",
|
|
140
|
-
color:
|
|
140
|
+
color: q,
|
|
141
141
|
className: "shrink-0"
|
|
142
142
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ V("div", {
|
|
144
144
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
145
|
-
children:
|
|
146
|
-
variant:
|
|
145
|
+
children: ne.map((e, t) => /* @__PURE__ */ V(m, {
|
|
146
|
+
variant: h.Rectangular,
|
|
147
147
|
width: e,
|
|
148
148
|
height: "16px",
|
|
149
|
-
color:
|
|
149
|
+
color: q
|
|
150
150
|
}, t))
|
|
151
151
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
variant:
|
|
152
|
+
/* @__PURE__ */ V(m, {
|
|
153
|
+
variant: h.Rectangular,
|
|
154
154
|
width: "110px",
|
|
155
155
|
height: "28px",
|
|
156
|
-
color:
|
|
156
|
+
color: q,
|
|
157
157
|
className: "shrink-0 rounded-lg"
|
|
158
158
|
})
|
|
159
159
|
]
|
|
160
|
-
}),
|
|
160
|
+
}), ie = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, onCardClick: a, labels: o, cardStyles: s, trailingSkeletonCount: c = 0, skeletonStyles: l }) => /* @__PURE__ */ H("div", {
|
|
161
161
|
className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
|
|
162
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
162
|
+
children: [e.map((e) => /* @__PURE__ */ V(G, {
|
|
163
163
|
item: e,
|
|
164
164
|
searchQuery: t,
|
|
165
165
|
onEdit: n,
|
|
@@ -168,145 +168,145 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
168
168
|
onCardClick: a,
|
|
169
169
|
labels: o,
|
|
170
170
|
styles: s
|
|
171
|
-
}, e.id)), Array.from({ length: c }, (e, t) => /* @__PURE__ */
|
|
172
|
-
}),
|
|
171
|
+
}, e.id)), Array.from({ length: c }, (e, t) => /* @__PURE__ */ V(re, { styles: l }, `skeleton-${t}`))]
|
|
172
|
+
}), ae = { countBadge: "_countBadge_4bnxj_1" }, oe = ({ title: e, count: t, children: i, styles: a }) => {
|
|
173
173
|
let o = a?.typography?.titleClassName ?? "dial-small-semi-text", s = a?.typography?.countBadgeClassName ?? "dial-tiny-text", c = n({
|
|
174
174
|
"--sts-badge-bg": a?.colors?.countBadgeBackground,
|
|
175
175
|
"--sts-badge-text": a?.colors?.countBadgeText
|
|
176
176
|
});
|
|
177
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ H("section", {
|
|
178
178
|
...e ? { "aria-label": e } : {},
|
|
179
179
|
style: c,
|
|
180
180
|
className: "flex flex-col gap-3",
|
|
181
|
-
children: [e && /* @__PURE__ */
|
|
181
|
+
children: [e && /* @__PURE__ */ H("div", {
|
|
182
182
|
className: "flex items-center gap-2 rtl:flex-row-reverse",
|
|
183
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
184
184
|
className: o,
|
|
185
185
|
children: e
|
|
186
|
-
}), /* @__PURE__ */
|
|
187
|
-
className: r("rounded-full px-2 py-0.5", s,
|
|
186
|
+
}), /* @__PURE__ */ V("span", {
|
|
187
|
+
className: r("rounded-full px-2 py-0.5", s, ae.countBadge),
|
|
188
188
|
children: t
|
|
189
189
|
})]
|
|
190
190
|
}), i]
|
|
191
191
|
});
|
|
192
|
-
},
|
|
192
|
+
}, J = {
|
|
193
193
|
container: "_container_r5sk9_1",
|
|
194
194
|
subtitle: "_subtitle_r5sk9_5",
|
|
195
195
|
sortButton: "_sortButton_r5sk9_9"
|
|
196
|
-
},
|
|
196
|
+
}, se = [U.Shared, U.MyTasks], ce = (e, t, n, r, i, a) => {
|
|
197
197
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
198
|
-
},
|
|
198
|
+
}, le = (e) => {
|
|
199
199
|
if (!e || e === document.body) return null;
|
|
200
200
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
201
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
202
|
-
},
|
|
201
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : le(e.parentElement);
|
|
202
|
+
}, ue = ({ labels: e, onCreateClick: c, searchQuery: l, onSearchQueryChange: u, sortKey: f, onSortChange: p, items: m, isLoading: h = !1, error: g, onRetry: v, hasMore: y = !1, isLoadingMore: b = !1, skeletonCount: x = 6, onLoadMore: S, onEdit: C, 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", I = M?.subtitleClassName ?? "dial-body-text", L = n({
|
|
204
204
|
"--st-bg": j?.background,
|
|
205
205
|
"--st-subtitle-text": j?.subtitleText,
|
|
206
206
|
"--st-sort-text": j?.sortButtonText
|
|
207
|
-
}), R = e.sortOptions.find((e) => e.key ===
|
|
208
|
-
let t = { [
|
|
209
|
-
return
|
|
207
|
+
}), R = e.sortOptions.find((e) => e.key === f)?.label ?? "", B = z(() => {
|
|
208
|
+
let t = { [U.Shared]: e.sharedSectionTitle };
|
|
209
|
+
return se.map((e) => ({
|
|
210
210
|
key: e,
|
|
211
211
|
title: t[e],
|
|
212
212
|
items: m.filter((t) => t.sectionKey === e)
|
|
213
213
|
})).filter((e) => e.items.length > 0);
|
|
214
|
-
}, [m, e.sharedSectionTitle]),
|
|
214
|
+
}, [m, e.sharedSectionTitle]), W = ce(h, b, !!g, m.length, l.trim().length > 0, e), G = te(null);
|
|
215
215
|
ee(() => {
|
|
216
|
-
let e =
|
|
217
|
-
if (!e || !
|
|
218
|
-
let t =
|
|
216
|
+
let e = G.current;
|
|
217
|
+
if (!e || !S) return;
|
|
218
|
+
let t = le(e.parentElement);
|
|
219
219
|
if (!t) return;
|
|
220
220
|
let n = () => {
|
|
221
|
-
if (
|
|
221
|
+
if (b || h || !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 && S();
|
|
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
229
|
h,
|
|
230
|
-
|
|
230
|
+
S
|
|
231
231
|
]);
|
|
232
|
-
let
|
|
233
|
-
if (h) return /* @__PURE__ */
|
|
234
|
-
if (g) return /* @__PURE__ */
|
|
232
|
+
let K = () => {
|
|
233
|
+
if (h) return /* @__PURE__ */ V(T, {});
|
|
234
|
+
if (g) return /* @__PURE__ */ H("div", {
|
|
235
235
|
className: "flex flex-col items-center gap-3",
|
|
236
|
-
children: [/* @__PURE__ */
|
|
237
|
-
className: r(I,
|
|
236
|
+
children: [/* @__PURE__ */ V("p", {
|
|
237
|
+
className: r(I, J.subtitle),
|
|
238
238
|
children: e.errorLabel
|
|
239
|
-
}), /* @__PURE__ */
|
|
239
|
+
}), /* @__PURE__ */ V(_, {
|
|
240
240
|
label: e.retryLabel,
|
|
241
|
-
onClick:
|
|
241
|
+
onClick: v
|
|
242
242
|
})]
|
|
243
243
|
});
|
|
244
|
-
if (m.length === 0) return
|
|
245
|
-
className: r(I,
|
|
244
|
+
if (m.length === 0) return l.trim() ? /* @__PURE__ */ V("p", {
|
|
245
|
+
className: r(I, J.subtitle),
|
|
246
246
|
children: e.noResultsLabel
|
|
247
|
-
}) : /* @__PURE__ */
|
|
248
|
-
icon: /* @__PURE__ */
|
|
247
|
+
}) : /* @__PURE__ */ V(t, {
|
|
248
|
+
icon: /* @__PURE__ */ V(k, {
|
|
249
249
|
"aria-hidden": !0,
|
|
250
250
|
size: N,
|
|
251
251
|
stroke: 1
|
|
252
252
|
}),
|
|
253
253
|
label: e.emptyStateLabel
|
|
254
254
|
});
|
|
255
|
-
let n =
|
|
256
|
-
return /* @__PURE__ */
|
|
255
|
+
let n = B.length - 1;
|
|
256
|
+
return /* @__PURE__ */ H("div", {
|
|
257
257
|
className: "flex w-full flex-col gap-6",
|
|
258
|
-
children: [
|
|
258
|
+
children: [B.map((t, r) => /* @__PURE__ */ V(oe, {
|
|
259
259
|
title: t.title,
|
|
260
260
|
count: t.items.length,
|
|
261
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ V(ie, {
|
|
262
262
|
items: t.items,
|
|
263
|
-
searchQuery:
|
|
264
|
-
onEdit:
|
|
265
|
-
onRunNow:
|
|
263
|
+
searchQuery: l,
|
|
264
|
+
onEdit: C,
|
|
265
|
+
onRunNow: E,
|
|
266
266
|
onDelete: D,
|
|
267
267
|
onCardClick: O,
|
|
268
268
|
labels: e.cardLabels,
|
|
269
|
-
trailingSkeletonCount:
|
|
269
|
+
trailingSkeletonCount: b && r === n ? x : 0,
|
|
270
270
|
skeletonStyles: { colors: { skeletonColor: j?.skeletonColor } }
|
|
271
271
|
})
|
|
272
|
-
}, t.key)), /* @__PURE__ */
|
|
273
|
-
ref:
|
|
272
|
+
}, t.key)), /* @__PURE__ */ V("div", {
|
|
273
|
+
ref: G,
|
|
274
274
|
"aria-hidden": !0,
|
|
275
275
|
className: "h-px w-full"
|
|
276
276
|
})]
|
|
277
277
|
});
|
|
278
|
-
},
|
|
279
|
-
return /* @__PURE__ */
|
|
278
|
+
}, ne = h || !!g || m.length === 0;
|
|
279
|
+
return /* @__PURE__ */ H("div", {
|
|
280
280
|
style: L,
|
|
281
|
-
className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4",
|
|
281
|
+
className: r("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", J.container),
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ H("div", {
|
|
284
284
|
className: "flex items-start justify-between gap-4",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ H("div", {
|
|
286
286
|
className: "min-w-0 gap-2",
|
|
287
|
-
children: [/* @__PURE__ */
|
|
287
|
+
children: [/* @__PURE__ */ V("h1", {
|
|
288
288
|
className: r("truncate", P),
|
|
289
289
|
children: e.title
|
|
290
|
-
}), /* @__PURE__ */
|
|
291
|
-
className: r("mt-1", I,
|
|
290
|
+
}), /* @__PURE__ */ V("p", {
|
|
291
|
+
className: r("mt-1", I, J.subtitle),
|
|
292
292
|
children: e.subtitle
|
|
293
293
|
})]
|
|
294
|
-
}), /* @__PURE__ */
|
|
294
|
+
}), /* @__PURE__ */ V(w, {
|
|
295
295
|
label: e.createButtonLabel,
|
|
296
|
-
iconBefore: /* @__PURE__ */
|
|
297
|
-
size:
|
|
296
|
+
iconBefore: /* @__PURE__ */ V(F, {
|
|
297
|
+
size: d.SM,
|
|
298
298
|
"aria-hidden": !0
|
|
299
299
|
}),
|
|
300
|
-
onClick:
|
|
300
|
+
onClick: c,
|
|
301
301
|
className: "shrink-0"
|
|
302
302
|
})]
|
|
303
303
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ H("div", {
|
|
305
305
|
className: "flex flex-wrap items-center gap-3",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
306
|
+
children: [/* @__PURE__ */ V("div", {
|
|
307
307
|
className: "flex-1",
|
|
308
|
-
children: /* @__PURE__ */
|
|
309
|
-
value:
|
|
308
|
+
children: /* @__PURE__ */ V(i, {
|
|
309
|
+
value: l,
|
|
310
310
|
onChange: u,
|
|
311
311
|
labels: {
|
|
312
312
|
placeholder: e.searchPlaceholder,
|
|
@@ -321,33 +321,33 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
321
321
|
clearButtonClassName: "size-11 desktop:size-auto"
|
|
322
322
|
}
|
|
323
323
|
})
|
|
324
|
-
}), e.sortOptions.length > 0 && /* @__PURE__ */
|
|
324
|
+
}), e.sortOptions.length > 0 && /* @__PURE__ */ V(o, {
|
|
325
325
|
label: R,
|
|
326
|
-
variant:
|
|
327
|
-
appearance:
|
|
326
|
+
variant: s.Primary,
|
|
327
|
+
appearance: a.Ghost,
|
|
328
328
|
items: e.sortOptions.map((e) => ({
|
|
329
329
|
...e,
|
|
330
|
-
onClick: () =>
|
|
330
|
+
onClick: () => p(e.key)
|
|
331
331
|
}))
|
|
332
332
|
})]
|
|
333
333
|
}),
|
|
334
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ V("span", {
|
|
335
335
|
role: "status",
|
|
336
336
|
"aria-live": "polite",
|
|
337
337
|
className: "sr-only",
|
|
338
|
-
children:
|
|
338
|
+
children: W
|
|
339
339
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col",
|
|
342
|
-
children:
|
|
340
|
+
/* @__PURE__ */ V("div", {
|
|
341
|
+
className: r("mx-auto flex size-full w-full max-w-[1180px] flex-col", ne && "items-center justify-center"),
|
|
342
|
+
children: K()
|
|
343
343
|
})
|
|
344
344
|
]
|
|
345
345
|
});
|
|
346
|
-
},
|
|
346
|
+
}, de = /* @__PURE__ */ function(e) {
|
|
347
347
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
348
|
-
}({}),
|
|
348
|
+
}({}), fe = 500, Y = /* @__PURE__ */ function(e) {
|
|
349
349
|
return e.Once = "once", e.Recurring = "recurring", e;
|
|
350
|
-
}({}),
|
|
350
|
+
}({}), pe = /* @__PURE__ */ function(e) {
|
|
351
351
|
return e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
352
352
|
}({}), X = (e) => String(e).padStart(2, "0"), me = (e) => e ? new Date(e) : null, he = (e) => {
|
|
353
353
|
if (e == null) return "";
|
|
@@ -373,207 +373,207 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
373
373
|
detailsColumn: "_detailsColumn_sq3dp_9",
|
|
374
374
|
sectionSubtitle: "_sectionSubtitle_sq3dp_13",
|
|
375
375
|
instructionsError: "_instructionsError_sq3dp_17"
|
|
376
|
-
}, be = (e) => `${e} *`, xe = R(async () => ({ default: (await
|
|
377
|
-
let { colors:
|
|
378
|
-
"--stcf-bg":
|
|
379
|
-
"--stcf-header-border":
|
|
380
|
-
"--stcf-details-border":
|
|
381
|
-
"--stcf-subtitle-text":
|
|
382
|
-
"--stcf-error-text":
|
|
383
|
-
}), M =
|
|
384
|
-
return /* @__PURE__ */
|
|
376
|
+
}, be = (e) => `${e} *`, xe = R(async () => ({ default: (await S()).DialMarkdownEditor })), Se = ({ labels: e, values: t, errors: i, modelOptions: a, onFieldChange: o, onBack: s, onCancel: u, onSubmit: f, isSubmitting: m = !1, markdownEditorTheme: h, styles: g }) => {
|
|
377
|
+
let { colors: _, typography: y } = g ?? {}, b = y?.titleClassName ?? "dial-h1-text", S = 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
|
+
"--stcf-bg": _?.background,
|
|
379
|
+
"--stcf-header-border": _?.headerBorder,
|
|
380
|
+
"--stcf-details-border": _?.detailsColumnBorder,
|
|
381
|
+
"--stcf-subtitle-text": _?.sectionSubtitleText,
|
|
382
|
+
"--stcf-error-text": _?.instructionsErrorText
|
|
383
|
+
}), M = m || !t.displayName.trim() || !t.modelId || !t.prompt.trim();
|
|
384
|
+
return /* @__PURE__ */ H("div", {
|
|
385
385
|
style: j,
|
|
386
386
|
className: r("flex h-full w-full flex-col overflow-y-auto", Z.container),
|
|
387
|
-
children: [/* @__PURE__ */
|
|
387
|
+
children: [/* @__PURE__ */ H("div", {
|
|
388
388
|
className: r("flex h-16 items-center justify-between gap-6 border-b px-8", Z.header),
|
|
389
|
-
children: [/* @__PURE__ */
|
|
389
|
+
children: [/* @__PURE__ */ H("div", {
|
|
390
390
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
392
|
-
icon: /* @__PURE__ */
|
|
393
|
-
size:
|
|
391
|
+
children: [/* @__PURE__ */ V(v, {
|
|
392
|
+
icon: /* @__PURE__ */ V(O, {
|
|
393
|
+
size: d.LG,
|
|
394
394
|
className: "rtl:scale-x-[-1]",
|
|
395
395
|
"aria-hidden": !0
|
|
396
396
|
}),
|
|
397
397
|
"aria-label": e.backButtonLabel,
|
|
398
|
-
onClick:
|
|
399
|
-
}), /* @__PURE__ */
|
|
400
|
-
className: r("truncate",
|
|
398
|
+
onClick: s
|
|
399
|
+
}), /* @__PURE__ */ V("h1", {
|
|
400
|
+
className: r("truncate", b),
|
|
401
401
|
children: e.pageTitle
|
|
402
402
|
})]
|
|
403
|
-
}), /* @__PURE__ */
|
|
403
|
+
}), /* @__PURE__ */ H("div", {
|
|
404
404
|
className: "flex items-center gap-2",
|
|
405
|
-
children: [/* @__PURE__ */
|
|
405
|
+
children: [/* @__PURE__ */ V(C, {
|
|
406
406
|
label: e.cancelButtonLabel,
|
|
407
|
-
onClick:
|
|
408
|
-
disabled:
|
|
409
|
-
}), /* @__PURE__ */
|
|
407
|
+
onClick: u,
|
|
408
|
+
disabled: m
|
|
409
|
+
}), /* @__PURE__ */ V(w, {
|
|
410
410
|
label: e.createButtonLabel,
|
|
411
|
-
onClick:
|
|
411
|
+
onClick: f,
|
|
412
412
|
disabled: M
|
|
413
413
|
})]
|
|
414
414
|
})]
|
|
415
|
-
}), /* @__PURE__ */
|
|
415
|
+
}), /* @__PURE__ */ H("div", {
|
|
416
416
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
417
417
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ H("div", {
|
|
419
419
|
role: "group",
|
|
420
420
|
"aria-label": e.detailsSectionTitle,
|
|
421
421
|
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", Z.detailsColumn),
|
|
422
422
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
423
|
+
/* @__PURE__ */ H("div", {
|
|
424
424
|
className: "flex flex-col gap-1",
|
|
425
|
-
children: [/* @__PURE__ */
|
|
426
|
-
className:
|
|
425
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
426
|
+
className: S,
|
|
427
427
|
children: e.detailsSectionTitle
|
|
428
|
-
}), /* @__PURE__ */
|
|
428
|
+
}), /* @__PURE__ */ V("p", {
|
|
429
429
|
className: r(D, Z.sectionSubtitle),
|
|
430
430
|
children: e.detailsSectionSubtitle
|
|
431
431
|
})]
|
|
432
432
|
}),
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ V(x, {
|
|
434
434
|
id: "scheduled-task-display-name",
|
|
435
435
|
value: t.displayName,
|
|
436
|
-
onChange: (e) =>
|
|
436
|
+
onChange: (e) => o("displayName", e ?? ""),
|
|
437
437
|
labelProps: {
|
|
438
438
|
label: e.displayNameLabel,
|
|
439
439
|
required: !0
|
|
440
440
|
},
|
|
441
|
-
invalid: !!
|
|
442
|
-
error:
|
|
441
|
+
invalid: !!i.displayName,
|
|
442
|
+
error: i.displayName
|
|
443
443
|
}),
|
|
444
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ V(E, {
|
|
445
445
|
id: "scheduled-task-description",
|
|
446
446
|
value: t.description ?? "",
|
|
447
|
-
onChange: (e) =>
|
|
447
|
+
onChange: (e) => o("description", e),
|
|
448
448
|
labelProps: { label: e.descriptionLabel },
|
|
449
449
|
maxLength: 500,
|
|
450
|
-
invalid: !!
|
|
451
|
-
error:
|
|
450
|
+
invalid: !!i.description,
|
|
451
|
+
error: i.description,
|
|
452
452
|
caption: t.description ? `${t.description.length}/500` : void 0
|
|
453
453
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ V(p, {
|
|
455
455
|
label: e.modelOrAgentLabel,
|
|
456
456
|
required: !0,
|
|
457
457
|
value: t.modelId,
|
|
458
458
|
placeholder: e.modelPlaceholder,
|
|
459
|
-
onChange: (e) =>
|
|
460
|
-
error:
|
|
461
|
-
options:
|
|
459
|
+
onChange: (e) => o("modelId", e),
|
|
460
|
+
error: i.modelId,
|
|
461
|
+
options: a.map((e) => ({
|
|
462
462
|
value: e.id,
|
|
463
463
|
label: e.label
|
|
464
464
|
}))
|
|
465
465
|
}),
|
|
466
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ H("fieldset", {
|
|
467
467
|
className: "flex flex-col gap-3",
|
|
468
468
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ V("legend", {
|
|
470
470
|
className: k,
|
|
471
471
|
children: e.scheduleSectionLabel
|
|
472
472
|
}),
|
|
473
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ V(p, {
|
|
474
474
|
label: e.scheduleTypeAriaLabel,
|
|
475
475
|
value: t.scheduleType,
|
|
476
|
-
onChange: (e) =>
|
|
476
|
+
onChange: (e) => o("scheduleType", e),
|
|
477
477
|
options: [{
|
|
478
|
-
value:
|
|
478
|
+
value: Y.Once,
|
|
479
479
|
label: e.scheduleTypeOnceLabel
|
|
480
480
|
}, {
|
|
481
|
-
value:
|
|
481
|
+
value: Y.Recurring,
|
|
482
482
|
label: e.scheduleTypeRecurringLabel
|
|
483
483
|
}]
|
|
484
484
|
}),
|
|
485
|
-
t.scheduleType ===
|
|
485
|
+
t.scheduleType === Y.Once && /* @__PURE__ */ H("div", {
|
|
486
486
|
className: "flex flex-col gap-1",
|
|
487
|
-
children: [/* @__PURE__ */
|
|
487
|
+
children: [/* @__PURE__ */ V(c, {
|
|
488
488
|
id: "scheduled-task-run-at",
|
|
489
|
-
mode:
|
|
489
|
+
mode: l.DateTime,
|
|
490
490
|
value: me(t.runAt),
|
|
491
|
-
onChange: (e) =>
|
|
491
|
+
onChange: (e) => o("runAt", he(e)),
|
|
492
492
|
label: be(e.runAtLabel),
|
|
493
|
-
invalid: !!
|
|
494
|
-
}),
|
|
493
|
+
invalid: !!i.runAt
|
|
494
|
+
}), i.runAt && /* @__PURE__ */ V("p", {
|
|
495
495
|
className: r(A, Z.instructionsError),
|
|
496
|
-
children:
|
|
496
|
+
children: i.runAt
|
|
497
497
|
})]
|
|
498
498
|
}),
|
|
499
|
-
t.scheduleType ===
|
|
500
|
-
/* @__PURE__ */
|
|
499
|
+
t.scheduleType === Y.Recurring && /* @__PURE__ */ H(B, { children: [
|
|
500
|
+
/* @__PURE__ */ V(p, {
|
|
501
501
|
label: e.frequencyLabel,
|
|
502
502
|
value: t.frequency,
|
|
503
|
-
onChange: (e) =>
|
|
503
|
+
onChange: (e) => o("frequency", e),
|
|
504
504
|
options: e.frequencyOptions.map((e) => ({
|
|
505
505
|
value: e.key,
|
|
506
506
|
label: e.label
|
|
507
507
|
}))
|
|
508
508
|
}),
|
|
509
|
-
/* @__PURE__ */
|
|
509
|
+
/* @__PURE__ */ H("div", {
|
|
510
510
|
className: "flex flex-col gap-1",
|
|
511
|
-
children: [/* @__PURE__ */
|
|
511
|
+
children: [/* @__PURE__ */ V(c, {
|
|
512
512
|
id: "scheduled-task-time",
|
|
513
|
-
mode:
|
|
513
|
+
mode: l.Time,
|
|
514
514
|
value: t.time,
|
|
515
|
-
onChange: (e) =>
|
|
515
|
+
onChange: (e) => o("time", typeof e == "string" ? e : ""),
|
|
516
516
|
label: be(e.timeLabel),
|
|
517
|
-
invalid: !!
|
|
518
|
-
}),
|
|
517
|
+
invalid: !!i.time
|
|
518
|
+
}), i.time && /* @__PURE__ */ V("p", {
|
|
519
519
|
className: r(A, Z.instructionsError),
|
|
520
|
-
children:
|
|
520
|
+
children: i.time
|
|
521
521
|
})]
|
|
522
522
|
}),
|
|
523
|
-
t.frequency ===
|
|
523
|
+
t.frequency === pe.Weekly && /* @__PURE__ */ H("div", {
|
|
524
524
|
className: "flex flex-col gap-1",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ V(c, {
|
|
526
526
|
id: "scheduled-task-day-of-week",
|
|
527
|
-
mode:
|
|
527
|
+
mode: l.Weekday,
|
|
528
528
|
value: ve(t.dayOfWeek),
|
|
529
|
-
onChange: (e) =>
|
|
529
|
+
onChange: (e) => o("dayOfWeek", ye(e)),
|
|
530
530
|
label: be(e.dayOfWeekLabel),
|
|
531
|
-
invalid: !!
|
|
532
|
-
}),
|
|
531
|
+
invalid: !!i.dayOfWeek
|
|
532
|
+
}), i.dayOfWeek && /* @__PURE__ */ V("p", {
|
|
533
533
|
className: r(A, Z.instructionsError),
|
|
534
|
-
children:
|
|
534
|
+
children: i.dayOfWeek
|
|
535
535
|
})]
|
|
536
536
|
}),
|
|
537
|
-
t.frequency ===
|
|
537
|
+
t.frequency === pe.Monthly && /* @__PURE__ */ V(x, {
|
|
538
538
|
id: "scheduled-task-day-of-month",
|
|
539
539
|
value: t.dayOfMonth ?? "",
|
|
540
|
-
onChange: (e) =>
|
|
540
|
+
onChange: (e) => o("dayOfMonth", e ?? ""),
|
|
541
541
|
labelProps: {
|
|
542
542
|
label: e.dayOfMonthLabel,
|
|
543
543
|
required: !0
|
|
544
544
|
},
|
|
545
|
-
invalid: !!
|
|
546
|
-
error:
|
|
545
|
+
invalid: !!i.dayOfMonth,
|
|
546
|
+
error: i.dayOfMonth
|
|
547
547
|
}),
|
|
548
|
-
/* @__PURE__ */
|
|
548
|
+
/* @__PURE__ */ H("div", {
|
|
549
549
|
className: "flex flex-col gap-3 desktop:flex-row",
|
|
550
|
-
children: [/* @__PURE__ */
|
|
550
|
+
children: [/* @__PURE__ */ H("div", {
|
|
551
551
|
className: "flex flex-1 flex-col gap-1",
|
|
552
|
-
children: [/* @__PURE__ */
|
|
552
|
+
children: [/* @__PURE__ */ V(c, {
|
|
553
553
|
id: "scheduled-task-start-date",
|
|
554
|
-
mode:
|
|
554
|
+
mode: l.Date,
|
|
555
555
|
value: ge(t.startDate),
|
|
556
|
-
onChange: (e) =>
|
|
556
|
+
onChange: (e) => o("startDate", _e(e)),
|
|
557
557
|
label: e.startDateLabel,
|
|
558
558
|
placeholder: e.startDatePlaceholder,
|
|
559
|
-
invalid: !!
|
|
560
|
-
}),
|
|
559
|
+
invalid: !!i.startDate
|
|
560
|
+
}), i.startDate && /* @__PURE__ */ V("p", {
|
|
561
561
|
className: r(A, Z.instructionsError),
|
|
562
|
-
children:
|
|
562
|
+
children: i.startDate
|
|
563
563
|
})]
|
|
564
|
-
}), /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ H("div", {
|
|
565
565
|
className: "flex flex-1 flex-col gap-1",
|
|
566
|
-
children: [/* @__PURE__ */
|
|
566
|
+
children: [/* @__PURE__ */ V(c, {
|
|
567
567
|
id: "scheduled-task-end-date",
|
|
568
|
-
mode:
|
|
568
|
+
mode: l.Date,
|
|
569
569
|
value: ge(t.endDate),
|
|
570
|
-
onChange: (e) =>
|
|
570
|
+
onChange: (e) => o("endDate", _e(e)),
|
|
571
571
|
label: e.endDateLabel,
|
|
572
572
|
placeholder: e.endDatePlaceholder,
|
|
573
|
-
invalid: !!
|
|
574
|
-
}),
|
|
573
|
+
invalid: !!i.endDate
|
|
574
|
+
}), i.endDate && /* @__PURE__ */ V("p", {
|
|
575
575
|
className: r(A, Z.instructionsError),
|
|
576
|
-
children:
|
|
576
|
+
children: i.endDate
|
|
577
577
|
})]
|
|
578
578
|
})]
|
|
579
579
|
})
|
|
@@ -582,45 +582,45 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
582
582
|
})
|
|
583
583
|
]
|
|
584
584
|
}),
|
|
585
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ H("div", {
|
|
586
586
|
role: "group",
|
|
587
587
|
"aria-label": e.configurationSectionTitle,
|
|
588
588
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
589
|
-
children: [/* @__PURE__ */
|
|
589
|
+
children: [/* @__PURE__ */ H("div", {
|
|
590
590
|
className: "flex flex-col gap-1",
|
|
591
|
-
children: [/* @__PURE__ */
|
|
592
|
-
className:
|
|
591
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
592
|
+
className: S,
|
|
593
593
|
children: e.configurationSectionTitle
|
|
594
|
-
}), /* @__PURE__ */
|
|
594
|
+
}), /* @__PURE__ */ V("p", {
|
|
595
595
|
className: r(D, Z.sectionSubtitle),
|
|
596
596
|
children: e.configurationSectionSubtitle
|
|
597
597
|
})]
|
|
598
|
-
}), /* @__PURE__ */
|
|
598
|
+
}), /* @__PURE__ */ H("div", {
|
|
599
599
|
role: "group",
|
|
600
600
|
"aria-label": e.instructionsLabel,
|
|
601
601
|
className: "flex flex-1 flex-col gap-1",
|
|
602
602
|
children: [
|
|
603
|
-
/* @__PURE__ */
|
|
603
|
+
/* @__PURE__ */ V("span", {
|
|
604
604
|
className: k,
|
|
605
605
|
children: e.instructionsLabel
|
|
606
606
|
}),
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
fallback: /* @__PURE__ */
|
|
609
|
-
children: /* @__PURE__ */
|
|
607
|
+
/* @__PURE__ */ V(L, {
|
|
608
|
+
fallback: /* @__PURE__ */ V(T, {}),
|
|
609
|
+
children: /* @__PURE__ */ V(xe, {
|
|
610
610
|
value: t.prompt,
|
|
611
|
-
onChange: (e) =>
|
|
611
|
+
onChange: (e) => o("prompt", e),
|
|
612
612
|
height: 480,
|
|
613
|
-
theme:
|
|
613
|
+
theme: h
|
|
614
614
|
})
|
|
615
615
|
}),
|
|
616
|
-
|
|
616
|
+
i.prompt && /* @__PURE__ */ V("p", {
|
|
617
617
|
className: r(A, Z.instructionsError),
|
|
618
|
-
children:
|
|
618
|
+
children: i.prompt
|
|
619
619
|
})
|
|
620
620
|
]
|
|
621
621
|
})]
|
|
622
622
|
}),
|
|
623
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ V("div", {
|
|
624
624
|
"aria-hidden": !0,
|
|
625
625
|
className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
|
|
626
626
|
})
|
|
@@ -644,29 +644,29 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
644
644
|
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : Ce(e.parentElement);
|
|
645
645
|
}, we = ({ status: e }) => {
|
|
646
646
|
switch (e) {
|
|
647
|
-
case Q.Success: return /* @__PURE__ */
|
|
648
|
-
size:
|
|
647
|
+
case Q.Success: return /* @__PURE__ */ V(A, {
|
|
648
|
+
size: d.SM,
|
|
649
649
|
className: $.successIcon,
|
|
650
650
|
"aria-hidden": !0
|
|
651
651
|
});
|
|
652
|
-
case Q.Error: return /* @__PURE__ */
|
|
653
|
-
size:
|
|
652
|
+
case Q.Error: return /* @__PURE__ */ V(j, {
|
|
653
|
+
size: d.SM,
|
|
654
654
|
className: $.errorIcon,
|
|
655
655
|
"aria-hidden": !0
|
|
656
656
|
});
|
|
657
|
-
case Q.InProgress: return /* @__PURE__ */
|
|
657
|
+
case Q.InProgress: return /* @__PURE__ */ V("span", {
|
|
658
658
|
"aria-hidden": !0,
|
|
659
|
-
children: /* @__PURE__ */
|
|
659
|
+
children: /* @__PURE__ */ V(T, { size: d.SM })
|
|
660
660
|
});
|
|
661
|
-
case Q.Missed: return /* @__PURE__ */
|
|
662
|
-
size:
|
|
661
|
+
case Q.Missed: return /* @__PURE__ */ V(D, {
|
|
662
|
+
size: d.SM,
|
|
663
663
|
className: $.missedIcon,
|
|
664
664
|
"aria-hidden": !0
|
|
665
665
|
});
|
|
666
666
|
default: return null;
|
|
667
667
|
}
|
|
668
|
-
}, Te = ({ labels: t, onBack: i, displayName: a, isLoading: o = !1, error: s, onRetry: c, description: l, modelLabel: u, repeatsLabel:
|
|
669
|
-
let { colors: N, typography: P } = M ?? {}, F = P?.titleClassName ?? "dial-h1-text", I = P?.sectionTitleClassName ?? "dial-body-semi-text", L = P?.fieldLabelClassName ?? "dial-tiny-text", R = P?.fieldValueClassName ?? "dial-body-text",
|
|
668
|
+
}, Te = ({ labels: t, onBack: i, displayName: a, isLoading: o = !1, error: s, onRetry: c, description: l, modelLabel: u, repeatsLabel: f, activeWindowLabel: p, nextRunLabel: g, instructionsMarkdown: y, renderInstructions: b, runs: x, runsIsLoading: S = !1, runsIsLoadingMore: C = !1, runsSkeletonCount: w = 6, runsError: E, onRunsRetry: D, runsHasMore: k = !1, onRunsLoadMore: A, onRunClick: j, styles: M }) => {
|
|
669
|
+
let { colors: N, typography: P } = M ?? {}, F = P?.titleClassName ?? "dial-h1-text", I = P?.sectionTitleClassName ?? "dial-body-semi-text", L = P?.fieldLabelClassName ?? "dial-tiny-text", R = P?.fieldValueClassName ?? "dial-body-text", z = P?.runTimestampClassName ?? "dial-small-text", B = n({
|
|
670
670
|
"--stdv-bg": N?.background,
|
|
671
671
|
"--stdv-header-border": N?.headerBorder,
|
|
672
672
|
"--stdv-details-border": N?.detailsColumnBorder,
|
|
@@ -675,27 +675,27 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
675
675
|
"--stdv-error-icon": N?.errorIconColor,
|
|
676
676
|
"--stdv-missed-icon": N?.missedIconColor,
|
|
677
677
|
"--stdv-history-bg": N?.historyCardBackground
|
|
678
|
-
}),
|
|
678
|
+
}), U = te(null);
|
|
679
679
|
ee(() => {
|
|
680
|
-
let e =
|
|
680
|
+
let e = U.current;
|
|
681
681
|
if (!e || !A) return;
|
|
682
682
|
let t = Ce(e.parentElement);
|
|
683
683
|
if (!t) return;
|
|
684
684
|
let n = () => {
|
|
685
|
-
if (
|
|
685
|
+
if (C || S || !k) return;
|
|
686
686
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
687
687
|
r.top < n.bottom && r.bottom > n.top && A();
|
|
688
688
|
};
|
|
689
689
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
690
690
|
}, [
|
|
691
691
|
k,
|
|
692
|
-
w,
|
|
693
692
|
C,
|
|
693
|
+
S,
|
|
694
694
|
A
|
|
695
695
|
]);
|
|
696
|
-
let
|
|
696
|
+
let W = (t) => b ? b(t) : /* @__PURE__ */ V(e, { content: t }), G = (e) => {
|
|
697
697
|
let n = `${t.runStatusLabels[e.status]} ${e.timestampLabel}`, i = !!j;
|
|
698
|
-
return /* @__PURE__ */
|
|
698
|
+
return /* @__PURE__ */ H("li", {
|
|
699
699
|
...i ? {
|
|
700
700
|
role: "button",
|
|
701
701
|
tabIndex: 0,
|
|
@@ -706,171 +706,171 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
706
706
|
} : {},
|
|
707
707
|
"aria-label": n,
|
|
708
708
|
className: r("flex h-8 items-center justify-between gap-2 rounded-full pe-2 ps-5", i && "cursor-pointer"),
|
|
709
|
-
children: [/* @__PURE__ */
|
|
710
|
-
className: r(
|
|
709
|
+
children: [/* @__PURE__ */ V("span", {
|
|
710
|
+
className: r(z, "truncate"),
|
|
711
711
|
children: e.timestampLabel
|
|
712
|
-
}), /* @__PURE__ */
|
|
712
|
+
}), /* @__PURE__ */ V("span", {
|
|
713
713
|
className: "flex h-8 w-14 shrink-0 items-center justify-end",
|
|
714
|
-
children: /* @__PURE__ */
|
|
714
|
+
children: /* @__PURE__ */ V(we, { status: e.status })
|
|
715
715
|
})]
|
|
716
716
|
}, e.id);
|
|
717
|
-
},
|
|
717
|
+
}, K = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ H("li", {
|
|
718
718
|
"aria-hidden": "true",
|
|
719
719
|
className: "flex h-8 items-center justify-between gap-2 pe-2 ps-5",
|
|
720
|
-
children: [/* @__PURE__ */
|
|
721
|
-
variant:
|
|
720
|
+
children: [/* @__PURE__ */ V(m, {
|
|
721
|
+
variant: h.Rectangular,
|
|
722
722
|
width: "160px",
|
|
723
723
|
height: "16px"
|
|
724
|
-
}), /* @__PURE__ */
|
|
725
|
-
variant:
|
|
724
|
+
}), /* @__PURE__ */ V(m, {
|
|
725
|
+
variant: h.Rectangular,
|
|
726
726
|
width: "16px",
|
|
727
727
|
height: "16px",
|
|
728
728
|
className: "shrink-0 rounded-full"
|
|
729
729
|
})]
|
|
730
730
|
}, `history-skeleton-${t}`));
|
|
731
|
-
return /* @__PURE__ */
|
|
732
|
-
style:
|
|
731
|
+
return /* @__PURE__ */ H("div", {
|
|
732
|
+
style: B,
|
|
733
733
|
className: r("flex h-full w-full flex-col overflow-y-auto", $.container),
|
|
734
734
|
children: [
|
|
735
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ H("div", {
|
|
736
736
|
className: r("flex h-16 shrink-0 items-center gap-2 border-b px-8", $.header),
|
|
737
|
-
children: [/* @__PURE__ */
|
|
738
|
-
icon: /* @__PURE__ */
|
|
739
|
-
size:
|
|
737
|
+
children: [/* @__PURE__ */ V(v, {
|
|
738
|
+
icon: /* @__PURE__ */ V(O, {
|
|
739
|
+
size: d.LG,
|
|
740
740
|
className: "rtl:scale-x-[-1]",
|
|
741
741
|
"aria-hidden": !0
|
|
742
742
|
}),
|
|
743
743
|
"aria-label": t.backAriaLabel,
|
|
744
744
|
onClick: i
|
|
745
|
-
}), /* @__PURE__ */
|
|
745
|
+
}), /* @__PURE__ */ V("h1", {
|
|
746
746
|
className: r("truncate", F),
|
|
747
747
|
children: a
|
|
748
748
|
})]
|
|
749
749
|
}),
|
|
750
|
-
o && /* @__PURE__ */
|
|
750
|
+
o && /* @__PURE__ */ V("div", {
|
|
751
751
|
className: "flex flex-1 items-center justify-center",
|
|
752
|
-
children: /* @__PURE__ */
|
|
752
|
+
children: /* @__PURE__ */ V(T, {})
|
|
753
753
|
}),
|
|
754
|
-
!o && s && /* @__PURE__ */
|
|
754
|
+
!o && s && /* @__PURE__ */ H("div", {
|
|
755
755
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
756
|
-
children: [/* @__PURE__ */
|
|
756
|
+
children: [/* @__PURE__ */ V("p", {
|
|
757
757
|
className: r(R, $.subtitleText),
|
|
758
758
|
children: t.errorLabel
|
|
759
|
-
}), /* @__PURE__ */
|
|
759
|
+
}), /* @__PURE__ */ V(_, {
|
|
760
760
|
label: t.retryLabel,
|
|
761
761
|
onClick: c
|
|
762
762
|
})]
|
|
763
763
|
}),
|
|
764
|
-
!o && !s && /* @__PURE__ */
|
|
764
|
+
!o && !s && /* @__PURE__ */ H("div", {
|
|
765
765
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
766
766
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
767
|
+
/* @__PURE__ */ H("div", {
|
|
768
768
|
role: "group",
|
|
769
769
|
"aria-label": t.detailsTitle,
|
|
770
770
|
className: r("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", $.detailsColumn),
|
|
771
771
|
children: [
|
|
772
|
-
/* @__PURE__ */
|
|
772
|
+
/* @__PURE__ */ V("h2", {
|
|
773
773
|
className: I,
|
|
774
774
|
children: t.detailsTitle
|
|
775
775
|
}),
|
|
776
|
-
l && /* @__PURE__ */
|
|
776
|
+
l && /* @__PURE__ */ H("div", {
|
|
777
777
|
className: "flex flex-col gap-1",
|
|
778
|
-
children: [/* @__PURE__ */
|
|
778
|
+
children: [/* @__PURE__ */ V("span", {
|
|
779
779
|
className: L,
|
|
780
780
|
children: t.descriptionLabel
|
|
781
|
-
}), /* @__PURE__ */
|
|
781
|
+
}), /* @__PURE__ */ V("p", {
|
|
782
782
|
className: R,
|
|
783
783
|
children: l
|
|
784
784
|
})]
|
|
785
785
|
}),
|
|
786
|
-
u && /* @__PURE__ */
|
|
786
|
+
u && /* @__PURE__ */ H("div", {
|
|
787
787
|
className: "flex flex-col gap-1",
|
|
788
|
-
children: [/* @__PURE__ */
|
|
788
|
+
children: [/* @__PURE__ */ V("span", {
|
|
789
789
|
className: L,
|
|
790
790
|
children: t.modelLabel
|
|
791
|
-
}), /* @__PURE__ */
|
|
791
|
+
}), /* @__PURE__ */ V("p", {
|
|
792
792
|
className: R,
|
|
793
793
|
children: u
|
|
794
794
|
})]
|
|
795
795
|
}),
|
|
796
|
-
|
|
796
|
+
f && /* @__PURE__ */ H("div", {
|
|
797
797
|
className: "flex flex-col gap-1",
|
|
798
|
-
children: [/* @__PURE__ */
|
|
798
|
+
children: [/* @__PURE__ */ V("span", {
|
|
799
799
|
className: L,
|
|
800
800
|
children: t.repeatsLabel
|
|
801
|
-
}), /* @__PURE__ */
|
|
801
|
+
}), /* @__PURE__ */ V("p", {
|
|
802
802
|
className: R,
|
|
803
|
-
children:
|
|
803
|
+
children: f
|
|
804
804
|
})]
|
|
805
805
|
}),
|
|
806
|
-
|
|
806
|
+
p && /* @__PURE__ */ H("div", {
|
|
807
807
|
className: "flex flex-col gap-1",
|
|
808
|
-
children: [/* @__PURE__ */
|
|
808
|
+
children: [/* @__PURE__ */ V("span", {
|
|
809
809
|
className: L,
|
|
810
810
|
children: t.activeWindowLabel
|
|
811
|
-
}), /* @__PURE__ */
|
|
811
|
+
}), /* @__PURE__ */ V("p", {
|
|
812
812
|
className: R,
|
|
813
|
-
children:
|
|
813
|
+
children: p
|
|
814
814
|
})]
|
|
815
815
|
})
|
|
816
816
|
]
|
|
817
817
|
}),
|
|
818
|
-
/* @__PURE__ */
|
|
818
|
+
/* @__PURE__ */ H("div", {
|
|
819
819
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
820
|
-
children: [/* @__PURE__ */
|
|
820
|
+
children: [/* @__PURE__ */ V("h2", {
|
|
821
821
|
className: I,
|
|
822
822
|
children: t.configurationTitle
|
|
823
|
-
}), /* @__PURE__ */
|
|
823
|
+
}), /* @__PURE__ */ H("div", {
|
|
824
824
|
role: "group",
|
|
825
825
|
"aria-label": t.instructionsLabel,
|
|
826
826
|
className: "flex flex-col gap-1",
|
|
827
|
-
children: [/* @__PURE__ */
|
|
827
|
+
children: [/* @__PURE__ */ V("span", {
|
|
828
828
|
className: L,
|
|
829
829
|
children: t.instructionsLabel
|
|
830
|
-
}),
|
|
830
|
+
}), y && W(y)]
|
|
831
831
|
})]
|
|
832
832
|
}),
|
|
833
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ V("div", {
|
|
834
834
|
className: "flex w-full justify-center p-6 desktop:w-auto desktop:items-start",
|
|
835
|
-
children: /* @__PURE__ */
|
|
835
|
+
children: /* @__PURE__ */ H("div", {
|
|
836
836
|
className: r("flex w-full flex-col gap-4 overflow-y-auto rounded-xl px-6 py-5 shadow-md desktop:max-h-[70vh] desktop:w-[360px]", $.historyCard),
|
|
837
837
|
children: [
|
|
838
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ V("h2", {
|
|
839
839
|
className: I,
|
|
840
840
|
children: t.historyTitle
|
|
841
841
|
}),
|
|
842
|
-
|
|
843
|
-
className: r(
|
|
844
|
-
children:
|
|
842
|
+
g && /* @__PURE__ */ V("p", {
|
|
843
|
+
className: r(z, $.subtitleText),
|
|
844
|
+
children: g
|
|
845
845
|
}),
|
|
846
|
-
t.historyLoadingMoreLabel && /* @__PURE__ */
|
|
846
|
+
t.historyLoadingMoreLabel && /* @__PURE__ */ V("span", {
|
|
847
847
|
role: "status",
|
|
848
848
|
"aria-live": "polite",
|
|
849
849
|
className: "sr-only",
|
|
850
|
-
children:
|
|
850
|
+
children: C ? t.historyLoadingMoreLabel : ""
|
|
851
851
|
}),
|
|
852
|
-
|
|
852
|
+
S && x.length === 0 ? /* @__PURE__ */ V("ul", {
|
|
853
853
|
"aria-label": t.historyTitle,
|
|
854
|
-
children:
|
|
855
|
-
}) : E ? /* @__PURE__ */
|
|
854
|
+
children: K(w)
|
|
855
|
+
}) : E ? /* @__PURE__ */ H("div", {
|
|
856
856
|
className: "flex flex-col items-start gap-3",
|
|
857
|
-
children: [/* @__PURE__ */
|
|
857
|
+
children: [/* @__PURE__ */ V("p", {
|
|
858
858
|
className: r(R, $.subtitleText),
|
|
859
859
|
children: t.historyErrorLabel
|
|
860
|
-
}), /* @__PURE__ */
|
|
860
|
+
}), /* @__PURE__ */ V(_, {
|
|
861
861
|
label: t.historyRetryLabel,
|
|
862
862
|
onClick: D
|
|
863
863
|
})]
|
|
864
|
-
}) :
|
|
864
|
+
}) : x.length === 0 ? /* @__PURE__ */ V("p", {
|
|
865
865
|
className: r(R, $.subtitleText),
|
|
866
866
|
children: t.historyEmptyLabel
|
|
867
|
-
}) : /* @__PURE__ */
|
|
867
|
+
}) : /* @__PURE__ */ H("ul", {
|
|
868
868
|
"aria-label": t.historyTitle,
|
|
869
869
|
children: [
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
/* @__PURE__ */
|
|
873
|
-
ref:
|
|
870
|
+
x.map(G),
|
|
871
|
+
C && K(w),
|
|
872
|
+
/* @__PURE__ */ V("li", {
|
|
873
|
+
ref: U,
|
|
874
874
|
"aria-hidden": !0,
|
|
875
875
|
className: "h-px w-full"
|
|
876
876
|
})
|
|
@@ -885,4 +885,4 @@ var H = /* @__PURE__ */ function(e) {
|
|
|
885
885
|
});
|
|
886
886
|
};
|
|
887
887
|
//#endregion
|
|
888
|
-
export {
|
|
888
|
+
export { fe as DESCRIPTION_MAX_LENGTH, G as ScheduledTaskCard, ie as ScheduledTaskCardGrid, re as ScheduledTaskCardSkeleton, Se as ScheduledTaskCreateForm, Te as ScheduledTaskDetailView, pe as ScheduledTaskFrequency, Q as ScheduledTaskRunStatus, Y as ScheduledTaskScheduleType, oe as ScheduledTaskSection, U as ScheduledTaskSectionKey, ue as ScheduledTasks, de 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.125",
|
|
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.125",
|
|
21
|
+
"@epam/ai-dial-kit": "1.1.0-dev.125",
|
|
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"
|