9.0.0 • Published 5 years ago

@neocomplexx/ngx-neo-components v9.0.0

Weekly downloads
58
License
-
Repository
-
Last release
5 years ago

NeoComponents

Usefull Angular components.

Installation

To install this library, run:

$ npm i @neocomplexx/ngx-neo-components

Components

NeoList

Use it for keyboard navigation and command execution inside a list of elements.

It has three parts, neo-list, neo-list-item, and neoListKeydown directive

<input class="form-control" placeholder="Search..." #input>
<neo-list 
    (leaveItem)="onDeactive($event)"
    (focusItem)="onActive($event)"
    [(activeIndex)]="lastIndexSelected"
    [neoListKeydown]="input" 
    [icommand]="testItemCmd"  
    [commandOnClick]="true" 
    [commandOnEnter]="false">
    <neo-list-item *ngFor="let listItem of items" [item]="listItem">
            {{item.property }}
    </neo-list-item>
</neo-list>

Outputs

  • leaveItem: Emit the item that lost focus
  • focusItem: Emit the focused item
  • activeIndex: Emit the index number of the focused item

Inputs

  • activeIndex: (optional) If it is set, the item with 'index' is focused on init
  • icommand: (optional) An ICommand from NeoDirectives
  • commandOnClick: (optional) If true, command will execute on clicked element (default: true)
  • commandOnEnter: (optional) If true, command will execute on focues element on enter (default: true)
  • typeAhead: (optional) If true, items will be selected with typeAhead input (default: true)
  • typeAheadDelay: (optional) Delay for typeAhead keypress (default: 300)

  • item: neo-list-item Receives the item from list

  • neoListKeydown: Directive receives a html element to attach keydown events

Development server

You can run the example project to check the components Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

License

MIT © Neocomplexx

9.0.0

5 years ago

8.0.3

5 years ago

8.0.2

5 years ago

8.0.0

5 years ago

7.1.5

6 years ago

7.1.4

6 years ago

7.1.3

6 years ago

7.1.2

6 years ago

7.1.1

6 years ago

7.1.0

6 years ago

7.0.45

6 years ago

7.0.44

6 years ago

7.0.43

6 years ago

7.0.42

6 years ago

7.0.41

6 years ago

7.0.40

6 years ago

7.0.39

6 years ago

7.0.38

6 years ago

7.0.37

6 years ago

7.0.36

6 years ago

7.0.35

6 years ago

7.0.34

6 years ago

7.0.33

6 years ago

7.0.31

6 years ago

7.0.30

6 years ago

7.0.29

6 years ago

7.0.28

6 years ago

7.0.27

6 years ago

7.0.26

6 years ago

7.0.25

6 years ago

7.0.24

6 years ago

7.0.23

6 years ago

7.0.22

6 years ago

7.0.21

6 years ago

7.0.20

6 years ago

7.0.19

6 years ago

7.0.18

6 years ago

7.0.17

6 years ago

7.0.16

6 years ago

7.0.15

6 years ago

7.0.14

6 years ago

7.0.13

6 years ago

7.0.12

6 years ago

7.0.11

6 years ago

7.0.10

6 years ago

7.0.9

6 years ago

7.0.8

6 years ago

7.0.7

6 years ago

7.0.6

6 years ago

7.0.5

6 years ago

7.0.4

6 years ago

7.0.3

6 years ago

7.0.0

6 years ago

7.0.0-beta.3

6 years ago

7.0.0-beta.2

6 years ago

7.0.0-beta.1

6 years ago

7.0.0-beta.0

6 years ago