Skip to content

feat(moduleless): migrating to standalone modules support #6669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 34 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
20265c5
feat(accordion): migrated to standalone
lexasq Jul 16, 2024
24bfd94
feat(accordion): migrated to standalone
lexasq Jul 16, 2024
c8a4b16
feat(alert)): migrated to standalone
lexasq Jul 16, 2024
2b1deef
feat(buttons): migrated to standalone
lexasq Jul 16, 2024
95475c4
feat(carousel): migrated to standalone
lexasq Jul 16, 2024
aaef99a
feat(collapse): migrated to standalone
lexasq Jul 16, 2024
ae1862d
feat(datepicker): migrated to standalone
lexasq Jul 16, 2024
b21af22
fix(accordion): fixed tests
lexasq Jul 17, 2024
23290de
fix(accordion): fixed tests
lexasq Jul 17, 2024
33c2415
fix(accordion): fixed tests
lexasq Jul 17, 2024
95c5c78
fix(accordion): fixed tests
lexasq Jul 17, 2024
ca191eb
fix(accordion): fixed tests
lexasq Jul 17, 2024
aeaa4e7
fix(carousel): fixed tests
lexasq Jul 17, 2024
68c3016
feat(dropdown): added moduleless support
lexasq Jul 17, 2024
17978bd
feat(focustrap): added moduleless support
lexasq Jul 18, 2024
abbead9
feat(modal): added moduleless support
lexasq Jul 18, 2024
c5dcf6c
feat(pagination): added moduleless support
lexasq Jul 18, 2024
76a1b15
feat(popover): added moduleless support
lexasq Jul 18, 2024
6b58679
feat(progressbar): added moduleless support
lexasq Jul 18, 2024
326a2b7
feat(rating): added moduleless support
lexasq Jul 18, 2024
a0d1021
feat(sortable): added moduleless support
lexasq Jul 18, 2024
2a822c7
feat(tabs): added moduleless support
lexasq Jul 18, 2024
c630f65
feat(timepicker): added moduleless support
lexasq Jul 19, 2024
d04f7bb
feat(timepicker): added moduleless support
lexasq Jul 19, 2024
7d2e697
feat(typeahead): added moduleless support
lexasq Jul 19, 2024
9ac1735
feat(typeahead): added moduleless support
lexasq Jul 19, 2024
2876b79
fix(rating): tests ajust to moduleless
lexasq Jul 19, 2024
a532cef
fix(progressbar): tests ajust to moduleless
lexasq Jul 19, 2024
7eface6
chore(docs): added deprecations
lexasq Jul 22, 2024
08eb752
chore(docs): updated documentation regarding standalone usage
lexasq Oct 15, 2024
4c55d85
chore(docs): updated documentation regarding standalone usage
lexasq Oct 15, 2024
f82fee9
fix(modal): fixed nested backdrop issue
lexasq Oct 16, 2024
238fecd
18.1.0
lexasq Oct 16, 2024
62dfb8a
chore(version): bumped version to 18.1.0
lexasq Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ import { TooltipModule } from 'ngx-bootstrap/tooltip';

