Scheduler Editor Components

nylas-scheduler-editor

Overview

The nylas-scheduler-editor component is a form that allows users to configure the settings for the Nylas Scheduler.

Version1.1.0-canary.14
Install (React)npm install @nylas/react
Import (React)import { NylasSchedulerEditor } from '@nylas/react';

Example


Properties

PropertyAttributeDescriptionTypeDefault
configurationIdconfiguration-id* The configuration id to use for the scheduler editor. If provided, then the scheduler editor will try and fetch the configuration with the provided id. If found, it will automatically load the editor with the configuration settings for editing.string | undefinedundefined
defaultAuthArgsThe default authentication arguments to use when authenticating a user.AuthArgs[] | undefinedundefined
defaultSchedulerConfigStateThe default scheduler config store state. Used to set the initial state of the scheduler config store. This state can be used to pass defaults to newly created configurations.undefined | { selectedConfiguration?: RecursivePartial<Configuration> | undefined; configurations?: Configuration[] | undefined; calendars?: Calendar[] | undefined; currentUser?: User | null | undefined; action?: "create" | "edit" | null | undefined; }undefined
eventOverridesThis provides a way to override the default event handlers.Partial<{ valueChanged: (event: CustomEvent<{ value: string[]; name: string; valueChangedHandler?: ((event: CustomEvent<{ value: string[]; name: string; }>) => void) | undefined; } | { value: string; name: string; valueChanged?: ((event: CustomEvent<{ value: string; name: string; }>) => void) | undefined; } | { value: string; name: string; } | { value: string; name: string; } | { value: string; name: string; } | { value: { openHours: OpenHours[]; timezone: string; }; name: string; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; formSubmitted: (event: CustomEvent<void>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; schedulerConfigChanged: (event: CustomEvent<SchedulerEventDetail>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; cancelButtonClick: (event: CustomEvent<void>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; previewButtonClicked: (event: CustomEvent<HTMLNylasEditorTabsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; initListConfigurations: (event: CustomEvent<HTMLNylasListConfigurationsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; createButtonClick: (event: CustomEvent<HTMLNylasListConfigurationsElement>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; editButtonClick: (event: CustomEvent<{ host: HTMLNylasListConfigurationsElement; configuration: Configuration; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; deleteButtonClick: (event: CustomEvent<{ host: HTMLNylasListConfigurationsElement; configuration: Configuration; }>, connector?: NylasSchedulerConnectorInterface | undefined) => Promise<void>; }> & EventOverride<NylasSchedulerConfigConnectorInterface>{}
modemodeThis is used to set the mode for the scheduler config. The mode can be ‘app’ or ‘composable’. The default mode is ‘app’."app" | "composable"'app'
nylasApiRequestThe Nylas Api Request instance. Used to make requests to the Nylas API.NylasApiRequest | undefinedundefined
nylasSessionsConfigThe Nylas Sessions configuration. Used to configure the Nylas Sessions instance.Config | undefinedundefined
schedulerPreviewLinkscheduler-preview-linkThe scheduler preview link to use when the user clicks on the preview button. You can use the placeholder {config.id} to replace the configuration id anywhere in the link.string''

Events

EventDescriptionType
initThis event is fired when the provider is initialized. By default, this event handles determining if the user is logged in or not. In addition, it fetches the provided configuration if a valid configuration id is provided.CustomEvent<HTMLNylasSchedulerEditorElement>
loggedInThis event is fired when the the NylasAuth isAuthenticated state changes to true.CustomEvent<HTMLNylasSchedulerEditorElement>
loggedOutThis event is fired when the the NylasAuth isAuthenticated state changes to false.CustomEvent<HTMLNylasSchedulerEditorElement>
schedulerConfigCloseClickedThis event is fired when the close button on scheduler config is clicked.CustomEvent<HTMLNylasSchedulerEditorElement>

Methods

schedulerConnector() => Promise<NylasSchedulerConfigConnector | undefined>

This method is used to get the NylasSchedulerConfigConnector instance. You can use this instance to make requests to the Nylas API.

Returns

Type: Promise<NylasSchedulerConfigConnector | undefined>

Promise<NylasSchedulerConfigConnector | undefined>

store() => Promise<NylasSchedulerConfigStoreType | undefined>

This method is used to get the NylasSchedulerConfigStore instance. You can use this instance to update or get the state of the store.

Returns

Type: Promise<CreateNylasSchedulerConfigStoreReturnType | undefined>

Promise<NylasSchedulerConfigStoreType | undefined>

Slots

SlotDescription
"login-required"This slot is used to display a message when the user is not logged in.

Shadow Parts

PartDescription
"nse__close-button"
"nse__header"
"nse__title"

Graph


Built with StencilJS