diff --git a/apps/ngx-bootstrap-docs/src/assets/css/style.scss b/apps/ngx-bootstrap-docs/src/assets/css/style.scss index 3db1f2272a..07d3825537 100644 --- a/apps/ngx-bootstrap-docs/src/assets/css/style.scss +++ b/apps/ngx-bootstrap-docs/src/assets/css/style.scss @@ -994,6 +994,10 @@ footer { border-radius: 4px; } +.modal-backdrop ~ .modal + .modal { + background-color: rgba(0,0,0,0.5); +} + /*Imported adaptive styles*/ @import "adaptive"; diff --git a/apps/ngx-bootstrap-docs/src/assets/json/current-version.json b/apps/ngx-bootstrap-docs/src/assets/json/current-version.json index 7f9a58507d..d22dda2541 100644 --- a/apps/ngx-bootstrap-docs/src/assets/json/current-version.json +++ b/apps/ngx-bootstrap-docs/src/assets/json/current-version.json @@ -1,3 +1,3 @@ { - "version": "18.1.2" + "version": "18.1.3" } diff --git a/libs/doc-pages/dropdown/src/lib/docs/usage.md b/libs/doc-pages/dropdown/src/lib/docs/usage.md index d553ac89b7..e72766a07e 100644 --- a/libs/doc-pages/dropdown/src/lib/docs/usage.md +++ b/libs/doc-pages/dropdown/src/lib/docs/usage.md @@ -1,7 +1,7 @@ ### Standalone component usage import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { BsDropdownModule } from 'ngx-bootstrap/datepicker'; +import { BsDropdownModule } from 'ngx-bootstrap/dropdown'; @Components({ standalone: true, diff --git a/package-lock.json b/package-lock.json index ffb88e7452..5c4ed50ea7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ngx-bootstrap-base", - "version": "18.1.2", + "version": "18.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ngx-bootstrap-base", - "version": "18.1.2", + "version": "18.1.3", "hasInstallScript": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index ed0b68be09..2cb5c10d9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap-base", - "version": "18.1.2", + "version": "18.1.3", "license": "MIT", "author": "Dmitriy Shekhovtsov ", "schematics": "./schematics/src/collection.json", diff --git a/src/accordion/package.json b/src/accordion/package.json index e79f72b000..a8485795a5 100644 --- a/src/accordion/package.json +++ b/src/accordion/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/accordion", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/alert/package.json b/src/alert/package.json index 7d8c90b81c..7cbec705c3 100644 --- a/src/alert/package.json +++ b/src/alert/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/alert", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/buttons/package.json b/src/buttons/package.json index a7c2292e0a..094dac22df 100644 --- a/src/buttons/package.json +++ b/src/buttons/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/buttons", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/carousel/package.json b/src/carousel/package.json index fd6ea5c7bf..b822c3d2a2 100644 --- a/src/carousel/package.json +++ b/src/carousel/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/carousel", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/chronos/package.json b/src/chronos/package.json index 55d2a31046..7cdc6d3bdd 100644 --- a/src/chronos/package.json +++ b/src/chronos/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/chronos", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/collapse/package.json b/src/collapse/package.json index c13c7966f1..f7820732e4 100644 --- a/src/collapse/package.json +++ b/src/collapse/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/collapse", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/component-loader/package.json b/src/component-loader/package.json index 62943895dc..91f48c36e2 100644 --- a/src/component-loader/package.json +++ b/src/component-loader/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/component-loader", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/datepicker/bs-datepicker-input.directive.ts b/src/datepicker/bs-datepicker-input.directive.ts index 9186cccade..7ed80f19ad 100644 --- a/src/datepicker/bs-datepicker-input.directive.ts +++ b/src/datepicker/bs-datepicker-input.directive.ts @@ -158,13 +158,13 @@ export class BsDatepickerInputDirective implements ControlValueAccessor, Validat if (this._picker && this._picker.minDate && isBefore(_value, this._picker.minDate, 'date')) { this.writeValue(this._picker.minDate); - return { bsDate: { minDate: this._picker.minDate } }; + return this._picker.ignoreMinMaxErrors ? null : { bsDate: { minDate: this._picker.minDate } }; } if (this._picker && this._picker.maxDate && isAfter(_value, this._picker.maxDate, 'date')) { this.writeValue(this._picker.maxDate); - return { bsDate: { maxDate: this._picker.maxDate } }; + return this._picker.ignoreMinMaxErrors ? null : { bsDate: { maxDate: this._picker.maxDate } }; } } @@ -194,7 +194,6 @@ export class BsDatepickerInputDirective implements ControlValueAccessor, Validat } this._picker.bsValue = this._value; - this._onChange(this._value); } setDisabledState(isDisabled: boolean): void { diff --git a/src/datepicker/bs-datepicker.component.ts b/src/datepicker/bs-datepicker.component.ts index e17cc59516..4c521972f8 100644 --- a/src/datepicker/bs-datepicker.component.ts +++ b/src/datepicker/bs-datepicker.component.ts @@ -72,6 +72,10 @@ export class BsDatepickerDirective implements OnInit, OnDestroy, OnChanges, Afte * Maximum date which is available for selection */ @Input() maxDate?: Date; + /** + * Ignore validation errors when you reset to minDate or maxDate + */ + @Input() ignoreMinMaxErrors?: boolean; /** * Minimum view mode : day, month, or year */ diff --git a/src/datepicker/package.json b/src/datepicker/package.json index d6f9896fd7..b77d165e04 100644 --- a/src/datepicker/package.json +++ b/src/datepicker/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/datepicker", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/dropdown/package.json b/src/dropdown/package.json index 8242ab9142..b5ef8b7876 100644 --- a/src/dropdown/package.json +++ b/src/dropdown/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/dropdown", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/focus-trap/package.json b/src/focus-trap/package.json index 4b2264a1b0..0b7737d3da 100644 --- a/src/focus-trap/package.json +++ b/src/focus-trap/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/focus-trap", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/locale/package.json b/src/locale/package.json index 0addb735c1..f57ed1f904 100644 --- a/src/locale/package.json +++ b/src/locale/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/locale", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/mini-ngrx/package.json b/src/mini-ngrx/package.json index ec51e945d2..daa18cdb1a 100644 --- a/src/mini-ngrx/package.json +++ b/src/mini-ngrx/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/mini-ngrx", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/modal/bs-modal.service.ts b/src/modal/bs-modal.service.ts index 490bf2b4cd..e6771b7ec9 100644 --- a/src/modal/bs-modal.service.ts +++ b/src/modal/bs-modal.service.ts @@ -42,7 +42,7 @@ export class BsModalService { protected backdropRef?: ComponentRef; private _backdropLoader: ComponentLoader; private modalsCount = 0; - private lastHiddenId: number | string | undefined = 0; + private lastHiddenId: number | string | null | undefined = null; private lastDismissReason?: string; private loaders: ComponentLoader[] = []; @@ -69,6 +69,7 @@ export class BsModalService { ): BsModalRef { this._focusEl = document.activeElement; this.modalsCount++; + this.lastHiddenId = null; this._createLoaders(); // must be different per every show() call @@ -146,7 +147,7 @@ export class BsModalService { .provide({ provide: BsModalRef, useValue: bsModalRef }) .attach(ModalContainerComponent) .to('body'); - bsModalRef.hide = () => this.hide(bsModalRef.id); + bsModalRef.hide = () => modalContainerRef.instance?.hide(); bsModalRef.setClass = (newClass: string) => { if (modalContainerRef.instance) { modalContainerRef.instance.config.class = newClass; diff --git a/src/modal/modal-container.component.ts b/src/modal/modal-container.component.ts index 5f09ecdd73..9c43fc6f5e 100644 --- a/src/modal/modal-container.component.ts +++ b/src/modal/modal-container.component.ts @@ -165,10 +165,11 @@ export class ModalContainerComponent implements OnInit, OnDestroy { ); setTimeout(() => { this.isShown = false; + this.bsModalService?.hide(this.config.id); if ( document && document.body && - this.bsModalService?.getModalsCount() === 1 + this.bsModalService?.getModalsCount() === 0 ) { this._renderer.removeClass(document.body, CLASS_NAME.OPEN); this._renderer.setStyle(document.body, 'overflow-y', ''); diff --git a/src/modal/package.json b/src/modal/package.json index 135b931931..8b4c81f548 100644 --- a/src/modal/package.json +++ b/src/modal/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/modal", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/pagination/package.json b/src/pagination/package.json index 965757b409..78360c713f 100644 --- a/src/pagination/package.json +++ b/src/pagination/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/pagination", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/popover/package.json b/src/popover/package.json index 5b18c017de..5a9a81e99b 100644 --- a/src/popover/package.json +++ b/src/popover/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/popover", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/positioning/package.json b/src/positioning/package.json index e8407dfc6c..6704c9889f 100644 --- a/src/positioning/package.json +++ b/src/positioning/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/positioning", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/progressbar/package.json b/src/progressbar/package.json index d1ec324032..fcdfbf6efc 100644 --- a/src/progressbar/package.json +++ b/src/progressbar/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/progressbar", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/rating/package.json b/src/rating/package.json index 2c2049d0d0..3bd04941cb 100644 --- a/src/rating/package.json +++ b/src/rating/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/rating", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/root/package.json b/src/root/package.json index 4cd5008c30..d81e19fda6 100644 --- a/src/root/package.json +++ b/src/root/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap", - "version": "18.1.2", + "version": "18.1.3", "description": "Angular Bootstrap", "author": "Dmitriy Shekhovtsov ", "license": "MIT", diff --git a/src/schematics/package.json b/src/schematics/package.json index 2fb67140af..ff93ad2706 100644 --- a/src/schematics/package.json +++ b/src/schematics/package.json @@ -1,6 +1,6 @@ { "name": "schematics", - "version": "18.1.2", + "version": "18.1.3", "schematics": "./collection.json", "author": "Dmitriy Shekhovtsov ", "license": "MIT" diff --git a/src/schematics/src/utils/current_dependency_versions.json b/src/schematics/src/utils/current_dependency_versions.json index 47c322c2d5..672b154068 100644 --- a/src/schematics/src/utils/current_dependency_versions.json +++ b/src/schematics/src/utils/current_dependency_versions.json @@ -1,4 +1,4 @@ { - "NGX_BOOTSTRAP_VERSION": "18.1.2", + "NGX_BOOTSTRAP_VERSION": "18.1.3", "BOOTSTRAP_VERSION": "^5.2.3" } diff --git a/src/sortable/package.json b/src/sortable/package.json index 7bd5818b93..556f7df61a 100644 --- a/src/sortable/package.json +++ b/src/sortable/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/sortable", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/tabs/package.json b/src/tabs/package.json index 74e986575b..b009994f59 100644 --- a/src/tabs/package.json +++ b/src/tabs/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/tabs", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/timepicker/package.json b/src/timepicker/package.json index 908a5e4554..17ab0fb7e1 100644 --- a/src/timepicker/package.json +++ b/src/timepicker/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/timepicker", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/tooltip/package.json b/src/tooltip/package.json index 06f4e714b4..09e8d0263a 100644 --- a/src/tooltip/package.json +++ b/src/tooltip/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/tooltip", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/typeahead/package.json b/src/typeahead/package.json index f352e05e24..946ed095e1 100644 --- a/src/typeahead/package.json +++ b/src/typeahead/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/typeahead", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" } diff --git a/src/utils/package.json b/src/utils/package.json index 9f1924a89c..ff6985e301 100644 --- a/src/utils/package.json +++ b/src/utils/package.json @@ -1,6 +1,6 @@ { "name": "ngx-bootstrap/utils", - "version": "18.1.2", + "version": "18.1.3", "author": "Dmitriy Shekhovtsov ", "license": "MIT" }