Skip to content

Commit

Permalink
Merge pull request valor-software#747 from valor-software/development
Browse files Browse the repository at this point in the history
Release 1.0.24
  • Loading branch information
valorkin authored Jul 18, 2016
2 parents 7476abc + 40a8c22 commit c40460b
Show file tree
Hide file tree
Showing 32 changed files with 320 additions and 143 deletions.
4 changes: 2 additions & 2 deletions .config/bundle-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const targetFolder = path.resolve('./bundles');
async.waterfall([
cleanBundlesFolder,
getSystemJsBundleConfig,
buildSystemJs({minify: false, sourceMaps: true, mangle: false}),
buildSystemJs({minify: false, sourceMaps: true, mangle: false, noEmitHelpers: false, declaration: true}),
getSystemJsBundleConfig,
buildSystemJs({minify: true, sourceMaps: true, mangle: false}),
buildSystemJs({minify: true, sourceMaps: true, mangle: false, noEmitHelpers: false, declaration: true}),
gzipSystemJsBundle
], err => {
if (err) {
Expand Down
94 changes: 94 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,97 @@
<a name="1.0.24"></a>
## [1.0.24](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.23...v1.0.24) (2016-07-18)


### Bug Fixes

* **modals:** fixed modals fade in animation ([2b95c95](https://github.com/valor-software/ng2-bootstrap/commit/2b95c95)), closes [#687](https://github.com/valor-software/ng2-bootstrap/issues/687)


### Features

* **tooltip:** add implementation for tooltipClass ([#664](https://github.com/valor-software/ng2-bootstrap/issues/664)) ([fa4475a](https://github.com/valor-software/ng2-bootstrap/commit/fa4475a))
* **tooltip:** tooltip html content ([#724](https://github.com/valor-software/ng2-bootstrap/issues/724)) ([9070125](https://github.com/valor-software/ng2-bootstrap/commit/9070125))



<a name="1.0.23"></a>
## [1.0.23](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.22...v1.0.23) (2016-07-14)


### Bug Fixes

* **build:** fix rxjs typings issues on build ([b4267aa](https://github.com/valor-software/ng2-bootstrap/commit/b4267aa))
* **dropdown:** Add the dropdown-menu class to dropdown menus ([1bc316f](https://github.com/valor-software/ng2-bootstrap/commit/1bc316f)), closes [#541](https://github.com/valor-software/ng2-bootstrap/issues/541) [#732](https://github.com/valor-software/ng2-bootstrap/issues/732)
* **modal:** injected DOCUMENT token is undefined ([48a9aa7](https://github.com/valor-software/ng2-bootstrap/commit/48a9aa7)), closes [#575](https://github.com/valor-software/ng2-bootstrap/issues/575)
* **typeahead:** Added form support ([#723](https://github.com/valor-software/ng2-bootstrap/issues/723)) ([fa54e46](https://github.com/valor-software/ng2-bootstrap/commit/fa54e46))


### Features

* **datepicker:** add emitting event when datepicker selection is done ([#733](https://github.com/valor-software/ng2-bootstrap/issues/733)) ([53c7fd1](https://github.com/valor-software/ng2-bootstrap/commit/53c7fd1))



<a name="1.0.22"></a>
## [1.0.22](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.21...v1.0.22) (2016-07-12)



<a name="1.0.21"></a>
## [1.0.21](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.20...v1.0.21) (2016-07-12)



<a name="1.0.20"></a>
## [1.0.20](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.19...v1.0.20) (2016-07-11)


### Bug Fixes

* **package:** removed peer dependency to router ([c661772](https://github.com/valor-software/ng2-bootstrap/commit/c661772))



<a name="1.0.19"></a>
## [1.0.19](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.17...v1.0.19) (2016-07-11)


### Bug Fixes

* **build:** emit helpers ([4771f6f](https://github.com/valor-software/ng2-bootstrap/commit/4771f6f))
* **build:** fixed prod build webpack config ([753cc67](https://github.com/valor-software/ng2-bootstrap/commit/753cc67))
* **demo:** add "dropdownMenu" ([#580](https://github.com/valor-software/ng2-bootstrap/issues/580)) ([686a96e](https://github.com/valor-software/ng2-bootstrap/commit/686a96e))
* **docs:** fix typo ([#612](https://github.com/valor-software/ng2-bootstrap/issues/612)) ([7ddd532](https://github.com/valor-software/ng2-bootstrap/commit/7ddd532)), closes [#612](https://github.com/valor-software/ng2-bootstrap/issues/612)
* **docs:** nonInput is by default ([#581](https://github.com/valor-software/ng2-bootstrap/issues/581)) ([b23ced0](https://github.com/valor-software/ng2-bootstrap/commit/b23ced0))
* **dropdown:** explicitly markForCheck() ([#566](https://github.com/valor-software/ng2-bootstrap/issues/566)) ([0ce4328](https://github.com/valor-software/ng2-bootstrap/commit/0ce4328))
* **dropdown:** prop disabled renamed to isDisabled ([#615](https://github.com/valor-software/ng2-bootstrap/issues/615)) ([8a1d6f8](https://github.com/valor-software/ng2-bootstrap/commit/8a1d6f8))
* **header-component:** fix style ([ccfe948](https://github.com/valor-software/ng2-bootstrap/commit/ccfe948))
* **modal:** don't hide on out click if backdrop === 'static' ([#629](https://github.com/valor-software/ng2-bootstrap/issues/629)) ([df85712](https://github.com/valor-software/ng2-bootstrap/commit/df85712))
* **modal:** fix typo in MODAL_DIRECTIVES ([#630](https://github.com/valor-software/ng2-bootstrap/issues/630)) ([8c4c125](https://github.com/valor-software/ng2-bootstrap/commit/8c4c125)), closes [#630](https://github.com/valor-software/ng2-bootstrap/issues/630)
* **modals:** modal backdrop and onclick events handling ([b39b856](https://github.com/valor-software/ng2-bootstrap/commit/b39b856)), closes [#687](https://github.com/valor-software/ng2-bootstrap/issues/687) [#703](https://github.com/valor-software/ng2-bootstrap/issues/703) [#708](https://github.com/valor-software/ng2-bootstrap/issues/708)
* **package:** include js map files in bundles ([1ffd2b4](https://github.com/valor-software/ng2-bootstrap/commit/1ffd2b4)), closes [#632](https://github.com/valor-software/ng2-bootstrap/issues/632)
* **readme:** alert component name fixed ([e9a1d04](https://github.com/valor-software/ng2-bootstrap/commit/e9a1d04)), closes [#552](https://github.com/valor-software/ng2-bootstrap/issues/552)
* **style:** fix top menu z-index ([e70e578](https://github.com/valor-software/ng2-bootstrap/commit/e70e578))
* **tests:** fix failing test for buttons and accordion ([8ea9c10](https://github.com/valor-software/ng2-bootstrap/commit/8ea9c10))
* **typeahead:** removed incorrect behavior to do ENTER behavior on TAB. TAB should simply skip to next field as expected. ([#715](https://github.com/valor-software/ng2-bootstrap/issues/715)) ([758ad1b](https://github.com/valor-software/ng2-bootstrap/commit/758ad1b)), closes [#686](https://github.com/valor-software/ng2-bootstrap/issues/686) [#490](https://github.com/valor-software/ng2-bootstrap/issues/490) [#689](https://github.com/valor-software/ng2-bootstrap/issues/689)


### Features

* **demo:** new build process with ng2-webpack-config ([5c8fcf1](https://github.com/valor-software/ng2-bootstrap/commit/5c8fcf1))
* **docs:** added modals section ([6ab3a07](https://github.com/valor-software/ng2-bootstrap/commit/6ab3a07))
* **docs:** applied new docs style ([d84211a](https://github.com/valor-software/ng2-bootstrap/commit/d84211a))
* **docs:** menues and contents updated ([2155df6](https://github.com/valor-software/ng2-bootstrap/commit/2155df6))
* **package:** angular updated to rc3, fix hash (active route) ([#636](https://github.com/valor-software/ng2-bootstrap/issues/636)) ([70a84cf](https://github.com/valor-software/ng2-bootstrap/commit/70a84cf)), closes [#636](https://github.com/valor-software/ng2-bootstrap/issues/636)
* **typeahead:** rxjs version ([#584](https://github.com/valor-software/ng2-bootstrap/issues/584)) ([48b8abb](https://github.com/valor-software/ng2-bootstrap/commit/48b8abb)), closes [#536](https://github.com/valor-software/ng2-bootstrap/issues/536) [#637](https://github.com/valor-software/ng2-bootstrap/issues/637)


### BREAKING CHANGES

* dropdown: * dropdown property `disabled` renamed to `isDisabled`
* ng2-bootstrap: misprint MODAL_DIRECTVES renamed to MODAL_DIRECTIVES


<a name="1.0.17"></a>
## [1.0.17](https://github.com/valor-software/ng2-bootstrap/compare/v1.0.16...v1.0.17) (2016-05-31)

Expand Down
1 change: 0 additions & 1 deletion components/carousel/carousel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,3 @@ export class CarouselComponent implements OnDestroy {
}
}
}

5 changes: 4 additions & 1 deletion components/datepicker/datepicker-inner.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, OnInit, EventEmitter, Input, OnChanges} from '@angular/core';
import {Component, OnInit, EventEmitter, Input, OnChanges, Output} from '@angular/core';
import {CORE_DIRECTIVES, NgClass} from '@angular/common';
import {FORM_DIRECTIVES, NgModel} from '@angular/forms';
import {DateFormatter} from './date-formatter';
Expand Down Expand Up @@ -70,6 +70,8 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
@Input() public dateDisabled:any;
@Input() public initDate:Date;

@Output() public selectionDone: EventEmitter<Date> = new EventEmitter<Date>(undefined);

public stepDay:any = {};
public stepMonth:any = {};
public stepYear:any = {};
Expand Down Expand Up @@ -248,6 +250,7 @@ export class DatePickerInnerComponent implements OnInit, OnChanges {
}

this.activeDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
this.selectionDone.emit(this.activeDate);
} else {
this.activeDate = date;
this.datepickerMode = this.modes[this.modes.indexOf(this.datepickerMode) - 1];
Expand Down
11 changes: 9 additions & 2 deletions components/datepicker/datepicker.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Component, Self, Input} from '@angular/core';
import {Component, Self, Input, Output, EventEmitter} from '@angular/core';
import {CORE_DIRECTIVES} from '@angular/common';
import {FORM_DIRECTIVES, ControlValueAccessor, NgModel} from '@angular/forms';
import {DatePickerInnerComponent} from './datepicker-inner.component';
Expand Down Expand Up @@ -32,7 +32,8 @@ import {YearPickerComponent} from './yearpicker.component';
[dateDisabled]="dateDisabled"
[templateUrl]="templateUrl"
[onlyCurrentMonth]="onlyCurrentMonth"
[shortcutPropagation]="shortcutPropagation">
[shortcutPropagation]="shortcutPropagation"
(selectionDone)="onSelectionDone($event)">
<daypicker tabindex="0"></daypicker>
<monthpicker tabindex="0"></monthpicker>
<yearpicker tabindex="0"></yearpicker>
Expand Down Expand Up @@ -64,6 +65,8 @@ export class DatePickerComponent implements ControlValueAccessor {
// todo: change type during implementation
@Input() public dateDisabled:any;

@Output() public selectionDone: EventEmitter<Date> = new EventEmitter<Date>(undefined);

public onChange:any = Function.prototype;
public onTouched:any = Function.prototype;

Expand Down Expand Up @@ -91,6 +94,10 @@ export class DatePickerComponent implements ControlValueAccessor {
this.cd.viewToModelUpdate(event);
}

public onSelectionDone(event: Date): void {
this.selectionDone.emit(event);
}

// todo: support null value
public writeValue(value:any):void {
// todo: fix something sends here new date all the time
Expand Down
8 changes: 7 additions & 1 deletion components/dropdown/dropdown-menu.directive.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import {Directive, ElementRef, Host, OnInit} from '@angular/core';
import {Directive, ElementRef, Host, OnInit, HostBinding} from '@angular/core';
import {DropdownDirective} from './dropdown.directive';

@Directive({selector: '[dropdownMenu]'})
export class DropdownMenuDirective implements OnInit {
public dropdown:DropdownDirective;
public el:ElementRef;

/* tslint:disable:no-unused-variable */
@HostBinding('class.dropdown-menu')
public addClass:boolean = true;
/* tslint:enable:no-unused-variable */

public constructor(@Host() dropdown:DropdownDirective, el:ElementRef) {
this.dropdown = dropdown;
this.el = el;
Expand Down
2 changes: 1 addition & 1 deletion components/dropdown/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { DROPDOWN_DIRECTIVES } from 'ng2-bootstrap/components/dropdown';
```html
<!-- dropdown directive marks a dropdown root element -->
<div dropdown>
<!-- click on dropdown-toggle toogles dropdown state, optional -->
<!-- click on dropdown-toggle toggles dropdown state, optional -->
<div dropdownToggle></div>
<!-- dropdown-menu holds content which will be shown -->
<div dropdownMenu>
Expand Down
39 changes: 27 additions & 12 deletions components/modal/modal-backdrop.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {Component, ElementRef} from '@angular/core';
import {NgClass} from '@angular/common';
import {Component, ElementRef, Renderer} from '@angular/core';
import {ClassName} from './modal-options.class';

export class ModalBackdropOptions {
Expand All @@ -12,21 +11,37 @@ export class ModalBackdropOptions {

@Component({
selector: 'bs-modal-backdrop',
directives: [NgClass],
template: `
<div class="${ClassName.BACKDROP}"
[class.${ClassName.IN}]="isShown"
[class.${ClassName.FADE}]="isAnimated"></div>`
template: '',
host: {'class': `${ClassName.BACKDROP}`}
})
export class ModalBackdropComponent {
public isAnimated:boolean = true;
public isShown:boolean = false;
public get isAnimated():boolean{
return this._isAnimated;
}

public set isAnimated(value:boolean) {
this._isAnimated = value;
this.renderer.setElementClass(this.element.nativeElement, `${ClassName.FADE}`, value);
}

public get isShown():boolean{
return this._isShown;
}

public set isShown(value:boolean) {
this._isShown = value;
this.renderer.setElementClass(this.element.nativeElement, `${ClassName.IN}`, value);
}

public element:ElementRef;
public renderer: Renderer;

public constructor(options:ModalBackdropOptions, element:ElementRef) {
this.isAnimated = options.animate;
private _isAnimated:boolean;
private _isShown:boolean = false;

public constructor(options:ModalBackdropOptions, element:ElementRef, renderer: Renderer) {
this.element = element;
this.renderer = renderer;
this.isAnimated = options.animate !== false;
}
}

9 changes: 3 additions & 6 deletions components/modal/modal.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
Output
} from '@angular/core';
import {global} from '@angular/core/src/facade/lang';
import {DOCUMENT} from '@angular/platform-browser';
import {ModalBackdropComponent, ModalBackdropOptions} from './modal-backdrop.component';
import {modalConfigDefaults, ClassName, ModalOptions, Selector} from './modal-options.class';
import {ComponentsHelper} from '../utils/components-helper.service';
Expand Down Expand Up @@ -67,7 +66,9 @@ export class ModalDirective implements AfterViewInit, OnDestroy {

private element:ElementRef;
private renderer:Renderer;
private document:any;
private get document():any {
return this.componentsHelper.getDocument();
};
private componentsHelper:ComponentsHelper;

/** Host element manipulations */
Expand All @@ -92,11 +93,9 @@ export class ModalDirective implements AfterViewInit, OnDestroy {

public constructor(element:ElementRef,
renderer:Renderer,
@Inject(DOCUMENT) document:any,
@Inject(ComponentsHelper) componentsHelper:ComponentsHelper) {
this.element = element;
this.renderer = renderer;
this.document = document;
this.componentsHelper = componentsHelper;
}

Expand All @@ -109,8 +108,6 @@ export class ModalDirective implements AfterViewInit, OnDestroy {
this.isBodyOverflowing = void 0;
this.originalBodyPadding = void 0;
this.scrollbarWidth = void 0;

this.document = void 0;
}

public ngAfterViewInit():any {
Expand Down
5 changes: 3 additions & 2 deletions components/tooltip/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ import { TOOLTIP_DIRECTIVES } from 'ng2-bootstrap/components/tooltip';
```typescript
// class Tooltip implements OnInit
@Directive({ selector: '[tooltip]' })
export class TooltipDirective implements OnInit {
export class TooltipDirective {
@Input('tooltip') private content:string;
@Input('tooltipPlacement') private placement:string = 'top';
@Input('tooltipIsOpen') private isOpen:boolean;
@Input('tooltipEnable') private enable:boolean;
@Input('tooltipAppendToBody') private appendToBody:boolean;
@Input('tooltipClass') public popupClass:string;
}
```

Expand All @@ -26,5 +27,5 @@ export class TooltipDirective implements OnInit {
- `tooltipTrigger` (*not implemented*) (`?Array<string>`) - array of event names which triggers tooltip opening
- `tooltipEnable` (`?boolean=true`) - if `false` tooltip is disabled and will not be shown
- `tooltipAppendToBody` (*not implemented*) (`?boolean=false`) - if `true` tooltip will be appended to body
- `tooltipClass` (*not implemented*) (`?string`) - custom tooltip class applied to the tooltip container.
- `tooltipClass` (`?string`) - custom tooltip class applied to the tooltip container
- `tooltipIsOpen` (`?boolean=false`) - if `true` tooltip is currently visible
12 changes: 11 additions & 1 deletion components/tooltip/tooltip-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ import {TooltipOptions} from './tooltip-options.class';
[ngStyle]="{top: top, left: left, display: display}"
[ngClass]="classMap">
<div class="tooltip-arrow"></div>
<div class="tooltip-inner">
<div class="tooltip-inner"
*ngIf="htmlContent"
innerHtml="{{htmlContent}}">
</div>
<div class="tooltip-inner"
*ngIf="content">
{{content}}
</div>
</div>`
Expand All @@ -25,6 +30,7 @@ export class TooltipContainerComponent implements AfterViewInit {
private left:string = '-1000px';
private display:string = 'block';
private content:string;
private htmlContent:string;
private placement:string;
private popupClass:string;
private animation:boolean;
Expand Down Expand Up @@ -60,6 +66,10 @@ export class TooltipContainerComponent implements AfterViewInit {
this.classMap.fade = true;
}

if (this.popupClass) {
this.classMap[this.popupClass] = true;
}

this.cdr.detectChanges();
}
}
2 changes: 2 additions & 0 deletions components/tooltip/tooltip-options.class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export class TooltipOptions {
public popupClass:string;
public animation:boolean;
public isOpen:boolean;
public content:string;
public htmlContent:string;

public constructor(options:Object) {
Object.assign(this, options);
Expand Down
10 changes: 8 additions & 2 deletions components/tooltip/tooltip.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@ import {
import {TooltipOptions} from './tooltip-options.class';
import {TooltipContainerComponent} from './tooltip-container.component';

@Directive({selector: '[tooltip]'})
/* tslint:disable */
@Directive({selector: '[tooltip], [tooltipHtml]'})
/* tslint:enable */
export class TooltipDirective {
/* tslint:disable */
@Input('tooltip') public content:string;
@Input('tooltipHtml') public htmlContent:string;
@Input('tooltipPlacement') public placement:string = 'top';
@Input('tooltipIsOpen') public isOpen:boolean;
@Input('tooltipEnable') public enable:boolean = true;
@Input('tooltipAnimation') public animation:boolean = true;
@Input('tooltipAppendToBody') public appendToBody:boolean;
@Input('tooltipClass') public popupClass:string;
/* tslint:enable */

public viewContainerRef:ViewContainerRef;
Expand All @@ -38,9 +42,11 @@ export class TooltipDirective {
this.visible = true;
let options = new TooltipOptions({
content: this.content,
htmlContent: this.htmlContent,
placement: this.placement,
animation: this.animation,
hostEl: this.viewContainerRef.element
hostEl: this.viewContainerRef.element,
popupClass: this.popupClass
});

let binding = ReflectiveInjector.resolve([
Expand Down
Loading

0 comments on commit c40460b

Please sign in to comment.