A library adding events and type definitions to Advanced REST Client. Use this library when building a component that triggers the navigation via DOM events.
This package at some point will be merged with @api-client/core
and matched with the new architecture.
npm install --save @advanced-rest-client/events
Dispatched to navigate to a request screen and open a request
import { ARCNavigationEvent } from '@advanced-rest-client/events';
ARCNavigationEvent.navigateRequest(document.body, 'request id', 'saved');
Dispatched to navigate to a REST API either as the API Console or to project metadata screen.
import { ARCNavigationEvent } from '@advanced-rest-client/events';
ARCNavigationEvent.navigateRestApi(document.body, 'api id', '1.0.0', 'documentation or detail');
Dispatched to navigate to an ARC project screen.
import { ARCNavigationEvent } from '@advanced-rest-client/events';
ARCNavigationEvent.navigateProject(document.body, 'project id', 'detail');
Other events are dispatched via ARCNavigationEvent.navigate()
helper function as a general purpose navigation event.
It contains the base route and optional route options.
import { ARCNavigationEvent } from '@advanced-rest-client/events';
ARCNavigationEvent.navigate(document.body, 'request', {
// route params.
});
git clone https://github.com/advanced-rest-client/events
cd events
npm install
npm test