@sprucelabs/spruce-calendar-components 22.10.14 → 22.10.16

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.
@@ -60,11 +60,13 @@ export default class CalendarViewController extends CoreCalendarViewController {
60
60
  view?: "month" | "day" | null | undefined;
61
61
  shouldRenderHeader?: boolean | null | undefined;
62
62
  onChangeStartDate?: ((date: number) => void | Promise<void>) | null | undefined;
63
- onClick?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
63
+ onClickView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
64
+ onTouchView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
64
65
  onClickEvent?: ((options: ClickEventOptions) => void | Promise<void>) | null | undefined;
65
66
  onDropEvent?: ((options: DropEventOptions) => boolean | void | Promise<boolean | void>) | null | undefined;
66
67
  onDeselectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
67
68
  onSelectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
69
+ onLongPressView?: (() => boolean | void) | null | undefined;
68
70
  shifts?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarShift[] | null | undefined;
69
71
  };
70
72
  }
@@ -38,7 +38,7 @@ export default class CalendarViewController extends CoreCalendarViewController {
38
38
  this.eventSwappedHandler = onEventSwapped;
39
39
  this.dropEventHandler = onDropEvent;
40
40
  this.remoteEventStore = remoteEventStore;
41
- this.model.onClick = this.handleClick.bind(this);
41
+ this.model.onClickView = this.handleClick.bind(this);
42
42
  this.setDefaultControllerForEvents('calendar.universal-calendar-event');
43
43
  }
44
44
  handleDropEvent(options) {
@@ -33,7 +33,7 @@ export default class DateSelectCardViewController extends AbstractViewController
33
33
  });
34
34
  }
35
35
  CalendarVc(options) {
36
- return this.Controller('calendar', Object.assign({ view: 'month', onClick: ({ dateTimeMs }) => this.handleDateSelect(dateTimeMs), selectedDates: [] }, options));
36
+ return this.Controller('calendar', Object.assign({ view: 'month', onClickView: ({ dateTimeMs }) => this.handleDateSelect(dateTimeMs), selectedDates: [] }, options));
37
37
  }
38
38
  handleDateSelect(dateTimeMs) {
39
39
  return __awaiter(this, void 0, void 0, function* () {
@@ -19,7 +19,7 @@ export default class EventDateTimeToolViewController extends AbstractViewControl
19
19
  this.calendarVc = this.Controller('calendar', {
20
20
  view: 'month',
21
21
  selectedDates: [this.getSelectedDate()],
22
- onClick: this.handleSelectDateFromCalendar.bind(this),
22
+ onClickView: this.handleSelectDateFromCalendar.bind(this),
23
23
  });
24
24
  this.formVc = this.FormVc();
25
25
  this.cardVc = this.CardVc();
@@ -334,7 +334,7 @@ export default class RepeatingControlsListViewController extends AbstractViewCon
334
334
  startDate = new Date().getTime();
335
335
  }
336
336
  return this.Controller('calendar', {
337
- onClick: (options) => __awaiter(this, void 0, void 0, function* () {
337
+ onClickView: (options) => __awaiter(this, void 0, void 0, function* () {
338
338
  var _b;
339
339
  if (options.dateTimeMs) {
340
340
  this.changeCalendarSelectedDate(options.dateTimeMs);
@@ -60,11 +60,13 @@ export default class CalendarViewController extends CoreCalendarViewController {
60
60
  view?: "month" | "day" | null | undefined;
61
61
  shouldRenderHeader?: boolean | null | undefined;
62
62
  onChangeStartDate?: ((date: number) => void | Promise<void>) | null | undefined;
63
- onClick?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
63
+ onClickView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
64
+ onTouchView?: ((options: ClickCalendarViewOptions) => void | Promise<void>) | null | undefined;
64
65
  onClickEvent?: ((options: ClickEventOptions) => void | Promise<void>) | null | undefined;
65
66
  onDropEvent?: ((options: DropEventOptions) => boolean | void | Promise<boolean | void>) | null | undefined;
66
67
  onDeselectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
67
68
  onSelectEvent?: ((options: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarEvent) => void | Promise<void>) | null | undefined;
69
+ onLongPressView?: (() => boolean | void) | null | undefined;
68
70
  shifts?: SpruceSchemas.HeartwoodViewControllers.v2021_02_11.CalendarShift[] | null | undefined;
69
71
  };
70
72
  }
@@ -34,7 +34,7 @@ class CalendarViewController extends heartwood_view_controllers_1.CalendarViewCo
34
34
  this.eventSwappedHandler = onEventSwapped;
35
35
  this.dropEventHandler = onDropEvent;
36
36
  this.remoteEventStore = remoteEventStore;
37
- this.model.onClick = this.handleClick.bind(this);
37
+ this.model.onClickView = this.handleClick.bind(this);
38
38
  this.setDefaultControllerForEvents('calendar.universal-calendar-event');
39
39
  }
40
40
  async handleDropEvent(options) {
@@ -24,7 +24,7 @@ class DateSelectCardViewController extends heartwood_view_controllers_1.Abstract
24
24
  await this.calendarVc.setStartDate(startDate);
25
25
  }
26
26
  CalendarVc(options) {
27
- return this.Controller('calendar', Object.assign({ view: 'month', onClick: ({ dateTimeMs }) => this.handleDateSelect(dateTimeMs), selectedDates: [] }, options));
27
+ return this.Controller('calendar', Object.assign({ view: 'month', onClickView: ({ dateTimeMs }) => this.handleDateSelect(dateTimeMs), selectedDates: [] }, options));
28
28
  }
29
29
  async handleDateSelect(dateTimeMs) {
30
30
  const { year, month, day } = calendar_utils_1.dateUtil.splitDate(dateTimeMs);
@@ -12,7 +12,7 @@ class EventDateTimeToolViewController extends heartwood_view_controllers_1.Abstr
12
12
  this.calendarVc = this.Controller('calendar', {
13
13
  view: 'month',
14
14
  selectedDates: [this.getSelectedDate()],
15
- onClick: this.handleSelectDateFromCalendar.bind(this),
15
+ onClickView: this.handleSelectDateFromCalendar.bind(this),
16
16
  });
17
17
  this.formVc = this.FormVc();
18
18
  this.cardVc = this.CardVc();
@@ -327,7 +327,7 @@ class RepeatingControlsListViewController extends heartwood_view_controllers_1.A
327
327
  startDate = new Date().getTime();
328
328
  }
329
329
  return this.Controller('calendar', {
330
- onClick: async (options) => {
330
+ onClickView: async (options) => {
331
331
  var _a;
332
332
  if (options.dateTimeMs) {
333
333
  this.changeCalendarSelectedDate(options.dateTimeMs);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sprucelabs/spruce-calendar-components",
3
3
  "description": "Calendar components for working with calendars and Sprucebot.",
4
- "version": "22.10.14",
4
+ "version": "22.10.16",
5
5
  "skill": {
6
6
  "namespace": "calendar"
7
7
  },