@epam/ai-dial-scheduled-tasks 1.1.0-dev.55
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 +14 -0
- package/components/ScheduledTaskCard/ScheduledTaskCard.d.ts.map +1 -0
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts +5 -0
- package/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.d.ts.map +1 -0
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts +13 -0
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -0
- package/components/ScheduledTaskSection/ScheduledTaskSection.d.ts +5 -0
- package/components/ScheduledTaskSection/ScheduledTaskSection.d.ts.map +1 -0
- package/components/ScheduledTasks/ScheduledTasks.d.ts +10 -0
- package/components/ScheduledTasks/ScheduledTasks.d.ts.map +1 -0
- package/constants/scheduled-task-create-form.d.ts +3 -0
- package/constants/scheduled-task-create-form.d.ts.map +1 -0
- package/index.css +2 -0
- package/index.d.ts +17 -0
- package/index.d.ts.map +1 -0
- package/index.js +526 -0
- package/models/scheduled-task-card-grid-props.d.ts +33 -0
- package/models/scheduled-task-card-grid-props.d.ts.map +1 -0
- package/models/scheduled-task-card-props.d.ts +80 -0
- package/models/scheduled-task-card-props.d.ts.map +1 -0
- package/models/scheduled-task-create-form-props.d.ts +172 -0
- package/models/scheduled-task-create-form-props.d.ts.map +1 -0
- package/models/scheduled-task-item.d.ts +32 -0
- package/models/scheduled-task-item.d.ts.map +1 -0
- package/models/scheduled-task-section-props.d.ts +37 -0
- package/models/scheduled-task-section-props.d.ts.map +1 -0
- package/models/scheduled-tasks-props.d.ts +101 -0
- package/models/scheduled-tasks-props.d.ts.map +1 -0
- package/package.json +31 -0
- package/test-setup.d.ts +1 -0
- package/test-setup.d.ts.map +1 -0
- package/types/scheduled-task-schedule.d.ts +12 -0
- package/types/scheduled-task-schedule.d.ts.map +1 -0
- package/types/scheduled-tasks-sort-key.d.ts +8 -0
- package/types/scheduled-tasks-sort-key.d.ts.map +1 -0
- package/utils/filter-sort.d.ts +6 -0
- package/utils/filter-sort.d.ts.map +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScheduledTaskCardProps } from '../../models/scheduled-task-card-props';
|
|
3
|
+
/**
|
|
4
|
+
* Single scheduled-task card: title, optional "new" badge and description,
|
|
5
|
+
* schedule pill, location breadcrumb, and an overflow menu limited to the
|
|
6
|
+
* actions the caller wired up. Renders on the shared `CardShell` from
|
|
7
|
+
* `@epam/ai-dial-ui-kit` (radius, padding, shadow, hover lift), the same shell
|
|
8
|
+
* the Catalog browse card uses. The card has a fixed height; a long
|
|
9
|
+
* description is clamped with an ellipsis, and the schedule pill (plus the
|
|
10
|
+
* location breadcrumb, when present) is pinned to the bottom regardless of
|
|
11
|
+
* description length.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ScheduledTaskCard: FC<ScheduledTaskCardProps>;
|
|
14
|
+
//# sourceMappingURL=ScheduledTaskCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledTaskCard.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCard/ScheduledTaskCard.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAGrF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC,sBAAsB,CAyJxD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScheduledTaskCardGridProps } from '../../models/scheduled-task-card-grid-props';
|
|
3
|
+
/** Mobile-first responsive grid of {@link ScheduledTaskCard}s: one column on mobile, three columns on desktop. */
|
|
4
|
+
export declare const ScheduledTaskCardGrid: FC<ScheduledTaskCardGridProps>;
|
|
5
|
+
//# sourceMappingURL=ScheduledTaskCardGrid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledTaskCardGrid.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCardGrid/ScheduledTaskCardGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AAG9F,kHAAkH;AAClH,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC,0BAA0B,CAuBhE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScheduledTaskCreateFormProps } from '../../models/scheduled-task-create-form-props';
|
|
3
|
+
/**
|
|
4
|
+
* Presentational create-task form: a back-navigable header (Cancel/Save
|
|
5
|
+
* actions) and a two-column Details/Configuration body. Details holds
|
|
6
|
+
* display name, description, the schedule fields, and the model picker;
|
|
7
|
+
* Configuration holds the markdown Instructions editor and the stream
|
|
8
|
+
* toggle. Field values, validation errors, and model options are all
|
|
9
|
+
* supplied by the host app; this component holds no state of its own and
|
|
10
|
+
* performs no routing, i18n, or network calls.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ScheduledTaskCreateForm: FC<ScheduledTaskCreateFormProps>;
|
|
13
|
+
//# sourceMappingURL=ScheduledTaskCreateForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledTaskCreateForm.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAuC,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAgB7F;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CAqSpE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScheduledTaskSectionProps } from '../../models/scheduled-task-section-props';
|
|
3
|
+
/** Named group of scheduled-task cards (e.g. "Shared", "My tasks") with a title and a count badge. */
|
|
4
|
+
export declare const ScheduledTaskSection: FC<ScheduledTaskSectionProps>;
|
|
5
|
+
//# sourceMappingURL=ScheduledTaskSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledTaskSection.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTaskSection/ScheduledTaskSection.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAG3F,sGAAsG;AACtG,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAsC9D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ScheduledTasksProps } from '../../models/scheduled-tasks-props';
|
|
3
|
+
/**
|
|
4
|
+
* Scheduled Tasks page shell: header with title/subtitle/create action, a
|
|
5
|
+
* search + sort toolbar, and a content region that shows a loading spinner,
|
|
6
|
+
* an error with retry, the empty state, a no-results state, or a
|
|
7
|
+
* section-grouped card grid, depending on `isLoading`/`error`/`items`.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ScheduledTasks: FC<ScheduledTasksProps>;
|
|
10
|
+
//# sourceMappingURL=ScheduledTasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScheduledTasks.d.ts","sourceRoot":"","sources":["../../../src/components/ScheduledTasks/ScheduledTasks.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AA+BzE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA0NlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-create-form.d.ts","sourceRoot":"","sources":["../../src/constants/scheduled-task-create-form.ts"],"names":[],"mappings":"AAAA,mGAAmG;AACnG,eAAO,MAAM,sBAAsB,MAAM,CAAC"}
|
package/index.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
._title_11p38_1{color:var(--stc-title-text,var(--text-primary,#161b2d))}._description_11p38_5{color:var(--stc-desc-text,var(--text-control-disable,#7c8293))}._schedulePill_11p38_9{background:var(--stc-pill-bg,var(--bg-layer-2,#eef1f7));border-color:var(--stc-pill-border,var(--stroke-tertiary,#e0e6f0))}._scheduleLabel_11p38_14{color:var(--stc-schedule-label-text,var(--text-control-disable,#7c8293))}._locationLabel_11p38_18{color:var(--stc-location-label-text,var(--text-secondary,#575f73))}._locationLeaf_11p38_22{color:var(--stc-location-leaf-text,var(--text-secondary,#575f73))}._newBadge_11p38_26{background:var(--stc-new-badge-bg,var(--controls-bg-accent-primary,#124ace));color:var(--stc-new-badge-text,var(--controls-text-permanent,#fcfcfc))}._countBadge_2z537_1{background:var(--sts-badge-bg,var(--bg-layer-3,#fcfcfc));color:var(--sts-badge-text,var(--text-secondary,#575f73))}._container_7rg40_1{background:var(--st-bg,var(--bg-layer-5,#f5f7fa))}._subtitle_7rg40_5{color:var(--st-subtitle-text,var(--text-secondary,#575f73))}._sortButton_7rg40_9{color:var(--st-sort-text,var(--text-accent-primary,#124ace))}._container_gdwv3_1{background:var(--stcf-bg,var(--bg-layer-5,#f5f7fa))}._header_gdwv3_5{border-bottom-color:var(--stcf-header-border,var(--stroke-tertiary,#e0e6f0))}._detailsColumn_gdwv3_9{border-inline-end-color:var(--stcf-details-border,var(--stroke-tertiary,#e0e6f0))}._sectionSubtitle_gdwv3_13{color:var(--stcf-subtitle-text,var(--text-secondary,#575f73))}._instructionsError_gdwv3_17{color:var(--stcf-error-text,var(--text-error,#ae2f2f))}
|
|
2
|
+
/*$vite$:1*/
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { ScheduledTasks } from './components/ScheduledTasks/ScheduledTasks';
|
|
2
|
+
export type { ScheduledTasksProps, ScheduledTasksLabels, ScheduledTasksSortOption, ScheduledTasksStyles, ScheduledTasksColors, ScheduledTasksTypography, } from './models/scheduled-tasks-props';
|
|
3
|
+
export { ScheduledTaskCard } from './components/ScheduledTaskCard/ScheduledTaskCard';
|
|
4
|
+
export type { ScheduledTaskCardProps, ScheduledTaskCardLabels, ScheduledTaskCardStyles, ScheduledTaskCardColors, ScheduledTaskCardTypography, } from './models/scheduled-task-card-props';
|
|
5
|
+
export { ScheduledTaskSection } from './components/ScheduledTaskSection/ScheduledTaskSection';
|
|
6
|
+
export type { ScheduledTaskSectionProps, ScheduledTaskSectionStyles, ScheduledTaskSectionColors, ScheduledTaskSectionTypography, } from './models/scheduled-task-section-props';
|
|
7
|
+
export { ScheduledTaskCardGrid } from './components/ScheduledTaskCardGrid/ScheduledTaskCardGrid';
|
|
8
|
+
export type { ScheduledTaskCardGridProps, ScheduledTaskCardGridLabels, } from './models/scheduled-task-card-grid-props';
|
|
9
|
+
export type { ScheduledTaskItem, ScheduledTaskSortValues, } from './models/scheduled-task-item';
|
|
10
|
+
export { ScheduledTaskSectionKey } from './models/scheduled-task-item';
|
|
11
|
+
export { filterScheduledTaskItems, sortScheduledTaskItems, } from './utils/filter-sort';
|
|
12
|
+
export { ScheduledTasksSortKey } from './types/scheduled-tasks-sort-key';
|
|
13
|
+
export { ScheduledTaskCreateForm } from './components/ScheduledTaskCreateForm/ScheduledTaskCreateForm';
|
|
14
|
+
export type { ScheduledTaskCreateFormProps, ScheduledTaskCreateFormLabels, ScheduledTaskCreateFormValues, ScheduledTaskCreateFormErrors, ScheduledTaskCreateFormStyles, ScheduledTaskCreateFormColors, ScheduledTaskCreateFormTypography, ScheduledTaskCreateFormModelOption, ScheduledTaskFrequencyOption, } from './models/scheduled-task-create-form-props';
|
|
15
|
+
export { DESCRIPTION_MAX_LENGTH } from './constants/scheduled-task-create-form';
|
|
16
|
+
export { ScheduledTaskFrequency, ScheduledTaskScheduleType, } from './types/scheduled-task-schedule';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
ADDED
|
@@ -0,0 +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,YAAY,EACV,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,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
ADDED
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { PanelEmptyState as e, buildCssVars as t, mergeClasses as n } from "@epam/ai-dial-chat-shared";
|
|
2
|
+
import { GhostButton as r, GhostIconButton as i, Input as a, NeutralButton as o, PrimaryButton as s, SearchBar as c, Textarea as l } from "@epam/ai-dial-kit";
|
|
3
|
+
import { CardShell as u, DIAL_ICON_SIZE as d, DialDropdown as f, DialIconButton as p, DialSelectField as m, DialSpinner as h, FolderPath as g, Highlight as _, LazyDialMarkdownEditor as v } from "@epam/ai-dial-ui-kit";
|
|
4
|
+
import { IconArrowLeft as y, IconArrowsSort as b, IconCalendarTime as x, IconCheck as S, IconChevronUp as C, IconDotsVertical as w, IconEdit as T, IconPlayerPlay as E, IconPlus as D, IconTrash as O } from "@tabler/icons-react";
|
|
5
|
+
import { Suspense as k, lazy as A, useMemo as j } from "react";
|
|
6
|
+
import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
|
|
7
|
+
//#region src/models/scheduled-task-item.ts
|
|
8
|
+
var F = /* @__PURE__ */ function(e) {
|
|
9
|
+
return e.Shared = "shared", e.MyTasks = "myTasks", e;
|
|
10
|
+
}({}), I = /* @__PURE__ */ function(e) {
|
|
11
|
+
return e.FirstToRun = "firstToRun", e.LastToRun = "lastToRun", e.Newest = "newest", e.NameAZ = "nameAZ", e;
|
|
12
|
+
}({}), L = (e, t) => {
|
|
13
|
+
let n = t.trim().toLowerCase();
|
|
14
|
+
return n ? e.filter((e) => e.displayName.toLowerCase().includes(n) || e.descriptionPreview?.toLowerCase().includes(n)) : e;
|
|
15
|
+
}, R = (e, t, n) => e == null && t == null ? 0 : e == null ? 1 : t == null ? -1 : n * (new Date(e).getTime() - new Date(t).getTime()), z = (e, t) => {
|
|
16
|
+
let n = [...e];
|
|
17
|
+
switch (t) {
|
|
18
|
+
case I.FirstToRun: return n.sort((e, t) => R(e.sortValues.nextRunAt, t.sortValues.nextRunAt, 1));
|
|
19
|
+
case I.LastToRun: return n.sort((e, t) => R(e.sortValues.nextRunAt, t.sortValues.nextRunAt, -1));
|
|
20
|
+
case I.Newest: return n.sort((e, t) => R(e.sortValues.createdAt, t.sortValues.createdAt, -1));
|
|
21
|
+
case I.NameAZ: return n.sort((e, t) => e.displayName.localeCompare(t.displayName));
|
|
22
|
+
default: return n;
|
|
23
|
+
}
|
|
24
|
+
}, B = {
|
|
25
|
+
title: "_title_11p38_1",
|
|
26
|
+
description: "_description_11p38_5",
|
|
27
|
+
schedulePill: "_schedulePill_11p38_9",
|
|
28
|
+
scheduleLabel: "_scheduleLabel_11p38_14",
|
|
29
|
+
locationLabel: "_locationLabel_11p38_18",
|
|
30
|
+
locationLeaf: "_locationLeaf_11p38_22",
|
|
31
|
+
newBadge: "_newBadge_11p38_26"
|
|
32
|
+
}, V = ({ item: e, searchQuery: r = "", onEdit: i, onRunNow: a, onDelete: o, labels: s, styles: c, className: l }) => {
|
|
33
|
+
let m = s?.newBadgeLabel ?? "NEW", h = s?.actionsLabel ?? "More actions", v = s?.editActionLabel ?? "Edit", y = s?.runNowActionLabel ?? "Run now", b = s?.deleteActionLabel ?? "Delete", { colors: x, typography: S } = c ?? {}, C = S?.titleClassName ?? "dial-body-semi-text", D = S?.descriptionClassName ?? "dial-small-text", k = S?.scheduleLabelClassName ?? "dial-tiny-text", A = S?.locationLabelClassName ?? "dial-tiny-text", j = S?.locationLeafClassName ?? "dial-tiny-semi-text", M = S?.newBadgeClassName ?? "dial-tiny-semi-text", F = t({
|
|
34
|
+
"--stc-title-text": x?.titleText,
|
|
35
|
+
"--stc-desc-text": x?.descriptionText,
|
|
36
|
+
"--stc-pill-bg": x?.schedulePillBackground,
|
|
37
|
+
"--stc-pill-border": x?.schedulePillBorder,
|
|
38
|
+
"--stc-schedule-label-text": x?.scheduleLabelText,
|
|
39
|
+
"--stc-location-label-text": x?.locationLabelText,
|
|
40
|
+
"--stc-location-leaf-text": x?.locationLeafText,
|
|
41
|
+
"--stc-new-badge-bg": x?.newBadgeBackground,
|
|
42
|
+
"--stc-new-badge-text": x?.newBadgeText
|
|
43
|
+
}), I = [];
|
|
44
|
+
return i && I.push({
|
|
45
|
+
key: "edit",
|
|
46
|
+
label: v,
|
|
47
|
+
icon: /* @__PURE__ */ N(T, {
|
|
48
|
+
size: d.SM,
|
|
49
|
+
"aria-hidden": !0
|
|
50
|
+
}),
|
|
51
|
+
onClick: () => i(e.id)
|
|
52
|
+
}), a && I.push({
|
|
53
|
+
key: "runNow",
|
|
54
|
+
label: y,
|
|
55
|
+
icon: /* @__PURE__ */ N(E, {
|
|
56
|
+
size: d.SM,
|
|
57
|
+
"aria-hidden": !0
|
|
58
|
+
}),
|
|
59
|
+
onClick: () => a(e.id)
|
|
60
|
+
}), o && I.push({
|
|
61
|
+
key: "delete",
|
|
62
|
+
label: b,
|
|
63
|
+
icon: /* @__PURE__ */ N(O, {
|
|
64
|
+
size: d.SM,
|
|
65
|
+
"aria-hidden": !0
|
|
66
|
+
}),
|
|
67
|
+
danger: !0,
|
|
68
|
+
onClick: () => o(e.id)
|
|
69
|
+
}), /* @__PURE__ */ P(u, {
|
|
70
|
+
role: "group",
|
|
71
|
+
"aria-label": e.displayName,
|
|
72
|
+
style: F,
|
|
73
|
+
className: n("h-[232px]", l),
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ P("div", {
|
|
76
|
+
className: "flex shrink-0 items-start justify-between gap-2",
|
|
77
|
+
children: [/* @__PURE__ */ P("div", {
|
|
78
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
79
|
+
children: [/* @__PURE__ */ N(_, {
|
|
80
|
+
text: e.displayName,
|
|
81
|
+
query: r,
|
|
82
|
+
maxLines: 1,
|
|
83
|
+
className: n(C, B.title)
|
|
84
|
+
}), e.isNew && /* @__PURE__ */ N("span", {
|
|
85
|
+
className: n("shrink-0 rounded-full px-2 py-0.5", M, B.newBadge),
|
|
86
|
+
children: m
|
|
87
|
+
})]
|
|
88
|
+
}), I.length > 0 && /* @__PURE__ */ N(f, {
|
|
89
|
+
items: I,
|
|
90
|
+
matchReferenceWidth: !1,
|
|
91
|
+
placement: "bottom-end",
|
|
92
|
+
children: /* @__PURE__ */ N(p, {
|
|
93
|
+
icon: /* @__PURE__ */ N(w, {
|
|
94
|
+
size: d.SM,
|
|
95
|
+
"aria-hidden": !0
|
|
96
|
+
}),
|
|
97
|
+
"aria-label": h,
|
|
98
|
+
className: "shrink-0"
|
|
99
|
+
})
|
|
100
|
+
})]
|
|
101
|
+
}),
|
|
102
|
+
e.descriptionPreview && /* @__PURE__ */ N("p", {
|
|
103
|
+
className: n("line-clamp-4 min-h-0 flex-1 overflow-hidden !leading-[22px]", D, B.description),
|
|
104
|
+
children: e.descriptionPreview
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ P("div", {
|
|
107
|
+
className: "mt-auto flex shrink-0 flex-col gap-3",
|
|
108
|
+
children: [/* @__PURE__ */ N("div", {
|
|
109
|
+
className: "flex min-h-[28px] items-center",
|
|
110
|
+
children: /* @__PURE__ */ N("span", {
|
|
111
|
+
className: n("inline-block rounded-lg border px-2 py-1", B.schedulePill, k, B.scheduleLabel),
|
|
112
|
+
children: e.scheduleLabel
|
|
113
|
+
})
|
|
114
|
+
}), e.locationSegments && e.locationSegments.length > 0 && /* @__PURE__ */ N(g, {
|
|
115
|
+
segments: e.locationSegments,
|
|
116
|
+
labelClassName: n(A, B.locationLabel),
|
|
117
|
+
leafClassName: n(j, B.locationLeaf),
|
|
118
|
+
className: "border-t border-tertiary pt-3"
|
|
119
|
+
})]
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
});
|
|
123
|
+
}, H = ({ items: e, searchQuery: t, onEdit: n, onRunNow: r, onDelete: i, labels: a, cardStyles: o }) => /* @__PURE__ */ N("div", {
|
|
124
|
+
className: "grid grid-cols-1 gap-5 desktop:grid-cols-3",
|
|
125
|
+
children: e.map((e) => /* @__PURE__ */ N(V, {
|
|
126
|
+
item: e,
|
|
127
|
+
searchQuery: t,
|
|
128
|
+
onEdit: n,
|
|
129
|
+
onRunNow: r,
|
|
130
|
+
onDelete: i,
|
|
131
|
+
labels: a,
|
|
132
|
+
styles: o
|
|
133
|
+
}, e.id))
|
|
134
|
+
}), U = { countBadge: "_countBadge_2z537_1" }, W = ({ title: e, count: r, children: i, styles: a }) => {
|
|
135
|
+
let o = a?.typography?.titleClassName ?? "dial-small-semi-text", s = a?.typography?.countBadgeClassName ?? "dial-tiny-text", c = t({
|
|
136
|
+
"--sts-badge-bg": a?.colors?.countBadgeBackground,
|
|
137
|
+
"--sts-badge-text": a?.colors?.countBadgeText
|
|
138
|
+
});
|
|
139
|
+
return /* @__PURE__ */ P("section", {
|
|
140
|
+
...e ? { "aria-label": e } : {},
|
|
141
|
+
style: c,
|
|
142
|
+
className: "flex flex-col gap-3",
|
|
143
|
+
children: [e && /* @__PURE__ */ P("div", {
|
|
144
|
+
className: "flex items-center gap-2",
|
|
145
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
146
|
+
className: o,
|
|
147
|
+
children: e
|
|
148
|
+
}), /* @__PURE__ */ N("span", {
|
|
149
|
+
className: n("rounded-full px-2 py-0.5", s, U.countBadge),
|
|
150
|
+
children: r
|
|
151
|
+
})]
|
|
152
|
+
}), i]
|
|
153
|
+
});
|
|
154
|
+
}, G = {
|
|
155
|
+
container: "_container_7rg40_1",
|
|
156
|
+
subtitle: "_subtitle_7rg40_5",
|
|
157
|
+
sortButton: "_sortButton_7rg40_9"
|
|
158
|
+
}, K = [F.Shared, F.MyTasks], q = (e, t, n, r, i) => {
|
|
159
|
+
if (!e) return t ? i.errorLabel : n === 0 ? i.emptyStateLabel : r === 0 ? i.noResultsLabel : `${r}`;
|
|
160
|
+
}, J = ({ labels: i, onCreateClick: a, searchQuery: o, onSearchQueryChange: l, sortKey: u, onSortChange: p, items: m, isLoading: g = !1, error: _, onRetry: v, onEdit: y, onRunNow: w, onDelete: T, styles: E }) => {
|
|
161
|
+
let { colors: O, typography: k, emptyStateIconSize: A = 48 } = E ?? {}, M = k?.titleClassName ?? "dial-h1-text", I = k?.subtitleClassName ?? "dial-body-text", R = t({
|
|
162
|
+
"--st-bg": O?.background,
|
|
163
|
+
"--st-subtitle-text": O?.subtitleText,
|
|
164
|
+
"--st-sort-text": O?.sortButtonText
|
|
165
|
+
}), B = i.sortOptions.find((e) => e.key === u)?.label ?? "", V = j(() => z(L(m, o), u), [
|
|
166
|
+
m,
|
|
167
|
+
o,
|
|
168
|
+
u
|
|
169
|
+
]), U = j(() => {
|
|
170
|
+
let e = { [F.Shared]: i.sharedSectionTitle };
|
|
171
|
+
return K.map((t) => ({
|
|
172
|
+
key: t,
|
|
173
|
+
title: e[t],
|
|
174
|
+
items: V.filter((e) => e.sectionKey === t)
|
|
175
|
+
})).filter((e) => e.items.length > 0);
|
|
176
|
+
}, [V, i.sharedSectionTitle]), J = q(g, !!_, m.length, V.length, i), Y = () => g ? /* @__PURE__ */ N(h, {}) : _ ? /* @__PURE__ */ P("div", {
|
|
177
|
+
className: "flex flex-col items-center gap-3",
|
|
178
|
+
children: [/* @__PURE__ */ N("p", {
|
|
179
|
+
className: n(I, G.subtitle),
|
|
180
|
+
children: i.errorLabel
|
|
181
|
+
}), /* @__PURE__ */ N(r, {
|
|
182
|
+
label: i.retryLabel,
|
|
183
|
+
onClick: v
|
|
184
|
+
})]
|
|
185
|
+
}) : m.length === 0 ? /* @__PURE__ */ N(e, {
|
|
186
|
+
icon: /* @__PURE__ */ N(x, {
|
|
187
|
+
"aria-hidden": !0,
|
|
188
|
+
size: A,
|
|
189
|
+
stroke: 1
|
|
190
|
+
}),
|
|
191
|
+
label: i.emptyStateLabel
|
|
192
|
+
}) : V.length === 0 ? /* @__PURE__ */ N("p", {
|
|
193
|
+
className: n(I, G.subtitle),
|
|
194
|
+
children: i.noResultsLabel
|
|
195
|
+
}) : /* @__PURE__ */ N("div", {
|
|
196
|
+
className: "flex w-full flex-col gap-6",
|
|
197
|
+
children: U.map((e) => /* @__PURE__ */ N(W, {
|
|
198
|
+
title: e.title,
|
|
199
|
+
count: e.items.length,
|
|
200
|
+
children: /* @__PURE__ */ N(H, {
|
|
201
|
+
items: e.items,
|
|
202
|
+
searchQuery: o,
|
|
203
|
+
onEdit: y,
|
|
204
|
+
onRunNow: w,
|
|
205
|
+
onDelete: T,
|
|
206
|
+
labels: i.cardLabels
|
|
207
|
+
})
|
|
208
|
+
}, e.key))
|
|
209
|
+
}), X = g || !!_ || m.length === 0 || V.length === 0;
|
|
210
|
+
return /* @__PURE__ */ P("div", {
|
|
211
|
+
style: R,
|
|
212
|
+
className: n("flex h-full w-full flex-col gap-6 overflow-y-auto px-8 py-4", G.container),
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ P("div", {
|
|
215
|
+
className: "flex items-start justify-between gap-4",
|
|
216
|
+
children: [/* @__PURE__ */ P("div", {
|
|
217
|
+
className: "min-w-0 gap-2",
|
|
218
|
+
children: [/* @__PURE__ */ N("h1", {
|
|
219
|
+
className: n("truncate", M),
|
|
220
|
+
children: i.title
|
|
221
|
+
}), /* @__PURE__ */ N("p", {
|
|
222
|
+
className: n("mt-1", I, G.subtitle),
|
|
223
|
+
children: i.subtitle
|
|
224
|
+
})]
|
|
225
|
+
}), /* @__PURE__ */ N(s, {
|
|
226
|
+
label: i.createButtonLabel,
|
|
227
|
+
iconBefore: /* @__PURE__ */ N(D, {
|
|
228
|
+
size: d.SM,
|
|
229
|
+
"aria-hidden": !0
|
|
230
|
+
}),
|
|
231
|
+
onClick: a,
|
|
232
|
+
className: "shrink-0"
|
|
233
|
+
})]
|
|
234
|
+
}),
|
|
235
|
+
/* @__PURE__ */ P("div", {
|
|
236
|
+
className: "flex flex-wrap items-center gap-3",
|
|
237
|
+
children: [/* @__PURE__ */ N("div", {
|
|
238
|
+
className: "flex-1",
|
|
239
|
+
children: /* @__PURE__ */ N(c, {
|
|
240
|
+
value: o,
|
|
241
|
+
onChange: l,
|
|
242
|
+
labels: {
|
|
243
|
+
placeholder: i.searchPlaceholder,
|
|
244
|
+
ariaLabel: i.searchAriaLabel,
|
|
245
|
+
clearLabel: i.clearSearchLabel
|
|
246
|
+
},
|
|
247
|
+
iconSize: 18,
|
|
248
|
+
iconStrokeWidth: 1.8,
|
|
249
|
+
styles: {
|
|
250
|
+
containerClassName: "h-[50px] w-full rounded-xl px-[18px]",
|
|
251
|
+
inputClassName: "text-[15px]",
|
|
252
|
+
clearButtonClassName: "size-11 desktop:size-auto"
|
|
253
|
+
}
|
|
254
|
+
})
|
|
255
|
+
}), i.sortOptions.length > 0 && /* @__PURE__ */ N(f, {
|
|
256
|
+
matchReferenceWidth: !1,
|
|
257
|
+
placement: "bottom-end",
|
|
258
|
+
listClassName: "cp-dropdown-overlay",
|
|
259
|
+
items: i.sortOptions.map((e) => ({
|
|
260
|
+
key: e.key,
|
|
261
|
+
label: /* @__PURE__ */ P("span", {
|
|
262
|
+
className: "flex w-full items-center justify-between gap-2",
|
|
263
|
+
children: [e.label, e.key === u && /* @__PURE__ */ N(S, {
|
|
264
|
+
size: d.SM,
|
|
265
|
+
"aria-hidden": !0
|
|
266
|
+
})]
|
|
267
|
+
}),
|
|
268
|
+
onClick: () => p(e.key)
|
|
269
|
+
})),
|
|
270
|
+
children: /* @__PURE__ */ N(r, {
|
|
271
|
+
label: B,
|
|
272
|
+
"aria-label": i.sortLabel,
|
|
273
|
+
className: n("rounded-[4px]", G.sortButton),
|
|
274
|
+
iconBefore: /* @__PURE__ */ N(b, {
|
|
275
|
+
size: 20,
|
|
276
|
+
"aria-hidden": !0
|
|
277
|
+
}),
|
|
278
|
+
iconAfter: /* @__PURE__ */ N(C, {
|
|
279
|
+
size: 20,
|
|
280
|
+
"aria-hidden": !0
|
|
281
|
+
})
|
|
282
|
+
})
|
|
283
|
+
})]
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ N("span", {
|
|
286
|
+
role: "status",
|
|
287
|
+
"aria-live": "polite",
|
|
288
|
+
className: "sr-only",
|
|
289
|
+
children: J
|
|
290
|
+
}),
|
|
291
|
+
/* @__PURE__ */ N("div", {
|
|
292
|
+
className: n("mx-auto flex size-full w-full max-w-[1180px] flex-col", X && "items-center justify-center"),
|
|
293
|
+
children: Y()
|
|
294
|
+
})
|
|
295
|
+
]
|
|
296
|
+
});
|
|
297
|
+
}, Y = 500, X = /* @__PURE__ */ function(e) {
|
|
298
|
+
return e.Once = "once", e.Recurring = "recurring", e;
|
|
299
|
+
}({}), Z = /* @__PURE__ */ function(e) {
|
|
300
|
+
return e.Daily = "daily", e.Weekly = "weekly", e.Monthly = "monthly", e;
|
|
301
|
+
}({}), Q = {
|
|
302
|
+
container: "_container_gdwv3_1",
|
|
303
|
+
header: "_header_gdwv3_5",
|
|
304
|
+
detailsColumn: "_detailsColumn_gdwv3_9",
|
|
305
|
+
sectionSubtitle: "_sectionSubtitle_gdwv3_13",
|
|
306
|
+
instructionsError: "_instructionsError_gdwv3_17"
|
|
307
|
+
}, $ = A(async () => ({ default: (await v()).DialMarkdownEditor })), ee = ({ labels: e, values: r, errors: c, modelOptions: u, onFieldChange: f, onBack: p, onCancel: g, onSubmit: _, isSubmitting: v = !1, markdownEditorTheme: b, styles: x }) => {
|
|
308
|
+
let { colors: S, typography: C } = x ?? {}, w = C?.titleClassName ?? "dial-h1-text", T = C?.sectionTitleClassName ?? "dial-body-semi-text", E = C?.sectionSubtitleClassName ?? "dial-tiny-text", D = C?.scheduleSectionLabelClassName ?? "dial-body-semi-text mb-1", O = C?.instructionsErrorClassName ?? "dial-small-text", A = t({
|
|
309
|
+
"--stcf-bg": S?.background,
|
|
310
|
+
"--stcf-header-border": S?.headerBorder,
|
|
311
|
+
"--stcf-details-border": S?.detailsColumnBorder,
|
|
312
|
+
"--stcf-subtitle-text": S?.sectionSubtitleText,
|
|
313
|
+
"--stcf-error-text": S?.instructionsErrorText
|
|
314
|
+
}), j = v || !r.displayName.trim() || !r.modelId || !r.prompt.trim();
|
|
315
|
+
return /* @__PURE__ */ P("div", {
|
|
316
|
+
style: A,
|
|
317
|
+
className: n("flex h-full w-full flex-col overflow-y-auto", Q.container),
|
|
318
|
+
children: [/* @__PURE__ */ P("div", {
|
|
319
|
+
className: n("flex h-16 items-center justify-between gap-6 border-b px-8", Q.header),
|
|
320
|
+
children: [/* @__PURE__ */ P("div", {
|
|
321
|
+
className: "flex min-w-0 flex-1 items-center gap-2",
|
|
322
|
+
children: [/* @__PURE__ */ N(i, {
|
|
323
|
+
icon: /* @__PURE__ */ N(y, {
|
|
324
|
+
size: d.LG,
|
|
325
|
+
className: "rtl:scale-x-[-1]",
|
|
326
|
+
"aria-hidden": !0
|
|
327
|
+
}),
|
|
328
|
+
"aria-label": e.backButtonLabel,
|
|
329
|
+
onClick: p
|
|
330
|
+
}), /* @__PURE__ */ N("h1", {
|
|
331
|
+
className: n("truncate", w),
|
|
332
|
+
children: e.pageTitle
|
|
333
|
+
})]
|
|
334
|
+
}), /* @__PURE__ */ P("div", {
|
|
335
|
+
className: "flex items-center gap-2",
|
|
336
|
+
children: [/* @__PURE__ */ N(o, {
|
|
337
|
+
type: "button",
|
|
338
|
+
label: e.cancelButtonLabel,
|
|
339
|
+
onClick: g,
|
|
340
|
+
disabled: v
|
|
341
|
+
}), /* @__PURE__ */ N(s, {
|
|
342
|
+
type: "button",
|
|
343
|
+
label: e.createButtonLabel,
|
|
344
|
+
onClick: _,
|
|
345
|
+
disabled: j
|
|
346
|
+
})]
|
|
347
|
+
})]
|
|
348
|
+
}), /* @__PURE__ */ P("div", {
|
|
349
|
+
className: "flex flex-1 flex-col desktop:flex-row",
|
|
350
|
+
children: [
|
|
351
|
+
/* @__PURE__ */ P("div", {
|
|
352
|
+
role: "group",
|
|
353
|
+
"aria-label": e.detailsSectionTitle,
|
|
354
|
+
className: n("flex w-full flex-col gap-5 border-e px-8 py-6 desktop:w-[360px] desktop:shrink-0", Q.detailsColumn),
|
|
355
|
+
children: [
|
|
356
|
+
/* @__PURE__ */ P("div", {
|
|
357
|
+
className: "flex flex-col gap-1",
|
|
358
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
359
|
+
className: T,
|
|
360
|
+
children: e.detailsSectionTitle
|
|
361
|
+
}), /* @__PURE__ */ N("p", {
|
|
362
|
+
className: n(E, Q.sectionSubtitle),
|
|
363
|
+
children: e.detailsSectionSubtitle
|
|
364
|
+
})]
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ N(a, {
|
|
367
|
+
id: "scheduled-task-display-name",
|
|
368
|
+
value: r.displayName,
|
|
369
|
+
onChange: (e) => f("displayName", e ?? ""),
|
|
370
|
+
labelProps: {
|
|
371
|
+
label: e.displayNameLabel,
|
|
372
|
+
required: !0
|
|
373
|
+
},
|
|
374
|
+
invalid: !!c.displayName,
|
|
375
|
+
error: c.displayName
|
|
376
|
+
}),
|
|
377
|
+
/* @__PURE__ */ N(l, {
|
|
378
|
+
id: "scheduled-task-description",
|
|
379
|
+
value: r.description ?? "",
|
|
380
|
+
onChange: (e) => f("description", e),
|
|
381
|
+
labelProps: { label: e.descriptionLabel },
|
|
382
|
+
maxLength: 500,
|
|
383
|
+
invalid: !!c.description,
|
|
384
|
+
error: c.description,
|
|
385
|
+
caption: r.description ? `${r.description.length}/500` : void 0
|
|
386
|
+
}),
|
|
387
|
+
/* @__PURE__ */ N(m, {
|
|
388
|
+
label: e.modelOrAgentLabel,
|
|
389
|
+
required: !0,
|
|
390
|
+
value: r.modelId,
|
|
391
|
+
placeholder: e.modelPlaceholder,
|
|
392
|
+
onChange: (e) => f("modelId", e),
|
|
393
|
+
error: c.modelId,
|
|
394
|
+
options: u.map((e) => ({
|
|
395
|
+
value: e.id,
|
|
396
|
+
label: e.label
|
|
397
|
+
}))
|
|
398
|
+
}),
|
|
399
|
+
/* @__PURE__ */ P("fieldset", {
|
|
400
|
+
className: "flex flex-col gap-3",
|
|
401
|
+
children: [
|
|
402
|
+
/* @__PURE__ */ N("legend", {
|
|
403
|
+
className: D,
|
|
404
|
+
children: e.scheduleSectionLabel
|
|
405
|
+
}),
|
|
406
|
+
/* @__PURE__ */ N(m, {
|
|
407
|
+
label: e.scheduleTypeAriaLabel,
|
|
408
|
+
value: r.scheduleType,
|
|
409
|
+
onChange: (e) => f("scheduleType", e),
|
|
410
|
+
options: [{
|
|
411
|
+
value: X.Once,
|
|
412
|
+
label: e.scheduleTypeOnceLabel
|
|
413
|
+
}, {
|
|
414
|
+
value: X.Recurring,
|
|
415
|
+
label: e.scheduleTypeRecurringLabel
|
|
416
|
+
}]
|
|
417
|
+
}),
|
|
418
|
+
r.scheduleType === X.Once && /* @__PURE__ */ N(a, {
|
|
419
|
+
id: "scheduled-task-run-at",
|
|
420
|
+
type: "datetime-local",
|
|
421
|
+
value: r.runAt ?? "",
|
|
422
|
+
onChange: (e) => f("runAt", e ?? ""),
|
|
423
|
+
labelProps: {
|
|
424
|
+
label: e.runAtLabel,
|
|
425
|
+
required: !0
|
|
426
|
+
},
|
|
427
|
+
invalid: !!c.runAt,
|
|
428
|
+
error: c.runAt
|
|
429
|
+
}),
|
|
430
|
+
r.scheduleType === X.Recurring && /* @__PURE__ */ P(M, { children: [
|
|
431
|
+
/* @__PURE__ */ N(m, {
|
|
432
|
+
label: e.frequencyLabel,
|
|
433
|
+
value: r.frequency,
|
|
434
|
+
onChange: (e) => f("frequency", e),
|
|
435
|
+
options: e.frequencyOptions.map((e) => ({
|
|
436
|
+
value: e.key,
|
|
437
|
+
label: e.label
|
|
438
|
+
}))
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ N(a, {
|
|
441
|
+
id: "scheduled-task-time",
|
|
442
|
+
type: "time",
|
|
443
|
+
value: r.time,
|
|
444
|
+
onChange: (e) => f("time", e ?? ""),
|
|
445
|
+
labelProps: {
|
|
446
|
+
label: e.timeLabel,
|
|
447
|
+
required: !0
|
|
448
|
+
},
|
|
449
|
+
invalid: !!c.time,
|
|
450
|
+
error: c.time
|
|
451
|
+
}),
|
|
452
|
+
r.frequency === Z.Weekly && /* @__PURE__ */ N(a, {
|
|
453
|
+
id: "scheduled-task-day-of-week",
|
|
454
|
+
value: r.dayOfWeek ?? "",
|
|
455
|
+
onChange: (e) => f("dayOfWeek", e ?? ""),
|
|
456
|
+
labelProps: {
|
|
457
|
+
label: e.dayOfWeekLabel,
|
|
458
|
+
required: !0
|
|
459
|
+
},
|
|
460
|
+
invalid: !!c.dayOfWeek,
|
|
461
|
+
error: c.dayOfWeek
|
|
462
|
+
}),
|
|
463
|
+
r.frequency === Z.Monthly && /* @__PURE__ */ N(a, {
|
|
464
|
+
id: "scheduled-task-day-of-month",
|
|
465
|
+
value: r.dayOfMonth ?? "",
|
|
466
|
+
onChange: (e) => f("dayOfMonth", e ?? ""),
|
|
467
|
+
labelProps: {
|
|
468
|
+
label: e.dayOfMonthLabel,
|
|
469
|
+
required: !0
|
|
470
|
+
},
|
|
471
|
+
invalid: !!c.dayOfMonth,
|
|
472
|
+
error: c.dayOfMonth
|
|
473
|
+
})
|
|
474
|
+
] })
|
|
475
|
+
]
|
|
476
|
+
})
|
|
477
|
+
]
|
|
478
|
+
}),
|
|
479
|
+
/* @__PURE__ */ P("div", {
|
|
480
|
+
role: "group",
|
|
481
|
+
"aria-label": e.configurationSectionTitle,
|
|
482
|
+
className: "flex w-full min-w-0 flex-1 flex-col gap-5 px-8 py-6",
|
|
483
|
+
children: [/* @__PURE__ */ P("div", {
|
|
484
|
+
className: "flex flex-col gap-1",
|
|
485
|
+
children: [/* @__PURE__ */ N("h2", {
|
|
486
|
+
className: T,
|
|
487
|
+
children: e.configurationSectionTitle
|
|
488
|
+
}), /* @__PURE__ */ N("p", {
|
|
489
|
+
className: n(E, Q.sectionSubtitle),
|
|
490
|
+
children: e.configurationSectionSubtitle
|
|
491
|
+
})]
|
|
492
|
+
}), /* @__PURE__ */ P("div", {
|
|
493
|
+
role: "group",
|
|
494
|
+
"aria-label": e.instructionsLabel,
|
|
495
|
+
className: "flex flex-1 flex-col gap-1",
|
|
496
|
+
children: [
|
|
497
|
+
/* @__PURE__ */ N("span", {
|
|
498
|
+
className: D,
|
|
499
|
+
children: e.instructionsLabel
|
|
500
|
+
}),
|
|
501
|
+
/* @__PURE__ */ N(k, {
|
|
502
|
+
fallback: /* @__PURE__ */ N(h, {}),
|
|
503
|
+
children: /* @__PURE__ */ N($, {
|
|
504
|
+
value: r.prompt,
|
|
505
|
+
onChange: (e) => f("prompt", e),
|
|
506
|
+
height: 480,
|
|
507
|
+
theme: b
|
|
508
|
+
})
|
|
509
|
+
}),
|
|
510
|
+
c.prompt && /* @__PURE__ */ N("p", {
|
|
511
|
+
className: n(O, Q.instructionsError),
|
|
512
|
+
children: c.prompt
|
|
513
|
+
})
|
|
514
|
+
]
|
|
515
|
+
})]
|
|
516
|
+
}),
|
|
517
|
+
/* @__PURE__ */ N("div", {
|
|
518
|
+
"aria-hidden": !0,
|
|
519
|
+
className: "hidden desktop:block desktop:w-[360px] desktop:shrink-0"
|
|
520
|
+
})
|
|
521
|
+
]
|
|
522
|
+
})]
|
|
523
|
+
});
|
|
524
|
+
};
|
|
525
|
+
//#endregion
|
|
526
|
+
export { Y as DESCRIPTION_MAX_LENGTH, V as ScheduledTaskCard, H as ScheduledTaskCardGrid, ee as ScheduledTaskCreateForm, Z as ScheduledTaskFrequency, X as ScheduledTaskScheduleType, W as ScheduledTaskSection, F as ScheduledTaskSectionKey, J as ScheduledTasks, I as ScheduledTasksSortKey, L as filterScheduledTaskItems, z as sortScheduledTaskItems };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ScheduledTaskCardStyles } from './scheduled-task-card-props';
|
|
2
|
+
import { ScheduledTaskItem } from './scheduled-task-item';
|
|
3
|
+
/** Localized labels for the {@link ScheduledTaskCardGrid} component's cards. All have English defaults. */
|
|
4
|
+
export interface ScheduledTaskCardGridLabels {
|
|
5
|
+
/** Label shown in a card's "new" badge. Defaults to `'NEW'`. */
|
|
6
|
+
newBadgeLabel?: string;
|
|
7
|
+
/** Accessible label for a card's overflow-menu trigger. Defaults to `'More actions'`. */
|
|
8
|
+
actionsLabel?: string;
|
|
9
|
+
/** Label for the "Edit" card menu action. Defaults to `'Edit'`. */
|
|
10
|
+
editActionLabel?: string;
|
|
11
|
+
/** Label for the "Run now" card menu action. Defaults to `'Run now'`. */
|
|
12
|
+
runNowActionLabel?: string;
|
|
13
|
+
/** Label for the "Delete" card menu action. Defaults to `'Delete'`. */
|
|
14
|
+
deleteActionLabel?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Props for the {@link ScheduledTaskCardGrid} component. */
|
|
17
|
+
export interface ScheduledTaskCardGridProps {
|
|
18
|
+
/** Items to render as cards, in display order. */
|
|
19
|
+
items: ScheduledTaskItem[];
|
|
20
|
+
/** Current search query — forwarded to each card to highlight the matching title substring. */
|
|
21
|
+
searchQuery?: string;
|
|
22
|
+
/** Called with a task id when the user activates "Edit" on a card. Omit to hide the action on every card. */
|
|
23
|
+
onEdit?: (id: string) => void;
|
|
24
|
+
/** Called with a task id when the user activates "Run now" on a card. Omit to hide the action on every card. */
|
|
25
|
+
onRunNow?: (id: string) => void;
|
|
26
|
+
/** Called with a task id when the user activates "Delete" on a card. Omit to hide the action on every card. */
|
|
27
|
+
onDelete?: (id: string) => void;
|
|
28
|
+
/** Localized labels forwarded to each card. */
|
|
29
|
+
labels?: ScheduledTaskCardGridLabels;
|
|
30
|
+
/** Style overrides forwarded to each card. */
|
|
31
|
+
cardStyles?: ScheduledTaskCardStyles;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=scheduled-task-card-grid-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-card-grid-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-card-grid-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,2GAA2G;AAC3G,MAAM,WAAW,2BAA2B;IAC1C,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yFAAyF;IACzF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yEAAyE;IACzE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,6DAA6D;AAC7D,MAAM,WAAW,0BAA0B;IACzC,kDAAkD;IAClD,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,+FAA+F;IAC/F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6GAA6G;IAC7G,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,gHAAgH;IAChH,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,2BAA2B,CAAC;IACrC,8CAA8C;IAC9C,UAAU,CAAC,EAAE,uBAAuB,CAAC;CACtC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ScheduledTaskItem } from './scheduled-task-item';
|
|
2
|
+
/** Localized labels used by the {@link ScheduledTaskCard} component. All have English defaults. */
|
|
3
|
+
export interface ScheduledTaskCardLabels {
|
|
4
|
+
/** Label shown in the "new" badge when `item.isNew` is set. Defaults to `'NEW'`. */
|
|
5
|
+
newBadgeLabel?: string;
|
|
6
|
+
/** Accessible label for the overflow-menu trigger button. Defaults to `'More actions'`. */
|
|
7
|
+
actionsLabel?: string;
|
|
8
|
+
/** Label for the "Edit" menu action, shown only when `onEdit` is supplied. Defaults to `'Edit'`. */
|
|
9
|
+
editActionLabel?: string;
|
|
10
|
+
/** Label for the "Run now" menu action, shown only when `onRunNow` is supplied. Defaults to `'Run now'`. */
|
|
11
|
+
runNowActionLabel?: string;
|
|
12
|
+
/** Label for the "Delete" menu action, shown only when `onDelete` is supplied. Defaults to `'Delete'`. */
|
|
13
|
+
deleteActionLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Color overrides for the {@link ScheduledTaskCard} component, applied as CSS
|
|
17
|
+
* custom properties with app theme fallbacks.
|
|
18
|
+
*/
|
|
19
|
+
export interface ScheduledTaskCardColors {
|
|
20
|
+
/** Card title text color. Fallback: `--text-primary`. */
|
|
21
|
+
titleText?: string;
|
|
22
|
+
/** Description/prompt-preview text color. Fallback: `--text-control-disable`. */
|
|
23
|
+
descriptionText?: string;
|
|
24
|
+
/** Schedule pill background. Fallback: `--bg-layer-2`. */
|
|
25
|
+
schedulePillBackground?: string;
|
|
26
|
+
/** Schedule pill border color. Fallback: `--stroke-tertiary`. */
|
|
27
|
+
schedulePillBorder?: string;
|
|
28
|
+
/** Schedule pill label text color. Fallback: `--text-control-disable`. */
|
|
29
|
+
scheduleLabelText?: string;
|
|
30
|
+
/** Non-leaf location breadcrumb segment text color. Fallback: `--text-secondary`. */
|
|
31
|
+
locationLabelText?: string;
|
|
32
|
+
/** Leaf (last) location breadcrumb segment text color. Fallback: `--text-secondary`. */
|
|
33
|
+
locationLeafText?: string;
|
|
34
|
+
/** "New" badge background. Fallback: `--controls-bg-accent-primary`. */
|
|
35
|
+
newBadgeBackground?: string;
|
|
36
|
+
/** "New" badge text color. Fallback: `--controls-text-permanent`. */
|
|
37
|
+
newBadgeText?: string;
|
|
38
|
+
}
|
|
39
|
+
/** Typography overrides for the {@link ScheduledTaskCard} component. */
|
|
40
|
+
export interface ScheduledTaskCardTypography {
|
|
41
|
+
/** CSS class applied to the card's title. Defaults to `'dial-body-semi-text'`. */
|
|
42
|
+
titleClassName?: string;
|
|
43
|
+
/** CSS class applied to the description/prompt-preview line. Defaults to `'dial-small-text'`. */
|
|
44
|
+
descriptionClassName?: string;
|
|
45
|
+
/** CSS class applied to the schedule pill's label text. Defaults to `'dial-tiny-text'`. */
|
|
46
|
+
scheduleLabelClassName?: string;
|
|
47
|
+
/** CSS class applied to non-leaf location breadcrumb segments. Defaults to `'dial-tiny-text'`. */
|
|
48
|
+
locationLabelClassName?: string;
|
|
49
|
+
/** CSS class applied to the leaf (last) location breadcrumb segment. Defaults to `'dial-tiny-semi-text'`. */
|
|
50
|
+
locationLeafClassName?: string;
|
|
51
|
+
/** CSS class applied to the "new" badge text. Defaults to `'dial-tiny-semi-text'`. */
|
|
52
|
+
newBadgeClassName?: string;
|
|
53
|
+
}
|
|
54
|
+
/** Style overrides for the {@link ScheduledTaskCard} component. */
|
|
55
|
+
export interface ScheduledTaskCardStyles {
|
|
56
|
+
/** Color overrides applied as CSS custom properties. */
|
|
57
|
+
colors?: ScheduledTaskCardColors;
|
|
58
|
+
/** Typography class overrides. */
|
|
59
|
+
typography?: ScheduledTaskCardTypography;
|
|
60
|
+
}
|
|
61
|
+
/** Props for the {@link ScheduledTaskCard} component. */
|
|
62
|
+
export interface ScheduledTaskCardProps {
|
|
63
|
+
/** The scheduled task to render. */
|
|
64
|
+
item: ScheduledTaskItem;
|
|
65
|
+
/** Current search query — the matching substring of `item.displayName` is highlighted. */
|
|
66
|
+
searchQuery?: string;
|
|
67
|
+
/** Called with the task id when the user activates "Edit". Omit to hide the action. */
|
|
68
|
+
onEdit?: (id: string) => void;
|
|
69
|
+
/** Called with the task id when the user activates "Run now". Omit to hide the action. */
|
|
70
|
+
onRunNow?: (id: string) => void;
|
|
71
|
+
/** Called with the task id when the user activates "Delete". Omit to hide the action. */
|
|
72
|
+
onDelete?: (id: string) => void;
|
|
73
|
+
/** Localized labels. */
|
|
74
|
+
labels?: ScheduledTaskCardLabels;
|
|
75
|
+
/** Style overrides. */
|
|
76
|
+
styles?: ScheduledTaskCardStyles;
|
|
77
|
+
/** Additional CSS class applied to the card root. */
|
|
78
|
+
className?: string;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=scheduled-task-card-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-card-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-card-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,mGAAmG;AACnG,MAAM,WAAW,uBAAuB;IACtC,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oGAAoG;IACpG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,4GAA4G;IAC5G,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0GAA0G;IAC1G,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,iEAAiE;IACjE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,M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AuB,CAAC;IACjC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { ScheduledTaskFrequency, ScheduledTaskScheduleType } from '../types/scheduled-task-schedule';
|
|
2
|
+
/** A single option rendered in the frequency dropdown. */
|
|
3
|
+
export interface ScheduledTaskFrequencyOption {
|
|
4
|
+
/** Stable identifier for this option, passed back via `onFieldChange('frequency', key)`. */
|
|
5
|
+
key: ScheduledTaskFrequency;
|
|
6
|
+
/** Localized display label for this frequency option. */
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
/** A single model option rendered in the model dropdown. */
|
|
10
|
+
export interface ScheduledTaskCreateFormModelOption {
|
|
11
|
+
/** Deployment id sent to the BFF as `model`. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Localized display label shown in the dropdown. */
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
/** Current form field values for the {@link ScheduledTaskCreateForm} component. */
|
|
17
|
+
export interface ScheduledTaskCreateFormValues {
|
|
18
|
+
/** The scheduled task's display name (required). */
|
|
19
|
+
displayName: string;
|
|
20
|
+
/** Whether the task runs once or repeats. */
|
|
21
|
+
scheduleType: ScheduledTaskScheduleType;
|
|
22
|
+
/** Local datetime-local input value used when `scheduleType` is `'once'`. */
|
|
23
|
+
runAt?: string;
|
|
24
|
+
/** Recurrence cadence used when `scheduleType` is `'recurring'`. */
|
|
25
|
+
frequency?: ScheduledTaskFrequency;
|
|
26
|
+
/** `HH:mm` time-of-day used when `scheduleType` is `'recurring'`. */
|
|
27
|
+
time: string;
|
|
28
|
+
/** Day of week (`'0'`-`'6'`) used when `frequency` is `'weekly'`. */
|
|
29
|
+
dayOfWeek?: string;
|
|
30
|
+
/** Day of month (`'1'`-`'31'`) used when `frequency` is `'monthly'`. */
|
|
31
|
+
dayOfMonth?: string;
|
|
32
|
+
/** Selected deployment id sent to the BFF as `model` (required). */
|
|
33
|
+
modelId: string;
|
|
34
|
+
/** Optional human-readable summary sent to the BFF as `description` (max 500 characters). */
|
|
35
|
+
description?: string;
|
|
36
|
+
/** Prompt text sent to the BFF as `prompt` (required). */
|
|
37
|
+
prompt: string;
|
|
38
|
+
/** Whether the scheduled chat completion streams its response. */
|
|
39
|
+
stream: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Validation error messages keyed by {@link ScheduledTaskCreateFormValues} field. */
|
|
42
|
+
export interface ScheduledTaskCreateFormErrors {
|
|
43
|
+
/** Error shown under the display name field. */
|
|
44
|
+
displayName?: string;
|
|
45
|
+
/** Error shown under the run-at field. */
|
|
46
|
+
runAt?: string;
|
|
47
|
+
/** Error shown under the time field. */
|
|
48
|
+
time?: string;
|
|
49
|
+
/** Error shown under the day-of-week field. */
|
|
50
|
+
dayOfWeek?: string;
|
|
51
|
+
/** Error shown under the day-of-month field. */
|
|
52
|
+
dayOfMonth?: string;
|
|
53
|
+
/** Error shown under the model field. */
|
|
54
|
+
modelId?: string;
|
|
55
|
+
/** Error shown under the description field. */
|
|
56
|
+
description?: string;
|
|
57
|
+
/** Error shown under the prompt field. */
|
|
58
|
+
prompt?: string;
|
|
59
|
+
}
|
|
60
|
+
/** Localized labels used by the {@link ScheduledTaskCreateForm} component. */
|
|
61
|
+
export interface ScheduledTaskCreateFormLabels {
|
|
62
|
+
/** Page/header title, e.g. "New task". */
|
|
63
|
+
pageTitle: string;
|
|
64
|
+
/** Accessible label for the header's back control. */
|
|
65
|
+
backButtonLabel: string;
|
|
66
|
+
/** Section heading for the Details column. */
|
|
67
|
+
detailsSectionTitle: string;
|
|
68
|
+
/** Section subtitle for the Details column. */
|
|
69
|
+
detailsSectionSubtitle: string;
|
|
70
|
+
/** Section heading for the Configuration column. */
|
|
71
|
+
configurationSectionTitle: string;
|
|
72
|
+
/** Section subtitle for the Configuration column. */
|
|
73
|
+
configurationSectionSubtitle: string;
|
|
74
|
+
/** Display name field label. */
|
|
75
|
+
displayNameLabel: string;
|
|
76
|
+
/** Display name required-field validation message. */
|
|
77
|
+
displayNameRequired: string;
|
|
78
|
+
/** Label for the schedule section. */
|
|
79
|
+
scheduleSectionLabel: string;
|
|
80
|
+
/** Label for the "once" schedule type option. */
|
|
81
|
+
scheduleTypeOnceLabel: string;
|
|
82
|
+
/** Label for the "recurring" schedule type option. */
|
|
83
|
+
scheduleTypeRecurringLabel: string;
|
|
84
|
+
/** Accessible label for the schedule type control. */
|
|
85
|
+
scheduleTypeAriaLabel: string;
|
|
86
|
+
/** Run-at field label (shown when schedule type is "once"). */
|
|
87
|
+
runAtLabel: string;
|
|
88
|
+
/** Accessible label for the frequency dropdown. */
|
|
89
|
+
frequencyLabel: string;
|
|
90
|
+
/** Options rendered in the frequency dropdown. */
|
|
91
|
+
frequencyOptions: ScheduledTaskFrequencyOption[];
|
|
92
|
+
/** Time field label (shown when schedule type is "recurring"). */
|
|
93
|
+
timeLabel: string;
|
|
94
|
+
/** Day-of-week field label (shown when frequency is "weekly"). */
|
|
95
|
+
dayOfWeekLabel: string;
|
|
96
|
+
/** Day-of-month field label (shown when frequency is "monthly"). */
|
|
97
|
+
dayOfMonthLabel: string;
|
|
98
|
+
/** Accessible label for the model dropdown. */
|
|
99
|
+
modelOrAgentLabel: string;
|
|
100
|
+
/** Placeholder shown in the model dropdown trigger when no model is selected. */
|
|
101
|
+
modelPlaceholder: string;
|
|
102
|
+
/** Description textarea label. */
|
|
103
|
+
descriptionLabel: string;
|
|
104
|
+
/** Accessible label for the Instructions markdown editor. */
|
|
105
|
+
instructionsLabel: string;
|
|
106
|
+
/** Label for the Cancel action. */
|
|
107
|
+
cancelButtonLabel: string;
|
|
108
|
+
/** Label for the Save action (submits the create form). */
|
|
109
|
+
createButtonLabel: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Color overrides for the {@link ScheduledTaskCreateForm} component, applied
|
|
113
|
+
* as CSS custom properties with app theme fallbacks.
|
|
114
|
+
*/
|
|
115
|
+
export interface ScheduledTaskCreateFormColors {
|
|
116
|
+
/** Root container background. Fallback: `--bg-layer-5`. */
|
|
117
|
+
background?: string;
|
|
118
|
+
/** Header row's bottom border color. Fallback: `--stroke-tertiary`. */
|
|
119
|
+
headerBorder?: string;
|
|
120
|
+
/** Details column's end-edge divider color. Fallback: `--stroke-tertiary`. */
|
|
121
|
+
detailsColumnBorder?: string;
|
|
122
|
+
/** Section subtitle text color. Fallback: `--text-secondary`. */
|
|
123
|
+
sectionSubtitleText?: string;
|
|
124
|
+
/** Instructions editor's validation error text color. Fallback: `--text-error`. */
|
|
125
|
+
instructionsErrorText?: string;
|
|
126
|
+
}
|
|
127
|
+
/** Typography overrides for the {@link ScheduledTaskCreateForm} component. */
|
|
128
|
+
export interface ScheduledTaskCreateFormTypography {
|
|
129
|
+
/** CSS class applied to the title. Defaults to `'dial-h1-text'`. */
|
|
130
|
+
titleClassName?: string;
|
|
131
|
+
/** CSS class applied to a section heading. Defaults to `'dial-body-semi-text'`. */
|
|
132
|
+
sectionTitleClassName?: string;
|
|
133
|
+
/** CSS class applied to a section subtitle. Defaults to `'dial-tiny-text'`. */
|
|
134
|
+
sectionSubtitleClassName?: string;
|
|
135
|
+
/** CSS class applied to the schedule section's legend and the Instructions label. Defaults to `'dial-body-semi-text mb-1'`. */
|
|
136
|
+
scheduleSectionLabelClassName?: string;
|
|
137
|
+
/** CSS class applied to the Instructions editor's validation error text. Defaults to `'dial-small-text'`. */
|
|
138
|
+
instructionsErrorClassName?: string;
|
|
139
|
+
}
|
|
140
|
+
/** Style overrides for the {@link ScheduledTaskCreateForm} component. */
|
|
141
|
+
export interface ScheduledTaskCreateFormStyles {
|
|
142
|
+
/** Color overrides applied as CSS custom properties. */
|
|
143
|
+
colors?: ScheduledTaskCreateFormColors;
|
|
144
|
+
/** Typography class overrides. */
|
|
145
|
+
typography?: ScheduledTaskCreateFormTypography;
|
|
146
|
+
}
|
|
147
|
+
/** Props for the {@link ScheduledTaskCreateForm} component. */
|
|
148
|
+
export interface ScheduledTaskCreateFormProps {
|
|
149
|
+
/** Localized labels. */
|
|
150
|
+
labels: ScheduledTaskCreateFormLabels;
|
|
151
|
+
/** Current field values. */
|
|
152
|
+
values: ScheduledTaskCreateFormValues;
|
|
153
|
+
/** Current per-field validation errors. */
|
|
154
|
+
errors: ScheduledTaskCreateFormErrors;
|
|
155
|
+
/** Deployment options rendered in the model dropdown. */
|
|
156
|
+
modelOptions: ScheduledTaskCreateFormModelOption[];
|
|
157
|
+
/** Called with the changed field key and its new value whenever any field is edited. */
|
|
158
|
+
onFieldChange: <K extends keyof ScheduledTaskCreateFormValues>(field: K, value: ScheduledTaskCreateFormValues[K]) => void;
|
|
159
|
+
/** Called when the user activates the header's back control. */
|
|
160
|
+
onBack: () => void;
|
|
161
|
+
/** Called when the user activates the Cancel action. */
|
|
162
|
+
onCancel: () => void;
|
|
163
|
+
/** Called when the user activates the Save action. */
|
|
164
|
+
onSubmit: () => void;
|
|
165
|
+
/** When `true`, the Save action is disabled and shows a busy affordance. Defaults to `false`. */
|
|
166
|
+
isSubmitting?: boolean;
|
|
167
|
+
/** Color theme applied to the Instructions markdown editor. Defaults to the editor's own default (`'dark'`). */
|
|
168
|
+
markdownEditorTheme?: 'light' | 'dark';
|
|
169
|
+
/** Style overrides. */
|
|
170
|
+
styles?: ScheduledTaskCreateFormStyles;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=scheduled-task-create-form-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-create-form-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-create-form-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,kCAAkC,CAAC;AAE1C,0DAA0D;AAC1D,MAAM,WAAW,4BAA4B;IAC3C,4FAA4F;IAC5F,GAAG,EAAE,sBAAsB,CAAC;IAC5B,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,4DAA4D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O,CAAC;IACvB,gHAAgH;IAChH,mBAAmB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACvC,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Section a {@link ScheduledTaskItem} is grouped under in the card grid. */
|
|
2
|
+
export declare enum ScheduledTaskSectionKey {
|
|
3
|
+
Shared = "shared",
|
|
4
|
+
MyTasks = "myTasks"
|
|
5
|
+
}
|
|
6
|
+
/** Pre-computed values used to sort a {@link ScheduledTaskItem}; any field may be absent if the source data doesn't provide it, in which case that item sorts last for the corresponding sort key. */
|
|
7
|
+
export interface ScheduledTaskSortValues {
|
|
8
|
+
/** ISO timestamp of the next scheduled run, used by the `firstToRun`/`lastToRun` sort keys. */
|
|
9
|
+
nextRunAt?: string;
|
|
10
|
+
/** ISO timestamp the task was created, used by the `newest` sort key. */
|
|
11
|
+
createdAt?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A single scheduled task rendered as a card in the Scheduled Tasks grid. All strings are pre-formatted by the host app — the lib performs no date/locale formatting. */
|
|
14
|
+
export interface ScheduledTaskItem {
|
|
15
|
+
/** Stable identifier for this task. */
|
|
16
|
+
id: string;
|
|
17
|
+
/** Task title shown as the card heading. */
|
|
18
|
+
displayName: string;
|
|
19
|
+
/** Human-readable schedule pill text, e.g. "Every Monday 12:00". */
|
|
20
|
+
scheduleLabel: string;
|
|
21
|
+
/** Optional description or prompt-preview line shown below the title. */
|
|
22
|
+
descriptionPreview?: string;
|
|
23
|
+
/** Optional location breadcrumb segments, outermost first, e.g. `['Public', 'Project folder']`. Each segment is already resolved/localized by the host app. */
|
|
24
|
+
locationSegments?: string[];
|
|
25
|
+
/** When set, the card shows a "new" badge for this task. */
|
|
26
|
+
isNew?: boolean;
|
|
27
|
+
/** Section this item is grouped under in the card grid. */
|
|
28
|
+
sectionKey: ScheduledTaskSectionKey;
|
|
29
|
+
/** Values used to sort this item; see {@link ScheduledTaskSortValues}. */
|
|
30
|
+
sortValues: ScheduledTaskSortValues;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=scheduled-task-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-item.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-item.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,oBAAY,uBAAuB;IACjC,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,sMAAsM;AACtM,MAAM,WAAW,uBAAuB;IACtC,+FAA+F;IAC/F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,0KAA0K;AAC1K,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,4CAA4C;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,+JAA+J;IAC/J,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,4DAA4D;IAC5D,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2DAA2D;IAC3D,UAAU,EAAE,uBAAuB,CAAC;IACpC,0EAA0E;IAC1E,UAAU,EAAE,uBAAuB,CAAC;CACrC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Color overrides for the {@link ScheduledTaskSection} component, applied as
|
|
4
|
+
* CSS custom properties with app theme fallbacks.
|
|
5
|
+
*/
|
|
6
|
+
export interface ScheduledTaskSectionColors {
|
|
7
|
+
/** Count badge background. Fallback: `--bg-layer-3`. */
|
|
8
|
+
countBadgeBackground?: string;
|
|
9
|
+
/** Count badge text color. Fallback: `--text-secondary`. */
|
|
10
|
+
countBadgeText?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Typography overrides for the {@link ScheduledTaskSection} component. */
|
|
13
|
+
export interface ScheduledTaskSectionTypography {
|
|
14
|
+
/** CSS class applied to the section title. Defaults to `'dial-small-semi-text'`. */
|
|
15
|
+
titleClassName?: string;
|
|
16
|
+
/** CSS class applied to the count badge text. Defaults to `'dial-tiny-text'`. */
|
|
17
|
+
countBadgeClassName?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Style overrides for the {@link ScheduledTaskSection} component. */
|
|
20
|
+
export interface ScheduledTaskSectionStyles {
|
|
21
|
+
/** Color overrides applied as CSS custom properties. */
|
|
22
|
+
colors?: ScheduledTaskSectionColors;
|
|
23
|
+
/** Typography class overrides. */
|
|
24
|
+
typography?: ScheduledTaskSectionTypography;
|
|
25
|
+
}
|
|
26
|
+
/** Props for the {@link ScheduledTaskSection} component. */
|
|
27
|
+
export interface ScheduledTaskSectionProps {
|
|
28
|
+
/** Section heading, e.g. "Shared". Omit to render the section without a heading/count row. */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** Number of items in this section, shown as a count badge next to the title. Ignored when `title` is omitted. */
|
|
31
|
+
count: number;
|
|
32
|
+
/** Section content, typically a {@link ScheduledTaskCardGrid}. */
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
/** Style overrides. */
|
|
35
|
+
styles?: ScheduledTaskSectionStyles;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=scheduled-task-section-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-section-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-section-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,wDAAwD;IACxD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,2EAA2E;AAC3E,MAAM,WAAW,8BAA8B;IAC7C,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iFAAiF;IACjF,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,sEAAsE;AACtE,MAAM,WAAW,0BAA0B;IACzC,wDAAwD;IACxD,MAAM,CAAC,EAAE,0BAA0B,CAAC;IACpC,kCAAkC;IAClC,UAAU,CAAC,EAAE,8BAA8B,CAAC;CAC7C;AAED,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kHAAkH;IAClH,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB,uBAAuB;IACvB,MAAM,CAAC,EAAE,0BAA0B,CAAC;CACrC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { ScheduledTasksSortKey } from '../types/scheduled-tasks-sort-key';
|
|
2
|
+
import { ScheduledTaskCardGridLabels } from './scheduled-task-card-grid-props';
|
|
3
|
+
import { ScheduledTaskItem } from './scheduled-task-item';
|
|
4
|
+
/** A single sort option shown in the Scheduled Tasks toolbar sort control. */
|
|
5
|
+
export interface ScheduledTasksSortOption {
|
|
6
|
+
/** Stable identifier for this sort option, passed back via `onSortChange`. */
|
|
7
|
+
key: ScheduledTasksSortKey;
|
|
8
|
+
/** Localized display label for this sort option. */
|
|
9
|
+
label: string;
|
|
10
|
+
}
|
|
11
|
+
/** Localized labels used by the {@link ScheduledTasks} component. */
|
|
12
|
+
export interface ScheduledTasksLabels {
|
|
13
|
+
/** Page title, e.g. "Scheduled tasks". */
|
|
14
|
+
title: string;
|
|
15
|
+
/** One-line description shown beneath the title. */
|
|
16
|
+
subtitle: string;
|
|
17
|
+
/** Label for the primary "create task" action button. */
|
|
18
|
+
createButtonLabel: string;
|
|
19
|
+
/** Placeholder text for the toolbar search input. */
|
|
20
|
+
searchPlaceholder: string;
|
|
21
|
+
/** Accessible label for the toolbar search input. */
|
|
22
|
+
searchAriaLabel: string;
|
|
23
|
+
/** Accessible label for the toolbar search input's clear action. */
|
|
24
|
+
clearSearchLabel: string;
|
|
25
|
+
/** Accessible label for the toolbar sort control. */
|
|
26
|
+
sortLabel: string;
|
|
27
|
+
/** Options rendered in the sort control's dropdown. */
|
|
28
|
+
sortOptions: ScheduledTasksSortOption[];
|
|
29
|
+
/** Message shown when the fetched task list is empty. */
|
|
30
|
+
emptyStateLabel: string;
|
|
31
|
+
/** Message shown when `searchQuery` filters every task out. */
|
|
32
|
+
noResultsLabel: string;
|
|
33
|
+
/** Message shown alongside the retry action when `error` is set. */
|
|
34
|
+
errorLabel: string;
|
|
35
|
+
/** Label for the retry action shown when `error` is set. */
|
|
36
|
+
retryLabel: string;
|
|
37
|
+
/** Title for the section grouping items with `sectionKey: 'shared'`. */
|
|
38
|
+
sharedSectionTitle: string;
|
|
39
|
+
/** Localized labels forwarded as-is to every card in the grid. */
|
|
40
|
+
cardLabels?: ScheduledTaskCardGridLabels;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Color overrides for the {@link ScheduledTasks} component, applied as CSS
|
|
44
|
+
* custom properties with app theme fallbacks.
|
|
45
|
+
*/
|
|
46
|
+
export interface ScheduledTasksColors {
|
|
47
|
+
/** Root container background. Fallback: `--bg-layer-5`. */
|
|
48
|
+
background?: string;
|
|
49
|
+
/** Subtitle and status-message (empty/no-results/error) text color. Fallback: `--text-secondary`. */
|
|
50
|
+
subtitleText?: string;
|
|
51
|
+
/** Sort control label/icon color. Fallback: `--text-accent-primary`. */
|
|
52
|
+
sortButtonText?: string;
|
|
53
|
+
}
|
|
54
|
+
/** Typography overrides for the {@link ScheduledTasks} component. */
|
|
55
|
+
export interface ScheduledTasksTypography {
|
|
56
|
+
/** CSS class applied to the title. Defaults to `'dial-h1-text'`. */
|
|
57
|
+
titleClassName?: string;
|
|
58
|
+
/** CSS class applied to the subtitle and status messages (empty/no-results/error). Defaults to `'dial-body-text'`. */
|
|
59
|
+
subtitleClassName?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Style overrides for the {@link ScheduledTasks} component. */
|
|
62
|
+
export interface ScheduledTasksStyles {
|
|
63
|
+
/** Color overrides applied as CSS custom properties. */
|
|
64
|
+
colors?: ScheduledTasksColors;
|
|
65
|
+
/** Typography class overrides. */
|
|
66
|
+
typography?: ScheduledTasksTypography;
|
|
67
|
+
/** Size (px) of the empty-state icon. Defaults to `48`. */
|
|
68
|
+
emptyStateIconSize?: number;
|
|
69
|
+
}
|
|
70
|
+
/** Props for the {@link ScheduledTasks} component. */
|
|
71
|
+
export interface ScheduledTasksProps {
|
|
72
|
+
/** Localized labels. */
|
|
73
|
+
labels: ScheduledTasksLabels;
|
|
74
|
+
/** Called when the user activates the primary "create task" action. */
|
|
75
|
+
onCreateClick: () => void;
|
|
76
|
+
/** Current value of the toolbar search input. */
|
|
77
|
+
searchQuery: string;
|
|
78
|
+
/** Called when the toolbar search input value changes. */
|
|
79
|
+
onSearchQueryChange: (query: string) => void;
|
|
80
|
+
/** Key of the currently selected sort option. */
|
|
81
|
+
sortKey: ScheduledTasksSortKey;
|
|
82
|
+
/** Called when the user selects a different sort option. */
|
|
83
|
+
onSortChange: (key: ScheduledTasksSortKey) => void;
|
|
84
|
+
/** Fetched tasks to render as cards, grouped by `sectionKey` and sorted by `sortKey`. */
|
|
85
|
+
items: ScheduledTaskItem[];
|
|
86
|
+
/** When `true`, the content region shows a loading spinner instead of `items`. Defaults to `false`. */
|
|
87
|
+
isLoading?: boolean;
|
|
88
|
+
/** When set, the content region shows an error message and retry action instead of `items`. */
|
|
89
|
+
error?: Error | null;
|
|
90
|
+
/** Called when the user activates the retry action shown alongside `error`. */
|
|
91
|
+
onRetry?: () => void;
|
|
92
|
+
/** Called with a task id when the user activates "Edit" on a card. Omit to hide the action on every card. */
|
|
93
|
+
onEdit?: (id: string) => void;
|
|
94
|
+
/** Called with a task id when the user activates "Run now" on a card. Omit to hide the action on every card. */
|
|
95
|
+
onRunNow?: (id: string) => void;
|
|
96
|
+
/** Called with a task id when the user activates "Delete" on a card. Omit to hide the action on every card. */
|
|
97
|
+
onDelete?: (id: string) => void;
|
|
98
|
+
/** Style overrides. */
|
|
99
|
+
styles?: ScheduledTasksStyles;
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=scheduled-tasks-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-tasks-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-tasks-props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AACpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,8EAA8E;AAC9E,MAAM,WAAW,wBAAwB;IACvC,8EAA8E;IAC9E,GAAG,EAAE,qBAAqB,CAAC;IAC3B,oDAAoD;IACpD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qEAAqE;AACrE,MAAM,WAAW,oBAAoB;IACnC,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,oEAAoE;IACpE,gBAAgB,EAAE,MAAM,CAAC;IACzB,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,WAAW,EAAE,wBAAwB,EAAE,CAAC;IACxC,yDAAyD;IACzD,eAAe,EAAE,MAAM,CAAC;IACxB,+DAA+D;IAC/D,cAAc,EAAE,MAAM,CAAC;IAC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E,OAAO,CAAC;IACpB,+FAA+F;IAC/F,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IACrB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,6GAA6G;IAC7G,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,gHAAgH;IAChH,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,+GAA+G;IAC/G,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,uBAAuB;IACvB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B"}
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@epam/ai-dial-scheduled-tasks",
|
|
3
|
+
"description": "Presentational Scheduled Tasks page shell — header, toolbar, and empty state",
|
|
4
|
+
"version": "1.1.0-dev.55",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"module": "./index.js",
|
|
9
|
+
"types": "./index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
"./package.json": "./package.json",
|
|
12
|
+
"./styles.css": "./index.css",
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"import": "./index.js",
|
|
16
|
+
"default": "./index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"@epam/ai-dial-chat-shared": "1.1.0-dev.55",
|
|
21
|
+
"@epam/ai-dial-kit": "1.1.0-dev.55",
|
|
22
|
+
"@epam/ai-dial-ui-kit": "0.13.0-dev.17",
|
|
23
|
+
"@tabler/icons-react": "^3.44.0",
|
|
24
|
+
"react": "^19.0.0"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/epam/ai-dial-chat.git",
|
|
29
|
+
"directory": "libs/scheduled-tasks"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/test-setup.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=test-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../src/test-setup.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Whether a scheduled task runs once at a specific time or repeats on a cadence. */
|
|
2
|
+
export declare enum ScheduledTaskScheduleType {
|
|
3
|
+
Once = "once",
|
|
4
|
+
Recurring = "recurring"
|
|
5
|
+
}
|
|
6
|
+
/** Recurrence cadence for a {@link ScheduledTaskScheduleType.Recurring} schedule type. */
|
|
7
|
+
export declare enum ScheduledTaskFrequency {
|
|
8
|
+
Daily = "daily",
|
|
9
|
+
Weekly = "weekly",
|
|
10
|
+
Monthly = "monthly"
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=scheduled-task-schedule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-schedule.d.ts","sourceRoot":"","sources":["../../src/types/scheduled-task-schedule.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,oBAAY,yBAAyB;IACnC,IAAI,SAAS;IACb,SAAS,cAAc;CACxB;AAED,0FAA0F;AAC1F,oBAAY,sBAAsB;IAChC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-tasks-sort-key.d.ts","sourceRoot":"","sources":["../../src/types/scheduled-tasks-sort-key.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,oBAAY,qBAAqB;IAC/B,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ScheduledTaskItem } from '../models/scheduled-task-item';
|
|
2
|
+
/** Case-insensitive substring match against `displayName` and `descriptionPreview`. */
|
|
3
|
+
export declare const filterScheduledTaskItems: (items: ScheduledTaskItem[], searchQuery: string) => ScheduledTaskItem[];
|
|
4
|
+
/** Sorts a (typically already-filtered) list of items by the given toolbar sort key. */
|
|
5
|
+
export declare const sortScheduledTaskItems: (items: ScheduledTaskItem[], sortKey: string) => ScheduledTaskItem[];
|
|
6
|
+
//# sourceMappingURL=filter-sort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAGvE,uFAAuF;AACvF,eAAO,MAAM,wBAAwB,GACnC,OAAO,iBAAiB,EAAE,EAC1B,aAAa,MAAM,KAClB,iBAAiB,EAUnB,CAAC;AAeF,wFAAwF;AACxF,eAAO,MAAM,sBAAsB,GACjC,OAAO,iBAAiB,EAAE,EAC1B,SAAS,MAAM,KACd,iBAAiB,EAgCnB,CAAC"}
|