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":"daytool_event.js","sourcesContent":["import { calculateNumberOfOccurrences, formatDate, setSelectedOptionByValue } from \"../../helpers.js\";\r\nimport { timeslots } from \"../daytool_clock.js\";\r\nimport { daytool_entity, daytool_event } from \"../daytool_entity.js\";\r\nimport { DAYTOOL_ENTITY_TYPE } from \"../daytool_nav.js\";\r\nimport { datetime, RRule, RRuleSet, rrulestr } from 'rrule';\r\n\r\n\r\nexport class daytool_event_settings_ui {\r\n mode: string; // Allowed values: \"Events\" [allows date and time input], \"Timing\" [only allows time input]\r\n // READ ONLY\r\n DOM__event_title:HTMLElement;\r\n\r\n // Connected to libraries - See scripts.js\r\n DOM__event_start_date:HTMLInputElement; // DATERANGEPICKER\r\n DOM__event_end_date:HTMLInputElement; // DATERANGEPICKER\r\n // HIDDEN\r\n DOM__event_start_date_text:HTMLInputElement; // Interacts with DATERANGEPICKER DOM__event_start_date\r\n DOM__event_end_date_text:HTMLInputElement; // Interacts with DATERANGEPICKER DOM__event_end_date\r\n\r\n // INTERACTIONS\r\n DOM__all_day_check:HTMLInputElement; // DISABLES TIME INPUTS\r\n DOM__recurrence_check:HTMLInputElement; // OPENS REPETITION SECTION\r\n DOM__recurrence_start_check:HTMLInputElement; // OPENS RECURRENCE END SECTION\r\n DOM__recurrence_end_check:HTMLInputElement; // OPENS RECURRENCE END SECTION\r\n\r\n // VALUE INPUTS\r\n DOM__event_start_time_hour:HTMLSelectElement;\r\n DOM__event_start_time_minute:HTMLSelectElement;\r\n DOM__event_start_time_ampm:HTMLSelectElement;\r\n DOM__event_end_time_hour:HTMLSelectElement;\r\n DOM__event_end_time_minute:HTMLSelectElement;\r\n DOM__event_end_time_ampm:HTMLSelectElement;\r\n\r\n\r\n // CONDITIONAL: Weekly Repetition Only\r\n DOM__week_pattern__monday:HTMLInputElement;\r\n DOM__week_pattern__tuesday:HTMLInputElement;\r\n DOM__week_pattern__wednesday:HTMLInputElement;\r\n DOM__week_pattern__thursday:HTMLInputElement;\r\n DOM__week_pattern__friday:HTMLInputElement;\r\n DOM__week_pattern__saturday:HTMLInputElement;\r\n DOM__week_pattern__sunday:HTMLInputElement;\r\n\r\n // CONDITIONAL: Recurrence ONLY\r\n // Recurrence pattern\r\n DOM__repetition_period_count:HTMLInputElement;\r\n DOM__repetition_period:HTMLSelectElement;\r\n // Recurrence end\r\n DOM__recurrence_end_date_text:HTMLInputElement;\r\n DOM__recurrence_end_date:HTMLInputElement;\r\n DOM__recurrence_end_repetition_number:HTMLInputElement;\r\n\r\n current_item: daytool_event[] = [];\r\n\r\n constructor (mode:string) {\r\n this.mode = mode; // Allowed values: \"Events\" [allows date and time input], \"Timing\" [only allows time input]\r\n\r\n // READ ONLY\r\n this.DOM__event_title = document.querySelector('#event_settings #event_title');\r\n\r\n\r\n // Connected to libraries - See scripts.js\r\n this.DOM__event_start_date = document.querySelector('#event_settings #event_start_date'); // DATERANGEPICKER\r\n this.DOM__event_start_date_text = document.querySelector('#event_settings #event_start_date_text'); // Interacts with DATERANGEPICKER DOM__event_dates\r\n this.DOM__event_end_date = document.querySelector('#event_settings #event_end_date'); // DATERANGEPICKER\r\n this.DOM__event_end_date_text = document.querySelector('#event_settings #event_end_date_text'); // Interacts with DATERANGEPICKER DOM__event_dates\r\n\r\n // INTERACTIONS\r\n this.DOM__all_day_check = document.querySelector('#event_settings #all_day_check');\r\n this.DOM__recurrence_check = document.querySelector('#event_settings #recurrence_check');\r\n this.DOM__recurrence_start_check = document.querySelector('#event_settings #recurrence_start_check');\r\n this.DOM__recurrence_end_check = document.querySelector('#event_settings #recurrence_end_check');\r\n\r\n // VALUE INPUTS\r\n this.DOM__event_start_time_hour = document.querySelector('#event_settings #event_start_time_hour');\r\n this.DOM__event_start_time_minute = document.querySelector('#event_settings #event_start_time_minute');\r\n this.DOM__event_start_time_ampm = document.querySelector('#event_settings #event_start_time_ampm');\r\n this.DOM__event_end_time_hour = document.querySelector('#event_settings #event_end_time_hour');\r\n this.DOM__event_end_time_minute = document.querySelector('#event_settings #event_end_time_minute');\r\n this.DOM__event_end_time_ampm = document.querySelector('#event_settings #event_end_time_ampm');\r\n\r\n\r\n\r\n // CONDITIONAL: Weekly Repetition Only\r\n this.DOM__week_pattern__monday = document.querySelector('#event_settings #week_pattern__monday');\r\n this.DOM__week_pattern__tuesday = document.querySelector('#event_settings #week_pattern__tuesday');\r\n this.DOM__week_pattern__wednesday = document.querySelector('#event_settings #week_pattern__wednesday');\r\n this.DOM__week_pattern__thursday = document.querySelector('#event_settings #week_pattern__thursday');\r\n this.DOM__week_pattern__friday = document.querySelector('#event_settings #week_pattern__friday');\r\n this.DOM__week_pattern__saturday = document.querySelector('#event_settings #week_pattern__saturday');\r\n this.DOM__week_pattern__sunday = document.querySelector('#event_settings #week_pattern__sunday');\r\n\r\n // CONDITIONAL: Recurrence ONLY\r\n // Recurrence pattern\r\n this.DOM__repetition_period_count = document.querySelector('#event_settings #repetition_period_count');\r\n this.DOM__repetition_period = document.querySelector('#event_settings #repetition_period');\r\n // Recurrence end\r\n this.DOM__recurrence_end_date_text = document.querySelector('#event_settings #recurrence_end_date_text');\r\n this.DOM__recurrence_end_date = document.querySelector('#event_settings #recurrence_end_date');\r\n this.DOM__recurrence_end_repetition_number = document.querySelector('#event_settings #recurrence_end_repetition_number');\r\n\r\n // if (mode == \"Events\") {\r\n // this.DOM__event_dates.classList.remove('d-none');\r\n // } else if (mode == \"Timing\") {\r\n // this.DOM__event_dates.classList.add('d-none');\r\n // }\r\n }\r\n\r\n setupFormForGivenEvent(event: daytool_event) {\r\n this.current_item.pop();\r\n this.current_item.push(event);\r\n // Change Title\r\n this.DOM__event_title.innerHTML = `${event.title.at(-1)}`;\r\n\r\n // Set if all day\r\n if (event.all_day) {\r\n this.DOM__all_day_check.click();\r\n } else {\r\n this.DOM__all_day_check.checked = false;\r\n var startTime_inputs = this.DOM__event_start_time_hour.closest('.pill_container');\r\n startTime_inputs.classList.remove('d-none');\r\n var endTime_inputs = this.DOM__event_end_time_hour.closest('.pill_container');\r\n endTime_inputs.classList.remove('d-none');\r\n }\r\n\r\n // Plug in current timing values\r\n\r\n // Date values\r\n\r\n\r\n var startTime = new Date(event.timing.start.at(-1).dateTime);\r\n var endTime = new Date(event.timing.end.at(-1).dateTime);\r\n\r\n this.DOM__event_start_date_text.value = startTime.toISOString().split('T')[0];\r\n this.DOM__event_end_date_text.value = endTime.toISOString().split('T')[0];\r\n\r\n // Get the hour in 24-hour format\r\n let startHours = startTime.getHours();\r\n let startMinutes = startTime.getMinutes();\r\n let startAMPM = startHours >= 12 ? 'PM' : 'AM';\r\n\r\n // Convert to 12-hour format\r\n startHours = startHours % 12;\r\n startHours = startHours ? startHours : 12; // The hour '0' should be '12'\r\n\r\n // Format minutes to always have two digits\r\n var formatted_startMinutes = startMinutes < 10 ? '0' + startMinutes : startMinutes;\r\n\r\n // Hour values\r\n setSelectedOptionByValue(this.DOM__event_start_time_hour.id, startHours);\r\n setSelectedOptionByValue(this.DOM__event_start_time_minute.id, formatted_startMinutes);\r\n setSelectedOptionByValue(this.DOM__event_start_time_ampm.id, startAMPM);\r\n\r\n // Get the hour in 24-hour format\r\n let endHours = endTime.getHours();\r\n let endMinutes = endTime.getMinutes();\r\n let endAMPM = endHours >= 12 ? 'PM' : 'AM';\r\n\r\n // Convert to 12-hour format\r\n endHours = endHours % 12;\r\n endHours = endHours ? endHours : 12; // The hour '0' should be '12'\r\n\r\n // Format minutes to always have two digits\r\n var formatted_endMinutes = endMinutes < 10 ? '0' + endMinutes : endMinutes;\r\n\r\n // Hour values\r\n setSelectedOptionByValue(this.DOM__event_end_time_hour.id, endHours);\r\n setSelectedOptionByValue(this.DOM__event_end_time_minute.id, formatted_endMinutes);\r\n setSelectedOptionByValue(this.DOM__event_end_time_ampm.id, endAMPM);\r\n\r\n // RECURRENCE-\r\n\r\n if (event.recurring) {\r\n this.DOM__recurrence_check.checked = event.recurring;\r\n } else {\r\n this.DOM__recurrence_check.checked = false;\r\n\r\n }\r\n\r\n if (!(event.recurrence.recurrence_range.startDate.getDate() == new Date(event.timing.start.at(-1).dateTime).getDate() &&\r\n event.recurrence.recurrence_range.startDate.getMonth() == new Date(event.timing.start.at(-1).dateTime).getMonth() &&\r\n event.recurrence.recurrence_range.startDate.getFullYear() == new Date(event.timing.start.at(-1).dateTime).getFullYear())) {\r\n this.DOM__recurrence_start_check.click();\r\n }\r\n\r\n if (event.recurrence_ends) {\r\n this.DOM__recurrence_end_check.click();\r\n this.DOM__recurrence_end_repetition_number.value = calculateNumberOfOccurrences(event.recurrence.recurrence_pattern, event.recurrence.recurrence_range);\r\n\r\n } else {\r\n this.DOM__recurrence_end_check.checked = false;\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n saveFormForGivenEvent(event: daytool_event) {\r\n\r\n }\r\n}\r\n\r\nexport const DAYTOOL__EVENT_SETTINGS_FORM_UI = new daytool_event_settings_ui(\"Events\");\r\n\r\nexport interface google_event {\r\n kind: \"calendar#event\";\r\n etag: any;\r\n id: string;\r\n status: string;\r\n htmlLink: string;\r\n created: string;\r\n updated: string;\r\n summary: string;\r\n description: string;\r\n location: string;\r\n colorId: string;\r\n creator: {\r\n id: string;\r\n email: string;\r\n displayName: string;\r\n self: boolean;\r\n };\r\n organizer: {\r\n id: string;\r\n name: string;\r\n email: string;\r\n displayName: string;\r\n self: boolean;\r\n };\r\n start: DateTimeTimeZone;\r\n end: DateTimeTimeZone;\r\n endTimeUnspecified: boolean;\r\n recurrence: [string];\r\n recurringEventId: string;\r\n originalStartTime: DateTimeTimeZone;\r\n transparency: string;\r\n visibility: string;\r\n iCalUID: string;\r\n sequence: number;\r\n attendees: [\r\n {\r\n id: string;\r\n email: string;\r\n displayName: string;\r\n organizer: boolean;\r\n self: boolean;\r\n resource: boolean;\r\n optional: boolean;\r\n responseStatus: string;\r\n comment: string;\r\n additionalGuests: number;\r\n }\r\n ];\r\n attendeesOmitted: boolean;\r\n extendedProperties: {\r\n private: {\r\n (key: any): string;\r\n };\r\n shared: {\r\n (key: any): string;\r\n };\r\n };\r\n hangoutLink: string;\r\n conferenceData: {\r\n createRequest: {\r\n requestId: string;\r\n conferenceSolutionKey: {\r\n type: string;\r\n };\r\n status: {\r\n statusCode: string;\r\n };\r\n };\r\n entryPoints: [\r\n {\r\n entryPointType: string;\r\n uri: string;\r\n label: string;\r\n pin: string;\r\n accessCode: string;\r\n meetingCode: string;\r\n passcode: string;\r\n password: string;\r\n }\r\n ];\r\n conferenceSolution: {\r\n key: {\r\n type: string;\r\n };\r\n name: string;\r\n iconUri: string;\r\n };\r\n conferenceId: string;\r\n signature: string;\r\n notes: string;\r\n };\r\n gadget: {\r\n type: string;\r\n title: string;\r\n link: string;\r\n iconLink: string;\r\n width: number;\r\n height: number;\r\n display: string;\r\n preferences: {\r\n (key): string;\r\n };\r\n };\r\n anyoneCanAddSelf: boolean;\r\n guestsCanInviteOthers: boolean;\r\n guestsCanModify: boolean;\r\n guestsCanSeeOtherGuests: boolean;\r\n privateCopy: boolean;\r\n locked: boolean;\r\n reminders: {\r\n useDefault: boolean;\r\n overrides: [\r\n {\r\n method: string;\r\n minutes: number;\r\n }\r\n ];\r\n };\r\n source: {\r\n url: string;\r\n title: string;\r\n };\r\n workingLocationProperties: {\r\n type: string;\r\n homeOffice: any;\r\n customLocation: {\r\n label: string;\r\n };\r\n officeLocation: {\r\n buildingId: string;\r\n floorId: string;\r\n floorSectionId: string;\r\n deskId: string;\r\n label: string;\r\n };\r\n };\r\n outOfOfficeProperties: {\r\n autoDeclineMode: string;\r\n declineMessage: string;\r\n };\r\n focusTimeProperties: {\r\n autoDeclineMode: string;\r\n declineMessage: string;\r\n chatStatus: string;\r\n };\r\n attachments: [\r\n {\r\n fileUrl: string;\r\n title: string;\r\n mimeType: string;\r\n iconLink: string;\r\n fileId: string;\r\n }\r\n ];\r\n eventType: string;\r\n}\r\n\r\ninterface Attendee {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface ItemBody {\r\n \"@odata.type\": string;\r\n}\r\n\r\nexport interface DateTimeTimeZone {\r\n date: string;\r\n dateTime: string;\r\n timeZone: string;\r\n}\r\n\r\ninterface Location {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface OnlineMeetingInfo {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface Recipient {\r\n emailAddress: {\r\n name: string;\r\n address: string;\r\n };\r\n}\r\n\r\ninterface PatternedRecurrence {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface ResponseStatus {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface Attachment {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface Calendar {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface Extension {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface Event {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface SingleValueLegacyExtendedProperty {\r\n \"@odata.type\": string;\r\n}\r\n\r\ninterface MultiValueLegacyExtendedProperty {\r\n \"@odata.type\": string;\r\n}\r\n\r\nexport interface microsoft_event {\r\n allowNewTimeProposals: boolean;\r\n attendees: Attendee[];\r\n body: ItemBody;\r\n bodyPreview: string;\r\n categories: string[];\r\n changeKey: string;\r\n createdDateTime: string; // timestamp\r\n end: DateTimeTimeZone;\r\n hasAttachments: boolean;\r\n hideAttendees: boolean;\r\n id: string; // identifier\r\n importance: string;\r\n isAllDay: boolean;\r\n isCancelled: boolean;\r\n isDraft: boolean;\r\n isOnlineMeeting: boolean;\r\n isOrganizer: boolean;\r\n isReminderOn: boolean;\r\n lastModifiedDateTime: string; // timestamp\r\n location: Location;\r\n locations: Location[];\r\n onlineMeeting: OnlineMeetingInfo;\r\n onlineMeetingProvider: string;\r\n onlineMeetingUrl: string;\r\n organizer: Recipient;\r\n originalEndTimeZone: string;\r\n originalStart: string; // timestamp\r\n originalStartTimeZone: string;\r\n recurrence: PatternedRecurrence;\r\n reminderMinutesBeforeStart: number;\r\n responseRequested: boolean;\r\n responseStatus: ResponseStatus;\r\n sensitivity: string;\r\n seriesMasterId: string;\r\n showAs: string;\r\n start: DateTimeTimeZone;\r\n subject: string;\r\n type: string;\r\n webLink: string;\r\n\r\n attachments: Attachment[];\r\n calendar: Calendar;\r\n extensions: Extension[];\r\n instances: Event[];\r\n singleValueExtendedProperties: SingleValueLegacyExtendedProperty[];\r\n multiValueExtendedProperties: MultiValueLegacyExtendedProperty[];\r\n}\r\n\r\nexport enum MICROSOFT_RECURRENCE_PATTERN_TYPE {\r\n daily = \"daily\",\r\n weekly = \"weekly\",\r\n absoluteMonthly = \"absoluteMonthly\",\r\n relativeMonthly = \"relativeMonthly\",\r\n absoluteYearly = \"absoluteYearly\",\r\n relativeYearly = \"relativeYearly\",\r\n}\r\nexport enum MICROSOFT_RECURRENCE_RANGE_TYPE {\r\n endDate = \"endDate\",\r\n noEnd = \"noEnd\",\r\n numbered = \"numbered\",\r\n}\r\n\r\nexport enum DAYTOOL_PERIOD_UNITS {\r\n Daily = \"Daily\",\r\n Weekly = \"Weekly\",\r\n BiWeekly = \"Bi-Weekly\",\r\n Monthly = \"Monthly\",\r\n Yearly = \"Yearly\",\r\n}\r\n"]}