@nylas/web-elements 2.5.13 → 2.5.15

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.
Files changed (54) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +12 -19
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1 -1
  3. package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +13 -13
  4. package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js.map +1 -1
  5. package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
  6. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  7. package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
  8. package/dist/cjs/{version-BspChjso.js → version-1ZdVKLpt.js} +3 -3
  9. package/dist/cjs/{version-BspChjso.js.map → version-1ZdVKLpt.js.map} +1 -1
  10. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +9 -10
  11. package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
  12. package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js +4 -3
  13. package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js.map +1 -1
  14. package/dist/collection/version.js +1 -1
  15. package/dist/collection/version.js.map +1 -1
  16. package/dist/components/nylas-editor-tabs-group.js +1 -1
  17. package/dist/components/nylas-editor-tabs.js +1 -1
  18. package/dist/components/nylas-participants-custom-availability.js +1 -1
  19. package/dist/components/nylas-scheduler-editor.js +5 -5
  20. package/dist/components/nylas-scheduling.js +1 -1
  21. package/dist/components/nylas-specific-time-availability-picker.js +1 -1
  22. package/dist/components/{p-KPbwxUCV.js → p-Bi06RVaz.js} +3 -3
  23. package/dist/components/{p-KPbwxUCV.js.map → p-Bi06RVaz.js.map} +1 -1
  24. package/dist/components/{p-Czoh6-K4.js → p-DW9sxBeM.js} +6 -5
  25. package/dist/components/p-DW9sxBeM.js.map +1 -0
  26. package/dist/components/{p-Csux9e4C.js → p-Di0G82W0.js} +5 -5
  27. package/dist/components/{p-Csux9e4C.js.map → p-Di0G82W0.js.map} +1 -1
  28. package/dist/components/{p-BDVZl2EG.js → p-p9sl0FFV.js} +3 -3
  29. package/dist/components/{p-BDVZl2EG.js.map → p-p9sl0FFV.js.map} +1 -1
  30. package/dist/components/{p-B6bT8J6p.js → p-tx39yUB3.js} +12 -13
  31. package/dist/components/p-tx39yUB3.js.map +1 -0
  32. package/dist/esm/calendar-agenda-fill-icon_39.entry.js +13 -13
  33. package/dist/esm/calendar-agenda-fill-icon_39.entry.js.map +1 -1
  34. package/dist/esm/google-logo-icon_6.entry.js +1 -1
  35. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  36. package/dist/esm/nylas-scheduling.entry.js +1 -1
  37. package/dist/esm/{version-xO_cryq5.js → version-CEtdwas_.js} +3 -3
  38. package/dist/esm/{version-xO_cryq5.js.map → version-CEtdwas_.js.map} +1 -1
  39. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  40. package/dist/nylas-web-elements/{p-ca824e25.entry.js → p-28182324.entry.js} +2 -2
  41. package/dist/nylas-web-elements/{p-ccc9d9d2.entry.js → p-72e72392.entry.js} +2 -2
  42. package/dist/nylas-web-elements/p-72e72392.entry.js.map +1 -0
  43. package/dist/nylas-web-elements/{p-e0de5436.entry.js → p-74747365.entry.js} +2 -2
  44. package/dist/nylas-web-elements/{p-0716662b.entry.js → p-9a42cebd.entry.js} +2 -2
  45. package/dist/nylas-web-elements/{p-xO_cryq5.js → p-CEtdwas_.js} +2 -2
  46. package/dist/nylas-web-elements/{p-xO_cryq5.js.map → p-CEtdwas_.js.map} +1 -1
  47. package/dist/types/version.d.ts +1 -1
  48. package/package.json +1 -1
  49. package/dist/components/p-B6bT8J6p.js.map +0 -1
  50. package/dist/components/p-Czoh6-K4.js.map +0 -1
  51. package/dist/nylas-web-elements/p-ccc9d9d2.entry.js.map +0 -1
  52. /package/dist/nylas-web-elements/{p-ca824e25.entry.js.map → p-28182324.entry.js.map} +0 -0
  53. /package/dist/nylas-web-elements/{p-e0de5436.entry.js.map → p-74747365.entry.js.map} +0 -0
  54. /package/dist/nylas-web-elements/{p-0716662b.entry.js.map → p-9a42cebd.entry.js.map} +0 -0
@@ -3,7 +3,7 @@
3
3
  var index = require('./index-9TuL48qE.js');
4
4
  var registerComponent = require('./register-component-DjG8kzjz.js');
5
5
  var utils = require('./utils-BDriE9YY.js');
6
- var version = require('./version-BspChjso.js');
6
+ var version = require('./version-1ZdVKLpt.js');
7
7
  var feedbackSync = require('./feedbackSync-Bcx7mZ9-.js');
8
8
 
9
9
  const iconCss$1 = ".sc-google-logo-icon-h{display:flex}";
@@ -4,7 +4,7 @@ var index$1 = require('./index-9TuL48qE.js');
4
4
  var abstractProvider = require('./abstract-provider-EX4lu0u8.js');
5
5
  var nylasApiRequest = require('./nylas-api-request-8qsFHWUt.js');
6
6
  var utils = require('./utils-BDriE9YY.js');
7
- var version = require('./version-BspChjso.js');
7
+ var version = require('./version-1ZdVKLpt.js');
8
8
  var index = require('./index-CwlXqyvH.js');
9
9
 
10
10
  utils.dayjs.extend(utils.utc);
@@ -3,7 +3,7 @@
3
3
  var index$1 = require('./index-9TuL48qE.js');
4
4
  var abstractProvider = require('./abstract-provider-EX4lu0u8.js');
5
5
  var utils = require('./utils-BDriE9YY.js');
6
- var version = require('./version-BspChjso.js');
6
+ var version = require('./version-1ZdVKLpt.js');
7
7
  var index = require('./index-CwlXqyvH.js');
8
8
  var feedbackSync = require('./feedbackSync-Bcx7mZ9-.js');
9
9
 
@@ -30,11 +30,11 @@ var ComponentErrorType;
30
30
  ComponentErrorType["no_config_id"] = "no_config_id";
31
31
  })(ComponentErrorType || (ComponentErrorType = {}));
32
32
 
33
- const version = '2.5.13';
33
+ const version = '2.5.15';
34
34
 
35
35
  exports.o = o;
36
36
  exports.u = u;
37
37
  exports.version = version;
38
- //# sourceMappingURL=version-BspChjso.js.map
38
+ //# sourceMappingURL=version-1ZdVKLpt.js.map
39
39
 
