{"version":3,"file":"idea-ionic-agenda.mjs","sources":["../../../modules/agenda/src/dateFormatter.provider.ts","../../../modules/agenda/src/agenda.component.ts","../../../modules/agenda/src/agenda.component.html","../../../modules/agenda/src/calendars.service.ts","../../../modules/agenda/src/calendar.component.ts","../../../modules/agenda/src/calendar.component.html","../../../modules/agenda/src/calendarItem.component.ts","../../../modules/agenda/src/calendarItem.component.html","../../../modules/agenda/src/calendarCreation.component.ts","../../../modules/agenda/src/calendarCreation.component.html","../../../modules/agenda/src/agenda.module.ts","../../../modules/agenda/idea-ionic-agenda.ts"],"sourcesContent":["import { formatDate } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { CalendarDateFormatter, DateFormatterParams } from 'angular-calendar';\n\n@Injectable()\nexport class CustomDateFormatter extends CalendarDateFormatter {\n  // MONTH VIEW\n  monthViewColumnHeader = ({ date, locale }: DateFormatterParams): string => formatDate(date, 'EEE', locale);\n  monthViewTitle = ({ date, locale }: DateFormatterParams): string => formatDate(date, 'MMMM y', locale);\n\n  // WEEK VIEW\n  weekViewHour = ({ date, locale }: DateFormatterParams): string =>\n    locale === 'it' ? formatDate(date, 'HH:mm', locale) : formatDate(date, 'h aa', locale);\n  weekViewColumnHeader = ({ date, locale }: DateFormatterParams): string => formatDate(date, 'EEE', locale);\n  weekViewTitle = ({ date, locale }: DateFormatterParams): string => formatDate(date, 'MMMM yyyy', locale);\n\n  // DAY VIEW\n  dayViewHour = ({ date, locale }: DateFormatterParams): string =>\n    locale === 'it' ? formatDate(date, 'HH:mm', locale) : formatDate(date, 'h aa', locale);\n  dayViewTitle = ({ date, locale }: DateFormatterParams): string =>\n    locale === 'it' ? formatDate(date, 'EEEE, dd MMM yyyy', locale) : formatDate(date, 'EEEE, MMM dd, yyyy', locale);\n}\n","import {\n  Component,\n  ChangeDetectionStrategy,\n  Input,\n  Output,\n  EventEmitter,\n  OnInit,\n  ChangeDetectorRef,\n  inject\n} from '@angular/core';\nimport { IonContent, Platform } from '@ionic/angular/standalone';\nimport { finalize, fromEvent, Subject, takeUntil } from 'rxjs';\nimport {\n  CalendarEvent,\n  CalendarEventTimesChangedEvent,\n  CalendarMonthViewBeforeRenderEvent,\n  CalendarView,\n  CalendarWeekViewBeforeRenderEvent\n} from 'angular-calendar';\nimport { isFuture, isToday, isSameDay, endOfWeek, addDays, addMinutes } from 'date-fns';\n// @ts-ignore\nimport ColorParse from 'color-parse';\nimport { IDEATranslationsService } from '@idea-ionic/common';\n\n@Component({\n  // eslint-disable-next-line\n  standalone: false,\n  selector: 'idea-agenda',\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  templateUrl: 'agenda.component.html',\n  styleUrls: ['agenda.component.scss']\n})\nexport class IDEAAgendaComponent implements OnInit {\n  private _cdr = inject(ChangeDetectorRef);\n  private _platform = inject(Platform);\n  _translate = inject(IDEATranslationsService);\n\n  /**\n   * The events to display in the calendar.\n   */\n  @Input() events: AgendaEvent[] = [];\n  /**\n   * An array of day indexes (0 = sunday, 1 = monday, etc.) that will be hidden on the view.\n   */\n  @Input() excludeDays: number[] = [];\n  /**\n   * The day start hours in 24 hour time. Must be 0-23\n   */\n  @Input() dayStartHour = 0;\n  /**\n   * The day start hours in 24 hour time. Must be 0-23\n   */\n  @Input() dayEndHour = 23;\n  /**\n   * The number of segments in an hour. Must divide equally into 60.\n   */\n  @Input() hourSegments = 2;\n  /**\n   * Whether to open the current day's details right away in month view.\n   */\n  @Input() activeDayIsOpen = false;\n  /**\n   * The view mode for the agenda.\n   */\n  @Input() view: CalendarView = CalendarView.Week;\n  /**\n   * The allowed view mode for the agenda.\n   */\n  @Input() allowedViews = [CalendarView.Day, CalendarView.Week, CalendarView.Month];\n  /**\n   * Whether to block any day/slot in the past.\n   */\n  @Input() onlyFuture = false;\n  /**\n   * Some notes to show underneath the calendar's header.\n   */\n  @Input() titleNotes: string;\n  /**\n   * The template for new events created by drag&drop.\n   */\n  @Input() newEventTemplate: AgendaEvent = { title: 'New', start: null, meta: {} };\n  /**\n   * Whether (and how) to allow the creation of events by drag&drop.\n   * If enabled, on mobile it requires the `parentContent` to be set for a correct execution.\n   */\n  @Input() allowDragToCreate: DragToCreateOptions = DragToCreateOptions.DISABLED;\n  /**\n   * The parent ion-content, in case we want to control its scrollability for drag&drop features.\n   */\n  @Input() parentContent: IonContent;\n  /**\n   * Trigger when an event is selected.\n   */\n  @Output() selectEvent = new EventEmitter<AgendaEvent>();\n  /**\n   * Trigger when a day is selected.\n   */\n  @Output() selectDay = new EventEmitter<Date>();\n  /**\n   * Trigger when a time slot is selected.\n   */\n  @Output() selectSlot = new EventEmitter<Date>();\n  /**\n   * Trigger when a new event is added by drag and drop.\n   */\n  @Output() newEventByDrag = new EventEmitter<AgendaEvent>();\n  /**\n   * Trigger when an event changed date (drag&drop or resize).\n   */\n  @Output() changeEvent = new EventEmitter<AgendaEvent>();\n  /**\n   * Trigger when the view date of reference changed (because we moved inside the calendar).\n   */\n  @Output() changeDate = new EventEmitter<Date>();\n  /**\n   * Trigger before the rendering of the week or day view.\n   */\n  @Output() beforeWeekOrDayViewRenderEmitter = new EventEmitter<CalendarWeekViewBeforeRenderEvent>();\n  /**\n   * Trigger before the rendering of the month view.\n   */\n  @Output() beforeMonthViewRenderEmitter = new EventEmitter<CalendarMonthViewBeforeRenderEvent>();\n\n  CalendarView = CalendarView;\n  Attendance = EventAttendance;\n  viewDate = new Date();\n  refresh = new Subject<void>();\n  /**\n   * @hide\n   */\n  locale: string;\n  /**\n   * @hide\n   */\n  weekStartsOn: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n\n  darkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;\n\n  ngOnInit(): void {\n    this.locale = this._translate.getCurrentLang();\n    // in case of Italian locale the starting day for the week is monday (1), otherwise sunday (0)\n    this.weekStartsOn = this.locale === 'it' ? 1 : 0;\n  }\n  isMobile(): boolean {\n    return this._platform.is('mobile');\n  }\n\n  /**\n   * Run some checks before the month view is rendered (e.g. disable invalid days).\n   */\n  beforeMonthViewRender(event: CalendarMonthViewBeforeRenderEvent): void {\n    this.beforeMonthViewRenderEmitter.emit(event);\n    const { body } = event;\n    body.forEach(day => {\n      if (!this.dateIsValid(day.date)) day.cssClass = 'cal-disabled';\n    });\n  }\n  /**\n   * Run some checks before the week/day view is rendered (e.g. disable invalid days).\n   */\n  beforeWeekOrDayViewRender(event: CalendarWeekViewBeforeRenderEvent): void {\n    this.beforeWeekOrDayViewRenderEmitter.emit(event);\n    const { header, hourColumns } = event;\n    header.forEach(day => {\n      if (!this.dateIsValid(day.date)) day.cssClass = 'cal-disabled';\n    });\n    hourColumns.forEach(hourCol => {\n      hourCol.hours.forEach(hour => {\n        hour.segments.forEach(segment => {\n          if (!this.dateIsValid(segment.date)) segment.cssClass = 'cal-disabled';\n        });\n      });\n    });\n  }\n\n  dateIsValid(date: any, sameDayIsValid?: boolean): boolean {\n    if (!this.onlyFuture) return true;\n    return isFuture(date) || (sameDayIsValid ? isToday(date) : false);\n  }\n\n  setView(view: CalendarView): void {\n    this.view = view;\n  }\n\n  viewDateChanged(newDate: Date): void {\n    if (this.view === CalendarView.Month) this.activeDayIsOpen = false;\n    this.changeDate.emit(newDate);\n  }\n\n  changeDay({ date, events }: { date: Date; events: AgendaEvent[] }): void {\n    if (!this.dateIsValid(date, true)) return;\n    if ((isSameDay(this.viewDate, date) && this.activeDayIsOpen === true) || !events || events.length === 0)\n      this.activeDayIsOpen = false;\n    else this.activeDayIsOpen = true;\n    this.viewDate = date;\n  }\n\n  eventTimesChanged({ event, newStart, newEnd }: CalendarEventTimesChangedEvent): void {\n    event.start = newStart;\n    event.end = newEnd;\n    this.events = this.events.slice();\n    this.changeEvent.emit(event);\n  }\n\n  getAlternateColor(color: string, amount: number, opacity?: number): string | undefined {\n    if (!color?.trim()) return undefined;\n    const alt = ColorParse(color.trim());\n    const r = Math.max(Math.min(255, Number(alt.values[0]) + amount), 0);\n    const g = Math.max(Math.min(255, Number(alt.values[1]) + amount), 0);\n    const b = Math.max(Math.min(255, Number(alt.values[2]) + amount), 0);\n    return `rgba(${r}, ${g}, ${b}, ${opacity || 1})`;\n  }\n\n  getTooltipContent(event: AgendaEvent): string {\n    if (!event) return '';\n    let str = event.title ? '<b>' + event.title + '</b>' : '';\n    if (event.target) str = str.concat('<br>', event.target);\n    if (event.location) str = str.concat('<br>', event.location);\n    if (event.description) {\n      str = str.concat('<br>');\n      str = str.concat('<br>', event.description);\n    }\n    if (event.icons) {\n      str = str.concat('<br>');\n      event.icons.forEach(x => (str = str.concat('<br>', '<i>', x.title, '</i>')));\n    }\n    if (event.avatars && event.avatars.length) {\n      str = str.concat('<br><br>~');\n      event.avatars.forEach(x => (str = str.concat('<br>', x.title)));\n    }\n    return str;\n  }\n\n  getPreviewDescription(description: string): string {\n    return description && description.length > 100 ? description.slice(0, 100).concat('...') : description;\n  }\n\n  startDragToCreate(event: Event, segmentDate: Date, segmentElement: HTMLElement): void {\n    if (!this.allowDragToCreate) return;\n\n    if (this.parentContent) this.parentContent.scrollY = false;\n\n    const eventByDragAndDrop: AgendaEvent = { ...this.newEventTemplate, start: segmentDate };\n    this.events = [...this.events, eventByDragAndDrop];\n\n    const segmentPosition = segmentElement.getBoundingClientRect();\n    const endOfView = endOfWeek(this.viewDate, { weekStartsOn: this.weekStartsOn });\n\n    const whileDragging = (draggingEvent: Event): void => {\n      const { clientY, clientX } =\n        draggingEvent.type === 'touchmove' ? (draggingEvent as TouchEvent).touches[0] : (draggingEvent as MouseEvent);\n\n      const minutesDiff = ceilToNearest(clientY - segmentPosition.top, 30);\n      const daysDiff = floorToNearest(clientX - segmentPosition.left, segmentPosition.width) / segmentPosition.width;\n\n      let newEnd: Date;\n      if (this.allowDragToCreate === DragToCreateOptions.ONLY_SAME_DAY) newEnd = addMinutes(segmentDate, minutesDiff);\n      else newEnd = addDays(addMinutes(segmentDate, minutesDiff), daysDiff);\n\n      if (newEnd > segmentDate && newEnd < endOfView) eventByDragAndDrop.end = newEnd;\n      refreshView();\n    };\n\n    const endOfDrag = (): void => {\n      if (this.parentContent) this.parentContent.scrollY = true;\n      eventByDragAndDrop.end = this.getFixedEndDateWithMinimumSegmentDuration(eventByDragAndDrop);\n      refreshView();\n      this.newEventByDrag.emit(eventByDragAndDrop);\n    };\n\n    const refreshView = (): void => {\n      this.events = [...this.events];\n      this._cdr.detectChanges();\n    };\n\n    if (event.type === 'touchstart') {\n      fromEvent(document, 'touchmove')\n        .pipe(finalize(endOfDrag), takeUntil(fromEvent(document, 'touchend')))\n        .subscribe(whileDragging);\n    } else {\n      fromEvent(document, 'mousemove')\n        .pipe(finalize(endOfDrag), takeUntil(fromEvent(document, 'mouseup')))\n        .subscribe(whileDragging);\n    }\n  }\n  private getFixedEndDateWithMinimumSegmentDuration(agendaBooking: AgendaEvent): Date {\n    const fixedEnd = new Date(agendaBooking.end || agendaBooking.start);\n    const segmentSizeInMinutes = 60 / this.hourSegments;\n    if (fixedEnd.getTime() <= agendaBooking.start.getTime() + segmentSizeInMinutes * 60 * 1000)\n      fixedEnd.setMinutes(agendaBooking.start.getMinutes() + segmentSizeInMinutes);\n    return fixedEnd;\n  }\n}\n\n/**\n * A richer version of the classic CalendarEvent.\n */\nexport interface AgendaEvent extends CalendarEvent {\n  /**\n   * A brief description for the event.\n   */\n  description?: string;\n  /**\n   * The customer/stakeholder/target of the event.\n   */\n  target?: string;\n  /**\n   * The location of the event.\n   */\n  location?: string;\n  /**\n   * A list of URLs of images to show as small avatars.\n   */\n  avatars?: { id: string; url: string; title: string }[];\n  /**\n   * A list of ion-icons to show.\n   */\n  icons?: { name: string; title: string }[];\n  /**\n   * The colors of the event displayed.\n   */\n  color?: { primary: string; secondary?: string } | any;\n  /**\n   * Whether the event is external; external events are less important UI-wise.\n   */\n  external?: boolean;\n  /**\n   * The attendance status to this event, if any.\n   */\n  attendance?: EventAttendance;\n  /**\n   * A standard and unique id for the event, valid across multiple sources.\n   */\n  iCalUID?: string;\n}\n\n/**\n * Possible attendance statuses for the event.\n */\nexport enum EventAttendance {\n  DECLINED = -1,\n  NEEDS_ACTION = 0,\n  TENTATIVE,\n  ACCEPTED\n}\n\n/**\n * The options to allow (or not) drag&drop to create a new event.\n */\nexport enum DragToCreateOptions {\n  DISABLED = 0,\n  ONLY_SAME_DAY = 1,\n  FREE = 2\n}\n\nconst floorToNearest = (amount: number, precision: number): number => Math.floor(amount / precision) * precision;\nconst ceilToNearest = (amount: number, precision: number): number => Math.ceil(amount / precision) * precision;\n","<div class=\"agenda\">\n  <!-- TOOLBAR -->\n  <ion-row class=\"ion-align-items-center\">\n    <ion-col\n      class=\"ion-align-self-center ion-text-right\"\n      [size]=\"5\"\n      [sizeSm]=\"3\"\n      [pushSm]=\"5\"\n      [sizeLg]=\"2\"\n      [pushLg]=\"8\"\n    >\n      @if (allowedViews.length > 1) {\n        <ion-item lines=\"none\" class=\"calendarViewSelector\">\n          <ion-select\n            interface=\"popover\"\n            [value]=\"view\"\n            (ionChange)=\"$event?.detail ? setView($event.detail.value) : null\"\n          >\n            @for (view of allowedViews; track view) {\n              <ion-select-option [value]=\"view\">\n                {{ 'IDEA_AGENDA.' + view | uppercase | translate }}\n              </ion-select-option>\n            }\n          </ion-select>\n        </ion-item>\n      }\n    </ion-col>\n    <ion-col\n      class=\"ion-align-self-center ion-text-right\"\n      [size]=\"7\"\n      [sizeSm]=\"4\"\n      [pushSm]=\"5\"\n      [sizeLg]=\"2\"\n      [pushLg]=\"8\"\n    >\n      <ion-button\n        fill=\"clear\"\n        color=\"dark\"\n        size=\"small\"\n        mwlCalendarPreviousView\n        [view]=\"view\"\n        [(viewDate)]=\"viewDate\"\n        (viewDateChange)=\"viewDateChanged($event)\"\n      >\n        <ion-icon name=\"chevron-back-outline\" slot=\"icon-only\" />\n      </ion-button>\n      <ion-button\n        fill=\"clear\"\n        color=\"dark\"\n        size=\"small\"\n        mwlCalendarToday\n        [(viewDate)]=\"viewDate\"\n        (viewDateChange)=\"viewDateChanged($event)\"\n      >\n        <ion-icon name=\"today-outline\" slot=\"icon-only\" />\n      </ion-button>\n      <ion-button\n        fill=\"clear\"\n        color=\"dark\"\n        size=\"small\"\n        mwlCalendarNextView\n        [view]=\"view\"\n        [(viewDate)]=\"viewDate\"\n        (viewDateChange)=\"viewDateChanged($event)\"\n      >\n        <ion-icon name=\"chevron-forward-outline\" slot=\"icon-only\" />\n      </ion-button>\n    </ion-col>\n    <ion-col class=\"ion-align-self-center titleCol\" [size]=\"12\" [sizeSm]=\"5\" [pullSm]=\"7\" [sizeLg]=\"8\" [pullLg]=\"4\">\n      <h2>{{ viewDate | calendarDate: view + 'ViewTitle' : locale }}</h2>\n      @if (titleNotes) {\n        <p>{{ titleNotes }}</p>\n      }\n    </ion-col>\n  </ion-row>\n  <!-- TEMPLATES (touch only what's necessary and leave everything else as it is) -->\n  <ng-template #eventTitleTemplate let-event=\"event\" let-view=\"view\">\n    <span\n      class=\"cal-event-title\"\n      [class.noWrap]=\"event.allDay\"\n      [attr.aria-hidden]=\"{} | calendarA11y: 'hideEventTitle'\"\n    >\n      {{ event.title | calendarEventTitle: view : event }}\n      @if (event.target) {\n        <p>{{ event.target }}</p>\n      } @else {\n        @if (event.location) {\n          <p>{{ event.location }}</p>\n        }\n      }\n      @if (!event.allDay) {\n        <p>{{ getPreviewDescription(event.description) }}</p>\n      }\n    </span>\n  </ng-template>\n  <ng-template\n    #eventTemplate\n    let-weekEvent=\"weekEvent\"\n    let-tooltipPlacement=\"tooltipPlacement\"\n    let-eventClicked=\"eventClicked\"\n    let-tooltipTemplate=\"tooltipTemplate\"\n    let-tooltipAppendToBody=\"tooltipAppendToBody\"\n    let-tooltipDisabled=\"tooltipDisabled\"\n    let-tooltipDelay=\"tooltipDelay\"\n    let-column=\"column\"\n    let-daysInWeek=\"daysInWeek\"\n  >\n    <div\n      class=\"cal-event\"\n      [class.external]=\"weekEvent.event.external\"\n      [class.allDay]=\"weekEvent.event.allDay\"\n      [class.needsAction]=\"Attendance.NEEDS_ACTION === weekEvent.event.attendance\"\n      [class.declined]=\"Attendance.DECLINED === weekEvent.event.attendance\"\n      [class.tentative]=\"Attendance.TENTATIVE === weekEvent.event.attendance\"\n      [style.border-left-color]=\"weekEvent.event.color?.primary\"\n      [style.color]=\"getAlternateColor(weekEvent.event.color?.primary, darkMode ? 80 : -40)\"\n      [style.background-color]=\"getAlternateColor(weekEvent.event.color?.primary, darkMode ? 60 : 80, 0.2)\"\n      [mwlCalendarTooltip]=\"!tooltipDisabled && !isMobile() ? getTooltipContent(weekEvent.event) : ''\"\n      [tooltipPlacement]=\"tooltipPlacement\"\n      [tooltipEvent]=\"weekEvent.tempEvent || weekEvent.event\"\n      [tooltipTemplate]=\"tooltipTemplate\"\n      [tooltipAppendToBody]=\"tooltipAppendToBody\"\n      [tooltipDelay]=\"tooltipDelay\"\n      (mwlClick)=\"eventClicked.emit({ sourceEvent: $event })\"\n      (mwlKeydownEnter)=\"eventClicked.emit({ sourceEvent: $event })\"\n      tabindex=\"0\"\n      role=\"application\"\n      [attr.aria-label]=\"\n        { event: weekEvent.tempEvent || weekEvent.event, locale: locale } | calendarA11y: 'eventDescription'\n      \"\n    >\n      <mwl-calendar-event-actions [event]=\"weekEvent.tempEvent || weekEvent.event\" />\n      &ngsp;\n      <mwl-calendar-event-title\n        [event]=\"weekEvent.tempEvent || weekEvent.event\"\n        [customTemplate]=\"eventTitleTemplate\"\n        [view]=\"daysInWeek === 1 ? 'day' : 'week'\"\n      >\n      </mwl-calendar-event-title>\n      @if (!weekEvent.event.allDay) {\n        <div class=\"eventGadgets\">\n          @for (icon of weekEvent.event.icons; track icon) {\n            <ion-icon [name]=\"icon.name\" [title]=\"icon.title\" />\n          }\n          @for (avatar of weekEvent.event.avatars; track avatar) {\n            <idea-user-avatar size=\"mini\" [src]=\"avatar.url\" [name]=\"avatar.title\" />\n          }\n        </div>\n      }\n    </div>\n  </ng-template>\n  <ng-template\n    #hourSegmentTemplate\n    let-segment=\"segment\"\n    let-locale=\"locale\"\n    let-segmentHeight=\"segmentHeight\"\n    let-isTimeLabel=\"isTimeLabel\"\n  >\n    <div\n      #segmentElement\n      class=\"cal-hour-segment\"\n      [style.height.px]=\"segmentHeight\"\n      [class.cal-hour-start]=\"segment.isStart\"\n      [class.cal-after-hour-start]=\"!segment.isStart\"\n      [ngClass]=\"segment.cssClass\"\n      (mousedown)=\"allowDragToCreate ? startDragToCreate($event, segment.date, segmentElement) : null\"\n      (touchstart)=\"allowDragToCreate ? startDragToCreate($event, segment.date, segmentElement) : null\"\n    >\n      @if (isTimeLabel) {\n        <div class=\"cal-time\">\n          {{ segment.date | calendarDate: 'weekViewHour' : locale }}\n        </div>\n      }\n    </div>\n  </ng-template>\n  <!-- VIEWS -->\n  <div>\n    @switch (view) {\n      @case (CalendarView.Month) {\n        <mwl-calendar-month-view\n          [viewDate]=\"viewDate\"\n          [events]=\"events\"\n          [refresh]=\"refresh\"\n          [activeDayIsOpen]=\"activeDayIsOpen\"\n          [locale]=\"locale\"\n          [excludeDays]=\"excludeDays\"\n          [weekStartsOn]=\"weekStartsOn\"\n          [eventTitleTemplate]=\"eventTitleTemplate\"\n          (eventClicked)=\"selectEvent.emit($event.event)\"\n          (eventTimesChanged)=\"eventTimesChanged($event)\"\n          (dayClicked)=\"changeDay($event.day)\"\n          (beforeViewRender)=\"beforeMonthViewRender($event)\"\n        >\n        </mwl-calendar-month-view>\n      }\n      @case (CalendarView.Week) {\n        <mwl-calendar-week-view\n          [viewDate]=\"viewDate\"\n          [events]=\"events\"\n          [refresh]=\"refresh\"\n          [locale]=\"locale\"\n          [excludeDays]=\"excludeDays\"\n          [weekStartsOn]=\"weekStartsOn\"\n          [dayStartHour]=\"dayStartHour\"\n          [dayEndHour]=\"dayEndHour\"\n          [hourSegments]=\"hourSegments\"\n          [eventTemplate]=\"eventTemplate\"\n          [hourSegmentTemplate]=\"hourSegmentTemplate\"\n          (eventClicked)=\"selectEvent.emit($event.event)\"\n          (eventTimesChanged)=\"eventTimesChanged($event)\"\n          (dayHeaderClicked)=\"dateIsValid($event.day.date) ? selectDay.emit($event.day.date) : null\"\n          (hourSegmentClicked)=\"dateIsValid($event.date) ? selectSlot.emit($event.date) : null\"\n          (beforeViewRender)=\"beforeWeekOrDayViewRender($event)\"\n        >\n        </mwl-calendar-week-view>\n      }\n      @case (CalendarView.Day) {\n        <mwl-calendar-day-view\n          [viewDate]=\"viewDate\"\n          [events]=\"events\"\n          [refresh]=\"refresh\"\n          [locale]=\"locale\"\n          [dayStartHour]=\"dayStartHour\"\n          [dayEndHour]=\"dayEndHour\"\n          [hourSegments]=\"hourSegments\"\n          [eventTemplate]=\"eventTemplate\"\n          [hourSegmentTemplate]=\"hourSegmentTemplate\"\n          (eventClicked)=\"selectEvent.emit($event.event)\"\n          (eventTimesChanged)=\"eventTimesChanged($event)\"\n          (hourSegmentClicked)=\"dateIsValid($event.date) ? selectSlot.emit($event.date) : null\"\n          (beforeViewRender)=\"beforeWeekOrDayViewRender($event)\"\n        >\n        </mwl-calendar-day-view>\n      }\n    }\n  </div>\n</div>\n","import { Injectable, inject } from '@angular/core';\nimport { AlertController, ModalController } from '@ionic/angular/standalone';\nimport { Browser } from '@capacitor/browser';\nimport { Calendar, ExternalCalendarSources, Suggestion } from 'idea-toolbox';\nimport {\n  IDEAEnvironment,\n  IDEALoadingService,\n  IDEATranslationsService,\n  IDEASuggestionsComponent\n} from '@idea-ionic/common';\nimport { IDEAAWSAPIService } from '@idea-ionic/uncommon';\n\n/**\n * Note: to test locally, you need to temporarily change the redirect URI:\n *  - in the lambda `idea_calendars`, e.g. `SCARLETT_URL`;\n *  - in the client config file: `APP_URL`.\n * In both cases, the value should be set to `http://localhost:8100` (or according to the local URL).\n */\n@Injectable()\nexport class IDEACalendarsService {\n  protected _env = inject(IDEAEnvironment);\n  private _modal = inject(ModalController);\n  private _alert = inject(AlertController);\n  private _loading = inject(IDEALoadingService);\n  private _API = inject(IDEAAWSAPIService);\n  private _translate = inject(IDEATranslationsService);\n\n  /**\n   * Get the ion-icon of an external service from its name.\n   */\n  getServiceIcon(service: ExternalCalendarSources | string): string {\n    switch (service) {\n      case ExternalCalendarSources.GOOGLE:\n        return 'logo-google';\n      case ExternalCalendarSources.MICROSOFT:\n        return 'logo-windows';\n      default:\n        return 'help';\n    }\n  }\n  /**\n   * Get the base URL for API request (shared/private calendar).\n   */\n  getRequestURL(calendar: Calendar): string {\n    return (calendar.teamId ? `teams/${calendar.teamId}/` : '').concat('calendars');\n  }\n\n  /**\n   * Create a new calendar.\n   */\n  async postCalendar(cal: Calendar): Promise<Calendar> {\n    const calendar = await this._API.postResource(this.getRequestURL(cal), { idea: true, body: cal });\n    return new Calendar(calendar);\n  }\n  /**\n   * Update an existing calendar.\n   */\n  async putCalendar(cal: Calendar): Promise<Calendar> {\n    const body = { idea: true, resourceId: cal.calendarId, body: cal };\n    const calendar = await this._API.putResource(this.getRequestURL(cal), body);\n    return new Calendar(calendar);\n  }\n  /**\n   * Delete a calendar.\n   */\n  async deleteCalendar(cal: Calendar): Promise<void> {\n    await this._API.deleteResource(this.getRequestURL(cal), { idea: true, resourceId: cal.calendarId });\n  }\n  /**\n   * Associate an external calendar with the given calendar.\n   */\n  async setExternalCalendar(cal: Calendar, externalId: string): Promise<Calendar> {\n    const body = { idea: true, resourceId: cal.calendarId, body: { action: 'SET_EXTERNAL_CALENDAR', externalId } };\n    const calendar = await this._API.patchResource(this.getRequestURL(cal), body);\n    return new Calendar(calendar);\n  }\n\n  /**\n   * Link the calendar with the chosen external service (auth flow).\n   */\n  async linkExtService(cal: Calendar, baseURL: string): Promise<void> {\n    if (!cal.external) throw new Error('NOT_EXTERNAL');\n    if (!baseURL) baseURL = window.location.protocol.concat('//', window.location.hostname);\n    let url: string;\n    switch (cal.external.service) {\n      case ExternalCalendarSources.GOOGLE:\n        url =\n          'https://accounts.google.com/o/oauth2/v2/auth?' +\n          `client_id=${encodeURIComponent(this._env.google.apiClientId)}` +\n          '&response_type=code' +\n          `&redirect_uri=${encodeURIComponent(baseURL.concat('/echo/google-calendars-integration'))}` +\n          '&include_granted_scopes=true' +\n          '&access_type=offline&prompt=consent' +\n          `&scope=${encodeURIComponent(this._env.google.apiScope)}` +\n          `&state=${encodeURIComponent(cal.calendarId)}`;\n        break;\n      case ExternalCalendarSources.MICROSOFT:\n        url =\n          'https://login.microsoftonline.com/common/oauth2/v2.0/authorize?' +\n          `client_id=${encodeURIComponent(this._env.microsoft.apiClientId)}` +\n          '&response_type=code' +\n          `&redirect_uri=${encodeURIComponent(baseURL.concat('/echo/microsoft-calendars-integration'))}` +\n          '&response_mode=query' +\n          `&scope=${encodeURIComponent(this._env.microsoft.apiScope)}` +\n          `&state=${encodeURIComponent(cal.calendarId)}`;\n        break;\n    }\n    if (!url) throw new Error('INVALID_SERVICE');\n    await Browser.open({ url });\n    // since we don't know when/if the auth flow will finish, we wait\n    await this.showAlertLinkingCalendar();\n  }\n  private async showAlertLinkingCalendar(): Promise<void> {\n    return new Promise(async resolve => {\n      const header = this._translate._('IDEA_AGENDA.CALENDARS.LINKING_CALENDAR');\n      const message = this._translate._('IDEA_AGENDA.CALENDARS.LINKING_CALENDAR_CONFIRM_ONCE_DONE');\n      const buttons = [{ text: this._translate._('COMMON.DONE'), handler: resolve }];\n      const alert = await this._alert.create({ header, message, buttons, backdropDismiss: false });\n      alert.present();\n    });\n  }\n\n  /**\n   * Get the external calendars list of the external service.\n   */\n  async getExternalCalendars(cal: Calendar): Promise<ExtCalendar[]> {\n    if (!cal.external) throw new Error('NOT_EXTERNAL');\n    // get the access token to make requests; in case it fails, proceed to link the external service\n    const body = { idea: true, resourceId: cal.calendarId, body: { action: 'GET_ACCESS_TOKEN' } };\n    const result = await this._API.patchResource(this.getRequestURL(cal), body);\n    const headers = { Authorization: 'Bearer '.concat(result.token) };\n    if (cal.external.service === ExternalCalendarSources.GOOGLE) {\n      const res = await (\n        await fetch('https://www.googleapis.com/calendar/v3/users/me/calendarList', { headers })\n      ).json();\n      return res.items.map((c: any): ExtCalendar => ({ name: c.summary, id: c.id }) as ExtCalendar);\n    } else if (cal.external.service === ExternalCalendarSources.MICROSOFT) {\n      const res = await (await fetch('https://graph.microsoft.com/v1.0/me/calendars', { headers })).json();\n      return res.value.map((c: any): ExtCalendar => ({ name: c.name, id: c.id }) as ExtCalendar);\n    }\n  }\n\n  /**\n   * If the external service is linked, choose an external calendar and set it for the chosen calendar.\n   * @return the updated calendar.\n   */\n  async chooseAndSetExternalCalendar(cal: Calendar): Promise<Calendar> {\n    const extCalId = await this.openModalAndPickExternalCalendar(cal);\n    if (!extCalId) return;\n    return await this.setExternalCalendar(cal, extCalId);\n  }\n  /**\n   * Open the modal to pick a calendar from the external service.\n   * @return the id of the external calendar.\n   */\n  private async openModalAndPickExternalCalendar(cal: Calendar): Promise<string> {\n    let extCals: ExtCalendar[];\n    try {\n      await this._loading.show();\n      extCals = await this.getExternalCalendars(cal);\n      if (!extCals.length) throw new Error('NO_EXTERNAL_CALENDARS');\n    } catch (error) {\n      throw error;\n    } finally {\n      this._loading.hide();\n    }\n    const modal = await this._modal.create({\n      component: IDEASuggestionsComponent,\n      componentProps: {\n        data: extCals.map(c => new Suggestion({ value: c.id, name: c.name })),\n        searchPlaceholder: this._translate._('IDEA_AGENDA.CALENDARS.CHOOSE_AN_EXTERNAL_CALENDAR_TO_LINK'),\n        sortData: true,\n        hideIdFromUI: true,\n        hideClearButton: true,\n        mustChoose: true\n      },\n      backdropDismiss: false\n    });\n    modal.present();\n    const res = await modal.onDidDismiss();\n    return res.data ? res.data.value : null;\n  }\n\n  /**\n   * First sync of the extenal calendar.\n   */\n  syncCalendar(cal: Calendar): Promise<void> {\n    return new Promise((resolve, reject): void => this.syncCalendarHelper(cal, err => (err ? reject(err) : resolve())));\n  }\n  /**\n   * Helper to recursively sync an the extenal calendar.\n   */\n  private syncCalendarHelper(cal: Calendar, done: (err?: Error) => void): void {\n    // this is a recursive operation: the API returns if the sync has to continue or it finished\n    this._API\n      .patchResource(this.getRequestURL(cal), {\n        idea: true,\n        resourceId: cal.calendarId,\n        body: { action: 'SYNC_EXTERNAL_CALENDAR', firstSync: true }\n      })\n      .then((res: any): void => {\n        if (res.moreData) this.syncCalendarHelper(cal, done);\n        else done();\n      })\n      .catch(err => done(err));\n  }\n}\n\n/**\n * Helper structure to define external services' calendars (basic info).\n */\ninterface ExtCalendar {\n  id: string;\n  name: string;\n}\n","import { Component, Input, OnInit, inject } from '@angular/core';\nimport { ModalController, AlertController } from '@ionic/angular/standalone';\nimport { Calendar, Check, Membership } from 'idea-toolbox';\nimport { IDEALoadingService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';\nimport { IDEAAWSAPIService, IDEATinCanService } from '@idea-ionic/uncommon';\n\nimport { IDEACalendarsService } from './calendars.service';\n\n@Component({\n  // eslint-disable-next-line\n  standalone: false,\n  selector: 'idea-calendar',\n  templateUrl: 'calendar.component.html',\n  styleUrls: ['calendar.component.scss']\n})\nexport class IDEACalendarComponent implements OnInit {\n  private _modal = inject(ModalController);\n  private _alert = inject(AlertController);\n  private _tc = inject(IDEATinCanService);\n  private _loading = inject(IDEALoadingService);\n  private _message = inject(IDEAMessageService);\n  private _API = inject(IDEAAWSAPIService);\n  private _translate = inject(IDEATranslationsService);\n  _calendars = inject(IDEACalendarsService);\n\n  /**\n   * The calendar to manage.\n   */\n  @Input() calendar: Calendar;\n  /**\n   * Whether we want to enable advanced permissions (based on the memberships) on the calendar.\n   */\n  @Input() advancedPermissions: boolean;\n  /**\n   * Whether the calendar color is an important detail or it shouldn't be shown.\n   */\n  @Input() hideColor: boolean;\n\n  calendarWC: Calendar;\n  membershipsChecks: Check[];\n  membership: Membership;\n  errors = new Set<string>();\n  DEFAULT_COLOR = '#555';\n\n  async ngOnInit(): Promise<void> {\n    this.membership = this._tc.get('membership');\n    this.calendarWC = new Calendar(this.calendar);\n    try {\n      const memberships: Membership[] = await this._API.getResource(`teams/${this.membership.teamId}/memberships`);\n      this.membershipsChecks = memberships.map(\n        m =>\n          new Check({\n            value: m.userId,\n            name: m.name,\n            checked: (this.calendarWC.usersCanManageAppointments || []).some(x => x === m.userId)\n          })\n      );\n    } catch (error) {\n      this._message.error('COMMON.COULDNT_LOAD_LIST');\n    }\n  }\n\n  hasFieldAnError(field: string): boolean {\n    return this.errors.has(field);\n  }\n\n  async save(): Promise<void> {\n    if (!this.calendarWC.color) this.calendarWC.color = this.DEFAULT_COLOR;\n    if (this.calendarWC.isShared() && this.advancedPermissions)\n      this.calendarWC.usersCanManageAppointments = this.membershipsChecks\n        .filter(x => x.checked)\n        .map(x => String(x.value));\n    else delete this.calendarWC.usersCanManageAppointments;\n\n    this.errors = new Set(this.calendarWC.validate());\n    if (this.errors.size) return this._message.error('COMMON.FORM_HAS_ERROR_TO_CHECK');\n\n    try {\n      await this._loading.show();\n      const res = await this._calendars.putCalendar(this.calendarWC);\n      this.calendar.load(res);\n      this._message.success('IDEA_AGENDA.CALENDARS.CALENDAR_SAVED');\n      this._modal.dismiss(this.calendar);\n    } catch (error) {\n      this._message.error('COMMON.OPERATION_FAILED');\n    } finally {\n      this._loading.hide();\n    }\n  }\n\n  async delete(): Promise<void> {\n    const doDelete = async (): Promise<void> => {\n      try {\n        await this._loading.show();\n        await this._calendars.deleteCalendar(this.calendarWC);\n        this._message.success('IDEA_AGENDA.CALENDARS.CALENDAR_DELETED');\n        this._modal.dismiss(true);\n      } catch (error) {\n        this._message.error('COMMON.OPERATION_FAILED');\n      } finally {\n        this._loading.hide();\n      }\n    };\n\n    const header = this._translate._('COMMON.ARE_YOU_SURE');\n    const subHeader = this._translate._('IDEA_AGENDA.CALENDARS.DELETE_CALENDAR');\n    const message = this._translate._('IDEA_AGENDA.CALENDARS.DELETE_CALENDAR_HINT');\n    const buttons = [\n      { text: this._translate._('COMMON.CANCEL'), role: 'cancel' },\n      { text: this._translate._('COMMON.DELETE'), handler: doDelete }\n    ];\n    const alert = await this._alert.create({ header, subHeader, message, buttons });\n    alert.present();\n  }\n\n  close(): void {\n    this._modal.dismiss();\n  }\n}\n","<ion-header>\n  <ion-toolbar color=\"ideaToolbar\">\n    <ion-buttons slot=\"start\">\n      <ion-button [title]=\"'COMMON.CLOSE' | translate\" (click)=\"close()\">\n        <ion-icon name=\"close-circle\" slot=\"icon-only\" />\n      </ion-button>\n    </ion-buttons>\n    <ion-title>{{ 'IDEA_AGENDA.CALENDARS.EDIT_CALENDAR' | translate }}</ion-title>\n    <ion-buttons slot=\"end\">\n      <ion-button [title]=\"'COMMON.SAVE' | translate\" (click)=\"save()\">\n        <ion-icon name=\"checkmark-circle\" slot=\"icon-only\" />\n      </ion-button>\n    </ion-buttons>\n  </ion-toolbar>\n</ion-header>\n<ion-content>\n  @if (calendarWC) {\n    <div class=\"maxWidthContainer\">\n      <ion-list class=\"aList\">\n        <ion-item\n          lines=\"inset\"\n          [class.fieldHasError]=\"hasFieldAnError('name')\"\n          [title]=\"'IDEA_AGENDA.CALENDARS.NAME_HINT' | translate\"\n        >\n          <ion-input\n            labelPlacement=\"stacked\"\n            [label]=\"'IDEA_AGENDA.CALENDARS.NAME' | translate\"\n            [placeholder]=\"'IDEA_AGENDA.CALENDARS.NAME_HINT' | translate\"\n            [(ngModel)]=\"calendarWC.name\"\n          />\n        </ion-item>\n        <ion-item\n          lines=\"inset\"\n          [class.fieldHasError]=\"hasFieldAnError('description')\"\n          [title]=\"'IDEA_AGENDA.CALENDARS.DESCRIPTION_HINT' | translate\"\n        >\n          <ion-input\n            labelPlacement=\"stacked\"\n            [label]=\"'IDEA_AGENDA.CALENDARS.DESCRIPTION' | translate\"\n            [placeholder]=\"'IDEA_AGENDA.CALENDARS.DESCRIPTION_HINT' | translate\"\n            [(ngModel)]=\"calendarWC.description\"\n          />\n        </ion-item>\n        @if (!hideColor) {\n          <idea-color-picker\n            [lines]=\"'inset'\"\n            [current]=\"calendarWC.color\"\n            [label]=\"'IDEA_AGENDA.CALENDARS.COLOR' | translate\"\n            [class.fieldHasError]=\"hasFieldAnError('color')\"\n            (select)=\"$event ? (calendarWC.color = $event) : null\"\n          />\n        }\n        @if (membershipsChecks && calendarWC.isShared() && advancedPermissions) {\n          <idea-checker\n            [data]=\"membershipsChecks\"\n            [label]=\"'IDEA_AGENDA.CALENDARS.USERS_ALLOWED_TO_MANAGE_APPOINTMENTS' | translate\"\n            [searchPlaceholder]=\"'IDEA_AGENDA.CALENDARS.WHO_CAN_MANAGE_APPOINTMENTS' | translate\"\n            [noneText]=\"'IDEA_AGENDA.CALENDARS.NOBODY' | translate\"\n            [allText]=\"'IDEA_AGENDA.CALENDARS.EVERYONE' | translate\"\n            [allowSelectDeselectAll]=\"true\"\n            [lines]=\"'inset'\"\n          />\n        }\n      </ion-list>\n      @if (calendarWC.external?.service) {\n        <ion-list class=\"aList\">\n          <ion-list-header>\n            <ion-label>\n              <h2>{{ 'IDEA_AGENDA.CALENDARS.INFO_ON_CALENDAR' | translate }}</h2>\n            </ion-label>\n          </ion-list-header>\n          @if (calendar.userId) {\n            <ion-item lines=\"inset\">\n              <ion-label>\n                {{ 'IDEA_AGENDA.CALENDARS.PRIVATE_CALENDAR' | translate }}\n                <p>{{ 'IDEA_AGENDA.CALENDARS.PRIVATE_CALENDAR_HINT' | translate }}</p>\n              </ion-label>\n              <ion-icon slot=\"end\" name=\"person\" />\n            </ion-item>\n          }\n          @if (calendar.teamId) {\n            <ion-item lines=\"inset\">\n              <ion-label>\n                {{ 'IDEA_AGENDA.CALENDARS.TEAM_CALENDAR' | translate }}\n                <p>{{ 'IDEA_AGENDA.CALENDARS.TEAM_CALENDAR_HINT' | translate }}</p>\n              </ion-label>\n              <ion-icon slot=\"end\" name=\"people\" />\n            </ion-item>\n          }\n          <ion-item lines=\"inset\">\n            <ion-label>\n              {{ 'IDEA_AGENDA.CALENDARS.LINKED_TO' | translate }}\n              {{ 'IDEA_AGENDA.CALENDARS.SERVICES.' + calendarWC.external.service | translate }}\n              <p>{{ calendarWC.external.name }} ({{ calendarWC.external.email }})</p>\n            </ion-label>\n            <ion-icon slot=\"end\" [name]=\"_calendars.getServiceIcon(calendarWC.external.service)\" />\n          </ion-item>\n          <ion-item lines=\"inset\">\n            <ion-label>\n              {{ 'IDEA_AGENDA.CALENDARS.ACCESS_LEVELS.' + calendarWC.external.userAccess | translate }}\n              <p>{{ 'IDEA_AGENDA.CALENDARS.BASED_ON_EXTERNAL_SERVICE_SHARING_PERMISSION' | translate }}</p>\n            </ion-label>\n            <ion-icon slot=\"end\" name=\"shield\" />\n          </ion-item>\n        </ion-list>\n      }\n      <ion-list class=\"aList\">\n        <ion-list-header>\n          <ion-label color=\"danger\">\n            <h2>{{ 'IDEA_AGENDA.CALENDARS.DANGEROUS_ZONE' | translate }}</h2>\n          </ion-label>\n        </ion-list-header>\n        <ion-item lines=\"inset\">\n          <ion-label class=\"ion-text-wrap\">\n            {{ 'IDEA_AGENDA.CALENDARS.DELETE_CALENDAR' | translate }}\n            <p>{{ 'IDEA_AGENDA.CALENDARS.DELETE_CALENDAR_HINT' | translate }}</p>\n          </ion-label>\n          <ion-button\n            color=\"danger\"\n            [title]=\"'IDEA_AGENDA.CALENDARS.DELETE_CALENDAR_HINT' | translate\"\n            (click)=\"delete()\"\n          >\n            {{ 'COMMON.DELETE' | translate }}\n          </ion-button>\n        </ion-item>\n      </ion-list>\n    </div>\n  }\n</ion-content>\n","import { Component, EventEmitter, Input, Output, inject } from '@angular/core';\nimport { AlertController, ModalController } from '@ionic/angular/standalone';\nimport { Calendar } from 'idea-toolbox';\nimport { IDEALoadingService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';\n\nimport { IDEACalendarComponent } from './calendar.component';\nimport { IDEACalendarsService } from './calendars.service';\n\n@Component({\n  // eslint-disable-next-line\n  standalone: false,\n  selector: 'idea-calendar-item',\n  templateUrl: 'calendarItem.component.html',\n  styleUrls: ['calendarItem.component.scss']\n})\nexport class IDEACalendarItemComponent {\n  private _alert = inject(AlertController);\n  private _modal = inject(ModalController);\n  private _message = inject(IDEAMessageService);\n  private _loading = inject(IDEALoadingService);\n  private _translate = inject(IDEATranslationsService);\n  _calendars = inject(IDEACalendarsService);\n\n  /**\n   * The calendar to show.\n   */\n  @Input() calendar: Calendar;\n  /**\n   * Whether the component is disabled.\n   */\n  @Input() disabled: boolean;\n  /**\n   * Whether we want to enable advanced permissions (based on the memberships) on the calendar.\n   */\n  @Input() advancedPermissions: boolean;\n  /**\n   * Whether the calendar color is an important detail or it shouldn't be shown.\n   */\n  @Input() hideColor: boolean;\n  /**\n   * The URL to be used on the redirect calls.\n   */\n  @Input() baseURL: string;\n  /**\n   * Report to parent components a change.\n   */\n  @Output() somethingChanged = new EventEmitter<Calendar>();\n\n  async manageCalendar(): Promise<void> {\n    if (this.disabled) return;\n    const modal = await this._modal.create({\n      component: IDEACalendarComponent,\n      componentProps: {\n        calendar: this.calendar,\n        advancedPermissions: this.advancedPermissions,\n        hideColor: this.hideColor\n      }\n    });\n    modal.onDidDismiss().then(res => {\n      const cal = res.data;\n      if (cal === undefined) return;\n      else if (cal === null) this.calendar = null;\n      else this.calendar.load(cal);\n      this.somethingChanged.emit();\n    });\n    modal.present();\n  }\n\n  async linkExtCalendarOrDelete(): Promise<void> {\n    if (this.disabled) return;\n    try {\n      const cal = await this._calendars.chooseAndSetExternalCalendar(this.calendar);\n      if (!cal) throw new Error('NO_EXTERNAL_CALENDAR_CHOSEN');\n      this.calendar.load(cal);\n      this._message.success('IDEA_AGENDA.CALENDARS.CALENDAR_LINKED');\n      try {\n        await this._loading.show(this._translate._('IDEA_AGENDA.CALENDARS.FIRST_SYNC_MAY_TAKE_A_WHILE'));\n        await this._calendars.syncCalendar(this.calendar);\n        this._message.success('IDEA_AGENDA.CALENDARS.FIRST_SYNC_COMPLETED');\n      } catch (error) {\n        this._message.error('COMMON.OPERATION_FAILED');\n      } finally {\n        this._loading.hide();\n        this.somethingChanged.emit();\n      }\n    } catch (error) {\n      const doDelete = async (): Promise<void> => {\n        try {\n          await this._loading.show();\n          await this._calendars.deleteCalendar(this.calendar);\n          this._message.success('COMMON.OPERATION_COMPLETED');\n          this.somethingChanged.emit();\n        } catch (error) {\n          this._message.error('COMMON.OPERATION_FAILED');\n        } finally {\n          this._loading.hide();\n        }\n      };\n      const doLink = async (): Promise<void> => {\n        try {\n          await this._calendars.linkExtService(this.calendar, this.baseURL);\n          this.linkExtCalendarOrDelete();\n        } catch (error) {\n          this._message.error('COMMON.OPERATION_FAILED');\n        }\n      };\n      const header = this._translate._('IDEA_AGENDA.CALENDARS.CALENDAR_NOT_YET_LINKED');\n      const message = this._translate._('IDEA_AGENDA.CALENDARS.DO_YOU_WANT_PROCEED_LINKING_OR_DELETE');\n      const buttons = [\n        { text: this._translate._('COMMON.DELETE'), handler: doDelete },\n        { text: this._translate._('IDEA_AGENDA.CALENDARS.LINK'), handler: doLink }\n      ];\n      const alert = await this._alert.create({ header, message, buttons });\n      alert.present();\n    }\n  }\n}\n","@if (calendar) {\n  <ion-item\n    class=\"calendarItem\"\n    [button]=\"!disabled\"\n    [title]=\"'IDEA_AGENDA.CALENDARS.EDIT_CALENDAR' | translate\"\n    (click)=\"calendar.external && !calendar.external.calendarId ? linkExtCalendarOrDelete() : manageCalendar()\"\n  >\n    @if (!hideColor) {\n      <ion-avatar slot=\"start\" class=\"colorCircle\" [style.background-color]=\"calendar.color\" />\n    }\n    <ion-label>\n      {{ calendar.name }}\n      <p>\n        @if (calendar.external && !calendar.external.calendarId) {\n          <ion-text color=\"danger\">\n            {{ 'IDEA_AGENDA.CALENDARS.TAP_TO_CONFIGURE' | translate }}\n          </ion-text>\n        }\n        {{ calendar.description }}\n      </p>\n    </ion-label>\n    @if (calendar.external && !calendar.external.calendarId) {\n      <ion-icon\n        slot=\"end\"\n        color=\"danger\"\n        name=\"flash-off\"\n        [title]=\"'IDEA_AGENDA.CALENDARS.CALENDAR_NOT_YET_LINKED_HINT' | translate\"\n      />\n    }\n    @if (calendar.external?.service) {\n      <ion-icon\n        slot=\"end\"\n        [name]=\"_calendars.getServiceIcon(calendar.external.service)\"\n        [title]=\"\n          ('IDEA_AGENDA.CALENDARS.LINKED_TO' | translate) +\n          ' ' +\n          ('IDEA_AGENDA.CALENDARS.SERVICES.' + calendar.external.service | translate)\n        \"\n      />\n    }\n  </ion-item>\n}\n","import { Component, Input, OnInit, inject } from '@angular/core';\nimport { ModalController } from '@ionic/angular/standalone';\nimport { Calendar, ExternalCalendarInfo, ExternalCalendarSources, Membership, Team } from 'idea-toolbox';\nimport { IDEALoadingService, IDEAMessageService, IDEATranslationsService } from '@idea-ionic/common';\nimport { IDEATinCanService } from '@idea-ionic/uncommon';\n\nimport { IDEACalendarsService } from './calendars.service';\n\n@Component({\n  // eslint-disable-next-line\n  standalone: false,\n  selector: 'idea-calendar-creation',\n  templateUrl: 'calendarCreation.component.html',\n  styleUrls: ['calendarCreation.component.scss']\n})\nexport class IDEACalendarCreationComponent implements OnInit {\n  private _modal = inject(ModalController);\n  private _loading = inject(IDEALoadingService);\n  private _message = inject(IDEAMessageService);\n  private _translate = inject(IDEATranslationsService);\n  private _tc = inject(IDEATinCanService);\n  _calendars = inject(IDEACalendarsService);\n\n  /**\n   * Whether we want to allow the creation of only a particular type of calendar, based on the scope.\n   */\n  @Input() fixScope: CalendarScopes;\n  /**\n   * Whether we want to allow the creation of local calendars.\n   */\n  @Input() onlyExternalCalendars: boolean;\n  /**\n   * The URL to be used on the redirect calls.\n   */\n  @Input() baseURL: string;\n\n  team: Team;\n  membership: Membership;\n  calendar: Calendar;\n  DEFAULT_COLOR = '#555';\n  SOURCES = Object.keys(ExternalCalendarSources);\n\n  ngOnInit(): void {\n    this.calendar = new Calendar();\n    this.team = this._tc.get('team');\n    this.membership = this._tc.get('membership');\n    if (this.fixScope === CalendarScopes.SHARED) this.calendar.teamId = this.team.teamId;\n    if (this.fixScope === CalendarScopes.PRIVATE) this.calendar.userId = this.membership.userId;\n  }\n\n  resetScope(): void {\n    if (this.canChangeScope()) this.calendar.teamId = this.calendar.userId = null;\n  }\n  canChangeScope(): boolean {\n    return !this.fixScope && this.scopeIsSet();\n  }\n  scopeIsSet(): boolean {\n    return Boolean(this.calendar.userId) || Boolean(this.calendar.teamId);\n  }\n\n  async saveNewCalendar(service?: ExternalCalendarSources | string): Promise<void> {\n    if (!this.scopeIsSet()) return;\n    if (!service && this.onlyExternalCalendars) return;\n    if (service) {\n      this.calendar.external = new ExternalCalendarInfo({ service });\n      this.calendar.name = '-'; // it will be substituted with the external name\n    } else {\n      this.calendar.name = this.calendar.userId\n        ? this._translate._('IDEA_AGENDA.CALENDARS.DEFAULT_PERSONAL_CALENDAR_NAME')\n        : this._translate._('IDEA_AGENDA.CALENDARS.DEFAULT_TEAM_CALENDAR_NAME');\n      this.calendar.color = this.DEFAULT_COLOR;\n    }\n    try {\n      await this._loading.show();\n      const cal = await this._calendars.postCalendar(this.calendar);\n      this.calendar.load(cal);\n      this._message.success('IDEA_AGENDA.CALENDARS.CALENDAR_CREATED');\n      if (!cal.external) {\n        await this._modal.dismiss(this.calendar);\n        return;\n      }\n      try {\n        await this._loading.hide();\n        await this._calendars.linkExtService(this.calendar, this.baseURL);\n        const res = await this._calendars.chooseAndSetExternalCalendar(this.calendar);\n        if (!res) {\n          await this._modal.dismiss(this.calendar);\n          return;\n        }\n        this.calendar.load(res);\n        try {\n          await this._loading.show(this._translate._('IDEA_AGENDA.CALENDARS.FIRST_SYNC_MAY_TAKE_A_WHILE'));\n          await this._calendars.syncCalendar(this.calendar);\n          await this._message.success('IDEA_AGENDA.CALENDARS.FIRST_SYNC_COMPLETED');\n        } catch (error) {\n          await this._message.error('COMMON.OPERATION_FAILED');\n        } finally {\n          await this._modal.dismiss(this.calendar);\n        }\n      } catch (error) {\n        await this._message.error('COMMON.OPERATION_FAILED');\n        await this._modal.dismiss(this.calendar);\n      }\n    } catch (error) {\n      await this._message.error('COMMON.OPERATION_FAILED');\n    } finally {\n      await this._loading.hide();\n    }\n  }\n\n  close(): void {\n    this._modal.dismiss();\n  }\n}\n\n/**\n * The possible scopes of the calendar.\n */\nexport enum CalendarScopes {\n  SHARED = 'shared', // teamId\n  PRIVATE = 'private' // userId\n}\n","<ion-header>\n  <ion-toolbar color=\"ideaToolbar\">\n    <ion-buttons slot=\"start\">\n      @if (!canChangeScope()) {\n        <ion-button [title]=\"'COMMON.CLOSE' | translate\" (click)=\"close()\">\n          <ion-icon name=\"close\" slot=\"icon-only\" />\n        </ion-button>\n      }\n      @if (canChangeScope()) {\n        <ion-button (click)=\"resetScope()\">\n          <ion-icon name=\"arrow-back\" slot=\"icon-only\" />\n        </ion-button>\n      }\n    </ion-buttons>\n    <ion-title>\n      @if (!scopeIsSet()) {\n        <span>{{ 'IDEA_AGENDA.CALENDARS.ADD_A_CALENDAR' | translate }}</span>\n      }\n      @if (calendar.userId) {\n        <span>{{ 'IDEA_AGENDA.CALENDARS.PERSONAL_CALENDAR' | translate }}</span>\n      }\n      @if (calendar.teamId) {\n        <span>\n          {{ 'IDEA_AGENDA.CALENDARS.TEAM_CALENDAR' | translate: { team: team.name } }}\n        </span>\n      }\n    </ion-title>\n  </ion-toolbar>\n</ion-header>\n<ion-content>\n  <!-- 1st STEP -->\n  @if (!scopeIsSet()) {\n    <ion-grid class=\"ion-padding choiceGrid\">\n      <ion-row>\n        <ion-col class=\"ion-text-center\">\n          <h1>{{ 'IDEA_AGENDA.CALENDARS.CREATE_PRIVATE_OR_TEAM' | translate }}</h1>\n        </ion-col>\n      </ion-row>\n      <ion-row class=\"ion-align-items-center\">\n        <ion-col class=\"ion-text-center\" [size]=\"12\" [sizeSm]=\"6\">\n          <ion-card [button]=\"true\" (click)=\"calendar.userId = membership.userId\">\n            <ion-card-header>\n              <ion-card-title>\n                <ion-icon name=\"person\" />\n              </ion-card-title>\n            </ion-card-header>\n            <ion-card-content>\n              <h1>{{ 'IDEA_AGENDA.CALENDARS.PERSONAL_CALENDAR' | translate }}</h1>\n              <p>{{ 'IDEA_AGENDA.CALENDARS.PERSONAL_CALENDAR_HINT' | translate }}</p>\n            </ion-card-content>\n          </ion-card>\n        </ion-col>\n        <ion-col class=\"ion-text-center\" [size]=\"12\" [sizeSm]=\"6\">\n          <ion-card [button]=\"true\" (click)=\"calendar.teamId = membership.teamId\">\n            <ion-card-header>\n              <ion-card-title>\n                <ion-icon name=\"people\" />\n              </ion-card-title>\n            </ion-card-header>\n            <ion-card-content>\n              <h1>{{ 'IDEA_AGENDA.CALENDARS.TEAM_CALENDAR' | translate }}</h1>\n              <p>{{ 'IDEA_AGENDA.CALENDARS.TEAM_CALENDAR_HINT' | translate }}</p>\n            </ion-card-content>\n          </ion-card>\n        </ion-col>\n      </ion-row>\n    </ion-grid>\n  }\n  <!-- 2nd STEP -->\n  @if (scopeIsSet()) {\n    <ion-grid class=\"ion-padding choiceGrid\">\n      <ion-row>\n        <ion-col class=\"ion-text-center\">\n          <h1>{{ 'IDEA_AGENDA.CALENDARS.WHICH_EXTERNAL_SERVICE_TO_LINK' | translate }}</h1>\n          <p>{{ 'IDEA_AGENDA.CALENDARS.WHICH_EXTERNAL_SERVICE_TO_LINK_HINT' | translate }}</p>\n        </ion-col>\n      </ion-row>\n      <ion-row class=\"ion-align-items-center\">\n        @if (!onlyExternalCalendars) {\n          <ion-col class=\"ion-text-center\" [size]=\"12\">\n            <ion-card class=\"step2\" [button]=\"true\" (click)=\"saveNewCalendar()\">\n              <ion-card-header>\n                <ion-card-title>\n                  <ion-icon name=\"remove\" />\n                </ion-card-title>\n              </ion-card-header>\n              <ion-card-content>\n                <h1>{{ 'IDEA_AGENDA.CALENDARS.DONT_LINK' | translate }}</h1>\n                <p>{{ 'IDEA_AGENDA.CALENDARS.DONT_LINK_HINT' | translate }}</p>\n              </ion-card-content>\n            </ion-card>\n          </ion-col>\n        }\n        @for (s of SOURCES; track s) {\n          <ion-col class=\"ion-text-center\" [size]=\"12\">\n            <ion-card class=\"step2\" [button]=\"true\" (click)=\"saveNewCalendar(s)\">\n              <ion-card-header>\n                <ion-card-title>\n                  <ion-icon [name]=\"_calendars.getServiceIcon(s)\" />\n                </ion-card-title>\n              </ion-card-header>\n              <ion-card-content>\n                <h1>\n                  {{ 'IDEA_AGENDA.CALENDARS.LINK_TO' | translate }}\n                  {{ 'IDEA_AGENDA.CALENDARS.SERVICES.' + s | translate }}\n                </h1>\n                <p>{{ 'IDEA_AGENDA.CALENDARS.LINK_TO_HINT' | translate }}</p>\n              </ion-card-content>\n            </ion-card>\n          </ion-col>\n        }\n      </ion-row>\n    </ion-grid>\n  }\n</ion-content>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { IonicModule } from '@ionic/angular';\n\nimport { CalendarDateFormatter, CalendarModule, DateAdapter } from 'angular-calendar';\nimport { adapterFactory } from 'angular-calendar/date-adapters/date-fns';\nimport { CustomDateFormatter } from './dateFormatter.provider';\n\nimport { IDEACheckerComponent, IDEATranslationsModule, IDEAUserAvatarComponent } from '@idea-ionic/common';\nimport { IDEAColorPickerComponent } from '@idea-ionic/uncommon';\n\nimport { IDEAAgendaComponent } from './agenda.component';\nimport { IDEACalendarComponent } from './calendar.component';\nimport { IDEACalendarItemComponent } from './calendarItem.component';\nimport { IDEACalendarCreationComponent } from './calendarCreation.component';\n\nimport { IDEACalendarsService } from './calendars.service';\n\n@NgModule({\n  imports: [\n    CommonModule,\n    FormsModule,\n    IonicModule,\n    IDEATranslationsModule,\n    IDEAColorPickerComponent,\n    IDEACheckerComponent,\n    IDEAUserAvatarComponent,\n    CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory })\n  ],\n  declarations: [IDEAAgendaComponent, IDEACalendarComponent, IDEACalendarItemComponent, IDEACalendarCreationComponent],\n  exports: [IDEAAgendaComponent, IDEACalendarComponent, IDEACalendarItemComponent, IDEACalendarCreationComponent],\n  providers: [{ provide: CalendarDateFormatter, useClass: CustomDateFormatter }, IDEACalendarsService]\n})\nexport class IDEAAgendaModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i3","i4","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAKM,MAAO,mBAAoB,SAAQ,qBAAqB,CAAA;AAD9D,IAAA,WAAA,GAA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