1.1.5 • Published 3 years ago

controller-ui v1.1.5

Weekly downloads
3
License
GPL-3.0-or-later
Repository
github
Last release
3 years ago

Controller Ui library

Controller Ui is a component library for Angular. This library is designed to create interfaces inspired by train cockpit and contains gauges, handlers and indicators.

Prerequisites

Before using Controller Ui in your project, install the needed dependencies :

  • Install Hammer.js
npm install --save hammerjs

Import hammerjs in your Angular project by adding this line in your src/main.js

import 'hammerjs';

Installation

npm install controller-ui

Demo

View components in action at demo.cabview.io

Classic components

Gauge and handle UI inspirate from 60'/80' train cockpit. Especialy JR 103 cockpit

Using classic module

In your angular module import the classic module from Controller UI

import { ClassicModule } from 'controller-ui';

And import it to your modules

@NgModule({
  declarations: [],
  imports: [
    ClassicModule
  ],

})

Classic brake gauge

Pressure brake style gauge

<cui-classic-brake-gauge 
    [value]="classicBrakeGaugeValue" 
    [maxValue]="classicBrakeGaugeMaxValue" 
    [secValue]="classicBrakeGaugeSecValue" 
    [maxSecValue]="classicBrakeGaugeMaxSecValue" 
    [maxGraduation]="classicBrakeGaugeMaxGraduation" 
    [unit]="classicBrakeGaugeUnit">
</cui-classic-brake-gauge>
ParameterDescriptionType
valueValue for the first (black) pointerNumber between 0 and 1
maxValueMaximum value for the fist pointer (when value = 1)Number
secValueValue for the second (red) pointerNumber between 0 and 1
maxSecValueMaximum value for the second pointer (when value = 1)Number
maxGraduationMaximum value for the second pointer (when value = 1)Number
unitText displayed on the gauge unit zoneString

Classic speed gauge

Speed gauge style gauge

<cui-classic-speed-gauge 
    [value]="classicSpeedGaugeValue" 
    [maxSpeed]="classicSpeedGaugeMaxValue" 
    [unit]="classicSpeedGaugeUnit">
</cui-classic-speed-gauge>
ParameterDescriptionType
valueValue to displayNumber between 0 and 1
maxSpeedMaximum value (when value = 1)Number
unitText displayed on the gauge unit zone (default km/h)String

Classic function display

Light indicator for display functions status

<cui-classic-function-display 
  [functions]="classicFunctionDisplayGroup">
</cui-classic-function-display>
ParameterDescriptionType
functionsFunctions descriptionArray of Object
Function object example
{
  name: 'Fn0',
  userName: 'Headlights',
  iconCls: 'rf rf-headlight'
  value: this.classicFunctionDisplayValue0
}
Function object definition
PropertyDescriptionType
nameFunction internal nameString
userNameFunction display name (used when iconCls is undefined)String
iconClsCSS class to used for the functionString
valueValue of the functionBoolean
Note:

For a rail icon set see the project : RailFont project

Classic direction handle

Direction handle component

<cui-classic-direction-handle 
  [beginFrom]="classicDirectionHandleBeginFrom"
  [steps]="classicDirectionHandleSteps"
  [(value)]="classicDirectionHandleValue">
</cui-classic-direction-handle>
ParameterDescriptionType
beginFrombeginning value for the first positionnumber
stepsNumber of positionsnumber
valuecurrent value (Two way binding property)number

Classic manipulator handle

Manipulator handle component

<cui-classic-regulator-handle 
  [graduations]="classicRegulatorHandleGraduations" 
  [steps]="classicRegulatorHandleSteps" 
  [(value)]="classicRegulatorHandleValue">
</cui-classic-regulator-handle>
ParameterDescriptionType
graduationsGraduation to display (example: "1234")String (array of chars)
stepsNumber of positionsnumber
valuecurrent value (Two way binding property)number

Classic toggle switch

Toggle switch component

<cui-classic-toggle-switch 
  [label]="classicToggleSwitchLabel"
  [labelPosition]="classicToggleSwitchLabelPosition"
  [(value)]="classicToggleSwitchValue">
</cui-classic-toggle-switch>
ParameterDescriptionType
labelText to display in labelString
labelPositionLabel position (bottom / top)String
valuecurrent value (Two way binding property)Boolean

Classic round button

Classic round button component

<cui-classic-round-button 
    [color]="classicRoundButtonColor" 
    (press)="press($event)">
    <!-- Content to define icon -->
    <span class="material-icons">
        warning
    </span>
</cui-classic-round-button>
ParameterDescriptionType
colorRGB color code to use in buttonString
pressEvent call on button clickFunction
contentHtml content to define icon, like material icon codeHTML

License

GNU Public License, version 3

1.1.5

3 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.7

6 years ago

0.8.6

6 years ago

0.8.5

6 years ago

0.8.1

6 years ago

0.8.0

6 years ago