open-index/open-npm huggingface dataset:
npm package: @iapps/d2-dashboard
Description: This library was generated with [Nx](https://nx.dev). DHIS2 Dashboard is angular library that support dashboard visualization both using default dashboard APIs or custom dashboard managed from datastore. It is intended to get incorporated in any DHIS2 ang
Latest version: 1.0.28

# DHIS2 Dashboard library

This library was generated with [Nx](https://nx.dev).
DHIS2 Dashboard is angular library that support dashboard visualization both using default dashboard APIs or custom dashboard managed from datastore. It is intended to get incorporated in any DHIS2 angular application where dashboard is to be one of application page

## Installation

`npm install @iapps/d2-dashboard`

## Usage

Import dashboard module in the root module of your application

```ts
import { D2DashboardModule } from '@iapps/d2-dashboard';

...
...

 @NgModule({
  declarations: [AppComponent],
  imports: [
    ...
    ...
    D2DashboardModule.forRoot({
      useDataStore: true,
      dataStoreNamespace: 'datastore-dashboard',
      rootUrl: 'dashboard',
      selectionConfig: {
        allowSelectionOnStartUp: false,
        startUpPeriodType: 'Monthly',
        periodConfig: { openFuturePeriods: 1, allowDateRangeSelection: false },
      },
    }),
    ...
  ],
  providers: [],
  bootstrap: [AppComponent],
})

export class AppModule {}
```

Then, you can use dashboard module as a lazy loaded route

```ts
 {
    path: 'dashboard',
    loadChildren: () =>
      import('@iapps/d2-dashboard').then((m) => m.D2DashboardModule),
  }
```
npm package: @iapps/d2-web-sdk
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 1.1.14

# d2-web-sdk

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build d2-web-sdk` to build the library.

## Running unit tests

Run `nx test d2-web-sdk` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @iapps/dhis2-dashboard
Description: This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
Latest version: 0.0.16

# Dhis2Dashboard

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.

## Using the library

To use the library, put this in your component

```
<div class="dashboard-container">
  <lib-dhis2-dashboard></lib-dhis2-dashboard>
</div>

```

## Code scaffolding

Run `ng generate component component-name --project dhis2-dashboard` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project dhis2-dashboard`.

> Note: Don't forget to add `--project dhis2-dashboard` or else it will be added to the default project in your `angular.json` file.

## Build

Run `ng build dhis2-dashboard` to build the project. The build artifacts will be stored in the `dist/` directory.

## Publishing

After building your library with `ng build dhis2-dashboard`, go to the dist folder `cd dist/dhis2-dashboard` and run `npm publish`.

## Running unit tests

Run `ng test dhis2-dashboard` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
npm package: @iapps/dhis2-program-rule-engine
Description: This library was generated with [Nx](https://nx.dev).
Latest version: 1.0.0-alpha.9

# program-rule-engine

This library was generated with [Nx](https://nx.dev).

## Building

Run `nx build program-rule-engine` to build the library.

## Running unit tests

Run `nx test program-rule-engine` to execute the unit tests via [Jest](https://jestjs.io).
npm package: @iapps/hris-menu
Description: Menu module for hris applications based on angular 8+
Latest version: 1.0.0-alpha.8.1

# HRIS Menu

Menu module for hris applications based on angular 8+

## installation

`npm install @iapps/hris-menu --save`

## Usage

If the module is to be imported in the app.module, then import as

import { HrisMenuModule } from '@iapps/ngx-hris-menu';

then add this in the imports

```typescript
imports: [
...
HrisMenuModule,
...
]
```

> Note: Menu component make a use of animations from angular, in this case you have to import BrowserAnimationsModule in app.module.ts

`import { BrowserAnimationsModule } from '@angular/platform-browser/animations'`;

```typescript
imports: [
...
BrowserAnimationsModule,
...
]
```

Once imported, menu can be called in as

`<hris-menu></hris-menu>`
npm package: @iapps/ng-dhis2-shell
Description: `ng-dhis2-shell` is an angular based library that provide a DHIS2 shell (DHIS2 Header bar, loading, login model etc) on angular application when building DHIS2 based applications. The library wraps [@dhis2/app-shell](https://www.npmjs.com/package/@dhis2/a
Latest version: 1.0.9

# ng-dhis2-shell

`ng-dhis2-shell` is an angular based library that provide a DHIS2 shell (DHIS2 Header bar, loading, login model etc) on angular application when building DHIS2 based applications. The library wraps [@dhis2/app-shell](https://www.npmjs.com/package/@dhis2/app-shell) which is based on react library.

## Installation

To add `ng-dhis2-shell` , run

`ng add @iapps/ng-dhis2-shell`

The ng add command will perform the following actions:

- Add project dependencies to package.json
- Add AppShellModule imports in `app.module.ts`
- Rewrite the `app.component.ts` file by adding wrapper to `dhis2 shell` component
- Add `manifest.webapp` in the workspace, this is file is needed when building application for installation in DHIS2 instance (You will need to manually add reference of this file in `angular.json` unders assets to have this available during building of application. This will be done automatically in later versions)
- Update `tsconfig.json` file to add relevant properties to allow running react code in angular

## Development environment

For better development experience, add `proxy-config.json` file in your workspace

```json
{
  "/api": {
    "target": "https://play.dhis2.org/40.2.0/",
    "secure": false,
    "auth": "admin:district",
    "changeOrigin": true
  },
  "/dhis-web-commons": {
    "target": "https://play.dhis2.org/40.2.0/",
    "secure": false,
    "auth": "admin:district",
    "changeOrigin": true
  },
  "/icons": {
    "target": "https://play.dhis2.org/40.2.0/",
    "secure": false,
    "auth": "admin:district",
    "changeOrigin": true
  }
}
```
npm package: @iapps/ng-dhis2-ui
Description: An angular wrapper library that provide access to the react based DHIS2 UI components in angular applications running in DHIS2 platform
Latest version: 1.2.154

# ng-dhis2-ui

An angular wrapper library that provide access to the react based DHIS2 UI components in angular applications running in DHIS2 platform

## Library installation

`npm install @iapps/ng-dhis2-ui`

This library wraps most of react based DHIS2 libraries. Following packages should be installed

<!-- TODO: List of dependencies -->

For HTTP request, the library has used [NgxDhis2HttpClient](https://www.npmjs.com/package/@iapps/ngx-dhis2-http-client). Please follow the instructions on how to install and configure

**NOTE**: Under the hood the library uses react library, hence you will need to modify some your `tsconfig.json` under compilerOptions with the following

```javascript
  ........
  "compilerOptions": {
    "rootDir": ".",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "importHelpers": true,
    "target": "es2015",
    "module": "esnext",
    "jsx": "react",
    "esModuleInterop": true,
    "lib": ["es2020", "dom"],
    "skipLibCheck": true,
    "skipDefaultLibCheck": true,
    "baseUrl": ".",
    "paths": {
      "@iapps/ng-dhis2-ui": ["ng-dhis2-ui/src/index.ts"]
    }
  },
  ......
```

## Local development

If you want to collaborate to the codebase, to run the codebase locally;

1. Clone the source code

`git clone https://github.com/udsm-dhis2-lab/ng-dhis2-ui.git`

2. Install all needed dependencies

`npm install` or `yarn install`

**NOTE**: Sometimes npm installation may failed due to mismatch in resolving package version dependencies. If you are using npm then run `npm install --legacy-peer-deps` to ensure all packages regardless of unmatched dependencies are getting installed. This may however break the code if the packages dependencies are incompatible

3. You will be required to set up a proxy config file named `proxy-config.json`. You can simply copy `proxy-config.example.json` and modify your access credentials to DHIS2 instances to run the demo application.

4. To run the demo app, in order to view and test the components `nx serve demo`

## Deployment

- To build, run `npm run build:dhis2-ui`
- To pack, run `npm run pack:dhis2-ui`
- To publish to npm, run`npm run publish:dhis2-ui`. But you will be required to have access to `@iapps` npm namespace and have already logged in under your terminal. Run `npm login` to login with your terminal
npm package: @iapps/ngx-dhis2-custom-forms-entry
Description: This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.5.
Latest version: 0.0.4

# DHIS2 Form Rendering Library

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.3.5.

## Installing the library/package

`npm i @josephatj/ngx-dhis2-custom-forms-entry`

## Importing/using the library

`<ngx-dhis2-custom-forms-entry [htmlCustomForm]="htmlCustomForm" [dataElements]="dataElements" [formType]="formType" [elementsDataValues]="elementsDataValues" (onCustomFormInputChange)="detailsOfTheChangedValue($event)" [statusUpdateOnDomElement]="statusesArr" > </ngx-dhis2-custom-forms-entry>`

- htmlCustomForm: String of html
npm package: @iapps/ngx-dhis2-data-validation
Description: This library, validate data in a dhis2 instance using the available validation rules. To use the library go to `using the NgxDhis2DataValidation libray`.
Latest version: 2.0.0-alpha.2

# NgxDhis2DataValidation

This library, validate data in a dhis2 instance using the available validation rules. To use the library go to `using the NgxDhis2DataValidation libray`.

## Using the NgxDhis2DataValidation library

To use the library use pass required properties as follows

```
........
<ngx-data-validation
      [indicator]="indicator"
      [validationRules]="validationRules"
      [dataElements]="dataElements"
      [parentOu]="parentOu"
      [childrenOus]="childrenOus"
      [period]="period"
      [dateDictionary]="dateDictionary"
      [indicatorDataElements]="indicatorDataElements"
      [validationPeriods]="analyticsPeriods"
      [marginTopViolation]="marginTopViolation"
      [violationBgrColor]="violationBgrColor"
      [discrepancyBgrColor]="discrepancyBgrColor"
      [successBgrColor]="successBgrColor"
      [currentValidationPeriod]="currentValidationPeriod"
    ></ngx-data-validation>
    .......
```

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
npm package: @iapps/ngx-dhis2-dictionary
Description: Angular based DHIS2 library for telling a story of metadata eg indicator
Latest version: 2.1.0

# NGX DHIS2 Dictionary

Angular based DHIS2 library for telling a story of metadata eg indicator

## Using the library

To use the library, put this in your component

```
<div class="dictionary-block">
        <ngx-dhis2-dictionary-list
          [metadataIdentifiers]="metadataIdentifiers"
          [selectedItem]="selectedItem"
          [dictionaryConfig]="dictionaryConfig"
          (dictionaryItemId)="dictionaryItemId($event)"
          (metadataInfo)="metadataInfo($event)"
          (metadataGroupsInfo)="metadataGroupsInfo($event)"
        ></ngx-dhis2-dictionary-list>
</div>
```

Where metadataIdentifiers are DHIS2 metadata ids you want to get e.g ["ssasdawqwrw","wiweuwejfq"].

dictionaryConfig is

```
        {
                showAllBlock: true,
        }
```

Selected item can be passed or not, if passed should be one of the metadata ids you want to be selected by default

dictionaryItem outputs the url with format "ids/selected/selectedId"

metadataInfo is an output object with the format below

```{
        type: "indicator",
        data: [array of loaded metadata]
   }
```

      for type 'indicator' you get indicator and for type 'programIndicator' you get program indicators

metadataGroupsInfo is an out put for indicator or programIndicator groups.

````[
        {
                id: "groupIdentifier",
                name: "Name",
                metadataTypeKey: "[{"id": "indentifier"}]"
        }

  ]```
  metadataTypeKey can be "indicators" or "programIndicators"

Currently supported ones are indicators, program indicators, data sets, data elements and functions
````
npm package: @iapps/ngx-dhis2-menu
Description: Menu module for dhis2 applications based on angular 6
Latest version: 1.0.11-beta.9

# DHIS2 Menu

Menu module for dhis2 applications based on angular 6

## installation

`npm install @iapps/ngx-dhis2-menu`

## Usage

If the module is to be imported in the app.module, then import as

`import { NgxDhis2MenuModule } from '@iapps/ngx-dhis2-menu';`

then add this in the imports

```
imports: [
    ...
    NgxDhis2MenuModule,
    ...
    ]
```

Note: Menu component make a use of animations from angular, in this case you have to import BrowserAnimationsModule in app.module.ts

`import { BrowserAnimationsModule } from '@angular/platform-browser/animations';`

```
imports: [
 ...
 BrowserAnimationsModule,
 ...
]
```

Once imported, menu can be called in as

```
<ngx-dhis2-menu></ngx-dhis2-menu>
```
npm package: @iapps/ngx-dhis2-table
Description: Angular 4 module with components and services for drawing tables for dhis2 apps
Latest version: 1.0.0

# Table Module for DHIS2

Angular 4 module with components and services for drawing tables for dhis2 apps

# Installation

This module assumes that the angular app is created using [angular cli](https://cli.angular.io/).

To use this module add it as git submodule on your working directory (app directory for ng2/4 project) as follows:

`git submodule add git@github.com:hisptz/table-module.git src/app/table`

# Using Submodules

In order to fill in the submodule’s path with the files from the external repository, you must first initialize the submodules and then update them.

`git submodule init`

`git submodule update`

For more about git submodules click [here](https://chrisjean.com/git-submodules-adding-using-removing-and-updating/)

# Using table module

In order to use chart module, import the module in your app.module.ts file as follows;

```
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    TableModule //Module for dhis2 table module
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
``` 

# Components

This module have two externally available components

1. Table list component (this accepts array of chart Layers)

2. Table item component (this accepts analytics object and chart configuration)

# Using table list component

This component can be used as follows

```
<app-table-list
    [visualizationLayers]="visualizationLayers"
  >
  </app-table-list>
    
```

where visualizationLayers is an array with settings and analytics object .i.e.

```
[ { 
    settings: object,
    analytics: object //with dhis analytics structure (<2.25)
    layout: object
  }
    ]
```

# Using table item component

This component can be used as follows

```
<app-table-item
      [analyticsObject]="tableLayer.analyticsObject"
      [tableConfiguration]="tableLayer.tableConfiguration"
    >
    </app-table-item>

```