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