@dereekb/date 9.25.15 → 10.0.0

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +9 -17
  3. package/src/lib/date/date.calendar.d.ts +1 -1
  4. package/src/lib/date/date.calendar.js +2 -2
  5. package/src/lib/date/date.calendar.js.map +1 -1
  6. package/src/lib/date/date.cell.d.ts +16 -32
  7. package/src/lib/date/date.cell.factory.d.ts +15 -15
  8. package/src/lib/date/date.cell.factory.js +1 -1
  9. package/src/lib/date/date.cell.factory.js.map +1 -1
  10. package/src/lib/date/date.cell.filter.d.ts +2 -2
  11. package/src/lib/date/date.cell.filter.js.map +1 -1
  12. package/src/lib/date/date.cell.index.d.ts +12 -12
  13. package/src/lib/date/date.cell.index.js +2 -2
  14. package/src/lib/date/date.cell.index.js.map +1 -1
  15. package/src/lib/date/date.cell.js +4 -21
  16. package/src/lib/date/date.cell.js.map +1 -1
  17. package/src/lib/date/date.cell.schedule.d.ts +12 -12
  18. package/src/lib/date/date.cell.schedule.js +4 -4
  19. package/src/lib/date/date.cell.schedule.js.map +1 -1
  20. package/src/lib/date/date.cell.week.d.ts +3 -3
  21. package/src/lib/date/date.d.ts +3 -15
  22. package/src/lib/date/date.day.d.ts +9 -9
  23. package/src/lib/date/date.duration.d.ts +1 -5
  24. package/src/lib/date/date.duration.js +2 -7
  25. package/src/lib/date/date.duration.js.map +1 -1
  26. package/src/lib/date/date.format.d.ts +10 -13
  27. package/src/lib/date/date.format.js +3 -12
  28. package/src/lib/date/date.format.js.map +1 -1
  29. package/src/lib/date/date.js +1 -17
  30. package/src/lib/date/date.js.map +1 -1
  31. package/src/lib/date/date.logical.d.ts +6 -6
  32. package/src/lib/date/date.range.d.ts +14 -35
  33. package/src/lib/date/date.range.js +4 -27
  34. package/src/lib/date/date.range.js.map +1 -1
  35. package/src/lib/date/date.range.timezone.d.ts +1 -8
  36. package/src/lib/date/date.range.timezone.js +7 -6
  37. package/src/lib/date/date.range.timezone.js.map +1 -1
  38. package/src/lib/date/date.sort.d.ts +2 -2
  39. package/src/lib/date/date.time.js.map +1 -1
  40. package/src/lib/date/date.time.limit.d.ts +0 -8
  41. package/src/lib/date/date.time.limit.js +0 -10
  42. package/src/lib/date/date.time.limit.js.map +1 -1
  43. package/src/lib/date/date.time.minute.d.ts +2 -9
  44. package/src/lib/date/date.time.minute.js +2 -11
  45. package/src/lib/date/date.time.minute.js.map +1 -1
  46. package/src/lib/date/date.timezone.d.ts +13 -17
  47. package/src/lib/date/date.timezone.js +13 -18
  48. package/src/lib/date/date.timezone.js.map +1 -1
  49. package/src/lib/date/date.week.d.ts +13 -17
  50. package/src/lib/date/date.week.js +1 -6
  51. package/src/lib/date/date.week.js.map +1 -1
  52. package/src/lib/date/index.d.ts +0 -5
  53. package/src/lib/date/index.js +0 -5
  54. package/src/lib/date/index.js.map +1 -1
  55. package/src/lib/query/query.builder.d.ts +4 -4
  56. package/src/lib/query/query.builder.mongo.d.ts +1 -1
  57. package/src/lib/rrule/date.recurrence.d.ts +1 -1
  58. package/src/lib/rrule/date.recurrence.js +2 -3
  59. package/src/lib/rrule/date.recurrence.js.map +1 -1
  60. package/src/lib/rrule/date.rrule.d.ts +1 -1
  61. package/src/lib/rrule/date.rrule.js +14 -14
  62. package/src/lib/rrule/date.rrule.js.map +1 -1
  63. package/src/lib/rrule/date.rrule.parse.d.ts +10 -10
  64. package/src/lib/date/date.block.d.ts +0 -1388
  65. package/src/lib/date/date.block.day.d.ts +0 -10
  66. package/src/lib/date/date.block.day.js +0 -16
  67. package/src/lib/date/date.block.day.js.map +0 -1
  68. package/src/lib/date/date.block.js +0 -1849
  69. package/src/lib/date/date.block.js.map +0 -1
  70. package/src/lib/date/date.block.validator.d.ts +0 -20
  71. package/src/lib/date/date.block.validator.js +0 -72
  72. package/src/lib/date/date.block.validator.js.map +0 -1
  73. package/src/lib/date/date.block.week.d.ts +0 -44
  74. package/src/lib/date/date.block.week.js +0 -46
  75. package/src/lib/date/date.block.week.js.map +0 -1
  76. package/src/lib/date/date.filter.d.ts +0 -7
  77. package/src/lib/date/date.filter.js +0 -28
  78. package/src/lib/date/date.filter.js.map +0 -1
  79. package/src/lib/date/date.schedule.d.ts +0 -431
  80. package/src/lib/date/date.schedule.js +0 -553
  81. package/src/lib/date/date.schedule.js.map +0 -1
