JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1031
  • Score
    100M100P100Q113241F
  • License Apache-2.0

A library adding navigation events definitions to Advanced REST Client

Package Exports

  • @advanced-rest-client/arc-events

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@advanced-rest-client/arc-events) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Published on NPM

Build Status

arc-events

A library adding events definitions to Advanced REST Client. Use this library when building a component that triggers the navigation via DOM events.

Usage

Installation

npm install --save @advanced-rest-client/arc-events

ARC request navigate event

Dispatched to navigate to a request screen and open a request

import { ARCNavigationEvent } from '@advanced-rest-client/arc-navigation-events';

ARCNavigationEvent.navigateRequest(document.body, 'request id', 'saved');

REST API navigate event

Dispatched to navigate to a REST API either as the API Console or to project metadata screen.

import { ARCNavigationEvent } from '@advanced-rest-client/arc-navigation-events';

ARCNavigationEvent.navigateRestApi(document.body, 'api id', '1.0.0', 'documentation or detail');

Project navigate event

Dispatched to navigate to an ARC project screen.

import { ARCNavigationEvent } from '@advanced-rest-client/arc-navigation-events';

ARCNavigationEvent.navigateProject(document.body, 'project id', 'detail');

Other navigation events

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/arc-navigation-events';

ARCNavigationEvent.navigate(document.body, 'request', {
  // route params.
});

Development

git clone https://github.com/advanced-rest-client/arc-events
cd arc-events
npm install

Running the tests

npm test