@NgModule({
...
imports: [TooltipModule.forRoot(),...]
imports: [TooltipModule,...]
...
})
```
Expand Down
2 changes: 1 addition & 1 deletion apps/ngx-bootstrap-docs/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { routes } from './app.routing';
bootstrap: [AppComponent], imports: [BrowserAnimationsModule,
DocsModule,
RouterModule.forRoot(routes, { useHash: environment.useHash }),
BsDropdownModule.forRoot()], providers: [
BsDropdownModule], providers: [
{ provide: NgApiDoc, useValue: ngdoc },
{ provide: DOCS_TOKENS, useValue: routes },
{ provide: SIDEBAR_ROUTES, useValue: SidebarRoutesStructure },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "18.0.2"
"version": "18.1.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h2 id="getting-started">Schematics</h2>
],
<span class="kwd">imports</span>: [
<span class="pln"> &hellip;</span>
<span class="lit">AccordionModule.forRoot()</span>,
<span class="lit">AccordionModule</span>,
],
bootstrap: [AppComponent]
<span class="pun">{{'}'}}</span>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export { ExamplesComponent } from './examples.component';
CommonModule,
NgApiDocModule,
RouterModule,
TabsModule.forRoot(),
TabsModule,
],
exports: [
ExamplesComponent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import { ${className === 'DemoModalServiceFromComponent' ? `${className}, ModalC
declarations: [${className === 'DemoModalServiceFromComponent' ? `${className}, ModalContentComponent` : className}],
imports: [
${moduleData.moduleName}.forRoot(),
${className === 'DemoModalWithPopupsComponent' ? `TooltipModule.forRoot(),
PopoverModule.forRoot(),` : ''}
${className === 'DemoModalWithPopupsComponent' ? `TooltipModule,
PopoverModule,` : ''}
BrowserAnimationsModule,
CommonModule,
FormsModule,
Expand Down
4 changes: 2 additions & 2 deletions libs/common-docs/src/lib/docs.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export { ThemesComponent } from './common/themes/themes.component';
NgApiDocModule,
ExamplesComponentModule,
ApiSectionsComponentModule,
TabsModule.forRoot(),
BsDropdownModule.forRoot(),
TabsModule,
BsDropdownModule,
RouterModule
],
exports: [
Expand Down
2 changes: 1 addition & 1 deletion libs/doc-pages/accordion/src/lib/accordion.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export { AccordionSectionComponent } from './accordion-section.component';
...DEMO_COMPONENTS
],
imports: [
AccordionModule.forRoot(),
AccordionModule,
CommonModule,
FormsModule,
DocsModule,
Expand Down
20 changes: 19 additions & 1 deletion libs/doc-pages/accordion/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
### Standalone component usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AccordionComponent, AccordionPanelComponent } from 'ngx-bootstrap/accordion';

@Component({
standalone: true,
imports: [
BrowserAnimationsModule,
AccordionComponent,
AccordionPanelComponent
...
]
})
export class AppComponent(){}

Also should be added web-animations-js polyfill for IE browser (Edge)
### Module usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AccordionModule } from 'ngx-bootstrap/accordion';

@NgModule({
imports: [
BrowserAnimationsModule,
AccordionModule.forRoot(),
AccordionModule,
...
]
})
Expand Down
2 changes: 1 addition & 1 deletion libs/doc-pages/alerts/src/lib/alerts.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export { AlertsSectionComponent } from './alerts-section.component';
...DEMO_COMPONENTS
],
imports: [
AlertModule.forRoot(),
AlertModule,
CommonModule,
DocsModule,
RouterModule.forChild(routes)
Expand Down
13 changes: 12 additions & 1 deletion libs/doc-pages/alerts/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
### Standalone component usage
import { AlertComponent } from 'ngx-bootstrap/alert';

@Components({
standalone: true,
imports: [AlertComponent,...]
})
export class AppComponent(){}


### Module usage
import { AlertModule } from 'ngx-bootstrap/alert';

@NgModule({
imports: [AlertModule.forRoot(),...]
imports: [AlertModule,...]
})
export class AppModule(){}
2 changes: 1 addition & 1 deletion libs/doc-pages/buttons/src/lib/buttons.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export { ButtonsSectionComponent } from './buttons-section.component';
CommonModule,
DocsModule,
RouterModule.forChild(routes),
ButtonsModule.forRoot()
ButtonsModule
],
exports: [ButtonsSectionComponent]
})
Expand Down
15 changes: 14 additions & 1 deletion libs/doc-pages/buttons/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
### Standalone component usage
import { ButtonsModule } from 'ngx-bootstrap/buttons';

@Component({
imports: [
ButtonsModule,
...
]
})
export class AppComponent(){}


### Module usage
import { ButtonsModule } from 'ngx-bootstrap/buttons';

