From 27639ead64ac3a9cd8b7eb867a78937a84c978ec Mon Sep 17 00:00:00 2001 From: Vitaliy Makogon Date: Wed, 19 Jun 2019 16:02:22 +0300 Subject: [PATCH] feat(datepicker): add ivy support (also fix ci) (#5268) --- .travis.yml | 8 ++++-- scripts/ci/npm-ci-key.sh | 3 +++ src/common/public_api.ts | 22 +++++++++++----- src/datepicker/bs-datepicker.module.ts | 36 +++++++++++++------------- src/datepicker/public_api.ts | 6 +++++ 5 files changed, 48 insertions(+), 27 deletions(-) create mode 100755 scripts/ci/npm-ci-key.sh diff --git a/.travis.yml b/.travis.yml index 7c61e4a2a7..3e0e0b5c05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ sudo: false language: node_js node_js: "10" +services: + - xvfb + notifications: email: false @@ -17,7 +20,7 @@ env: - BROWSER_PROVIDER_READY_FILE=/tmp/sauce-connect-ready - LOGS_DIR=/tmp/logs - CYPRESS_RECORD_KEY=4aa7a1c0-3a4f-444e-b324-6fc305a543a8 - - NPM_AUTH_TOKEN_CI_PR=c687305b-fd76-4d02-9f64-8ecdbc31d9a4 + - NPM_AUTH_TOKEN_CI_PR=$(./scripts/ci/npm-ci-key.sh) # test cypress smoke testSmokeCy: &testSmokeCy @@ -45,8 +48,9 @@ stages: if: branch = development AND type = push OR tag =~ ^v\d+ before_install: -- sh -e /etc/init.d/xvfb start - rm -rf node_modules/ngx-bootstrap +- sudo apt-get install libgconf-2-4 +- npm install tslint install: - npm ci diff --git a/scripts/ci/npm-ci-key.sh b/scripts/ci/npm-ci-key.sh new file mode 100755 index 0000000000..bf764e8846 --- /dev/null +++ b/scripts/ci/npm-ci-key.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo U2FsdGVkX1+75DRt/Y01ZXdDEZzrscM41DvlkR9RMklJVK2I5PlYxYSbd0TBZ4PrMy4FPz9tJMVi2GTohxxdrg== | openssl enc -aes-128-cbc -a -d -salt -pass pass:valorkin diff --git a/src/common/public_api.ts b/src/common/public_api.ts index cbe40398cb..f3dc2614ee 100644 --- a/src/common/public_api.ts +++ b/src/common/public_api.ts @@ -33,6 +33,7 @@ export { AlertComponent, AlertConfig, AlertModule } from 'ngx-bootstrap/alert'; export { ButtonCheckboxDirective, ButtonRadioDirective, + ButtonRadioGroupDirective, ButtonsModule } from 'ngx-bootstrap/buttons'; @@ -46,19 +47,26 @@ export { export { CollapseDirective, CollapseModule } from 'ngx-bootstrap/collapse'; export { + BsDatepickerConfig, + BsDatepickerContainerComponent, + BsDatepickerDirective, + BsDatepickerInlineContainerComponent, + BsDatepickerInlineDirective, + BsDatepickerInputDirective, + BsDatepickerModule, + BsDaterangepickerConfig, + BsDaterangepickerContainerComponent, + BsDaterangepickerDirective, + BsDaterangepickerInputDirective, + BsLocaleService, DateFormatter, DatePickerComponent, DatepickerConfig, + DatePickerInnerComponent, DatepickerModule, DayPickerComponent, MonthPickerComponent, - YearPickerComponent, - BsDatepickerModule, - BsDatepickerConfig, - BsDaterangepickerConfig, - BsLocaleService, - BsDaterangepickerDirective, - BsDatepickerDirective + YearPickerComponent } from 'ngx-bootstrap/datepicker'; export { diff --git a/src/datepicker/bs-datepicker.module.ts b/src/datepicker/bs-datepicker.module.ts index e3b8f89c32..3a00240def 100644 --- a/src/datepicker/bs-datepicker.module.ts +++ b/src/datepicker/bs-datepicker.module.ts @@ -29,19 +29,6 @@ import { BsTimepickerViewComponent } from './themes/bs/bs-timepicker-view.compon import { BsYearsCalendarViewComponent } from './themes/bs/bs-years-calendar-view.component'; import { BsDatepickerInlineContainerComponent } from './themes/bs/bs-datepicker-inline-container.component'; -const _exports = [ - BsDatepickerContainerComponent, - BsDaterangepickerContainerComponent, - BsDatepickerInlineContainerComponent, - - BsDatepickerDirective, - BsDatepickerInputDirective, - - BsDaterangepickerInputDirective, - BsDaterangepickerDirective, - - BsDatepickerInlineDirective -]; @NgModule({ imports: [CommonModule], @@ -50,22 +37,35 @@ const _exports = [ BsCurrentDateViewComponent, BsDatepickerNavigationViewComponent, BsTimepickerViewComponent, - BsCalendarLayoutComponent, BsDaysCalendarViewComponent, BsMonthCalendarViewComponent, BsYearsCalendarViewComponent, - BsCustomDatesViewComponent, - - ..._exports + BsDatepickerContainerComponent, + BsDaterangepickerContainerComponent, + BsDatepickerInlineContainerComponent, + BsDatepickerDirective, + BsDatepickerInputDirective, + BsDaterangepickerInputDirective, + BsDaterangepickerDirective, + BsDatepickerInlineDirective ], entryComponents: [ BsDatepickerContainerComponent, BsDaterangepickerContainerComponent, BsDatepickerInlineContainerComponent ], - exports: _exports + exports: [ + BsDatepickerContainerComponent, + BsDaterangepickerContainerComponent, + BsDatepickerInlineContainerComponent, + BsDatepickerDirective, + BsDatepickerInputDirective, + BsDaterangepickerInputDirective, + BsDaterangepickerDirective, + BsDatepickerInlineDirective + ] }) export class BsDatepickerModule { static forRoot(): ModuleWithProviders { diff --git a/src/datepicker/public_api.ts b/src/datepicker/public_api.ts index 499ea85065..7aab83eea1 100644 --- a/src/datepicker/public_api.ts +++ b/src/datepicker/public_api.ts @@ -1,15 +1,21 @@ export { BsDatepickerConfig } from './bs-datepicker.config'; +export { BsDatepickerContainerComponent } from './themes/bs/bs-datepicker-container.component'; export { BsDatepickerDirective } from './bs-datepicker.component'; export { BsDatepickerInlineConfig } from './bs-datepicker-inline.config'; +export { BsDatepickerInlineContainerComponent } from './themes/bs/bs-datepicker-inline-container.component'; export { BsDatepickerInlineDirective } from './bs-datepicker-inline.component'; +export { BsDatepickerInputDirective } from './bs-datepicker-input.directive'; +export { BsDaterangepickerInputDirective } from './bs-daterangepicker-input.directive'; export { BsDatepickerModule } from './bs-datepicker.module'; export { BsDatepickerViewMode, DatepickerDateCustomClasses } from './models'; export { BsDaterangepickerConfig } from './bs-daterangepicker.config'; +export { BsDaterangepickerContainerComponent } from './themes/bs/bs-daterangepicker-container.component'; export { BsDaterangepickerDirective } from './bs-daterangepicker.component'; export { BsLocaleService } from './bs-locale.service'; export { DateFormatter } from './date-formatter'; export { DatePickerComponent } from './datepicker.component'; export { DatepickerConfig } from './datepicker.config'; +export { DatePickerInnerComponent } from './datepicker-inner.component'; export { DatepickerModule } from './datepicker.module'; export { DayPickerComponent } from './daypicker.component'; export { MonthPickerComponent } from './monthpicker.component';