@sprucelabs/spruce-calendar-components 25.3.0 → 25.4.1
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpruceSchemas, ViewControllerOptions, CalendarViewController as CoreCalendarViewController, ClickCalendarViewOptions,
|
|
1
|
+
import { SpruceSchemas, ViewControllerOptions, CalendarViewController as CoreCalendarViewController, ClickCalendarViewOptions, ClickEventOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { RemoteEventStore } from '../stores/RemoteEventStore';
|
|
3
3
|
import { CalendarPerson, UpdateEvent } from '../types/calendar.types';
|
|
4
4
|
export default class CalendarViewController extends CoreCalendarViewController {
|
|
@@ -35,33 +35,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
|
|
|
35
35
|
private persist;
|
|
36
36
|
waitForPendingSaves(): Promise<void>;
|
|
37
37
|
private _persist;
|
|
38
|
-
render():
|
|
39
|
-
controller?: import("@sprucelabs/heartwood-view-controllers").ViewController<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar> | null | undefined;
|
|
40
|
-
people?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson[] | null | undefined;
|
|
41
|
-
minTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
42
|
-
maxTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
43
|
-
startDate?: number | null | undefined;
|
|
44
|
-
defaultStartTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
45
|
-
defaultEndTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
46
|
-
events: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent[];
|
|
47
|
-
selectedEvent?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent | null | undefined;
|
|
48
|
-
selectedDates?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarSelectedDate[] | null | undefined;
|
|
49
|
-
timezoneOffsetMs?: number | null | undefined;
|
|
50
|
-
shouldEnableAnimations?: boolean | null | undefined;
|
|
51
|
-
view?: "month" | "day" | null | undefined;
|
|
52
|
-
shouldRenderHeader?: boolean | null | undefined;
|
|
53
|
-
onChangeStartDate?: ((date: number) => void | Promise<void>) | null | undefined;
|
|
54
|
-
onClickView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
|
|
55
|
-
onLongPressViewDrop?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
|
|
56
|
-
onTapView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
|
|
57
|
-
onClickEvent?: ((options: ClickEventOptions) => void | Promise<void>) | null | undefined;
|
|
58
|
-
onLongPressEvent?: ((options: ClickEventOptions) => void | Promise<void>) | null | undefined;
|
|
59
|
-
onDropEvent?: ((options: DropEventOptions) => boolean | void | Promise<boolean | void>) | null | undefined;
|
|
60
|
-
onDeselectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
61
|
-
onSelectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
62
|
-
onLongPressView?: (() => boolean | void) | null | undefined;
|
|
63
|
-
shifts?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarShift[] | null | undefined;
|
|
64
|
-
};
|
|
38
|
+
render(): Calendar;
|
|
65
39
|
}
|
|
66
40
|
type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar;
|
|
67
41
|
type Event = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
@@ -240,7 +240,7 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
|
|
|
240
240
|
return event;
|
|
241
241
|
}
|
|
242
242
|
render() {
|
|
243
|
-
return Object.assign({}, super.render());
|
|
243
|
+
return Object.assign(Object.assign({}, super.render()), { onLongPressEvent: () => this.getDevice().vibrate(), onLongPressView: () => this.getDevice().vibrate() });
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
CalendarViewController.id = 'calendar';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SpruceSchemas, ViewControllerOptions, CalendarViewController as CoreCalendarViewController, ClickCalendarViewOptions,
|
|
1
|
+
import { SpruceSchemas, ViewControllerOptions, CalendarViewController as CoreCalendarViewController, ClickCalendarViewOptions, ClickEventOptions } from '@sprucelabs/heartwood-view-controllers';
|
|
2
2
|
import { RemoteEventStore } from '../stores/RemoteEventStore';
|
|
3
3
|
import { CalendarPerson, UpdateEvent } from '../types/calendar.types';
|
|
4
4
|
export default class CalendarViewController extends CoreCalendarViewController {
|
|
@@ -35,33 +35,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
|
|
|
35
35
|
private persist;
|
|
36
36
|
waitForPendingSaves(): Promise<void>;
|
|
37
37
|
private _persist;
|
|
38
|
-
render():
|
|
39
|
-
controller?: import("@sprucelabs/heartwood-view-controllers").ViewController<SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar> | null | undefined;
|
|
40
|
-
people?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarPerson[] | null | undefined;
|
|
41
|
-
minTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
42
|
-
maxTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
43
|
-
startDate?: number | null | undefined;
|
|
44
|
-
defaultStartTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
45
|
-
defaultEndTime?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarTime | null | undefined;
|
|
46
|
-
events: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent[];
|
|
47
|
-
selectedEvent?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent | null | undefined;
|
|
48
|
-
selectedDates?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarSelectedDate[] | null | undefined;
|
|
49
|
-
timezoneOffsetMs?: number | null | undefined;
|
|
50
|
-
shouldEnableAnimations?: boolean | null | undefined;
|
|
51
|
-
view?: "month" | "day" | null | undefined;
|
|
52
|
-
shouldRenderHeader?: boolean | null | undefined;
|
|
53
|
-
onChangeStartDate?: ((date: number) => void | Promise<void>) | null | undefined;
|
|
54
|
-
onClickView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
|
|
55
|
-
onLongPressViewDrop?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
|
|
56
|
-
onTapView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
|
|
57
|
-
onClickEvent?: ((options: ClickEventOptions) => void | Promise<void>) | null | undefined;
|
|
58
|
-
onLongPressEvent?: ((options: ClickEventOptions) => void | Promise<void>) | null | undefined;
|
|
59
|
-
onDropEvent?: ((options: DropEventOptions) => boolean | void | Promise<boolean | void>) | null | undefined;
|
|
60
|
-
onDeselectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
61
|
-
onSelectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
|
|
62
|
-
onLongPressView?: (() => boolean | void) | null | undefined;
|
|
63
|
-
shifts?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarShift[] | null | undefined;
|
|
64
|
-
};
|
|
38
|
+
render(): Calendar;
|
|
65
39
|
}
|
|
66
40
|
type Calendar = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.Calendar;
|
|
67
41
|
type Event = SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent;
|
|
@@ -272,7 +272,7 @@ class CalendarViewController extends CoreCalendarViewController {
|
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
274
|
render() {
|
|
275
|
-
return Object.assign({}, super.render());
|
|
275
|
+
return Object.assign(Object.assign({}, super.render()), { onLongPressEvent: () => this.getDevice().vibrate(), onLongPressView: () => this.getDevice().vibrate() });
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
CalendarViewController.id = 'calendar';
|