@epam/ai-dial-scheduled-tasks 1.2.0-dev.89 → 1.2.0-dev.92
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/calendar-value-B41Uk26Z.js +24 -0
- package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -1
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts +1 -1
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts.map +1 -1
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +27 -0
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -0
- package/components/ScheduledTaskDetailView/ScheduledTaskDetailView.d.ts.map +1 -1
- package/components/ScheduledTaskHistorySection/ScheduledTaskHistorySection.d.ts.map +1 -1
- package/components/ScheduledTaskRunHistoryList/ScheduledTaskRunHistoryList.d.ts.map +1 -1
- package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
- package/index.css +2 -2
- package/index.d.ts +7 -2
- package/index.d.ts.map +1 -1
- package/index.js +731 -586
- package/models/scheduled-task-card-grid-props.d.ts +12 -5
- package/models/scheduled-task-card-grid-props.d.ts.map +1 -1
- package/models/scheduled-task-card-props.d.ts +9 -0
- package/models/scheduled-task-card-props.d.ts.map +1 -1
- package/models/scheduled-task-create-form-props.d.ts +11 -0
- package/models/scheduled-task-create-form-props.d.ts.map +1 -1
- package/models/scheduled-task-detail-view-props.d.ts +20 -0
- package/models/scheduled-task-detail-view-props.d.ts.map +1 -1
- package/models/scheduled-task-history-section-props.d.ts +15 -2
- package/models/scheduled-task-history-section-props.d.ts.map +1 -1
- package/models/scheduled-task-item.d.ts +7 -0
- package/models/scheduled-task-item.d.ts.map +1 -1
- package/models/scheduled-task-run-history-list-props.d.ts +3 -0
- package/models/scheduled-task-run-history-list-props.d.ts.map +1 -1
- package/models/scheduled-tasks-props.d.ts +9 -1
- package/models/scheduled-tasks-props.d.ts.map +1 -1
- package/package.json +8 -3
- package/validation/index.d.ts +3 -0
- package/validation/index.d.ts.map +1 -0
- package/validation/scheduled-task-validation.d.ts +29 -0
- package/validation/scheduled-task-validation.d.ts.map +1 -0
- package/validation.d.ts +3 -0
- package/validation.d.ts.map +1 -0
- package/validation.js +21 -0
package/index.js
CHANGED
|
@@ -1,348 +1,372 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./calendar-value-B41Uk26Z.js";
|
|
2
|
+
import { MARKDOWN_EDITOR_MAX_HEIGHT_CLASS_NAME as l, MARKDOWN_EDITOR_PREVIEW_LIST_CLASS_NAME as u, MDMessageViewer as d, PanelEmptyState as f, buildCssVars as p, mergeClasses as m, useAvailableHeightCap as h, useIsMobile as g } from "@epam/ai-dial-chat-shared";
|
|
3
|
+
import { ButtonAppearance as _, ButtonDropdown as v, ButtonVariant as y, Calendar as b, CalendarMode as x, CardShell as S, DIAL_ICON_SIZE as C, DIAL_KIT_ICON_STROKE as w, ElementSize as T, FolderPath as E, GhostButton as D, GhostIconButton as ee, Highlight as te, Input as ne, Label as O, MenuItemMark as re, NeutralButton as ie, NumberInput as k, Popup as A, PrimaryButton as j, Search as M, Select as ae, Skeleton as N, SkeletonVariant as P, Spinner as oe, Switch as se, Tabs as ce, Textarea as le } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconAlertTriangle as F, IconArrowNarrowLeft as ue, IconArrowsSort as I, IconCircleCheck as L, IconCircleX as de, IconClipboardX as R, IconPencilMinus as z, IconPlayerPause as B, IconPlus as fe, IconTrashX as pe } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as V, lazy as me, useCallback as H, useEffect as he, useId as ge, useLayoutEffect as _e, useMemo as U, useRef as ve, useState as ye } from "react";
|
|
6
|
+
import { Fragment as be, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
7
|
+
import { BuilderFormContainer as xe } from "@epam/ai-dial-builder-form";
|
|
8
|
+
import { LazyMarkdownEditor as Se } from "@epam/ai-dial-ui-kit/editors";
|
|
8
9
|
//#region src/constants/public-class-names.ts
|
|
9
|
-
var
|
|
10
|
+
var Ce = {
|
|
10
11
|
card: "dial-scheduled-tasks-card",
|
|
11
12
|
cardGrid: "dial-scheduled-tasks-card-grid"
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"--stc-
|
|
30
|
-
"--stc-
|
|
31
|
-
"--stc-
|
|
32
|
-
"--stc-
|
|
33
|
-
"--stc-
|
|
34
|
-
"--stc-location-
|
|
35
|
-
"--stc-
|
|
36
|
-
"--stc-
|
|
37
|
-
"--stc-
|
|
38
|
-
|
|
13
|
+
}, K = /* @__PURE__ */ function(e) {
|
|
14
|
+
return e.Active = "active", e.Paused = "paused", e.Completed = "completed", e;
|
|
15
|
+
}({}), q = {
|
|
16
|
+
title: "_title_7q7a6_1",
|
|
17
|
+
description: "_description_7q7a6_5",
|
|
18
|
+
schedulePill: "_schedulePill_7q7a6_9",
|
|
19
|
+
scheduleLabel: "_scheduleLabel_7q7a6_14",
|
|
20
|
+
locationLabel: "_locationLabel_7q7a6_18",
|
|
21
|
+
locationLeaf: "_locationLeaf_7q7a6_22",
|
|
22
|
+
newBadge: "_newBadge_7q7a6_26",
|
|
23
|
+
pausedPill: "_pausedPill_7q7a6_31",
|
|
24
|
+
pausedLabel: "_pausedLabel_7q7a6_36",
|
|
25
|
+
completedPill: "_completedPill_7q7a6_40",
|
|
26
|
+
completedLabel: "_completedLabel_7q7a6_45",
|
|
27
|
+
locationDivider: "_locationDivider_7q7a6_49"
|
|
28
|
+
}, we = ({ item: e, searchQuery: t = "", onCardClick: n, labels: r, styles: i, className: a }) => {
|
|
29
|
+
let o = r?.newBadgeLabel ?? "NEW", s = r?.pausedBadgeLabel ?? "Paused", c = r?.completedBadgeLabel ?? "Completed", { colors: l, typography: u } = i ?? {}, d = u?.titleClassName ?? "dial-body-semi-text", f = u?.descriptionClassName ?? "dial-small-text", h = u?.descriptionSizeClassName ?? "dial-tiny-text", g = u?.scheduleLabelClassName ?? "dial-tiny-text", _ = u?.locationLabelClassName ?? "dial-tiny-text", v = u?.locationLeafClassName ?? "dial-tiny-semi-text", y = u?.newBadgeClassName ?? "dial-tiny-semi-text", b = u?.pausedBadgeClassName ?? "dial-tiny-text", x = u?.completedBadgeClassName ?? "dial-tiny-text", T = e.presentationStatus ?? (e.isActive === !1 ? K.Paused : K.Active), D = p({
|
|
30
|
+
"--stc-title-text": (T === K.Paused ? l?.pausedTitleText : T === K.Completed ? l?.completedTitleText : void 0) ?? l?.titleText,
|
|
31
|
+
"--stc-desc-text": l?.descriptionText,
|
|
32
|
+
"--stc-pill-bg": l?.schedulePillBackground,
|
|
33
|
+
"--stc-pill-border": l?.schedulePillBorder,
|
|
34
|
+
"--stc-schedule-label-text": l?.scheduleLabelText,
|
|
35
|
+
"--stc-location-label-text": l?.locationLabelText,
|
|
36
|
+
"--stc-location-leaf-text": l?.locationLeafText,
|
|
37
|
+
"--stc-new-badge-bg": l?.newBadgeBackground,
|
|
38
|
+
"--stc-new-badge-text": l?.newBadgeText,
|
|
39
|
+
"--stc-location-divider-border": l?.locationDividerBorder,
|
|
40
|
+
"--stc-paused-bg": l?.pausedBadgeBackground,
|
|
41
|
+
"--stc-paused-border": l?.pausedBadgeBorder,
|
|
42
|
+
"--stc-paused-text": l?.pausedBadgeText,
|
|
43
|
+
"--stc-completed-bg": l?.completedBadgeBackground,
|
|
44
|
+
"--stc-completed-border": l?.completedBadgeBorder,
|
|
45
|
+
"--stc-completed-text": l?.completedBadgeText
|
|
46
|
+
}), ee = n ? {
|
|
39
47
|
tabIndex: 0,
|
|
40
48
|
onClick: () => n(e.id),
|
|
41
49
|
onKeyDown: (t) => {
|
|
42
50
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), n(e.id));
|
|
43
51
|
}
|
|
44
52
|
} : {};
|
|
45
|
-
return /* @__PURE__ */
|
|
53
|
+
return /* @__PURE__ */ G(S, {
|
|
46
54
|
role: n ? "button" : "group",
|
|
47
55
|
"aria-label": e.displayName,
|
|
48
|
-
style:
|
|
49
|
-
className:
|
|
50
|
-
...
|
|
56
|
+
style: D,
|
|
57
|
+
className: m("h-[var(--st-card-height,232px)]", n && "cursor-pointer", a, Ce.card),
|
|
58
|
+
...ee,
|
|
51
59
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ G("div", {
|
|
53
61
|
className: "flex min-w-0 shrink-0 items-center gap-2",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ W(te, {
|
|
55
63
|
text: e.displayName,
|
|
56
64
|
query: t,
|
|
57
65
|
maxLines: 1,
|
|
58
|
-
className:
|
|
59
|
-
}), e.isNew && /* @__PURE__ */
|
|
60
|
-
className:
|
|
61
|
-
children:
|
|
66
|
+
className: m(d, q.title)
|
|
67
|
+
}), e.isNew && /* @__PURE__ */ W("span", {
|
|
68
|
+
className: m("shrink-0 rounded-full px-2 py-0.5", y, q.newBadge),
|
|
69
|
+
children: o
|
|
62
70
|
})]
|
|
63
71
|
}),
|
|
64
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
65
|
-
className:
|
|
72
|
+
e.descriptionPreview && /* @__PURE__ */ W("p", {
|
|
73
|
+
className: m("line-clamp-4 min-h-0 flex-1 overflow-hidden", h, f, q.description),
|
|
66
74
|
children: e.descriptionPreview
|
|
67
75
|
}),
|
|
68
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ G("div", {
|
|
69
77
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
78
|
+
children: [/* @__PURE__ */ W("div", {
|
|
71
79
|
className: "flex min-h-[28px] items-center",
|
|
72
|
-
children:
|
|
73
|
-
className:
|
|
74
|
-
children: [/* @__PURE__ */ B
|
|
75
|
-
size:
|
|
80
|
+
children: T === K.Paused ? /* @__PURE__ */ G("span", {
|
|
81
|
+
className: m("inline-flex items-center gap-1.5 rounded-full border px-2 py-1", q.pausedPill, b, q.pausedLabel),
|
|
82
|
+
children: [/* @__PURE__ */ W(B, {
|
|
83
|
+
size: C.SM,
|
|
76
84
|
"aria-hidden": !0,
|
|
77
|
-
stroke:
|
|
78
|
-
}),
|
|
79
|
-
}) : /* @__PURE__ */
|
|
80
|
-
className:
|
|
85
|
+
stroke: w
|
|
86
|
+
}), s]
|
|
87
|
+
}) : T === K.Completed ? /* @__PURE__ */ W("span", {
|
|
88
|
+
className: m("inline-flex items-center rounded-full border px-2 py-1", q.completedPill, x, q.completedLabel),
|
|
89
|
+
children: c
|
|
90
|
+
}) : /* @__PURE__ */ W("span", {
|
|
91
|
+
className: m("inline-block rounded-lg border px-2 py-1", q.schedulePill, g, q.scheduleLabel),
|
|
81
92
|
children: e.scheduleLabel
|
|
82
93
|
})
|
|
83
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */
|
|
94
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ W(E, {
|
|
84
95
|
segments: e.locationSegments,
|
|
85
|
-
labelClassName:
|
|
86
|
-
leafClassName:
|
|
87
|
-
className:
|
|
96
|
+
labelClassName: m(_, q.locationLabel),
|
|
97
|
+
leafClassName: m(v, q.locationLeaf),
|
|
98
|
+
className: m("pt-3", q.locationDivider)
|
|
88
99
|
})]
|
|
89
100
|
})
|
|
90
101
|
]
|
|
91
102
|
});
|
|
92
|
-
},
|
|
103
|
+
}, Te = { card: "_card_11bez_1" }, Ee = [
|
|
93
104
|
"100%",
|
|
94
105
|
"100%",
|
|
95
106
|
"61%"
|
|
96
|
-
],
|
|
107
|
+
], De = "var(--stcs-skeleton-bg)", Oe = ({ styles: e }) => /* @__PURE__ */ G(S, {
|
|
97
108
|
"aria-hidden": !0,
|
|
98
|
-
style:
|
|
99
|
-
className:
|
|
109
|
+
style: p({ "--stcs-skeleton-bg": e?.colors?.skeletonColor }),
|
|
110
|
+
className: m("h-[var(--st-card-height,232px)]", Te.card),
|
|
100
111
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
variant:
|
|
112
|
+
/* @__PURE__ */ W(N, {
|
|
113
|
+
variant: P.Rectangular,
|
|
103
114
|
width: "60%",
|
|
104
115
|
height: "20px",
|
|
105
|
-
color:
|
|
116
|
+
color: De,
|
|
106
117
|
className: "shrink-0"
|
|
107
118
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
119
|
+
/* @__PURE__ */ W("div", {
|
|
109
120
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
110
|
-
children:
|
|
111
|
-
variant:
|
|
121
|
+
children: Ee.map((e, t) => /* @__PURE__ */ W(N, {
|
|
122
|
+
variant: P.Rectangular,
|
|
112
123
|
width: e,
|
|
113
124
|
height: "16px",
|
|
114
|
-
color:
|
|
125
|
+
color: De
|
|
115
126
|
}, t))
|
|
116
127
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
variant:
|
|
128
|
+
/* @__PURE__ */ W(N, {
|
|
129
|
+
variant: P.Rectangular,
|
|
119
130
|
width: "110px",
|
|
120
131
|
height: "28px",
|
|
121
|
-
color:
|
|
132
|
+
color: De,
|
|
122
133
|
className: "shrink-0 rounded-lg"
|
|
123
134
|
})
|
|
124
135
|
]
|
|
125
|
-
}),
|
|
126
|
-
|
|
127
|
-
|
|
136
|
+
}), ke = ({ items: e, searchQuery: t, onCardClick: n, labels: r, cardStyles: i, trailingSkeletonCount: a = 0, skeletonStyles: o, layout: s }) => /* @__PURE__ */ G("div", {
|
|
137
|
+
style: {
|
|
138
|
+
"--st-grid-min-card-width": s?.minCardWidth,
|
|
139
|
+
"--st-grid-gap": s?.gap,
|
|
140
|
+
"--st-card-height": s?.cardHeight,
|
|
141
|
+
"--st-grid-columns": s?.maxColumns ?? 3,
|
|
142
|
+
maxWidth: s?.maxWidth ?? "1180px",
|
|
143
|
+
gap: "var(--st-grid-gap, 20px)",
|
|
144
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(min(100%, max(var(--st-grid-min-card-width, 320px), calc((100% - (var(--st-grid-columns) - 1) * var(--st-grid-gap, 20px)) / var(--st-grid-columns)))), 1fr))"
|
|
145
|
+
},
|
|
146
|
+
className: m("mx-auto grid w-full min-w-0", Ce.cardGrid),
|
|
147
|
+
children: [e.map((e) => /* @__PURE__ */ W(we, {
|
|
128
148
|
item: e,
|
|
129
149
|
searchQuery: t,
|
|
130
150
|
onCardClick: n,
|
|
131
151
|
labels: r,
|
|
132
152
|
styles: i
|
|
133
|
-
}, e.id)), Array.from({ length:
|
|
134
|
-
}),
|
|
135
|
-
container: "
|
|
136
|
-
subtitle: "
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
153
|
+
}, e.id)), Array.from({ length: a }, (e, t) => /* @__PURE__ */ W(Oe, { styles: o }, `skeleton-${t}`))]
|
|
154
|
+
}), J = {
|
|
155
|
+
container: "_container_3vz4t_2",
|
|
156
|
+
subtitle: "_subtitle_3vz4t_6",
|
|
157
|
+
createButtonLabel: "_createButtonLabel_3vz4t_10",
|
|
158
|
+
sortButton: "_sortButton_3vz4t_19",
|
|
159
|
+
createButton: "_createButton_3vz4t_10",
|
|
160
|
+
sortControlHidden: "_sortControlHidden_3vz4t_49"
|
|
161
|
+
}, Ae = (e, t, n, r, i, a) => {
|
|
141
162
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
142
|
-
},
|
|
163
|
+
}, je = (e) => {
|
|
143
164
|
if (!e || e === document.body) return null;
|
|
144
165
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
145
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
146
|
-
},
|
|
147
|
-
let { colors:
|
|
148
|
-
"--st-bg":
|
|
149
|
-
"--st-subtitle-text":
|
|
150
|
-
"--st-sort-text":
|
|
151
|
-
}),
|
|
152
|
-
|
|
153
|
-
}, [
|
|
154
|
-
|
|
155
|
-
}, []),
|
|
156
|
-
|
|
166
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : je(e.parentElement);
|
|
167
|
+
}, Me = ({ labels: e, onCreateClick: t, searchQuery: n, onSearchQueryChange: r, sortKey: i, onSortChange: a, items: o, isLoading: s = !1, error: c, onRetry: l, hasMore: u = !1, isLoadingMore: d = !1, skeletonCount: h = 6, onLoadMore: g, onCardClick: b, banner: x, styles: S, sortIcon: E, className: ee, gridLayout: te, cardStyles: ne, loadMoreError: O, onRetryLoadMore: ie }) => {
|
|
168
|
+
let { colors: k, typography: A } = S ?? {}, ae = A?.titleClassName ?? "dial-h1-text", N = A?.subtitleClassName ?? "dial-body-text", P = p({
|
|
169
|
+
"--st-bg": k?.background,
|
|
170
|
+
"--st-subtitle-text": k?.subtitleText,
|
|
171
|
+
"--st-sort-text": k?.sortButtonText
|
|
172
|
+
}), se = (e) => {
|
|
173
|
+
r(e ?? "");
|
|
174
|
+
}, [ce, le] = ye(!1), [F, ue] = ye(!1), L = ve(null), de = H(() => {
|
|
175
|
+
ue(!0);
|
|
176
|
+
}, []), R = H(() => {
|
|
177
|
+
ue(!1);
|
|
157
178
|
}, []);
|
|
158
|
-
|
|
159
|
-
let e =
|
|
160
|
-
|
|
161
|
-
}, [
|
|
162
|
-
let
|
|
179
|
+
_e(() => {
|
|
180
|
+
let e = L.current;
|
|
181
|
+
F && ce && e != null && e.offsetParent == null && le(!1);
|
|
182
|
+
}, [F, ce]);
|
|
183
|
+
let z = e.sortOptions.find((e) => e.value === i)?.label ?? e.sortLabel, B = U(() => e.sortOptions.map((e) => ({
|
|
163
184
|
key: e.value,
|
|
164
185
|
label: e.label,
|
|
165
|
-
mark:
|
|
166
|
-
checked: e.value ===
|
|
167
|
-
onClick: () =>
|
|
186
|
+
mark: re.Check,
|
|
187
|
+
checked: e.value === i,
|
|
188
|
+
onClick: () => a(e.value)
|
|
168
189
|
})), [
|
|
169
190
|
e.sortOptions,
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
]),
|
|
173
|
-
|
|
174
|
-
let e =
|
|
175
|
-
if (!e || !
|
|
176
|
-
let t =
|
|
191
|
+
i,
|
|
192
|
+
a
|
|
193
|
+
]), pe = Ae(s, d, !!c, o.length, n.trim().length > 0, e), V = ve(null);
|
|
194
|
+
he(() => {
|
|
195
|
+
let e = V.current;
|
|
196
|
+
if (!e || !g) return;
|
|
197
|
+
let t = je(e.parentElement);
|
|
177
198
|
if (!t) return;
|
|
178
199
|
let n = () => {
|
|
179
|
-
if (
|
|
200
|
+
if (d || s || O || !u) return;
|
|
180
201
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
181
|
-
r.top < n.bottom && r.bottom > n.top &&
|
|
202
|
+
r.top < n.bottom && r.bottom > n.top && g();
|
|
182
203
|
};
|
|
183
204
|
return t.addEventListener("scroll", n, { passive: !0 }), n(), () => t.removeEventListener("scroll", n);
|
|
184
205
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
206
|
+
u,
|
|
207
|
+
d,
|
|
208
|
+
s,
|
|
209
|
+
O,
|
|
210
|
+
g
|
|
189
211
|
]);
|
|
190
|
-
let me = () =>
|
|
212
|
+
let me = () => s ? /* @__PURE__ */ W(oe, {}) : c ? /* @__PURE__ */ G("div", {
|
|
191
213
|
className: "flex flex-col items-center gap-3",
|
|
192
|
-
children: [/* @__PURE__ */
|
|
193
|
-
className:
|
|
214
|
+
children: [/* @__PURE__ */ W("p", {
|
|
215
|
+
className: m(N, J.subtitle),
|
|
194
216
|
children: e.errorLabel
|
|
195
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ W(D, {
|
|
196
218
|
label: e.retryLabel,
|
|
197
|
-
onClick:
|
|
219
|
+
onClick: l
|
|
198
220
|
})]
|
|
199
|
-
}) :
|
|
200
|
-
className:
|
|
221
|
+
}) : o.length === 0 ? n.trim() ? /* @__PURE__ */ W("p", {
|
|
222
|
+
className: m(N, J.subtitle),
|
|
201
223
|
children: e.noResultsLabel
|
|
202
|
-
}) : /* @__PURE__ */
|
|
224
|
+
}) : /* @__PURE__ */ W(f, { label: e.emptyStateLabel }) : /* @__PURE__ */ G("div", {
|
|
203
225
|
className: "flex w-full flex-col gap-6",
|
|
204
|
-
children: [/* @__PURE__ */ B(ye, {
|
|
205
|
-
items: f,
|
|
206
|
-
searchQuery: n,
|
|
207
|
-
onCardClick: te,
|
|
208
|
-
labels: e.cardLabels,
|
|
209
|
-
trailingSkeletonCount: x ? S : 0,
|
|
210
|
-
skeletonStyles: { colors: { skeletonColor: D?.skeletonColor } }
|
|
211
|
-
}), /* @__PURE__ */ B("div", {
|
|
212
|
-
ref: H,
|
|
213
|
-
"aria-hidden": !0,
|
|
214
|
-
className: "h-px w-full"
|
|
215
|
-
})]
|
|
216
|
-
}), U = p || !!_ || f.length === 0;
|
|
217
|
-
return /* @__PURE__ */ V("div", {
|
|
218
|
-
style: A,
|
|
219
|
-
className: a("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", K.container),
|
|
220
226
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ W(ke, {
|
|
228
|
+
items: o,
|
|
229
|
+
searchQuery: n,
|
|
230
|
+
onCardClick: b,
|
|
231
|
+
labels: e.cardLabels,
|
|
232
|
+
trailingSkeletonCount: d ? h : 0,
|
|
233
|
+
skeletonStyles: { colors: { skeletonColor: k?.skeletonColor } },
|
|
234
|
+
cardStyles: ne,
|
|
235
|
+
layout: te
|
|
236
|
+
}),
|
|
237
|
+
O && /* @__PURE__ */ G("div", {
|
|
238
|
+
role: "alert",
|
|
239
|
+
className: "flex items-center gap-3",
|
|
240
|
+
children: [/* @__PURE__ */ W("span", {
|
|
241
|
+
className: m(N, J.subtitle),
|
|
242
|
+
children: e.loadMoreErrorLabel ?? e.errorLabel
|
|
243
|
+
}), /* @__PURE__ */ W(D, {
|
|
244
|
+
label: e.retryLabel,
|
|
245
|
+
onClick: ie
|
|
246
|
+
})]
|
|
247
|
+
}),
|
|
248
|
+
/* @__PURE__ */ W("div", {
|
|
249
|
+
ref: V,
|
|
250
|
+
"aria-hidden": !0,
|
|
251
|
+
className: "h-px w-full"
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
}), ge = s || !!c || o.length === 0;
|
|
255
|
+
return /* @__PURE__ */ G("div", {
|
|
256
|
+
style: P,
|
|
257
|
+
className: m("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", J.container, ee),
|
|
258
|
+
children: [
|
|
259
|
+
/* @__PURE__ */ G("div", {
|
|
222
260
|
className: "flex items-start justify-between gap-4",
|
|
223
|
-
children: [/* @__PURE__ */
|
|
261
|
+
children: [/* @__PURE__ */ G("div", {
|
|
224
262
|
className: "min-w-0 gap-2",
|
|
225
|
-
children: [/* @__PURE__ */
|
|
226
|
-
className:
|
|
263
|
+
children: [/* @__PURE__ */ W("h1", {
|
|
264
|
+
className: m("truncate", ae),
|
|
227
265
|
children: e.title
|
|
228
|
-
}), /* @__PURE__ */
|
|
229
|
-
className:
|
|
266
|
+
}), /* @__PURE__ */ W("p", {
|
|
267
|
+
className: m("mt-1", N, J.subtitle),
|
|
230
268
|
children: e.subtitle
|
|
231
269
|
})]
|
|
232
|
-
}), /* @__PURE__ */
|
|
270
|
+
}), /* @__PURE__ */ W(j, {
|
|
233
271
|
label: e.createButtonLabel,
|
|
234
|
-
textClassName:
|
|
272
|
+
textClassName: J.createButtonLabel,
|
|
235
273
|
"aria-label": e.createButtonLabel,
|
|
236
|
-
iconBefore: /* @__PURE__ */
|
|
237
|
-
size:
|
|
274
|
+
iconBefore: /* @__PURE__ */ W(fe, {
|
|
275
|
+
size: C.SM,
|
|
238
276
|
"aria-hidden": !0,
|
|
239
|
-
stroke:
|
|
277
|
+
stroke: w
|
|
240
278
|
}),
|
|
241
279
|
onClick: t,
|
|
242
|
-
className:
|
|
280
|
+
className: m("shrink-0", J.createButton)
|
|
243
281
|
})]
|
|
244
282
|
}),
|
|
245
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ G("div", {
|
|
246
284
|
className: "flex flex-wrap items-center gap-3",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
285
|
+
children: [/* @__PURE__ */ W("div", {
|
|
248
286
|
role: "search",
|
|
249
287
|
className: "flex-1",
|
|
250
|
-
children: /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ W(M, {
|
|
251
289
|
value: n,
|
|
252
|
-
onChange:
|
|
290
|
+
onChange: se,
|
|
253
291
|
placeholder: e.searchPlaceholder,
|
|
254
292
|
clearLabel: e.clearSearchLabel,
|
|
255
293
|
"aria-label": e.searchAriaLabel,
|
|
256
|
-
size:
|
|
257
|
-
onFocus:
|
|
258
|
-
onBlur:
|
|
294
|
+
size: T.Large,
|
|
295
|
+
onFocus: de,
|
|
296
|
+
onBlur: R
|
|
259
297
|
})
|
|
260
|
-
}), e.sortOptions.length > 0 && /* @__PURE__ */
|
|
261
|
-
ref:
|
|
262
|
-
className:
|
|
263
|
-
children: /* @__PURE__ */
|
|
264
|
-
items:
|
|
265
|
-
label:
|
|
266
|
-
variant:
|
|
267
|
-
appearance:
|
|
268
|
-
|
|
298
|
+
}), e.sortOptions.length > 0 && /* @__PURE__ */ W("div", {
|
|
299
|
+
ref: L,
|
|
300
|
+
className: m(F && J.sortControlHidden),
|
|
301
|
+
children: /* @__PURE__ */ W(v, {
|
|
302
|
+
items: B,
|
|
303
|
+
label: z,
|
|
304
|
+
variant: y.Primary,
|
|
305
|
+
appearance: _.Ghost,
|
|
306
|
+
iconBefore: E === void 0 ? /* @__PURE__ */ W(I, {
|
|
307
|
+
size: C.SM,
|
|
308
|
+
"aria-hidden": !0,
|
|
309
|
+
stroke: w
|
|
310
|
+
}) : E,
|
|
311
|
+
className: J.sortButton
|
|
269
312
|
})
|
|
270
313
|
})]
|
|
271
314
|
}),
|
|
272
|
-
|
|
273
|
-
/* @__PURE__ */
|
|
315
|
+
x,
|
|
316
|
+
/* @__PURE__ */ W("span", {
|
|
274
317
|
role: "status",
|
|
275
318
|
"aria-live": "polite",
|
|
276
319
|
className: "sr-only",
|
|
277
|
-
children:
|
|
320
|
+
children: pe
|
|
278
321
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
280
|
-
className:
|
|
322
|
+
/* @__PURE__ */ W("div", {
|
|
323
|
+
className: m("mx-auto flex size-full w-full min-w-0 flex-col", ge && "items-center justify-center"),
|
|
281
324
|
children: me()
|
|
282
325
|
})
|
|
283
326
|
]
|
|
284
327
|
});
|
|
285
|
-
},
|
|
328
|
+
}, Ne = /* @__PURE__ */ function(e) {
|
|
286
329
|
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
287
|
-
}({}),
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
if (e == null) return "";
|
|
291
|
-
let t = e instanceof Date ? e : new Date(e);
|
|
292
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${J(t.getMonth() + 1)}-${J(t.getDate())}T${J(t.getHours())}:${J(t.getMinutes())}`;
|
|
293
|
-
}, Oe = (e) => {
|
|
294
|
-
if (!e) return null;
|
|
295
|
-
let [t, n, r] = e.split("-").map(Number);
|
|
296
|
-
return new Date(t, n - 1, r);
|
|
297
|
-
}, ke = (e) => {
|
|
298
|
-
if (e == null) return "";
|
|
299
|
-
let t = e instanceof Date ? e : new Date(e);
|
|
300
|
-
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${J(t.getMonth() + 1)}-${J(t.getDate())}`;
|
|
301
|
-
}, Ae = (e) => {
|
|
302
|
-
let t = Number(e);
|
|
303
|
-
return e && Number.isFinite(t) ? String(t + 1) : null;
|
|
304
|
-
}, je = (e) => {
|
|
305
|
-
let t = typeof e == "string" ? Number(e) : NaN;
|
|
306
|
-
return Number.isFinite(t) ? String(t - 1) : "";
|
|
307
|
-
}, Me = { error: "_error_v2pfn_4" }, Ne = ({ label: e, value: t, onChange: n, error: r, errorClassName: i = "dial-small-text" }) => {
|
|
308
|
-
let o = pe(() => /* @__PURE__ */ new Date(), []);
|
|
309
|
-
return /* @__PURE__ */ V("div", {
|
|
330
|
+
}({}), Pe = { error: "_error_v2pfn_4" }, Fe = ({ label: e, value: t, onChange: r, error: i, errorClassName: a = "dial-small-text" }) => {
|
|
331
|
+
let o = U(() => /* @__PURE__ */ new Date(), []);
|
|
332
|
+
return /* @__PURE__ */ G("div", {
|
|
310
333
|
className: "flex flex-col gap-1",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
334
|
+
children: [/* @__PURE__ */ W(b, {
|
|
312
335
|
id: "scheduled-task-run-at",
|
|
313
|
-
mode:
|
|
314
|
-
value:
|
|
315
|
-
onChange: (e) => n(
|
|
336
|
+
mode: x.DateTime,
|
|
337
|
+
value: s(t),
|
|
338
|
+
onChange: (e) => r(n(e)),
|
|
316
339
|
minDate: o,
|
|
317
340
|
labelProps: {
|
|
318
341
|
label: e,
|
|
319
342
|
required: !0
|
|
320
343
|
},
|
|
321
|
-
invalid: !!
|
|
322
|
-
}),
|
|
323
|
-
className: a
|
|
324
|
-
children:
|
|
344
|
+
invalid: !!i
|
|
345
|
+
}), i && /* @__PURE__ */ W("p", {
|
|
346
|
+
className: m(a, Pe.error),
|
|
347
|
+
children: i
|
|
325
348
|
})]
|
|
326
349
|
});
|
|
327
350
|
}, Y = {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
"--stcf-
|
|
335
|
-
"--stcf-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
351
|
+
formColumn: "_formColumn_1la57_1",
|
|
352
|
+
detailsColumn: "_detailsColumn_1la57_10",
|
|
353
|
+
sectionSubtitle: "_sectionSubtitle_1la57_14",
|
|
354
|
+
instructionsError: "_instructionsError_1la57_18"
|
|
355
|
+
}, Ie = me(async () => ({ default: (await Se()).MarkdownEditor })), Le = ({ labels: n, values: r, errors: s, modelSelector: d, modelLabelId: f, onFieldChange: g, onBack: _, onCancel: v, onSubmit: y, isSubmitting: S = !1, markdownEditorTheme: T, backIcon: E, className: D, styles: ee }) => {
|
|
356
|
+
let te = ge(), re = h(), [ie, A] = ye(), { colors: j, typography: M, layout: N } = ee ?? {}, P = M?.titleClassName ?? "dial-h1-text", se = M?.sectionTitleClassName ?? "dial-body-semi-text", ce = M?.sectionSubtitleClassName ?? "dial-tiny-text", F = M?.instructionsLabelClassName ?? "dial-body-semi-text mb-1", I = M?.instructionsErrorClassName ?? "dial-small-text", L = p({
|
|
357
|
+
"--stcf-details-border": j?.detailsColumnBorder,
|
|
358
|
+
"--stcf-subtitle-text": j?.sectionSubtitleText,
|
|
359
|
+
"--stcf-error-text": j?.instructionsErrorText
|
|
360
|
+
}), de = (e) => {
|
|
361
|
+
A(c.test(e.target.value) ? void 0 : n.timeInvalidLabel), g("time", e.target.value);
|
|
362
|
+
}, R = (e) => {
|
|
363
|
+
A(void 0), g("time", typeof e == "string" ? e : "");
|
|
364
|
+
}, z = r.repeat !== t.OneTime && r.repeat !== t.Hourly;
|
|
365
|
+
he(() => {
|
|
366
|
+
z || A(void 0);
|
|
367
|
+
}, [z]);
|
|
368
|
+
let B = z ? ie ?? s.time : void 0, fe = (e) => g("runAt", e), pe = S || !r.displayName.trim() || !r.modelId || !r.prompt.trim() || z && !r.time || !!B;
|
|
369
|
+
return /* @__PURE__ */ W(xe, {
|
|
346
370
|
labels: {
|
|
347
371
|
title: n.pageTitle,
|
|
348
372
|
backButtonLabel: n.backButtonLabel,
|
|
@@ -350,39 +374,51 @@ var U = {
|
|
|
350
374
|
submitButtonLabel: n.createButtonLabel,
|
|
351
375
|
submittingLabel: n.submittingLabel ?? "Saving"
|
|
352
376
|
},
|
|
353
|
-
onBack:
|
|
354
|
-
onCancel:
|
|
355
|
-
onSubmit:
|
|
356
|
-
isCancelDisabled:
|
|
357
|
-
isSubmitDisabled:
|
|
358
|
-
isSubmitting:
|
|
377
|
+
onBack: _,
|
|
378
|
+
onCancel: v,
|
|
379
|
+
onSubmit: y,
|
|
380
|
+
isCancelDisabled: S,
|
|
381
|
+
isSubmitDisabled: pe,
|
|
382
|
+
isSubmitting: S,
|
|
383
|
+
backIcon: E === void 0 ? /* @__PURE__ */ W(ue, {
|
|
384
|
+
size: C.LG,
|
|
385
|
+
stroke: w,
|
|
386
|
+
"aria-hidden": !0,
|
|
387
|
+
className: "rtl:scale-x-[-1]"
|
|
388
|
+
}) : E,
|
|
389
|
+
layout: {
|
|
390
|
+
sideColumnWidth: N?.detailsWidth,
|
|
391
|
+
columnGap: N?.columnGap,
|
|
392
|
+
reserveEndColumn: !1
|
|
393
|
+
},
|
|
394
|
+
className: D,
|
|
359
395
|
styles: {
|
|
360
|
-
colors: { background:
|
|
396
|
+
colors: { background: j?.background },
|
|
361
397
|
header: {
|
|
362
|
-
colors: { borderColor:
|
|
363
|
-
typography: { fontClassName:
|
|
398
|
+
colors: { borderColor: j?.headerBorder },
|
|
399
|
+
typography: { fontClassName: P }
|
|
364
400
|
},
|
|
365
|
-
cssVars:
|
|
401
|
+
cssVars: L
|
|
366
402
|
},
|
|
367
|
-
left: /* @__PURE__ */
|
|
403
|
+
left: /* @__PURE__ */ G("div", {
|
|
368
404
|
role: "group",
|
|
369
405
|
"aria-label": n.detailsSectionTitle,
|
|
370
|
-
className:
|
|
406
|
+
className: m("flex flex-1 flex-col gap-5 border-e py-6", Y.detailsColumn, Y.formColumn),
|
|
371
407
|
children: [
|
|
372
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ G("div", {
|
|
373
409
|
className: "flex flex-col gap-1",
|
|
374
|
-
children: [/* @__PURE__ */
|
|
375
|
-
className:
|
|
410
|
+
children: [/* @__PURE__ */ W("h2", {
|
|
411
|
+
className: se,
|
|
376
412
|
children: n.detailsSectionTitle
|
|
377
|
-
}), /* @__PURE__ */
|
|
378
|
-
className:
|
|
413
|
+
}), /* @__PURE__ */ W("p", {
|
|
414
|
+
className: m(ce, Y.sectionSubtitle),
|
|
379
415
|
children: n.detailsSectionSubtitle
|
|
380
416
|
})]
|
|
381
417
|
}),
|
|
382
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ W(ne, {
|
|
383
419
|
id: "scheduled-task-display-name",
|
|
384
420
|
value: r.displayName,
|
|
385
|
-
onChange: (e) =>
|
|
421
|
+
onChange: (e) => g("displayName", e ?? ""),
|
|
386
422
|
labelProps: {
|
|
387
423
|
label: n.displayNameLabel,
|
|
388
424
|
required: !0
|
|
@@ -390,92 +426,92 @@ var U = {
|
|
|
390
426
|
invalid: !!s.displayName,
|
|
391
427
|
error: s.displayName
|
|
392
428
|
}),
|
|
393
|
-
/* @__PURE__ */
|
|
429
|
+
/* @__PURE__ */ W(le, {
|
|
394
430
|
id: "scheduled-task-description",
|
|
395
431
|
value: r.description ?? "",
|
|
396
|
-
onChange: (e) =>
|
|
432
|
+
onChange: (e) => g("description", e),
|
|
397
433
|
labelProps: { label: n.descriptionLabel },
|
|
398
434
|
maxLength: 500,
|
|
399
435
|
invalid: !!s.description,
|
|
400
436
|
error: s.description,
|
|
401
437
|
caption: r.description ? `${r.description.length}/500` : void 0
|
|
402
438
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
439
|
+
/* @__PURE__ */ G("div", {
|
|
404
440
|
className: "flex flex-col gap-1",
|
|
405
441
|
children: [
|
|
406
|
-
/* @__PURE__ */
|
|
407
|
-
id:
|
|
442
|
+
/* @__PURE__ */ W(O, {
|
|
443
|
+
id: f,
|
|
408
444
|
label: n.modelOrAgentLabel,
|
|
409
445
|
required: !0
|
|
410
446
|
}),
|
|
411
|
-
|
|
412
|
-
s.modelId && /* @__PURE__ */
|
|
413
|
-
className:
|
|
447
|
+
d,
|
|
448
|
+
s.modelId && /* @__PURE__ */ W("p", {
|
|
449
|
+
className: m(I, Y.instructionsError),
|
|
414
450
|
children: s.modelId
|
|
415
451
|
})
|
|
416
452
|
]
|
|
417
453
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ G("div", {
|
|
419
455
|
className: "flex flex-col gap-3",
|
|
420
456
|
children: [
|
|
421
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ W(ae, {
|
|
422
458
|
labelProps: { label: n.repeatLabel },
|
|
423
459
|
value: r.repeat,
|
|
424
|
-
onChange: (e) =>
|
|
460
|
+
onChange: (e) => g("repeat", e),
|
|
425
461
|
options: n.repeatOptions.map((e) => ({
|
|
426
462
|
value: e.key,
|
|
427
463
|
label: e.label
|
|
428
464
|
}))
|
|
429
465
|
}),
|
|
430
|
-
r.repeat ===
|
|
466
|
+
r.repeat === t.OneTime && /* @__PURE__ */ W(Fe, {
|
|
431
467
|
label: n.runAtLabel,
|
|
432
468
|
value: r.runAt ?? "",
|
|
433
|
-
onChange:
|
|
469
|
+
onChange: fe,
|
|
434
470
|
error: s.runAt,
|
|
435
|
-
errorClassName:
|
|
471
|
+
errorClassName: I
|
|
436
472
|
}),
|
|
437
|
-
r.repeat !==
|
|
438
|
-
|
|
473
|
+
r.repeat !== t.OneTime && /* @__PURE__ */ G(be, { children: [
|
|
474
|
+
z && /* @__PURE__ */ G("div", {
|
|
439
475
|
className: "flex flex-col gap-1",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ W(b, {
|
|
441
477
|
id: "scheduled-task-time",
|
|
442
|
-
mode:
|
|
478
|
+
mode: x.Time,
|
|
443
479
|
value: r.time,
|
|
444
|
-
onChange:
|
|
445
|
-
onBlur:
|
|
480
|
+
onChange: R,
|
|
481
|
+
onBlur: de,
|
|
446
482
|
labelProps: {
|
|
447
483
|
label: n.timeLabel,
|
|
448
484
|
required: !0
|
|
449
485
|
},
|
|
450
|
-
invalid: !!
|
|
451
|
-
disabled:
|
|
486
|
+
invalid: !!B,
|
|
487
|
+
disabled: S,
|
|
452
488
|
showTimezone: !0
|
|
453
|
-
}),
|
|
454
|
-
className:
|
|
455
|
-
children:
|
|
489
|
+
}), B && /* @__PURE__ */ W("p", {
|
|
490
|
+
className: m(I, Y.instructionsError),
|
|
491
|
+
children: B
|
|
456
492
|
})]
|
|
457
493
|
}),
|
|
458
|
-
r.repeat ===
|
|
494
|
+
r.repeat === t.Weekly && /* @__PURE__ */ G("div", {
|
|
459
495
|
className: "flex flex-col gap-1",
|
|
460
|
-
children: [/* @__PURE__ */
|
|
496
|
+
children: [/* @__PURE__ */ W(b, {
|
|
461
497
|
id: "scheduled-task-day-of-week",
|
|
462
|
-
mode:
|
|
463
|
-
value:
|
|
464
|
-
onChange: (e) =>
|
|
498
|
+
mode: x.Weekday,
|
|
499
|
+
value: a(r.dayOfWeek),
|
|
500
|
+
onChange: (e) => g("dayOfWeek", o(e)),
|
|
465
501
|
labelProps: {
|
|
466
502
|
label: n.dayOfWeekLabel,
|
|
467
503
|
required: !0
|
|
468
504
|
},
|
|
469
505
|
invalid: !!s.dayOfWeek
|
|
470
|
-
}), s.dayOfWeek && /* @__PURE__ */
|
|
471
|
-
className:
|
|
506
|
+
}), s.dayOfWeek && /* @__PURE__ */ W("p", {
|
|
507
|
+
className: m(I, Y.instructionsError),
|
|
472
508
|
children: s.dayOfWeek
|
|
473
509
|
})]
|
|
474
510
|
}),
|
|
475
|
-
r.repeat ===
|
|
511
|
+
r.repeat === t.Monthly && /* @__PURE__ */ W(ne, {
|
|
476
512
|
id: "scheduled-task-day-of-month",
|
|
477
513
|
value: r.dayOfMonth ?? "",
|
|
478
|
-
onChange: (e) =>
|
|
514
|
+
onChange: (e) => g("dayOfMonth", e ?? ""),
|
|
479
515
|
labelProps: {
|
|
480
516
|
label: n.dayOfMonthLabel,
|
|
481
517
|
required: !0
|
|
@@ -483,13 +519,13 @@ var U = {
|
|
|
483
519
|
invalid: !!s.dayOfMonth,
|
|
484
520
|
error: s.dayOfMonth
|
|
485
521
|
}),
|
|
486
|
-
r.repeat ===
|
|
522
|
+
r.repeat === t.Hourly && /* @__PURE__ */ W(k, {
|
|
487
523
|
id: "scheduled-task-minute",
|
|
488
524
|
integer: !0,
|
|
489
525
|
min: 0,
|
|
490
526
|
max: 59,
|
|
491
527
|
value: r.minute ?? "",
|
|
492
|
-
onChange: (e) =>
|
|
528
|
+
onChange: (e) => g("minute", e == null ? "" : String(e)),
|
|
493
529
|
labelProps: {
|
|
494
530
|
label: n.minuteLabel,
|
|
495
531
|
required: !0
|
|
@@ -497,34 +533,34 @@ var U = {
|
|
|
497
533
|
invalid: !!s.minute,
|
|
498
534
|
error: s.minute
|
|
499
535
|
}),
|
|
500
|
-
/* @__PURE__ */
|
|
536
|
+
/* @__PURE__ */ G("div", {
|
|
501
537
|
className: "flex flex-row gap-3",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
538
|
+
children: [/* @__PURE__ */ G("div", {
|
|
503
539
|
className: "flex flex-1 flex-col gap-1",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
540
|
+
children: [/* @__PURE__ */ W(b, {
|
|
505
541
|
id: "scheduled-task-start-date",
|
|
506
|
-
mode:
|
|
507
|
-
value:
|
|
508
|
-
onChange: (e) =>
|
|
542
|
+
mode: x.Date,
|
|
543
|
+
value: e(r.startDate),
|
|
544
|
+
onChange: (e) => g("startDate", i(e)),
|
|
509
545
|
labelProps: { label: n.startDateLabel },
|
|
510
546
|
placeholder: n.startDatePlaceholder,
|
|
511
547
|
invalid: !!s.startDate
|
|
512
|
-
}), s.startDate && /* @__PURE__ */
|
|
513
|
-
className:
|
|
548
|
+
}), s.startDate && /* @__PURE__ */ W("p", {
|
|
549
|
+
className: m(I, Y.instructionsError),
|
|
514
550
|
children: s.startDate
|
|
515
551
|
})]
|
|
516
|
-
}), /* @__PURE__ */
|
|
552
|
+
}), /* @__PURE__ */ G("div", {
|
|
517
553
|
className: "flex flex-1 flex-col gap-1",
|
|
518
|
-
children: [/* @__PURE__ */
|
|
554
|
+
children: [/* @__PURE__ */ W(b, {
|
|
519
555
|
id: "scheduled-task-end-date",
|
|
520
|
-
mode:
|
|
521
|
-
value:
|
|
522
|
-
onChange: (e) =>
|
|
556
|
+
mode: x.Date,
|
|
557
|
+
value: e(r.endDate),
|
|
558
|
+
onChange: (e) => g("endDate", i(e)),
|
|
523
559
|
labelProps: { label: n.endDateLabel },
|
|
524
560
|
placeholder: n.endDatePlaceholder,
|
|
525
561
|
invalid: !!s.endDate
|
|
526
|
-
}), s.endDate && /* @__PURE__ */
|
|
527
|
-
className:
|
|
562
|
+
}), s.endDate && /* @__PURE__ */ W("p", {
|
|
563
|
+
className: m(I, Y.instructionsError),
|
|
528
564
|
children: s.endDate
|
|
529
565
|
})]
|
|
530
566
|
})]
|
|
@@ -534,43 +570,44 @@ var U = {
|
|
|
534
570
|
})
|
|
535
571
|
]
|
|
536
572
|
}),
|
|
537
|
-
children: /* @__PURE__ */
|
|
573
|
+
children: /* @__PURE__ */ G("div", {
|
|
538
574
|
role: "group",
|
|
539
575
|
"aria-label": n.configurationSectionTitle,
|
|
540
|
-
className: "flex flex-1 flex-col gap-5
|
|
541
|
-
children: [/* @__PURE__ */
|
|
576
|
+
className: m("flex flex-1 flex-col gap-5 py-6", Y.formColumn),
|
|
577
|
+
children: [/* @__PURE__ */ G("div", {
|
|
542
578
|
className: "flex flex-col gap-1",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
544
|
-
className:
|
|
579
|
+
children: [/* @__PURE__ */ W("h2", {
|
|
580
|
+
className: se,
|
|
545
581
|
children: n.configurationSectionTitle
|
|
546
|
-
}), /* @__PURE__ */
|
|
547
|
-
className:
|
|
582
|
+
}), /* @__PURE__ */ W("p", {
|
|
583
|
+
className: m(ce, Y.sectionSubtitle),
|
|
548
584
|
children: n.configurationSectionSubtitle
|
|
549
585
|
})]
|
|
550
|
-
}), /* @__PURE__ */
|
|
586
|
+
}), /* @__PURE__ */ G("div", {
|
|
551
587
|
className: "flex flex-1 flex-col gap-1",
|
|
552
588
|
children: [
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
htmlFor:
|
|
555
|
-
className:
|
|
589
|
+
/* @__PURE__ */ W("label", {
|
|
590
|
+
htmlFor: te,
|
|
591
|
+
className: F,
|
|
556
592
|
children: n.instructionsLabel
|
|
557
593
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
559
|
-
ref:
|
|
560
|
-
className:
|
|
561
|
-
children: /* @__PURE__ */
|
|
562
|
-
fallback: /* @__PURE__ */
|
|
563
|
-
children: /* @__PURE__ */
|
|
564
|
-
id:
|
|
594
|
+
/* @__PURE__ */ W("div", {
|
|
595
|
+
ref: re,
|
|
596
|
+
className: m("w-full max-w-[996px]", l, u),
|
|
597
|
+
children: /* @__PURE__ */ W(V, {
|
|
598
|
+
fallback: /* @__PURE__ */ W(oe, {}),
|
|
599
|
+
children: /* @__PURE__ */ W(Ie, {
|
|
600
|
+
id: te,
|
|
565
601
|
value: r.prompt,
|
|
566
|
-
onChange: (e) =>
|
|
602
|
+
onChange: (e) => g("prompt", e),
|
|
567
603
|
height: 480,
|
|
568
|
-
theme:
|
|
604
|
+
theme: T,
|
|
605
|
+
placeholder: n.instructionsPlaceholder
|
|
569
606
|
})
|
|
570
607
|
})
|
|
571
608
|
}),
|
|
572
|
-
s.prompt && /* @__PURE__ */
|
|
573
|
-
className:
|
|
609
|
+
s.prompt && /* @__PURE__ */ W("p", {
|
|
610
|
+
className: m(I, Y.instructionsError),
|
|
574
611
|
children: s.prompt
|
|
575
612
|
})
|
|
576
613
|
]
|
|
@@ -579,221 +616,242 @@ var U = {
|
|
|
579
616
|
});
|
|
580
617
|
}, X = /* @__PURE__ */ function(e) {
|
|
581
618
|
return e.Details = "details", e.Configuration = "configuration", e.History = "history", e;
|
|
582
|
-
}({}),
|
|
619
|
+
}({}), Re = /* @__PURE__ */ function(e) {
|
|
583
620
|
return e.Card = "card", e.Flow = "flow", e;
|
|
584
|
-
}({}),
|
|
621
|
+
}({}), ze = { subtitleText: "_subtitleText_1i4x2_3" }, Be = ({ instructionsLabel: e, instructionsMarkdown: t, renderInstructions: n, fieldLabelClassName: r = "dial-tiny-text" }) => /* @__PURE__ */ G("div", {
|
|
585
622
|
role: "group",
|
|
586
623
|
"aria-label": e,
|
|
587
624
|
className: "flex flex-col gap-1",
|
|
588
|
-
children: [/* @__PURE__ */
|
|
589
|
-
className:
|
|
625
|
+
children: [/* @__PURE__ */ W("span", {
|
|
626
|
+
className: m(r, ze.subtitleText),
|
|
590
627
|
children: e
|
|
591
|
-
}), t && (
|
|
592
|
-
}),
|
|
593
|
-
t && /* @__PURE__ */
|
|
628
|
+
}), t && (n ? n(t) : /* @__PURE__ */ W(d, { content: t }))]
|
|
629
|
+
}), Ve = { subtitleText: "_subtitleText_1i4x2_3" }, He = ({ labels: e, description: t, modelLabel: n, repeatsLabel: r, activeWindowLabel: i, fieldLabelClassName: a = "dial-tiny-text", fieldValueClassName: o = "dial-small-text" }) => /* @__PURE__ */ G(be, { children: [
|
|
630
|
+
t && /* @__PURE__ */ G("div", {
|
|
594
631
|
className: "flex flex-col gap-1",
|
|
595
|
-
children: [/* @__PURE__ */
|
|
596
|
-
className: a
|
|
632
|
+
children: [/* @__PURE__ */ W("span", {
|
|
633
|
+
className: m(a, Ve.subtitleText),
|
|
597
634
|
children: e.descriptionLabel
|
|
598
|
-
}), /* @__PURE__ */
|
|
599
|
-
className:
|
|
635
|
+
}), /* @__PURE__ */ W("p", {
|
|
636
|
+
className: o,
|
|
600
637
|
children: t
|
|
601
638
|
})]
|
|
602
639
|
}),
|
|
603
|
-
n && /* @__PURE__ */
|
|
640
|
+
n && /* @__PURE__ */ G("div", {
|
|
604
641
|
className: "flex flex-col gap-1",
|
|
605
|
-
children: [/* @__PURE__ */
|
|
606
|
-
className: a
|
|
642
|
+
children: [/* @__PURE__ */ W("span", {
|
|
643
|
+
className: m(a, Ve.subtitleText),
|
|
607
644
|
children: e.modelLabel
|
|
608
|
-
}), /* @__PURE__ */
|
|
609
|
-
className:
|
|
645
|
+
}), /* @__PURE__ */ W("p", {
|
|
646
|
+
className: o,
|
|
610
647
|
children: n
|
|
611
648
|
})]
|
|
612
649
|
}),
|
|
613
|
-
r && /* @__PURE__ */
|
|
650
|
+
r && /* @__PURE__ */ G("div", {
|
|
614
651
|
className: "flex flex-col gap-1",
|
|
615
|
-
children: [/* @__PURE__ */
|
|
616
|
-
className: a
|
|
652
|
+
children: [/* @__PURE__ */ W("span", {
|
|
653
|
+
className: m(a, Ve.subtitleText),
|
|
617
654
|
children: e.repeatsLabel
|
|
618
|
-
}), /* @__PURE__ */
|
|
619
|
-
className:
|
|
655
|
+
}), /* @__PURE__ */ W("p", {
|
|
656
|
+
className: o,
|
|
620
657
|
children: r
|
|
621
658
|
})]
|
|
622
659
|
}),
|
|
623
|
-
i && /* @__PURE__ */
|
|
660
|
+
i && /* @__PURE__ */ G("div", {
|
|
624
661
|
className: "flex flex-col gap-1",
|
|
625
|
-
children: [/* @__PURE__ */
|
|
626
|
-
className: a
|
|
662
|
+
children: [/* @__PURE__ */ W("span", {
|
|
663
|
+
className: m(a, Ve.subtitleText),
|
|
627
664
|
children: e.activeWindowLabel
|
|
628
|
-
}), /* @__PURE__ */
|
|
629
|
-
className:
|
|
665
|
+
}), /* @__PURE__ */ W("p", {
|
|
666
|
+
className: o,
|
|
630
667
|
children: i
|
|
631
668
|
})]
|
|
632
669
|
})
|
|
633
|
-
] }),
|
|
670
|
+
] }), Ue = /* @__PURE__ */ function(e) {
|
|
634
671
|
return e.Success = "success", e.Error = "error", e.InProgress = "inProgress", e.Missed = "missed", e;
|
|
635
|
-
}({}),
|
|
636
|
-
subtitleText: "
|
|
637
|
-
successIcon: "
|
|
638
|
-
errorIcon: "
|
|
639
|
-
missedIcon: "
|
|
640
|
-
currentRun: "
|
|
641
|
-
|
|
642
|
-
|
|
672
|
+
}({}), Z = {
|
|
673
|
+
subtitleText: "_subtitleText_1naww_1",
|
|
674
|
+
successIcon: "_successIcon_1naww_5",
|
|
675
|
+
errorIcon: "_errorIcon_1naww_9",
|
|
676
|
+
missedIcon: "_missedIcon_1naww_13",
|
|
677
|
+
currentRun: "_currentRun_1naww_17",
|
|
678
|
+
interactiveRow: "_interactiveRow_1naww_21",
|
|
679
|
+
unreadDot: "_unreadDot_1naww_29",
|
|
680
|
+
rowLayout: "_rowLayout_1naww_33"
|
|
681
|
+
}, We = ({ status: e }) => {
|
|
643
682
|
switch (e) {
|
|
644
|
-
case
|
|
645
|
-
size:
|
|
646
|
-
className:
|
|
683
|
+
case Ue.Success: return /* @__PURE__ */ W(L, {
|
|
684
|
+
size: C.SM,
|
|
685
|
+
className: Z.successIcon,
|
|
647
686
|
"aria-hidden": !0,
|
|
648
|
-
stroke:
|
|
687
|
+
stroke: w
|
|
649
688
|
});
|
|
650
|
-
case
|
|
651
|
-
size:
|
|
652
|
-
className:
|
|
689
|
+
case Ue.Error: return /* @__PURE__ */ W(de, {
|
|
690
|
+
size: C.SM,
|
|
691
|
+
className: Z.errorIcon,
|
|
653
692
|
"aria-hidden": !0,
|
|
654
|
-
stroke:
|
|
693
|
+
stroke: w
|
|
655
694
|
});
|
|
656
|
-
case
|
|
695
|
+
case Ue.InProgress: return /* @__PURE__ */ W("span", {
|
|
657
696
|
"aria-hidden": !0,
|
|
658
|
-
children: /* @__PURE__ */
|
|
697
|
+
children: /* @__PURE__ */ W(oe, { size: C.SM })
|
|
659
698
|
});
|
|
660
|
-
case
|
|
661
|
-
size:
|
|
662
|
-
className:
|
|
699
|
+
case Ue.Missed: return /* @__PURE__ */ W(F, {
|
|
700
|
+
size: C.SM,
|
|
701
|
+
className: Z.missedIcon,
|
|
663
702
|
"aria-hidden": !0,
|
|
664
|
-
stroke:
|
|
703
|
+
stroke: w
|
|
665
704
|
});
|
|
666
705
|
default: return null;
|
|
667
706
|
}
|
|
668
|
-
},
|
|
669
|
-
let { colors:
|
|
670
|
-
"--strhl-success-icon":
|
|
671
|
-
"--strhl-error-icon":
|
|
672
|
-
"--strhl-missed-icon":
|
|
673
|
-
"--strhl-subtitle-text":
|
|
674
|
-
"--strhl-current-run-bg":
|
|
675
|
-
"--strhl-unread-dot":
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
707
|
+
}, Ge = ({ items: e, isLoading: t = !1, isLoadingMore: n = !1, skeletonCount: r = 6, error: i, onRetry: a, currentRunId: o, onRunClick: s, labels: c, footer: l, styles: u }) => {
|
|
708
|
+
let { colors: d, typography: f } = u ?? {}, h = f?.runTimestampClassName ?? "dial-small-text", g = f?.subtitleClassName ?? "dial-body-text", _ = c.unreadIndicatorLabel ?? "Unread", v = p({
|
|
709
|
+
"--strhl-success-icon": d?.successIconColor,
|
|
710
|
+
"--strhl-error-icon": d?.errorIconColor,
|
|
711
|
+
"--strhl-missed-icon": d?.missedIconColor,
|
|
712
|
+
"--strhl-subtitle-text": d?.subtitleTextColor,
|
|
713
|
+
"--strhl-current-run-bg": d?.currentRunBackground,
|
|
714
|
+
"--strhl-unread-dot": d?.unreadDotColor,
|
|
715
|
+
"--strhl-row-hover-bg": u?.rowHoverBackground,
|
|
716
|
+
"--strhl-row-focus-bg": u?.rowFocusBackground
|
|
717
|
+
}), y = (e) => {
|
|
718
|
+
let t = c.runStatusLabels[e.status], n = e.id === o, r = [e.isUnread ? _ : void 0, n ? c.currentRunLabel : void 0].filter((e) => !!e), i = [`${t} ${e.timestampLabel}`, ...r].join(" — "), a = !!e.conversationId && !!s;
|
|
719
|
+
return /* @__PURE__ */ G("li", {
|
|
720
|
+
...a ? {
|
|
680
721
|
role: "button",
|
|
681
722
|
tabIndex: 0,
|
|
682
|
-
onClick: () =>
|
|
723
|
+
onClick: () => s?.(e),
|
|
683
724
|
onKeyDown: (t) => {
|
|
684
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(),
|
|
725
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), s?.(e));
|
|
685
726
|
}
|
|
686
727
|
} : {},
|
|
687
728
|
"aria-label": i,
|
|
688
729
|
"aria-current": n ? "true" : void 0,
|
|
689
|
-
className:
|
|
690
|
-
children: [/* @__PURE__ */
|
|
730
|
+
className: m("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 rounded-full pe-2", Z.rowLayout, n && Z.currentRun, a && "cursor-pointer", a && Z.interactiveRow),
|
|
731
|
+
children: [/* @__PURE__ */ G("span", {
|
|
691
732
|
className: "flex items-center gap-2 truncate",
|
|
692
|
-
children: [/* @__PURE__ */
|
|
733
|
+
children: [/* @__PURE__ */ W("span", {
|
|
693
734
|
className: "relative flex size-3 shrink-0 items-center justify-center",
|
|
694
|
-
children: e.isUnread && /* @__PURE__ */
|
|
695
|
-
className:
|
|
735
|
+
children: e.isUnread && /* @__PURE__ */ W("span", {
|
|
736
|
+
className: m("size-[5.33px] rounded-full", Z.unreadDot),
|
|
696
737
|
"aria-hidden": !0
|
|
697
738
|
})
|
|
698
|
-
}), /* @__PURE__ */
|
|
699
|
-
className:
|
|
739
|
+
}), /* @__PURE__ */ W("span", {
|
|
740
|
+
className: m(h, "truncate"),
|
|
700
741
|
children: e.timestampLabel
|
|
701
742
|
})]
|
|
702
|
-
}), /* @__PURE__ */
|
|
703
|
-
className: "flex h-
|
|
704
|
-
children: /* @__PURE__ */
|
|
743
|
+
}), /* @__PURE__ */ W("span", {
|
|
744
|
+
className: "flex min-h-[var(--strhl-row-min-height,32px)] w-14 shrink-0 items-center justify-end",
|
|
745
|
+
children: /* @__PURE__ */ W(We, { status: e.status })
|
|
705
746
|
})]
|
|
706
747
|
}, e.id);
|
|
707
|
-
},
|
|
748
|
+
}, b = (e) => Array.from({ length: e }, (e, t) => /* @__PURE__ */ G("li", {
|
|
708
749
|
"aria-hidden": "true",
|
|
709
|
-
className: "flex h-
|
|
710
|
-
children: [/* @__PURE__ */
|
|
711
|
-
variant:
|
|
750
|
+
className: m("flex min-h-[var(--strhl-row-min-height,32px)] max-w-[328px] items-center justify-between gap-2 pe-2", Z.rowLayout),
|
|
751
|
+
children: [/* @__PURE__ */ W(N, {
|
|
752
|
+
variant: P.Rectangular,
|
|
712
753
|
width: "160px",
|
|
713
754
|
height: "16px"
|
|
714
|
-
}), /* @__PURE__ */
|
|
715
|
-
variant:
|
|
755
|
+
}), /* @__PURE__ */ W(N, {
|
|
756
|
+
variant: P.Rectangular,
|
|
716
757
|
width: "16px",
|
|
717
758
|
height: "16px",
|
|
718
759
|
className: "shrink-0 rounded-full"
|
|
719
760
|
})]
|
|
720
761
|
}, `history-skeleton-${t}`));
|
|
721
|
-
return t && e.length === 0 ? /* @__PURE__ */
|
|
722
|
-
style:
|
|
723
|
-
|
|
762
|
+
return t && e.length === 0 ? /* @__PURE__ */ W("ul", {
|
|
763
|
+
style: {
|
|
764
|
+
...v,
|
|
765
|
+
"--strhl-row-min-height": u?.rowMinHeight
|
|
766
|
+
},
|
|
767
|
+
"aria-label": c.historyTitle,
|
|
724
768
|
className: "flex flex-col gap-0.5",
|
|
725
|
-
children:
|
|
726
|
-
}) :
|
|
727
|
-
style:
|
|
769
|
+
children: b(r)
|
|
770
|
+
}) : i && e.length === 0 ? /* @__PURE__ */ G("div", {
|
|
771
|
+
style: v,
|
|
728
772
|
className: "flex flex-col items-start gap-3",
|
|
729
|
-
children: [/* @__PURE__ */
|
|
773
|
+
children: [/* @__PURE__ */ W("p", {
|
|
730
774
|
role: "alert",
|
|
731
|
-
className:
|
|
732
|
-
children:
|
|
733
|
-
}), /* @__PURE__ */
|
|
734
|
-
label:
|
|
735
|
-
onClick:
|
|
775
|
+
className: m(g, Z.subtitleText),
|
|
776
|
+
children: c.errorLabel
|
|
777
|
+
}), /* @__PURE__ */ W(D, {
|
|
778
|
+
label: c.retryLabel,
|
|
779
|
+
onClick: a
|
|
736
780
|
})]
|
|
737
|
-
}) : e.length === 0 ? /* @__PURE__ */
|
|
738
|
-
style:
|
|
781
|
+
}) : e.length === 0 ? /* @__PURE__ */ G("div", {
|
|
782
|
+
style: v,
|
|
739
783
|
className: "flex w-full flex-col items-center justify-center gap-2 py-4",
|
|
740
|
-
children: [/* @__PURE__ */
|
|
784
|
+
children: [/* @__PURE__ */ W(R, {
|
|
741
785
|
size: 44,
|
|
742
|
-
stroke:
|
|
743
|
-
className:
|
|
786
|
+
stroke: w,
|
|
787
|
+
className: Z.subtitleText,
|
|
744
788
|
"aria-hidden": !0
|
|
745
|
-
}), /* @__PURE__ */
|
|
789
|
+
}), /* @__PURE__ */ W("p", {
|
|
746
790
|
role: "status",
|
|
747
|
-
className:
|
|
748
|
-
children:
|
|
791
|
+
className: h,
|
|
792
|
+
children: c.emptyLabel
|
|
749
793
|
})]
|
|
750
|
-
}) : /* @__PURE__ */
|
|
751
|
-
style:
|
|
752
|
-
|
|
794
|
+
}) : /* @__PURE__ */ G("ul", {
|
|
795
|
+
style: {
|
|
796
|
+
...v,
|
|
797
|
+
"--strhl-row-min-height": u?.rowMinHeight
|
|
798
|
+
},
|
|
799
|
+
"aria-label": c.historyTitle,
|
|
753
800
|
className: "flex flex-col gap-0.5",
|
|
754
801
|
children: [
|
|
755
|
-
e.map(
|
|
756
|
-
n &&
|
|
757
|
-
|
|
802
|
+
e.map(y),
|
|
803
|
+
n && b(r),
|
|
804
|
+
i ? /* @__PURE__ */ G("li", {
|
|
758
805
|
className: "flex flex-col items-start gap-3 px-5 py-2",
|
|
759
|
-
children: [/* @__PURE__ */
|
|
806
|
+
children: [/* @__PURE__ */ W("p", {
|
|
760
807
|
role: "alert",
|
|
761
|
-
className:
|
|
762
|
-
children:
|
|
763
|
-
}), /* @__PURE__ */
|
|
764
|
-
label:
|
|
765
|
-
onClick:
|
|
808
|
+
className: m(g, Z.subtitleText),
|
|
809
|
+
children: c.errorLabel
|
|
810
|
+
}), /* @__PURE__ */ W(D, {
|
|
811
|
+
label: c.retryLabel,
|
|
812
|
+
onClick: a
|
|
766
813
|
})]
|
|
767
|
-
}) :
|
|
814
|
+
}) : l
|
|
768
815
|
]
|
|
769
816
|
});
|
|
770
|
-
},
|
|
771
|
-
historyCard: "
|
|
772
|
-
subtitleText: "
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
817
|
+
}, Q = {
|
|
818
|
+
historyCard: "_historyCard_153p9_4",
|
|
819
|
+
subtitleText: "_subtitleText_153p9_8",
|
|
820
|
+
cardLayout: "_cardLayout_153p9_13"
|
|
821
|
+
}, Ke = ({ variant: e, labels: t, nextRunLabel: n, items: r, isLoading: i = !1, isLoadingMore: a = !1, skeletonCount: o = 6, error: s, onRetry: c, loadMoreError: l, onRetryLoadMore: u, hasMore: d = !1, onLoadMore: f, onRunClick: p, runTimestampClassName: h = "dial-small-text", sectionTitleClassName: g = "dial-body-semi-text", colors: _, styles: v }) => {
|
|
822
|
+
let y = e === Re.Card, b = y ? m("sticky bottom-0 z-10 rounded-b-xl px-6 pb-5 pt-2", Q.historyCard) : "pt-2", x = l ? /* @__PURE__ */ G("li", {
|
|
823
|
+
className: b,
|
|
824
|
+
children: [/* @__PURE__ */ W("p", {
|
|
825
|
+
role: "alert",
|
|
826
|
+
children: t.historyLoadMoreErrorLabel ?? t.historyErrorLabel
|
|
827
|
+
}), u && /* @__PURE__ */ W(D, {
|
|
828
|
+
label: t.historyRetryLabel,
|
|
829
|
+
onClick: u,
|
|
830
|
+
disabled: a
|
|
831
|
+
})]
|
|
832
|
+
}) : f && d && t.historyShowMoreLabel ? /* @__PURE__ */ W("li", {
|
|
833
|
+
className: b,
|
|
834
|
+
children: /* @__PURE__ */ W(D, {
|
|
777
835
|
label: t.historyShowMoreLabel,
|
|
778
|
-
onClick:
|
|
779
|
-
disabled:
|
|
836
|
+
onClick: f,
|
|
837
|
+
disabled: a
|
|
780
838
|
})
|
|
781
|
-
}) : void 0,
|
|
782
|
-
className:
|
|
839
|
+
}) : void 0, S = n ? /* @__PURE__ */ W("p", {
|
|
840
|
+
className: m(h, Q.subtitleText),
|
|
783
841
|
children: n
|
|
784
|
-
}) : void 0,
|
|
842
|
+
}) : void 0, C = t.historyLoadingMoreLabel ? /* @__PURE__ */ W("span", {
|
|
785
843
|
role: "status",
|
|
786
844
|
"aria-live": "polite",
|
|
787
845
|
className: "sr-only",
|
|
788
|
-
children:
|
|
789
|
-
}) : void 0,
|
|
846
|
+
children: a ? t.historyLoadingMoreLabel : ""
|
|
847
|
+
}) : void 0, w = /* @__PURE__ */ W(Ge, {
|
|
790
848
|
items: r,
|
|
791
849
|
isLoading: i,
|
|
792
|
-
isLoadingMore:
|
|
793
|
-
skeletonCount:
|
|
794
|
-
error:
|
|
795
|
-
onRetry:
|
|
796
|
-
onRunClick:
|
|
850
|
+
isLoadingMore: a,
|
|
851
|
+
skeletonCount: o,
|
|
852
|
+
error: s,
|
|
853
|
+
onRetry: c,
|
|
854
|
+
onRunClick: p,
|
|
797
855
|
labels: {
|
|
798
856
|
historyTitle: t.historyTitle,
|
|
799
857
|
emptyLabel: t.historyEmptyLabel,
|
|
@@ -802,49 +860,56 @@ var U = {
|
|
|
802
860
|
runStatusLabels: t.runStatusLabels,
|
|
803
861
|
unreadIndicatorLabel: t.unreadIndicatorLabel
|
|
804
862
|
},
|
|
805
|
-
footer:
|
|
863
|
+
footer: x,
|
|
806
864
|
styles: {
|
|
807
|
-
typography: { runTimestampClassName:
|
|
808
|
-
colors:
|
|
865
|
+
typography: { runTimestampClassName: h },
|
|
866
|
+
colors: v?.colors ?? _,
|
|
867
|
+
rowMinHeight: v?.rowMinHeight,
|
|
868
|
+
rowHoverBackground: v?.rowHoverBackground,
|
|
869
|
+
rowFocusBackground: v?.rowFocusBackground
|
|
809
870
|
}
|
|
810
871
|
});
|
|
811
|
-
return
|
|
812
|
-
className:
|
|
813
|
-
|
|
814
|
-
|
|
872
|
+
return y ? /* @__PURE__ */ G("div", {
|
|
873
|
+
className: m("flex max-h-[var(--st-history-max-height,70vh)] w-full max-w-full flex-col overflow-y-auto rounded-xl shadow-md", Q.historyCard, Q.cardLayout),
|
|
874
|
+
style: { "--st-history-max-height": v?.maxHeight },
|
|
875
|
+
children: [/* @__PURE__ */ G("div", {
|
|
876
|
+
className: m("sticky top-0 z-10 flex flex-col gap-4 rounded-t-xl px-6 pb-2 pt-5", Q.historyCard),
|
|
815
877
|
children: [
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
className:
|
|
878
|
+
/* @__PURE__ */ W("h2", {
|
|
879
|
+
className: g,
|
|
818
880
|
children: t.historyTitle
|
|
819
881
|
}),
|
|
820
|
-
|
|
821
|
-
|
|
882
|
+
S,
|
|
883
|
+
C
|
|
822
884
|
]
|
|
823
|
-
}), /* @__PURE__ */
|
|
885
|
+
}), /* @__PURE__ */ W("div", {
|
|
824
886
|
className: "flex flex-1 flex-col gap-4 px-6 pb-2",
|
|
825
|
-
children:
|
|
887
|
+
children: w
|
|
826
888
|
})]
|
|
827
|
-
}) : /* @__PURE__ */
|
|
889
|
+
}) : /* @__PURE__ */ G("div", {
|
|
828
890
|
className: "flex flex-col gap-4",
|
|
829
891
|
children: [
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
892
|
+
S,
|
|
893
|
+
C,
|
|
894
|
+
w
|
|
833
895
|
]
|
|
834
896
|
});
|
|
835
897
|
}, $ = {
|
|
836
|
-
container: "
|
|
837
|
-
header: "
|
|
838
|
-
detailsColumn: "
|
|
839
|
-
subtitleText: "
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
"--stdv-
|
|
846
|
-
"--stdv-
|
|
847
|
-
|
|
898
|
+
container: "_container_1v896_1",
|
|
899
|
+
header: "_header_1v896_8",
|
|
900
|
+
detailsColumn: "_detailsColumn_1v896_22",
|
|
901
|
+
subtitleText: "_subtitleText_1v896_26",
|
|
902
|
+
desktopTitle: "_desktopTitle_1v896_31",
|
|
903
|
+
desktopBadge: "_desktopBadge_1v896_32",
|
|
904
|
+
mobileTitleRow: "_mobileTitleRow_1v896_36"
|
|
905
|
+
}, qe = ({ labels: e, onBack: t, onEdit: n, onDelete: r, isDeleting: i = !1, isDeleted: a = !1, isActive: o, isActiveUpdating: s = !1, isActiveDisabled: c = !1, onActiveChange: l, displayName: u, isLoading: d = !1, error: f, onRetry: h, description: _, modelLabel: v, repeatsLabel: b, activeWindowLabel: x, nextRunLabel: S, instructionsMarkdown: T, renderInstructions: E, runs: te, runsIsLoading: ne = !1, runsIsLoadingMore: O = !1, runsSkeletonCount: re = 6, runsError: k, onRunsRetry: A, runsLoadMoreError: j, onRunsRetryLoadMore: M, runsHasMore: ae = !1, onRunsLoadMore: N, onRunClick: P, styles: le, className: F, backIcon: I, layout: L, historyStyles: de }) => {
|
|
906
|
+
let { colors: R, typography: B } = le ?? {}, fe = B?.titleClassName ?? "dial-h2-text", V = B?.sectionTitleClassName ?? "dial-body-semi-text", me = B?.fieldLabelClassName ?? "dial-tiny-text", H = B?.fieldValueClassName ?? "dial-small-text", he = B?.runTimestampClassName ?? "dial-small-text", ge = p({
|
|
907
|
+
"--stdv-bg": R?.background,
|
|
908
|
+
"--stdv-header-border": R?.headerBorder,
|
|
909
|
+
"--stdv-details-border": R?.detailsColumnBorder,
|
|
910
|
+
"--stdv-subtitle-text": R?.subtitleText,
|
|
911
|
+
"--stdv-history-bg": R?.historyCardBackground
|
|
912
|
+
}), _e = g(), [U, ve] = ye(X.Details), be = [
|
|
848
913
|
{
|
|
849
914
|
id: X.Details,
|
|
850
915
|
label: e.detailsTitle
|
|
@@ -857,206 +922,286 @@ var U = {
|
|
|
857
922
|
id: X.History,
|
|
858
923
|
label: e.historyTitle
|
|
859
924
|
}
|
|
860
|
-
],
|
|
925
|
+
], xe = be.find((e) => e.id === U)?.label ?? e.detailsTitle, Se = /* @__PURE__ */ W(He, {
|
|
861
926
|
labels: {
|
|
862
927
|
descriptionLabel: e.descriptionLabel,
|
|
863
928
|
modelLabel: e.modelLabel,
|
|
864
929
|
repeatsLabel: e.repeatsLabel,
|
|
865
930
|
activeWindowLabel: e.activeWindowLabel
|
|
866
931
|
},
|
|
867
|
-
description:
|
|
868
|
-
modelLabel:
|
|
869
|
-
repeatsLabel:
|
|
870
|
-
activeWindowLabel:
|
|
871
|
-
fieldLabelClassName:
|
|
872
|
-
fieldValueClassName:
|
|
873
|
-
}),
|
|
932
|
+
description: _,
|
|
933
|
+
modelLabel: v,
|
|
934
|
+
repeatsLabel: b,
|
|
935
|
+
activeWindowLabel: x,
|
|
936
|
+
fieldLabelClassName: me,
|
|
937
|
+
fieldValueClassName: H
|
|
938
|
+
}), Ce = /* @__PURE__ */ W(Be, {
|
|
874
939
|
instructionsLabel: e.instructionsLabel,
|
|
875
|
-
instructionsMarkdown:
|
|
940
|
+
instructionsMarkdown: T,
|
|
876
941
|
renderInstructions: E,
|
|
877
|
-
fieldLabelClassName:
|
|
878
|
-
}),
|
|
942
|
+
fieldLabelClassName: me
|
|
943
|
+
}), K = (t) => /* @__PURE__ */ W(Ke, {
|
|
879
944
|
variant: t,
|
|
880
945
|
labels: {
|
|
881
946
|
historyTitle: e.historyTitle,
|
|
882
947
|
historyEmptyLabel: e.historyEmptyLabel,
|
|
883
948
|
historyErrorLabel: e.historyErrorLabel,
|
|
949
|
+
historyLoadMoreErrorLabel: e.historyLoadMoreErrorLabel,
|
|
884
950
|
historyRetryLabel: e.historyRetryLabel,
|
|
885
951
|
historyLoadingMoreLabel: e.historyLoadingMoreLabel,
|
|
886
952
|
historyShowMoreLabel: e.historyShowMoreLabel,
|
|
887
953
|
runStatusLabels: e.runStatusLabels,
|
|
888
954
|
unreadIndicatorLabel: e.unreadIndicatorLabel
|
|
889
955
|
},
|
|
890
|
-
nextRunLabel:
|
|
891
|
-
items:
|
|
892
|
-
isLoading:
|
|
893
|
-
isLoadingMore:
|
|
894
|
-
skeletonCount:
|
|
895
|
-
error:
|
|
896
|
-
onRetry:
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
956
|
+
nextRunLabel: S,
|
|
957
|
+
items: te,
|
|
958
|
+
isLoading: ne,
|
|
959
|
+
isLoadingMore: O,
|
|
960
|
+
skeletonCount: re,
|
|
961
|
+
error: k,
|
|
962
|
+
onRetry: A,
|
|
963
|
+
loadMoreError: j,
|
|
964
|
+
onRetryLoadMore: M,
|
|
965
|
+
hasMore: ae,
|
|
966
|
+
onLoadMore: N,
|
|
967
|
+
onRunClick: P,
|
|
968
|
+
runTimestampClassName: he,
|
|
969
|
+
sectionTitleClassName: V,
|
|
970
|
+
colors: R,
|
|
971
|
+
styles: de
|
|
903
972
|
});
|
|
904
|
-
return /* @__PURE__ */
|
|
905
|
-
style:
|
|
906
|
-
className:
|
|
973
|
+
return /* @__PURE__ */ G("div", {
|
|
974
|
+
style: ge,
|
|
975
|
+
className: m("flex h-full w-full flex-col overflow-y-auto", $.container, F),
|
|
907
976
|
children: [
|
|
908
|
-
/* @__PURE__ */
|
|
909
|
-
className:
|
|
910
|
-
children: [/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ G("div", {
|
|
978
|
+
className: m("flex h-16 shrink-0 items-center justify-between gap-2 px-8", $.header),
|
|
979
|
+
children: [/* @__PURE__ */ G("div", {
|
|
911
980
|
className: "flex min-w-0 items-center gap-2",
|
|
912
981
|
children: [
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
icon: /* @__PURE__ */
|
|
915
|
-
size:
|
|
982
|
+
/* @__PURE__ */ W(ee, {
|
|
983
|
+
icon: I === void 0 ? /* @__PURE__ */ W(ue, {
|
|
984
|
+
size: C.LG,
|
|
916
985
|
className: "rtl:scale-x-[-1]",
|
|
917
986
|
"aria-hidden": !0,
|
|
918
|
-
stroke:
|
|
919
|
-
}),
|
|
987
|
+
stroke: w
|
|
988
|
+
}) : I,
|
|
920
989
|
"aria-label": e.backAriaLabel,
|
|
921
990
|
onClick: t
|
|
922
991
|
}),
|
|
923
|
-
/* @__PURE__ */
|
|
924
|
-
className:
|
|
925
|
-
children:
|
|
992
|
+
/* @__PURE__ */ W("h1", {
|
|
993
|
+
className: m("truncate", $.desktopTitle, fe),
|
|
994
|
+
children: u
|
|
926
995
|
}),
|
|
927
|
-
|
|
928
|
-
className:
|
|
996
|
+
a && /* @__PURE__ */ W("span", {
|
|
997
|
+
className: m("shrink-0", $.desktopBadge, H, $.subtitleText),
|
|
929
998
|
children: e.deletedStateLabel
|
|
930
999
|
})
|
|
931
1000
|
]
|
|
932
|
-
}), /* @__PURE__ */
|
|
1001
|
+
}), /* @__PURE__ */ G("div", {
|
|
933
1002
|
className: "flex shrink-0 items-center gap-2",
|
|
934
1003
|
children: [
|
|
935
|
-
!
|
|
1004
|
+
!a && o !== void 0 && /* @__PURE__ */ W(se, {
|
|
936
1005
|
id: "scheduled-task-active-switch",
|
|
937
1006
|
labelProps: { label: e.activeStatusLabel },
|
|
938
|
-
isOn:
|
|
939
|
-
disabled:
|
|
940
|
-
onChange: (e) =>
|
|
1007
|
+
isOn: o,
|
|
1008
|
+
disabled: s || c || i,
|
|
1009
|
+
onChange: (e) => l?.(e)
|
|
941
1010
|
}),
|
|
942
|
-
!
|
|
943
|
-
variant:
|
|
1011
|
+
!a && r && /* @__PURE__ */ W(D, {
|
|
1012
|
+
variant: y.Danger,
|
|
944
1013
|
label: e.deleteButtonLabel,
|
|
945
|
-
iconBefore: /* @__PURE__ */
|
|
946
|
-
size:
|
|
1014
|
+
iconBefore: /* @__PURE__ */ W(pe, {
|
|
1015
|
+
size: C.SM,
|
|
947
1016
|
"aria-hidden": !0,
|
|
948
|
-
stroke:
|
|
1017
|
+
stroke: w
|
|
949
1018
|
}),
|
|
950
1019
|
onClick: r,
|
|
951
|
-
disabled:
|
|
1020
|
+
disabled: i,
|
|
952
1021
|
className: "shrink-0"
|
|
953
1022
|
}),
|
|
954
|
-
!
|
|
1023
|
+
!a && n && /* @__PURE__ */ W(ie, {
|
|
955
1024
|
label: e.editButtonLabel,
|
|
956
|
-
iconBefore: /* @__PURE__ */
|
|
957
|
-
size:
|
|
1025
|
+
iconBefore: /* @__PURE__ */ W(z, {
|
|
1026
|
+
size: C.SM,
|
|
958
1027
|
"aria-hidden": !0,
|
|
959
|
-
stroke:
|
|
1028
|
+
stroke: w
|
|
960
1029
|
}),
|
|
961
1030
|
onClick: n,
|
|
962
|
-
disabled:
|
|
1031
|
+
disabled: i,
|
|
963
1032
|
className: "shrink-0"
|
|
964
1033
|
})
|
|
965
1034
|
]
|
|
966
1035
|
})]
|
|
967
1036
|
}),
|
|
968
|
-
/* @__PURE__ */
|
|
969
|
-
className: "
|
|
970
|
-
children: [/* @__PURE__ */
|
|
971
|
-
className:
|
|
972
|
-
children:
|
|
973
|
-
}),
|
|
974
|
-
className:
|
|
1037
|
+
/* @__PURE__ */ G("div", {
|
|
1038
|
+
className: m("min-w-0 items-center gap-2 px-8 py-3", $.mobileTitleRow),
|
|
1039
|
+
children: [/* @__PURE__ */ W("h1", {
|
|
1040
|
+
className: m("truncate", fe),
|
|
1041
|
+
children: u
|
|
1042
|
+
}), a && /* @__PURE__ */ W("span", {
|
|
1043
|
+
className: m("shrink-0", H, $.subtitleText),
|
|
975
1044
|
children: e.deletedStateLabel
|
|
976
1045
|
})]
|
|
977
1046
|
}),
|
|
978
|
-
e.activeStatusAnnouncement != null && /* @__PURE__ */
|
|
1047
|
+
e.activeStatusAnnouncement != null && /* @__PURE__ */ W("span", {
|
|
979
1048
|
role: "status",
|
|
980
1049
|
"aria-live": "polite",
|
|
981
1050
|
className: "sr-only",
|
|
982
1051
|
children: e.activeStatusAnnouncement
|
|
983
1052
|
}),
|
|
984
|
-
|
|
1053
|
+
d && /* @__PURE__ */ W("div", {
|
|
985
1054
|
className: "flex flex-1 items-center justify-center",
|
|
986
|
-
children: /* @__PURE__ */
|
|
1055
|
+
children: /* @__PURE__ */ W(oe, {})
|
|
987
1056
|
}),
|
|
988
|
-
!
|
|
1057
|
+
!d && f && /* @__PURE__ */ G("div", {
|
|
989
1058
|
className: "flex flex-1 flex-col items-center justify-center gap-3",
|
|
990
|
-
children: [/* @__PURE__ */
|
|
991
|
-
className:
|
|
1059
|
+
children: [/* @__PURE__ */ W("p", {
|
|
1060
|
+
className: m(H, $.subtitleText),
|
|
992
1061
|
children: e.errorLabel
|
|
993
|
-
}), /* @__PURE__ */
|
|
1062
|
+
}), /* @__PURE__ */ W(D, {
|
|
994
1063
|
label: e.retryLabel,
|
|
995
|
-
onClick:
|
|
1064
|
+
onClick: h
|
|
996
1065
|
})]
|
|
997
1066
|
}),
|
|
998
|
-
!
|
|
1067
|
+
!d && !f && (_e ? /* @__PURE__ */ G("div", {
|
|
999
1068
|
className: "flex flex-1 flex-col",
|
|
1000
|
-
children: [/* @__PURE__ */
|
|
1069
|
+
children: [/* @__PURE__ */ W(ce, {
|
|
1001
1070
|
ariaLabel: e.tabsAriaLabel ?? "Scheduled task sections",
|
|
1002
1071
|
className: "px-8",
|
|
1003
|
-
tabs:
|
|
1072
|
+
tabs: be,
|
|
1004
1073
|
activeTabId: U,
|
|
1005
|
-
onTabChange:
|
|
1006
|
-
}), /* @__PURE__ */
|
|
1074
|
+
onTabChange: ve
|
|
1075
|
+
}), /* @__PURE__ */ W("div", {
|
|
1007
1076
|
role: "tabpanel",
|
|
1008
|
-
"aria-label":
|
|
1077
|
+
"aria-label": xe,
|
|
1009
1078
|
className: "flex flex-1 flex-col gap-5 px-8 py-6",
|
|
1010
|
-
children: U === X.Configuration ?
|
|
1079
|
+
children: U === X.Configuration ? Ce : U === X.History ? K(Re.Flow) : Se
|
|
1011
1080
|
})]
|
|
1012
|
-
}) : /* @__PURE__ */
|
|
1013
|
-
|
|
1081
|
+
}) : /* @__PURE__ */ G("div", {
|
|
1082
|
+
style: {
|
|
1083
|
+
flexDirection: "row",
|
|
1084
|
+
flexWrap: "wrap",
|
|
1085
|
+
"--st-details-width": L?.detailsWidth,
|
|
1086
|
+
"--st-history-width": L?.historyWidth,
|
|
1087
|
+
"--st-history-max-height": L?.historyMaxHeight,
|
|
1088
|
+
"--st-configuration-min-width": L?.configurationMinWidth
|
|
1089
|
+
},
|
|
1090
|
+
className: "flex flex-1",
|
|
1014
1091
|
children: [
|
|
1015
|
-
/* @__PURE__ */
|
|
1092
|
+
/* @__PURE__ */ G("div", {
|
|
1016
1093
|
role: "group",
|
|
1017
1094
|
"aria-label": e.detailsTitle,
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1095
|
+
style: {
|
|
1096
|
+
flex: `0 1 ${L?.detailsWidth ?? "360px"}`,
|
|
1097
|
+
maxWidth: "100%"
|
|
1098
|
+
},
|
|
1099
|
+
className: m("flex w-full flex-col gap-5 border-e px-8 py-6", $.detailsColumn),
|
|
1100
|
+
children: [/* @__PURE__ */ W("h2", {
|
|
1101
|
+
className: V,
|
|
1021
1102
|
children: e.detailsTitle
|
|
1022
|
-
}),
|
|
1103
|
+
}), Se]
|
|
1023
1104
|
}),
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1105
|
+
/* @__PURE__ */ G("div", {
|
|
1106
|
+
style: {
|
|
1107
|
+
flex: `1 1 ${L?.configurationMinWidth ?? "320px"}`,
|
|
1108
|
+
minWidth: 0
|
|
1109
|
+
},
|
|
1110
|
+
className: "flex w-full min-w-0 flex-col gap-5 px-8 py-6",
|
|
1111
|
+
children: [/* @__PURE__ */ W("h2", {
|
|
1112
|
+
className: V,
|
|
1028
1113
|
children: e.configurationTitle
|
|
1029
|
-
}),
|
|
1114
|
+
}), Ce]
|
|
1030
1115
|
}),
|
|
1031
|
-
/* @__PURE__ */
|
|
1032
|
-
|
|
1033
|
-
|
|
1116
|
+
/* @__PURE__ */ W("div", {
|
|
1117
|
+
style: {
|
|
1118
|
+
flex: `0 1 calc(${L?.historyWidth ?? "360px"} + 48px)`,
|
|
1119
|
+
minWidth: 0
|
|
1120
|
+
},
|
|
1121
|
+
className: "flex w-full items-start justify-center p-6",
|
|
1122
|
+
children: K(Re.Card)
|
|
1034
1123
|
})
|
|
1035
1124
|
]
|
|
1036
1125
|
}))
|
|
1037
1126
|
]
|
|
1038
1127
|
});
|
|
1039
|
-
},
|
|
1040
|
-
let
|
|
1041
|
-
return /* @__PURE__ */
|
|
1128
|
+
}, Je = ({ modelLabel: e, instructionsLabel: t, modelDisplayName: n, instructionsMarkdown: r, renderInstructions: i, styles: a }) => {
|
|
1129
|
+
let o = a?.typography?.fieldLabelClassName ?? "dial-tiny-text", s = a?.typography?.fieldValueClassName ?? "dial-body-text";
|
|
1130
|
+
return /* @__PURE__ */ G("div", {
|
|
1042
1131
|
className: "flex flex-col gap-3",
|
|
1043
|
-
children: [
|
|
1132
|
+
children: [n && /* @__PURE__ */ G("div", {
|
|
1044
1133
|
className: "flex flex-col gap-2",
|
|
1045
|
-
children: [/* @__PURE__ */
|
|
1046
|
-
className:
|
|
1134
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1135
|
+
className: o,
|
|
1047
1136
|
children: e
|
|
1048
|
-
}), /* @__PURE__ */
|
|
1049
|
-
className:
|
|
1050
|
-
children:
|
|
1137
|
+
}), /* @__PURE__ */ W("p", {
|
|
1138
|
+
className: s,
|
|
1139
|
+
children: n
|
|
1051
1140
|
})]
|
|
1052
|
-
}),
|
|
1141
|
+
}), r && /* @__PURE__ */ G("div", {
|
|
1053
1142
|
className: "flex flex-col gap-2",
|
|
1054
|
-
children: [/* @__PURE__ */
|
|
1055
|
-
className:
|
|
1143
|
+
children: [/* @__PURE__ */ W("span", {
|
|
1144
|
+
className: o,
|
|
1056
1145
|
children: t
|
|
1057
|
-
}), ((e) =>
|
|
1146
|
+
}), ((e) => i ? i(e) : /* @__PURE__ */ W(d, { content: e }))(r)]
|
|
1058
1147
|
})]
|
|
1059
1148
|
});
|
|
1149
|
+
}, Ye = ({ open: e, taskName: t, title: n, body: r, consequences: i = [], cancelLabel: a, cancelAppearance: o = _.Ghost, confirmLabel: s, pendingLabel: c, isDeleting: l = !1, onConfirm: u, onClose: d, styles: f }) => {
|
|
1150
|
+
let p = () => {
|
|
1151
|
+
l || d();
|
|
1152
|
+
};
|
|
1153
|
+
return /* @__PURE__ */ W(A, {
|
|
1154
|
+
open: e,
|
|
1155
|
+
className: f?.popupClassName,
|
|
1156
|
+
header: /* @__PURE__ */ W("span", {
|
|
1157
|
+
className: f?.titleClassName,
|
|
1158
|
+
children: n
|
|
1159
|
+
}),
|
|
1160
|
+
onClose: p,
|
|
1161
|
+
mainButtons: [{
|
|
1162
|
+
label: a,
|
|
1163
|
+
onClick: p,
|
|
1164
|
+
disabled: l,
|
|
1165
|
+
appearance: o
|
|
1166
|
+
}, {
|
|
1167
|
+
label: l ? c ?? s : s,
|
|
1168
|
+
onClick: () => {
|
|
1169
|
+
l || u();
|
|
1170
|
+
},
|
|
1171
|
+
disabled: l,
|
|
1172
|
+
variant: y.Danger,
|
|
1173
|
+
className: f?.actionClassName
|
|
1174
|
+
}],
|
|
1175
|
+
children: /* @__PURE__ */ G("div", {
|
|
1176
|
+
className: "flex flex-col gap-4 px-6 pb-4 pt-2",
|
|
1177
|
+
children: [
|
|
1178
|
+
/* @__PURE__ */ W("div", {
|
|
1179
|
+
className: "flex h-11 items-center rounded-lg border border-error-alpha bg-error px-3",
|
|
1180
|
+
children: /* @__PURE__ */ W("span", {
|
|
1181
|
+
className: "dial-small-semi-text truncate",
|
|
1182
|
+
children: t
|
|
1183
|
+
})
|
|
1184
|
+
}),
|
|
1185
|
+
/* @__PURE__ */ W("div", {
|
|
1186
|
+
className: "dial-body-paragraph-text break-words",
|
|
1187
|
+
children: r
|
|
1188
|
+
}),
|
|
1189
|
+
i.length > 0 && /* @__PURE__ */ W("ul", {
|
|
1190
|
+
className: "flex flex-col gap-2 ps-[18px]",
|
|
1191
|
+
children: i.map((e, t) => /* @__PURE__ */ W("li", {
|
|
1192
|
+
className: "dial-body-paragraph-text list-disc text-secondary marker:text-secondary",
|
|
1193
|
+
children: e
|
|
1194
|
+
}, t))
|
|
1195
|
+
}),
|
|
1196
|
+
l && /* @__PURE__ */ W("span", {
|
|
1197
|
+
role: "status",
|
|
1198
|
+
"aria-live": "polite",
|
|
1199
|
+
className: "sr-only",
|
|
1200
|
+
children: c ?? s
|
|
1201
|
+
})
|
|
1202
|
+
]
|
|
1203
|
+
})
|
|
1204
|
+
});
|
|
1060
1205
|
};
|
|
1061
1206
|
//#endregion
|
|
1062
|
-
export {
|
|
1207
|
+
export { r as DESCRIPTION_MAX_LENGTH, Ce as SCHEDULED_TASKS_CLASS, we as ScheduledTaskCard, ke as ScheduledTaskCardGrid, Oe as ScheduledTaskCardSkeleton, Le as ScheduledTaskCreateForm, Ye as ScheduledTaskDeleteConfirmation, qe as ScheduledTaskDetailView, Je as ScheduledTaskDetailsSummary, Ke as ScheduledTaskHistorySection, K as ScheduledTaskPresentationStatus, t as ScheduledTaskRepeat, Ge as ScheduledTaskRunHistoryList, Ue as ScheduledTaskRunStatus, Me as ScheduledTasks, Ne as ScheduledTasksSortKey, c as TIME_OF_DAY_PATTERN };
|