0.0.31 • Published 5 years ago

sm-angular-component-suite v0.0.31

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Strongmind Angular Component Suite

Strongmind styled, html controls, and components (Angular v2.0.0+)

Requirements

UI Dependency

  • None (Twitter Bootstrap v3+ - Recommended)

Installation

npm install sm-angular-component-suite -save

Basic usage

Import desired components in your app.module and add it to the declarations array. Alternatively, you can import desired components to a shared module, to make it available across all modules in your Angular application.

Example usage (NumberPickerComponent)

...
import { NumberPickerComponent } from 'sm-angular-component-suite/components';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent,
    NumberPickerComponent
  ],
  imports: [
    ...
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Add the strongmind-number-picker directive to the page where you want to use the number picker.

Quickest way to use numberpicker

<strongmind-number-picker [(pickerValue)]="pickerValue"></strongmind-number-picker>

Or, to update just some option values

<strongmind-number-picker [numberPickerOption]="{ min: 0, max: 20 }" [(pickerValue)]="pickerValue"></strongmind-number-picker>

Or to modify all/any numberpicker options

<strongmind-number-picker [numberPickerOption]="numberPickerOptions" [(pickerValue)]="pickerValue"></strongmind-number-picker>

Directive Inputs and Outputs

AttributeTypeRequiredDefaultDescription
pickerValue(Input) NumberYesThe value of the number picker from parent component.
numberPickerOptions(Input) NumberPickerOptionNoobjectThe strongly typed object to define options for picker.
minNumberNo0The minimal number limit on the number picker.
maxNumberNo100The maximum number limit on the number picker.
stepNumberNo1The step value for the number picker.
acceptNullBooleanNofalseDefines if the picker should allow the user to leave the input empty, if false, a number will be expected.
showValidationBooleanNotrueDefines if the picker should show validation errors, if false, the input will reset to a previous value on invalid state instead of showing the error.
showAllErrorsBooleanNofalseDefines if all errors will be shown on invalid picker state, if false, only the first error will be shown (business value - limited client area).
pickerCssStringNo'input-group'Defines the picker css. Overrideable to add custom styles. The picker follows 'Twitter Bootstrap' standards.
buttonCssStringNo'btn btn-secondary'Defines the picker button css. Overrideable to add custom styles. The picker buttons follow 'Twitter Bootstrap' standards.
buttonIconDecreaseStringNoDefines a picker button icon for decrease. If set, will render icon in decrease button.
buttonIconIncreaseStringNoDefines a picker button icon for increase. If set, will render icon in increase button.
inputDisabledBooleanNofalseDefines if the picker should be disabled for the user if true.
inputWidthNumberNoDefines a picker inputs specific width.
errorMessagesNumberPickerErrorMessageDefines error messages for invalid states.
invalidNumberStringNo'Invalid Number'
invalidMinStringNo'Invalid min value'
invalidMaxStringNo'Invalid max value'
invalidStepStringNo'Invalid step value'
invalidEmptyStringNo'Value cannot be empty'
0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

6 years ago

0.0.25

6 years ago

0.0.24

6 years ago

0.0.23

6 years ago

0.0.22

6 years ago

0.0.21

6 years ago

0.0.20

6 years ago

0.0.19

6 years ago

0.0.18

6 years ago

0.0.17

6 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.12

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago