@nylas/web-elements 2.5.0-canary-20260306042320 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +3417 -3413
  2. package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +370 -370
  3. package/dist/cjs/checkmark-icon_15.cjs.entry.js +3 -0
  4. package/dist/cjs/checkmark-icon_15.cjs.entry.js.map +1 -1
  5. package/dist/cjs/feedbackSync-CwO9ANWC.js.map +1 -1
  6. package/dist/cjs/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.cjs.js.map +1 -1
  7. package/dist/cjs/google-logo-icon_6.cjs.entry.js +19 -11
  8. package/dist/cjs/google-logo-icon_6.cjs.entry.js.map +1 -1
  9. package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +1 -1
  10. package/dist/cjs/nylas-scheduling.cjs.entry.js +5 -1
  11. package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
  12. package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
  13. package/dist/cjs/{version-Co332DgG.js → version-DGl1NcN3.js} +3 -3
  14. package/dist/{esm/version-ClDvNLDf.js.map → cjs/version-DGl1NcN3.js.map} +1 -1
  15. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js +3 -0
  16. package/dist/collection/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.js.map +1 -1
  17. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +12 -5
  18. package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js.map +1 -1
  19. package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +6 -5
  20. package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js.map +1 -1
  21. package/dist/collection/connector/shared/api/scheduler.js +4 -0
  22. package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
  23. package/dist/collection/types/index.js.map +1 -1
  24. package/dist/collection/version.js +1 -1
  25. package/dist/collection/version.js.map +1 -1
  26. package/dist/components/nylas-additional-participants.js +1 -1
  27. package/dist/components/nylas-editor-tabs-group.js +1 -1
  28. package/dist/components/nylas-editor-tabs.js +1 -1
  29. package/dist/components/nylas-event-calendar.js +1 -1
  30. package/dist/components/nylas-scheduler-editor.js +5 -5
  31. package/dist/components/nylas-scheduling.js +5 -1
  32. package/dist/components/nylas-scheduling.js.map +1 -1
  33. package/dist/components/{p-G4bkKoDi.js → p-BGmb8YG2.js} +3 -3
  34. package/dist/components/{p-G4bkKoDi.js.map → p-BGmb8YG2.js.map} +1 -1
  35. package/dist/components/{p-D2ELUj7W.js → p-Bt9X-jsP.js} +11 -10
  36. package/dist/components/p-Bt9X-jsP.js.map +1 -0
  37. package/dist/components/p-C1VNIgoH.js.map +1 -1
  38. package/dist/components/{p-BI99l5Mr.js → p-CHvPIGe5.js} +3 -3
  39. package/dist/components/{p-BI99l5Mr.js.map → p-CHvPIGe5.js.map} +1 -1
  40. package/dist/components/{p-DqM3uP9H.js → p-Cuf3Ml16.js} +5 -2
  41. package/dist/components/p-Cuf3Ml16.js.map +1 -0
  42. package/dist/components/{p-D1kxrvKw.js → p-DBJIEtRG.js} +16 -9
  43. package/dist/components/p-DBJIEtRG.js.map +1 -0
  44. package/dist/esm/checkmark-icon_15.entry.js +3 -0
  45. package/dist/esm/checkmark-icon_15.entry.js.map +1 -1
  46. package/dist/esm/feedbackSync-CquJ7U5v.js.map +1 -1
  47. package/dist/esm/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.js.map +1 -1
  48. package/dist/esm/google-logo-icon_6.entry.js +19 -11
  49. package/dist/esm/google-logo-icon_6.entry.js.map +1 -1
  50. package/dist/esm/nylas-scheduler-editor.entry.js +1 -1
  51. package/dist/esm/nylas-scheduling.entry.js +5 -1
  52. package/dist/esm/nylas-scheduling.entry.js.map +1 -1
  53. package/dist/esm/{version-ClDvNLDf.js → version-x_nQ-XLO.js} +3 -3
  54. package/dist/{cjs/version-Co332DgG.js.map → esm/version-x_nQ-XLO.js.map} +1 -1
  55. package/dist/nylas-web-elements/google-logo-icon.microsoft-logo-icon.nylas-editor-tabs.nylas-editor-tabs-group.nylas-list-configurations.nylas-select-event-type.entry.esm.js.map +1 -1
  56. package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
  57. package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
  58. package/dist/nylas-web-elements/{p-12a29e9d.entry.js → p-06949fd1.entry.js} +2 -2
  59. package/dist/nylas-web-elements/p-1dbfb2bb.entry.js +2 -0
  60. package/dist/nylas-web-elements/p-1dbfb2bb.entry.js.map +1 -0
  61. package/dist/nylas-web-elements/p-1e6e74bb.entry.js +2 -0
  62. package/dist/nylas-web-elements/p-1e6e74bb.entry.js.map +1 -0
  63. package/dist/nylas-web-elements/p-38ff3353.entry.js +2 -0
  64. package/dist/nylas-web-elements/p-38ff3353.entry.js.map +1 -0
  65. package/dist/nylas-web-elements/p-CquJ7U5v.js.map +1 -1
  66. package/dist/nylas-web-elements/p-x_nQ-XLO.js +2 -0
  67. package/dist/nylas-web-elements/{p-ClDvNLDf.js.map → p-x_nQ-XLO.js.map} +1 -1
  68. package/dist/types/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.d.ts +1 -0
  69. package/dist/types/types/index.d.ts +1 -0
  70. package/dist/types/version.d.ts +1 -1
  71. package/package.json +1 -1
  72. package/dist/components/p-D1kxrvKw.js.map +0 -1
  73. package/dist/components/p-D2ELUj7W.js.map +0 -1
  74. package/dist/components/p-DqM3uP9H.js.map +0 -1
  75. package/dist/nylas-web-elements/p-913511c9.entry.js +0 -2
  76. package/dist/nylas-web-elements/p-913511c9.entry.js.map +0 -1
  77. package/dist/nylas-web-elements/p-ClDvNLDf.js +0 -2
  78. package/dist/nylas-web-elements/p-bafa8e30.entry.js +0 -2
  79. package/dist/nylas-web-elements/p-bafa8e30.entry.js.map +0 -1
  80. package/dist/nylas-web-elements/p-d2f6e3d9.entry.js +0 -2
  81. package/dist/nylas-web-elements/p-d2f6e3d9.entry.js.map +0 -1
  82. /package/dist/nylas-web-elements/{p-12a29e9d.entry.js.map → p-06949fd1.entry.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"file":"p-D2ELUj7W.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAY,QAMX;AAND,CAAA,UAAY,QAAQ,EAAA;AAClB,IAAA,QAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjC,IAAA,QAAA,CAAA,gBAAA,CAAA,GAAA,gBAAiC;AACjC,IAAA,QAAA,CAAA,aAAA,CAAA,GAAA,aAA2B;AAC3B,IAAA,QAAA,CAAA,YAAA,CAAA,GAAA,YAAyB;AACzB,IAAA,QAAA,CAAA,cAAA,CAAA,GAAA,cAA6B;AAC/B,CAAC,EANW,QAAQ,KAAR,QAAQ,GAMnB,EAAA,CAAA,CAAA;AAWuB,SAAA,gBAAgB,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAyB,EAAE,QAAa,EAAA;IACzG,QACE,EAAC,QAAQ,EAAA,IAAA;QACN,SAAS,KAAK,QAAQ,CAAC,YAAY,KAClC,CAAA,CAAA,KAAA,EAAA,EAAK,GAAG,EAAE,CAAiB,cAAA,EAAA,EAAE,CAAE,CAAA,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,SAAS,KAAK,QAAQ,CAAC,YAAY,EAAE,eAAe,EAAE,IAAI,EAAE,EAAA;AAC5G,YAAA,CAAA,CAAA,sBAAA,EAAA,IAAA,CAAwB,CACpB,CACP;AACD,QAAA,CAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","NotificationType","i18next","Sentry.isInitialized","Sentry.init","Sentry.feedbackIntegration","Sentry.captureMessage","Sentry.captureFeedback"],"sources":["src/components/scheduler-editor/nylas-editor-tabs-group/tab-contents-group.tsx","src/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.scss?tag=nylas-editor-tabs-group&encapsulation=scoped","src/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.tsx"],"sourcesContent":["import { Fragment, h } from '@stencil/core';\n\nexport enum TabGroup {\n BookingOptions = 'bookingOptions',\n Communications = 'communications',\n BookingForm = 'bookingForm',\n PageStyles = 'pageStyles',\n CalendarView = 'calendarView',\n}\n\nexport type TabGroupContentsProps = {\n id: string;\n formState: any;\n activeTab: TabGroup;\n calendars?: any[];\n currentUser?: any;\n i18next: any;\n};\n\nexport default function TabContentsGroup({ id, formState, activeTab }: TabGroupContentsProps, children: any) {\n return (\n <Fragment>\n {activeTab === TabGroup.CalendarView && (\n <div key={`calendar-view-${id}`} class={{ 'hide': activeTab !== TabGroup.CalendarView, 'calendar-view': true }}>\n <nylas-event-calendar />\n </div>\n )}\n <div key={`booking-options-${id}`} class={{ hide: activeTab !== TabGroup.BookingOptions }}>\n <nylas-scheduling-method\n name=\"availability-method\"\n readOnly={true}\n exportparts=\"nsm, nsm__header, nsm__input-label, nsm__dropdown, nsm__dropdown-button, nsm__dropdown-content\"\n />\n <nylas-custom-booking-flow exportparts={'ncbflow, ncbflow__header, ncbflow__title, ncbflow__content'}>\n <div slot=\"inputs\">\n <nylas-booking-confirmation-type\n name=\"confirmation-type\"\n showComponent={false}\n exportparts={'nbct, nbct__header, nbct__dropdown, nbct__dropdown-button, nbct__dropdown-content'}\n />\n <nylas-booking-confirmation-redirect\n name=\"confirmation-redirect\"\n exportparts={'nbcr, nbcr__header, nbcr__dropdown, nbcr__dropdown-button, nbcr__dropdown-content, nbcr__input-textfield'}\n />\n </div>\n </nylas-custom-booking-flow>\n <nylas-event-limits>\n <div slot=\"inputs\">\n <nylas-min-booking-notice\n name=\"min-booking-notice\"\n exportparts=\"nmbn, nmbn__number-dropdown, nmbn__number-dropdown-button, nmbn__number-dropdown-content, nmbn__period-dropdown, nmbn__period-dropdown-button, nmbn__period-dropdown-content\"\n />\n <nylas-min-cancellation-notice\n name=\"min-cancellation-notice\"\n exportparts=\"nmcn, nmcn__number-dropdown, nmcn__number-dropdown-button, nmcn__number-dropdown-content, nmcn__period-dropdown, nmcn__period-dropdown-button, nmcn__period-dropdown-content\"\n />\n <nylas-cancellation-policy name=\"cancellation-policy\" exportparts=\"ncpolicy, ncpolicy__textarea\" />\n </div>\n </nylas-event-limits>\n <nylas-customize-booking-settings\n showSettings={['hideCancellationOptions', 'hideReschedulingOptions']}\n name=\"customize-booking-settings\"\n exportparts=\"ncbs, ncbs__header, ncbs__settings, ncbs__settings-div, ncbs__additional_guests, ncbs__cancellation_options, ncbs__rescheduling_options\"\n />\n </div>\n <div key={`communications-${id}`} class={{ hide: activeTab !== TabGroup.Communications }}>\n <nylas-disable-emails name=\"disable-emails\" exportparts=\"nde, nde__toggle-label, nde_toggle-input, nde_toggle-slider\" />\n {!formState?.disableEmails && (\n <Fragment>\n <nylas-confirmation-email\n name=\"confirmation-email-template\"\n exportparts={\n 'nce, nce__tab-heading, nce__header, nce__body, nce__confirmation-email-toggle--container, nce__summary, nce__reminder-input_dropdown, nce__reminder-input_dropdown-input, nce__reminder-input_dropdown-content'\n }\n />\n <nylas-reminder-emails\n name=\"reminder-overrides\"\n exportparts={\n 'nre, nre__tab-heading, nre__header, nre__body, nre__confirmation-email-toggle--container, nre__summary, nrt, nrt__number-dropdown, nrt__number-dropdown-button, nrt__number-dropdown-content, nrt__period-dropdown, nrt__period-dropdown-button, nrt__period-dropdown-content, nrt__time-period-selector'\n }\n />\n </Fragment>\n )}\n </div>\n <div key={`page-styles-${id}`} class={{ hide: activeTab !== TabGroup.PageStyles }}>\n <nylas-custom-event-slug name=\"custom-event-slug\" exportparts=\"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield\" />\n <nylas-page-name name=\"page-name\" requirePageName={true} exportparts=\"npn, npn__body, npn__header, npn__drawer-toggle--container, npn__input-textfield\" />\n <nylas-page-styling\n name=\"page-styling\"\n exportparts=\"nps, nps__header, nps__drawer-toggle--container, nps__body, nps__title-input-textfield, nps__company-logo-input-textfield, nps__color-picker, nps__color-picker-button, nps__color-picker-button-label, nps__color-picker-selected-label, nps__submit-button-label-input-textfield, nps__message-textarea\"\n >\n {children}\n </nylas-page-styling>\n </div>\n <div key={`booking-form-${id}`} class={{ hide: activeTab !== TabGroup.BookingForm }}>\n <nylas-booking-form-config\n name=\"additional-fields\"\n exportparts=\"nbfc, nbfc__header, nbfc__add_field, nbfc__add_field-button, nbfc__add_field-content, nbfc__static_fields, nbfc__additional_fields, nbfc__form-field, nbfc__form-field-header, nbfc__form-field-content\"\n />\n </div>\n </Fragment>\n );\n}\n","@use '../../../common/styles/variables' as *;\n@use '../../../common/mixins/buttons' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.scheduler-editor {\n display: flex;\n flex-direction: column;\n height: inherit;\n position: relative;\n\n div.return-to-calendar-view {\n display: flex;\n border-bottom: 1px solid var(--nylas-base-200);\n }\n\n .form-contents {\n display: grid;\n grid-template-columns: minmax(224px, 25%) 1fr;\n height: auto;\n overflow-y: auto;\n min-height: calc(100% - 80px - 48px); // 80px is the height of the footer, 48px is the height of the return-to-calendar-view button\n\n @media #{$mobile} {\n display: table-column-group;\n height: auto;\n min-height: calc(100% - 80px - 196px - 48px);\n }\n\n .tabs {\n display: flex;\n flex-direction: column;\n border-right: 1px solid var(--nylas-base-200);\n\n background-color: var(--nylas-base-25);\n\n .tab {\n display: flex;\n align-items: center;\n text-align: left;\n gap: 0.5rem;\n padding: 0.5rem 1rem;\n color: var(--nylas-base-900);\n background: var(--nylas-base-0);\n border: none;\n height: 56px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n cursor: pointer;\n\n &:not(:first-of-type) {\n margin-top: 0.25rem;\n }\n\n &:last-of-type {\n margin-bottom: 0.25rem;\n }\n\n &.active {\n font-weight: 600;\n background: var(--nylas-base-0);\n color: var(--nylas-primary);\n border-left: 4px solid var(--nylas-primary);\n box-shadow: 0px 1px 2px 0px #0000000f;\n box-shadow: 0px 1px 3px 0px #0000001a;\n }\n\n &.hide {\n display: none;\n }\n }\n\n @media #{$mobile} {\n border-right: none;\n }\n }\n\n .tab-content {\n max-width: 692px;\n overflow-y: auto;\n overflow-x: hidden;\n\n .hide {\n display: none;\n }\n\n .calendar-view {\n position: absolute;\n top: 0;\n left: 0;\n height: calc(100% - 80px);\n width: -webkit-fill-available;\n background: var(--nylas-base-0);\n }\n\n nylas-event-info,\n nylas-event-limits {\n width: inherit;\n\n div[slot='inputs'] {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n }\n }\n\n .tab-header {\n display: flex;\n flex-direction: column;\n margin: 1rem 1rem 0.5rem;\n row-gap: 4px;\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 20px;\n color: var(--nylas-base-600);\n text-align: left;\n }\n }\n }\n }\n}\n\n.footer {\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 1rem;\n min-height: 80px;\n padding: 0 1rem;\n border-top: 1px solid var(--nylas-base-200);\n\n @media #{$mobile} {\n flex-direction: column;\n height: auto;\n z-index: 2;\n }\n\n .preview {\n display: flex;\n gap: 16px;\n\n @media #{$mobile} {\n margin-top: 1rem;\n width: 100%;\n }\n\n button-component.page-settings-button {\n min-width: 140px;\n }\n }\n\n .buttons {\n display: flex;\n justify-content: flex-end;\n align-items: center;\n justify-self: flex-end;\n gap: 1rem;\n\n @media #{$mobile} {\n flex-direction: column-reverse;\n width: 100%;\n }\n\n .footer-buttons__row {\n display: flex;\n gap: 16px;\n\n @media #{$mobile} {\n width: 100%;\n\n button-component[title='Preview'] {\n width: 48px;\n }\n }\n }\n\n p {\n max-width: 524px;\n\n &.unsaved-changes {\n color: var(--nylas-base-600);\n }\n\n &.saved-changes {\n color: var(--nylas-success);\n }\n\n &.error {\n color: var(--nylas-error);\n }\n\n &.error-full-width {\n max-width: 660px;\n }\n }\n\n button-component {\n @media #{$mobile} {\n width: 100%;\n }\n }\n\n button {\n @include primary-button;\n width: 148px;\n\n span {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n }\n }\n\n button-component.save-changes {\n min-width: 140px;\n }\n }\n}\n\nbutton-component#report-issue {\n width: auto;\n}\n\nnylas-feedback-form {\n position: absolute;\n top: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: rgba(0, 0, 0, 0.6);\n z-index: 2;\n border-radius: inherit;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, mergeDeep, parsePreviewLink } from '@/utils/utils';\nimport {\n AdditionalFields,\n Appearance,\n BookingType,\n Calendar,\n Conference,\n Configuration,\n EmailTemplate,\n EventReminder,\n GroupConfiguration,\n GroupEvent,\n GroupEventAPIData,\n ImportGroupEventDetails,\n NotificationType,\n RecurrenceDeleteOption,\n RecurrenceUpdateOption,\n ThemeConfig,\n} from '@nylas/core';\nimport { Component, Element, Event, EventEmitter, Host, Listen, Method, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport TabContentsGroup, { TabGroup } from './tab-contents-group';\nimport { User } from '@/common/nylas-api-request';\nimport { CONFIGURATION_EVENT_TYPE, editorGroupTabComponentNames } from '@/common/constants';\nimport { DataResponseReturnType } from '@/common/types';\nimport * as Sentry from '@sentry/browser';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { CreateGroupEventFormState } from '../../..';\nimport { SchedulerGroupEventDetail } from '@nylas/core';\nimport { ErrorCategory, Notification } from '@/types/index';\nimport { version } from '@/version';\n\n/**\n * The nylas-editor-tabs-group component provides the user interface for managing editor tabs within the scheduler editor.\n * It is primarily used to control the edit mode of the scheduler editor, and it is rendered automatically by the\n * parent component, nylas-scheduler-editor, during editing. There is no need to interact with this component directly\n * or set any props manually, as its behavior is fully managed by the parent component.\n *\n * @part nap__title - [nylas-additional-participants] The title of the component.\n * @part nap__subtitle - [nylas-additional-participants] The subtitle of the component.\n * @part nap__content - [nylas-additional-participants] The content of the component.\n * @part nap__input - [nylas-additional-participants] The input of the component.\n * @part nap__remove-participant - [nylas-additional-participants] The remove participant button of the component.\n * @part nap__add-participant - [nylas-additional-participants] The add participant button of the component.\n * @part nap__header - [nylas-availability-picker] The header of the availability picker\n * @part nap__select-timezone - [nylas-availability-picker] The timezone selection container\n * @part nap__select-timezone-button -[nylas-availability-picker] The timezone selection button\n * @part nap__select-timezone-dropdown-content -[nylas-availability-picker] The timezone selection dropdown content\n * @part nap__availability - [nylas-availability-picker] The availability container\n * @part nap__day - [nylas-availability-picker] The day container\n * @part nap__time-ranges - [nylas-availability-picker] The time ranges container\n * @part nap__time-range - [nylas-availability-picker] The time range container\n * @part nap__add-time-range - [nylas-availability-picker] The add time range button\n * @part nap__time-picker-container -[nylas-availability-picker] The time picker container\n * @part nap__time-picker-input - [nylas-availability-picker] The time picker input\n * @part nap__time-picker-times - [nylas-availability-picker] The time picker times\n * @part nbcp - [nylas-booking-calendar-picker] The booking calendar picker container\n * @part nbcp__header - [nylas-booking-calendar-picker] The header of the booking calendar picker\n * @part nbcp__input-label - [nylas-booking-calendar-picker] The input label of the booking calendar picker\n * @part nbcp__dropdown - [nylas-booking-calendar-picker] The dropdown container\n * @part nbcp__dropdown-button - [nylas-booking-calendar-picker] The dropdown button\n * @part nbcp__dropdown-content - [nylas-booking-calendar-picker] The dropdown content\n * @part nbt - [nylas-buffer-time] The buffer time container\n * @part nbt__header - [nylas-buffer-time] The header of the buffer time\n * @part nbt__body - [nylas-buffer-time] The body of the buffer time\n * @part nbt__dropdown-before - [nylas-buffer-time] The before buffer dropdown container\n * @part nbt__dropdown-button-before - [nylas-buffer-time] The before buffer dropdown button\n * @part nbt__dropdown-content-before - [nylas-buffer-time] The before buffer dropdown content\n * @part nbt__dropdown-after - [nylas-buffer-time] The after buffer dropdown container\n * @part nbt__dropdown-button-after - [nylas-buffer-time] The after buffer dropdown button\n * @part nbt__dropdown-content-after - [nylas-buffer-time] The after buffer dropdown content\n * @part nbt__preview - [nylas-buffer-time] The buffer time preview\n * @part ncp - [nylas-calendar-picker] The calendar picker container\n * @part ncp__header - [nylas-calendar-picker] The header of the calendar picker\n * @part ncp__dropdown - [nylas-calendar-picker] The dropdown container\n * @part ncp__dropdown-button - [nylas-calendar-picker] The dropdown button\n * @part ncp__dropdown-content - [nylas-calendar-picker] The dropdown content\n * @part ncbf - [nylas-custom-booking-flow] The custom booking flow container\n * @part ncbf__header - [nylas-custom-booking-flow] The header of the custom booking flow\n * @part ncbf__dropdown - [nylas-custom-booking-flow] The dropdown container\n * @part ncbf__dropdown-button - [nylas-custom-booking-flow] The dropdown button\n * @part ncbf__dropdown-content - [nylas-custom-booking-flow] The dropdown content\n * @part nedesc - [nylas-event-description] The event description container\n * @part nedesc__textarea - [nylas-event-description] The event description textarea\n * @part ned - [nylas-event-duration] The event duration container\n * @part ned__dropdown - [nylas-event-duration] The dropdown container for the duration increment\n * @part ned__dropdown-button - [nylas-event-duration] The dropdown button for the duration increment\n * @part ned__dropdown-content - [nylas-event-duration] The dropdown content for the duration increment\n * @part ned__input_dropdown - [nylas-event-duration] The input dropdown container for the duration minutes\n * @part ned__input_dropdown-input - [nylas-event-duration] The input for the duration minutes\n * @part ned__input_dropdown-content - [nylas-event-duration] The dropdown content for the input duration minutes\n * @part net - [nylas-event-title] The event title container\n * @part net__title - [nylas-event-title] The event title input\n * @part net__dropdown-content - [nylas-event-title] The token options container\n * @part nlfb - [nylas-limit-future-bookings] The limit future bookings container\n * @part nlfb__number-dropdown - [nylas-limit-future-bookings] The number dropdown container\n * @part nlfb__number-dropdown-button - [nylas-limit-future-bookings] The number dropdown button\n * @part nlfb__number-dropdown-content - [nylas-limit-future-bookings] The number dropdown content\n * @part nlfb__period-dropdown - [nylas-limit-future-bookings] The period dropdown container\n * @part nlfb__period-dropdown-button - [nylas-limit-future-bookings] The period dropdown button\n * @part nlfb__period-dropdown-content - [nylas-limit-future-bookings] The period dropdown content\n * @part nel - [nylas-event-location] The event location container\n * @part nel__location - [nylas-event-location] The event location input\n * @part nel__dropdown - [nylas-event-location] The dropdown container\n * @part nel__dropdown-button - [nylas-event-location] The dropdown button\n * @part nel__dropdown-content - [nylas-event-location] The dropdown content\n * @part nmbn - [nylas-min-booking-notice] The minimum booking notice container\n * @part nmbn__number-dropdown - [nylas-min-booking-notice] The number dropdown container\n * @part nmbn__number-dropdown-button - [nylas-min-booking-notice] The number dropdown button\n * @part nmbn__number-dropdown-content -[nylas-min-booking-notice] The number dropdown content\n * @part nmbn__period-dropdown - [nylas-min-booking-notice] The period dropdown container\n * @part nmbn__period-dropdown-button - [nylas-min-booking-notice] The period dropdown button\n * @part nmbn__period-dropdown-content - [nylas-min-booking-notice] The period dropdown content\n * @part nmcn - [nylas-min-cancellation-notice] The minimum cancellation notice container\n * @part nmcn__number-dropdown - [nylas-min-cancellation-notice] The number dropdown container\n * @part nmcn__number-dropdown-button - [nylas-min-cancellation-notice] The number dropdown button\n * @part nmcn__number-dropdown-content - [nylas-min-cancellation-notice] The number dropdown content\n * @part nmcn__period-dropdown - [nylas-min-cancellation-notice] The period dropdown container\n * @part nmcn__period-dropdown-button - [nylas-min-cancellation-notice] The period dropdown button\n * @part nmcn__period-dropdown-content - [nylas-min-cancellation-notice] The period dropdown content\n * @part ncpolicy - [nylas-cancellation-policy] The cancellation policy container\n * @part ncpolicy__textarea - [nylas-cancellation-policy] The cancellation policy textarea\n * @part nti - [nylas-timeslot-interval] The timeslot interval container\n * @part nti__header - [nylas-timeslot-interval] The header of the timeslot interval picker\n * @part nti__input-label - [nylas-timeslot-interval] The input label of the timeslot interval picker\n * @part nti__dropdown - [nylas-timeslot-interval] The dropdown container\n * @part nti__dropdown-button - [nylas-timeslot-interval] The dropdown button\n * @part nti__dropdown-content - [nylas-timeslot-interval] The dropdown content\n * @part npca - [nylas-participants-custom-availability] The participants custom availability container\n * @part npca__header - [nylas-participants-custom-availability] The header of the participants custom availability\n * @part npca__content - [nylas-participants-custom-availability] The content of the participants custom availability\n * @part npca__participant-container - [nylas-participants-custom-availability] The participant container\n * @part npca__participant-title - [nylas-participants-custom-availability] The participant title\n * @part npca__participant-toggle--container - [nylas-participants-custom-availability] The participant toggle container\n * @part npca__toggle-label - [nylas-participants-custom-availability] The toggle label\n * @part npca__toggle-input - [nylas-participants-custom-availability] The toggle input\n * @part npca__toggle-slider - [nylas-participants-custom-availability] The toggle slider\n * @part ncbs - [nylas-customize-booking-settings] The booking calendar picker container\n * @part ncbs__header - [nylas-customize-booking-settings] The header of the booking calendar picker\n * @part ncbs__settings - [nylas-customize-booking-settings] The settings container\n * @part ncbs__settings-div - [nylas-customize-booking-settings] The div inside the settings container that contains the checkbox and tooltip for each setting\n * @part ncbs__additional_guests - [nylas-customize-booking-settings] The additional guests setting\n * @part ncbs__cancellation_options - [nylas-customize-booking-settings] The cancellation options setting\n * @part ncbs__rescheduling_options - [nylas-customize-booking-settings] The rescheduling options setting\n * @part nsm - [nylas-scheduling-method] The booking calendar picker container\n * @part nsm__header - [nylas-scheduling-method] The header of the booking calendar picker\n * @part nsm__input-label - [nylas-scheduling-method] The input label of the booking calendar picker\n * @part nsm__dropdown - [nylas-scheduling-method] The dropdown container\n * @part nsm__dropdown-button - [nylas-scheduling-method] The dropdown button\n * @part nsm__dropdown-content - [nylas-scheduling-method] The dropdown content\n * @part npn - The nylas-page-name container\n * @part npn__body - The body of the event communication section\n * @part npn__header - The header of the event communication section\n * @part npn__drawer-toggle--container - The card's drawer toggle container\n * @part npn__input-textfield - The page name textfield\n * @part editor__form-contents - The form contents container\n * @part editor__tab - The tabs container\n * @part editor__tab-content - The tab content container\n * @part editor__footer - The footer container\n * @part editor__footer-preview - The preview button container\n * @part editor__footer-buttons - The buttons container\n */\n@Component({\n tag: 'nylas-editor-tabs-group',\n styleUrl: 'nylas-editor-tabs-group.scss',\n scoped: true,\n})\nexport class NylasEditorTabsGroup {\n /**\n * The form reference to access the form data.\n */\n private formRef!: HTMLFormElement;\n /**\n * The host element.\n */\n @Element() host!: HTMLNylasEditorTabsGroupElement;\n // Props\n /**\n * @standalone\n * The list of calendars to use in the editor when configuring availability.\n */\n @Prop() calendars?: Calendar[];\n /**\n * @standalone\n * The selected configuration to use in the editor when editing an existing configuration or creating a new one.\n */\n @Prop() selectedConfiguration?: GroupConfiguration;\n\n /**\n * @standalone\n * The list of configurations\n */\n @Prop() configurations?: (Configuration | GroupConfiguration)[];\n\n /**\n * @standalone\n * The current logged in user.\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The scheduler preview link to use when the user clicks on the preview button.\n * You can use a placeholder `{config.id}` to replace the configuration id anywhere in the link.\n */\n @Prop({ attribute: 'scheduler-preview-link' }) schedulerPreviewLink: string = '';\n /**\n * @standalone\n * The mode of the editor.\n * - `app`: The editor is used as a standalone app.\n * - `composable`: The editor is used as a composable component.\n */\n @Prop() mode?: 'app' | 'composable' = 'app';\n /**\n * @standalone\n * This prop is passed down by the parent component.\n * It is an optional prop is used to hide tabs in the editor. Available tabs are:\n * eventInfo, availability, participants, bookingOptions, bookingForm\n */\n @Prop() hideEditorTabs?: TabGroup[] = [];\n /**\n * @standalone\n * This prop is passed down by the parent component to enable or disable user feedback.\n */\n @Prop() enableUserFeedback?: boolean = true;\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The selected event type.\n */\n @Prop() selectedEventType?: CONFIGURATION_EVENT_TYPE;\n\n /**\n * The selected group event.\n */\n @Prop() selectedGroupEvent?: GroupEventAPIData;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n // State\n /**\n * The action to perform in the editor.\n * - `create`: Create a new configuration.\n * - `edit`: Edit an existing configuration.\n */\n @State() action: 'create' | 'edit' = 'create';\n /**\n * The state for showing the feedback modal.\n */\n @State() showFeedbackModal: boolean = false;\n /**\n * The active tab in the editor.\n */\n @State() activeTab: TabGroup = TabGroup.CalendarView;\n /**\n * The loading state of the editor.\n */\n @State() isLoading: boolean = false;\n /**\n * The component loaded state of the editor.\n */\n @State() componentLoaded: boolean = false;\n /**\n * The unsaved changes state of the editor.\n */\n @State() hasUnsavedChanges: boolean = false;\n /**\n * The changes saved state of the editor.\n */\n @State() changesSaved: boolean = false;\n /**\n * The form state of the editor.\n */\n @State() formState: Partial<{\n title: string;\n description: string;\n participants: {\n name: string;\n email: string;\n is_organizer?: boolean;\n }[];\n additionalFields?: Record<string, AdditionalFields>;\n bookingCalendar?: string;\n location?: string;\n conferencing?: Conference;\n bookingType?: string;\n cancellationPolicy?: string;\n minCancellationNotice?: number;\n minBookingNotice?: number;\n hideCancellationOptions?: boolean;\n hideReschedulingOptions?: boolean;\n reminders?: EventReminder[];\n emailTemplate?: EmailTemplate;\n redirectUrl?: string;\n slug: string;\n appearance: Appearance;\n name: string;\n eventCapacity: number;\n eventTimeslot: {\n when: {\n start_time: number;\n end_time: number;\n start_timezone: string;\n end_timezone: string;\n };\n recurrence: string[];\n };\n disableEmails?: boolean;\n organizerLocale?: string;\n }> = {};\n /**\n * The error state of the editor.\n */\n @State() error?: {\n message: string;\n type: NotificationType | undefined;\n category: ErrorCategory | undefined;\n title: string;\n } = {\n message: '',\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: '',\n };\n\n // Events\n /**\n * Event emitted when the group scheduler configuration form is submitted and ready to be processed (before the API request is made). This fires for both create and edit actions after client-side validation passes.\n */\n @Event() schedulerConfigChanged!: EventEmitter<SchedulerGroupEventDetail & { host: HTMLNylasEditorTabsGroupElement }>;\n /**\n * Event emitted when a group scheduler configuration is successfully created via the API. This fires only for create actions after the API request completes successfully.\n */\n @Event() schedulerConfigCreated!: EventEmitter<SchedulerGroupEventDetail & { host: HTMLNylasEditorTabsGroupElement }>;\n /**\n * Event emitted when the user clicks the cancel button to exit the group scheduler editor.\n */\n @Event() cancelButtonClick!: EventEmitter<void>;\n /**\n * Event emitted at the very beginning of form submission, before any validation occurs. This event is cancelable and can prevent the submission process if preventDefault() is called.\n */\n @Event({ bubbles: true, cancelable: true }) formSubmitted!: EventEmitter<void>;\n /**\n * Event emitted when the user clicks the preview button. This fires before the preview link is opened and can be used to override the default preview behavior.\n */\n @Event() previewButtonClicked!: EventEmitter<HTMLNylasEditorTabsGroupElement>;\n /**\n * Event emitted whenever any form field value changes within the group scheduler editor. This provides real-time updates as users modify form inputs.\n */\n @Event() schedulerEditorFormUpdated!: EventEmitter<{ value: string; name: string }>;\n\n /**\n * Event emitted when the user requests to create a new group event in the calendar view. This fires when the create button is clicked and validation passes.\n */\n @Event() groupEventCreateTriggered!: EventEmitter<{ groupEvent: Partial<GroupEvent>; configId: string; host: HTMLNylasEditorTabsGroupElement }>;\n\n /**\n * Event emitted when the user requests to save changes to an existing group event. This fires after validation passes and includes the recurrence update option chosen by the user.\n */\n @Event() groupEventUpdateTriggered!: EventEmitter<{\n groupEvent: GroupEvent;\n chosenOption: RecurrenceUpdateOption;\n configId: string;\n host: HTMLNylasEditorTabsGroupElement;\n }>;\n\n /**\n * Event emitted when the user requests to delete a group event. This fires when the delete button is clicked and includes the recurrence delete option chosen by the user.\n */\n @Event() groupEventDeleteTriggered!: EventEmitter<{\n groupEvent: GroupEvent;\n chosenOption: RecurrenceDeleteOption;\n configId: string;\n host: HTMLNylasEditorTabsGroupElement;\n }>;\n\n /**\n * Event emitted when the user requests to import group events from an external source. This fires when the import action is triggered in the calendar view.\n */\n @Event() groupEventImportTriggered!: EventEmitter<{\n groupEvent: ImportGroupEventDetails;\n configId: string;\n host: HTMLNylasEditorTabsGroupElement;\n }>;\n\n /**\n * Event emitted when validation errors prevent saving changes to a group event. This provides error details for handling failed save attempts.\n */\n @Event() saveGroupEventChangesError!: EventEmitter<{\n error: string;\n configId: string;\n host: HTMLNylasEditorTabsGroupElement;\n }>;\n\n /**\n * Event emitted when the component needs to display an error notification to the user. This includes validation errors, API errors, and other component-level errors.\n */\n @Event({ cancelable: false }) readonly nylasSchedulerError!: EventEmitter<{ notification: Notification; host: HTMLElement }>;\n\n /**\n * Event emitted when the user dismisses an error notification, allowing parent components to handle cleanup or additional actions.\n */\n @Event({ cancelable: false }) dismissNotification!: EventEmitter<{ id: string; host: HTMLNylasEditorTabsGroupElement }>;\n\n // Watchers\n /**\n * Watches for changes in the selected configuration and updates the form state.\n */\n @Watch('selectedConfiguration')\n configChangedHandler(newConfig: GroupConfiguration) {\n debug('[nylas-editor-tabs-group]', 'configChangedHandler', newConfig, this.selectedConfiguration);\n this.formState = {\n ...this.getFormStateFromConfig(newConfig),\n };\n if (newConfig?.id) {\n this.action = 'edit';\n } else {\n this.action = 'create';\n }\n }\n\n /**\n * Watches for changes in the selected group event and updates the form state.\n */\n @Watch('selectedGroupEvent')\n selectedGroupEventChangedHandler(newConfig: GroupEventAPIData) {\n debug('[nylas-editor-tabs-group]', 'selectedGroupEventChangedHandler', newConfig, this.selectedConfiguration);\n this.formState = {\n ...this.formState,\n title: this.selectedGroupEvent?.event?.title,\n description: this.selectedGroupEvent?.event?.description,\n location: this.selectedGroupEvent?.event?.location,\n conferencing: this.selectedGroupEvent?.event?.conferencing,\n eventCapacity: this.selectedGroupEvent?.group_event_info?.capacity,\n participants: this.selectedGroupEvent?.group_event_info?.participants?.map(participant => ({\n name: participant.name,\n email: participant.email,\n is_organizer: !!participant.is_organizer,\n })),\n eventTimeslot: this.selectedGroupEvent?.event?.when\n ? {\n when: {\n start_time: this.selectedGroupEvent?.event?.when?.start_time as number,\n end_time: this.selectedGroupEvent?.event?.when?.end_time as number,\n start_timezone: this.selectedGroupEvent?.event?.when?.start_timezone as string,\n end_timezone: this.selectedGroupEvent?.event?.when?.end_timezone as string,\n },\n recurrence: this.selectedGroupEvent?.group_event_info?.rrule ? this.selectedGroupEvent?.group_event_info?.rrule : [],\n }\n : undefined,\n };\n }\n\n /**\n * Watches for changes in the current user and updates the form state.\n */\n @Watch('currentUser')\n userChangedHandler(newUser: User) {\n // Actively watch for changes in the current user to update the form state.\n debug('[nylas-editor-tabs-group]', 'userChangedHandler', newUser);\n if (newUser) {\n this.formState = {\n ...this.getFormStateFromConfig(this.selectedConfiguration),\n };\n }\n }\n\n /**\n * Watches for changes in the selected language and updates the form state.\n */\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n if (this.error && this.error.message) {\n this.error = {\n ...this.error,\n message: i18next.t('fixFormErrors'),\n };\n this.showErrorNotification(this.error);\n }\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 // Methods\n /**\n * Event handler for the scheduler config created event.\n */\n @Method()\n async schedulerConfigCreatedEventHandler(data: SchedulerGroupEventDetail & { host: HTMLNylasEditorTabsGroupElement }) {\n const event = this.schedulerConfigCreated.emit(data);\n return event;\n }\n\n /**\n * Sets the error state of the editor.\n */\n @Method()\n async setError(error: { message: string; type: NotificationType; category: ErrorCategory; title: string }) {\n this.error = {\n message: error.message,\n type: error.type,\n category: error.category,\n title: error.title || i18next.t('genericErrorTitle'),\n };\n if (this.error?.message) {\n this.showErrorNotification(this.error);\n }\n }\n\n /**\n * Resets the error state of the editor.\n */\n @Method()\n async resetError() {\n if (this.error?.message) {\n this.dismissNotification.emit({ id: this.error?.message.split(' ').join('-'), host: this.host });\n }\n this.error = {\n message: '',\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: '',\n };\n }\n\n // Lifecycle methods\n connectedCallback() {\n debug('[nylas-editor-tabs-group]', '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 componentWillLoad() {\n debug('[nylas-editor-tabs-group]', 'componentWillLoad');\n this.formState = this.getFormStateFromConfig(this.selectedConfiguration);\n }\n\n componentDidLoad() {\n debug('[nylas-editor-tabs-group]', 'componentDidLoad');\n if (this.enableUserFeedback && !Sentry.isInitialized()) {\n Sentry.init({\n dsn: 'https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816',\n release: version,\n integrations: integrations => [\n ...integrations.filter(_integration => false), // Removes default integrations (including Breadcrumbs)\n Sentry.feedbackIntegration({\n colorScheme: 'system',\n autoInject: false,\n }),\n ],\n // Disable all other event capture\n autoSessionTracking: false, // Disable session tracking\n beforeSend: () => null, // Prevents error events from being sent\n });\n }\n if (this.selectedConfiguration?.id) {\n this.configChangedHandler(this.selectedConfiguration);\n }\n const firstVisibleTab = (this.host.querySelector('button.tab:not(.hide)') as HTMLButtonElement)?.name as TabGroup;\n if (firstVisibleTab && this.hideEditorTabs?.includes(this.activeTab)) {\n this.activeTab = firstVisibleTab;\n }\n this.updateFormState();\n this.componentLoaded = true;\n }\n\n disconnectedCallback() {\n debug('[nylas-editor-tabs-group]', 'disconnectedCallback');\n }\n\n // Event listeners\n /**\n * Event listener for the value changed event.\n */\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs-group]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n debug('name', name, 'value', value);\n this.setFormState(value, name);\n this.formState = { ...this.formState };\n if (editorGroupTabComponentNames.includes(name)) {\n this.hasUnsavedChanges = true;\n }\n this.host.resetError();\n this.schedulerEditorFormUpdated.emit({\n value: event.detail.value,\n name: event.detail.name,\n });\n }\n\n /**\n * Event listener for the feedback modal closed event.\n */\n @Listen('feedbackModalClosed')\n feedbackModalClosedHandler() {\n this.showFeedbackModal = false;\n }\n\n /**\n * Event listener for the feedback submitted event.\n */\n @Listen('feedbackSubmitted')\n feedbackSubmittedHandler(event: CustomEvent<{ feedback: string }>) {\n const eventId = Sentry.captureMessage('Scheduler Editor User Feedback');\n const feedback = {\n eventId: eventId,\n message: event.detail.feedback,\n };\n\n Sentry.captureFeedback(feedback, {\n includeReplay: true,\n captureContext: {\n tags: {\n 'nylas-web-element': 'nylas-scheduler-editor',\n 'nylas-web-element-version': version,\n },\n extra: {\n configId: this.selectedConfiguration?.id,\n slug: this.selectedConfiguration?.slug,\n },\n },\n });\n this.showFeedbackModal = false;\n }\n\n /**\n * Event listener for the import group event event.\n */\n @Listen('importGroupEvent')\n importGroupEventHandler(event: CustomEvent<ImportGroupEventDetails>) {\n this.groupEventImportTriggered.emit({ groupEvent: event.detail, configId: this.selectedConfiguration?.id ?? '', host: this.host });\n }\n\n /**\n * Event listener for the save group event changes event.\n */\n @Listen('saveGroupEventChanges')\n saveGroupEventChangesHandler(event: CustomEvent<{ data: GroupEventAPIData; action: RecurrenceUpdateOption }>) {\n debug('saveGroupEventChangesHandler', event.detail, this.selectedGroupEvent);\n const valid = this.formRef.checkValidity();\n const groupEvent = this.getGroupEventDetailsFromFormState();\n this.resetError();\n if (!groupEvent.title) {\n this.setError({\n message: i18next.t('nylasEditorTabsGroup.eventTitleRequired'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabs.formErrorTitle'),\n });\n }\n if (!groupEvent.when?.start_time || !groupEvent.when?.end_time) {\n this.setError({\n message: i18next.t('nylasEditorTabsGroup.eventTimeRequired'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabs.formErrorTitle'),\n });\n }\n if (!groupEvent.participants?.length) {\n this.setError({\n message: i18next.t('nylasEditorTabsGroup.participantsRequired'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabs.formErrorTitle'),\n });\n }\n if (groupEvent.participants?.length && groupEvent.participants?.some(p => !p.email)) {\n this.setError({\n message: i18next.t('nylasEditorTabsGroup.participantEmailRequired'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabs.formErrorTitle'),\n });\n }\n if (this.error?.message !== '' || !valid) {\n this.saveGroupEventChangesError.emit({\n error: this.error?.message ?? i18next.t('nylasEditorTabsGroup.errorOccured'),\n configId: this.selectedConfiguration?.id ?? '',\n host: this.host,\n });\n return;\n }\n\n this.groupEventUpdateTriggered.emit({\n groupEvent: groupEvent,\n chosenOption: event.detail.action,\n configId: this.selectedConfiguration?.id ?? '',\n host: this.host,\n });\n }\n\n /**\n * Event listener for the delete group event event.\n */\n @Listen('deleteGroupEvent')\n deleteGroupEventHandler(event: CustomEvent<{ data: GroupEventAPIData; action: RecurrenceDeleteOption }>) {\n debug('deleteGroupEventHandler', event.detail);\n const groupEvent = this.getGroupEventDetailsFromFormState();\n this.groupEventDeleteTriggered.emit({\n groupEvent: groupEvent,\n chosenOption: event.detail.action,\n configId: this.selectedConfiguration?.id ?? '',\n host: this.host,\n });\n }\n\n /**\n * Event listener for the create group event event.\n */\n @Listen('createGroupEvent')\n createGroupEventHandler(event: CustomEvent<CreateGroupEventFormState>) {\n const formState = event.detail;\n const organizer = {\n name: this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: this.currentUser?.email ?? '',\n };\n const organizerDefaultCal = this.calendars?.find(c => c.is_primary) ?? this.calendars?.[0];\n const conferencing = this.formState?.conferencing || formState.conferencing;\n const groupEvent = {\n title: formState.title,\n description: formState.description,\n location: !conferencing ? formState.location : undefined,\n participants: formState.participants,\n organizer: organizer,\n conferencing: !formState.location ? conferencing : undefined,\n when: formState.eventTimeslot.when,\n recurrence: formState.eventTimeslot.recurrence,\n calendar_id: organizerDefaultCal?.id || 'primary',\n capacity: formState.eventCapacity,\n };\n this.groupEventCreateTriggered.emit({ groupEvent, configId: this.selectedConfiguration?.id ?? '', host: this.host });\n }\n\n showErrorNotification(error: { message: string; type: NotificationType | undefined; category: ErrorCategory | undefined; title: string }) {\n this.nylasSchedulerError.emit({\n notification: {\n title: error.title,\n category: error.category || ErrorCategory.Component,\n type: error.type || NotificationType.Error,\n description: error.message,\n id: error.message.split(' ').join('-'),\n ttl: 'none',\n },\n host: this.host,\n });\n }\n\n /**\n * Gets the group event details from the form state.\n */\n getGroupEventDetailsFromFormState() {\n const organizerDefaultCal = this.calendars?.find(c => c.is_primary) ?? this.calendars?.[0];\n const organizer = {\n name: this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: this.currentUser?.email ?? '',\n };\n const participantOrganizer = [{ ...organizer, is_organizer: true }];\n const { title, description, bookingCalendar, location, conferencing, eventCapacity, eventTimeslot, participants } = this.formState;\n\n return {\n title: title,\n description: description,\n location: !conferencing ? location : undefined,\n conferencing: !location ? conferencing : undefined,\n when: {\n start_time: eventTimeslot?.when?.start_time ?? 0,\n end_time: eventTimeslot?.when?.end_time ?? 0,\n start_timezone: eventTimeslot?.when?.start_timezone ?? '',\n end_timezone: eventTimeslot?.when?.end_timezone ?? '',\n },\n recurrence: eventTimeslot?.recurrence ?? [],\n calendar_id: bookingCalendar || organizerDefaultCal?.id || 'primary',\n participants: participants?.length ? participants : participantOrganizer,\n organizer: organizer,\n capacity: eventCapacity || 10,\n } as any;\n }\n\n /**\n * Gets the form state from the selected configuration.\n */\n getFormStateFromConfig(config?: GroupConfiguration) {\n if (config?.appearance) {\n debug('Appearance settings have been returned from the given configuration; please remember to grab them from the configSettingsLoaded event and apply them as desired.');\n }\n return {\n additionalFields: config?.scheduler?.additional_fields ?? {},\n bookingType: config?.group_booking?.booking_type ?? 'booking',\n cancellationPolicy: config?.scheduler?.cancellation_policy ?? '',\n minCancellationNotice: config?.scheduler?.min_cancellation_notice ?? 0,\n minBookingNotice: config?.scheduler?.min_booking_notice ?? 60,\n hideCancellationOptions: config?.scheduler?.hide_cancellation_options ?? false,\n hideReschedulingOptions: config?.scheduler?.hide_rescheduling_options ?? false,\n reminders: config?.group_booking?.reminders,\n emailTemplate: config?.scheduler?.email_template,\n redirectUrl: config?.scheduler?.confirmation_redirect_url,\n slug: config?.slug,\n appearance: config?.appearance,\n name: config?.name,\n bookingCalendar: config?.group_booking?.calendar_id,\n disableEmails: config?.group_booking?.disable_emails,\n organizerLocale: config?.scheduler?.email_template?.organizer_locale,\n };\n }\n\n /**\n * Sets the form state from the form data.\n */\n setFormState(value, key) {\n switch (key) {\n case 'title':\n this.formState.title = value.toString();\n break;\n case 'description':\n this.formState.description = value.toString();\n break;\n case 'location':\n this.formState.location = value.toString();\n break;\n case 'conference':\n this.formState.conferencing = JSON.parse(value.toString());\n break;\n case 'confirmation-type':\n this.formState.bookingType = value.toString();\n break;\n case 'min-cancellation-notice':\n this.formState.minCancellationNotice = parseInt(value.toString());\n break;\n case 'min-booking-notice':\n this.formState.minBookingNotice = parseInt(value.toString());\n break;\n case 'cancellation-policy':\n this.formState.cancellationPolicy = value.toString();\n break;\n case 'customize-booking-settings': {\n const settings = JSON.parse(value.toString());\n this.formState.hideCancellationOptions = settings.hideCancellationOptions;\n this.formState.hideReschedulingOptions = settings.hideReschedulingOptions;\n break;\n }\n case 'booking-calendar':\n this.formState.bookingCalendar = value.toString();\n break;\n case 'event-capacity':\n this.formState.eventCapacity = parseInt(String(value));\n break;\n case 'additional-fields':\n this.formState.additionalFields = JSON.parse(value.toString());\n break;\n case 'confirmation-email-template':\n this.formState.emailTemplate = JSON.parse(value.toString());\n break;\n case 'reminder-overrides':\n this.formState.reminders = JSON.parse(value.toString());\n break;\n case 'confirmation-redirect':\n this.formState.redirectUrl = value.toString();\n break;\n case 'custom-event-slug':\n debug('custom-event-slug', value);\n this.formState.slug = JSON.parse(value.toString());\n break;\n case 'page-styling':\n this.formState.appearance = JSON.parse(value.toString());\n break;\n case 'page-name':\n this.formState.name = JSON.parse(value.toString());\n break;\n case 'participants': {\n const participants = JSON.parse(value.toString());\n this.formState.participants = participants.map(participant => ({\n name: participant.name,\n email: participant.email,\n is_organizer: participant.is_organizer,\n }));\n break;\n }\n case 'event-timeslot':\n this.formState.eventTimeslot = JSON.parse(value.toString());\n break;\n case 'disable-emails': {\n const { disableEmails, organizerLocale } = JSON.parse(value.toString());\n this.formState.disableEmails = disableEmails;\n this.formState.organizerLocale = organizerLocale;\n break;\n }\n }\n this.schedulerEditorFormUpdated.emit({\n value,\n name: key,\n });\n }\n\n /**\n * Updates the form state from the form data.\n */\n updateFormState() {\n const formData = new FormData(this.formRef);\n formData.forEach((value, key) => {\n this.setFormState(value, key);\n });\n\n this.formState = { ...this.formState };\n return this.formState;\n }\n\n /**\n * Sets the active tab.\n */\n setActiveTab(e: Event, tabName: TabGroup) {\n e.preventDefault();\n this.updateFormState();\n this.activeTab = tabName;\n }\n\n /**\n * Handles the form submission.\n */\n formSubmissionHandler = async (event: Event) => {\n event.preventDefault();\n const formEvent = await this.formSubmitted.emit();\n debug('[nylas-editor-tabs-group]', 'formSubmissionHandler', formEvent);\n const valid = this.formRef.checkValidity();\n if (!valid || formEvent.defaultPrevented) {\n await this.host.setError({\n message: this.formRef.validationMessage || i18next.t('fixFormErrors'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabs.formErrorTitle'),\n });\n return;\n }\n this.isLoading = true;\n this.hasUnsavedChanges = false;\n const formState = this.updateFormState();\n debug('[nylas-editor-tabs-group]', 'formState', formState);\n const {\n title,\n description,\n bookingCalendar,\n location,\n bookingType,\n minCancellationNotice,\n minBookingNotice,\n cancellationPolicy,\n hideCancellationOptions,\n hideReschedulingOptions,\n additionalFields,\n conferencing,\n reminders,\n emailTemplate,\n redirectUrl,\n slug,\n appearance,\n name,\n eventCapacity,\n eventTimeslot,\n participants,\n disableEmails,\n organizerLocale,\n } = formState;\n\n const configObject: Partial<GroupConfiguration> = {\n ...(this.selectedConfiguration?.id && { id: this.selectedConfiguration.id }),\n slug: slug,\n name: name,\n type: this.selectedEventType === CONFIGURATION_EVENT_TYPE.group ? CONFIGURATION_EVENT_TYPE.group : undefined,\n scheduler: {\n cancellation_policy: cancellationPolicy ?? '',\n min_cancellation_notice: minCancellationNotice ?? 0,\n min_booking_notice: minBookingNotice ?? 60,\n hide_cancellation_options: hideCancellationOptions ?? false,\n hide_rescheduling_options: hideReschedulingOptions ?? false,\n additional_fields: additionalFields,\n email_template: emailTemplate\n ? {\n ...emailTemplate,\n organizer_locale: organizerLocale || 'en',\n logo: emailTemplate.logo || '',\n }\n : undefined,\n confirmation_redirect_url: redirectUrl,\n },\n appearance: appearance,\n group_booking: {\n booking_type: bookingType ? (bookingType as BookingType) : 'booking',\n disable_emails: typeof disableEmails === 'boolean' ? disableEmails : false,\n reminders: reminders,\n conferencing: conferencing,\n calendar_id: bookingCalendar || 'primary',\n default_capacity: eventCapacity || 10,\n },\n };\n\n const configObjectWithDeveloperSettings = mergeDeep(this.selectedConfiguration, configObject || {});\n\n const finalConfig = this.action === 'create' ? configObjectWithDeveloperSettings : configObject;\n // Ensure the following properties are not included in the final config for group events\n delete finalConfig.availability;\n delete finalConfig.participants;\n delete finalConfig.event_booking;\n const resetLoadingState = (_e: CustomEvent) => {\n this.isLoading = false;\n this.changesSaved = true;\n setTimeout(() => {\n this.changesSaved = false;\n }, 3000);\n };\n\n const hasBookingError = this.checkForBookingFormErrors(finalConfig);\n\n if (hasBookingError) {\n return;\n }\n const organizer = {\n name: this.currentUser?.name ?? this.currentUser?.email ?? '',\n email: this.currentUser?.email ?? '',\n };\n const organizerDefaultCal = this.calendars?.find(c => c.is_primary) ?? this.calendars?.[0];\n const organizerParticipant = [{ ...organizer, is_organizer: true }];\n const groupEvent = !this.selectedConfiguration?.id\n ? {\n title: title,\n description: description,\n location: !conferencing ? location : undefined,\n conferencing: !location ? conferencing : undefined,\n when: {\n start_time: eventTimeslot?.when?.start_time ?? 0,\n end_time: eventTimeslot?.when?.end_time ?? 0,\n start_timezone: eventTimeslot?.when?.start_timezone ?? '',\n end_timezone: eventTimeslot?.when?.end_timezone ?? '',\n },\n recurrence: eventTimeslot?.recurrence ?? [],\n calendar_id: bookingCalendar || organizerDefaultCal?.id || 'primary',\n participants: participants?.length ? participants : organizerParticipant,\n organizer: organizer,\n capacity: eventCapacity || 10,\n }\n : undefined;\n this.schedulerConfigChanged.emit({ groupEvent: groupEvent || undefined, config: finalConfig, resetLoadingState: resetLoadingState, action: this.action, host: this.host });\n };\n\n /**\n * Checks for booking form errors.\n */\n checkForBookingFormErrors = config => {\n // Check additional Fields in config\n let hasError = false;\n let errorMessage = '';\n const additionalFields = config.scheduler?.additional_fields;\n if (additionalFields) {\n errorMessage = '';\n Object.entries(additionalFields).forEach(entry => {\n const field = entry[1] as AdditionalFields;\n if (field.label === '') {\n errorMessage += i18next.t('nylasEditorTabs.bookingFormError_label', { type: field.type });\n hasError = true;\n return;\n }\n if (field.options) {\n for (const option of field.options) {\n if (option.trim() === '') {\n errorMessage += i18next.t('nylasEditorTabs.bookingFormError_option', { label: field.label, type: field.type });\n hasError = true;\n break;\n }\n }\n }\n });\n }\n if (hasError) {\n this.isLoading = false;\n this.host.setError({\n message: errorMessage,\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabs.bookingFormError'),\n });\n }\n return hasError;\n };\n\n /**\n * Hides the tab.\n */\n hideTab(tab: TabGroup) {\n return this.hideEditorTabs?.includes(tab) || false;\n }\n\n /**\n * Handles the feedback click event.\n */\n onFeedbackClick(e: Event) {\n e.preventDefault();\n this.showFeedbackModal = true;\n }\n\n @RegisterComponent<NylasEditorTabsGroup, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-editor-tabs-group',\n stateToProps: new Map([\n ['schedulerConfig.calendars', 'calendars'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.configurations', 'configurations'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.selectedEventType', 'selectedEventType'],\n ['schedulerConfig.selectedGroupEvent', 'selectedGroupEvent'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n schedulerConfigChanged: async (\n event: CustomEvent<SchedulerGroupEventDetail & { host: HTMLNylasEditorTabsGroupElement }>,\n nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { resetLoadingState, host, action, config, groupEvent } = event.detail;\n const checkForErrors = (response: DataResponseReturnType, errorTitle: string) => {\n const [data, error] = response;\n if (!data && error) {\n host.setError({\n message: error.message || i18next.t('genericErrorTitle'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: errorTitle,\n });\n } else if (data && !error && action === 'create') {\n host.schedulerConfigCreatedEventHandler({ config: data, action, host });\n }\n };\n\n // If we have an ID, we are updating an existing configuration\n if (action === 'edit') {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.updateConfiguration(config);\n checkForErrors(response, i18next.t('nylasEditorTabs.updateConfigError'));\n\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n } else {\n const response = await nylasSchedulerConfigConnector.schedulerConfig.createConfiguration(config);\n checkForErrors(response, i18next.t('nylasEditorTabs.createConfigError'));\n const [data, _error] = response;\n const configId = data?.id;\n\n if (configId && groupEvent) {\n const eventResponse = await nylasSchedulerConfigConnector.schedulerConfig.createGroupEvent(groupEvent, configId);\n checkForErrors(eventResponse, i18next.t('nylasEditorTabsGroup.createGroupEventError'));\n // nylasSchedulerConfigConnector.schedulerConfigStore.set('selectedEventType', undefined);\n }\n if (resetLoadingState) {\n resetLoadingState(event);\n }\n }\n },\n cancelButtonClick: async (_, nylasSchedulerConfigConnector) => {\n nylasSchedulerConfigConnector.schedulerConfigStore.state.action = null;\n nylasSchedulerConfigConnector.schedulerConfigStore.set('selectedEventType', undefined);\n nylasSchedulerConfigConnector.schedulerConfigStore.set('selectedGroupEvent', undefined);\n nylasSchedulerConfigConnector.schedulerConfigStore.set('groupEvents', []);\n },\n previewButtonClicked: async (_, nylasSchedulerConfigConnector) => {\n debug('[nylas-editor-tabs-group]', 'previewButtonClicked', nylasSchedulerConfigConnector);\n },\n formSubmitted: async (_, nylasSchedulerConfigConnector) => {\n debug('[nylas-editor-tabs-group]', 'formSubmitted', nylasSchedulerConfigConnector);\n },\n schedulerEditorFormUpdated: async (event: CustomEvent<{ value: string; name: string }>, _nylasSchedulerConfigConnector) => {\n debug('[nylas-editor-tabs-group]', 'schedulerEditorFormUpdated', event);\n },\n schedulerConfigCreated: async (event: CustomEvent<SchedulerGroupEventDetail>, _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n debug('[nylas-editor-tabs-group]', 'schedulerConfigCreated', event);\n },\n groupEventUpdateTriggered: async (\n event: CustomEvent<{\n groupEvent: GroupEvent;\n host: HTMLNylasEditorTabsGroupElement;\n chosenOption: RecurrenceUpdateOption;\n configId: string;\n }>,\n nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { groupEvent, host, chosenOption, configId } = event.detail;\n\n const response = await nylasSchedulerConfigConnector.schedulerConfig.updateGroupEvent(groupEvent, chosenOption, configId);\n const [data, error] = response;\n if (!data && error) {\n host.setError({\n message: error.message || i18next.t('genericErrorTitle'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabsGroup.updateGroupEventError'),\n });\n }\n },\n groupEventDeleteTriggered: async (\n event: CustomEvent<{ groupEvent: GroupEvent; chosenOption: RecurrenceDeleteOption; configId: string; host: HTMLNylasEditorTabsGroupElement }>,\n nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { groupEvent, chosenOption, configId, host } = event.detail;\n const response = await nylasSchedulerConfigConnector.schedulerConfig.deleteGroupEvent(groupEvent, chosenOption, configId);\n const [data, error] = response;\n if (!data && error) {\n host.setError({\n message: error.message || i18next.t('genericErrorTitle'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabsGroup.deleteGroupEventError'),\n });\n }\n },\n groupEventCreateTriggered: async (\n event: CustomEvent<{ groupEvent: Partial<GroupEvent>; configId: string; host: HTMLNylasEditorTabsGroupElement }>,\n nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { groupEvent, configId, host } = event.detail;\n const response = await nylasSchedulerConfigConnector.schedulerConfig.createGroupEvent(groupEvent, configId);\n const [data, error] = response;\n if (!data && error) {\n host.setError({\n message: error.message || i18next.t('genericErrorTitle'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabsGroup.createGroupEventError'),\n });\n }\n },\n groupEventImportTriggered: async (\n event: CustomEvent<{\n groupEvent: ImportGroupEventDetails;\n configId: string;\n host: HTMLNylasEditorTabsGroupElement;\n }>,\n nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { groupEvent, configId, host } = event.detail;\n const response = await nylasSchedulerConfigConnector.schedulerConfig.importGroupEvent([groupEvent], configId);\n const [data, error] = response;\n if (!data && error) {\n host.setError({\n message: error.message || i18next.t('genericErrorTitle'),\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabsGroup.importGroupEventError'),\n });\n }\n if (data && data.import_failed && data.import_failed.length > 0) {\n const errorMessage = data.import_failed.map(failedEvent => failedEvent.reason).join('\\n');\n host.setError({\n message: errorMessage,\n type: NotificationType.Error,\n category: ErrorCategory.Component,\n title: i18next.t('nylasEditorTabsGroup.importGroupEventError'),\n });\n setTimeout(() => {\n host.resetError();\n }, 5000);\n }\n },\n saveGroupEventChangesError: async (\n event: CustomEvent<{\n error: string;\n configId: string;\n host: HTMLNylasEditorTabsGroupElement;\n }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { error, host } = event.detail;\n debug('[nylas-editor-tabs-group]', 'saveGroupEventChangesError', error, host);\n },\n },\n localPropsToProp: new Map([\n ['schedulerPreviewLink', 'schedulerPreviewLink'],\n ['enableUserFeedback', 'enableUserFeedback'],\n ['hideEditorTabs', 'hideEditorTabs'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n debug('[nylas-editor-tabs-group]', 'render', this.formState);\n // TODO: Remove this check when the feature is ready to be released\n // const showInDevelopmentTabs = localStorage.getItem('nylas') === 'Nylas Developer';\n\n return (\n <Host>\n <nylas-notification></nylas-notification>\n <form onSubmit={this.formSubmissionHandler} class=\"scheduler-editor\" ref={el => (this.formRef = el as HTMLFormElement)} noValidate>\n {this.mode === 'app' ? (\n <div class=\"return-to-calendar-view\" part=\"editor__return-to-calendar-view net__return-to-calendar-view\">\n <button-component\n id=\"return-to-calendar-view-button\"\n variant=\"invisible\"\n part=\"nset__header__back-button\"\n type=\"button\"\n onClick={e => {\n this.setActiveTab(e, TabGroup.CalendarView);\n }}\n >\n <chevron-icon width=\"16\" height=\"16\" />\n <span>{i18next.t('returnToCalendarView')}</span>\n </button-component>\n </div>\n ) : null}\n {this.mode === 'app' ? (\n <div class=\"form-contents\" part=\"editor__form-contents net__form-contents\">\n <div class=\"tabs\" part=\"editor__tabs net__tabs\">\n <button\n name={TabGroup.BookingOptions}\n class={{ tab: true, active: this.activeTab == TabGroup.BookingOptions, hide: this.hideTab(TabGroup.BookingOptions) }}\n part=\"editortab__booking-options net__tab-booking-options\"\n onClick={e => this.setActiveTab(e, TabGroup.BookingOptions)}\n >\n <flow-icon width=\"16\" height=\"16\" />\n {i18next.t('bookingOptionsTab')}\n </button>\n <button\n name={TabGroup.BookingForm}\n class={{ tab: true, active: this.activeTab == TabGroup.BookingForm, hide: this.hideTab(TabGroup.BookingForm) }}\n part=\"editortab__booking-form net__tab-booking-form\"\n onClick={e => this.setActiveTab(e, TabGroup.BookingForm)}\n >\n {this.activeTab == TabGroup.BookingForm ? <calendar-agenda-fill-icon width=\"16\" height=\"16\" /> : <calendar-agenda-icon width=\"16\" height=\"16\" />}\n {i18next.t('bookingFormTab')}\n </button>\n <button\n name={TabGroup.Communications}\n class={{ tab: true, active: this.activeTab == TabGroup.Communications, hide: this.hideTab(TabGroup.Communications) }}\n onClick={e => this.setActiveTab(e, TabGroup.Communications)}\n part=\"editortab__communications net__tab-communications\"\n >\n {this.activeTab == TabGroup.Communications ? <envelope-fill-icon width=\"16\" height=\"16\" /> : <envelope-icon width=\"16\" height=\"16\" />}\n {i18next.t('communicationsTab')}\n </button>\n <button\n name={TabGroup.PageStyles}\n class={{ tab: true, active: this.activeTab == TabGroup.PageStyles, hide: this.hideTab(TabGroup.PageStyles) }}\n onClick={e => this.setActiveTab(e, TabGroup.PageStyles)}\n part=\"editortab__page-styles net__tab-page-styles\"\n >\n {this.activeTab == TabGroup.PageStyles ? <paintbrush-fill-icon width=\"16\" height=\"16\" /> : <paintbrush-icon width=\"16\" height=\"16\" />}\n {i18next.t('pageStylesTab')}\n </button>\n </div>\n <div class=\"tab-content\" part=\"editor__tab-content net__tab-content\">\n <TabContentsGroup\n formState={this.formState}\n activeTab={this.activeTab}\n currentUser={this.currentUser}\n calendars={this.calendars}\n id={this.selectedConfiguration?.id ?? 'new'}\n i18next={i18next}\n />\n </div>\n </div>\n ) : (\n <div class=\"composable\" key={this.selectedConfiguration?.id}>\n <slot></slot>\n </div>\n )}\n\n <div class=\"footer\" part=\"editor__footer net__footer\">\n <div class=\"preview\" part=\"editor__footer-preview net__footer-preview\">\n {this.enableUserFeedback && (\n <button-component title=\"Share your feedback\" id=\"report-issue\" variant={'basic'} onClick={e => this.onFeedbackClick(e)}>\n <feedback-icon />\n </button-component>\n )}\n {this.activeTab === TabGroup.CalendarView && (\n <button-component\n class=\"page-settings-button\"\n title=\"Go to page settings\"\n id=\"page-settings\"\n variant={'basic'}\n onClick={e => this.setActiveTab(e, TabGroup.BookingOptions)}\n >\n {i18next.t('pageSettingsButton')}\n </button-component>\n )}\n </div>\n <div class=\"buttons\" part=\"editor__footer-buttons net__footer-buttons\">\n <p\n class={{\n 'unsaved-changes': this.hasUnsavedChanges && !this.changesSaved,\n 'saved-changes': this.changesSaved,\n 'error': this.error?.message !== '',\n 'error-full-width': this.error?.message !== '' && this.action === 'create',\n }}\n >\n {this.error?.message == '' && this.hasUnsavedChanges && !this.changesSaved && this.activeTab !== TabGroup.CalendarView\n ? i18next.t('unsavedChangesLabel')\n : this.error?.message == '' && this.changesSaved\n ? `${i18next.t('changesSavedLabel')}!`\n : ''}\n </p>\n <div class=\"footer-buttons__row\">\n {this.schedulerPreviewLink !== '' && this.action === 'edit' && (\n <button-component\n title=\"Preview\"\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n const previewEvent = this.previewButtonClicked.emit(this.host);\n if (!previewEvent.defaultPrevented) {\n window.open(parsePreviewLink(this.schedulerPreviewLink, this.selectedConfiguration), '_blank');\n }\n }}\n variant={'basic'}\n >\n <eye-icon />\n </button-component>\n )}\n <button-component\n type=\"button\"\n disabled={this.isLoading}\n clickHandler={event => {\n event.preventDefault();\n this.cancelButtonClick.emit();\n this.host.resetError();\n }}\n variant={'basic'}\n part=\"editor__footer-cancel net__footer-cancel\"\n >\n {i18next.t('cancelButton')}\n </button-component>\n <button-component class={{ 'save-changes': this.action === 'edit' }} type=\"submit\" disabled={this.isLoading} part=\"editor__footer-cta, net__footer-cta\">\n {!this.componentLoaded ? (\n <span>\n <loading-icon />{' '}\n </span>\n ) : this.isLoading ? (\n <span>\n {i18next.t('savingButtonText')}\n <loading-icon />{' '}\n </span>\n ) : this.action === 'create' ? (\n `${i18next.t('createButtonText')}`\n ) : (\n `${i18next.t('saveChangesButtonText')}`\n )}\n </button-component>\n </div>\n </div>\n </div>\n </form>\n {this.showFeedbackModal && <nylas-feedback-form></nylas-feedback-form>}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"p-DqM3uP9H.js","mappings":";;;;;;;;;;;AAAA,MAAM,8BAA8B,GAAG,yxLAAyxL;;;;;;;;;;;;;;;;MC6CnzL,2BAA2B,GAAAA,kBAAA,CAAA,MAAA,2BAAA,SAAAC,CAAA,CAAA;AANxC,IAAA,WAAA,GAAA;;;;;;;AAYU,QAAA,IAAI,CAAA,IAAA,GAAW,cAAc;QA+C5B,IAAA,CAAA,YAAY,GAAkB,IAAI,CAAC,iBAAiB,IAAI,EAAE;AAC1D,QAAA,IAAiB,CAAA,iBAAA,GAA8B,EAAE;AACjD,QAAA,IAA6B,CAAA,6BAAA,GAAY,IAAI;AAC7C,QAAA,IAAkB,CAAA,kBAAA,GAAY,KAAK;AACnC,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAClB,QAAA,IAAa,CAAA,aAAA,GAAW,EAAE;AAC1B,QAAA,IAAY,CAAA,YAAA,GAAW,EAAE;AACzB,QAAA,IAAwB,CAAA,wBAAA,GAA4B,EAAE;AACtD,QAAA,IAAwB,CAAA,wBAAA,GAAY,KAAK;AACzC,QAAA,IAAsB,CAAA,sBAAA,GAAkB,IAAI;AAGpC,QAAA,IAA8B,CAAA,8BAAA,GAAG,GAAG;AA+btD;AAzaC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,+BAA+B,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QAC7E,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAK1C,IAAA,iDAAiD,CAAC,QAAiB,EAAE,SAA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BAAA,MAAM,KAAK,GAAG,6BAA6B,CAAC,oBAAoB;gBAChE,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,sBAAsB,IAAI,EAAE;AACzD,gBAAA,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,cAAc,CAAC,KAAK,CAAC;oBAAE;AAC1D,gBAAA,KAAK,CAAC,GAAG,CAAC,wBAAwB,EAAE,CAAC,GAAG,QAAQ,EAAE,cAAc,CAAC,CAAC;aACnE;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA8HD,EAAA,2BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.scss?tag=nylas-additional-participants&encapsulation=shadow","src/components/scheduler-editor/nylas-additional-participants/nylas-additional-participants.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n margin: 1rem;\n @include default-css-variables;\n}\n\n.nylas-additional-participants__title {\n color: var(--nylas-base-900);\n font-size: 16px;\n font-style: normal;\n font-weight: 600;\n line-height: 20px;\n /* 125% */\n margin: 0;\n text-align: left;\n}\n\n.nylas-additional-participants__subtitle {\n color: var(--nylas-base-600);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 20px;\n /* 142.857% */\n margin: 0.25rem 0px 0px;\n text-align: left;\n}\n\n.nylas-additional-participants__content {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n background-color: var(--nylas-base-25);\n}\n\n.nylas-additional-participants__input_group {\n padding-top: 8px;\n display: flex;\n flex-direction: column;\n gap: 4px;\n\n label {\n display: flex;\n align-items: center;\n color: var(--nylas-base-800);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n span.org-as-participant {\n width: max-content;\n }\n }\n}\n\n.nylas-additional-participants__error {\n color: var(--nylas-error);\n font-size: 14px;\n font-family: var(--nylas-font-family);\n font-weight: 400;\n line-height: 16px;\n margin: 0;\n text-align: left;\n}\n\n.nylas-additional-participants__input_wrapper {\n display: flex;\n align-items: center;\n min-height: 48px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-300);\n\n &.error {\n border-color: var(--nylas-error);\n }\n\n button {\n flex-shrink: 0;\n padding: 12px;\n border: none;\n border-left: 1px solid var(--nylas-base-300);\n background: none;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n }\n}\n\n.nylas-additional-participants__input_wrapper_organizer {\n border: none;\n}\n\n.nylas-additional-participants__input {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 48px;\n\n input {\n border: none;\n outline: none;\n background: none;\n width: 100%;\n }\n\n .nylas-additional-participants__input-with-loading {\n position: relative;\n width: 100%;\n }\n\n .nylas-additional-participants__loading {\n position: absolute;\n right: 48px;\n top: 50%;\n transform: translateY(-50%);\n font-size: 12px;\n color: var(--nylas-base-500);\n }\n\n input-dropdown {\n width: 100%;\n }\n\n input-dropdown::part(id_dropdown) {\n width: 100%;\n height: 100%;\n }\n\n input-dropdown::part(id_dropdown-input) {\n min-height: 48px;\n box-sizing: border-box;\n border-radius: var(--nylas-border-radius-2x);\n border: none;\n outline: none;\n border-top-right-radius: initial;\n border-bottom-right-radius: initial;\n padding-left: 16px;\n }\n\n input-dropdown::part(id_dropdown-content) {\n width: 100%;\n max-width: none;\n box-sizing: border-box;\n }\n\n input-component::part(ic__input) {\n background: var(--nylas-base-50);\n }\n\n input-component::part(ic__label) {\n font-size: 14px;\n }\n\n input-component {\n div.required-input {\n display: flex;\n gap: 4px;\n\n label {\n display: flex;\n gap: 4px;\n align-items: center;\n\n tooltip-component#organizer_participant_tooltip::part(tc__content) {\n left: -84px;\n }\n }\n }\n }\n}\n\n.nylas-additional-participants__add {\n padding: 12px;\n display: flex;\n align-items: center;\n border: none;\n background: none;\n cursor: pointer;\n color: var(--nylas-base-800);\n\n span {\n padding: 0 8px;\n font-size: 16px;\n font-style: normal;\n font-weight: 500;\n }\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug } from '@/utils/utils';\nimport { AttachInternals, Component, Host, Prop, State, Watch, h, Element, Listen, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Event } from '@stencil/core';\nimport { AdditionalParticipant, Calendar, Configuration, ThemeConfig } from '@nylas/core';\nimport { User } from '@/common/nylas-api-request';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\ntype Participant = {\n name?: string;\n email: string;\n is_valid?: boolean;\n is_organizer?: boolean;\n availability?: Availability;\n booking?: Booking;\n};\ntype Availability = {\n calendar_ids: string[];\n};\ntype Booking = {\n calendar_id: string;\n};\n\n/**\n * The `nylas-additional-participants` component is a form input for adding additional participants to an event.\n *\n * @part nadtnlpart__title - The title of the component.\n * @part nadtnlpart__subtitle - The subtitle of the component.\n * @part nadtnlpart__content - The content of the component.\n * @part nadtnlpart__input_group - The input group of the component.\n * @part nadtnlpart__input_wrapper - The input wrapper of the component.\n * @part nadtnlpart__input - The input of the component.\n * @part nadtnlpart__remove-participant - The remove participant button of the component.\n * @part nadtnlpart__add-participant - The add participant button of the component.\n *\n */\n@Component({\n tag: 'nylas-additional-participants',\n styleUrl: 'nylas-additional-participants.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasAdditionalParticipants {\n @Element() host!: HTMLNylasAdditionalParticipantsElement;\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'participants';\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The logged in user\n */\n @Prop() currentUser?: User;\n /**\n * @standalone\n * The list of user's calendars.\n */\n @Prop() currentUserCalendars?: Calendar[];\n /**\n * @standalone\n * The additional participants options from the config\n */\n @Prop() participantOptions?: AdditionalParticipant[];\n /**\n * @standalone\n * The event participants\n */\n @Prop() eventParticipants?: Participant[];\n /**\n * @standalone\n * If the config is round robin\n */\n @Prop() roundRobinConfig?: boolean;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n /**\n * @standalone\n * Callback to search participants by query for autocomplete.\n */\n @Prop() participantSearch?: (query: string) => Promise<AdditionalParticipant[]>;\n\n @AttachInternals() internals!: ElementInternals;\n @State() participants: Participant[] = this.eventParticipants ?? [];\n @State() participantErrors: { [key: string]: string } = {};\n @State() includeOrganizerAsParticipant: boolean = true;\n @State() isRoundRobinConfig: boolean = false;\n @State() error: string = '';\n @State() requiredError: string = '';\n @State() patternError: string = '';\n @State() participantSearchResults: AdditionalParticipant[] = [];\n @State() participantSearchLoading: boolean = false;\n @State() activeSearchInputIndex: number | null = null;\n\n private participantSearchDebounceTimer?: ReturnType<typeof setTimeout>;\n private readonly PARTICIPANT_SEARCH_DEBOUNCE_MS = 300;\n\n /**\n * This event is fired when the selected participants change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * This event is fired when a participant from search results is selected\n * that is not already in the participantOptions list.\n */\n @Event() participantSearchResultSelected!: EventEmitter<AdditionalParticipant>;\n\n /**\n * When a name prop is passed, stencil does not automatically set the name attribute on the host element.\n * Since this component is form-associated, the name attribute is required for form submission.\n * This is a workaround to ensure that the name attribute is set on the host element.\n */\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-additional-participants', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('currentUser')\n @Watch('selectedConfiguration')\n selectedConfigurationAndCurrentUserChangedHandler(newValue: unknown, _oldValue: unknown, propName: string) {\n debug('nylas-additional-participants', 'selectedConfigurationAndCurrentUserChangedHandler', newValue, this.currentUser);\n\n if (propName === 'selectedConfiguration') {\n this.updateState(newValue as Configuration, this.currentUser, false);\n } else if (propName === 'currentUser') {\n this.updateState(this.selectedConfiguration, newValue as User, false);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n this.requiredError = i18next.t('fieldRequired', { field: i18next.t('email') });\n this.patternError = i18next.t('invalidInputFormat', { field: i18next.t('email') });\n if (this.error) {\n this.error = i18next.t('nylasAdditionalParticipants.error');\n }\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-additional-participants', '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 componentWillLoad() {\n debug('nylas-additional-participants', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-additional-participants', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.updateState(this.selectedConfiguration, this.currentUser, false);\n } else if (this.eventParticipants) {\n this.participants = this.eventParticipants || [];\n this.isRoundRobinConfig = this.roundRobinConfig || false;\n this.updateFormValue(true);\n }\n }\n\n disconnectedCallback() {\n debug('nylas-additional-participants', 'disconnectedCallback');\n }\n\n private updateState(selectedConfig?: Configuration, currentUser?: User, valueChanged: boolean = true) {\n this.isRoundRobinConfig = selectedConfig?.availability?.availability_rules?.availability_method\n ? selectedConfig?.availability?.availability_rules?.availability_method !== 'collective'\n : false;\n const sourceParticipants = selectedConfig?.participants || this.eventParticipants || [];\n // Shallow-clone to avoid mutating frozen config objects.\n // For round-robin, the API doesn't store is_organizer, so flag the current user as organizer.\n this.participants = sourceParticipants.map(p => {\n if (this.isRoundRobinConfig && currentUser?.email && p.email === currentUser.email) {\n return { ...p, is_organizer: true };\n }\n return { ...p };\n });\n this.includeOrganizerAsParticipant = this.isRoundRobinConfig && this.participants.find(p => p.email === currentUser?.email) ? true : false;\n this.updateOrganizerAsParticipant(valueChanged);\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 private getParticipantLookupSources(): AdditionalParticipant[] {\n const fromOptions = this.participantOptions || [];\n const fromSearch = this.participantSearchResults || [];\n const seen = new Set<string>();\n return [...fromSearch, ...fromOptions].filter(p => {\n if (seen.has(p.email)) return false;\n seen.add(p.email);\n return true;\n });\n }\n\n private getDropdownOptions(index: number): { value: string; label: string }[] {\n const sources = this.participantSearch ? this.getParticipantLookupSources() : this.participantOptions || [];\n return this.getArrayDifference(sources, this.participants, index);\n }\n\n private async runParticipantSearch(query: string, index: number) {\n if (!this.participantSearch || !query.trim()) {\n this.participantSearchResults = [];\n this.participantSearchLoading = false;\n return;\n }\n this.activeSearchInputIndex = index;\n this.participantSearchLoading = true;\n this.participantSearchResults = [];\n try {\n const results = await this.participantSearch(query.trim());\n if (this.activeSearchInputIndex === index) {\n this.participantSearchResults = results || [];\n }\n } catch (err) {\n debug('nylas-additional-participants', 'participantSearch failed', err);\n } finally {\n if (this.activeSearchInputIndex === index) {\n this.participantSearchLoading = false;\n }\n }\n }\n\n @Listen('inputOptionChanged')\n onInputOptionChanged(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-additional-participants', 'onInputOptionChanged');\n const EMAIL_REGEX = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$/;\n const index = event.detail.name;\n const value = event.detail.value;\n const lookupSources = this.getParticipantLookupSources();\n const participant = lookupSources.find(p => p.email === value);\n\n if (this.participantSearch && value) {\n clearTimeout(this.participantSearchDebounceTimer);\n if (participant) {\n // Don't clear participantSearchResults here — this handler fires both when\n // the user types a value that happens to match an existing search result AND\n // when the user clicks a dropdown option. Clearing results on a typed match\n // empties the dropdown while the user is still interacting with it, causing\n // \"no results\" to appear. The results are naturally replaced on the next search.\n const alreadyInOptions = this.participantOptions?.some(p => p.email === participant.email);\n if (!alreadyInOptions) {\n this.participantSearchResultSelected.emit(participant);\n }\n } else {\n this.participantSearchDebounceTimer = setTimeout(() => {\n this.runParticipantSearch(value, parseInt(String(index), 10));\n }, this.PARTICIPANT_SEARCH_DEBOUNCE_MS);\n }\n }\n\n this.participants[index].email = value;\n\n // Check for duplicate emails\n if (value) {\n const duplicateIndex = this.participants.findIndex((p, i) => i !== parseInt(String(index), 10) && p.email === value);\n if (duplicateIndex !== -1) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, i18next.t('nylasAdditionalParticipants.error_duplicate'));\n this.participantErrors[index] = i18next.t('nylasAdditionalParticipants.error_duplicate');\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n }\n }\n\n if (!participant && this.isRoundRobinConfig) {\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, 'For round robin configuration, participant should be selected from the dropdown.');\n this.participantErrors[index] = 'For round robin page, participant should be selected from the dropdown.';\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n } else if (!participant && !EMAIL_REGEX.test(value)) {\n if (this.participantSearch && (this.participantSearchLoading || !value.includes('@'))) {\n this.participants = [...this.participants];\n return;\n }\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, i18next.t('nylasAdditionalParticipants.error_email'));\n this.participantErrors[index] = i18next.t('nylasAdditionalParticipants.error_email');\n this.participants[index].is_valid = false;\n this.participants = [...this.participants];\n return;\n } else {\n this.participantErrors[index] = '';\n this.participants[index].is_valid = true;\n this.isInternalsAvailable && this.internals.setValidity({});\n }\n // Default to the is_primary calendar if available, otherwise first calendar for all participants\n const primaryCalendar = participant?.calendars?.find(calendar => calendar.is_primary);\n this.participants[index].availability =\n participant && primaryCalendar?.id ? { calendar_ids: [primaryCalendar.id] } : participant?.calendars[0]?.id ? { calendar_ids: [participant.calendars[0].id] } : undefined;\n // If round-robin config, set booking calendar to is_primary if available, otherwise first calendar for all participants\n this.participants[index].booking =\n participant && this.isRoundRobinConfig && primaryCalendar?.id\n ? { calendar_id: primaryCalendar.id }\n : this.isRoundRobinConfig && participant?.calendars[0]?.id\n ? { calendar_id: participant.calendars[0].id }\n : undefined;\n this.participants[index].name = participant?.name || value;\n this.participants = [...this.participants];\n this.updateFormValue();\n }\n\n updateOrganizerAsParticipant(valueChanged: boolean = true) {\n const findCurrentUserInParticipants = this.participants.find(p => p.email === this.currentUser?.email);\n if (this.isRoundRobinConfig && !findCurrentUserInParticipants && this.currentUser?.email) {\n const bookingCalendarDefault = this.currentUserCalendars?.find(calendar => calendar.is_primary)?.id || this.currentUserCalendars?.[0]?.id || 'primary';\n this.participants = [\n {\n name: this.currentUser?.name,\n email: this.currentUser?.email,\n is_organizer: true,\n availability: {\n calendar_ids: [bookingCalendarDefault],\n },\n booking: {\n calendar_id: bookingCalendarDefault,\n },\n },\n ...this.participants,\n ];\n }\n this.updateFormValue(valueChanged);\n }\n\n addParticipant() {\n debug('nylas-additional-participants', 'addParticipant');\n this.participants = [...this.participants, { name: '', email: '', is_organizer: false }];\n this.updateFormValue();\n }\n removeParticipant(index: number) {\n debug('nylas-additional-participants', 'removeParticipant');\n this.participants = this.participants.filter((_, i) => i !== index);\n this.updateFormValue();\n }\n\n updateFormValue(valueChanged = true) {\n debug('nylas-additional-participants', 'updateFormValue');\n const participants = this.isRoundRobinConfig ? (this.includeOrganizerAsParticipant ? this.participants : this.participants.filter(p => !p.is_organizer)) : this.participants;\n if (participants.length === 0) {\n this.error = i18next.t('nylasAdditionalParticipants.error');\n this.isInternalsAvailable && this.internals.setValidity({ customError: true }, this.error);\n } else {\n this.isInternalsAvailable && this.internals.setValidity({});\n this.error = '';\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participants), this.name);\n if (valueChanged) {\n this.valueChanged.emit({ value: JSON.stringify(participants), name: this.name });\n }\n }\n }\n\n // Filter out the participants that are already added, optionally excluding a specific index\n // (the participant currently being edited) from the duplicate check.\n getArrayDifference(array1: AdditionalParticipant[], array2: Participant[], excludeIndex?: number) {\n const filtered = array1.filter(participant1 => !array2.some((participant2, i) => i !== excludeIndex && participant1.email === participant2.email));\n return filtered.map(participant => {\n return { value: participant.email, label: participant.email };\n });\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 @RegisterComponent<NylasAdditionalParticipants, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-additional-participants',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.participantSearch', 'participantSearch'],\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.currentUser', 'currentUser'],\n ['schedulerConfig.calendars', 'currentUserCalendars'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n participantSearchResultSelected: async (event: CustomEvent<AdditionalParticipant>, nylasSchedulerConfigConnector: NylasSchedulerConfigConnector) => {\n const newParticipant = event.detail;\n if (!newParticipant?.email) return;\n const store = nylasSchedulerConfigConnector.schedulerConfigStore;\n const existing = store.state.additionalParticipants || [];\n if (existing.some(p => p.email === newParticipant.email)) return;\n store.set('additionalParticipants', [...existing, newParticipant]);\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host part=\"nadtnlpart\">\n <nylas-form-card exportparts=\"nfc, nfc__header\" themeConfig={this.themeConfig}>\n <h3 slot=\"header-title\" class=\"nylas-additional-participants__title\" part=\"nadtnlpart__title\">\n {i18next.t('nylasAdditionalParticipants.headerTitle')}\n </h3>\n <p slot=\"header-subtitle\" class=\"nylas-additional-participants__subtitle\" part=\"nadtnlpart__subtitle\">\n {i18next.t('nylasAdditionalParticipants.headerSubTitle')}\n </p>\n <div slot=\"content\" class=\"nylas-additional-participants__content\" part=\"nadtnlpart__content\">\n <div>\n {this.participants.map((participant, index) => {\n return (\n <div class={'nylas-additional-participants__input_group'} part=\"nadtnlpart__input_group\">\n {!participant.is_organizer && <label>{`${i18next.t('nylasAdditionalParticipants.participant')} ${index}`}</label>}\n <div\n part=\"nadtnlpart__input_wrapper\"\n class={{\n 'nylas-additional-participants__input_wrapper': true,\n 'nylas-additional-participants__input_wrapper_organizer': participant?.is_organizer === true,\n 'nylas-additional-participants__input_wrapper_invalid': participant.is_valid === false,\n 'error': participant.is_valid === false,\n }}\n >\n <div class={{ 'nylas-additional-participants__input': true, 'organizer': participant?.is_organizer === true }} part=\"nadtnlpart__input\">\n {participant.is_organizer ? (\n <input-component\n class={'label-input'}\n name={`${index}`}\n key={index}\n label={i18next.t('nylasAdditionalParticipants.organizer')}\n required={false}\n requiredError={this.requiredError}\n patternError={this.patternError}\n readOnly={participant.is_organizer}\n defaultValue={participant.email}\n themeConfig={this.themeConfig}\n >\n {this.isRoundRobinConfig && (\n <div class=\"required-input\" slot=\"additional-input\">\n <input\n type=\"checkbox\"\n name={`organizer_participant`}\n id={`organizer_participant`}\n onClick={() => {\n this.includeOrganizerAsParticipant = !this.includeOrganizerAsParticipant;\n this.updateFormValue();\n }}\n checked={this.includeOrganizerAsParticipant}\n />\n <label htmlFor={`organizer_participant`} aria-label=\"Include as participant\">\n <span class=\"org-as-participant\" part=\"nadtnlpart__org-as-participant\">\n {i18next.t('nylasAdditionalParticipants.organizerAsParticipant')}\n </span>\n <tooltip-component id=\"organizer_participant_tooltip\">\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n <strong>{i18next.t('nylasAdditionalParticipants.tooltip.includeOrganizer')}:</strong>{' '}\n {i18next.t('nylasAdditionalParticipants.tooltip.includeOrganizerDesc')} <br />\n <strong>{i18next.t('nylasAdditionalParticipants.tooltip.excludeOrganizer')}:</strong>{' '}\n {i18next.t('nylasAdditionalParticipants.tooltip.excludeOrganizerDesc')}\n </span>\n </tooltip-component>\n </label>\n </div>\n )}\n </input-component>\n ) : (\n <div class=\"nylas-additional-participants__input-with-loading\">\n <input-dropdown\n id={`${index}`}\n name={`${index}`}\n filterable={!this.participantSearch}\n inputValue={participant.email}\n options={this.getDropdownOptions(index)}\n noResultsText={\n this.participantSearch &&\n !this.participantSearchLoading &&\n this.activeSearchInputIndex === index &&\n participant.email?.trim() &&\n this.getDropdownOptions(index).length === 0\n ? i18next.t('nylasAdditionalParticipants.noResults')\n : undefined\n }\n themeConfig={this.themeConfig}\n />\n {this.participantSearch && this.participantSearchLoading && this.activeSearchInputIndex === index && (\n <span class=\"nylas-additional-participants__loading\" part=\"nadtnlpart__loading\" aria-live=\"polite\">\n {i18next.t('nylasAdditionalParticipants.searching')}\n </span>\n )}\n </div>\n )}\n {!participant.is_organizer && (\n <button onClick={() => this.removeParticipant(index)} part=\"nadtnlpart__remove-participant\">\n <close-icon />\n </button>\n )}\n </div>\n </div>\n {!participant.is_valid && (\n <p class=\"nylas-additional-participants__error\" part=\"nadtnlpart__error\">\n {this.participantErrors[index]}\n </p>\n )}\n </div>\n );\n })}\n <p class=\"nylas-additional-participants__error\" part=\"nadtnlpart__error\">\n {this.error}\n </p>\n </div>\n <button class=\"nylas-additional-participants__add\" part=\"nadtnlpart__add-participant\" onClick={() => this.addParticipant()}>\n <add-circle-icon />{' '}\n <span>\n {this.participants.length > 1\n ? i18next.t('nylasAdditionalParticipants.addParticipant', { context: 'next' })\n : i18next.t('nylasAdditionalParticipants.addParticipant', { context: 'first' })}\n </span>\n </button>\n </div>\n </nylas-form-card>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,2 +0,0 @@
1
- import{h as e,F as t,r as i,c as n,H as s,a as o}from"./p-0EQQA0nE.js";import{N as a}from"./p-DnPL4Y3m.js";import{i as r,c as l,a as c,f as d,h}from"./p-Dgw5dv37.js";import{E as g,i as f,a as u,f as p,c as m,b}from"./p-CquJ7U5v.js";import{v as _,u as y}from"./p-ClDvNLDf.js";import{c as w}from"./p-_i6H-yQH.js";import{L as v,a as k}from"./p-COJy29df.js";class I{constructor(){this.component=e=>{const t=g.Component;const i=`${e} Error`;return{endtime_not_in_future:(e='"endtime" can not be in the future')=>({title:i,message:e,category:t}),no_booking_info:(e="No booking info provided")=>({title:i,message:e,category:t}),no_timeslot_selected:(e="No timeslot selected")=>({title:i,message:e,category:t}),no_timezone_selected:(e="No timezone selected")=>({title:i,message:e,category:t}),no_booking_id:(e="No booking id provided")=>({title:i,message:e,category:t}),no_salt:(e="No salt provided")=>({title:i,message:e,category:t}),invalid_start_time:(e="Invalid start time")=>({title:i,message:e,category:t}),invalid_end_time:(e="Invalid end time")=>({title:i,message:e,category:t}),invalid_timezone:(e="Invalid timezone")=>({title:i,message:e,category:t}),no_config_id:(e="No configuration id provided")=>({title:i,message:e,category:t})}};this.api=e=>{const t=g.Api;const i=`${e} Error`;return{invalid_session:e=>({title:i,message:e,category:t}),general_error:e=>({title:i,message:e,category:t}),internal_error:e=>({title:i,message:e,category:t}),invalid_request_error:e=>({title:i,message:e,category:t}),timeslot_not_available:e=>({title:i,message:e,category:t}),provider_error:e=>({title:i,message:e,category:t}),not_found_error:e=>({title:i,message:e,category:t})}}}}class x{constructor({schedulerAPIURL:e,schedulerStore:t,sessionId:i,configId:n,slug:s,clientId:o}){this.errors=new I;this.schedulerStore=t;this.schedulerAPIURL=e;this.sessionId=i;this.configId=n;this.slug=s;this.clientId=o}getHeaders(){return this.sessionId?{Authorization:`Bearer ${this.sessionId}`}:{}}async makeAPIRequest(e,t,i,n={}){try{const s=new URL(this.schedulerAPIURL);s.pathname=e;const o=await fetch(decodeURIComponent(s.toString()),{method:t,headers:{"Content-Type":"application/json",Origin:window.location.origin,"X-Source":"nylas-scheduling","X-Nylas-Web-Elements-Version":_,...this.clientId&&{"X-Nylas-Application-Public-Id":this.clientId},...n},body:i});const a=await o.json();return a}catch(e){return{error:{message:e.message,title:"API request failed",type:"api"}}}}getErrorMessage(e){let t=e?.message||e?.title||"Something went wrong";if(e?.type==="provider_error"){t=e?.provider_error?.error?.message||e?.provider_error?.error?.title||"Something went wrong"}return t}setConfigId(e){this.configId=e}setSessionId(e){this.sessionId=e}selectDate(e){this.schedulerStore.set("selectedDate",e);this.schedulerStore.set("selectedTimeslot",null)}selectTime(e){this.schedulerStore.set("selectedTimeslot",e)}selectTimezone(e){this.schedulerStore.set("selectedTimezone",e)}selectLanguage(e){this.schedulerStore.set("selectedLanguage",e);r.changeLanguage(e)}async toggleAdditionalData(e){if(!e){await this.refetchAvailability()}this.schedulerStore.set("showBookingForm",e)}setParticipantName(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,name:e}})}setParticipantEmail(e){const{bookingInfo:t}=this.schedulerStore.state;this.schedulerStore.set("bookingInfo",{...t,primaryParticipant:{...t?.primaryParticipant,email:e}})}async refetchAvailability(){const e=new Date;const t=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3;const i=t<e.getTime()/1e3?Math.floor(e.getTime()/1e3):t;const n=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;const s=await this.getAvailability(i,n);return s}async resetStoreStateAndFetchAvailability(){const e=new Date;const t=await this.refetchAvailability();const i=this.schedulerStore.get("availability").find((e=>new Date(e.start_time)>new Date));let n=e;if(i){n=i.start_time}this.schedulerStore.set("selectedDate",n);this.schedulerStore.set("eventInfo",null);this.schedulerStore.set("showBookingForm",false);this.schedulerStore.set("selectedTimeslot",null);return t}async setReschedule(e){this.schedulerStore.set("isLoading",true);const t=this.schedulerStore.state.eventInfo;if(t){this.schedulerStore.set("reschedulingEventInfo",t)}this.schedulerStore.set("rescheduleBookingId",e);await this.getUISettings();const i=await this.resetStoreStateAndFetchAvailability().finally((()=>{this.schedulerStore.set("isLoading",false)}));return i}async setCancel(e){this.schedulerStore.set("cancelBookingId",e)}async setReject(e){this.schedulerStore.set("rejectBookingId",e)}async resetCancel(){const e=await this.resetStoreStateAndFetchAvailability();this.schedulerStore.set("cancelBookingId","");this.schedulerStore.set("rejectBookingId","");this.schedulerStore.set("cancelledEventInfo",null);return e}async goBack(){this.schedulerStore.set("cancelBookingId","");return}async resetConfirm(){const e=await this.resetStoreStateAndFetchAvailability();this.schedulerStore.set("organizerConfirmationBookingId","");this.schedulerStore.set("confirmedEventInfo",undefined);return e}async bookTimeslot(e){this.schedulerStore.set("isLoading",true);const{selectedTimeslot:t,selectedTimezone:i,bookingInfo:n,selectedLanguage:s}=this.schedulerStore.state;if(!e&&!n){return{error:this.errors.component(r.t("createBookingErrorTitle")).no_booking_info()}}const o=e?.timeslot||t;if(!o){return{error:this.errors.component(r.t("createBookingErrorTitle")).no_timeslot_selected()}}const a=e&&e?.timezone?e?.timezone:i;const l=s||"en-US";if(!a){return{error:this.errors.component(r.t("createBookingErrorTitle")).no_timezone_selected()}}const c=[...this.schedulerStore.get("availabilityOrderEmails")];let d="";const h=o?.emails||[];const g={};Object.entries(n?.additionalFields||{}).forEach((([e,t])=>{g[e]=t.value}));const f=e?e?.primaryParticipant:n?.primaryParticipant;const u=e?e?.guests||[]:n?.guests||[];const p=e?e?.additionalFields:g;const m=this.getHeaders();const b=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";const _=`/v3/scheduling/bookings${b}`;if(c.length===0){const e=await this.makeAPIRequest(decodeURIComponent(_),"POST",JSON.stringify({additional_fields:p,additional_guests:u,guest:{...f},start_time:o.start_time.getTime()/1e3,end_time:o.end_time.getTime()/1e3,timezone:a,event_id:o?.event_id||undefined,master_id:o?.master_id||undefined,calendar_id:o?.calendar_id||undefined,email_language:this.getTwoLetterLanguageCode(l)}),m);this.schedulerStore.set("isLoading",false);if("data"in e){this.schedulerStore.set("eventInfo",e.data);return e}return{error:e.error}}while(c.length>0){d=c.shift();if(!h.includes(d)){continue}const e=await this.makeAPIRequest(decodeURIComponent(_),"POST",JSON.stringify({participants:d?[{email:d}]:undefined,additional_fields:p,additional_guests:u,guest:{...f},start_time:o.start_time.getTime()/1e3,end_time:o.end_time.getTime()/1e3,timezone:a,email_language:this.getTwoLetterLanguageCode(l)}),m);if("data"in e){this.schedulerStore.set("isLoading",false);this.schedulerStore.set("eventInfo",e?.data);return e}else if(e.error?.message?.startsWith("The selected timeslot is unavailable")){continue}else{this.schedulerStore.set("isLoading",false);const t=e.error?.type;let i=e.error;if(t&&t in this.errors.api(r.t("createBookingErrorTitle"))){const e=this.getErrorMessage(i);i=this.errors.api(r.t("createBookingErrorTitle"))[t](e)}return{error:i}}}this.schedulerStore.set("isLoading",false);return{error:this.errors.api(r.t("createBookingErrorTitle")).timeslot_not_available("The selected timeslot is unavailable")}}async getUISettings(){this.schedulerStore.set("isLoading",true);const e=this.schedulerStore.get("rescheduleBookingId");const t=this.getHeaders();let i=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";if(e&&!!i){i+=`&booking_id=${e}`}else if(e){i+=`?booking_id=${e}`}const n=`/v3/scheduling/ui-settings${i}`;const s=await this.makeAPIRequest(n,"GET",undefined,t);if("error"in s){this.schedulerStore.set("isLoading",false);const e=s.error?.type;let t=s.error;if(e&&e in this.errors.api(r.t("getUISettingErrorTitle"))){t=this.errors.api(r.t("getUISettingErrorTitle"))[e](t?.message||t?.title||"Something went wrong")}return{error:t}}if("data"in s){this.schedulerStore.set("configSettings",s.data);this.clientId=s.data.app_client_id||this.clientId}this.schedulerStore.set("isLoading",false);return s}getTwoLetterLanguageCode(e){return e.split("-")[0]}getStartTimeWithMinBookingNotice(e){const t=this.schedulerStore.get("configSettings")?.scheduler;const i=t?.min_booking_notice;if(!i){return e}const n=(new Date).getTime();if(e<(n+i*60*1e3)/1e3){return Math.floor((n+i*60*1e3)/1e3)}else{return e}}getEndTimeForAvailableDaysInFuture(e){const t=new Date;const i=this.schedulerStore.get("configSettings")?.scheduler?.available_days_in_future;const n=Math.floor(l(t,i).getTime()/1e3);const s=Math.min(n,e);return s}async getAvailability(e=0,t=0){this.schedulerStore.set("isLoading",true);const i=new URLSearchParams;const n=new Date;const s=n.getTime();if(t&&t<s/1e3){this.schedulerStore.set("isLoading",false);const e=this.errors.component(r.t("getAvailabilityErrorTitle")).endtime_not_in_future();return{error:e}}if(!e){const t=new Date(n.getFullYear(),n.getMonth(),1);e=Math.floor(t.getTime()/1e3)}if(!t){const e=new Date(n.getFullYear(),n.getMonth()+1,0);t=Math.floor(e.getTime()/1e3)}t=this.getEndTimeForAvailableDaysInFuture(t);const o=this.getStartTimeWithMinBookingNotice(e);e=o;t=o>t?o+1:t;i.append("start_time",encodeURIComponent(e.toString()));i.append("end_time",encodeURIComponent(t.toString()));if(this.configId&&!this.sessionId){i.append("configuration_id",encodeURIComponent(this.configId))}else if(this.slug&&this.clientId&&!this.sessionId){i.append("slug",encodeURIComponent(this.slug));i.append("client_id",encodeURIComponent(this.clientId))}const a=this.schedulerStore.get("rescheduleBookingId");if(a){i.append("booking_id",encodeURIComponent(a))}const l=i.toString();const c=`/v3/scheduling/availability${l?`?${l}`:""}`;const d=this.getHeaders();const h=await this.makeAPIRequest(decodeURIComponent(c),"GET",undefined,d);if("error"in h){this.schedulerStore.set("availability",[]);this.schedulerStore.set("isLoading",false);const e=h.error?.type;let t=h.error;if(t?.message?.toLowerCase().includes("Failed to find a valid Grant")){const e=r.t("invalidGrantError");return{error:{title:r.t("invalidGrantErrorTitle"),message:e,category:g.Api}}}if(e&&e in this.errors.api(r.t("getAvailabilityErrorTitle"))){const i=this.getErrorMessage(t);t=this.errors.api(r.t("getAvailabilityErrorTitle"))[e](i)}return{error:t}}if("data"in h){const e=h.data?.time_slots?.map((e=>({...e,start_time:new Date(e.start_time*1e3),end_time:new Date(e.end_time*1e3)})))||[];const t=e.filter((e=>e.start_time.getTime()>s));const i=t.sort(((e,t)=>e.start_time.getTime()-t.start_time.getTime()));this.schedulerStore.set("availability",i);const n=h.data?.order||[];this.schedulerStore.set("availabilityOrderEmails",n)}this.schedulerStore.set("isLoading",false);return h}async cancelBooking(e,t){this.schedulerStore.set("isLoading",true);if(!e){return{error:this.errors.component(r.t("cancelBookingErrorTitle")).no_booking_id()}}const i=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";const n=`/v3/scheduling/bookings/${e}${i}`;const s=this.getHeaders();const o=await this.makeAPIRequest(decodeURIComponent(n),"DELETE",JSON.stringify({action:"cancel",cancellation_reason:t}),s);if("error"in o){this.schedulerStore.set("isLoading",false);const e=o.error?.type;let t=o.error;if(e&&e in this.errors.api(r.t("cancelBookingErrorTitle"))){const i=this.getErrorMessage(t);t=this.errors.api(r.t("cancelBookingErrorTitle"))[e](i)}return{error:t}}this.schedulerStore.set("cancelledEventInfo",{booking_id:e});this.schedulerStore.set("rescheduleBookingId","");this.schedulerStore.set("isLoading",false);return o}async rescheduleBooking(e,t){this.schedulerStore.set("isLoading",true);if(!e){return{error:this.errors.component(r.t("rescheduleBookingErrorTitle")).no_booking_id()}}const i=this.errors.api(r.t("rescheduleBookingErrorTitle"));const n=this.errors.component(r.t("rescheduleBookingErrorTitle"));const{bookingInfo:s,selectedTimeslot:o,selectedTimezone:a,selectedLanguage:l}=this.schedulerStore.state;const{startTime:c,endTime:d,timezone:h}=t;const g=c||o?.start_time;if(!g){return{error:n.invalid_start_time('Please pass "startTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')}}const f=d||o?.end_time;if(!f){return{error:n.invalid_end_time('Please pass "endTime" in data or set "selectedTimeslot" in the defaultSchedulerState.')}}const u=this.schedulerStore.get("availabilityOrderEmails");let p="";if(u.length>0){const e=o?.emails||[];for(let t=0;t<u.length;t++){if(e.includes(u[t])){p=u[t];break}}}const m=h||a;if(!m){return{error:n.invalid_timezone('Please pass "timezone" in data or set "selectedTimezone" in the defaultSchedulerState.')}}const b=o?.event_id||undefined;const _=o?.master_id||undefined;const y=o?.calendar_id||undefined;const w={};Object.entries(s?.additionalFields||{}).forEach((([e,t])=>{w[e]=t.value}));const v=t?t?.primaryParticipant:s?.primaryParticipant;const k=t?t?.guests||[]:s?.guests||[];const I=t?t?.additionalFields:w;const x=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";const C=`/v3/scheduling/bookings/${e}${x}`;const T=this.getHeaders();const S=await this.makeAPIRequest(decodeURIComponent(C),"PATCH",JSON.stringify({start_time:g.getTime()/1e3,end_time:f.getTime()/1e3,timezone:m,additional_fields:I,guest:{...v},additional_guests:k,participants:p?[{email:p}]:undefined,email_language:this.getTwoLetterLanguageCode(l),event_id:b,master_id:_,calendar_id:y}),T);if("error"in S){this.schedulerStore.set("isLoading",false);const e=S.error?.type;let t=S.error;if(e&&e in i){const n=this.getErrorMessage(t);t=i[e](n)}return{error:t}}const E=this.schedulerStore.get("reschedulingEventInfo");if("data"in S){this.schedulerStore.set("eventInfo",S?.data)}else if(E){this.schedulerStore.set("eventInfo",E)}else{const t={booking_id:e};this.schedulerStore.set("eventInfo",t)}this.schedulerStore.set("isLoading",false);return S}async updateBooking(e){this.schedulerStore.set("isLoading",true);const{bookingId:t,status:i,reason:n}=e;const s=this.schedulerStore.get("organizerConfirmationSalt");const o=i==="confirmed"?r.t("confirmBookingErrorTitle"):r.t("rejectBookingErrorTitle");if(!t){return{error:this.errors.component(o).no_booking_id()}}if(!s){return{error:this.errors.component(o).no_salt()}}const a=!this.sessionId&&this.configId?`?configuration_id=${this.configId}`:!this.sessionId&&this.slug&&this.clientId?`?slug=${this.slug}&client_id=${this.clientId}`:"";const l=`/v3/scheduling/bookings/${t}${a}`;const c=this.getHeaders();const d=await this.makeAPIRequest(decodeURIComponent(l),"PUT",JSON.stringify({status:i,cancellation_reason:n,salt:s}),c);if("error"in d){this.schedulerStore.set("isLoading",false);const e=d.error?.type;let t=d.error;if(e&&e in this.errors.api(o)){const i=this.getErrorMessage(t);t=this.errors.api(o)[e](i)}return{error:t}}if("data"in d&&i==="confirmed"){this.schedulerStore.set("confirmedEventInfo",d?.data)}else if("request_id"in d&&i==="cancelled"){this.schedulerStore.set("cancelledEventInfo",{booking_id:t})}this.schedulerStore.set("organizerConfirmationBookingId","");this.schedulerStore.set("isLoading",false);return d}async validateGroupEventTimeslot(e){this.schedulerStore.set("isLoading",true);const t=this.schedulerStore.get("configSettings")?.configuration_id;if(!t){return{error:this.errors.component(r.t("validateTimeslotErrorTitle")).no_config_id()}}const i=this.getHeaders();const n=`/v3/scheduling/configurations/${t}/group-events/validate-timeslot`;const s=await this.makeAPIRequest(decodeURIComponent(n),"POST",JSON.stringify({...e,start_time:e.start_time.getTime()/1e3,end_time:e.end_time.getTime()/1e3}),i);if("error"in s){this.schedulerStore.set("isLoading",false);const e=s.error?.type;let t=s.error;if(e&&e in this.errors.api(r.t("validateTimeslotErrorTitle"))){const i=this.getErrorMessage(t);t=this.errors.api(r.t("validateTimeslotErrorTitle"))[e](i)}this.refetchAvailability();return{error:t}}this.schedulerStore.set("selectedTimeslot",e);this.schedulerStore.set("showBookingForm",true);this.schedulerStore.set("isLoading",false);return s}}class C{constructor({schedulerAPIURL:e,nylasSchedulerStore:t,sessionId:i,configId:n,slug:s,clientId:o}){if(!e){throw new Error("schedulerAPIURL is required")}if(!t){throw new Error("nylasSchedulerStore is required")}if(!i&&!n&&!(s&&o)){throw new Error("sessionId is required for private configs. If using public config either pass a configurationId or a combination of slug and clientId.")}if(e==="/"){const t=new URL(window.location.href);e=t.origin}this.configId=n;this.sessionId=i;this.schedulerAPIURL=e;this.nylasSchedulerStore=t;this.slug=s;this.clientId=o}init(){c("NylasConnector init")}get schedulerStore(){return this.nylasSchedulerStore}get scheduler(){if(this._schedulerAPIConnector){return this._schedulerAPIConnector}this._schedulerAPIConnector=new x({schedulerAPIURL:this.schedulerAPIURL,schedulerStore:this.schedulerStore,sessionId:this.sessionId,configId:this.configId,slug:this.slug,clientId:this.clientId});return this._schedulerAPIConnector}resetStores(){this.nylasSchedulerStore.reset()}}function T(e={}){const t={selectedDate:null,selectedLanguage:navigator.language,selectedTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,selectedTimeslot:null,showBookingForm:false,availabilityOrderEmails:[],selectableDates:null,availability:[],eventDuration:0,state:"ready",eventInfo:null,cancelledEventInfo:null,isLoading:false,nylasBranding:true,...e};c(`[defaultNylasStoreState]: `,t);const i=w(t);i.onChange("availability",(e=>{c(`[availability]: `,e);const t=e.map((e=>e.start_time));c(`[selectableDates]: `,t);i.set("selectableDates",t);const n=e[0];if(!n)return;const s=Math.floor((n.end_time.getTime()-n.start_time.getTime())/6e4);c(`[durationMinutes]: `,s);i.set("eventDuration",s)}));i.reset=()=>{for(const e in t){const n=t[e];i.set(e,n)}};return i}const S=(i,n)=>{const s=i.isLoading;const o=i.showNotification;const a=i.nylasBranding;const r=i.version;return e(t,null,o&&e("nylas-notification",null),s&&e("div",{class:"loading"},e("div",{class:"left"},e("div",{class:"skeleton"})),e("div",{class:"right"},e("div",{class:"skeleton"}),e("div",{class:"skeleton"}),e("div",{class:"skeleton"}),e("div",{class:"skeleton"}),e("div",{class:"skeleton"}))),!s&&n,e("div",{class:"footer"},a&&e("a",{href:"https://scheduler.nylas.com?utm_source=powered-by-nylas-logoutm_medium=link&utm_campaign=get-scheduler&utm_id=get-scheduler",class:"powered-by-nylas",target:"_blank",rel:"noreferrer noopener"},"Powered by ",e("span",{class:"sr-only"},"Nylas"),e("nylas-logo",{"aria-hidden":true})),e("tooltip-component",null,e("info-icon",{slot:"tooltip-icon"}),e("span",{slot:"tooltip-content"},r))))};const E=(t,i)=>e("div",{class:"message-banner"},i);const B=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 4px 8px 2px rgba(0, 0, 0, 0.05), 0px 8px 16px -2px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff;font-family:var(--nylas-font-family);font-optical-sizing:auto;font-style:normal;font-variation-settings:"slnt" 0}@media screen and (max-width: 768px){:host{width:auto;min-width:325px}}:root{font-family:inherit}.error{padding:8rem 12rem;color:var(--nylas-base-0);background-color:var(--nylas-error);margin:1.5rem;border-radius:var(--nylas-border-radius-2x)}.message-banner{text-align:right;color:var(--nylas-base-800);padding:1rem;border-bottom:1px solid var(--nylas-color-primary-200);margin:0}.loading{margin:1.5rem;display:flex;gap:1rem}.loading .skeleton{border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite}.loading .skeleton:nth-child(2){animation-delay:-100ms}.loading .skeleton:nth-child(3){animation-delay:-200ms}.loading .skeleton:nth-child(4){animation-delay:-300ms}.loading .skeleton:nth-child(5){animation-delay:-400ms}.loading .left .skeleton{height:100%;width:400px}.loading .right .skeleton{height:5rem;width:300px;margin-bottom:1rem}.loading .right .skeleton:last-child{margin-bottom:0}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.select-date-page,.additional-data-page,.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{border-top-left-radius:var(--nylas-border-radius-2x);border-top-right-radius:var(--nylas-border-radius-2x)}.select-date-page,.additional-data-page{display:flex}@media screen and (max-width: 768px){.select-date-page,.additional-data-page{flex-direction:column}}.booked-event-page,.manual-confirmation-page{background-color:var(--nylas-base-50)}.cancelled-event-page,.manual-confirmation-page,.cancel-flow-page{padding:1rem;height:496px;display:flex;justify-content:center;align-items:center}.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:784px;background:var(--nylas-base-50)}@media screen and (max-width: 768px){.booked-event-page,.manual-confirmation-page,.cancelled-event-page,.cancel-flow-page{min-width:90%}}.left-panel{display:flex;flex-direction:column;min-width:424px;border-top-left-radius:inherit;background:var(--nylas-base-0);position:relative;padding:1rem 0 0 0;height:624px}@media screen and (max-width: 768px){.left-panel{border-top-right-radius:inherit;min-width:unset;height:auto}}@media screen and (max-width: 768px){.select-date-page .left-panel{height:624px}}.border{margin-left:-20px;margin-right:-20px;border-top-width:1px;height:0.5px;background-color:var(--nylas-base-200)}@media screen and (max-width: 768px){.border{display:none}}.right-panel{min-width:360px;width:360px;background-color:var(--nylas-base-50);height:624px;padding-top:16px;border-left:1px solid var(--nylas-base-200);border-top-right-radius:inherit}.right-panel.reschedule{border-top-right-radius:0px}@media screen and (max-width: 768px){.right-panel{border-top-right-radius:0px;width:inherit;min-width:unset;height:auto;border-left:none}}.right-panel h2{display:flex;margin:0;height:48px;gap:0.5rem;justify-content:center;align-items:center;width:auto;font-size:1.125rem;line-height:1.5rem;font-weight:500;text-align:center;color:var(--nylas-base-800)}.additional-data-page .left-panel{background-color:var(--nylas-base-50)}.additional-data-page .right-panel{background-color:var(--nylas-base-0)}nylas-selected-event-card{height:604px;padding:0 1rem}@media screen and (max-width: 768px){nylas-selected-event-card{height:250px}}.footer{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:16px;font-size:14px;font-weight:300;color:var(--nylas-base-500);border-top:1px solid var(--nylas-base-200);min-height:24px}.footer .powered-by-nylas{display:flex;align-items:center;text-decoration:none;color:var(--nylas-base-500)}.footer .powered-by-nylas:hover{color:var(--nylas-base-800)}.footer svg{fill:var(--nylas-base-500)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.footer svg{margin-top:1px}nylas-selected-event-card::part(nsec__timezone){position:absolute;bottom:0}nylas-notification{margin:1.5rem;width:-webkit-fill-available;width:-moz-available;position:absolute}nylas-locale-switch{position:absolute;padding:18px 20px;bottom:0;width:-webkit-fill-available;width:-moz-available;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){nylas-locale-switch{height:auto}}nylas-date-picker{padding:0 20px}button-component#report-issue{width:auto;position:absolute;bottom:4px;left:16px}.language-feedback-container{width:auto;position:absolute;bottom:4px;left:16px;display:flex;gap:8px;align-items:center}.language-feedback-container button-component#report-issue{position:initial}nylas-feedback-form{position:absolute;top:0;height:100%;width:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:inherit}';const L={title:r.t("genericErrorTitle"),category:g.Component};const D=class{constructor(e){i(this,e);this.init=n(this,"init",7);this.schedulerWillLoad=n(this,"schedulerWillLoad",7);this.schedulerDidLoad=n(this,"schedulerDidLoad",7);this.nylasSchedulerError=n(this,"nylasSchedulerError",7);this.nylasSchedulerInfo=n(this,"nylasSchedulerInfo",7);this.configSettingsLoaded=n(this,"configSettingsLoaded",7);this.bookingRefExtracted=n(this,"bookingRefExtracted",7);this.bookedEventInfo=n(this,"bookedEventInfo",7);this.initDeferred=false;this.mode="app";this.schedulerApiUrl="https://api.us.nylas.com";this.nylasBranding=true;this.eventOverrides={};this.showNotification=true;this.enableUserFeedback=true;this.automaticComponentRegistration=true;this.selectedDateLabel=(new Date).toLocaleDateString(navigator.language,{dateStyle:"full"})||`${r.t("noDateSelected")}`;this.language=navigator.language;this.showFeedbackModal=false;this.bookingInfoConfirmed=null;this.version=_}connectedCallback(){c(`[nylas-scheduler] connectedCallback`)}async componentWillLoad(){c(`[nylas-scheduler] Component will load`);this.version=_;await Promise.resolve();if(this.enableUserFeedback&&!f()){u({dsn:"https://9d5731f1c77ca84c9ed3fb9b3ccf7ee1@o74852.ingest.us.sentry.io/4507889638178816",release:this.version,integrations:e=>[...e.filter((e=>false)),p({colorScheme:"system",autoInject:false})],autoSessionTracking:false,beforeSend:()=>null})}const e=this.schedulerWillLoad.emit(this.host);if("schedulerWillLoad"in this.eventOverrides){await this.eventOverrides.schedulerWillLoad(e,this.nylasSchedulerConnector);if(e.defaultPrevented){return}}const t=new URLSearchParams(window.location.search);const i=t.get("lang");const n=i&&Object.values(v).includes(i)?i:null;this.stores={scheduler:T({bookingInfo:this.bookingInfo,nylasBranding:this.nylasBranding,themeConfig:this.themeConfig,hour12:this.hour12,selectedLanguage:n||this.defaultLanguage||this.bookingInfo?.language||v.en,...this.defaultSchedulerState})};this.baseProvider=new a(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);this.refConfigId=this.configurationId;let s;try{if(this.rescheduleBookingRef){const[e,t,i]=d(this.rescheduleBookingRef);this.refConfigId=e;this.stores.scheduler.set("rescheduleBookingId",t);s=this.bookingRefExtracted.emit({configurationId:e,bookingId:t})}else if(this.cancelBookingRef){const[e,t,i]=d(this.cancelBookingRef);this.refConfigId=e;this.stores.scheduler.set("cancelBookingId",t);s=this.bookingRefExtracted.emit({configurationId:e,bookingId:t})}else if(this.organizerConfirmationBookingRef){const[e,t,i]=d(this.organizerConfirmationBookingRef);this.refConfigId=e;this.stores.scheduler.set("organizerConfirmationBookingId",t);this.stores.scheduler.set("organizerConfirmationSalt",i);s=this.bookingRefExtracted.emit({configurationId:e,bookingId:t,salt:i})}}catch(e){c(e);const t=this.rescheduleBookingRef||this.cancelBookingRef||this.organizerConfirmationBookingRef;this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:`Invalid booking reference: ${t}`})},host:this.host})}this.applyThemeConfig(this.themeConfig);if("bookingRefExtracted"in this.eventOverrides){await this.eventOverrides.bookingRefExtracted(s,this.nylasSchedulerConnector);if(s.defaultPrevented){return}}const o=!!(this.rescheduleBookingRef||this.cancelBookingRef||this.organizerConfirmationBookingRef);if(o&&!this.sessionId&&!this.configurationId&&!(this.slug&&this.clientId)){this.initDeferred=true;return}if(!this.checkIfSessionIdOrConfigIdExists(false)){this.initDeferred=true;return}const r=this.baseProvider?.getStore("scheduler");this.nylasSchedulerConnector=new C({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:r});const l=this.init.emit(this.host);if("init"in this.eventOverrides){await this.eventOverrides.init(l,this.nylasSchedulerConnector);if(l.defaultPrevented){return}}this.baseProvider?.componentWillLoad(this.nylasSchedulerConnector)}async componentDidLoad(){if(this.initDeferred){return}this.baseProvider?.componentDidLoad();await Promise.resolve();const e=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides){await this.eventOverrides.schedulerDidLoad(e,this.nylasSchedulerConnector);if(e.defaultPrevented){return}}if(!this.checkIfSessionIdOrConfigIdExists()){return}await this.performSchedulerDataFetch()}async performSchedulerDataFetch(){this.localizationChanged(this.localization);const e=await(this.nylasSchedulerConnector?.scheduler.getUISettings());if(!e||"error"in e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e?.error)},host:this.host});return}else{if("data"in e&&e.data?.appearance){c("Appearance settings have been returned from the configuration used byt his scheduling page; please remember to grab them from the configSettingsLoaded event and apply them as desired.")}const t=this.configSettingsLoaded.emit({settings:e});if("configSettingsLoaded"in this.eventOverrides){await this.eventOverrides.configSettingsLoaded(t,this.nylasSchedulerConnector);if(t.defaultPrevented){return}}}const t=this.baseProvider?.getStore("scheduler");const i=t?.get("configSettings")?.scheduler?.available_days_in_future;const n=t?.get("selectedTimeslot");if(n&&n?.start_time){if(!this.isTimeslotValid(n)){return}if(t?.get("showBookingForm")){t?.set("selectedDate",n.start_time);return}}const s=t?.get("selectedDate");const o=t?.get("availability");let a;if(o&&o.length>0){return}if(!s){const e=new Date;const{startTime:t,endTime:n,endTimeForAvailableDaysInFuture:s}=this.validateAvailableDaysInFuture(e,i||30);if(e.getTime()<s*1e3){a=await(this.nylasSchedulerConnector?.scheduler.getAvailability(t,n))}}else{const{startTime:e,endTime:t,endTimeForAvailableDaysInFuture:n}=this.validateAvailableDaysInFuture(s,i||30);if(s.getTime()<n*1e3){a=await(this.nylasSchedulerConnector?.scheduler.getAvailability(e,t))}}if(!a||"error"in a){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(a?.error)},host:this.host})}if(!s){let e=new Date;const i=t?.get("availability").find((e=>new Date(e.start_time)>new Date));if(i){e=i.start_time}t?.set("selectedDate",e)}}hasValidAuthConfig(){return!!(this.sessionId||this.refConfigId||this.slug&&this.clientId)}async performDeferredInit(){if(!this.hasValidAuthConfig()||!this.initDeferred||!this.baseProvider){return}document.body.dispatchEvent(new CustomEvent("nylasSchedulerClearNotifications",{detail:{host:this.host},bubbles:true}));this.initDeferred=false;this.refConfigId=this.refConfigId||this.configurationId;const e=this.baseProvider.getStore("scheduler");this.nylasSchedulerConnector=new C({schedulerAPIURL:this.schedulerApiUrl,sessionId:this.sessionId,configId:this.refConfigId,slug:this.slug,clientId:this.clientId,nylasSchedulerStore:e});const t=this.init.emit(this.host);if("init"in this.eventOverrides){await this.eventOverrides.init(t,this.nylasSchedulerConnector);if(t.defaultPrevented){return}}this.baseProvider.componentWillLoad(this.nylasSchedulerConnector);this.baseProvider.componentDidLoad();await Promise.resolve();const i=this.schedulerDidLoad.emit(this.host);if("schedulerDidLoad"in this.eventOverrides){await this.eventOverrides.schedulerDidLoad(i,this.nylasSchedulerConnector);if(i.defaultPrevented){return}}await this.performSchedulerDataFetch()}authPropsChanged(){if(this.initDeferred&&this.hasValidAuthConfig()){this.performDeferredInit()}}configurationIdChanged(){if(!this.rescheduleBookingRef&&!this.cancelBookingRef&&!this.organizerConfirmationBookingRef){this.refConfigId=this.configurationId}this.authPropsChanged()}sessionIdChanged(){if(this.nylasSchedulerConnector&&this.sessionId){this.nylasSchedulerConnector.sessionId=this.sessionId;this.nylasSchedulerConnector.scheduler.setSessionId(this.sessionId)}this.authPropsChanged()}slugChanged(){this.authPropsChanged()}clientIdChanged(){this.authPropsChanged()}componentDisconnected(){this.baseProvider?.componentDisconnected()}bookingInfoChanged(e){this.stores?.scheduler.set("bookingInfo",e);if(e?.language&&!this.defaultLanguage){this.stores?.scheduler.set("selectedLanguage",e.language)}}rescheduleBookingRefChanged(e){if(e){const[t,i]=d(e);this.stores?.scheduler.set("rescheduleBookingId",i);this.refConfigId=t;this.nylasSchedulerConnector?.scheduler.setConfigId(t)}}cancelBookingRefChanged(e){if(e){const[t,i]=d(e);this.stores?.scheduler.set("cancelBookingId",i);this.refConfigId=t;this.nylasSchedulerConnector?.scheduler.setConfigId(t)}}organizerConfirmationBookingRefChanged(e){if(e){const[t,i]=d(e);this.stores?.scheduler.set("organizerConfirmationBookingId",i);this.refConfigId=t;this.nylasSchedulerConnector?.scheduler.setConfigId(t)}}localizationChanged(e){if(!e){return}Object.keys(e).forEach((t=>{if(!(t in v)){return}r.addResourceBundle(t,"translation",e[t],false,true)}))}defaultLanguageChanged(e){if(e){this.stores?.scheduler.set("selectedLanguage",e);r.changeLanguage(e)}}themeConfigChanged(e){this.baseProvider?.getStore("scheduler")?.set("themeConfig",e);this.applyThemeConfig(e)}languageChanged(e){const t=e.detail;this.language=t;r.changeLanguage(t)}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}async monthChangedHandler(e){const t=e.detail;const i=this.nylasSchedulerConnector?.schedulerStore?.get("configSettings")?.scheduler?.available_days_in_future;const{startTime:n,endTime:s,endTimeForAvailableDaysInFuture:o}=this.validateAvailableDaysInFuture(t,i||30);if(e.defaultPrevented){return}if(n<o&&t.getTime()<o*1e3){const e=await(this.nylasSchedulerConnector?.scheduler.getAvailability(n,s));if(!e||"error"in e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e?.error)},host:this.host})}const t=this.stores?.scheduler.get("selectableDates");if(t&&t.length>0){this.stores?.scheduler.set("selectedDate",t[0])}}}mapToBookingData(e){const t=this.stores?.scheduler.get("selectedTimeslot");const i=this.stores?.scheduler.get("selectedLanguage");const n=this.stores?.scheduler.get("selectedTimezone");const s=t?.start_time?new Date(t?.start_time).getTime()/1e3:"";const o=t?.end_time?new Date(t?.end_time).getTime()/1e3:"";return{additional_guests:e.guests,guest:{...e.primaryParticipant},additional_fields:{...e.additionalFields},start_time:s,end_time:o,email_language:i,timezone:n}}async bookButtonClickedHandler(e){if(e.defaultPrevented){return}const t=e.detail;const i=this.mapToBookingData(t);this.bookingInfoConfirmed=t;const n=this.nylasSchedulerConnector?.schedulerStore?.get("rescheduleBookingId");const s=n;if(s){const e=await(this.nylasSchedulerConnector?.scheduler.rescheduleBooking(s,t));if(!e||"error"in e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e?.error)},host:this.host})}const n=e?.data;const o=this.bookedEventInfo.emit({...e,data:{...n,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...n};if("bookedEventInfo"in this.eventOverrides){await this.eventOverrides.bookedEventInfo(o,this.nylasSchedulerConnector)}return}const o=await(this.nylasSchedulerConnector?.scheduler.bookTimeslot(t));if(!o||"error"in o){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(o?.error)},host:this.host})}const a=o?.data;const r=this.bookedEventInfo.emit({...o,data:{...a,...i}});this.bookingInfoConfirmed={...this.bookingInfoConfirmed,...a};if("bookedEventInfo"in this.eventOverrides){await this.eventOverrides.bookedEventInfo(r,this.nylasSchedulerConnector)}}dateSelectedHandler(e){const t=e.detail;this.selectedDateLabel=t?t.toLocaleDateString(this.language,{dateStyle:"full"}):`${r.t("noDateSelected")}`}cancelBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}cancelBookedEventValidationErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}rescheduleBookedEventErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}confirmBookingErrorHandler(e){this.nylasSchedulerError.emit({notification:{...this.getErrorObject(e.detail.error)},host:this.host})}feedbackModalClosedHandler(){this.showFeedbackModal=false}eventIsFullHandler(e){const t=e.detail.error;const i=e.detail.type;if(i==="error"){this.nylasSchedulerError.emit({notification:{...this.getErrorObject({message:t})},host:this.host})}else{this.nylasSchedulerInfo.emit({notification:{title:"Event is full",category:g.Component,type:y.Info,description:"The event you selected is full. Please try a different time.",id:(new Date).getTime().toString(),ttl:3e3},host:this.host})}}feedbackSubmittedHandler(e){m("Scheduling Page User Feedback",{extra:{configId:this.configurationId,slug:this.slug}});const t={message:e.detail.feedback};b(t,{includeReplay:true,captureContext:{tags:{"nylas-web-element":"nylas-scheduling","nylas-web-element-version":this.version,"nylas-config-id":this.configurationId,"nylas-slug":this.slug,"host-url":window.location.href},extra:{configId:this.configurationId,slug:this.slug,version:this.version}}});this.showFeedbackModal=false}async getNylasSchedulerStore(){return this.baseProvider?.getStore("scheduler")}async getNylasSchedulerConnector(){return this.nylasSchedulerConnector}async getRef(){return this.host}getErrorObject(e){return{title:e?.title||L.title,category:e?.category||L.category,type:y.Error,description:e?.message||"",id:(new Date).getTime().toString(),ttl:"none"}}checkIfSessionIdOrConfigIdExists(e=true){if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){if(e){let e="";if(!this.sessionId){e+=r.t("sessionIdRequiredErrorMessage")}if(!this.sessionId&&!this.refConfigId&&!(this.slug&&this.clientId)){e=r.t("sessionIdRequiredErrorMessage")+" "+r.t("publicConfigErrorMessage")}this.nylasSchedulerError.emit({notification:{title:r.t("schedulingComponentErrorTitle"),category:g.Component,type:y.Error,description:e,id:(new Date).getTime().toString(),ttl:"none"},host:this.host})}return false}return true}isTimeslotValid(e){const t=new Date(e.start_time);if(t<new Date){this.nylasSchedulerError.emit({notification:{title:r.t("invalidTimeslotErrorTitle"),category:g.Component,type:y.Error,description:r.t("invalidTimeslotErrorMessage"),id:(new Date).getTime().toString(),ttl:"none"},host:this.host});return false}return true}validateAvailableDaysInFuture(e,t){const i=new Date;const n=new Date(e.getFullYear(),e.getMonth(),1).getTime()/1e3;const s=new Date(e.getFullYear(),e.getMonth()+1,1).getTime()/1e3;const o=Math.floor(l(i,t).getTime()/1e3);const a=Math.min(o,s);const r=n<i.getTime()/1e3?Math.floor(i.getTime()/1e3):n;return{startTime:r,endTime:a,endTimeForAvailableDaysInFuture:o}}applyThemeConfig(e){if(e){for(const[t,i]of Object.entries(e)){this.host.style.setProperty(`${t}`,i)}}}onFeedbackClick(e){e.preventDefault();this.showFeedbackModal=true}redirectToCustomUrl(e){window.location.assign(e)}nylasFormDropdownChangedHandler(e){const{name:t,value:i}=e.detail;if(t==="language"){const e=v[i];r.changeLanguage(e);this.stores?.scheduler?.set("selectedLanguage",e)}}render(){const t=this.mode==="app";const i=this.baseProvider?.getStore("scheduler");const n=i?.get("eventInfo");const o=i?.get("showBookingForm");const a=i?.get("cancelledEventInfo");const l=i?.get("cancelBookingId");const c=i?.get("selectedTimeslot");const d=i?.get("rescheduleBookingId");const g=i?.get("organizerConfirmationBookingId");const f=i?.get("rejectBookingId");const u=i?.get("confirmedEventInfo");const p=i?.get("nylasBranding")||this.nylasBranding;const m=i?.get("selectedDate");const b=i?.get("configSettings")?.scheduler?.confirmation_redirect_url;this.selectedDateLabel=m&&this.language?h(m.toLocaleDateString(this.language,{dateStyle:"full"})):`${r.t("noDateSelected")}`;const _=Object.keys(k).map((e=>({label:k[e],value:e})));const y=i?.get("selectedLanguage")||this.defaultLanguage||navigator.language||v.en;if(t&&(l||f)&&!a){return e(s,null,e(S,{version:this.version,nylasBranding:p,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"cancel-flow-page",part:"cancel-flow-page"},e("nylas-cancel-booking-form",{selectedTimeslot:c,cancelBookingId:l,rejectBookingId:f,exportparts:"ncbf, ncbf__icon, ncbf__title, ncbf__description, ncbf__reason-textarea, ncbf__button-cta, ncbf__button-outline, ncbf__card"}))),e("div",{class:"language-feedback-container"},this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),e("select-dropdown",{name:"language",searchPlaceholder:r.t("search"),options:_,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:_.find((e=>e.value==y)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{slot:"select-icon"},e("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&e("nylas-feedback-form",null))}if(t&&g){return e(s,null,e(S,null,e("div",{class:"manual-confirmation-page",part:"manual-confirmation-page"},e("nylas-organizer-confirmation-card",{organizerConfirmationBookingId:g,exportparts:"nmcc, nmcc__title, nmcc__description, nmcc__button-cta, nmcc__button-outline"}))),e("div",{class:"language-feedback-container"},this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),e("select-dropdown",{name:"language",searchPlaceholder:r.t("search"),options:_,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:_.find((e=>e.value==y)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{slot:"select-icon"},e("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&e("nylas-feedback-form",null))}if(t&&a){return e(s,null,e(S,{version:this.version,nylasBranding:p,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"cancelled-event-page",part:"cancelled-event-page"},e("nylas-cancelled-event-card",{cancelledEventInfo:a,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),e("div",{class:"language-feedback-container"},this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),e("select-dropdown",{name:"language",searchPlaceholder:r.t("search"),options:_,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:_.find((e=>e.value==y)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{slot:"select-icon"},e("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&e("nylas-feedback-form",null))}if(t&&u){return e(s,null,e(S,{version:this.version,nylasBranding:p,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"cancelled-event-page",part:"confirmed-event-page"},e("nylas-confirmed-event-card",{confirmedEventInfo:u,exportparts:"ncec, ncec__icon, ncec__title, ncec__description, ncec__button-outline, ncec__card"}))),e("div",{class:"language-feedback-container"},this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),e("select-dropdown",{name:"language",searchPlaceholder:r.t("search"),options:_,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:_.find((e=>e.value==y)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{slot:"select-icon"},e("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&e("nylas-feedback-form",null))}if(t&&n&&b){const e=this.bookingInfoConfirmed?.primaryParticipant;const t=this.bookingInfoConfirmed?.location;const i=this.bookingInfoConfirmed?.booking_ref;const s=this.bookingInfoConfirmed?.additionalFields||{};if(this.bookingInfo&&typeof this.bookingInfo?.additionalFields!=="undefined"){const e=this.bookingInfo.additionalFields;Object.keys(e).forEach((t=>{if(!s[t]&&e?.[t]){s[t]=e[t].value}}))}const o=this.stores?.scheduler.get("selectedTimeslot");const a=this.stores?.scheduler.get("selectedTimezone");const r=this.stores?.scheduler.get("selectedLanguage");const l=this.stores?.scheduler.get("configSettings");const c=this.configurationId?this.configurationId:l?.configuration_id;const d=window.location.search;const h=new URLSearchParams(d);h.set("booking_id",n.booking_id);e?.name&&h.set("name",e.name);e?.email&&h.set("email",e.email);o?.start_time&&h.set("start_time",(new Date(o.start_time).getTime()/1e3).toString());o?.end_time&&h.set("end_time",(new Date(o.end_time).getTime()/1e3).toString());a&&h.set("tz",a);r&&h.set("language",r);s&&h.set("additional_values",JSON.stringify(s));this.slug&&h.set("page_slug",this.slug);c&&h.set("config_id",c);t&&h.set("location",t);i&&h.set("booking_ref",i);this.redirectToCustomUrl(`${b}?${h.toString()}`);return}if(t&&n){return e(s,null,e(S,{version:this.version,nylasBranding:p,isLoading:this.isLoading,showNotification:this.showNotification},e("div",{class:"booked-event-page",part:"booked-event-page ns_booked-event-page"},e("nylas-booked-event-card",{selectedTimeslot:c,eventInfo:n,exportparts:"nbec, nbec__title, nbec__card, nbec__description, nbec__button-outline, nbec__cancel-cta, nbec__reschedule-cta"}))),e("div",{class:"language-feedback-container"},this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),e("select-dropdown",{name:"language",searchPlaceholder:r.t("search"),options:_,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:_.find((e=>e.value==y)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{slot:"select-icon"},e("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&e("nylas-feedback-form",null))}if(t&&(!n||!!d)&&!o){const t=this.host.querySelector('[slot="timeslot-picker-cta-label"]');return e(s,null,e(S,{version:this.version,nylasBranding:p,isLoading:this.isLoading,showNotification:this.showNotification},d&&e(E,null,`${r.t("rescheduleTitle")}`),e("div",{class:"select-date-page",part:"select-date-page ns_select-date-page"},e("div",{class:"left-panel",part:"ns_left-panel"},e("nylas-date-picker",{exportparts:"ndp, ndp__title, ndp__month-header, ndp__month-button, ndp__day, ndp__date, ndp__date--disabled, ndp__date--selected, ndp__date--current-day, ndp__date--current-month"}),e("nylas-locale-switch",{exportparts:"nls, nls__timezone, nls__timezone-dropdown, nls__timezone-drop-button, nls__timezone-drop-button-selected-label, nls__timezone-drop-content, nls__timezone-drop-label, nls__language, nls__language-dropdown, nls__language-drop-button, nls__language-drop-content, nls__language-drop-label"})),e("div",{class:`right-panel ${d?"reschedule":""}`,part:`ns_right-panel ${d?"ns_reschedule":""}`},e("h2",{part:"ns_right-panel__title"},e("calendar-icon",{part:"ns_right-panel__calendar-icon"}),e("span",{id:"selectedDate",part:"ns_right-panel__selected-date"},this.selectedDateLabel)),e("nylas-timeslot-picker",{exportparts:"ntp, ntp__time-picker-wrapper, ntp__timeslots, ntp__timeslot, ntp__timeslot--selected, ntp__button-primary"},t&&e("span",{slot:"timeslot-picker-cta-label"},e("slot",{name:"timeslot-picker-cta-label"})))))),this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),this.showFeedbackModal&&e("nylas-feedback-form",null))}if(t&&!n&&o){return e(s,null,e(S,{version:this.version,nylasBranding:p,isLoading:this.isLoading,showNotification:this.showNotification},d&&e(E,null,`${r.t("rescheduleTitle")}`),e("div",{class:"additional-data-page",part:"additional-data-page ns_additional-data-page"},e("div",{class:"left-panel ns_left-panel",part:"ns_left-panel"},e("div",{class:"wrapper",part:"ns_left-panel__wrapper"},e("nylas-selected-event-card",{exportparts:"nsec, nsec__card, nsec__icon, nsec__date, nsec__time, nsec__timezone"}))),e("div",{class:`right-panel ${d?"reschedule":""}`,part:`ns_right-panel ${d?"ns_reschedule":""}`},e("nylas-booking-form",{exportparts:"nbf, nbf__input-textfield, nbf__button-ghost, nbf__button-outline, nbf__button-primary, nbf__input-wrapper, nbf__checkbox-component, nbf__radio-button-group, nbf__textarea-component, nbf__dropdown, nbf__dropdown-button, nbf__dropdown-content"})))),e("div",{class:"language-feedback-container"},this.enableUserFeedback&&e("button-component",{id:"report-issue",variant:"basic",onClick:e=>this.onFeedbackClick(e)},e("feedback-icon",null)),e("select-dropdown",{name:"language",searchPlaceholder:r.t("search"),options:_,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:_.find((e=>e.value==y)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{slot:"select-icon"},e("translate-icon",{width:"20",height:"20"})))),this.showFeedbackModal&&e("nylas-feedback-form",null))}return e(s,null,e("slot",null))}get host(){return o(this)}static get watchers(){return{configurationId:["configurationIdChanged"],sessionId:["sessionIdChanged"],slug:["slugChanged"],clientId:["clientIdChanged"],bookingInfo:["bookingInfoChanged"],rescheduleBookingRef:["rescheduleBookingRefChanged"],cancelBookingRef:["cancelBookingRefChanged"],organizerConfirmationBookingRef:["organizerConfirmationBookingRefChanged"],localization:["localizationChanged"],defaultLanguage:["defaultLanguageChanged"],themeConfig:["themeConfigChanged"]}}};D.style=B;export{D as nylas_scheduling};
2
- //# sourceMappingURL=p-913511c9.entry.js.map