@epam/ai-dial-scheduled-tasks 1.1.0-dev.75 → 1.1.0-dev.87
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/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -1
- package/index.d.ts +0 -1
- package/index.d.ts.map +1 -1
- package/index.js +211 -222
- package/package.json +4 -4
- package/utils/filter-sort.d.ts +0 -4
- package/utils/filter-sort.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledTaskCreateForm.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScheduledTaskCreateForm.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAuC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AA2B7F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA4UpE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScheduledTasks.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTasks/ScheduledTasks.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,EAAE,EAA8B,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"ScheduledTasks.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTasks/ScheduledTasks.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,EAAE,EAA8B,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AA6CzE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA4PlD,CAAC"}
|
package/index.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ export { ScheduledTaskCardSkeleton } from './components/ScheduledTaskCardSkeleto
|
|
|
10
10
|
export type { ScheduledTaskCardSkeletonProps, ScheduledTaskCardSkeletonStyles, ScheduledTaskCardSkeletonColors, } from './models/scheduled-task-card-skeleton-props';
|
|
11
11
|
export type { ScheduledTaskItem, ScheduledTaskSortValues, } from './models/scheduled-task-item';
|
|
12
12
|
export { ScheduledTaskSectionKey } from './models/scheduled-task-item';
|
|
13
|
-
export { sortScheduledTaskItems } from './utils/filter-sort';
|
|
14
13
|
export { ScheduledTasksSortKey } from './types/scheduled-tasks-sort-key';
|
|
15
14
|
export { ScheduledTaskCreateForm } from './components/ScheduledTaskCreateForm/ScheduledTaskCreateForm';
|
|
16
15
|
export type { ScheduledTaskCreateFormProps, ScheduledTaskCreateFormLabels, ScheduledTaskCreateFormValues, ScheduledTaskCreateFormErrors, ScheduledTaskCreateFormStyles, ScheduledTaskCreateFormColors, ScheduledTaskCreateFormTypography, ScheduledTaskCreateFormModelOption, ScheduledTaskFrequencyOption, } from './models/scheduled-task-create-form-props';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,YAAY,EACV,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAC7G,YAAY,EACV,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAC;AACrF,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,0DAA0D,CAAC;AACjG,YAAY,EACV,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,kEAAkE,CAAC;AAC7G,YAAY,EACV,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,GAChC,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,8DAA8D,CAAC;AACvG,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,iCAAiC,EACjC,kCAAkC,EAClC,4BAA4B,GAC7B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EACL,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,iCAAiC,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,24 +1,13 @@
|
|
|
1
1
|
import { PanelEmptyState as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
2
|
-
import {
|
|
3
|
-
import { Calendar as
|
|
2
|
+
import { Input as r, SearchBar as i, Textarea as a } from "@epam/ai-dial-kit";
|
|
3
|
+
import { Calendar as o, CalendarMode as s, CardShell as c, DIAL_ICON_SIZE as l, DialDropdown as u, DialSelectField as d, DialSkeleton as f, DialSkeletonVariant as p, DialSpinner as m, FolderPath as h, GhostButton as g, GhostIconButton as _, Highlight as v, IconButton as y, LazyDialMarkdownEditor as b, NeutralButton as x, PrimaryButton as S } from "@epam/ai-dial-ui-kit";
|
|
4
4
|
import { IconArrowLeft as C, IconArrowsSort as w, IconCalendarTime as T, IconCheck as E, IconChevronUp as D, IconDotsVertical as O, IconEdit as k, IconPlayerPlay as A, IconPlus as j, IconTrash as M } from "@tabler/icons-react";
|
|
5
|
-
import { Suspense as N, lazy as P, useEffect as ee, useMemo as
|
|
6
|
-
import { Fragment as
|
|
5
|
+
import { Suspense as N, lazy as P, useEffect as ee, useMemo as te, useRef as ne } from "react";
|
|
6
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
7
7
|
//#region src/models/scheduled-task-item.ts
|
|
8
|
-
var
|
|
8
|
+
var R = /* @__PURE__ */ function(e) {
|
|
9
9
|
return e.Shared = "shared", e.MyTasks = "myTasks", e;
|
|
10
|
-
}({}),
|
|
11
|
-
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
12
|
-
}({}), V = (e, t, n) => e == null && t == null ? 0 : e == null ? 1 : t == null ? -1 : n * (new Date(e).getTime() - new Date(t).getTime()), H = (e, t) => {
|
|
13
|
-
let n = [...e];
|
|
14
|
-
switch (t) {
|
|
15
|
-
case B.FirstToRun: return n.sort((e, t) => V(e.sortValues.nextRunAt, t.sortValues.nextRunAt, 1));
|
|
16
|
-
case B.LastToRun: return n.sort((e, t) => V(e.sortValues.nextRunAt, t.sortValues.nextRunAt, -1));
|
|
17
|
-
case B.Newest: return n.sort((e, t) => V(e.sortValues.createdAt, t.sortValues.createdAt, -1));
|
|
18
|
-
case B.NameAZ: return n.sort((e, t) => e.displayName.localeCompare(t.displayName));
|
|
19
|
-
default: return n;
|
|
20
|
-
}
|
|
21
|
-
}, U = {
|
|
10
|
+
}({}), z = {
|
|
22
11
|
title: "_title_10760_1",
|
|
23
12
|
description: "_description_10760_5",
|
|
24
13
|
schedulePill: "_schedulePill_10760_9",
|
|
@@ -26,8 +15,8 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
26
15
|
locationLabel: "_locationLabel_10760_18",
|
|
27
16
|
locationLeaf: "_locationLeaf_10760_22",
|
|
28
17
|
newBadge: "_newBadge_10760_26"
|
|
29
|
-
},
|
|
30
|
-
let p = s?.newBadgeLabel ?? "NEW", m = s?.actionsLabel ?? "More actions",
|
|
18
|
+
}, B = ({ item: e, searchQuery: r = "", onEdit: i, onRunNow: a, onDelete: o, labels: s, styles: d, className: f }) => {
|
|
19
|
+
let p = s?.newBadgeLabel ?? "NEW", m = s?.actionsLabel ?? "More actions", g = s?.editActionLabel ?? "Edit", _ = s?.runNowActionLabel ?? "Run now", b = s?.deleteActionLabel ?? "Delete", { colors: x, typography: S } = d ?? {}, C = S?.titleClassName ?? "dial-body-semi-text", w = S?.descriptionClassName ?? "dial-small-text", T = S?.scheduleLabelClassName ?? "dial-tiny-text", E = S?.locationLabelClassName ?? "dial-tiny-text", D = S?.locationLeafClassName ?? "dial-tiny-semi-text", j = S?.newBadgeClassName ?? "dial-tiny-semi-text", N = t({
|
|
31
20
|
"--stc-title-text": x?.titleText,
|
|
32
21
|
"--stc-desc-text": x?.descriptionText,
|
|
33
22
|
"--stc-pill-bg": x?.schedulePillBackground,
|
|
@@ -40,55 +29,55 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
40
29
|
}), P = [];
|
|
41
30
|
return i && P.push({
|
|
42
31
|
key: "edit",
|
|
43
|
-
label:
|
|
44
|
-
icon: /* @__PURE__ */
|
|
45
|
-
size:
|
|
32
|
+
label: g,
|
|
33
|
+
icon: /* @__PURE__ */ I(k, {
|
|
34
|
+
size: l.SM,
|
|
46
35
|
"aria-hidden": !0
|
|
47
36
|
}),
|
|
48
37
|
onClick: () => i(e.id)
|
|
49
38
|
}), a && P.push({
|
|
50
39
|
key: "runNow",
|
|
51
40
|
label: _,
|
|
52
|
-
icon: /* @__PURE__ */
|
|
53
|
-
size:
|
|
41
|
+
icon: /* @__PURE__ */ I(A, {
|
|
42
|
+
size: l.SM,
|
|
54
43
|
"aria-hidden": !0
|
|
55
44
|
}),
|
|
56
45
|
onClick: () => a(e.id)
|
|
57
46
|
}), o && P.push({
|
|
58
47
|
key: "delete",
|
|
59
48
|
label: b,
|
|
60
|
-
icon: /* @__PURE__ */
|
|
61
|
-
size:
|
|
49
|
+
icon: /* @__PURE__ */ I(M, {
|
|
50
|
+
size: l.SM,
|
|
62
51
|
"aria-hidden": !0
|
|
63
52
|
}),
|
|
64
53
|
danger: !0,
|
|
65
54
|
onClick: () => o(e.id)
|
|
66
|
-
}), /* @__PURE__ */
|
|
55
|
+
}), /* @__PURE__ */ L(c, {
|
|
67
56
|
role: "group",
|
|
68
57
|
"aria-label": e.displayName,
|
|
69
58
|
style: N,
|
|
70
59
|
className: n("h-[232px]", f),
|
|
71
60
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ L("div", {
|
|
73
62
|
className: "flex shrink-0 items-start justify-between gap-2",
|
|
74
|
-
children: [/* @__PURE__ */
|
|
63
|
+
children: [/* @__PURE__ */ L("div", {
|
|
75
64
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ I(v, {
|
|
77
66
|
text: e.displayName,
|
|
78
67
|
query: r,
|
|
79
68
|
maxLines: 1,
|
|
80
|
-
className: n(C,
|
|
81
|
-
}), e.isNew && /* @__PURE__ */
|
|
82
|
-
className: n("shrink-0 rounded-full px-2 py-0.5", j,
|
|
69
|
+
className: n(C, z.title)
|
|
70
|
+
}), e.isNew && /* @__PURE__ */ I("span", {
|
|
71
|
+
className: n("shrink-0 rounded-full px-2 py-0.5", j, z.newBadge),
|
|
83
72
|
children: p
|
|
84
73
|
})]
|
|
85
|
-
}), P.length > 0 && /* @__PURE__ */
|
|
74
|
+
}), P.length > 0 && /* @__PURE__ */ I(u, {
|
|
86
75
|
items: P,
|
|
87
76
|
matchReferenceWidth: !1,
|
|
88
77
|
placement: "bottom-end",
|
|
89
|
-
children: /* @__PURE__ */
|
|
90
|
-
icon: /* @__PURE__ */
|
|
91
|
-
size:
|
|
78
|
+
children: /* @__PURE__ */ I(y, {
|
|
79
|
+
icon: /* @__PURE__ */ I(O, {
|
|
80
|
+
size: l.SM,
|
|
92
81
|
"aria-hidden": !0
|
|
93
82
|
}),
|
|
94
83
|
"aria-label": m,
|
|
@@ -96,55 +85,55 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
96
85
|
})
|
|
97
86
|
})]
|
|
98
87
|
}),
|
|
99
|
-
e.descriptionPreview && /* @__PURE__ */
|
|
100
|
-
className: n("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", w,
|
|
88
|
+
e.descriptionPreview && /* @__PURE__ */ I("p", {
|
|
89
|
+
className: n("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", w, z.description),
|
|
101
90
|
children: e.descriptionPreview
|
|
102
91
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ L("div", {
|
|
104
93
|
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
105
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ I("div", {
|
|
106
95
|
className: "flex min-h-[28px] items-center",
|
|
107
|
-
children: /* @__PURE__ */
|
|
108
|
-
className: n("inline-block rounded-lg border px-2 py-1",
|
|
96
|
+
children: /* @__PURE__ */ I("span", {
|
|
97
|
+
className: n("inline-block rounded-lg border px-2 py-1", z.schedulePill, T, z.scheduleLabel),
|
|
109
98
|
children: e.scheduleLabel
|
|
110
99
|
})
|
|
111
|
-
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */
|
|
100
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ I(h, {
|
|
112
101
|
segments: e.locationSegments,
|
|
113
|
-
labelClassName: n(E,
|
|
114
|
-
leafClassName: n(D,
|
|
102
|
+
labelClassName: n(E, z.locationLabel),
|
|
103
|
+
leafClassName: n(D, z.locationLeaf),
|
|
115
104
|
className: "border-t border-tertiary pt-3"
|
|
116
105
|
})]
|
|
117
106
|
})
|
|
118
107
|
]
|
|
119
108
|
});
|
|
120
|
-
},
|
|
109
|
+
}, V = [
|
|
121
110
|
"100%",
|
|
122
111
|
"100%",
|
|
123
112
|
"61%"
|
|
124
|
-
],
|
|
113
|
+
], H = ({ styles: e }) => {
|
|
125
114
|
let t = e?.colors?.skeletonColor ?? "var(--bg-layer-4)";
|
|
126
|
-
return /* @__PURE__ */
|
|
115
|
+
return /* @__PURE__ */ L(c, {
|
|
127
116
|
"aria-hidden": !0,
|
|
128
117
|
className: "h-[232px]",
|
|
129
118
|
children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
variant:
|
|
119
|
+
/* @__PURE__ */ I(f, {
|
|
120
|
+
variant: p.Rectangular,
|
|
132
121
|
width: "60%",
|
|
133
122
|
height: "20px",
|
|
134
123
|
color: t,
|
|
135
124
|
className: "shrink-0"
|
|
136
125
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ I("div", {
|
|
138
127
|
className: "flex min-h-0 flex-1 flex-col gap-3 overflow-hidden",
|
|
139
|
-
children:
|
|
140
|
-
variant:
|
|
128
|
+
children: V.map((e, n) => /* @__PURE__ */ I(f, {
|
|
129
|
+
variant: p.Rectangular,
|
|
141
130
|
width: e,
|
|
142
131
|
height: "16px",
|
|
143
132
|
color: t
|
|
144
133
|
}, n))
|
|
145
134
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
variant:
|
|
135
|
+
/* @__PURE__ */ I(f, {
|
|
136
|
+
variant: p.Rectangular,
|
|
148
137
|
width: "110px",
|
|
149
138
|
height: "28px",
|
|
150
139
|
color: t,
|
|
@@ -152,9 +141,9 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
152
141
|
})
|
|
153
142
|
]
|
|
154
143
|
});
|
|
155
|
-
},
|
|
144
|
+
}, U = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, labels: a, cardStyles: o, trailingSkeletonCount: s = 0, skeletonStyles: c }) => /* @__PURE__ */ L("div", {
|
|
156
145
|
className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
|
|
157
|
-
children: [e.map((e) => /* @__PURE__ */
|
|
146
|
+
children: [e.map((e) => /* @__PURE__ */ I(B, {
|
|
158
147
|
item: e,
|
|
159
148
|
searchQuery: t,
|
|
160
149
|
onEdit: n,
|
|
@@ -162,54 +151,54 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
162
151
|
onDelete: i,
|
|
163
152
|
labels: a,
|
|
164
153
|
styles: o
|
|
165
|
-
}, e.id)), Array.from({ length: s }, (e, t) => /* @__PURE__ */
|
|
166
|
-
}),
|
|
154
|
+
}, e.id)), Array.from({ length: s }, (e, t) => /* @__PURE__ */ I(H, { styles: c }, `skeleton-${t}`))]
|
|
155
|
+
}), W = { countBadge: "_countBadge_ilfph_1" }, G = ({ title: e, count: r, children: i, styles: a }) => {
|
|
167
156
|
let o = a?.typography?.titleClassName ?? "dial-small-semi-text", s = a?.typography?.countBadgeClassName ?? "dial-tiny-text", c = t({
|
|
168
157
|
"--sts-badge-bg": a?.colors?.countBadgeBackground,
|
|
169
158
|
"--sts-badge-text": a?.colors?.countBadgeText
|
|
170
159
|
});
|
|
171
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ L("section", {
|
|
172
161
|
...e ? { "aria-label": e } : {},
|
|
173
162
|
style: c,
|
|
174
163
|
className: "flex flex-col gap-3",
|
|
175
|
-
children: [e && /* @__PURE__ */
|
|
164
|
+
children: [e && /* @__PURE__ */ L("div", {
|
|
176
165
|
className: "flex items-center gap-2 rtl:flex-row-reverse",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
166
|
+
children: [/* @__PURE__ */ I("h2", {
|
|
178
167
|
className: o,
|
|
179
168
|
children: e
|
|
180
|
-
}), /* @__PURE__ */
|
|
181
|
-
className: n("rounded-full px-2 py-0.5", s,
|
|
169
|
+
}), /* @__PURE__ */ I("span", {
|
|
170
|
+
className: n("rounded-full px-2 py-0.5", s, W.countBadge),
|
|
182
171
|
children: r
|
|
183
172
|
})]
|
|
184
173
|
}), i]
|
|
185
174
|
});
|
|
186
|
-
},
|
|
175
|
+
}, K = {
|
|
187
176
|
container: "_container_11gjj_1",
|
|
188
177
|
subtitle: "_subtitle_11gjj_5",
|
|
189
178
|
sortButton: "_sortButton_11gjj_9"
|
|
190
|
-
},
|
|
179
|
+
}, re = [R.Shared, R.MyTasks], ie = (e, t, n, r, i, a) => {
|
|
191
180
|
if (!e) return t ? a.loadingMoreLabel : n ? a.errorLabel : r > 0 ? `${r}` : i ? a.noResultsLabel : a.emptyStateLabel;
|
|
192
|
-
},
|
|
181
|
+
}, q = (e) => {
|
|
193
182
|
if (!e || e === document.body) return null;
|
|
194
183
|
let { overflow: t, overflowY: n } = getComputedStyle(e);
|
|
195
|
-
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e :
|
|
196
|
-
},
|
|
197
|
-
let { colors: M, typography: N, emptyStateIconSize: P = 48 } = A ?? {},
|
|
184
|
+
return t === "auto" || t === "scroll" || n === "auto" || n === "scroll" ? e : q(e.parentElement);
|
|
185
|
+
}, J = ({ labels: r, onCreateClick: a, searchQuery: o, onSearchQueryChange: s, sortKey: c, onSortChange: d, items: f, isLoading: p = !1, error: h, onRetry: _, hasMore: v = !1, isLoadingMore: y = !1, skeletonCount: b = 6, onLoadMore: x, onEdit: C, onRunNow: O, onDelete: k, styles: A }) => {
|
|
186
|
+
let { colors: M, typography: N, emptyStateIconSize: P = 48 } = A ?? {}, F = N?.titleClassName ?? "dial-h1-text", z = N?.subtitleClassName ?? "dial-body-text", B = t({
|
|
198
187
|
"--st-bg": M?.background,
|
|
199
188
|
"--st-subtitle-text": M?.subtitleText,
|
|
200
189
|
"--st-sort-text": M?.sortButtonText
|
|
201
|
-
}),
|
|
202
|
-
let e = { [
|
|
203
|
-
return
|
|
190
|
+
}), V = r.sortOptions.find((e) => e.key === c)?.label ?? "", H = te(() => {
|
|
191
|
+
let e = { [R.Shared]: r.sharedSectionTitle };
|
|
192
|
+
return re.map((t) => ({
|
|
204
193
|
key: t,
|
|
205
194
|
title: e[t],
|
|
206
|
-
items:
|
|
195
|
+
items: f.filter((e) => e.sectionKey === t)
|
|
207
196
|
})).filter((e) => e.items.length > 0);
|
|
208
|
-
}, [
|
|
197
|
+
}, [f, r.sharedSectionTitle]), W = ie(p, y, !!h, f.length, o.trim().length > 0, r), J = ne(null);
|
|
209
198
|
ee(() => {
|
|
210
|
-
let e =
|
|
199
|
+
let e = J.current;
|
|
211
200
|
if (!e || !x) return;
|
|
212
|
-
let t =
|
|
201
|
+
let t = q(e.parentElement);
|
|
213
202
|
if (!t) return;
|
|
214
203
|
let n = () => {
|
|
215
204
|
if (y || p || !v) return;
|
|
@@ -223,36 +212,36 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
223
212
|
p,
|
|
224
213
|
x
|
|
225
214
|
]);
|
|
226
|
-
let
|
|
227
|
-
if (p) return /* @__PURE__ */
|
|
228
|
-
if (
|
|
215
|
+
let ae = () => {
|
|
216
|
+
if (p) return /* @__PURE__ */ I(m, {});
|
|
217
|
+
if (h) return /* @__PURE__ */ L("div", {
|
|
229
218
|
className: "flex flex-col items-center gap-3",
|
|
230
|
-
children: [/* @__PURE__ */
|
|
231
|
-
className: n(
|
|
219
|
+
children: [/* @__PURE__ */ I("p", {
|
|
220
|
+
className: n(z, K.subtitle),
|
|
232
221
|
children: r.errorLabel
|
|
233
|
-
}), /* @__PURE__ */
|
|
222
|
+
}), /* @__PURE__ */ I(g, {
|
|
234
223
|
label: r.retryLabel,
|
|
235
|
-
onClick:
|
|
224
|
+
onClick: _
|
|
236
225
|
})]
|
|
237
226
|
});
|
|
238
|
-
if (f.length === 0) return o.trim() ? /* @__PURE__ */
|
|
239
|
-
className: n(
|
|
227
|
+
if (f.length === 0) return o.trim() ? /* @__PURE__ */ I("p", {
|
|
228
|
+
className: n(z, K.subtitle),
|
|
240
229
|
children: r.noResultsLabel
|
|
241
|
-
}) : /* @__PURE__ */
|
|
242
|
-
icon: /* @__PURE__ */
|
|
230
|
+
}) : /* @__PURE__ */ I(e, {
|
|
231
|
+
icon: /* @__PURE__ */ I(T, {
|
|
243
232
|
"aria-hidden": !0,
|
|
244
233
|
size: P,
|
|
245
234
|
stroke: 1
|
|
246
235
|
}),
|
|
247
236
|
label: r.emptyStateLabel
|
|
248
237
|
});
|
|
249
|
-
let t =
|
|
250
|
-
return /* @__PURE__ */
|
|
238
|
+
let t = H.length - 1;
|
|
239
|
+
return /* @__PURE__ */ L("div", {
|
|
251
240
|
className: "flex w-full flex-col gap-6",
|
|
252
|
-
children: [
|
|
241
|
+
children: [H.map((e, n) => /* @__PURE__ */ I(G, {
|
|
253
242
|
title: e.title,
|
|
254
243
|
count: e.items.length,
|
|
255
|
-
children: /* @__PURE__ */
|
|
244
|
+
children: /* @__PURE__ */ I(U, {
|
|
256
245
|
items: e.items,
|
|
257
246
|
searchQuery: o,
|
|
258
247
|
onEdit: C,
|
|
@@ -262,43 +251,43 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
262
251
|
trailingSkeletonCount: y && n === t ? b : 0,
|
|
263
252
|
skeletonStyles: { colors: { skeletonColor: M?.skeletonColor } }
|
|
264
253
|
})
|
|
265
|
-
}, e.key)), /* @__PURE__ */
|
|
266
|
-
ref:
|
|
254
|
+
}, e.key)), /* @__PURE__ */ I("div", {
|
|
255
|
+
ref: J,
|
|
267
256
|
"aria-hidden": !0,
|
|
268
257
|
className: "h-px w-full"
|
|
269
258
|
})]
|
|
270
259
|
});
|
|
271
|
-
},
|
|
272
|
-
return /* @__PURE__ */
|
|
273
|
-
style:
|
|
274
|
-
className: n("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4",
|
|
260
|
+
}, oe = p || !!h || f.length === 0;
|
|
261
|
+
return /* @__PURE__ */ L("div", {
|
|
262
|
+
style: B,
|
|
263
|
+
className: n("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", K.container),
|
|
275
264
|
children: [
|
|
276
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ L("div", {
|
|
277
266
|
className: "flex items-start justify-between gap-4",
|
|
278
|
-
children: [/* @__PURE__ */
|
|
267
|
+
children: [/* @__PURE__ */ L("div", {
|
|
279
268
|
className: "min-w-0 gap-2",
|
|
280
|
-
children: [/* @__PURE__ */
|
|
281
|
-
className: n("truncate",
|
|
269
|
+
children: [/* @__PURE__ */ I("h1", {
|
|
270
|
+
className: n("truncate", F),
|
|
282
271
|
children: r.title
|
|
283
|
-
}), /* @__PURE__ */
|
|
284
|
-
className: n("mt-1",
|
|
272
|
+
}), /* @__PURE__ */ I("p", {
|
|
273
|
+
className: n("mt-1", z, K.subtitle),
|
|
285
274
|
children: r.subtitle
|
|
286
275
|
})]
|
|
287
|
-
}), /* @__PURE__ */
|
|
276
|
+
}), /* @__PURE__ */ I(S, {
|
|
288
277
|
label: r.createButtonLabel,
|
|
289
|
-
iconBefore: /* @__PURE__ */
|
|
290
|
-
size:
|
|
278
|
+
iconBefore: /* @__PURE__ */ I(j, {
|
|
279
|
+
size: l.SM,
|
|
291
280
|
"aria-hidden": !0
|
|
292
281
|
}),
|
|
293
|
-
onClick:
|
|
282
|
+
onClick: a,
|
|
294
283
|
className: "shrink-0"
|
|
295
284
|
})]
|
|
296
285
|
}),
|
|
297
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ L("div", {
|
|
298
287
|
className: "flex flex-wrap items-center gap-3",
|
|
299
|
-
children: [/* @__PURE__ */
|
|
288
|
+
children: [/* @__PURE__ */ I("div", {
|
|
300
289
|
className: "flex-1",
|
|
301
|
-
children: /* @__PURE__ */
|
|
290
|
+
children: /* @__PURE__ */ I(i, {
|
|
302
291
|
value: o,
|
|
303
292
|
onChange: s,
|
|
304
293
|
labels: {
|
|
@@ -314,60 +303,62 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
314
303
|
clearButtonClassName: "size-11 desktop:size-auto"
|
|
315
304
|
}
|
|
316
305
|
})
|
|
317
|
-
}), r.sortOptions.length > 0 && /* @__PURE__ */
|
|
306
|
+
}), r.sortOptions.length > 0 && /* @__PURE__ */ I(u, {
|
|
318
307
|
matchReferenceWidth: !1,
|
|
319
308
|
placement: "bottom-end",
|
|
320
309
|
listClassName: "cp-dropdown-overlay",
|
|
321
310
|
items: r.sortOptions.map((e) => ({
|
|
322
311
|
key: e.key,
|
|
323
|
-
label: /* @__PURE__ */
|
|
312
|
+
label: /* @__PURE__ */ L("span", {
|
|
324
313
|
className: "flex w-full items-center justify-between gap-2",
|
|
325
|
-
children: [e.label, e.key === c && /* @__PURE__ */
|
|
326
|
-
size:
|
|
314
|
+
children: [e.label, e.key === c && /* @__PURE__ */ I(E, {
|
|
315
|
+
size: l.SM,
|
|
327
316
|
"aria-hidden": !0
|
|
328
317
|
})]
|
|
329
318
|
}),
|
|
330
|
-
onClick: () =>
|
|
319
|
+
onClick: () => d(e.key)
|
|
331
320
|
})),
|
|
332
|
-
children: /* @__PURE__ */
|
|
333
|
-
label:
|
|
321
|
+
children: /* @__PURE__ */ I(g, {
|
|
322
|
+
label: V,
|
|
334
323
|
"aria-label": r.sortLabel,
|
|
335
|
-
className: n("rounded-[4px]",
|
|
336
|
-
iconBefore: /* @__PURE__ */
|
|
324
|
+
className: n("rounded-[4px]", K.sortButton),
|
|
325
|
+
iconBefore: /* @__PURE__ */ I(w, {
|
|
337
326
|
size: 20,
|
|
338
327
|
"aria-hidden": !0
|
|
339
328
|
}),
|
|
340
|
-
iconAfter: /* @__PURE__ */
|
|
329
|
+
iconAfter: /* @__PURE__ */ I(D, {
|
|
341
330
|
size: 20,
|
|
342
331
|
"aria-hidden": !0
|
|
343
332
|
})
|
|
344
333
|
})
|
|
345
334
|
})]
|
|
346
335
|
}),
|
|
347
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ I("span", {
|
|
348
337
|
role: "status",
|
|
349
338
|
"aria-live": "polite",
|
|
350
339
|
className: "sr-only",
|
|
351
|
-
children:
|
|
340
|
+
children: W
|
|
352
341
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
className: n("mx-auto flex size-full w-full max-w-[1180px] flex-col",
|
|
355
|
-
children:
|
|
342
|
+
/* @__PURE__ */ I("div", {
|
|
343
|
+
className: n("mx-auto flex size-full w-full max-w-[1180px] flex-col", oe && "items-center justify-center"),
|
|
344
|
+
children: ae()
|
|
356
345
|
})
|
|
357
346
|
]
|
|
358
347
|
});
|
|
359
|
-
},
|
|
348
|
+
}, ae = /* @__PURE__ */ function(e) {
|
|
349
|
+
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
350
|
+
}({}), oe = 500, Y = /* @__PURE__ */ function(e) {
|
|
360
351
|
return e.Once = "once", e.Recurring = "recurring", e;
|
|
361
352
|
}({}), X = /* @__PURE__ */ function(e) {
|
|
362
353
|
return e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
363
|
-
}({}), Z = (e) => String(e).padStart(2, "0"),
|
|
354
|
+
}({}), Z = (e) => String(e).padStart(2, "0"), se = (e) => e ? new Date(e) : null, ce = (e) => {
|
|
364
355
|
if (e == null) return "";
|
|
365
356
|
let t = e instanceof Date ? e : new Date(e);
|
|
366
357
|
return Number.isNaN(t.getTime()) ? "" : `${t.getFullYear()}-${Z(t.getMonth() + 1)}-${Z(t.getDate())}T${Z(t.getHours())}:${Z(t.getMinutes())}`;
|
|
367
|
-
},
|
|
358
|
+
}, le = (e) => {
|
|
368
359
|
let t = Number(e);
|
|
369
360
|
return e && Number.isFinite(t) ? String(t + 1) : null;
|
|
370
|
-
},
|
|
361
|
+
}, ue = (e) => {
|
|
371
362
|
let t = typeof e == "string" ? Number(e) : NaN;
|
|
372
363
|
return Number.isFinite(t) ? String(t - 1) : "";
|
|
373
364
|
}, Q = {
|
|
@@ -376,109 +367,107 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
376
367
|
detailsColumn: "_detailsColumn_pvqly_9",
|
|
377
368
|
sectionSubtitle: "_sectionSubtitle_pvqly_13",
|
|
378
369
|
instructionsError: "_instructionsError_pvqly_17"
|
|
379
|
-
}, $ = (e) => `${e} *`,
|
|
370
|
+
}, $ = (e) => `${e} *`, de = P(async () => ({ default: (await b()).DialMarkdownEditor })), fe = ({ labels: e, values: i, errors: c, modelOptions: u, onFieldChange: f, onBack: p, onCancel: h, onSubmit: g, isSubmitting: v = !1, markdownEditorTheme: y, styles: b }) => {
|
|
380
371
|
let { colors: w, typography: T } = b ?? {}, E = T?.titleClassName ?? "dial-h1-text", D = T?.sectionTitleClassName ?? "dial-body-semi-text", O = T?.sectionSubtitleClassName ?? "dial-tiny-text", k = T?.scheduleSectionLabelClassName ?? "dial-body-semi-text mb-1", A = T?.instructionsErrorClassName ?? "dial-small-text", j = t({
|
|
381
372
|
"--stcf-bg": w?.background,
|
|
382
373
|
"--stcf-header-border": w?.headerBorder,
|
|
383
374
|
"--stcf-details-border": w?.detailsColumnBorder,
|
|
384
375
|
"--stcf-subtitle-text": w?.sectionSubtitleText,
|
|
385
376
|
"--stcf-error-text": w?.instructionsErrorText
|
|
386
|
-
}), M = v || !
|
|
387
|
-
return /* @__PURE__ */
|
|
377
|
+
}), M = v || !i.displayName.trim() || !i.modelId || !i.prompt.trim();
|
|
378
|
+
return /* @__PURE__ */ L("div", {
|
|
388
379
|
style: j,
|
|
389
380
|
className: n("flex h-full w-full flex-col overflow-y-auto", Q.container),
|
|
390
|
-
children: [/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ L("div", {
|
|
391
382
|
className: n("flex h-16 items-center justify-between gap-6 border-b px-8", Q.header),
|
|
392
|
-
children: [/* @__PURE__ */
|
|
383
|
+
children: [/* @__PURE__ */ L("div", {
|
|
393
384
|
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
394
|
-
children: [/* @__PURE__ */
|
|
395
|
-
icon: /* @__PURE__ */
|
|
396
|
-
size:
|
|
385
|
+
children: [/* @__PURE__ */ I(_, {
|
|
386
|
+
icon: /* @__PURE__ */ I(C, {
|
|
387
|
+
size: l.LG,
|
|
397
388
|
className: "rtl:scale-x-[-1]",
|
|
398
389
|
"aria-hidden": !0
|
|
399
390
|
}),
|
|
400
391
|
"aria-label": e.backButtonLabel,
|
|
401
|
-
onClick:
|
|
402
|
-
}), /* @__PURE__ */
|
|
392
|
+
onClick: p
|
|
393
|
+
}), /* @__PURE__ */ I("h1", {
|
|
403
394
|
className: n("truncate", E),
|
|
404
395
|
children: e.pageTitle
|
|
405
396
|
})]
|
|
406
|
-
}), /* @__PURE__ */
|
|
397
|
+
}), /* @__PURE__ */ L("div", {
|
|
407
398
|
className: "flex items-center gap-2",
|
|
408
|
-
children: [/* @__PURE__ */
|
|
409
|
-
type: "button",
|
|
399
|
+
children: [/* @__PURE__ */ I(x, {
|
|
410
400
|
label: e.cancelButtonLabel,
|
|
411
|
-
onClick:
|
|
401
|
+
onClick: h,
|
|
412
402
|
disabled: v
|
|
413
|
-
}), /* @__PURE__ */
|
|
414
|
-
type: "button",
|
|
403
|
+
}), /* @__PURE__ */ I(S, {
|
|
415
404
|
label: e.createButtonLabel,
|
|
416
|
-
onClick:
|
|
405
|
+
onClick: g,
|
|
417
406
|
disabled: M
|
|
418
407
|
})]
|
|
419
408
|
})]
|
|
420
|
-
}), /* @__PURE__ */
|
|
409
|
+
}), /* @__PURE__ */ L("div", {
|
|
421
410
|
className: "flex flex-1 flex-col desktop:flex-row",
|
|
422
411
|
children: [
|
|
423
|
-
/* @__PURE__ */
|
|
412
|
+
/* @__PURE__ */ L("div", {
|
|
424
413
|
role: "group",
|
|
425
414
|
"aria-label": e.detailsSectionTitle,
|
|
426
415
|
className: n("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", Q.detailsColumn),
|
|
427
416
|
children: [
|
|
428
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ L("div", {
|
|
429
418
|
className: "flex flex-col gap-1",
|
|
430
|
-
children: [/* @__PURE__ */
|
|
419
|
+
children: [/* @__PURE__ */ I("h2", {
|
|
431
420
|
className: D,
|
|
432
421
|
children: e.detailsSectionTitle
|
|
433
|
-
}), /* @__PURE__ */
|
|
422
|
+
}), /* @__PURE__ */ I("p", {
|
|
434
423
|
className: n(O, Q.sectionSubtitle),
|
|
435
424
|
children: e.detailsSectionSubtitle
|
|
436
425
|
})]
|
|
437
426
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ I(r, {
|
|
439
428
|
id: "scheduled-task-display-name",
|
|
440
|
-
value:
|
|
441
|
-
onChange: (e) =>
|
|
429
|
+
value: i.displayName,
|
|
430
|
+
onChange: (e) => f("displayName", e ?? ""),
|
|
442
431
|
labelProps: {
|
|
443
432
|
label: e.displayNameLabel,
|
|
444
433
|
required: !0
|
|
445
434
|
},
|
|
446
|
-
invalid: !!
|
|
447
|
-
error:
|
|
435
|
+
invalid: !!c.displayName,
|
|
436
|
+
error: c.displayName
|
|
448
437
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ I(a, {
|
|
450
439
|
id: "scheduled-task-description",
|
|
451
|
-
value:
|
|
452
|
-
onChange: (e) =>
|
|
440
|
+
value: i.description ?? "",
|
|
441
|
+
onChange: (e) => f("description", e),
|
|
453
442
|
labelProps: { label: e.descriptionLabel },
|
|
454
443
|
maxLength: 500,
|
|
455
|
-
invalid: !!
|
|
456
|
-
error:
|
|
457
|
-
caption:
|
|
444
|
+
invalid: !!c.description,
|
|
445
|
+
error: c.description,
|
|
446
|
+
caption: i.description ? `${i.description.length}/500` : void 0
|
|
458
447
|
}),
|
|
459
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ I(d, {
|
|
460
449
|
label: e.modelOrAgentLabel,
|
|
461
450
|
required: !0,
|
|
462
|
-
value:
|
|
451
|
+
value: i.modelId,
|
|
463
452
|
placeholder: e.modelPlaceholder,
|
|
464
|
-
onChange: (e) =>
|
|
465
|
-
error:
|
|
466
|
-
options:
|
|
453
|
+
onChange: (e) => f("modelId", e),
|
|
454
|
+
error: c.modelId,
|
|
455
|
+
options: u.map((e) => ({
|
|
467
456
|
value: e.id,
|
|
468
457
|
label: e.label
|
|
469
458
|
}))
|
|
470
459
|
}),
|
|
471
|
-
/* @__PURE__ */
|
|
460
|
+
/* @__PURE__ */ L("fieldset", {
|
|
472
461
|
className: "flex flex-col gap-3",
|
|
473
462
|
children: [
|
|
474
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ I("legend", {
|
|
475
464
|
className: k,
|
|
476
465
|
children: e.scheduleSectionLabel
|
|
477
466
|
}),
|
|
478
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ I(d, {
|
|
479
468
|
label: e.scheduleTypeAriaLabel,
|
|
480
|
-
value:
|
|
481
|
-
onChange: (e) =>
|
|
469
|
+
value: i.scheduleType,
|
|
470
|
+
onChange: (e) => f("scheduleType", e),
|
|
482
471
|
options: [{
|
|
483
472
|
value: Y.Once,
|
|
484
473
|
label: e.scheduleTypeOnceLabel
|
|
@@ -487,113 +476,113 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
487
476
|
label: e.scheduleTypeRecurringLabel
|
|
488
477
|
}]
|
|
489
478
|
}),
|
|
490
|
-
|
|
479
|
+
i.scheduleType === Y.Once && /* @__PURE__ */ L("div", {
|
|
491
480
|
className: "flex flex-col gap-1",
|
|
492
|
-
children: [/* @__PURE__ */
|
|
481
|
+
children: [/* @__PURE__ */ I(o, {
|
|
493
482
|
id: "scheduled-task-run-at",
|
|
494
|
-
mode:
|
|
495
|
-
value:
|
|
496
|
-
onChange: (e) =>
|
|
483
|
+
mode: s.DateTime,
|
|
484
|
+
value: se(i.runAt),
|
|
485
|
+
onChange: (e) => f("runAt", ce(e)),
|
|
497
486
|
label: $(e.runAtLabel),
|
|
498
|
-
invalid: !!
|
|
499
|
-
}),
|
|
487
|
+
invalid: !!c.runAt
|
|
488
|
+
}), c.runAt && /* @__PURE__ */ I("p", {
|
|
500
489
|
className: n(A, Q.instructionsError),
|
|
501
|
-
children:
|
|
490
|
+
children: c.runAt
|
|
502
491
|
})]
|
|
503
492
|
}),
|
|
504
|
-
|
|
505
|
-
/* @__PURE__ */
|
|
493
|
+
i.scheduleType === Y.Recurring && /* @__PURE__ */ L(F, { children: [
|
|
494
|
+
/* @__PURE__ */ I(d, {
|
|
506
495
|
label: e.frequencyLabel,
|
|
507
|
-
value:
|
|
508
|
-
onChange: (e) =>
|
|
496
|
+
value: i.frequency,
|
|
497
|
+
onChange: (e) => f("frequency", e),
|
|
509
498
|
options: e.frequencyOptions.map((e) => ({
|
|
510
499
|
value: e.key,
|
|
511
500
|
label: e.label
|
|
512
501
|
}))
|
|
513
502
|
}),
|
|
514
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ L("div", {
|
|
515
504
|
className: "flex flex-col gap-1",
|
|
516
|
-
children: [/* @__PURE__ */
|
|
505
|
+
children: [/* @__PURE__ */ I(o, {
|
|
517
506
|
id: "scheduled-task-time",
|
|
518
|
-
mode:
|
|
519
|
-
value:
|
|
520
|
-
onChange: (e) =>
|
|
507
|
+
mode: s.Time,
|
|
508
|
+
value: i.time,
|
|
509
|
+
onChange: (e) => f("time", typeof e == "string" ? e : ""),
|
|
521
510
|
label: $(e.timeLabel),
|
|
522
|
-
invalid: !!
|
|
523
|
-
}),
|
|
511
|
+
invalid: !!c.time
|
|
512
|
+
}), c.time && /* @__PURE__ */ I("p", {
|
|
524
513
|
className: n(A, Q.instructionsError),
|
|
525
|
-
children:
|
|
514
|
+
children: c.time
|
|
526
515
|
})]
|
|
527
516
|
}),
|
|
528
|
-
|
|
517
|
+
i.frequency === X.Weekly && /* @__PURE__ */ L("div", {
|
|
529
518
|
className: "flex flex-col gap-1",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
519
|
+
children: [/* @__PURE__ */ I(o, {
|
|
531
520
|
id: "scheduled-task-day-of-week",
|
|
532
|
-
mode:
|
|
533
|
-
value:
|
|
534
|
-
onChange: (e) =>
|
|
521
|
+
mode: s.Weekday,
|
|
522
|
+
value: le(i.dayOfWeek),
|
|
523
|
+
onChange: (e) => f("dayOfWeek", ue(e)),
|
|
535
524
|
label: $(e.dayOfWeekLabel),
|
|
536
|
-
invalid: !!
|
|
537
|
-
}),
|
|
525
|
+
invalid: !!c.dayOfWeek
|
|
526
|
+
}), c.dayOfWeek && /* @__PURE__ */ I("p", {
|
|
538
527
|
className: n(A, Q.instructionsError),
|
|
539
|
-
children:
|
|
528
|
+
children: c.dayOfWeek
|
|
540
529
|
})]
|
|
541
530
|
}),
|
|
542
|
-
|
|
531
|
+
i.frequency === X.Monthly && /* @__PURE__ */ I(r, {
|
|
543
532
|
id: "scheduled-task-day-of-month",
|
|
544
|
-
value:
|
|
545
|
-
onChange: (e) =>
|
|
533
|
+
value: i.dayOfMonth ?? "",
|
|
534
|
+
onChange: (e) => f("dayOfMonth", e ?? ""),
|
|
546
535
|
labelProps: {
|
|
547
536
|
label: e.dayOfMonthLabel,
|
|
548
537
|
required: !0
|
|
549
538
|
},
|
|
550
|
-
invalid: !!
|
|
551
|
-
error:
|
|
539
|
+
invalid: !!c.dayOfMonth,
|
|
540
|
+
error: c.dayOfMonth
|
|
552
541
|
})
|
|
553
542
|
] })
|
|
554
543
|
]
|
|
555
544
|
})
|
|
556
545
|
]
|
|
557
546
|
}),
|
|
558
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ L("div", {
|
|
559
548
|
role: "group",
|
|
560
549
|
"aria-label": e.configurationSectionTitle,
|
|
561
550
|
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
562
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ L("div", {
|
|
563
552
|
className: "flex flex-col gap-1",
|
|
564
|
-
children: [/* @__PURE__ */
|
|
553
|
+
children: [/* @__PURE__ */ I("h2", {
|
|
565
554
|
className: D,
|
|
566
555
|
children: e.configurationSectionTitle
|
|
567
|
-
}), /* @__PURE__ */
|
|
556
|
+
}), /* @__PURE__ */ I("p", {
|
|
568
557
|
className: n(O, Q.sectionSubtitle),
|
|
569
558
|
children: e.configurationSectionSubtitle
|
|
570
559
|
})]
|
|
571
|
-
}), /* @__PURE__ */
|
|
560
|
+
}), /* @__PURE__ */ L("div", {
|
|
572
561
|
role: "group",
|
|
573
562
|
"aria-label": e.instructionsLabel,
|
|
574
563
|
className: "flex flex-1 flex-col gap-1",
|
|
575
564
|
children: [
|
|
576
|
-
/* @__PURE__ */
|
|
565
|
+
/* @__PURE__ */ I("span", {
|
|
577
566
|
className: k,
|
|
578
567
|
children: e.instructionsLabel
|
|
579
568
|
}),
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
fallback: /* @__PURE__ */
|
|
582
|
-
children: /* @__PURE__ */
|
|
583
|
-
value:
|
|
584
|
-
onChange: (e) =>
|
|
569
|
+
/* @__PURE__ */ I(N, {
|
|
570
|
+
fallback: /* @__PURE__ */ I(m, {}),
|
|
571
|
+
children: /* @__PURE__ */ I(de, {
|
|
572
|
+
value: i.prompt,
|
|
573
|
+
onChange: (e) => f("prompt", e),
|
|
585
574
|
height: 480,
|
|
586
575
|
theme: y
|
|
587
576
|
})
|
|
588
577
|
}),
|
|
589
|
-
|
|
578
|
+
c.prompt && /* @__PURE__ */ I("p", {
|
|
590
579
|
className: n(A, Q.instructionsError),
|
|
591
|
-
children:
|
|
580
|
+
children: c.prompt
|
|
592
581
|
})
|
|
593
582
|
]
|
|
594
583
|
})]
|
|
595
584
|
}),
|
|
596
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ I("div", {
|
|
597
586
|
"aria-hidden": !0,
|
|
598
587
|
className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
|
|
599
588
|
})
|
|
@@ -602,4 +591,4 @@ var z = /* @__PURE__ */ function(e) {
|
|
|
602
591
|
});
|
|
603
592
|
};
|
|
604
593
|
//#endregion
|
|
605
|
-
export {
|
|
594
|
+
export { oe as DESCRIPTION_MAX_LENGTH, B as ScheduledTaskCard, U as ScheduledTaskCardGrid, H as ScheduledTaskCardSkeleton, fe as ScheduledTaskCreateForm, X as ScheduledTaskFrequency, Y as ScheduledTaskScheduleType, G as ScheduledTaskSection, R as ScheduledTaskSectionKey, J as ScheduledTasks, ae as ScheduledTasksSortKey };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-scheduled-tasks",
|
|
3
3
|
"description": "Presentational Scheduled Tasks page shell — header, toolbar, and empty state",
|
|
4
|
-
"version": "1.1.0-dev.
|
|
4
|
+
"version": "1.1.0-dev.87",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@epam/ai-dial-chat-shared": "1.1.0-dev.
|
|
21
|
-
"@epam/ai-dial-kit": "1.1.0-dev.
|
|
22
|
-
"@epam/ai-dial-ui-kit": "0.13.0-dev.
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.87",
|
|
21
|
+
"@epam/ai-dial-kit": "1.1.0-dev.87",
|
|
22
|
+
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
|
|
23
23
|
"@tabler/icons-react": "^3.44.0",
|
|
24
24
|
"react": "^19.0.0"
|
|
25
25
|
},
|
package/utils/filter-sort.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ScheduledTaskItem } from '../models/scheduled-task-item';
|
|
2
|
-
/** Sorts a (typically already-filtered) list of items by the given toolbar sort key. */
|
|
3
|
-
export declare const sortScheduledTaskItems: (items: ScheduledTaskItem[], sortKey: string) => ScheduledTaskItem[];
|
|
4
|
-
//# sourceMappingURL=filter-sort.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-sort.d.ts","sourceRoot":"","sources":["../../src/utils/filter-sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAgBvE,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,GACjC,OAAO,iBAAiB,EAAE,EAC1B,SAAS,MAAM,KACd,iBAAiB,EAgCnB,CAAC"}
|