open-index/open-npm huggingface dataset:
npm package: @k3imagine/item-search
Description: To implement the item-search module into an Angular project, you will need to:
Latest version: 1.2.11

# ItemSearch

To implement the item-search module into an Angular project, you will need to:

Install

    To install the package,  run: npm i @k3imagine/item-search

Setup:

    Include the library in your module

    import { NgModule } from '@angular/core';
    import { BrowserModule } from '@angular/platform-browser';
    import { ItemSearchModule } from '@k3imagine/item-search';  // <-- import it
    import { AppComponent } from './app.component';

    @NgModule({
    declarations: [AppComponent],
    imports: [BrowserModule, ItemSearchModule], // <-- and include it
    bootstrap: [AppComponent],
    })
    export class MyAppModule {}

Usage:

    <lib-item-search
        #itemSearch
        mode="quantity"        
        [title]="The title of the popup"
        [confirmButtonText]="add / close button"
        [useMockDataWheninDev]="true"
        (onCloseModal)="closeItemsSearch($event)">
    </lib-item-search>


    The property 'useMockDataWheninDev' only comes into effect when running in
    dev mode. If set to 'true', mock data will be used. If its set to 'false',
    then you can use the gateway running locally to return the data.

# InterCompany ItemSearch
    InterCompany fetches the cost prices from the intercompany price list.
    To enable send the following properties in <lib-item-search> tag.

    [transferPriceType]="transferDetail.transferType"
    [fromShopId]="transferDetail.fromShopId"
    [toShopId]="transferDetail.toShopId"

    The transferPriceType would be 1 from the following enum:
    export enum TransferPriceTypeEnum {
        priceFromItemCost = 0,
        priceFromPriceList = 1  //Use InterCompany Price
    }


# Master Item Select

Usage:

    <lib-master-item-select
        [showPopup]="showPopup"
        [title]="The title of the popup"
        [confirmButtonText]="add / close button"
        [useMockDataWheninDev]="false"
        (onCloseModal)="closeItemsSearch($event)"
    > </lib-master-item-select>


    To show the popup just set the boolean [showPopup] = true
    NOTE: You should always set the 'showPopup' property back to false via the 
    (onCloseModal) event.

    The model that is passed back via the (onCloseModal) event is a number array 
    of masterItemId's e.g [1,2,3,4].
    If the form is cancelled then we pass back null.
npm package: @k3imagine/self-serve-components
Description: [![Build](https://github.com/K3Imagine/SelfServeComponents/actions/workflows/build.yaml/badge.svg)](https://github.com/K3Imagine/SelfServeComponents/actions/workflows/build.yaml)
Author: palaogn
Latest version: 0.1.145

# Self Serve Components
[![Build](https://github.com/K3Imagine/SelfServeComponents/actions/workflows/build.yaml/badge.svg)](https://github.com/K3Imagine/SelfServeComponents/actions/workflows/build.yaml)


This repository holds React components that are shared across Self Serve projects.

## Create NPM account

Before you start development of the components, you need to create an account on NPM.

1. Go to the [npm](https://npmjs.com) website and create an account.
2. Create an access token for your user (go to user profile).
3. Create an environment variable on your machine and expose the token: `NPM_TOKEN = <your_access_token>`.
4. Get access to the **k3imagine** organzation (ask Team Lead or Admin).

## Running the project

```bash
npm install
npm run dev
```

## Creating a new component

### Create a new component

Create a new react component under `src/components/{Basic|Structure}/{component-name}`

### Expose component in index.tsx

Add
import {component-name} from './components/{Basic|Structure}/{component-name}/{component-name}';
and export it from there.

### Write stories for the new component

We write stories for our components as a way to document them.
If suitable we write a 'default' story that contains only required props.
For each event we use the storybook Action addon.
If a component contains many props to manipulate the component we can use the Knobs addon.

## Using the components in our projects

### Install

```bash
npm i @k3imagine/self-serve-components
```

### Usage

```tsx
import React from 'react';

import { MyComponent } from '@k3imagine/self-serve-components';

class Example extends React.Component {
  render() {
    return <MyComponent />;
  }
}
```
npm package: @k3imagine/sidebar-navigation
Description: To implement the sidebar navigation module into an Angular project, you will need to: 1. Run `npm i @k3imagine/sidebar-navigation`, the package can be found here: https://www.npmjs.com/package/@k3imagine/sidebar-navigation 2. `import { NavigationLibModu
Latest version: 15.2.10

## Imagine Sidebar Navigation Module

To implement the sidebar navigation module into an Angular project, you will need to:
1. Run `npm i @k3imagine/sidebar-navigation`, the package can be found here: https://www.npmjs.com/package/@k3imagine/sidebar-navigation
2. `import { NavigationLibModule } from '@k3imagine/sidebar-navigation';` in the app.module.ts and the imports of the NgModule.

3. `import 'CUSTOM_ELEMENTS_SCHEMA';` into the app.module.ts if it isn't already there.
`schemas: [CUSTOM_ELEMENTS_SCHEMA]`,

4. Call the component's HTML tag in the app.component.html file, with your `<router-outlet>` in between the `<sidebar-navigation>` tags and pass in values from your UI's environment variables, this allows the navigation library to make module calls to the correct gateway. As each UI's environment variables are set-up differently, the sidebar expects the apiRequestUrl and the portalUrl from the env.
For the portalUrl I'd suggest only setting it if in a production environment. This ensures that the sidebar will remain on localhost and not route you to the module via the portal. 

>     this.sidebarEnvironment = {
>     portalUrl: env.portalUrl,
>     apiRequestUrl: `${env.apiRequestUrl}api/v${env.apiVersion}`
>     };

>     <sidebar-navigation  [environment]="sidebarEnvironment" (selectedRoute)="routeToItem($event)">
>     <router-outlet></router-outlet>
>     </sidebar-navigation>

You will also need to include a routing function in the consuming module UI, this enables us to use each project's internal routers and router guards by passing back the selectedItem when the current module matches the selectedItem's parent module.

>     public routeToItem(selectedItem) {
>       this.zone.run(() => this.router.navigate([selectedItem.url]));
>     }

5. Optionally, you can include `useCustomPage="true"` which will remove the existing page-container and page-body wrappers which set margins and padding.

6. In your angular.json, you need to configure the input of the library's assets as so:

> { "glob": "**/*", "input":
> "./node_modules/@k3imagine/sidebar-navigation/lib/assets", "output":
> "/assets/" } 

When passing in the environment variables, you can set the apiVersion to `TEST` in order to have a sidebar populated with mock data for immediate testing purposes.

## Local Development
When adding new sidebar sidebarEntries/children, you will still need to configure the module UI's internal routing and components as normal, but also be sure to add the destination into your mock node server's date - this will allow you to see it on the sidebar and navigate to/from the new route.

Adding this new item to the module call will require a migration.

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.2.4.
npm package: @k3n-labs/time-utils
Description: <!-- START doctoc generated TOC please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Latest version: 0.0.1

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

**Table of Contents**

- [time-utils](#time-utils)
  - [Running unit tests](#running-unit-tests)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# time-utils

Time helper utilities

## Running unit tests

Run `nx test time-utils` to execute the unit tests via [Jest](https://jestjs.io).