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