Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Commit

Permalink
Merge branch '1.0.0-rc.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastiaan van den Berg committed Mar 2, 2018
2 parents 72c61c8 + 3f90f4f commit fc10d3a
Show file tree
Hide file tree
Showing 21 changed files with 5,060 additions and 3,006 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_js:
cache: yarn
before_script:
- yarn global add angular-cli
script: ng build --prod
script: yarn run build-lib
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

<a name="1.0.0-rc.4"></a>
## [1.0.0-rc.4](https://github.com/basvandenberg/ng-select/compare/1.0.0-rc.2...1.0.0-rc.4) (2017-12-19)

### Features
- Add filterInputChanged output event (#258).
- Drop up at page bottem (#257, #266).


<a name="1.0.0-rc.3"></a>
## [1.0.0-rc.3](https://github.com/basvandenberg/ng-select/compare/1.0.0-rc.2...1.0.0-rc.3) (2017-11-02)

Expand Down
16 changes: 16 additions & 0 deletions PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Bump version in:
- package.json
- src/app/ng-select/package.json
- demo/package.json
- demo/src/app/components/home.compenent.ts

Build with:
```bash
yarn run build-lib
```

Publish from dist directory:
```bash
cd src/app/ng-select/dist
npm publish
```
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Build Status](https://travis-ci.org/basvandenberg/ng-select.svg?branch=master)](https://travis-ci.org/basvandenberg/ng-select)

A select component for angular, based on the [select2] JQuery plugin. See the
[ng-select] web site for documentation and examples, or try it with this [plunker].
[ng-select] web site for documentation and examples.

## Develop

Expand All @@ -15,18 +15,20 @@ $ yarn install
$ ng serve
```

To build the ng-select module, run:
```bash
$ yarn run build-lib
```

To install and run the ng-select demo/documentation web site on your local
machine, enter the demo folder and run:
machine, enter the `demo` folder and run:
```bash
$ cd demo
$ yarn install
$ ng serve
```

To build the ng-select module, run:
```bash
$ yarn run build-lib
```



[ng-select]: https://basvandenberg.github.io/ng-select
[select2]: https://select2.github.io
[plunker]: https://plnkr.co/edit/vxwV6zxEwZGVUVR5V6tg?p=preview
1 change: 0 additions & 1 deletion copy_to_demo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash
rm -v src/app/ng-select/dist/ng-select-*.tgz
rm -rv demo/node_modules/ng-select/*

npm pack src/app/ng-select/dist
Expand Down
55 changes: 27 additions & 28 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,42 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/animations": "^5.2.0",
"@angular/cdk": "^2.0.0-beta.12",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/common": "^5.2.0",
"@angular/compiler": "^5.2.0",
"@angular/core": "^5.2.0",
"@angular/forms": "^5.2.0",
"@angular/http": "^5.2.0",
"@angular/material": "^2.0.0-beta.12",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"@angular/platform-browser": "^5.2.0",
"@angular/platform-browser-dynamic": "^5.2.0",
"@angular/router": "^5.2.0",
"core-js": "^2.4.1",
"famfamfam-flags": "^1.0.0",
"hammerjs": "^2.0.8",
"ng-select": "1.0.0-rc.3",
"ng-select": "1.0.0-rc.4",
"normalize.css": "^7.0.0",
"rxjs": "^5.4.1",
"rxjs": "^5.5.6",
"web-animations-js": "^2.2.5",
"zone.js": "^0.8.18"
"zone.js": "^0.8.19"
},
"devDependencies": {
"@angular/cli": "^1.4.9",
"@angular/compiler-cli": "^5.0.0",
"@types/jasmine": "^2.5.53",
"@types/node": "^8.0.46",
"codelyzer": "^3.2.1",
"jasmine-core": "^2.6.4",
"jasmine-spec-reporter": "^4.1.1",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "^1.1.0",
"@angular/cli": "^1.7.2",
"@angular/compiler-cli": "^5.2.0",
"@types/jasmine": "^2.8.3",
"@types/node": "~6.0.60",
"codelyzer": "^4.0.1",
"jasmine-core": "^2.8.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "~2.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.1.2",
"ts-node": "^3.1.0",
"tslint": "^5.4.3",
"typescript": "~2.4.2"
"protractor": "~5.1.2",
"ts-node": "~4.1.0",
"tslint": "~5.9.1",
"typescript": "~2.5.3"
}
}
7 changes: 7 additions & 0 deletions demo/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,13 @@ <h3>Output events</h3>
Selected &amp; deselected
</a>
</li>
<li>
<a
routerLink="/examples/filter-input-changed"
routerLinkActive="active">
Filter input changed
</a>
</li>
<li>
<a
routerLink="/examples/no-options-found"
Expand Down
2 changes: 2 additions & 0 deletions demo/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {Label} from './components/examples/label.component';
import {Focus} from './components/examples/focus.component';
import {Opened} from './components/examples/opened.component';
import {Selected} from './components/examples/selected.component';
import {FilterInputChanged} from './components/examples/filter-input-changed.component';
import {NoOptionsFound} from './components/examples/no-options-found.component';
import {SelectMethod} from './components/examples/select-method.component';
import {ClearMethod} from './components/examples/clear-method.component';
Expand Down Expand Up @@ -81,6 +82,7 @@ import {OptionService} from './services/option.service';
Focus,
Opened,
Selected,
FilterInputChanged,
NoOptionsFound,
SelectMethod,
ClearMethod
Expand Down
4 changes: 4 additions & 0 deletions demo/src/app/app.router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {Label} from './components/examples/label.component';
import {Focus} from './components/examples/focus.component';
import {Opened} from './components/examples/opened.component';
import {Selected} from './components/examples/selected.component';
import {FilterInputChanged} from './components/examples/filter-input-changed.component';
import {NoOptionsFound} from './components/examples/no-options-found.component';
import {SelectMethod} from './components/examples/select-method.component';
import {ClearMethod} from './components/examples/clear-method.component';
Expand Down Expand Up @@ -102,6 +103,9 @@ export const appRoutes: Routes = [{
}, {
path: 'examples/selected',
component: Selected
}, {
path: 'examples/filter-input-changed',
component: FilterInputChanged
}, {
path: 'examples/no-options-found',
component: NoOptionsFound
Expand Down
6 changes: 6 additions & 0 deletions demo/src/app/components/documentation.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ <h3 id="output">Output events</h3>
</tr>
</thead>
<tbody>
<tr>
<td><code>filterInputChanged</code></td>
<td><code>string</code></td>
<td>Returns search term when filter input changes</td>
<td><a routerLink="/examples/filter-input-changed">example</a></td>
</tr>
<tr>
<td><code>noOptionsFound</code></td>
<td><code>string</code></td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<mat-card>
<mat-card-title>
Filter input changed event
</mat-card-title>
<mat-card-content>

<h3>Single select</h3>

<div class="select-value">Search term: {{searchTerm0}}</div>
<ng-select
[options]="characters"
(filterInputChanged)="onFilterInputChanged0($event)">
</ng-select>

<div class="code-header">Component template</div>
<section [innerHTML]="html0" highlight-js-content=".highlight"></section>

<div class="code-header">Component class</div>
<section [innerHTML]="ts0" highlight-js-content=".highlight"></section>

<h3>Multiple select</h3>

<p class="select-value">Search term: {{searchTerm1}}</p>
<ng-select
[options]="characters"
[multiple]="true"
(filterInputChanged)="onFilterInputChanged1($event)">
</ng-select>

<div class="code-header">Component template</div>
<section [innerHTML]="html1" highlight-js-content=".highlight"></section>

</mat-card-content>
</mat-card>
74 changes: 74 additions & 0 deletions demo/src/app/components/examples/filter-input-changed.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import {AfterViewInit, Component, ElementRef} from '@angular/core';
import {IOption} from 'ng-select';
declare var hljs: any;
import {OptionService} from '../../services/option.service';

@Component({
selector: 'filter-input-changed',
templateUrl: './filter-input-changed.component.html'
})
export class FilterInputChanged implements AfterViewInit {

characters: Array<IOption> = this.optionService.getCharacters();
searchTerm0: string = '';
searchTerm1: string = '';

constructor(
private elementRef: ElementRef,
private optionService: OptionService
) {}

onFilterInputChanged0(searchTerm: string) {
this.searchTerm0 = searchTerm;
}

onFilterInputChanged1(searchTerm: string) {
this.searchTerm1 = searchTerm;
}

ngAfterViewInit() {
hljs.initHighlighting();
let nodes: NodeList = this.elementRef
.nativeElement
.querySelectorAll('.typescript, .html, .css');

for (let i = 0; i < nodes.length; i++) {
hljs.highlightBlock(nodes[i]);
}
}

html0: string = `
<pre><code class="html">&lt;div&gt;Search term: {{searchTerm}}&lt;/div&gt;
&lt;ng-select
[options]="characters"
(filterInputChanged)="onFilterInputChanged($event)"&gt;
&lt;/ng-select&gt;
</code></pre>`;

ts0: string = `
<pre><code class="typescript">export class FilterInputChangedExample {
characters: Array&lt;IOption&gt; = this.optionService.getCharacters();
searchTerm: string = '';
constructor(
private optionService: OptionService
) {}
onFilterInputChanged(searchTerm: string) {
this.searchTerm = searchTerm;
}
}
</pre></code>`;

html1: string = `
<pre><code class="html">&lt;div&gt;Search term: {{searchTerm}}&lt;/div&gt;
&lt;ng-select
[options]="characters"
[multiple]="true"
(filterInputChanged)="onFilterInputChanged($event)"&gt;
&lt;/ng-select&gt;
</code></pre>`;


}
2 changes: 1 addition & 1 deletion demo/src/app/components/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {OptionService} from '../services/option.service';
})
export class Home {

version: string = '1.0.0-rc.3';
version: string = '1.0.0-rc.4';

countries: Array<IOption> = this.optionService.getCountries();
singleSelectValue: string = 'NL';
Expand Down
Loading

0 comments on commit fc10d3a

Please sign in to comment.