@sprucelabs/spruce-calendar-components 25.5.0 → 25.5.2
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/.spruce/schemas/schemas.types.d.ts +932 -932
- package/build/calendar/Calendar.vc.js +3 -1
- package/build/calendar/CalendarEventManager.d.ts +2 -1
- package/build/calendar/CalendarEventManager.js +6 -1
- package/build/esm/.spruce/schemas/schemas.types.d.ts +932 -932
- package/build/esm/calendar/Calendar.vc.js +3 -1
- package/build/esm/calendar/CalendarEventManager.d.ts +2 -1
- package/build/esm/calendar/CalendarEventManager.js +6 -1
- package/build/esm/skillViewControllers/Root.svc.d.ts +3 -0
- package/build/esm/skillViewControllers/Root.svc.js +23 -5
- package/build/esm/tools/EventTitleTool.vc.js +3 -2
- package/build/skillViewControllers/Root.svc.d.ts +3 -0
- package/build/skillViewControllers/Root.svc.js +23 -5
- package/build/tools/EventTitleTool.vc.js +3 -2
- package/package.json +1 -1
|
@@ -240,7 +240,9 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
|
|
|
240
240
|
return event;
|
|
241
241
|
}
|
|
242
242
|
render() {
|
|
243
|
-
|
|
243
|
+
var _a, _b;
|
|
244
|
+
const model = super.render();
|
|
245
|
+
return Object.assign(Object.assign({}, model), { onLongPressEvent: () => this.getDevice().vibrate(), onLongPressView: () => this.getDevice().vibrate(), shouldEnableSwipeNav: ((_b = (_a = model.people) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 1 });
|
|
244
246
|
}
|
|
245
247
|
}
|
|
246
248
|
CalendarViewController.id = 'calendar';
|
|
@@ -39,6 +39,7 @@ export default class CalendarEventManager {
|
|
|
39
39
|
getCalendars(): import("@sprucelabs/calendar-utils").SpruceSchemas.Calendar.v2021_05_19.Calendar[];
|
|
40
40
|
addDraftEvent(event: CalendarEvent, shouldSelectEvent?: boolean): Promise<void>;
|
|
41
41
|
addEvent(event: CalendarEvent): void;
|
|
42
|
+
addEvents(events: CalendarEvent[]): void;
|
|
42
43
|
silentlySwapEvent(oldId: string, event: CalendarEvent): Promise<void>;
|
|
43
44
|
handleDropEvent(id: string, updates: Partial<CalendarEvent>): Promise<boolean>;
|
|
44
45
|
reset(): Promise<void>;
|
|
@@ -52,7 +53,7 @@ export default class CalendarEventManager {
|
|
|
52
53
|
shouldUpdateAllEventsGoingForward?: boolean;
|
|
53
54
|
shouldPersist?: boolean;
|
|
54
55
|
}): void;
|
|
55
|
-
loadEvents(startDate: number, endDate: number, peopleIds: string[]): Promise<
|
|
56
|
+
loadEvents(startDate: number, endDate: number, peopleIds: string[]): Promise<import("@sprucelabs/calendar-utils").SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent[]>;
|
|
56
57
|
setCalendarVisibility(calendarId: string, shouldBeVisible: boolean): Promise<void>;
|
|
57
58
|
setupVcForEventType(vcId: string, typeSlug: string): Promise<void>;
|
|
58
59
|
private assertValidCalendarId;
|
|
@@ -96,6 +96,10 @@ class CalendarEventManager {
|
|
|
96
96
|
this.allEvents.push(Object.assign({}, event));
|
|
97
97
|
this.calendarVc.addEvent(event);
|
|
98
98
|
}
|
|
99
|
+
addEvents(events) {
|
|
100
|
+
this.allEvents.push(...events);
|
|
101
|
+
this.calendarVc.mixinEvents(events);
|
|
102
|
+
}
|
|
99
103
|
async silentlySwapEvent(oldId, event) {
|
|
100
104
|
var _a;
|
|
101
105
|
const events = this.getEvents().filter((e) => e.id !== oldId);
|
|
@@ -194,7 +198,6 @@ class CalendarEventManager {
|
|
|
194
198
|
peopleIds,
|
|
195
199
|
});
|
|
196
200
|
await this.calendarVc.renderOnce(async () => {
|
|
197
|
-
this.replaceEventsInRange(events, startDate, endDate);
|
|
198
201
|
if (!this.eventTypes) {
|
|
199
202
|
this.eventTypes = await this.events.getEventTypes();
|
|
200
203
|
}
|
|
@@ -205,7 +208,9 @@ class CalendarEventManager {
|
|
|
205
208
|
await this.setupVcForEventType(type.viewControllerId, type.slug);
|
|
206
209
|
}
|
|
207
210
|
}));
|
|
211
|
+
this.replaceEventsInRange(events, startDate, endDate);
|
|
208
212
|
});
|
|
213
|
+
return events;
|
|
209
214
|
}
|
|
210
215
|
async setCalendarVisibility(calendarId, shouldBeVisible) {
|
|
211
216
|
if (shouldBeVisible) {
|