@idea-ionic/agenda 8.0.1 → 8.0.3

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,13 +1,10 @@
1
- import { EventEmitter, OnInit, ChangeDetectorRef } from '@angular/core';
2
- import { IonContent, Platform } from '@ionic/angular';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { IonContent } from '@ionic/angular';
3
3
  import { Subject } from 'rxjs';
4
4
  import { CalendarEvent, CalendarEventTimesChangedEvent, CalendarMonthViewBeforeRenderEvent, CalendarView, CalendarWeekViewBeforeRenderEvent } from 'angular-calendar';
5
5
  import { IDEATranslationsService } from '@idea-ionic/common';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class IDEAAgendaComponent implements OnInit {
8
- private cdr;
9
- private platform;
10
- t: IDEATranslationsService;
11
8
  /**
12
9
  * The events to display in the calendar.
13
10
  */
@@ -93,31 +90,22 @@ export declare class IDEAAgendaComponent implements OnInit {
93
90
  * Trigger before the rendering of the month view.
94
91
  */
95
92
  beforeMonthViewRenderEmitter: EventEmitter<CalendarMonthViewBeforeRenderEvent>;
96
- /**
97
- * Helper to use the enum in the UX.
98
- */
99
93
  CalendarView: typeof CalendarView;
100
- /**
101
- * The currently selected date.
102
- */
94
+ Attendance: typeof EventAttendance;
103
95
  viewDate: Date;
96
+ refresh: Subject<unknown>;
104
97
  /**
105
- * A controller to refresh the current view.
106
- */
107
- refresh: Subject<void>;
108
- /**
109
- * The locale used to format dates.
110
98
  * @hide
111
99
  */
112
100
  locale: string;
113
101
  /**
114
- * The starting day for the week, according to the locale (0 = sunday).
115
102
  * @hide
116
103
  */
117
104
  weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;
118
- Attendance: typeof EventAttendance;
119
105
  darkMode: boolean;
120
- constructor(cdr: ChangeDetectorRef, platform: Platform, t: IDEATranslationsService);
106
+ private _cdr;
107
+ private _platform;
108
+ _translate: IDEATranslationsService;
121
109
  ngOnInit(): void;
122
110
  isMobile(): boolean;
123
111
  /**
@@ -128,44 +116,17 @@ export declare class IDEAAgendaComponent implements OnInit {
128
116
  * Run some checks before the week/day view is rendered (e.g. disable invalid days).
129
117
  */
130
118
  beforeWeekOrDayViewRender(event: CalendarWeekViewBeforeRenderEvent): void;
131
- /**
132
- * Check whether a date is valid based on the configured parameters.
133
- */
134
119
  dateIsValid(date: any, sameDayIsValid?: boolean): boolean;
135
- /**
136
- * Change the current view for the agenda.
137
- */
138
120
  setView(view: CalendarView): void;
139
- /**
140
- * Emit the change of the view date and close the detail component of the month view, if needed.
141
- */
142
121
  viewDateChanged(newDate: Date): void;
143
- /**
144
- * A day was selected: manage the detailed view.
145
- */
146
122
  changeDay({ date, events }: {
147
123
  date: Date;
148
124
  events: AgendaEvent[];
149
125
  }): void;
150
- /**
151
- * The time of an event was changed.
152
- */
153
126
  eventTimesChanged({ event, newStart, newEnd }: CalendarEventTimesChangedEvent): void;
154
- /**
155
- * Given a color, it returns an opaque version of it.
156
- */
157
127
  getAlternateColor(color: string, amount: number, opacity?: number): string | undefined;
158
- /**
159
- * Get the content of the tooltip based on the event.
160
- */
161
128
  getTooltipContent(event: AgendaEvent): string;
162
- /**
163
- * Get a shortened version of the description as preview.
164
- */
165
129
  getPreviewDescription(description: string): string;
166
- /**
167
- * Handle the drag&drop to create a new event.
168
- */
169
130
  startDragToCreate(event: Event, segmentDate: Date, segmentElement: HTMLElement): void;
170
131
  private getFixedEndDateWithMinimumSegmentDuration;
171
132
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEAAgendaComponent, never>;
@@ -1,18 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { ModalController, AlertController } from '@ionic/angular';
3
2
  import { Calendar, Check, Membership } from 'idea-toolbox';
4
- import { IDEALoadingService, IDEAAWSAPIService, IDEATinCanService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';
5
- import { IDEACalendarsService } from './calendars.service';
6
3
  import * as i0 from "@angular/core";
7
4
  export declare class IDEACalendarComponent implements OnInit {
8
- calendars: IDEACalendarsService;
9
- modalCtrl: ModalController;
10
- alertCtrl: AlertController;
11
- tc: IDEATinCanService;
12
- loading: IDEALoadingService;
13
- message: IDEAMessageService;
14
- API: IDEAAWSAPIService;
15
- t: IDEATranslationsService;
16
5
  /**
17
6
  * The calendar to manage.
18
7
  */
@@ -25,43 +14,23 @@ export declare class IDEACalendarComponent implements OnInit {
25
14
  * Whether the calendar color is an important detail or it shouldn't be shown.
26
15
  */
27
16
  hideColor: boolean;
28
- /**
29
- * Working copy of the calendar, to update only when confirmed.
30
- */
31
- _calendar: Calendar;
32
- /**
33
- * Helper to allow selecting memberships.
34
- */
17
+ calendarWC: Calendar;
35
18
  membershipsChecks: Check[];
36
- /**
37
- * The current membership.
38
- */
39
19
  membership: Membership;
40
- /**
41
- * Errors while validating the entity.
42
- */
43
20
  errors: Set<string>;
44
- /**
45
- * The default color for a calendar.
46
- */
47
21
  DEFAULT_COLOR: string;
48
- constructor(calendars: IDEACalendarsService, modalCtrl: ModalController, alertCtrl: AlertController, tc: IDEATinCanService, loading: IDEALoadingService, message: IDEAMessageService, API: IDEAAWSAPIService, t: IDEATranslationsService);
49
- ngOnInit(): void;
50
- /**
51
- * Set the support array to display errors in the UI.
52
- */
22
+ private _calendars;
23
+ private _modal;
24
+ private _alert;
25
+ private _tc;
26
+ private _loading;
27
+ private _message;
28
+ private _API;
29
+ private _translate;
30
+ ngOnInit(): Promise<void>;
53
31
  hasFieldAnError(field: string): boolean;
54
- /**
55
- * Save a calendar with the new info.
56
- */
57
32
  save(): Promise<void>;
58
- /**
59
- * Delete the calendar.
60
- */
61
- delete(): void;
62
- /**
63
- * Close the component.
64
- */
33
+ delete(): Promise<void>;
65
34
  close(): void;
66
35
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEACalendarComponent, never>;
67
36
  static ɵcmp: i0.ɵɵComponentDeclaration<IDEACalendarComponent, "idea-calendar", never, { "calendar": { "alias": "calendar"; "required": false; }; "advancedPermissions": { "alias": "advancedPermissions"; "required": false; }; "hideColor": { "alias": "hideColor"; "required": false; }; }, {}, never, never, false, never>;
@@ -1,17 +1,7 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { ModalController } from '@ionic/angular';
3
2
  import { Calendar, ExternalCalendarSources, Membership } from 'idea-toolbox';
4
- import { IDEALoadingService, IDEAAWSAPIService, IDEATinCanService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';
5
- import { IDEACalendarsService } from './calendars.service';
6
3
  import * as i0 from "@angular/core";
7
4
  export declare class IDEACalendarCreationComponent implements OnInit {
8
- calendars: IDEACalendarsService;
9
- modalCtrl: ModalController;
10
- tc: IDEATinCanService;
11
- loading: IDEALoadingService;
12
- message: IDEAMessageService;
13
- API: IDEAAWSAPIService;
14
- t: IDEATranslationsService;
15
5
  /**
16
6
  * Whether we want to allow the creation of only a particular type of calendar, based on the scope.
17
7
  */
@@ -20,43 +10,21 @@ export declare class IDEACalendarCreationComponent implements OnInit {
20
10
  * Whether we want to allow the creation of local calendars.
21
11
  */
22
12
  onlyExternalCalendars: boolean;
23
- /**
24
- * The current membership (generic).
25
- */
26
13
  membership: Membership;
27
- /**
28
- * The calendar to create.
29
- */
30
14
  calendar: Calendar;
31
- /**
32
- * The default color for a new calendar.
33
- */
34
15
  DEFAULT_COLOR: string;
35
- /**
36
- * The possible external services for the new calendar.
37
- */
38
16
  SOURCES: string[];
39
- constructor(calendars: IDEACalendarsService, modalCtrl: ModalController, tc: IDEATinCanService, loading: IDEALoadingService, message: IDEAMessageService, API: IDEAAWSAPIService, t: IDEATranslationsService);
17
+ private _calendars;
18
+ private _modal;
19
+ private _tc;
20
+ private _loading;
21
+ private _message;
22
+ private _translate;
40
23
  ngOnInit(): void;
41
- /**
42
- * If allowed by the component configuration, reset the scope of the calendar (private/shared).
43
- */
44
24
  resetScope(): void;
45
- /**
46
- * Whether we can change the scope of the calendar (private/shared).
47
- */
48
25
  canChangeScope(): boolean;
49
- /**
50
- * Whether the scope has been set already.
51
- */
52
26
  scopeIsSet(): boolean;
53
- /**
54
- * Add a new calendar based on the configuration set.
55
- */
56
27
  saveNewCalendar(service?: ExternalCalendarSources): Promise<void>;
57
- /**
58
- * Close the component.
59
- */
60
28
  close(): void;
61
29
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEACalendarCreationComponent, never>;
62
30
  static ɵcmp: i0.ɵɵComponentDeclaration<IDEACalendarCreationComponent, "idea-calendar-creation", never, { "fixScope": { "alias": "fixScope"; "required": false; }; "onlyExternalCalendars": { "alias": "onlyExternalCalendars"; "required": false; }; }, {}, never, never, false, never>;
@@ -1,16 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
- import { AlertController, ModalController } from '@ionic/angular';
3
2
  import { Calendar } from 'idea-toolbox';
4
- import { IDEALoadingService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';
5
- import { IDEACalendarsService } from './calendars.service';
6
3
  import * as i0 from "@angular/core";
7
4
  export declare class IDEACalendarItemComponent {
8
- calendars: IDEACalendarsService;
9
- alertCtrl: AlertController;
10
- modalCtrl: ModalController;
11
- message: IDEAMessageService;
12
- loading: IDEALoadingService;
13
- t: IDEATranslationsService;
14
5
  /**
15
6
  * The calendar to show.
16
7
  */
@@ -31,16 +22,14 @@ export declare class IDEACalendarItemComponent {
31
22
  * Report to parent components a change.
32
23
  */
33
24
  somethingChanged: EventEmitter<Calendar>;
34
- constructor(calendars: IDEACalendarsService, alertCtrl: AlertController, modalCtrl: ModalController, message: IDEAMessageService, loading: IDEALoadingService, t: IDEATranslationsService);
35
- /**
36
- * Open the modal to manage the calendar.
37
- */
38
- manageCalendar(): void;
39
- /**
40
- * Continue the auth flow to link an external service and set an external calendar;
41
- * otherwise, the calendar can be deleted.
42
- */
43
- linkExtCalendarOrDelete(): void;
25
+ private _alert;
26
+ private _modal;
27
+ private _message;
28
+ private _loading;
29
+ private _translate;
30
+ private _calendars;
31
+ manageCalendar(): Promise<void>;
32
+ private linkExtCalendarOrDelete;
44
33
  static ɵfac: i0.ɵɵFactoryDeclaration<IDEACalendarItemComponent, never>;
45
34
  static ɵcmp: i0.ɵɵComponentDeclaration<IDEACalendarItemComponent, "idea-calendar-item", never, { "calendar": { "alias": "calendar"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "advancedPermissions": { "alias": "advancedPermissions"; "required": false; }; "hideColor": { "alias": "hideColor"; "required": false; }; }, { "somethingChanged": "somethingChanged"; }, never, never, false, never>;
46
35
  }
@@ -1,6 +1,4 @@
1
- import { AlertController, ModalController } from '@ionic/angular';
2
1
  import { Calendar, ExternalCalendarSources } from 'idea-toolbox';
3
- import { IDEALoadingService, IDEAAWSAPIService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';
4
2
  import * as i0 from "@angular/core";
5
3
  /**
6
4
  * Note: to test locally, you need to temporarily change the redirect URI:
@@ -9,14 +7,12 @@ import * as i0 from "@angular/core";
9
7
  * In both cases, the value should be set to `http://localhost:8100` (or according to the local URL).
10
8
  */
11
9
  export declare class IDEACalendarsService {
12
- modalCtrl: ModalController;
13
- alertCtrl: AlertController;
14
- message: IDEAMessageService;
15
- loading: IDEALoadingService;
16
- API: IDEAAWSAPIService;
17
- t: IDEATranslationsService;
18
- protected env: any;
19
- constructor(modalCtrl: ModalController, alertCtrl: AlertController, message: IDEAMessageService, loading: IDEALoadingService, API: IDEAAWSAPIService, t: IDEATranslationsService);
10
+ protected _env: any;
11
+ private _modal;
12
+ private _alert;
13
+ private _loading;
14
+ private _API;
15
+ private _translate;
20
16
  /**
21
17
  * Get the ion-icon of an external service from its name.
22
18
  */
@@ -45,6 +41,7 @@ export declare class IDEACalendarsService {
45
41
  * Link the calendar with the chosen external service (auth flow).
46
42
  */
47
43
  linkExtService(cal: Calendar): Promise<void>;
44
+ private showAlertLinkingCalendar;
48
45
  /**
49
46
  * Get the external calendars list of the external service.
50
47
  */