Skip to content

Commit

Permalink
18-1-3-release-candidate (#6695)
Browse files Browse the repository at this point in the history
* fix(datepicker): fixed infinite cycle behavior

* fix(modal): fix for issue-6683 body is scrollable if you close just one modal

* fix(modal): fix for issue-6683 body is scrollable if you close just one modal

* fix(modal): issue-6675 animation and issue-6547

* fix(modal): nested modals backdrop added

* 18.1.3

* chore(versions): version bump

* fix(datepicker): quick ranges button is not selected with maxDate (#6670) (#6698)

Co-authored-by: Dmytro Danylov <[email protected]>

* fix(docs): fixed typo in import

---------

Co-authored-by: Dmytro Danylov <[email protected]>
  • Loading branch information
lexasq and daniloff200 authored Oct 28, 2024
1 parent 888bd3d commit f09e4b1
Show file tree
Hide file tree
Showing 36 changed files with 47 additions and 38 deletions.
4 changes: 4 additions & 0 deletions apps/ngx-bootstrap-docs/src/assets/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "18.1.2"
"version": "18.1.3"
}
2 changes: 1 addition & 1 deletion libs/doc-pages/dropdown/src/lib/docs/usage.md
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap-base",
"version": "18.1.2",
"version": "18.1.3",
"license": "MIT",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"schematics": "./schematics/src/collection.json",
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/accordion",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/alert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/alert",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/buttons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/buttons",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/carousel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/carousel",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/chronos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/chronos",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/collapse/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/collapse",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/component-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/component-loader",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
5 changes: 2 additions & 3 deletions src/datepicker/bs-datepicker-input.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 } };
}
}

Expand Down Expand Up @@ -194,7 +194,6 @@ export class BsDatepickerInputDirective implements ControlValueAccessor, Validat
}

this._picker.bsValue = this._value;
this._onChange(this._value);
}

setDisabledState(isDisabled: boolean): void {
Expand Down
4 changes: 4 additions & 0 deletions src/datepicker/bs-datepicker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion src/datepicker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/datepicker",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/dropdown/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/dropdown",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/focus-trap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/focus-trap",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/locale/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/locale",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/mini-ngrx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/mini-ngrx",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
5 changes: 3 additions & 2 deletions src/modal/bs-modal.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class BsModalService {
protected backdropRef?: ComponentRef<ModalBackdropComponent>;
private _backdropLoader: ComponentLoader<ModalBackdropComponent>;
private modalsCount = 0;
private lastHiddenId: number | string | undefined = 0;
private lastHiddenId: number | string | null | undefined = null;
private lastDismissReason?: string;

private loaders: ComponentLoader<ModalContainerComponent>[] = [];
Expand All @@ -69,6 +69,7 @@ export class BsModalService {
): BsModalRef<T> {
this._focusEl = document.activeElement;
this.modalsCount++;
this.lastHiddenId = null;
this._createLoaders();

// must be different per every show() call
Expand Down Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/modal/modal-container.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', '');
Expand Down
2 changes: 1 addition & 1 deletion src/modal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/modal",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/pagination/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/pagination",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/popover/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/popover",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/positioning/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/positioning",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/progressbar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/progressbar",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/rating/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/rating",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/root/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap",
"version": "18.1.2",
"version": "18.1.3",
"description": "Angular Bootstrap",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/schematics/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "schematics",
"version": "18.1.2",
"version": "18.1.3",
"schematics": "./collection.json",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/schematics/src/utils/current_dependency_versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"NGX_BOOTSTRAP_VERSION": "18.1.2",
"NGX_BOOTSTRAP_VERSION": "18.1.3",
"BOOTSTRAP_VERSION": "^5.2.3"
}
2 changes: 1 addition & 1 deletion src/sortable/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/sortable",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/tabs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/tabs",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/timepicker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/timepicker",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/tooltip/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/tooltip",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/typeahead/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/typeahead",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-bootstrap/utils",
"version": "18.1.2",
"version": "18.1.3",
"author": "Dmitriy Shekhovtsov <[email protected]>",
"license": "MIT"
}

0 comments on commit f09e4b1

Please sign in to comment.