@nylas/web-elements 2.2.0 → 2.2.2
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/nylas-web-elements/{abstract-provider-D75Ucvku.js → abstract-provider-9AZudYSI.js} +2 -2
- package/dist/nylas-web-elements/{abstract-provider-D75Ucvku.js.map → abstract-provider-9AZudYSI.js.map} +1 -1
- package/dist/nylas-web-elements/add-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/archive-icon.entry.js +1 -1
- package/dist/nylas-web-elements/arrow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/bold-icon.entry.js +1 -1
- package/dist/nylas-web-elements/button-component.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-agenda-fill-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-agenda-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-cancel-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-check-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/calendar-patterns-icon.entry.js +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.js +1 -1
- package/dist/nylas-web-elements/checkbox-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/checkbox-group.entry.js +1 -1
- package/dist/nylas-web-elements/checkmark-circle-icon.entry.js +1 -1
- package/dist/nylas-web-elements/checkmark-icon.entry.js +1 -1
- package/dist/nylas-web-elements/chevron-icon.entry.js +1 -1
- package/dist/nylas-web-elements/clock-icon.entry.js +1 -1
- package/dist/nylas-web-elements/close-icon.entry.js +1 -1
- package/dist/nylas-web-elements/copy-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{customParseFormat-Bk5PI6Cs.js → customParseFormat-BJNMxHY2.js} +2 -2
- package/dist/nylas-web-elements/{customParseFormat-Bk5PI6Cs.js.map → customParseFormat-BJNMxHY2.js.map} +1 -1
- package/dist/nylas-web-elements/delete-icon.entry.js +1 -1
- package/dist/nylas-web-elements/document-refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/dragable-icon.entry.js +1 -1
- package/dist/nylas-web-elements/edit-icon.entry.js +1 -1
- package/dist/nylas-web-elements/envelope-fill-icon.entry.js +1 -1
- package/dist/nylas-web-elements/envelope-icon.entry.js +1 -1
- package/dist/nylas-web-elements/eye-icon.entry.js +1 -1
- package/dist/nylas-web-elements/feedback-icon.entry.js +1 -1
- package/dist/nylas-web-elements/flow-icon.entry.js +1 -1
- package/dist/nylas-web-elements/folder-icon.entry.js +1 -1
- package/dist/nylas-web-elements/forward-icon.entry.js +1 -1
- package/dist/nylas-web-elements/globe-icon.entry.js +1 -1
- package/dist/nylas-web-elements/google-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/google-meet-icon.entry.js +1 -1
- package/dist/nylas-web-elements/inbox-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{index-BVtainOy.js → index-BPPwIJj2.js} +2 -2
- package/dist/nylas-web-elements/{index-BVtainOy.js.map → index-BPPwIJj2.js.map} +1 -1
- package/dist/nylas-web-elements/{index-B-KMpdMZ.js → index-Cbn5rIwb.js} +2 -2
- package/dist/nylas-web-elements/index-Cbn5rIwb.js.map +1 -0
- package/dist/nylas-web-elements/index.esm.js +1 -1
- package/dist/nylas-web-elements/info-icon.entry.js +1 -1
- package/dist/nylas-web-elements/input-color-picker.entry.js +1 -1
- package/dist/nylas-web-elements/input-component.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/input-component.entry.js +1 -1
- package/dist/nylas-web-elements/input-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/input-dropdown.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/input-dropdown.entry.js +1 -1
- package/dist/nylas-web-elements/input-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/input-image-url.entry.js +1 -1
- package/dist/nylas-web-elements/italic-icon.entry.js +1 -1
- package/dist/nylas-web-elements/loading-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-icon.entry.js +1 -1
- package/dist/nylas-web-elements/location-off-icon.entry.js +1 -1
- package/dist/nylas-web-elements/microsoft-logo-icon.entry.js +1 -1
- package/dist/nylas-web-elements/microsoft-teams-icon.entry.js +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js +1 -1
- package/dist/nylas-web-elements/multi-select-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-additional-participants.entry.js +1 -1
- package/dist/nylas-web-elements/{nylas-api-request-B1V2koVc.js → nylas-api-request-rYAjhY1J.js} +2 -2
- package/dist/nylas-web-elements/{nylas-api-request-B1V2koVc.js.map → nylas-api-request-rYAjhY1J.js.map} +1 -1
- package/dist/nylas-web-elements/nylas-availability-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booked-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booking-calendar-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booking-confirmation-redirect.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booking-confirmation-type.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-booking-form-config.entry.js +2 -2
- package/dist/nylas-web-elements/nylas-booking-form.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-buffer-time.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-calendar-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-cancel-booking-form.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-cancellation-policy.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-cancellation-policy.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-cancelled-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-confirmation-email.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-confirmed-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-connected-calendars.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-custom-booking-flow.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-custom-event-slug.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-customize-booking-settings.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-date-component.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-date-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-disable-emails.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs-group.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-editor-tabs.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-calendar.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-capacity.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-description.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-duration.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-info.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-limits.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-location.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-location.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-location.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-timeslot.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-title.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-event-title.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-event-title.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-feedback-form.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-form-card.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-limit-future-bookings.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-list-configurations.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-locale-switch.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-logo.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-min-booking-notice.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-min-cancellation-notice.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-notification.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-notification.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-organizer-confirmation-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-page-name.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-page-name.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-page-name.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-page-styling.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-participant-booking-calendars.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-participants-custom-availability.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-reminder-emails.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-reminder-time.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js +3 -3
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling-method.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-select-event-type.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-selected-event-card.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-specific-time-availability-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-time-window-picker.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-timeslot-interval.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-timeslot-interval.entry.js.map +1 -1
- package/dist/nylas-web-elements/nylas-timeslot-picker.entry.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js.map +1 -1
- package/dist/nylas-web-elements/paintbrush-fill-icon.entry.js +1 -1
- package/dist/nylas-web-elements/paintbrush-icon.entry.js +1 -1
- package/dist/nylas-web-elements/people-icon.entry.js +1 -1
- package/dist/nylas-web-elements/person-clipboard-icon.entry.js +1 -1
- package/dist/nylas-web-elements/person-icon.entry.js +1 -1
- package/dist/nylas-web-elements/play-icon.entry.js +1 -1
- package/dist/nylas-web-elements/plus-icon.entry.js +1 -1
- package/dist/nylas-web-elements/radio-button-group.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/radio-button-group.entry.js +1 -1
- package/dist/nylas-web-elements/radio-button-group.entry.js.map +1 -1
- package/dist/nylas-web-elements/refresh-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{register-component-BHk70oxk.js → register-component-Blj8K64f.js} +2 -2
- package/dist/nylas-web-elements/{register-component-BHk70oxk.js.map → register-component-Blj8K64f.js.map} +1 -1
- package/dist/nylas-web-elements/reply-all-icon.entry.js +1 -1
- package/dist/nylas-web-elements/reply-icon.entry.js +1 -1
- package/dist/nylas-web-elements/search-icon.entry.js +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js +1 -1
- package/dist/nylas-web-elements/select-dropdown.entry.js.map +1 -1
- package/dist/nylas-web-elements/sent-icon.entry.js +1 -1
- package/dist/nylas-web-elements/spam-icon.entry.js +1 -1
- package/dist/nylas-web-elements/star-icon.entry.js +1 -1
- package/dist/nylas-web-elements/stop-icon.entry.js +1 -1
- package/dist/nylas-web-elements/textarea-component.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/textarea-component.entry.js +1 -1
- package/dist/nylas-web-elements/textarea-component.entry.js.map +1 -1
- package/dist/nylas-web-elements/time-period-selector.entry.js +1 -1
- package/dist/nylas-web-elements/toggle-switch.entry.js +1 -1
- package/dist/nylas-web-elements/tooltip-component.entry.js +1 -1
- package/dist/nylas-web-elements/translate-icon.entry.js +1 -1
- package/dist/nylas-web-elements/trash-fill-icon.entry.js +1 -1
- package/dist/nylas-web-elements/trash-icon.entry.js +1 -1
- package/dist/nylas-web-elements/underline-icon.entry.js +1 -1
- package/dist/nylas-web-elements/{utils-Bj5Y75fX.js → utils-DhmCcrVs.js} +3 -3
- package/dist/nylas-web-elements/{utils-Bj5Y75fX.js.map → utils-DhmCcrVs.js.map} +1 -1
- package/dist/nylas-web-elements/warning-icon.entry.js +1 -1
- package/dist/nylas-web-elements/zoom-icon.entry.js +1 -1
- package/dist/types/components/design-system/input-component/input-component.d.ts +1 -0
- package/dist/types/components/design-system/multi-select-dropdown/multi-select-dropdown.d.ts +1 -0
- package/dist/types/components/design-system/textarea-component/textarea-component.d.ts +1 -0
- package/dist/types/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.d.ts +1 -1
- package/dist/types/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.d.ts +1 -0
- package/dist/types/components.d.ts +4 -4
- package/package.json +3 -3
- package/readme.md +1 -1
- package/dist/nylas-web-elements/index-B-KMpdMZ.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nylasEventTitleCss","NylasEventTitle","constructor","hostRef","this","eventTitle","selectedConfiguration","event_booking","title","name","noTemplates","showTokens","availableTokens","eventTitleTokens","map","token","label","value","labelHTML","filteredTokens","ariaActivedescendant","currentWord","$value","fullText","index","focusOffset","validationError","configEventTitle","additionalFieldTokens","elementNameChangedHandler","newValue","debug","host","setAttribute","ariaActivedescendantChangedHandler","activeOption","shadowRoot","getElementById","classList","add","options","querySelectorAll","forEach","option","remove","configChangedHandler","newVal","additionalFields","scheduler","additional_fields","newKeys","Object","keys","newTokens","key","description","updateEventTitleFromProp","selectedLanguageChangedHandler","oldVal","i18next","changeLanguage","titleTokens","$invitee","$invitee_email","$duration","t","themeConfigChangedHandler","applyThemeConfig","themeConfig","entries","style","setProperty","connectedCallback","componentWillLoad","componentDidLoad","updateEventTitle","disconnectedCallback","formSubmittedHandler","event","internals","validity","valid","valueChangedHandler","detail","JSON","parse","toString","titleRef","innerHTML","highlightTokens","setValidity","focus","customError","isInternalsAvailable","setFormValue","outputHtml","tokenObj","regex","RegExp","replace","getCurrentSelectionForBrowser","getSelectionTextData","nodeValue","offset","node","allSelected","text","dollarIndex","lastIndexOf","lastWord","substring","split","currentText","isAllSelected","selection","anchorOffset","focusNode","length","currentBrowser","getBrowser","shadowRootSelection","getSelection","focusNodeValue","document","anchorNodeValue","anchorNode","allSelectedFirefox","windowSelection","window","getComposedRanges","startContainer","allSelectedSafari","endOffset","console","warn","handleChange","textContent","target","sanitize","currentSelection","resetDropdown","startsWith","populateSuggestionsDropdown","handleInputKeyDown","isNonPrintableKey","preventDefault","click","nextOption","nextElementSibling","id","prevOption","previousElementSibling","parentNode","nodeName","removeChild","selectOption","e","word","dollarWord","currentNode","firstChild","textNode","nodeType","currentNodeText","wordText","includes","nextSibling","indexOf","textBefore","textAfter","newTextNode","createTextNode","newRange","createRange","tagSpan","createElement","newTextNodeAfter","replaceWith","setStart","afterNode","sel","collapse","removeAllRanges","addRange","query","filter","obj","noValue","test","valueChanged","emit","getLabelHTML","h","class","render","Host","part","htmlFor","error","ref","el","contentEditable","onInput","onKeyDown","tabindex","role","active","onClick","context","field","slot","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"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 }\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"],"mappings":"oOAAA,MAAMA,EAAqB,0uK,ugBCiCdC,EAAe,MAN5B,WAAAC,CAAAC,G,qNAoBUC,KAAUC,WAAYD,KAAKE,uBAAuBC,eAAeC,MAKjEJ,KAAIK,KAAW,QASfL,KAAWM,YAAY,MAUtBN,KAAUO,WAAY,MAItBP,KAAeQ,gBAAyDC,EAAiBC,KAAIC,IAAK,CACzGC,MAAOD,EAAMA,MACbE,MAAOF,EAAME,MACbC,UAAWH,MAKJX,KAAAe,eAAuEf,KAAKQ,gBAK5ER,KAAoBgB,qBAAW,GAM/BhB,KAAWiB,YAKhB,CAAEC,OAAQ,GAAIC,SAAU,GAAIC,OAAQ,EAAGC,aAAc,GAEhDrB,KAAesB,gBAAW,GAC1BtB,KAAgBuB,iBAAW,GAE3BvB,KAAqBwB,sBAAY,EAkf3C,CAxeC,yBAAAC,CAA0BC,GACxBC,EAAM,sBAAuB,4BAA6BD,GAC1D1B,KAAK4B,KAAKC,aAAa,OAAQH,E,CAIjC,kCAAAI,CAAmCJ,GACjCC,EAAM,sBAAuB,qCAAsCD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2BAA2B,IAAE+H,EAAc,QAAA1I,IAAA,iDAAC,IACvHK,EAAQM,EAAE,2BAA4B,CAAE+I,QAAS,QAClDhB,EAAM,QAAA1I,IAAA,2CAAA2I,MAAM,cACVD,EAAA,qBAAA1I,IAAA,4CACE0I,EAAW,aAAA1I,IAAA,2CAAA4J,KAAK,iBAChBlB,EAAM,QAAA1I,IAAA,2CAAA4J,KAAK,mBACRvJ,EAAQM,EAAE,gCAA+B,IAAE+H,EAAA,QAAA1I,IAAA,4CAAO,kBAM5DlD,KAAKsB,iBAAmB,IAAMsK,EAAA,QAAA1I,IAAA,2CAAM2I,MAAM,iBAAiBtI,EAAQM,EAAE,mBAAmB7D,KAAKsB,qB,+UAnDtGyL,EAAA,CAVCC,EAAsH,CACrH3M,KAAM,oBACN4M,aAAc,IAAIC,IAAI,CACpB,CAAC,wCAAyC,yBAC1C,CAAC,mCAAoC,oBACrC,CAAC,8BAA+B,iBAElCC,aAAc,GACdC,kBAAmB,O,mFAyDpBvN,EAAAwN,UAAA,e","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["nylasEventTitleCss","NylasEventTitle","constructor","hostRef","this","eventTitle","selectedConfiguration","event_booking","title","name","noTemplates","showTokens","availableTokens","eventTitleTokens","map","token","label","value","labelHTML","filteredTokens","ariaActivedescendant","currentWord","$value","fullText","index","focusOffset","validationError","configEventTitle","additionalFieldTokens","elementNameChangedHandler","newValue","debug","host","setAttribute","ariaActivedescendantChangedHandler","activeOption","shadowRoot","getElementById","classList","add","options","querySelectorAll","forEach","option","remove","configChangedHandler","newVal","additionalFields","scheduler","additional_fields","newKeys","Object","keys","newTokens","key","description","updateEventTitleFromProp","selectedLanguageChangedHandler","oldVal","i18next","changeLanguage","titleTokens","$invitee","$invitee_email","$duration","t","themeConfigChangedHandler","applyThemeConfig","themeConfig","entries","style","setProperty","connectedCallback","componentWillLoad","componentDidLoad","updateEventTitle","disconnectedCallback","formSubmittedHandler","event","internals","validity","valid","valueChangedHandler","detail","JSON","parse","toString","titleRef","innerHTML","highlightTokens","setValidity","focus","customError","isInternalsAvailable","setFormValue","outputHtml","tokenObj","regex","RegExp","replace","getCurrentSelectionForBrowser","getSelectionTextData","nodeValue","offset","node","allSelected","text","dollarIndex","lastIndexOf","lastWord","substring","split","currentText","isAllSelected","selection","anchorOffset","focusNode","length","currentBrowser","getBrowser","shadowRootSelection","getSelection","focusNodeValue","document","anchorNodeValue","anchorNode","allSelectedFirefox","windowSelection","window","getComposedRanges","startContainer","allSelectedSafari","endOffset","console","warn","handleChange","textContent","target","sanitize","currentSelection","resetDropdown","startsWith","populateSuggestionsDropdown","handleInputKeyDown","isNonPrintableKey","preventDefault","click","nextOption","nextElementSibling","id","prevOption","previousElementSibling","parentNode","nodeName","removeChild","selectOption","e","word","dollarWord","currentNode","firstChild","textNode","nodeType","currentNodeText","wordText","includes","nextSibling","indexOf","textBefore","textAfter","newTextNode","createTextNode","newRange","createRange","tagSpan","createElement","newTextNodeAfter","replaceWith","setStart","afterNode","sel","collapse","removeAllRanges","addRange","query","filter","obj","noValue","test","valueChanged","emit","getLabelHTML","h","class","render","Host","part","htmlFor","error","ref","el","contentEditable","onInput","onKeyDown","tabindex","role","active","onClick","context","field","slot","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"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"],"mappings":"oOAAA,MAAMA,EAAqB,0uK,ugBCiCdC,EAAe,MAN5B,WAAAC,CAAAC,G,qNAoBUC,KAAUC,WAAYD,KAAKE,uBAAuBC,eAAeC,MAKjEJ,KAAIK,KAAW,QASfL,KAAWM,YAAY,MAUtBN,KAAUO,WAAY,MAItBP,KAAeQ,gBAAyDC,EAAiBC,KAAIC,IAA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5rIwb.js";import{R as l}from"./register-component-Blj8K64f.js";import{b as s,i as c}from"./utils-DhmCcrVs.js";const t=':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}.card-wrapper{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-wrapper{width:100%;border-radius:0px}}.header{overflow-wrap:anywhere;display:flex;flex-direction:column;font-size:16px;font-weight:400}.header h2{color:var(--nylas-base-900);font-size:24px;font-weight:600;text-align:left;margin:0}.description.title-desc{margin-bottom:2rem}.description.footer-desc{margin-top:2rem}.description.footer-desc a{color:var(--nylas-primary);text-decoration:none}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}';var f=undefined&&undefined.__decorate||function(e,a,o,r){var n=arguments.length,l=n<3?a:r===null?r=Object.getOwnPropertyDescriptor(a,o):r,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")l=Reflect.decorate(e,a,o,r);else for(var c=e.length-1;c>=0;c--)if(s=e[c])l=(n<3?s(l):n>3?s(a,o,l):s(a,o))||l;return n>3&&l&&Object.defineProperty(a,o,l),l};var d=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const b=class{constructor(o){e(this,o);this.feedbackModalClosed=a(this,"feedbackModalClosed",7);this.feedbackSubmitted=a(this,"feedbackSubmitted",7);this.triggerValidation=a(this,"triggerValidation",7);this.feedbackMessage="";this.handleConfirmBookingButtonClicked=()=>{const e=this.triggerValidation.emit();if(e.defaultPrevented){return}this.feedbackSubmitted.emit({feedback:this.feedbackMessage})}}connectedCallback(){}disconnectedCallback(){}async componentWillLoad(){s(`[nylas-feedback-form] Component will load`)}async componentDidLoad(){s(`[nylas-feedback-form] Component did load`);this.applyThemeConfig(this.themeConfig)}applyThemeConfig(e){if(e){for(const[a,o]of Object.entries(e)){this.host.style.setProperty(`${a}`,o)}}}handleFormInputChanged(e){s(`[nylas-feedback-form] Form input changed`);if(!e.detail.value){return}this.triggerValidation.emit();if(e.detail.name==="feedback"){this.feedbackMessage=e.detail.value}}closeModal(e){e.preventDefault();e.stopImmediatePropagation();this.feedbackModalClosed.emit()}render(){return o(r,{key:"c38ec3511d276bbe35d5c4edfdb217c93f9b7b82",part:"nfbf"},o("div",{key:"5d1d3f486c98145a2eaba865c0613d7923f32999",class:"card-wrapper",part:"nfbfc__card"},o("div",{key:"a01097285cf4747b3bc45bcb61d28cfbad5a46b1",class:"close-button"},o("button-component",{key:"f604c9d58ab899d2615fa2debd64aff0d9c891ee",tooltip:"Close",id:"close",variant:"invisible",onClick:e=>this.closeModal(e),part:"nfbf__close-button"},o("close-icon",{key:"cfa6fb051d552d3a7e52efcd23f2c7f3bc0b7670"}))),o("div",{key:"cd2e6308f5c2ec253725c06720819957ce419840",class:"header"},o("h2",{key:"75546ae8484e8aa1945fdec28fd4449880304ae9",slot:"card-title",part:"nfbf__title"},c.t("feedbackFormTitle"))),o("div",{key:"4ebf787a11dd54b131e3ca5a515c1a21700582b1",class:"description title-desc"},o("p",{key:"b521d1c47291bc8051abd357faa46e2c0c33ed3a"},c.t("feedbackFormDescription"))),o("textarea-component",{key:"c9a460e95830ccb8d14940d8e8ef54753afd4ed4",label:c.t("feedbackMessageLabel"),required:true,maxLength:500,part:"nfbf__description",name:"feedback",placeholder:c.t("feedbackMessagePlaceholder")}),o("div",{key:"fbea44a0c45b6d776fb39f2bcad65890cdb69284",class:"description footer-desc"},o("p",{key:"4e5803239ac7b30c2df978509b028e46399069b8"},"By sending this report, you agree to Nylas’ access to the data necessary to respond to this issue, subject to Nylas’"," ",o("a",{key:"dd82f8eaba60a48d68ed083e4b23dde8af1742a1",href:"https://www.nylas.com/privacy-policy/",target:"_blank",rel:"nofollow noreferrer noopener"},"Privacy Policy"),".")),o("div",{key:"2310fd242e9f64ccfff54f4d98cd94e422554bfd",class:{footer:true}},o("button-component",{key:"56100b0542a2989894cc6958ff57bf8e89db6e7b",variant:"invisible",onClick:e=>this.closeModal(e),part:"nfbf__button-outline nfbf__cancel-cta"},`${c.t("feedbackModalCloseButton")}`),o("button-component",{key:"047188bc13b0e5b458b08f890ca284f9a6bf5523",variant:"primary",onClick:this.handleConfirmBookingButtonClicked,part:"nfbf__button-outline nfbf__reschedule-cta"},`${c.t("feedbackModalSubmitButton")}`))))}get host(){return n(this)}};f([l({name:"nylas-feedback-form",stateToProps:new Map([]),eventToProps:{feedbackSubmitted:async(e,a)=>{}},localPropsToProp:new Map([["themeConfig","themeConfig"]]),fireRegisterEvent:true}),d("design:type",Function),d("design:paramtypes",[]),d("design:returntype",void 0)],b.prototype,"render",null);b.style=t;export{b as nylas_feedback_form};
|
|
2
2
|
//# sourceMappingURL=nylas-feedback-form.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nylas-form-card.entry.esm.js","sources":["src/components/scheduler-editor/nylas-form-card/nylas-form-card.scss?tag=nylas-form-card&encapsulation=
|
|
1
|
+
{"version":3,"file":"nylas-form-card.entry.esm.js","sources":["src/components/scheduler-editor/nylas-form-card/nylas-form-card.scss?tag=nylas-form-card&encapsulation=shadow","src/components/scheduler-editor/nylas-form-card/nylas-form-card.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-form-card {\n width: 100%;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n}\n.nylas-form-card__header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { checkForMissingSlots, debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Host, Prop, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { ThemeConfig } from '@nylas/core';\n\n/**\n * The `nylas-form-card` component is a card that can be used to display a form. It is a simple wrapper around a card with a header and content area.\n */\n@Component({\n tag: 'nylas-form-card',\n styleUrl: 'nylas-form-card.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasFormCard {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-event-card', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-card', 'componentWillLoad');\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-card', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-event-card', 'disconnectedCallback');\n const slots = ['header-title', 'header-subtitle', 'content'];\n checkForMissingSlots(slots, this.host);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @RegisterComponent<NylasFormCard, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-form-card',\n stateToProps: new Map([['schedulerConfig.themeConfig', 'themeConfig']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-form-card\" part=\"nfc\">\n <div class=\"nylas-form-card__header\" part=\"nfc__header\">\n <slot name=\"header-title\"></slot>\n <slot name=\"header-subtitle\"></slot>\n </div>\n <div class=\"nylas-form-card__content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;AAAA,MAAM,gBAAgB,GAAG,y2EAAy2E;;;;;;;;;;;;;;;;MCgBr3E,aAAa,GAAA,MAAA;;;;;;;;;;;IAWxB,yBAAyB,CAAC,MAAmB,EAAE,MAAmB,EAAA;QAChE,IAAI,MAAM,KAAK,MAAM;YAAE;AACvB,QAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;;IAG/B,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;;IAGhD,iBAAiB,GAAA;AACf,QAAA,KAAK,CAAC,kBAAkB,EAAE,mBAAmB,CAAC;AAC9C,QAAA,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC;;IAGzC,gBAAgB,GAAA;AACd,QAAA,KAAK,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;;IAG/C,oBAAoB,GAAA;AAClB,QAAA,KAAK,CAAC,kBAAkB,EAAE,sBAAsB,CAAC;QACjD,MAAM,KAAK,GAAG,CAAC,cAAc,EAAE,i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AACvE,QAAA,YAAY,EAAE,EAAE;AAChB,QAAA,iBAAiB,EAAE,IAAI;KACxB,CAAC;;;;CAeD,EAAA,aAAA,CAAA,SAAA,EAAA,QAAA,EAAA,IAAA,CAAA;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,h as a,d as l,e as r}from"./index-
|
|
1
|
+
import{r as e,h as a,d as l,e as r}from"./index-Cbn5rIwb.js";import{R as o}from"./register-component-Blj8K64f.js";import{b as n,I as s}from"./utils-DhmCcrVs.js";const c=':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-form-card{width:100%;border-radius:8px;border:1px solid var(--nylas-base-200)}.nylas-form-card__header{padding:1rem;border-bottom:1px solid var(--nylas-base-200)}';var f=undefined&&undefined.__decorate||function(e,a,l,r){var o=arguments.length,n=o<3?a:r===null?r=Object.getOwnPropertyDescriptor(a,l):r,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")n=Reflect.decorate(e,a,l,r);else for(var c=e.length-1;c>=0;c--)if(s=e[c])n=(o<3?s(n):o>3?s(a,l,n):s(a,l))||n;return o>3&&n&&Object.defineProperty(a,l,n),n};var y=undefined&&undefined.__metadata||function(e,a){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,a)};const d=class{constructor(a){e(this,a);if(a.$hostElement$["s-ei"]){this.internals=a.$hostElement$["s-ei"]}else{this.internals=a.$hostElement$.attachInternals();a.$hostElement$["s-ei"]=this.internals}}themeConfigChangedHandler(e,a){if(e===a)return;this.applyThemeConfig(e)}connectedCallback(){n("nylas-event-card","connectedCallback")}componentWillLoad(){n("nylas-event-card","componentWillLoad");this.applyThemeConfig(this.themeConfig)}componentDidLoad(){n("nylas-event-card","componentDidLoad")}disconnectedCallback(){n("nylas-event-card","disconnectedCallback");const e=["header-title","header-subtitle","content"];s(e,this.host)}applyThemeConfig(e){if(e){for(const[a,l]of Object.entries(e)){this.host.style.setProperty(`${a}`,l)}}}render(){return a(l,{key:"ccd7a9849ea5e8d424bb80a8aa4afd67dd28423a"},a("div",{key:"41064647cfca7ea4d08cdaab916b74ad7ed43ba4",class:"nylas-form-card",part:"nfc"},a("div",{key:"549e6b4daec030f2e76b4c1c870620094af9bc83",class:"nylas-form-card__header",part:"nfc__header"},a("slot",{key:"8d1b3e33f026cf806fe1a7c5e4c3b39c87468e16",name:"header-title"}),a("slot",{key:"81479dfa94fec4a3d8d9cd5c84249e7caf9f36b7",name:"header-subtitle"})),a("div",{key:"e81e8f141b8764a9f0917ffceeafc8879acd1284",class:"nylas-form-card__content"},a("slot",{key:"f076c6368d2f5771c4c8289af6460b33c845ba4f",name:"content"}))))}static get formAssociated(){return true}get host(){return r(this)}static get watchers(){return{themeConfig:["themeConfigChangedHandler"]}}};f([o({name:"nylas-form-card",stateToProps:new Map([["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:true}),y("design:type",Function),y("design:paramtypes",[]),y("design:returntype",void 0)],d.prototype,"render",null);d.style=c;export{d as nylas_form_card};
|
|
2
2
|
//# sourceMappingURL=nylas-form-card.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["nylasFormCardCss","NylasFormCard","themeConfigChangedHandler","newVal","oldVal","this","applyThemeConfig","connectedCallback","debug","componentWillLoad","componentDidLoad","disconnectedCallback","slots","checkForMissingSlots","host","
|
|
1
|
+
{"version":3,"names":["nylasFormCardCss","NylasFormCard","themeConfigChangedHandler","newVal","oldVal","this","applyThemeConfig","connectedCallback","debug","componentWillLoad","themeConfig","componentDidLoad","disconnectedCallback","slots","checkForMissingSlots","host","key","value","Object","entries","style","setProperty","render","h","Host","class","part","name","__decorate","RegisterComponent","stateToProps","Map","eventToProps","fireRegisterEvent","prototype"],"sources":["src/components/scheduler-editor/nylas-form-card/nylas-form-card.scss?tag=nylas-form-card&encapsulation=shadow","src/components/scheduler-editor/nylas-form-card/nylas-form-card.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-form-card {\n width: 100%;\n border-radius: 8px;\n border: 1px solid var(--nylas-base-200);\n}\n.nylas-form-card__header {\n padding: 1rem;\n border-bottom: 1px solid var(--nylas-base-200);\n}\n","import { RegisterComponent } from '@/common/register-component';\nimport { NylasSchedulerConfigConnector } from '@/connector/nylas-scheduler-config-connector';\nimport { checkForMissingSlots, debug } from '@/utils/utils';\nimport { AttachInternals, Component, Element, Host, Prop, Watch, h } from '@stencil/core';\nimport { NylasSchedulerEditor } from '../nylas-scheduler-editor/nylas-scheduler-editor';\nimport { ThemeConfig } from '@nylas/core';\n\n/**\n * The `nylas-form-card` component is a card that can be used to display a form. It is a simple wrapper around a card with a header and content area.\n */\n@Component({\n tag: 'nylas-form-card',\n styleUrl: 'nylas-form-card.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class NylasFormCard {\n @Element() host!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /**\n * @standalone\n * The theme configuration.\n */\n @Prop({ attribute: 'theme-config' }) readonly themeConfig?: ThemeConfig;\n\n @Watch('themeConfig')\n themeConfigChangedHandler(newVal: ThemeConfig, oldVal: ThemeConfig) {\n if (newVal === oldVal) return;\n this.applyThemeConfig(newVal);\n }\n\n connectedCallback() {\n debug('nylas-event-card', 'connectedCallback');\n }\n\n componentWillLoad() {\n debug('nylas-event-card', 'componentWillLoad');\n this.applyThemeConfig(this.themeConfig);\n }\n\n componentDidLoad() {\n debug('nylas-event-card', 'componentDidLoad');\n }\n\n disconnectedCallback() {\n debug('nylas-event-card', 'disconnectedCallback');\n const slots = ['header-title', 'header-subtitle', 'content'];\n checkForMissingSlots(slots, this.host);\n }\n\n applyThemeConfig(themeConfig?: ThemeConfig) {\n if (themeConfig) {\n for (const [key, value] of Object.entries(themeConfig)) {\n this.host.style.setProperty(`${key}`, value);\n }\n }\n }\n\n @RegisterComponent<NylasFormCard, NylasSchedulerConfigConnector, Exclude<NylasSchedulerEditor['stores'], undefined>>({\n name: 'nylas-form-card',\n stateToProps: new Map([['schedulerConfig.themeConfig', 'themeConfig']]),\n eventToProps: {},\n fireRegisterEvent: true,\n })\n render() {\n return (\n <Host>\n <div class=\"nylas-form-card\" part=\"nfc\">\n <div class=\"nylas-form-card__header\" part=\"nfc__header\">\n <slot name=\"header-title\"></slot>\n <slot name=\"header-subtitle\"></slot>\n </div>\n <div class=\"nylas-form-card__content\">\n <slot name=\"content\"></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"iKAAA,MAAMA,EAAmB,w2E,ugBCgBZC,EAAa,M,0LAWxB,yBAAAC,CAA0BC,EAAqBC,GAC7C,GAAID,IAAWC,EAAQ,OACvBC,KAAKC,iBAAiBH,E,CAGxB,iBAAAI,GACEC,EAAM,mBAAoB,oB,CAG5B,iBAAAC,GACED,EAAM,mBAAoB,qBAC1BH,KAAKC,iBAAiBD,KAAKK,Y,CAG7B,gBAAAC,GACEH,EAAM,mBAAoB,mB,CAG5B,oBAAAI,GACEJ,EAAM,mBAAoB,wBAC1B,MAAMK,EAAQ,CAAC,eAAgB,kBAAmB,WAClDC,EAAqBD,EAAOR,KAAKU,K,CAGnC,gBAAAT,CAAiBI,GACf,GAAIA,EAAa,CACf,IAAK,MAAOM,EAAKC,KAAUC,OAAOC,QAAQT,GAAc,CACtDL,KAAKU,KAAKK,MAAMC,YAAY,GAAGL,IAAOC,E,GAW5C,MAAAK,GACE,OACEC,EAACC,EAAI,CAAAR,IAAA,4CACHO,EAAA,OAAAP,IAAA,2CAAKS,MAAM,kBAAkBC,KAAK,OAChCH,EAAA,OAAAP,IAAA,2CAAKS,MAAM,0BAA0BC,KAAK,eACxCH,EAAM,QAAAP,IAAA,2CAAAW,KAAK,iBACXJ,EAAA,QAAAP,IAAA,2CAAMW,KAAK,qBAEbJ,EAAK,OAAAP,IAAA,2CAAAS,MAAM,4BACTF,EAAM,QAAAP,IAAA,2CAAAW,KAAK,c,6IATrBC,EAAA,CANCC,EAAoH,CACnHF,KAAM,kBACNG,aAAc,IAAIC,IAAI,CAAC,CAAC,8BAA+B,iBACvDC,aAAc,GACdC,kBAAmB,O,mFAgBpBhC,EAAAiC,UAAA,e","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,a as n,h as o,d as l,e as a}from"./index-
|
|
1
|
+
import{r as e,a as n,h as o,d as l,e as a}from"./index-Cbn5rIwb.js";import{R as s}from"./register-component-Blj8K64f.js";import{b as t,i as r}from"./utils-DhmCcrVs.js";const i=':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}.nylas-limit-future-bookings{display:flex;justify-content:space-between;font-family:var(--nylas-font-family)}@media screen and (max-width: 768px){.nylas-limit-future-bookings{flex-direction:column;gap:0.5rem}}.nylas-limit-future-bookings label{display:flex;align-items:center;color:var(--nylas-base-800);font-size:16px;font-style:normal;font-weight:400;line-height:150%;}.nylas-limit-future-bookings label span.label-icon{margin-left:4px}.nylas-limit-future-bookings label span.label-icon tooltip-component{display:flex}select-dropdown::part(sd_dropdown-button){border:none}';var c=undefined&&undefined.__decorate||function(e,n,o,l){var a=arguments.length,s=a<3?n:l===null?l=Object.getOwnPropertyDescriptor(n,o):l,t;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,n,o,l);else for(var r=e.length-1;r>=0;r--)if(t=e[r])s=(a<3?t(s):a>3?t(n,o,s):t(n,o))||s;return a>3&&s&&Object.defineProperty(n,o,s),s};var f=undefined&&undefined.__metadata||function(e,n){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,n)};const d=class{constructor(o){e(this,o);this.valueChanged=n(this,"valueChanged",7);if(o.$hostElement$["s-ei"]){this.internals=o.$hostElement$["s-ei"]}else{this.internals=o.$hostElement$.attachInternals();o.$hostElement$["s-ei"]=this.internals}this.name="limit-future-bookings"}elementNameChangedHandler(e){t("nylas-limit-future-bookings","elementNameChangedHandler",e);this.host.setAttribute("name",e)}selectedConfigurationChangedHandler(e){const n=e?.scheduler?.available_days_in_future||this.availableDaysInFuture||1;if(n){this.updateNumberAndPeriodFromDays(n)}if(typeof this.internals.setFormValue!=="function"){return}this.internals.setFormValue(n?.toString(),this.name)}selectedLanguageChangedHandler(e,n){if(e===n)return;r.changeLanguage(e)}themeConfigChangedHandler(e,n){if(e===n)return;this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[n,o]of Object.entries(e)){this.host.style.setProperty(`${n}`,o)}}}connectedCallback(){t("nylas-limit-future-bookings","connectedCallback")}componentWillLoad(){t("nylas-limit-future-bookings","componentWillLoad");this.host.setAttribute("name",this.name)}componentDidLoad(){t("nylas-limit-future-bookings","componentDidLoad");if(this.selectedConfiguration){this.selectedConfigurationChangedHandler(this.selectedConfiguration)}else{this.updateNumberAndPeriodFromDays(this.availableDaysInFuture||1)}}disconnectedCallback(){t("nylas-limit-future-bookings","disconnectedCallback")}timePeriodChangedHandler(e){const{number:n,period:o}=e.detail;let l;if(o==="day"){l=n}else if(o==="week"){l=n*7}else{l=n*30}this.valueChanged.emit({value:l,name:this.name});if(typeof this.internals.setFormValue!=="function"){return}this.internals.setFormValue(l.toString(),this.name)}updateNumberAndPeriodFromDays(e){let n,o;if(e>=30&&e%30===0){n=e/30;o="month"}else if(e>=7&&e%7===0){n=e/7;o="week"}else{n=e;o="day"}this.selectedNumber=n;this.selectedPeriod=o}render(){const e=typeof this.selectedNumber=="number"&&typeof this.selectedPeriod=="string";return o(l,{key:"c002724ed09de16e4d3838dce5d4e7d83c29a1ec"},o("div",{key:"3f30e43c21ee01936a1cd6c08fac8634d905e6a4",class:"nylas-limit-future-bookings",part:"nlfb"},o("label",{key:"14e2ca1d853b917f6a1590a61445c05c53e59dae"},r.t("nylasLimitFutureBookings.headerTitle"),o("span",{key:"fd77e05fd8147fde5b63e58b11c3700e53111824",class:"label-icon"},o("tooltip-component",{key:"282592d4b3ed796ae3a59a2e5a2787d97af97bd0"},o("info-icon",{key:"e65c8fc49a81168769b83ced4a7b0a45e153b1f4",slot:"tooltip-icon"}),o("span",{key:"9eb0bb6fb59d6c964729ce4e6ce7f435610676e7",slot:"tooltip-content"},r.t("nylasLimitFutureBookings.tooltip.desc"))))),e&&o("time-period-selector",{key:"e8d68207b8b298bb10ba93c214a57f4b3474d6f0",id:"limit-future-bookings",timePeriods:[{value:"day",label:r.t("timePeriod",{context:"day"})},{value:"week",label:r.t("timePeriod",{context:"week"})},{value:"month",label:r.t("timePeriod",{context:"month"})}],exportparts:"tps__number-dropdown: nlfb__number-dropdown, tps__number-dropdown-button: nlfb__number-dropdown-button, tps__number-dropdown-content: nlfb__number-dropdown-content, tps__period-dropdown: nlfb__period-dropdown, tps__period-dropdown-button: nlfb__period-dropdown-button, tps__period-dropdown-content: nlfb__period-dropdown-content",defaultSelectedNumber:this.selectedNumber,defaultSelectedPeriod:this.selectedPeriod,themeConfig:this.themeConfig})))}static get formAssociated(){return true}get host(){return a(this)}static get watchers(){return{name:["elementNameChangedHandler"],selectedConfiguration:["selectedConfigurationChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};c([s({name:"nylas-limit-future-bookings",stateToProps:new Map([["schedulerConfig.selectedConfiguration","selectedConfiguration"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),eventToProps:{},fireRegisterEvent:true}),f("design:type",Function),f("design:paramtypes",[]),f("design:returntype",void 0)],d.prototype,"render",null);d.style=i;export{d as nylas_limit_future_bookings};
|
|
2
2
|
//# sourceMappingURL=nylas-limit-future-bookings.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,a as t,h as n,d as a,e as o}from"./index-B-KMpdMZ.js";import{R as i}from"./register-component-BHk70oxk.js";import{i as s,b as r,y as l,g as c}from"./utils-Bj5Y75fX.js";import{n as d}from"./index.es-BRLyNGE1.js";import{C as f}from"./constants-DhnshuDN.js";import{E as u}from"./index-Cs6ndJrm.js";const h=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:var(--nylas-base-0);width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto;color:inherit}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}';var g=undefined&&undefined.__decorate||function(e,t,n,a){var o=arguments.length,i=o<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(s=e[r])i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i;return o>3&&i&&Object.defineProperty(t,n,i),i};var p=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const b=class{constructor(n){e(this,n);this.initListConfigurations=t(this,"initListConfigurations",7);this.createButtonClick=t(this,"createButtonClick",7);this.editButtonClick=t(this,"editButtonClick",7);this.deleteButtonClick=t(this,"deleteButtonClick",7);this.nylasSchedulerError=t(this,"nylasSchedulerError",6);this.dismissNotification=t(this,"dismissNotification",6);this.configurations=[];this.schedulerPreviewLink="";this.state="loading";this.error={message:"",type:d.Error,category:u.Component,title:""};this.currentCursor=null;this.previousCursors=[];this.disableNextPageButton=false;this.deleteConfigurationId="";this.showDeleteButtonLoading=false;this.editButtonLoadingId=""}listConfigurationsNextCursorChangedHandler(e,t){if(!e||e===t){if(e===null){this.disableNextPageButton=true}return}this.disableNextPageButton=false;this.currentCursor=e}selectedLanguageChangedHandler(e,t){if(e===t)return;s.changeLanguage(e)}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}connectedCallback(){r("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){r("[nylas-list-configurations]","componentWillLoad");if(this.configurations&&this.configurations.length>0){this.state="loaded"}}componentDidLoad(){r("[nylas-list-configurations]","componentDidLoad");this.initListConfigurations.emit({host:this.host})}disconnectedCallback(){r("[nylas-list-configurations]","disconnectedCallback")}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async handleNylasFormDropdownChanged(e){r("[nylas-list-configurations]","handleNylasFormDropdownChanged",e.detail);const{value:t}=e.detail;const[n,a]=t.split("-");e.preventDefault();switch(n){case"delete":this.deleteConfigurationId=this.configurations[a]?.id;break;case"preview":window.open(l(this.schedulerPreviewLink,this.configurations[a]),"_blank");break;case"copy":await navigator.clipboard.writeText(l(this.schedulerPreviewLink,this.configurations[a]));break;default:break}}async registerCallback(){this.initListConfigurations.emit({host:this.host})}async getState(){return this.state}async setState(e){this.state=e}async setError(e){this.error={message:e.message,type:e.type,category:e.category,title:e.title||s.t("genericErrorTitle")};if(this.error?.message){this.showErrorNotification(this.error)}}async hideDeleteConfirmation(){this.deleteConfigurationId="";this.showDeleteButtonLoading=false}async hideEditButtonLoading(){this.editButtonLoadingId=""}showErrorNotification(e){this.nylasSchedulerError.emit({notification:{id:e.message.split(" ").join("-"),type:e.type||d.Error,title:e.title,category:e.category||u.Component,description:e.message,ttl:"none"},host:this.host})}closeModal(e){e.preventDefault();this.deleteConfigurationId=""}handleConfirmDeleteButtonClicked(e){e.preventDefault();this.showDeleteButtonLoading=true;const t=this.configurations.find((e=>e.id===this.deleteConfigurationId));if(t&&t?.id){this.deleteButtonClick.emit({host:this.host,configuration:t})}}getDurationString(e){if(!e)return"—";const t=Math.floor(e/60);const n=e%60;return`${t?t:""} ${t?`${t>1?"hours":"hour"}`:""} ${n?n:""} ${n?`${n>1?"mins":"min"}`:""}`}getActionLabelHTML(e){const t={display:"inline-flex",alignItems:"center",gap:"0.5rem"};const a={color:"var(--nylas-error)"};switch(e){case"preview":return n("span",{style:t},n("eye-icon",{width:"16",height:"16"}),s.t("nylasListConfigurations.previewButtonText"));case"copy":return n("span",{style:t},n("copy-icon",{width:"16",height:"16"}),s.t("nylasListConfigurations.copyLinkButtonText"));case"delete":return n("span",{style:{...t,...a}},n("delete-icon",{width:"15",height:"17"}),s.t("nylasListConfigurations.deleteButtonText"));default:return""}}previousPageClickedHandler(){if(this.previousCursors.length===0)return;this.currentCursor=this.previousCursors.pop()||null;const e=this.previousCursors[this.previousCursors.length-1]||undefined;this.initListConfigurations.emit({host:this.host,cursor:e})}nextPageClickedHandler(){if(!this.currentCursor)return;this.previousCursors=[...this.previousCursors,this.currentCursor];this.initListConfigurations.emit({host:this.host,cursor:this.currentCursor})}render(){return n(a,null,n("nylas-notification",null),n("div",{class:"header"},n("div",{class:"description"},n("h2",null,s.t("allSchedulingPages")),n("p",null,s.t("createAndManageSchedulingPages"))),this.configurations&&this.configurations.length>0&&n("div",{class:"actions"},n("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},s.t("createNewSchedulingPageButtonText")))),n("div",{class:"configurations"},n("div",{class:"table-container"},n("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},n("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},n("th",null,s.t("pageTitle")),n("th",null,s.t("durationTitle")),n("th",null)),this.state==="loading"&&n("tr",{class:"no-configurations"},n("td",{colSpan:3},n("div",null,n("h3",null,s.t("loading"),"..."),n("p",null,s.t("loadingPagesDescription"))))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&n("tr",{class:"no-configurations"},n("td",{colSpan:3},n("div",null,n("calendar-icon",{width:"48",height:"48"}),n("h3",null,s.t("noSchedulingPages")),n("p",null,s.t("createFirstSchedulingPage")),n("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},s.t("createNewSchedulingPageButtonText"))))),this.state!=="loading"&&this.configurations?.map(((e,t)=>{const a=(t===this.configurations.length-1||t===this.configurations.length-2)&&this.configurations.length>3;const o=e;const i=e;return n("tr",{key:e?.id},n("td",null,n("div",{class:"title"},n("div",{class:"config-event-title",title:i?.event_booking?.title},i?.event_booking?.title||o?.name),n("div",{class:"config-event-description"},i?.event_booking?.description))),n("td",null,n("div",{class:"duration"},this.getDurationString(i?.availability?.duration_minutes))),n("td",null,n("div",{class:"actions"},n("button-component",{class:"edit-button",variant:"basic",key:`edit-${t}`,disabled:this.editButtonLoadingId===`edit-${t}`,isLoading:this.editButtonLoadingId===`edit-${t}`,clickHandler:n=>{n.preventDefault();this.editButtonLoadingId=`edit-${t}`;this.editButtonClick.emit({host:this.host,configuration:e})}},this.editButtonLoadingId===`edit-${t}`?null:n("edit-icon",{width:"16",height:"16"}),s.t("editSchedulingPageButtonText")),n("select-dropdown",{class:{last:a},name:"actions",options:[{value:`preview-${t}`,label:"Preview",labelHTML:this.getActionLabelHTML("preview")},{value:`copy-${t}`,label:"Copy link",labelHTML:this.getActionLabelHTML("copy")},{value:`delete-${t}`,label:"Delete",labelHTML:this.getActionLabelHTML("delete")}],defaultSelectedOption:{value:"",label:""},dropdownButtonText:"...",withSearch:false,withChevron:false,themeConfig:this.themeConfig,exportparts:"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"}))))})))),n("div",{class:"pagination"},n("button",{class:"arrow left",onClick:()=>this.previousPageClickedHandler(),disabled:this.previousCursors.length<=0},n("chevron-icon",null)),n("button",{class:"arrow right",onClick:()=>this.nextPageClickedHandler(),disabled:this.disableNextPageButton},n("chevron-icon",null)))),!!this.deleteConfigurationId&&n("div",{class:"card-wrapper"},n("div",{class:"card-modal"},n("div",{class:"close-button"},n("button-component",{tooltip:"Close",id:"close",variant:"invisible",onClick:e=>this.closeModal(e),part:"nfbf__close-button"},n("close-icon",null))),n("div",{class:"header"},n("h2",{slot:"card-title",part:"nfbf__title"},s.t("deleteSchedulingPageTitle"))),n("div",{class:"description title-desc"},n("p",null,s.t("deleteSchedulingPageDescription"))),n("div",{class:{footer:true}},n("button-component",{variant:"basic",onClick:e=>this.closeModal(e),part:"nfbf__button-outline nfbf__cancel-cta"},`${s.t("deleteSchedulingPageCancelButton")}`),n("button-component",{variant:"destructive",onClick:e=>this.handleConfirmDeleteButtonClicked(e),disabled:this.showDeleteButtonLoading,isLoading:this.showDeleteButtonLoading,part:"nfbf__button-outline nfbf__reschedule-cta"},`${s.t("deleteSchedulingPageConfirmButton")}`)))))}get host(){return o(this)}static get watchers(){return{listConfigurationsNextCursor:["listConfigurationsNextCursorChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};g([i({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"],["schedulerConfig.listConfigurationsNextCursor","listConfigurationsNextCursor"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(e,t)=>{const{host:n,cursor:a}=e.detail;await n.setState("loading");const[o,i]=await t.schedulerConfig.getConfigurations(a);if(!o&&i&&i.message){await n.setState("error");await n.setError({message:i.message,type:d.Error,category:u.Component,title:s.t("nylasEditorTabs.getConfigsError")});return}await n.setState("loaded")},createButtonClick:async(e,t)=>{t.schedulerConfigStore.resetSelectedConfiguration();const n=Object.entries(t.schedulerConfigStore.state.enableEventTypes||{}).filter((([e,t])=>t));if(n.length===1){t.schedulerConfigStore.state.action="create";t.schedulerConfigStore.state.selectedEventType=f[n[0][0]]}else{t.schedulerConfigStore.state.action="create-select"}},deleteButtonClick:async(e,t)=>{const{host:n,configuration:a}=e.detail;const[o,i]=await t.schedulerConfig.deleteConfiguration(a.id);if(!o&&i&&i.message){await n.setState("error");await n.setError({message:i.message,type:d.Error,category:u.Component,title:s.t("nylasEditorTabs.deleteConfigError")})}await n.hideDeleteConfirmation()},editButtonClick:async(e,t)=>{const{host:n,configuration:a}=e.detail;if(a.type==="group"){const{startTime:e,endTime:o}=c((new Date).toISOString(),"week");t.schedulerConfigStore.state.calendarViewDateRange={start_time:e.toString(),end_time:o.toString()};const[i,r]=await t.schedulerConfig.getGroupEvents(a.id,a);if(!i&&r&&r.message){await n.setError({message:r.message,type:d.Error,category:u.Component,title:s.t("nylasEditorTabsGroup.getGroupEventsError")});n.hideEditButtonLoading();return}}t.schedulerConfigStore.state.action="edit";t.schedulerConfigStore.state.selectedConfiguration=a;n.hideEditButtonLoading()}},fireRegisterEvent:true}),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",void 0)],b.prototype,"render",null);b.style=h;export{b as nylas_list_configurations};
|
|
1
|
+
import{r as e,a as t,h as n,d as a,e as o}from"./index-Cbn5rIwb.js";import{R as i}from"./register-component-Blj8K64f.js";import{i as s,b as r,y as l,g as c}from"./utils-DhmCcrVs.js";import{n as d}from"./index.es-BRLyNGE1.js";import{C as f}from"./constants-DhnshuDN.js";import{E as u}from"./index-Cs6ndJrm.js";const h=':host{display:grid;grid-auto-flow:row;width:100%;font-family:inherit;font-optical-sizing:auto;--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}.header{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;gap:1rem}@media screen and (max-width: 768px){.header{flex-direction:column;gap:0.5rem;align-items:unset}}.header h2{margin:0;font-size:1.25rem;color:var(--nylas-base-900);font-weight:600}.header p{margin:0;font-size:16px;color:var(--nylas-base-700)}.header .actions{justify-self:end}@media screen and (max-width: 768px){.header .actions{width:100%}}.configurations{border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);background:var(--nylas-base-0);height:100%;display:flex;flex-direction:column;position:relative;overflow-y:hidden}.configurations .table-container{overflow-y:auto;flex:1}@media screen and (max-width: 768px){.configurations .table-container{min-height:624px}}.configurations .table-container table{width:100%;border-spacing:0;border-collapse:collapse;font-family:inherit;height:max-content}.configurations .table-container table.no-configurations{height:100%}.configurations .table-container table tr{color:var(--nylas-base-800);border-bottom:1px solid var(--nylas-base-200);font-family:inherit}.configurations .table-container table tr.hide{display:none}.configurations .table-container table th{font-weight:600;text-transform:uppercase;font-size:14px;line-height:20px}.configurations .table-container table tr.no-configurations td>div{display:flex;height:100%;justify-content:center;align-items:center;flex-direction:column;padding:var(--nylas-border-radius-3x)}.configurations .table-container table tr.no-configurations td>div h3{margin:0 0 1rem 0;color:var(--nylas-base-700)}.configurations .table-container table tr.no-configurations td>div p{margin:0 0 1rem 0;color:var(--nylas-base-600)}.configurations .table-container table tr.no-configurations td>div calendar-icon{margin-bottom:1rem;color:var(--nylas-base-200)}.configurations .table-container table th,.configurations .table-container table td{text-align:left;padding:1rem;font-family:inherit}.configurations .table-container table .actions{display:flex;justify-content:flex-end;gap:1rem;text-align:right}.configurations .table-container table .actions button-component.edit-button{min-width:98px}@media screen and (max-width: 768px){.configurations .table-container table .actions{flex-direction:column;gap:0.5rem}}.configurations .table-container table .actions select-dropdown.last::part(sd_dropdown-content){bottom:54px}.configurations .table-container table .title{width:100%;max-width:300px}@media screen and (max-width: 768px){.configurations .table-container table .title{max-width:96px}}.configurations .table-container table .title div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.configurations .table-container table .title div.config-event-title{font-weight:600}.configurations .table-container table .title div.config-event-description{font-size:0.75rem}.configurations .pagination{padding:1rem;position:sticky;top:100%;display:flex;justify-content:flex-end;gap:0.5rem;background:var(--nylas-base-0);width:calc(100% - 2rem);z-index:2}.configurations .pagination td.arrows{display:flex;justify-content:flex-end;gap:0.5rem}.configurations .pagination button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background-color:transparent;color:var(--nylas-base-800);cursor:pointer}.configurations .pagination button:hover:not(:disabled){border:1px solid var(--nylas-primary)}.configurations .pagination button:active{border:1px solid var(--nylas-base-800)}.configurations .pagination button:disabled{border:1px solid var(--nylas-base-100);background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.configurations .pagination button.right{transform:rotate(180deg)}.error-container{margin-top:1.5rem}.error-container .error{color:var(--nylas-error);padding:0.5rem 0;margin:1rem 0 0}button-component#copy button{width:108px}select-dropdown{width:auto;color:inherit}select-dropdown::part(sd_dropdown-button){display:block;height:48px;padding:0px 16px 8px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button){width:92px}}select-dropdown::part(sd_dropdown-content){width:120px;right:0}select-dropdown::part(sd_dropdown-labelhtml){display:flex;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}select-dropdown::part(sd_dropdown-labelhtml):hover{color:var(--nylas-primary)}.card-wrapper{position:absolute;top:0;left:0;height:calc(100% + 4rem);width:-webkit-fill-available;width:-moz-available;width:fill-available;display:flex;flex-direction:column;justify-content:center;align-items:center;background:rgba(0, 0, 0, 0.6);z-index:2;border-radius:var(--nylas-border-radius-2x)}@media screen and (max-width: 768px){.card-wrapper{justify-content:start;height:100%}}.card-modal{background:var(--nylas-base-0);display:flex;flex-direction:column;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);padding:32px;width:562px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.card-modal{width:auto;border-radius:0px}}.description.title-desc{margin-bottom:2rem}.description p{margin:0;font-size:18px;color:var(--nylas-base-600)}.footer{margin-top:1rem;padding-top:1rem;display:flex;justify-content:flex-end;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.close-button{width:100%;display:flex;justify-content:flex-end}.close-button button-component button{padding:0;height:auto}.close-button button-component button:hover{background-color:transparent !important}button-component{--dot-color:var(--nylas-base-700)}';var g=undefined&&undefined.__decorate||function(e,t,n,a){var o=arguments.length,i=o<3?t:a===null?a=Object.getOwnPropertyDescriptor(t,n):a,s;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")i=Reflect.decorate(e,t,n,a);else for(var r=e.length-1;r>=0;r--)if(s=e[r])i=(o<3?s(i):o>3?s(t,n,i):s(t,n))||i;return o>3&&i&&Object.defineProperty(t,n,i),i};var p=undefined&&undefined.__metadata||function(e,t){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,t)};const b=class{constructor(n){e(this,n);this.initListConfigurations=t(this,"initListConfigurations",7);this.createButtonClick=t(this,"createButtonClick",7);this.editButtonClick=t(this,"editButtonClick",7);this.deleteButtonClick=t(this,"deleteButtonClick",7);this.nylasSchedulerError=t(this,"nylasSchedulerError",6);this.dismissNotification=t(this,"dismissNotification",6);this.configurations=[];this.schedulerPreviewLink="";this.state="loading";this.error={message:"",type:d.Error,category:u.Component,title:""};this.currentCursor=null;this.previousCursors=[];this.disableNextPageButton=false;this.deleteConfigurationId="";this.showDeleteButtonLoading=false;this.editButtonLoadingId=""}listConfigurationsNextCursorChangedHandler(e,t){if(!e||e===t){if(e===null){this.disableNextPageButton=true}return}this.disableNextPageButton=false;this.currentCursor=e}selectedLanguageChangedHandler(e,t){if(e===t)return;s.changeLanguage(e)}themeConfigChangedHandler(e,t){if(e===t)return;this.applyThemeConfig(e)}connectedCallback(){r("[nylas-list-configurations]","connectedCallback")}componentWillLoad(){r("[nylas-list-configurations]","componentWillLoad");if(this.configurations&&this.configurations.length>0){this.state="loaded"}}componentDidLoad(){r("[nylas-list-configurations]","componentDidLoad");this.initListConfigurations.emit({host:this.host})}disconnectedCallback(){r("[nylas-list-configurations]","disconnectedCallback")}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async handleNylasFormDropdownChanged(e){r("[nylas-list-configurations]","handleNylasFormDropdownChanged",e.detail);const{value:t}=e.detail;const[n,a]=t.split("-");e.preventDefault();switch(n){case"delete":this.deleteConfigurationId=this.configurations[a]?.id;break;case"preview":window.open(l(this.schedulerPreviewLink,this.configurations[a]),"_blank");break;case"copy":await navigator.clipboard.writeText(l(this.schedulerPreviewLink,this.configurations[a]));break;default:break}}async registerCallback(){this.initListConfigurations.emit({host:this.host})}async getState(){return this.state}async setState(e){this.state=e}async setError(e){this.error={message:e.message,type:e.type,category:e.category,title:e.title||s.t("genericErrorTitle")};if(this.error?.message){this.showErrorNotification(this.error)}}async hideDeleteConfirmation(){this.deleteConfigurationId="";this.showDeleteButtonLoading=false}async hideEditButtonLoading(){this.editButtonLoadingId=""}showErrorNotification(e){this.nylasSchedulerError.emit({notification:{id:e.message.split(" ").join("-"),type:e.type||d.Error,title:e.title,category:e.category||u.Component,description:e.message,ttl:"none"},host:this.host})}closeModal(e){e.preventDefault();this.deleteConfigurationId=""}handleConfirmDeleteButtonClicked(e){e.preventDefault();this.showDeleteButtonLoading=true;const t=this.configurations.find((e=>e.id===this.deleteConfigurationId));if(t&&t?.id){this.deleteButtonClick.emit({host:this.host,configuration:t})}}getDurationString(e){if(!e)return"—";const t=Math.floor(e/60);const n=e%60;return`${t?t:""} ${t?`${t>1?"hours":"hour"}`:""} ${n?n:""} ${n?`${n>1?"mins":"min"}`:""}`}getActionLabelHTML(e){const t={display:"inline-flex",alignItems:"center",gap:"0.5rem"};const a={color:"var(--nylas-error)"};switch(e){case"preview":return n("span",{style:t},n("eye-icon",{width:"16",height:"16"}),s.t("nylasListConfigurations.previewButtonText"));case"copy":return n("span",{style:t},n("copy-icon",{width:"16",height:"16"}),s.t("nylasListConfigurations.copyLinkButtonText"));case"delete":return n("span",{style:{...t,...a}},n("delete-icon",{width:"15",height:"17"}),s.t("nylasListConfigurations.deleteButtonText"));default:return""}}previousPageClickedHandler(){if(this.previousCursors.length===0)return;this.currentCursor=this.previousCursors.pop()||null;const e=this.previousCursors[this.previousCursors.length-1]||undefined;this.initListConfigurations.emit({host:this.host,cursor:e})}nextPageClickedHandler(){if(!this.currentCursor)return;this.previousCursors=[...this.previousCursors,this.currentCursor];this.initListConfigurations.emit({host:this.host,cursor:this.currentCursor})}render(){return n(a,null,n("nylas-notification",null),n("div",{class:"header"},n("div",{class:"description"},n("h2",null,s.t("allSchedulingPages")),n("p",null,s.t("createAndManageSchedulingPages"))),this.configurations&&this.configurations.length>0&&n("div",{class:"actions"},n("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},s.t("createNewSchedulingPageButtonText")))),n("div",{class:"configurations"},n("div",{class:"table-container"},n("table",{class:{"no-configurations":this.state!=="loading"&&(!this.configurations||this.configurations.length===0)}},n("tr",{class:{hide:this.state==="loading"||this.configurations&&this.configurations.length===0}},n("th",null,s.t("pageTitle")),n("th",null,s.t("durationTitle")),n("th",null)),this.state==="loading"&&n("tr",{class:"no-configurations"},n("td",{colSpan:3},n("div",null,n("h3",null,s.t("loading"),"..."),n("p",null,s.t("loadingPagesDescription"))))),this.state!=="loading"&&(!this.configurations||this.configurations.length===0)&&n("tr",{class:"no-configurations"},n("td",{colSpan:3},n("div",null,n("calendar-icon",{width:"48",height:"48"}),n("h3",null,s.t("noSchedulingPages")),n("p",null,s.t("createFirstSchedulingPage")),n("button-component",{part:"nlc__create-new-cta",clickHandler:()=>{this.createButtonClick.emit(this.host)}},s.t("createNewSchedulingPageButtonText"))))),this.state!=="loading"&&this.configurations?.map(((e,t)=>{const a=(t===this.configurations.length-1||t===this.configurations.length-2)&&this.configurations.length>3;const o=e;const i=e;return n("tr",{key:e?.id},n("td",null,n("div",{class:"title"},n("div",{class:"config-event-title",title:i?.event_booking?.title},i?.event_booking?.title||o?.name),n("div",{class:"config-event-description"},i?.event_booking?.description))),n("td",null,n("div",{class:"duration"},this.getDurationString(i?.availability?.duration_minutes))),n("td",null,n("div",{class:"actions"},n("button-component",{class:"edit-button",variant:"basic",key:`edit-${t}`,disabled:this.editButtonLoadingId===`edit-${t}`,isLoading:this.editButtonLoadingId===`edit-${t}`,clickHandler:n=>{n.preventDefault();this.editButtonLoadingId=`edit-${t}`;this.editButtonClick.emit({host:this.host,configuration:e})}},this.editButtonLoadingId===`edit-${t}`?null:n("edit-icon",{width:"16",height:"16"}),s.t("editSchedulingPageButtonText")),n("select-dropdown",{class:{last:a},name:"actions",options:[{value:`preview-${t}`,label:"Preview",labelHTML:this.getActionLabelHTML("preview")},{value:`copy-${t}`,label:"Copy link",labelHTML:this.getActionLabelHTML("copy")},{value:`delete-${t}`,label:"Delete",labelHTML:this.getActionLabelHTML("delete")}],defaultSelectedOption:{value:"",label:""},dropdownButtonText:"...",withSearch:false,withChevron:false,themeConfig:this.themeConfig,exportparts:"sd_dropdown: actions__dropdown, sd_dropdown-button: actions__dropdown-button, sd_dropdown-content: actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"}))))})))),n("div",{class:"pagination"},n("button",{class:"arrow left",onClick:()=>this.previousPageClickedHandler(),disabled:this.previousCursors.length<=0},n("chevron-icon",null)),n("button",{class:"arrow right",onClick:()=>this.nextPageClickedHandler(),disabled:this.disableNextPageButton},n("chevron-icon",null)))),!!this.deleteConfigurationId&&n("div",{class:"card-wrapper"},n("div",{class:"card-modal"},n("div",{class:"close-button"},n("button-component",{tooltip:"Close",id:"close",variant:"invisible",onClick:e=>this.closeModal(e),part:"nfbf__close-button"},n("close-icon",null))),n("div",{class:"header"},n("h2",{slot:"card-title",part:"nfbf__title"},s.t("deleteSchedulingPageTitle"))),n("div",{class:"description title-desc"},n("p",null,s.t("deleteSchedulingPageDescription"))),n("div",{class:{footer:true}},n("button-component",{variant:"basic",onClick:e=>this.closeModal(e),part:"nfbf__button-outline nfbf__cancel-cta"},`${s.t("deleteSchedulingPageCancelButton")}`),n("button-component",{variant:"destructive",onClick:e=>this.handleConfirmDeleteButtonClicked(e),disabled:this.showDeleteButtonLoading,isLoading:this.showDeleteButtonLoading,part:"nfbf__button-outline nfbf__reschedule-cta"},`${s.t("deleteSchedulingPageConfirmButton")}`)))))}get host(){return o(this)}static get watchers(){return{listConfigurationsNextCursor:["listConfigurationsNextCursorChangedHandler"],selectedLanguage:["selectedLanguageChangedHandler"],themeConfig:["themeConfigChangedHandler"]}}};g([i({name:"nylas-list-configurations",stateToProps:new Map([["schedulerConfig.configurations","configurations"],["schedulerConfig.listConfigurationsNextCursor","listConfigurationsNextCursor"],["schedulerConfig.selectedLanguage","selectedLanguage"],["schedulerConfig.themeConfig","themeConfig"]]),localPropsToProp:new Map([["schedulerPreviewLink","schedulerPreviewLink"]]),eventToProps:{initListConfigurations:async(e,t)=>{const{host:n,cursor:a}=e.detail;await n.setState("loading");const[o,i]=await t.schedulerConfig.getConfigurations(a);if(!o&&i&&i.message){await n.setState("error");await n.setError({message:i.message,type:d.Error,category:u.Component,title:s.t("nylasEditorTabs.getConfigsError")});return}await n.setState("loaded")},createButtonClick:async(e,t)=>{t.schedulerConfigStore.resetSelectedConfiguration();const n=Object.entries(t.schedulerConfigStore.state.enableEventTypes||{}).filter((([e,t])=>t));if(n.length===1){t.schedulerConfigStore.state.action="create";t.schedulerConfigStore.state.selectedEventType=f[n[0][0]]}else{t.schedulerConfigStore.state.action="create-select"}},deleteButtonClick:async(e,t)=>{const{host:n,configuration:a}=e.detail;const[o,i]=await t.schedulerConfig.deleteConfiguration(a.id);if(!o&&i&&i.message){await n.setState("error");await n.setError({message:i.message,type:d.Error,category:u.Component,title:s.t("nylasEditorTabs.deleteConfigError")})}await n.hideDeleteConfirmation()},editButtonClick:async(e,t)=>{const{host:n,configuration:a}=e.detail;if(a.type==="group"){const{startTime:e,endTime:o}=c((new Date).toISOString(),"week");t.schedulerConfigStore.state.calendarViewDateRange={start_time:e.toString(),end_time:o.toString()};const[i,r]=await t.schedulerConfig.getGroupEvents(a.id,a);if(!i&&r&&r.message){await n.setError({message:r.message,type:d.Error,category:u.Component,title:s.t("nylasEditorTabsGroup.getGroupEventsError")});n.hideEditButtonLoading();return}}t.schedulerConfigStore.state.action="edit";t.schedulerConfigStore.state.selectedConfiguration=a;n.hideEditButtonLoading()}},fireRegisterEvent:true}),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",void 0)],b.prototype,"render",null);b.style=h;export{b as nylas_list_configurations};
|
|
2
2
|
//# sourceMappingURL=nylas-list-configurations.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as e,a as n,h as a,d as o,e as l}from"./index-
|
|
1
|
+
import{r as e,a as n,h as a,d as o,e as l}from"./index-Cbn5rIwb.js";import{T as s,a as t}from"./constants-DhnshuDN.js";import{R as r}from"./register-component-Blj8K64f.js";import{i as c,b as d,A as i}from"./utils-DhmCcrVs.js";const f=':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-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}@media screen and (max-width: 768px){select-dropdown::part(sd_dropdown-button-selected-label){max-width:80px}select-dropdown::part(sd_dropdown-content){width:100%;max-width:none}}';var y=undefined&&undefined.__decorate||function(e,n,a,o){var l=arguments.length,s=l<3?n:o===null?o=Object.getOwnPropertyDescriptor(n,a):o,t;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")s=Reflect.decorate(e,n,a,o);else for(var r=e.length-1;r>=0;r--)if(t=e[r])s=(l<3?t(s):l>3?t(n,a,s):t(n,a))||s;return l>3&&s&&Object.defineProperty(n,a,s),s};var b=undefined&&undefined.__metadata||function(e,n){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(e,n)};const p=class{constructor(a){e(this,a);this.timezoneChanged=n(this,"timezoneChanged",7);this.languageChanged=n(this,"languageChanged",7);this.selectedTimezone=this.bookingInfo?.timezone||Intl.DateTimeFormat().resolvedOptions().timeZone;this.selectedLanguage=this.bookingInfo?.language||navigator.language;this.searchPlaceholder=c.t("search")}themeConfigChanged(e){this.applyThemeConfig(e)}bookingInfoChangedHandler(e){if(e&&e?.timezone){this.changeTimezone(e.timezone)}if(e&&e?.language){this.changeLanguage(e.language)}}connectedCallback(){}disconnectedCallback(){}componentWillLoad(){}componentDidLoad(){d(`[nylas-locale-switch] Component did load`);this.applyThemeConfig(this.themeConfig);if(this.bookingInfo&&this.bookingInfo?.timezone){this.changeTimezone(this.bookingInfo.timezone)}if(this.bookingInfo&&this.bookingInfo?.language){this.changeLanguage(this.bookingInfo.language)}}applyThemeConfig(e){if(e){for(const[n,a]of Object.entries(e)){this.host.style.setProperty(`${n}`,a);this.timezoneRef?.style.setProperty(`${n}`,a);this.languageRef?.style.setProperty(`${n}`,a)}}}changeTimezone(e){this.selectedTimezone=e;this.timezoneChanged.emit(e)}changeLanguage(e){this.selectedLanguage=e;c.changeLanguage(e);this.searchPlaceholder=c.t("search");this.languageChanged.emit(e)}nylasFormDropdownChangedHandler(e){const{name:n,value:a}=e.detail;if(n==="timezone"){this.changeTimezone(a)}else if(n==="language"){this.changeLanguage(a)}}getTimezoneLabelHTML(e){const n=i(e);return a("span",{class:"timezone-label",style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"-webkit-fill-available"}},s[e]," ",a("span",{class:"timezone-offset",style:{fontSize:"14px",fontWeight:"400",color:"var(--nylas-base-500)"}},n))}render(){const e=Object.keys(s).map((e=>({labelHTML:this.getTimezoneLabelHTML(e),label:s[e],value:e})));const n=Object.keys(t).map((e=>({label:t[e],value:e})));return a(o,{key:"78737c997f2a0c5d468acd8ddbbd508a1b21ddb8"},a("div",{key:"a5e885ff020b84f78a00acf8fdc93611e5022ae8",class:"nylas-locale-switch",part:"nls"},a("div",{key:"e97112be7f613acfbc17b7704622ede114d16ba1",class:{"select-wrapper":true,timezone:true},part:"nls__timezone"},a("select-dropdown",{key:"e92aebf787a136549915a8e6490d8fa569a97a88",name:"timezone",searchPlaceholder:this.searchPlaceholder,options:e,ref:e=>this.timezoneRef=e,defaultSelectedOption:e.find((e=>e.value==this.selectedTimezone)),exportparts:"sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label"},a("span",{key:"4790609a2bc2978aaee271a11dd88e5b6040e463",slot:"select-icon"},a("globe-icon",{key:"d46f5aea66b4102809ba8b3ac596de596d5d4c0e",width:"20",height:"20"})))),a("div",{key:"a2e5fed81989fa692c64750f9ddb6ce8103368f5",class:{"select-wrapper":true,language:true},part:"nls__language"},a("select-dropdown",{key:"cc64cbe39bbc75e5b833756ebdbb4a9bd21f7af1",name:"language",searchPlaceholder:this.searchPlaceholder,options:n,ref:e=>this.languageRef=e,defaultSelectedOption:n.find((e=>e.value==this.selectedLanguage)),exportparts:"sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label"},a("span",{key:"27bc18d97c4b78c058ec8fc95c8844c8b24a4f77",slot:"select-icon"},a("translate-icon",{key:"441f796c52e434452e1d027340c5952383fecafb",width:"20",height:"20"}))))))}get host(){return l(this)}static get watchers(){return{themeConfig:["themeConfigChanged"],bookingInfo:["bookingInfoChangedHandler"]}}};y([r({name:"nylas-locale-switch",stateToProps:new Map([["scheduler.selectedLanguage","selectedLanguage"],["scheduler.selectedTimezone","selectedTimezone"],["scheduler.bookingInfo","bookingInfo"],["scheduler.themeConfig","themeConfig"]]),eventToProps:{timezoneChanged:async(e,n)=>{d("nylas-locale-switch","timezoneChanged",e.detail);n.scheduler.selectTimezone(e.detail)},languageChanged:async(e,n)=>{d("nylas-locale-switch","languageChanged",e.detail);n.scheduler.selectLanguage(e.detail)}},fireRegisterEvent:true}),b("design:type",Function),b("design:paramtypes",[]),b("design:returntype",void 0)],p.prototype,"render",null);p.style=f;export{p as nylas_locale_switch};
|
|
2
2
|
//# sourceMappingURL=nylas-locale-switch.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as C,h as e}from"./index-
|
|
1
|
+
import{r as C,h as e}from"./index-Cbn5rIwb.js";const c=".sc-nylas-logo-h{display:flex}";const a=class{constructor(e){C(this,e);this.width="69";this.height="24"}render(){return e("svg",{key:"b70c10760a93bb46916d874d80267a392c725dee",width:this.width,height:this.height,viewBox:"0 0 69 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("g",{key:"f008d049fe6d86c5d88b5fbde597fd3ee56e3944","clip-path":"url(#clip0_455_3543)"},e("path",{key:"7c712e1b0a18950cf87a9fec93c3cf9c60641173",d:"M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z",fill:"currentColor"}),e("path",{key:"5e1e47c2be9e0ca9046cb7a72e55bdf6160d67fe",d:"M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z",fill:"currentColor"}),e("path",{key:"8be95a0a6a07af4e7469ac7920c61e05c1ada4f6",d:"M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z",fill:"currentColor"}),e("path",{key:"c6535c7c5fd74ea5c46c6017cf50b466ec2a20d6",d:"M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z",fill:"currentColor"}),e("path",{key:"6f70541ba3b10b30935ddc8dc60b887566241f52",d:"M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z",fill:"currentColor"}),e("path",{key:"529c75237d6fda97271553f2e8afff20b680c8fc",d:"M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z",fill:"currentColor"}),e("path",{key:"717b2afc0555b55e35a77e9b6b74b21cb2377e6a",d:"M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z",fill:"currentColor"}),e("path",{key:"7e8a91a2c00e55a810d7f37963064ea1f79ca2db",d:"M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z",fill:"currentColor"})),e("defs",{key:"40b1463db352c32de2bec67e8bd32aaeff26425e"},e("clipPath",{key:"581184c88902333c71c3e31a92660dea9d804be7",id:"clip0_455_3543"},e("rect",{key:"c4fe7e01666eb9059c3fb6af61158ca1b3c46066",width:"68.7123",height:"19.2877",fill:"white",transform:"translate(0.144043 0.356201)"}))))}};a.style=c;export{a as nylas_logo};
|
|
2
2
|
//# sourceMappingURL=nylas-logo.entry.js.map
|