Commit dc4333dd authored by Oleksandr Telnov's avatar Oleksandr Telnov
Browse files

merge marcalj development and fix timepicker

parents 5b6e2743 12bd1e87
Showing with 30 additions and 47 deletions
+30 -47
import {
Component, OnInit, OnDestroy, Input, HostBinding, Inject
} from '@angular/core';
import {NgClass} from '@angular/common';
import {CollapseDirective} from '../collapse';
import {AccordionComponent} from './accordion.component';
/* tslint:disable:component-selector-name */
@Component({
selector: 'accordion-group, accordion-panel',
directives: [CollapseDirective, NgClass],
template: `
<div class="panel" [ngClass]="panelClass">
<div class="panel-heading" (click)="toggleOpen($event)">
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {CollapseModule} from '../collapse/collapse.module';
import {AccordionComponent} from './accordion.component';
import {AccordionPanelComponent} from './accordion-group.component';
@NgModule({
imports: [CommonModule, CollapseModule],
declarations: [AccordionComponent, AccordionPanelComponent],
exports: [AccordionComponent, AccordionPanelComponent]
})
......
import {Component, OnInit, Input, Output, EventEmitter} from '@angular/core';
import {NgIf, NgClass} from '@angular/common';
const ALERT_TEMPLATE = `
<div class="alert" role="alert" [ngClass]="classes" *ngIf="!closed">
......@@ -14,7 +13,6 @@ const ALERT_TEMPLATE = `
// TODO: templateUrl
@Component({
selector: 'alert',
directives: [NgIf, NgClass],
template: ALERT_TEMPLATE
})
export class AlertComponent implements OnInit {
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {AlertComponent} from './alert.component';
@NgModule({
imports: [CommonModule],
declarations: [AlertComponent],
exports: [AlertComponent]
})
......
// todo: add animate
import {Component, OnDestroy, Input} from '@angular/core';
import {NgFor} from '@angular/common';
import {Ng2BootstrapConfig, Ng2BootstrapTheme} from '../ng2-bootstrap-config';
import {SlideComponent} from './slide.component';
......@@ -39,7 +38,6 @@ const NAVIGATION:any = {
*/
@Component({
selector: 'carousel',
directives: [NgFor],
template: `
<div (mouseenter)="pause()" (mouseleave)="play()" class="carousel slide">
<ol class="carousel-indicators" *ngIf="slides.length > 1">
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {SlideComponent} from './slide.component';
import {CarouselComponent} from './carousel.component';
@NgModule({
imports: [CommonModule],
declarations: [SlideComponent, CarouselComponent],
exports: [SlideComponent, CarouselComponent]
})
......
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';
const FORMAT_DAY = 'DD';
......@@ -44,8 +42,7 @@ const SHORTCUT_PROPAGATION = false;
<div *ngIf="datepickerMode" class="well well-sm bg-faded p-a card" role="application" ><!--&lt;!&ndash;ng-keydown="keydown($event)"&ndash;&gt;-->
<ng-content></ng-content>
</div>
`,
directives: [FORM_DIRECTIVES, CORE_DIRECTIVES, NgClass, NgModel]
`
})
export class DatePickerInnerComponent implements OnInit, OnChanges {
@Input() public datepickerMode:string;
......
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';
import {DayPickerComponent} from './daypicker.component';
import {MonthPickerComponent} from './monthpicker.component';
import {YearPickerComponent} from './yearpicker.component';
// import {DatePickerPopup} from './datepicker-popup';
import {ControlValueAccessor, NgModel} from '@angular/forms';
/* tslint:disable:component-selector-name component-selector-type */
@Component({
......@@ -37,9 +31,7 @@ import {YearPickerComponent} from './yearpicker.component';
<monthpicker tabindex="0"></monthpicker>
<yearpicker tabindex="0"></yearpicker>
</datepicker-inner>
`,
directives: [DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent,
FORM_DIRECTIVES, CORE_DIRECTIVES]
`
})
/* tslint:enable:component-selector-name component-selector-type */
export class DatePickerComponent implements ControlValueAccessor {
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {DatePickerPopupDirective} from './datepicker-popup.component';
import {DatePickerComponent} from './datepicker.component';
import {DatePickerInnerComponent} from './datepicker-inner.component';
import {DayPickerComponent} from './daypicker.component';
import {MonthPickerComponent} from './monthpicker.component';
import {YearPickerComponent} from './yearpicker.component';
// import {DatePickerPopup} from './datepicker-popup';
@NgModule({
declarations: [DatePickerPopupDirective, DatePickerComponent],
exports: [DatePickerPopupDirective, DatePickerComponent]
imports: [CommonModule, FormsModule],
declarations: [DatePickerPopupDirective, DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent],
exports: [DatePickerPopupDirective, DatePickerComponent, DatePickerInnerComponent, DayPickerComponent, MonthPickerComponent, YearPickerComponent]
})
export class DatepickerModule {}
import {Component, OnInit} from '@angular/core';
import {CORE_DIRECTIVES, NgClass} from '@angular/common';
import {FORM_DIRECTIVES} from '@angular/forms';
import {Ng2BootstrapConfig, Ng2BootstrapTheme} from '../ng2-bootstrap-config';
import {DatePickerInnerComponent} from './datepicker-inner.component';
......@@ -91,8 +89,7 @@ const CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme ||
</template>
</tbody>
</table>
`,
directives: [FORM_DIRECTIVES, CORE_DIRECTIVES, NgClass]
`
})
export class DayPickerComponent implements OnInit {
......
import {Component, OnInit} from '@angular/core';
import {CORE_DIRECTIVES, NgClass} from '@angular/common';
import {FORM_DIRECTIVES} from '@angular/forms';
import {DatePickerInnerComponent} from './datepicker-inner.component';
import {Ng2BootstrapConfig} from '../ng2-bootstrap-config';
......@@ -62,8 +60,7 @@ const CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme] ||
</tr>
</tbody>
</table>
`,
directives: [FORM_DIRECTIVES, CORE_DIRECTIVES, NgClass]
`
})
export class MonthPickerComponent implements OnInit {
public title:string;
......
import {Component, OnInit} from '@angular/core';
import {CORE_DIRECTIVES, NgClass} from '@angular/common';
import {FORM_DIRECTIVES} from '@angular/forms';
import {Ng2BootstrapConfig} from '../ng2-bootstrap-config';
import {DatePickerInnerComponent} from './datepicker-inner.component';
......@@ -67,8 +65,7 @@ const CURRENT_THEME_TEMPLATE:any = TEMPLATE_OPTIONS[Ng2BootstrapConfig.theme] ||
</tr>
</tbody>
</table>
`,
directives: [FORM_DIRECTIVES, CORE_DIRECTIVES, NgClass]
`
})
export class YearPickerComponent implements OnInit {
public datePicker:DatePickerInnerComponent;
......
import {Component, OnInit, ElementRef, Renderer, Self} from '@angular/core';
import {NgClass} from '@angular/common';
import {NgModel} from '@angular/forms';
import {PaginationComponent} from './pagination.component';
......@@ -24,8 +23,7 @@ const PAGER_TEMPLATE = `
/* tslint:disable */
@Component({
selector: 'pager[ngModel]',
template: PAGER_TEMPLATE,
directives: [NgClass]
template: PAGER_TEMPLATE
})
/* tslint:enable */
export class PagerComponent extends PaginationComponent implements OnInit {
......
import {
Component, OnInit, Input, Output, ElementRef, EventEmitter, Self, Renderer
} from '@angular/core';
import {NgFor, NgIf} from '@angular/common';
import {ControlValueAccessor, NgModel} from '@angular/forms';
import {KeyAttribute} from '../common';
......@@ -75,7 +74,6 @@ const PAGINATION_TEMPLATE = `
@Component({
selector: 'pagination[ngModel]',
template: PAGINATION_TEMPLATE,
directives: [NgFor, NgIf]
})
/* tslint:enable */
export class PaginationComponent implements ControlValueAccessor, OnInit, PaginationConfig, KeyAttribute {
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {PaginationComponent} from './pagination.component';
import {PagerComponent} from './pager.component';
@NgModule({
imports: [CommonModule],
declarations: [PaginationComponent, PagerComponent],
exports: [PaginationComponent, PagerComponent]
})
......
import {Component, OnInit, OnDestroy, Input, Host} from '@angular/core';
import {NgClass, NgStyle} from '@angular/common';
import {ProgressDirective} from './progress.directive';
// todo: number pipe
// todo: use query from progress?
@Component({
selector: 'bar',
directives: [NgClass, NgStyle],
template: `
<div class="progress-bar"
style="min-width: 0;"
......
import {Component, Input} from '@angular/core';
import {ProgressDirective} from './progress.directive';
import {BarComponent} from './bar.component';
@Component({
selector: 'progressbar',
directives: [ProgressDirective, BarComponent],
template: `
<div progress [animate]="animate" [max]="max">
<bar [type]="type" [value]="value">
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ProgressDirective} from './progress.directive';
import {BarComponent} from './bar.component';
import {ProgressbarComponent} from './progressbar.component';
@NgModule({
imports: [CommonModule],
declarations: [ProgressDirective, BarComponent, ProgressbarComponent],
exports: [ProgressDirective, BarComponent, ProgressbarComponent]
})
......
import {
Component, OnInit, Input, Output, HostListener, Self, EventEmitter
} from '@angular/core';
import {NgFor} from '@angular/common';
import {ControlValueAccessor, NgModel} from '@angular/forms';
import {global} from '@angular/core/src/facade/lang';
......@@ -13,7 +12,6 @@ const KeyboardEvent = (global as any).KeyboardEvent as KeyboardEvent;
/* tslint:disable */
selector: 'rating[ngModel]',
/* tslint:enable */
directives: [NgFor],
template: `
<span (mouseleave)="reset()" (keydown)="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" [attr.aria-valuemax]="range.length" [attr.aria-valuenow]="value">
<template ngFor let-r [ngForOf]="range" let-index="index">
......
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RatingComponent} from './rating.component';
@NgModule({
imports: [CommonModule],
declarations: [RatingComponent],
exports: [RatingComponent]
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment