Skip to content

Commit b15cea2

Browse files
authored
hotfix(typescript): some angular setups can't handle .forRoot() retur… (#6689)
* hotfix(typescript): some angular setups can't handle .forRoot() returning just module * 18.1.1 * chore(version): version bumped
1 parent 2c7d6f0 commit b15cea2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+135
-82
lines changed

apps/ngx-bootstrap-docs/src/assets/css/style.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
@import "bs-datepicker";
33

44
/* HEADER */
5-
5+
.bs-datepicker-head {
6+
width: 150px;
7+
}
68
header {
79
padding: 10px 50px 10px 30px;
810
height: $header-height;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "18.1.0"
2+
"version": "18.1.1"
33
}

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap-base",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"license": "MIT",
55
"author": "Dmitriy Shekhovtsov <[email protected]>",
66
"schematics": "./schematics/src/collection.json",

src/accordion/accordion.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22

33
import { AccordionComponent } from './accordion.component';
44
import { AccordionPanelComponent } from './accordion-group.component';
@@ -9,7 +9,10 @@ import { AccordionPanelComponent } from './accordion-group.component';
99
})
1010
export class AccordionModule {
1111
// @deprecated method not required anymore, will be deleted in v19.0.0
12-
static forRoot() {
13-
return AccordionModule;
12+
static forRoot(): ModuleWithProviders<AccordionModule> {
13+
return {
14+
ngModule: AccordionModule,
15+
providers: []
16+
};
1417
}
1518
}

src/accordion/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/accordion",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/alert/alert.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22
import { AlertComponent } from './alert.component';
33

44
@NgModule({
@@ -7,7 +7,10 @@ import { AlertComponent } from './alert.component';
77
})
88
export class AlertModule {
99
// @deprecated method not required anymore, will be deleted in v19.0.0
10-
static forRoot() {
11-
return AlertModule;
10+
static forRoot(): ModuleWithProviders<AlertModule> {
11+
return {
12+
ngModule: AlertModule,
13+
providers: []
14+
};
1215
}
1316
}

src/alert/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/alert",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/buttons/buttons.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22

33
import { ButtonCheckboxDirective } from './button-checkbox.directive';
44
import { ButtonRadioDirective } from './button-radio.directive';
@@ -10,7 +10,10 @@ import { ButtonRadioGroupDirective } from './button-radio-group.directive';
1010
})
1111
export class ButtonsModule {
1212
// @deprecated method not required anymore, will be deleted in v19.0.0
13-
static forRoot() {
14-
return ButtonsModule;
13+
static forRoot(): ModuleWithProviders<ButtonsModule> {
14+
return {
15+
ngModule: ButtonsModule,
16+
providers: []
17+
};
1518
}
1619
}

src/buttons/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/buttons",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/carousel/carousel.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22

33
import { CarouselComponent } from './carousel.component';
44
import { SlideComponent } from './slide.component';
@@ -9,7 +9,10 @@ import { SlideComponent } from './slide.component';
99
})
1010
export class CarouselModule {
1111
// @deprecated method not required anymore, will be deleted in v19.0.0
12-
static forRoot() {
13-
return CarouselModule;
12+
static forRoot(): ModuleWithProviders<CarouselModule> {
13+
return {
14+
ngModule: CarouselModule,
15+
providers: []
16+
};
1417
}
1518
}

src/carousel/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/carousel",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/chronos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/chronos",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/collapse/collapse.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22

33
import { CollapseDirective } from './collapse.directive';
44

@@ -8,7 +8,10 @@ import { CollapseDirective } from './collapse.directive';
88
})
99
export class CollapseModule {
1010
// @deprecated method not required anymore, will be deleted in v19.0.0
11-
static forRoot() {
12-
return CollapseModule;
11+
static forRoot(): ModuleWithProviders<CollapseModule> {
12+
return {
13+
ngModule: CollapseModule,
14+
providers: []
15+
};
1316
}
1417
}

src/collapse/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/collapse",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/component-loader/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/component-loader",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/datepicker/bs-datepicker.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { ModuleWithProviders, NgModule } from '@angular/core';
33

44
import { TooltipModule } from 'ngx-bootstrap/tooltip';
55
import { TimepickerModule } from 'ngx-bootstrap/timepicker';
@@ -64,7 +64,10 @@ import { BsYearsCalendarViewComponent } from './themes/bs/bs-years-calendar-view
6464
})
6565
export class BsDatepickerModule {
6666
// @deprecated method not required anymore, will be deleted in v19.0.0
67-
static forRoot() {
68-
return BsDatepickerModule;
67+
static forRoot(): ModuleWithProviders<BsDatepickerModule> {
68+
return {
69+
ngModule: BsDatepickerModule,
70+
providers: []
71+
};
6972
}
7073
}

src/datepicker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/datepicker",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/dropdown/bs-dropdown.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22

33
import { BsDropdownContainerComponent } from './bs-dropdown-container.component';
44
import { BsDropdownMenuDirective } from './bs-dropdown-menu.directive';
@@ -21,7 +21,10 @@ import { BsDropdownDirective } from './bs-dropdown.directive';
2121
})
2222
export class BsDropdownModule {
2323
// @deprecated method not required anymore, will be deleted in v19.0.0
24-
static forRoot() {
25-
return BsDropdownModule;
24+
static forRoot(): ModuleWithProviders<BsDropdownModule> {
25+
return {
26+
ngModule: BsDropdownModule,
27+
providers: []
28+
};
2629
}
2730
}

src/dropdown/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/dropdown",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/focus-trap/focus-trap.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { FocusTrapDirective } from './focus-trap';
@@ -9,7 +9,10 @@ import { FocusTrapDirective } from './focus-trap';
99
})
1010
export class FocusTrapModule {
1111
// @deprecated method not required anymore, will be deleted in v19.0.0
12-
static forRoot() {
13-
return FocusTrapModule;
12+
static forRoot(): ModuleWithProviders<FocusTrapModule> {
13+
return {
14+
ngModule: FocusTrapModule,
15+
providers: []
16+
};
1417
}
1518
}

src/focus-trap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/focus-trap",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/locale/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/locale",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/mini-ngrx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/mini-ngrx",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/modal/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/modal",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/pagination/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/pagination",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/pagination/pagination.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CommonModule } from '@angular/common';
2-
import { NgModule } from '@angular/core';
2+
import { ModuleWithProviders, NgModule } from '@angular/core';
33

44
import { PagerComponent } from './pager.component';
55
import { PaginationComponent } from './pagination.component';
@@ -10,7 +10,10 @@ import { PaginationComponent } from './pagination.component';
1010
})
1111
export class PaginationModule {
1212
// @deprecated method not required anymore, will be deleted in v19.0.0
13-
static forRoot() {
14-
return PaginationModule;
13+
static forRoot(): ModuleWithProviders<PaginationModule> {
14+
return {
15+
ngModule: PaginationModule,
16+
providers: []
17+
};
1518
}
1619
}

src/popover/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/popover",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/popover/popover.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22
import { CommonModule } from '@angular/common';
33

44
import { PopoverDirective } from './popover.directive';
@@ -10,7 +10,10 @@ import { PopoverContainerComponent } from './popover-container.component';
1010
})
1111
export class PopoverModule {
1212
// @deprecated method not required anymore, will be deleted in v19.0.0
13-
static forRoot() {
14-
return PopoverModule;
13+
static forRoot(): ModuleWithProviders<PopoverModule> {
14+
return {
15+
ngModule: PopoverModule,
16+
providers: []
17+
};
1518
}
1619
}

src/positioning/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/positioning",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/progressbar/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/progressbar",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

src/progressbar/progressbar.module.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NgModule } from '@angular/core';
1+
import { ModuleWithProviders, NgModule } from '@angular/core';
22

33
import { BarComponent } from './bar.component';
44
import { ProgressbarComponent } from './progressbar.component';
@@ -9,7 +9,10 @@ import { ProgressbarComponent } from './progressbar.component';
99
})
1010
export class ProgressbarModule {
1111
// @deprecated method not required anymore, will be deleted in v19.0.0
12-
static forRoot() {
13-
return ProgressbarModule;
12+
static forRoot(): ModuleWithProviders<ProgressbarModule> {
13+
return {
14+
ngModule: ProgressbarModule,
15+
providers: []
16+
};
1417
}
1518
}

src/rating/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-bootstrap/rating",
3-
"version": "18.1.0",
3+
"version": "18.1.1",
44
"author": "Dmitriy Shekhovtsov <[email protected]>",
55
"license": "MIT"
66
}

0 commit comments

Comments
 (0)