@epam/ai-dial-scheduled-tasks 1.3.0-dev.141 → 1.3.0-dev.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{calendar-value-B41Uk26Z.js → calendar-value-CjtsOQpy.js} +7 -6
- package/components/ScheduledTaskBoundaryField/ScheduledTaskBoundaryField.d.ts +27 -0
- package/components/ScheduledTaskBoundaryField/ScheduledTaskBoundaryField.d.ts.map +1 -0
- package/components/ScheduledTaskCreateForm/ScheduledTaskCreateForm.d.ts.map +1 -1
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts +5 -1
- package/components/ScheduledTaskDeleteConfirmation/ScheduledTaskDeleteConfirmation.d.ts.map +1 -1
- package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts +5 -1
- package/components/ScheduledTaskRunAtField/ScheduledTaskRunAtField.d.ts.map +1 -1
- package/hooks/usePickerErrorAssociation/usePickerErrorAssociation.d.ts +3 -0
- package/hooks/usePickerErrorAssociation/usePickerErrorAssociation.d.ts.map +1 -0
- package/index.css +1 -1
- package/index.js +682 -640
- package/models/scheduled-task-create-form-props.d.ts +8 -4
- package/models/scheduled-task-create-form-props.d.ts.map +1 -1
- package/package.json +3 -3
- package/utils/calendar-value.d.ts +7 -1
- package/utils/calendar-value.d.ts.map +1 -1
- package/utils/window-boundary.d.ts +4 -0
- package/utils/window-boundary.d.ts.map +1 -0
- package/validation/scheduled-task-validation.d.ts +4 -4
- package/validation/scheduled-task-validation.d.ts.map +1 -1
- package/validation.js +24 -22
|
@@ -25,9 +25,9 @@ export interface ScheduledTaskCreateFormValues {
|
|
|
25
25
|
dayOfMonth?: string;
|
|
26
26
|
/** Minute of the hour (`'0'`-`'59'`) used when `repeat` is `'hourly'`. */
|
|
27
27
|
minute?: string;
|
|
28
|
-
/**
|
|
28
|
+
/** Window-start boundary: `YYYY-MM-DD` for day-based repeats, `YYYY-MM-DDTHH:mm` for `'hourly'`. Ignored when `repeat` is `'oneTime'`. */
|
|
29
29
|
startDate?: string;
|
|
30
|
-
/**
|
|
30
|
+
/** Window-end boundary: `YYYY-MM-DD` for day-based repeats, `YYYY-MM-DDTHH:mm` for `'hourly'`. Ignored when `repeat` is `'oneTime'`. */
|
|
31
31
|
endDate?: string;
|
|
32
32
|
/** Selected deployment id sent to the BFF as `model` (required). */
|
|
33
33
|
modelId: string;
|
|
@@ -77,14 +77,14 @@ export interface ScheduledTaskCreateFormLabels extends TextRefinementLabels {
|
|
|
77
77
|
detailsSectionSubtitle: string;
|
|
78
78
|
/** Section heading for the Configuration column. */
|
|
79
79
|
configurationSectionTitle: string;
|
|
80
|
-
/** Section subtitle for the Configuration column. */
|
|
81
|
-
configurationSectionSubtitle: string;
|
|
82
80
|
/** Display name field label. */
|
|
83
81
|
displayNameLabel: string;
|
|
84
82
|
/** Display name required-field validation message. */
|
|
85
83
|
displayNameRequired: string;
|
|
86
84
|
/** Run-at field label (shown when `repeat` is "oneTime"). */
|
|
87
85
|
runAtLabel: string;
|
|
86
|
+
/** Placeholder shown in the run-at picker when unset. */
|
|
87
|
+
runAtPlaceholder: string;
|
|
88
88
|
/** Time-of-day field label (shown when `repeat` is "daily", "weekly", or "monthly"). */
|
|
89
89
|
timeLabel: string;
|
|
90
90
|
/** Validation message shown under the time field when its visible draft is not a complete `HH:mm` value. */
|
|
@@ -101,10 +101,14 @@ export interface ScheduledTaskCreateFormLabels extends TextRefinementLabels {
|
|
|
101
101
|
minuteLabel: string;
|
|
102
102
|
/** Start-date field label (shown when `repeat` is not "oneTime"; the field itself is optional, so this label carries no required marker). */
|
|
103
103
|
startDateLabel: string;
|
|
104
|
+
/** Start-date-and-time field label (shown when `repeat` is "hourly"; the field itself is optional, so this label carries no required marker). */
|
|
105
|
+
startDateAndTimeLabel: string;
|
|
104
106
|
/** Placeholder shown in the start-date picker when unset. */
|
|
105
107
|
startDatePlaceholder: string;
|
|
106
108
|
/** End-date field label (shown when `repeat` is not "oneTime"; the field itself is optional, so this label carries no required marker). */
|
|
107
109
|
endDateLabel: string;
|
|
110
|
+
/** End-date-and-time field label (shown when `repeat` is "hourly"; the field itself is optional, so this label carries no required marker). */
|
|
111
|
+
endDateAndTimeLabel: string;
|
|
108
112
|
/** Placeholder shown in the end-date picker when unset. */
|
|
109
113
|
endDatePlaceholder: string;
|
|
110
114
|
/** Label for the Model or Agent field, rendered above `modelSelector`. */
|
|
@@ -1 +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,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAE5E,uDAAuD;AACvD,MAAM,WAAW,yBAAyB;IACxC,yFAAyF;IACzF,GAAG,EAAE,mBAAmB,CAAC;IACzB,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,mFAAmF;AACnF,MAAM,WAAW,6BAA6B;IAC5C,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,kCAAkC;IAClC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"scheduled-task-create-form-props.d.ts","sourceRoot":"","sources":["../../src/models/scheduled-task-create-form-props.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,6BAA6B,CAAC;IAC9C,2CAA2C;IAC3C,MAAM,EAAE,6BAA6B,CAAC;IACtC;;;;OAIG;IACH,aAAa,EAAE,SAAS,CAAC;IACzB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB,yEAAyE;IACzE,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,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,4HAA4H;IAC5H,mBAAmB,CAAC,EAAE,YAAY,CAAC;IACnC,sDAAsD;IACtD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uBAAuB;IACvB,MAAM,CAAC,EAAE,6BAA6B,CAAC;CACxC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-scheduled-tasks",
|
|
3
3
|
"description": "Presentational Scheduled Tasks page shell — header, toolbar, and empty state",
|
|
4
|
-
"version": "1.3.0-dev.
|
|
4
|
+
"version": "1.3.0-dev.147",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"@tabler/icons-react": "^3.44.0",
|
|
26
26
|
"@uiw/react-markdown-preview": "^5.2.1",
|
|
27
27
|
"@uiw/react-md-editor": "^4.1.1",
|
|
28
|
-
"@epam/ai-dial-builder-form": "1.3.0-dev.
|
|
28
|
+
"@epam/ai-dial-builder-form": "1.3.0-dev.147"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@epam/ai-dial-chat-shared": "1.3.0-dev.
|
|
31
|
+
"@epam/ai-dial-chat-shared": "1.3.0-dev.147",
|
|
32
32
|
"@epam/ai-dial-ui-kit": "^0.16.0-dev.22",
|
|
33
33
|
"react": "^19.2.8"
|
|
34
34
|
},
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { CalendarValue } from '@epam/ai-dial-ui-kit';
|
|
2
2
|
/** 24-hour `HH:mm` time-of-day, matching the `Calendar` time control's value shape. */
|
|
3
3
|
export declare const TIME_OF_DAY_PATTERN: RegExp;
|
|
4
|
+
/** Separator between the date and time parts of a `datetime-local` value. */
|
|
5
|
+
export declare const DATETIME_LOCAL_SEPARATOR = "T";
|
|
6
|
+
/** Length of a date-only `YYYY-MM-DD` value; longer values carry a `THH:mm` time part. */
|
|
7
|
+
export declare const DATE_ONLY_VALUE_LENGTH = 10;
|
|
8
|
+
/** Whether a value carries a time part (`YYYY-MM-DDTHH:mm`), rather than being date-only `YYYY-MM-DD`. */
|
|
9
|
+
export declare const isDateTimeLocalValue: (value: string) => boolean;
|
|
4
10
|
/** Converts the `datetime-local`-style `values.runAt` string to a `Date` for `Calendar`'s controlled value, or `null` when empty. */
|
|
5
11
|
export declare const runAtToCalendarValue: (runAt: string | undefined) => Date | null;
|
|
6
12
|
/** Converts `Calendar`'s `CalendarValue` back to the `datetime-local`-style string `values.runAt` expects. */
|
|
7
13
|
export declare const calendarValueToRunAt: (value: CalendarValue) => string;
|
|
8
|
-
/** Converts a `YYYY-MM-DD`
|
|
14
|
+
/** Converts a window-boundary value — date-only `YYYY-MM-DD` or hourly `YYYY-MM-DDTHH:mm` — to a `Date` for `Calendar`'s controlled value, or `null` when empty. */
|
|
9
15
|
export declare const dateValueToCalendarValue: (dateValue: string | undefined) => Date | null;
|
|
10
16
|
/** Converts `Calendar`'s `CalendarValue` back to a `YYYY-MM-DD` date-only string, distinct from `calendarValueToRunAt`'s `datetime-local` output. */
|
|
11
17
|
export declare const calendarValueToDateValue: (value: CalendarValue) => string;
|
|
@@ -1 +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,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,QAAgC,CAAC;AAEjE,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;AAQF,
|
|
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,uFAAuF;AACvF,eAAO,MAAM,mBAAmB,QAAgC,CAAC;AAEjE,6EAA6E;AAC7E,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C,0FAA0F;AAC1F,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,0GAA0G;AAC1G,eAAO,MAAM,oBAAoB,GAAI,OAAO,MAAM,KAAG,OACd,CAAC;AAExC,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;AAQF,oKAAoK;AACpK,eAAO,MAAM,wBAAwB,GACnC,WAAW,MAAM,GAAG,SAAS,KAC5B,IAAI,GAAG,IAWT,CAAC;AAEF,qJAAqJ;AACrJ,eAAO,MAAM,wBAAwB,GAAI,OAAO,aAAa,KAAG,MAS/D,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"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ScheduledTaskRepeat } from '../types/scheduled-task-schedule';
|
|
2
|
+
/** Returns the boundary value to keep after a repeat switch: the value itself when both cadences pick whole days (day-based repeats, and one-time whose boundary fields stay hidden), `undefined` when the switch crosses into or out of hourly. */
|
|
3
|
+
export declare const keepWindowBoundaryOnRepeatSwitch: (value: string | undefined, currentRepeat: ScheduledTaskRepeat, nextRepeat: ScheduledTaskRepeat) => string | undefined;
|
|
4
|
+
//# sourceMappingURL=window-boundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window-boundary.d.ts","sourceRoot":"","sources":["../../src/utils/window-boundary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAcvE,oPAAoP;AACpP,eAAO,MAAM,gCAAgC,GAC3C,OAAO,MAAM,GAAG,SAAS,EACzB,eAAe,mBAAmB,EAClC,YAAY,mBAAmB,KAC9B,MAAM,GAAG,SAKX,CAAC"}
|
|
@@ -21,10 +21,10 @@ export declare enum ScheduledTaskValidationErrorCode {
|
|
|
21
21
|
DayOfWeekInvalid = "dayOfWeekInvalid",
|
|
22
22
|
DayOfMonthInvalid = "dayOfMonthInvalid",
|
|
23
23
|
StartDateInvalid = "startDateInvalid",
|
|
24
|
-
/** The activity-window start
|
|
24
|
+
/** The activity-window start boundary is earlier than the clock — its day earlier than today for a date-only value, its instant earlier than now for a time-carrying one — and differs from the option's original. */
|
|
25
25
|
StartDateInPast = "startDateInPast",
|
|
26
26
|
EndDateInvalid = "endDateInvalid",
|
|
27
|
-
/** The activity-window end
|
|
27
|
+
/** The activity-window end boundary is earlier than the clock — its day earlier than today for a date-only value, its instant earlier than now for a time-carrying one — and differs from the option's original. */
|
|
28
28
|
EndDateInPast = "endDateInPast"
|
|
29
29
|
}
|
|
30
30
|
/** Field-keyed validation result for scheduled-task create and edit values. */
|
|
@@ -35,9 +35,9 @@ export interface ScheduledTaskValidationOptions {
|
|
|
35
35
|
minimumLeadMs?: number;
|
|
36
36
|
/** Explicit capability of the draft's selected model; omitted means unsupported. */
|
|
37
37
|
isSkillsSupported?: boolean;
|
|
38
|
-
/** Activity-window start
|
|
38
|
+
/** Activity-window start boundary the edit form was hydrated with, in the hydrated boundary's shape (`YYYY-MM-DD`, or `YYYY-MM-DDTHH:mm` for Hourly); an unchanged original is exempt from the past-date rule. */
|
|
39
39
|
originalStartDate?: string;
|
|
40
|
-
/** Activity-window end
|
|
40
|
+
/** Activity-window end boundary the edit form was hydrated with, in the hydrated boundary's shape (`YYYY-MM-DD`, or `YYYY-MM-DDTHH:mm` for Hourly); an unchanged original is exempt from the past-date rule. */
|
|
41
41
|
originalEndDate?: string;
|
|
42
42
|
}
|
|
43
43
|
/** Scheduled-task form fields that carry free text with a length limit. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduled-task-validation.d.ts","sourceRoot":"","sources":["../../src/validation/scheduled-task-validation.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;
|
|
1
|
+
{"version":3,"file":"scheduled-task-validation.d.ts","sourceRoot":"","sources":["../../src/validation/scheduled-task-validation.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAShG,6EAA6E;AAC7E,oBAAY,gCAAgC;IAC1C,mBAAmB,wBAAwB;IAC3C,oEAAoE;IACpE,kBAAkB,uBAAuB;IACzC,0EAA0E;IAC1E,4BAA4B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ENGTH as
|
|
1
|
+
import { l as e, s as t, t as n } from "./calendar-value-CjtsOQpy.js";
|
|
2
|
+
import { ENTITY_INSTRUCTIONS_MAX_LENGTH as r, ENTITY_NAME_MAX_LENGTH as i, exceedsMaxLength as a, hasControlCharacters as o, isSkillSelectionUnsupported as s } from "@epam/ai-dial-chat-shared";
|
|
3
3
|
//#region src/validation/scheduled-task-validation.ts
|
|
4
|
-
var
|
|
4
|
+
var c = /* @__PURE__ */ function(e) {
|
|
5
5
|
return e.DisplayNameRequired = "displayNameRequired", e.DisplayNameTooLong = "displayNameTooLong", e.DisplayNameControlCharacters = "displayNameControlCharacters", e.ModelRequired = "modelRequired", e.PromptRequired = "promptRequired", e.PromptTooLong = "promptTooLong", e.InstructionsOrSkillRequired = "instructionsOrSkillRequired", e.SkillUnsupported = "skillUnsupported", e.DescriptionTooLong = "descriptionTooLong", e.RunAtInvalid = "runAtInvalid", e.TimeInvalid = "timeInvalid", e.MinuteInvalid = "minuteInvalid", e.DayOfWeekInvalid = "dayOfWeekInvalid", e.DayOfMonthInvalid = "dayOfMonthInvalid", e.StartDateInvalid = "startDateInvalid", e.StartDateInPast = "startDateInPast", e.EndDateInvalid = "endDateInvalid", e.EndDateInPast = "endDateInPast", e;
|
|
6
|
-
}({}),
|
|
7
|
-
let
|
|
6
|
+
}({}), l = (e, t) => {
|
|
7
|
+
let n = t?.trim() ?? "";
|
|
8
8
|
switch (e) {
|
|
9
|
-
case "displayName": return
|
|
10
|
-
case "description": return
|
|
11
|
-
case "prompt": return
|
|
9
|
+
case "displayName": return a(n, i) ? "displayNameTooLong" : o(n) ? "displayNameControlCharacters" : void 0;
|
|
10
|
+
case "description": return a(n, 500) ? "descriptionTooLong" : void 0;
|
|
11
|
+
case "prompt": return a(n, r) ? "promptTooLong" : void 0;
|
|
12
12
|
}
|
|
13
|
-
},
|
|
14
|
-
if (!
|
|
13
|
+
}, u = 6e4, d = /^(?:[0-9]|[1-5][0-9])$/, f = /^[0-6]$/, p = /^(?:[1-9]|[12][0-9]|3[01])$/, m = /^\d{4}-\d{2}-\d{2}$/, h = /^\d{4}-\d{2}-\d{2}T([01]\d|2[0-3]):([0-5]\d)$/, g = (e) => {
|
|
14
|
+
if (!m.test(e)) return !1;
|
|
15
15
|
let [t, n, r] = e.split("-").map(Number), i = new Date(t, n - 1, r);
|
|
16
16
|
return i.getFullYear() === t && i.getMonth() === n - 1 && i.getDate() === r;
|
|
17
|
-
}, h = (e) => {
|
|
17
|
+
}, _ = (e) => g(e.slice(0, 10)) ? !t(e) || h.test(e) && Number.isFinite(new Date(e).getTime()) : !1, v = (e) => {
|
|
18
18
|
let t = new Date(e).getTime();
|
|
19
19
|
return Number.isFinite(t);
|
|
20
|
-
},
|
|
21
|
-
let
|
|
22
|
-
let n =
|
|
23
|
-
n && (
|
|
20
|
+
}, y = (e) => String(e).padStart(2, "0"), b = (e) => `${e.getFullYear()}-${y(e.getMonth() + 1)}-${y(e.getDate())}`, x = (e) => `${b(e)}T${y(e.getHours())}:${y(e.getMinutes())}`, S = (e, n, r) => e < (t(e) ? r : n), C = (r, { now: i, minimumLeadMs: a = u, isSkillsSupported: o, originalStartDate: c, originalEndDate: m }) => {
|
|
21
|
+
let h = {}, g = (e, t) => {
|
|
22
|
+
let n = l(e, t);
|
|
23
|
+
n && (h[e] = n);
|
|
24
24
|
};
|
|
25
|
-
if (
|
|
26
|
-
let e =
|
|
27
|
-
return (!
|
|
25
|
+
if (r.displayName.trim() ? g("displayName", r.displayName) : h.displayName = "displayNameRequired", r.modelId.trim() || (h.modelId = "modelRequired"), !r.prompt.trim() && !r.skillUrls?.length ? h.prompt = "instructionsOrSkillRequired" : g("prompt", r.prompt), r.skillUrls?.some((e) => s(e, o)) && (h.skillUrls = "skillUnsupported"), g("description", r.description), r.repeat === e.OneTime) {
|
|
26
|
+
let e = r.runAt ? new Date(r.runAt).getTime() : NaN;
|
|
27
|
+
return (!r.runAt || !v(r.runAt) || !Number.isFinite(e) || e < i.getTime() + a) && (h.runAt = "runAtInvalid"), h;
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
let y =
|
|
31
|
-
|
|
29
|
+
r.repeat === e.Hourly ? d.test(r.minute ?? "") || (h.minute = "minuteInvalid") : n.test(r.time) || (h.time = "timeInvalid"), r.repeat === e.Weekly && !f.test(r.dayOfWeek ?? "") && (h.dayOfWeek = "dayOfWeekInvalid"), r.repeat === e.Monthly && !p.test(r.dayOfMonth ?? "") && (h.dayOfMonth = "dayOfMonthInvalid"), r.startDate && !_(r.startDate) && (h.startDate = "startDateInvalid"), r.endDate && !_(r.endDate) && (h.endDate = "endDateInvalid");
|
|
30
|
+
let y = r.repeat === e.Hourly, C = (e) => t(e) !== y;
|
|
31
|
+
r.startDate && _(r.startDate) && C(r.startDate) && (h.startDate = "startDateInvalid"), r.endDate && _(r.endDate) && C(r.endDate) && (h.endDate = "endDateInvalid"), r.startDate && r.endDate && _(r.startDate) && _(r.endDate) && r.endDate < r.startDate && (h.endDate = "endDateInvalid");
|
|
32
|
+
let w = b(i), T = x(i);
|
|
33
|
+
return r.startDate && r.startDate !== c && _(r.startDate) && S(r.startDate, w, T) && (h.startDate = "startDateInPast"), r.endDate && r.endDate !== m && _(r.endDate) && S(r.endDate, w, T) && (h.endDate = "endDateInPast"), h;
|
|
32
34
|
};
|
|
33
35
|
//#endregion
|
|
34
|
-
export {
|
|
36
|
+
export { c as ScheduledTaskValidationErrorCode, C as validateScheduledTaskFormValues, l as validateScheduledTaskTextField };
|