@lighthouse/common 5.0.0-canary-11 → 5.0.0-canary-13
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/dist/helpers/build-fetch-url/index.js +2 -2
- package/dist/helpers/fetch-image/index.js +1 -1
- package/dist/helpers/fetch-image-for-pdf-generator-service/index.js +9 -9
- package/dist/helpers/fetch-image-for-web/index.js +3 -14
- package/dist/helpers/get-audit-entry-details/index.js +2 -0
- package/dist/helpers/get-issue-details/index.js +2 -0
- package/dist/helpers/get-task-entry-details/index.js +3 -1
- package/dist/pdf/helpers/fields/index.js +2 -2
- package/dist/scheduling/scheduling.types.js +9 -9
- package/dist/service-hours/schema.js +12 -12
- package/lib/errors/DomainError.js +7 -8
- package/lib/errors/DomainError.js.map +1 -1
- package/lib/errors/ValidationError.js +11 -9
- package/lib/errors/ValidationError.js.map +1 -1
- package/lib/helpers/build-fetch-url/index.js +2 -2
- package/lib/helpers/build-fetch-url/index.js.map +1 -1
- package/lib/helpers/fetch-image/index.js +1 -1
- package/lib/helpers/fetch-image/index.js.map +1 -1
- package/lib/helpers/fetch-image-for-pdf-generator-service/index.js +174 -180
- package/lib/helpers/fetch-image-for-pdf-generator-service/index.js.map +1 -1
- package/lib/helpers/fetch-image-for-web/index.js +60 -74
- package/lib/helpers/fetch-image-for-web/index.js.map +1 -1
- package/lib/helpers/fetch-lighthouse-logo/index.js +41 -43
- package/lib/helpers/fetch-lighthouse-logo/index.js.map +1 -1
- package/lib/helpers/get-audit-entry-details/index.js +2 -0
- package/lib/helpers/get-audit-entry-details/index.js.map +1 -1
- package/lib/helpers/get-audit-items-data/index.js +8 -8
- package/lib/helpers/get-audit-items-data/index.js.map +1 -1
- package/lib/helpers/get-issue-details/index.js +2 -0
- package/lib/helpers/get-issue-details/index.js.map +1 -1
- package/lib/helpers/get-job-details/index.js.map +1 -1
- package/lib/helpers/get-location-reference/index.js +6 -4
- package/lib/helpers/get-location-reference/index.js.map +1 -1
- package/lib/helpers/get-reference-details/index.js.map +1 -1
- package/lib/helpers/get-task-entry-details/index.js +3 -1
- package/lib/helpers/get-task-entry-details/index.js.map +1 -1
- package/lib/helpers/get-timezone-datetime/index.js.map +1 -1
- package/lib/pdf/activity-report/index.js +299 -311
- package/lib/pdf/activity-report/index.js.map +1 -1
- package/lib/pdf/audit/index.js.map +1 -1
- package/lib/pdf/helpers/build-audit-content/index.js.map +1 -1
- package/lib/pdf/helpers/build-audit-follow-ups/index.js.map +1 -1
- package/lib/pdf/helpers/build-location-scans-content/index.js.map +1 -1
- package/lib/pdf/helpers/build-template-content/index.js.map +1 -1
- package/lib/pdf/helpers/fields/index.js +14 -14
- package/lib/pdf/helpers/fields/index.js.map +1 -1
- package/lib/pdf/helpers/generate-definition/index.js.map +1 -1
- package/lib/pdf/helpers/horizontal-line/index.js.map +1 -1
- package/lib/pdf/helpers/html-transformer/index.js +1 -2
- package/lib/pdf/helpers/html-transformer/index.js.map +1 -1
- package/lib/pdf/helpers/table/index.js +63 -65
- package/lib/pdf/helpers/table/index.js.map +1 -1
- package/lib/pdf/issue/index.js.map +1 -1
- package/lib/pdf/job/index.js.map +1 -1
- package/lib/pdf/shift-report/index.js +275 -291
- package/lib/pdf/shift-report/index.js.map +1 -1
- package/lib/pdf/task/index.js.map +1 -1
- package/lib/scheduling/generators/occurrenceIntervalsGenerator.js +27 -30
- package/lib/scheduling/generators/occurrenceIntervalsGenerator.js.map +1 -1
- package/lib/scheduling/generators/scheduleIntervalsGenerator.js +19 -21
- package/lib/scheduling/generators/scheduleIntervalsGenerator.js.map +1 -1
- package/lib/scheduling/generators/serviceIntervalsGenerator.js +134 -136
- package/lib/scheduling/generators/serviceIntervalsGenerator.js.map +1 -1
- package/lib/scheduling/helpers/generateNonRepeatingSchedule.js +81 -83
- package/lib/scheduling/helpers/generateNonRepeatingSchedule.js.map +1 -1
- package/lib/scheduling/helpers/generateRepeatingSchedule.js +104 -106
- package/lib/scheduling/helpers/generateRepeatingSchedule.js.map +1 -1
- package/lib/scheduling/helpers/generateScheduleEnd.js.map +1 -1
- package/lib/scheduling/helpers/mergeIntervals.js.map +1 -1
- package/lib/scheduling/scheduling.types.js +9 -9
- package/lib/scheduling/scheduling.types.js.map +1 -1
- package/lib/scheduling/strategies/getNext.js +21 -17
- package/lib/scheduling/strategies/getNext.js.map +1 -1
- package/lib/scheduling/strategies/getNextExactDateOfMonth.js +21 -18
- package/lib/scheduling/strategies/getNextExactDateOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/getNextLastDayOfMonth.js +20 -17
- package/lib/scheduling/strategies/getNextLastDayOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/getNextLastWeekdayOfMonth.js +20 -17
- package/lib/scheduling/strategies/getNextLastWeekdayOfMonth.js.map +1 -1
- package/lib/scheduling/strategies/getNextNoRepeat.js +15 -14
- package/lib/scheduling/strategies/getNextNoRepeat.js.map +1 -1
- package/lib/scheduling/strategies/getNextWeekday.js +36 -33
- package/lib/scheduling/strategies/getNextWeekday.js.map +1 -1
- package/lib/scheduling/strategies/getNextXDayOfXWeekOfMonth.js +20 -17
- package/lib/scheduling/strategies/getNextXDayOfXWeekOfMonth.js.map +1 -1
- package/lib/schema/schema.js +21 -23
- package/lib/schema/schema.js.map +1 -1
- package/lib/service-hours/schema.js +15 -13
- package/lib/service-hours/schema.js.map +1 -1
- package/package.json +2 -2
- package/yarn-error.log +0 -13549
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
var _marked = /*#__PURE__*/_regeneratorRuntime.mark(generateRepeatingSchedule);
|
|
4
4
|
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
|
|
5
5
|
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
6
|
-
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++)
|
|
6
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
7
7
|
import { includes } from 'lodash/fp';
|
|
8
8
|
import { generateScheduleEnd, hasValidStartAndEnd } from '.';
|
|
9
9
|
import { IntervalTypes, Unit } from '../scheduling.types';
|
|
@@ -14,113 +14,111 @@ export var complyingServiceIntervalUnits = [Unit.Second, Unit.Minute, Unit.Hour]
|
|
|
14
14
|
* Generates repeating schedule service and occurrence intervals
|
|
15
15
|
*/
|
|
16
16
|
export function generateRepeatingSchedule(props) {
|
|
17
|
-
var serviceHours, start, strategy, end, isInitial, frequency, frequencyUnit, timezone, isStartAndEndValid, serviceIntervalSequence, complyToServiceHours, serviceIntervals, _iterator, _step, serviceInterval, occurrenceIntervalsSequence, _iterator2, _step2, occurrenceInterval;
|
|
18
|
-
return _regeneratorRuntime.wrap(function
|
|
19
|
-
while (1) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_context.next = 9;
|
|
39
|
-
break;
|
|
40
|
-
}
|
|
41
|
-
return _context.abrupt("return", []);
|
|
42
|
-
case 9:
|
|
43
|
-
serviceIntervalSequence = serviceIntervalsGenerator({
|
|
44
|
-
end: end,
|
|
45
|
-
serviceHours: serviceHours,
|
|
46
|
-
start: start
|
|
47
|
-
}); // NOTE: when repeating and is complying to service hours we iterate through
|
|
48
|
-
// all service intervals otherwise service interval is from the start and end
|
|
49
|
-
complyToServiceHours = includes(frequencyUnit, complyingServiceIntervalUnits);
|
|
50
|
-
serviceIntervals = complyToServiceHours ? _toConsumableArray(serviceIntervalSequence) : [[start, end]];
|
|
51
|
-
_iterator = _createForOfIteratorHelper(serviceIntervals);
|
|
52
|
-
_context.prev = 13;
|
|
53
|
-
_iterator.s();
|
|
54
|
-
case 15:
|
|
55
|
-
if ((_step = _iterator.n()).done) {
|
|
56
|
-
_context.next = 40;
|
|
57
|
-
break;
|
|
58
|
-
}
|
|
59
|
-
serviceInterval = _step.value;
|
|
60
|
-
_context.next = 19;
|
|
61
|
-
return {
|
|
62
|
-
interval: serviceInterval,
|
|
63
|
-
type: IntervalTypes.Service
|
|
64
|
-
};
|
|
65
|
-
case 19:
|
|
66
|
-
occurrenceIntervalsSequence = occurrenceIntervalsGenerator({
|
|
67
|
-
isInitial: isInitial,
|
|
68
|
-
serviceInterval: serviceInterval,
|
|
69
|
-
strategy: strategy,
|
|
70
|
-
timezone: timezone
|
|
71
|
-
});
|
|
72
|
-
_iterator2 = _createForOfIteratorHelper(occurrenceIntervalsSequence);
|
|
73
|
-
_context.prev = 21;
|
|
74
|
-
_iterator2.s();
|
|
75
|
-
case 23:
|
|
76
|
-
if ((_step2 = _iterator2.n()).done) {
|
|
77
|
-
_context.next = 29;
|
|
78
|
-
break;
|
|
79
|
-
}
|
|
80
|
-
occurrenceInterval = _step2.value;
|
|
81
|
-
_context.next = 27;
|
|
82
|
-
return {
|
|
83
|
-
interval: occurrenceInterval,
|
|
84
|
-
type: IntervalTypes.Occurrence
|
|
85
|
-
};
|
|
86
|
-
case 27:
|
|
87
|
-
_context.next = 23;
|
|
88
|
-
break;
|
|
89
|
-
case 29:
|
|
90
|
-
_context.next = 34;
|
|
17
|
+
var serviceHours, start, strategy, end, isInitial, frequency, frequencyUnit, timezone, isStartAndEndValid, serviceIntervalSequence, complyToServiceHours, serviceIntervals, _iterator, _step, serviceInterval, occurrenceIntervalsSequence, _iterator2, _step2, occurrenceInterval, _t, _t2;
|
|
18
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
19
|
+
while (1) switch (_context.prev = _context.next) {
|
|
20
|
+
case 0:
|
|
21
|
+
serviceHours = props.serviceHours, start = props.start, strategy = props.strategy;
|
|
22
|
+
end = props.end, isInitial = props.isInitial; // NOTE support never ending repeating schedule where no end date defined by
|
|
23
|
+
// setting a custom end date using the frequency unit and value
|
|
24
|
+
frequency = strategy.options.frequency;
|
|
25
|
+
frequencyUnit = frequency.unit;
|
|
26
|
+
timezone = serviceHours.timezone;
|
|
27
|
+
end = end || generateScheduleEnd({
|
|
28
|
+
frequency: frequency,
|
|
29
|
+
start: start,
|
|
30
|
+
timezone: timezone
|
|
31
|
+
});
|
|
32
|
+
isStartAndEndValid = hasValidStartAndEnd({
|
|
33
|
+
end: end,
|
|
34
|
+
start: start
|
|
35
|
+
});
|
|
36
|
+
if (isStartAndEndValid) {
|
|
37
|
+
_context.next = 1;
|
|
91
38
|
break;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
39
|
+
}
|
|
40
|
+
return _context.abrupt("return", []);
|
|
41
|
+
case 1:
|
|
42
|
+
serviceIntervalSequence = serviceIntervalsGenerator({
|
|
43
|
+
end: end,
|
|
44
|
+
serviceHours: serviceHours,
|
|
45
|
+
start: start
|
|
46
|
+
}); // NOTE: when repeating and is complying to service hours we iterate through
|
|
47
|
+
// all service intervals otherwise service interval is from the start and end
|
|
48
|
+
complyToServiceHours = includes(frequencyUnit, complyingServiceIntervalUnits);
|
|
49
|
+
serviceIntervals = complyToServiceHours ? _toConsumableArray(serviceIntervalSequence) : [[start, end]];
|
|
50
|
+
_iterator = _createForOfIteratorHelper(serviceIntervals);
|
|
51
|
+
_context.prev = 2;
|
|
52
|
+
_iterator.s();
|
|
53
|
+
case 3:
|
|
54
|
+
if ((_step = _iterator.n()).done) {
|
|
55
|
+
_context.next = 13;
|
|
107
56
|
break;
|
|
108
|
-
|
|
109
|
-
|
|
57
|
+
}
|
|
58
|
+
serviceInterval = _step.value;
|
|
59
|
+
_context.next = 4;
|
|
60
|
+
return {
|
|
61
|
+
interval: serviceInterval,
|
|
62
|
+
type: IntervalTypes.Service
|
|
63
|
+
};
|
|
64
|
+
case 4:
|
|
65
|
+
occurrenceIntervalsSequence = occurrenceIntervalsGenerator({
|
|
66
|
+
isInitial: isInitial,
|
|
67
|
+
serviceInterval: serviceInterval,
|
|
68
|
+
strategy: strategy,
|
|
69
|
+
timezone: timezone
|
|
70
|
+
});
|
|
71
|
+
_iterator2 = _createForOfIteratorHelper(occurrenceIntervalsSequence);
|
|
72
|
+
_context.prev = 5;
|
|
73
|
+
_iterator2.s();
|
|
74
|
+
case 6:
|
|
75
|
+
if ((_step2 = _iterator2.n()).done) {
|
|
76
|
+
_context.next = 8;
|
|
110
77
|
break;
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
78
|
+
}
|
|
79
|
+
occurrenceInterval = _step2.value;
|
|
80
|
+
_context.next = 7;
|
|
81
|
+
return {
|
|
82
|
+
interval: occurrenceInterval,
|
|
83
|
+
type: IntervalTypes.Occurrence
|
|
84
|
+
};
|
|
85
|
+
case 7:
|
|
86
|
+
_context.next = 6;
|
|
87
|
+
break;
|
|
88
|
+
case 8:
|
|
89
|
+
_context.next = 10;
|
|
90
|
+
break;
|
|
91
|
+
case 9:
|
|
92
|
+
_context.prev = 9;
|
|
93
|
+
_t = _context["catch"](5);
|
|
94
|
+
_iterator2.e(_t);
|
|
95
|
+
case 10:
|
|
96
|
+
_context.prev = 10;
|
|
97
|
+
_iterator2.f();
|
|
98
|
+
return _context.finish(10);
|
|
99
|
+
case 11:
|
|
100
|
+
// NOTE: we must reset isInitial to true following the first service
|
|
101
|
+
// interval otherwise the occurrence will not start exactly on the next
|
|
102
|
+
// service interval start time
|
|
103
|
+
isInitial = true;
|
|
104
|
+
case 12:
|
|
105
|
+
_context.next = 3;
|
|
106
|
+
break;
|
|
107
|
+
case 13:
|
|
108
|
+
_context.next = 15;
|
|
109
|
+
break;
|
|
110
|
+
case 14:
|
|
111
|
+
_context.prev = 14;
|
|
112
|
+
_t2 = _context["catch"](2);
|
|
113
|
+
_iterator.e(_t2);
|
|
114
|
+
case 15:
|
|
115
|
+
_context.prev = 15;
|
|
116
|
+
_iterator.f();
|
|
117
|
+
return _context.finish(15);
|
|
118
|
+
case 16:
|
|
119
|
+
case "end":
|
|
120
|
+
return _context.stop();
|
|
123
121
|
}
|
|
124
|
-
}, _marked, null, [[
|
|
122
|
+
}, _marked, null, [[2, 14, 15, 16], [5, 9, 10, 11]]);
|
|
125
123
|
}
|
|
126
124
|
//# sourceMappingURL=generateRepeatingSchedule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateRepeatingSchedule.js","names":["generateRepeatingSchedule","_createForOfIteratorHelper","r","e","t","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","_n","F","s","n","done","value","f","TypeError","o","a","u","call","next","return","_arrayLikeToArray","toString","slice","constructor","name","from","test","includes","generateScheduleEnd","hasValidStartAndEnd","IntervalTypes","Unit","occurrenceIntervalsGenerator","serviceIntervalsGenerator","complyingServiceIntervalUnits","Second","Minute","Hour","props","serviceHours","start","strategy","end","isInitial","frequency","frequencyUnit","timezone","isStartAndEndValid","serviceIntervalSequence","complyToServiceHours","serviceIntervals","_iterator","_step","serviceInterval","occurrenceIntervalsSequence","_iterator2","_step2","occurrenceInterval","
|
|
1
|
+
{"version":3,"file":"generateRepeatingSchedule.js","names":["generateRepeatingSchedule","_createForOfIteratorHelper","r","e","t","Symbol","iterator","Array","isArray","_unsupportedIterableToArray","length","_n","F","s","n","done","value","f","TypeError","o","a","u","call","next","return","_arrayLikeToArray","toString","slice","constructor","name","from","test","includes","generateScheduleEnd","hasValidStartAndEnd","IntervalTypes","Unit","occurrenceIntervalsGenerator","serviceIntervalsGenerator","complyingServiceIntervalUnits","Second","Minute","Hour","props","serviceHours","start","strategy","end","isInitial","frequency","frequencyUnit","timezone","isStartAndEndValid","serviceIntervalSequence","complyToServiceHours","serviceIntervals","_iterator","_step","serviceInterval","occurrenceIntervalsSequence","_iterator2","_step2","occurrenceInterval","_t","_t2","_regeneratorRuntime","wrap","_context","prev","options","unit","abrupt","_toConsumableArray","interval","type","Service","Occurrence","finish","stop","_marked"],"sources":["../../../src/scheduling/helpers/generateRepeatingSchedule.ts"],"sourcesContent":["import { includes } from 'lodash/fp'\n\nimport { generateScheduleEnd, hasValidStartAndEnd } from '.'\nimport {\n IntervalTypes,\n ScheduleIntervalsGenerator,\n Unit,\n} from '../scheduling.types'\nimport {\n occurrenceIntervalsGenerator,\n serviceIntervalsGenerator,\n} from '../generators'\n\nexport const complyingServiceIntervalUnits = [\n Unit.Second,\n Unit.Minute,\n Unit.Hour,\n]\n\n/**\n * Generates repeating schedule service and occurrence intervals\n */\nexport function* generateRepeatingSchedule(props: ScheduleIntervalsGenerator) {\n const { serviceHours, start, strategy } = props\n let { end, isInitial } = props\n\n // NOTE support never ending repeating schedule where no end date defined by\n // setting a custom end date using the frequency unit and value\n const {\n options: { frequency },\n } = strategy\n const { unit: frequencyUnit } = frequency\n const { timezone } = serviceHours\n\n end = end || generateScheduleEnd({ frequency, start, timezone })\n\n const isStartAndEndValid = hasValidStartAndEnd({ end, start })\n\n if (!isStartAndEndValid) return []\n\n const serviceIntervalSequence = serviceIntervalsGenerator({\n end,\n serviceHours,\n start,\n })\n\n // NOTE: when repeating and is complying to service hours we iterate through\n // all service intervals otherwise service interval is from the start and end\n const complyToServiceHours = includes(\n frequencyUnit,\n complyingServiceIntervalUnits\n )\n\n const serviceIntervals = complyToServiceHours\n ? [...serviceIntervalSequence]\n : [[start, end]]\n\n for (const serviceInterval of serviceIntervals) {\n yield { interval: serviceInterval, type: IntervalTypes.Service }\n\n const occurrenceIntervalsSequence = occurrenceIntervalsGenerator({\n isInitial,\n serviceInterval,\n strategy,\n timezone,\n })\n\n for (const occurrenceInterval of occurrenceIntervalsSequence) {\n yield { interval: occurrenceInterval, type: IntervalTypes.Occurrence }\n }\n\n // NOTE: we must reset isInitial to true following the first service\n // interval otherwise the occurrence will not start exactly on the next\n // service interval start time\n isInitial = true\n }\n}\n"],"mappings":";;oDAsBiBA,yBAAyB;AAAA,SAAAC,2BAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,yBAAAC,MAAA,IAAAH,CAAA,CAAAG,MAAA,CAAAC,QAAA,KAAAJ,CAAA,qBAAAE,CAAA,QAAAG,KAAA,CAAAC,OAAA,CAAAN,CAAA,MAAAE,CAAA,GAAAK,2BAAA,CAAAP,CAAA,MAAAC,CAAA,IAAAD,CAAA,uBAAAA,CAAA,CAAAQ,MAAA,IAAAN,CAAA,KAAAF,CAAA,GAAAE,CAAA,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":"generateScheduleEnd.js","names":["includes","moment","Unit","generateScheduleEnd","_ref","frequency","start","timezone","frequencyUnit","unit","frequencyValue","value","isFrequencyLessThanWeek","Millisecond","Second","Minute","Hour","Day","mStart","tz","end","add","Week","valueOf"],"sources":["../../../src/scheduling/helpers/generateScheduleEnd.ts"],"sourcesContent":["import { includes } from 'lodash/fp'\nimport moment from 'moment-timezone'\n\nimport { Period, Unit } from '../scheduling.types'\n\ninterface GenerateScheduleEnd {\n readonly frequency: Period\n readonly start: number\n readonly timezone: string\n}\n\n/**\n * Generates a schedule end datetime based on the start and frequency\n */\nexport function generateScheduleEnd({\n frequency,\n start,\n timezone,\n}: GenerateScheduleEnd): number {\n const { unit: frequencyUnit, value: frequencyValue } = frequency\n\n const isFrequencyLessThanWeek = includes(frequencyUnit, [\n Unit.Millisecond,\n Unit.Second,\n Unit.Minute,\n Unit.Hour,\n Unit.Day,\n ])\n\n const mStart = moment.tz(start, timezone)\n\n // NOTE: if frequency unit less than a week we must set end to jump a week\n // plus the interval length of the schedule frequency\n // so that we can ensure that we are within a service interval\n const end = isFrequencyLessThanWeek\n ? mStart.add(2, Unit.Week).valueOf()\n : mStart.add(frequencyValue * 2, frequencyUnit).valueOf()\n\n return end\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,WAAW;AACpC,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,SAAiBC,IAAI,QAAQ,qBAAqB;AAQlD;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAAC,IAAA,EAIH;EAAA,IAH9BC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;
|
|
1
|
+
{"version":3,"file":"generateScheduleEnd.js","names":["includes","moment","Unit","generateScheduleEnd","_ref","frequency","start","timezone","frequencyUnit","unit","frequencyValue","value","isFrequencyLessThanWeek","Millisecond","Second","Minute","Hour","Day","mStart","tz","end","add","Week","valueOf"],"sources":["../../../src/scheduling/helpers/generateScheduleEnd.ts"],"sourcesContent":["import { includes } from 'lodash/fp'\nimport moment from 'moment-timezone'\n\nimport { Period, Unit } from '../scheduling.types'\n\ninterface GenerateScheduleEnd {\n readonly frequency: Period\n readonly start: number\n readonly timezone: string\n}\n\n/**\n * Generates a schedule end datetime based on the start and frequency\n */\nexport function generateScheduleEnd({\n frequency,\n start,\n timezone,\n}: GenerateScheduleEnd): number {\n const { unit: frequencyUnit, value: frequencyValue } = frequency\n\n const isFrequencyLessThanWeek = includes(frequencyUnit, [\n Unit.Millisecond,\n Unit.Second,\n Unit.Minute,\n Unit.Hour,\n Unit.Day,\n ])\n\n const mStart = moment.tz(start, timezone)\n\n // NOTE: if frequency unit less than a week we must set end to jump a week\n // plus the interval length of the schedule frequency\n // so that we can ensure that we are within a service interval\n const end = isFrequencyLessThanWeek\n ? mStart.add(2, Unit.Week).valueOf()\n : mStart.add(frequencyValue * 2, frequencyUnit).valueOf()\n\n return end\n}\n"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,WAAW;AACpC,OAAOC,MAAM,MAAM,iBAAiB;AAEpC,SAAiBC,IAAI,QAAQ,qBAAqB;AAQlD;AACA;AACA;AACA,OAAO,SAASC,mBAAmBA,CAAAC,IAAA,EAIH;EAAA,IAH9BC,SAAS,GAAAD,IAAA,CAATC,SAAS;IACTC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;EAER,IAAcC,aAAa,GAA4BH,SAAS,CAAxDI,IAAI;IAAwBC,cAAc,GAAKL,SAAS,CAAnCM,KAAK;EAElC,IAAMC,uBAAuB,GAAGZ,QAAQ,CAACQ,aAAa,EAAE,CACtDN,IAAI,CAACW,WAAW,EAChBX,IAAI,CAACY,MAAM,EACXZ,IAAI,CAACa,MAAM,EACXb,IAAI,CAACc,IAAI,EACTd,IAAI,CAACe,GAAG,CACT,CAAC;EAEF,IAAMC,MAAM,GAAGjB,MAAM,CAACkB,EAAE,CAACb,KAAK,EAAEC,QAAQ,CAAC;;EAEzC;EACA;EACA;EACA,IAAMa,GAAG,GAAGR,uBAAuB,GAC/BM,MAAM,CAACG,GAAG,CAAC,CAAC,EAAEnB,IAAI,CAACoB,IAAI,CAAC,CAACC,OAAO,CAAC,CAAC,GAClCL,MAAM,CAACG,GAAG,CAACX,cAAc,GAAG,CAAC,EAAEF,aAAa,CAAC,CAACe,OAAO,CAAC,CAAC;EAE3D,OAAOH,GAAG;AACZ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeIntervals.js","names":["first","isEmpty","reduce","mergeIntervals","intervals","sortedIntervals","sort","a","b","firstInterval","stack","accum","interval","top","length","topBeforeInterval","topOverlapsInterval","push","pop"],"sources":["../../../src/scheduling/helpers/mergeIntervals.ts"],"sourcesContent":["import { first, isEmpty, reduce } from 'lodash/fp'\n\nimport { Interval } from '../scheduling.types'\n\n/**\n * Merges overlapping intervals\n * Accepts arrays of intervals and returns a flattened result of overlapping intervals\n *\n * mergeIntervals([[1,15], [11,25], [21,29], [40,1000]])\n * returns [[1,29], [40,1000]]\n */\nexport function mergeIntervals(intervals:
|
|
1
|
+
{"version":3,"file":"mergeIntervals.js","names":["first","isEmpty","reduce","mergeIntervals","intervals","sortedIntervals","sort","a","b","firstInterval","stack","accum","interval","top","length","topBeforeInterval","topOverlapsInterval","push","pop"],"sources":["../../../src/scheduling/helpers/mergeIntervals.ts"],"sourcesContent":["import { first, isEmpty, reduce } from 'lodash/fp'\n\nimport { Interval } from '../scheduling.types'\n\n/**\n * Merges overlapping intervals\n * Accepts arrays of intervals and returns a flattened result of overlapping intervals\n *\n * mergeIntervals([[1,15], [11,25], [21,29], [40,1000]])\n * returns [[1,29], [40,1000]]\n */\nexport function mergeIntervals(intervals: Interval[]): Interval[] {\n if (isEmpty(intervals)) return intervals\n\n const sortedIntervals = intervals.sort((a, b) => a[0] - b[0])\n const firstInterval: Interval = first(sortedIntervals)\n\n const stack: Interval[] = reduce(\n (accum, interval: Interval) => {\n const top = accum[accum.length - 1]\n const topBeforeInterval = top[1] < interval[0]\n const topOverlapsInterval = top[1] < interval[1]\n\n if (topBeforeInterval) {\n accum.push(interval)\n } else if (topOverlapsInterval) {\n accum.pop()\n accum.push([top[0], interval[1]])\n }\n\n return accum\n },\n [firstInterval],\n sortedIntervals\n )\n\n return stack\n}\n"],"mappings":"AAAA,SAASA,KAAK,EAAEC,OAAO,EAAEC,MAAM,QAAQ,WAAW;AAIlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACC,SAAqB,EAAc;EAChE,IAAIH,OAAO,CAACG,SAAS,CAAC,EAAE,OAAOA,SAAS;EAExC,IAAMC,eAAe,GAAGD,SAAS,CAACE,IAAI,CAAC,UAACC,CAAC,EAAEC,CAAC;IAAA,OAAKD,CAAC,CAAC,CAAC,CAAC,GAAGC,CAAC,CAAC,CAAC,CAAC;EAAA,EAAC;EAC7D,IAAMC,aAAuB,GAAGT,KAAK,CAACK,eAAe,CAAC;EAEtD,IAAMK,KAAiB,GAAGR,MAAM,CAC9B,UAACS,KAAK,EAAEC,QAAkB,EAAK;IAC7B,IAAMC,GAAG,GAAGF,KAAK,CAACA,KAAK,CAACG,MAAM,GAAG,CAAC,CAAC;IACnC,IAAMC,iBAAiB,GAAGF,GAAG,CAAC,CAAC,CAAC,GAAGD,QAAQ,CAAC,CAAC,CAAC;IAC9C,IAAMI,mBAAmB,GAAGH,GAAG,CAAC,CAAC,CAAC,GAAGD,QAAQ,CAAC,CAAC,CAAC;IAEhD,IAAIG,iBAAiB,EAAE;MACrBJ,KAAK,CAACM,IAAI,CAACL,QAAQ,CAAC;IACtB,CAAC,MAAM,IAAII,mBAAmB,EAAE;MAC9BL,KAAK,CAACO,GAAG,CAAC,CAAC;MACXP,KAAK,CAACM,IAAI,CAAC,CAACJ,GAAG,CAAC,CAAC,CAAC,EAAED,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC;IAEA,OAAOD,KAAK;EACd,CAAC,EACD,CAACF,aAAa,CAAC,EACfJ,eACF,CAAC;EAED,OAAOK,KAAK;AACd","ignoreList":[]}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export var IntervalTypes
|
|
2
|
-
(function (IntervalTypes) {
|
|
1
|
+
export var IntervalTypes = /*#__PURE__*/function (IntervalTypes) {
|
|
3
2
|
IntervalTypes["Occurrence"] = "occurrence";
|
|
4
3
|
IntervalTypes["Service"] = "service";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
return IntervalTypes;
|
|
5
|
+
}({});
|
|
6
|
+
export var Unit = /*#__PURE__*/function (Unit) {
|
|
8
7
|
Unit["Millisecond"] = "millisecond";
|
|
9
8
|
Unit["Second"] = "second";
|
|
10
9
|
Unit["Minute"] = "minute";
|
|
@@ -13,9 +12,9 @@ export var Unit;
|
|
|
13
12
|
Unit["Week"] = "isoWeek";
|
|
14
13
|
Unit["Month"] = "month";
|
|
15
14
|
Unit["Year"] = "year";
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
return Unit;
|
|
16
|
+
}({});
|
|
17
|
+
export var StrategyTypes = /*#__PURE__*/function (StrategyTypes) {
|
|
19
18
|
StrategyTypes["ExactDateOfMonth"] = "exactDateOfMonth";
|
|
20
19
|
StrategyTypes["LastDayOfMonth"] = "lastDayOfMonth";
|
|
21
20
|
StrategyTypes["LastWeekdayOfMonth"] = "lastWeekdayOfMonth";
|
|
@@ -24,5 +23,6 @@ export var StrategyTypes;
|
|
|
24
23
|
StrategyTypes["Weekdays"] = "weekdays";
|
|
25
24
|
StrategyTypes["Window"] = "window";
|
|
26
25
|
StrategyTypes["XDayOfXWeekOfMonth"] = "xDayOfxWeekOfMonth";
|
|
27
|
-
|
|
26
|
+
return StrategyTypes;
|
|
27
|
+
}({});
|
|
28
28
|
//# sourceMappingURL=scheduling.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduling.types.js","names":["IntervalTypes","Unit","StrategyTypes"],"sources":["../../src/scheduling/scheduling.types.ts"],"sourcesContent":["import { Schema as ServiceHoursSchema } from '../service-hours'\n\nexport enum IntervalTypes {\n Occurrence = 'occurrence',\n Service = 'service',\n}\n\nexport enum Unit {\n Millisecond = 'millisecond',\n Second = 'second',\n Minute = 'minute',\n Hour = 'hour',\n Day = 'day',\n Week = 'isoWeek',\n Month = 'month',\n Year = 'year',\n}\n\nexport enum StrategyTypes {\n ExactDateOfMonth = 'exactDateOfMonth',\n LastDayOfMonth = 'lastDayOfMonth',\n LastWeekdayOfMonth = 'lastWeekdayOfMonth',\n NoRepeat = 'noRepeat',\n Stopwatch = 'stopwatch',\n Weekdays = 'weekdays',\n Window = 'window',\n XDayOfXWeekOfMonth = 'xDayOfxWeekOfMonth',\n}\n\nexport interface Options {\n date?: number\n dayOfWeek?: number\n duration: Period\n frequency: Period\n weekday?: number\n weekdays?: number[]\n weekOfMonth?: number\n}\n\nexport interface GetNext {\n readonly end: number\n readonly isInitial?: boolean\n readonly options?: Options\n readonly start: number\n readonly timezone: string\n readonly type: StrategyTypes\n}\n\nexport interface Interval {\n readonly [index: number]: number\n}\n\nexport interface Period {\n readonly unit: Unit\n readonly value: number\n}\n\nexport interface ScheduleIntervalsGenerator {\n readonly end: number\n readonly isInitial: boolean\n readonly strategy: Strategy\n readonly serviceHours: ServiceHoursSchema\n readonly start: number\n}\n\nexport interface Strategy {\n readonly options: Options\n readonly type: StrategyTypes\n}\n"],"mappings":"AAEA,WAAYA,aAAa
|
|
1
|
+
{"version":3,"file":"scheduling.types.js","names":["IntervalTypes","Unit","StrategyTypes"],"sources":["../../src/scheduling/scheduling.types.ts"],"sourcesContent":["import { Schema as ServiceHoursSchema } from '../service-hours'\n\nexport enum IntervalTypes {\n Occurrence = 'occurrence',\n Service = 'service',\n}\n\nexport enum Unit {\n Millisecond = 'millisecond',\n Second = 'second',\n Minute = 'minute',\n Hour = 'hour',\n Day = 'day',\n Week = 'isoWeek',\n Month = 'month',\n Year = 'year',\n}\n\nexport enum StrategyTypes {\n ExactDateOfMonth = 'exactDateOfMonth',\n LastDayOfMonth = 'lastDayOfMonth',\n LastWeekdayOfMonth = 'lastWeekdayOfMonth',\n NoRepeat = 'noRepeat',\n Stopwatch = 'stopwatch',\n Weekdays = 'weekdays',\n Window = 'window',\n XDayOfXWeekOfMonth = 'xDayOfxWeekOfMonth',\n}\n\nexport interface Options {\n date?: number\n dayOfWeek?: number\n duration: Period\n frequency: Period\n weekday?: number\n weekdays?: number[]\n weekOfMonth?: number\n}\n\nexport interface GetNext {\n readonly end: number\n readonly isInitial?: boolean\n readonly options?: Options\n readonly start: number\n readonly timezone: string\n readonly type: StrategyTypes\n}\n\nexport interface Interval {\n readonly [index: number]: number\n}\n\nexport interface Period {\n readonly unit: Unit\n readonly value: number\n}\n\nexport interface ScheduleIntervalsGenerator {\n readonly end: number\n readonly isInitial: boolean\n readonly strategy: Strategy\n readonly serviceHours: ServiceHoursSchema\n readonly start: number\n}\n\nexport interface Strategy {\n readonly options: Options\n readonly type: StrategyTypes\n}\n"],"mappings":"AAEA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAKzB,WAAYC,IAAI,0BAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA;AAWhB,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
-
var _marked = /*#__PURE__*/_regeneratorRuntime.mark(getNext);
|
|
3
2
|
import moment from 'moment-timezone';
|
|
4
3
|
import { StrategyTypes, Unit } from '../scheduling.types';
|
|
5
4
|
|
|
@@ -7,20 +6,25 @@ import { StrategyTypes, Unit } from '../scheduling.types';
|
|
|
7
6
|
* Generates next occurrence interval for stopwatch and window strategy
|
|
8
7
|
*/
|
|
9
8
|
export function getNext(_ref) {
|
|
10
|
-
var end
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var end = _ref.end,
|
|
10
|
+
isInitial = _ref.isInitial,
|
|
11
|
+
options = _ref.options,
|
|
12
|
+
start = _ref.start,
|
|
13
|
+
timezone = _ref.timezone,
|
|
14
|
+
type = _ref.type;
|
|
15
|
+
return /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
16
|
+
var duration, frequency, durationUnit, durationValue, frequencyUnit, frequencyValue, initial, dateCursor, nextOccurrenceStart, nextOccurrenceEnd, nextOccurrenceStartByBackCalculation, earliestNextOccurrenceStart, nextOccurrence;
|
|
17
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
18
|
+
while (1) switch (_context.prev = _context.next) {
|
|
14
19
|
case 0:
|
|
15
|
-
end = _ref.end, isInitial = _ref.isInitial, options = _ref.options, start = _ref.start, timezone = _ref.timezone, type = _ref.type;
|
|
16
20
|
duration = options.duration, frequency = options.frequency;
|
|
17
21
|
durationUnit = duration.unit, durationValue = duration.value;
|
|
18
22
|
frequencyUnit = frequency.unit, frequencyValue = frequency.value;
|
|
19
23
|
initial = isInitial;
|
|
20
24
|
dateCursor = initial ? moment.tz(start, timezone).valueOf() : moment.tz(start, timezone).add(1, Unit.Millisecond).valueOf();
|
|
21
|
-
case
|
|
25
|
+
case 1:
|
|
22
26
|
if (!(dateCursor < end)) {
|
|
23
|
-
_context.next =
|
|
27
|
+
_context.next = 4;
|
|
24
28
|
break;
|
|
25
29
|
}
|
|
26
30
|
nextOccurrenceStart = void 0;
|
|
@@ -37,27 +41,27 @@ export function getNext(_ref) {
|
|
|
37
41
|
nextOccurrenceStart = moment.max(earliestNextOccurrenceStart, nextOccurrenceStartByBackCalculation).valueOf();
|
|
38
42
|
}
|
|
39
43
|
if (!(nextOccurrenceEnd <= nextOccurrenceStart || nextOccurrenceEnd > end)) {
|
|
40
|
-
_context.next =
|
|
44
|
+
_context.next = 2;
|
|
41
45
|
break;
|
|
42
46
|
}
|
|
43
47
|
return _context.abrupt("return");
|
|
44
|
-
case
|
|
48
|
+
case 2:
|
|
45
49
|
if (!(nextOccurrenceStart >= start)) {
|
|
46
|
-
_context.next =
|
|
50
|
+
_context.next = 3;
|
|
47
51
|
break;
|
|
48
52
|
}
|
|
49
53
|
nextOccurrence = [nextOccurrenceStart, nextOccurrenceEnd - 1];
|
|
50
|
-
_context.next =
|
|
54
|
+
_context.next = 3;
|
|
51
55
|
return nextOccurrence;
|
|
52
|
-
case
|
|
56
|
+
case 3:
|
|
53
57
|
dateCursor = nextOccurrenceEnd;
|
|
54
|
-
_context.next =
|
|
58
|
+
_context.next = 1;
|
|
55
59
|
break;
|
|
56
|
-
case
|
|
60
|
+
case 4:
|
|
57
61
|
case "end":
|
|
58
62
|
return _context.stop();
|
|
59
63
|
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
64
|
+
}, _callee);
|
|
65
|
+
})();
|
|
62
66
|
}
|
|
63
67
|
//# sourceMappingURL=getNext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNext.js","names":["
|
|
1
|
+
{"version":3,"file":"getNext.js","names":["moment","StrategyTypes","Unit","getNext","_ref","end","isInitial","options","start","timezone","type","_regeneratorRuntime","mark","_callee","duration","frequency","durationUnit","durationValue","frequencyUnit","frequencyValue","initial","dateCursor","nextOccurrenceStart","nextOccurrenceEnd","nextOccurrenceStartByBackCalculation","earliestNextOccurrenceStart","nextOccurrence","wrap","_context","prev","next","unit","value","tz","valueOf","add","Millisecond","Stopwatch","subtract","max","abrupt","stop"],"sources":["../../../src/scheduling/strategies/getNext.ts"],"sourcesContent":["import moment from 'moment-timezone'\n\nimport { GetNext, Interval, StrategyTypes, Unit } from '../scheduling.types'\n\n/**\n * Generates next occurrence interval for stopwatch and window strategy\n */\nexport function* getNext({\n end,\n isInitial,\n options,\n start,\n timezone,\n type,\n}: GetNext): IterableIterator<Interval> {\n const { duration, frequency } = options\n const { unit: durationUnit, value: durationValue } = duration\n const { unit: frequencyUnit, value: frequencyValue } = frequency\n\n let initial: boolean = isInitial\n\n let dateCursor: number = initial\n ? moment.tz(start, timezone).valueOf()\n : moment\n .tz(start, timezone)\n .add(1, Unit.Millisecond)\n .valueOf()\n\n while (dateCursor < end) {\n let nextOccurrenceStart: number\n let nextOccurrenceEnd: number\n\n if (type === StrategyTypes.Stopwatch) {\n nextOccurrenceStart = dateCursor\n nextOccurrenceEnd = moment\n .tz(dateCursor, timezone)\n .add(durationValue, durationUnit)\n .valueOf()\n\n } else {\n nextOccurrenceEnd = moment\n .tz(dateCursor, timezone)\n .add(frequencyValue, frequencyUnit)\n .valueOf()\n\n const nextOccurrenceStartByBackCalculation = moment\n .tz(nextOccurrenceEnd, timezone)\n .subtract(durationValue, durationUnit)\n\n const earliestNextOccurrenceStart = moment\n .tz(dateCursor, timezone)\n\n // NOTE: this is to ensure that the next occurrence start is always\n // greater than or equal to the date cursor. Moment js handles month addition and subtraction\n // with estimations (Dec 31st + 2 months gives Feb 28th/29th). This can lead to inaccurate start times when calculating forwards then backwards at the end of the month.\n nextOccurrenceStart =\n moment.max(\n earliestNextOccurrenceStart,\n nextOccurrenceStartByBackCalculation\n ).valueOf()\n }\n\n\n if (nextOccurrenceEnd <= nextOccurrenceStart || nextOccurrenceEnd > end) {\n return\n }\n\n if (nextOccurrenceStart >= start) {\n const nextOccurrence = [nextOccurrenceStart, nextOccurrenceEnd - 1]\n\n yield nextOccurrence\n }\n\n dateCursor = nextOccurrenceEnd\n }\n}\n"],"mappings":";AAAA,OAAOA,MAAM,MAAM,iBAAi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AK,QAAA,CAAAE,IAAA;UAAA;QAAA;QAAA;UAAA,OAAAF,QAAA,CAAAa,IAAA;MAAA;IAAA,GAAA5B,OAAA;EAAA;AAAA","ignoreList":[]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
2
|
-
var _marked = /*#__PURE__*/_regeneratorRuntime.mark(getNextExactDateOfMonth);
|
|
3
2
|
import moment from 'moment-timezone';
|
|
4
3
|
import { Unit } from '../scheduling.types';
|
|
5
4
|
|
|
@@ -7,52 +6,56 @@ import { Unit } from '../scheduling.types';
|
|
|
7
6
|
* Generates next occurrence interval for exact date of month strategy
|
|
8
7
|
*/
|
|
9
8
|
export function getNextExactDateOfMonth(_ref) {
|
|
10
|
-
var end
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
var end = _ref.end,
|
|
10
|
+
isInitial = _ref.isInitial,
|
|
11
|
+
options = _ref.options,
|
|
12
|
+
start = _ref.start,
|
|
13
|
+
timezone = _ref.timezone;
|
|
14
|
+
return /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
15
|
+
var date, duration, frequency, durationUnit, durationValue, frequencyUnit, frequencyValue, dateCursor, monthDate, hasExactDate, nextOccurrenceEnd, nextOccurrenceStart, nextOccurrence, nextDateCursor;
|
|
16
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
17
|
+
while (1) switch (_context.prev = _context.next) {
|
|
14
18
|
case 0:
|
|
15
|
-
end = _ref.end, isInitial = _ref.isInitial, options = _ref.options, start = _ref.start, timezone = _ref.timezone;
|
|
16
19
|
date = options.date, duration = options.duration, frequency = options.frequency;
|
|
17
20
|
durationUnit = duration.unit, durationValue = duration.value;
|
|
18
21
|
frequencyUnit = frequency.unit, frequencyValue = frequency.value;
|
|
19
22
|
dateCursor = isInitial ? moment.tz(start, timezone).startOf(Unit.Month).valueOf() : moment.tz(start, timezone).add(frequencyValue, frequencyUnit).startOf(Unit.Month).valueOf();
|
|
20
|
-
case
|
|
23
|
+
case 1:
|
|
21
24
|
if (!(dateCursor < end)) {
|
|
22
|
-
_context.next =
|
|
25
|
+
_context.next = 4;
|
|
23
26
|
break;
|
|
24
27
|
}
|
|
25
28
|
monthDate = moment.tz(dateCursor, timezone).date(date).date();
|
|
26
29
|
hasExactDate = monthDate === date;
|
|
27
30
|
if (!hasExactDate) {
|
|
28
|
-
_context.next =
|
|
31
|
+
_context.next = 3;
|
|
29
32
|
break;
|
|
30
33
|
}
|
|
31
34
|
nextOccurrenceEnd = moment.tz(dateCursor, timezone).date(date).add(1, Unit.Day).valueOf();
|
|
32
35
|
nextOccurrenceStart = moment.tz(nextOccurrenceEnd, timezone).subtract(durationValue, durationUnit).valueOf();
|
|
33
36
|
if (!(nextOccurrenceEnd <= nextOccurrenceStart || nextOccurrenceEnd > end)) {
|
|
34
|
-
_context.next =
|
|
37
|
+
_context.next = 2;
|
|
35
38
|
break;
|
|
36
39
|
}
|
|
37
40
|
return _context.abrupt("return");
|
|
38
|
-
case
|
|
41
|
+
case 2:
|
|
39
42
|
if (!(nextOccurrenceStart >= start)) {
|
|
40
|
-
_context.next =
|
|
43
|
+
_context.next = 3;
|
|
41
44
|
break;
|
|
42
45
|
}
|
|
43
46
|
nextOccurrence = [nextOccurrenceStart, nextOccurrenceEnd - 1];
|
|
44
|
-
_context.next =
|
|
47
|
+
_context.next = 3;
|
|
45
48
|
return nextOccurrence;
|
|
46
|
-
case
|
|
49
|
+
case 3:
|
|
47
50
|
nextDateCursor = moment.tz(dateCursor, timezone).add(1, Unit.Month).valueOf();
|
|
48
51
|
dateCursor = nextDateCursor;
|
|
49
|
-
_context.next =
|
|
52
|
+
_context.next = 1;
|
|
50
53
|
break;
|
|
51
|
-
case
|
|
54
|
+
case 4:
|
|
52
55
|
case "end":
|
|
53
56
|
return _context.stop();
|
|
54
57
|
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
58
|
+
}, _callee);
|
|
59
|
+
})();
|
|
57
60
|
}
|
|
58
61
|
//# sourceMappingURL=getNextExactDateOfMonth.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getNextExactDateOfMonth.js","names":["
|
|
1
|
+
{"version":3,"file":"getNextExactDateOfMonth.js","names":["moment","Unit","getNextExactDateOfMonth","_ref","end","isInitial","options","start","timezone","_regeneratorRuntime","mark","_callee","date","duration","frequency","durationUnit","durationValue","frequencyUnit","frequencyValue","dateCursor","monthDate","hasExactDate","nextOccurrenceEnd","nextOccurrenceStart","nextOccurrence","nextDateCursor","wrap","_context","prev","next","unit","value","tz","startOf","Month","valueOf","add","Day","subtract","abrupt","stop"],"sources":["../../../src/scheduling/strategies/getNextExactDateOfMonth.ts"],"sourcesContent":["import moment from 'moment-timezone'\n\nimport { GetNext, Interval, Unit } from '../scheduling.types'\n\n/**\n * Generates next occurrence interval for exact date of month strategy\n */\nexport function* getNextExactDateOfMonth({\n end,\n isInitial,\n options,\n start,\n timezone,\n}: GetNext): IterableIterator<Interval> {\n const { date, duration, frequency } = options\n const { unit: durationUnit, value: durationValue } = duration\n const { unit: frequencyUnit, value: frequencyValue } = frequency\n\n let dateCursor: number = isInitial\n ? moment\n .tz(start, timezone)\n .startOf(Unit.Month)\n .valueOf()\n : moment\n .tz(start, timezone)\n .add(frequencyValue, frequencyUnit)\n .startOf(Unit.Month)\n .valueOf()\n\n while (dateCursor < end) {\n const monthDate = moment\n .tz(dateCursor, timezone)\n .date(date)\n .date()\n\n const hasExactDate = monthDate === date\n\n if (hasExactDate) {\n const nextOccurrenceEnd: number = moment\n .tz(dateCursor, timezone)\n .date(date)\n .add(1, Unit.Day)\n .valueOf()\n\n const nextOccurrenceStart: number = moment\n .tz(nextOccurrenceEnd, timezone)\n .subtract(durationValue, durationUnit)\n .valueOf()\n\n if (nextOccurrenceEnd <= nextOccurrenceStart || nextOccurrenceEnd > end) {\n return\n }\n\n if (nextOccurrenceStart >= start) {\n const nextOccurrence: Interval = [\n nextOccurrenceStart,\n n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