# @advanced-rest-client/events

> A library adding navigation events definitions to Advanced REST Client

Latest version **0.2.33** (published 2023-01-30) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @advanced-rest-client/events
pnpm add @advanced-rest-client/events
yarn add @advanced-rest-client/events
bun add @advanced-rest-client/events
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.33 |
| Published | 2023-01-30 |
| First published | 2021-10-18 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 532.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Pawel Uchida-Psztyc |
| Maintainers | jarrodek, twoplustwoone, lbauret, carowright |

## Links

- npm: https://www.npmjs.com/package/@advanced-rest-client/events
- Repository: https://github.com/advanced-rest-client/events
- Homepage: https://github.com/advanced-rest-client/events#readme
- Issues: https://github.com/advanced-rest-client/events/issues
- npm.io page: https://npm.io/package/@advanced-rest-client/events

## Recent versions

- 0.2.33 (latest) — 2023-01-30
- 18.0.3 — 2022-10-19
- 18.0.2 — 2022-05-20
- 18.0.1 — 2022-05-20
- 18.0.0 — 2021-11-12
- 0.2.32 — 2021-11-12
- 0.2.31 — 2021-11-09
- 0.2.30 — 2021-11-09
- 0.2.29 — 2021-11-05
- 0.2.28 — 2021-11-02
- 0.2.27 — 2021-10-29
- 0.2.26 — 2021-10-28
- 0.2.25 — 2021-10-28
- 0.2.24 — 2021-10-28
- 0.2.23 — 2021-10-28
- … 1 more at https://npm.io/package/@advanced-rest-client/events/versions

## README

# Advanced REST Client events

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.

[![Published on NPM](https://img.shields.io/npm/v/@advanced-rest-client/events.svg)](https://www.npmjs.com/package/@advanced-rest-client/events)

[![tests](https://github.com/advanced-rest-client/events/actions/workflows/deployment.yml/badge.svg)](https://github.com/advanced-rest-client/events/actions/workflows/deployment.yml)

## Usage

### Installation

```sh
npm install --save @advanced-rest-client/events
```

### ARC request navigate event

Dispatched to navigate to a request screen and open a request

```js
import { ARCNavigationEvent } from '@advanced-rest-client/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.

```js
import { ARCNavigationEvent } from '@advanced-rest-client/events';

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

### Project navigate event

Dispatched to navigate to an ARC project screen.

```js
import { ARCNavigationEvent } from '@advanced-rest-client/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.

```js
import { ARCNavigationEvent } from '@advanced-rest-client/events';

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

## Development

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

### Running the tests

```sh
npm test
```

---
_Source: https://npm.io/package/@advanced-rest-client/events · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