@NgModule({
imports: [ButtonsModule.forRoot(),...]
imports: [ButtonsModule,...]
})
export class AppModule(){}
2 changes: 1 addition & 1 deletion libs/doc-pages/carousel/src/lib/carousel.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export { CarouselSectionComponent } from './carousel-section.component';
...DEMO_COMPONENTS
],
imports: [
CarouselModule.forRoot(),
CarouselModule,
CommonModule,
FormsModule,
DocsModule,
Expand Down
15 changes: 14 additions & 1 deletion libs/doc-pages/carousel/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
### Standalone component usage
import { CarouselModule } from 'ngx-bootstrap/carousel';

@Component({
imports: [
CarouselModule,
...
]
})
export class AppComponent(){}


### Module usage
import { CarouselModule } from 'ngx-bootstrap/carousel';

@NgModule({
imports: [CarouselModule.forRoot(),...]
imports: [CarouselModule,...]
})
export class AppModule(){}
2 changes: 1 addition & 1 deletion libs/doc-pages/collapse/src/lib/collapse.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export { CollapseSectionComponent } from './collapse-section.component';
...DEMO_COMPONENTS
],
imports: [
CollapseModule.forRoot(),
CollapseModule,
CommonModule,
FormsModule,
DocsModule,
Expand Down
18 changes: 17 additions & 1 deletion libs/doc-pages/collapse/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
### Standalone component usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { CollapseDirective } from 'ngx-bootstrap/collapse';

@Component({
imports: [
BrowserAnimationsModule,
CollapseDirective,
...
]
})
export class AppComponent(){}


### Module usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { CollapseModule } from 'ngx-bootstrap/collapse';

@NgModule({
imports: [
BrowserAnimationsModule,
CollapseModule.forRoot(),
CollapseModule,
...
]
})
Expand Down
4 changes: 2 additions & 2 deletions libs/doc-pages/datepicker/src/lib/datepicker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ locales.forEach((locale: LocaleData) => {
...DEMO_COMPONENTS
],
imports: [
BsDatepickerModule.forRoot(),
TabsModule.forRoot(),
BsDatepickerModule,
TabsModule,
CommonModule,
FormsModule,
ReactiveFormsModule,
Expand Down
4 changes: 2 additions & 2 deletions libs/doc-pages/datepicker/src/lib/demo-datepicker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ locales.forEach((locale: LocaleData) => {
...DEMO_COMPONENTS
],
imports: [
BsDatepickerModule.forRoot(),
TabsModule.forRoot(),
BsDatepickerModule,
TabsModule,
CommonModule,
FormsModule,
ReactiveFormsModule,
Expand Down
18 changes: 17 additions & 1 deletion libs/doc-pages/datepicker/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
### Standalone component usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';

@Components({
imports: [
BrowserAnimationsModule,
BsDatepickerModule,
...
]
})
export class AppComponents(){}


### Module usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';

@NgModule({
imports: [
BrowserAnimationsModule,
BsDatepickerModule.forRoot(),
BsDatepickerModule,
...
]
})
Expand Down
19 changes: 18 additions & 1 deletion libs/doc-pages/dropdown/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
### Standalone component usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { BsDropdownModule } from 'ngx-bootstrap/datepicker';

@Components({
standalone: true,
imports: [
BrowserAnimationsModule,
BsDropdownModule,
...
]
})
export class AppComponents(){}


### Module usage
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { BsDropdownModule } from 'ngx-bootstrap/dropdown';

@NgModule({
imports: [
BrowserAnimationsModule,
BsDropdownModule.forRoot()
BsDropdownModule
]
})
export class AppModule(){}
Expand Down
2 changes: 1 addition & 1 deletion libs/doc-pages/dropdown/src/lib/dropdown.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export { DropdownSectionComponent } from './dropdown-section.component';
...DEMO_COMPONENTS
],
imports: [
BsDropdownModule.forRoot(),
BsDropdownModule,
CommonModule,
FormsModule,
DocsModule,
Expand Down
14 changes: 13 additions & 1 deletion libs/doc-pages/modal/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
### Standalone component usage
import { ModalModule, BsModalService } from 'ngx-bootstrap/modal';

@Component({
standalone: true,
imports: [ModalModule,...], // module can be optional
providers: [BsModalService]
})
export class AppComponent(){}

### Module usage
import { ModalModule } from 'ngx-bootstrap/modal';

@NgModule({
imports: [ModalModule.forRoot(),...]
imports: [ModalModule,...],
providers: [BsModalService]
})
export class AppModule(){}
11 changes: 6 additions & 5 deletions libs/doc-pages/modal/src/lib/modal.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { ModalModule } from 'ngx-bootstrap/modal';
import { BsModalService, ModalModule } from 'ngx-bootstrap/modal';

import { DocsModule } from '@ngx-bootstrap-doc/docs';
import { ModalSectionComponent } from './modal-section.component';
Expand All @@ -24,14 +24,15 @@ export { ModalSectionComponent } from './modal-section.component';
...DEMO_COMPONENTS
],
imports: [
ModalModule.forRoot(),
PopoverModule.forRoot(),
TooltipModule.forRoot(),
ModalModule,
PopoverModule,
TooltipModule,
CommonModule,
FormsModule,
DocsModule,
RouterModule.forChild(routes)
],
exports: [ModalSectionComponent]
exports: [ModalSectionComponent],
providers: [BsModalService]
})
export class DemoModalModule {}
12 changes: 11 additions & 1 deletion libs/doc-pages/pagination/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
### Standalone component usage
import { PaginationModule } from 'ngx-bootstrap/pagination';

@Component({
standalone: true,
imports: [PaginationModule,...],
})
export class AppComponent(){}

### Module usage
import { PaginationModule } from 'ngx-bootstrap/pagination';

@NgModule({
imports: [PaginationModule.forRoot(),...]
imports: [PaginationModule,...]
})
export class AppModule(){}
2 changes: 1 addition & 1 deletion libs/doc-pages/pagination/src/lib/pagination.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export { PaginationSectionComponent } from './pagination-section.component';
...DEMO_COMPONENTS
],
imports: [
PaginationModule.forRoot(),
PaginationModule,
CommonModule,
FormsModule,
DocsModule,
Expand Down
Loading
Loading