@sprucelabs/spruce-calendar-components 23.0.3 → 23.0.4
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/build/esm/skillViewControllers/Root.svc.js +0 -1
- package/build/esm/viewControllers/RepeatingControlsList.vc.d.ts +1 -1
- package/build/esm/viewControllers/RepeatingControlsList.vc.js +3 -4
- package/build/skillViewControllers/Root.svc.js +0 -1
- package/build/viewControllers/RepeatingControlsList.vc.d.ts +1 -1
- package/build/viewControllers/RepeatingControlsList.vc.js +3 -4
- package/package.json +1 -1
|
@@ -322,7 +322,6 @@ export default class RootSkillViewController extends AbstractSkillViewController
|
|
|
322
322
|
yield this.events.setCurrentDate(startDate);
|
|
323
323
|
}));
|
|
324
324
|
yield this.transitionToRoot();
|
|
325
|
-
this.setSelectedDateInDateSelectVc(startDate);
|
|
326
325
|
if (visiblePeopleIds) {
|
|
327
326
|
yield this.people.setVisibilityMode('custom');
|
|
328
327
|
yield this.people.setVisiblePeopleIds(visiblePeopleIds);
|
|
@@ -40,7 +40,7 @@ export default class RepeatingControlsListViewController extends AbstractViewCon
|
|
|
40
40
|
private setCalendarSelectedDatesFromDate;
|
|
41
41
|
private getSelectedDatesFromDate;
|
|
42
42
|
private changeCalendarSelectedDate;
|
|
43
|
-
render(): import("@sprucelabs/
|
|
43
|
+
render(): import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.List;
|
|
44
44
|
}
|
|
45
45
|
export type RepeatingOptions = Partial<Pick<CalendarEvent, 'repeats' | 'interval' | 'repeatsUntil' | 'occurrences' | 'startDateTimeMs' | 'daysOfWeek' | 'daysOfMonth'> & {
|
|
46
46
|
repeatAmount?: 'forever' | 'until' | 'after';
|
|
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { dateUtil } from '@sprucelabs/calendar-utils';
|
|
11
10
|
import { AbstractViewController, } from '@sprucelabs/heartwood-view-controllers';
|
|
12
11
|
export default class RepeatingControlsListViewController extends AbstractViewController {
|
|
13
12
|
constructor(options) {
|
|
@@ -353,7 +352,7 @@ export default class RepeatingControlsListViewController extends AbstractViewCon
|
|
|
353
352
|
}
|
|
354
353
|
getRepeating() {
|
|
355
354
|
return Object.assign(Object.assign({}, this.repeating), { repeatsUntil: this.repeating.repeatsUntil
|
|
356
|
-
?
|
|
355
|
+
? this.dates.getEndOfDay(this.repeating.repeatsUntil)
|
|
357
356
|
: undefined });
|
|
358
357
|
}
|
|
359
358
|
updateRepeating(repeating) {
|
|
@@ -370,7 +369,7 @@ export default class RepeatingControlsListViewController extends AbstractViewCon
|
|
|
370
369
|
(_b = this.calendarVc) === null || _b === void 0 ? void 0 : _b.triggerRender();
|
|
371
370
|
}
|
|
372
371
|
getSelectedDatesFromDate(dateTimeMs, daysOfMonth) {
|
|
373
|
-
const startDate =
|
|
372
|
+
const startDate = this.dates.splitDate(dateTimeMs);
|
|
374
373
|
if (daysOfMonth) {
|
|
375
374
|
const selectedDates = daysOfMonth.map((d) => {
|
|
376
375
|
return { day: d, year: startDate.year, month: startDate.month };
|
|
@@ -383,7 +382,7 @@ export default class RepeatingControlsListViewController extends AbstractViewCon
|
|
|
383
382
|
}
|
|
384
383
|
changeCalendarSelectedDate(dateTimeMs) {
|
|
385
384
|
var _a, _b, _c, _d, _e;
|
|
386
|
-
const selectedDate =
|
|
385
|
+
const selectedDate = this.dates.splitDate(dateTimeMs);
|
|
387
386
|
const match = (_a = this.calendarVc) === null || _a === void 0 ? void 0 : _a.getSelectedDates().find((x) => x.day == selectedDate.day &&
|
|
388
387
|
x.year == selectedDate.year &&
|
|
389
388
|
x.month == selectedDate.month);
|
|
@@ -283,7 +283,6 @@ class RootSkillViewController extends heartwood_view_controllers_1.AbstractSkill
|
|
|
283
283
|
await this.events.setCurrentDate(startDate);
|
|
284
284
|
});
|
|
285
285
|
await this.transitionToRoot();
|
|
286
|
-
this.setSelectedDateInDateSelectVc(startDate);
|
|
287
286
|
if (visiblePeopleIds) {
|
|
288
287
|
await this.people.setVisibilityMode('custom');
|
|
289
288
|
await this.people.setVisiblePeopleIds(visiblePeopleIds);
|
|
@@ -40,7 +40,7 @@ export default class RepeatingControlsListViewController extends AbstractViewCon
|
|
|
40
40
|
private setCalendarSelectedDatesFromDate;
|
|
41
41
|
private getSelectedDatesFromDate;
|
|
42
42
|
private changeCalendarSelectedDate;
|
|
43
|
-
render(): import("@sprucelabs/
|
|
43
|
+
render(): import("@sprucelabs/heartwood-view-controllers").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.List;
|
|
44
44
|
}
|
|
45
45
|
export type RepeatingOptions = Partial<Pick<CalendarEvent, 'repeats' | 'interval' | 'repeatsUntil' | 'occurrences' | 'startDateTimeMs' | 'daysOfWeek' | 'daysOfMonth'> & {
|
|
46
46
|
repeatAmount?: 'forever' | 'until' | 'after';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const calendar_utils_1 = require("@sprucelabs/calendar-utils");
|
|
4
3
|
const heartwood_view_controllers_1 = require("@sprucelabs/heartwood-view-controllers");
|
|
5
4
|
class RepeatingControlsListViewController extends heartwood_view_controllers_1.AbstractViewController {
|
|
6
5
|
constructor(options) {
|
|
@@ -346,7 +345,7 @@ class RepeatingControlsListViewController extends heartwood_view_controllers_1.A
|
|
|
346
345
|
}
|
|
347
346
|
getRepeating() {
|
|
348
347
|
return Object.assign(Object.assign({}, this.repeating), { repeatsUntil: this.repeating.repeatsUntil
|
|
349
|
-
?
|
|
348
|
+
? this.dates.getEndOfDay(this.repeating.repeatsUntil)
|
|
350
349
|
: undefined });
|
|
351
350
|
}
|
|
352
351
|
updateRepeating(repeating) {
|
|
@@ -363,7 +362,7 @@ class RepeatingControlsListViewController extends heartwood_view_controllers_1.A
|
|
|
363
362
|
(_b = this.calendarVc) === null || _b === void 0 ? void 0 : _b.triggerRender();
|
|
364
363
|
}
|
|
365
364
|
getSelectedDatesFromDate(dateTimeMs, daysOfMonth) {
|
|
366
|
-
const startDate =
|
|
365
|
+
const startDate = this.dates.splitDate(dateTimeMs);
|
|
367
366
|
if (daysOfMonth) {
|
|
368
367
|
const selectedDates = daysOfMonth.map((d) => {
|
|
369
368
|
return { day: d, year: startDate.year, month: startDate.month };
|
|
@@ -376,7 +375,7 @@ class RepeatingControlsListViewController extends heartwood_view_controllers_1.A
|
|
|
376
375
|
}
|
|
377
376
|
changeCalendarSelectedDate(dateTimeMs) {
|
|
378
377
|
var _a, _b, _c, _d, _e;
|
|
379
|
-
const selectedDate =
|
|
378
|
+
const selectedDate = this.dates.splitDate(dateTimeMs);
|
|
380
379
|
const match = (_a = this.calendarVc) === null || _a === void 0 ? void 0 : _a.getSelectedDates().find((x) => x.day == selectedDate.day &&
|
|
381
380
|
x.year == selectedDate.year &&
|
|
382
381
|
x.month == selectedDate.month);
|