Skip to content

Commit

Permalink
Merge branch 'development' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
lexasq authored Oct 21, 2024
2 parents b25b421 + b56863d commit be0d7c3
Show file tree
Hide file tree
Showing 189 changed files with 1,809 additions and 681 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Editor configuration, see http://editorconfig.org
# Editor configuration, see https://editorconfig.org
root = true

[*]
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ npm install ngx-bootstrap --save

Add wanted package to NgModule imports:

```
```ts
import { TooltipModule } from 'ngx-bootstrap/tooltip';

@NgModule({
...
imports: [TooltipModule.forRoot(),...]
imports: [TooltipModule,...]
...
})
```

Add component to your page:

```
```html
<button type="button" class="btn btn-primary"
tooltip="Vivamus sagittis lacus vel augue laoreet rutrum faucibus.">
Simple demo
Expand All @@ -126,14 +126,14 @@ This can be done with the css file directly in the index.html, or alternatively

- `Bootstrap 5`

```
```html
<!--- index.html -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
```

- `Bootstrap 4`

```
```html
<!--- index.html -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2">
```
Expand All @@ -148,7 +148,7 @@ have a customized version of bootstrap. The consequence is that the process of d
be failed, which can break the UI. In that case, we can still set the bootstrap version manually in the bootstrapping
component (i.e. `AppComponent`):

```
```ts
import { setTheme } from 'ngx-bootstrap/utils';

@Component({...})
Expand Down
5 changes: 2 additions & 3 deletions apps/ngx-bootstrap-docs/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { environment } from '../environments/environment';
Expand All @@ -15,8 +14,8 @@ import { routes } from './app.routing';
],
bootstrap: [AppComponent], imports: [BrowserAnimationsModule,
DocsModule,
RouterModule.forRoot(routes, { useHash: environment.useHash }),
BsDropdownModule.forRoot()], providers: [
RouterModule.forRoot(routes, { useHash: environment.useHash })
], providers: [
{ provide: NgApiDoc, useValue: ngdoc },
{ provide: DOCS_TOKENS, useValue: routes },
{ provide: SIDEBAR_ROUTES, useValue: SidebarRoutesStructure },
Expand Down
4 changes: 3 additions & 1 deletion apps/ngx-bootstrap-docs/src/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
@import "bs-datepicker";

/* HEADER */

.bs-datepicker-head {
width: 150px;
}
header {
padding: 10px 50px 10px 30px;
height: $header-height;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "18.0.0"
"version": "18.1.2"
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,22 @@ <h2 id="installation">
<a class="anchor-link" routerLink="." fragment="installation">#</a>
</h2>
<h4>Angular CLI way</h4>
<p>Make sure that your app uses modular approach and you have app.module.ts set as your starting point before you proceed</p>
<pre class="prettyprint lang-js prettyprinted">
<span class="kwd">import</span><span class="pln"> </span><span class="pun">{{'{'}}</span><span class="kwd"> platformBrowser </span><span
class="pun">{{'}'}}</span><span class="pln"> from </span><span class="str">'&#64;angular/platform-browser'</span><span
class="pun">;</span>
<span class="kwd">import</span><span class="pln"> </span><span class="pun">{{'{'}}</span><span class="kwd"> AppModule </span><span
class="pun">{{'}'}}</span><span class="pln"> from </span><span class="str">'./app.module'</span><span
class="pun">;</span>
<span class="pln">&nbsp;</span>
<span class="pun">platformBrowser().bootstrapModule(AppModule).catch((err) => console.error(err));</span>
</pre>
<!-- // main.ts-->
<!-- import { platformBrowser } from '&#64;angular/platform-browser';-->
<!-- import { AppModule } from './app.module';-->

<!-- platformBrowser().bootstrapModule(AppModule).catch((err) => console.error(err));-->
<p>Use the Angular CLI ng add command for updating your Angular project.</p>
<pre class="prettyprint lang-bash prettyprinted"><span class="pln">ng add ngx-bootstrap</span></pre>

Expand Down Expand Up @@ -233,7 +249,7 @@ <h2 id="compatibility">
</thead>
<tbody>
<tr>
<th>13.x.x</th>
<th>18.x.x</th>
<th>18.x.x</th>
<th>5.x.x or 4.x.x</th>
</tr>
Expand Down
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 @@ -44,8 +44,11 @@ export class TopMenuComponent implements AfterViewInit {
this.http
.get<{ url: string; version: string; unprefixedUrl: string }[]>('assets/json/versions.json')
.subscribe((data) => {
this.previousDocs.push(data[0]);
this.previousDocs = this.previousDocs.concat(data.reverse()).slice(0, -1);
this.previousDocs = data.sort((versionA, versionB) => {
const versionAsNumberA = Number(versionA.version.split('.').join(''));
const versionAsNumberB = Number(versionB.version.split('.').join(''));
return versionAsNumberB - versionAsNumberA;
});
});

this.http.get<{ version: string }>('assets/json/current-version.json').subscribe((data: { version: string }) => {
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
8 changes: 4 additions & 4 deletions libs/doc-pages/datepicker/src/lib/datepicker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
arLocale, bgLocale, caLocale, csLocale, daLocale, deLocale, enGbLocale, esDoLocale, esLocale, esUsLocale, etLocale, frLocale, heLocale,
hiLocale, hrLocale, fiLocale, glLocale, huLocale, idLocale, itLocale, jaLocale, kaLocale, kkLocale, koLocale, ltLocale, lvLocale, mnLocale, nbLocale,
nlBeLocale, nlLocale, plLocale, ptBrLocale, ruLocale, roLocale, skLocale, slLocale, sqLocale, svLocale, thLocale, thBeLocale, trLocale, viLocale,
zhCnLocale, ukLocale
zhCnLocale, ukLocale, frCaLocale
} from 'ngx-bootstrap/locale';

import { TabsModule } from 'ngx-bootstrap/tabs';
Expand All @@ -26,7 +26,7 @@ const locales = [
arLocale, bgLocale, caLocale, csLocale, daLocale, deLocale, enGbLocale, esDoLocale, esLocale, esUsLocale, etLocale, frLocale,
heLocale, hiLocale, hrLocale, fiLocale, glLocale, huLocale, idLocale, itLocale, jaLocale, kaLocale, kkLocale, koLocale, ltLocale, lvLocale, mnLocale,
nbLocale, nlBeLocale, nlLocale, plLocale, ptBrLocale, ruLocale, roLocale, skLocale, slLocale, sqLocale, svLocale, thLocale, thBeLocale,
trLocale, ukLocale, viLocale, zhCnLocale
trLocale, ukLocale, viLocale, zhCnLocale, frCaLocale
];

locales.forEach((locale: LocaleData) => {
Expand All @@ -43,8 +43,8 @@ locales.forEach((locale: LocaleData) => {
...DEMO_COMPONENTS
],
imports: [
BsDatepickerModule.forRoot(),
TabsModule.forRoot(),
BsDatepickerModule,
TabsModule,
CommonModule,
FormsModule,
ReactiveFormsModule,
Expand Down
8 changes: 4 additions & 4 deletions libs/doc-pages/datepicker/src/lib/demo-datepicker.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
arLocale, bgLocale, caLocale, csLocale, daLocale, deLocale, enGbLocale, esDoLocale, esLocale, esPrLocale, esUsLocale, etLocale, frLocale, heLocale,
hiLocale, hrLocale, fiLocale, glLocale, huLocale, idLocale, itLocale, jaLocale, kaLocale, kkLocale, koLocale, ltLocale, lvLocale, mnLocale, nbLocale,
nlBeLocale, nlLocale, plLocale, ptBrLocale, ruLocale, roLocale, skLocale, slLocale, sqLocale, svLocale, thLocale, thBeLocale, trLocale, viLocale,
zhCnLocale, ukLocale
zhCnLocale, ukLocale, frCaLocale
} from 'ngx-bootstrap/locale';

import { TabsModule } from 'ngx-bootstrap/tabs';
Expand All @@ -24,7 +24,7 @@ const locales = [
arLocale, bgLocale, caLocale, csLocale, daLocale, deLocale, enGbLocale, esDoLocale, esLocale, esPrLocale, esUsLocale, etLocale, frLocale,
heLocale, hiLocale, hrLocale, fiLocale, glLocale, huLocale, idLocale, itLocale, jaLocale, kaLocale, kkLocale, koLocale, ltLocale, lvLocale, mnLocale,
nbLocale, nlBeLocale, nlLocale, plLocale, ptBrLocale, ruLocale, roLocale, skLocale, slLocale, sqLocale, svLocale, thLocale, thBeLocale,
trLocale, ukLocale, viLocale, zhCnLocale
trLocale, ukLocale, viLocale, zhCnLocale, frCaLocale
];

locales.forEach((locale: LocaleData) => {
Expand All @@ -41,8 +41,8 @@ locales.forEach((locale: LocaleData) => {
...DEMO_COMPONENTS
],
imports: [
BsDatepickerModule.forRoot(),
TabsModule.forRoot(),
BsDatepickerModule,
TabsModule,
CommonModule,
FormsModule,
ReactiveFormsModule,
Expand Down
Loading

0 comments on commit be0d7c3

Please sign in to comment.