Socket
Socket
Sign inDemoInstall

@next-level-integration/inputs

Package Overview
Dependencies
66
Maintainers
11
Versions
191
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @next-level-integration/inputs

Input angular components collection


Version published
Weekly downloads
161
increased by7950%
Maintainers
11
Created
Weekly downloads
 

Readme

Source

@next-level-integration/inputs

Install:
npm install @next-level-integration/inputs
Peer Requirements:
npm install angular2-text-mask --save
Importing:
import { NliInputsModule } from '@next-level-integration/inputs';
Add this to the styles:
.nli-primary {
color: mat-color($primary-color) !important;
}
.nli-accent {
color: mat-color($accent-color) !important;
}
.nli-warn {
color: mat-color($warn-color) !important;
}
.nli-primary-bg {
background-color: mat-color($primary-color) !important;
}
.nli-accent-bg {
background-color: mat-color($accent-color) !important;
}
.nli-warn-bg {
background-color: mat-color($warn-color) !important;
}
.nli-primary-border {
border-color: mat-color($primary-color) !important;
border-top-color: mat-color($primary-color) !important;
border-bottom-color: mat-color($primary-color) !important;
border-left-color: mat-color($primary-color) !important;
border-right-color: mat-color($primary-color) !important;
}
.nli-accent-border {
border-color: mat-color($accent-color) !important;
border-top-color: mat-color($accent-color) !important;
border-bottom-color: mat-color($accent-color) !important;
border-left-color: mat-color($accent-color) !important;
border-right-color: mat-color($accent-color) !important;
}
.nli-warn-border {
border-color: mat-color($warn-color) !important;
border-top-color: mat-color($warn-color) !important;
border-bottom-color: mat-color($warn-color) !important;
border-left-color: mat-color($warn-color) !important;
border-right-color: mat-color($warn-color) !important;
}

Usage (text)

HTML
<nli-text name="username"
[formControl]="loginForm.controls['username']"
inputLabel="Username"
inputClass="sample-input"
errorMsg="This field is mandatory.">
</nli-text>
TS
public loginForm!: FormGroup;

constructor(private fb: FormBuilder) {
  this.loginForm = fb.group({
    username: ['', Validators.required],
    password: ['', Validators.required]
});

Usage (password)

HTML
<nli-password  name="password"
[formControl]="loginForm.controls['password']"
inputLabel="Password"
inputClass="sample-input"
errorMsg="This field is mandatory.">
</nli-password>
TS
public loginForm!: FormGroup;

constructor(private fb: FormBuilder) {
  this.loginForm = fb.group({
    username: ['', Validators.required],
    password: ['', Validators.required]
});

Usage (select)

HTML
<nli-select name="selectCity"
    staticText="Please select a city"
    inputLabel="City"  [dataList]="citiesList"
    inputClass="white-combo" [formControl]="testForm.controls['cities']">
</nli-select>
TS
public citiesList = [{
    label: 'Cologne',
    value: 'cologne'
    },
    {
    label: 'Brasov',
    value: 'brasov'
}];
public testForm!: FormGroup;

constructor(private fb: FormBuilder) {
    this.testForm = fb.group({
        cities: ['', Validators.required]
});

Usage (long text)

HTML
<nli-longText name="desc"
    [formControl]="testForm.controls['desc']"
    inputLabel="Description"
    inputClass="sample-longText"
    rows="5"
    errorMsg="This field is mandatory">
</nli-longText>
TS
public testForm!: FormGroup;

constructor(private fb: FormBuilder) {
    this.testForm = fb.group({
        desc: ['', Validators.required]
});

Usage (file upload)

HTML
<nli-file-upload name="uploadPhoto"
    inputLabel="Upload Photo"
    [formControl]="testForm.controls['photo']"
    (onFileUpload)="uploaded($event)">
</nli-file-upload>
TS
public testForm!: FormGroup;
    
constructor(private fb: FormBuilder) {
    this.testForm = fb.group({
        cities: ['', Validators.required]
    });
}

uploaded(files: FileList) {
    alert(`You have selected ${files[0].name}`);
}

Usage (time date picker)

HTML
<nli-timedatepicker name="timestamp" (change)="changeDate($event)"></nli-timedatepicker>
TS
public testForm!: FormGroup;
    
changeDate($event) {
console.log($event);
this.timestamp = $event;
}

Changelog:

  • 1.0.0 Initial version
  • 2.0.0 Moved from BrowserModule and BrowserAnimationsModule to CommonModule
  • 2.1.0 Added autocomplete option to text ( expects array of strings )
  • 3.0.0 Added nli-timedatepicker component ( testing phase )
  • 3.0.1 timepicker bugfixes
  • 3.0.2 timepicker bugfixes
  • 3.1.0 timepicker uses 2 digits now
  • 3.1.1 minor fix for 2 digits init
  • 3.1.2 error css class fix

Keywords

FAQs

Last updated on 19 Sep 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc