@epam/ai-dial-scheduled-tasks 1.1.0-dev.101
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/ScheduledTaskCardSkeleton/ScheduledTaskCardSkeleton.d.ts +7 -0
- package/components/ScheduledTaskCardSkeleton/ScheduledTaskCardSkeleton.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 +18 -0
- package/index.d.ts.map +1 -0
- package/index.js +596 -0
- package/models/scheduled-task-card-grid-props.d.ts +38 -0
- package/models/scheduled-task-card-grid-props.d.ts.map +1 -0
- package/models/scheduled-task-card-props.d.ts +82 -0
- package/models/scheduled-task-card-props.d.ts.map +1 -0
- package/models/scheduled-task-card-skeleton-props.d.ts +22 -0
- package/models/scheduled-task-card-skeleton-props.d.ts.map +1 -0
- package/models/scheduled-task-create-form-props.d.ts +170 -0
- package/models/scheduled-task-create-form-props.d.ts.map +1 -0
- package/models/scheduled-task-item.d.ts +34 -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 +113 -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 +17 -0
- package/types/scheduled-task-schedule.d.ts.map +1 -0
- package/types/scheduled-tasks-sort-key.d.ts +12 -0
- package/types/scheduled-tasks-sort-key.d.ts.map +1 -0
- package/utils/calendar-value.d.ts +10 -0
- package/utils/calendar-value.d.ts.map +1 -0
|
@@ -0,0 +1,82 @@
|
|
|
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-sunken`. */
|
|
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
|
+
/** Divider border color above the location breadcrumb. Fallback: `--stroke-tertiary`. */
|
|
39
|
+
locationDividerBorder?: string;
|
|
40
|
+
}
|
|
41
|
+
/** Typography overrides for the {@link ScheduledTaskCard} component. */
|
|
42
|
+
export interface ScheduledTaskCardTypography {
|
|
43
|
+
/** CSS class applied to the card's title. Defaults to `'dial-body-semi-text'`. */
|
|
44
|
+
titleClassName?: string;
|
|
45
|
+
/** CSS class applied to the description/prompt-preview line. Defaults to `'dial-small-text'`. */
|
|
46
|
+
descriptionClassName?: string;
|
|
47
|
+
/** CSS class applied to the schedule pill's label text. Defaults to `'dial-tiny-text'`. */
|
|
48
|
+
scheduleLabelClassName?: string;
|
|
49
|
+
/** CSS class applied to non-leaf location breadcrumb segments. Defaults to `'dial-tiny-text'`. */
|
|
50
|
+
locationLabelClassName?: string;
|
|
51
|
+
/** CSS class applied to the leaf (last) location breadcrumb segment. Defaults to `'dial-tiny-semi-text'`. */
|
|
52
|
+
locationLeafClassName?: string;
|
|
53
|
+
/** CSS class applied to the "new" badge text. Defaults to `'dial-tiny-semi-text'`. */
|
|
54
|
+
newBadgeClassName?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Style overrides for the {@link ScheduledTaskCard} component. */
|
|
57
|
+
export interface ScheduledTaskCardStyles {
|
|
58
|
+
/** Color overrides applied as CSS custom properties. */
|
|
59
|
+
colors?: ScheduledTaskCardColors;
|
|
60
|
+
/** Typography class overrides. */
|
|
61
|
+
typography?: ScheduledTaskCardTypography;
|
|
62
|
+
}
|
|
63
|
+
/** Props for the {@link ScheduledTaskCard} component. */
|
|
64
|
+
export interface ScheduledTaskCardProps {
|
|
65
|
+
/** The scheduled task to render. */
|
|
66
|
+
item: ScheduledTaskItem;
|
|
67
|
+
/** Current search query — the matching substring of `item.displayName` is highlighted. */
|
|
68
|
+
searchQuery?: string;
|
|
69
|
+
/** Called with the task id when the user activates "Edit". Omit to hide the action. */
|
|
70
|
+
onEdit?: (id: string) => void;
|
|
71
|
+
/** Called with the task id when the user activates "Run now". Omit to hide the action. */
|
|
72
|
+
onRunNow?: (id: string) => void;
|
|
73
|
+
/** Called with the task id when the user activates "Delete". Omit to hide the action. */
|
|
74
|
+
onDelete?: (id: string) => void;
|
|
75
|
+
/** Localized labels. */
|
|
76
|
+
labels?: ScheduledTaskCardLabels;
|
|
77
|
+
/** Style overrides. */
|
|
78
|
+
styles?: ScheduledTaskCardStyles;
|
|
79
|
+
/** Additional CSS class applied to the card root. */
|
|
80
|
+
className?: string;
|
|
81
|
+
}
|
|
82
|
+
//# 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,M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C,UAAU,CAAC,EAAE,2BAA2B,CAAC;CAC1C;AAED,yDAAyD;AACzD,MAAM,WAAW,sBAAsB;IACrC,oCAAoC;IACpC,IAAI,EAAE,iBAAiB,CAAC;IACxB,0FAA0F;IAC1F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uFAAuF;IACvF,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,yFAAyF;IACzF,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,wBAAwB;IACxB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,uBAAuB;IACvB,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,qDAAqD;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color overrides for the {@link ScheduledTaskCardSkeleton} component.
|
|
3
|
+
* `DialSkeleton`'s own default color token (`bg-layer-raised`) has no visible
|
|
4
|
+
* contrast against the card background in apps that don't override it, so
|
|
5
|
+
* this component requires an explicit color rather than relying on that
|
|
6
|
+
* default — callers can still override it via this prop.
|
|
7
|
+
*/
|
|
8
|
+
export interface ScheduledTaskCardSkeletonColors {
|
|
9
|
+
/** Background color of each skeleton bar. Fallback: `--bg-layer-4`. */
|
|
10
|
+
skeletonColor?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Style overrides for the {@link ScheduledTaskCardSkeleton} component. */
|
|
13
|
+
export interface ScheduledTaskCardSkeletonStyles {
|
|
14
|
+
/** Color overrides. */
|
|
15
|
+
colors?: ScheduledTaskCardSkeletonColors;
|
|
16
|
+
}
|
|
17
|
+
/** Props for the {@link ScheduledTaskCardSkeleton} component. */
|
|
18
|
+
export interface ScheduledTaskCardSkeletonProps {
|
|
19
|
+
/** Style overrides. */
|
|
20
|
+
styles?: ScheduledTaskCardSkeletonStyles;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=scheduled-task-card-skeleton-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scheduled-task-card-skeleton-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-card-skeleton-props.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,+BAA+B;IAC9C,uEAAuE;IACvE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2EAA2E;AAC3E,MAAM,WAAW,+BAA+B;IAC9C,uBAAuB;IACvB,MAAM,CAAC,EAAE,+BAA+B,CAAC;CAC1C;AAED,iEAAiE;AACjE,MAAM,WAAW,8BAA8B;IAC7C,uBAAuB;IACvB,MAAM,CAAC,EAAE,+BAA+B,CAAC;CAC1C"}
|
|
@@ -0,0 +1,170 @@
|
|
|
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
|
+
}
|
|
39
|
+
/** Validation error messages keyed by {@link ScheduledTaskCreateFormValues} field. */
|
|
40
|
+
export interface ScheduledTaskCreateFormErrors {
|
|
41
|
+
/** Error shown under the display name field. */
|
|
42
|
+
displayName?: string;
|
|
43
|
+
/** Error shown under the run-at field. */
|
|
44
|
+
runAt?: string;
|
|
45
|
+
/** Error shown under the time field. */
|
|
46
|
+
time?: string;
|
|
47
|
+
/** Error shown under the day-of-week field. */
|
|
48
|
+
dayOfWeek?: string;
|
|
49
|
+
/** Error shown under the day-of-month field. */
|
|
50
|
+
dayOfMonth?: string;
|
|
51
|
+
/** Error shown under the model field. */
|
|
52
|
+
modelId?: string;
|
|
53
|
+
/** Error shown under the description field. */
|
|
54
|
+
description?: string;
|
|
55
|
+
/** Error shown under the prompt field. */
|
|
56
|
+
prompt?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Localized labels used by the {@link ScheduledTaskCreateForm} component. */
|
|
59
|
+
export interface ScheduledTaskCreateFormLabels {
|
|
60
|
+
/** Page/header title, e.g. "New task". */
|
|
61
|
+
pageTitle: string;
|
|
62
|
+
/** Accessible label for the header's back control. */
|
|
63
|
+
backButtonLabel: string;
|
|
64
|
+
/** Section heading for the Details column. */
|
|
65
|
+
detailsSectionTitle: string;
|
|
66
|
+
/** Section subtitle for the Details column. */
|
|
67
|
+
detailsSectionSubtitle: string;
|
|
68
|
+
/** Section heading for the Configuration column. */
|
|
69
|
+
configurationSectionTitle: string;
|
|
70
|
+
/** Section subtitle for the Configuration column. */
|
|
71
|
+
configurationSectionSubtitle: string;
|
|
72
|
+
/** Display name field label. */
|
|
73
|
+
displayNameLabel: string;
|
|
74
|
+
/** Display name required-field validation message. */
|
|
75
|
+
displayNameRequired: string;
|
|
76
|
+
/** Label for the schedule section. */
|
|
77
|
+
scheduleSectionLabel: string;
|
|
78
|
+
/** Label for the "once" schedule type option. */
|
|
79
|
+
scheduleTypeOnceLabel: string;
|
|
80
|
+
/** Label for the "recurring" schedule type option. */
|
|
81
|
+
scheduleTypeRecurringLabel: string;
|
|
82
|
+
/** Accessible label for the schedule type control. */
|
|
83
|
+
scheduleTypeAriaLabel: string;
|
|
84
|
+
/** Run-at field label (shown when schedule type is "once"). */
|
|
85
|
+
runAtLabel: string;
|
|
86
|
+
/** Accessible label for the frequency dropdown. */
|
|
87
|
+
frequencyLabel: string;
|
|
88
|
+
/** Options rendered in the frequency dropdown. */
|
|
89
|
+
frequencyOptions: ScheduledTaskFrequencyOption[];
|
|
90
|
+
/** Time field label (shown when schedule type is "recurring"). */
|
|
91
|
+
timeLabel: string;
|
|
92
|
+
/** Day-of-week field label (shown when frequency is "weekly"). */
|
|
93
|
+
dayOfWeekLabel: string;
|
|
94
|
+
/** Day-of-month field label (shown when frequency is "monthly"). */
|
|
95
|
+
dayOfMonthLabel: string;
|
|
96
|
+
/** Accessible label for the model dropdown. */
|
|
97
|
+
modelOrAgentLabel: string;
|
|
98
|
+
/** Placeholder shown in the model dropdown trigger when no model is selected. */
|
|
99
|
+
modelPlaceholder: string;
|
|
100
|
+
/** Description textarea label. */
|
|
101
|
+
descriptionLabel: string;
|
|
102
|
+
/** Accessible label for the Instructions markdown editor. */
|
|
103
|
+
instructionsLabel: string;
|
|
104
|
+
/** Label for the Cancel action. */
|
|
105
|
+
cancelButtonLabel: string;
|
|
106
|
+
/** Label for the Save action (submits the create form). */
|
|
107
|
+
createButtonLabel: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Color overrides for the {@link ScheduledTaskCreateForm} component, applied
|
|
111
|
+
* as CSS custom properties with app theme fallbacks.
|
|
112
|
+
*/
|
|
113
|
+
export interface ScheduledTaskCreateFormColors {
|
|
114
|
+
/** Root container background. Fallback: `--bg-layer-base`. */
|
|
115
|
+
background?: string;
|
|
116
|
+
/** Header row's bottom border color. Fallback: `--stroke-tertiary`. */
|
|
117
|
+
headerBorder?: string;
|
|
118
|
+
/** Details column's end-edge divider color. Fallback: `--stroke-tertiary`. */
|
|
119
|
+
detailsColumnBorder?: string;
|
|
120
|
+
/** Section subtitle text color. Fallback: `--text-secondary`. */
|
|
121
|
+
sectionSubtitleText?: string;
|
|
122
|
+
/** Instructions editor's validation error text color. Fallback: `--text-error`. */
|
|
123
|
+
instructionsErrorText?: string;
|
|
124
|
+
}
|
|
125
|
+
/** Typography overrides for the {@link ScheduledTaskCreateForm} component. */
|
|
126
|
+
export interface ScheduledTaskCreateFormTypography {
|
|
127
|
+
/** CSS class applied to the title. Defaults to `'dial-h1-text'`. */
|
|
128
|
+
titleClassName?: string;
|
|
129
|
+
/** CSS class applied to a section heading. Defaults to `'dial-body-semi-text'`. */
|
|
130
|
+
sectionTitleClassName?: string;
|
|
131
|
+
/** CSS class applied to a section subtitle. Defaults to `'dial-tiny-text'`. */
|
|
132
|
+
sectionSubtitleClassName?: string;
|
|
133
|
+
/** CSS class applied to the schedule section's legend and the Instructions label. Defaults to `'dial-body-semi-text mb-1'`. */
|
|
134
|
+
scheduleSectionLabelClassName?: string;
|
|
135
|
+
/** CSS class applied to the Instructions editor's validation error text. Defaults to `'dial-small-text'`. */
|
|
136
|
+
instructionsErrorClassName?: string;
|
|
137
|
+
}
|
|
138
|
+
/** Style overrides for the {@link ScheduledTaskCreateForm} component. */
|
|
139
|
+
export interface ScheduledTaskCreateFormStyles {
|
|
140
|
+
/** Color overrides applied as CSS custom properties. */
|
|
141
|
+
colors?: ScheduledTaskCreateFormColors;
|
|
142
|
+
/** Typography class overrides. */
|
|
143
|
+
typography?: ScheduledTaskCreateFormTypography;
|
|
144
|
+
}
|
|
145
|
+
/** Props for the {@link ScheduledTaskCreateForm} component. */
|
|
146
|
+
export interface ScheduledTaskCreateFormProps {
|
|
147
|
+
/** Localized labels. */
|
|
148
|
+
labels: ScheduledTaskCreateFormLabels;
|
|
149
|
+
/** Current field values. */
|
|
150
|
+
values: ScheduledTaskCreateFormValues;
|
|
151
|
+
/** Current per-field validation errors. */
|
|
152
|
+
errors: ScheduledTaskCreateFormErrors;
|
|
153
|
+
/** Deployment options rendered in the model dropdown. */
|
|
154
|
+
modelOptions: ScheduledTaskCreateFormModelOption[];
|
|
155
|
+
/** Called with the changed field key and its new value whenever any field is edited. */
|
|
156
|
+
onFieldChange: <K extends keyof ScheduledTaskCreateFormValues>(field: K, value: ScheduledTaskCreateFormValues[K]) => void;
|
|
157
|
+
/** Called when the user activates the header's back control. */
|
|
158
|
+
onBack: () => void;
|
|
159
|
+
/** Called when the user activates the Cancel action. */
|
|
160
|
+
onCancel: () => void;
|
|
161
|
+
/** Called when the user activates the Save action. */
|
|
162
|
+
onSubmit: () => void;
|
|
163
|
+
/** When `true`, the Save action is disabled and shows a busy affordance. Defaults to `false`. */
|
|
164
|
+
isSubmitting?: boolean;
|
|
165
|
+
/** Color theme applied to the Instructions markdown editor. Defaults to the editor's own default (`'dark'`). */
|
|
166
|
+
markdownEditorTheme?: 'light' | 'dark';
|
|
167
|
+
/** Style overrides. */
|
|
168
|
+
styles?: ScheduledTaskCreateFormStyles;
|
|
169
|
+
}
|
|
170
|
+
//# 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;AAC5D,MAAM,WAAW,kCAAkC;IACjD,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,qDAAqD;IACrD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,MAAM,WAAW,6BAA6B;IAC5C,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,YAAY,EAAE,yBAAyB,CAAC;IACxC,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,SAAS,CAAC,EAAE,sBAAsB,CAAC;IACnC,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,sFAAsF;AACtF,MAAM,WAAW,6BAA6B;IAC5C,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,C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IACtC,yDAAyD;IACzD,YAAY,EAAE,kCAAkC,EAAE,CAAC;IACnD,wFAAwF;IACxF,aAAa,EAAE,CAAC,CAAC,SAAS,MAAM,6BAA6B,EAC3D,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,6BAA6B,CAAC,CAAC,CAAC,KACpC,IAAI,CAAC;IACV,gEAAgE;IAChE,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wDAAwD;IACxD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,sDAAsD;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gHAAgH;IAChH,mBAAmB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACvC,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/** Section a {@link ScheduledTaskItem} is grouped under in the card grid. */
|
|
2
|
+
export declare enum ScheduledTaskSectionKey {
|
|
3
|
+
/** Tasks shared from another user or accessible at the organization level. */
|
|
4
|
+
Shared = "shared",
|
|
5
|
+
/** Tasks owned by the current user. */
|
|
6
|
+
MyTasks = "myTasks"
|
|
7
|
+
}
|
|
8
|
+
/** 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. */
|
|
9
|
+
export interface ScheduledTaskSortValues {
|
|
10
|
+
/** ISO timestamp of the next scheduled run, used by the `firstToRun`/`lastToRun` sort keys. */
|
|
11
|
+
nextRunAt?: string;
|
|
12
|
+
/** ISO timestamp the task was created, used by the `newest` sort key. */
|
|
13
|
+
createdAt?: string;
|
|
14
|
+
}
|
|
15
|
+
/** 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. */
|
|
16
|
+
export interface ScheduledTaskItem {
|
|
17
|
+
/** Stable identifier for this task. */
|
|
18
|
+
id: string;
|
|
19
|
+
/** Task title shown as the card heading. */
|
|
20
|
+
displayName: string;
|
|
21
|
+
/** Human-readable schedule pill text, e.g. "Every Monday 12:00". */
|
|
22
|
+
scheduleLabel: string;
|
|
23
|
+
/** Optional description or prompt-preview line shown below the title. */
|
|
24
|
+
descriptionPreview?: string;
|
|
25
|
+
/** Optional location breadcrumb segments, outermost first, e.g. `['Public', 'Project folder']`. Each segment is already resolved/localized by the host app. */
|
|
26
|
+
locationSegments?: string[];
|
|
27
|
+
/** When set, the card shows a "new" badge for this task. */
|
|
28
|
+
isNew?: boolean;
|
|
29
|
+
/** Section this item is grouped under in the card grid. */
|
|
30
|
+
sectionKey: ScheduledTaskSectionKey;
|
|
31
|
+
/** Values used to sort this item; see {@link ScheduledTaskSortValues}. */
|
|
32
|
+
sortValues: ScheduledTaskSortValues;
|
|
33
|
+
}
|
|
34
|
+
//# 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,8EAA8E;IAC9E,MAAM,WAAW;IACjB,uCAAuC;IACvC,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-raised`. */
|
|
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,6DAA6D;IAC7D,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,113 @@
|
|
|
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
|
+
/** Announced via `aria-live` while a load-more fetch is in flight (`isLoadingMore`). Optional — no announcement is made when omitted. */
|
|
40
|
+
loadingMoreLabel?: string;
|
|
41
|
+
/** Localized labels forwarded as-is to every card in the grid. */
|
|
42
|
+
cardLabels?: ScheduledTaskCardGridLabels;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Color overrides for the {@link ScheduledTasks} component, applied as CSS
|
|
46
|
+
* custom properties with app theme fallbacks.
|
|
47
|
+
*/
|
|
48
|
+
export interface ScheduledTasksColors {
|
|
49
|
+
/** Root container background. Fallback: `--bg-layer-base`. */
|
|
50
|
+
background?: string;
|
|
51
|
+
/** Subtitle and status-message (empty/no-results/error) text color. Fallback: `--text-secondary`. */
|
|
52
|
+
subtitleText?: string;
|
|
53
|
+
/** Sort control label/icon color. Fallback: `--text-accent`. */
|
|
54
|
+
sortButtonText?: string;
|
|
55
|
+
/** Background color of the load-more placeholder skeleton bars. Fallback: `--bg-layer-4`. */
|
|
56
|
+
skeletonColor?: string;
|
|
57
|
+
}
|
|
58
|
+
/** Typography overrides for the {@link ScheduledTasks} component. */
|
|
59
|
+
export interface ScheduledTasksTypography {
|
|
60
|
+
/** CSS class applied to the title. Defaults to `'dial-h1-text'`. */
|
|
61
|
+
titleClassName?: string;
|
|
62
|
+
/** CSS class applied to the subtitle and status messages (empty/no-results/error). Defaults to `'dial-body-text'`. */
|
|
63
|
+
subtitleClassName?: string;
|
|
64
|
+
}
|
|
65
|
+
/** Style overrides for the {@link ScheduledTasks} component. */
|
|
66
|
+
export interface ScheduledTasksStyles {
|
|
67
|
+
/** Color overrides applied as CSS custom properties. */
|
|
68
|
+
colors?: ScheduledTasksColors;
|
|
69
|
+
/** Typography class overrides. */
|
|
70
|
+
typography?: ScheduledTasksTypography;
|
|
71
|
+
/** Size (px) of the empty-state icon. Defaults to `48`. */
|
|
72
|
+
emptyStateIconSize?: number;
|
|
73
|
+
}
|
|
74
|
+
/** Props for the {@link ScheduledTasks} component. */
|
|
75
|
+
export interface ScheduledTasksProps {
|
|
76
|
+
/** Localized labels. */
|
|
77
|
+
labels: ScheduledTasksLabels;
|
|
78
|
+
/** Called when the user activates the primary "create task" action. */
|
|
79
|
+
onCreateClick: () => void;
|
|
80
|
+
/** Current value of the toolbar search input. */
|
|
81
|
+
searchQuery: string;
|
|
82
|
+
/** Called when the toolbar search input value changes. */
|
|
83
|
+
onSearchQueryChange: (query: string) => void;
|
|
84
|
+
/** Key of the currently selected sort option. */
|
|
85
|
+
sortKey: ScheduledTasksSortKey;
|
|
86
|
+
/** Called when the user selects a different sort option. */
|
|
87
|
+
onSortChange: (key: ScheduledTasksSortKey) => void;
|
|
88
|
+
/** Tasks to render as cards, already search-matched server-side; grouped by `sectionKey` and sorted client-side by `sortKey`. */
|
|
89
|
+
items: ScheduledTaskItem[];
|
|
90
|
+
/** When `true`, the content region shows a loading spinner instead of `items`. Defaults to `false`. */
|
|
91
|
+
isLoading?: boolean;
|
|
92
|
+
/** When set, the content region shows an error message and retry action instead of `items`. */
|
|
93
|
+
error?: Error | null;
|
|
94
|
+
/** Called when the user activates the retry action shown alongside `error`. */
|
|
95
|
+
onRetry?: () => void;
|
|
96
|
+
/** Whether another page of `items` is available beyond what has been loaded so far. Defaults to `false`. */
|
|
97
|
+
hasMore?: boolean;
|
|
98
|
+
/** When `true`, `skeletonCount` placeholder cards render below the loaded cards while the next page is fetched. Defaults to `false`. */
|
|
99
|
+
isLoadingMore?: boolean;
|
|
100
|
+
/** Number of placeholder cards shown while `isLoadingMore` is `true`. Defaults to `6`. */
|
|
101
|
+
skeletonCount?: number;
|
|
102
|
+
/** Called when the trailing scroll sentinel becomes visible and `hasMore && !isLoadingMore && !isLoading`. */
|
|
103
|
+
onLoadMore?: () => void;
|
|
104
|
+
/** Called with a task id when the user activates "Edit" on a card. Omit to hide the action on every card. */
|
|
105
|
+
onEdit?: (id: string) => void;
|
|
106
|
+
/** Called with a task id when the user activates "Run now" on a card. Omit to hide the action on every card. */
|
|
107
|
+
onRunNow?: (id: string) => void;
|
|
108
|
+
/** Called with a task id when the user activates "Delete" on a card. Omit to hide the action on every card. */
|
|
109
|
+
onDelete?: (id: string) => void;
|
|
110
|
+
/** Style overrides. */
|
|
111
|
+
styles?: ScheduledTasksStyles;
|
|
112
|
+
}
|
|
113
|
+
//# 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;IACvB,oEAAoE;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,yIAAyI;IACzI,gBAAgB,CAAC,EAAE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I,CAAC;IACrB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,4GAA4G;IAC5G,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wIAAwI;IACxI,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0FAA0F;IAC1F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8GAA8G;IAC9G,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,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.101",
|
|
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.101",
|
|
21
|
+
"@epam/ai-dial-kit": "1.1.0-dev.101",
|
|
22
|
+
"@epam/ai-dial-ui-kit": "^0.13.0-dev.26",
|
|
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,17 @@
|
|
|
1
|
+
/** Whether a scheduled task runs once at a specific time or repeats on a cadence. */
|
|
2
|
+
export declare enum ScheduledTaskScheduleType {
|
|
3
|
+
/** Task runs once at the date/time specified by `runAt`. */
|
|
4
|
+
Once = "once",
|
|
5
|
+
/** Task runs repeatedly on the cadence specified by `frequency`, `time`, `dayOfWeek`, and `dayOfMonth`. */
|
|
6
|
+
Recurring = "recurring"
|
|
7
|
+
}
|
|
8
|
+
/** Recurrence cadence for a {@link ScheduledTaskScheduleType.Recurring} schedule type. */
|
|
9
|
+
export declare enum ScheduledTaskFrequency {
|
|
10
|
+
/** Task runs every day at the specified `time`. */
|
|
11
|
+
Daily = "daily",
|
|
12
|
+
/** Task runs every week on `dayOfWeek` at the specified `time`. */
|
|
13
|
+
Weekly = "weekly",
|
|
14
|
+
/** Task runs every month on `dayOfMonth` at the specified `time`. */
|
|
15
|
+
Monthly = "monthly"
|
|
16
|
+
}
|
|
17
|
+
//# 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,4DAA4D;IAC5D,IAAI,SAAS;IACb,2GAA2G;IAC3G,SAAS,cAAc;CACxB;AAED,0FAA0F;AAC1F,oBAAY,sBAAsB;IAChC,mDAAmD;IACnD,KAAK,UAAU;IACf,mEAAmE;IACnE,MAAM,WAAW;IACjB,qEAAqE;IACrE,OAAO,YAAY;CACpB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Sort keys supported by the Scheduled Tasks toolbar. */
|
|
2
|
+
export declare enum ScheduledTasksSortKey {
|
|
3
|
+
/** Sort by `sortValues.nextRunAt` ascending — earliest next run first. Items with no `nextRunAt` sort last. */
|
|
4
|
+
FirstToRun = "firstToRun",
|
|
5
|
+
/** Sort by `sortValues.nextRunAt` descending — latest next run first. Items with no `nextRunAt` sort last. */
|
|
6
|
+
LastToRun = "lastToRun",
|
|
7
|
+
/** Sort by `sortValues.createdAt` descending — most recently created first. Items with no `createdAt` sort last. */
|
|
8
|
+
Newest = "newest",
|
|
9
|
+
/** Sort by `item.displayName` ascending, case-insensitive. */
|
|
10
|
+
NameAZ = "nameAZ"
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=scheduled-tasks-sort-key.d.ts.map
|
|
@@ -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,+GAA+G;IAC/G,UAAU,eAAe;IACzB,8GAA8G;IAC9G,SAAS,cAAc;IACvB,oHAAoH;IACpH,MAAM,WAAW;IACjB,8DAA8D;IAC9D,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CalendarValue } from '@epam/ai-dial-ui-kit';
|
|
2
|
+
/** Converts the `datetime-local`-style `values.runAt` string to a `Date` for `Calendar`'s controlled value, or `null` when empty. */
|
|
3
|
+
export declare const runAtToCalendarValue: (runAt: string | undefined) => Date | null;
|
|
4
|
+
/** Converts `Calendar`'s `CalendarValue` back to the `datetime-local`-style string `values.runAt` expects. */
|
|
5
|
+
export declare const calendarValueToRunAt: (value: CalendarValue) => string;
|
|
6
|
+
/** Converts `values.dayOfWeek` (`'0'`=Monday..`'6'`=Sunday) to `Calendar`'s `weekday` mode value (ISO `'1'`=Monday..`'7'`=Sunday), or `null` when unset. */
|
|
7
|
+
export declare const dayOfWeekToCalendarValue: (dayOfWeek: string | undefined) => string | null;
|
|
8
|
+
/** Converts `Calendar`'s `weekday` mode `CalendarValue` (ISO `'1'`=Monday..`'7'`=Sunday) back to `values.dayOfWeek` (`'0'`=Monday..`'6'`=Sunday). */
|
|
9
|
+
export declare const calendarValueToDayOfWeek: (value: CalendarValue) => string;
|
|
10
|
+
//# sourceMappingURL=calendar-value.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar-value.d.ts","sourceRoot":"","sources":["../../src/utils/calendar-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAI1D,qIAAqI;AACrI,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,GAAG,SAAS,KAAG,IAAI,GAAG,IACxC,CAAC;AAEjC,8GAA8G;AAC9G,eAAO,MAAM,oBAAoB,GAAI,OAAO,aAAa,KAAG,MAS3D,CAAC;AAEF,4JAA4J;AAC5J,eAAO,MAAM,wBAAwB,GACnC,WAAW,MAAM,GAAG,SAAS,KAC5B,MAAM,GAAG,IAGX,CAAC;AAEF,qJAAqJ;AACrJ,eAAO,MAAM,wBAAwB,GAAI,OAAO,aAAa,KAAG,MAG/D,CAAC"}
|