@dereekb/date 10.1.28 → 10.1.30
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/index.cjs.js +4 -12
- package/index.esm.js +5 -13
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3878,9 +3878,7 @@ function IsKnownTimezone(validationOptions) {
|
|
|
3878
3878
|
options: validationOptions,
|
|
3879
3879
|
validator: {
|
|
3880
3880
|
validate: isKnownTimezone,
|
|
3881
|
-
defaultMessage(args) {
|
|
3882
|
-
return `"${args.value}" is not a known timezone.`;
|
|
3883
|
-
}
|
|
3881
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args === null || args === void 0 ? void 0 : args.value}" is not a known timezone.`, validationOptions)
|
|
3884
3882
|
}
|
|
3885
3883
|
});
|
|
3886
3884
|
};
|
|
@@ -7371,9 +7369,7 @@ function IsValidDateCellTiming(validationOptions) {
|
|
|
7371
7369
|
options: validationOptions,
|
|
7372
7370
|
validator: {
|
|
7373
7371
|
validate: isValidDateCellTiming,
|
|
7374
|
-
defaultMessage(args) {
|
|
7375
|
-
return `"${JSON.stringify(args.value)}" is not a valid DateCellTiming.`;
|
|
7376
|
-
}
|
|
7372
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${JSON.stringify(args === null || args === void 0 ? void 0 : args.value)}" is not a valid DateCellTiming.`, validationOptions)
|
|
7377
7373
|
}
|
|
7378
7374
|
});
|
|
7379
7375
|
};
|
|
@@ -7390,9 +7386,7 @@ function IsValidDateCellRange(validationOptions) {
|
|
|
7390
7386
|
options: validationOptions,
|
|
7391
7387
|
validator: {
|
|
7392
7388
|
validate: isValidDateCellRange,
|
|
7393
|
-
defaultMessage(args) {
|
|
7394
|
-
return `"${JSON.stringify(args.value)}" is not a valid DateCellRange.`;
|
|
7395
|
-
}
|
|
7389
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${JSON.stringify(args === null || args === void 0 ? void 0 : args.value)}" is not a valid DateCellRange.`, validationOptions)
|
|
7396
7390
|
}
|
|
7397
7391
|
});
|
|
7398
7392
|
};
|
|
@@ -7409,9 +7403,7 @@ function IsValidDateCellRangeSeries(validationOptions) {
|
|
|
7409
7403
|
options: validationOptions,
|
|
7410
7404
|
validator: {
|
|
7411
7405
|
validate: isValidDateCellRangeSeries,
|
|
7412
|
-
defaultMessage(args) {
|
|
7413
|
-
return `"${JSON.stringify(args.value)}" is not a valid DateCellRange series. Items must be sorted in ascending order and have no repeat indexes.`;
|
|
7414
|
-
}
|
|
7406
|
+
defaultMessage: classValidator.buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${JSON.stringify(args === null || args === void 0 ? void 0 : args.value)}" is not a valid DateCellRange series. Items must be sorted in ascending order and have no repeat indexes.`, validationOptions)
|
|
7415
7407
|
}
|
|
7416
7408
|
});
|
|
7417
7409
|
};
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MS_IN_HOUR, MS_IN_MINUTE, MINUTES_IN_DAY, isISO8601DateString, filterMaybeValues, asArray, dayOfWeek, sortNumbersAscendingFunction, SORT_VALUE_LESS_THAN, SORT_VALUE_GREATER_THAN, SORT_VALUE_EQUAL, copyArray, compareFnOrder, groupValues, daysOfWeekArray, MS_IN_DAY, minutesToFractionalHours, safeCompareEquality, UTC_TIMEZONE_STRING, isSameNonNullValue, isConsideredUtcTimezoneString, parseISO8601DayStringToUTCDate, cachedGetter, replaceStringsFunction, mapIdentityFunction, repeatString, startOfDayForUTCDateInUTC, sortAscendingIndexNumberRefFunction, range, pushArrayItemsIntoArray, sumOfIntegersBetween, makeValuesGroupMap, lastValue, asGetter, indexRangeCheckFunction, mergeFilterFunctions, isDate as isDate$2, HOURS_IN_DAY, getNextDay, enabledDaysFromDaysOfWeek, daysOfWeekFromEnabledDays, firstValueFromIterable, forEachInIterable, addToSet, iterablesAreSetEquivalent, invertFilter, HashSet, DATE_NOW_VALUE, roundNumberUpToStep, protectedFactory, MS_IN_SECOND, TimeAM, isLogicalDateStringCode as isLogicalDateStringCode$1, dateFromLogicalDate as dateFromLogicalDate$1, flattenArray, splitJoinRemainder } from '@dereekb/util';
|
|
2
2
|
import { isDate as isDate$1, startOfMinute, isValid, parseISO, min as min$5, max as max$2, isAfter as isAfter$1, isBefore as isBefore$1, isEqual, isSameDay, isPast, addDays, set as set$1, differenceInDays, startOfMonth, endOfWeek, startOfWeek, endOfMonth, addHours, addMinutes, addMilliseconds, startOfDay, addMonths, addWeeks, endOfDay, endOfHour, startOfHour, endOfMinute, minutesToHours, formatDistanceStrict, formatDistance, format as format$1, differenceInMinutes, formatDistanceToNow, parse, getMinutes, getSeconds, getMilliseconds, differenceInMilliseconds, differenceInHours, getWeek, getYear, setWeek, getDay, addSeconds } from 'date-fns';
|
|
3
3
|
import { Expose, Type, Exclude } from 'class-transformer';
|
|
4
|
-
import { IsDate, IsEnum, IsOptional, IsNumber, Min, registerDecorator, IsString, Matches, IsArray, IsBoolean } from 'class-validator';
|
|
4
|
+
import { IsDate, IsEnum, IsOptional, IsNumber, Min, registerDecorator, buildMessage, IsString, Matches, IsArray, IsBoolean } from 'class-validator';
|
|
5
5
|
import { utcToZonedTime, format, formatInTimeZone } from 'date-fns-tz';
|
|
6
6
|
import { timeZonesNames } from '@vvo/tzdb';
|
|
7
7
|
import { interval, startWith, map, distinctUntilChanged, filter, switchMap, takeWhile, skipWhile } from 'rxjs';
|
|
@@ -4123,9 +4123,7 @@ function IsKnownTimezone(validationOptions) {
|
|
|
4123
4123
|
options: validationOptions,
|
|
4124
4124
|
validator: {
|
|
4125
4125
|
validate: isKnownTimezone,
|
|
4126
|
-
defaultMessage(args) {
|
|
4127
|
-
return `"${args.value}" is not a known timezone.`;
|
|
4128
|
-
}
|
|
4126
|
+
defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${args == null ? void 0 : args.value}" is not a known timezone.`, validationOptions)
|
|
4129
4127
|
}
|
|
4130
4128
|
});
|
|
4131
4129
|
};
|
|
@@ -8265,9 +8263,7 @@ function IsValidDateCellTiming(validationOptions) {
|
|
|
8265
8263
|
options: validationOptions,
|
|
8266
8264
|
validator: {
|
|
8267
8265
|
validate: isValidDateCellTiming,
|
|
8268
|
-
defaultMessage(args) {
|
|
8269
|
-
return `"${JSON.stringify(args.value)}" is not a valid DateCellTiming.`;
|
|
8270
|
-
}
|
|
8266
|
+
defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${JSON.stringify(args == null ? void 0 : args.value)}" is not a valid DateCellTiming.`, validationOptions)
|
|
8271
8267
|
}
|
|
8272
8268
|
});
|
|
8273
8269
|
};
|
|
@@ -8285,9 +8281,7 @@ function IsValidDateCellRange(validationOptions) {
|
|
|
8285
8281
|
options: validationOptions,
|
|
8286
8282
|
validator: {
|
|
8287
8283
|
validate: isValidDateCellRange,
|
|
8288
|
-
defaultMessage(args) {
|
|
8289
|
-
return `"${JSON.stringify(args.value)}" is not a valid DateCellRange.`;
|
|
8290
|
-
}
|
|
8284
|
+
defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${JSON.stringify(args == null ? void 0 : args.value)}" is not a valid DateCellRange.`, validationOptions)
|
|
8291
8285
|
}
|
|
8292
8286
|
});
|
|
8293
8287
|
};
|
|
@@ -8305,9 +8299,7 @@ function IsValidDateCellRangeSeries(validationOptions) {
|
|
|
8305
8299
|
options: validationOptions,
|
|
8306
8300
|
validator: {
|
|
8307
8301
|
validate: isValidDateCellRangeSeries,
|
|
8308
|
-
defaultMessage(args) {
|
|
8309
|
-
return `"${JSON.stringify(args.value)}" is not a valid DateCellRange series. Items must be sorted in ascending order and have no repeat indexes.`;
|
|
8310
|
-
}
|
|
8302
|
+
defaultMessage: buildMessage((eachPrefix, args) => eachPrefix + `$property value of "${JSON.stringify(args == null ? void 0 : args.value)}" is not a valid DateCellRange series. Items must be sorted in ascending order and have no repeat indexes.`, validationOptions)
|
|
8311
8303
|
}
|
|
8312
8304
|
});
|
|
8313
8305
|
};
|