@@ -1,553 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.expandDateScheduleEncodedWeek = exports.dateScheduleDayCodes = exports.expandDateScheduleRangeToDateBlockRanges = exports.expandDateScheduleRange = exports.dateBlockTimingForExpandDateScheduleRangeInput = exports.expandDateSchedule = exports.expandDateScheduleFactory = exports.dateScheduleDateBlockTimingFilter = exports.dateScheduleDateFilter = exports.copyDateScheduleDateFilterConfig = exports.dateBlockTimingForDateScheduleRange = exports.isSameDateScheduleRange = exports.DateSchedule = exports.isSameDateSchedule = exports.dateScheduleDayCodesAreSetsEquivalent = exports.dateScheduleDayCodeFactory = exports.rawDateScheduleDayCodes = exports.expandDateScheduleDayCodesToDayCodesSet = exports.expandDateScheduleDayCodes = exports.dateScheduleDayCodesSetFromDaysOfWeek = exports.expandDateScheduleDayCodesToDayOfWeekSet = exports.simplifyDateScheduleDayCodes = exports.dateScheduleEncodedWeek = exports.isEmptyDateScheduleEncodedWeek = exports.isDateScheduleEncodedWeek = exports.DATE_SCHEDULE_ENCODED_WEEK_REGEX = exports.dateScheduleDayCodesFromEnabledDays = exports.enabledDaysFromDateScheduleDayCodes = exports.weekendDateScheduleDayCodes = exports.weekdayDateScheduleDayCodes = exports.fullWeekDayScheduleDayCodes = exports.DateScheduleDayCode = void 0;
4
- const tslib_1 = require("tslib");
5
- const util_1 = require("@dereekb/util");
6
- const class_transformer_1 = require("class-transformer");
7
- const class_validator_1 = require("class-validator");
8
- const date_fns_1 = require("date-fns");
9
- const date_block_1 = require("./date.block");
10
- const date_filter_1 = require("./date.filter");
11
- const date_range_1 = require("./date.range");
12
- const date_week_1 = require("./date.week");
13
- /**
14
- * @deprecated use DateCellScheduleDayCode instead
15
- */
16
- var DateScheduleDayCode;
17
- (function (DateScheduleDayCode) {
18
- /**
19
- * Special no-op/unused code
20
- */
21
- DateScheduleDayCode[DateScheduleDayCode["NONE"] = 0] = "NONE";
22
- DateScheduleDayCode[DateScheduleDayCode["SUNDAY"] = 1] = "SUNDAY";
23
- DateScheduleDayCode[DateScheduleDayCode["MONDAY"] = 2] = "MONDAY";
24
- DateScheduleDayCode[DateScheduleDayCode["TUESDAY"] = 3] = "TUESDAY";
25
- DateScheduleDayCode[DateScheduleDayCode["WEDNESDAY"] = 4] = "WEDNESDAY";
26
- DateScheduleDayCode[DateScheduleDayCode["THURSDAY"] = 5] = "THURSDAY";
27
- DateScheduleDayCode[DateScheduleDayCode["FRIDAY"] = 6] = "FRIDAY";
28
- DateScheduleDayCode[DateScheduleDayCode["SATURDAY"] = 7] = "SATURDAY";
29
- /**
30
- * All weekdays (Mon-Fri)
31
- */
32
- DateScheduleDayCode[DateScheduleDayCode["WEEKDAY"] = 8] = "WEEKDAY";
33
- /**
34
- * All weekend days (Sat/Sun)
35
- */
36
- DateScheduleDayCode[DateScheduleDayCode["WEEKEND"] = 9] = "WEEKEND";
37
- })(DateScheduleDayCode = exports.DateScheduleDayCode || (exports.DateScheduleDayCode = {}));
38
- /**
39
- * @deprecated use DateCell implementation instead.
40
- */
41
- function fullWeekDayScheduleDayCodes() {
42
- return [DateScheduleDayCode.WEEKDAY, DateScheduleDayCode.WEEKEND];
43
- }
44
- exports.fullWeekDayScheduleDayCodes = fullWeekDayScheduleDayCodes;
45
- /**
46
- * @deprecated use DateCell implementation instead.
47
- */
48
- function weekdayDateScheduleDayCodes() {
49
- return [DateScheduleDayCode.MONDAY, DateScheduleDayCode.TUESDAY, DateScheduleDayCode.WEDNESDAY, DateScheduleDayCode.THURSDAY, DateScheduleDayCode.FRIDAY];
50
- }
51
- exports.weekdayDateScheduleDayCodes = weekdayDateScheduleDayCodes;
52
- /**
53
- * @deprecated use DateCell implementation instead.
54
- */
55
- function weekendDateScheduleDayCodes() {
56
- return [DateScheduleDayCode.SATURDAY, DateScheduleDayCode.SUNDAY];
57
- }
58
- exports.weekendDateScheduleDayCodes = weekendDateScheduleDayCodes;
59
- /**
60
- * Creates an EnabledDays from the input.
61
- *
62
- * @deprecated use DateCell implementation instead.
63
- * @param input
64
- * @returns
65
- */
66
- function enabledDaysFromDateScheduleDayCodes(input) {
67
- const days = expandDateScheduleDayCodesToDayOfWeekSet(Array.from(new Set(input)));
68
- return (0, util_1.enabledDaysFromDaysOfWeek)(days);
69
- }
70
- exports.enabledDaysFromDateScheduleDayCodes = enabledDaysFromDateScheduleDayCodes;
71
- /**
72
- * Creates an array of simplified DateScheduleDayCode[] values from the input.
73
- *
74
- * @deprecated use DateCell implementation instead.
75
- * @param input
76
- * @returns
77
- */
78
- function dateScheduleDayCodesFromEnabledDays(input) {
79
- const days = (0, util_1.daysOfWeekFromEnabledDays)(input);
80
- const scheduleDayCodes = days.map((x) => x + 1);
81
- return simplifyDateScheduleDayCodes(scheduleDayCodes);
82
- }
83
- exports.dateScheduleDayCodesFromEnabledDays = dateScheduleDayCodesFromEnabledDays;
84
- /**
85
- * @deprecated use DateCell implementation instead.
86
- */
87
- exports.DATE_SCHEDULE_ENCODED_WEEK_REGEX = /^[0-9]{0,9}$/;
88
- /**
89
- * Returns true if the input is a DateScheduleEncodedWeek.
90
- *
91
- * @deprecated use DateCell implementation instead.
92
- * @param input
93
- * @returns
94
- */
95
- function isDateScheduleEncodedWeek(input) {
96
- return exports.DATE_SCHEDULE_ENCODED_WEEK_REGEX.test(input);
97
- }
98
- exports.isDateScheduleEncodedWeek = isDateScheduleEncodedWeek;
99
- /**
100
- * Returns true if the input string represents an empty DateScheduleEncodedWeek.
101
- *
102
- * @deprecated use DateCell implementation instead.
103
- * @param input
104
- * @returns
105
- */
106
- function isEmptyDateScheduleEncodedWeek(input) {
107
- return input === '' || input === '0';
108
- }
109
- exports.isEmptyDateScheduleEncodedWeek = isEmptyDateScheduleEncodedWeek;
110
- /**
111
- * Creates a DateScheduleEncodedWeek from an array of DateScheduleDayCode values.
112
- *
113
- * The returned encoded week is simplified.
114
- *
115
- * @deprecated use DateCell implementation instead.
116
- * @param codes
117
- */
118
- function dateScheduleEncodedWeek(codes) {
119
- const result = simplifyDateScheduleDayCodes(codes);
120
- return result.join('');
121
- }
122
- exports.dateScheduleEncodedWeek = dateScheduleEncodedWeek;
123
- /**
124
- * Reduces/merges any day codes into more simplified day codes.
125
- *
126
- * For instance, if all days of the week are selected, they will be reduced to "8".
127
- *
128
- * @deprecated use DateCell implementation instead.
129
- * @param codes
130
- * @returns
131
- */
132
- function simplifyDateScheduleDayCodes(codes) {
133
- const codesSet = new Set(codes);
134
- const result = [];
135
- if (codesSet.size >= 2) {
136
- let weekDays;
137
- let hasAllWeekDays = codesSet.has(DateScheduleDayCode.WEEKDAY);
138
- if (!hasAllWeekDays) {
139
- weekDays = (0, util_1.range)(DateScheduleDayCode.MONDAY, DateScheduleDayCode.SATURDAY).filter((code) => codesSet.has(code));
140
- hasAllWeekDays = weekDays.length === 5;
141
- }
142
- const hasSaturday = codesSet.has(DateScheduleDayCode.SATURDAY);
143
- const hasSunday = codesSet.has(DateScheduleDayCode.SUNDAY);
144
- const hasAllWeekendDays = codesSet.has(DateScheduleDayCode.WEEKEND) || (hasSaturday && hasSunday);
145
- if (!hasAllWeekendDays && hasSunday) {
146
- result.push(DateScheduleDayCode.SUNDAY);
147
- }
148
- if (!hasAllWeekDays) {
149
- (0, util_1.mergeArrayIntoArray)(result, weekDays);
150
- }
151
- if (!hasAllWeekendDays && hasSaturday) {
152
- result.push(DateScheduleDayCode.SATURDAY);
153
- }
154
- if (hasAllWeekDays) {
155
- result.push(DateScheduleDayCode.WEEKDAY);
156
- }
157
- if (hasAllWeekendDays) {
158
- result.push(DateScheduleDayCode.WEEKEND);
159
- }
160
- }
161
- else {
162
- const only = (0, util_1.firstValueFromIterable)(codesSet);
163
- if (only) {
164
- result.push(only);
165
- }
166
- }
167
- return result;
168
- }
169
- exports.simplifyDateScheduleDayCodes = simplifyDateScheduleDayCodes;
170
- /**
171
- * Expands the input DateScheduleDayCodesInput to a Set of DayOfWeek values.
172
- *
173
- * @deprecated use DateCell implementation instead.
174
- * @param input
175
- * @returns
176
- */
177
- function expandDateScheduleDayCodesToDayOfWeekSet(input) {
178
- const days = new Set();
179
- const dayCodesSet = expandDateScheduleDayCodesToDayCodesSet(input);
180
- (0, util_1.forEachInIterable)(dayCodesSet, (code) => {
181
- days.add((code - 1));
182
- });
183
- return days;
184
- }
185
- exports.expandDateScheduleDayCodesToDayOfWeekSet = expandDateScheduleDayCodesToDayOfWeekSet;
186
- /**
187
- *
188
- * @deprecated use DateCell implementation instead.
189
- * @param input
190
- * @returns
191
- */
192
- function dateScheduleDayCodesSetFromDaysOfWeek(input) {
193
- const codes = new Set();
194
- (0, util_1.forEachInIterable)(input, (code) => {
195
- codes.add((code + 1));
196
- });
197
- return codes;
198
- }
199
- exports.dateScheduleDayCodesSetFromDaysOfWeek = dateScheduleDayCodesSetFromDaysOfWeek;
200
- /**
201
- * Expands the input into an array of DateScheduleDayCode values.
202
- *
203
- * @deprecated use DateCell implementation instead.
204
- * @param input
205
- * @returns
206
- */
207
- function expandDateScheduleDayCodes(input) {
208
- return Array.from(expandDateScheduleDayCodesToDayCodesSet(input));
209
- }
210
- exports.expandDateScheduleDayCodes = expandDateScheduleDayCodes;
211
- /**
212
- * Expands the input DateScheduleDayCodesInput to a Set of DayOfWeek values.
213
- *
214
- * @deprecated use DateCell implementation instead.
215
- * @param input
216
- * @returns
217
- */
218
- function expandDateScheduleDayCodesToDayCodesSet(input) {
219
- const codes = rawDateScheduleDayCodes(input);
220
- const days = new Set();
221
- codes.forEach((code) => {
222
- switch (code) {
223
- case 0:
224
- // do nothing
225
- break;
226
- case 8:
227
- (0, util_1.addToSet)(days, weekdayDateScheduleDayCodes()); // monday-friday
228
- break;
229
- case 9:
230
- (0, util_1.addToSet)(days, weekendDateScheduleDayCodes());
231
- break;
232
- default: // remove offset
233
- days.add(code);
234
- break;
235
- }
236
- });
237
- return days;
238
- }
239
- exports.expandDateScheduleDayCodesToDayCodesSet = expandDateScheduleDayCodesToDayCodesSet;
240
- /**
241
- * Converts the input DateScheduleDayCodesInput to an array of DateScheduleDayCode values, but does not expand
242
- *
243
- * @deprecated use DateCell implementation instead.
244
- * @param input
245
- * @returns
246
- */
247
- function rawDateScheduleDayCodes(input) {
248
- let dayCodes;
249
- switch (typeof input) {
250
- case 'string':
251
- dayCodes = Array.from(new Set(input)).map((x) => Number(x));
252
- break;
253
- case 'number':
254
- dayCodes = [input];
255
- break;
256
- default:
257
- dayCodes = Array.from(input);
258
- break;
259
- }
260
- return dayCodes.filter((x) => Boolean(x)); // filter out "none" code
261
- }
262
- exports.rawDateScheduleDayCodes = rawDateScheduleDayCodes;
263
- /**
264
- * Creates a DateScheduleDayCodeFactory using the optional input config.
265
- *
266
- * @deprecated use DateCell implementation instead.
267
- * @param config
268
- * @returns
269
- */
270
- function dateScheduleDayCodeFactory(config) {
271
- const normal = (0, date_week_1.yearWeekCodeDateTimezoneInstance)(config === null || config === void 0 ? void 0 : config.timezone);
272
- return (date) => {
273
- const target = normal.systemDateToTargetDate(date);
274
- const day = (0, date_fns_1.getDay)(target);
275
- return day + 1;
276
- };
277
- }
278
- exports.dateScheduleDayCodeFactory = dateScheduleDayCodeFactory;
279
- /**
280
- * Returns true if the input codes, when expanded, are equivalent.
281
- *
282
- * @deprecated use DateCell implementation instead.
283
- * @param a
284
- * @param b
285
- * @returns
286
- */
287
- function dateScheduleDayCodesAreSetsEquivalent(a, b) {
288
- const ae = expandDateScheduleDayCodes(a);
289
- const be = expandDateScheduleDayCodes(b);
290
- return (0, util_1.iterablesAreSetEquivalent)(ae, be);
291
- }
292
- exports.dateScheduleDayCodesAreSetsEquivalent = dateScheduleDayCodesAreSetsEquivalent;
293
- /**
294
- *
295
- * @deprecated use DateCell implementation instead.
296
- * @param a
297
- * @param b
298
- * @returns
299
- */
300
- function isSameDateSchedule(a, b) {
301
- if (a && b) {
302
- return a.w === b.w && (0, util_1.iterablesAreSetEquivalent)(a.ex, b.ex) && (0, util_1.iterablesAreSetEquivalent)(a.d, b.d);
303
- }
304
- else {
305
- return a == b;
306
- }
307
- }
308
- exports.isSameDateSchedule = isSameDateSchedule;
309
- /**
310
- *
311
- * @deprecated use DateCell implementation instead.
312
- */
313
- class DateSchedule {
314
- constructor(template) {
315
- if (template) {
316
- this.w = template.w;
317
- this.d = template.d;
318
- this.ex = template.ex;
319
- }
320
- }
321
- }
322
- tslib_1.__decorate([
323
- (0, class_transformer_1.Expose)(),
324
- (0, class_validator_1.IsString)(),
325
- (0, class_validator_1.Matches)(exports.DATE_SCHEDULE_ENCODED_WEEK_REGEX),
326
- tslib_1.__metadata("design:type", String)
327
- ], DateSchedule.prototype, "w", void 0);
328
- tslib_1.__decorate([
329
- (0, class_transformer_1.Expose)(),
330
- (0, class_validator_1.IsOptional)(),
331
- (0, class_validator_1.Min)(0, { each: true }),
332
- (0, class_validator_1.IsArray)(),
333
- tslib_1.__metadata("design:type", Array)
334
- ], DateSchedule.prototype, "d", void 0);
335
- tslib_1.__decorate([
336
- (0, class_transformer_1.Expose)(),
337
- (0, class_validator_1.IsOptional)(),
338
- (0, class_validator_1.Min)(0, { each: true }),
339
- (0, class_validator_1.IsArray)(),
340
- tslib_1.__metadata("design:type", Array)
341
- ], DateSchedule.prototype, "ex", void 0);
342
- exports.DateSchedule = DateSchedule;
343
- /**
344
- * Returns true if both inputs have the same schedule and date range.
345
- *
346
- * @deprecated use DateCell implementation instead.
347
- * @param a
348
- * @param b
349
- * @returns
350
- */
351
- function isSameDateScheduleRange(a, b) {
352
- if (a && b) {
353
- return (0, date_range_1.isSameDateRange)(a, b) && isSameDateSchedule(a, b);
354
- }
355
- else {
356
- return a == b;
357
- }
358
- }
359
- exports.isSameDateScheduleRange = isSameDateScheduleRange;
360
- function dateBlockTimingForDateScheduleRange(dateScheduleRange, duration, startsAtTime, timezone) {
361
- const { start } = dateScheduleRange;
362
- const timing = (0, date_block_1.safeDateBlockTimingFromDateRangeAndEvent)(dateScheduleRange, { startsAt: startsAtTime !== null && startsAtTime !== void 0 ? startsAtTime : start, duration }, timezone);
363
- return timing;
364
- }
365
- exports.dateBlockTimingForDateScheduleRange = dateBlockTimingForDateScheduleRange;
366
- /**
367
- *
368
- * @deprecated use DateCell implementation instead.
369
- * @param inputFilter
370
- * @returns
371
- */
372
- function copyDateScheduleDateFilterConfig(inputFilter) {
373
- return {
374
- start: inputFilter.start,
375
- end: inputFilter.end,
376
- w: inputFilter.w,
377
- d: inputFilter.d,
378
- ex: inputFilter.ex
379
- };
380
- }
381
- exports.copyDateScheduleDateFilterConfig = copyDateScheduleDateFilterConfig;
382
- /**
383
- * Creates a DateScheduleDateFilter.
384
- *
385
- * @deprecated use DateCell implementation instead.
386
- * @param config
387
- * @returns
388
- */
389
- function dateScheduleDateFilter(config) {
390
- const { w, start: inputStart, setStartAsMinDate = true, end, minMaxDateRange } = config;
391
- const timingStart = inputStart != null ? (0, date_block_1.changeTimingToSystemTimezone)({ start: inputStart }) : (0, date_block_1.dateBlockTimingStartForNowInSystemTimezone)();
392
- const { start: firstDate } = timingStart;
393
- const allowedDays = expandDateScheduleDayCodesToDayOfWeekSet(w);
394
- // Start date is either now or the filter's start date. It is never the minMax's start date, since that is irrelevant to the filter's range.
395
- const firstDateDay = (0, date_fns_1.getDay)(firstDate);
396
- const dayForIndex = (0, date_block_1.dateBlockDayOfWeekFactory)(firstDateDay);
397
- const dateIndexForDate = (0, date_block_1.dateBlockTimingRelativeIndexFactory)(timingStart);
398
- const indexFloor = setStartAsMinDate ? 0 : Number.MIN_SAFE_INTEGER;
399
- const minAllowedIndex = (minMaxDateRange === null || minMaxDateRange === void 0 ? void 0 : minMaxDateRange.start) != null ? Math.max(indexFloor, dateIndexForDate(minMaxDateRange.start)) : indexFloor; // start date should be the min inde
400
- const maxAllowedIndex = end != null ? dateIndexForDate(end) : (minMaxDateRange === null || minMaxDateRange === void 0 ? void 0 : minMaxDateRange.end) != null ? dateIndexForDate(minMaxDateRange.end) : Number.MAX_SAFE_INTEGER; // max "to" value
401
- const includedIndexes = new Set(config.d);
402
- const excludedIndexes = new Set(config.ex);
403
- return (input) => {
404
- let i;
405
- let day;
406
- if (typeof input === 'number') {
407
- i = input;
408
- }
409
- else {
410
- i = dateIndexForDate(input);
411
- }
412
- day = dayForIndex(i);
413
- const result = (i >= minAllowedIndex && i <= maxAllowedIndex && allowedDays.has(day) && !excludedIndexes.has(i)) || includedIndexes.has(i);
414
- return result;
415
- };
416
- }
417
- exports.dateScheduleDateFilter = dateScheduleDateFilter;
418
- /**
419
- * Creates a DateScheduleDateBlockTimingFilter.
420
- *
421
- * @deprecated use DateCell implementation instead.
422
- * @param param0
423
- * @returns
424
- */
425
- function dateScheduleDateBlockTimingFilter({ timing, schedule }) {
426
- const isAllowed = dateScheduleDateFilter({
427
- w: schedule.w,
428
- d: schedule.d,
429
- ex: schedule.ex,
430
- start: (0, date_block_1.getCurrentDateBlockTimingStartDate)(timing) // start date in the current system timezone.
431
- });
432
- return (block) => {
433
- const i = block.i;
434
- return isAllowed(i);
435
- };
436
- }
437
- exports.dateScheduleDateBlockTimingFilter = dateScheduleDateBlockTimingFilter;
438
- /**
439
- * Creates a DateBlocksExpansionFactory using the input DateScheduleDateBlockTimingFilterConfig.
440
- *
441
- * @deprecated use DateCell implementation instead.
442
- * @param config
443
- * @returns
444
- */
445
- function expandDateScheduleFactory(config) {
446
- const { invertSchedule = false, now, onlyBlocksThatHaveEnded, onlyBlocksThatHaveStarted, onlyBlocksNotYetEnded, onlyBlocksNotYetStarted, maxDateBlocksToReturn, durationSpanFilter: inputDurationSpanFilter } = config;
447
- let durationSpanFilter;
448
- let durationSpanFilters = [];
449
- if (inputDurationSpanFilter) {
450
- durationSpanFilters.push(inputDurationSpanFilter);
451
- }
452
- if (onlyBlocksNotYetStarted) {
453
- durationSpanFilters.push((0, date_filter_1.dateBlockDurationSpanHasNotStartedFilterFunction)(now));
454
- }
455
- else if (onlyBlocksThatHaveEnded) {
456
- durationSpanFilters.push((0, date_filter_1.dateBlockDurationSpanHasEndedFilterFunction)(now));
457
- }
458
- else {
459
- if (onlyBlocksThatHaveStarted) {
460
- durationSpanFilters.push((0, date_filter_1.dateBlockDurationSpanHasStartedFilterFunction)(now));
461
- }
462
- if (onlyBlocksNotYetEnded) {
463
- durationSpanFilters.push((0, date_filter_1.dateBlockDurationSpanHasNotEndedFilterFunction)(now));
464
- }
465
- }
466
- durationSpanFilter = (0, util_1.mergeFilterFunctions)(...durationSpanFilters);
467
- const expansionFactory = (0, date_block_1.dateBlocksExpansionFactory)({
468
- timing: config.timing,
469
- filter: (0, util_1.invertFilter)(dateScheduleDateBlockTimingFilter(config), invertSchedule),
470
- durationSpanFilter,
471
- maxDateBlocksToReturn
472
- });
473
- return expansionFactory;
474
- }
475
- exports.expandDateScheduleFactory = expandDateScheduleFactory;
476
- /**
477
- * Expands the input DateBlockTiming and DateSchedule into an array of DateBlockDurationSpan value that correspond with blocks in the event.
478
- *
479
- * Can optionally provide an IndexRange to specify a specific range to filter on. The range will be capped to the range of the timing.
480
- *
481
- * @deprecated use DateCell implementation instead.
482
- * @param timing
483
- * @param schedule
484
- * @param inputRange
485
- * @returns
486
- */
487
- function expandDateSchedule(input) {
488
- const { timing, inputRange } = input;
489
- const expansionFactory = expandDateScheduleFactory(input);
490
- const completeRange = (0, date_block_1.dateBlockIndexRange)(timing);
491
- const range = inputRange ? { minIndex: Math.max(inputRange.minIndex, completeRange.minIndex), maxIndex: Math.min(inputRange.maxIndex, completeRange.maxIndex) } : completeRange;
492
- const dateBlockForRange = {
493
- i: range.minIndex,
494
- to: range.maxIndex
495
- }; // Index is considered to be used as inclusive already, so no need to use dateBlockIndexRangeToDateBlockRange
496
- return expansionFactory([dateBlockForRange]);
497
- }
498
- exports.expandDateSchedule = expandDateSchedule;
499
- /**
500
- * Creates a DateBlockTiming for the input ExpandDateScheduleRangeInput.
501
- *
502
- * @deprecated use DateCell implementation instead.
503
- * @param input
504
- * @returns
505
- */
506
- function dateBlockTimingForExpandDateScheduleRangeInput(input) {
507
- const { dateScheduleRange, duration, startsAtTime, timezone } = input;
508
- return dateBlockTimingForDateScheduleRange(dateScheduleRange, duration, startsAtTime, timezone);
509
- }
510
- exports.dateBlockTimingForExpandDateScheduleRangeInput = dateBlockTimingForExpandDateScheduleRangeInput;
511
- /**
512
- *
513
- * @deprecated use DateCell implementation instead.
514
- * @param input
515
- * @returns
516
- */
517
- function expandDateScheduleRange(input) {
518
- const { dateScheduleRange } = input;
519
- const timing = dateBlockTimingForExpandDateScheduleRangeInput(input);
520
- return expandDateSchedule(Object.assign(Object.assign({}, input), { schedule: dateScheduleRange, timing }));
521
- }
522
- exports.expandDateScheduleRange = expandDateScheduleRange;
523
- /**
524
- *
525
- * @deprecated use DateCell implementation instead.
526
- * @param input
527
- * @returns
528
- */
529
- function expandDateScheduleRangeToDateBlockRanges(input) {
530
- const dateBlockDurationSpans = expandDateScheduleRange(input);
531
- return (0, date_block_1.groupToDateBlockRanges)(dateBlockDurationSpans);
532
- }
533
- exports.expandDateScheduleRangeToDateBlockRanges = expandDateScheduleRangeToDateBlockRanges;
534
- // MARK: Compat
535
- /**
536
- * Converts the input DateScheduleDayCodesInput to an array of DateScheduleDayCode values.
537
- *
538
- * @param input
539
- * @returns
540
- *
541
- * @deprecated Use expandDateScheduleDayCodes or rawDateScheduleDayCodes depending on the need case.
542
- */
543
- exports.dateScheduleDayCodes = expandDateScheduleDayCodes;
544
- /**
545
- * Expands a DateScheduleEncodedWeek to an array of DateScheduleDayCode valeus.
546
- *
547
- * @param week
548
- * @returns
549
- *
550
- * @deprecated Use expandDateScheduleDayCodes instead.
551
- */
552
- exports.expandDateScheduleEncodedWeek = expandDateScheduleDayCodes;
553
- //# sourceMappingURL=date.schedule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.schedule.js","sourceRoot":"","sources":["../../../../../../packages/date/src/lib/date/date.schedule.ts"],"names":[],"mappings":";;;;AAAA,wCAA6V;AAC7V,yDAA2C;AAC3C,qDAA8E;AAC9E,uCAAkC;AAClC,6CAoBsB;AACtB,+CAA6N;AAC7N,6CAA+C;AAE/C,2CAAmF;AAEnF;;GAEG;AACH,IAAY,mBAoBX;AApBD,WAAY,mBAAmB;IAC7B;;OAEG;IACH,6DAAQ,CAAA;IACR,iEAAU,CAAA;IACV,iEAAU,CAAA;IACV,mEAAW,CAAA;IACX,uEAAa,CAAA;IACb,qEAAY,CAAA;IACZ,iEAAU,CAAA;IACV,qEAAY,CAAA;IACZ;;OAEG;IACH,mEAAW,CAAA;IACX;;OAEG;IACH,mEAAW,CAAA;AACb,CAAC,EApBW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAoB9B;AAED;;GAEG;AACH,SAAgB,2BAA2B;IACzC,OAAO,CAAC,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;AACpE,CAAC;AAFD,kEAEC;AAED;;GAEG;AACH,SAAgB,2BAA2B;IACzC,OAAO,CAAC,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,CAAC,OAAO,EAAE,mBAAmB,CAAC,SAAS,EAAE,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC5J,CAAC;AAFD,kEAEC;AAED;;GAEG;AACH,SAAgB,2BAA2B;IACzC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACpE,CAAC;AAFD,kEAEC;AAED;;;;;;GAMG;AACH,SAAgB,mCAAmC,CAAC,KAA2C;IAC7F,MAAM,IAAI,GAAG,wCAAwC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,C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