@dereekb/date 9.24.46 → 9.25.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.
- package/CHANGELOG.md +13 -0
- package/package.json +2 -2
- package/src/lib/date/date.block.d.ts +373 -16
- package/src/lib/date/date.block.day.d.ts +1 -0
- package/src/lib/date/date.block.day.js +1 -0
- package/src/lib/date/date.block.day.js.map +1 -1
- package/src/lib/date/date.block.js +236 -24
- package/src/lib/date/date.block.js.map +1 -1
- package/src/lib/date/{date.validator.d.ts → date.block.validator.d.ts} +6 -0
- package/src/lib/date/{date.validator.js → date.block.validator.js} +7 -1
- package/src/lib/date/date.block.validator.js.map +1 -0
- package/src/lib/date/date.block.week.d.ts +24 -0
- package/src/lib/date/date.block.week.js +12 -0
- package/src/lib/date/date.block.week.js.map +1 -1
- package/src/lib/date/date.cell.d.ts +357 -0
- package/src/lib/date/date.cell.factory.d.ts +337 -0
- package/src/lib/date/date.cell.factory.js +479 -0
- package/src/lib/date/date.cell.factory.js.map +1 -0
- package/src/lib/date/date.cell.filter.d.ts +18 -0
- package/src/lib/date/date.cell.filter.js +65 -0
- package/src/lib/date/date.cell.filter.js.map +1 -0
- package/src/lib/date/date.cell.index.d.ts +375 -0
- package/src/lib/date/date.cell.index.js +731 -0
- package/src/lib/date/date.cell.index.js.map +1 -0
- package/src/lib/date/date.cell.js +518 -0
- package/src/lib/date/date.cell.js.map +1 -0
- package/src/lib/date/date.cell.schedule.d.ts +409 -0
- package/src/lib/date/date.cell.schedule.day.d.ts +9 -0
- package/src/lib/date/date.cell.schedule.day.js +15 -0
- package/src/lib/date/date.cell.schedule.day.js.map +1 -0
- package/src/lib/date/date.cell.schedule.js +667 -0
- package/src/lib/date/date.cell.schedule.js.map +1 -0
- package/src/lib/date/date.cell.validator.d.ts +14 -0
- package/src/lib/date/date.cell.validator.js +67 -0
- package/src/lib/date/date.cell.validator.js.map +1 -0
- package/src/lib/date/date.cell.week.d.ts +31 -0
- package/src/lib/date/date.cell.week.js +40 -0
- package/src/lib/date/date.cell.week.js.map +1 -0
- package/src/lib/date/date.d.ts +18 -0
- package/src/lib/date/date.duration.d.ts +2 -1
- package/src/lib/date/date.duration.js +6 -1
- package/src/lib/date/date.duration.js.map +1 -1
- package/src/lib/date/date.format.js +2 -1
- package/src/lib/date/date.format.js.map +1 -1
- package/src/lib/date/date.js +29 -1
- package/src/lib/date/date.js.map +1 -1
- package/src/lib/date/date.range.d.ts +4 -2
- package/src/lib/date/date.range.js +6 -4
- package/src/lib/date/date.range.js.map +1 -1
- package/src/lib/date/date.range.timezone.d.ts +27 -6
- package/src/lib/date/date.range.timezone.js +21 -7
- package/src/lib/date/date.range.timezone.js.map +1 -1
- package/src/lib/date/date.schedule.d.ts +99 -0
- package/src/lib/date/date.schedule.js +63 -0
- package/src/lib/date/date.schedule.js.map +1 -1
- package/src/lib/date/date.time.js +3 -3
- package/src/lib/date/date.time.js.map +1 -1
- package/src/lib/date/date.timezone.d.ts +98 -3
- package/src/lib/date/date.timezone.js +191 -24
- package/src/lib/date/date.timezone.js.map +1 -1
- package/src/lib/date/date.week.js +3 -1
- package/src/lib/date/date.week.js.map +1 -1
- package/src/lib/date/index.d.ts +8 -1
- package/src/lib/date/index.js +8 -1
- package/src/lib/date/index.js.map +1 -1
- package/src/lib/expires/expires.js +1 -1
- package/src/lib/expires/expires.js.map +1 -1
- package/src/lib/timezone/index.d.ts +1 -0
- package/src/lib/timezone/index.js +1 -0
- package/src/lib/timezone/index.js.map +1 -1
- package/src/lib/timezone/timezone.d.ts +7 -0
- package/src/lib/timezone/timezone.js +14 -2
- package/src/lib/timezone/timezone.js.map +1 -1
- package/src/lib/timezone/timezone.validator.d.ts +6 -0
- package/src/lib/timezone/timezone.validator.js +26 -0
- package/src/lib/timezone/timezone.validator.js.map +1 -0
- package/src/lib/date/date.validator.js.map +0 -1
|
@@ -1,23 +1,30 @@
|
|
|
1
|
-
import { DayOfWeek, RequiredOnKeys, IndexNumber, IndexRange, IndexRef, UniqueModel, FactoryWithRequiredInput, FilterFunction, Milliseconds, Hours, MapFunction, SortCompareFunction, ArrayOrValue, Maybe, TimezoneString, ISO8601DayString, FractionalHour, DateRelativeState } from '@dereekb/util';
|
|
1
|
+
import { DayOfWeek, RequiredOnKeys, IndexNumber, IndexRange, IndexRef, UniqueModel, FactoryWithRequiredInput, FilterFunction, Milliseconds, Hours, MapFunction, SortCompareFunction, ArrayOrValue, Maybe, TimezoneString, ISO8601DayString, FractionalHour, DateRelativeState, TimezoneStringRef } from '@dereekb/util';
|
|
2
2
|
import { DateRange, DateRangeDayDistanceInput, DateRangeStart } from './date.range';
|
|
3
3
|
import { DateDurationSpan } from './date.duration';
|
|
4
4
|
import { DateTimezoneUtcNormalFunctionInput, DateTimezoneUtcNormalInstance, DateTimezoneConversionConfigUseSystemTimezone } from './date.timezone';
|
|
5
5
|
/**
|
|
6
6
|
* Index from 0 of which day this block represents.
|
|
7
|
+
*
|
|
8
|
+
* @deprecated use DateCell implementation instead.
|
|
7
9
|
*/
|
|
8
10
|
export declare type DateBlockIndex = number;
|
|
9
11
|
/**
|
|
10
12
|
* Returns true if the index is a non-negative integer.
|
|
11
13
|
*
|
|
14
|
+
* @deprecated use DateCell implementation instead.
|
|
12
15
|
* @param input
|
|
13
16
|
*/
|
|
14
17
|
export declare function isValidDateBlockIndex(input: DateBlockIndex): boolean;
|
|
15
18
|
/**
|
|
16
19
|
* Input type that is either a Date or a DateBlockIndex.
|
|
20
|
+
*
|
|
21
|
+
* @deprecated use DateCell implementation instead.
|
|
17
22
|
*/
|
|
18
23
|
export declare type DateOrDateBlockIndex = Date | DateBlockIndex;
|
|
19
24
|
/**
|
|
20
25
|
* A duration-span block.
|
|
26
|
+
*
|
|
27
|
+
* @deprecated use DateCell implementation instead.
|
|
21
28
|
*/
|
|
22
29
|
export interface DateBlock extends IndexRef {
|
|
23
30
|
i: DateBlockIndex;
|
|
@@ -29,16 +36,21 @@ export declare class DateBlock {
|
|
|
29
36
|
/**
|
|
30
37
|
* Converts the input number or DateBlock to a DateBlock.
|
|
31
38
|
*
|
|
39
|
+
* @deprecated use DateCell implementation instead.
|
|
32
40
|
* @param dateBlockOrIndex
|
|
33
41
|
* @returns
|
|
34
42
|
*/
|
|
35
43
|
export declare function dateBlock(dateBlockOrIndex: DateBlockIndex | DateBlock): DateBlock;
|
|
36
44
|
/**
|
|
37
45
|
* An array of DateBlock-like values.
|
|
46
|
+
*
|
|
47
|
+
* @deprecated use DateCell implementation instead.
|
|
38
48
|
*/
|
|
39
49
|
export declare type DateBlockArray<B extends DateBlock = DateBlock> = B[];
|
|
40
50
|
/**
|
|
41
51
|
* Reference to a DateBlockArray
|
|
52
|
+
*
|
|
53
|
+
* @deprecated use DateCell implementation instead.
|
|
42
54
|
*/
|
|
43
55
|
export declare type DateBlockArrayRef<B extends DateBlock = DateBlock> = {
|
|
44
56
|
blocks: DateBlockArray<B>;
|
|
@@ -47,20 +59,28 @@ export declare type DateBlockArrayRef<B extends DateBlock = DateBlock> = {
|
|
|
47
59
|
* DateBlockTiming with only the start time.
|
|
48
60
|
*
|
|
49
61
|
* The start time is midnight of what timezone it is in, and can be used to infer the target timezone offset for that date.
|
|
62
|
+
*
|
|
63
|
+
* @deprecated use DateCell implementation instead.
|
|
50
64
|
*/
|
|
51
65
|
export declare type DateBlockTimingStart = DateRangeStart;
|
|
52
66
|
/**
|
|
53
67
|
* The maximum number of hours that a DateBlockTiming's start can be offset. This means a max timezone of UTC+12.
|
|
54
68
|
*
|
|
55
69
|
* The timezones UTC+13 and UTC+14 are not supported, and will experience undetermined behavior.
|
|
70
|
+
*
|
|
71
|
+
* @deprecated use DateCell implementation instead.
|
|
56
72
|
*/
|
|
57
73
|
export declare const MAX_DATE_BLOCK_TIMING_OFFSET_HOURS = 12;
|
|
58
74
|
/**
|
|
59
75
|
* The minimum number of hours that a DateBlockTiming's start can be offset. This means a min timezone of UTC-12.
|
|
76
|
+
*
|
|
77
|
+
* @deprecated use DateCell implementation instead.
|
|
60
78
|
*/
|
|
61
79
|
export declare const MIN_DATE_BLOCK_TIMING_OFFSET_HOURS = -12;
|
|
62
80
|
/**
|
|
63
81
|
* The DateBlockTimingStart and startsAt times
|
|
82
|
+
*
|
|
83
|
+
* @deprecated use DateCell implementation instead.
|
|
64
84
|
*/
|
|
65
85
|
export declare type DateBlockTimingStartAndStartsAt = DateBlockTimingStart & Pick<DateBlockTiming, 'startsAt'>;
|
|
66
86
|
/**
|
|
@@ -74,30 +94,50 @@ export declare type DateBlockTimingStartAndStartsAt = DateBlockTimingStart & Pic
|
|
|
74
94
|
* - The startsAt time should be greater than or equal to the normalized start
|
|
75
95
|
* - The startsAt time should be on the same date as normalized start
|
|
76
96
|
* - The end time should equal the ending date/time of the final end duration.
|
|
97
|
+
* - (Recommended, Optional) The timezone the date block timing is for. This timezone is required for areas that experience daylight savings in order to properly handle the offsets.
|
|
98
|
+
*
|
|
99
|
+
* @deprecated use DateCell implementation instead.
|
|
77
100
|
*/
|
|
78
|
-
export interface DateBlockTiming extends DateBlockTimingStart, DateRange, DateDurationSpan {
|
|
101
|
+
export interface DateBlockTiming extends DateBlockTimingStart, DateRange, DateDurationSpan, Partial<TimezoneStringRef> {
|
|
79
102
|
}
|
|
80
103
|
/**
|
|
81
104
|
* The DateRange component for a DateBlockTiming. The start date is a DateBlockTimingStart.
|
|
105
|
+
*
|
|
106
|
+
* @deprecated use DateCell implementation instead.
|
|
82
107
|
*/
|
|
83
|
-
export declare type DateBlockTimingStartEndRange = DateBlockTimingStart & Pick<DateBlockTiming, 'end'>;
|
|
108
|
+
export declare type DateBlockTimingStartEndRange = DateBlockTimingStart & Pick<DateBlockTiming, 'end' | 'timezone'>;
|
|
84
109
|
/**
|
|
85
110
|
* The start date of a DateBlockTimingStart, along with the endDay which is a normalized day that is at midnight of the last day in the timezone.
|
|
86
111
|
*
|
|
87
112
|
* They are expected to both be in the same timezone.
|
|
113
|
+
*
|
|
114
|
+
* @deprecated use DateCell implementation instead.
|
|
88
115
|
*/
|
|
89
116
|
export declare type DateBlockTimingStartEndDayDateRange = DateBlockTimingStart & {
|
|
90
117
|
endDay: Date;
|
|
91
118
|
};
|
|
119
|
+
/**
|
|
120
|
+
* The startsAt time of the event.
|
|
121
|
+
*
|
|
122
|
+
* @deprecated use DateCell implementation instead.
|
|
123
|
+
*/
|
|
124
|
+
export declare type DateBlockTimingEventStartsAt = Pick<DateBlockTiming, 'startsAt'>;
|
|
92
125
|
/**
|
|
93
126
|
* A startsAt time and duration.
|
|
127
|
+
*
|
|
128
|
+
* @deprecated use DateCell implementation instead.
|
|
94
129
|
*/
|
|
95
130
|
export declare type DateBlockTimingEvent = Pick<DateBlockTiming, 'startsAt' | 'duration'>;
|
|
96
131
|
export declare class DateBlockTiming extends DateDurationSpan {
|
|
97
132
|
start: Date;
|
|
98
133
|
end: Date;
|
|
134
|
+
timezone?: TimezoneString;
|
|
99
135
|
constructor(template?: DateBlockTiming);
|
|
100
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
*
|
|
139
|
+
* @deprecated use DateCell implementation instead.
|
|
140
|
+
*/
|
|
101
141
|
export interface CurrentDateBlockTimingUtcData {
|
|
102
142
|
/**
|
|
103
143
|
* Non-normalized start date in the system time.
|
|
@@ -108,6 +148,10 @@ export interface CurrentDateBlockTimingUtcData {
|
|
|
108
148
|
*/
|
|
109
149
|
originalUtcOffsetInHours: Hours;
|
|
110
150
|
}
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* @deprecated use DateCell implementation instead.
|
|
154
|
+
*/
|
|
111
155
|
export interface CurrentDateBlockTimingOffsetData extends CurrentDateBlockTimingUtcData {
|
|
112
156
|
offset: Milliseconds;
|
|
113
157
|
currentTimezoneOffsetInHours: Hours;
|
|
@@ -115,6 +159,7 @@ export interface CurrentDateBlockTimingOffsetData extends CurrentDateBlockTiming
|
|
|
115
159
|
/**
|
|
116
160
|
* Returns true if the two timings are equivalent.
|
|
117
161
|
*
|
|
162
|
+
* @deprecated use DateCell implementation instead.
|
|
118
163
|
* @param a
|
|
119
164
|
* @param b
|
|
120
165
|
*/
|
|
@@ -122,6 +167,7 @@ export declare function isSameDateBlockTiming(a: Maybe<DateBlockTiming>, b: Mayb
|
|
|
122
167
|
/**
|
|
123
168
|
* Returns the date range from the start of the first event to the end time of the last event.
|
|
124
169
|
*
|
|
170
|
+
* @deprecated use DateCell implementation instead.
|
|
125
171
|
* @param timing
|
|
126
172
|
* @returns
|
|
127
173
|
*/
|
|
@@ -129,20 +175,50 @@ export declare function dateBlockTimingFullRange(timing: Pick<DateBlockTiming, '
|
|
|
129
175
|
/**
|
|
130
176
|
* Returns the date range from the start of the first event to the end time of the last event.
|
|
131
177
|
*
|
|
178
|
+
* @deprecated use DateCell implementation instead.
|
|
132
179
|
* @param timing
|
|
133
180
|
* @returns
|
|
134
181
|
*/
|
|
135
182
|
export declare function dateBlockTimingEventRange(timing: Pick<DateBlockTiming, 'startsAt' | 'end'>): DateRange;
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* @deprecated use DateCell implementation instead.
|
|
186
|
+
* @param timing
|
|
187
|
+
* @returns
|
|
188
|
+
*/
|
|
136
189
|
export declare function getCurrentDateBlockTimingUtcData(timing: DateRangeStart): CurrentDateBlockTimingUtcData;
|
|
137
190
|
/**
|
|
138
191
|
* The offset in milliseconds to the "real start date", the first second in the target day on in the system timezone.
|
|
139
192
|
*
|
|
193
|
+
* @deprecated use DateCell implementation instead.
|
|
140
194
|
* @param timing
|
|
141
195
|
*/
|
|
142
196
|
export declare function getCurrentDateBlockTimingOffsetData(timing: DateRangeStart): CurrentDateBlockTimingOffsetData;
|
|
197
|
+
/**
|
|
198
|
+
*
|
|
199
|
+
* @deprecated use DateCell implementation instead.
|
|
200
|
+
* @param timing
|
|
201
|
+
* @returns
|
|
202
|
+
*/
|
|
143
203
|
export declare function getCurrentDateBlockTimingOffset(timing: DateRangeStart): Milliseconds;
|
|
204
|
+
/**
|
|
205
|
+
* @deprecated use DateCell implementation instead.
|
|
206
|
+
*/
|
|
144
207
|
export declare type TimingIsExpectedTimezoneFunction = (timing: DateRangeStart) => boolean;
|
|
208
|
+
/**
|
|
209
|
+
*
|
|
210
|
+
* @deprecated use DateCell implementation instead.
|
|
211
|
+
* @param timezone
|
|
212
|
+
* @returns
|
|
213
|
+
*/
|
|
145
214
|
export declare function timingIsInExpectedTimezoneFunction(timezone: DateTimezoneUtcNormalFunctionInput): (timing: DateRangeStart) => boolean;
|
|
215
|
+
/**
|
|
216
|
+
*
|
|
217
|
+
* @deprecated use DateCell implementation instead.
|
|
218
|
+
* @param timing
|
|
219
|
+
* @param timezone
|
|
220
|
+
* @returns
|
|
221
|
+
*/
|
|
146
222
|
export declare function timingIsInExpectedTimezone(timing: DateRangeStart, timezone: DateTimezoneUtcNormalFunctionInput): boolean;
|
|
147
223
|
/**
|
|
148
224
|
* Returns the total minutes between the start of the first event and the end of the last event.
|
|
@@ -154,6 +230,7 @@ export declare function getDateBlockTimingFirstEventDateRange(timing: Pick<DateB
|
|
|
154
230
|
/**
|
|
155
231
|
* Returns the fractional hours in the event.
|
|
156
232
|
*
|
|
233
|
+
* @deprecated use DateCell implementation instead.
|
|
157
234
|
* @param timing
|
|
158
235
|
* @returns
|
|
159
236
|
*/
|
|
@@ -162,6 +239,7 @@ export declare type TimingDateTimezoneUtcNormalInput = DateRangeStart | DateTime
|
|
|
162
239
|
/**
|
|
163
240
|
* Creates a DateTimezoneUtcNormalInstance from the input.
|
|
164
241
|
*
|
|
242
|
+
* @deprecated use DateCell implementation instead.
|
|
165
243
|
* @param input
|
|
166
244
|
* @returns
|
|
167
245
|
*/
|
|
@@ -169,6 +247,7 @@ export declare function timingDateTimezoneUtcNormal(input: TimingDateTimezoneUtc
|
|
|
169
247
|
/**
|
|
170
248
|
* Convenience function that extends timingDateTimezoneUtcNormal() but also asserts the that the timing matches it.
|
|
171
249
|
*
|
|
250
|
+
* @deprecated use DateCell implementation instead.
|
|
172
251
|
* @param input
|
|
173
252
|
* @param timing
|
|
174
253
|
* @returns
|
|
@@ -177,23 +256,23 @@ export declare function assertedTimingDateTimezoneUtcNormal(input: TimingDateTim
|
|
|
177
256
|
/**
|
|
178
257
|
* Converts a DateBlockTimingStartEndRange and DateBlockTimingEvent that originated from the same DateBlockTiming back to the original DateBlockTiming.
|
|
179
258
|
*
|
|
259
|
+
* This does not check for validity of the input event, and as such can return an invalid timing. Instead, use safeDateBlockTimingFromDateRangeAndEvent() for enforced validity and return of a valid timing.
|
|
260
|
+
*
|
|
180
261
|
* The timezone is recommended to be provided if available, otherwise daylight savings might be impacted.
|
|
181
262
|
*
|
|
263
|
+
* @deprecated use DateCell implementation instead.
|
|
182
264
|
* @param dateBlockTimingStartEndRange
|
|
183
265
|
* @param event
|
|
184
266
|
* @param timezone
|
|
185
267
|
* @returns
|
|
186
268
|
*/
|
|
187
|
-
export declare function dateBlockTimingFromDateRangeAndEvent(dateBlockTimingStartEndRange: DateBlockTimingStartEndRange, event: DateBlockTimingEvent
|
|
188
|
-
/**
|
|
189
|
-
* @deprecated timezone should be provided, as it will behave properly for daylight savings changes.
|
|
190
|
-
*/
|
|
191
|
-
export declare function dateBlockTimingFromDateRangeAndEvent(dateBlockTimingStartEndRange: DateBlockTimingStartEndRange, event: DateBlockTimingEvent, timezone?: DateTimezoneUtcNormalInstance | TimezoneString): DateBlockTiming;
|
|
269
|
+
export declare function dateBlockTimingFromDateRangeAndEvent(dateBlockTimingStartEndRange: DateBlockTimingStartEndRange, event: DateBlockTimingEvent): DateBlockTiming;
|
|
192
270
|
/**
|
|
193
271
|
* Converts a DateBlockTimingStartEndRange and a DateBlockTimingEvent to a DateBlockTiming.
|
|
194
272
|
*
|
|
195
|
-
* The input event does not have to be from the original DateBlockTimingStartEndRange
|
|
273
|
+
* The input event does not have to be from the original DateBlockTimingStartEndRange, but the start date is always retained, and the same end day is retained, but may be updated to reflect a new end date/time.
|
|
196
274
|
*
|
|
275
|
+
* @deprecated use DateCell implementation instead.
|
|
197
276
|
* @param dateBlockTimingStartEndRange
|
|
198
277
|
* @param event
|
|
199
278
|
* @param timezone
|
|
@@ -207,20 +286,18 @@ export declare function safeDateBlockTimingFromDateRangeAndEvent(dateBlockTiming
|
|
|
207
286
|
/**
|
|
208
287
|
* Converts a DateBlockTimingStartEndDayDateRange and DateBlockTimingEvent to a DateBlockTiming. The event is used to derive the startsAt, duration and end time. The timezone offset is retained.
|
|
209
288
|
*
|
|
289
|
+
* @deprecated use DateCell implementation instead.
|
|
210
290
|
* @param dateBlockTimingStartEndDayDateRange
|
|
211
291
|
* @param event
|
|
212
292
|
* @returns
|
|
213
293
|
*/
|
|
214
294
|
export declare function dateBlockTimingFromDateBlockTimingStartEndDayDateRange(dateBlockTimingStartEndDayDateRange: DateBlockTimingStartEndDayDateRange, event: DateBlockTimingEvent, timezone: DateTimezoneUtcNormalInstance | TimezoneString): DateBlockTiming;
|
|
215
|
-
/**
|
|
216
|
-
* @deprecated timezone should be provided, as it will behave properly for daylight savings changes.
|
|
217
|
-
*/
|
|
218
|
-
export declare function dateBlockTimingFromDateBlockTimingStartEndDayDateRange(dateBlockTimingStartEndDayDateRange: DateBlockTimingStartEndDayDateRange, event: DateBlockTimingEvent, timezone?: DateTimezoneUtcNormalInstance | TimezoneString): DateBlockTiming;
|
|
219
295
|
/**
|
|
220
296
|
* Returns a copy of the input timing with the start time timezone in the given timezone.
|
|
221
297
|
*
|
|
222
298
|
* The start time is a normal, and should still refer to the same UTC date, but with the given timing's offset.
|
|
223
299
|
*
|
|
300
|
+
* @deprecated use DateCell implementation instead.
|
|
224
301
|
* @param timing
|
|
225
302
|
*/
|
|
226
303
|
export declare type ChangeTimingToTimezoneFunction = (<T extends DateRangeStart>(timing: T) => T) & {
|
|
@@ -229,12 +306,31 @@ export declare type ChangeTimingToTimezoneFunction = (<T extends DateRangeStart>
|
|
|
229
306
|
/**
|
|
230
307
|
* Creates a ChangeTimingToTimezoneFunction from the input.
|
|
231
308
|
*
|
|
309
|
+
* @deprecated use DateCell implementation instead.
|
|
232
310
|
* @param input
|
|
233
311
|
* @returns
|
|
234
312
|
*/
|
|
235
313
|
export declare function changeTimingToTimezoneFunction(input: TimingDateTimezoneUtcNormalInput): ChangeTimingToTimezoneFunction;
|
|
314
|
+
/**
|
|
315
|
+
*
|
|
316
|
+
* @deprecated use DateCell implementation instead.
|
|
317
|
+
* @param timing
|
|
318
|
+
* @param timezone
|
|
319
|
+
* @returns
|
|
320
|
+
*/
|
|
236
321
|
export declare function changeTimingToTimezone<T extends DateRangeStart>(timing: T, timezone: TimingDateTimezoneUtcNormalInput): T;
|
|
322
|
+
/**
|
|
323
|
+
*
|
|
324
|
+
* @deprecated use DateCell implementation instead.
|
|
325
|
+
* @param timing
|
|
326
|
+
* @returns
|
|
327
|
+
*/
|
|
237
328
|
export declare function changeTimingToSystemTimezone<T extends DateRangeStart>(timing: T): T;
|
|
329
|
+
/**
|
|
330
|
+
*
|
|
331
|
+
* @deprecated use DateCell implementation instead.
|
|
332
|
+
* @returns
|
|
333
|
+
*/
|
|
238
334
|
export declare function dateBlockTimingStartForNowInSystemTimezone(): DateBlockTimingStart;
|
|
239
335
|
/**
|
|
240
336
|
* Creates a DateBlockTimingStart for now in the given timezone.
|
|
@@ -246,18 +342,29 @@ export declare function dateBlockTimingStartForNowInTimezone(timezoneInput: Timi
|
|
|
246
342
|
/**
|
|
247
343
|
* Returns the start date in the current/system timezone for the given date.
|
|
248
344
|
*
|
|
345
|
+
* @deprecated use DateCell implementation instead.
|
|
249
346
|
* @param timing
|
|
250
347
|
*/
|
|
251
348
|
export declare function getCurrentDateBlockTimingStartDate(timing: DateBlockTimingStart): Date;
|
|
349
|
+
/**
|
|
350
|
+
*
|
|
351
|
+
* @deprecated use DateCell implementation instead.
|
|
352
|
+
* @param date
|
|
353
|
+
* @returns
|
|
354
|
+
*/
|
|
252
355
|
export declare function isValidDateBlockTimingStartDate(date: Date): boolean;
|
|
253
356
|
/**
|
|
254
357
|
* DateBlockTimingRelativeIndexFactory input. Can be a Date, DateBlockIndex, or ISO8601DayString
|
|
358
|
+
*
|
|
359
|
+
* @deprecated use DateCell implementation instead.
|
|
255
360
|
*/
|
|
256
361
|
export declare type DateBlockTimingRelativeIndexFactoryInput = DateOrDateBlockIndex | ISO8601DayString;
|
|
257
362
|
/**
|
|
258
363
|
* Returns the DateBlockIndex of the input date relative to the configured Date.
|
|
259
364
|
*
|
|
260
365
|
* Input dates should be in system time zone and not normalized to a different timezone.
|
|
366
|
+
*
|
|
367
|
+
* @deprecated use DateCell implementation instead.
|
|
261
368
|
*/
|
|
262
369
|
export declare type DateBlockTimingRelativeIndexFactory<T extends DateBlockTimingStart = DateBlockTimingStart> = ((input: DateBlockTimingRelativeIndexFactoryInput) => DateBlockIndex) & {
|
|
263
370
|
readonly _timing: T;
|
|
@@ -266,6 +373,7 @@ export declare type DateBlockTimingRelativeIndexFactory<T extends DateBlockTimin
|
|
|
266
373
|
/**
|
|
267
374
|
* Returns true if the input is a DateBlockTimingRelativeIndexFactory.
|
|
268
375
|
*
|
|
376
|
+
* @deprecated use DateCell implementation instead.
|
|
269
377
|
* @param input
|
|
270
378
|
* @returns
|
|
271
379
|
*/
|
|
@@ -273,12 +381,15 @@ export declare function isDateBlockTimingRelativeIndexFactory<T extends DateBloc
|
|
|
273
381
|
/**
|
|
274
382
|
* Creates a DateBlockTimingRelativeIndexFactory from the input.
|
|
275
383
|
*
|
|
384
|
+
* @deprecated use DateCell implementation instead.
|
|
276
385
|
* @param input
|
|
277
386
|
* @returns
|
|
278
387
|
*/
|
|
279
388
|
export declare function dateBlockTimingRelativeIndexFactory<T extends DateBlockTimingStart = DateBlockTimingStart>(input: T | DateBlockTimingRelativeIndexFactory<T>): DateBlockTimingRelativeIndexFactory<T>;
|
|
280
389
|
/**
|
|
281
390
|
* Function that wraps a DateBlockTimingRelativeIndexFactory and converts multuple Date/DateBlockIndex/DateBlockRange values into an array of DateBlockIndex values.
|
|
391
|
+
*
|
|
392
|
+
* @deprecated use DateCell implementation instead.
|
|
282
393
|
*/
|
|
283
394
|
export declare type DateBlockTimingRelativeIndexArrayFactory<T extends DateBlockTimingStart = DateBlockTimingStart> = ((input: ArrayOrValue<DateOrDateRangeOrDateBlockIndexOrDateBlockRange>) => DateBlockIndex[]) & {
|
|
284
395
|
readonly _indexFactory: DateBlockTimingRelativeIndexFactory<T>;
|
|
@@ -286,16 +397,22 @@ export declare type DateBlockTimingRelativeIndexArrayFactory<T extends DateBlock
|
|
|
286
397
|
/**
|
|
287
398
|
* Creates a DateBlockTimingRelativeIndexArrayFactory from the input DateBlockTimingRelativeIndexFactory.
|
|
288
399
|
*
|
|
400
|
+
* @deprecated use DateCell implementation instead.
|
|
289
401
|
* @param indexFactory
|
|
290
402
|
*/
|
|
291
403
|
export declare function dateBlockTimingRelativeIndexArrayFactory<T extends DateBlockTimingStart = DateBlockTimingStart>(indexFactory: DateBlockTimingRelativeIndexFactory<T>): DateBlockTimingRelativeIndexArrayFactory<T>;
|
|
292
404
|
/**
|
|
293
405
|
* Gets the relative index of the input date compared to the input timing.
|
|
294
406
|
*
|
|
407
|
+
* @deprecated use DateCell implementation instead.
|
|
295
408
|
* @param timing
|
|
296
409
|
* @param date
|
|
297
410
|
*/
|
|
298
411
|
export declare function getRelativeIndexForDateBlockTiming(timing: DateBlockTimingStart, date?: DateOrDateBlockIndex): DateBlockIndex;
|
|
412
|
+
/**
|
|
413
|
+
*
|
|
414
|
+
* @deprecated use DateCell implementation instead.
|
|
415
|
+
*/
|
|
299
416
|
export interface GetNextDateBlockTimingIndexInput<T extends DateBlockRange> {
|
|
300
417
|
/**
|
|
301
418
|
* Relevant index for now.
|
|
@@ -306,6 +423,10 @@ export interface GetNextDateBlockTimingIndexInput<T extends DateBlockRange> {
|
|
|
306
423
|
*/
|
|
307
424
|
readonly ranges: ArrayOrValue<T>;
|
|
308
425
|
}
|
|
426
|
+
/**
|
|
427
|
+
*
|
|
428
|
+
* @deprecated use DateCell implementation instead.
|
|
429
|
+
*/
|
|
309
430
|
export interface GetNextDateBlockTimingIndexResult<T extends DateBlockRange> {
|
|
310
431
|
/**
|
|
311
432
|
* The item that matches the current index first out of the options.
|
|
@@ -335,12 +456,14 @@ export interface GetNextDateBlockTimingIndexResult<T extends DateBlockRange> {
|
|
|
335
456
|
/**
|
|
336
457
|
* Computes a GetNextDateBlockTimingIndexResult from the input.
|
|
337
458
|
*
|
|
459
|
+
* @deprecated use DateCell implementation instead.
|
|
338
460
|
* @param input
|
|
339
461
|
*/
|
|
340
462
|
export declare function getNextDateBlockTimingIndex<T extends DateBlockRange>(input: GetNextDateBlockTimingIndexInput<T>): GetNextDateBlockTimingIndexResult<T>;
|
|
341
463
|
/**
|
|
342
464
|
* Returns the DateRelativeState for the given index and range.
|
|
343
465
|
*
|
|
466
|
+
* @deprecated use DateCell implementation instead.
|
|
344
467
|
* @param nowIndex
|
|
345
468
|
* @param range
|
|
346
469
|
*/
|
|
@@ -349,6 +472,8 @@ export declare function dateRelativeStateForDateBlockRangeComparedToIndex(range:
|
|
|
349
472
|
* Similar to the DateBlockTimingRelativeIndexFactory, but returns a date instead of an index for the input.
|
|
350
473
|
*
|
|
351
474
|
* If an index is input, returns a date with the hours and minutes for now for the given date returned.
|
|
475
|
+
*
|
|
476
|
+
* @deprecated use DateCell implementation instead.
|
|
352
477
|
*/
|
|
353
478
|
export declare type DateBlockTimingDateFactory<T extends DateBlockTimingStart = DateBlockTimingStart> = ((input: DateOrDateBlockIndex) => Date) & {
|
|
354
479
|
readonly _timing: T;
|
|
@@ -356,16 +481,23 @@ export declare type DateBlockTimingDateFactory<T extends DateBlockTimingStart =
|
|
|
356
481
|
/**
|
|
357
482
|
* Creates a DateBlockTimingDateFactory.
|
|
358
483
|
*
|
|
484
|
+
* @deprecated use DateCell implementation instead.
|
|
359
485
|
* @param timing
|
|
360
486
|
* @returns
|
|
361
487
|
*/
|
|
362
488
|
export declare function dateBlockTimingDateFactory<T extends DateBlockTimingStart = DateBlockTimingStart>(timing: T): DateBlockTimingDateFactory<T>;
|
|
363
489
|
/**
|
|
364
490
|
* Returns the start time of the input date or index.
|
|
491
|
+
*
|
|
492
|
+
* @deprecated use DateCell implementation instead.
|
|
365
493
|
*/
|
|
366
494
|
export declare type DateBlockTimingStartDateFactory<T extends DateBlockTimingStart = DateBlockTimingStart> = ((input: DateOrDateBlockIndex) => Date) & {
|
|
367
495
|
readonly _indexFactory: DateBlockTimingRelativeIndexFactory<T>;
|
|
368
496
|
};
|
|
497
|
+
/**
|
|
498
|
+
*
|
|
499
|
+
* @deprecated use DateCell implementation instead.
|
|
500
|
+
*/
|
|
369
501
|
export declare type DateBlockTimingUseSystemAndIgnoreEnforcement = DateTimezoneConversionConfigUseSystemTimezone & {
|
|
370
502
|
/**
|
|
371
503
|
* Skips the assertion that the timezone matches. This defaults to true if not provided.
|
|
@@ -375,12 +507,15 @@ export declare type DateBlockTimingUseSystemAndIgnoreEnforcement = DateTimezoneC
|
|
|
375
507
|
/**
|
|
376
508
|
* Creates a DateBlockTimingDateFactory. The timezone is required to properly compute the accurate startsAt date for locations that experience daylight savings.
|
|
377
509
|
*
|
|
510
|
+
* @deprecated use DateCell implementation instead.
|
|
378
511
|
* @param timing
|
|
379
512
|
* @returns
|
|
380
513
|
*/
|
|
381
|
-
export declare function dateBlockTimingStartDateFactory<T extends DateBlockTimingStart = DateBlockTimingStart>(input: T | DateBlockTimingRelativeIndexFactory<T>, timezone: TimezoneString | DateTimezoneConversionConfigUseSystemTimezone | DateBlockTimingUseSystemAndIgnoreEnforcement): DateBlockTimingStartDateFactory<T>;
|
|
514
|
+
export declare function dateBlockTimingStartDateFactory<T extends DateBlockTimingStart = DateBlockTimingStart>(input: T | DateBlockTimingRelativeIndexFactory<T>, timezone: TimezoneString | DateTimezoneConversionConfigUseSystemTimezone | DateBlockTimingUseSystemAndIgnoreEnforcement | DateTimezoneUtcNormalInstance): DateBlockTimingStartDateFactory<T>;
|
|
382
515
|
/**
|
|
383
516
|
* Returns the startsAt time of the input date or index.
|
|
517
|
+
*
|
|
518
|
+
* @deprecated use DateCell implementation instead.
|
|
384
519
|
*/
|
|
385
520
|
export declare type DateBlockTimingStartsAtDateFactory<T extends DateBlockTimingStart = DateBlockTimingStart> = ((input: DateOrDateBlockIndex) => Date) & {
|
|
386
521
|
readonly _indexFactory: DateBlockTimingRelativeIndexFactory<T>;
|
|
@@ -388,21 +523,35 @@ export declare type DateBlockTimingStartsAtDateFactory<T extends DateBlockTiming
|
|
|
388
523
|
/**
|
|
389
524
|
* Creates a DateBlockTimingStartsAtDateFactory.
|
|
390
525
|
*
|
|
526
|
+
* @deprecated use DateCell implementation instead.
|
|
391
527
|
* @param timing
|
|
392
528
|
* @returns
|
|
393
529
|
*/
|
|
394
|
-
export declare function dateBlockTimingStartsAtDateFactory<T extends DateBlockTimingStartAndStartsAt = DateBlockTimingStartAndStartsAt>(input: T | DateBlockTimingRelativeIndexFactory<T
|
|
530
|
+
export declare function dateBlockTimingStartsAtDateFactory<T extends DateBlockTimingStartAndStartsAt = DateBlockTimingStartAndStartsAt>(input: T | DateBlockTimingRelativeIndexFactory<T>, timezone: TimezoneString | DateTimezoneConversionConfigUseSystemTimezone | DateBlockTimingUseSystemAndIgnoreEnforcement | DateTimezoneUtcNormalInstance): DateBlockTimingStartsAtDateFactory<T>;
|
|
531
|
+
/**
|
|
532
|
+
* @deprecated use DateCell implementation instead.
|
|
533
|
+
* @param input
|
|
534
|
+
* @param timezone
|
|
535
|
+
*/
|
|
536
|
+
export declare function dateBlockTimingStartsAtDateFactory<T extends DateBlockTimingStartAndStartsAt = DateBlockTimingStartAndStartsAt>(input: T | DateBlockTimingRelativeIndexFactory<T>, timezone?: TimezoneString | DateTimezoneConversionConfigUseSystemTimezone | DateBlockTimingUseSystemAndIgnoreEnforcement | DateTimezoneUtcNormalInstance): DateBlockTimingStartsAtDateFactory<T>;
|
|
395
537
|
/**
|
|
396
538
|
* Returns the date of the input index.
|
|
397
539
|
*
|
|
540
|
+
* @deprecated use DateCell implementation instead.
|
|
398
541
|
* @param timing
|
|
399
542
|
* @param date
|
|
400
543
|
*/
|
|
401
544
|
export declare function getRelativeDateForDateBlockTiming(timing: DateBlockTimingStart, input: DateOrDateBlockIndex): Date;
|
|
402
545
|
/**
|
|
403
546
|
* The DateRange input for dateBlockTiming()
|
|
547
|
+
*
|
|
548
|
+
* @deprecated use DateCell implementation instead.
|
|
404
549
|
*/
|
|
405
550
|
export declare type DateBlockTimingRangeInput = Pick<DateRangeDayDistanceInput, 'distance'> | DateRange | number;
|
|
551
|
+
/**
|
|
552
|
+
*
|
|
553
|
+
* @deprecated use DateCell implementation instead.
|
|
554
|
+
*/
|
|
406
555
|
export interface DateBlockTimingOptions {
|
|
407
556
|
/**
|
|
408
557
|
* Timezone to evaluate the startsAt time in.
|
|
@@ -424,16 +573,37 @@ export interface DateBlockTimingOptions {
|
|
|
424
573
|
* The end date is used just to determine the number of days, but a minimum of 1 day is always enforced as a DateBlockTiming must contain atleast 1 day.
|
|
425
574
|
*
|
|
426
575
|
* The start date from the inputDate is considered to to have the offset noted in DateBlock, and will be retained.
|
|
576
|
+
*
|
|
577
|
+
* @deprecated use DateCell implementation instead.
|
|
427
578
|
*/
|
|
428
579
|
export declare function dateBlockTiming(durationInput: DateDurationSpan, inputRange: DateBlockTimingRangeInput, options?: DateBlockTimingOptions): DateBlockTiming;
|
|
429
580
|
/**
|
|
430
581
|
* Creates a DateBlockTiming from the DateDurationSpan and range input with the start offset set in the pre-configured timezone.
|
|
582
|
+
*
|
|
583
|
+
* @deprecated use DateCell implementation instead.
|
|
431
584
|
*/
|
|
432
585
|
export declare type DateBlockTimingInTimezoneFunction = ((durationInput: DateDurationSpan, inputRange: DateBlockTimingRangeInput) => DateBlockTiming) & {
|
|
433
586
|
readonly _timezoneInstance: DateTimezoneUtcNormalInstance;
|
|
434
587
|
};
|
|
588
|
+
/**
|
|
589
|
+
*
|
|
590
|
+
* @deprecated use DateCell implementation instead.
|
|
591
|
+
* @param input
|
|
592
|
+
* @returns
|
|
593
|
+
*/
|
|
435
594
|
export declare function dateBlockTimingInTimezoneFunction(input: TimingDateTimezoneUtcNormalInput): DateBlockTimingInTimezoneFunction;
|
|
595
|
+
/**
|
|
596
|
+
*
|
|
597
|
+
* @deprecated use DateCell implementation instead.
|
|
598
|
+
* @param durationInput
|
|
599
|
+
* @param inputRange
|
|
600
|
+
* @param timezone
|
|
601
|
+
* @returns
|
|
602
|
+
*/
|
|
436
603
|
export declare function dateBlockTimingInTimezone(durationInput: DateDurationSpan, inputRange: DateBlockTimingRangeInput, timezone: TimingDateTimezoneUtcNormalInput): DateBlockTiming;
|
|
604
|
+
/**
|
|
605
|
+
* @deprecated use DateCell implementation instead.
|
|
606
|
+
*/
|
|
437
607
|
export interface IsValidDateBlockTimingInfo {
|
|
438
608
|
readonly isValid: boolean;
|
|
439
609
|
readonly isStartRoundedToSeconds: boolean;
|
|
@@ -446,7 +616,13 @@ export interface IsValidDateBlockTimingInfo {
|
|
|
446
616
|
readonly isExpectedValidEnd: boolean;
|
|
447
617
|
readonly isPlausiblyValidEnd: boolean;
|
|
448
618
|
}
|
|
449
|
-
|
|
619
|
+
/**
|
|
620
|
+
*
|
|
621
|
+
* @deprecated use DateCell implementation instead.
|
|
622
|
+
* @param timing
|
|
623
|
+
* @returns
|
|
624
|
+
*/
|
|
625
|
+
export declare function isValidDateBlockTimingInfo(timing: DateBlockTiming): {
|
|
450
626
|
isValid: boolean;
|
|
451
627
|
isStartRoundedToSeconds: boolean;
|
|
452
628
|
msDifference: number;
|
|
@@ -460,39 +636,50 @@ export declare function isValidDateBlockTimingInfo(timing: DateBlockTiming, time
|
|
|
460
636
|
};
|
|
461
637
|
/**
|
|
462
638
|
*
|
|
639
|
+
* @deprecated use DateCell implementation instead.
|
|
463
640
|
* @param timing
|
|
464
641
|
* @returns
|
|
465
642
|
*/
|
|
466
643
|
export declare function isValidDateBlockTiming(timing: DateBlockTiming): boolean;
|
|
467
644
|
/**
|
|
468
645
|
* Converts the input index into the DayOfWeek that it represents.
|
|
646
|
+
*
|
|
647
|
+
* @deprecated use DateCell implementation instead.
|
|
469
648
|
*/
|
|
470
649
|
export declare type DateBlockDayOfWeekFactory = MapFunction<DateBlockIndex, DayOfWeek>;
|
|
471
650
|
/**
|
|
472
651
|
* Creates a DateBlockDayOfWeekFactory
|
|
473
652
|
*
|
|
653
|
+
* @deprecated use DateCell implementation instead.
|
|
474
654
|
* @param dayForIndexZero
|
|
475
655
|
* @returns
|
|
476
656
|
*/
|
|
477
657
|
export declare function dateBlockDayOfWeekFactory(inputDayForIndexZero: DayOfWeek | Date): DateBlockDayOfWeekFactory;
|
|
478
658
|
/**
|
|
479
659
|
* Reference to a DateBlockTiming
|
|
660
|
+
*
|
|
661
|
+
* @deprecated use DateCell implementation instead.
|
|
480
662
|
*/
|
|
481
663
|
export interface DateBlockTimingRef {
|
|
482
664
|
timing: DateBlockTiming;
|
|
483
665
|
}
|
|
484
666
|
/**
|
|
485
667
|
* An object that implements DateBlockTimingRef and DateBlockArrayRef
|
|
668
|
+
*
|
|
669
|
+
* @deprecated use DateCell implementation instead.
|
|
486
670
|
*/
|
|
487
671
|
export interface DateBlockCollection<B extends DateBlock = DateBlock> extends DateBlockTimingRef, DateBlockArrayRef<B> {
|
|
488
672
|
}
|
|
489
673
|
/**
|
|
490
674
|
* An expanded DateBlock that implements DateDurationSpan and contains the DateBlock values.
|
|
675
|
+
*
|
|
676
|
+
* @deprecated use DateCell implementation instead.
|
|
491
677
|
*/
|
|
492
678
|
export declare type DateBlockDurationSpan<B extends DateBlock = DateBlock> = DateDurationSpan & B;
|
|
493
679
|
/**
|
|
494
680
|
* Convenience function for calling expandDateBlocks() with the input DateBlockCollection.
|
|
495
681
|
*
|
|
682
|
+
* @deprecated use DateCell implementation instead.
|
|
496
683
|
* @param collection
|
|
497
684
|
* @returns
|
|
498
685
|
*/
|
|
@@ -500,16 +687,27 @@ export declare function expandDateBlockCollection<B extends DateBlock = DateBloc
|
|
|
500
687
|
/**
|
|
501
688
|
* Convenience function for calling dateBlocksExpansionFactory() then passing the blocks.
|
|
502
689
|
*
|
|
690
|
+
* @deprecated use DateCell implementation instead.
|
|
503
691
|
* @param blocks
|
|
504
692
|
* @param timing
|
|
505
693
|
* @returns
|
|
506
694
|
*/
|
|
507
695
|
export declare function expandDateBlocks<B extends DateBlock = DateBlock>(timing: DateBlockTiming, blocks: B[]): DateBlockDurationSpan<B>[];
|
|
696
|
+
/**
|
|
697
|
+
*
|
|
698
|
+
* @deprecated use DateCell implementation instead.
|
|
699
|
+
*/
|
|
508
700
|
export declare type DateBlocksExpansionFactoryInput<B extends DateBlock | DateBlockRange = DateBlock> = DateBlockArrayRef<B> | DateBlockArray<B>;
|
|
509
701
|
/**
|
|
510
702
|
* Used to convert the input DateBlocksExpansionFactoryInput into an array of DateBlockDurationSpan values
|
|
703
|
+
*
|
|
704
|
+
* @deprecated use DateCell implementation instead.
|
|
511
705
|
*/
|
|
512
706
|
export declare type DateBlocksExpansionFactory<B extends DateBlock | DateBlockRange = DateBlock> = (input: DateBlocksExpansionFactoryInput<B>) => DateBlockDurationSpan<B>[];
|
|
707
|
+
/**
|
|
708
|
+
*
|
|
709
|
+
* @deprecated use DateCell implementation instead.
|
|
710
|
+
*/
|
|
513
711
|
export interface DateBlocksExpansionFactoryConfig<B extends DateBlock | DateBlockRange = DateBlock> {
|
|
514
712
|
/**
|
|
515
713
|
* Timing to use in the configuration.
|
|
@@ -542,11 +740,20 @@ export interface DateBlocksExpansionFactoryConfig<B extends DateBlock | DateBloc
|
|
|
542
740
|
/**
|
|
543
741
|
* Creates a DateBlocksExpansionFactory
|
|
544
742
|
*
|
|
743
|
+
* @deprecated use DateCell implementation instead.
|
|
545
744
|
* @param config
|
|
546
745
|
* @returns
|
|
547
746
|
*/
|
|
548
747
|
export declare function dateBlocksExpansionFactory<B extends DateBlock | DateBlockRange = DateBlock>(config: DateBlocksExpansionFactoryConfig): DateBlocksExpansionFactory<B>;
|
|
748
|
+
/**
|
|
749
|
+
*
|
|
750
|
+
* @deprecated use DateCell implementation instead.
|
|
751
|
+
*/
|
|
549
752
|
export declare type DateBlockDayTimingInfoFactoryConfig = Pick<DateBlocksExpansionFactoryConfig, 'timing' | 'rangeLimit'>;
|
|
753
|
+
/**
|
|
754
|
+
*
|
|
755
|
+
* @deprecated use DateCell implementation instead.
|
|
756
|
+
*/
|
|
550
757
|
export interface DateBlockDayTimingInfo {
|
|
551
758
|
/**
|
|
552
759
|
* Input date or calculated date if provided a dayIndex.
|
|
@@ -611,22 +818,45 @@ export interface DateBlockDayTimingInfo {
|
|
|
611
818
|
* The date may not exist within the range, but will still compute values using the input date and timing configuration.
|
|
612
819
|
*
|
|
613
820
|
* Can optionally specify a now that is used for checking the inProgress functionality.
|
|
821
|
+
*
|
|
822
|
+
* @deprecated use DateCell implementation instead.
|
|
614
823
|
*/
|
|
615
824
|
export declare type DateBlockDayTimingInfoFactory = (date: DateOrDateBlockIndex, now?: Date) => DateBlockDayTimingInfo;
|
|
825
|
+
/**
|
|
826
|
+
*
|
|
827
|
+
* @deprecated use DateCell implementation instead.
|
|
828
|
+
* @param config
|
|
829
|
+
* @returns
|
|
830
|
+
*/
|
|
616
831
|
export declare function dateBlockDayTimingInfoFactory(config: DateBlockDayTimingInfoFactoryConfig): DateBlockDayTimingInfoFactory;
|
|
617
832
|
/**
|
|
618
833
|
* IndexRange used with DateBlocks.
|
|
619
834
|
*
|
|
620
835
|
* It has an exclusive max range. It is similar to a DateBlockRange.
|
|
836
|
+
*
|
|
837
|
+
* @deprecated use DateCell implementation instead.
|
|
621
838
|
*/
|
|
622
839
|
export declare type DateBlockIndexRange = IndexRange;
|
|
840
|
+
/**
|
|
841
|
+
*
|
|
842
|
+
* @deprecated use DateCell implementation instead.
|
|
843
|
+
* @param range
|
|
844
|
+
* @returns
|
|
845
|
+
*/
|
|
623
846
|
export declare function dateBlockRangeToDateBlockIndexRange(range: DateBlockRange): DateBlockIndexRange;
|
|
847
|
+
/**
|
|
848
|
+
*
|
|
849
|
+
* @deprecated use DateCell implementation instead.
|
|
850
|
+
* @param range
|
|
851
|
+
* @returns
|
|
852
|
+
*/
|
|
624
853
|
export declare function dateBlockIndexRangeToDateBlockRange(range: DateBlockIndexRange): DateBlockRangeWithRange;
|
|
625
854
|
/**
|
|
626
855
|
* Generates a DateBlockIndexRange based on the input timing.
|
|
627
856
|
*
|
|
628
857
|
* An arbitrary limit can also be applied.
|
|
629
858
|
*
|
|
859
|
+
* @deprecated use DateCell implementation instead.
|
|
630
860
|
* @param timing
|
|
631
861
|
* @param limit
|
|
632
862
|
* @param fitToTimingRange
|
|
@@ -635,20 +865,33 @@ export declare function dateBlockIndexRange(timing: DateBlockTiming, limit?: Dat
|
|
|
635
865
|
/**
|
|
636
866
|
* Returns blocks that are only in the given DateBlockRange.
|
|
637
867
|
*
|
|
868
|
+
* @deprecated use DateCell implementation instead.
|
|
638
869
|
* @param blocks
|
|
639
870
|
* @param range
|
|
640
871
|
* @returns
|
|
641
872
|
*/
|
|
642
873
|
export declare function filterDateBlocksInDateBlockRange<T extends DateBlock | DateBlockRange>(blocks: T[], range: DateBlockRangeWithRange): T[];
|
|
874
|
+
/**
|
|
875
|
+
* @deprecated use DateCell implementation instead.
|
|
876
|
+
*/
|
|
643
877
|
export declare type IsDateBlockWithinDateBlockRangeInput = DateBlockOrDateBlockIndexOrDateBlockRange;
|
|
644
878
|
/**
|
|
645
879
|
* Function that returns true if the input range is equal or falls within the configured DateBlockRange.
|
|
880
|
+
*
|
|
881
|
+
* @deprecated use DateCell implementation instead.
|
|
646
882
|
*/
|
|
647
883
|
export declare type IsDateBlockWithinDateBlockRangeFunction = (input: IsDateBlockWithinDateBlockRangeInput) => boolean;
|
|
884
|
+
/**
|
|
885
|
+
*
|
|
886
|
+
* @deprecated use DateCell implementation instead.
|
|
887
|
+
* @param inputRange
|
|
888
|
+
* @returns
|
|
889
|
+
*/
|
|
648
890
|
export declare function isDateBlockWithinDateBlockRangeFunction(inputRange: IsDateBlockWithinDateBlockRangeInput): IsDateBlockWithinDateBlockRangeFunction;
|
|
649
891
|
/**
|
|
650
892
|
* Returns true if the first DateBlock or DateBlockRange contains the second input.
|
|
651
893
|
*
|
|
894
|
+
* @deprecated use DateCell implementation instead.
|
|
652
895
|
* @param range
|
|
653
896
|
* @param isContainedWithin
|
|
654
897
|
* @returns
|
|
@@ -656,12 +899,20 @@ export declare function isDateBlockWithinDateBlockRangeFunction(inputRange: IsDa
|
|
|
656
899
|
export declare function isDateBlockWithinDateBlockRange(range: IsDateBlockWithinDateBlockRangeInput, contains: IsDateBlockWithinDateBlockRangeInput): boolean;
|
|
657
900
|
/**
|
|
658
901
|
* Input for a IsDateWithinDateBlockRangeFunction
|
|
902
|
+
*
|
|
903
|
+
* @deprecated use DateCell implementation instead.
|
|
659
904
|
*/
|
|
660
905
|
export declare type IsDateWithinDateBlockRangeInput = DateOrDateBlockIndex | DateRangeStart | DateRange | DateBlock | DateBlockRange;
|
|
661
906
|
/**
|
|
662
907
|
* Function that returns true if the input range is equal or falls within the configured DateBlockRange.
|
|
908
|
+
*
|
|
909
|
+
* @deprecated use DateCell implementation instead.
|
|
663
910
|
*/
|
|
664
911
|
export declare type IsDateWithinDateBlockRangeFunction = (input: IsDateWithinDateBlockRangeInput) => boolean;
|
|
912
|
+
/**
|
|
913
|
+
*
|
|
914
|
+
* @deprecated use DateCell implementation instead.
|
|
915
|
+
*/
|
|
665
916
|
export interface IsDateWithinDateBlockRangeConfig {
|
|
666
917
|
/**
|
|
667
918
|
* Optional date to make the indexes relative to when converting date values.
|
|
@@ -674,9 +925,17 @@ export interface IsDateWithinDateBlockRangeConfig {
|
|
|
674
925
|
*/
|
|
675
926
|
range: IsDateWithinDateBlockRangeInput;
|
|
676
927
|
}
|
|
928
|
+
/**
|
|
929
|
+
*
|
|
930
|
+
* @deprecated use DateCell implementation instead.
|
|
931
|
+
* @param config
|
|
932
|
+
* @returns
|
|
933
|
+
*/
|
|
677
934
|
export declare function isDateWithinDateBlockRangeFunction(config: IsDateWithinDateBlockRangeConfig): IsDateWithinDateBlockRangeFunction;
|
|
678
935
|
/**
|
|
679
936
|
* Represents a range of DateBlock values.
|
|
937
|
+
*
|
|
938
|
+
* @deprecated use DateCell implementation instead.
|
|
680
939
|
*/
|
|
681
940
|
export interface DateBlockRange extends DateBlock {
|
|
682
941
|
/**
|
|
@@ -686,17 +945,24 @@ export interface DateBlockRange extends DateBlock {
|
|
|
686
945
|
*/
|
|
687
946
|
to?: DateBlockIndex;
|
|
688
947
|
}
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* @deprecated use DateCell implementation instead.
|
|
951
|
+
*/
|
|
689
952
|
export declare class DateBlockRange extends DateBlock {
|
|
690
953
|
to?: DateBlockIndex;
|
|
691
954
|
constructor(template?: DateBlockRange);
|
|
692
955
|
}
|
|
693
956
|
/**
|
|
694
957
|
* A DateBlockIndex, DateBlock, or DateBlockRange
|
|
958
|
+
*
|
|
959
|
+
* @deprecated use DateCell implementation instead.
|
|
695
960
|
*/
|
|
696
961
|
export declare type DateBlockOrDateBlockIndexOrDateBlockRange = DateBlockIndex | DateBlock | DateBlockRange;
|
|
697
962
|
/**
|
|
698
963
|
* Returns true if the input is a valid DateBlockRange.
|
|
699
964
|
*
|
|
965
|
+
* @deprecated use DateCell implementation instead.
|
|
700
966
|
* @param input
|
|
701
967
|
* @returns
|
|
702
968
|
*/
|
|
@@ -704,6 +970,7 @@ export declare function isValidDateBlockRange(input: DateBlockRange): boolean;
|
|
|
704
970
|
/**
|
|
705
971
|
* Returns true if the input is a sorted DateBlockRange array and there are no repeat indexes.
|
|
706
972
|
*
|
|
973
|
+
* @deprecated use DateCell implementation instead.
|
|
707
974
|
* @param input
|
|
708
975
|
* @returns
|
|
709
976
|
*/
|
|
@@ -712,12 +979,16 @@ export declare function isValidDateBlockRangeSeries(input: DateBlockRange[]): bo
|
|
|
712
979
|
* Returns the lowest index between all the input date block ranges. Returns 0 by default if there is no minimum or input blocks.
|
|
713
980
|
*
|
|
714
981
|
* The input range is not expected to be sorted.
|
|
982
|
+
*
|
|
983
|
+
* @deprecated use DateCell implementation instead.
|
|
715
984
|
*/
|
|
716
985
|
export declare function getLeastDateBlockIndexInDateBlockRanges(input: (DateBlock | DateBlockRange)[]): DateBlockIndex;
|
|
717
986
|
/**
|
|
718
987
|
* Returns the largest index between all the input date block ranges. Returns 0 by default.
|
|
719
988
|
*
|
|
720
989
|
* The input range is not expected to be sorted.
|
|
990
|
+
*
|
|
991
|
+
* @deprecated use DateCell implementation instead.
|
|
721
992
|
*/
|
|
722
993
|
export declare function getGreatestDateBlockIndexInDateBlockRanges(input: (DateBlock | DateBlockRange)[]): DateBlockIndex;
|
|
723
994
|
export interface LeastAndGreatestDateBlockIndexResult<T> {
|
|
@@ -730,20 +1001,33 @@ export interface LeastAndGreatestDateBlockIndexResult<T> {
|
|
|
730
1001
|
* Returns the largest index between all the input date block ranges. Returns null if the input is empty.
|
|
731
1002
|
*
|
|
732
1003
|
* The input range is not expected to be sorted.
|
|
1004
|
+
*
|
|
1005
|
+
* @deprecated use DateCell implementation instead.
|
|
733
1006
|
*/
|
|
734
1007
|
export declare function getLeastAndGreatestDateBlockIndexInDateBlockRanges<T extends DateBlockRange>(input: T[]): Maybe<LeastAndGreatestDateBlockIndexResult<T>>;
|
|
735
1008
|
/**
|
|
736
1009
|
* Input type used for cases where a DateRange or a DateBlockRange are allowed as input but used the start/end parameters in DateRange.
|
|
1010
|
+
*
|
|
1011
|
+
* @deprecated use DateCell implementation instead.
|
|
737
1012
|
*/
|
|
738
1013
|
export interface DateBlockRangeOrDateRange {
|
|
739
1014
|
start?: Maybe<DateOrDateBlockIndex>;
|
|
740
1015
|
end?: Maybe<DateOrDateBlockIndex>;
|
|
741
1016
|
}
|
|
1017
|
+
/**
|
|
1018
|
+
*
|
|
1019
|
+
* @deprecated use DateCell implementation instead.
|
|
1020
|
+
*/
|
|
742
1021
|
export declare type DateOrDateBlockIndexOrDateBlockRange = DateOrDateBlockIndex | DateBlockRange;
|
|
1022
|
+
/**
|
|
1023
|
+
*
|
|
1024
|
+
* @deprecated use DateCell implementation instead.
|
|
1025
|
+
*/
|
|
743
1026
|
export declare type DateOrDateRangeOrDateBlockIndexOrDateBlockRange = DateRange | DateOrDateBlockIndexOrDateBlockRange;
|
|
744
1027
|
/**
|
|
745
1028
|
* Creates a DateBlockRange
|
|
746
1029
|
*
|
|
1030
|
+
* @deprecated use DateCell implementation instead.
|
|
747
1031
|
* @param i
|
|
748
1032
|
* @param to
|
|
749
1033
|
* @returns
|
|
@@ -752,6 +1036,7 @@ export declare function dateBlockRange(i: number, to?: number): DateBlockRangeWi
|
|
|
752
1036
|
/**
|
|
753
1037
|
* Creates a DateBlockRangeWithRange from the input DateBlockIndex.
|
|
754
1038
|
*
|
|
1039
|
+
* @deprecated use DateCell implementation instead.
|
|
755
1040
|
* @param dateBlockIndex
|
|
756
1041
|
* @returns
|
|
757
1042
|
*/
|
|
@@ -759,6 +1044,7 @@ export declare function dateBlockRangeWithRangeFromIndex(dateBlockIndex: DateBlo
|
|
|
759
1044
|
/**
|
|
760
1045
|
* Creates a DateBlockRangeWithRange from the input DateBlockIndex, DateBlock, or DateBlockRange.
|
|
761
1046
|
*
|
|
1047
|
+
* @deprecated use DateCell implementation instead.
|
|
762
1048
|
* @param input
|
|
763
1049
|
* @returns
|
|
764
1050
|
*/
|
|
@@ -770,17 +1056,21 @@ export declare type DateBlockRangeIncludedByRangeFunction = (range: DateBlockOrD
|
|
|
770
1056
|
/**
|
|
771
1057
|
* Creates a DateBlockRangeIncludedByRangeFunction
|
|
772
1058
|
*
|
|
1059
|
+
* @deprecated use DateCell implementation instead.
|
|
773
1060
|
* @param inputRange
|
|
774
1061
|
* @returns
|
|
775
1062
|
*/
|
|
776
1063
|
export declare function dateBlockRangeIncludedByRangeFunction(inputRange: DateBlockOrDateBlockIndexOrDateBlockRange): DateBlockRangeIncludedByRangeFunction;
|
|
777
1064
|
/**
|
|
778
1065
|
* Function that returns true if the input range overlaps the range of the configured DateBlockRange.
|
|
1066
|
+
*
|
|
1067
|
+
* @deprecated use DateCell implementation instead.
|
|
779
1068
|
*/
|
|
780
1069
|
export declare type DateBlockRangeOverlapsRangeFunction = (range: DateBlockOrDateBlockIndexOrDateBlockRange) => boolean;
|
|
781
1070
|
/**
|
|
782
1071
|
* Creates a DateBlockRangeOverlapsRangeFunction
|
|
783
1072
|
*
|
|
1073
|
+
* @deprecated use DateCell implementation instead.
|
|
784
1074
|
* @param inputRange
|
|
785
1075
|
* @returns
|
|
786
1076
|
*/
|
|
@@ -788,6 +1078,7 @@ export declare function dateBlockRangeOverlapsRangeFunction(inputRange: DateBloc
|
|
|
788
1078
|
/**
|
|
789
1079
|
* Returns true if either of the ranges overlap eachother.
|
|
790
1080
|
*
|
|
1081
|
+
* @deprecated use DateCell implementation instead.
|
|
791
1082
|
* @param rangeA
|
|
792
1083
|
* @param rangeB
|
|
793
1084
|
* @returns
|
|
@@ -798,37 +1089,49 @@ export declare function dateBlockRangeOverlapsRange(rangeA: DateBlockOrDateBlock
|
|
|
798
1089
|
*
|
|
799
1090
|
* In many cases sortAscendingIndexNumberRefFunction may be preferential since
|
|
800
1091
|
*
|
|
1092
|
+
* @deprecated use DateCell implementation instead.
|
|
801
1093
|
* @returns
|
|
802
1094
|
*/
|
|
803
1095
|
export declare function sortDateBlockRangeAndSizeFunction<T extends DateBlockRange>(): SortCompareFunction<T>;
|
|
804
1096
|
/**
|
|
805
1097
|
* Sorts the input date ranges. This will retain the before/after order while also sorting items by index.
|
|
806
1098
|
*
|
|
1099
|
+
* @deprecated use DateCell implementation instead.
|
|
807
1100
|
* @param input
|
|
808
1101
|
* @returns
|
|
809
1102
|
*/
|
|
810
1103
|
export declare function sortDateBlockRanges<T extends DateBlockRange>(input: T[]): T[];
|
|
811
1104
|
/**
|
|
812
1105
|
* DateBlockRange that is known to have a to value.
|
|
1106
|
+
*
|
|
1107
|
+
* @deprecated use DateCell implementation instead.
|
|
813
1108
|
*/
|
|
814
1109
|
export declare type DateBlockRangeWithRange = RequiredOnKeys<DateBlockRange, 'to'>;
|
|
815
1110
|
/**
|
|
816
1111
|
* Groups the input values into DateBlockRange values.
|
|
817
1112
|
*
|
|
1113
|
+
* @deprecated use DateCell implementation instead.
|
|
818
1114
|
* @param input
|
|
819
1115
|
*/
|
|
820
1116
|
export declare function groupToDateBlockRanges(input: (DateBlock | DateBlockRange)[]): DateBlockRangeWithRange[];
|
|
821
1117
|
/**
|
|
822
1118
|
* Returns an array containing all indexes in the date block range.
|
|
1119
|
+
*
|
|
1120
|
+
* @deprecated use DateCell implementation instead.
|
|
823
1121
|
*/
|
|
824
1122
|
export declare function allIndexesInDateBlockRange(input: DateBlockRange): DateBlockIndex[];
|
|
825
1123
|
/**
|
|
826
1124
|
* Returns the set of all indexes within the input.
|
|
827
1125
|
*
|
|
1126
|
+
* @deprecated use DateCell implementation instead.
|
|
828
1127
|
* @param input
|
|
829
1128
|
* @returns
|
|
830
1129
|
*/
|
|
831
1130
|
export declare function allIndexesInDateBlockRanges(input: (DateBlockIndex | DateBlockRange)[]): Set<DateBlockIndex>;
|
|
1131
|
+
/**
|
|
1132
|
+
*
|
|
1133
|
+
* @deprecated use DateCell implementation instead.
|
|
1134
|
+
*/
|
|
832
1135
|
export interface DateBlockRangeBlockCountInfo {
|
|
833
1136
|
/**
|
|
834
1137
|
* Total number of blocks.
|
|
@@ -846,6 +1149,7 @@ export interface DateBlockRangeBlockCountInfo {
|
|
|
846
1149
|
/**
|
|
847
1150
|
* Counts the number of blocks in the input range.
|
|
848
1151
|
*
|
|
1152
|
+
* @deprecated use DateCell implementation instead.
|
|
849
1153
|
* @param inputDateBlockRange
|
|
850
1154
|
* @returns
|
|
851
1155
|
*/
|
|
@@ -853,17 +1157,21 @@ export declare function dateBlockRangeBlocksCountInfo(inputDateBlockRange: Array
|
|
|
853
1157
|
/**
|
|
854
1158
|
* Counts the number of blocks in the input range.
|
|
855
1159
|
*
|
|
1160
|
+
* @deprecated use DateCell implementation instead.
|
|
856
1161
|
* @param inputDateBlockRange
|
|
857
1162
|
* @returns
|
|
858
1163
|
*/
|
|
859
1164
|
export declare function dateBlockRangeBlocksCount(inputDateBlockRange: ArrayOrValue<DateBlock | DateBlockRange>): number;
|
|
860
1165
|
/**
|
|
861
1166
|
* Checks whether or not the input range is fully included by the configured ranges.
|
|
1167
|
+
*
|
|
1168
|
+
* @deprecated use DateCell implementation instead.
|
|
862
1169
|
*/
|
|
863
1170
|
export declare type DateBlockRangesFullyCoverDateBlockRangeFunction = (range: DateBlockRange) => boolean;
|
|
864
1171
|
/**
|
|
865
1172
|
* Creates a dateBlockRangesFullyCoverDateBlockRangeFunction
|
|
866
1173
|
*
|
|
1174
|
+
* @deprecated use DateCell implementation instead.
|
|
867
1175
|
* @param ranges
|
|
868
1176
|
* @returns
|
|
869
1177
|
*/
|
|
@@ -871,35 +1179,44 @@ export declare function dateBlockRangesFullyCoverDateBlockRangeFunction(ranges:
|
|
|
871
1179
|
/**
|
|
872
1180
|
* Expands a DateBlockRange into an array of DateBlock values.
|
|
873
1181
|
*
|
|
1182
|
+
* @deprecated use DateCell implementation instead.
|
|
874
1183
|
* @param block
|
|
875
1184
|
* @returns
|
|
876
1185
|
*/
|
|
877
1186
|
export declare function expandDateBlockRange<B extends DateBlockRange | DateBlockRangeWithRange>(block: B): B[];
|
|
878
1187
|
/**
|
|
879
1188
|
* A DateBlock that also has the potential for a unique identifier.
|
|
1189
|
+
*
|
|
1190
|
+
* @deprecated use DateCell implementation instead.
|
|
880
1191
|
*/
|
|
881
1192
|
export interface UniqueDateBlock extends DateBlock, UniqueModel {
|
|
882
1193
|
}
|
|
883
1194
|
/**
|
|
884
1195
|
* Represents a range of UniqueDateBlock values keyed by a similar identifier (or lack of identifier).
|
|
1196
|
+
*
|
|
1197
|
+
* @deprecated use DateCell implementation instead.
|
|
885
1198
|
*/
|
|
886
1199
|
export interface UniqueDateBlockRange extends UniqueDateBlock, DateBlockRange {
|
|
887
1200
|
}
|
|
888
1201
|
/**
|
|
889
1202
|
* Returns true if the input DateBlockRange is longer than 1 block (I.E. has a "to" value greater than it's "i" value).
|
|
890
1203
|
*
|
|
1204
|
+
* @deprecated use DateCell implementation instead.
|
|
891
1205
|
* @param input
|
|
892
1206
|
*/
|
|
893
1207
|
export declare function dateBlockRangeHasRange(input: DateBlockRange | UniqueDateBlock): input is DateBlockRangeWithRange;
|
|
894
1208
|
/**
|
|
895
1209
|
* Reads the to index if it exists, or returns the block's index itself.
|
|
896
1210
|
*
|
|
1211
|
+
* @deprecated use DateCell implementation instead.
|
|
897
1212
|
* @param input
|
|
898
1213
|
* @returns
|
|
899
1214
|
*/
|
|
900
1215
|
export declare function dateBlockEndIndex(input: DateBlockRange | UniqueDateBlock): IndexNumber;
|
|
901
1216
|
/**
|
|
902
1217
|
* A grouping of UniqueDateBlock values, sorted by date range.
|
|
1218
|
+
*
|
|
1219
|
+
* @deprecated use DateCell implementation instead.
|
|
903
1220
|
*/
|
|
904
1221
|
export interface UniqueDateBlockRangeGroup<B extends DateBlockRange | UniqueDateBlock> extends DateBlockRange {
|
|
905
1222
|
/**
|
|
@@ -909,20 +1226,30 @@ export interface UniqueDateBlockRangeGroup<B extends DateBlockRange | UniqueDate
|
|
|
909
1226
|
}
|
|
910
1227
|
/**
|
|
911
1228
|
* Groups all input DateBlockRange or UniqueDateBlock values into a UniqueDateBlockRangeGroup value amd sorts the input.
|
|
1229
|
+
*
|
|
1230
|
+
* @deprecated use DateCell implementation instead.
|
|
912
1231
|
*/
|
|
913
1232
|
export declare function groupUniqueDateBlocks<B extends DateBlockRange | UniqueDateBlock>(input: B[]): UniqueDateBlockRangeGroup<B>;
|
|
914
1233
|
/**
|
|
915
1234
|
* Determines how to "fill" a DateRange when an empty range is detected.
|
|
916
1235
|
* - extend: extends the previous block to fill the range.
|
|
917
1236
|
* - fill: creates a new value using a factory.
|
|
1237
|
+
*
|
|
1238
|
+
* @deprecated use DateCell implementation instead.
|
|
918
1239
|
*/
|
|
919
1240
|
export declare type ExpandUniqueDateBlocksFillOption = 'extend' | 'fill';
|
|
920
1241
|
/**
|
|
921
1242
|
* Determines how overwrite block values that are completely overlapping eachother.
|
|
922
1243
|
* - current: keeps the "current" value
|
|
923
1244
|
* - next: the next/new value overwrites the previous one
|
|
1245
|
+
*
|
|
1246
|
+
* @deprecated use DateCell implementation instead.
|
|
924
1247
|
*/
|
|
925
1248
|
export declare type ExpandUniqueDateBlocksRetainOverlapOption = 'current' | 'next';
|
|
1249
|
+
/**
|
|
1250
|
+
*
|
|
1251
|
+
* @deprecated use DateCell implementation instead.
|
|
1252
|
+
*/
|
|
926
1253
|
export interface ExpandUniqueDateBlocksConfig<B extends DateBlockRange | UniqueDateBlock> {
|
|
927
1254
|
/**
|
|
928
1255
|
* The expected start index.
|
|
@@ -954,6 +1281,10 @@ export interface ExpandUniqueDateBlocksConfig<B extends DateBlockRange | UniqueD
|
|
|
954
1281
|
*/
|
|
955
1282
|
fillFactory?: FactoryWithRequiredInput<B, DateBlockRangeWithRange>;
|
|
956
1283
|
}
|
|
1284
|
+
/**
|
|
1285
|
+
*
|
|
1286
|
+
* @deprecated use DateCell implementation instead.
|
|
1287
|
+
*/
|
|
957
1288
|
export interface ExpandUniqueDateBlocksResult<B extends DateBlockRange | UniqueDateBlock> extends UniqueDateBlockRangeGroup<B> {
|
|
958
1289
|
/**
|
|
959
1290
|
* Blocks that were competely removed. Some blocks stay partially retained.
|
|
@@ -964,18 +1295,44 @@ export interface ExpandUniqueDateBlocksResult<B extends DateBlockRange | UniqueD
|
|
|
964
1295
|
* Expansion function used to sort/merge/replace DateBlockRange values by block.
|
|
965
1296
|
*
|
|
966
1297
|
* Can optionally specify a second array/group of blocks that are treated as "next" blocks which can take priority or not depending on the retain options.
|
|
1298
|
+
*
|
|
1299
|
+
* @deprecated use DateCell implementation instead.
|
|
967
1300
|
*/
|
|
968
1301
|
export declare type ExpandUniqueDateBlocksFunction<B extends DateBlockRange | UniqueDateBlock> = (input: B[] | UniqueDateBlockRangeGroup<B>, newBlocks?: B[] | UniqueDateBlockRangeGroup<B>) => ExpandUniqueDateBlocksResult<B>;
|
|
1302
|
+
/**
|
|
1303
|
+
*
|
|
1304
|
+
* @deprecated use DateCell implementation instead.
|
|
1305
|
+
* @param config
|
|
1306
|
+
* @returns
|
|
1307
|
+
*/
|
|
969
1308
|
export declare function expandUniqueDateBlocksFunction<B extends DateBlockRange | UniqueDateBlock>(config: ExpandUniqueDateBlocksConfig<B>): ExpandUniqueDateBlocksFunction<B>;
|
|
970
1309
|
/**
|
|
971
1310
|
* Modifies or filter out any blocks that are outside the range to fit within the configured range.
|
|
1311
|
+
*
|
|
1312
|
+
* @deprecated use DateCell implementation instead.
|
|
972
1313
|
*/
|
|
973
1314
|
export declare type ModifyDateBlocksToFitRangeFunction = <B extends DateBlock | DateBlockRange | UniqueDateBlock>(input: B[]) => B[];
|
|
974
1315
|
/**
|
|
975
1316
|
* Creatse a ModifyDateBlocksToFitRangeFunction
|
|
1317
|
+
*
|
|
1318
|
+
* @deprecated use DateCell implementation instead.
|
|
976
1319
|
*/
|
|
977
1320
|
export declare function modifyDateBlocksToFitRangeFunction(range: DateBlockRange): ModifyDateBlocksToFitRangeFunction;
|
|
1321
|
+
/**
|
|
1322
|
+
*
|
|
1323
|
+
* @deprecated use DateCell implementation instead.
|
|
1324
|
+
* @param range
|
|
1325
|
+
* @param input
|
|
1326
|
+
* @returns
|
|
1327
|
+
*/
|
|
978
1328
|
export declare function modifyDateBlocksToFitRange<B extends DateBlock | DateBlockRange | UniqueDateBlock>(range: DateBlockRange, input: B[]): B[];
|
|
1329
|
+
/**
|
|
1330
|
+
*
|
|
1331
|
+
* @deprecated use DateCell implementation instead.
|
|
1332
|
+
* @param range
|
|
1333
|
+
* @param input
|
|
1334
|
+
* @returns
|
|
1335
|
+
*/
|
|
979
1336
|
export declare function modifyDateBlockToFitRange<B extends DateBlock | DateBlockRange | UniqueDateBlock>(range: DateBlockRange, input: B): Maybe<B>;
|
|
980
1337
|
/**
|
|
981
1338
|
* @deprecated use dateBlocksInDateBlockRange instead.
|