# @atlassianlabs/jql-editor-connect

> JQL Editor pre-integrated with autocomplete REST API's suitable for use in Connect apps.

Latest version **1.1.0** (published 2023-06-02) · 0 weekly downloads

## Install

```sh
npm install @atlassianlabs/jql-editor-connect
pnpm add @atlassianlabs/jql-editor-connect
yarn add @atlassianlabs/jql-editor-connect
bun add @atlassianlabs/jql-editor-connect
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2023-06-02 |
| First published | 2021-12-10 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 34.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Atlassian Pty Ltd |
| Maintainers | doklovic, prkb, crumley, nrundquist, dkolbly-atlassian, kpainter-atl, soneymathew |

## Links

- npm: https://www.npmjs.com/package/@atlassianlabs/jql-editor-connect
- Repository: https://bitbucket.org/atlassian/atlassian-frontend
- Homepage: https://bitbucket.org/atlassian/atlassian-frontend#readme
- Issues: https://bitbucket.org/atlassian/atlassian-frontend/issues
- npm.io page: https://npm.io/package/@atlassianlabs/jql-editor-connect

## Dependencies (4)

- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.0.0
- [react-magnetic-di](https://npm.io/package/react-magnetic-di.md) ^2.2.6
- [@atlassianlabs/jql-editor](https://npm.io/package/@atlassianlabs/jql-editor.md) ^2.0.0
- [@atlassianlabs/jql-editor-autocomplete-rest](https://npm.io/package/@atlassianlabs/jql-editor-autocomplete-rest.md) ^1.1.0

## Recent versions

- 1.1.0 (latest) — 2023-06-02
- 1.0.2 — 2022-09-26
- 1.0.1 — 2022-08-10
- 1.0.0 — 2022-02-21
- 0.0.3 — 2021-12-17
- 0.0.2 — 2021-12-17
- 0.0.1 — 2021-12-10

## README

# JQL Editor for Connect 

[![Atlassian license](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat-square)](LICENSE)

This package allows Connect app developers to render a JQL Editor component to enable autocomplete-assisted authoring 
and validation of JQL queries. The component is pre-configured to fetch autocomplete data from Jira REST API's.

## Usage

A minimal configuration of the JQL editor is as follows:

```typescript jsx
import { useCallback } from 'react';
import { JQLEditorConnect } from '@atlassianlabs/jql-editor-connect';

const MyJQLEditor = () => {
  const onSearch = useCallback((jql: string) => {
    // Do some action on search    
  }, []);
  
  return (
    <JQLEditorConnect
      query={''}
      onSearch={onSearch}
      locale={"en"} 
    />
  );
};
```

## Installation

```sh
yarn add @atlassianlabs/jql-editor-connect
```

## Documentation

`JQLEditorConnect` is a thin wrapper on top of the `@atlassianlabs/jql-editor` package. Refer to the [JQL editor
documentation](https://www.npmjs.com/package/@atlassianlabs/jql-editor) to see what other configuration options are
available.

### Connect scopes

The JQL editor uses [Jira Cloud REST API's](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-jql/)
to fetch autocomplete data which requires the `READ` scope in your app descriptor. For example:

```json
{
    "baseUrl": "http://my-app.com",
    "key": "atlassian-connect-app",
    "scopes": ["read"],
    "modules": {}
}
```

### What's missing?

This package does not yet support the same feature set available to the JQL editor used in Jira. The key exclusions are:
1. User lozenges
   * The API's required to translate Atlassian account ID's to user display names is not yet available to third parties.
2. Simplified loading of localised messages
   * Currently, to show non-english messages, consumers need to import the appropriate message set for the user's locale 
   and render an `IntlProvider` in the React tree with the imported data. In the long term we'd like these localised 
   messages to be loaded automatically based on the provided `locale`.

We intend to make these features available to third party apps in future but there is currently no roadmap/timeline for
inclusion.

## Support

For developers outside of Atlassian looking for help, or to report issues, [please make a post on the community forum](https://community.developer.atlassian.com/c/atlassian-ecosystem-design).
We will monitor the forums and redirect topics to the appropriate maintainers.

## License
Copyright (c) 2021 - 2022 Atlassian and others. Apache 2.0 licensed, see [LICENSE](LICENSE) file.

---
_Source: https://npm.io/package/@atlassianlabs/jql-editor-connect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
