@nylas/web-elements 0.0.0-canary-20251007200552 → 0.0.0-canary-20251008142712
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 +1571 -1480
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +100 -9
- package/dist/cjs/calendar-agenda-fill-icon_38.cjs.entry.js +1 -1
- package/dist/cjs/calendar-agenda-fill-icon_38.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 +151 -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 +181 -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-only-specific-time-availability.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 +33 -33
- 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-BqGEzlcQ.js → p-0q9sgr4i.js} +3 -3
- package/dist/components/{p-BqGEzlcQ.js.map → p-0q9sgr4i.js.map} +1 -1
- package/dist/components/{p-CwwJpDaO.js → p-B1psbbaJ.js} +3 -3
- package/dist/components/{p-CwwJpDaO.js.map → p-B1psbbaJ.js.map} +1 -1
- package/dist/components/{p-CbLs5Pk5.js → p-BFJmQasy.js} +4 -4
- package/dist/components/{p-CbLs5Pk5.js.map → p-BFJmQasy.js.map} +1 -1
- package/dist/components/{p-wzGjOUhU.js → p-BNmwL6-W.js} +4 -4
- package/dist/components/{p-wzGjOUhU.js.map → p-BNmwL6-W.js.map} +1 -1
- package/dist/components/{p-B-b3QZAX.js → p-Bfh24JOX.js} +3 -3
- package/dist/components/{p-B-b3QZAX.js.map → p-Bfh24JOX.js.map} +1 -1
- package/dist/components/{p-pjEuYJeR.js → p-Bk42j8OF.js} +3 -3
- package/dist/components/{p-pjEuYJeR.js.map → p-Bk42j8OF.js.map} +1 -1
- package/dist/components/{p-CXG_Ufsz.js → p-BpnsgdmY.js} +3 -3
- package/dist/components/{p-CXG_Ufsz.js.map → p-BpnsgdmY.js.map} +1 -1
- package/dist/components/{p-BbV-LHPC.js → p-BvCN7qQY.js} +3 -3
- package/dist/components/{p-BbV-LHPC.js.map → p-BvCN7qQY.js.map} +1 -1
- package/dist/components/{p-BT4xqZtB.js → p-BzvnGJrN.js} +4 -4
- package/dist/components/p-BzvnGJrN.js.map +1 -0
- package/dist/components/{p-BD1JIBI-.js → p-C20VhZn-.js} +3 -3
- package/dist/components/{p-BD1JIBI-.js.map → p-C20VhZn-.js.map} +1 -1
- package/dist/components/{p-2bXE-Vfv.js → p-C2lhNwAw.js} +3 -3
- package/dist/components/{p-2bXE-Vfv.js.map → p-C2lhNwAw.js.map} +1 -1
- package/dist/components/{p-C_lK5fHn.js → p-CD62_7I9.js} +23 -23
- package/dist/components/{p-C_lK5fHn.js.map → p-CD62_7I9.js.map} +1 -1
- package/dist/components/{p-B6C_M9Jr.js → p-CE9apE9h.js} +31 -31
- package/dist/components/{p-B6C_M9Jr.js.map → p-CE9apE9h.js.map} +1 -1
- package/dist/components/{p-DyYv3p94.js → p-CHxdUdXp.js} +3 -3
- package/dist/components/{p-DyYv3p94.js.map → p-CHxdUdXp.js.map} +1 -1
- package/dist/components/{p-Dj99qyJ3.js → p-CXsByTmW.js} +5 -5
- package/dist/components/{p-Dj99qyJ3.js.map → p-CXsByTmW.js.map} +1 -1
- package/dist/components/p-CelgQqJU.js +192 -0
- package/dist/components/p-CelgQqJU.js.map +1 -0
- package/dist/components/{p-COiHEYHM.js → p-CfSWSyFi.js} +4 -4
- package/dist/components/{p-COiHEYHM.js.map → p-CfSWSyFi.js.map} +1 -1
- package/dist/components/{p-BRLg6H-E.js → p-CfVpiH3G.js} +3 -3
- package/dist/components/{p-BRLg6H-E.js.map → p-CfVpiH3G.js.map} +1 -1
- package/dist/components/{p-Dzb4S0Ql.js → p-CnNHkU1E.js} +8 -8
- package/dist/components/{p-Dzb4S0Ql.js.map → p-CnNHkU1E.js.map} +1 -1
- package/dist/components/{p-Bt1Mbyo5.js → p-Coh5sPoS.js} +3 -3
- package/dist/components/{p-Bt1Mbyo5.js.map → p-Coh5sPoS.js.map} +1 -1
- package/dist/components/{p-DCescN3V.js → p-D3Qd1n_P.js} +3 -3
- package/dist/components/{p-DCescN3V.js.map → p-D3Qd1n_P.js.map} +1 -1
- package/dist/components/{p-BCPPCoYO.js → p-D4UyMIEq.js} +3 -3
- package/dist/components/{p-BCPPCoYO.js.map → p-D4UyMIEq.js.map} +1 -1
- package/dist/components/{p-nPHjU3jr.js → p-D5qrC2lA.js} +3 -3
- package/dist/components/{p-nPHjU3jr.js.map → p-D5qrC2lA.js.map} +1 -1
- package/dist/components/{p-Cffi7D48.js → p-DJajrAgg.js} +3 -3
- package/dist/components/{p-Cffi7D48.js.map → p-DJajrAgg.js.map} +1 -1
- package/dist/components/{p-B6clCy4A.js → p-DQZVOwPH.js} +3 -3
- package/dist/components/{p-B6clCy4A.js.map → p-DQZVOwPH.js.map} +1 -1
- package/dist/components/{p-B0o5xunX.js → p-DhtHRxq1.js} +3 -3
- package/dist/components/{p-B0o5xunX.js.map → p-DhtHRxq1.js.map} +1 -1
- package/dist/components/{p-CSWehFEc.js → p-DlQNeDle.js} +3 -3
- package/dist/components/{p-CSWehFEc.js.map → p-DlQNeDle.js.map} +1 -1
- package/dist/components/{p-CJcp_GoJ.js → p-DosSBspi.js} +3 -3
- package/dist/components/{p-CJcp_GoJ.js.map → p-DosSBspi.js.map} +1 -1
- package/dist/components/{p-jTVu8Py-.js → p-ENcpb5di.js} +4 -4
- package/dist/components/{p-jTVu8Py-.js.map → p-ENcpb5di.js.map} +1 -1
- package/dist/components/{p-BW7q0oI_.js → p-G063shWV.js} +3 -3
- package/dist/components/{p-BW7q0oI_.js.map → p-G063shWV.js.map} +1 -1
- package/dist/components/{p-6cQLqvfv.js → p-_Y7InDst.js} +3 -3
- package/dist/components/{p-6cQLqvfv.js.map → p-_Y7InDst.js.map} +1 -1
- package/dist/components/{p-BELvPT6B.js → p-gi3_0xjc.js} +3 -3
- package/dist/components/{p-BELvPT6B.js.map → p-gi3_0xjc.js.map} +1 -1
- package/dist/components/{p-BFr5rgUi.js → p-kop9MA9K.js} +3 -3
- package/dist/components/{p-BFr5rgUi.js.map → p-kop9MA9K.js.map} +1 -1
- package/dist/components/{p-CLUzc1bh.js → p-lfia5tlH.js} +3 -3
- package/dist/components/{p-CLUzc1bh.js.map → p-lfia5tlH.js.map} +1 -1
- package/dist/components/{p-Dqb4SZcE.js → p-vzH8CS8d.js} +4 -4
- package/dist/components/{p-Dqb4SZcE.js.map → p-vzH8CS8d.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_38.entry.js +1 -1
- package/dist/esm/calendar-agenda-fill-icon_38.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 +151 -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-2890bb11.entry.js +2 -0
- package/dist/nylas-web-elements/p-2890bb11.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-2fcae310.entry.js → p-545e93e8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-2fcae310.entry.js.map → p-545e93e8.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 +4 -3
- package/dist/components/p-BT4xqZtB.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-4eb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","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.scss?tag=nylas-timeslot-interval&encapsulation=shadow","src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.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-timeslot-interval {\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\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.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-timeslot-interval__dropdown {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n background-color: var(--nylas-base-25);\n\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 {\n margin-bottom: 1.5rem;\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\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) {\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-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\nconst defaultRoundToMinutes = 15;\n/**\n * The `nylas-timeslot-interval` component allows users to set their time slot interval preferences.\n * This component provides an option to set both `interval_minutes` and `round_to` in the configuration.\n *\n * @part nti - The timeslot interval container\n * @part nti__header - The header of the timeslot interval picker\n * @part nti__input-label - The input label of the timeslot interval picker\n * @part nti__dropdown - The dropdown container\n * @part nti__dropdown-button - The dropdown button\n * @part nti__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-timeslot-interval',\n styleUrl: 'nylas-timeslot-interval.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasTimeslotInterval {\n @Element() host!: HTMLNylasTimeslotIntervalElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the calendar picker.\n */\n @Prop() name: string = 'timeslot-interval';\n\n /**\n * @standalone\n * The event duration in minutes.\n */\n @Prop() eventDurationMinutes?: number = this.selectedConfiguration?.availability?.duration_minutes;\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 * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The internal event duration minutes state.\n */\n @State() internalEventDurationMinutes!: number;\n\n /**\n * The selected interval minutes.\n */\n @State() selectedInterval!: number;\n\n /**\n * The selected round to minutes.\n */\n @State() selectedRoundTo!: boolean;\n\n /***\n * The state to store that component is ready to render.\n */\n @State() componentLoaded: boolean = false;\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\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-timeslot-interval', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-timeslot-interval', 'selectedConfigurationChangedHandler', newValue);\n this.internalEventDurationMinutes = newValue?.availability?.duration_minutes ?? this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = newValue?.availability?.interval_minutes ?? this.internalEventDurationMinutes ?? 30;\n this.selectedInterval = newValue?.availability?.interval_minutes ?? internalIntervalMinutes ?? 10;\n const roundToMinutes = newValue?.availability?.round_to || null;\n this.selectedRoundTo = roundToMinutes && roundToMinutes === internalIntervalMinutes ? true : false;\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-timeslot-interval', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-timeslot-interval', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-timeslot-interval', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-timeslot-interval', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.internalEventDurationMinutes = this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = this.internalEventDurationMinutes;\n this.selectedInterval = internalIntervalMinutes ?? 10;\n this.selectedRoundTo = false;\n }\n this.componentLoaded = true;\n }\n\n componentWillUpdate() {\n debug('nylas-timeslot-interval', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-timeslot-interval', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-timeslot-interval', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-timeslot-interval', 'componentDidRender');\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-timeslot-interval', 'nylasFormDropdownChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'duration') {\n this.selectedInterval = this.internalEventDurationMinutes ?? 10;\n } else {\n this.selectedInterval = parseInt(event.detail.value);\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @Listen('nylasFormRadioChanged')\n nylasFormRadioChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-timeslot-interval', 'nylasFormRadioChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'no-rounding') {\n this.selectedRoundTo = false;\n } else {\n this.selectedRoundTo = true;\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @RegisterComponent<NylasTimeslotInterval, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-timeslot-interval',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n const intervalPreferenceOptions = [\n { value: 'duration', label: i18next.t('nylasTimeslotInterval.lengthOfMeeting') },\n { value: '5', label: `5 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '10', label: `10 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '15', label: `15 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '20', label: `20 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '30', label: `30 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '45', label: `45 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '60', label: `60 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n ];\n\n const defaultSelectedInterval =\n typeof this.selectedInterval !== 'undefined'\n ? this.selectedInterval == this.internalEventDurationMinutes\n ? intervalPreferenceOptions[0]\n : intervalPreferenceOptions.find(op => op.value == this.selectedInterval.toString()) ?? intervalPreferenceOptions[0]\n : undefined;\n\n return (\n <Host>\n <div class=\"nylas-timeslot-interval\" part=\"nti\">\n <div class=\"header\" part=\"nti__header\">\n <h3>{i18next.t('nylasTimeslotInterval.headerTitle')}</h3>\n </div>\n\n <div class=\"nylas-timeslot-interval__dropdown\">\n <span class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotInterval.label')}\n </span>\n {defaultSelectedInterval?.label && (\n <select-dropdown\n name=\"interval-minutes\"\n options={intervalPreferenceOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content\"\n defaultSelectedOption={defaultSelectedInterval}\n themeConfig={this.themeConfig}\n />\n )}\n <span slot=\"label\" class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotRounding.label')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasTimeslotInterval.timeslotRounding.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n {this.componentLoaded && (\n <radio-button-group\n name=\"interval-preference\"\n defaultSelectedValue={this.selectedRoundTo ? 'rounding' : 'no-rounding'}\n options={[\n {\n value: 'no-rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.desc'),\n },\n {\n value: 'rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.desc'),\n },\n ]}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-DosSBspi.js","mappings":";;;;;;;;;;AAAA,MAAM,wBAAwB,GAAG,m6HAAm6H;;;;;;;;;;;;;;;;ACSp8H,MAAM,qBAAqB,GAAG,EAAE;MAkBnB,qBAAqB,GAAAA,kBAAA,CAAA,MAAA,qBAAA,SAAAC,CAAA,CAAA;AANlC,IAAA,WAAA,GAAA;;;;;;AAiBU,QAAA,IAAI,CAAA,IAAA,GAAW,mBAAmB;QAMlC,IAAoB,CAAA,oBAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,YAAY,EAAE,gBAAgB;AAmCzF,QAAA,IAAe,CAAA,eAAA,GAAY,KAAK;AA4N1C;AA5MC,IAAA,yBAAyB,CAAC,QAAg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;AACE,oBAAA,KAAK,EAAE,UAAU;AACjB,oBAAA,KAAK,EAAEA,QAAO,CAAC,CAAC,CAAC,8DAA8D,CAAC;AAChF,oBAAA,WAAW,EAAEA,QAAO,CAAC,CAAC,CAAC,6DAA6D,CAAC;AACtF,iBAAA;AACF,aAAA,EACD,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,CAAA,CACH,CACG,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;AApEX,UAAA,CAAA;AATC,IAAA,iBAAiB,CAA2G;AAC3H,QAAA,IAAI,EAAE,yBAAyB;QAC/B,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,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAuED,EAAA,qBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.scss?tag=nylas-timeslot-interval&encapsulation=shadow","src/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.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-timeslot-interval {\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\n .header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n\n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 600;\n line-height: 20px;\n color: var(--nylas-base-900);\n text-align: left;\n }\n\n p {\n margin: 0.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-timeslot-interval__dropdown {\n padding: 1rem;\n display: flex;\n flex-direction: column;\n gap: 4px;\n background-color: var(--nylas-base-25);\n\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 {\n margin-bottom: 1.5rem;\n }\n\n select-dropdown::part(sd_dropdown) {\n width: 100%;\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) {\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-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\nconst defaultRoundToMinutes = 15;\n/**\n * The `nylas-timeslot-interval` component allows users to set their time slot interval preferences.\n * This component provides an option to set both `interval_minutes` and `round_to` in the configuration.\n *\n * @part nti - The timeslot interval container\n * @part nti__header - The header of the timeslot interval picker\n * @part nti__input-label - The input label of the timeslot interval picker\n * @part nti__dropdown - The dropdown container\n * @part nti__dropdown-button - The dropdown button\n * @part nti__dropdown-content - The dropdown content\n */\n@Component({\n tag: 'nylas-timeslot-interval',\n styleUrl: 'nylas-timeslot-interval.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasTimeslotInterval {\n @Element() host!: HTMLNylasTimeslotIntervalElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the calendar picker.\n */\n @Prop() name: string = 'timeslot-interval';\n\n /**\n * @standalone\n * The event duration in minutes.\n */\n @Prop() eventDurationMinutes?: number = this.selectedConfiguration?.availability?.duration_minutes;\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 * The element internals.\n */\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * The internal event duration minutes state.\n */\n @State() internalEventDurationMinutes!: number;\n\n /**\n * The selected interval minutes.\n */\n @State() selectedInterval!: number;\n\n /**\n * The selected round to minutes.\n */\n @State() selectedRoundTo!: boolean;\n\n /***\n * The state to store that component is ready to render.\n */\n @State() componentLoaded: boolean = false;\n\n /**\n * This event is fired when the selected booking calendar changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\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-timeslot-interval', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-timeslot-interval', 'selectedConfigurationChangedHandler', newValue);\n this.internalEventDurationMinutes = newValue?.availability?.duration_minutes ?? this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = newValue?.availability?.interval_minutes ?? this.internalEventDurationMinutes ?? 30;\n this.selectedInterval = newValue?.availability?.interval_minutes ?? internalIntervalMinutes ?? 10;\n const roundToMinutes = newValue?.availability?.round_to || null;\n this.selectedRoundTo = roundToMinutes && roundToMinutes === internalIntervalMinutes ? true : false;\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-timeslot-interval', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-timeslot-interval', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-timeslot-interval', 'componentWillLoad');\n // See comment in the @Watch('name') decorator for more information.\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-timeslot-interval', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedConfigurationChangedHandler(this.selectedConfiguration);\n } else {\n this.internalEventDurationMinutes = this.eventDurationMinutes ?? 30;\n const internalIntervalMinutes = this.internalEventDurationMinutes;\n this.selectedInterval = internalIntervalMinutes ?? 10;\n this.selectedRoundTo = false;\n }\n this.componentLoaded = true;\n }\n\n componentWillUpdate() {\n debug('nylas-timeslot-interval', 'componentWillUpdate');\n }\n\n componentDidUpdate() {\n debug('nylas-timeslot-interval', 'componentDidUpdate');\n }\n\n componentWillRender() {\n debug('nylas-timeslot-interval', 'componentWillRender');\n }\n\n componentDidRender() {\n debug('nylas-timeslot-interval', 'componentDidRender');\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-timeslot-interval', 'nylasFormDropdownChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'duration') {\n this.selectedInterval = this.internalEventDurationMinutes ?? 10;\n } else {\n this.selectedInterval = parseInt(event.detail.value);\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @Listen('nylasFormRadioChanged')\n nylasFormRadioChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n debug('nylas-timeslot-interval', 'nylasFormRadioChangedHandler', event.detail);\n const value = event.detail.value;\n if (value === 'no-rounding') {\n this.selectedRoundTo = false;\n } else {\n this.selectedRoundTo = true;\n }\n\n this.valueChanged.emit({\n value: JSON.stringify({\n interval: this.selectedInterval,\n roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes,\n }),\n name: this.name,\n });\n if (typeof this.internals.setFormValue === 'function') {\n this.internals.setFormValue(JSON.stringify({ interval: this.selectedInterval, roundTo: this.selectedRoundTo ? this.selectedInterval : defaultRoundToMinutes }), this.name);\n }\n }\n\n @RegisterComponent<NylasTimeslotInterval, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-timeslot-interval',\n stateToProps: new Map([\n ['schedulerConfig.selectedConfiguration', 'selectedConfiguration'],\n ['schedulerConfig.selectedLanguage', 'selectedLanguage'],\n ['schedulerConfig.themeConfig', 'themeConfig'],\n ]),\n fireRegisterEvent: true,\n })\n render() {\n const intervalPreferenceOptions = [\n { value: 'duration', label: i18next.t('nylasTimeslotInterval.lengthOfMeeting') },\n { value: '5', label: `5 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '10', label: `10 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '15', label: `15 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '20', label: `20 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '30', label: `30 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '45', label: `45 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n { value: '60', label: `60 ${i18next.t('nylasTimeslotInterval.minutesShort')}` },\n ];\n\n const defaultSelectedInterval =\n typeof this.selectedInterval !== 'undefined'\n ? this.selectedInterval == this.internalEventDurationMinutes\n ? intervalPreferenceOptions[0]\n : intervalPreferenceOptions.find(op => op.value == this.selectedInterval.toString()) ?? intervalPreferenceOptions[0]\n : undefined;\n\n return (\n <Host>\n <div class=\"nylas-timeslot-interval\" part=\"nti\">\n <div class=\"header\" part=\"nti__header\">\n <h3>{i18next.t('nylasTimeslotInterval.headerTitle')}</h3>\n </div>\n\n <div class=\"nylas-timeslot-interval__dropdown\">\n <span class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotInterval.label')}\n </span>\n {defaultSelectedInterval?.label && (\n <select-dropdown\n name=\"interval-minutes\"\n options={intervalPreferenceOptions}\n withSearch={false}\n exportparts=\"sd_dropdown: nti__dropdown, sd_dropdown-button: nti__dropdown-button, sd_dropdown-content: nti__dropdown-content\"\n defaultSelectedOption={defaultSelectedInterval}\n themeConfig={this.themeConfig}\n />\n )}\n <span slot=\"label\" class=\"label\" part=\"nti__input-label\">\n {i18next.t('nylasTimeslotInterval.timeslotRounding.label')}\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">{i18next.t('nylasTimeslotInterval.timeslotRounding.tooltip.desc')}</span>\n </tooltip-component>\n </span>\n {this.componentLoaded && (\n <radio-button-group\n name=\"interval-preference\"\n defaultSelectedValue={this.selectedRoundTo ? 'rounding' : 'no-rounding'}\n options={[\n {\n value: 'no-rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.noRounding.desc'),\n },\n {\n value: 'rounding',\n label: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.label'),\n description: i18next.t('nylasTimeslotInterval.timeslotRoundingOptions.rounding.desc'),\n },\n ]}\n themeConfig={this.themeConfig}\n />\n )}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,10 +3,10 @@ import { R as RegisterComponent } from './p-BlEWfYUR.js';
|
|
|
3
3
|
import { a as debug, b as instance } from './p-BtX8WBPn.js';
|
|
4
4
|
import { d as defineCustomElement$6 } from './p-PeEnpB8P.js';
|
|
5
5
|
import { d as defineCustomElement$5 } from './p-7S1M5IE9.js';
|
|
6
|
-
import { d as defineCustomElement$4 } from './p-
|
|
6
|
+
import { d as defineCustomElement$4 } from './p-CHxdUdXp.js';
|
|
7
7
|
import { d as defineCustomElement$3 } from './p-ClTk9Ttz.js';
|
|
8
8
|
import { d as defineCustomElement$2 } from './p-D7lRYhTx.js';
|
|
9
|
-
import { d as defineCustomElement$1 } from './p-
|
|
9
|
+
import { d as defineCustomElement$1 } from './p-CelgQqJU.js';
|
|
10
10
|
|
|
11
11
|
const nylasParticipantBookingCalendarsCss = ":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-participant-booking-calendars{width:inherit;display:flex;flex-direction:column;margin:1rem;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-200);color:var(--nylas-base-900)}.nylas-participant-booking-calendars .header{padding:1rem}.nylas-participant-booking-calendars .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-participant-booking-calendars .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;display:flex;align-items:center;gap:4px}.nylas-participant-booking-calendars .content .participant-container{padding-top:12px;border-top:1px solid var(--nylas-base-200);background-color:var(--nylas-base-25)}.nylas-participant-booking-calendars .content .participant-container .participant-title{display:flex;justify-content:space-between;align-items:center;padding:4px 16px 16px}.nylas-participant-booking-calendars .content .participant-container .participant-title p{margin:0}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle{display:flex;gap:24px;align-items:center}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron{display:flex;align-self:center;cursor:pointer}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:hover,.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron:active{color:var(--nylas-primary)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.open{transform:rotate(90deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.closed{transform:rotate(270deg)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled{cursor:not-allowed;color:var(--nylas-base-300)}.nylas-participant-booking-calendars .content .participant-container .participant-title .participant-toggle .chevron.disabled:hover{color:var(--nylas-base-300)}nylas-booking-calendar-picker::part(nbcp){margin:0;border:none;border-top:1px solid var(--nylas-base-200);border-top-right-radius:0;border-top-left-radius:0}";
|
|
12
12
|
|
|
@@ -273,6 +273,6 @@ function defineCustomElement() {
|
|
|
273
273
|
}
|
|
274
274
|
|
|
275
275
|
export { NylasParticipantBookingCalendars as N, defineCustomElement as d };
|
|
276
|
-
//# sourceMappingURL=p-
|
|
276
|
+
//# sourceMappingURL=p-ENcpb5di.js.map
|
|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AC1D,OAAO,EAAE,MAAK;AACZ,wBAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAM,GAAG,CAAC,WAAW,CAAC,MAAM;wBACxD,IAAI,CAAC,iBAAiB,GAAG,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE;AACxD,qBAAC,EAAA,EAED,CAAc,CAAA,cAAA,EAAA,EAAA,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAA,CAAG,CAClC,CACH,CACF,EACL,WAAW,CAAC,MAAM,KACjB,qCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAuB,oBAAA,EAAA,GAAG,CAAE,CAAA,EAClC,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAE,IAAI,EAChB,sBAAsB,EAAE,IAAI,CAAC,kCAAkC,CAAC,GAAG,CAAC,EAAA,CACpE,CACH,CACG;AAEV,aAAC,CAAC,CACC,CACH,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/CX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAAsH;AACtI,QAAA,IAAI,EAAE,qCAAqC;QAC3C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,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;;;;CAkDD,EAAA,gCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.scss?tag=nylas-participant-booking-calendars&encapsulation=shadow","src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.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-participant-booking-calendars {\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 color: var(--nylas-base-900);\n\n .header {\n padding: 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 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 display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .content {\n .participant-container {\n padding-top: 12px;\n border-top: 1px solid var(--nylas-base-200);\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 16px;\n\n p {\n margin: 0;\n }\n\n .participant-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 }\n}\n\nnylas-booking-calendar-picker::part(nbcp) {\n margin: 0;\n border: none;\n border-top: 1px solid var(--nylas-base-200);\n border-top-right-radius: 0;\n border-top-left-radius: 0;\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 { AdditionalParticipant, Calendar, Configuration, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n *\n * @part npbc - The participant booking calendars host.\n * @part npbc__header - The header.\n * @part npbc__content - The content.\n * @part npbc__participant-container - The participant container.\n * @part npbc__participant-title - The participant title.\n * @part npbc__participant-toggle-container - The participant toggle container.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\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() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendar?: Calendar;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\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 getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\n }\n });\n }\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\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-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, i18next.t('nylasParticipantBookingCalendars.selectAtLeastOneCalendar'));\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\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-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>{i18next.t('nylasParticipantBookingCalendars.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantBookingCalendars.headerSubTitle')}</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{i18next.t('nylasParticipantBookingCalendars.participantBookingCalendarTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npbc__participant-toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-ENcpb5di.js","mappings":";;;;;;;;;;AAAA,MAAM,m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AAI,CAAC,iBAAiB,EAAE;AACxD,qBAAC,EAAA,EAED,CAAc,CAAA,cAAA,EAAA,EAAA,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAA,CAAG,CAClC,CACH,CACF,EACL,WAAW,CAAC,MAAM,KACjB,qCACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,CAAuB,oBAAA,EAAA,GAAG,CAAE,CAAA,EAClC,SAAS,EAAE,oBAAoB,EAC/B,UAAU,EAAE,IAAI,EAChB,sBAAsB,EAAE,IAAI,CAAC,kCAAkC,CAAC,GAAG,CAAC,EAAA,CACpE,CACH,CACG;AAEV,aAAC,CAAC,CACC,CACH,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA/CX,UAAA,CAAA;AAZC,IAAA,iBAAiB,CAAsH;AACtI,QAAA,IAAI,EAAE,qCAAqC;QAC3C,YAAY,EAAE,IAAI,GAAG,CAAC;YACpB,CAAC,wCAAwC,EAAE,oBAAoB,CAAC;YAChE,CAAC,2BAA2B,EAAE,WAAW,CAAC;YAC1C,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;;;;CAkDD,EAAA,gCAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","i18next"],"sources":["src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.scss?tag=nylas-participant-booking-calendars&encapsulation=shadow","src/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.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-participant-booking-calendars {\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 color: var(--nylas-base-900);\n\n .header {\n padding: 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 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 display: flex;\n align-items: center;\n gap: 4px;\n }\n }\n\n .content {\n .participant-container {\n padding-top: 12px;\n border-top: 1px solid var(--nylas-base-200);\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 16px;\n\n p {\n margin: 0;\n }\n\n .participant-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 }\n}\n\nnylas-booking-calendar-picker::part(nbcp) {\n margin: 0;\n border: none;\n border-top: 1px solid var(--nylas-base-200);\n border-top-right-radius: 0;\n border-top-left-radius: 0;\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 { AdditionalParticipant, Calendar, Configuration, Participant, ThemeConfig } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\n\n/**\n * The `nylas-participant-booking-calendars` component is a form input for selecting calendars to check availability for participants.\n *\n * @part npbc - The participant booking calendars host.\n * @part npbc__header - The header.\n * @part npbc__content - The content.\n * @part npbc__participant-container - The participant container.\n * @part npbc__participant-title - The participant title.\n * @part npbc__participant-toggle-container - The participant toggle container.\n */\n@Component({\n tag: 'nylas-participant-booking-calendars',\n styleUrl: 'nylas-participant-booking-calendars.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasParticipantBookingCalendars {\n @Element() host!: HTMLNylasParticipantBookingCalendarsElement;\n private bookingCalendarsFormRef!: HTMLFormElement;\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The name of the participants custom availability.\n */\n @Prop() name: string = 'participant-booking-calendars';\n\n /**\n * @standalone\n * The participants selected in the add participants section.\n */\n @Prop() participants: Participant[] = this.selectedConfiguration?.participants || [];\n\n /**\n * @standalone\n * The calendars to choose from for the organizer / logged in user.\n */\n @Prop() calendars?: Calendar[];\n\n /**\n * @standalone\n * The participant options passed in the additionalParticipants prop\n * from the nylas-scheduler-editor component.\n */\n @Prop() participantOptions?: AdditionalParticipant[];\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() selectedCalendars: {\n [key: string]: {\n isOpen: boolean;\n name: string;\n calendar?: Calendar;\n };\n } = this.setParticipants(this.participants);\n\n /**\n * Participants calendar options.\n */\n @State() participantCalendars: {\n [key: string]: Calendar[];\n } = {};\n\n /**\n * The state to store the default selected calendars for each participant\n */\n @State() participantDefaultSelectedCalendar: {\n [key: string]: string;\n } = {};\n\n // Watchers\n @Watch('name')\n elementNameChangedHandler(newValue: string) {\n debug('nylas-participant-booking-calendars', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('calendars')\n calendarsChangedHandler(newValue: Calendar[]) {\n debug('nylas-participant-booking-calendars', 'calendarsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\n\n @Watch('participants')\n participantsChangedHandler(newValue: Participant[]) {\n debug('nylas-participant-booking-calendars', 'participantsChangedHandler', newValue);\n this.selectedCalendars = this.setParticipants(newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(newValue, this.participantOptions);\n }\n\n @Watch('participantOptions')\n participantOptionsChangedHandler(newValue: AdditionalParticipant[]) {\n debug('nylas-calendar-picker', 'participantOptionsChangedHandler', newValue);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, newValue);\n }\n\n @Watch('selectedConfiguration')\n selectedConfigurationChangedHandler(newValue: Configuration) {\n debug('nylas-participant-booking-calendars', 'selectedConfigurationChangedHandler', newValue);\n const participants = newValue?.participants || this.participants;\n if (participants && participants.length > 0) {\n this.selectedCalendars = this.setParticipants(participants);\n this.participantCalendars = this.getParticipantCalendarOptions(participants, this.participantOptions);\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 getParticipantCalendarOptions(addedParticipants: Participant[], availableParticipantOptions: AdditionalParticipant[] | undefined) {\n // Get the participants from the availableParticipantOptions prop that are in the addedParticipants prop\n const organizer = addedParticipants?.find(participant => participant.is_organizer);\n const participantCalendars = {};\n const showAdditionalParticipantBookingCalendars = this.selectedConfiguration?.availability?.availability_rules?.availability_method !== 'collective';\n if (availableParticipantOptions && showAdditionalParticipantBookingCalendars) {\n const participants = addedParticipants?.filter(participant => availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email));\n const remainingParticipants = addedParticipants?.filter(\n participant => !availableParticipantOptions.some(availableParticipant => availableParticipant.email === participant.email),\n );\n\n // Get the calendar options for each participant with email as the key\n participants?.forEach(participant => {\n const participantOption = availableParticipantOptions?.find(participantOption => participantOption.email === participant.email);\n if (!participantOption) return;\n this.participantDefaultSelectedCalendar[participant.email] = participant.booking?.calendar_id ?? 'primary';\n const calendars = participantOption.calendars ?? [];\n participantCalendars[participant.email] = calendars;\n });\n // If it is round robin config, add the remaining participant calendars to the participantCalendars\n // (Round-robin does not have an organizer, and we filtered out the participants not passed in the participantOptions prop,\n // so we need to add the remaining participants calendars to the participantCalendars)\n remainingParticipants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n participantCalendars[participant.email] = this.calendars ?? [{ id: 'primary', name: participant.email }];\n this.participantDefaultSelectedCalendar[participant.email] = participant?.booking?.calendar_id ?? 'primary';\n }\n });\n }\n // Add the organizer's calendars to the participantCalendars\n if (organizer) {\n participantCalendars[organizer.email] = this.calendars ?? [{ id: 'primary', name: organizer.email }];\n this.participantDefaultSelectedCalendar[organizer.email] = organizer?.booking?.calendar_id ?? 'primary';\n }\n return participantCalendars;\n }\n\n // Lifecycle Methods\n connectedCallback() {\n debug('nylas-participant-booking-calendars', 'connectedCallback');\n }\n\n disconnectedCallback() {\n debug('nylas-participant-booking-calendars', 'disconnectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-participant-booking-calendars', 'componentWillLoad');\n }\n\n componentDidLoad() {\n debug('nylas-participant-booking-calendars', 'componentDidLoad');\n if (this.selectedConfiguration) {\n this.selectedCalendars = this.setParticipants(this.selectedConfiguration?.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.selectedConfiguration?.participants, this.participantOptions);\n } else {\n this.selectedCalendars = this.setParticipants(this.participants);\n this.participantCalendars = this.getParticipantCalendarOptions(this.participants, this.participantOptions);\n }\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-booking-')) {\n return;\n }\n // Validate the form\n if (!this.bookingCalendarsFormRef.checkValidity()) {\n this.internals.setValidity({ customError: true }, i18next.t('nylasParticipantBookingCalendars.selectAtLeastOneCalendar'));\n return;\n } else {\n this.internals.setValidity({});\n }\n\n const key = name.split('participant-booking-')[1];\n if (!this.selectedCalendars[key]) return;\n this.selectedCalendars[key]['calendar'] = value;\n this.selectedCalendars = { ...this.selectedCalendars };\n\n const participantsCalendars = {};\n Object.keys(this.selectedCalendars).forEach(key => {\n participantsCalendars[key] = this.selectedCalendars[key]?.calendar;\n });\n this.internals.setFormValue(JSON.stringify(participantsCalendars), this.name);\n this.valueChanged.emit({ value: JSON.stringify(participantsCalendars), name: this.name });\n }\n\n setParticipants(participants: Participant[]) {\n const selectedParticipants = {};\n participants?.forEach(participant => {\n if (participant?.booking?.calendar_id) {\n const isOpen = participant.is_organizer ? true : false;\n selectedParticipants[participant.email] = {\n isOpen: isOpen,\n calendar: participant.booking?.calendar_id || 'primary',\n name: participant.name || participant.email,\n };\n }\n });\n return selectedParticipants;\n }\n @RegisterComponent<NylasParticipantBookingCalendars, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-participant-booking-calendars',\n stateToProps: new Map([\n ['schedulerConfig.additionalParticipants', 'participantOptions'],\n ['schedulerConfig.calendars', 'calendars'],\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-participant-booking-calendars\" part=\"npbc\">\n <div class=\"header\" part=\"npbc__header\">\n <h3>{i18next.t('nylasParticipantBookingCalendars.headerTitle')}</h3>\n <p>{i18next.t('nylasParticipantBookingCalendars.headerSubTitle')}</p>\n </div>\n <div class=\"content\" part=\"npbc__content\">\n <form ref={el => (this.bookingCalendarsFormRef = el as HTMLFormElement)}>\n {this.participantCalendars &&\n Object.keys(this.participantCalendars).map((key, index) => {\n const participant = this.selectedCalendars[key];\n const participantCalendars = this.participantCalendars[key];\n\n if (!participant || !participant.name) return;\n return (\n <div class=\"participant-container\" part=\"npbc__participant-container\" key={`participant-conatiner-${index}`}>\n <div class=\"participant-title\" part=\"npbc__participant-title\">\n <p>{i18next.t('nylasParticipantBookingCalendars.participantBookingCalendarTitle', { participantName: participant.name })}</p>\n <div class=\"participant-toggle\" part=\"npbc__participant-toggle-container\">\n <span\n class={`chevron ${participant.isOpen ? 'open' : 'closed'}`}\n onClick={() => {\n this.selectedCalendars[key].isOpen = !participant.isOpen;\n this.selectedCalendars = { ...this.selectedCalendars };\n }}\n >\n <chevron-icon width=\"24\" height=\"24\" />\n </span>\n </div>\n </div>\n {participant.isOpen && (\n <nylas-booking-calendar-picker\n key={key}\n name={`participant-booking-${key}`}\n calendars={participantCalendars}\n hideHeader={true}\n defaultBookingCalendar={this.participantDefaultSelectedCalendar[key]}\n />\n )}\n </div>\n );\n })}\n </form>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -3,7 +3,7 @@ import { R as RegisterComponent } from './p-BlEWfYUR.js';
|
|
|
3
3
|
import { a as debug, b as instance, s as sanitize, G as isNonPrintableKey, H as getBrowser } from './p-BtX8WBPn.js';
|
|
4
4
|
import { E as EVENT_TITLE_TOKENS } from './p-DUCeQ1R4.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './p-7S1M5IE9.js';
|
|
6
|
-
import { d as defineCustomElement$1 } from './p-
|
|
6
|
+
import { d as defineCustomElement$1 } from './p-CelgQqJU.js';
|
|
7
7
|
|
|
8
8
|
const nylasEventTitleCss = ":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}.nylas-event-title{display:flex;flex-direction:column;gap:4px;position:relative;text-align:left;color:var(--nylas-base-900)}.nylas-event-title div.title{padding:12px 16px;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);overflow:auto;white-space:nowrap;scrollbar-width:thin;background-color:var(--nylas-base-0)}.nylas-event-title div.title::-webkit-scrollbar{width:6px;height:6px}.nylas-event-title div.title.error{border-color:var(--nylas-error);border-width:2px;outline:none}.nylas-event-title input{padding:12px 16px;border-width:1;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-event-title span.help-text{display:inline-block;gap:4px;align-items:center;color:var(--nylas-base-500);font-size:14px;font-style:normal;font-weight:400;line-height:21px;position:relative}.nylas-event-title span.help-text span.label-icon{display:inline-block}.nylas-event-title span.help-text span.label-icon tooltip-component::part(tc__container){position:unset}.nylas-event-title span.help-text span.label-icon tooltip-component::part(tc__content){position:absolute;top:4px;left:50%;transform:translateX(-50%)}.nylas-event-title span.error-message{color:var(--nylas-error)}.nylas-event-title label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-event-title label span.required{color:var(--nylas-error, #cc4841)}.nylas-event-title label span.label-icon{margin-left:4px}.nylas-event-title label span.label-icon tooltip-component{display:flex}.highlighted-tag{background-color:var(--nylas-base-200);border-radius:var(--nylas-border-radius);padding:5px;margin-left:4px}.token-options{display:block;background-color:var(--nylas-base-0);width:100%;max-height:336px;overflow:auto;z-index:1;border-radius:4px;position:absolute;top:80px;box-shadow:0px 4px 6px -2px rgba(0, 0, 0, 0.0509803922);box-shadow:0px 10px 15px -3px rgba(0, 0, 0, 0.1019607843)}@media screen and (max-width: 768px){.token-options{right:0;width:325px;max-width:unset}}.token-options ul{padding:0;list-style-type:none;color:var(--nylas-base-900);max-height:336px;margin:0}.token-options ul li{padding:16px, 12px, 16px, 12px;color:var(--nylas-base-900);padding:12px 16px;text-decoration:none;display:block;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;letter-spacing:0px;text-align:left;cursor:pointer}.token-options ul li .token-label{display:flex;flex-direction:column;font-weight:400}.token-options ul li .token-label .token{color:var(--nylas-abse-900);font-size:16px;line-height:24px}.token-options ul li .token-label .description{color:var(--nylas-base-600);font-size:14px;line-height:21px}.token-options ul li:hover,.token-options ul li:focus,.token-options ul li:active,.token-options ul li.active{background-color:var(--nylas-base-100)}.token-options ul li:hover .token-label .token,.token-options ul li:focus .token-label .token,.token-options ul li:active .token-label .token,.token-options ul li.active .token-label .token{color:var(--nylas-primary)}.token-options .selected{background-color:var(--nylas-base-100)}";
|
|
9
9
|
|
|
@@ -484,6 +484,6 @@ function defineCustomElement() {
|
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
export { NylasEventTitle as N, defineCustomElement as d };
|
|
487
|
-
//# sourceMappingURL=p-
|
|
487
|
+
//# sourceMappingURL=p-G063shWV.js.map
|
|
488
488
|
|
|
489
|
-
//# sourceMappingURL=p-
|
|
489
|
+
//# sourceMappingURL=p-G063shWV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-BW7q0oI_.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,2uKAA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AE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,EAC1D,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,YAAY,EAAA,EACtB,CAAA,CAAA,mBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAW,CAAA,WAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,cAAc,EAAG,CAAA,EACjC,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,IAAI,EAAC,iBAAiB,EAAA,EACzBA,QAAO,CAAC,CAAC,CAAC,8BAA8B,CAAC,OAAE,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAO,YAAY,CAAQ,CAClE,CACW,CACf,CACF,CACR,EACA,IAAI,CAAC,eAAe,IAAI,EAAE,IAAI,6DAAM,KAAK,EAAC,eAAe,EAAA,EAAEA,QAAO,CAAC,CAAC,CAAC,CAAmB,gBAAA,EAAA,IAAI,CAAC,eAAe,CAAA,CAAE,CAAC,CAAQ,CACpH,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AArDX,UAAA,CAAA;AAVC,IAAA,iBAAiB,CAAqG;AACrH,QAAA,IAAI,EAAE,mBAAmB;QACzB,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;;;;CAwDD,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","eventTitleTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n color: var(--nylas-base-900);\n\n div.title {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n overflow: auto;\n white-space: nowrap;\n scrollbar-width: thin;\n background-color: var(--nylas-base-0);\n\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n outline: none;\n }\n }\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n\n span.help-text {\n display: inline-block;\n gap: 4px;\n align-items: center;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-block;\n\n tooltip-component {\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\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.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\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * @standalone\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n @State() configEventTitle: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\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-event-title]', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('[nylas-event-title]', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal: Configuration) {\n const title = newVal?.event_booking?.title;\n const additionalFields = newVal?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n if (title) {\n this.configEventTitle = title;\n this.updateEventTitleFromProp(title);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\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 // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('[nylas-event-title]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-event-title]', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('[nylas-event-title]', 'componentDidLoad');\n let title = this.eventTitle || this.configEventTitle;\n if (this.selectedConfiguration?.event_booking?.title) {\n title = this.selectedConfiguration?.event_booking?.title;\n }\n if (title) {\n this.updateEventTitleFromProp(title);\n this.updateEventTitle(title, true);\n }\n }\n\n disconnectedCallback() {\n debug('[nylas-event-title]', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('[nylas-event-title]', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'eventTitleRequired';\n } else {\n this.validationError = '';\n }\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('[nylas-event-title]', 'eventTitleChangedHandler', newValue);\n const title = newValue || this.configEventTitle;\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(title);\n if (typeof this.internals.setValidity === 'function') {\n if (!title || title === '') {\n this.titleRef.focus();\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n this.isInternalsAvailable && this.internals?.setFormValue(title, this.name);\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n [...eventTitleTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n console.warn('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the title, reset the title to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.titleRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n this.updateEventTitle(this.titleRef?.textContent || '');\n }\n if (this.titleRef.textContent === '' || selection?.allSelected) {\n this.titleRef.innerHTML = '';\n this.updateEventTitle('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventTitle(text: string, noValue: boolean = false) {\n const value = text.replace(/ +/g, ' ');\n if (value === '' || /^[\\s]*$/.test(value)) {\n this.validationError = 'eventTitleRequired';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.validationError = '';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: false });\n }\n\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n if (!noValue) {\n this.valueChanged.emit({ value: value, name: this.name });\n }\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\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-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n {i18next.t('nylasEventTitle.headerTitle')}\n <span class=\"required\">*</span>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.title') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {this.validationError != '' && <span class=\"error-message\">{i18next.t(`nylasEventTitle.${this.validationError}`)}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-G063shWV.js","mappings":";;;;;;;AAAA,MAAM,kBAAkB,GAAG,2uKAA2uK;;;;;;;;;;;;;;;;MCiCzvK,eAAe,GAAAA,kBAAA,CAAA,MAAA,eAAA,SAAAC,CAAA,CAAA;AAN5B,IAAA,WAAA,GAAA;;;;;;QAoBU,IAAU,CAAA,UAAA,GAAY,IAAI,CAAC,qBAAqB,EAAE,aAAa,EAAE,KAAK;AAKtE,QAAA,IAAI,CAAA,IAAA,GAAW,OAAO;AAStB,QAAA,IAAW,CAAA,WAAA,GAAY,KAAK;AAU3B,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;QAI3B,IAAe,CAAA,eAAA,GAAyDC,kBAAgB,CAAC,GAAG,CAAC,KAAK,KAAK;YAC9G,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;AAClB,YAAA,SAAS,EAAE,KAAK;AACjB,SAAA,CAAC,CAAC;AAIM,QAAA,IAAA,CAAA,cAAc,GAAyD,IAAI,CAAC,eAAe;AAK3F,QAAA,IAAoB,CAAA,oBAAA,GAAW,EAAE;QAMjC,IAAW,CAAA,WAAA,GAKhB,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;AAEnD,QAAA,IAAe,CAAA,eAAA,GAAW,EAAE;AAC5B,QAAA,IAAgB,CAAA,gBAAA,GAAW,EAAE;AAE7B,QAAA,IAAqB,CAAA,qBAAA,GAAY,EAAE;AAmf7C;AAzeC,IAAA,yBAAyB,CAAC,QAAgB,EAAA;AACxC,QAAA,KAAK,CAAC,qBAAqB,EA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C;AACF,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAwDD,EAAA,eAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement","eventTitleTokens","i18next"],"sources":["src/components/scheduler-editor/nylas-event-title/nylas-event-title.scss?tag=nylas-event-title&encapsulation=shadow","src/components/scheduler-editor/nylas-event-title/nylas-event-title.tsx"],"sourcesContent":["@use '../../../common/styles/variables' as *;\n\n:host {\n display: block;\n @include default-css-variables;\n}\n\n.nylas-event-title {\n display: flex;\n flex-direction: column;\n gap: 4px;\n position: relative;\n text-align: left;\n color: var(--nylas-base-900);\n\n div.title {\n padding: 12px 16px;\n border: 1px solid var(--nylas-base-200);\n border-radius: var(--nylas-border-radius-2x);\n overflow: auto;\n white-space: nowrap;\n scrollbar-width: thin;\n background-color: var(--nylas-base-0);\n\n &::-webkit-scrollbar {\n width: 6px;\n height: 6px;\n }\n\n &.error {\n border-color: var(--nylas-error);\n border-width: 2px;\n outline: none;\n }\n }\n\n input {\n padding: 12px 16px;\n border-width: 1;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n }\n\n span.help-text {\n display: inline-block;\n gap: 4px;\n align-items: center;\n color: var(--nylas-base-500);\n font-size: 14px;\n font-style: normal;\n font-weight: 400;\n line-height: 21px;\n position: relative;\n\n span.label-icon {\n display: inline-block;\n\n tooltip-component {\n &::part(tc__container) {\n position: unset;\n }\n\n &::part(tc__content) {\n position: absolute;\n top: 4px;\n left: 50%;\n transform: translateX(-50%);\n }\n }\n }\n }\n\n span.error-message {\n color: var(--nylas-error);\n }\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.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\n.highlighted-tag {\n background-color: var(--nylas-base-200);\n border-radius: var(--nylas-border-radius);\n padding: 5px;\n margin-left: 4px;\n}\n\n.token-options {\n display: block;\n background-color: var(--nylas-base-0);\n width: 100%;\n max-height: 336px;\n overflow: auto;\n z-index: 1;\n border-radius: 4px;\n position: absolute;\n top: calc(48px + 24px + 8px); // 48px is the height of the input, 24px is the height of the label, 8px is the gap between the label and the input\n\n box-shadow: 0px 4px 6px -2px #0000000d;\n box-shadow: 0px 10px 15px -3px #0000001a;\n\n @media #{$mobile} {\n right: 0;\n width: 325px;\n max-width: unset;\n }\n\n ul {\n padding: 0;\n list-style-type: none;\n color: var(--nylas-base-900);\n max-height: 336px;\n margin: 0;\n\n li {\n padding: 16px, 12px, 16px, 12px;\n color: var(--nylas-base-900);\n padding: 12px 16px;\n text-decoration: none;\n display: block;\n font-family: inherit;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n letter-spacing: 0px;\n text-align: left;\n cursor: pointer;\n\n .token-label {\n display: flex;\n flex-direction: column;\n font-weight: 400;\n\n .token {\n color: var(--nylas-abse-900);\n font-size: 16px;\n line-height: 24px;\n }\n\n .description {\n color: var(--nylas-base-600);\n font-size: 14px;\n line-height: 21px;\n }\n }\n\n &:hover,\n &:focus,\n &:active,\n &.active {\n background-color: var(--nylas-base-100);\n\n .token-label {\n .token {\n color: var(--nylas-primary);\n }\n }\n }\n }\n }\n\n .selected {\n background-color: var(--nylas-base-100);\n }\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { debug, getBrowser, isNonPrintableKey, sanitize } from '@/utils/utils';\nimport { AttachInternals, Component, Host, State, h, Element, Prop, Watch, Event, EventEmitter, Listen } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { EVENT_TITLE_TOKENS as eventTitleTokens } from '@/common/constants';\nimport { Configuration } from '@nylas/core';\nimport i18next from '@/utils/i18n';\nimport { LANGUAGE_CODE } from '@/common/constants';\nimport { ThemeConfig } from '@nylas/core';\n\ninterface CustomShadowRoot extends ShadowRoot {\n getSelection: () => Selection | null;\n}\n\ntype Token = {\n token: string;\n value: string;\n description: string;\n};\n\n/**\n * The `nylas-event-title` component is a form input for the title of an event.\n * @part net - The event title container\n * @part net__title - The event title input\n * @part net__dropdown-content - The token options container\n */\n@Component({\n tag: 'nylas-event-title',\n styleUrl: 'nylas-event-title.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasEventTitle {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n // Properties\n /**\n * @standalone\n * The selected config\n */\n @Prop() selectedConfiguration?: Configuration;\n /**\n * @standalone\n * The title of the event from the cofiguration.\n */\n @Prop() eventTitle?: string = this.selectedConfiguration?.event_booking?.title;\n /**\n * @standalone\n * The name attribute of this component.\n */\n @Prop() name: string = 'title';\n /**\n * The selected language.\n */\n @Prop() selectedLanguage?: LANGUAGE_CODE;\n\n /**\n * Whether to show the tokens dropdown.\n */\n @Prop() noTemplates: boolean = false;\n /**\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n // State variables\n /**\n * Whether to show the tokens dropdown.\n */\n @State() showTokens: boolean = false;\n /**\n * The available token options for the dropdown.\n */\n @State() availableTokens: { label: string; value: string; labelHTML: Token }[] = eventTitleTokens.map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n /**\n * The filtered token options for the dropdown based on the current query.\n */\n @State() filteredTokens: { label: string; value: string; labelHTML: Token }[] = this.availableTokens;\n /**\n * The aria-activedescendant attribute value. This is used to indicate the\n * currently active descendant in the tokens dropdown.\n */\n @State() ariaActivedescendant: string = '';\n /**\n * Stores the reference to the current word being typed.\n * This is used to update the event title with the selected token tag when\n * an option is selected from the dropdown by clicking on it.\n */\n @State() currentWord: {\n $value: string;\n fullText: string;\n index: number;\n focusOffset: number;\n } = { $value: '', fullText: '', index: -1, focusOffset: -1 };\n\n @State() validationError: string = '';\n @State() configEventTitle: string = '';\n\n @State() additionalFieldTokens: Token[] = [];\n // Reference to the title div element\n private titleRef!: HTMLDivElement;\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-event-title]', 'elementNameChangedHandler', newValue);\n this.host.setAttribute('name', newValue);\n }\n\n @Watch('ariaActivedescendant')\n ariaActivedescendantChangedHandler(newValue: string) {\n debug('[nylas-event-title]', 'ariaActivedescendantChangedHandler', newValue);\n if (newValue !== '') {\n const activeOption = this.host.shadowRoot?.getElementById(newValue);\n activeOption?.classList.add('active');\n } else {\n const options = this.host.shadowRoot?.querySelectorAll('.token-options li.active');\n options?.forEach(option => option.classList.remove('active'));\n }\n }\n\n @Watch('selectedConfiguration')\n configChangedHandler(newVal: Configuration) {\n const title = newVal?.event_booking?.title;\n const additionalFields = newVal?.scheduler?.additional_fields || {};\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n if (title) {\n this.configEventTitle = title;\n this.updateEventTitleFromProp(title);\n }\n }\n\n @Watch('selectedLanguage')\n selectedLanguageChangedHandler(newVal: LANGUAGE_CODE, oldVal: LANGUAGE_CODE) {\n if (newVal === oldVal) return;\n i18next.changeLanguage(newVal);\n const titleTokens = {\n $invitee: 'invitee',\n $invitee_email: 'inviteeEmail',\n $duration: 'duration',\n };\n this.availableTokens = this.availableTokens.map(token => {\n if (titleTokens[token.label]) {\n token.labelHTML.description = i18next.t(`nylasEventTitle.eventTitleTokenDescription.${titleTokens[token.label]}`);\n }\n return token;\n });\n this.filteredTokens = [...this.availableTokens];\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 // Events\n /**\n * This event is fired when the value of the event title changes.\n */\n @Event() valueChanged!: EventEmitter<{\n value: string;\n name: string;\n }>;\n\n // Lifecycle methods\n connectedCallback() {\n debug('[nylas-event-title]', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('[nylas-event-title]', 'componentWillLoad');\n this.host.setAttribute('name', this.name);\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('[nylas-event-title]', 'componentDidLoad');\n let title = this.eventTitle || this.configEventTitle;\n if (this.selectedConfiguration?.event_booking?.title) {\n title = this.selectedConfiguration?.event_booking?.title;\n }\n if (title) {\n this.updateEventTitleFromProp(title);\n this.updateEventTitle(title, true);\n }\n }\n\n disconnectedCallback() {\n debug('[nylas-event-title]', 'disconnectedCallback');\n }\n\n @Listen('formSubmitted', { target: 'window' })\n formSubmittedHandler(event: CustomEvent) {\n debug('[nylas-event-title]', 'formSubmittedHandler', event);\n if (!this.internals?.validity?.valid) {\n this.validationError = 'eventTitleRequired';\n } else {\n this.validationError = '';\n }\n }\n\n @Listen('valueChanged', { target: 'document' })\n valueChangedHandler(event: CustomEvent<{ value: string; name: string }>) {\n const { name, value } = event.detail;\n if (name === 'additional-fields') {\n const additionalFields = JSON.parse(value.toString());\n const newKeys = Object.keys(additionalFields) || [];\n const newTokens = newKeys.map(key => {\n return {\n token: `$${key}`,\n value: `\\${${key}}`,\n description: additionalFields[key].label || '',\n };\n });\n this.additionalFieldTokens = [...newTokens];\n this.availableTokens = [...eventTitleTokens, ...newTokens].map(token => ({\n label: token.token,\n value: token.value,\n labelHTML: token,\n }));\n this.filteredTokens = [...this.availableTokens];\n }\n }\n\n updateEventTitleFromProp(newValue: string) {\n debug('[nylas-event-title]', 'eventTitleChangedHandler', newValue);\n const title = newValue || this.configEventTitle;\n if (this.titleRef) {\n this.titleRef.innerHTML = this.highlightTokens(title);\n if (typeof this.internals.setValidity === 'function') {\n if (!title || title === '') {\n this.titleRef.focus();\n this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.internals?.setValidity({ customError: false });\n this.isInternalsAvailable && this.internals?.setFormValue(title, this.name);\n }\n }\n }\n }\n\n highlightTokens(title: string) {\n let outputHtml = title;\n [...eventTitleTokens, ...this.additionalFieldTokens].forEach(tokenObj => {\n const token = tokenObj.value;\n // Create a regular expression that matches the token as a whole word\n const regex = new RegExp(`(\\\\${token})(?!\\\\w)`, 'g');\n // Replace the token with a span element\n outputHtml = outputHtml?.replace(regex, '<span class=\"highlighted-tag\">$1</span>') || '';\n });\n return outputHtml;\n }\n\n getCurrentSelectionForBrowser() {\n const getSelectionTextData = (nodeValue, offset, node, allSelected) => {\n // Remove zero-width space characters from the text, because they are not visible and cause issues with the selection\n const text = nodeValue.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n const dollarIndex = text.lastIndexOf('$');\n const lastWord = text.substring(dollarIndex).split(' ')[0];\n return {\n focusOffset: offset,\n dollarIndex,\n lastWord,\n currentText: text,\n node,\n allSelected,\n };\n };\n\n // Check if the selection has selected all the text in the node, we need this to handle the case where the user selects all the text and then types or deletes\n const isAllSelected = (selection: Selection) => selection.anchorOffset === 0 && selection.focusOffset === selection.focusNode?.nodeValue?.length;\n\n const currentBrowser = getBrowser();\n switch (currentBrowser) {\n case 'Chrome': {\n const shadowRootSelection = (this.host.shadowRoot as CustomShadowRoot)?.getSelection();\n const focusNode = shadowRootSelection?.focusNode;\n const focusNodeValue = focusNode?.nodeValue || '';\n const allSelected = shadowRootSelection && isAllSelected(shadowRootSelection);\n return getSelectionTextData(focusNodeValue, shadowRootSelection?.focusOffset || -1, focusNode, allSelected);\n }\n case 'Firefox': {\n const selection = document.getSelection();\n const anchorNodeValue = selection?.anchorNode?.nodeValue || '';\n const allSelectedFirefox = selection && isAllSelected(selection);\n return getSelectionTextData(anchorNodeValue, selection?.focusOffset || -1, selection?.anchorNode, allSelectedFirefox);\n }\n case 'Safari': {\n const windowSelection = window.getSelection();\n const anchorNode = (windowSelection as any)?.getComposedRanges(this.host.shadowRoot as CustomShadowRoot)[0];\n const currentText = anchorNode?.startContainer?.nodeValue || '';\n const allSelectedSafari = windowSelection && isAllSelected(windowSelection);\n return getSelectionTextData(currentText, anchorNode?.endOffset || -1, anchorNode?.startContainer, allSelectedSafari);\n }\n default: {\n console.warn('Browser not supported');\n return null;\n }\n }\n }\n\n handleChange(event: Event) {\n let textContent = (event.target as HTMLDivElement).textContent || '';\n textContent = sanitize(textContent);\n\n // All browsers handle Selection within Shadow DOM differently, so get the current selection based on the browser\n const currentSelection = this.getCurrentSelectionForBrowser();\n if (!currentSelection) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n const { focusOffset, dollarIndex, lastWord, currentText } = currentSelection;\n\n if (dollarIndex === -1 || focusOffset < dollarIndex) {\n this.updateEventTitle(textContent);\n this.resetDropdown();\n return;\n }\n if (lastWord.startsWith('$')) {\n this.showTokens = true;\n // Update the current word being typed, we need this reference to update the event title with the selected token\n // because the user can select an option from the dropdown by clicking on it, which will not trigger the input event.\n this.currentWord = {\n $value: lastWord,\n fullText: currentText,\n index: dollarIndex,\n focusOffset,\n };\n this.populateSuggestionsDropdown(lastWord);\n } else {\n this.resetDropdown();\n }\n this.updateEventTitle(textContent);\n }\n\n handleInputKeyDown(event) {\n const selection = this.getCurrentSelectionForBrowser();\n\n // If no text is remaining in the title, reset the title to an empty string\n if (selection?.allSelected && !isNonPrintableKey(event)) {\n this.titleRef.innerHTML = '';\n }\n\n if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n activeOption.click();\n this.ariaActivedescendant = '';\n }\n } else if (event.key === 'ArrowDown') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const nextOption = activeOption.nextElementSibling;\n if (nextOption) {\n this.ariaActivedescendant = nextOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n const activeOption = this.host.shadowRoot?.getElementById(this.ariaActivedescendant);\n if (activeOption) {\n const prevOption = activeOption.previousElementSibling;\n if (prevOption) {\n this.ariaActivedescendant = prevOption.id;\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else {\n this.ariaActivedescendant = this.filteredTokens[this.filteredTokens.length - 1].label;\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.resetDropdown();\n } else if (event.key === 'Backspace' || event.key === 'Delete') {\n const parentNode = selection?.node?.parentNode;\n if (selection?.currentText.startsWith('${') && parentNode && parentNode.nodeName === 'SPAN') {\n event.preventDefault();\n parentNode.removeChild(selection.node);\n parentNode.remove();\n this.resetDropdown();\n this.updateEventTitle(this.titleRef?.textContent || '');\n }\n if (this.titleRef.textContent === '' || selection?.allSelected) {\n this.titleRef.innerHTML = '';\n this.updateEventTitle('');\n }\n }\n }\n\n selectOption(e: Event, option: { label: string; value: string; labelHTML: Token }) {\n e.preventDefault();\n const word = this.currentWord.fullText;\n const dollarWord = this.currentWord.$value;\n\n // Traverse the DOM to find the text node that contains the current word fullText\n let currentNode = this.titleRef.firstChild;\n let textNode: ChildNode | null = null;\n\n while (currentNode) {\n if (currentNode.nodeType === 3) {\n const currentNodeText = currentNode.textContent?.replace(/[\\u200B-\\u200D\\uFEFF]/g, '') || '';\n const wordText = word.replace(/[\\u200B-\\u200D\\uFEFF]/g, '');\n if (currentNodeText.includes(wordText)) {\n textNode = currentNode;\n break;\n }\n }\n currentNode = currentNode.nextSibling;\n }\n\n if (!textNode) {\n return;\n }\n // Split the text node into three parts: text before the token, the token, and text after the token\n const text = textNode.textContent || '';\n const index = text.indexOf(dollarWord);\n const textBefore = text.substring(0, index);\n const textAfter = text.substring(index + dollarWord.length);\n const newTextNode = document.createTextNode(textBefore);\n const newRange = document.createRange();\n\n // Create a new span element to replace the text node\n const tagSpan = document.createElement('span');\n tagSpan.classList.add('highlighted-tag');\n tagSpan.textContent = `${option.value}`;\n const newTextNodeAfter = document.createTextNode(textAfter);\n\n if (textAfter !== '') {\n // If there is text after the token, add it to the new span element\n textNode.replaceWith(newTextNode, tagSpan, newTextNodeAfter);\n newRange.setStart(newTextNodeAfter, 1);\n } else {\n // If there is no text after the token, add a zero-width space character (Without this, the cursor will not move outside the highlighted span element)\n const afterNode = document.createTextNode('\\u200B');\n textNode.replaceWith(newTextNode, tagSpan, afterNode);\n newRange.setStart(afterNode, 1);\n }\n\n // Hide the dropdown\n this.resetDropdown();\n this.titleRef.focus();\n\n // Set the focus to the new span element\n const sel = window.getSelection();\n newRange.collapse(true);\n sel?.removeAllRanges();\n sel?.addRange(newRange);\n\n // Update the event title with the selected token\n this.updateEventTitle(this.titleRef.textContent || '');\n }\n\n populateSuggestionsDropdown(query: string = '') {\n this.filteredTokens = this.availableTokens.filter(obj => {\n return obj.label.startsWith(query.toString()) || obj.value.startsWith(query.toString());\n });\n\n // Set the first option as the active descendant\n if (this.filteredTokens.length > 0) {\n this.ariaActivedescendant = this.filteredTokens[0].label;\n }\n }\n\n get isInternalsAvailable() {\n return typeof this.internals !== 'undefined' && typeof this.internals.setValidity === 'function' && typeof this.internals.setFormValue === 'function';\n }\n\n updateEventTitle(text: string, noValue: boolean = false) {\n const value = text.replace(/ +/g, ' ');\n if (value === '' || /^[\\s]*$/.test(value)) {\n this.validationError = 'eventTitleRequired';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: true }, `Event title is required`, this.titleRef);\n } else {\n this.validationError = '';\n this.isInternalsAvailable && this.internals?.setValidity({ customError: false });\n }\n\n this.isInternalsAvailable && this.internals?.setFormValue(value, this.name);\n if (!noValue) {\n this.valueChanged.emit({ value: value, name: this.name });\n }\n }\n\n resetDropdown() {\n this.showTokens = false;\n this.ariaActivedescendant = '';\n }\n\n getLabelHTML(token: { token: string; description: string }) {\n return (\n <div class=\"token-label\">\n <span class=\"token\">{token.token}</span>\n <span class=\"description\">{token.description}</span>\n </div>\n );\n }\n\n @RegisterComponent<NylasEventTitle, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-event-title',\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-event-title\" part=\"net\">\n <label htmlFor=\"title\">\n {i18next.t('nylasEventTitle.headerTitle')}\n <span class=\"required\">*</span>\n </label>\n <div\n class={{\n title: true,\n error: this.validationError !== '',\n }}\n part=\"net__title\"\n ref={el => (this.titleRef = el as HTMLDivElement)}\n contentEditable=\"true\"\n onInput={e => this.handleChange(e)}\n onKeyDown={event => this.handleInputKeyDown(event)}\n ></div>\n {!this.noTemplates && this.showTokens && this.filteredTokens?.length > 0 && (\n <div class=\"token-options\" part=\"net__dropdown-content\">\n <ul tabindex=\"-1\" role=\"listbox\" aria-label={this.name} aria-activedescendant={this.ariaActivedescendant}>\n {this.filteredTokens.map(option => (\n <li\n tabindex=\"0\"\n key={option.label}\n id={option.label}\n class={{ active: this.ariaActivedescendant === option.label }}\n onClick={e => this.selectOption(e, option)}\n role=\"option\"\n >\n {this.getLabelHTML(option.labelHTML)}\n </li>\n ))}\n </ul>\n </div>\n )}\n {!this.noTemplates && (\n <span class=\"help-text\">\n {i18next.t('nylasEventTitle.helpText', { context: 'start', field: i18next.t('nylasEventTitle.title') })} <code>$</code>{' '}\n {i18next.t('nylasEventTitle.helpText', { context: 'end' })}\n <span class=\"label-icon\">\n <tooltip-component>\n <info-icon slot=\"tooltip-icon\" />\n <span slot=\"tooltip-content\">\n {i18next.t('nylasEventTitle.tooltip.desc')} <code>{'${invitee}'}</code>\n </span>\n </tooltip-component>\n </span>\n </span>\n )}\n {this.validationError != '' && <span class=\"error-message\">{i18next.t(`nylasEventTitle.${this.validationError}`)}</span>}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -5,7 +5,7 @@ import { d as defineCustomElement$5 } from './p-PeEnpB8P.js';
|
|
|
5
5
|
import { d as defineCustomElement$4 } from './p-7S1M5IE9.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './p-ClTk9Ttz.js';
|
|
7
7
|
import { d as defineCustomElement$2 } from './p-D7lRYhTx.js';
|
|
8
|
-
import { d as defineCustomElement$1 } from './p-
|
|
8
|
+
import { d as defineCustomElement$1 } from './p-CelgQqJU.js';
|
|
9
9
|
|
|
10
10
|
const nylasBufferTimeCss = ":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-buffer-time{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-buffer-time .header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}.nylas-buffer-time .header h3{margin:0;font-size:16px;font-weight:600;line-height:20px;color:var(--nylas-base-900);text-align:left}.nylas-buffer-time .header p{display:flex;gap:4px;align-items:center;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-buffer-time .nylas-buffer-time__body{display:grid;grid-template-columns:1fr auto;background-color:var(--nylas-base-25)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body{grid-template-columns:1fr}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{padding:1rem;display:flex;flex-direction:column;gap:1rem;border-right:1px solid var(--nylas-base-200);color:var(--nylas-base-800)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown{border:none}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row label{width:200px}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container{display:flex;gap:1rem;align-items:center;justify-content:flex-end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__dropdown .nylas-buffer-time__row .dropdown-container span{width:-webkit-fill-available;width:fill-available;width:-moz-available;text-align:end}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:208px;background:var(--nylas-base-25);border-bottom-right-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview{width:inherit;border-bottom-left-radius:var(--nylas-border-radius-2x)}}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__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-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container{padding:0 2rem 1rem}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot{background-color:transparent;border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot.active{background-color:var(--nylas-base-100)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .slot:last-of-type{border-bottom:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__body .nylas-buffer-time__preview .preview-container .event-slot{background-color:var(--nylas-base-600);border-top:1px solid var(--nylas-base-300)}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button){width:104px;display:flex;justify-content:space-between;align-items:center;border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);padding:14px}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-content){width:100%}.nylas-buffer-time .nylas-buffer-time__dropdown select-dropdown::part(sd_dropdown-button-selected-label){max-width:calc(100% - 2rem);font-family:var(--nylas-font-family);font-size:16px;line-height:24px}";
|
|
11
11
|
|
|
@@ -268,6 +268,6 @@ function defineCustomElement() {
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
export { NylasBufferTime as N, defineCustomElement as d };
|
|
271
|
-
//# sourceMappingURL=p-
|
|
271
|
+
//# sourceMappingURL=p-_Y7InDst.js.map
|
|
272
272
|
|
|
273
|
-
//# sourceMappingURL=p-
|
|
273
|
+
//# sourceMappingURL=p-_Y7InDst.js.map
|