@nylas/web-elements 0.0.0-canary-20251006194336 → 0.0.0-canary-20251007161342
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +1920 -1830
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +1058 -968
- package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_37.cjs.entry.js.map +1 -1
- package/dist/cjs/info-icon.tooltip-component.entry.cjs.js.map +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +150 -6
- package/dist/cjs/info-icon_2.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nylas-web-elements.cjs.js +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +180 -8
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js.map +1 -1
- package/dist/collection/components/design-system/tooltip-component/tooltip-component.css +64 -52
- package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.css +4 -1
- package/dist/components/nylas-additional-participants.js +1 -1
- package/dist/components/nylas-availability-picker.js +1 -1
- package/dist/components/nylas-booking-calendar-picker.js +1 -1
- package/dist/components/nylas-booking-confirmation-redirect.js +1 -1
- package/dist/components/nylas-booking-confirmation-type.js +1 -1
- package/dist/components/nylas-booking-form.js +1 -1
- package/dist/components/nylas-buffer-time.js +1 -1
- package/dist/components/nylas-cancel-booking-form.js +1 -1
- package/dist/components/nylas-cancellation-policy.js +1 -1
- package/dist/components/nylas-confirmation-email.js +1 -1
- package/dist/components/nylas-connected-calendars.js +1 -1
- package/dist/components/nylas-custom-event-slug.js +1 -1
- package/dist/components/nylas-customize-booking-settings.js +1 -1
- package/dist/components/nylas-disable-emails.js +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-event-calendar.js +1 -1
- package/dist/components/nylas-event-capacity.js +1 -1
- package/dist/components/nylas-event-description.js +1 -1
- package/dist/components/nylas-event-location.js +1 -1
- package/dist/components/nylas-event-title.js +1 -1
- package/dist/components/nylas-feedback-form.js +1 -1
- package/dist/components/nylas-limit-future-bookings.js +1 -1
- package/dist/components/nylas-min-booking-notice.js +1 -1
- package/dist/components/nylas-min-cancellation-notice.js +1 -1
- package/dist/components/nylas-page-name.js +1 -1
- package/dist/components/nylas-participant-booking-calendars.js +1 -1
- package/dist/components/nylas-participants-custom-availability.js +1 -1
- package/dist/components/nylas-reminder-emails.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +32 -32
- package/dist/components/nylas-scheduling-method.js +1 -1
- package/dist/components/nylas-scheduling.js +5 -5
- package/dist/components/nylas-specific-time-availability-picker.js +1 -1
- package/dist/components/nylas-timeslot-interval.js +1 -1
- package/dist/components/{p-rxJJy5Oo.js → p-3545RJLr.js} +3 -3
- package/dist/components/{p-rxJJy5Oo.js.map → p-3545RJLr.js.map} +1 -1
- package/dist/components/{p-Cn55Fpla.js → p-7BhSS-Bd.js} +4 -4
- package/dist/components/{p-Cn55Fpla.js.map → p-7BhSS-Bd.js.map} +1 -1
- package/dist/components/{p-uQkH95_y.js → p-8_2du_nN.js} +3 -3
- package/dist/components/{p-uQkH95_y.js.map → p-8_2du_nN.js.map} +1 -1
- package/dist/components/{p-BozYWwCV.js → p-BCGUSoeG.js} +5 -5
- package/dist/components/{p-BozYWwCV.js.map → p-BCGUSoeG.js.map} +1 -1
- package/dist/components/{p-_d4igWlQ.js → p-BCIPr2QS.js} +3 -3
- package/dist/components/{p-_d4igWlQ.js.map → p-BCIPr2QS.js.map} +1 -1
- package/dist/components/{p-BECn9Pde.js → p-BMmV9VHf.js} +3 -3
- package/dist/components/{p-BECn9Pde.js.map → p-BMmV9VHf.js.map} +1 -1
- package/dist/components/{p-Bd6ktb2T.js → p-BQ7rKcsT.js} +3 -3
- package/dist/components/{p-Bd6ktb2T.js.map → p-BQ7rKcsT.js.map} +1 -1
- package/dist/components/{p-D4eqsyJm.js → p-BZgNerLB.js} +3 -3
- package/dist/components/{p-D4eqsyJm.js.map → p-BZgNerLB.js.map} +1 -1
- package/dist/components/{p-CFr7S7xZ.js → p-BbiXF9bo.js} +3 -3
- package/dist/components/{p-CFr7S7xZ.js.map → p-BbiXF9bo.js.map} +1 -1
- package/dist/components/{p-C0MruP24.js → p-BcOFblKk.js} +4 -4
- package/dist/components/{p-C0MruP24.js.map → p-BcOFblKk.js.map} +1 -1
- package/dist/components/{p-CjhVAUET.js → p-Bfqgcme8.js} +3 -3
- package/dist/components/{p-CjhVAUET.js.map → p-Bfqgcme8.js.map} +1 -1
- package/dist/components/{p-DP89yVjq.js → p-BjzdJtGW.js} +30 -30
- package/dist/components/{p-DP89yVjq.js.map → p-BjzdJtGW.js.map} +1 -1
- package/dist/components/{p-BsfPlCjP.js → p-Blck8Bcs.js} +4 -4
- package/dist/components/p-Blck8Bcs.js.map +1 -0
- package/dist/components/{p-D0DW7WaN.js → p-ByHRNvMZ.js} +3 -3
- package/dist/components/{p-D0DW7WaN.js.map → p-ByHRNvMZ.js.map} +1 -1
- package/dist/components/{p-Lm5wEjg5.js → p-C05AC9Oo.js} +3 -3
- package/dist/components/{p-Lm5wEjg5.js.map → p-C05AC9Oo.js.map} +1 -1
- package/dist/components/{p-CCycsGz-.js → p-CF2aDTBc.js} +4 -4
- package/dist/components/{p-CCycsGz-.js.map → p-CF2aDTBc.js.map} +1 -1
- package/dist/components/{p-DqTU9p1H.js → p-CRtNpnB8.js} +23 -23
- package/dist/components/{p-DqTU9p1H.js.map → p-CRtNpnB8.js.map} +1 -1
- package/dist/components/{p-4TFwsEyH.js → p-CZB1eeSS.js} +3 -3
- package/dist/components/{p-4TFwsEyH.js.map → p-CZB1eeSS.js.map} +1 -1
- package/dist/components/{p-GONArOts.js → p-CekZ56Hp.js} +3 -3
- package/dist/components/{p-GONArOts.js.map → p-CekZ56Hp.js.map} +1 -1
- package/dist/components/{p-DdWVjiOc.js → p-CjPPHFwZ.js} +3 -3
- package/dist/components/{p-DdWVjiOc.js.map → p-CjPPHFwZ.js.map} +1 -1
- package/dist/components/{p-Ddn7OFh6.js → p-Cok725Bi.js} +3 -3
- package/dist/components/{p-Ddn7OFh6.js.map → p-Cok725Bi.js.map} +1 -1
- package/dist/components/{p-2YQ61G9I.js → p-Cs7HqJ7u.js} +4 -4
- package/dist/components/{p-2YQ61G9I.js.map → p-Cs7HqJ7u.js.map} +1 -1
- package/dist/components/{p-BH-NeWHo.js → p-D6pAwX0V.js} +3 -3
- package/dist/components/{p-BH-NeWHo.js.map → p-D6pAwX0V.js.map} +1 -1
- package/dist/components/{p-CMYBbZIf.js → p-D80tLNpo.js} +8 -8
- package/dist/components/{p-CMYBbZIf.js.map → p-D80tLNpo.js.map} +1 -1
- package/dist/components/{p-CmT8m71G.js → p-DASjycch.js} +4 -4
- package/dist/components/{p-CmT8m71G.js.map → p-DASjycch.js.map} +1 -1
- package/dist/components/p-DKdNE-lT.js +191 -0
- package/dist/components/p-DKdNE-lT.js.map +1 -0
- package/dist/components/{p-c8B2BLMf.js → p-DbbFBnQl.js} +3 -3
- package/dist/components/{p-c8B2BLMf.js.map → p-DbbFBnQl.js.map} +1 -1
- package/dist/components/{p-hDljvFV5.js → p-DcBAJ-gA.js} +3 -3
- package/dist/components/{p-hDljvFV5.js.map → p-DcBAJ-gA.js.map} +1 -1
- package/dist/components/{p-CpcxmM9o.js → p-Drzrlmky.js} +3 -3
- package/dist/components/{p-CpcxmM9o.js.map → p-Drzrlmky.js.map} +1 -1
- package/dist/components/{p-CcXk4esK.js → p-DwiTuOmm.js} +3 -3
- package/dist/components/{p-CcXk4esK.js.map → p-DwiTuOmm.js.map} +1 -1
- package/dist/components/{p-Do_nkNrq.js → p-DzLGxevU.js} +3 -3
- package/dist/components/{p-Do_nkNrq.js.map → p-DzLGxevU.js.map} +1 -1
- package/dist/components/{p-DkowyBip.js → p-I7R8QIAX.js} +3 -3
- package/dist/components/{p-DkowyBip.js.map → p-I7R8QIAX.js.map} +1 -1
- package/dist/components/{p-Bh9O62dp.js → p-clfLpsrR.js} +3 -3
- package/dist/components/{p-Bh9O62dp.js.map → p-clfLpsrR.js.map} +1 -1
- package/dist/components/{p-Cef4ZiLB.js → p-jfGWG79j.js} +3 -3
- package/dist/components/{p-Cef4ZiLB.js.map → p-jfGWG79j.js.map} +1 -1
- package/dist/components/textarea-component.js +1 -1
- package/dist/components/tooltip-component.js +1 -1
- package/dist/esm/calendar-agenda-fill-icon_37.entry.js +1 -1
- package/dist/esm/calendar-agenda-fill-icon_37.entry.js.map +1 -1
- package/dist/esm/info-icon.tooltip-component.entry.js.map +1 -1
- package/dist/esm/info-icon_2.entry.js +150 -6
- package/dist/esm/info-icon_2.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nylas-web-elements.js +1 -1
- package/dist/nylas-web-elements/info-icon.tooltip-component.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/p-3036b46c.entry.js +2 -0
- package/dist/nylas-web-elements/p-3036b46c.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-2c5fd494.entry.js → p-52c3551d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2c5fd494.entry.js.map → p-52c3551d.entry.js.map} +1 -1
- package/dist/types/components/design-system/tooltip-component/toolitp-component.d.ts +25 -3
- package/dist/types/components.d.ts +8 -4
- package/package.json +2 -2
- package/dist/components/p-BsfPlCjP.js.map +0 -1
- package/dist/components/p-C6fgjGAL.js +0 -43
- package/dist/components/p-C6fgjGAL.js.map +0 -1
- package/dist/nylas-web-elements/p-4ebae0d7.entry.js +0 -2
- package/dist/nylas-web-elements/p-4ebae0d7.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-rxJJy5Oo.js","mappings":";;;;;;;;;AAAA,MAAM,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IAAI,EAAE,iCAAiC;QACvC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,YAAY,EAAE,OACZ,KAAiI,EACjI,8BAA6D,KAC3D;AACF,gBAAA,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM;gBAErC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC;;aAEtB;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA0CD,EAAA,4BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.scss?tag=nylas-booking-confirmation-type&encapsulation=shadow","src/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-booking-confirmation-type {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin-bottom: 1rem;\n\n .nylas-booking-confirmation-type__dropdown {\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n\n tooltip-component {\n display: flex;\n }\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1rem;\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\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, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-booking-confirmation-type` component is a UI component that allows the user to choose a custom redirect URL after a booking is confirmed.\n * @part nbct - The custom booking flow container\n * @part nbct__header - The header of the custom booking flow\n * @part nbct__dropdown - The dropdown container\n * @part nbct__dropdown-button - The dropdown button\n * @part nbct__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-booking-confirmation-type',\n styleUrl: 'nylas-booking-confirmation-type.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasBookingConfirmationType {\n @Element() host!: HTMLNylasBookingConfirmationTypeElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the confirmation redirect link.\n */\n @Prop() name: string = 'confirmation-type';\n /**\n * @standalone\n * The booking type.\n */\n @Prop() bookingType: string = 'booking';\n /**\n * @standalone\n * Show or hide the confirmation type.\n * This prop is automatically determined based on the value of selectedConfiguration in the config,\n * making it unnecessary to set this prop manually.\n * If the configuration is a group configuration, the component will not be shown.\n */\n @Prop() showComponent: boolean = this.selectedConfiguration?.event_booking?.booking_type !== 'custom-confirmation' && this.selectedConfiguration?.type !== 'group';\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 /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected bookingType.\n */\n @State() selectedBookingType!: string;\n\n /**\n * The open/close state of the booking confirmation type dropdown.\n */\n @State() showDropdown!: boolean;\n /**\n * This event is fired when the selected bookingType changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\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-booking-confirmation-type', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-booking-confirmation-type', 'selectedConfigurationChangedHandler', newValue);\n if (newValue?.event_booking?.booking_type) {\n this.selectedBookingType = newValue?.event_booking?.booking_type;\n // If the configuration is a group configuration, the component will not be shown.\n this.showDropdown = newValue?.event_booking?.booking_type !== 'custom-confirmation' && !!newValue?.scheduler?.organizer_confirmation_url && newValue?.type !== 'group';\n this.isInternalsAvailable && this.internals.setFormValue(this.selectedBookingType.toString(), this.name);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-booking-confirmation-type', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-booking-confirmation-type', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-booking-confirmation-type', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-booking-confirmation-type', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedBookingType = this.bookingType || 'booking';\n this.showDropdown = this.showComponent;\n }\n this.isInternalsAvailable && this.internals.setFormValue(this.selectedBookingType.toString(), this.name);\n }\n\n componentWillUpdate() {\n debug('nylas-booking-confirmation-type', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-booking-confirmation-type', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-booking-confirmation-type', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-booking-confirmation-type', 'componentDidRender');\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function' && typeof this.internals.setFormValue === 'function';\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 @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-booking-confirmation-type', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n this.selectedBookingType = value;\n this.internals.setFormValue(value.toString(), this.name);\n };\n this.valueChanged.emit({ ...event.detail, valueChanged });\n }\n\n @RegisterComponent<NylasBookingConfirmationType, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-booking-confirmation-type',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingOptions = [\n {\n label: i18next.t('nylasBookingConfirmationType.bookingOption', { context: 'booking' }),\n value: 'booking',\n },\n {\n label: i18next.t('nylasBookingConfirmationType.bookingOption', { context: 'organizerConfirmation' }),\n value: 'organizer-confirmation',\n },\n ];\n\n return (\n <Host>\n {this.showDropdown && (\n <div class=\"nylas-booking-confirmation-type\" part=\"nbct\">\n {bookingOptions.length > 0 && (\n <div class=\"nylas-booking-confirmation-type__dropdown\">\n <span class=\"label\">\n {i18next.t('nylasBookingConfirmationType.dropdownLabel')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasBookingConfirmationType.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n {this.selectedBookingType && (\n <select-dropdown\n name=\"booking-type\"\n options={bookingOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nbct__dropdown, sd_dropdown-button: nbct__dropdown-button, sd_dropdown-content: nbct__dropdown-content\"\n defaultSelectedOption={bookingOptions.find(cal => cal.value == this.selectedBookingType)}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n )}\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-3545RJLr.js","mappings":";;;;;;;;;AAAA,MAAM,+BAA+B,GAAG,u0GAAu0G;;;;;;;;;;;;;;;;MCuBl2G,4BAA4B,GAAAA,kBAAA,CAAA,MAAA,4BAAA,SAAAC,CAAA,CAAA;AANzC,IAAA,WAAA,GAAA;;;;;;AAkBU,QAAA,IAAI,CAAA,IAAA,GAAW,mBAAmB;AAKlC,QAAA,IAAW,CAAA,WAAA,GAAW,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AY,EAAE,OACZ,KAAiI,EACjI,8BAA6D,KAC3D;AACF,gBAAA,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM;gBAErC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC;;aAEtB;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA0CD,EAAA,4BAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.scss?tag=nylas-booking-confirmation-type&encapsulation=shadow","src/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-booking-confirmation-type {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin-bottom: 1rem;\n\n .nylas-booking-confirmation-type__dropdown {\n span.label {\n display: flex;\n align-items: center;\n gap: 4px;\n color: var(--nylas-base-800);\n\n tooltip-component {\n display: flex;\n }\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\n }\n\n select-dropdown::part(sd_dropdown-button) {\n width: 100%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n padding: 1rem;\n }\n\n select-dropdown::part(sd_dropdown-content) {\n width: 100%;\n max-width: unset;\n }\n\n select-dropdown::part(sd_dropdown-button-selected-label) {\n max-width: calc(100% - 2rem);\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n }\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, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-booking-confirmation-type` component is a UI component that allows the user to choose a custom redirect URL after a booking is confirmed.\n * @part nbct - The custom booking flow container\n * @part nbct__header - The header of the custom booking flow\n * @part nbct__dropdown - The dropdown container\n * @part nbct__dropdown-button - The dropdown button\n * @part nbct__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-booking-confirmation-type',\n styleUrl: 'nylas-booking-confirmation-type.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasBookingConfirmationType {\n @Element() host!: HTMLNylasBookingConfirmationTypeElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the confirmation redirect link.\n */\n @Prop() name: string = 'confirmation-type';\n /**\n * @standalone\n * The booking type.\n */\n @Prop() bookingType: string = 'booking';\n /**\n * @standalone\n * Show or hide the confirmation type.\n * This prop is automatically determined based on the value of selectedConfiguration in the config,\n * making it unnecessary to set this prop manually.\n * If the configuration is a group configuration, the component will not be shown.\n */\n @Prop() showComponent: boolean = this.selectedConfiguration?.event_booking?.booking_type !== 'custom-confirmation' && this.selectedConfiguration?.type !== 'group';\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 /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The selected bookingType.\n */\n @State() selectedBookingType!: string;\n\n /**\n * The open/close state of the booking confirmation type dropdown.\n */\n @State() showDropdown!: boolean;\n /**\n * This event is fired when the selected bookingType changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\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-booking-confirmation-type', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-booking-confirmation-type', 'selectedConfigurationChangedHandler', newValue);\n if (newValue?.event_booking?.booking_type) {\n this.selectedBookingType = newValue?.event_booking?.booking_type;\n // If the configuration is a group configuration, the component will not be shown.\n this.showDropdown = newValue?.event_booking?.booking_type !== 'custom-confirmation' && !!newValue?.scheduler?.organizer_confirmation_url && newValue?.type !== 'group';\n this.isInternalsAvailable && this.internals.setFormValue(this.selectedBookingType.toString(), this.name);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-booking-confirmation-type', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-booking-confirmation-type', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-booking-confirmation-type', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-booking-confirmation-type', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.selectedBookingType = this.bookingType || 'booking';\n this.showDropdown = this.showComponent;\n }\n this.isInternalsAvailable && this.internals.setFormValue(this.selectedBookingType.toString(), this.name);\n }\n\n componentWillUpdate() {\n debug('nylas-booking-confirmation-type', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-booking-confirmation-type', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-booking-confirmation-type', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-booking-confirmation-type', 'componentDidRender');\n }\n\n get isInternalsAvailable() {\n return typeof this.internals.setFormValue === 'function' && typeof this.internals.setFormValue === 'function';\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 @Listen('nylasFormDropdownChanged')\n nylasFormDropdownChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-booking-confirmation-type', 'nylasFormDropdownChangedHandler', event.detail);\n // Pass as handler so that if event.defaultPrevented by parent app, this will be skipped.\n const valueChanged = (event: CustomEvent<{ value: string; name: string }>) => {\n const { value } = event.detail;\n this.selectedBookingType = value;\n this.internals.setFormValue(value.toString(), this.name);\n };\n this.valueChanged.emit({ ...event.detail, valueChanged });\n }\n\n @RegisterComponent<NylasBookingConfirmationType, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-booking-confirmation-type',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const bookingOptions = [\n {\n label: i18next.t('nylasBookingConfirmationType.bookingOption', { context: 'booking' }),\n value: 'booking',\n },\n {\n label: i18next.t('nylasBookingConfirmationType.bookingOption', { context: 'organizerConfirmation' }),\n value: 'organizer-confirmation',\n },\n ];\n\n return (\n <Host>\n {this.showDropdown && (\n <div class=\"nylas-booking-confirmation-type\" part=\"nbct\">\n {bookingOptions.length > 0 && (\n <div class=\"nylas-booking-confirmation-type__dropdown\">\n <span class=\"label\">\n {i18next.t('nylasBookingConfirmationType.dropdownLabel')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasBookingConfirmationType.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n {this.selectedBookingType && (\n <select-dropdown\n name=\"booking-type\"\n options={bookingOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nbct__dropdown, sd_dropdown-button: nbct__dropdown-button, sd_dropdown-content: nbct__dropdown-content\"\n defaultSelectedOption={bookingOptions.find(cal => cal.value == this.selectedBookingType)}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n )}\n </div>\n )}\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -10,9 +10,9 @@ import { d as defineCustomElement$7 } from './p-1vC2UMtR.js';
|
|
|
10
10
|
import { d as defineCustomElement$6 } from './p-k1ckwhfy.js';
|
|
11
11
|
import { d as defineCustomElement$5 } from './p-S2TOEjUD.js';
|
|
12
12
|
import { d as defineCustomElement$4 } from './p-aUsZeU-H.js';
|
|
13
|
-
import { d as defineCustomElement$3 } from './p-
|
|
13
|
+
import { d as defineCustomElement$3 } from './p-Bfqgcme8.js';
|
|
14
14
|
import { d as defineCustomElement$2 } from './p-3m3YER4_.js';
|
|
15
|
-
import { d as defineCustomElement$1 } from './p-
|
|
15
|
+
import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
|
|
16
16
|
|
|
17
17
|
const nylasConfirmationEmailCss = ":host{display:block;--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;width:inherit}.nylas-confirmation-email{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);text-align:left}.nylas-confirmation-email .header{padding:1rem;display:grid;grid-template-columns:1fr auto;border-bottom:1px solid var(--nylas-base-200)}.nylas-confirmation-email .header h3{border-radius:var(--nylas-border-radius-2x);margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-confirmation-email .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-confirmation-email .header .confirmation-email-toggle{display:flex;gap:24px;align-items:center}.nylas-confirmation-email .header .confirmation-email-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-confirmation-email .header .confirmation-email-toggle .chevron:hover,.nylas-confirmation-email .header .confirmation-email-toggle .chevron:active{color:var(--nylas-primary)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.open{transform:rotate(90deg)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.closed{transform:rotate(270deg)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-confirmation-email .header .confirmation-email-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body{display:grid;grid-template-columns:1fr auto;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-confirmation-email .nylas-confirmation-email__body{grid-template-columns:1fr}}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section{padding:1rem;display:flex;flex-direction:column;gap:1rem;color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section{border:none}}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:1rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row.full-width-col{grid-template-columns:1fr;border-top:1px solid var(--nylas-base-200);padding-top:1.25rem;margin:0.25rem 0}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label{display:flex;align-items:center}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label span.required{color:var(--nylas-error, #cc4841)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label span.label-icon{margin-left:4px}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row label span.label-icon tooltip-component{display:flex}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row p{margin:0.25rem 0 0 0;font-size:16px;font-weight:500;line-height:24px;color:var(--nylas-base-900)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container{display:flex;gap:32px;width:100%}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container .input-container{display:flex;flex-direction:column;flex:1}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container .company-logo{display:flex;justify-content:center;align-items:center;width:200px;height:100px;border:var(--nylas-base-200) solid 1px;border-radius:var(--nylas-border-radius-2x);overflow:hidden;padding:10px}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row .company-logo-container .company-logo img{max-height:100%;max-width:100%;object-fit:contain;object-position:center}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .nylas-confirmation-email__row span.selected-value{font-weight:500}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection{display:flex;flex-direction:column;gap:1rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection .input-container{display:flex;flex-direction:column;gap:0.25rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__section .subsection .input-container textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview h4{font-size:14px;line-height:24px;color:var(--nylas-base-600);font-family:var(--nylas-font-family);font-weight:500;text-align:center;margin:0.75rem 0}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container{padding:0 2rem 1rem}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body .nylas-confirmation-email__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-confirmation-email .nylas-confirmation-email__body span.error-message{color:var(--nylas-error)}.nylas-confirmation-email .nylas-confirmation-email__body span.help-text{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-confirmation-email .nylas-confirmation-email__summary{padding:0.75rem 1rem;display:grid;grid-template-columns:auto 1fr;column-gap:1rem}.nylas-confirmation-email .nylas-confirmation-email__summary p{margin:0;display:flex;align-items:center;column-gap:4px;font-size:0.875rem;font-weight:400;line-height:21px;color:var(--nylas-base-600);text-align:left}.nylas-confirmation-email .nylas-confirmation-email__summary p span.summary-icon{display:flex;justify-content:center;min-width:20px}toggle-switch{padding-right:8px}";
|
|
18
18
|
|
|
@@ -308,6 +308,6 @@ function defineCustomElement() {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
export { NylasConfirmationEmail as N, defineCustomElement as d };
|
|
311
|
-
//# sourceMappingURL=p-
|
|
311
|
+
//# sourceMappingURL=p-7BhSS-Bd.js.map
|
|
312
312
|
|
|
313
|
-
//# sourceMappingURL=p-
|
|
313
|
+
//# sourceMappingURL=p-7BhSS-Bd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-Cn55Fpla.js","mappings":";;;;;;;;;;;;;;;;AAAA,MAAM,yBAAyB,GAAG,ixTAAixT;;;;;;;;;;;;;;;;MC0BtyT,sBAAsB,GAAAA,kBAAA,CAAA,MAAA,sBAAA,SAAAC,CAAA,CAAA;AANnC,IAAA,WAAA,GAAA;;;;;;AAiBU,QAAA,IAAyB,CAAA,yBAAA,GAAkB,EAAmB;AAK9D,QAAA,IAAY,CAAA,YAAA,GAAkB,EAAE;AAKhC,QAAA,IAAI,CAAA,IAAA,GAAW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AAA,CAAA;AAtBC,IAAA,iBAAiB,CAA4G;AAC5H,QAAA,IAAI,EAAE,0BAA0B;QAChC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,+BAA+B,EAAE,eAAe,CAAC;YAClD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,YAAY,EAAE,OACZ,KAAiI,EACjI,8BAA6D,KAC3D;AACF,gBAAA,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM;gBAErC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC;;aAEtB;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA4JD,EAAA,sBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.scss?tag=nylas-confirmation-email&encapsulation=shadow","src/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-confirmation-email {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n text-align: left;\n\n .header {\n padding: 1rem;\n display: grid;\n grid-template-columns: 1fr auto;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n border-radius: var(--nylas-border-radius-2x);\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.25rem 0 0 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 .confirmation-email-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n\n .nylas-confirmation-email__body {\n display: grid;\n grid-template-columns: 1fr auto;\n background-color: var(--nylas-base-25);\n border-radius: var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n\n .nylas-confirmation-email__section {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n color: var(--nylas-base-800);\n\n @media #{$mobile} {\n border: none;\n }\n\n .nylas-confirmation-email__row {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 1rem;\n\n &.full-width-col {\n grid-template-columns: 1fr;\n border-top: 1px solid var(--nylas-base-200);\n padding-top: 1.25rem;\n margin: 0.25rem 0;\n }\n\n label {\n display: flex;\n align-items: center;\n\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--nylas-base-900);\n }\n\n .company-logo-container {\n display: flex;\n gap: 32px;\n width: 100%;\n\n .input-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n }\n\n .company-logo {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 200px;\n height: 100px;\n border: var(--nylas-base-200) solid 1px;\n border-radius: var(--nylas-border-radius-2x);\n overflow: hidden;\n padding: 10px;\n }\n\n .company-logo img {\n max-height: 100%;\n max-width: 100%;\n object-fit: contain;\n object-position: center;\n }\n }\n\n span.selected-value {\n font-weight: 500;\n }\n }\n\n .subsection {\n display: flex;\n flex-direction: column;\n gap: 1rem;\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 .input-container {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n }\n }\n }\n }\n\n .nylas-confirmation-email__preview {\n width: 208px;\n background: var(--nylas-base-25);\n border-bottom-right-radius: var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n width: inherit;\n border-bottom-left-radius: var(--nylas-border-radius-2x);\n }\n\n h4 {\n font-size: 14px;\n line-height: 24px;\n color: var(--nylas-base-600);\n font-family: var(--nylas-font-family);\n font-weight: 500;\n text-align: center;\n margin: 0.75rem 0;\n }\n\n .preview-container {\n padding: 0 2rem 1rem;\n\n .slot {\n background-color: transparent;\n border-top: 1px solid var(--nylas-base-300);\n\n &.active {\n background-color: var(--nylas-base-100);\n }\n\n &:last-of-type {\n border-bottom: 1px solid var(--nylas-base-300);\n }\n }\n\n .event-slot {\n background-color: var(--nylas-base-600);\n border-top: 1px solid var(--nylas-base-300);\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n span.help-text {\n margin: 0.25rem 0 0 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 .nylas-confirmation-email__summary {\n padding: 0.75rem 1rem;\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: 1rem;\n\n p {\n margin: 0;\n display: flex;\n align-items: center;\n column-gap: 4px;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 21px;\n color: var(--nylas-base-600);\n text-align: left;\n\n span.summary-icon {\n display: flex;\n justify-content: center;\n min-width: 20px;\n }\n }\n }\n}\n\ntoggle-switch {\n padding-right: 8px;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, EmailTemplate, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-confirmation-email` component is a UI component that allows users to set buffer time before and after an event.\n *\n * @part nce__tab-heading - The nylas-confirmation-email main tab heading\n * @part nce - The nylas-confirmation-email container\n * @part nce__header - The header of the event communication section\n * @part nce__body - The body of the event communication section\n * @part nce__confirmation-email-toggle--container - The confirmation email drawer toggle container\n * @part nce__input-image-url - The input image URL container\n * @part nce__summary - The confirmation card summary container\n */\n@Component({\n tag: 'nylas-confirmation-email',\n styleUrl: 'nylas-confirmation-email.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConfirmationEmail {\n @Element() host!: HTMLNylasConfirmationEmailElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The confirmation email template data to display\n */\n @Prop() confirmationEmailTemplate: EmailTemplate = {} as EmailTemplate;\n /**\n * @standalone\n * List of participants\n */\n @Prop() participants: Participant[] = [];\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'confirmation-email-template';\n /**\n * @standalone\n * The nylas branding\n */\n @Prop() nylasBranding: boolean = true;\n /**\n * Is the confirmation email card open\n */\n @Prop() isOpen: boolean = false;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The confirmation email template state.\n */\n @State() confirmationEmail!: EmailTemplate;\n\n /**\n * The internal state to store the isOpen state.\n */\n @State() isConfirmationEmailOpen: boolean = this.isOpen;\n\n /**\n * The internal state to store the participants.\n */\n @State() participantsState: Participant[] = this.participants;\n\n /**\n * The error message to display when the image URL is invalid.\n */\n @State() invalidImageErrorMessage: string = i18next.t('nylasConfirmationEmail.error.invalidImageUrl');\n\n /**\n * This event is fired when the email reminders change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-confirmation-email', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-confirmation-email', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-confirmation-email', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-confirmation-email', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.confirmationEmail = { ...this.confirmationEmailTemplate };\n if (typeof this.confirmationEmail?.show_nylas_branding === 'undefined' && this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: true };\n } else if (!this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: false };\n }\n this.isConfirmationEmailOpen = this.isOpen;\n this.participantsState = this.participants;\n }\n }\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-confirmation-email', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-confirmation-email', 'selectedConfigurationChangedHandler', newValue);\n this.confirmationEmail = { ...(newValue?.scheduler?.email_template || this.confirmationEmailTemplate) };\n if (typeof this.confirmationEmail?.show_nylas_branding === 'undefined' && this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: true };\n } else if (!this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: false };\n }\n this.isConfirmationEmailOpen = !newValue?.event_booking?.reminders?.length;\n this.participantsState = newValue?.participants || this.participants;\n }\n\n @Watch('nylasBranding')\n nylasBrandingChangedHandler(newValue: boolean) {\n debug('nylas-confirmation-email', 'nylasBrandingChangedHandler', newValue);\n if (typeof this.confirmationEmail?.show_nylas_branding === 'undefined' && newValue) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: true };\n } else if (!newValue) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: false };\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n this.invalidImageErrorMessage = i18next.t('nylasConfirmationEmail.error.invalidImageUrl');\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @Listen('nylasFormInputChanged')\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string; type?: string }>) {\n const { name, value } = event.detail;\n const type = event.detail?.type;\n if (name === 'confirmation-email-title') {\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), title: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n } else if (name === 'confirmation-email-body' && type === 'multi_line_text') {\n this.handleEmailBodyChange(event);\n }\n }\n\n @Listen('valueChanged')\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-confirmation-email', 'valueChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (name === 'confirmation-email-logo') {\n this.confirmationEmail = { ...this.confirmationEmail, logo: value };\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n if (typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.internals.setValidity({});\n }\n }\n }\n\n @Listen('nylasFormInputImageUrlInvalid')\n async nylasFormInputImageUrlInvalidHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { value, name } = event.detail;\n if (name === 'confirmation-email-logo' && typeof this.internals.setValidity === 'function') {\n this.internals.setValidity({ customError: true }, i18next.t('nylasConfirmationEmail.error.invalidImageUrl') || value);\n }\n }\n\n @Listen('nylasFormSwitchToggled')\n nyalsFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-confirmation-email', 'nyalsFormSwitchToggledHandler', event.detail);\n if (event.detail.name === 'confirmation-email-show-branding') {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: event.detail.checked };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n }\n\n updateConfirmationFormValue() {\n debug('nylas-confirmation-email', 'updateConfirmationFormValue');\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n toggleConfirmationEmail() {\n this.isConfirmationEmailOpen = !this.isConfirmationEmailOpen;\n }\n\n handleEmailBodyChange(event) {\n const value = sanitize(event.detail.value);\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), body: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n @RegisterComponent<NylasConfirmationEmail, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-confirmation-email',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.nylasBranding', 'nylasBranding'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const organizer = this.participantsState.find(p => p.is_organizer);\n const organizerName = organizer?.name || organizer?.email;\n\n return (\n <Host>\n <div class=\"nylas-confirmation-email\" part=\"nce\">\n <div class=\"header\" part=\"nce__header\">\n <div>\n <h3>\n {this.confirmationEmail?.booking_confirmed?.title || organizerName\n ? i18next.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })\n : i18next.t('nylasConfirmationEmail.headerTitle')}\n </h3>\n <p>{i18next.t('nylasConfirmationEmail.headerSubTitle')}</p>\n </div>\n {this.isConfirmationEmailOpen ? (\n <div class=\"confirmation-email-toggle\" part=\"nce__confirmation-email-toggle--container\">\n <span class={`chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `} onClick={() => this.toggleConfirmationEmail()}>\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n ) : (\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.toggleConfirmationEmail();\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n {i18next.t('nylasConfirmationEmail.editButtonText')}\n </button-component>\n )}\n </div>\n\n {this.isConfirmationEmailOpen ? (\n <div class=\"nylas-confirmation-email__body\" part=\"nce__body\">\n <div class=\"nylas-confirmation-email__section\">\n {this.nylasBranding && (\n <div class=\"nylas-confirmation-email__row\">\n <label>\n {i18next.t('nylasConfirmationEmail.nylasBranding.label')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConfirmationEmail.nylasBranding.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <toggle-switch\n exportparts=\"ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider\"\n name={`confirmation-email-show-branding`}\n checked={this.confirmationEmail?.show_nylas_branding}\n themeConfig={this.themeConfig}\n />\n </div>\n )}\n <div class=\"nylas-confirmation-email__row\">\n <div class=\"subsection\">\n <div class=\"input-container\">\n <label>\n {i18next.t('nylasConfirmationEmail.companyLogoUrl.label')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConfirmationEmail.companyLogoUrl.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n\n {this.confirmationEmail && (\n <input-image-url\n name=\"confirmation-email-logo\"\n exportparts=\"iiu__logo-input-textfield: nce__input-image-url\"\n errorMessage={this.invalidImageErrorMessage}\n imageUrl={this.confirmationEmail?.logo ?? ''}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </div>\n </div>\n <div class=\"nylas-confirmation-email__row full-width-col\">\n <div class=\"subsection\">\n <h3>{i18next.t('nylasConfirmationEmail.emailMessage.header')}</h3>\n <div class=\"input-container\">\n <label htmlFor=\"title\">\n {i18next.t('nylasConfirmationEmail.emailMessage.label')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConfirmationEmail.emailMessage.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <input-component\n name=\"confirmation-email-title\"\n maxLength={60}\n placeholder={\n organizerName\n ? i18next.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })\n : i18next.t('nylasConfirmationEmail.headerTitle')\n }\n themeConfig={this.themeConfig}\n defaultValue={this.confirmationEmail?.booking_confirmed?.title ?? ''}\n ></input-component>\n </div>\n <div class=\"input-container\">\n {/* <label htmlFor=\"title\">Email body</label> */}\n <textarea-component\n label={i18next.t('nylasConfirmationEmail.emailMessage.additionalInfoLabel')}\n name=\"confirmation-email-body\"\n id=\"confirmation-email-body\"\n placeholder={i18next.t('nylasConfirmationEmail.emailMessage.additionalInfoPlaceholder')}\n tooltip={i18next.t('nylasConfirmationEmail.emailMessage.additionalInfoTooltip')}\n maxLength={500}\n defaultValue={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n themeConfig={this.themeConfig}\n ></textarea-component>\n\n {/* <textarea\n id=\"description\"\n part=\"nrt__textarea\"\n name=\"confirmation-email-body\"\n placeholder='Default body'\n value={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n maxlength=\"500\"\n rows={2}\n onInput={e => this.handleEmailBodyChange(e)}\n ></textarea> */}\n </div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div class=\"nylas-confirmation-email__summary\" part=\"nce__summary\">\n <p>\n <span class=\"summary-icon\">\n <person-clipboard-icon></person-clipboard-icon>\n </span>\n {i18next.t('nylasConfirmationEmail.allHosts')}\n </p>\n <p>\n <span class=\"summary-icon\">\n <clock-icon></clock-icon>\n </span>\n {i18next.t('nylasConfirmationEmail.immediatelyUponBooking')}\n </p>\n </div>\n )}\n </div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AAc,EAAA,EACxB,CAAA,CAAA,uBAAA,EAAA,IAAA,CAA+C,CAC1C,EACNA,QAAO,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAC3C,EACJ,CAAA,CAAA,GAAA,EAAA,IAAA,EACE,CAAM,CAAA,MAAA,EAAA,EAAA,KAAK,EAAC,cAAc,EAAA,EACxB,CAAA,CAAA,YAAA,EAAA,IAAA,CAAyB,CACpB,EACNA,QAAO,CAAC,CAAC,CAAC,+CAA+C,CAAC,CACzD,CACA,CACP,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAzJX,UAAA,CAAA;AAtBC,IAAA,iBAAiB,CAA4G;AAC5H,QAAA,IAAI,EAAE,0BAA0B;QAChC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,+BAA+B,EAAE,eAAe,CAAC;YAClD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE;AACZ,YAAA,YAAY,EAAE,OACZ,KAAiI,EACjI,8BAA6D,KAC3D;AACF,gBAAA,MAAM,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,MAAM;gBAErC,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,KAAK,CAAC;;aAEtB;AACF,SAAA;AACD,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CA4JD,EAAA,sBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.scss?tag=nylas-confirmation-email&encapsulation=shadow","src/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-confirmation-email {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n text-align: left;\n\n .header {\n padding: 1rem;\n display: grid;\n grid-template-columns: 1fr auto;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n border-radius: var(--nylas-border-radius-2x);\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.25rem 0 0 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 .confirmation-email-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n\n .nylas-confirmation-email__body {\n display: grid;\n grid-template-columns: 1fr auto;\n background-color: var(--nylas-base-25);\n border-radius: var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n grid-template-columns: 1fr;\n }\n\n .nylas-confirmation-email__section {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 1rem;\n color: var(--nylas-base-800);\n\n @media #{$mobile} {\n border: none;\n }\n\n .nylas-confirmation-email__row {\n display: grid;\n grid-template-columns: 1fr auto;\n align-items: center;\n gap: 1rem;\n\n &.full-width-col {\n grid-template-columns: 1fr;\n border-top: 1px solid var(--nylas-base-200);\n padding-top: 1.25rem;\n margin: 0.25rem 0;\n }\n\n label {\n display: flex;\n align-items: center;\n\n span.required {\n color: var(--nylas-error, #cc4841);\n }\n\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n p {\n margin: 0.25rem 0 0 0;\n font-size: 16px;\n font-weight: 500;\n line-height: 24px;\n color: var(--nylas-base-900);\n }\n\n .company-logo-container {\n display: flex;\n gap: 32px;\n width: 100%;\n\n .input-container {\n display: flex;\n flex-direction: column;\n flex: 1;\n }\n\n .company-logo {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 200px;\n height: 100px;\n border: var(--nylas-base-200) solid 1px;\n border-radius: var(--nylas-border-radius-2x);\n overflow: hidden;\n padding: 10px;\n }\n\n .company-logo img {\n max-height: 100%;\n max-width: 100%;\n object-fit: contain;\n object-position: center;\n }\n }\n\n span.selected-value {\n font-weight: 500;\n }\n }\n\n .subsection {\n display: flex;\n flex-direction: column;\n gap: 1rem;\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 .input-container {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n }\n }\n }\n }\n\n .nylas-confirmation-email__preview {\n width: 208px;\n background: var(--nylas-base-25);\n border-bottom-right-radius: var(--nylas-border-radius-2x);\n\n @media #{$mobile} {\n width: inherit;\n border-bottom-left-radius: var(--nylas-border-radius-2x);\n }\n\n h4 {\n font-size: 14px;\n line-height: 24px;\n color: var(--nylas-base-600);\n font-family: var(--nylas-font-family);\n font-weight: 500;\n text-align: center;\n margin: 0.75rem 0;\n }\n\n .preview-container {\n padding: 0 2rem 1rem;\n\n .slot {\n background-color: transparent;\n border-top: 1px solid var(--nylas-base-300);\n\n &.active {\n background-color: var(--nylas-base-100);\n }\n\n &:last-of-type {\n border-bottom: 1px solid var(--nylas-base-300);\n }\n }\n\n .event-slot {\n background-color: var(--nylas-base-600);\n border-top: 1px solid var(--nylas-base-300);\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\n\n span.help-text {\n margin: 0.25rem 0 0 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 .nylas-confirmation-email__summary {\n padding: 0.75rem 1rem;\n display: grid;\n grid-template-columns: auto 1fr;\n column-gap: 1rem;\n\n p {\n margin: 0;\n display: flex;\n align-items: center;\n column-gap: 4px;\n font-size: 0.875rem;\n font-weight: 400;\n line-height: 21px;\n color: var(--nylas-base-600);\n text-align: left;\n\n span.summary-icon {\n display: flex;\n justify-content: center;\n min-width: 20px;\n }\n }\n }\n}\n\ntoggle-switch {\n padding-right: 8px;\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, EmailTemplate, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-confirmation-email` component is a UI component that allows users to set buffer time before and after an event.\n *\n * @part nce__tab-heading - The nylas-confirmation-email main tab heading\n * @part nce - The nylas-confirmation-email container\n * @part nce__header - The header of the event communication section\n * @part nce__body - The body of the event communication section\n * @part nce__confirmation-email-toggle--container - The confirmation email drawer toggle container\n * @part nce__input-image-url - The input image URL container\n * @part nce__summary - The confirmation card summary container\n */\n@Component({\n tag: 'nylas-confirmation-email',\n styleUrl: 'nylas-confirmation-email.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasConfirmationEmail {\n @Element() host!: HTMLNylasConfirmationEmailElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The confirmation email template data to display\n */\n @Prop() confirmationEmailTemplate: EmailTemplate = {} as EmailTemplate;\n /**\n * @standalone\n * List of participants\n */\n @Prop() participants: Participant[] = [];\n /**\n * @standalone\n * The name of the component\n */\n @Prop() name: string = 'confirmation-email-template';\n /**\n * @standalone\n * The nylas branding\n */\n @Prop() nylasBranding: boolean = true;\n /**\n * Is the confirmation email card open\n */\n @Prop() isOpen: boolean = false;\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The confirmation email template state.\n */\n @State() confirmationEmail!: EmailTemplate;\n\n /**\n * The internal state to store the isOpen state.\n */\n @State() isConfirmationEmailOpen: boolean = this.isOpen;\n\n /**\n * The internal state to store the participants.\n */\n @State() participantsState: Participant[] = this.participants;\n\n /**\n * The error message to display when the image URL is invalid.\n */\n @State() invalidImageErrorMessage: string = i18next.t('nylasConfirmationEmail.error.invalidImageUrl');\n\n /**\n * This event is fired when the email reminders change.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('nylas-confirmation-email', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-confirmation-email', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-confirmation-email', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-confirmation-email', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.confirmationEmail = { ...this.confirmationEmailTemplate };\n if (typeof this.confirmationEmail?.show_nylas_branding === 'undefined' && this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: true };\n } else if (!this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: false };\n }\n this.isConfirmationEmailOpen = this.isOpen;\n this.participantsState = this.participants;\n }\n }\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-confirmation-email', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-confirmation-email', 'selectedConfigurationChangedHandler', newValue);\n this.confirmationEmail = { ...(newValue?.scheduler?.email_template || this.confirmationEmailTemplate) };\n if (typeof this.confirmationEmail?.show_nylas_branding === 'undefined' && this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: true };\n } else if (!this.nylasBranding) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: false };\n }\n this.isConfirmationEmailOpen = !newValue?.event_booking?.reminders?.length;\n this.participantsState = newValue?.participants || this.participants;\n }\n\n @Watch('nylasBranding')\n nylasBrandingChangedHandler(newValue: boolean) {\n debug('nylas-confirmation-email', 'nylasBrandingChangedHandler', newValue);\n if (typeof this.confirmationEmail?.show_nylas_branding === 'undefined' && newValue) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: true };\n } else if (!newValue) {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: false };\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n this.invalidImageErrorMessage = i18next.t('nylasConfirmationEmail.error.invalidImageUrl');\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @Listen('nylasFormInputChanged')\n async nylasFormInputChangeHandler(event: CustomEvent<{ value: string; name: string; type?: string }>) {\n const { name, value } = event.detail;\n const type = event.detail?.type;\n if (name === 'confirmation-email-title') {\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), title: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n } else if (name === 'confirmation-email-body' && type === 'multi_line_text') {\n this.handleEmailBodyChange(event);\n }\n }\n\n @Listen('valueChanged')\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-confirmation-email', 'valueChangedHandler', event.detail);\n const { value, name } = event.detail;\n\n if (name === 'confirmation-email-logo') {\n this.confirmationEmail = { ...this.confirmationEmail, logo: value };\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n if (typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.internals.setValidity({});\n }\n }\n }\n\n @Listen('nylasFormInputImageUrlInvalid')\n async nylasFormInputImageUrlInvalidHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { value, name } = event.detail;\n if (name === 'confirmation-email-logo' && typeof this.internals.setValidity === 'function') {\n this.internals.setValidity({ customError: true }, i18next.t('nylasConfirmationEmail.error.invalidImageUrl') || value);\n }\n }\n\n @Listen('nylasFormSwitchToggled')\n nyalsFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-confirmation-email', 'nyalsFormSwitchToggledHandler', event.detail);\n if (event.detail.name === 'confirmation-email-show-branding') {\n this.confirmationEmail = { ...this.confirmationEmail, show_nylas_branding: event.detail.checked };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n }\n\n updateConfirmationFormValue() {\n debug('nylas-confirmation-email', 'updateConfirmationFormValue');\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n toggleConfirmationEmail() {\n this.isConfirmationEmailOpen = !this.isConfirmationEmailOpen;\n }\n\n handleEmailBodyChange(event) {\n const value = sanitize(event.detail.value);\n this.confirmationEmail = { ...this.confirmationEmail, booking_confirmed: { ...(this.confirmationEmail?.booking_confirmed || {}), body: value } };\n this.internals.setFormValue(JSON.stringify(this.confirmationEmail), this.name);\n this.valueChanged.emit({ value: JSON.stringify(this.confirmationEmail), name: this.name });\n }\n\n @RegisterComponent<NylasConfirmationEmail, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-confirmation-email',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.nylasBranding', 'nylasBranding'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {\n valueChanged: async (\n event: CustomEvent<{ value: string; name: string; valueChanged?: (event: CustomEvent<{ value: string; name: string }>) => void }>,\n _nylasSchedulerConfigConnector: NylasSchedulerConfigConnector,\n ) => {\n const { valueChanged } = event.detail;\n // If a handler is passed, call it.\n if (valueChanged) {\n valueChanged(event);\n }\n },\n },\n fireRegisterEvent: true,\n })\n render() {\n const organizer = this.participantsState.find(p => p.is_organizer);\n const organizerName = organizer?.name || organizer?.email;\n\n return (\n <Host>\n <div class=\"nylas-confirmation-email\" part=\"nce\">\n <div class=\"header\" part=\"nce__header\">\n <div>\n <h3>\n {this.confirmationEmail?.booking_confirmed?.title || organizerName\n ? i18next.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })\n : i18next.t('nylasConfirmationEmail.headerTitle')}\n </h3>\n <p>{i18next.t('nylasConfirmationEmail.headerSubTitle')}</p>\n </div>\n {this.isConfirmationEmailOpen ? (\n <div class=\"confirmation-email-toggle\" part=\"nce__confirmation-email-toggle--container\">\n <span class={`chevron ${this.isConfirmationEmailOpen ? 'open' : 'closed'} `} onClick={() => this.toggleConfirmationEmail()}>\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n ) : (\n <button-component\n variant={'basic'}\n clickHandler={event => {\n event.preventDefault();\n this.toggleConfirmationEmail();\n }}\n >\n <edit-icon width=\"16\" height=\"16\"></edit-icon>\n {i18next.t('nylasConfirmationEmail.editButtonText')}\n </button-component>\n )}\n </div>\n\n {this.isConfirmationEmailOpen ? (\n <div class=\"nylas-confirmation-email__body\" part=\"nce__body\">\n <div class=\"nylas-confirmation-email__section\">\n {this.nylasBranding && (\n <div class=\"nylas-confirmation-email__row\">\n <label>\n {i18next.t('nylasConfirmationEmail.nylasBranding.label')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConfirmationEmail.nylasBranding.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <toggle-switch\n exportparts=\"ts_label: nce__toggle-label, ts_input: nce_toggle-input, ts_slider: nce_toggle-slider\"\n name={`confirmation-email-show-branding`}\n checked={this.confirmationEmail?.show_nylas_branding}\n themeConfig={this.themeConfig}\n />\n </div>\n )}\n <div class=\"nylas-confirmation-email__row\">\n <div class=\"subsection\">\n <div class=\"input-container\">\n <label>\n {i18next.t('nylasConfirmationEmail.companyLogoUrl.label')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConfirmationEmail.companyLogoUrl.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n\n {this.confirmationEmail && (\n <input-image-url\n name=\"confirmation-email-logo\"\n exportparts=\"iiu__logo-input-textfield: nce__input-image-url\"\n errorMessage={this.invalidImageErrorMessage}\n imageUrl={this.confirmationEmail?.logo ?? ''}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </div>\n </div>\n <div class=\"nylas-confirmation-email__row full-width-col\">\n <div class=\"subsection\">\n <h3>{i18next.t('nylasConfirmationEmail.emailMessage.header')}</h3>\n <div class=\"input-container\">\n <label htmlFor=\"title\">\n {i18next.t('nylasConfirmationEmail.emailMessage.label')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasConfirmationEmail.emailMessage.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <input-component\n name=\"confirmation-email-title\"\n maxLength={60}\n placeholder={\n organizerName\n ? i18next.t('nylasConfirmationEmail.headerTitle_withOrganizer', { organizerName: organizerName })\n : i18next.t('nylasConfirmationEmail.headerTitle')\n }\n themeConfig={this.themeConfig}\n defaultValue={this.confirmationEmail?.booking_confirmed?.title ?? ''}\n ></input-component>\n </div>\n <div class=\"input-container\">\n {/* <label htmlFor=\"title\">Email body</label> */}\n <textarea-component\n label={i18next.t('nylasConfirmationEmail.emailMessage.additionalInfoLabel')}\n name=\"confirmation-email-body\"\n id=\"confirmation-email-body\"\n placeholder={i18next.t('nylasConfirmationEmail.emailMessage.additionalInfoPlaceholder')}\n tooltip={i18next.t('nylasConfirmationEmail.emailMessage.additionalInfoTooltip')}\n maxLength={500}\n defaultValue={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n themeConfig={this.themeConfig}\n ></textarea-component>\n\n {/* <textarea\n id=\"description\"\n part=\"nrt__textarea\"\n name=\"confirmation-email-body\"\n placeholder='Default body'\n value={this.confirmationEmail?.booking_confirmed?.body ?? ''}\n maxlength=\"500\"\n rows={2}\n onInput={e => this.handleEmailBodyChange(e)}\n ></textarea> */}\n </div>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div class=\"nylas-confirmation-email__summary\" part=\"nce__summary\">\n <p>\n <span class=\"summary-icon\">\n <person-clipboard-icon></person-clipboard-icon>\n </span>\n {i18next.t('nylasConfirmationEmail.allHosts')}\n </p>\n <p>\n <span class=\"summary-icon\">\n <clock-icon></clock-icon>\n </span>\n {i18next.t('nylasConfirmationEmail.immediatelyUponBooking')}\n </p>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, e as createEvent, h, i as Host } from './p-
|
|
|
2
2
|
import { R as RegisterComponent } from './p-Bav8j0p4.js';
|
|
3
3
|
import { a as debug, b as instance, s as sanitize } from './p-DAil6KUW.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './p-7S1M5IE9.js';
|
|
5
|
-
import { d as defineCustomElement$1 } from './p-
|
|
5
|
+
import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
|
|
6
6
|
|
|
7
7
|
const nylasCancellationPolicyCss = ":host{--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}.nylas-cancellation-policy{display:flex;flex-direction:column;gap:4px}.nylas-cancellation-policy label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-cancellation-policy label span.label-icon{margin-left:4px}.nylas-cancellation-policy label span.label-icon tooltip-component{display:flex}.nylas-cancellation-policy textarea{padding:12px 16px;border-width:1;resize:vertical;border-radius:8px;font-family:var(--nylas-font-family);font-size:16px;line-height:24px;border:1px solid var(--nylas-base-200);background-color:var(--nylas-base-0);color:var(--nylas-base-900)}.nylas-cancellation-policy textarea::-webkit-resizer{display:none}";
|
|
8
8
|
|
|
@@ -144,6 +144,6 @@ function defineCustomElement() {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
export { NylasCancellationPolicy as N, defineCustomElement as d };
|
|
147
|
-
//# sourceMappingURL=p-
|
|
147
|
+
//# sourceMappingURL=p-8_2du_nN.js.map
|
|
148
148
|
|
|
149
|
-
//# sourceMappingURL=p-
|
|
149
|
+
//# sourceMappingURL=p-8_2du_nN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-8_2du_nN.js","mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,i3FAAi3F;;;;;;;;;;;;;;;;MCoBv4F,uBAAuB,GAAAA,kBAAA,CAAA,MAAA,uBAAA,SAAAC,CAAA,CAAA;AANpC,IAAA,WAAA,GAAA;;;;;;AA2BU,QAAA,IAAI,CAAA,IAAA,GAAW,qBAAqB;AA4H7C;AAhGC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,2BAA2B,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACzE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAI1C,IAAA,mCAAmC,CAAC,QAAuB,EAAA;AACzD,QAAA,KAAK,CAAC,2BAA2B,EAAE,qCAAqC,EAAE,QAAQ,CAAC;AACnF,QAAA,IAAI,CAAC,OAAO,GAAG,QAAQ,EAAE,SAAS,EAAE,mBAAmB,IAAI,IAAI,CAAC,kBAAkB,IAAI,EAAE;;IAI1F,8BAA8B,C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a,CACpJ,CACD;;;;;;;;;;;;;;;;;;;;;;;;AAfX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAA6G;AAC7H,QAAA,IAAI,EAAE,2BAA2B;QACjC,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,uCAAuC,EAAE,uBAAuB,CAAC;YAClE,CAAC,kCAAkC,EAAE,kBAAkB,CAAC;YACxD,CAAC,6BAA6B,EAAE,aAAa,CAAC;SAC/C,CAAC;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAkBD,EAAA,uBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.scss?tag=nylas-cancellation-policy&encapsulation=shadow","src/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n @include default-css-variables;\n}\n\n.nylas-cancellation-policy {\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: 16px;\n font-style: normal;\n font-weight: 400;\n line-height: 150%;\n\n /* 21px */\n span.label-icon {\n margin-left: 4px;\n\n tooltip-component {\n display: flex;\n }\n }\n }\n\n textarea {\n padding: 12px 16px;\n border-width: 1;\n resize: vertical;\n border-radius: 8px;\n font-family: var(--nylas-font-family);\n font-size: 16px;\n line-height: 24px;\n border: 1px solid var(--nylas-base-200);\n background-color: var(--nylas-base-0);\n color: var(--nylas-base-900);\n\n &::-webkit-resizer {\n display: none;\n }\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-cancellation-policy` component is a form input for the cancellation policy message of an event.\n * @part ncpolicy - The cancellation policy container\n * @part ncpolicy__textarea - The cancellation policy textarea\n */\n@Component({\n tag: 'nylas-cancellation-policy',\n styleUrl: 'nylas-cancellation-policy.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasCancellationPolicy {\n /**\n * The host element <nylas-cancellation-policy>\n */\n @Element() host!: HTMLElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The cancellation policy stored in the configuration\n */\n @Prop() cancellationPolicy?: string;\n\n /**\n * @standalone\n * The name of the cancellation policy input.\n */\n @Prop() name: string = 'cancellation-policy';\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * The selected cancellation policy state. This defaults to the cancellation policy from the configuration or an empty string.\n */\n @State() message!: string;\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\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-cancellation-policy', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-custom-booking-flow', 'selectedConfigurationChangedHandler', newValue);\n this.message = newValue?.scheduler?.cancellation_policy || this.cancellationPolicy || '';\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n /**\n * Event emitted when the cancellation policy message changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n connectedCallback() {\n debug('nylas-cancellation-policy', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-cancellation-policy', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n }\n\n componentDidLoad() {\n debug('nylas-cancellation-policy', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.message = this.cancellationPolicy || '';\n }\n }\n\n disconnectedCallback() {\n debug('nylas-cancellation-policy', 'disconnectedCallback');\n }\n\n handleChange(event) {\n const value = sanitize(event.target.value);\n this.message = value;\n this.internals.setFormValue(value, this.name);\n this.valueChanged.emit({ value: value, name: this.name });\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<NylasCancellationPolicy, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-cancellation-policy',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-cancellation-policy\" part=\"ncpolicy\">\n <label htmlFor={this.name}>\n {i18next.t('nylasCancellationPolicy.cancellationPolicyLabel')}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasCancellationPolicy.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n </label>\n <textarea id={this.name} part=\"ncpolicy__textarea\" name={this.name} value={this.message} maxlength=\"250\" onInput={e => this.handleChange(e)}></textarea>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -10,14 +10,14 @@ import { d as defineCustomElement$c } from './p-_0P0Tp97.js';
|
|
|
10
10
|
import { d as defineCustomElement$b } from './p-CRehZg0N.js';
|
|
11
11
|
import { d as defineCustomElement$a } from './p-7S1M5IE9.js';
|
|
12
12
|
import { d as defineCustomElement$9 } from './p-S2TOEjUD.js';
|
|
13
|
-
import { d as defineCustomElement$8 } from './p-
|
|
13
|
+
import { d as defineCustomElement$8 } from './p-DbbFBnQl.js';
|
|
14
14
|
import { d as defineCustomElement$7 } from './p-Paw4qgUf.js';
|
|
15
|
-
import { d as defineCustomElement$6 } from './p-
|
|
15
|
+
import { d as defineCustomElement$6 } from './p-Blck8Bcs.js';
|
|
16
16
|
import { d as defineCustomElement$5 } from './p-CiCEyhZr.js';
|
|
17
17
|
import { d as defineCustomElement$4 } from './p-ClTk9Ttz.js';
|
|
18
18
|
import { d as defineCustomElement$3 } from './p-D7lRYhTx.js';
|
|
19
19
|
import { d as defineCustomElement$2 } from './p-3m3YER4_.js';
|
|
20
|
-
import { d as defineCustomElement$1 } from './p-
|
|
20
|
+
import { d as defineCustomElement$1 } from './p-DKdNE-lT.js';
|
|
21
21
|
|
|
22
22
|
const nylasParticipantsCustomAvailabilityCss = ":host{display:block;--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;width:inherit}.nylas-participants-custom-availability{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .header{padding:1rem}.nylas-participants-custom-availability .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participants-custom-availability .header p{margin:0.25rem 0 0 0;font-size:0.875rem;font-weight:400;line-height:20px;color:var(--nylas-base-600);text-align:left}.nylas-participants-custom-availability .content .participant-container{padding-top:8px;border-top:1px solid var(--nylas-base-200);color:var(--nylas-base-900);background-color:var(--nylas-base-25)}.nylas-participants-custom-availability .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 12px}.nylas-participants-custom-availability .content .participant-container .participant-title p{margin:0}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}.nylas-participants-custom-availability .content .participant-container nylas-availability-picker::part(nap){margin:0;border:none}.nylas-participants-custom-availability .content .participant-container nylas-specific-time-availability-picker::part(nstap){margin:0;border:none}.nylas-participants-custom-availability .content .participant-tabs{justify-content:space-between;display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:8px 16px;border-top:1px solid var(--nylas-base-200)}.nylas-participants-custom-availability .content .participant-tab{cursor:pointer;padding:8px 16px;border-radius:var(--nylas-border-radius-2x);background-color:var(--nylas-base-100);text-align:center;font-size:14px;font-weight:500;line-height:20px;color:var(--nylas-base-600)}.nylas-participants-custom-availability .content .participant-tab.active{background-color:var(--nylas-primary);color:var(--nylas-base-100)}";
|
|
23
23
|
|
|
@@ -360,6 +360,6 @@ function defineCustomElement() {
|
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
export { NylasParticipantsCustomAvailability as N, defineCustomElement as d };
|
|
363
|
-
//# sourceMappingURL=p-
|
|
363
|
+
//# sourceMappingURL=p-BCGUSoeG.js.map
|
|
364
364
|
|
|
365
|
-
//# sourceMappingURL=p-
|
|
365
|
+
//# sourceMappingURL=p-BCGUSoeG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-BozYWwCV.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,uyKAAuyK;;;;;;;;;;;;;;;;MC6Bz0K,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAmBU,QAAA,IAAI,CAAA,IAAA,GAAW,iCAAiC;QAMhD,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;QA4B3E,IAAoB,CAAA,oBAAA,GAWzB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AA0S5C;AAtSC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,wCAAwC,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACtF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.scss?tag=nylas-participants-custom-availability&encapsulation=shadow","src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-participants-custom-availability {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n .header {\n padding: 1rem;\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 p {\n margin: 0.25rem 0 0 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 .content {\n .participant-container {\n padding-top: 8px;\n border-top: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 12px;\n p {\n margin: 0;\n }\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n nylas-availability-picker::part(nap) {\n margin: 0;\n border: none;\n }\n nylas-specific-time-availability-picker::part(nstap) {\n margin: 0;\n border: none;\n }\n }\n .participant-tabs {\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n padding: 8px 16px;\n border-top: 1px solid var(--nylas-base-200);\n }\n .participant-tab {\n cursor: pointer;\n padding: 8px 16px;\n border-radius: var(--nylas-border-radius-2x);\n background-color: var(--nylas-base-100);\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--nylas-base-600);\n &.active {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-100);\n }\n }\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, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, OpenHours, Participant, ParticipantAvailability, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n tab: 'availability' | 'specific-time-availability';\n isOpen: boolean;\n openHours: OpenHours[];\n specificTimesAvailability: SpecificTimeAvailability[];\n name: string;\n availability?: ParticipantAvailability;\n timezone?: string;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n const existingParticipant = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name);\n const existingOpenHours = existingParticipant?.availability?.open_hours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n const timeZone =\n existingOpenHours && existingOpenHours.length > 0\n ? existingParticipant?.timezone\n : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours?.at(0)?.timezone ||\n this.selectedConfiguration?.event_booking?.timezone ||\n window.Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const existingSpecificTimeAvailability = existingParticipant?.specific_time_availability || [];\n const specificTimesAvailability = existingSpecificTimeAvailability?.length > 0 ? existingSpecificTimeAvailability : [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['tab'] = 'availability';\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants[event.detail.name]['timezone'] = event.detail.checked ? timeZone : undefined;\n this.selectedParticipants[event.detail.name]['specificTimesAvailability'] = event.detail.checked ? specificTimesAvailability : [];\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-time-availability-')) {\n return;\n }\n\n // Parse the JSON value once - can contain { openHours: OpenHours[], timezone: string } or SpecificTimeAvailability[]\n let jsonValue;\n try {\n jsonValue = JSON.parse(value);\n } catch (error) {\n console.error(`Failed to parse JSON for participant ${name}:`, error);\n return;\n }\n\n // Validate the form\n if (this.isInternalsAvailable) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // We extract the unique key (4th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n console.warn(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[3];\n if (!this.selectedParticipants[key]) return;\n const existingOpenHours = jsonValue.openHours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n this.selectedParticipants[key]['openHours'] = openHours;\n this.selectedParticipants[key]['tab'] = 'availability';\n } else if (name.startsWith('participant-specific-time-availability')) {\n // Expected name format: \"participant-specific-time-availability-{index}-{uniqueKey}\"\n // Extract the unique key (6th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n console.warn(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-time-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[5];\n if (!this.selectedParticipants[key]) return;\n const existingSpecificTimeAvailability = jsonValue || [];\n this.selectedParticipants[key]['specificTimesAvailability'] = existingSpecificTimeAvailability;\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n }\n\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificTimeAvailability = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];\n });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantSpecificTimeAvailability), `${this.name}-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantSpecificTimeAvailability), name: `${this.name}-specific-time` });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: Boolean(participant.availability?.open_hours),\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n specificTimesAvailability: participant.specific_time_availability || [],\n };\n });\n return selectedParticipants;\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>{i18next.t('nylasParticipantCustomAvailability.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantCustomAvailability.headerSubTitle')}</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n const participantOpenHours = participant.availability?.open_hours || [];\n if (!participant || !participant.name || !participant.availability) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{i18next.t('nylasParticipantCustomAvailability.participantOpenHoursTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n themeConfig={this.themeConfig}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <div class=\"participant-tabs\" part=\"npca__participant-tabs\">\n <div\n class={`participant-tab ${participant.tab === 'availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantAvailabilityTab')}</span>\n </div>\n <div\n class={`participant-tab ${participant.tab === 'specific-time-availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'specific-time-availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantSpecificTimeAvailabilityTab')}</span>\n </div>\n </div>\n )}\n {participant.tab === 'availability' && participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-availability-${index}-${key}`}\n openHours={participantOpenHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n {participant.tab === 'specific-time-availability' && participant.isOpen && (\n <nylas-specific-time-availability-picker\n key={index}\n name={`participant-specific-time-availability-${index}-${key}`}\n specificTimesAvailability={participant.specificTimesAvailability}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-BCGUSoeG.js","mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,MAAM,sCAAsC,GAAG,uyKAAuyK;;;;;;;;;;;;;;;;MC6Bz0K,mCAAmC,GAAAA,kBAAA,CAAA,MAAA,mCAAA,SAAAC,CAAA,CAAA;AANhD,IAAA,WAAA,GAAA;;;;;;AAmBU,QAAA,IAAI,CAAA,IAAA,GAAW,iCAAiC;QAMhD,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC,qBAAqB,EAAE,YAAY,IAAI,EAAE;QA4B3E,IAAoB,CAAA,oBAAA,GAWzB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC;AA0S5C;AAtSC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,wCAAwC,EAAE,2BAA2B,EAAE,QAAQ,CAAC;QACtF,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC;;IAI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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.scss?tag=nylas-participants-custom-availability&encapsulation=shadow","src/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n width: inherit;\n}\n\n.nylas-participants-custom-availability {\n width: inherit;\n display: flex;\n flex-direction: column;\n margin: 1rem;\n border-radius: var(--nylas-border-radius-2x);\n border: 1px solid var(--nylas-base-200);\n .header {\n padding: 1rem;\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 p {\n margin: 0.25rem 0 0 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 .content {\n .participant-container {\n padding-top: 8px;\n border-top: 1px solid var(--nylas-base-200);\n color: var(--nylas-base-900);\n background-color: var(--nylas-base-25);\n\n .participant-title {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 4px 16px 12px;\n p {\n margin: 0;\n }\n .participant-toggle {\n display: flex;\n gap: 24px;\n align-items: center;\n .chevron {\n display: flex;\n align-self: center;\n cursor: pointer;\n\n &:hover,\n &:active {\n color: var(--nylas-primary);\n }\n\n &.open {\n transform: rotate(90deg);\n }\n\n &.closed {\n transform: rotate(270deg);\n }\n\n &.disabled {\n cursor: not-allowed;\n color: var(--nylas-base-300);\n &:hover {\n color: var(--nylas-base-300);\n }\n }\n }\n }\n }\n nylas-availability-picker::part(nap) {\n margin: 0;\n border: none;\n }\n nylas-specific-time-availability-picker::part(nstap) {\n margin: 0;\n border: none;\n }\n }\n .participant-tabs {\n justify-content: space-between;\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n padding: 8px 16px;\n border-top: 1px solid var(--nylas-base-200);\n }\n .participant-tab {\n cursor: pointer;\n padding: 8px 16px;\n border-radius: var(--nylas-border-radius-2x);\n background-color: var(--nylas-base-100);\n text-align: center;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--nylas-base-600);\n &.active {\n background-color: var(--nylas-primary);\n color: var(--nylas-base-100);\n }\n }\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, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { Configuration, OpenHours, Participant, ParticipantAvailability, SpecificTimeAvailability, ThemeConfig } from '@nylas/core';\nimport { DEFAULT_OPEN_HOURS } from '@/common/constants';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participants-custom-availability` component is a form input for setting custom availability for participants.\n *\n * @part npca - The participants custom availability container\n * @part npca__header - The header of the participants custom availability\n * @part npca__content - The content of the participants custom availability\n * @part npca__participant-container - The participant container\n * @part npca__participant-title - The title of the participant\n * @part npca__participant-toggle--container - The toggle container for the participant\n * @part npca__toggle-label - The label of the toggle\n * @part npca_toggle-input - The input of the toggle\n * @part npca_toggle-slider - The slider of the toggle\n */\n@Component({\n tag: 'nylas-participants-custom-availability',\n styleUrl: 'nylas-participants-custom-availability.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantsCustomAvailability {\n @Element() host!: HTMLNylasParticipantsCustomAvailabilityElement;\n private participantFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-custom-availability';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n /**\n * This event is fired when the participants custom availability changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n /**\n * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The state to store the custom availability setting for participants.\n */\n @State() selectedParticipants: {\n [key: string]: {\n setCustom: boolean;\n tab: 'availability' | 'specific-time-availability';\n isOpen: boolean;\n openHours: OpenHours[];\n specificTimesAvailability: SpecificTimeAvailability[];\n name: string;\n availability?: ParticipantAvailability;\n timezone?: string;\n };\n } = this.setParticipants(this.participants);\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participants-custom-availability', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[], oldValue: Participant[]) {\n debug('nylas-participants-custom-availability', 'participantsChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n this.selectedParticipants = this.setParticipants(newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration, oldValue: Configuration) {\n debug('nylas-participants-custom-availability', 'selectedConfigurationChangedHandler', newValue, oldValue);\n if (!newValue || !oldValue || JSON.stringify(newValue) === JSON.stringify(oldValue)) {\n return;\n }\n if (newValue?.participants) {\n this.selectedParticipants = this.setParticipants(newValue?.participants);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n }\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participants-custom-availability', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participants-custom-availability', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participants-custom-availability', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participants-custom-availability', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedParticipants = this.setParticipants(this.selectedConfiguration?.participants);\n } else {\n this.selectedParticipants = this.setParticipants(this.participants);\n }\n }\n\n // Event Handlers\n @Listen('nylasFormSwitchToggled')\n nylasFormSwitchToggledHandler(event: CustomEvent<{ checked: boolean; name: string; label: boolean }>) {\n debug('nylas-participants-custom-availability', 'nylasFormSwitchToggledHandler', event.detail);\n const existingParticipant = this.selectedConfiguration?.participants.find(participant => participant.email === event.detail.name);\n const existingOpenHours = existingParticipant?.availability?.open_hours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n const timeZone =\n existingOpenHours && existingOpenHours.length > 0\n ? existingParticipant?.timezone\n : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours?.at(0)?.timezone ||\n this.selectedConfiguration?.event_booking?.timezone ||\n window.Intl.DateTimeFormat().resolvedOptions().timeZone;\n\n const existingSpecificTimeAvailability = existingParticipant?.specific_time_availability || [];\n const specificTimesAvailability = existingSpecificTimeAvailability?.length > 0 ? existingSpecificTimeAvailability : [];\n this.selectedParticipants[event.detail.name]['isOpen'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['tab'] = 'availability';\n this.selectedParticipants[event.detail.name]['setCustom'] = event.detail.checked;\n this.selectedParticipants[event.detail.name]['openHours'] = event.detail.checked ? (openHours?.length > 0 ? openHours : DEFAULT_OPEN_HOURS) : [];\n this.selectedParticipants[event.detail.name]['timezone'] = event.detail.checked ? timeZone : undefined;\n this.selectedParticipants[event.detail.name]['specificTimesAvailability'] = event.detail.checked ? specificTimesAvailability : [];\n this.selectedParticipants = { ...this.selectedParticipants };\n this.updateFormValue();\n }\n\n @Listen('valueChanged')\n handleValueChanged(event: CustomEvent) {\n debug('[nylas-editor-tabs]', 'handleValueChanged', event);\n const { name, value } = event.detail;\n if (!name.startsWith('participant-availability-') && !name.startsWith('participant-specific-time-availability-')) {\n return;\n }\n\n // Parse the JSON value once - can contain { openHours: OpenHours[], timezone: string } or SpecificTimeAvailability[]\n let jsonValue;\n try {\n jsonValue = JSON.parse(value);\n } catch (error) {\n console.error(`Failed to parse JSON for participant ${name}:`, error);\n return;\n }\n\n // Validate the form\n if (this.isInternalsAvailable) {\n if (!this.participantFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, 'Please fix the overlapping time ranges.');\n return;\n } else {\n this.internals.setValidity({});\n }\n }\n\n if (name.startsWith('participant-availability-')) {\n // Expected name format: \"participant-availability-{participantId}-{uniqueKey}\"\n // We extract the unique key (4th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 4) {\n console.warn(`Malformed participant name format: ${name}. Expected format: \"participant-availability-{participantId}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[3];\n if (!this.selectedParticipants[key]) return;\n const existingOpenHours = jsonValue.openHours || [];\n const openHours = existingOpenHours?.length > 0 ? existingOpenHours : this.selectedConfiguration?.availability?.availability_rules?.default_open_hours || [];\n this.selectedParticipants[key]['openHours'] = openHours;\n this.selectedParticipants[key]['tab'] = 'availability';\n } else if (name.startsWith('participant-specific-time-availability')) {\n // Expected name format: \"participant-specific-time-availability-{index}-{uniqueKey}\"\n // Extract the unique key (6th segment) to identify the specific participant\n const nameParts = name.split('-');\n if (nameParts.length < 6) {\n console.warn(`Malformed participant specific date name format: ${name}. Expected format: \"participant-specific-time-availability-{index}-{uniqueKey}\"`);\n return;\n }\n\n const key = nameParts[5];\n if (!this.selectedParticipants[key]) return;\n const existingSpecificTimeAvailability = jsonValue || [];\n this.selectedParticipants[key]['specificTimesAvailability'] = existingSpecificTimeAvailability;\n this.selectedParticipants[key]['tab'] = 'specific-time-availability';\n }\n\n this.selectedParticipants = { ...this.selectedParticipants };\n\n this.updateFormValue();\n }\n\n updateFormValue() {\n const participantOpenHours = {};\n const participantSpecificTimeAvailability = {};\n Object.keys(this.selectedParticipants).forEach(key => {\n participantOpenHours[key] = this.selectedParticipants[key].openHours;\n participantSpecificTimeAvailability[key] = this.selectedParticipants[key].specificTimesAvailability || [];\n });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantOpenHours), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantOpenHours), name: this.name });\n\n this.isInternalsAvailable && this.internals.setFormValue(JSON.stringify(participantSpecificTimeAvailability), `${this.name}-specific-time`);\n this.valueChanged.emit({ value: JSON.stringify(participantSpecificTimeAvailability), name: `${this.name}-specific-time` });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n selectedParticipants[participant.email] = {\n isOpen: false,\n setCustom: Boolean(participant.availability?.open_hours),\n openHours: participant.availability?.open_hours || [],\n name: participant.name || participant.email,\n availability: participant.availability,\n timezone: participant.timezone,\n specificTimesAvailability: participant.specific_time_availability || [],\n };\n });\n return selectedParticipants;\n }\n\n /**\n * This method is essentially a workaround to check if the internals are available because\n * the unit tests in stencil do not support the internals.\n * @returns boolean\n */\n get isInternalsAvailable() {\n return this.internals !== undefined && typeof this.internals.setFormValue === 'function' && typeof this.internals.setValidity === 'function';\n }\n\n @RegisterComponent<NylasParticipantsCustomAvailability, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participants-custom-availability',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-participants-custom-availability\" part=\"npca\">\n <div class=\"header\" part=\"npca__header\">\n <h3>{i18next.t('nylasParticipantCustomAvailability.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantCustomAvailability.headerSubTitle')}</p>\n </div>\n <div class=\"content\" part=\"npca__content\">\n <form ref={el => (this.participantFormRef = el as HTMLFormElement)}>\n {Object.keys(this.selectedParticipants).map((key, index) => {\n const participant = this.selectedParticipants[key];\n const participantOpenHours = participant.availability?.open_hours || [];\n if (!participant || !participant.name || !participant.availability) return;\n return (\n <div class=\"participant-container\" part=\"npca__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npca__participant-title\">\n <p>{i18next.t('nylasParticipantCustomAvailability.participantOpenHoursTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npca__participant-toggle--container\">\n <toggle-switch\n exportparts=\"ts_label: npca__toggle-label, ts_input: npca_toggle-input, ts_slider: npca_toggle-slider\"\n name={key}\n checked={!!participant?.openHours && participant?.openHours.length > 0}\n themeConfig={this.themeConfig}\n />\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'} ${participant.setCustom ? '' : 'disabled'}`}\n onClick={() => {\n if (!participant.setCustom) return;\n this.selectedParticipants[key].isOpen = !participant.isOpen;\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <div class=\"participant-tabs\" part=\"npca__participant-tabs\">\n <div\n class={`participant-tab ${participant.tab === 'availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantAvailabilityTab')}</span>\n </div>\n <div\n class={`participant-tab ${participant.tab === 'specific-time-availability' ? 'active' : ''}`}\n part=\"npca__participant-tab\"\n onClick={() => {\n this.selectedParticipants[key].tab = 'specific-time-availability';\n this.selectedParticipants = { ...this.selectedParticipants };\n }}\n >\n <span>{i18next.t('nylasParticipantCustomAvailability.participantSpecificTimeAvailabilityTab')}</span>\n </div>\n </div>\n )}\n {participant.tab === 'availability' && participant.isOpen && (\n <nylas-availability-picker\n key={index}\n name={`participant-availability-${index}-${key}`}\n openHours={participantOpenHours}\n defaultTimezone={participant.timezone}\n hideHeader={true}\n />\n )}\n {participant.tab === 'specific-time-availability' && participant.isOpen && (\n <nylas-specific-time-availability-picker\n key={index}\n name={`participant-specific-time-availability-${index}-${key}`}\n specificTimesAvailability={participant.specificTimesAvailability}\n hideHeader={true}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|