open-index/open-npm huggingface dataset:
npm package: @kogito-tooling/boxed-expression-component
Description: The Boxed Expression editor component provides the possibility to edit the decision logic for decisions and BKMs nodes.
Latest version: 0.16.0

# Boxed Expression Editor

This editor provides the possibility to edit the expression related to a Decision Node, or to a Business Knowledge Model's function.

## Static deployed showcase

[There](https://cutt.ly/boxed-expression-editor) you can access to the static deployed version of the showcase application for this editor. It will be manually updated as soon as new features will be added.

## Structure

The main component is `src/components/BoxedExpressionEditor/BoxedExpressionEditor.tsx`.
It represents the entry point for using the editor.

In the `showcase` folder, there is a tiny React application, which represent the Proof Of Value about how it is possible to integrate the `BoxedExpressionEditor` component inside another existing application.

Once the showcase application gets launched, you can see on the right side of the page the JSON that is actually produced for the corresponding selected logic type.
Such JSON represents the model data that must be adopted to initialize the `BoxedExpressionEditor` component, by populating its props.

The retrieval of the updated expression is performed by making usage of global functions, belonging to `beeApi` object, that must be available in the `Window` namespace and used by the `BoxedExpressionEditor` component.
All exposed function expected to exist, are defined in `src/api/BoxedExpressionEditor.ts`.

Consider that the showcase app is able to display the most updated JSON representing an expression, because uses such APIs (please refer to `showcase/src/index.tsx`).

## Scripts

In the main project (where the components actually live), it is possible to execute, from the root folder, the following scripts (`yarn` is recommended):

```sh
# Collect and build dependencies
yarn

# Remove 'dist' folder (such script is automatically called when the build is executed)
yarn prebuild

# Build a production-ready artifact to be deployed
yarn build:prod

# Execute all tests
yarn test

# Trigger static code analysis
yarn lint

# Trigger type checking
yarn type-check

# Perform all the three checks above (tests, lint and type checking)
yarn quality-checks
```

In the showcase project, these scripts are available:

```sh
# Start a local server to see the 'BoxedExpressionEditor' in action
yarn start
# Compiles a production ready showcase application
yarn build
# Run cypress 'BoxedExpressionEditor' tests
yarn test:it
```
npm package: @kogito-tooling/i18n
Description: This package provides a type-safe i18n library for a Typescript project.
Latest version: 0.11.0

# Kogito Tooling i18n

This package provides a type-safe i18n library for a Typescript project.

## Install

Can be installed with `yarn` or `npm`:

- `yarn add @kogito-tooling/i18n`
- `npm install @kogito-tooling/i18n`

## Usage

The library is separated into two submodules:

- core
  All core functionalities, which includes the types, and the I18n class.
  to use the core:
  `import * as I18nCore from "@kogito-tooling/i18n/dist/core"`
- react-components

  All components and types necessaries to integrate on your React project.

  to use the React components:
  `import * as I18nReact from "@kogito-tooling/i18n/dist/react-components"`

## Examples

- [Typescript](examples/typescript.md)
- [React](examples/react.md)

## Core

### Class

The core class `I18n` is under the `core` submodule "@kogito-tooling/i18n/dist/core".

- Constructor

```
defaults: I18nDefaults<D>
dictionaries: I18nDictionaries<D>
initialLocale?: string
```

_If no `initialLocale` is provide the default locale will be used as `initialLocale`_

- Available Methods

```
// Get the current locale
getLocale(): string

// Get the current dictionary
getCurrent(): D

// Set a new locale
setLocale(locale: string): void
```

### Types

- `ReferenceDictionary<D>`
  The type of the default dictionary

- `TranslatedDictionary<D>`
  The type of any other dictionary that isn't the default.

- `I18nDefaults<D>`
  The type of the default configs to be used on the `I18nDictionariesProvider` component or `I18n` class.

```ts
interface I18nDefaults<D extends ReferenceDictionary<D>> {
  locale: string; // current locale
  dictionary: D; // default dictionary
}
```

- `I18nDictionaries<D>`
  The type of the dictionaries to be used on the `I18nDictionariesProvider` component or `I18n` class.

```ts
type I18nDictionaries<D extends ReferenceDictionary<D>> = Map<string, TranslatedDictionary<D>>;
```

## React

### Components

- `<I18nDictionariesProvider>`
  Provides your implementation of `I18nContextType`

- `<I18nHtml>` Renders a string with HTML tags

_Be aware: the `<I18nHtml>` component uses the `dangerouslySetInnerHTML` prop._

### Types

- `I18nContextType<D>`
  The context type use by `<I18nDictionaryProvider>`, provides an object with the following properties:

```ts
interface I18nContextType<D extends ReferenceDictionary<D>> {
  locale: string; // current locale
  setLocale: React.Dispatch<string>; // a function to set the desired locale
  i18n: D; // Dictionary
}
```
npm package: @kogito-tooling/import-java-classes-component
Description: This component import Java classes as DMN data types
Latest version: 0.16.0

# Import Java Classes component

This editor provides the possibility to edit the expression related to a Decision Node, or to a Business Knowledge Model's function.

## Static deployed showcase

[There](https://yesamer.github.io/import-java-classes/) you can access to the static deployed version of the showcase application for this editor. It will be manually updated as soon as new features will be added.

## Structure

In the `showcase` folder, there is a tiny React application, which represent the Proof Of Value about how it is possible to integrate the `ImportJavaClasses` component inside another existing application.

## Scripts

In the main project (where the components actually live), it is possible to execute, from the root folder, the following scripts (`yarn` is recommended):

```sh
# Collect and build dependencies
yarn

# Remove 'dist' folder (such script is automatically called when the build is executed)
yarn prebuild

# Build a production-ready artifact to be deployed
yarn build

# Execute all tests
yarn test

# Trigger static code analysis
yarn lint

# Trigger type checking
yarn type-check

# Perform all the three checks above (tests, lint and type checking)
yarn quality-checks
```

In the showcase project, only two scripts are available:

```sh
# Start a local server to see the 'ImportJavaClasses' in action
yarn start
# Compiles a production ready showcase application
yarn build
```

Furthermore, there are cypress tests for the showcase project, however they are not automated yet. You can run them as:

```sh
# Start a local server to see the 'ImportJavaClasses' in action
yarn start
# Wait until app is running and execute tests
yarn cypress run
```
npm package: @kogito-tooling/notifications
Description: This package provides a type-safe Notifications library for a Typescript project.
Latest version: 0.11.0

# Kogito Tooling Notifications

This package provides a type-safe Notifications library for a Typescript project.

## Install

Can be installed with `yarn` or `npm`:

- `yarn add @kogito-tooling/notifications`
- `npm install @kogito-tooling/notifications`

## Usage

The library is separated into two submodules:

- api
  All the APIs and the main classes needed are in this submodule.

  to use the core:

  - `import { NotificationsApi } from "@kogito-tooling/notifications/dist/api"`
  - `import { Notification } from "@kogito-tooling/notifications/dist/api"`
  - `import { NotificationSeverity } from "@kogito-tooling/notifications/dist/api"`
  - `import { NotificationType } from "@kogito-tooling/notifications/dist/api"`

- vscode

  All the classes needed to use in vscode channel implementation

  to use the vscode classes:

  ```ts
  import { VsCodeNotificationsApi } from "@kogito-tooling/i18n/dist/react-components";

  const api: NotificationsApi = new VsCodeNotificationsApi(workspaceApi, i18n);
  ```

## API

NotificationsApi main attributes:

- messages: The text that will be shown to the user
- path: File location.
- severity: `"INFO" | "WARNING" | "ERROR" | "SUCCESS" | "HINT"`
- type: `"PROBLEM" | "ALERT"`

### VS Code

The VsCodeNotificationsApi is the only "public" class users have access. Under the hood it contains two different implementations depending on `Notification.type`.

So if:

- `Notifications.type === "PROBLEM"` The notifications are going to be shown in Problems Tab.
- `Notifications.type === "ALERT"` The notifications are going to be shown as Popups.

If, for some reason, there is not type, the default is `PROBLEM`

In both cases path is mandatory and it will let the user to open the file where those notifications come from.

`Notification.severity` also depends on `Notification.type`, if:

- `PROBLEM`, the supported severities are `"INFO" | "WARNING" | "ERROR" | "SUCCESS" | "HINT"`. `SUCCESS` converts to `INFO` which is the default severity.
- `ALERT`, the supported severities are `"ERROR" | "WARNING" | "INFO"`. Any other types defaults to `INFO`
npm package: @kogito-tooling/pmml-editor
Description: The code within this package is for a PMML Scorecard editor.
Latest version: 0.16.0

## **THIS IS A WORK IN PROGRESS**

The code within this package is for a PMML Scorecard editor.

It is considered a prototype.

Code herein is subject to change without notice.

Nothing should be considered concrete at this point.

In order to run the development webapp:

`yarn start`
npm package: @kogito-tooling/vscode-java-code-completion-extension-plugin
Description: ## Installation
Latest version: 0.16.0

# VSCode Java Code Completion Extension Plugin

## Installation

This project extends the JDT.LS by providing an extension point for `org.eclipse.jdt.ls.core.delegateCommandHandler`.

This project is built using [Eclipse Tycho](https://www.eclipse.org/tycho/) and requires at least [maven 3.0](http://maven.apache.org/download.html) to be built via CLI.

Simply run :

    mvn install

The first run will take quite a while since maven will download all the required dependencies in order to build everything.

## Usage

Once compiled you need to copy the generated JAR in a folder inside the extension, and you need to configure that location path in _contributes_ section in pacakge.json

```json
"contributes": {
    "javaExtensions": [
      "./server/vscode-java-code-completion-extension-plugin.jar"
    ],
    ...
}
```

and you also need `redhat.java` as extension dependency:

```json
 "extensionDependencies": [
    "redhat.java"
  ]
```

Once done that, the Language Server will automatically recognize the new plugin.