@nylas/web-elements 2.5.12 → 2.5.13
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.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +4 -4
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +3 -3
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js.map +1 -1
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +1 -1
- package/dist/cjs/{version-FXnnI00G.js → version-BspChjso.js} +3 -3
- package/dist/cjs/{version-FXnnI00G.js.map → version-BspChjso.js.map} +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js.map +1 -1
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-participants-custom-availability.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +4 -4
- package/dist/components/nylas-scheduling.js +1 -1
- package/dist/components/{p-pY2yw_Ql.js → p-B6bT8J6p.js} +5 -5
- package/dist/components/p-B6bT8J6p.js.map +1 -0
- package/dist/components/{p-Cm6e2qUq.js → p-BDVZl2EG.js} +3 -3
- package/dist/components/{p-Cm6e2qUq.js.map → p-BDVZl2EG.js.map} +1 -1
- package/dist/components/{p-77cQPnsG.js → p-Csux9e4C.js} +4 -4
- package/dist/components/{p-77cQPnsG.js.map → p-Csux9e4C.js.map} +1 -1
- package/dist/components/{p-Cl71OI5D.js → p-KPbwxUCV.js} +3 -3
- package/dist/components/{p-Cl71OI5D.js.map → p-KPbwxUCV.js.map} +1 -1
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js +3 -3
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js.map +1 -1
- package/dist/esm/google-logo-icon_6.entry.js +1 -1
- package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
- package/dist/esm/nylas-scheduling.entry.js +1 -1
- package/dist/esm/{version-BEjJeakd.js → version-xO_cryq5.js} +3 -3
- package/dist/esm/{version-BEjJeakd.js.map → version-xO_cryq5.js.map} +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-ad0e7f3b.entry.js → p-0716662b.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-32e39f3d.entry.js → p-ca824e25.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7c1bc27a.entry.js → p-ccc9d9d2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7c1bc27a.entry.js.map → p-ccc9d9d2.entry.js.map} +1 -1
- package/dist/nylas-web-elements/{p-fe855b8f.entry.js → p-e0de5436.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-BEjJeakd.js → p-xO_cryq5.js} +2 -2
- package/dist/nylas-web-elements/{p-BEjJeakd.js.map → p-xO_cryq5.js.map} +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/dist/components/p-pY2yw_Ql.js.map +0 -1
- /package/dist/nylas-web-elements/{p-ad0e7f3b.entry.js.map → p-0716662b.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-32e39f3d.entry.js.map → p-ca824e25.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fe855b8f.entry.js.map → p-e0de5436.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-
|
|
6
|
+
var version = require('./version-BspChjso.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-
|
|
7
|
+
var version = require('./version-BspChjso.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-
|
|
6
|
+
var version = require('./version-BspChjso.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.
|
|
33
|
+
const version = '2.5.13';
|
|
34
34
|
|
|
35
35
|
exports.o = o;
|
|
36
36
|
exports.u = u;
|
|
37
37
|
exports.version = version;
|
|
38
|
-
//# sourceMappingURL=version-
|
|
38
|
+
//# sourceMappingURL=version-BspChjso.js.map
|
|
39
39
|
|
|
40
|
-
//# sourceMappingURL=version-
|
|
40
|
+
//# sourceMappingURL=version-BspChjso.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-FXnnI00G.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.12';\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;;;;;;"}
|
|
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,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;;;;;;"}
|
|
@@ -151,7 +151,7 @@ export class NylasParticipantsCustomAvailability {
|
|
|
151
151
|
debug(`Malformed participant name format: ${name}. Expected format: "participant-availability-{participantId}-{uniqueKey}"`);
|
|
152
152
|
return;
|
|
153
153
|
}
|
|
154
|
-
const key = nameParts
|
|
154
|
+
const key = nameParts.slice(3).join('-');
|
|
155
155
|
if (!this.selectedParticipants[key])
|
|
156
156
|
return;
|
|
157
157
|
const existingOpenHours = jsonValue.openHours || [];
|
|
@@ -172,7 +172,7 @@ export class NylasParticipantsCustomAvailability {
|
|
|
172
172
|
debug(`Malformed participant specific date name format: ${name}. Expected format: "participant-specific-time-availability-{index}-{uniqueKey}"`);
|
|
173
173
|
return;
|
|
174
174
|
}
|
|
175
|
-
const key = nameParts
|
|
175
|
+
const key = nameParts.slice(5).join('-');
|
|
176
176
|
if (!this.selectedParticipants[key])
|
|
177
177
|
return;
|
|
178
178
|
const existingSpecificTimeAvailability = jsonValue || [];
|
|
@@ -249,7 +249,7 @@ export class NylasParticipantsCustomAvailability {
|
|
|
249
249
|
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
250
250
|
}
|
|
251
251
|
render() {
|
|
252
|
-
return (h(Host, { key: '
|
|
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) => {
|
|
253
253
|
const participant = this.selectedParticipants[key];
|
|
254
254
|
const participantOpenHours = participant.availability?.open_hours || [];
|
|
255
255
|
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":[],"mapp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C,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 // We extract the unique key (4th segment) to identify the specific participant\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[3];\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 // Extract the unique key (6th segment) to identify the specific participant\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[5];\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,OAA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Aa,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,2 +1,2 @@
|
|
|
1
|
-
export const version = '2.5.
|
|
1
|
+
export const version = '2.5.13';
|
|
2
2
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["export const version = '2.5.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["export const version = '2.5.13';\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NylasEditorTabsGroup$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { N as NylasEditorTabsGroup$1, d as defineCustomElement$1 } from './p-BDVZl2EG.js';
|
|
2
2
|
|
|
3
3
|
const NylasEditorTabsGroup = NylasEditorTabsGroup$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NylasEditorTabs$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { N as NylasEditorTabs$1, d as defineCustomElement$1 } from './p-Csux9e4C.js';
|
|
2
2
|
|
|
3
3
|
const NylasEditorTabs = NylasEditorTabs$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as NylasParticipantsCustomAvailability$1, d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { N as NylasParticipantsCustomAvailability$1, d as defineCustomElement$1 } from './p-B6bT8J6p.js';
|
|
2
2
|
|
|
3
3
|
const NylasParticipantsCustomAvailability = NylasParticipantsCustomAvailability$1;
|
|
4
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -5,7 +5,7 @@ import { h as dayjs, w as utc, x as timezone, a as debug, d as dataResponse, _ a
|
|
|
5
5
|
import { o as o$1, E as ErrorCategory, N as NotificationType } from './p-CWplx7sA.js';
|
|
6
6
|
import { c as createStore } from './p-DVWbg8if.js';
|
|
7
7
|
import { i as instance } from './p-BjxQTsOy.js';
|
|
8
|
-
import { v as version } from './p-
|
|
8
|
+
import { v as version } from './p-KPbwxUCV.js';
|
|
9
9
|
import { d as defineCustomElement$1A } from './p-Dl0Yur5r.js';
|
|
10
10
|
import { d as defineCustomElement$1z } from './p-BVH0Klhu.js';
|
|
11
11
|
import { d as defineCustomElement$1y } from './p-hipsVOV5.js';
|
|
@@ -58,8 +58,8 @@ import { d as defineCustomElement$Q } from './p-EKeBVTKB.js';
|
|
|
58
58
|
import { d as defineCustomElement$P } from './p-Dlku8PCX.js';
|
|
59
59
|
import { d as defineCustomElement$O } from './p-Ch03cZa9.js';
|
|
60
60
|
import { d as defineCustomElement$N } from './p-i8gpwgDT.js';
|
|
61
|
-
import { d as defineCustomElement$M } from './p-
|
|
62
|
-
import { d as defineCustomElement$L } from './p-
|
|
61
|
+
import { d as defineCustomElement$M } from './p-Csux9e4C.js';
|
|
62
|
+
import { d as defineCustomElement$L } from './p-BDVZl2EG.js';
|
|
63
63
|
import { d as defineCustomElement$K } from './p-CiJgH0CI.js';
|
|
64
64
|
import { d as defineCustomElement$J } from './p-ixTtdC_2.js';
|
|
65
65
|
import { d as defineCustomElement$I } from './p-B9G8DJJr.js';
|
|
@@ -81,7 +81,7 @@ import { d as defineCustomElement$t } from './p-DjFQHhGY.js';
|
|
|
81
81
|
import { d as defineCustomElement$s } from './p-B2_cvJns.js';
|
|
82
82
|
import { d as defineCustomElement$r } from './p-DvPuyp-I.js';
|
|
83
83
|
import { d as defineCustomElement$q } from './p-D8f8zHZu.js';
|
|
84
|
-
import { d as defineCustomElement$p } from './p-
|
|
84
|
+
import { d as defineCustomElement$p } from './p-B6bT8J6p.js';
|
|
85
85
|
import { d as defineCustomElement$o } from './p-uQf7jw6y.js';
|
|
86
86
|
import { d as defineCustomElement$n } from './p-D6yyOiee.js';
|
|
87
87
|
import { d as defineCustomElement$m } from './p-umrdj-23.js';
|
|
@@ -3,7 +3,7 @@ import { N as NylasBaseProvider } from './p-4jS2598L.js';
|
|
|
3
3
|
import { $ as normalizeSupportedLanguageCode, L as LANGUAGE_CODE, y as normalizeDateInput, z as addDaysToCurrentDate, a as debug, a0 as detectBrowserLanguageCode, a4 as compactStringToUUIDs, o as LANGUAGE_CODE_TO_LOCALE_MAP, l as capitalizeFirstLetter, I as LANGUAGE_MAP } from './p-BCUF1qcs.js';
|
|
4
4
|
import { E as ErrorCategory, u } from './p-CWplx7sA.js';
|
|
5
5
|
import { i as instance } from './p-BjxQTsOy.js';
|
|
6
|
-
import { v as version, i as isInitialized, a as init, f as feedbackSyncIntegration, c as captureMessage, b as captureFeedback } from './p-
|
|
6
|
+
import { v as version, i as isInitialized, a as init, f as feedbackSyncIntegration, c as captureMessage, b as captureFeedback } from './p-KPbwxUCV.js';
|
|
7
7
|
import { c as createStore } from './p-DVWbg8if.js';
|
|
8
8
|
import { d as defineCustomElement$D } from './p-Dl0Yur5r.js';
|
|
9
9
|
import { d as defineCustomElement$C } from './p-BVH0Klhu.js';
|
|
@@ -174,7 +174,7 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
174
174
|
debug(`Malformed participant name format: ${name}. Expected format: "participant-availability-{participantId}-{uniqueKey}"`);
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
const key = nameParts
|
|
177
|
+
const key = nameParts.slice(3).join('-');
|
|
178
178
|
if (!this.selectedParticipants[key])
|
|
179
179
|
return;
|
|
180
180
|
const existingOpenHours = jsonValue.openHours || [];
|
|
@@ -195,7 +195,7 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
195
195
|
debug(`Malformed participant specific date name format: ${name}. Expected format: "participant-specific-time-availability-{index}-{uniqueKey}"`);
|
|
196
196
|
return;
|
|
197
197
|
}
|
|
198
|
-
const key = nameParts
|
|
198
|
+
const key = nameParts.slice(5).join('-');
|
|
199
199
|
if (!this.selectedParticipants[key])
|
|
200
200
|
return;
|
|
201
201
|
const existingSpecificTimeAvailability = jsonValue || [];
|
|
@@ -272,7 +272,7 @@ const NylasParticipantsCustomAvailability = proxyCustomElement(class NylasPartic
|
|
|
272
272
|
return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';
|
|
273
273
|
}
|
|
274
274
|
render() {
|
|
275
|
-
return (h(Host, { key: '
|
|
275
|
+
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' }, instance.t('nylasParticipantCustomAvailability.headerTitle')), h("p", { key: 'b64aa2227fc6c761161baee71df7ccfa1d4a0c0b' }, instance.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) => {
|
|
276
276
|
const participant = this.selectedParticipants[key];
|
|
277
277
|
const participantOpenHours = participant.availability?.open_hours || [];
|
|
278
278
|
if (!participant || !participant.name)
|
|
@@ -434,6 +434,6 @@ function defineCustomElement() {
|
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
export { NylasParticipantsCustomAvailability as N, defineCustomElement as d };
|
|
437
|
-
//# sourceMappingURL=p-
|
|
437
|
+
//# sourceMappingURL=p-B6bT8J6p.js.map
|
|
438
438
|
|
|
439
|
-
//# sourceMappingURL=p-
|
|
439
|
+
//# sourceMappingURL=p-B6bT8J6p.js.map
|