ngx-bootstrap 20.0.2 → 21.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/fesm2022/ngx-bootstrap-accordion.mjs +15 -15
- package/accordion/fesm2022/ngx-bootstrap-accordion.mjs.map +1 -1
- package/alert/fesm2022/ngx-bootstrap-alert.mjs +12 -12
- package/alert/fesm2022/ngx-bootstrap-alert.mjs.map +1 -1
- package/buttons/fesm2022/ngx-bootstrap-buttons.mjs +25 -16
- package/buttons/fesm2022/ngx-bootstrap-buttons.mjs.map +1 -1
- package/buttons/{index.d.ts → types/ngx-bootstrap-buttons.d.ts} +3 -3
- package/carousel/fesm2022/ngx-bootstrap-carousel.mjs +15 -15
- package/carousel/fesm2022/ngx-bootstrap-carousel.mjs.map +1 -1
- package/chronos/fesm2022/ngx-bootstrap-chronos.mjs.map +1 -1
- package/collapse/fesm2022/ngx-bootstrap-collapse.mjs +7 -7
- package/collapse/fesm2022/ngx-bootstrap-collapse.mjs.map +1 -1
- package/component-loader/fesm2022/ngx-bootstrap-component-loader.mjs +3 -3
- package/component-loader/fesm2022/ngx-bootstrap-component-loader.mjs.map +1 -1
- package/datepicker/bs-datepicker.css +42 -14
- package/datepicker/bs-datepicker.css.map +1 -1
- package/datepicker/fesm2022/ngx-bootstrap-datepicker.mjs +362 -302
- package/datepicker/fesm2022/ngx-bootstrap-datepicker.mjs.map +1 -1
- package/dropdown/fesm2022/ngx-bootstrap-dropdown.mjs +37 -26
- package/dropdown/fesm2022/ngx-bootstrap-dropdown.mjs.map +1 -1
- package/dropdown/{index.d.ts → types/ngx-bootstrap-dropdown.d.ts} +2 -2
- package/fesm2022/ngx-bootstrap.mjs.map +1 -1
- package/focus-trap/fesm2022/ngx-bootstrap-focus-trap.mjs +19 -19
- package/focus-trap/fesm2022/ngx-bootstrap-focus-trap.mjs.map +1 -1
- package/locale/fesm2022/ngx-bootstrap-locale.mjs.map +1 -1
- package/mini-ngrx/fesm2022/ngx-bootstrap-mini-ngrx.mjs.map +1 -1
- package/modal/fesm2022/ngx-bootstrap-modal.mjs +52 -28
- package/modal/fesm2022/ngx-bootstrap-modal.mjs.map +1 -1
- package/modal/{index.d.ts → types/ngx-bootstrap-modal.d.ts} +6 -6
- package/package.json +31 -79
- package/pagination/fesm2022/ngx-bootstrap-pagination.mjs +15 -15
- package/pagination/fesm2022/ngx-bootstrap-pagination.mjs.map +1 -1
- package/popover/fesm2022/ngx-bootstrap-popover.mjs +17 -17
- package/popover/fesm2022/ngx-bootstrap-popover.mjs.map +1 -1
- package/positioning/fesm2022/ngx-bootstrap-positioning.mjs +3 -3
- package/positioning/fesm2022/ngx-bootstrap-positioning.mjs.map +1 -1
- package/progressbar/fesm2022/ngx-bootstrap-progressbar.mjs +14 -15
- package/progressbar/fesm2022/ngx-bootstrap-progressbar.mjs.map +1 -1
- package/rating/fesm2022/ngx-bootstrap-rating.mjs +12 -12
- package/rating/fesm2022/ngx-bootstrap-rating.mjs.map +1 -1
- package/schematics/utils/current_dependency_versions.json +1 -1
- package/sortable/fesm2022/ngx-bootstrap-sortable.mjs +65 -61
- package/sortable/fesm2022/ngx-bootstrap-sortable.mjs.map +1 -1
- package/tabs/fesm2022/ngx-bootstrap-tabs.mjs +21 -21
- package/tabs/fesm2022/ngx-bootstrap-tabs.mjs.map +1 -1
- package/timepicker/fesm2022/ngx-bootstrap-timepicker.mjs +17 -18
- package/timepicker/fesm2022/ngx-bootstrap-timepicker.mjs.map +1 -1
- package/tooltip/fesm2022/ngx-bootstrap-tooltip.mjs +13 -13
- package/tooltip/fesm2022/ngx-bootstrap-tooltip.mjs.map +1 -1
- package/typeahead/fesm2022/ngx-bootstrap-typeahead.mjs +20 -19
- package/typeahead/fesm2022/ngx-bootstrap-typeahead.mjs.map +1 -1
- package/utils/fesm2022/ngx-bootstrap-utils.mjs.map +1 -1
- /package/accordion/{index.d.ts → types/ngx-bootstrap-accordion.d.ts} +0 -0
- /package/alert/{index.d.ts → types/ngx-bootstrap-alert.d.ts} +0 -0
- /package/carousel/{index.d.ts → types/ngx-bootstrap-carousel.d.ts} +0 -0
- /package/chronos/{index.d.ts → types/ngx-bootstrap-chronos.d.ts} +0 -0
- /package/collapse/{index.d.ts → types/ngx-bootstrap-collapse.d.ts} +0 -0
- /package/component-loader/{index.d.ts → types/ngx-bootstrap-component-loader.d.ts} +0 -0
- /package/datepicker/{index.d.ts → types/ngx-bootstrap-datepicker.d.ts} +0 -0
- /package/focus-trap/{index.d.ts → types/ngx-bootstrap-focus-trap.d.ts} +0 -0
- /package/locale/{index.d.ts → types/ngx-bootstrap-locale.d.ts} +0 -0
- /package/mini-ngrx/{index.d.ts → types/ngx-bootstrap-mini-ngrx.d.ts} +0 -0
- /package/pagination/{index.d.ts → types/ngx-bootstrap-pagination.d.ts} +0 -0
- /package/popover/{index.d.ts → types/ngx-bootstrap-popover.d.ts} +0 -0
- /package/positioning/{index.d.ts → types/ngx-bootstrap-positioning.d.ts} +0 -0
- /package/progressbar/{index.d.ts → types/ngx-bootstrap-progressbar.d.ts} +0 -0
- /package/rating/{index.d.ts → types/ngx-bootstrap-rating.d.ts} +0 -0
- /package/sortable/{index.d.ts → types/ngx-bootstrap-sortable.d.ts} +0 -0
- /package/tabs/{index.d.ts → types/ngx-bootstrap-tabs.d.ts} +0 -0
- /package/timepicker/{index.d.ts → types/ngx-bootstrap-timepicker.d.ts} +0 -0
- /package/tooltip/{index.d.ts → types/ngx-bootstrap-tooltip.d.ts} +0 -0
- /package/typeahead/{index.d.ts → types/ngx-bootstrap-typeahead.d.ts} +0 -0
- /package/{index.d.ts → types/ngx-bootstrap.d.ts} +0 -0
- /package/utils/{index.d.ts → types/ngx-bootstrap-utils.d.ts} +0 -0
|
@@ -18,10 +18,10 @@ class BsModalRef {
|
|
|
18
18
|
*/
|
|
19
19
|
this.setClass = () => void 0;
|
|
20
20
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
22
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsModalRef, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
22
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsModalRef, providedIn: 'platform' }); }
|
|
23
23
|
}
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsModalRef, decorators: [{
|
|
25
25
|
type: Injectable,
|
|
26
26
|
args: [{ providedIn: 'platform' }]
|
|
27
27
|
}] });
|
|
@@ -34,10 +34,10 @@ class ModalBackdropOptions {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
class ModalOptions {
|
|
37
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
38
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
37
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalOptions, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
38
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalOptions, providedIn: 'platform' }); }
|
|
39
39
|
}
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalOptions, decorators: [{
|
|
41
41
|
type: Injectable,
|
|
42
42
|
args: [{ providedIn: 'platform' }]
|
|
43
43
|
}] });
|
|
@@ -110,10 +110,10 @@ class ModalBackdropComponent {
|
|
|
110
110
|
}
|
|
111
111
|
this.isShown = true;
|
|
112
112
|
}
|
|
113
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
114
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
113
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalBackdropComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: ModalBackdropComponent, isStandalone: true, selector: "bs-modal-backdrop", host: { classAttribute: "modal-backdrop" }, ngImport: i0, template: ' ', isInline: true }); }
|
|
115
115
|
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalBackdropComponent, decorators: [{
|
|
117
117
|
type: Component,
|
|
118
118
|
args: [{
|
|
119
119
|
selector: 'bs-modal-backdrop',
|
|
@@ -331,10 +331,10 @@ class BsModalService {
|
|
|
331
331
|
to.emit(this.lastDismissReason || data);
|
|
332
332
|
});
|
|
333
333
|
}
|
|
334
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
335
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
334
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsModalService, deps: [{ token: i0.RendererFactory2 }, { token: i1.ComponentLoaderFactory }, { token: MODAL_CONFIG_DEFAULT_OVERRIDE, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
335
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsModalService, providedIn: 'platform' }); }
|
|
336
336
|
}
|
|
337
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BsModalService, decorators: [{
|
|
338
338
|
type: Injectable,
|
|
339
339
|
args: [{ providedIn: 'platform' }]
|
|
340
340
|
}], ctorParameters: () => [{ type: i0.RendererFactory2 }, { type: i1.ComponentLoaderFactory }, { type: ModalOptions, decorators: [{
|
|
@@ -378,9 +378,17 @@ class ModalContainerComponent {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
onClickStarted(event) {
|
|
381
|
+
if (!(event.target instanceof Element)) {
|
|
382
|
+
this.clickStartedInContent = false;
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
381
385
|
this.clickStartedInContent = event.target !== this._element.nativeElement;
|
|
382
386
|
}
|
|
383
387
|
onClickStop(event) {
|
|
388
|
+
if (!(event.target instanceof Element)) {
|
|
389
|
+
this.clickStartedInContent = false;
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
384
392
|
const clickedInBackdrop = event.target === this._element.nativeElement && !this.clickStartedInContent;
|
|
385
393
|
if (this.config.ignoreBackdropClick ||
|
|
386
394
|
this.config.backdrop === 'static' ||
|
|
@@ -399,9 +407,13 @@ class ModalContainerComponent {
|
|
|
399
407
|
if (!this.isShown) {
|
|
400
408
|
return;
|
|
401
409
|
}
|
|
402
|
-
|
|
403
|
-
|
|
410
|
+
const keyboardEvent = event;
|
|
411
|
+
const hasKeyCode = (e) => 'keyCode' in e;
|
|
412
|
+
const isEscape = keyboardEvent.key === 'Escape' || keyboardEvent.key === 'Esc' || (hasKeyCode(keyboardEvent) && keyboardEvent.keyCode === 27);
|
|
413
|
+
if (!isEscape) {
|
|
414
|
+
return;
|
|
404
415
|
}
|
|
416
|
+
keyboardEvent.preventDefault();
|
|
405
417
|
if (this.config.keyboard &&
|
|
406
418
|
this.level === this.bsModalService?.getModalsCount()) {
|
|
407
419
|
this.bsModalService?.setDismissReason(DISMISS_REASONS.ESC);
|
|
@@ -442,8 +454,8 @@ class ModalContainerComponent {
|
|
|
442
454
|
}
|
|
443
455
|
}, this.isAnimated ? TRANSITION_DURATIONS.MODAL : 0);
|
|
444
456
|
}
|
|
445
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
446
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
457
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalContainerComponent, deps: [{ token: ModalOptions }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
458
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.0.6", type: ModalContainerComponent, isStandalone: true, selector: "modal-container", host: { attributes: { "role": "dialog", "tabindex": "-1" }, listeners: { "mousedown": "onClickStarted($event)", "click": "onClickStop($event)", "window:popstate": "onPopState()", "window:keydown.esc": "onEsc($event)" }, properties: { "attr.aria-modal": "true", "attr.aria-labelledby": "config.ariaLabelledBy", "attr.aria-describedby": "config.ariaDescribedby" }, classAttribute: "modal" }, providers: [BsModalService], ngImport: i0, template: `
|
|
447
459
|
<div [class]="'modal-dialog' + (config.class ? ' ' + config.class : '')"
|
|
448
460
|
role="document"
|
|
449
461
|
focusTrap>
|
|
@@ -453,7 +465,7 @@ class ModalContainerComponent {
|
|
|
453
465
|
</div>
|
|
454
466
|
`, isInline: true, dependencies: [{ kind: "directive", type: FocusTrapDirective, selector: "[focusTrap]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["focusTrap"] }] }); }
|
|
455
467
|
}
|
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
468
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalContainerComponent, decorators: [{
|
|
457
469
|
type: Component,
|
|
458
470
|
args: [{
|
|
459
471
|
selector: 'modal-container',
|
|
@@ -539,9 +551,17 @@ class ModalDirective {
|
|
|
539
551
|
this._config = modalDefaultOption || modalConfigDefaults;
|
|
540
552
|
}
|
|
541
553
|
onClickStarted(event) {
|
|
554
|
+
if (!(event.target instanceof Element)) {
|
|
555
|
+
this.clickStartedInContent = false;
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
542
558
|
this.clickStartedInContent = event.target !== this._element.nativeElement;
|
|
543
559
|
}
|
|
544
560
|
onClickStop(event) {
|
|
561
|
+
if (!(event.target instanceof Element)) {
|
|
562
|
+
this.clickStartedInContent = false;
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
545
565
|
const clickedInBackdrop = event.target === this._element.nativeElement && !this.clickStartedInContent;
|
|
546
566
|
if (this.config.ignoreBackdropClick ||
|
|
547
567
|
this.config.backdrop === 'static' ||
|
|
@@ -552,14 +572,18 @@ class ModalDirective {
|
|
|
552
572
|
this.dismissReason = DISMISS_REASONS.BACKRDOP;
|
|
553
573
|
this.hide(event);
|
|
554
574
|
}
|
|
555
|
-
//
|
|
575
|
+
// Handle Escape key: listen on document and cast event to KeyboardEvent.
|
|
556
576
|
onEsc(event) {
|
|
557
577
|
if (!this._isShown) {
|
|
558
578
|
return;
|
|
559
579
|
}
|
|
560
|
-
|
|
561
|
-
|
|
580
|
+
const keyboardEvent = event;
|
|
581
|
+
const hasKeyCode = (e) => 'keyCode' in e;
|
|
582
|
+
const isEscape = keyboardEvent.key === 'Escape' || keyboardEvent.key === 'Esc' || (hasKeyCode(keyboardEvent) && keyboardEvent.keyCode === 27);
|
|
583
|
+
if (!isEscape) {
|
|
584
|
+
return;
|
|
562
585
|
}
|
|
586
|
+
keyboardEvent.preventDefault();
|
|
563
587
|
if (this.config.keyboard) {
|
|
564
588
|
this.dismissReason = DISMISS_REASONS.ESC;
|
|
565
589
|
this.hide();
|
|
@@ -811,10 +835,10 @@ class ModalDirective {
|
|
|
811
835
|
this._renderer.removeChild(document.body, scrollDiv);
|
|
812
836
|
return scrollbarWidth;
|
|
813
837
|
}
|
|
814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
815
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
838
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i0.Renderer2 }, { token: i1.ComponentLoaderFactory }, { token: MODAL_CONFIG_DEFAULT_OVERRIDE, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
839
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: ModalDirective, isStandalone: true, selector: "[bsModal]", inputs: { config: "config", closeInterceptor: "closeInterceptor" }, outputs: { onShow: "onShow", onShown: "onShown", onHide: "onHide", onHidden: "onHidden" }, host: { listeners: { "mousedown": "onClickStarted($event)", "mouseup": "onClickStop($event)", "document:keydown": "onEsc($event)" } }, exportAs: ["bs-modal"], ngImport: i0 }); }
|
|
816
840
|
}
|
|
817
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
841
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalDirective, decorators: [{
|
|
818
842
|
type: Directive,
|
|
819
843
|
args: [{
|
|
820
844
|
selector: '[bsModal]',
|
|
@@ -846,7 +870,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.2", ngImpor
|
|
|
846
870
|
args: ['mouseup', ['$event']]
|
|
847
871
|
}], onEsc: [{
|
|
848
872
|
type: HostListener,
|
|
849
|
-
args: ['keydown
|
|
873
|
+
args: ['document:keydown', ['$event']]
|
|
850
874
|
}] } });
|
|
851
875
|
|
|
852
876
|
class ModalModule {
|
|
@@ -864,14 +888,14 @@ class ModalModule {
|
|
|
864
888
|
providers: [BsModalService, ComponentLoaderFactory, PositioningService]
|
|
865
889
|
};
|
|
866
890
|
}
|
|
867
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
868
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
891
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
892
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: ModalModule, imports: [FocusTrapModule,
|
|
869
893
|
ModalBackdropComponent,
|
|
870
894
|
ModalDirective,
|
|
871
895
|
ModalContainerComponent], exports: [ModalBackdropComponent, ModalDirective] }); }
|
|
872
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
896
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalModule, imports: [FocusTrapModule] }); }
|
|
873
897
|
}
|
|
874
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ModalModule, decorators: [{
|
|
875
899
|
type: NgModule,
|
|
876
900
|
args: [{
|
|
877
901
|
imports: [
|