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.
Version | 1.1.0-canary.14 |
Install (React) | npm install @nylas/react |
Import (React) | import { NylasSchedulerEditor } from '@nylas/react'; |
Example
Properties
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
configurationId | configuration-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 | undefined | undefined |
defaultAuthArgs | — | The default authentication arguments to use when authenticating a user. | AuthArgs[] | undefined | undefined |
defaultSchedulerConfigState | — | The 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 |
eventOverrides | — | This 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> | {} |
mode | mode | This 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' |
nylasApiRequest | — | The Nylas Api Request instance. Used to make requests to the Nylas API. | NylasApiRequest | undefined | undefined |
nylasSessionsConfig | — | The Nylas Sessions configuration. Used to configure the Nylas Sessions instance. | Config | undefined | undefined |
schedulerPreviewLink | scheduler-preview-link | The 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
Event | Description | Type |
---|---|---|
init | This 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> |
loggedIn | This event is fired when the the NylasAuth isAuthenticated state changes to true. | CustomEvent<HTMLNylasSchedulerEditorElement> |
loggedOut | This event is fired when the the NylasAuth isAuthenticated state changes to false. | CustomEvent<HTMLNylasSchedulerEditorElement> |
schedulerConfigCloseClicked | This 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
Slot | Description |
---|---|
"login-required" | This slot is used to display a message when the user is not logged in. |
Shadow Parts
Part | Description |
---|---|
"nse__close-button" | |
"nse__header" | |
"nse__title" |
Graph
Built with StencilJS