Skip to content

Commit

Permalink
fix(datepicker): bs date range picker config added to correct provider
Browse files Browse the repository at this point in the history
  • Loading branch information
valorkin committed Jan 20, 2018
1 parent e385c03 commit 446cdf9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 23 deletions.
38 changes: 20 additions & 18 deletions src/datepicker/bs-datepicker.module.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
import { CommonModule } from '@angular/common';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { ComponentLoaderFactory } from '../component-loader/component-loader.factory';
import { PositioningService } from '../positioning/positioning.service';

import { warnOnce } from '../utils/warn-once';
import { BsDatepickerInputDirective } from './bs-datepicker-input.directive';
import { BsDatepickerDirective } from './bs-datepicker.component';
import { BsDatepickerConfig } from './bs-datepicker.config';
import { BsDaterangepickerInputDirective } from './bs-daterangepicker-input.directive';
import { BsDaterangepickerDirective } from './bs-daterangepicker.component';
import { BsDaterangepickerConfig } from './bs-daterangepicker.config';

import { BsLocaleService } from './bs-locale.service';
import { BsDatepickerActions } from './reducer/bs-datepicker.actions';
import { BsDatepickerEffects } from './reducer/bs-datepicker.effects';
import { BsDatepickerStore } from './reducer/bs-datepicker.store';
import { BsCalendarLayoutComponent } from './themes/bs/bs-calendar-layout.component';
import { BsCurrentDateViewComponent } from './themes/bs/bs-current-date-view.component';
import { BsCustomDatesViewComponent } from './themes/bs/bs-custom-dates-view.component';
import { BsDatepickerContainerComponent } from './themes/bs/bs-datepicker-container.component';
import { BsDatepickerDayDecoratorComponent } from './themes/bs/bs-datepicker-day-decorator.directive';
import { BsDatepickerNavigationViewComponent } from './themes/bs/bs-datepicker-navigation-view.component';
import { BsDaysCalendarViewComponent } from './themes/bs/bs-days-calendar-view.component';
import { BsDatepickerEffects } from './reducer/bs-datepicker.effects';
import { BsDaterangepickerContainerComponent } from './themes/bs/bs-daterangepicker-container.component';
import { BsDaterangepickerDirective } from './bs-daterangepicker.component';
import { BsDatepickerDirective } from './bs-datepicker.component';
import { ComponentLoaderFactory } from '../component-loader/component-loader.factory';
import { PositioningService } from '../positioning/positioning.service';
import { BsDatepickerDayDecoratorComponent } from './themes/bs/bs-datepicker-day-decorator.directive';
import { BsDaysCalendarViewComponent } from './themes/bs/bs-days-calendar-view.component';
import { BsMonthCalendarViewComponent } from './themes/bs/bs-months-calendar-view.component';
import { BsYearsCalendarViewComponent } from './themes/bs/bs-years-calendar-view.component';
import { BsCustomDatesViewComponent } from './themes/bs/bs-custom-dates-view.component';
import { BsCurrentDateViewComponent } from './themes/bs/bs-current-date-view.component';
import { BsTimepickerViewComponent } from './themes/bs/bs-timepicker-view.component';
import { BsDatepickerConfig } from './bs-datepicker.config';
import { BsCalendarLayoutComponent } from './themes/bs/bs-calendar-layout.component';
import { BsDatepickerInputDirective } from './bs-datepicker-input.directive';
import { BsDaterangepickerInputDirective } from './bs-daterangepicker-input.directive';

import { BsLocaleService } from './bs-locale.service';

import { warnOnce } from '../utils/warn-once';
import { BsYearsCalendarViewComponent } from './themes/bs/bs-years-calendar-view.component';

const _exports = [
BsDatepickerContainerComponent,
Expand Down Expand Up @@ -76,6 +77,7 @@ export class BsDatepickerModule {
BsDatepickerStore,
BsDatepickerActions,
BsDatepickerConfig,
BsDaterangepickerConfig,
BsDatepickerEffects,
BsLocaleService
]
Expand Down
7 changes: 3 additions & 4 deletions src/datepicker/datepicker.module.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { CommonModule } from '@angular/common';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { ModuleWithProviders, NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BsDaterangepickerConfig } from './bs-daterangepicker.config';

import { DatePickerInnerComponent } from './datepicker-inner.component';
import { DatePickerComponent } from './datepicker.component';
import { DatepickerConfig } from './datepicker.config';
import { DayPickerComponent } from './daypicker.component';
import { MonthPickerComponent } from './monthpicker.component';
import { YearPickerComponent } from './yearpicker.component';
import { DatepickerConfig } from './datepicker.config';

@NgModule({
imports: [CommonModule, FormsModule],
Expand All @@ -30,6 +29,6 @@ import { DatepickerConfig } from './datepicker.config';
})
export class DatepickerModule {
static forRoot(): ModuleWithProviders {
return { ngModule: DatepickerModule, providers: [DatepickerConfig, BsDaterangepickerConfig] };
return { ngModule: DatepickerModule, providers: [DatepickerConfig] };
}
}
1 change: 1 addition & 0 deletions src/datepicker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export { BsDatepickerModule } from './bs-datepicker.module';
export { BsDatepickerDirective } from './bs-datepicker.component';
export { BsDaterangepickerDirective } from './bs-daterangepicker.component';
export { BsDatepickerConfig } from './bs-datepicker.config';
export { BsDaterangepickerConfig } from './bs-daterangepicker.config';
export { BsLocaleService } from './bs-locale.service';
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,20 @@ import { AlertModule } from './alert/alert.module';
import { ButtonsModule } from './buttons/buttons.module';
import { CarouselModule } from './carousel/carousel.module';
import { CollapseModule } from './collapse/collapse.module';
import { BsDaterangepickerConfig } from './datepicker/bs-daterangepicker.config';
import { DatepickerModule } from './datepicker/datepicker.module';
import { BsDropdownModule } from './dropdown/bs-dropdown.module';
import { ModalModule } from './modal/modal.module';
import { PaginationModule } from './pagination/pagination.module';
import { PopoverModule } from './popover/popover.module';
import { ProgressbarModule } from './progressbar/progressbar.module';
import { RatingModule } from './rating/rating.module';
import { SortableModule } from './sortable/index';
import { TabsModule } from './tabs/tabs.module';
import { TimepickerModule } from './timepicker/timepicker.module';
import { TooltipModule } from './tooltip/tooltip.module';
import { TypeaheadModule } from './typeahead/typeahead.module';
import { PopoverModule } from './popover/popover.module';

export { listLocales } from './chronos/locale/locales';
export { setTheme } from './utils/theme-provider';

Expand Down Expand Up @@ -53,6 +55,7 @@ export {
YearPickerComponent,
BsDatepickerModule,
BsDatepickerConfig,
BsDaterangepickerConfig,
BsLocaleService
} from './datepicker/index';

Expand Down

0 comments on commit 446cdf9

Please sign in to comment.