40
- //# sourceMappingURL=version-BspChjso.js.map
40
+ //# sourceMappingURL=version-1ZdVKLpt.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version-BspChjso.js","sources":["../nylas-js-core/dist/index.es.js","src/types/index.ts","src/version.ts"],"sourcesContent":["var t = Object.defineProperty;\nvar c = (r, n, s) => n in r ? t(r, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[n] = s;\nvar a = (r, n, s) => (c(r, typeof n != \"symbol\" ? n + \"\" : n, s), s);\nvar u = /* @__PURE__ */ ((r) => (r.Error = \"error\", r.Warning = \"warning\", r.Info = \"info\", r.Success = \"success\", r))(u || {});\nconst e = (r) => r !== null && typeof r == \"object\" && \"data\" in r, o = (r) => r !== null && typeof r == \"object\" && \"error\" in r;\nclass E extends Error {\n constructor(s) {\n super(s == null ? void 0 : s.message);\n a(this, \"apiError\");\n this.name = \"NylasAPIError\", this.stack = new Error().stack, this.apiError = s;\n }\n}\nexport {\n u as NotificationType,\n E as NylasAPIError,\n o as isNylasErrorResponse,\n e as isNylasSuccessResponse\n};\n","export interface NylasResponse<Data = any> {\n request_id: string;\n data?: Data;\n error?: {\n message: string;\n type: string;\n };\n}\n\n// Avaliability\nexport interface OpenHours {\n days: number[];\n exDates: string[];\n timezone: string;\n start: string;\n end: string;\n}\n\nexport interface SpecificTimeAvailability {\n date: string;\n start: string;\n end: string;\n}\n\nexport interface MeetingBuffer {\n before: number;\n after: number;\n}\n\n// Scheduling\nexport interface UpdateConfiguration extends Omit<Configuration, 'id'> {}\n\nexport interface ParticipantAvailability {\n calendar_ids: string[];\n open_hours?: OpenHours[];\n}\n\nexport type NylasSchedulerBookingParticipant = { name: string; email: string; nameReadOnly?: boolean; emailReadOnly?: boolean };\n\nexport type NylasSchedulerBookingData = {\n primaryParticipant: NylasSchedulerBookingParticipant;\n startTime?: Date;\n endTime?: Date;\n timezone?: string;\n language?: string;\n guests?: NylasSchedulerBookingParticipant[];\n additionalFields?: Record<\n string,\n {\n value: string;\n type?: string;\n readOnly?: boolean;\n }\n >;\n};\n\nexport type OpenHour = {\n days: number[]; // [1, 2, 3, 4, 5]\n start: string; // \"09:00\"\n end: string; // \"17:00\"\n timezone: string; // \"America/Los_Angeles\"\n};\n\nexport type Timeslot = {\n start_time: Date;\n end_time: Date;\n emails?: string[];\n capacity?: number;\n event_id?: string;\n master_id?: string;\n calendar_id?: string;\n};\n\nexport type ThemeConfig = Partial<{\n '--nylas-primary': string;\n '--nylas-info': string;\n '--nylas-success': string;\n '--nylas-warning': string;\n '--nylas-error': string;\n '--nylas-error-pressed': string;\n '--nylas-base-0': string;\n '--nylas-base-25': string;\n '--nylas-base-50': string;\n '--nylas-base-100': string;\n '--nylas-base-200': string;\n '--nylas-base-300': string;\n '--nylas-base-400': string;\n '--nylas-base-500': string;\n '--nylas-base-600': string;\n '--nylas-base-700': string;\n '--nylas-base-800': string;\n '--nylas-base-900': string;\n '--nylas-base-950': string;\n '--nylas-color-blue-50': string;\n '--nylas-color-blue-100': string;\n '--nylas-color-blue-300': string;\n '--nylas-color-blue-500': string;\n '--nylas-color-blue-700': string;\n '--nylas-color-blue-900': string;\n '--nylas-color-red-50': string;\n '--nylas-color-red-100': string;\n '--nylas-color-red-300': string;\n '--nylas-color-red-500': string;\n '--nylas-color-red-700': string;\n '--nylas-color-red-900': string;\n '--nylas-color-green-50': string;\n '--nylas-color-green-100': string;\n '--nylas-color-green-300': string;\n '--nylas-color-green-500': string;\n '--nylas-color-green-700': string;\n '--nylas-color-green-900': string;\n '--nylas-color-yellow-50': string;\n '--nylas-color-yellow-100': string;\n '--nylas-color-yellow-300': string;\n '--nylas-color-yellow-500': string;\n '--nylas-color-yellow-700': string;\n '--nylas-color-yellow-900': string;\n '--nylas-color-purple-50': string;\n '--nylas-color-purple-100': string;\n '--nylas-color-purple-300': string;\n '--nylas-color-purple-500': string;\n '--nylas-color-purple-700': string;\n '--nylas-color-purple-900': string;\n '--nylas-color-sky-50': string;\n '--nylas-color-sky-100': string;\n '--nylas-color-sky-300': string;\n '--nylas-color-sky-500': string;\n '--nylas-color-sky-700': string;\n '--nylas-color-sky-900': string;\n '--nylas-color-black': string;\n '--nylas-color-grey-900': string;\n '--nylas-color-grey-800': string;\n '--nylas-color-grey-700': string;\n '--nylas-color-grey-600': string;\n '--nylas-color-grey-500': string;\n '--nylas-color-grey-400': string;\n '--nylas-color-grey-300': string;\n '--nylas-color-grey-200': string;\n '--nylas-color-grey-100': string;\n '--nylas-color-grey-50': string;\n '--nylas-color-white': string;\n '--nylas-font-family': string;\n '--nylas-font-size': string;\n '--nylas-border-radius': string;\n '--nylas-border-radius-2x': string;\n '--nylas-border-radius-3x': string;\n}>;\n\nexport enum NotificationType {\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n Success = 'success',\n}\n\nexport type Notification = {\n id: string;\n type: NotificationType;\n title: string;\n code?: number;\n category: string;\n description?: string;\n ttl?: number | 'none';\n};\n\nexport type BookingType = 'booking' | 'organizer-confirmation' | 'custom-confirmation';\n\nexport type AvailabilityMethod = 'max-fairness' | 'max-availability' | 'collective';\n\nexport type ConferenceProvider = 'GoogleMeetConferenceProvider' | 'MicrosoftTeamsConferenceProvider' | 'ZoomConferenceProvider' | 'OnlineMeetingProviderMicrosoftTeams';\n\nexport type ReminderMethod = 'email' | 'webhook';\n\nexport interface Rules {\n availability_method: AvailabilityMethod;\n buffer: MeetingBuffer;\n default_open_hours: OpenHours[];\n round_robin_group_id: string;\n}\n\nexport interface ConferenceDetail {\n meeting_code?: string; // zoom, GTM, microsoft teams\n password?: string; // zoom, webex\n url?: string; // zoom, webex, GTM, meet, microsoft teams\n pin?: string; // webex, meet\n phone?: string[]; // GTM, meet, microsoft teams\n}\n\nexport interface Conference {\n provider?: ConferenceProvider;\n details?: ConferenceDetail;\n autocreate?: { [key: string]: any };\n}\n\nexport interface ParticipantBooking {\n calendar_id: string;\n}\n\nexport interface Participant {\n email: string;\n name?: string;\n is_organizer?: boolean;\n availability?: ParticipantAvailability;\n booking?: ParticipantBooking;\n specific_time_availability?: SpecificTimeAvailability[];\n timezone?: string;\n}\n\nexport interface EventReminder {\n type: ReminderMethod;\n minutes_before_event: number;\n recipient?: string;\n email_subject?: string;\n}\n\nexport interface Availability {\n duration_minutes: number;\n interval_minutes?: number;\n round_to?: number;\n availability_rules?: Rules;\n}\n\nexport interface NotetakerActionItemsSettings {\n custom_instructions?: string;\n}\n\nexport interface NotetakerSummarySettings {\n custom_instructions?: string;\n}\n\nexport interface NotetakerMeetingSettings {\n action_items?: boolean;\n action_items_settings?: NotetakerActionItemsSettings;\n audio_recording?: boolean;\n summary?: boolean;\n summary_settings?: NotetakerSummarySettings;\n transcription?: boolean;\n video_recording?: boolean;\n}\n\nexport interface Notetaker {\n visible?: boolean; // default is false\n enabled?: boolean; // default is false\n name?: string;\n meeting_settings?: NotetakerMeetingSettings;\n}\n\nexport interface EventBooking {\n title: string;\n description?: string;\n location?: string;\n timezone?: string;\n booking_type: BookingType;\n conferencing?: Conference;\n hide_participants?: boolean;\n disable_emails?: boolean;\n reminders?: EventReminder[];\n notetaker?: Notetaker;\n}\n\nexport interface Appearance {\n color?: string;\n submit_button_label?: string;\n thank_you_message?: string;\n company_logo_url?: string;\n}\n\nexport interface Scheduler {\n available_days_in_future?: number;\n min_cancellation_notice: number;\n min_booking_notice?: number;\n rescheduling_url?: string;\n cancellation_url?: string;\n organizer_confirmation_url?: string;\n cancellation_policy?: string;\n hide_additional_guests?: boolean;\n hide_cancellation_options?: boolean;\n hide_rescheduling_options?: boolean;\n additional_fields?: Record<string, AdditionalFields>;\n email_template?: EmailTemplate;\n confirmation_redirect_url?: string;\n}\nexport interface AdditionalFields {\n type: string;\n required: boolean;\n order: number;\n options?: string[];\n label?: string;\n default?: string;\n}\n\nexport interface EmailTemplate {\n logo: string;\n booking_confirmed: BookingConfirmed;\n show_nylas_branding: boolean;\n organizer_locale: string;\n}\n\nexport interface BookingConfirmed {\n title: string;\n body: string;\n}\n\nexport interface Configuration {\n id: string;\n version: string;\n type?: string;\n requires_session_auth?: boolean;\n participants: Participant[];\n availability: Availability;\n event_booking: EventBooking;\n scheduler: Partial<Scheduler>;\n slug: string;\n appearance: Appearance;\n name: string;\n}\n\nexport interface GroupBooking {\n booking_type: BookingType; // Only 'booking' is supported\n disable_emails?: boolean;\n reminders?: EventReminder[];\n conferencing?: Conference;\n calendar_id: string;\n default_capacity: number;\n}\n\nexport interface GroupConfiguration {\n id: string;\n name: string;\n slug: string;\n requires_session_auth?: boolean;\n type: 'group';\n group_booking: GroupBooking;\n scheduler: Scheduler;\n appearance: Appearance;\n}\n\nexport interface Creator {\n name: string;\n email: string;\n}\nexport interface AdditionalParticipant {\n name: string;\n email: string;\n grant_id?: string;\n calendars: {\n id: string;\n name: string;\n object?: 'calendar';\n is_primary?: boolean;\n is_owned_by_user?: boolean;\n read_only?: boolean;\n timezone?: string;\n }[];\n}\n\n/**\n * Parameters for fetching participant info when loading an existing config for edit.\n * Used when the config has participants (emails) but full AdditionalParticipant\n * data (calendars, etc.) needs to be fetched from an external source.\n */\nexport interface ParticipantFetchParams {\n /** Emails of participants to fetch full info for */\n emails: string[];\n /** Optional grant ID to scope the fetch (e.g. for multi-account) */\n grantId?: string;\n}\n\n/**\n * Callback to fetch full participant info by emails.\n * Called when loading an existing config for edit.\n */\nexport type ParticipantFetch = (params: ParticipantFetchParams) => Promise<AdditionalParticipant[]>;\n\n/**\n * Callback to search participants by query (for autocomplete).\n */\nexport type ParticipantSearch = (query: string) => Promise<AdditionalParticipant[]>;\n\nexport interface GroupEvent {\n id?: string;\n title: string;\n busy: boolean;\n participants: NylasSchedulerBookingParticipant[];\n resources: {\n name: string;\n email: string;\n }[];\n description: string;\n when: {\n start_time: number;\n end_time: number;\n start_timezone?: string;\n end_timezone?: string;\n };\n location: string;\n recurrence: string[];\n capacity: number;\n}\n\nexport type RecurrenceUpdateOption = 'this' | 'future' | 'all';\nexport type RecurrenceDeleteOption = 'this' | 'future' | 'all';\n\nexport type Snapshot = {\n busy: boolean;\n calendar_id: string;\n hide_participants: boolean;\n ical_uid: string;\n organizer: {\n name: string;\n email: string;\n };\n participants: {\n email: string;\n status: string;\n }[];\n resources: any[];\n read_only: boolean;\n recurrence: string[];\n reminders: {\n use_default: boolean;\n overrides: any[];\n };\n title: string;\n description?: string;\n location?: string;\n conferencing?: Conference;\n visibility: string;\n creator: {\n name: string;\n email: string;\n };\n html_link: string;\n grant_id: string;\n id: string;\n object: string;\n status: string;\n when: {\n start_timezone: string;\n end_timezone: string;\n object: string;\n start_time: number; // Unix timestamp\n end_time: number; // Unix timestamp\n };\n created_at: number; // Unix timestamp\n updated_at: number; // Unix timestamp\n};\n\nexport interface GroupEventAPIData {\n event: EventDetails;\n group_event_info?: GroupEventInfo;\n}\n\nexport type EventDetails = {\n busy: boolean;\n calendar_id: string;\n conferencing: {\n provider: ConferenceProvider;\n details: {\n meeting_code: string;\n url: string;\n pin: string;\n phone: string[];\n };\n };\n hide_participants: boolean;\n ical_uid: string;\n organizer: {\n name: string;\n email: string;\n };\n participants: Array<{\n email: string;\n status: 'yes' | 'no' | 'noreply';\n comment?: string;\n }>;\n resources: string[];\n read_only: boolean;\n reminders: {\n use_default: boolean;\n overrides: Array<{\n method?: string;\n minutes?: number;\n }>;\n };\n title: string;\n description?: string;\n location?: string;\n visibility: 'default' | 'public' | 'private';\n creator: {\n name: string;\n email: string;\n };\n html_link: string;\n master_event_id: string;\n color_id: string;\n grant_id: string;\n id: string;\n object: 'event';\n status: 'confirmed' | 'tentative' | 'cancelled';\n when: {\n start_timezone: string;\n end_timezone: string;\n object: 'timespan';\n start_time: number;\n end_time: number;\n };\n created_at: number;\n updated_at: number;\n original_start_time: number;\n};\n\nexport type GroupEventInfo = {\n event_id: string;\n calendar_id: string;\n master_id: string;\n config_id: string;\n capacity: number;\n type: 'updated_event' | 'single_event' | 'master_event';\n booked: boolean;\n finished: boolean;\n participants: Array<{\n email: string;\n is_organizer: boolean;\n name: string;\n timezone: string;\n }>;\n snapshot: any | null;\n snapshot_expires_at: number;\n rrule: string[] | null;\n exceptions: {\n event_id: string;\n capacity: number;\n participants: Array<{\n email: string;\n is_organizer: boolean;\n name: string;\n timezone: string;\n }>;\n }[];\n};\n\nexport type ImportGroupEventDetails = {\n event_id: string;\n calendar_id: string;\n capacity: number;\n participants: Participant[];\n organizer: {\n name: string;\n email: string;\n };\n};\n\nexport type ImportGroupEventResponse = {\n imported_events: string[];\n import_failed: {\n event_id: string;\n reason: string;\n }[];\n};\n\nexport enum ErrorCategory {\n Component = 'component',\n Api = 'api',\n Auth = 'auth',\n}\n\nexport interface ErrorDetails {\n title: string;\n message: string;\n category: ErrorCategory;\n}\n\nexport enum ComponentErrorType {\n endtime_not_in_future = 'endtime_not_in_future',\n no_booking_info = 'no_booking_info',\n no_timeslot_selected = 'no_timeslot_selected',\n no_timezone_selected = 'no_timezone_selected',\n no_booking_id = 'no_booking_id',\n no_salt = 'no_salt',\n invalid_start_time = 'invalid_start_time',\n invalid_end_time = 'invalid_end_time',\n invalid_timezone = 'invalid_timezone',\n no_config_id = 'no_config_id',\n}\n\nexport interface KeyPoint {\n time: number;\n text: string;\n active?: boolean;\n}\n","export const version = '2.5.13';\n"],"names":["NotificationType","ErrorCategory"],"mappings":";;AAGG,IAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE;AACzH,MAA+D,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,QAAQ,IAAI,OAAO,IAAI;;ACgJpHA;AAAZ,CAAA,UAAY,gBA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1ZdVKLpt.js","sources":["../nylas-js-core/dist/index.es.js","src/types/index.ts","src/version.ts"],"sourcesContent":["var t = Object.defineProperty;\nvar c = (r, n, s) => n in r ? t(r, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[n] = s;\nvar a = (r, n, s) => (c(r, typeof n != \"symbol\" ? n + \"\" : n, s), s);\nvar u = /* @__PURE__ */ ((r) => (r.Error = \"error\", r.Warning = \"warning\", r.Info = \"info\", r.Success = \"success\", r))(u || {});\nconst e = (r) => r !== null && typeof r == \"object\" && \"data\" in r, o = (r) => r !== null && typeof r == \"object\" && \"error\" in r;\nclass E extends Error {\n constructor(s) {\n super(s == null ? void 0 : s.message);\n a(this, \"apiError\");\n this.name = \"NylasAPIError\", this.stack = new Error().stack, this.apiError = s;\n }\n}\nexport {\n u as NotificationType,\n E as NylasAPIError,\n o as isNylasErrorResponse,\n e as isNylasSuccessResponse\n};\n","export interface NylasResponse<Data = any> {\n request_id: string;\n data?: Data;\n error?: {\n message: string;\n type: string;\n };\n}\n\n// Avaliability\nexport interface OpenHours {\n days: number[];\n exDates: string[];\n timezone: string;\n start: string;\n end: string;\n}\n\nexport interface SpecificTimeAvailability {\n date: string;\n start: string;\n end: string;\n}\n\nexport interface MeetingBuffer {\n before: number;\n after: number;\n}\n\n// Scheduling\nexport interface UpdateConfiguration extends Omit<Configuration, 'id'> {}\n\nexport interface ParticipantAvailability {\n calendar_ids: string[];\n open_hours?: OpenHours[];\n}\n\nexport type NylasSchedulerBookingParticipant = { name: string; email: string; nameReadOnly?: boolean; emailReadOnly?: boolean };\n\nexport type NylasSchedulerBookingData = {\n primaryParticipant: NylasSchedulerBookingParticipant;\n startTime?: Date;\n endTime?: Date;\n timezone?: string;\n language?: string;\n guests?: NylasSchedulerBookingParticipant[];\n additionalFields?: Record<\n string,\n {\n value: string;\n type?: string;\n readOnly?: boolean;\n }\n >;\n};\n\nexport type OpenHour = {\n days: number[]; // [1, 2, 3, 4, 5]\n start: string; // \"09:00\"\n end: string; // \"17:00\"\n timezone: string; // \"America/Los_Angeles\"\n};\n\nexport type Timeslot = {\n start_time: Date;\n end_time: Date;\n emails?: string[];\n capacity?: number;\n event_id?: string;\n master_id?: string;\n calendar_id?: string;\n};\n\nexport type ThemeConfig = Partial<{\n '--nylas-primary': string;\n '--nylas-info': string;\n '--nylas-success': string;\n '--nylas-warning': string;\n '--nylas-error': string;\n '--nylas-error-pressed': string;\n '--nylas-base-0': string;\n '--nylas-base-25': string;\n '--nylas-base-50': string;\n '--nylas-base-100': string;\n '--nylas-base-200': string;\n '--nylas-base-300': string;\n '--nylas-base-400': string;\n '--nylas-base-500': string;\n '--nylas-base-600': string;\n '--nylas-base-700': string;\n '--nylas-base-800': string;\n '--nylas-base-900': string;\n '--nylas-base-950': string;\n '--nylas-color-blue-50': string;\n '--nylas-color-blue-100': string;\n '--nylas-color-blue-300': string;\n '--nylas-color-blue-500': string;\n '--nylas-color-blue-700': string;\n '--nylas-color-blue-900': string;\n '--nylas-color-red-50': string;\n '--nylas-color-red-100': string;\n '--nylas-color-red-300': string;\n '--nylas-color-red-500': string;\n '--nylas-color-red-700': string;\n '--nylas-color-red-900': string;\n '--nylas-color-green-50': string;\n '--nylas-color-green-100': string;\n '--nylas-color-green-300': string;\n '--nylas-color-green-500': string;\n '--nylas-color-green-700': string;\n '--nylas-color-green-900': string;\n '--nylas-color-yellow-50': string;\n '--nylas-color-yellow-100': string;\n '--nylas-color-yellow-300': string;\n '--nylas-color-yellow-500': string;\n '--nylas-color-yellow-700': string;\n '--nylas-color-yellow-900': string;\n '--nylas-color-purple-50': string;\n '--nylas-color-purple-100': string;\n '--nylas-color-purple-300': string;\n '--nylas-color-purple-500': string;\n '--nylas-color-purple-700': string;\n '--nylas-color-purple-900': string;\n '--nylas-color-sky-50': string;\n '--nylas-color-sky-100': string;\n '--nylas-color-sky-300': string;\n '--nylas-color-sky-500': string;\n '--nylas-color-sky-700': string;\n '--nylas-color-sky-900': string;\n '--nylas-color-black': string;\n '--nylas-color-grey-900': string;\n '--nylas-color-grey-800': string;\n '--nylas-color-grey-700': string;\n '--nylas-color-grey-600': string;\n '--nylas-color-grey-500': string;\n '--nylas-color-grey-400': string;\n '--nylas-color-grey-300': string;\n '--nylas-color-grey-200': string;\n '--nylas-color-grey-100': string;\n '--nylas-color-grey-50': string;\n '--nylas-color-white': string;\n '--nylas-font-family': string;\n '--nylas-font-size': string;\n '--nylas-border-radius': string;\n '--nylas-border-radius-2x': string;\n '--nylas-border-radius-3x': string;\n}>;\n\nexport enum NotificationType {\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n Success = 'success',\n}\n\nexport type Notification = {\n id: string;\n type: NotificationType;\n title: string;\n code?: number;\n category: string;\n description?: string;\n ttl?: number | 'none';\n};\n\nexport type BookingType = 'booking' | 'organizer-confirmation' | 'custom-confirmation';\n\nexport type AvailabilityMethod = 'max-fairness' | 'max-availability' | 'collective';\n\nexport type ConferenceProvider = 'GoogleMeetConferenceProvider' | 'MicrosoftTeamsConferenceProvider' | 'ZoomConferenceProvider' | 'OnlineMeetingProviderMicrosoftTeams';\n\nexport type ReminderMethod = 'email' | 'webhook';\n\nexport interface Rules {\n availability_method: AvailabilityMethod;\n buffer: MeetingBuffer;\n default_open_hours: OpenHours[];\n round_robin_group_id: string;\n}\n\nexport interface ConferenceDetail {\n meeting_code?: string; // zoom, GTM, microsoft teams\n password?: string; // zoom, webex\n url?: string; // zoom, webex, GTM, meet, microsoft teams\n pin?: string; // webex, meet\n phone?: string[]; // GTM, meet, microsoft teams\n}\n\nexport interface Conference {\n provider?: ConferenceProvider;\n details?: ConferenceDetail;\n autocreate?: { [key: string]: any };\n}\n\nexport interface ParticipantBooking {\n calendar_id: string;\n}\n\nexport interface Participant {\n email: string;\n name?: string;\n is_organizer?: boolean;\n availability?: ParticipantAvailability;\n booking?: ParticipantBooking;\n specific_time_availability?: SpecificTimeAvailability[];\n timezone?: string;\n}\n\nexport interface EventReminder {\n type: ReminderMethod;\n minutes_before_event: number;\n recipient?: string;\n email_subject?: string;\n}\n\nexport interface Availability {\n duration_minutes: number;\n interval_minutes?: number;\n round_to?: number;\n availability_rules?: Rules;\n}\n\nexport interface NotetakerActionItemsSettings {\n custom_instructions?: string;\n}\n\nexport interface NotetakerSummarySettings {\n custom_instructions?: string;\n}\n\nexport interface NotetakerMeetingSettings {\n action_items?: boolean;\n action_items_settings?: NotetakerActionItemsSettings;\n audio_recording?: boolean;\n summary?: boolean;\n summary_settings?: NotetakerSummarySettings;\n transcription?: boolean;\n video_recording?: boolean;\n}\n\nexport interface Notetaker {\n visible?: boolean; // default is false\n enabled?: boolean; // default is false\n name?: string;\n meeting_settings?: NotetakerMeetingSettings;\n}\n\nexport interface EventBooking {\n title: string;\n description?: string;\n location?: string;\n timezone?: string;\n booking_type: BookingType;\n conferencing?: Conference;\n hide_participants?: boolean;\n disable_emails?: boolean;\n reminders?: EventReminder[];\n notetaker?: Notetaker;\n}\n\nexport interface Appearance {\n color?: string;\n submit_button_label?: string;\n thank_you_message?: string;\n company_logo_url?: string;\n}\n\nexport interface Scheduler {\n available_days_in_future?: number;\n min_cancellation_notice: number;\n min_booking_notice?: number;\n rescheduling_url?: string;\n cancellation_url?: string;\n organizer_confirmation_url?: string;\n cancellation_policy?: string;\n hide_additional_guests?: boolean;\n hide_cancellation_options?: boolean;\n hide_rescheduling_options?: boolean;\n additional_fields?: Record<string, AdditionalFields>;\n email_template?: EmailTemplate;\n confirmation_redirect_url?: string;\n}\nexport interface AdditionalFields {\n type: string;\n required: boolean;\n order: number;\n options?: string[];\n label?: string;\n default?: string;\n}\n\nexport interface EmailTemplate {\n logo: string;\n booking_confirmed: BookingConfirmed;\n show_nylas_branding: boolean;\n organizer_locale: string;\n}\n\nexport interface BookingConfirmed {\n title: string;\n body: string;\n}\n\nexport interface Configuration {\n id: string;\n version: string;\n type?: string;\n requires_session_auth?: boolean;\n participants: Participant[];\n availability: Availability;\n event_booking: EventBooking;\n scheduler: Partial<Scheduler>;\n slug: string;\n appearance: Appearance;\n name: string;\n}\n\nexport interface GroupBooking {\n booking_type: BookingType; // Only 'booking' is supported\n disable_emails?: boolean;\n reminders?: EventReminder[];\n conferencing?: Conference;\n calendar_id: string;\n default_capacity: number;\n}\n\nexport interface GroupConfiguration {\n id: string;\n name: string;\n slug: string;\n requires_session_auth?: boolean;\n type: 'group';\n group_booking: GroupBooking;\n scheduler: Scheduler;\n appearance: Appearance;\n}\n\nexport interface Creator {\n name: string;\n email: string;\n}\nexport interface AdditionalParticipant {\n name: string;\n email: string;\n grant_id?: string;\n calendars: {\n id: string;\n name: string;\n object?: 'calendar';\n is_primary?: boolean;\n is_owned_by_user?: boolean;\n read_only?: boolean;\n timezone?: string;\n }[];\n}\n\n/**\n * Parameters for fetching participant info when loading an existing config for edit.\n * Used when the config has participants (emails) but full AdditionalParticipant\n * data (calendars, etc.) needs to be fetched from an external source.\n */\nexport interface ParticipantFetchParams {\n /** Emails of participants to fetch full info for */\n emails: string[];\n /** Optional grant ID to scope the fetch (e.g. for multi-account) */\n grantId?: string;\n}\n\n/**\n * Callback to fetch full participant info by emails.\n * Called when loading an existing config for edit.\n */\nexport type ParticipantFetch = (params: ParticipantFetchParams) => Promise<AdditionalParticipant[]>;\n\n/**\n * Callback to search participants by query (for autocomplete).\n */\nexport type ParticipantSearch = (query: string) => Promise<AdditionalParticipant[]>;\n\nexport interface GroupEvent {\n id?: string;\n title: string;\n busy: boolean;\n participants: NylasSchedulerBookingParticipant[];\n resources: {\n name: string;\n email: string;\n }[];\n description: string;\n when: {\n start_time: number;\n end_time: number;\n start_timezone?: string;\n end_timezone?: string;\n };\n location: string;\n recurrence: string[];\n capacity: number;\n}\n\nexport type RecurrenceUpdateOption = 'this' | 'future' | 'all';\nexport type RecurrenceDeleteOption = 'this' | 'future' | 'all';\n\nexport type Snapshot = {\n busy: boolean;\n calendar_id: string;\n hide_participants: boolean;\n ical_uid: string;\n organizer: {\n name: string;\n email: string;\n };\n participants: {\n email: string;\n status: string;\n }[];\n resources: any[];\n read_only: boolean;\n recurrence: string[];\n reminders: {\n use_default: boolean;\n overrides: any[];\n };\n title: string;\n description?: string;\n location?: string;\n conferencing?: Conference;\n visibility: string;\n creator: {\n name: string;\n email: string;\n };\n html_link: string;\n grant_id: string;\n id: string;\n object: string;\n status: string;\n when: {\n start_timezone: string;\n end_timezone: string;\n object: string;\n start_time: number; // Unix timestamp\n end_time: number; // Unix timestamp\n };\n created_at: number; // Unix timestamp\n updated_at: number; // Unix timestamp\n};\n\nexport interface GroupEventAPIData {\n event: EventDetails;\n group_event_info?: GroupEventInfo;\n}\n\nexport type EventDetails = {\n busy: boolean;\n calendar_id: string;\n conferencing: {\n provider: ConferenceProvider;\n details: {\n meeting_code: string;\n url: string;\n pin: string;\n phone: string[];\n };\n };\n hide_participants: boolean;\n ical_uid: string;\n organizer: {\n name: string;\n email: string;\n };\n participants: Array<{\n email: string;\n status: 'yes' | 'no' | 'noreply';\n comment?: string;\n }>;\n resources: string[];\n read_only: boolean;\n reminders: {\n use_default: boolean;\n overrides: Array<{\n method?: string;\n minutes?: number;\n }>;\n };\n title: string;\n description?: string;\n location?: string;\n visibility: 'default' | 'public' | 'private';\n creator: {\n name: string;\n email: string;\n };\n html_link: string;\n master_event_id: string;\n color_id: string;\n grant_id: string;\n id: string;\n object: 'event';\n status: 'confirmed' | 'tentative' | 'cancelled';\n when: {\n start_timezone: string;\n end_timezone: string;\n object: 'timespan';\n start_time: number;\n end_time: number;\n };\n created_at: number;\n updated_at: number;\n original_start_time: number;\n};\n\nexport type GroupEventInfo = {\n event_id: string;\n calendar_id: string;\n master_id: string;\n config_id: string;\n capacity: number;\n type: 'updated_event' | 'single_event' | 'master_event';\n booked: boolean;\n finished: boolean;\n participants: Array<{\n email: string;\n is_organizer: boolean;\n name: string;\n timezone: string;\n }>;\n snapshot: any | null;\n snapshot_expires_at: number;\n rrule: string[] | null;\n exceptions: {\n event_id: string;\n capacity: number;\n participants: Array<{\n email: string;\n is_organizer: boolean;\n name: string;\n timezone: string;\n }>;\n }[];\n};\n\nexport type ImportGroupEventDetails = {\n event_id: string;\n calendar_id: string;\n capacity: number;\n participants: Participant[];\n organizer: {\n name: string;\n email: string;\n };\n};\n\nexport type ImportGroupEventResponse = {\n imported_events: string[];\n import_failed: {\n event_id: string;\n reason: string;\n }[];\n};\n\nexport enum ErrorCategory {\n Component = 'component',\n Api = 'api',\n Auth = 'auth',\n}\n\nexport interface ErrorDetails {\n title: string;\n message: string;\n category: ErrorCategory;\n}\n\nexport enum ComponentErrorType {\n endtime_not_in_future = 'endtime_not_in_future',\n no_booking_info = 'no_booking_info',\n no_timeslot_selected = 'no_timeslot_selected',\n no_timezone_selected = 'no_timezone_selected',\n no_booking_id = 'no_booking_id',\n no_salt = 'no_salt',\n invalid_start_time = 'invalid_start_time',\n invalid_end_time = 'invalid_end_time',\n invalid_timezone = 'invalid_timezone',\n no_config_id = 'no_config_id',\n}\n\nexport interface KeyPoint {\n time: number;\n text: string;\n active?: boolean;\n}\n","export const version = '2.5.15';\n"],"names":["NotificationType","ErrorCategory"],"mappings":";;AAGG,IAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,GAAG,OAAO,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,EAAE;AACzH,MAA+D,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,IAAI,QAAQ,IAAI,OAAO,IAAI;;ACgJpHA;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EALWA,wBAAgB,KAAhBA,wBAAgB,GAK3B,EAAA,CAAA,CAAA;AAwZWC;AAAZ,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,aAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAJWA,qBAAa,KAAbA,qBAAa,GAIxB,EAAA,CAAA,CAAA;AAQD,IAAY,kBAWX;AAXD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,uBAAA,CAAA,GAAA,uBAA+C;AAC/C,IAAA,kBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAmC;AACnC,IAAA,kBAAA,CAAA,sBAAA,CAAA,GAAA,sBAA6C;AAC7C,IAAA,kBAAA,CAAA,sBAAA,CAAA,GAAA,sBAA6C;AAC7C,IAAA,kBAAA,CAAA,eAAA,CAAA,GAAA,eAA+B;AAC/B,IAAA,kBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,kBAAA,CAAA,oBAAA,CAAA,GAAA,oBAAyC;AACzC,IAAA,kBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,kBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAqC;AACrC,IAAA,kBAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC/B,CAAC,EAXW,kBAAkB,KAAlB,kBAAkB,GAW7B,EAAA,CAAA,CAAA;;ACxkBM,MAAM,OAAO,GAAG;;;;;;"}
@@ -136,15 +136,6 @@ export class NylasParticipantsCustomAvailability {
136
136
  error(`Failed to parse JSON for participant ${name}:`, err);
137
137
  return;
138
138
  }
139
- if (this.isInternalsAvailable) {
140
- if (!this.participantFormRef.checkValidity()) {
141
- this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
142
- return;
143
- }
144
- else {
145
- this.internals.setValidity({});
146
- }
147
- }
148
139
  if (name.startsWith('participant-availability-')) {
149
140
  const nameParts = name.split('-');
150
141
  if (nameParts.length < 4) {
@@ -189,6 +180,14 @@ export class NylasParticipantsCustomAvailability {
189
180
  }
190
181
  this.selectedParticipants = { ...this.selectedParticipants };
191
182
  this.updateFormValue();
183
+ if (this.isInternalsAvailable && !this.validationError) {
184
+ if (!this.participantFormRef.checkValidity()) {
185
+ this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');
186
+ }
187
+ else {
188
+ this.internals.setValidity({});
189
+ }
190
+ }
192
191
  }
193
192
  updateFormValue() {
194
193
  const participantOpenHours = {};
@@ -249,7 +248,7 @@ export class NylasParticipantsCustomAvailability {
249
248
  return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
250
249
  }
251
250
  render() {
252
- return (h(Host, { key: '5ff7155db08b5adcfe1168adf8452f426f4fb66d' }, h("div", { key: '376210b2869e4e9c518ba6f6ab29aff086df8a86', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '0a7a2492da0927c3fc2eff3e5b74ee8dd873f5ce', class: "header", part: "npca__header" }, h("h3", { key: 'f38db5fea6b75ebf696c86371437149421f375b0' }, i18next.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'b64aa2227fc6c761161baee71df7ccfa1d4a0c0b' }, i18next.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (h("div", { key: '902126476a17af8e5c5303bd7acd86ae95063c68', class: "validation-error", part: "npca__validation-error" }, h("span", { key: 'b3595b86576e9894e97127bad821714cc9f4a0ea' }, this.validationError))), h("div", { key: 'a03b0815c38caaa5255293efe25a2f8b5e65349a', class: "content", part: "npca__content" }, h("form", { key: '92b375ef71cd62bf4ed37b3fcee09c718e79bc3b', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
251
+ return (h(Host, { key: '5e62c290e9bec1901728c12d6d8cbb298b97da2b' }, h("div", { key: '3a7a5d5fda480e55df91e86b87d464b8ee142595', class: "nylas-participants-custom-availability", part: "npca" }, h("div", { key: '7ef83dde9d4ccd2ff36e948a3e27e2e30c457137', class: "header", part: "npca__header" }, h("h3", { key: '5784dbfb95cb7f66a02d995e3f4d53bd4c82b753' }, i18next.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'e8a803be4c48b789ae499749224a6dbd3f7e1681' }, i18next.t('nylasParticipantCustomAvailability.headerSubTitle'))), this.validationError && (h("div", { key: 'f10b45081c034f106237e1fdeb9a92f9bfd8c6ac', class: "validation-error", part: "npca__validation-error" }, h("span", { key: '4d17c47cc99364711ba9bc10aa0e2bafe6c7ffc4' }, this.validationError))), h("div", { key: 'bab32e3f7a3f58564269087b34bb223916503a3f', class: "content", part: "npca__content" }, h("form", { key: 'f3ade0977a820e63960511ab2c4e8f8bc69b04dd', ref: el => (this.participantFormRef = el) }, Object.keys(this.selectedParticipants).map((key, index) => {
253
252
  const participant = this.selectedParticipants[key];
254
253
  const participantOpenHours = participant.availability?.open_hours || [];
255
254
  if (!participant || !participant.name)
@@ -1 +1 @@
1
- {"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAG9H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAA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,WAAW,CAAC,4BAA4B,IAAI,CACxG,iCACE,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,4BAA4B,KAAK,IAAI,GAAG,EAAE,EAChD,SAAS,EAAE,oBAAoB,EAC/B,eAAe,EAAE,WAAW,CAAC,QAAQ,EACrC,UAAU,EAAE,IAAI,GAChB,CACH;4BACA,WAAW,CAAC,GAAG,KAAK,4BAA4B,IAAI,WAAW,CAAC,MAAM,IAAI,CACzE,+CACE,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,0CAA0C,KAAK,IAAI,GAAG,EAAE,EAC9D,eAAe,EAAE,WAAW,CAAC,QAAQ,EACrC,yBAAyB,EAAE,WAAW,CAAC,yBAAyB,EAChE,UAAU,EAAE,IAAI,GAChB,CACH,CACG,CACP,CAAC;oBACJ,CAAC,CAAC,CACG,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AA3HC;IAVC,iBAAiB,CAAyH;QACzI,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEA2HD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, error } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, OpenHours, Participant, ParticipantAvailability, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__validation-error - The validation error message container\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n tab: 'availability' | 'specific-time-availability';\n isOpen: boolean;\n openHours: OpenHours[];\n specificTimesAvailability: SpecificTimeAvailability[];\n name: string;\n availability?: ParticipantAvailability;\n timezone?: string;\n onlySpecificTimeAvailability?: boolean;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * The validation error message for the component.\n */\n @State() validationError: string = '';\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n // Run validation on initial load\n this.updateFormValue();\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n\n // Check if this is a toggle for \"only specific time availability\"\n if (event.detail.name.startsWith('only-specific-time-')) {\n const participantEmail = event.detail.name.replace('only-specific-time-', '');\n if (this.selectedParticipants[participantEmail]) {\n this.selectedParticipants[participantEmail]['onlySpecificTimeAvailability'] = event.detail.checked;\n // When enabling only specific time, switch to specific time tab\n if (event.detail.checked) {\n this.selectedParticipants[participantEmail]['tab'] = 'specific-time-availability';\n }\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n return;\n }\n\n const existingParticipant = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name);\n const existingOpenHours = existingParticipant?.availability?.open_hours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n const timeZone =\n existingOpenHours && existingOpenHours.length > 0\n ? existingParticipant?.timezone\n : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours?.at(0)?.timezone ||\n this.selectedConfiguration?.event_booking?.timezone ||\n window.Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const existingSpecificTimeAvailability = existingParticipant?.specific_time_availability || [];\n const specificTimesAvailability = existingSpecificTimeAvailability?.length > 0 ? existingSpecificTimeAvailability : [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['tab'] = 'availability';\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants[event.detail.name]['timezone'] = event.detail.checked ? timeZone : undefined;\n this.selectedParticipants[event.detail.name]['specificTimesAvailability'] = event.detail.checked ? specificTimesAvailability : [];\n // Reset onlySpecificTimeAvailability to false when custom availability is turned off\n this.selectedParticipants[event.detail.name]['onlySpecificTimeAvailability'] = event.detail.checked\n ? this.selectedParticipants[event.detail.name]['onlySpecificTimeAvailability'] || false\n : false;\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-time-availability-')) {\n return;\n }\n\n // Parse the JSON value once - can contain { openHours: OpenHours[], timezone: string } or SpecificTimeAvailability[]\n let jsonValue;\n try {\n jsonValue = JSON.parse(value);\n } catch (err) {\n error(`Failed to parse JSON for participant ${name}:`, err);\n return;\n }\n\n // Validate the form\n if (this.isInternalsAvailable) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // The unique key is the participant email, which may itself contain hyphens,\n // so rejoin everything after the fixed prefix and index segments\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n debug(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts.slice(3).join('-');\n if (!this.selectedParticipants[key]) return;\n const existingOpenHours = jsonValue.openHours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n this.selectedParticipants[key]['openHours'] = openHours;\n this.selectedParticipants[key]['tab'] = 'availability';\n if (jsonValue.timezone) {\n this.selectedParticipants[key]['timezone'] = jsonValue.timezone;\n // Also sync to specific times availability so it is consistent\n this.selectedParticipants[key]['specificTimesAvailability'] = (this.selectedParticipants[key]['specificTimesAvailability'] || []).map(entry => ({\n ...entry,\n timezone: jsonValue.timezone,\n }));\n }\n } else if (name.startsWith('participant-specific-time-availability')) {\n // Expected name format: \"participant-specific-time-availability-{index}-{uniqueKey}\"\n // The unique key is the participant email, which may itself contain hyphens,\n // so rejoin everything after the fixed prefix and index segments\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n debug(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-time-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts.slice(5).join('-');\n if (!this.selectedParticipants[key]) return;\n const existingSpecificTimeAvailability = jsonValue || [];\n this.selectedParticipants[key]['specificTimesAvailability'] = existingSpecificTimeAvailability;\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n\n // Sync timezone from specific time availability\n if (existingSpecificTimeAvailability.length > 0 && existingSpecificTimeAvailability[0].timezone) {\n const newTimezone = existingSpecificTimeAvailability[0].timezone;\n this.selectedParticipants[key]['timezone'] = newTimezone;\n // Also sync to open hours so it is consistent\n this.selectedParticipants[key]['openHours'] = (this.selectedParticipants[key]['openHours'] || []).map(entry => ({\n ...entry,\n timezone: newTimezone,\n }));\n }\n }\n\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificTimeAvailability = {};\n const participantOnlySpecificTimeAvailability = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];\n participantOnlySpecificTimeAvailability[key] = this.selectedParticipants[key].onlySpecificTimeAvailability || false;\n });\n\n // Validate that participants with \"only specific time availability\" have at least one specific time entry\n const invalidParticipants = Object.keys(this.selectedParticipants).filter(key => {\n const participant = this.selectedParticipants[key];\n return participant.onlySpecificTimeAvailability && (!participant.specificTimesAvailability || participant.specificTimesAvailability.length === 0);\n });\n\n if (invalidParticipants.length > 0) {\n const participantNames = invalidParticipants.map(key => this.selectedParticipants[key].name).join(', ');\n const errorMessage = i18next.t('nylasParticipantCustomAvailability.specificTimeRequired', { participantName: participantNames });\n this.validationError = errorMessage;\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, errorMessage);\n }\n } else {\n this.validationError = '';\n if (this.isInternalsAvailable) {\n this.internals.setValidity({});\n }\n }\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantSpecificTimeAvailability), `${this.name}-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantSpecificTimeAvailability), name: `${this.name}-specific-time` });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOnlySpecificTimeAvailability), `${this.name}-only-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantOnlySpecificTimeAvailability), name: `${this.name}-only-specific-time` });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n const onlySpecificTime = participant.only_specific_time_availability || false;\n const hasOpenHours = Boolean(participant.availability?.open_hours && participant.availability.open_hours.length > 0);\n const hasSpecificTime = Boolean(participant.specific_time_availability && participant.specific_time_availability.length > 0);\n const hasCustomAvailability = hasOpenHours || hasSpecificTime;\n\n selectedParticipants[participant.email] = {\n isOpen: hasCustomAvailability, // Open the section if custom availability is configured\n setCustom: hasOpenHours,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n specificTimesAvailability: participant.specific_time_availability || [],\n onlySpecificTimeAvailability: onlySpecificTime,\n // Default to specific-time-availability tab if only specific time is enabled\n tab: onlySpecificTime ? 'specific-time-availability' : 'availability',\n };\n });\n return selectedParticipants;\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>{i18next.t('nylasParticipantCustomAvailability.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantCustomAvailability.headerSubTitle')}</p>\n </div>\n {this.validationError && (\n <div class=\"validation-error\" part=\"npca__validation-error\">\n <span>{this.validationError}</span>\n </div>\n )}\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n const participantOpenHours = participant.availability?.open_hours || [];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{i18next.t('nylasParticipantCustomAvailability.participantOpenHoursTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n themeConfig={this.themeConfig}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <div class=\"participant-only-specific-time-container\">\n <div class=\"participant-only-specific-time-checkbox\">\n <label>\n <input\n type=\"checkbox\"\n checked={participant.onlySpecificTimeAvailability}\n onChange={(e: any) => {\n this.selectedParticipants[key]['onlySpecificTimeAvailability'] = e.target.checked;\n if (e.target.checked) {\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n }\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }}\n />\n <span>{i18next.t('nylasParticipantCustomAvailability.onlySpecificTimeAvailability', { participantName: participant.name })}</span>\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"14\" height=\"14\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasParticipantCustomAvailability.onlySpecificTimeAvailabilityTooltip', { participantName: participant.name })}\n </span>\n </tooltip-component>\n </label>\n </div>\n </div>\n )}\n {participant.isOpen && (\n <div class={`participant-tabs ${participant.onlySpecificTimeAvailability ? 'single-tab' : ''}`} part=\"npca__participant-tabs\">\n {!participant.onlySpecificTimeAvailability && (\n <div\n class={`participant-tab ${participant.tab === 'availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantAvailabilityTab')}</span>\n </div>\n )}\n <div\n class={`participant-tab ${participant.tab === 'specific-time-availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'specific-time-availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantSpecificTimeAvailabilityTab')}</span>\n </div>\n </div>\n )}\n {participant.tab === 'availability' && participant.isOpen && !participant.onlySpecificTimeAvailability && (\n <nylas-availability-picker\n key={index}\n name={`participant-availability-${index}-${key}`}\n openHours={participantOpenHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n {participant.tab === 'specific-time-availability' && participant.isOpen && (\n <nylas-specific-time-availability-picker\n key={index}\n name={`participant-specific-time-availability-${index}-${key}`}\n defaultTimezone={participant.timezone}\n specificTimesAvailability={participant.specificTimesAvailability}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"nylas-participants-custom-availability.js","sourceRoot":"","sources":["../../../../../src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAG9H,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAsBnD,MAAM,OAAO,mCAAmC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BAA4B,IAAI,CACxG,iCACE,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,4BAA4B,KAAK,IAAI,GAAG,EAAE,EAChD,SAAS,EAAE,oBAAoB,EAC/B,eAAe,EAAE,WAAW,CAAC,QAAQ,EACrC,UAAU,EAAE,IAAI,GAChB,CACH;4BACA,WAAW,CAAC,GAAG,KAAK,4BAA4B,IAAI,WAAW,CAAC,MAAM,IAAI,CACzE,+CACE,GAAG,EAAE,KAAK,EACV,IAAI,EAAE,0CAA0C,KAAK,IAAI,GAAG,EAAE,EAC9D,eAAe,EAAE,WAAW,CAAC,QAAQ,EACrC,yBAAyB,EAAE,WAAW,CAAC,yBAAyB,EAChE,UAAU,EAAE,IAAI,GAChB,CACH,CACG,CACP,CAAC;oBACJ,CAAC,CAAC,CACG,CACH,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AA3HC;IAVC,iBAAiB,CAAyH;QACzI,IAAI,EAAE,wCAAwC;QAC9C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;QACF,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;iEA2HD","sourcesContent":["import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, error } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, OpenHours, Participant, ParticipantAvailability, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__validation-error - The validation error message container\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n tab: 'availability' | 'specific-time-availability';\n isOpen: boolean;\n openHours: OpenHours[];\n specificTimesAvailability: SpecificTimeAvailability[];\n name: string;\n availability?: ParticipantAvailability;\n timezone?: string;\n onlySpecificTimeAvailability?: boolean;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * The validation error message for the component.\n */\n @State() validationError: string = '';\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n // Use queueMicrotask to defer theme application until after React has set props.\n // This fixes the timing issue where connectedCallback fires before React sets themeConfig.\n queueMicrotask(() => {\n if (this.themeConfig) {\n this.applyThemeConfig(this.themeConfig);\n this.host.setAttribute('data-themed', '');\n }\n });\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n // Run validation on initial load\n this.updateFormValue();\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n\n // Check if this is a toggle for \"only specific time availability\"\n if (event.detail.name.startsWith('only-specific-time-')) {\n const participantEmail = event.detail.name.replace('only-specific-time-', '');\n if (this.selectedParticipants[participantEmail]) {\n this.selectedParticipants[participantEmail]['onlySpecificTimeAvailability'] = event.detail.checked;\n // When enabling only specific time, switch to specific time tab\n if (event.detail.checked) {\n this.selectedParticipants[participantEmail]['tab'] = 'specific-time-availability';\n }\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n return;\n }\n\n const existingParticipant = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name);\n const existingOpenHours = existingParticipant?.availability?.open_hours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n const timeZone =\n existingOpenHours && existingOpenHours.length > 0\n ? existingParticipant?.timezone\n : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours?.at(0)?.timezone ||\n this.selectedConfiguration?.event_booking?.timezone ||\n window.Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const existingSpecificTimeAvailability = existingParticipant?.specific_time_availability || [];\n const specificTimesAvailability = existingSpecificTimeAvailability?.length > 0 ? existingSpecificTimeAvailability : [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['tab'] = 'availability';\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants[event.detail.name]['timezone'] = event.detail.checked ? timeZone : undefined;\n this.selectedParticipants[event.detail.name]['specificTimesAvailability'] = event.detail.checked ? specificTimesAvailability : [];\n // Reset onlySpecificTimeAvailability to false when custom availability is turned off\n this.selectedParticipants[event.detail.name]['onlySpecificTimeAvailability'] = event.detail.checked\n ? this.selectedParticipants[event.detail.name]['onlySpecificTimeAvailability'] || false\n : false;\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-time-availability-')) {\n return;\n }\n\n // Parse the JSON value once - can contain { openHours: OpenHours[], timezone: string } or SpecificTimeAvailability[]\n let jsonValue;\n try {\n jsonValue = JSON.parse(value);\n } catch (err) {\n error(`Failed to parse JSON for participant ${name}:`, err);\n return;\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // The unique key is the participant email, which may itself contain hyphens,\n // so rejoin everything after the fixed prefix and index segments\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n debug(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts.slice(3).join('-');\n if (!this.selectedParticipants[key]) return;\n const existingOpenHours = jsonValue.openHours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n this.selectedParticipants[key]['openHours'] = openHours;\n this.selectedParticipants[key]['tab'] = 'availability';\n if (jsonValue.timezone) {\n this.selectedParticipants[key]['timezone'] = jsonValue.timezone;\n // Also sync to specific times availability so it is consistent\n this.selectedParticipants[key]['specificTimesAvailability'] = (this.selectedParticipants[key]['specificTimesAvailability'] || []).map(entry => ({\n ...entry,\n timezone: jsonValue.timezone,\n }));\n }\n } else if (name.startsWith('participant-specific-time-availability')) {\n // Expected name format: \"participant-specific-time-availability-{index}-{uniqueKey}\"\n // The unique key is the participant email, which may itself contain hyphens,\n // so rejoin everything after the fixed prefix and index segments\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n debug(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-time-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts.slice(5).join('-');\n if (!this.selectedParticipants[key]) return;\n const existingSpecificTimeAvailability = jsonValue || [];\n this.selectedParticipants[key]['specificTimesAvailability'] = existingSpecificTimeAvailability;\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n\n // Sync timezone from specific time availability\n if (existingSpecificTimeAvailability.length > 0 && existingSpecificTimeAvailability[0].timezone) {\n const newTimezone = existingSpecificTimeAvailability[0].timezone;\n this.selectedParticipants[key]['timezone'] = newTimezone;\n // Also sync to open hours so it is consistent\n this.selectedParticipants[key]['openHours'] = (this.selectedParticipants[key]['openHours'] || []).map(entry => ({\n ...entry,\n timezone: newTimezone,\n }));\n }\n }\n\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n\n // Report (but never gate on) child picker validity AFTER the state update and emit.\n // Historically this check ran before the update and returned early, which silently\n // discarded the user's edit whenever ANY participant's picker was invalid — the child\n // picker still showed the edit while the saved payload resurrected the old entries\n // (e.g. deleted specific-time windows coming back as \"ghost\" availability).\n if (this.isInternalsAvailable && !this.validationError) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n } else {\n this.internals.setValidity({});\n }\n }\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificTimeAvailability = {};\n const participantOnlySpecificTimeAvailability = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];\n participantOnlySpecificTimeAvailability[key] = this.selectedParticipants[key].onlySpecificTimeAvailability || false;\n });\n\n // Validate that participants with \"only specific time availability\" have at least one specific time entry\n const invalidParticipants = Object.keys(this.selectedParticipants).filter(key => {\n const participant = this.selectedParticipants[key];\n return participant.onlySpecificTimeAvailability && (!participant.specificTimesAvailability || participant.specificTimesAvailability.length === 0);\n });\n\n if (invalidParticipants.length > 0) {\n const participantNames = invalidParticipants.map(key => this.selectedParticipants[key].name).join(', ');\n const errorMessage = i18next.t('nylasParticipantCustomAvailability.specificTimeRequired', { participantName: participantNames });\n this.validationError = errorMessage;\n if (this.isInternalsAvailable) {\n this.internals.setValidity({ customError: true }, errorMessage);\n }\n } else {\n this.validationError = '';\n if (this.isInternalsAvailable) {\n this.internals.setValidity({});\n }\n }\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantSpecificTimeAvailability), `${this.name}-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantSpecificTimeAvailability), name: `${this.name}-specific-time` });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOnlySpecificTimeAvailability), `${this.name}-only-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantOnlySpecificTimeAvailability), name: `${this.name}-only-specific-time` });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n const onlySpecificTime = participant.only_specific_time_availability || false;\n const hasOpenHours = Boolean(participant.availability?.open_hours && participant.availability.open_hours.length > 0);\n const hasSpecificTime = Boolean(participant.specific_time_availability && participant.specific_time_availability.length > 0);\n const hasCustomAvailability = hasOpenHours || hasSpecificTime;\n\n selectedParticipants[participant.email] = {\n isOpen: hasCustomAvailability, // Open the section if custom availability is configured\n setCustom: hasOpenHours,\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n specificTimesAvailability: participant.specific_time_availability || [],\n onlySpecificTimeAvailability: onlySpecificTime,\n // Default to specific-time-availability tab if only specific time is enabled\n tab: onlySpecificTime ? 'specific-time-availability' : 'availability',\n };\n });\n return selectedParticipants;\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>{i18next.t('nylasParticipantCustomAvailability.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantCustomAvailability.headerSubTitle')}</p>\n </div>\n {this.validationError && (\n <div class=\"validation-error\" part=\"npca__validation-error\">\n <span>{this.validationError}</span>\n </div>\n )}\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n const participantOpenHours = participant.availability?.open_hours || [];\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{i18next.t('nylasParticipantCustomAvailability.participantOpenHoursTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n themeConfig={this.themeConfig}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <div class=\"participant-only-specific-time-container\">\n <div class=\"participant-only-specific-time-checkbox\">\n <label>\n <input\n type=\"checkbox\"\n checked={participant.onlySpecificTimeAvailability}\n onChange={(e: any) => {\n this.selectedParticipants[key]['onlySpecificTimeAvailability'] = e.target.checked;\n if (e.target.checked) {\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n }\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }}\n />\n <span>{i18next.t('nylasParticipantCustomAvailability.onlySpecificTimeAvailability', { participantName: participant.name })}</span>\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" width=\"14\" height=\"14\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasParticipantCustomAvailability.onlySpecificTimeAvailabilityTooltip', { participantName: participant.name })}\n </span>\n </tooltip-component>\n </label>\n </div>\n </div>\n )}\n {participant.isOpen && (\n <div class={`participant-tabs ${participant.onlySpecificTimeAvailability ? 'single-tab' : ''}`} part=\"npca__participant-tabs\">\n {!participant.onlySpecificTimeAvailability && (\n <div\n class={`participant-tab ${participant.tab === 'availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantAvailabilityTab')}</span>\n </div>\n )}\n <div\n class={`participant-tab ${participant.tab === 'specific-time-availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'specific-time-availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantSpecificTimeAvailabilityTab')}</span>\n </div>\n </div>\n )}\n {participant.tab === 'availability' && participant.isOpen && !participant.onlySpecificTimeAvailability && (\n <nylas-availability-picker\n key={index}\n name={`participant-availability-${index}-${key}`}\n openHours={participantOpenHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n {participant.tab === 'specific-time-availability' && participant.isOpen && (\n <nylas-specific-time-availability-picker\n key={index}\n name={`participant-specific-time-availability-${index}-${key}`}\n defaultTimezone={participant.timezone}\n specificTimesAvailability={participant.specificTimesAvailability}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"]}
@@ -96,7 +96,8 @@ export class NylasSpecificTimeAvailabilityPicker {
96
96
  if (this.specificTimesAvailability[0].timezone) {
97
97
  this.timezone = this.specificTimesAvailability[0].timezone;
98
98
  }
99
- const entries = this.specificTimesAvailability.map((item, index) => {
99
+ const sortedAvailability = [...this.specificTimesAvailability].sort((a, b) => (a.date === b.date ? a.start.localeCompare(b.start) : a.date.localeCompare(b.date)));
100
+ const entries = sortedAvailability.map((item, index) => {
100
101
  const isUnavailable = item.start === '00:00' && item.end === '00:00';
101
102
  return {
102
103
  id: `specific-time-${index}`,
@@ -309,11 +310,11 @@ export class NylasSpecificTimeAvailabilityPicker {
309
310
  value: key,
310
311
  }));
311
312
  const selectedTimezoneOption = timezoneOptions.find(i => i.value === this.timezone);
312
- return (h(Host, { key: 'eebdadc4785b92c186738ac7b9cb2dde9fbce996' }, h("div", { key: 'a620af13300146972ef0e2ccd3d393bd0f34625e', class: "nylas-specific-time-availability-picker", part: "nstap" }, !this.hideHeader && (h("div", { key: '6b7c3c7a73e202ef6fb288e880a9eacba3759778', class: "header", part: "nstap__header" }, h("h3", { key: '01e13ae3a10ab877dc039afcdd69f48e1023d752' }, i18next.t('nylasSpecificTimeAvailabilityPicker.headerTitle')), h("p", { key: '38fbec12451c9bd136a2e21b09ca9d439d9afb9d' }, i18next.t('nylasSpecificTimeAvailabilityPicker.headerDescription'), h("tooltip-component", { key: '502f37259467a4cd486637e2ca1f9112768a7757' }, h("info-icon", { key: 'ebe5b465510530a9e7a054d284d0a327d869e626', slot: "tooltip-icon" }), h("span", { key: '95d0e593802256fb05a7500b0b77faa8b0c2a1be', slot: "tooltip-content" }, i18next.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')))))), h("div", { key: '89b15e038648d7dc07fb395cba589dd20db92ad3', class: "content", part: "nstap__content" }, h("section", { key: 'aba6b14123776917164a523f01c94e6c593e1927', class: "timezone-selector", part: "nstap__timezone-selector", "aria-labelledby": "timezone-header" }, h("h4", { key: '02f309870da12e5fc010be80a9048ac0bb173a19', id: "timezone-header", class: "sub-header" }, i18next.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')), h("p", { key: '1c4e5e41f0981067e881f61c2b53e83cc1fe65d8', class: "timezone-description" }, i18next.t('nylasSpecificTimeAvailabilityPicker.timezoneDescription')), selectedTimezoneOption?.label && (h("select-dropdown", { key: '3ed2f26ce1fffb9e7eeed1facb40b72161c325d4', name: "specific-time-timezone", searchPlaceholder: i18next.t('search'), exportparts: "sd_dropdown: nstap__timezone-container, sd_dropdown-button: nstap__timezone-button, sd_dropdown-content: nstap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: selectedTimezoneOption, themeConfig: this.themeConfig, "aria-label": i18next.t('nylasSpecificTimeAvailabilityPicker.selectTimezone') }, h("span", { key: 'b4105b6d343c0e8c8bbd26f33e35b34a36e00821', slot: "select-icon", "aria-hidden": "true" }, h("globe-icon", { key: 'e72ffc953f138b7b8c81fa9601d12f82cd878a38', width: "20", height: "20" })))), this.validationErrors['timezone'] && (h("div", { key: '87c4c33e678fa738c845ed6fef29ddd617b2c424', class: "error-message timezone-error", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors['timezone']))), h("section", { key: 'b05db49af28232963b451e24a2ea364848e87b3e', class: "specific-times-section", part: "nstap__specific-times-section", "aria-labelledby": "specific-times-header" }, h("h4", { key: 'f0b566bd768e9bc0751a160e07b5da422bac336f', id: "specific-times-header", class: "section-header" }, i18next.t('nylasSpecificTimeAvailabilityPicker.specificTimesHeader')), h("p", { key: 'aff99e63618a61037ba64cedfe4facc354991ef2', class: "section-description" }, i18next.t('nylasSpecificTimeAvailabilityPicker.specificTimesDescription')), h("div", { key: '28c04af5aa3e9b481ba111865bc8869d7b2038c0', class: "specific-times", part: "nstap__specific-times", role: "list" }, this.specificDateEntries.length === 0 ? (h("div", { class: "empty-state", part: "nstap__empty-state" }, h("div", { class: "empty-icon", part: "nstap__empty-icon" }, h("calendar-icon", { width: "32", height: "32" })), h("h3", { class: "empty-title", part: "nstap__empty-title" }, i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')), h("p", { class: "empty-subtitle", part: "nstap__empty-subtitle" }, i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')))) : (this.specificDateEntries.map((entry, index) => (h("article", { class: "specific-time-entry", part: "nstap__specific-time-entry", key: entry.id, "data-entry-id": entry.id, role: "listitem", "aria-label": `Specific time availability entry ${index + 1}` }, h("div", { class: "entry-content", part: "nstap__entry-content" }, h("div", { class: "date-input-container", part: "nstap__date-input-container" }, h("nylas-date-component", { name: `date-${entry.id}`, defaultValue: entry.date, placeholder: "yyyy-mm-dd", part: "nstap__date-input", class: "date-input", themeConfig: this.themeConfig, exportparts: "ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label", "aria-label": `Date for entry ${index + 1}` })), entry.isUnavailable ? (h("div", { class: "unavailable-text", part: "nstap__unavailable-text", role: "status" }, h("span", { class: "unavailable-label" }, i18next.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')))) : (h("div", { class: "time-pickers", part: "nstap__time-pickers", role: "group", "aria-label": "Time range" }, h("nylas-time-window-picker", { id: `${entry.id}_start`, time: entry.startTime, name: `${entry.id}_start`, key: `${entry.id}_start`, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `Start time for entry ${index + 1}` }), h("span", { class: "time-separator", "aria-hidden": "true" }, "-"), h("nylas-time-window-picker", { id: `${entry.id}_end`, time: entry.endTime, name: `${entry.id}_end`, key: `${entry.id}_end`, minimumStartTime: entry.startTime, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `End time for entry ${index + 1}` }))), h("div", { class: "action-buttons", part: "nstap__action-buttons" }, h("button", { type: "button", class: { 'toggle-button': true, 'unavailable': entry.isUnavailable }, part: "nstap__toggle-button", onClick: () => this.toggleAvailability(entry.id), "aria-label": entry.isUnavailable
313
+ return (h(Host, { key: '4d134c2b81e17dc6238e06bb89f3d1bfa2b757bb' }, h("div", { key: 'f58418df34f1c1070ac356be9e5267df60ba30b3', class: "nylas-specific-time-availability-picker", part: "nstap" }, !this.hideHeader && (h("div", { key: '52c61a7f8efc2ee41b96c7cd30db184dac379371', class: "header", part: "nstap__header" }, h("h3", { key: 'daaa78a82642cd1389dce9e57a7f4bc53be45976' }, i18next.t('nylasSpecificTimeAvailabilityPicker.headerTitle')), h("p", { key: '751c1e9596150aa5f0a38778f6236dc0defba68d' }, i18next.t('nylasSpecificTimeAvailabilityPicker.headerDescription'), h("tooltip-component", { key: '813fe27ad1696a3208c02807aa643c45e4736669' }, h("info-icon", { key: '36c4f8b642df2d8ab6f271696848edf82882f21a', slot: "tooltip-icon" }), h("span", { key: '7b14bb5499644014a51346ec4f1ecd83a6495548', slot: "tooltip-content" }, i18next.t('nylasSpecificTimeAvailabilityPicker.tooltip.desc')))))), h("div", { key: '9c351dd740cafdba11b2d7c275432f007b5360bf', class: "content", part: "nstap__content" }, h("section", { key: '9d0eb572d83273cf6e468d5f3104360e348dd6e7', class: "timezone-selector", part: "nstap__timezone-selector", "aria-labelledby": "timezone-header" }, h("h4", { key: '299b34a534d35dfee2f2cc762d8a475b464adcaa', id: "timezone-header", class: "sub-header" }, i18next.t('nylasSpecificTimeAvailabilityPicker.selectTimezone')), h("p", { key: '85e8d70c2f394e183043766c323962eeaa265011', class: "timezone-description" }, i18next.t('nylasSpecificTimeAvailabilityPicker.timezoneDescription')), selectedTimezoneOption?.label && (h("select-dropdown", { key: '18a900c77b84a5a562156bc95b294986eae28a65', name: "specific-time-timezone", searchPlaceholder: i18next.t('search'), exportparts: "sd_dropdown: nstap__timezone-container, sd_dropdown-button: nstap__timezone-button, sd_dropdown-content: nstap__timezone-dropdown-content", options: timezoneOptions, defaultSelectedOption: selectedTimezoneOption, themeConfig: this.themeConfig, "aria-label": i18next.t('nylasSpecificTimeAvailabilityPicker.selectTimezone') }, h("span", { key: '718b4f834b19633e519c5a5cf10a27c0c1d0d3e0', slot: "select-icon", "aria-hidden": "true" }, h("globe-icon", { key: 'a1d2ec8303c79815c08faeb08800d45e24c1b833', width: "20", height: "20" })))), this.validationErrors['timezone'] && (h("div", { key: 'e19aed18519b769fd26013a9f991a389c01e1a7c', class: "error-message timezone-error", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors['timezone']))), h("section", { key: '234cf3184d76a414bcfa2c2e59d51172fe89d03c', class: "specific-times-section", part: "nstap__specific-times-section", "aria-labelledby": "specific-times-header" }, h("h4", { key: 'd5e8db5b614d13e8a40e89dd2e70b49826ab638e', id: "specific-times-header", class: "section-header" }, i18next.t('nylasSpecificTimeAvailabilityPicker.specificTimesHeader')), h("p", { key: '523927778ec5002da4ddba94814446722f3f801c', class: "section-description" }, i18next.t('nylasSpecificTimeAvailabilityPicker.specificTimesDescription')), h("div", { key: 'e2855d2f066bbee3b1e1884ddc0b3948673199c2', class: "specific-times", part: "nstap__specific-times", role: "list" }, this.specificDateEntries.length === 0 ? (h("div", { class: "empty-state", part: "nstap__empty-state" }, h("div", { class: "empty-icon", part: "nstap__empty-icon" }, h("calendar-icon", { width: "32", height: "32" })), h("h3", { class: "empty-title", part: "nstap__empty-title" }, i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.title')), h("p", { class: "empty-subtitle", part: "nstap__empty-subtitle" }, i18next.t('nylasSpecificTimeAvailabilityPicker.emptyState.subtitle')))) : (this.specificDateEntries.map((entry, index) => (h("article", { class: "specific-time-entry", part: "nstap__specific-time-entry", key: entry.id, "data-entry-id": entry.id, role: "listitem", "aria-label": `Specific time availability entry ${index + 1}` }, h("div", { class: "entry-content", part: "nstap__entry-content" }, h("div", { class: "date-input-container", part: "nstap__date-input-container" }, h("nylas-date-component", { name: `date-${entry.id}`, defaultValue: entry.date, placeholder: "yyyy-mm-dd", part: "nstap__date-input", class: "date-input", themeConfig: this.themeConfig, exportparts: "ic__date: nstap__date-field, ic__input_wrapper: nstap__date-wrapper, ic__label: nstap__date-label", "aria-label": `Date for entry ${index + 1}` })), entry.isUnavailable ? (h("div", { class: "unavailable-text", part: "nstap__unavailable-text", role: "status" }, h("span", { class: "unavailable-label" }, i18next.t('nylasSpecificTimeAvailabilityPicker.entireDayUnavailable')))) : (h("div", { class: "time-pickers", part: "nstap__time-pickers", role: "group", "aria-label": "Time range" }, h("nylas-time-window-picker", { id: `${entry.id}_start`, time: entry.startTime, name: `${entry.id}_start`, key: `${entry.id}_start`, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `Start time for entry ${index + 1}` }), h("span", { class: "time-separator", "aria-hidden": "true" }, "-"), h("nylas-time-window-picker", { id: `${entry.id}_end`, time: entry.endTime, name: `${entry.id}_end`, key: `${entry.id}_end`, minimumStartTime: entry.startTime, language: this.selectedLanguage, hasError: !!this.validationErrors[entry.id], themeConfig: this.themeConfig, exportparts: "time-picker: nstap__time-picker-container, time-input: nstap__time-picker-input, times: nstap__time-picker-times", "aria-label": `End time for entry ${index + 1}` }))), h("div", { class: "action-buttons", part: "nstap__action-buttons" }, h("button", { type: "button", class: { 'toggle-button': true, 'unavailable': entry.isUnavailable }, part: "nstap__toggle-button", onClick: () => this.toggleAvailability(entry.id), "aria-label": entry.isUnavailable
313
314
  ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
314
315
  : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable'), title: entry.isUnavailable
315
316
  ? i18next.t('nylasSpecificTimeAvailabilityPicker.markAsAvailable')
316
- : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable') }, h("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), h("button", { type: "button", class: "remove-button", part: "nstap__remove-button", onClick: () => this.removeSpecificTimeAvailability(entry.id), "aria-label": `Remove specific time entry ${index + 1}`, title: "Remove" }, h("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[entry.id] && (h("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[entry.id]))))))), h("div", { key: '6c055484d6da9537f29a92f75aafb94b3f53b2bc', class: "add-button-container", part: "nstap__add-button-container" }, h("button-component", { key: '95cd31c30c35c15c06787a12dc749bca5e8702ec', id: "add-specific-time-open-hour", onClick: () => this.addSpecificTimeAvailability(), part: "nstap__add-button", variant: "basic", "aria-label": i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability') }, h("add-circle-icon", { key: '7922cee5395f9768aaab93a0bf3ff437ce870b48', width: "24", height: "24", "aria-hidden": "true" }), i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability'))))))));
317
+ : i18next.t('nylasSpecificTimeAvailabilityPicker.markAsUnavailable') }, h("calendar-icon", { width: "20", height: "20", "aria-hidden": "true" })), h("button", { type: "button", class: "remove-button", part: "nstap__remove-button", onClick: () => this.removeSpecificTimeAvailability(entry.id), "aria-label": `Remove specific time entry ${index + 1}`, title: "Remove" }, h("close-icon", { width: "16", height: "16", "aria-hidden": "true" })))), this.validationErrors[entry.id] && (h("div", { class: "error-message", part: "nstap__error-message", role: "alert", "aria-live": "polite" }, this.validationErrors[entry.id]))))))), h("div", { key: '7090e167621c9277ff45fc8d2297a908bd73e03e', class: "add-button-container", part: "nstap__add-button-container" }, h("button-component", { key: '0ccb4dbfd2bcad2f41ba238686519c4376b567e2', id: "add-specific-time-open-hour", onClick: () => this.addSpecificTimeAvailability(), part: "nstap__add-button", variant: "basic", "aria-label": i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability') }, h("add-circle-icon", { key: '823d017d2df65f36830d818a8fde664c69d12cdb', width: "24", height: "24", "aria-hidden": "true" }), i18next.t('nylasSpecificTimeAvailabilityPicker.addSpecificTimeAvailability'))))))));
317
318
  }
318
319
  static get is() { return "nylas-specific-time-availability-picker"; }
319
320
  static get encapsulation() { return "shadow"; }