@mintplayer/ng-bootstrap 13.1.5 → 13.1.10
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/esm2020/index.mjs +3 -1
- package/esm2020/lib/components/accordion/accordion-tab/accordion-tab.component.mjs +4 -3
- package/esm2020/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.mjs +7 -3
- package/esm2020/lib/components/alert/alert/alert.component.mjs +4 -4
- package/esm2020/lib/components/calendar/calendar.component.mjs +77 -34
- package/esm2020/lib/components/card/card/card.component.mjs +1 -2
- package/esm2020/lib/components/carousel/carousel/carousel.component.mjs +21 -7
- package/esm2020/lib/components/context-menu/context-menu.directive.mjs +57 -0
- package/esm2020/lib/components/context-menu/context-menu.module.mjs +26 -0
- package/esm2020/lib/components/context-menu/index.mjs +3 -0
- package/esm2020/lib/components/datatable/datatable/datatable.component.mjs +51 -0
- package/esm2020/lib/components/datatable/datatable-column/datatable-column-metadata.mjs +2 -0
- package/esm2020/lib/components/datatable/datatable-column/datatable-column.directive.mjs +19 -0
- package/esm2020/lib/components/datatable/datatable-settings.mjs +37 -0
- package/esm2020/lib/components/datatable/datatable.module.mjs +40 -0
- package/esm2020/lib/components/datatable/index.mjs +6 -0
- package/esm2020/lib/components/datatable/row-template/row-template.directive.mjs +19 -0
- package/esm2020/lib/components/datepicker/datepicker.component.mjs +22 -0
- package/esm2020/lib/components/datepicker/datepicker.module.mjs +34 -0
- package/esm2020/lib/components/datepicker/index.mjs +3 -0
- package/esm2020/lib/components/dropdown/dropdown/dropdown.directive.mjs +51 -0
- package/esm2020/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.mjs +91 -0
- package/esm2020/lib/components/dropdown/dropdown-toggle/dropdown-toggle.directive.mjs +28 -0
- package/esm2020/lib/components/dropdown/dropdown.module.mjs +44 -0
- package/esm2020/lib/components/dropdown/index.mjs +5 -0
- package/esm2020/lib/components/index.mjs +16 -4
- package/esm2020/lib/components/multiselect/index.mjs +3 -0
- package/esm2020/lib/components/multiselect/multiselect.component.mjs +36 -0
- package/esm2020/lib/components/multiselect/multiselect.module.mjs +34 -0
- package/esm2020/lib/components/navbar/nav-link/nav-link.directive.mjs +1 -1
- package/esm2020/lib/components/navbar/navbar/navbar.component.mjs +9 -6
- package/esm2020/lib/components/navbar/navbar-nav/navbar-nav.component.mjs +47 -9
- package/esm2020/lib/components/pagination/index.mjs +3 -0
- package/esm2020/lib/components/pagination/pagination/pagination.component.mjs +146 -0
- package/esm2020/lib/components/pagination/pagination.module.mjs +26 -0
- package/esm2020/lib/components/progress-bar/index.mjs +4 -0
- package/esm2020/lib/components/progress-bar/progress/progress.component.mjs +27 -0
- package/esm2020/lib/components/progress-bar/progress-bar/progress-bar.component.mjs +121 -0
- package/esm2020/lib/components/progress-bar/progress-bar.module.mjs +31 -0
- package/esm2020/lib/components/scrollspy/component/scrollspy.component.mjs +28 -12
- package/esm2020/lib/components/select2/component/select2.component.mjs +96 -0
- package/esm2020/lib/components/select2/directive/item-template.directive.mjs +20 -0
- package/esm2020/lib/components/select2/index.mjs +4 -0
- package/esm2020/lib/components/select2/select2.module.mjs +43 -0
- package/esm2020/lib/components/snackbar/component/snackbar.component.mjs +35 -0
- package/esm2020/lib/components/snackbar/directives/index.mjs +2 -0
- package/esm2020/lib/components/snackbar/directives/snackbar-close/snackbar-close.directive.mjs +27 -0
- package/esm2020/lib/components/snackbar/index.mjs +6 -0
- package/esm2020/lib/components/snackbar/interfaces/index.mjs +2 -0
- package/esm2020/lib/components/snackbar/interfaces/snackbar-animation-meta.mjs +2 -0
- package/esm2020/lib/components/snackbar/providers/snackbar-content.provider.mjs +3 -0
- package/esm2020/lib/components/snackbar/service/snackbar.service.mjs +50 -0
- package/esm2020/lib/components/snackbar/snackbar.module.mjs +38 -0
- package/esm2020/lib/components/toggle-button/index.mjs +3 -0
- package/esm2020/lib/components/toggle-button/toggle-button.component.mjs +42 -0
- package/esm2020/lib/components/toggle-button/toggle-button.module.mjs +26 -0
- package/esm2020/lib/components/tooltip/component/tooltip.component.mjs +25 -0
- package/esm2020/lib/components/tooltip/directive/tooltip.directive.mjs +104 -0
- package/esm2020/lib/components/tooltip/index.mjs +4 -0
- package/esm2020/lib/components/tooltip/providers/tooltip-content.provider.mjs +3 -0
- package/esm2020/lib/components/tooltip/tooltip.module.mjs +29 -0
- package/esm2020/lib/components/typeahead/index.mjs +3 -0
- package/esm2020/lib/components/typeahead/typeahead.component.mjs +90 -0
- package/esm2020/lib/components/typeahead/typeahead.module.mjs +38 -0
- package/esm2020/lib/enums/index.mjs +2 -1
- package/esm2020/lib/enums/position.enum.mjs +8 -0
- package/esm2020/lib/interfaces/index.mjs +2 -0
- package/esm2020/lib/interfaces/page-with-selection.mjs +2 -0
- package/esm2020/lib/pipes/font-color/font-color.module.mjs +26 -0
- package/esm2020/lib/pipes/font-color/font-color.pipe.mjs +26 -0
- package/esm2020/lib/pipes/font-color/index.mjs +3 -0
- package/esm2020/lib/pipes/in-list/in-list.module.mjs +26 -0
- package/esm2020/lib/pipes/in-list/in-list.pipe.mjs +16 -0
- package/esm2020/lib/pipes/index.mjs +2 -0
- package/esm2020/lib/pipes/month-name/month-name.pipe.mjs +7 -2
- package/esm2020/lib/services/calendar-month/calendar-month.service.mjs +12 -14
- package/esm2020/lib/services/scroll-offset/scroll-offset.service.mjs +31 -0
- package/esm2020/lib/types/page-number.type.mjs +2 -0
- package/fesm2015/mintplayer-ng-bootstrap.mjs +1970 -297
- package/fesm2015/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/fesm2020/mintplayer-ng-bootstrap.mjs +1943 -283
- package/fesm2020/mintplayer-ng-bootstrap.mjs.map +1 -1
- package/index.d.ts +2 -0
- package/lib/components/accordion/accordion-tab-header/accordion-tab-header.component.d.ts +1 -0
- package/lib/components/calendar/calendar.component.d.ts +21 -13
- package/lib/components/carousel/carousel/carousel.component.d.ts +4 -1
- package/lib/components/context-menu/context-menu.directive.d.ts +16 -0
- package/lib/components/context-menu/context-menu.module.d.ts +8 -0
- package/lib/components/context-menu/index.d.ts +2 -0
- package/lib/components/datatable/datatable/datatable.component.d.ts +17 -0
- package/lib/components/datatable/datatable-column/datatable-column-metadata.d.ts +4 -0
- package/lib/components/datatable/datatable-column/datatable-column.directive.d.ts +10 -0
- package/lib/components/datatable/datatable-settings.d.ts +15 -0
- package/lib/components/datatable/datatable.module.d.ts +11 -0
- package/lib/components/datatable/index.d.ts +5 -0
- package/lib/components/datatable/row-template/row-template.directive.d.ts +9 -0
- package/lib/components/datepicker/datepicker.component.d.ts +10 -0
- package/lib/components/datepicker/datepicker.module.d.ts +10 -0
- package/lib/components/datepicker/index.d.ts +2 -0
- package/lib/components/dropdown/dropdown/dropdown.directive.d.ts +20 -0
- package/lib/components/dropdown/dropdown-menu/dropdown-menu.directive.d.ts +20 -0
- package/lib/components/dropdown/dropdown-toggle/dropdown-toggle.directive.d.ts +11 -0
- package/lib/components/dropdown/dropdown.module.d.ts +12 -0
- package/lib/components/dropdown/index.d.ts +4 -0
- package/lib/components/index.d.ts +15 -3
- package/lib/components/multiselect/index.d.ts +2 -0
- package/lib/components/multiselect/multiselect.component.d.ts +12 -0
- package/lib/components/multiselect/multiselect.module.d.ts +10 -0
- package/lib/components/navbar/navbar/navbar.component.d.ts +3 -3
- package/lib/components/navbar/navbar-nav/navbar-nav.component.d.ts +10 -4
- package/lib/components/pagination/index.d.ts +2 -0
- package/lib/components/pagination/pagination/pagination.component.d.ts +45 -0
- package/lib/components/pagination/pagination.module.d.ts +8 -0
- package/lib/components/progress-bar/index.d.ts +3 -0
- package/lib/components/progress-bar/progress/progress.component.d.ts +8 -0
- package/lib/components/progress-bar/progress-bar/progress-bar.component.d.ts +31 -0
- package/lib/components/progress-bar/progress-bar.module.d.ts +9 -0
- package/lib/components/scrollspy/component/scrollspy.component.d.ts +6 -4
- package/lib/components/select2/component/select2.component.d.ts +30 -0
- package/lib/components/select2/directive/item-template.directive.d.ts +9 -0
- package/lib/components/select2/index.d.ts +3 -0
- package/lib/components/select2/select2.module.d.ts +12 -0
- package/lib/components/snackbar/component/snackbar.component.d.ts +16 -0
- package/lib/components/snackbar/directives/index.d.ts +1 -0
- package/lib/components/snackbar/directives/snackbar-close/snackbar-close.directive.d.ts +11 -0
- package/lib/components/snackbar/index.d.ts +5 -0
- package/lib/components/snackbar/interfaces/index.d.ts +1 -0
- package/lib/components/snackbar/interfaces/snackbar-animation-meta.d.ts +7 -0
- package/lib/components/snackbar/providers/snackbar-content.provider.d.ts +2 -0
- package/lib/components/snackbar/service/snackbar.service.d.ts +14 -0
- package/lib/components/snackbar/snackbar.module.d.ts +9 -0
- package/lib/components/toggle-button/index.d.ts +2 -0
- package/lib/components/toggle-button/toggle-button.component.d.ts +15 -0
- package/lib/components/toggle-button/toggle-button.module.d.ts +8 -0
- package/lib/components/tooltip/component/tooltip.component.d.ts +11 -0
- package/lib/components/tooltip/directive/tooltip.directive.d.ts +19 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/components/tooltip/providers/tooltip-content.provider.d.ts +2 -0
- package/lib/components/tooltip/tooltip.module.d.ts +9 -0
- package/lib/components/typeahead/index.d.ts +2 -0
- package/lib/components/typeahead/typeahead.component.d.ts +29 -0
- package/lib/components/typeahead/typeahead.module.d.ts +11 -0
- package/lib/enums/index.d.ts +1 -0
- package/lib/enums/position.enum.d.ts +6 -0
- package/lib/interfaces/index.d.ts +1 -0
- package/lib/interfaces/page-with-selection.d.ts +5 -0
- package/lib/pipes/font-color/font-color.module.d.ts +8 -0
- package/lib/pipes/font-color/font-color.pipe.d.ts +7 -0
- package/lib/pipes/font-color/index.d.ts +2 -0
- package/lib/pipes/in-list/in-list.module.d.ts +8 -0
- package/lib/pipes/in-list/in-list.pipe.d.ts +7 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/pipes/month-name/month-name.pipe.d.ts +1 -1
- package/lib/services/calendar-month/calendar-month.service.d.ts +0 -1
- package/lib/services/scroll-offset/scroll-offset.service.d.ts +9 -0
- package/lib/types/page-number.type.d.ts +1 -0
- package/package.json +6 -2
|
@@ -1,14 +1,119 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component,
|
|
2
|
+
import { Component, ContentChildren, NgModule, Input, Injectable, Pipe, EventEmitter, Output, Directive, HostBinding, Host, SkipSelf, HostListener, forwardRef, PLATFORM_ID, Inject, ContentChild, TemplateRef, ViewChild, Optional, ViewChildren, InjectionToken, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
5
|
-
import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation } from '@mintplayer/ng-animations';
|
|
6
|
-
import { Subject, BehaviorSubject } from 'rxjs';
|
|
7
|
-
import { map, takeUntil, take } from 'rxjs/operators';
|
|
8
|
-
import { RouterModule } from '@angular/router';
|
|
9
|
-
import * as i1$1 from '@mintplayer/ng-click-outside';
|
|
10
|
-
import { ClickOutsideModule } from '@mintplayer/ng-click-outside';
|
|
11
5
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
6
|
+
import { SlideUpDownAnimation, FadeInOutAnimation, CarouselSlideAnimation, ColorTransitionAnimation } from '@mintplayer/ng-animations';
|
|
7
|
+
import { Subject, BehaviorSubject, map, takeUntil, filter, take, Observable, combineLatest, debounceTime } from 'rxjs';
|
|
8
|
+
import { map as map$1, takeUntil as takeUntil$1, take as take$1 } from 'rxjs/operators';
|
|
9
|
+
import { TemplatePortal, ComponentPortal } from '@angular/cdk/portal';
|
|
10
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
11
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
12
|
+
import * as i1$2 from '@mintplayer/ng-click-outside';
|
|
13
|
+
import { ClickOutsideDirective, ClickOutsideModule } from '@mintplayer/ng-click-outside';
|
|
14
|
+
import { FocusOnLoadModule } from '@mintplayer/ng-focus-on-load';
|
|
15
|
+
import { RouterModule, ROUTER_CONFIGURATION } from '@angular/router';
|
|
16
|
+
import * as i3 from '@angular/forms';
|
|
17
|
+
import { FormsModule } from '@angular/forms';
|
|
18
|
+
|
|
19
|
+
class BsAccordionTabComponent {
|
|
20
|
+
constructor(accordion) {
|
|
21
|
+
this.accordion = accordion;
|
|
22
|
+
}
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
}
|
|
25
|
+
headerClicked(event) {
|
|
26
|
+
if (this.accordion.activeTab === this) {
|
|
27
|
+
this.accordion.activeTab = null;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.accordion.activeTab = this;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
BsAccordionTabComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, deps: [{ token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
35
|
+
BsAccordionTabComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabComponent, selector: "bs-accordion-tab", ngImport: i0, template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"accordion.activeTab === this\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [SlideUpDownAnimation] });
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabComponent, decorators: [{
|
|
37
|
+
type: Component,
|
|
38
|
+
args: [{ selector: 'bs-accordion-tab', animations: [SlideUpDownAnimation], template: "<div class=\"card\">\n <ng-content select=\"bs-accordion-tab-header\"></ng-content>\n <div class=\"card-block overflow-hidden\" [@slideUpDown] *ngIf=\"accordion.activeTab === this\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card,.card-header,.card-block{border-radius:0}.card{margin-bottom:-1px}\n"] }]
|
|
39
|
+
}], ctorParameters: function () { return [{ type: BsAccordionComponent }]; } });
|
|
40
|
+
|
|
41
|
+
class BsAccordionComponent {
|
|
42
|
+
constructor() {
|
|
43
|
+
this.activeTab = null;
|
|
44
|
+
}
|
|
45
|
+
ngOnInit() {
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
BsAccordionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
BsAccordionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionComponent, selector: "bs-accordion", queries: [{ propertyName: "tabPages", predicate: BsAccordionTabComponent }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionComponent, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{ selector: 'bs-accordion', template: "<ng-content></ng-content>", styles: [""] }]
|
|
53
|
+
}], ctorParameters: function () { return []; }, propDecorators: { tabPages: [{
|
|
54
|
+
type: ContentChildren,
|
|
55
|
+
args: [BsAccordionTabComponent]
|
|
56
|
+
}] } });
|
|
57
|
+
|
|
58
|
+
class BsAccordionTabHeaderComponent {
|
|
59
|
+
constructor(accordionTab, accordion) {
|
|
60
|
+
this.accordionTab = accordionTab;
|
|
61
|
+
this.accordion = accordion;
|
|
62
|
+
}
|
|
63
|
+
ngOnInit() {
|
|
64
|
+
}
|
|
65
|
+
headerClicked(event) {
|
|
66
|
+
event.preventDefault();
|
|
67
|
+
if (this.accordion.activeTab === this.accordionTab) {
|
|
68
|
+
this.accordion.activeTab = null;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.accordion.activeTab = this.accordionTab;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
foo(event) {
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
BsAccordionTabHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, deps: [{ token: BsAccordionTabComponent }, { token: BsAccordionComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
79
|
+
BsAccordionTabHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAccordionTabHeaderComponent, selector: "bs-accordion-tab-header", ngImport: i0, template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\" (contextmenu)=\"foo($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] });
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionTabHeaderComponent, decorators: [{
|
|
81
|
+
type: Component,
|
|
82
|
+
args: [{ selector: 'bs-accordion-tab-header', template: "<div class=\"card-header cursor-pointer\" (click)=\"headerClicked($event)\" (contextmenu)=\"foo($event)\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
|
|
83
|
+
}], ctorParameters: function () { return [{ type: BsAccordionTabComponent }, { type: BsAccordionComponent }]; } });
|
|
84
|
+
|
|
85
|
+
class BsAccordionModule {
|
|
86
|
+
}
|
|
87
|
+
BsAccordionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
88
|
+
BsAccordionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, declarations: [BsAccordionComponent,
|
|
89
|
+
BsAccordionTabComponent,
|
|
90
|
+
BsAccordionTabHeaderComponent], imports: [CommonModule,
|
|
91
|
+
BrowserAnimationsModule], exports: [BsAccordionComponent,
|
|
92
|
+
BsAccordionTabComponent,
|
|
93
|
+
BsAccordionTabHeaderComponent] });
|
|
94
|
+
BsAccordionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, imports: [[
|
|
95
|
+
CommonModule,
|
|
96
|
+
BrowserAnimationsModule
|
|
97
|
+
]] });
|
|
98
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAccordionModule, decorators: [{
|
|
99
|
+
type: NgModule,
|
|
100
|
+
args: [{
|
|
101
|
+
declarations: [
|
|
102
|
+
BsAccordionComponent,
|
|
103
|
+
BsAccordionTabComponent,
|
|
104
|
+
BsAccordionTabHeaderComponent
|
|
105
|
+
],
|
|
106
|
+
imports: [
|
|
107
|
+
CommonModule,
|
|
108
|
+
BrowserAnimationsModule
|
|
109
|
+
],
|
|
110
|
+
exports: [
|
|
111
|
+
BsAccordionComponent,
|
|
112
|
+
BsAccordionTabComponent,
|
|
113
|
+
BsAccordionTabHeaderComponent
|
|
114
|
+
]
|
|
115
|
+
}]
|
|
116
|
+
}] });
|
|
12
117
|
|
|
13
118
|
var Color;
|
|
14
119
|
(function (Color) {
|
|
@@ -25,6 +130,14 @@ var Color;
|
|
|
25
130
|
Color[Color["transparent"] = 10] = "transparent";
|
|
26
131
|
})(Color || (Color = {}));
|
|
27
132
|
|
|
133
|
+
var Position;
|
|
134
|
+
(function (Position) {
|
|
135
|
+
Position[Position["top"] = 0] = "top";
|
|
136
|
+
Position[Position["left"] = 1] = "left";
|
|
137
|
+
Position[Position["bottom"] = 2] = "bottom";
|
|
138
|
+
Position[Position["right"] = 3] = "right";
|
|
139
|
+
})(Position || (Position = {}));
|
|
140
|
+
|
|
28
141
|
class BsAlertComponent {
|
|
29
142
|
constructor() {
|
|
30
143
|
this.type = Color.primary;
|
|
@@ -35,10 +148,10 @@ class BsAlertComponent {
|
|
|
35
148
|
}
|
|
36
149
|
}
|
|
37
150
|
BsAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
-
BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [
|
|
151
|
+
BsAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsAlertComponent, selector: "bs-alert", inputs: { type: "type" }, ngImport: i0, template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [FadeInOutAnimation] });
|
|
39
152
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsAlertComponent, decorators: [{
|
|
40
153
|
type: Component,
|
|
41
|
-
args: [{ selector: 'bs-alert', animations: [
|
|
154
|
+
args: [{ selector: 'bs-alert', animations: [FadeInOutAnimation], template: "<div class=\"mb-3 overflow-hidden\" *ngIf=\"isVisible\" [@fadeInOut]>\n <div class=\"alert mb-0\" [ngClass]=\"'alert-' + colors[type]\">\n <ng-content></ng-content>\n </div>\n</div>", styles: ["::ng-deep .alert .btn{bottom:0;display:inline-flex;align-items:center}\n"] }]
|
|
42
155
|
}], ctorParameters: function () { return []; }, propDecorators: { type: [{
|
|
43
156
|
type: Input
|
|
44
157
|
}] } });
|
|
@@ -82,64 +195,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
82
195
|
}]
|
|
83
196
|
}] });
|
|
84
197
|
|
|
85
|
-
class BsCardComponent {
|
|
86
|
-
constructor() {
|
|
87
|
-
}
|
|
88
|
-
ngOnInit() {
|
|
89
|
-
}
|
|
90
|
-
ngAfterViewInit() {
|
|
91
|
-
// console.log('header', this.header);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
-
BsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardComponent, selector: "bs-card", ngImport: i0, template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] });
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
|
|
97
|
-
type: Component,
|
|
98
|
-
args: [{ selector: 'bs-card', template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] }]
|
|
99
|
-
}], ctorParameters: function () { return []; } });
|
|
100
|
-
|
|
101
|
-
class BsCardHeaderComponent {
|
|
102
|
-
constructor() {
|
|
103
|
-
}
|
|
104
|
-
ngOnInit() {
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
-
BsCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardHeaderComponent, selector: "bs-card-header", ngImport: i0, template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] });
|
|
109
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
|
|
110
|
-
type: Component,
|
|
111
|
-
args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
|
|
112
|
-
}], ctorParameters: function () { return []; } });
|
|
113
|
-
|
|
114
|
-
class BsCardModule {
|
|
115
|
-
}
|
|
116
|
-
BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
117
|
-
BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
|
|
118
|
-
BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
|
|
119
|
-
BsCardHeaderComponent] });
|
|
120
|
-
BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
|
|
121
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
|
|
122
|
-
type: NgModule,
|
|
123
|
-
args: [{
|
|
124
|
-
imports: [CommonModule],
|
|
125
|
-
declarations: [
|
|
126
|
-
BsCardComponent,
|
|
127
|
-
BsCardHeaderComponent
|
|
128
|
-
],
|
|
129
|
-
exports: [
|
|
130
|
-
BsCardComponent,
|
|
131
|
-
BsCardHeaderComponent
|
|
132
|
-
]
|
|
133
|
-
}]
|
|
134
|
-
}] });
|
|
135
|
-
|
|
136
198
|
class BsCalendarMonthService {
|
|
137
|
-
constructor() {
|
|
138
|
-
}
|
|
139
199
|
getWeeks(month) {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
200
|
+
const firstAndLast = this.getFirstAndLastDayOfMonth(month);
|
|
201
|
+
const days = this.dateDiff(firstAndLast.first, firstAndLast.last) + 1;
|
|
202
|
+
const allDays = [
|
|
143
203
|
...this.generateList(this.dayOfWeekMondayBased(firstAndLast.first)).map(d => null),
|
|
144
204
|
...this.generateList(days).map(d => {
|
|
145
205
|
return {
|
|
@@ -149,8 +209,8 @@ class BsCalendarMonthService {
|
|
|
149
209
|
}),
|
|
150
210
|
...this.generateList(6 - this.dayOfWeekMondayBased(firstAndLast.last)).map(d => null),
|
|
151
211
|
];
|
|
152
|
-
|
|
153
|
-
|
|
212
|
+
const weeks = this.chunk(allDays, 7);
|
|
213
|
+
const weeksMapped = weeks.map((w, i) => {
|
|
154
214
|
var _a;
|
|
155
215
|
return {
|
|
156
216
|
number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), (_a = w.find(d => d !== null)) === null || _a === void 0 ? void 0 : _a.dayOfMonth)),
|
|
@@ -163,7 +223,7 @@ class BsCalendarMonthService {
|
|
|
163
223
|
return [...Array(count).keys()];
|
|
164
224
|
}
|
|
165
225
|
dayOfWeekMondayBased(date) {
|
|
166
|
-
|
|
226
|
+
const d = date.getDay() - 1;
|
|
167
227
|
if (d < 0) {
|
|
168
228
|
return 6;
|
|
169
229
|
}
|
|
@@ -172,10 +232,10 @@ class BsCalendarMonthService {
|
|
|
172
232
|
}
|
|
173
233
|
}
|
|
174
234
|
weekOfYear(date) {
|
|
175
|
-
|
|
235
|
+
const dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
|
|
176
236
|
dateClone.setUTCDate(dateClone.getUTCDate() + 4 - (dateClone.getUTCDay() || 7));
|
|
177
|
-
|
|
178
|
-
|
|
237
|
+
const yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));
|
|
238
|
+
const utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);
|
|
179
239
|
return Math.ceil((utcDiff / (1000 * 60 * 60 * 24) + 1) / 7);
|
|
180
240
|
}
|
|
181
241
|
getFirstAndLastDayOfMonth(date) {
|
|
@@ -198,7 +258,7 @@ class BsCalendarMonthService {
|
|
|
198
258
|
return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
|
|
199
259
|
}
|
|
200
260
|
chunk(items, size) {
|
|
201
|
-
|
|
261
|
+
const result = [];
|
|
202
262
|
for (let i = 0; i < items.length; i += size) {
|
|
203
263
|
result.push(items.slice(i, i + size));
|
|
204
264
|
}
|
|
@@ -212,7 +272,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
212
272
|
args: [{
|
|
213
273
|
providedIn: 'root'
|
|
214
274
|
}]
|
|
215
|
-
}]
|
|
275
|
+
}] });
|
|
216
276
|
|
|
217
277
|
class UcFirstPipe {
|
|
218
278
|
transform(value, ...args) {
|
|
@@ -230,7 +290,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
230
290
|
|
|
231
291
|
class MonthNamePipe {
|
|
232
292
|
transform(date, ...args) {
|
|
233
|
-
|
|
293
|
+
if (date) {
|
|
294
|
+
return date.toLocaleString("default", { month: 'long' });
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
return '';
|
|
298
|
+
}
|
|
234
299
|
}
|
|
235
300
|
}
|
|
236
301
|
MonthNamePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonthNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
@@ -243,58 +308,100 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
243
308
|
}] });
|
|
244
309
|
|
|
245
310
|
class BsCalendarComponent {
|
|
246
|
-
constructor(calendarMonthService) {
|
|
311
|
+
constructor(calendarMonthService, ref) {
|
|
247
312
|
this.calendarMonthService = calendarMonthService;
|
|
248
|
-
this.
|
|
313
|
+
this.ref = ref;
|
|
314
|
+
this.destroyed$ = new Subject();
|
|
315
|
+
//#region CurrentMonth
|
|
316
|
+
this.currentMonth$ = new BehaviorSubject(new Date());
|
|
317
|
+
this.currentMonthChange = new EventEmitter();
|
|
318
|
+
//#endregion
|
|
249
319
|
//#region SelectedDate
|
|
250
|
-
this.selectedDate = new Date();
|
|
320
|
+
this.selectedDate$ = new BehaviorSubject(new Date());
|
|
321
|
+
this.selectedDateChange = new EventEmitter();
|
|
251
322
|
//#endregion
|
|
252
|
-
|
|
253
|
-
this.
|
|
323
|
+
this.daysOfWeek = ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su'];
|
|
324
|
+
this.weeks$ = this.currentMonth$
|
|
325
|
+
.pipe(map((month) => this.calendarMonthService.getWeeks(month)))
|
|
326
|
+
.pipe(takeUntil(this.destroyed$));
|
|
327
|
+
this.daysOfWeek$ = this.weeks$
|
|
328
|
+
.pipe(filter((weeks) => weeks.length > 1))
|
|
329
|
+
.pipe(map((weeks) => weeks[1].week))
|
|
330
|
+
.pipe(map((week) => {
|
|
331
|
+
const firstDay = week[0];
|
|
332
|
+
if (firstDay) {
|
|
333
|
+
return week.map((d) => {
|
|
334
|
+
const date = new Date(firstDay.date.getFullYear(), firstDay.date.getMonth(), d === null || d === void 0 ? void 0 : d.dayOfMonth);
|
|
335
|
+
return date.toLocaleString('default', { weekday: 'short' });
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
else {
|
|
339
|
+
return [];
|
|
340
|
+
}
|
|
341
|
+
}));
|
|
342
|
+
this.selectedDate$.pipe(takeUntil(this.destroyed$)).subscribe((date) => {
|
|
343
|
+
this.selectedDateChange.emit(date);
|
|
344
|
+
});
|
|
345
|
+
this.currentMonth$.pipe(takeUntil(this.destroyed$)).subscribe((month) => {
|
|
346
|
+
this.currentMonthChange.emit(month);
|
|
347
|
+
});
|
|
254
348
|
}
|
|
255
|
-
|
|
256
|
-
this.
|
|
349
|
+
get currentMonth() {
|
|
350
|
+
return this.currentMonth$.value;
|
|
257
351
|
}
|
|
258
|
-
|
|
259
|
-
|
|
352
|
+
set currentMonth(value) {
|
|
353
|
+
this.currentMonth$.next(value);
|
|
260
354
|
}
|
|
261
|
-
|
|
262
|
-
this.
|
|
263
|
-
this.weeks = this.calendarMonthService.getWeeks(this.month);
|
|
355
|
+
get selectedDate() {
|
|
356
|
+
return this.selectedDate$.value;
|
|
264
357
|
}
|
|
265
|
-
|
|
266
|
-
|
|
358
|
+
set selectedDate(value) {
|
|
359
|
+
this.selectedDate$.next(value);
|
|
267
360
|
}
|
|
268
|
-
|
|
269
|
-
this.
|
|
270
|
-
if (this._weeks.length > 1) {
|
|
271
|
-
this.daysOfWeek = this._weeks[1].week.map(d => {
|
|
272
|
-
let date = new Date(this.month.getFullYear(), this.month.getMonth(), d === null || d === void 0 ? void 0 : d.dayOfMonth);
|
|
273
|
-
return date.toLocaleString("default", { weekday: 'short' });
|
|
274
|
-
});
|
|
275
|
-
}
|
|
361
|
+
ngOnDestroy() {
|
|
362
|
+
this.destroyed$.next(true);
|
|
276
363
|
}
|
|
277
|
-
//#endregion
|
|
278
364
|
previousMonth() {
|
|
279
|
-
this.
|
|
365
|
+
this.currentMonth$.pipe(take(1)).subscribe((month) => {
|
|
366
|
+
this.currentMonth$.next(new Date(month.getFullYear(), month.getMonth() - 1, 1));
|
|
367
|
+
});
|
|
280
368
|
return false;
|
|
281
369
|
}
|
|
282
370
|
nextMonth() {
|
|
283
|
-
this.
|
|
371
|
+
this.currentMonth$.pipe(take(1)).subscribe((month) => {
|
|
372
|
+
this.currentMonth$.next(new Date(month.getFullYear(), month.getMonth() + 1, 1));
|
|
373
|
+
});
|
|
284
374
|
return false;
|
|
285
375
|
}
|
|
286
376
|
isSameDate(date1, date2) {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
377
|
+
if (date1 === null && date2 === null)
|
|
378
|
+
return true;
|
|
379
|
+
if (date1 === null || date2 === null)
|
|
380
|
+
return false;
|
|
381
|
+
return (date1.getFullYear() === date2.getFullYear() &&
|
|
382
|
+
date1.getMonth() === date2.getMonth() &&
|
|
383
|
+
date1.getDate() === date2.getDate());
|
|
384
|
+
}
|
|
385
|
+
goto(day) {
|
|
386
|
+
if (day) {
|
|
387
|
+
this.selectedDate$.next(day.date);
|
|
388
|
+
}
|
|
290
389
|
}
|
|
291
390
|
}
|
|
292
|
-
BsCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCalendarComponent, deps: [{ token: BsCalendarMonthService }], target: i0.ɵɵFactoryTarget.Component });
|
|
293
|
-
BsCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCalendarComponent, selector: "bs-calendar", ngImport: i0, template: "<table class=\"table w-auto\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{
|
|
391
|
+
BsCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCalendarComponent, deps: [{ token: BsCalendarMonthService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
392
|
+
BsCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCalendarComponent, selector: "bs-calendar", inputs: { currentMonth: "currentMonth", selectedDate: "selectedDate" }, outputs: { currentMonthChange: "currentMonthChange", selectedDateChange: "selectedDateChange" }, ngImport: i0, template: "<table class=\"table w-auto mb-0\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{ currentMonth$ | async | monthName | ucFirst }}\n {{ (currentMonth$ | async)?.getFullYear() }}\n </td>\n <td>\n <button class=\"btn btn-default border-bottom-0\" (click)=\"nextMonth()\">\n <i class=\"bi bi-chevron-right fw-bolder\"></i>\n </button>\n </td>\n </tr>\n <tr>\n <th></th>\n <th *ngFor=\"let dayOfWeek of daysOfWeek\">\n {{ dayOfWeek }}\n </th>\n </tr>\n <tr *ngFor=\"let week of (weeks$ | async)\">\n <th>\n {{ week.number }}\n </th>\n <td [class.selected]=\"day === null ? false : isSameDate(selectedDate$ | async, day.date)\" *ngFor=\"let day of week.week\" (click)=\"goto(day)\">\n <span *ngIf=\"day !== null\">{{ day.dayOfMonth }}</span>\n </td>\n </tr>\n</table>", styles: ["table{border-collapse:collapse;border:1px solid rgba(0,0,0,.125);background:#fff}table td,table th{width:40px;height:40px;text-align:center}table td span,table th span{cursor:pointer;white-space:nowrap}table td.selected{background-color:#0d6efd;color:#fff}table th{background-color:#f8f9fa}table tr{border-top:none}table tr:first-child>td{border-bottom:1px solid rgba(0,0,0,.125)}table tr:nth-of-type(2)>th:not(:nth-of-type(1)){border-bottom:1px solid rgba(0,0,0,.125)}table tr:not(:nth-of-type(2))>th:nth-of-type(1){border-right:1px solid rgba(0,0,0,.125)}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "ucFirst": UcFirstPipe, "monthName": MonthNamePipe, "async": i1.AsyncPipe } });
|
|
294
393
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCalendarComponent, decorators: [{
|
|
295
394
|
type: Component,
|
|
296
|
-
args: [{ selector: 'bs-calendar', template: "<table class=\"table w-auto\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{
|
|
297
|
-
}], ctorParameters: function () { return [{ type: BsCalendarMonthService }]; }
|
|
395
|
+
args: [{ selector: 'bs-calendar', template: "<table class=\"table w-auto mb-0\">\n <tr>\n <td>\n <button class=\"btn btn-default\" (click)=\"previousMonth()\">\n <i class=\"bi bi-chevron-left fw-bolder\"></i>\n </button>\n </td>\n <td colspan=\"6\" class=\"fw-bolder\">\n {{ currentMonth$ | async | monthName | ucFirst }}\n {{ (currentMonth$ | async)?.getFullYear() }}\n </td>\n <td>\n <button class=\"btn btn-default border-bottom-0\" (click)=\"nextMonth()\">\n <i class=\"bi bi-chevron-right fw-bolder\"></i>\n </button>\n </td>\n </tr>\n <tr>\n <th></th>\n <th *ngFor=\"let dayOfWeek of daysOfWeek\">\n {{ dayOfWeek }}\n </th>\n </tr>\n <tr *ngFor=\"let week of (weeks$ | async)\">\n <th>\n {{ week.number }}\n </th>\n <td [class.selected]=\"day === null ? false : isSameDate(selectedDate$ | async, day.date)\" *ngFor=\"let day of week.week\" (click)=\"goto(day)\">\n <span *ngIf=\"day !== null\">{{ day.dayOfMonth }}</span>\n </td>\n </tr>\n</table>", styles: ["table{border-collapse:collapse;border:1px solid rgba(0,0,0,.125);background:#fff}table td,table th{width:40px;height:40px;text-align:center}table td span,table th span{cursor:pointer;white-space:nowrap}table td.selected{background-color:#0d6efd;color:#fff}table th{background-color:#f8f9fa}table tr{border-top:none}table tr:first-child>td{border-bottom:1px solid rgba(0,0,0,.125)}table tr:nth-of-type(2)>th:not(:nth-of-type(1)){border-bottom:1px solid rgba(0,0,0,.125)}table tr:not(:nth-of-type(2))>th:nth-of-type(1){border-right:1px solid rgba(0,0,0,.125)}\n"] }]
|
|
396
|
+
}], ctorParameters: function () { return [{ type: BsCalendarMonthService }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { currentMonthChange: [{
|
|
397
|
+
type: Output
|
|
398
|
+
}], currentMonth: [{
|
|
399
|
+
type: Input
|
|
400
|
+
}], selectedDateChange: [{
|
|
401
|
+
type: Output
|
|
402
|
+
}], selectedDate: [{
|
|
403
|
+
type: Input
|
|
404
|
+
}] } });
|
|
298
405
|
|
|
299
406
|
class BsMonthNamePipeModule {
|
|
300
407
|
}
|
|
@@ -407,6 +514,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
407
514
|
}]
|
|
408
515
|
}] });
|
|
409
516
|
|
|
517
|
+
class BsCardComponent {
|
|
518
|
+
constructor() {
|
|
519
|
+
}
|
|
520
|
+
ngOnInit() {
|
|
521
|
+
}
|
|
522
|
+
ngAfterViewInit() {
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
BsCardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
526
|
+
BsCardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardComponent, selector: "bs-card", ngImport: i0, template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] });
|
|
527
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardComponent, decorators: [{
|
|
528
|
+
type: Component,
|
|
529
|
+
args: [{ selector: 'bs-card', template: "<div class=\"card\" style=\"width: 18rem;\">\n <ng-content select=\"bs-card-header\"></ng-content>\n <div class=\"card-block\">\n <ng-content></ng-content>\n </div>\n</div>", styles: [".card-block{margin:-1px}\n"] }]
|
|
530
|
+
}], ctorParameters: function () { return []; } });
|
|
531
|
+
|
|
532
|
+
class BsCardHeaderComponent {
|
|
533
|
+
constructor() {
|
|
534
|
+
}
|
|
535
|
+
ngOnInit() {
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
BsCardHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
539
|
+
BsCardHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCardHeaderComponent, selector: "bs-card-header", ngImport: i0, template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] });
|
|
540
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardHeaderComponent, decorators: [{
|
|
541
|
+
type: Component,
|
|
542
|
+
args: [{ selector: 'bs-card-header', template: "<div class=\"card-header\">\n <ng-content></ng-content>\n</div>", styles: [""] }]
|
|
543
|
+
}], ctorParameters: function () { return []; } });
|
|
544
|
+
|
|
545
|
+
class BsCardModule {
|
|
546
|
+
}
|
|
547
|
+
BsCardModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
548
|
+
BsCardModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, declarations: [BsCardComponent,
|
|
549
|
+
BsCardHeaderComponent], imports: [CommonModule], exports: [BsCardComponent,
|
|
550
|
+
BsCardHeaderComponent] });
|
|
551
|
+
BsCardModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, imports: [[CommonModule]] });
|
|
552
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCardModule, decorators: [{
|
|
553
|
+
type: NgModule,
|
|
554
|
+
args: [{
|
|
555
|
+
imports: [CommonModule],
|
|
556
|
+
declarations: [
|
|
557
|
+
BsCardComponent,
|
|
558
|
+
BsCardHeaderComponent
|
|
559
|
+
],
|
|
560
|
+
exports: [
|
|
561
|
+
BsCardComponent,
|
|
562
|
+
BsCardHeaderComponent
|
|
563
|
+
]
|
|
564
|
+
}]
|
|
565
|
+
}] });
|
|
566
|
+
|
|
410
567
|
class BsCarouselImageDirective {
|
|
411
568
|
constructor(templateRef) {
|
|
412
569
|
this.templateRef = templateRef;
|
|
@@ -424,20 +581,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
424
581
|
|
|
425
582
|
class BsCarouselComponent {
|
|
426
583
|
constructor() {
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
this.
|
|
584
|
+
this.animationsDisabled = false;
|
|
585
|
+
//#region Animation
|
|
586
|
+
this._animation = 'slide';
|
|
587
|
+
//#endregion
|
|
430
588
|
this.destroyed$ = new Subject();
|
|
431
589
|
this.currentImageCounter$ = new BehaviorSubject(-1);
|
|
432
590
|
this.currentImageIndex$ = this.currentImageCounter$
|
|
433
|
-
.pipe(map((counter) => {
|
|
591
|
+
.pipe(map$1((counter) => {
|
|
434
592
|
const l = this.images.length;
|
|
435
593
|
return ((counter % l) + l) % l;
|
|
436
594
|
}))
|
|
437
|
-
.pipe(takeUntil(this.destroyed$));
|
|
595
|
+
.pipe(takeUntil$1(this.destroyed$));
|
|
438
596
|
this.currentImage$ = this.currentImageIndex$
|
|
439
|
-
.pipe(map((index) => { var _a, _b; return (_b = (_a = this.images.get(index)) === null || _a === void 0 ? void 0 : _a.itemTemplate) !== null && _b !== void 0 ? _b : null; }))
|
|
440
|
-
.pipe(takeUntil(this.destroyed$));
|
|
597
|
+
.pipe(map$1((index) => { var _a, _b; return (_b = (_a = this.images.get(index)) === null || _a === void 0 ? void 0 : _a.itemTemplate) !== null && _b !== void 0 ? _b : null; }))
|
|
598
|
+
.pipe(takeUntil$1(this.destroyed$));
|
|
441
599
|
}
|
|
442
600
|
ngOnInit() { }
|
|
443
601
|
ngOnDestroy() {
|
|
@@ -451,16 +609,26 @@ class BsCarouselComponent {
|
|
|
451
609
|
this.currentImageCounter$.next(-1);
|
|
452
610
|
}
|
|
453
611
|
}
|
|
612
|
+
set animation(value) {
|
|
613
|
+
this.animationsDisabled = true;
|
|
614
|
+
this._animation = value;
|
|
615
|
+
setTimeout(() => {
|
|
616
|
+
this.animationsDisabled = false;
|
|
617
|
+
}, 20);
|
|
618
|
+
}
|
|
619
|
+
get animation() {
|
|
620
|
+
return this._animation;
|
|
621
|
+
}
|
|
454
622
|
previousImage() {
|
|
455
623
|
this.currentImageCounter$
|
|
456
|
-
.pipe(take(1))
|
|
624
|
+
.pipe(take$1(1))
|
|
457
625
|
.subscribe((currentImageCounter) => {
|
|
458
626
|
this.currentImageCounter$.next(currentImageCounter - 1);
|
|
459
627
|
});
|
|
460
628
|
}
|
|
461
629
|
nextImage() {
|
|
462
630
|
this.currentImageCounter$
|
|
463
|
-
.pipe(take(1))
|
|
631
|
+
.pipe(take$1(1))
|
|
464
632
|
.subscribe((currentImageCounter) => {
|
|
465
633
|
this.currentImageCounter$.next(currentImageCounter + 1);
|
|
466
634
|
});
|
|
@@ -474,11 +642,14 @@ class BsCarouselComponent {
|
|
|
474
642
|
}
|
|
475
643
|
}
|
|
476
644
|
BsCarouselComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
477
|
-
BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselComponent, selector: "bs-carousel", inputs: { animation: "animation" }, queries: [{ propertyName: "images", predicate: BsCarouselImageDirective }], ngImport: i0, template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [".carousel{min-height:100px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation, CarouselSlideAnimation] });
|
|
645
|
+
BsCarouselComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsCarouselComponent, selector: "bs-carousel", inputs: { animation: "animation" }, host: { properties: { "@.disabled": "this.animationsDisabled" } }, queries: [{ propertyName: "images", predicate: BsCarouselImageDirective }], ngImport: i0, template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [".carousel{min-height:100px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i1.AsyncPipe }, animations: [FadeInOutAnimation, CarouselSlideAnimation] });
|
|
478
646
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsCarouselComponent, decorators: [{
|
|
479
647
|
type: Component,
|
|
480
648
|
args: [{ selector: 'bs-carousel', animations: [FadeInOutAnimation, CarouselSlideAnimation], template: "<div class=\"carousel slide\">\n <div class=\"carousel-indicators\">\n <button *ngFor=\"let image of images; let i = index\" type=\"button\" (click)=\"setCurrentImage(i)\"\n [class.active]=\"(currentImageIndex$ | async) === i\" data-bs-target\n [attr.aria-current]=\"(currentImageIndex$ | async) === i ? true : null\"\n [attr.aria-label]=\"'Slide ' + i\"></button>\n </div>\n\n <div class=\"carousel-inner\" [@carouselSlide]=\"currentImageCounter$ | async\" *ngIf=\"animation === 'slide'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n <div class=\"carousel-inner\" *ngIf=\"animation === 'fade'\">\n <ng-container *ngFor=\"let image of images; let i = index\">\n <div class=\"carousel-item\" [class.active]=\"true\" @fadeInOut *ngIf=\"(currentImageIndex$ | async) === i\">\n <ng-container [ngTemplateOutlet]=\"image.itemTemplate\"></ng-container> \n </div>\n </ng-container>\n </div>\n\n <button class=\"carousel-control-prev\" type=\"button\" (click)=\"previousImage()\">\n <span class=\"carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Previous</span>\n </button>\n <button class=\"carousel-control-next\" type=\"button\" (click)=\"nextImage()\">\n <span class=\"carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"visually-hidden\">Next</span>\n </button>\n</div>", styles: [".carousel{min-height:100px}\n"] }]
|
|
481
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
649
|
+
}], ctorParameters: function () { return []; }, propDecorators: { animationsDisabled: [{
|
|
650
|
+
type: HostBinding,
|
|
651
|
+
args: ['@.disabled']
|
|
652
|
+
}], animation: [{
|
|
482
653
|
type: Input
|
|
483
654
|
}], images: [{
|
|
484
655
|
type: ContentChildren,
|
|
@@ -511,97 +682,811 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
511
682
|
}]
|
|
512
683
|
}] });
|
|
513
684
|
|
|
514
|
-
class
|
|
515
|
-
constructor() {
|
|
516
|
-
|
|
517
|
-
|
|
685
|
+
class BsContextMenuDirective {
|
|
686
|
+
constructor(overlay, templateRef, viewContainerRef, element) {
|
|
687
|
+
this.overlay = overlay;
|
|
688
|
+
this.templateRef = templateRef;
|
|
689
|
+
this.viewContainerRef = viewContainerRef;
|
|
690
|
+
this.element = element;
|
|
691
|
+
this.overlayRef = null;
|
|
692
|
+
this.templatePortal = null;
|
|
693
|
+
this.element.nativeElement.oncontextmenu = (ev) => {
|
|
694
|
+
ev.preventDefault();
|
|
695
|
+
this.checkAndCloseExisting(ev);
|
|
696
|
+
this.overlayRef = this.overlay.create({
|
|
697
|
+
scrollStrategy: this.overlay.scrollStrategies.noop(),
|
|
698
|
+
positionStrategy: this.overlay.position()
|
|
699
|
+
.global()
|
|
700
|
+
.left(ev.x + 'px')
|
|
701
|
+
.bottom((window.innerHeight - ev.y) + 'px')
|
|
702
|
+
.top(ev.y + 'px')
|
|
703
|
+
});
|
|
704
|
+
this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
|
705
|
+
this.overlayRef.attach(this.templatePortal);
|
|
706
|
+
};
|
|
518
707
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
BsListGroupItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsListGroupItemComponent, selector: "bs-list-group-item", ngImport: i0, template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] });
|
|
522
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
|
|
523
|
-
type: Component,
|
|
524
|
-
args: [{ selector: 'bs-list-group-item', template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] }]
|
|
525
|
-
}], ctorParameters: function () { return []; } });
|
|
526
|
-
|
|
527
|
-
class BsListGroupComponent {
|
|
528
|
-
constructor() {
|
|
708
|
+
clickAnywhere(ev) {
|
|
709
|
+
this.checkAndCloseExisting(ev);
|
|
529
710
|
}
|
|
530
|
-
|
|
711
|
+
checkAndCloseExisting(ev) {
|
|
712
|
+
if (this.overlayRef) {
|
|
713
|
+
if (!this.overlayRef.overlayElement.contains(ev.target)) {
|
|
714
|
+
this.overlayRef.detach();
|
|
715
|
+
this.overlayRef.dispose();
|
|
716
|
+
this.overlayRef = null;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
531
719
|
}
|
|
532
720
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
536
|
-
type:
|
|
537
|
-
args: [{
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
721
|
+
BsContextMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, deps: [{ token: i1$1.Overlay }, { token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef, host: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
722
|
+
BsContextMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsContextMenuDirective, selector: "[bsContextMenu]", host: { listeners: { "document:click": "clickAnywhere($event)" } }, ngImport: i0 });
|
|
723
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuDirective, decorators: [{
|
|
724
|
+
type: Directive,
|
|
725
|
+
args: [{
|
|
726
|
+
selector: '[bsContextMenu]'
|
|
727
|
+
}]
|
|
728
|
+
}], ctorParameters: function () {
|
|
729
|
+
return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef, decorators: [{
|
|
730
|
+
type: Host
|
|
731
|
+
}, {
|
|
732
|
+
type: SkipSelf
|
|
733
|
+
}] }];
|
|
734
|
+
}, propDecorators: { clickAnywhere: [{
|
|
735
|
+
type: HostListener,
|
|
736
|
+
args: ['document:click', ['$event']]
|
|
737
|
+
}] } });
|
|
738
|
+
|
|
739
|
+
class BsContextMenuModule {
|
|
740
|
+
}
|
|
741
|
+
BsContextMenuModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
742
|
+
BsContextMenuModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, declarations: [BsContextMenuDirective], imports: [CommonModule], exports: [BsContextMenuDirective] });
|
|
743
|
+
BsContextMenuModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, imports: [[
|
|
744
|
+
CommonModule
|
|
745
|
+
]] });
|
|
746
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsContextMenuModule, decorators: [{
|
|
747
|
+
type: NgModule,
|
|
748
|
+
args: [{
|
|
749
|
+
declarations: [
|
|
750
|
+
BsContextMenuDirective
|
|
751
|
+
],
|
|
752
|
+
imports: [
|
|
753
|
+
CommonModule
|
|
754
|
+
],
|
|
755
|
+
exports: [
|
|
756
|
+
BsContextMenuDirective
|
|
757
|
+
]
|
|
758
|
+
}]
|
|
759
|
+
}] });
|
|
760
|
+
|
|
761
|
+
class BsDatatableColumnDirective {
|
|
762
|
+
constructor(templateRef) {
|
|
763
|
+
this.bsDatatableColumn = { name: '', sortable: true };
|
|
764
|
+
this.templateRef = templateRef;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
BsDatatableColumnDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableColumnDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
768
|
+
BsDatatableColumnDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDatatableColumnDirective, selector: "[bsDatatableColumn]", inputs: { bsDatatableColumn: "bsDatatableColumn" }, ngImport: i0 });
|
|
769
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableColumnDirective, decorators: [{
|
|
770
|
+
type: Directive,
|
|
771
|
+
args: [{
|
|
772
|
+
selector: '[bsDatatableColumn]'
|
|
773
|
+
}]
|
|
774
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { bsDatatableColumn: [{
|
|
775
|
+
type: Input
|
|
776
|
+
}] } });
|
|
777
|
+
|
|
778
|
+
class DatatableSettings {
|
|
779
|
+
constructor(data) {
|
|
780
|
+
this.sortProperty = '';
|
|
781
|
+
this.sortDirection = 'ascending';
|
|
782
|
+
Object.assign(this, data);
|
|
783
|
+
if (data && data.perPage) {
|
|
784
|
+
this.perPage = data.perPage;
|
|
785
|
+
}
|
|
786
|
+
else {
|
|
787
|
+
// Set default value
|
|
788
|
+
this.perPage = {
|
|
789
|
+
values: [10, 20, 50],
|
|
790
|
+
selected: 20
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
if (data && data.page) {
|
|
794
|
+
this.page = data.page;
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
// Set default value
|
|
798
|
+
this.page = {
|
|
799
|
+
values: [1],
|
|
800
|
+
selected: 1
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
toPagination() {
|
|
805
|
+
const res = {
|
|
806
|
+
sortProperty: this.sortProperty,
|
|
807
|
+
sortDirection: this.sortDirection,
|
|
808
|
+
perPage: this.perPage.selected,
|
|
809
|
+
page: this.page.selected
|
|
810
|
+
};
|
|
811
|
+
return res;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
class BsPaginationComponent {
|
|
816
|
+
constructor() {
|
|
817
|
+
/** All page numbers. */
|
|
818
|
+
this.pageNumbers$ = new BehaviorSubject([]);
|
|
819
|
+
/** Selected number. */
|
|
820
|
+
this.selectedPageNumber$ = new BehaviorSubject(1);
|
|
821
|
+
/** Number of boxes. */
|
|
822
|
+
this.numberOfBoxes$ = new BehaviorSubject(0);
|
|
823
|
+
/** Display previous/next arrows. */
|
|
824
|
+
this.showArrows$ = new BehaviorSubject(true);
|
|
825
|
+
/** Indicates if first value is selected. */
|
|
826
|
+
this.isFirstPage$ = new Observable();
|
|
827
|
+
/** Indicates if last value is selected. */
|
|
828
|
+
this.isLastPage$ = new Observable();
|
|
829
|
+
/** The number of boxes (excluding arrows) that's being shown on the pagination component. */
|
|
830
|
+
this.visibleNumberOfNumberBoxes$ = new Observable();
|
|
831
|
+
this._selectedPageNumber = 0;
|
|
832
|
+
this.selectedPageNumberChange = new EventEmitter();
|
|
833
|
+
this._numberOfBoxes = 0;
|
|
834
|
+
this._pageNumbers = [];
|
|
835
|
+
this._showArrows = true;
|
|
836
|
+
this.destroyed$ = new Subject();
|
|
837
|
+
this.visibleNumberOfNumberBoxes$ =
|
|
838
|
+
combineLatest([this.numberOfBoxes$, this.pageNumbers$, this.showArrows$])
|
|
839
|
+
.pipe(takeUntil(this.destroyed$))
|
|
840
|
+
.pipe(map(([numberOfBoxes, pageNumbers, showArrows]) => {
|
|
841
|
+
if (numberOfBoxes <= 0) {
|
|
842
|
+
return pageNumbers.length;
|
|
843
|
+
}
|
|
844
|
+
else if (!showArrows) {
|
|
845
|
+
return Math.min(numberOfBoxes, pageNumbers.length);
|
|
846
|
+
}
|
|
847
|
+
else if (numberOfBoxes <= 2) {
|
|
848
|
+
return Math.min(1, pageNumbers.length);
|
|
849
|
+
}
|
|
850
|
+
else {
|
|
851
|
+
return Math.min(numberOfBoxes - 2, pageNumbers.length);
|
|
852
|
+
}
|
|
853
|
+
}));
|
|
854
|
+
this.shownPageNumbers$ =
|
|
855
|
+
combineLatest([this.pageNumbers$, this.selectedPageNumber$, this.visibleNumberOfNumberBoxes$])
|
|
856
|
+
.pipe(takeUntil(this.destroyed$))
|
|
857
|
+
.pipe(map(([pageNumbers, selectedPageNumber, visibleNumberOfNumberBoxes]) => {
|
|
858
|
+
let startIndex = 0;
|
|
859
|
+
const half = Math.round((visibleNumberOfNumberBoxes - 1) / 2);
|
|
860
|
+
if (pageNumbers.indexOf(selectedPageNumber) < half) {
|
|
861
|
+
startIndex = 0;
|
|
862
|
+
}
|
|
863
|
+
else if (pageNumbers.indexOf(selectedPageNumber) >= (pageNumbers.length - half)) {
|
|
864
|
+
startIndex = pageNumbers.length - visibleNumberOfNumberBoxes;
|
|
865
|
+
}
|
|
866
|
+
else {
|
|
867
|
+
startIndex = pageNumbers.indexOf(selectedPageNumber) - half;
|
|
868
|
+
}
|
|
869
|
+
return [...Array(visibleNumberOfNumberBoxes).keys()]
|
|
870
|
+
.map(p => p + startIndex)
|
|
871
|
+
.map(p => ({
|
|
872
|
+
page: pageNumbers[p],
|
|
873
|
+
selected: pageNumbers[p] === selectedPageNumber
|
|
874
|
+
}));
|
|
875
|
+
}));
|
|
876
|
+
this.isFirstPage$ =
|
|
877
|
+
combineLatest([this.pageNumbers$, this.selectedPageNumber$])
|
|
878
|
+
.pipe(takeUntil(this.destroyed$))
|
|
879
|
+
.pipe(map(([pageNumbers, selectedPageNumber]) => {
|
|
880
|
+
return pageNumbers.indexOf(selectedPageNumber) === 0;
|
|
881
|
+
}));
|
|
882
|
+
this.isLastPage$ =
|
|
883
|
+
combineLatest([this.pageNumbers$, this.selectedPageNumber$])
|
|
884
|
+
.pipe(takeUntil(this.destroyed$))
|
|
885
|
+
.pipe(map(([pageNumbers, selectedPageNumber]) => {
|
|
886
|
+
return pageNumbers.indexOf(selectedPageNumber) === (pageNumbers.length - 1);
|
|
887
|
+
}));
|
|
888
|
+
this.selectedPageNumber$
|
|
889
|
+
.pipe(takeUntil(this.destroyed$))
|
|
890
|
+
.subscribe((selectedPageNumber) => {
|
|
891
|
+
this.selectedPageNumberChange.emit(selectedPageNumber);
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
ngOnInit() {
|
|
895
|
+
}
|
|
896
|
+
ngOnDestroy() {
|
|
897
|
+
this.destroyed$.next(true);
|
|
898
|
+
}
|
|
899
|
+
onSelectPage(event, page) {
|
|
900
|
+
this.selectedPageNumber$.next(page);
|
|
901
|
+
return false;
|
|
902
|
+
}
|
|
903
|
+
onPrevious() {
|
|
904
|
+
this.selectedPageNumber$.next(this.selectedPageNumber$.value - 1);
|
|
905
|
+
return false;
|
|
906
|
+
}
|
|
907
|
+
onNext() {
|
|
908
|
+
this.selectedPageNumber$.next(this.selectedPageNumber$.value + 1);
|
|
909
|
+
return false;
|
|
910
|
+
}
|
|
911
|
+
set selectedPageNumber(value) {
|
|
912
|
+
this._selectedPageNumber = value;
|
|
913
|
+
this.selectedPageNumber$.next(value);
|
|
914
|
+
}
|
|
915
|
+
get selectedPageNumber() {
|
|
916
|
+
return this._selectedPageNumber;
|
|
917
|
+
}
|
|
918
|
+
set numberOfBoxes(value) {
|
|
919
|
+
this._numberOfBoxes = value;
|
|
920
|
+
this.numberOfBoxes$.next(value);
|
|
921
|
+
}
|
|
922
|
+
get numberOfBoxes() {
|
|
923
|
+
return this._numberOfBoxes;
|
|
924
|
+
}
|
|
925
|
+
set pageNumbers(value) {
|
|
926
|
+
this._pageNumbers = value;
|
|
927
|
+
this.pageNumbers$.next(value);
|
|
928
|
+
}
|
|
929
|
+
get pageNumbers() {
|
|
930
|
+
return this._pageNumbers;
|
|
931
|
+
}
|
|
932
|
+
set showArrows(value) {
|
|
933
|
+
this._showArrows = value;
|
|
934
|
+
this.showArrows$.next(value);
|
|
935
|
+
}
|
|
936
|
+
get showArrows() {
|
|
937
|
+
return this._showArrows;
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
BsPaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
941
|
+
BsPaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsPaginationComponent, selector: "bs-pagination", inputs: { selectedPageNumber: "selectedPageNumber", numberOfBoxes: "numberOfBoxes", pageNumbers: "pageNumbers", showArrows: "showArrows" }, outputs: { selectedPageNumberChange: "selectedPageNumberChange" }, ngImport: i0, template: "<ul class=\"pagination\">\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isFirstPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onPrevious()\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">«</span>\n <span class=\"visually-hidden\">Previous</span>\n </a>\n </li>\n <li *ngFor=\"let pageNumber of (shownPageNumbers$ | async)\" class=\"page-item\"\n [ngClass]=\"{ 'active': pageNumber.selected }\">\n <a class=\"page-link\" href=\"\" (click)=\"onSelectPage($event, pageNumber.page)\" *ngIf=\"pageNumber.page != '...'\">\n {{ pageNumber.page }}\n <span class=\"visually-hidden\" *ngIf=\"pageNumber.selected\">(current)</span>\n </a>\n </li>\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isLastPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onNext()\" aria-label=\"Next\">\n <span aria-hidden=\"true\">»</span>\n <span class=\"visually-hidden\">Next</span>\n </a>\n </li>\n</ul>", styles: [":host{display:inline-block}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i1.AsyncPipe } });
|
|
942
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationComponent, decorators: [{
|
|
943
|
+
type: Component,
|
|
944
|
+
args: [{ selector: 'bs-pagination', template: "<ul class=\"pagination\">\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isFirstPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onPrevious()\" aria-label=\"Previous\">\n <span aria-hidden=\"true\">«</span>\n <span class=\"visually-hidden\">Previous</span>\n </a>\n </li>\n <li *ngFor=\"let pageNumber of (shownPageNumbers$ | async)\" class=\"page-item\"\n [ngClass]=\"{ 'active': pageNumber.selected }\">\n <a class=\"page-link\" href=\"\" (click)=\"onSelectPage($event, pageNumber.page)\" *ngIf=\"pageNumber.page != '...'\">\n {{ pageNumber.page }}\n <span class=\"visually-hidden\" *ngIf=\"pageNumber.selected\">(current)</span>\n </a>\n </li>\n <li class=\"page-item\" *ngIf=\"showArrows$ | async\" [class.disabled]=\"isLastPage$ | async\">\n <a class=\"page-link\" href=\"\" (click)=\"onNext()\" aria-label=\"Next\">\n <span aria-hidden=\"true\">»</span>\n <span class=\"visually-hidden\">Next</span>\n </a>\n </li>\n</ul>", styles: [":host{display:inline-block}\n"] }]
|
|
945
|
+
}], ctorParameters: function () { return []; }, propDecorators: { selectedPageNumberChange: [{
|
|
946
|
+
type: Output
|
|
947
|
+
}], selectedPageNumber: [{
|
|
948
|
+
type: Input
|
|
949
|
+
}], numberOfBoxes: [{
|
|
950
|
+
type: Input
|
|
951
|
+
}], pageNumbers: [{
|
|
952
|
+
type: Input
|
|
953
|
+
}], showArrows: [{
|
|
954
|
+
type: Input
|
|
955
|
+
}] } });
|
|
956
|
+
|
|
957
|
+
class BsDatatableComponent {
|
|
958
|
+
constructor() {
|
|
959
|
+
this.columns = [];
|
|
960
|
+
this.onReloadData = new EventEmitter();
|
|
961
|
+
this.settings = new DatatableSettings();
|
|
962
|
+
this.settings.sortProperty = '';
|
|
963
|
+
this.settings.sortDirection = 'ascending';
|
|
964
|
+
this.settings.perPage = { values: [10, 20, 50], selected: 20 };
|
|
965
|
+
this.settings.page = { values: [1], selected: 1 };
|
|
966
|
+
}
|
|
967
|
+
columnHeaderClicked(column) {
|
|
968
|
+
if (column.bsDatatableColumn.sortable) {
|
|
969
|
+
if (this.settings.sortProperty !== column.bsDatatableColumn.name) {
|
|
970
|
+
this.settings.sortProperty = column.bsDatatableColumn.name;
|
|
971
|
+
this.settings.sortDirection = 'ascending';
|
|
972
|
+
}
|
|
973
|
+
else if (this.settings.sortDirection === 'descending') {
|
|
974
|
+
this.settings.sortDirection = 'ascending';
|
|
975
|
+
}
|
|
976
|
+
else {
|
|
977
|
+
this.settings.sortDirection = 'descending';
|
|
978
|
+
}
|
|
979
|
+
this.onReloadData.emit();
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
ngOnInit() {
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
BsDatatableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
986
|
+
BsDatatableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatatableComponent, selector: "bs-datatable", inputs: { settings: "settings", data: "data" }, outputs: { onReloadData: "onReloadData" }, queries: [{ propertyName: "columns", predicate: BsDatatableColumnDirective }], ngImport: i0, template: "<div class=\"table-responsive overflow-y-hidden mb-3\">\n <table class=\"table table-striped table-hover w-100 mb-0\" cellspacing=\"0\" role=\"grid\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" class=\"text-nowrap\"\n [class.sort]=\"column.bsDatatableColumn.sortable\"\n [class.sort-asc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"!!data && !!rowTemplate\">\n <ng-container *ngFor=\"let item of data.data\">\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings.perPage.values\"\n [(selectedPageNumber)]=\"settings.perPage.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings.page.values\"\n [(selectedPageNumber)]=\"settings.page.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n</div>", styles: ["@charset \"UTF-8\";.overflow-y-hidden{overflow-y:hidden}.table thead th.sort{position:relative;cursor:pointer}.table thead th.sort:before,.table thead th.sort:after{position:absolute;display:block;opacity:.3;bottom:.5em}.table thead th.sort:before{content:\"\\2191\";right:1em}.table thead th.sort:after{content:\"\\2193\";right:.5em}.table thead th.sort.sort-asc:after{opacity:1}.table thead th.sort.sort-desc:before{opacity:1}\n"], components: [{ type: BsPaginationComponent, selector: "bs-pagination", inputs: ["selectedPageNumber", "numberOfBoxes", "pageNumbers", "showArrows"], outputs: ["selectedPageNumberChange"] }], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
987
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableComponent, decorators: [{
|
|
988
|
+
type: Component,
|
|
989
|
+
args: [{ selector: 'bs-datatable', template: "<div class=\"table-responsive overflow-y-hidden mb-3\">\n <table class=\"table table-striped table-hover w-100 mb-0\" cellspacing=\"0\" role=\"grid\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" class=\"text-nowrap\"\n [class.sort]=\"column.bsDatatableColumn.sortable\"\n [class.sort-asc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'ascending')\"\n [class.sort-desc]=\"column.bsDatatableColumn.sortable && (settings.sortProperty === column.bsDatatableColumn.name) && (settings.sortDirection === 'descending')\"\n (click)=\"columnHeaderClicked(column)\">\n <ng-container *ngTemplateOutlet=\"column.templateRef\"></ng-container>\n </th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngIf=\"!!data && !!rowTemplate\">\n <ng-container *ngFor=\"let item of data.data\">\n <ng-container *ngTemplateOutlet=\"rowTemplate; context: { $implicit: item }\"></ng-container>\n </ng-container>\n </ng-container>\n </tbody>\n </table>\n</div>\n<div class=\"container-fluid\">\n <div class=\"row\">\n <div class=\"col-md-12\">\n <bs-pagination class=\"float-start\" [pageNumbers]=\"settings.perPage.values\"\n [(selectedPageNumber)]=\"settings.perPage.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"false\"></bs-pagination>\n <bs-pagination class=\"float-end\" [pageNumbers]=\"settings.page.values\"\n [(selectedPageNumber)]=\"settings.page.selected\" (selectedPageNumberChange)=\"onReloadData.emit()\"\n [showArrows]=\"true\"></bs-pagination>\n </div>\n </div>\n</div>", styles: ["@charset \"UTF-8\";.overflow-y-hidden{overflow-y:hidden}.table thead th.sort{position:relative;cursor:pointer}.table thead th.sort:before,.table thead th.sort:after{position:absolute;display:block;opacity:.3;bottom:.5em}.table thead th.sort:before{content:\"\\2191\";right:1em}.table thead th.sort:after{content:\"\\2193\";right:.5em}.table thead th.sort.sort-asc:after{opacity:1}.table thead th.sort.sort-desc:before{opacity:1}\n"] }]
|
|
990
|
+
}], ctorParameters: function () { return []; }, propDecorators: { columns: [{
|
|
991
|
+
type: ContentChildren,
|
|
992
|
+
args: [BsDatatableColumnDirective]
|
|
993
|
+
}], settings: [{
|
|
994
|
+
type: Input
|
|
995
|
+
}], data: [{
|
|
996
|
+
type: Input
|
|
997
|
+
}], onReloadData: [{
|
|
998
|
+
type: Output
|
|
999
|
+
}] } });
|
|
1000
|
+
|
|
1001
|
+
class BsRowTemplateDirective {
|
|
1002
|
+
constructor(datatableComponent, templateRef) {
|
|
1003
|
+
this.datatableComponent = datatableComponent;
|
|
1004
|
+
this.datatableComponent.rowTemplate = templateRef;
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
BsRowTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsRowTemplateDirective, deps: [{ token: BsDatatableComponent }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1008
|
+
BsRowTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsRowTemplateDirective, selector: "[rowTemplate]", ngImport: i0 });
|
|
1009
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsRowTemplateDirective, decorators: [{
|
|
1010
|
+
type: Directive,
|
|
1011
|
+
args: [{
|
|
1012
|
+
selector: '[rowTemplate]'
|
|
1013
|
+
}]
|
|
1014
|
+
}], ctorParameters: function () { return [{ type: BsDatatableComponent }, { type: i0.TemplateRef }]; } });
|
|
1015
|
+
|
|
1016
|
+
class BsPaginationModule {
|
|
1017
|
+
}
|
|
1018
|
+
BsPaginationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1019
|
+
BsPaginationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, declarations: [BsPaginationComponent], imports: [CommonModule], exports: [BsPaginationComponent] });
|
|
1020
|
+
BsPaginationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, imports: [[
|
|
1021
|
+
CommonModule
|
|
1022
|
+
]] });
|
|
1023
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsPaginationModule, decorators: [{
|
|
1024
|
+
type: NgModule,
|
|
1025
|
+
args: [{
|
|
1026
|
+
declarations: [
|
|
1027
|
+
BsPaginationComponent
|
|
1028
|
+
],
|
|
1029
|
+
imports: [
|
|
1030
|
+
CommonModule
|
|
1031
|
+
],
|
|
1032
|
+
exports: [
|
|
1033
|
+
BsPaginationComponent
|
|
1034
|
+
]
|
|
1035
|
+
}]
|
|
1036
|
+
}] });
|
|
1037
|
+
|
|
1038
|
+
class BsDatatableModule {
|
|
1039
|
+
}
|
|
1040
|
+
BsDatatableModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1041
|
+
BsDatatableModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, declarations: [BsDatatableComponent,
|
|
1042
|
+
BsRowTemplateDirective,
|
|
1043
|
+
BsDatatableColumnDirective], imports: [CommonModule,
|
|
1044
|
+
BsPaginationModule], exports: [BsDatatableComponent,
|
|
1045
|
+
BsRowTemplateDirective,
|
|
1046
|
+
BsDatatableColumnDirective] });
|
|
1047
|
+
BsDatatableModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, imports: [[
|
|
1048
|
+
CommonModule,
|
|
1049
|
+
BsPaginationModule
|
|
1050
|
+
]] });
|
|
1051
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatatableModule, decorators: [{
|
|
1052
|
+
type: NgModule,
|
|
1053
|
+
args: [{
|
|
1054
|
+
declarations: [
|
|
1055
|
+
BsDatatableComponent,
|
|
1056
|
+
BsRowTemplateDirective,
|
|
1057
|
+
BsDatatableColumnDirective
|
|
1058
|
+
],
|
|
1059
|
+
imports: [
|
|
1060
|
+
CommonModule,
|
|
1061
|
+
BsPaginationModule
|
|
1062
|
+
],
|
|
1063
|
+
exports: [
|
|
1064
|
+
BsDatatableComponent,
|
|
1065
|
+
BsRowTemplateDirective,
|
|
1066
|
+
BsDatatableColumnDirective
|
|
1067
|
+
]
|
|
1068
|
+
}]
|
|
1069
|
+
}] });
|
|
1070
|
+
|
|
1071
|
+
class BsDropdownMenuDirective extends ClickOutsideDirective {
|
|
1072
|
+
constructor(dropdown, document, viewContainerRef, templateRef, overlay, elementRef, zone, platformId) {
|
|
1073
|
+
super(elementRef, zone, platformId);
|
|
1074
|
+
this.dropdown = dropdown;
|
|
1075
|
+
this.viewContainerRef = viewContainerRef;
|
|
1076
|
+
this.templateRef = templateRef;
|
|
1077
|
+
this.overlay = overlay;
|
|
1078
|
+
this.wait = false;
|
|
1079
|
+
this.destroyed$ = new Subject();
|
|
1080
|
+
this.overlayRef = null;
|
|
1081
|
+
this.templatePortal = null;
|
|
1082
|
+
this.document = document;
|
|
1083
|
+
this.dropdown.isOpen$
|
|
1084
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1085
|
+
.subscribe((isOpen) => {
|
|
1086
|
+
if (isOpen) {
|
|
1087
|
+
this.wait = true;
|
|
1088
|
+
setTimeout(() => this.wait = false, 100);
|
|
1089
|
+
this.overlayRef = this.overlay.create({
|
|
1090
|
+
hasBackdrop: this.dropdown.hasBackdrop,
|
|
1091
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
1092
|
+
positionStrategy: this.overlay.position()
|
|
1093
|
+
.flexibleConnectedTo(!this.dropdown.toggle ? dropdown.elementRef : this.dropdown.toggle.toggleButton)
|
|
1094
|
+
.withPositions([
|
|
1095
|
+
{ originX: "start", originY: "bottom", overlayX: "start", overlayY: "top", offsetY: 0 },
|
|
1096
|
+
{ originX: "start", originY: "top", overlayX: "start", overlayY: "bottom", offsetY: 0 },
|
|
1097
|
+
]),
|
|
1098
|
+
});
|
|
1099
|
+
if (this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
|
|
1100
|
+
this.overlayRef.backdropClick().subscribe(() => {
|
|
1101
|
+
this.dropdown.isOpen = false;
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
this.templatePortal = new TemplatePortal(this.templateRef, this.viewContainerRef);
|
|
1105
|
+
this.overlayRef.attach(this.templatePortal);
|
|
1106
|
+
}
|
|
1107
|
+
else {
|
|
1108
|
+
if (this.overlayRef) {
|
|
1109
|
+
this.overlayRef.detach();
|
|
1110
|
+
this.overlayRef.dispose();
|
|
1111
|
+
this.overlayRef = null;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
});
|
|
1115
|
+
}
|
|
1116
|
+
clickedOutside(ev) {
|
|
1117
|
+
var _a;
|
|
1118
|
+
if (!this.wait) {
|
|
1119
|
+
if (!((_a = this.overlayRef) === null || _a === void 0 ? void 0 : _a.overlayElement.contains(ev.target))) {
|
|
1120
|
+
this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
|
|
1121
|
+
if (isOpen && !this.dropdown.hasBackdrop && this.dropdown.closeOnClickOutside) {
|
|
1122
|
+
this.dropdown.isOpen = false;
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
BsDropdownMenuDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, deps: [{ token: forwardRef(() => BsDropdownDirective) }, { token: DOCUMENT }, { token: i0.ViewContainerRef }, { token: i0.TemplateRef }, { token: i1$1.Overlay }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1130
|
+
BsDropdownMenuDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]", host: { listeners: { "clickOutside": "clickedOutside($event)" }, properties: { "class.show": "dropdown.isOpen" } }, usesInheritance: true, ngImport: i0 });
|
|
1131
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownMenuDirective, decorators: [{
|
|
1132
|
+
type: Directive,
|
|
1133
|
+
args: [{
|
|
1134
|
+
selector: '[bsDropdownMenu]',
|
|
1135
|
+
host: {
|
|
1136
|
+
'[class.show]': 'dropdown.isOpen',
|
|
1137
|
+
},
|
|
1138
|
+
}]
|
|
1139
|
+
}], ctorParameters: function () {
|
|
1140
|
+
return [{ type: BsDropdownDirective, decorators: [{
|
|
1141
|
+
type: Inject,
|
|
1142
|
+
args: [forwardRef(() => BsDropdownDirective)]
|
|
1143
|
+
}] }, { type: undefined, decorators: [{
|
|
1144
|
+
type: Inject,
|
|
1145
|
+
args: [DOCUMENT]
|
|
1146
|
+
}] }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }, { type: i1$1.Overlay }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: Object, decorators: [{
|
|
1147
|
+
type: Inject,
|
|
1148
|
+
args: [PLATFORM_ID]
|
|
1149
|
+
}] }];
|
|
1150
|
+
}, propDecorators: { clickedOutside: [{
|
|
1151
|
+
type: HostListener,
|
|
1152
|
+
args: ['clickOutside', ['$event']]
|
|
1153
|
+
}] } });
|
|
1154
|
+
|
|
1155
|
+
class BsDropdownToggleDirective {
|
|
1156
|
+
constructor(dropdown, toggleButton) {
|
|
1157
|
+
this.dropdown = dropdown;
|
|
1158
|
+
this.toggleButton = toggleButton;
|
|
1159
|
+
}
|
|
1160
|
+
onClick() {
|
|
1161
|
+
this.dropdown.isOpen$.pipe(take(1)).subscribe((isOpen) => {
|
|
1162
|
+
this.dropdown.isOpen$.next(!isOpen);
|
|
1163
|
+
});
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
BsDropdownToggleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, deps: [{ token: BsDropdownDirective }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1167
|
+
BsDropdownToggleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
1168
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownToggleDirective, decorators: [{
|
|
1169
|
+
type: Directive,
|
|
1170
|
+
args: [{
|
|
1171
|
+
selector: '[bsDropdownToggle]'
|
|
1172
|
+
}]
|
|
1173
|
+
}], ctorParameters: function () { return [{ type: BsDropdownDirective }, { type: i0.ElementRef }]; }, propDecorators: { onClick: [{
|
|
1174
|
+
type: HostListener,
|
|
1175
|
+
args: ['click']
|
|
1176
|
+
}] } });
|
|
1177
|
+
|
|
1178
|
+
class BsDropdownDirective {
|
|
1179
|
+
constructor(elementRef) {
|
|
1180
|
+
this.isOpen$ = new BehaviorSubject(false);
|
|
1181
|
+
this.toggle = null;
|
|
1182
|
+
this.hasBackdrop = false;
|
|
1183
|
+
this.sameWidth = false;
|
|
1184
|
+
this.closeOnClickOutside = false;
|
|
1185
|
+
this.isOpenChange = new EventEmitter();
|
|
1186
|
+
this.elementRef = elementRef;
|
|
1187
|
+
}
|
|
1188
|
+
//#region IsOpen
|
|
1189
|
+
get isOpen() {
|
|
1190
|
+
return this.isOpen$.value;
|
|
1191
|
+
}
|
|
1192
|
+
set isOpen(value) {
|
|
1193
|
+
if (this.isOpen$.value !== value) {
|
|
1194
|
+
this.isOpen$.next(value);
|
|
1195
|
+
this.isOpenChange.emit(value);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
BsDropdownDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1200
|
+
BsDropdownDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: { hasBackdrop: "hasBackdrop", sameWidth: "sameWidth", closeOnClickOutside: "closeOnClickOutside", isOpen: "isOpen" }, outputs: { isOpenChange: "isOpenChange" }, queries: [{ propertyName: "menu", first: true, predicate: BsDropdownMenuDirective, descendants: true }, { propertyName: "toggle", first: true, predicate: BsDropdownToggleDirective, descendants: true }], ngImport: i0 });
|
|
1201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownDirective, decorators: [{
|
|
1202
|
+
type: Directive,
|
|
1203
|
+
args: [{
|
|
1204
|
+
selector: '[bsDropdown]'
|
|
1205
|
+
}]
|
|
1206
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { menu: [{
|
|
1207
|
+
type: ContentChild,
|
|
1208
|
+
args: [BsDropdownMenuDirective, { static: false }]
|
|
1209
|
+
}], toggle: [{
|
|
1210
|
+
type: ContentChild,
|
|
1211
|
+
args: [BsDropdownToggleDirective, { static: false }]
|
|
1212
|
+
}], hasBackdrop: [{
|
|
1213
|
+
type: Input
|
|
1214
|
+
}], sameWidth: [{
|
|
1215
|
+
type: Input
|
|
1216
|
+
}], closeOnClickOutside: [{
|
|
1217
|
+
type: Input
|
|
1218
|
+
}], isOpenChange: [{
|
|
1219
|
+
type: Output
|
|
1220
|
+
}], isOpen: [{
|
|
1221
|
+
type: Input
|
|
1222
|
+
}] } });
|
|
1223
|
+
|
|
1224
|
+
class BsDatepickerComponent {
|
|
1225
|
+
constructor() {
|
|
1226
|
+
this.selectedDate = new Date();
|
|
1227
|
+
this.currentMonth = new Date();
|
|
1228
|
+
}
|
|
1229
|
+
ngOnInit() {
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
BsDatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1233
|
+
BsDatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsDatepickerComponent, selector: "bs-datepicker", ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""], components: [{ type: BsCalendarComponent, selector: "bs-calendar", inputs: ["currentMonth", "selectedDate"], outputs: ["currentMonthChange", "selectedDateChange"] }], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }], pipes: { "date": i1.DatePipe } });
|
|
1234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerComponent, decorators: [{
|
|
1235
|
+
type: Component,
|
|
1236
|
+
args: [{ selector: 'bs-datepicker', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedDate | date }}</button>\n <div *bsDropdownMenu>\n <bs-calendar [(selectedDate)]=\"selectedDate\" [(currentMonth)]=\"currentMonth\"></bs-calendar>\n </div>\n</div>", styles: [""] }]
|
|
1237
|
+
}], ctorParameters: function () { return []; } });
|
|
1238
|
+
|
|
1239
|
+
class BsDropdownModule {
|
|
1240
|
+
}
|
|
1241
|
+
BsDropdownModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1242
|
+
BsDropdownModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, declarations: [BsDropdownDirective,
|
|
1243
|
+
BsDropdownToggleDirective,
|
|
1244
|
+
BsDropdownMenuDirective], imports: [CommonModule,
|
|
1245
|
+
OverlayModule,
|
|
1246
|
+
ClickOutsideModule], exports: [BsDropdownDirective,
|
|
1247
|
+
BsDropdownToggleDirective,
|
|
1248
|
+
BsDropdownMenuDirective] });
|
|
1249
|
+
BsDropdownModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, imports: [[
|
|
1250
|
+
CommonModule,
|
|
1251
|
+
OverlayModule,
|
|
1252
|
+
ClickOutsideModule
|
|
1253
|
+
]] });
|
|
1254
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDropdownModule, decorators: [{
|
|
1255
|
+
type: NgModule,
|
|
1256
|
+
args: [{
|
|
1257
|
+
declarations: [
|
|
1258
|
+
BsDropdownDirective,
|
|
1259
|
+
BsDropdownToggleDirective,
|
|
1260
|
+
BsDropdownMenuDirective
|
|
1261
|
+
],
|
|
1262
|
+
imports: [
|
|
1263
|
+
CommonModule,
|
|
1264
|
+
OverlayModule,
|
|
1265
|
+
ClickOutsideModule
|
|
1266
|
+
],
|
|
1267
|
+
exports: [
|
|
1268
|
+
BsDropdownDirective,
|
|
1269
|
+
BsDropdownToggleDirective,
|
|
1270
|
+
BsDropdownMenuDirective
|
|
1271
|
+
]
|
|
1272
|
+
}]
|
|
1273
|
+
}] });
|
|
1274
|
+
|
|
1275
|
+
class BsDatepickerModule {
|
|
1276
|
+
}
|
|
1277
|
+
BsDatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1278
|
+
BsDatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, declarations: [BsDatepickerComponent], imports: [CommonModule,
|
|
1279
|
+
BsCalendarModule,
|
|
1280
|
+
BsDropdownModule], exports: [BsDatepickerComponent] });
|
|
1281
|
+
BsDatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, imports: [[
|
|
1282
|
+
CommonModule,
|
|
1283
|
+
BsCalendarModule,
|
|
1284
|
+
BsDropdownModule
|
|
1285
|
+
]] });
|
|
1286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsDatepickerModule, decorators: [{
|
|
1287
|
+
type: NgModule,
|
|
1288
|
+
args: [{
|
|
1289
|
+
declarations: [
|
|
1290
|
+
BsDatepickerComponent
|
|
1291
|
+
],
|
|
1292
|
+
imports: [
|
|
1293
|
+
CommonModule,
|
|
1294
|
+
BsCalendarModule,
|
|
1295
|
+
BsDropdownModule
|
|
1296
|
+
],
|
|
1297
|
+
exports: [
|
|
1298
|
+
BsDatepickerComponent
|
|
1299
|
+
]
|
|
1300
|
+
}]
|
|
1301
|
+
}] });
|
|
1302
|
+
|
|
1303
|
+
class BsListGroupItemComponent {
|
|
1304
|
+
constructor() {
|
|
1305
|
+
}
|
|
1306
|
+
ngOnInit() {
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
BsListGroupItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1310
|
+
BsListGroupItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsListGroupItemComponent, selector: "bs-list-group-item", ngImport: i0, template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] });
|
|
1311
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupItemComponent, decorators: [{
|
|
1312
|
+
type: Component,
|
|
1313
|
+
args: [{ selector: 'bs-list-group-item', template: "<li class=\"list-group-item\">\n <ng-content></ng-content>\n</li>", styles: [".list-group-item{margin-bottom:-1px}\n"] }]
|
|
1314
|
+
}], ctorParameters: function () { return []; } });
|
|
1315
|
+
|
|
1316
|
+
class BsListGroupComponent {
|
|
1317
|
+
constructor() {
|
|
1318
|
+
}
|
|
1319
|
+
ngOnInit() {
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
BsListGroupComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1323
|
+
BsListGroupComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsListGroupComponent, selector: "bs-list-group", queries: [{ propertyName: "items", predicate: BsListGroupItemComponent }], ngImport: i0, template: "<ul class=\"list-group mt-0\">\n <ng-content></ng-content>\n</ul>", styles: [""] });
|
|
1324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupComponent, decorators: [{
|
|
1325
|
+
type: Component,
|
|
1326
|
+
args: [{ selector: 'bs-list-group', template: "<ul class=\"list-group mt-0\">\n <ng-content></ng-content>\n</ul>", styles: [""] }]
|
|
1327
|
+
}], ctorParameters: function () { return []; }, propDecorators: { items: [{
|
|
1328
|
+
type: ContentChildren,
|
|
1329
|
+
args: [BsListGroupItemComponent]
|
|
1330
|
+
}] } });
|
|
1331
|
+
|
|
1332
|
+
class BsListGroupModule {
|
|
1333
|
+
}
|
|
1334
|
+
BsListGroupModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1335
|
+
BsListGroupModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupModule, declarations: [BsListGroupComponent,
|
|
1336
|
+
BsListGroupItemComponent], imports: [CommonModule], exports: [BsListGroupComponent,
|
|
1337
|
+
BsListGroupItemComponent] });
|
|
1338
|
+
BsListGroupModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupModule, imports: [[CommonModule]] });
|
|
1339
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsListGroupModule, decorators: [{
|
|
1340
|
+
type: NgModule,
|
|
1341
|
+
args: [{
|
|
1342
|
+
imports: [CommonModule],
|
|
1343
|
+
declarations: [
|
|
1344
|
+
BsListGroupComponent,
|
|
1345
|
+
BsListGroupItemComponent
|
|
1346
|
+
],
|
|
1347
|
+
exports: [
|
|
1348
|
+
BsListGroupComponent,
|
|
1349
|
+
BsListGroupItemComponent
|
|
1350
|
+
]
|
|
1351
|
+
}]
|
|
1352
|
+
}] });
|
|
1353
|
+
|
|
1354
|
+
class BsMultiselectComponent {
|
|
1355
|
+
constructor() {
|
|
1356
|
+
this.items = [];
|
|
1357
|
+
this.selectedItems = [];
|
|
1358
|
+
}
|
|
1359
|
+
itemChange(item, event) {
|
|
1360
|
+
if (!!event.target.checked) {
|
|
1361
|
+
this.selectedItems.push(item);
|
|
1362
|
+
}
|
|
1363
|
+
else {
|
|
1364
|
+
this.selectedItems.splice(this.selectedItems.findIndex((i) => i === item), 1);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1367
|
+
ngOnInit() {
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
BsMultiselectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1371
|
+
BsMultiselectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsMultiselectComponent, selector: "bs-multiselect", inputs: { items: "items", selectedItems: "selectedItems" }, queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white mw-250px p-3 border rounded shadow\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n <hr class=\"my-2\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [".mw-250px{min-width:250px}\n"], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: BsDropdownToggleDirective, selector: "[bsDropdownToggle]" }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectComponent, decorators: [{
|
|
1373
|
+
type: Component,
|
|
1374
|
+
args: [{ selector: 'bs-multiselect', template: "<div bsDropdown [hasBackdrop]=\"true\" [closeOnClickOutside]=\"true\">\n <button bsDropdownToggle class=\"btn btn-primary\">{{ selectedItems.length }} selected</button>\n <div *bsDropdownMenu class=\"bg-white mw-250px p-3 border rounded shadow\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n <hr class=\"my-2\">\n <label *ngFor=\"let item of items\" class=\"form-check\">\n <input type=\"checkbox\" [checked]=\"selectedItems.indexOf(item) > -1\" (change)=\"itemChange(item, $event)\" class=\"form-check-input\">\n <span class=\"form-check-label\">{{ item }}</span>\n </label>\n </div>\n</div>", styles: [".mw-250px{min-width:250px}\n"] }]
|
|
1375
|
+
}], ctorParameters: function () { return []; }, propDecorators: { template: [{
|
|
1376
|
+
type: ContentChild,
|
|
1377
|
+
args: [TemplateRef]
|
|
1378
|
+
}], items: [{
|
|
1379
|
+
type: Input
|
|
1380
|
+
}], selectedItems: [{
|
|
1381
|
+
type: Input
|
|
541
1382
|
}] } });
|
|
542
1383
|
|
|
543
|
-
class
|
|
1384
|
+
class BsMultiselectModule {
|
|
544
1385
|
}
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
1386
|
+
BsMultiselectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1387
|
+
BsMultiselectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, declarations: [BsMultiselectComponent], imports: [CommonModule,
|
|
1388
|
+
BsDropdownModule,
|
|
1389
|
+
FocusOnLoadModule], exports: [BsMultiselectComponent] });
|
|
1390
|
+
BsMultiselectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, imports: [[
|
|
1391
|
+
CommonModule,
|
|
1392
|
+
BsDropdownModule,
|
|
1393
|
+
FocusOnLoadModule,
|
|
1394
|
+
]] });
|
|
1395
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsMultiselectModule, decorators: [{
|
|
551
1396
|
type: NgModule,
|
|
552
1397
|
args: [{
|
|
553
|
-
imports: [CommonModule],
|
|
554
1398
|
declarations: [
|
|
555
|
-
|
|
556
|
-
|
|
1399
|
+
BsMultiselectComponent
|
|
1400
|
+
],
|
|
1401
|
+
imports: [
|
|
1402
|
+
CommonModule,
|
|
1403
|
+
BsDropdownModule,
|
|
1404
|
+
FocusOnLoadModule,
|
|
557
1405
|
],
|
|
558
1406
|
exports: [
|
|
559
|
-
|
|
560
|
-
BsListGroupItemComponent
|
|
1407
|
+
BsMultiselectComponent
|
|
561
1408
|
]
|
|
562
1409
|
}]
|
|
563
1410
|
}] });
|
|
564
1411
|
|
|
565
1412
|
class BsNavbarComponent {
|
|
566
1413
|
constructor() {
|
|
567
|
-
this.isExpanded = false;
|
|
1414
|
+
this.isExpanded$ = new BehaviorSubject(false);
|
|
568
1415
|
}
|
|
569
1416
|
toggleExpanded() {
|
|
570
|
-
this.isExpanded
|
|
1417
|
+
this.isExpanded$.pipe(take(1)).subscribe((isExpanded) => {
|
|
1418
|
+
this.isExpanded$.next(!isExpanded);
|
|
1419
|
+
});
|
|
571
1420
|
}
|
|
572
1421
|
}
|
|
573
1422
|
BsNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
574
|
-
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarComponent, selector: "bs-navbar", viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\"
|
|
1423
|
+
BsNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarComponent, selector: "bs-navbar", viewQueries: [{ propertyName: "nav", first: true, predicate: ["nav"], descendants: true }], ngImport: i0, template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] });
|
|
575
1424
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarComponent, decorators: [{
|
|
576
1425
|
type: Component,
|
|
577
|
-
args: [{ selector: 'bs-navbar', template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\"
|
|
578
|
-
}],
|
|
1426
|
+
args: [{ selector: 'bs-navbar', template: "<nav #nav class=\"navbar navbar-expand-md position-fixed navbar-dark bg-dark\">\n <div class=\"container-fluid\">\n <div class=\"d-flex w-100 w-md-auto\">\n <a class=\"navbar-brand mx-auto mx-md-unset\" href=\"#\">Navbar 2</a>\n <button (click)=\"toggleExpanded()\" class=\"navbar-toggler align-self-end\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n </div>\n <ng-content></ng-content>\n </div>\n</nav>", styles: [":host ::ng-deep+*{padding-top:56px}nav{left:0;top:0;right:0;z-index:10}@media (min-width: 768px){.mx-md-unset{margin-left:0!important;margin-right:0!important}.w-md-auto{width:auto!important}}\n"] }]
|
|
1427
|
+
}], propDecorators: { nav: [{
|
|
579
1428
|
type: ViewChild,
|
|
580
1429
|
args: ['nav']
|
|
581
1430
|
}] } });
|
|
582
1431
|
|
|
583
1432
|
class BsNavbarNavComponent {
|
|
584
1433
|
constructor(bsNavbar) {
|
|
585
|
-
|
|
586
|
-
this.
|
|
1434
|
+
this.collapse$ = new BehaviorSubject(true);
|
|
1435
|
+
this.windowWidth$ = new BehaviorSubject(null);
|
|
1436
|
+
this.isResizing$ = new BehaviorSubject(false);
|
|
1437
|
+
this.destroyed$ = new Subject();
|
|
587
1438
|
this.bsNavbar = bsNavbar;
|
|
1439
|
+
this.showNavs$ = combineLatest([this.bsNavbar.isExpanded$, this.windowWidth$])
|
|
1440
|
+
.pipe(filter(([isExpanded, windowWidth]) => {
|
|
1441
|
+
return windowWidth !== null;
|
|
1442
|
+
}))
|
|
1443
|
+
.pipe(map(([isExpanded, windowWidth]) => {
|
|
1444
|
+
if (windowWidth === null) {
|
|
1445
|
+
throw 'windowWidth should not be null here';
|
|
1446
|
+
}
|
|
1447
|
+
else if (windowWidth >= 768) {
|
|
1448
|
+
return true;
|
|
1449
|
+
}
|
|
1450
|
+
else if (isExpanded) {
|
|
1451
|
+
return true;
|
|
1452
|
+
}
|
|
1453
|
+
else {
|
|
1454
|
+
return false;
|
|
1455
|
+
}
|
|
1456
|
+
}));
|
|
1457
|
+
this.windowWidth$
|
|
1458
|
+
.pipe(debounceTime(300), takeUntil(this.destroyed$))
|
|
1459
|
+
.subscribe(() => {
|
|
1460
|
+
this.isResizing$.next(false);
|
|
1461
|
+
});
|
|
1462
|
+
this.onWindowResize();
|
|
588
1463
|
}
|
|
589
|
-
|
|
1464
|
+
ngOnDestroy() {
|
|
1465
|
+
this.destroyed$.next(true);
|
|
590
1466
|
}
|
|
1467
|
+
//#region collapse
|
|
591
1468
|
set collapse(value) {
|
|
592
|
-
this.
|
|
1469
|
+
this.collapse$.next(value);
|
|
593
1470
|
}
|
|
594
1471
|
get collapse() {
|
|
595
|
-
return this.
|
|
1472
|
+
return this.collapse$.value;
|
|
1473
|
+
}
|
|
1474
|
+
//#endregion
|
|
1475
|
+
onWindowResize() {
|
|
1476
|
+
this.isResizing$.next(true);
|
|
1477
|
+
this.windowWidth$.next(window.innerWidth);
|
|
596
1478
|
}
|
|
597
1479
|
}
|
|
598
1480
|
BsNavbarNavComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, deps: [{ token: BsNavbarComponent }], target: i0.ɵɵFactoryTarget.Component });
|
|
599
|
-
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, ngImport: i0, template: "<div class=\"navbar-collapse
|
|
1481
|
+
BsNavbarNavComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarNavComponent, selector: "bs-navbar-nav", inputs: { collapse: "collapse" }, host: { listeners: { "window:resize": "onWindowResize()" } }, ngImport: i0, template: "<div class=\"navbar-collapse w-100 show\" [class.collapse]=\"collapse$ | async\" *ngIf=\"showNavs$ | async\" [@slideUpDown] [@.disabled]=\"isResizing$ | async\">\n <ul class=\"navbar-nav mr-auto\">\n <ng-content></ng-content>\n </ul>\n</div>", styles: [":host{margin-right:auto}@media screen and (max-width: 767px){:host{width:100%!important}.navbar-collapse.collapse{overflow:hidden}}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i1.AsyncPipe }, animations: [SlideUpDownAnimation] });
|
|
600
1482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarNavComponent, decorators: [{
|
|
601
1483
|
type: Component,
|
|
602
|
-
args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse
|
|
1484
|
+
args: [{ selector: 'bs-navbar-nav', animations: [SlideUpDownAnimation], template: "<div class=\"navbar-collapse w-100 show\" [class.collapse]=\"collapse$ | async\" *ngIf=\"showNavs$ | async\" [@slideUpDown] [@.disabled]=\"isResizing$ | async\">\n <ul class=\"navbar-nav mr-auto\">\n <ng-content></ng-content>\n </ul>\n</div>", styles: [":host{margin-right:auto}@media screen and (max-width: 767px){:host{width:100%!important}.navbar-collapse.collapse{overflow:hidden}}\n"] }]
|
|
603
1485
|
}], ctorParameters: function () { return [{ type: BsNavbarComponent }]; }, propDecorators: { collapse: [{
|
|
604
1486
|
type: Input
|
|
1487
|
+
}], onWindowResize: [{
|
|
1488
|
+
type: HostListener,
|
|
1489
|
+
args: ['window:resize']
|
|
605
1490
|
}] } });
|
|
606
1491
|
|
|
607
1492
|
class BsNavbarItemComponent {
|
|
@@ -662,7 +1547,7 @@ class BsNavbarDropdownComponent {
|
|
|
662
1547
|
}
|
|
663
1548
|
}
|
|
664
1549
|
BsNavbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, deps: [{ token: BsNavbarDropdownComponent, host: true, optional: true, skipSelf: true }, { token: forwardRef(() => BsNavbarItemComponent), host: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
665
|
-
BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: i0.forwardRef(function () { return BsNavbarDropdownComponent; }), descendants: true }], ngImport: i0, template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"], directives: [{ type: i1$
|
|
1550
|
+
BsNavbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsNavbarDropdownComponent, selector: "bs-navbar-dropdown", queries: [{ propertyName: "childDropdowns", predicate: i0.forwardRef(function () { return BsNavbarDropdownComponent; }), descendants: true }], ngImport: i0, template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"], directives: [{ type: i1$2.ClickOutsideDirective, selector: "[clickOutside]", inputs: ["clickOutsideEnabled", "attachOutsideOnClick", "delayClickOutsideInit", "emitOnBlur", "exclude", "excludeBeforeClick", "clickOutsideEvents"], outputs: ["clickOutside"] }] });
|
|
666
1551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsNavbarDropdownComponent, decorators: [{
|
|
667
1552
|
type: Component,
|
|
668
1553
|
args: [{ selector: 'bs-navbar-dropdown', template: "<ul class=\"dropdown-menu\" [class.show]=\"isVisible\" [class.submenu]=\"!!parentDropdown\" (clickOutside)=\"isVisible = false\" [exclude]=\"elementsToExclude\" aria-labelledby=\"navbarDropdown\">\n <ng-content></ng-content>\n</ul>", styles: ["@media (max-width: 767px){.submenu{margin-left:.5rem;margin-right:.5rem}}@media (min-width: 768px){.submenu{position:absolute;left:100%;top:-1px}}\n"] }]
|
|
@@ -812,112 +1697,621 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
812
1697
|
],
|
|
813
1698
|
imports: [
|
|
814
1699
|
CommonModule,
|
|
815
|
-
RouterModule,
|
|
816
|
-
ClickOutsideModule
|
|
1700
|
+
RouterModule,
|
|
1701
|
+
ClickOutsideModule
|
|
1702
|
+
],
|
|
1703
|
+
exports: [
|
|
1704
|
+
BsNavbarComponent,
|
|
1705
|
+
BsNavbarNavComponent,
|
|
1706
|
+
BsNavbarDropdownComponent,
|
|
1707
|
+
BsNavbarItemComponent,
|
|
1708
|
+
DropdownToggleDirective,
|
|
1709
|
+
NavLinkDirective,
|
|
1710
|
+
NavbarContentDirective
|
|
1711
|
+
]
|
|
1712
|
+
}]
|
|
1713
|
+
}] });
|
|
1714
|
+
|
|
1715
|
+
class BsProgressComponent {
|
|
1716
|
+
constructor() {
|
|
1717
|
+
this.progressClass = true;
|
|
1718
|
+
this.height = null;
|
|
1719
|
+
this.isIndeterminate = false;
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
BsProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1723
|
+
BsProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressComponent, selector: "bs-progress", inputs: { height: "height", isIndeterminate: "isIndeterminate" }, host: { properties: { "class.progress": "this.progressClass", "style.height.px": "this.height" } }, ngImport: i0, template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"], directives: [{ type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressComponent, decorators: [{
|
|
1725
|
+
type: Component,
|
|
1726
|
+
args: [{ selector: 'bs-progress', template: "<ng-content *ngIf=\"!isIndeterminate\"></ng-content>\n<div *ngIf=\"isIndeterminate\" class=\"progress-bar progress-bar-infinite\" role=\"progressbar\" aria-valuenow=\"infinite\"></div>", styles: ["@keyframes progress-infinite{0%{width:10%;margin-left:0%}25%{width:70%;margin-left:15%}50%{width:10%;margin-left:90%}75%{width:70%;margin-left:15%}to{width:10%;margin-left:0%}}.progress-bar-infinite{animation:progress-infinite 1.5s infinite}\n"] }]
|
|
1727
|
+
}], propDecorators: { progressClass: [{
|
|
1728
|
+
type: HostBinding,
|
|
1729
|
+
args: ['class.progress']
|
|
1730
|
+
}], height: [{
|
|
1731
|
+
type: Input
|
|
1732
|
+
}, {
|
|
1733
|
+
type: HostBinding,
|
|
1734
|
+
args: ['style.height.px']
|
|
1735
|
+
}], isIndeterminate: [{
|
|
1736
|
+
type: Input
|
|
1737
|
+
}] } });
|
|
1738
|
+
|
|
1739
|
+
class BsProgressBarComponent {
|
|
1740
|
+
constructor() {
|
|
1741
|
+
this.destroyed$ = new Subject();
|
|
1742
|
+
this.minimum$ = new BehaviorSubject(0);
|
|
1743
|
+
this.maximum$ = new BehaviorSubject(100);
|
|
1744
|
+
this.value$ = new BehaviorSubject(50);
|
|
1745
|
+
this.color$ = new BehaviorSubject(Color.primary);
|
|
1746
|
+
this.striped = false;
|
|
1747
|
+
this.animated = false;
|
|
1748
|
+
this.progressBar = true;
|
|
1749
|
+
this.colorClass = 'bg-primary';
|
|
1750
|
+
this.widthStyle = '0';
|
|
1751
|
+
this.role = 'progressbar';
|
|
1752
|
+
this.valueNow = 50;
|
|
1753
|
+
this.valueMin = 0;
|
|
1754
|
+
this.valueMax = 100;
|
|
1755
|
+
this.percentage$ = combineLatest([this.minimum$, this.maximum$, this.value$])
|
|
1756
|
+
.pipe(map(([minimum, maximum, value]) => {
|
|
1757
|
+
return (value - minimum) / (maximum - minimum) * 100;
|
|
1758
|
+
}));
|
|
1759
|
+
this.width$ = this.percentage$
|
|
1760
|
+
.pipe(map((width) => {
|
|
1761
|
+
return String(width) + '%';
|
|
1762
|
+
}));
|
|
1763
|
+
this.colorClass$ = this.color$
|
|
1764
|
+
.pipe(map((color) => {
|
|
1765
|
+
const name = Color[color];
|
|
1766
|
+
return `bg-${name}`;
|
|
1767
|
+
}));
|
|
1768
|
+
this.colorClass$
|
|
1769
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1770
|
+
.subscribe((color) => {
|
|
1771
|
+
this.colorClass = color;
|
|
1772
|
+
});
|
|
1773
|
+
this.width$
|
|
1774
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1775
|
+
.subscribe((width) => {
|
|
1776
|
+
this.widthStyle = width;
|
|
1777
|
+
});
|
|
1778
|
+
this.value$
|
|
1779
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1780
|
+
.subscribe((value) => {
|
|
1781
|
+
this.valueNow = value;
|
|
1782
|
+
});
|
|
1783
|
+
this.minimum$
|
|
1784
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1785
|
+
.subscribe((value) => {
|
|
1786
|
+
this.valueMin = value;
|
|
1787
|
+
});
|
|
1788
|
+
this.maximum$
|
|
1789
|
+
.pipe(takeUntil(this.destroyed$))
|
|
1790
|
+
.subscribe((value) => {
|
|
1791
|
+
this.valueMax = value;
|
|
1792
|
+
});
|
|
1793
|
+
}
|
|
1794
|
+
set minimum(value) {
|
|
1795
|
+
this.minimum$.next(value);
|
|
1796
|
+
}
|
|
1797
|
+
set maximum(value) {
|
|
1798
|
+
this.maximum$.next(value);
|
|
1799
|
+
}
|
|
1800
|
+
set value(value) {
|
|
1801
|
+
this.value$.next(value);
|
|
1802
|
+
}
|
|
1803
|
+
set color(value) {
|
|
1804
|
+
this.color$.next(value);
|
|
1805
|
+
}
|
|
1806
|
+
ngOnDestroy() {
|
|
1807
|
+
this.destroyed$.next(true);
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
BsProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1811
|
+
BsProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsProgressBarComponent, selector: "bs-progress-bar", inputs: { minimum: "minimum", maximum: "maximum", value: "value", color: "color", striped: "striped", animated: "animated" }, host: { properties: { "class.progress-bar-striped": "this.striped", "class.progress-bar-animated": "this.animated", "class.progress-bar": "this.progressBar", "class": "this.colorClass", "style.width": "this.widthStyle", "attr.role": "this.role", "attr.aria-valuenow": "this.valueNow", "attr.aria-valuemin": "this.valueMin", "attr.aria-valuemax": "this.valueMax" } }, ngImport: i0, template: "", styles: [""] });
|
|
1812
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarComponent, decorators: [{
|
|
1813
|
+
type: Component,
|
|
1814
|
+
args: [{ selector: 'bs-progress-bar', template: "", styles: [""] }]
|
|
1815
|
+
}], ctorParameters: function () { return []; }, propDecorators: { minimum: [{
|
|
1816
|
+
type: Input
|
|
1817
|
+
}], maximum: [{
|
|
1818
|
+
type: Input
|
|
1819
|
+
}], value: [{
|
|
1820
|
+
type: Input
|
|
1821
|
+
}], color: [{
|
|
1822
|
+
type: Input
|
|
1823
|
+
}], striped: [{
|
|
1824
|
+
type: Input
|
|
1825
|
+
}, {
|
|
1826
|
+
type: HostBinding,
|
|
1827
|
+
args: ['class.progress-bar-striped']
|
|
1828
|
+
}], animated: [{
|
|
1829
|
+
type: Input
|
|
1830
|
+
}, {
|
|
1831
|
+
type: HostBinding,
|
|
1832
|
+
args: ['class.progress-bar-animated']
|
|
1833
|
+
}], progressBar: [{
|
|
1834
|
+
type: HostBinding,
|
|
1835
|
+
args: ['class.progress-bar']
|
|
1836
|
+
}], colorClass: [{
|
|
1837
|
+
type: HostBinding,
|
|
1838
|
+
args: ['class']
|
|
1839
|
+
}], widthStyle: [{
|
|
1840
|
+
type: HostBinding,
|
|
1841
|
+
args: ['style.width']
|
|
1842
|
+
}], role: [{
|
|
1843
|
+
type: HostBinding,
|
|
1844
|
+
args: ['attr.role']
|
|
1845
|
+
}], valueNow: [{
|
|
1846
|
+
type: HostBinding,
|
|
1847
|
+
args: ['attr.aria-valuenow']
|
|
1848
|
+
}], valueMin: [{
|
|
1849
|
+
type: HostBinding,
|
|
1850
|
+
args: ['attr.aria-valuemin']
|
|
1851
|
+
}], valueMax: [{
|
|
1852
|
+
type: HostBinding,
|
|
1853
|
+
args: ['attr.aria-valuemax']
|
|
1854
|
+
}] } });
|
|
1855
|
+
|
|
1856
|
+
class BsProgressBarModule {
|
|
1857
|
+
}
|
|
1858
|
+
BsProgressBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1859
|
+
BsProgressBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, declarations: [BsProgressBarComponent,
|
|
1860
|
+
BsProgressComponent], imports: [CommonModule], exports: [BsProgressBarComponent,
|
|
1861
|
+
BsProgressComponent] });
|
|
1862
|
+
BsProgressBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, imports: [[
|
|
1863
|
+
CommonModule
|
|
1864
|
+
]] });
|
|
1865
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsProgressBarModule, decorators: [{
|
|
1866
|
+
type: NgModule,
|
|
1867
|
+
args: [{
|
|
1868
|
+
declarations: [
|
|
1869
|
+
BsProgressBarComponent,
|
|
1870
|
+
BsProgressComponent
|
|
1871
|
+
],
|
|
1872
|
+
imports: [
|
|
1873
|
+
CommonModule
|
|
1874
|
+
],
|
|
1875
|
+
exports: [
|
|
1876
|
+
BsProgressBarComponent,
|
|
1877
|
+
BsProgressComponent
|
|
1878
|
+
]
|
|
1879
|
+
}]
|
|
1880
|
+
}] });
|
|
1881
|
+
|
|
1882
|
+
class BsScrollspyDirective {
|
|
1883
|
+
constructor(element) {
|
|
1884
|
+
this.element = element;
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
BsScrollspyDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1888
|
+
BsScrollspyDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyDirective, selector: "[bsScrollspy]", ngImport: i0 });
|
|
1889
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyDirective, decorators: [{
|
|
1890
|
+
type: Directive,
|
|
1891
|
+
args: [{
|
|
1892
|
+
selector: '[bsScrollspy]'
|
|
1893
|
+
}]
|
|
1894
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
1895
|
+
|
|
1896
|
+
class BsScrollOffsetService {
|
|
1897
|
+
constructor(routerConfig) {
|
|
1898
|
+
this.routerConfig = routerConfig;
|
|
1899
|
+
}
|
|
1900
|
+
getScrollOffset() {
|
|
1901
|
+
if (!this.routerConfig.scrollOffset) {
|
|
1902
|
+
return [0, 0];
|
|
1903
|
+
}
|
|
1904
|
+
else if (Array.isArray(this.routerConfig.scrollOffset)) {
|
|
1905
|
+
return this.routerConfig.scrollOffset;
|
|
1906
|
+
}
|
|
1907
|
+
else {
|
|
1908
|
+
return this.routerConfig.scrollOffset();
|
|
1909
|
+
}
|
|
1910
|
+
}
|
|
1911
|
+
}
|
|
1912
|
+
BsScrollOffsetService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, deps: [{ token: ROUTER_CONFIGURATION }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1913
|
+
BsScrollOffsetService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, providedIn: 'root' });
|
|
1914
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollOffsetService, decorators: [{
|
|
1915
|
+
type: Injectable,
|
|
1916
|
+
args: [{
|
|
1917
|
+
providedIn: 'root'
|
|
1918
|
+
}]
|
|
1919
|
+
}], ctorParameters: function () {
|
|
1920
|
+
return [{ type: undefined, decorators: [{
|
|
1921
|
+
type: Inject,
|
|
1922
|
+
args: [ROUTER_CONFIGURATION]
|
|
1923
|
+
}] }];
|
|
1924
|
+
} });
|
|
1925
|
+
|
|
1926
|
+
class BsScrollspyComponent {
|
|
1927
|
+
constructor(scrollOffsetService, document) {
|
|
1928
|
+
this.scrollOffsetService = scrollOffsetService;
|
|
1929
|
+
this.activeDirective = null;
|
|
1930
|
+
this.doc = document;
|
|
1931
|
+
}
|
|
1932
|
+
ngAfterViewInit() {
|
|
1933
|
+
this.onWindowScroll();
|
|
1934
|
+
}
|
|
1935
|
+
onWindowScroll() {
|
|
1936
|
+
var _a;
|
|
1937
|
+
const offsetY = this.scrollOffsetService.getScrollOffset()[1];
|
|
1938
|
+
const dirs = this.directives.filter((d) => d.element.nativeElement.getBoundingClientRect().y < offsetY);
|
|
1939
|
+
if (this.directives.length === 0) {
|
|
1940
|
+
this.activeDirective = null;
|
|
1941
|
+
}
|
|
1942
|
+
else if (dirs.length === 0) {
|
|
1943
|
+
this.activeDirective = (_a = this.directives.get(0)) !== null && _a !== void 0 ? _a : null;
|
|
1944
|
+
}
|
|
1945
|
+
else {
|
|
1946
|
+
this.activeDirective = dirs[dirs.length - 1];
|
|
1947
|
+
}
|
|
1948
|
+
if (window && (window.innerWidth >= 768)) {
|
|
1949
|
+
if (this.activeDirective) {
|
|
1950
|
+
const index = this.directives.toArray().findIndex((v, i) => v === this.activeDirective);
|
|
1951
|
+
const anchor = this.anchors.get(index);
|
|
1952
|
+
if (anchor && anchor.nativeElement.parentElement) {
|
|
1953
|
+
anchor.nativeElement.scrollIntoView({ block: 'nearest', inline: 'nearest' });
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
scrollToHeader(directive) {
|
|
1959
|
+
const header = directive.element.nativeElement;
|
|
1960
|
+
const offsetY = this.scrollOffsetService.getScrollOffset()[1];
|
|
1961
|
+
const y = header.getBoundingClientRect().top + window.scrollY - offsetY + 1;
|
|
1962
|
+
window.scrollTo({ top: y, behavior: 'smooth' });
|
|
1963
|
+
}
|
|
1964
|
+
}
|
|
1965
|
+
BsScrollspyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, deps: [{ token: BsScrollOffsetService }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
1966
|
+
BsScrollspyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsScrollspyComponent, selector: "bs-scrollspy", host: { listeners: { "window:scroll": "onWindowScroll($event)" } }, queries: [{ propertyName: "directives", predicate: BsScrollspyDirective, descendants: true }], viewQueries: [{ propertyName: "anchors", predicate: ["anchor"], descendants: true }], ngImport: i0, template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives; let i = index\">\n <span [attr.data-index]=\"i\" class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\" #anchor>\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:calc(100vh - 7rem);overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"], directives: [{ type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1967
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyComponent, decorators: [{
|
|
1968
|
+
type: Component,
|
|
1969
|
+
args: [{ selector: 'bs-scrollspy', template: "<div class=\"spy\">\n <ul class=\"text-muted\">\n <li *ngFor=\"let dir of directives; let i = index\">\n <span [attr.data-index]=\"i\" class=\"cursor-pointer\" [ngClass]=\"'nav' + dir.element.nativeElement.tagName\" [class.fw-bold]=\"activeDirective?.element === dir.element\" (click)=\"scrollToHeader(dir)\" [title]=\"dir.element.nativeElement.textContent\" #anchor>\n {{ dir.element.nativeElement.textContent }}\n </span>\n </li>\n </ul>\n</div>\n<div class=\"content\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spy>ul{list-style-type:none;padding-left:0}.spy>ul>li:hover{color:rgba(var(--bs-dark-rgb),var(--bs-text-opacity))!important}.spy>ul>li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media (min-width: 768px){:host{display:grid;grid-template-areas:\"content toc\";grid-template-columns:auto 200px;grid-template-rows:auto;grid-gap:inherit;gap:inherit;grid-area:main}.spy{position:sticky;top:5rem;right:0;z-index:2;height:calc(100vh - 7rem);overflow-y:auto;grid-area:toc}.spy>ul{padding-left:2rem}}.navH2{margin-left:20px}.navH3{margin-left:40px}.navH4{margin-left:60px}\n"] }]
|
|
1970
|
+
}], ctorParameters: function () {
|
|
1971
|
+
return [{ type: BsScrollOffsetService }, { type: undefined, decorators: [{
|
|
1972
|
+
type: Inject,
|
|
1973
|
+
args: [DOCUMENT]
|
|
1974
|
+
}] }];
|
|
1975
|
+
}, propDecorators: { directives: [{
|
|
1976
|
+
type: ContentChildren,
|
|
1977
|
+
args: [BsScrollspyDirective, { descendants: true }]
|
|
1978
|
+
}], anchors: [{
|
|
1979
|
+
type: ViewChildren,
|
|
1980
|
+
args: ['anchor']
|
|
1981
|
+
}], onWindowScroll: [{
|
|
1982
|
+
type: HostListener,
|
|
1983
|
+
args: ['window:scroll', ['$event']]
|
|
1984
|
+
}] } });
|
|
1985
|
+
|
|
1986
|
+
class BsScrollspyModule {
|
|
1987
|
+
}
|
|
1988
|
+
BsScrollspyModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1989
|
+
BsScrollspyModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, declarations: [BsScrollspyComponent,
|
|
1990
|
+
BsScrollspyDirective], imports: [CommonModule], exports: [BsScrollspyComponent,
|
|
1991
|
+
BsScrollspyDirective] });
|
|
1992
|
+
BsScrollspyModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, imports: [[
|
|
1993
|
+
CommonModule
|
|
1994
|
+
]] });
|
|
1995
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsScrollspyModule, decorators: [{
|
|
1996
|
+
type: NgModule,
|
|
1997
|
+
args: [{
|
|
1998
|
+
declarations: [
|
|
1999
|
+
BsScrollspyComponent,
|
|
2000
|
+
BsScrollspyDirective
|
|
2001
|
+
],
|
|
2002
|
+
imports: [
|
|
2003
|
+
CommonModule
|
|
2004
|
+
],
|
|
2005
|
+
exports: [
|
|
2006
|
+
BsScrollspyComponent,
|
|
2007
|
+
BsScrollspyDirective
|
|
2008
|
+
]
|
|
2009
|
+
}]
|
|
2010
|
+
}] });
|
|
2011
|
+
|
|
2012
|
+
class BsInListPipe {
|
|
2013
|
+
transform(items, parameter) {
|
|
2014
|
+
return items.some(item => item.id === parameter);
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
BsInListPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2018
|
+
BsInListPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, name: "inList" });
|
|
2019
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListPipe, decorators: [{
|
|
2020
|
+
type: Pipe,
|
|
2021
|
+
args: [{
|
|
2022
|
+
name: 'inList'
|
|
2023
|
+
}]
|
|
2024
|
+
}] });
|
|
2025
|
+
|
|
2026
|
+
class BsSelect2Component {
|
|
2027
|
+
constructor() {
|
|
2028
|
+
this.isOpen = false;
|
|
2029
|
+
this.suggestions$ = new BehaviorSubject([]);
|
|
2030
|
+
this.isLoading$ = new BehaviorSubject(false);
|
|
2031
|
+
this.hostWidth$ = new BehaviorSubject(200);
|
|
2032
|
+
this.searchterm = '';
|
|
2033
|
+
this.suggestions = [];
|
|
2034
|
+
this.provideSuggestions = new EventEmitter();
|
|
2035
|
+
this.selectedItems = [];
|
|
2036
|
+
this.isFocused = false;
|
|
2037
|
+
this.charWidth = 10;
|
|
2038
|
+
this.searchWidth = 20;
|
|
2039
|
+
}
|
|
2040
|
+
ngAfterViewInit() {
|
|
2041
|
+
this.onResize();
|
|
2042
|
+
}
|
|
2043
|
+
onProvideSuggestions(value) {
|
|
2044
|
+
this.searchWidth = this.charWidth * (this.searchterm.length + 2);
|
|
2045
|
+
if (value === '') {
|
|
2046
|
+
this.isOpen = false;
|
|
2047
|
+
this.suggestions$.next([]);
|
|
2048
|
+
}
|
|
2049
|
+
else {
|
|
2050
|
+
this.isLoading$.next(true);
|
|
2051
|
+
this.isOpen = true;
|
|
2052
|
+
this.provideSuggestions.emit(value);
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
onSuggestionClicked(suggestion) {
|
|
2056
|
+
this.searchterm = '';
|
|
2057
|
+
this.isOpen = false;
|
|
2058
|
+
const existing = this.selectedItems.find((value, index) => value.id === suggestion.id);
|
|
2059
|
+
if (existing === undefined) {
|
|
2060
|
+
this.selectedItems.push(suggestion);
|
|
2061
|
+
}
|
|
2062
|
+
else {
|
|
2063
|
+
this.selectedItems.splice(this.selectedItems.indexOf(existing), 1);
|
|
2064
|
+
}
|
|
2065
|
+
this.searchBox.nativeElement.focus();
|
|
2066
|
+
}
|
|
2067
|
+
onRemoveItem(item, event) {
|
|
2068
|
+
event.stopPropagation();
|
|
2069
|
+
this.selectedItems.splice(this.selectedItems.indexOf(item), 1);
|
|
2070
|
+
this.focus();
|
|
2071
|
+
}
|
|
2072
|
+
ngOnInit() {
|
|
2073
|
+
}
|
|
2074
|
+
onResize() {
|
|
2075
|
+
this.hostWidth$.next(this.itemsBox.nativeElement.offsetWidth);
|
|
2076
|
+
}
|
|
2077
|
+
focus() {
|
|
2078
|
+
this.searchBox.nativeElement.focus();
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
BsSelect2Component.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2082
|
+
BsSelect2Component.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsSelect2Component, selector: "bs-select2", inputs: { searchterm: "searchterm", suggestions: "suggestions", selectedItems: "selectedItems" }, outputs: { provideSuggestions: "provideSuggestions" }, host: { listeners: { "window:resize": "onResize()", "click": "focus()" }, properties: { "class.focus": "this.isFocused" } }, viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }, { propertyName: "itemsBox", first: true, predicate: ["itemsBox"], descendants: true }, { propertyName: "defaultItemTemplate", first: true, predicate: ["defaultItemTemplate"], descendants: true, static: true }], ngImport: i0, template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\" #itemsBox class=\"items-box\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { item: item, select2: this }\"></ng-container>\n </ng-container>\n\n <input type=\"text\" autocomplete=\"off\"\n [(ngModel)]=\"searchterm\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth\"\n #searchBox />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static p-0\" [style.width.px]=\"hostWidth$ | async\">\n <li *ngFor=\"let suggestion of suggestions\" (click)=\"onSuggestionClicked(suggestion)\" [class.selected]=\"selectedItems | inList:suggestion.id\">{{ suggestion.text }}</li>\n </ul>\n </div>\n</div>\n\n<ng-template #defaultItemTemplate let-item=\"item\" let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">\u00D7</span>\n {{ item.text }}\n </span>\n</ng-template>\n", styles: [".items-box{display:block;position:relative;width:100%;min-height:38px;padding:0 5px 3px;cursor:text;border:1px solid #ccc}.items-box .select2-item{display:inline-block;background-color:#e4e4e4;color:#1a1a1a;border:1px solid #aaa;border-radius:4px;margin-top:5px;margin-right:5px;padding:0 5px;cursor:default;user-select:none;-webkit-user-select:none}.items-box .select2-item>span{cursor:pointer;color:#999}.items-box .select2-item>span:hover{color:#333}.items-box input{border:none;outline:0;margin:5px 0 2px;background:none}:host{display:block;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}:host.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}ul{max-height:200px;overflow-y:auto}ul>li{padding:10px;cursor:pointer}ul>li.selected{background:#ddd}ul>li:hover{color:#fff;background-color:#5897fb}\n"], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }], pipes: { "async": i1.AsyncPipe, "inList": BsInListPipe } });
|
|
2083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Component, decorators: [{
|
|
2084
|
+
type: Component,
|
|
2085
|
+
args: [{ selector: 'bs-select2', template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\" #itemsBox class=\"items-box\">\n <ng-container *ngFor=\"let item of selectedItems\">\n <ng-container *ngTemplateOutlet=\"itemTemplate ?? defaultItemTemplate; context: { item: item, select2: this }\"></ng-container>\n </ng-container>\n\n <input type=\"text\" autocomplete=\"off\"\n [(ngModel)]=\"searchterm\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n (focus)=\"isFocused=true\"\n (blur)=\"isFocused=false\"\n [style.width.px]=\"searchWidth\"\n #searchBox />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static p-0\" [style.width.px]=\"hostWidth$ | async\">\n <li *ngFor=\"let suggestion of suggestions\" (click)=\"onSuggestionClicked(suggestion)\" [class.selected]=\"selectedItems | inList:suggestion.id\">{{ suggestion.text }}</li>\n </ul>\n </div>\n</div>\n\n<ng-template #defaultItemTemplate let-item=\"item\" let-select2=\"select2\">\n <span class=\"select2-item\">\n <span (click)=\"select2.onRemoveItem(item,$event)\">\u00D7</span>\n {{ item.text }}\n </span>\n</ng-template>\n", styles: [".items-box{display:block;position:relative;width:100%;min-height:38px;padding:0 5px 3px;cursor:text;border:1px solid #ccc}.items-box .select2-item{display:inline-block;background-color:#e4e4e4;color:#1a1a1a;border:1px solid #aaa;border-radius:4px;margin-top:5px;margin-right:5px;padding:0 5px;cursor:default;user-select:none;-webkit-user-select:none}.items-box .select2-item>span{cursor:pointer;color:#999}.items-box .select2-item>span:hover{color:#333}.items-box input{border:none;outline:0;margin:5px 0 2px;background:none}:host{display:block;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}:host.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}ul{max-height:200px;overflow-y:auto}ul>li{padding:10px;cursor:pointer}ul>li.selected{background:#ddd}ul>li:hover{color:#fff;background-color:#5897fb}\n"] }]
|
|
2086
|
+
}], ctorParameters: function () { return []; }, propDecorators: { searchBox: [{
|
|
2087
|
+
type: ViewChild,
|
|
2088
|
+
args: ['searchBox']
|
|
2089
|
+
}], itemsBox: [{
|
|
2090
|
+
type: ViewChild,
|
|
2091
|
+
args: ['itemsBox']
|
|
2092
|
+
}], searchterm: [{
|
|
2093
|
+
type: Input
|
|
2094
|
+
}], suggestions: [{
|
|
2095
|
+
type: Input
|
|
2096
|
+
}], provideSuggestions: [{
|
|
2097
|
+
type: Output
|
|
2098
|
+
}], selectedItems: [{
|
|
2099
|
+
type: Input
|
|
2100
|
+
}], isFocused: [{
|
|
2101
|
+
type: HostBinding,
|
|
2102
|
+
args: ['class.focus']
|
|
2103
|
+
}], onResize: [{
|
|
2104
|
+
type: HostListener,
|
|
2105
|
+
args: ['window:resize']
|
|
2106
|
+
}], focus: [{
|
|
2107
|
+
type: HostListener,
|
|
2108
|
+
args: ['click']
|
|
2109
|
+
}], defaultItemTemplate: [{
|
|
2110
|
+
type: ViewChild,
|
|
2111
|
+
args: ['defaultItemTemplate', { static: true }]
|
|
2112
|
+
}] } });
|
|
2113
|
+
|
|
2114
|
+
class BsItemTemplateDirective {
|
|
2115
|
+
constructor(select2component, templateRef) {
|
|
2116
|
+
this.select2component = select2component;
|
|
2117
|
+
console.log('template', templateRef);
|
|
2118
|
+
this.select2component.itemTemplate = templateRef;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
BsItemTemplateDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsItemTemplateDirective, deps: [{ token: BsSelect2Component }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2122
|
+
BsItemTemplateDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsItemTemplateDirective, selector: "[bsItemTemplate]", ngImport: i0 });
|
|
2123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsItemTemplateDirective, decorators: [{
|
|
2124
|
+
type: Directive,
|
|
2125
|
+
args: [{
|
|
2126
|
+
selector: '[bsItemTemplate]'
|
|
2127
|
+
}]
|
|
2128
|
+
}], ctorParameters: function () { return [{ type: BsSelect2Component }, { type: i0.TemplateRef }]; } });
|
|
2129
|
+
|
|
2130
|
+
class BsInListModule {
|
|
2131
|
+
}
|
|
2132
|
+
BsInListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2133
|
+
BsInListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, declarations: [BsInListPipe], imports: [CommonModule], exports: [BsInListPipe] });
|
|
2134
|
+
BsInListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, imports: [[
|
|
2135
|
+
CommonModule
|
|
2136
|
+
]] });
|
|
2137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsInListModule, decorators: [{
|
|
2138
|
+
type: NgModule,
|
|
2139
|
+
args: [{
|
|
2140
|
+
declarations: [
|
|
2141
|
+
BsInListPipe
|
|
2142
|
+
],
|
|
2143
|
+
imports: [
|
|
2144
|
+
CommonModule
|
|
2145
|
+
],
|
|
2146
|
+
exports: [
|
|
2147
|
+
BsInListPipe
|
|
2148
|
+
]
|
|
2149
|
+
}]
|
|
2150
|
+
}] });
|
|
2151
|
+
|
|
2152
|
+
class BsSelect2Module {
|
|
2153
|
+
}
|
|
2154
|
+
BsSelect2Module.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2155
|
+
BsSelect2Module.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, declarations: [BsSelect2Component,
|
|
2156
|
+
BsItemTemplateDirective], imports: [CommonModule,
|
|
2157
|
+
FormsModule,
|
|
2158
|
+
BsDropdownModule,
|
|
2159
|
+
BsInListModule], exports: [BsSelect2Component,
|
|
2160
|
+
BsItemTemplateDirective] });
|
|
2161
|
+
BsSelect2Module.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, imports: [[
|
|
2162
|
+
CommonModule,
|
|
2163
|
+
FormsModule,
|
|
2164
|
+
BsDropdownModule,
|
|
2165
|
+
BsInListModule
|
|
2166
|
+
]] });
|
|
2167
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSelect2Module, decorators: [{
|
|
2168
|
+
type: NgModule,
|
|
2169
|
+
args: [{
|
|
2170
|
+
declarations: [
|
|
2171
|
+
BsSelect2Component,
|
|
2172
|
+
BsItemTemplateDirective
|
|
2173
|
+
],
|
|
2174
|
+
imports: [
|
|
2175
|
+
CommonModule,
|
|
2176
|
+
FormsModule,
|
|
2177
|
+
BsDropdownModule,
|
|
2178
|
+
BsInListModule
|
|
817
2179
|
],
|
|
818
2180
|
exports: [
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
BsNavbarDropdownComponent,
|
|
822
|
-
BsNavbarItemComponent,
|
|
823
|
-
DropdownToggleDirective,
|
|
824
|
-
NavLinkDirective,
|
|
825
|
-
NavbarContentDirective
|
|
2181
|
+
BsSelect2Component,
|
|
2182
|
+
BsItemTemplateDirective
|
|
826
2183
|
]
|
|
827
2184
|
}]
|
|
828
2185
|
}] });
|
|
829
2186
|
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
2187
|
+
const SNACKBAR_CONTENT = new InjectionToken('SnackbarContent');
|
|
2188
|
+
|
|
2189
|
+
class BsSnackbarComponent {
|
|
2190
|
+
constructor(content) {
|
|
2191
|
+
this.displayBlock = true;
|
|
2192
|
+
this.width100 = true;
|
|
2193
|
+
this.instance = null;
|
|
2194
|
+
//#region Monitor @slideUpDown hooks
|
|
2195
|
+
this.animationState = '';
|
|
2196
|
+
this.animationStateChanged = new EventEmitter();
|
|
2197
|
+
this.content = content;
|
|
2198
|
+
}
|
|
2199
|
+
onAnimationChanged(event) {
|
|
2200
|
+
this.animationStateChanged.emit(event);
|
|
843
2201
|
}
|
|
844
2202
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
2203
|
+
BsSnackbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, deps: [{ token: SNACKBAR_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
2204
|
+
BsSnackbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsSnackbarComponent, selector: "bs-snackbar", host: { properties: { "class.d-block": "this.displayBlock", "class.w-100": "this.width100" } }, ngImport: i0, template: "<div [@slideUpDown]=\"animationState\"\n (@slideUpDown.start)=\"onAnimationChanged($event)\"\n (@slideUpDown.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [":host{background:#232323;color:rgba(var(--bs-light-rgb))}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [SlideUpDownAnimation] });
|
|
2205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarComponent, decorators: [{
|
|
848
2206
|
type: Component,
|
|
849
|
-
args: [{ selector: 'bs-
|
|
850
|
-
}], ctorParameters: function () {
|
|
2207
|
+
args: [{ selector: 'bs-snackbar', animations: [SlideUpDownAnimation], template: "<div [@slideUpDown]=\"animationState\"\n (@slideUpDown.start)=\"onAnimationChanged($event)\"\n (@slideUpDown.done)=\"onAnimationChanged($event)\">\n\n <ng-container *ngTemplateOutlet=\"content; context: { $implicit: this }\" ></ng-container>\n</div>", styles: [":host{background:#232323;color:rgba(var(--bs-light-rgb))}\n"] }]
|
|
2208
|
+
}], ctorParameters: function () {
|
|
2209
|
+
return [{ type: i0.TemplateRef, decorators: [{
|
|
2210
|
+
type: Inject,
|
|
2211
|
+
args: [SNACKBAR_CONTENT]
|
|
2212
|
+
}] }];
|
|
2213
|
+
}, propDecorators: { displayBlock: [{
|
|
2214
|
+
type: HostBinding,
|
|
2215
|
+
args: ['class.d-block']
|
|
2216
|
+
}], width100: [{
|
|
2217
|
+
type: HostBinding,
|
|
2218
|
+
args: ['class.w-100']
|
|
2219
|
+
}] } });
|
|
851
2220
|
|
|
852
|
-
class
|
|
853
|
-
constructor() {
|
|
854
|
-
this.
|
|
2221
|
+
class BsSnackbarService {
|
|
2222
|
+
constructor(overlay, parentInjector, componentFactoryResolver) {
|
|
2223
|
+
this.overlay = overlay;
|
|
2224
|
+
this.parentInjector = parentInjector;
|
|
2225
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
2226
|
+
}
|
|
2227
|
+
show(template) {
|
|
2228
|
+
const injector = Injector.create({
|
|
2229
|
+
providers: [{ provide: SNACKBAR_CONTENT, useValue: template }],
|
|
2230
|
+
parent: this.parentInjector
|
|
2231
|
+
});
|
|
2232
|
+
const portal = new ComponentPortal(BsSnackbarComponent, null, injector, this.componentFactoryResolver);
|
|
2233
|
+
const overlayRef = this.overlay.create({
|
|
2234
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2235
|
+
positionStrategy: this.overlay.position()
|
|
2236
|
+
.global().centerHorizontally().bottom('0'),
|
|
2237
|
+
width: '100%'
|
|
2238
|
+
});
|
|
2239
|
+
const componentInstance = overlayRef.attach(portal);
|
|
2240
|
+
// componentInstance.
|
|
2241
|
+
componentInstance.instance['instance'] = {
|
|
2242
|
+
component: componentInstance,
|
|
2243
|
+
overlay: overlayRef
|
|
2244
|
+
};
|
|
2245
|
+
return componentInstance.instance;
|
|
855
2246
|
}
|
|
856
|
-
|
|
2247
|
+
hide(snackbar) {
|
|
2248
|
+
snackbar.animationStateChanged.pipe(filter(ev => ev.phaseName === 'done' && ev.toState === 'void'), take(1)).subscribe(() => {
|
|
2249
|
+
var _a;
|
|
2250
|
+
(_a = snackbar['instance']) === null || _a === void 0 ? void 0 : _a.overlay.dispose();
|
|
2251
|
+
});
|
|
2252
|
+
snackbar.animationState = 'void';
|
|
857
2253
|
}
|
|
858
2254
|
}
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
862
|
-
type:
|
|
863
|
-
args: [{
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
}] } });
|
|
2255
|
+
BsSnackbarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2256
|
+
BsSnackbarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, providedIn: 'root' });
|
|
2257
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarService, decorators: [{
|
|
2258
|
+
type: Injectable,
|
|
2259
|
+
args: [{
|
|
2260
|
+
providedIn: 'root'
|
|
2261
|
+
}]
|
|
2262
|
+
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: i0.ComponentFactoryResolver }]; } });
|
|
868
2263
|
|
|
869
|
-
class
|
|
870
|
-
constructor(
|
|
871
|
-
this.
|
|
872
|
-
this.accordion = accordion;
|
|
2264
|
+
class BsSnackbarCloseDirective {
|
|
2265
|
+
constructor(snackbarService) {
|
|
2266
|
+
this.snackbarService = snackbarService;
|
|
873
2267
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
headerClicked(event) {
|
|
877
|
-
if (this.accordion.activeTab === this.accordionTab) {
|
|
878
|
-
this.accordion.activeTab = null;
|
|
879
|
-
}
|
|
880
|
-
else {
|
|
881
|
-
this.accordion.activeTab = this.accordionTab;
|
|
882
|
-
}
|
|
2268
|
+
onClick() {
|
|
2269
|
+
this.snackbarService.hide(this.bsSnackbarClose);
|
|
883
2270
|
}
|
|
884
2271
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
888
|
-
type:
|
|
889
|
-
args: [{
|
|
890
|
-
|
|
2272
|
+
BsSnackbarCloseDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, deps: [{ token: BsSnackbarService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2273
|
+
BsSnackbarCloseDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsSnackbarCloseDirective, selector: "[bsSnackbarClose]", inputs: { bsSnackbarClose: "bsSnackbarClose" }, host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
2274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarCloseDirective, decorators: [{
|
|
2275
|
+
type: Directive,
|
|
2276
|
+
args: [{
|
|
2277
|
+
selector: '[bsSnackbarClose]'
|
|
2278
|
+
}]
|
|
2279
|
+
}], ctorParameters: function () { return [{ type: BsSnackbarService }]; }, propDecorators: { bsSnackbarClose: [{
|
|
2280
|
+
type: Input
|
|
2281
|
+
}], onClick: [{
|
|
2282
|
+
type: HostListener,
|
|
2283
|
+
args: ['click']
|
|
2284
|
+
}] } });
|
|
891
2285
|
|
|
892
|
-
class
|
|
2286
|
+
class BsSnackbarModule {
|
|
893
2287
|
}
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
CommonModule
|
|
903
|
-
BrowserAnimationsModule
|
|
2288
|
+
BsSnackbarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2289
|
+
BsSnackbarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, declarations: [BsSnackbarComponent,
|
|
2290
|
+
BsSnackbarCloseDirective], imports: [CommonModule], exports: [BsSnackbarComponent,
|
|
2291
|
+
BsSnackbarCloseDirective] });
|
|
2292
|
+
BsSnackbarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, providers: [
|
|
2293
|
+
// { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
|
|
2294
|
+
// { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
|
|
2295
|
+
], imports: [[
|
|
2296
|
+
CommonModule
|
|
904
2297
|
]] });
|
|
905
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
2298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsSnackbarModule, decorators: [{
|
|
906
2299
|
type: NgModule,
|
|
907
2300
|
args: [{
|
|
908
2301
|
declarations: [
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
BsAccordionTabHeaderComponent
|
|
2302
|
+
BsSnackbarComponent,
|
|
2303
|
+
BsSnackbarCloseDirective
|
|
912
2304
|
],
|
|
913
2305
|
imports: [
|
|
914
|
-
CommonModule
|
|
915
|
-
BrowserAnimationsModule
|
|
2306
|
+
CommonModule
|
|
916
2307
|
],
|
|
917
2308
|
exports: [
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
2309
|
+
BsSnackbarComponent,
|
|
2310
|
+
BsSnackbarCloseDirective
|
|
2311
|
+
],
|
|
2312
|
+
providers: [
|
|
2313
|
+
// { provide: BsSnackbarComponent, useExisting: forwardRef(() => BsSnackbarComponent) }
|
|
2314
|
+
// { provide: BsSnackbarComponent, useClass: BsSnackbarComponent }
|
|
921
2315
|
]
|
|
922
2316
|
}]
|
|
923
2317
|
}] });
|
|
@@ -991,88 +2385,367 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
991
2385
|
}]
|
|
992
2386
|
}] });
|
|
993
2387
|
|
|
994
|
-
class
|
|
995
|
-
constructor(
|
|
996
|
-
this.
|
|
2388
|
+
class BsToggleButtonComponent {
|
|
2389
|
+
constructor() {
|
|
2390
|
+
this.disableAnimations = true;
|
|
2391
|
+
//#region isToggled
|
|
2392
|
+
this._isToggled = false;
|
|
2393
|
+
this.isToggledChange = new EventEmitter();
|
|
2394
|
+
//#endregion
|
|
2395
|
+
this.offColor = '#CCCCCC';
|
|
2396
|
+
this.onColor = '#2196F3';
|
|
2397
|
+
this.round = true;
|
|
2398
|
+
}
|
|
2399
|
+
ngAfterViewInit() {
|
|
2400
|
+
this.disableAnimations = false;
|
|
2401
|
+
}
|
|
2402
|
+
get isToggled() {
|
|
2403
|
+
return this._isToggled;
|
|
2404
|
+
}
|
|
2405
|
+
set isToggled(value) {
|
|
2406
|
+
this._isToggled = value;
|
|
2407
|
+
this.isToggledChange.emit(this._isToggled);
|
|
997
2408
|
}
|
|
998
2409
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
1002
|
-
type:
|
|
2410
|
+
BsToggleButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2411
|
+
BsToggleButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsToggleButtonComponent, selector: "bs-toggle-button", inputs: { isToggled: "isToggled", offColor: "offColor", onColor: "onColor", round: "round" }, outputs: { isToggledChange: "isToggledChange" }, ngImport: i0, template: "<label (click)=\"isToggled = !isToggled\" class=\"switch\" [class.checked]=\"isToggled\">\n <span class=\"slider\" [class.round]=\"round\" [@colorTransition]=\"{ value: isToggled ? 'color2' : 'color1', params: { color1: offColor, color2: onColor, 'duration': '.4s' } }\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:30px;height:17px}.switch>.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;transition:transform .4s}.switch>.slider.round{border-radius:8.5px}.switch>.slider.round:before{border-radius:50%}.switch>.slider:before{position:absolute;content:\"\";height:13px;width:13px;left:2px;top:0;bottom:0;margin:auto 0;background-color:#fff;transition:transform .4s}.switch.checked .slider:before{transform:translate(13px)}\n"], animations: [ColorTransitionAnimation] });
|
|
2412
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonComponent, decorators: [{
|
|
2413
|
+
type: Component,
|
|
2414
|
+
args: [{ selector: 'bs-toggle-button', animations: [ColorTransitionAnimation], template: "<label (click)=\"isToggled = !isToggled\" class=\"switch\" [class.checked]=\"isToggled\">\n <span class=\"slider\" [class.round]=\"round\" [@colorTransition]=\"{ value: isToggled ? 'color2' : 'color1', params: { color1: offColor, color2: onColor, 'duration': '.4s' } }\"></span>\n</label>", styles: [".switch{position:relative;display:inline-block;width:30px;height:17px}.switch>.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;transition:transform .4s}.switch>.slider.round{border-radius:8.5px}.switch>.slider.round:before{border-radius:50%}.switch>.slider:before{position:absolute;content:\"\";height:13px;width:13px;left:2px;top:0;bottom:0;margin:auto 0;background-color:#fff;transition:transform .4s}.switch.checked .slider:before{transform:translate(13px)}\n"] }]
|
|
2415
|
+
}], propDecorators: { isToggledChange: [{
|
|
2416
|
+
type: Output
|
|
2417
|
+
}], isToggled: [{
|
|
2418
|
+
type: Input
|
|
2419
|
+
}], offColor: [{
|
|
2420
|
+
type: Input
|
|
2421
|
+
}], onColor: [{
|
|
2422
|
+
type: Input
|
|
2423
|
+
}], round: [{
|
|
2424
|
+
type: Input
|
|
2425
|
+
}] } });
|
|
2426
|
+
|
|
2427
|
+
class BsToggleButtonModule {
|
|
2428
|
+
}
|
|
2429
|
+
BsToggleButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2430
|
+
BsToggleButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, declarations: [BsToggleButtonComponent], imports: [CommonModule], exports: [BsToggleButtonComponent] });
|
|
2431
|
+
BsToggleButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, imports: [[
|
|
2432
|
+
CommonModule
|
|
2433
|
+
]] });
|
|
2434
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsToggleButtonModule, decorators: [{
|
|
2435
|
+
type: NgModule,
|
|
1003
2436
|
args: [{
|
|
1004
|
-
|
|
2437
|
+
declarations: [
|
|
2438
|
+
BsToggleButtonComponent
|
|
2439
|
+
],
|
|
2440
|
+
imports: [
|
|
2441
|
+
CommonModule
|
|
2442
|
+
],
|
|
2443
|
+
exports: [
|
|
2444
|
+
BsToggleButtonComponent
|
|
2445
|
+
]
|
|
1005
2446
|
}]
|
|
1006
|
-
}]
|
|
2447
|
+
}] });
|
|
1007
2448
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
2449
|
+
const TOOLTIP_CONTENT = new InjectionToken('TooltipContent');
|
|
2450
|
+
|
|
2451
|
+
class BsTooltipComponent {
|
|
2452
|
+
constructor(content) {
|
|
2453
|
+
this.positions = Position;
|
|
2454
|
+
this.position = Position.bottom;
|
|
2455
|
+
this.template = content;
|
|
1012
2456
|
}
|
|
1013
|
-
|
|
2457
|
+
}
|
|
2458
|
+
BsTooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, deps: [{ token: TOOLTIP_CONTENT }], target: i0.ɵɵFactoryTarget.Component });
|
|
2459
|
+
BsTooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipComponent, selector: "bs-tooltip", inputs: { position: "position" }, ngImport: i0, template: "<div [@fadeInOut] class=\"tooltip position-relative show\"\n [class.bs-tooltip-bottom]=\"position === positions.bottom\"\n [class.bs-tooltip-top]=\"position === positions.top\"\n [class.bs-tooltip-start]=\"position === positions.left\"\n [class.bs-tooltip-end]=\"position === positions.right\">\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [".tooltip.bs-tooltip-bottom .tooltip-arrow,.tooltip.bs-tooltip-top .tooltip-arrow{left:50%;transform:translate(-50%)}.tooltip.bs-tooltip-start .tooltip-arrow,.tooltip.bs-tooltip-end .tooltip-arrow{top:50%;transform:translateY(-50%)}\n"], directives: [{ type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], animations: [FadeInOutAnimation] });
|
|
2460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipComponent, decorators: [{
|
|
2461
|
+
type: Component,
|
|
2462
|
+
args: [{ selector: 'bs-tooltip', animations: [FadeInOutAnimation], template: "<div [@fadeInOut] class=\"tooltip position-relative show\"\n [class.bs-tooltip-bottom]=\"position === positions.bottom\"\n [class.bs-tooltip-top]=\"position === positions.top\"\n [class.bs-tooltip-start]=\"position === positions.left\"\n [class.bs-tooltip-end]=\"position === positions.right\">\n <div class=\"tooltip-arrow\"></div>\n <div class=\"tooltip-inner\">\n <ng-container *ngTemplateOutlet=\"template\"></ng-container>\n </div>\n</div>\n", styles: [".tooltip.bs-tooltip-bottom .tooltip-arrow,.tooltip.bs-tooltip-top .tooltip-arrow{left:50%;transform:translate(-50%)}.tooltip.bs-tooltip-start .tooltip-arrow,.tooltip.bs-tooltip-end .tooltip-arrow{top:50%;transform:translateY(-50%)}\n"] }]
|
|
2463
|
+
}], ctorParameters: function () {
|
|
2464
|
+
return [{ type: i0.TemplateRef, decorators: [{
|
|
2465
|
+
type: Inject,
|
|
2466
|
+
args: [TOOLTIP_CONTENT]
|
|
2467
|
+
}] }];
|
|
2468
|
+
}, propDecorators: { position: [{
|
|
2469
|
+
type: Input
|
|
2470
|
+
}] } });
|
|
2471
|
+
|
|
2472
|
+
class BsTooltipDirective {
|
|
2473
|
+
constructor(overlay, templateRef, componentFactoryResolver, parentInjector, parent) {
|
|
2474
|
+
this.overlay = overlay;
|
|
2475
|
+
this.templateRef = templateRef;
|
|
2476
|
+
this.parentInjector = parentInjector;
|
|
2477
|
+
this.parent = parent;
|
|
2478
|
+
this.bsTooltip = Position.bottom;
|
|
2479
|
+
this.overlayRef = null;
|
|
2480
|
+
this.injector = Injector.create({
|
|
2481
|
+
providers: [{ provide: TOOLTIP_CONTENT, useValue: this.templateRef }],
|
|
2482
|
+
parent: this.parentInjector
|
|
2483
|
+
});
|
|
2484
|
+
this.portal = new ComponentPortal(BsTooltipComponent, null, this.injector, componentFactoryResolver);
|
|
2485
|
+
parent.nativeElement.onmouseenter = () => {
|
|
2486
|
+
this.showTooltip();
|
|
2487
|
+
};
|
|
2488
|
+
parent.nativeElement.onmouseleave = () => {
|
|
2489
|
+
this.hideTooltip();
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
showTooltip() {
|
|
2493
|
+
const positions = [];
|
|
2494
|
+
switch (this.bsTooltip) {
|
|
2495
|
+
case Position.bottom:
|
|
2496
|
+
{
|
|
2497
|
+
positions.push({
|
|
2498
|
+
originX: "center",
|
|
2499
|
+
originY: "bottom",
|
|
2500
|
+
overlayX: "center",
|
|
2501
|
+
overlayY: "top"
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2504
|
+
break;
|
|
2505
|
+
case Position.top:
|
|
2506
|
+
{
|
|
2507
|
+
positions.push({
|
|
2508
|
+
originX: "center",
|
|
2509
|
+
originY: "top",
|
|
2510
|
+
overlayX: "center",
|
|
2511
|
+
overlayY: "bottom"
|
|
2512
|
+
});
|
|
2513
|
+
}
|
|
2514
|
+
break;
|
|
2515
|
+
case Position.left:
|
|
2516
|
+
{
|
|
2517
|
+
positions.push({
|
|
2518
|
+
originX: "start",
|
|
2519
|
+
originY: "center",
|
|
2520
|
+
overlayX: "end",
|
|
2521
|
+
overlayY: "center",
|
|
2522
|
+
});
|
|
2523
|
+
}
|
|
2524
|
+
break;
|
|
2525
|
+
case Position.right:
|
|
2526
|
+
{
|
|
2527
|
+
positions.push({
|
|
2528
|
+
originX: "end",
|
|
2529
|
+
originY: "center",
|
|
2530
|
+
overlayX: "start",
|
|
2531
|
+
overlayY: "center"
|
|
2532
|
+
});
|
|
2533
|
+
}
|
|
2534
|
+
break;
|
|
2535
|
+
}
|
|
2536
|
+
this.overlayRef = this.overlay.create({
|
|
2537
|
+
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
2538
|
+
positionStrategy: this.overlay.position()
|
|
2539
|
+
.flexibleConnectedTo(this.parent)
|
|
2540
|
+
.withPositions(positions),
|
|
2541
|
+
});
|
|
2542
|
+
const component = this.overlayRef.attach(this.portal);
|
|
2543
|
+
component.instance.position = this.bsTooltip;
|
|
2544
|
+
}
|
|
2545
|
+
hideTooltip() {
|
|
2546
|
+
if (this.overlayRef) {
|
|
2547
|
+
this.overlayRef.detach();
|
|
2548
|
+
this.overlayRef.dispose();
|
|
2549
|
+
this.overlayRef = null;
|
|
2550
|
+
}
|
|
2551
|
+
}
|
|
2552
|
+
}
|
|
2553
|
+
BsTooltipDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, deps: [{ token: i1$1.Overlay }, { token: i0.TemplateRef }, { token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: i0.ElementRef, host: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
2554
|
+
BsTooltipDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: BsTooltipDirective, selector: "*[bsTooltip]", inputs: { bsTooltip: "bsTooltip" }, ngImport: i0 });
|
|
2555
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipDirective, decorators: [{
|
|
2556
|
+
type: Directive,
|
|
2557
|
+
args: [{
|
|
2558
|
+
selector: '*[bsTooltip]'
|
|
2559
|
+
}]
|
|
2560
|
+
}], ctorParameters: function () {
|
|
2561
|
+
return [{ type: i1$1.Overlay }, { type: i0.TemplateRef }, { type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ElementRef, decorators: [{
|
|
2562
|
+
type: Host
|
|
2563
|
+
}, {
|
|
2564
|
+
type: SkipSelf
|
|
2565
|
+
}] }];
|
|
2566
|
+
}, propDecorators: { bsTooltip: [{
|
|
2567
|
+
type: Input
|
|
2568
|
+
}] } });
|
|
2569
|
+
|
|
2570
|
+
class BsTooltipModule {
|
|
2571
|
+
}
|
|
2572
|
+
BsTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2573
|
+
BsTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, declarations: [BsTooltipDirective,
|
|
2574
|
+
BsTooltipComponent], imports: [CommonModule], exports: [BsTooltipDirective] });
|
|
2575
|
+
BsTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, imports: [[
|
|
2576
|
+
CommonModule
|
|
2577
|
+
]] });
|
|
2578
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTooltipModule, decorators: [{
|
|
2579
|
+
type: NgModule,
|
|
2580
|
+
args: [{
|
|
2581
|
+
declarations: [
|
|
2582
|
+
BsTooltipDirective,
|
|
2583
|
+
BsTooltipComponent
|
|
2584
|
+
],
|
|
2585
|
+
imports: [
|
|
2586
|
+
CommonModule
|
|
2587
|
+
],
|
|
2588
|
+
exports: [
|
|
2589
|
+
BsTooltipDirective
|
|
2590
|
+
]
|
|
2591
|
+
}]
|
|
2592
|
+
}] });
|
|
2593
|
+
|
|
2594
|
+
class BsTypeaheadComponent {
|
|
2595
|
+
constructor() {
|
|
2596
|
+
this.isOpen = false;
|
|
2597
|
+
this.suggestions$ = new BehaviorSubject([]);
|
|
2598
|
+
this.isLoading$ = new BehaviorSubject(false);
|
|
2599
|
+
this.hostWidth$ = new BehaviorSubject(200);
|
|
2600
|
+
this.destroyed$ = new Subject();
|
|
2601
|
+
this.searchterm = '';
|
|
2602
|
+
this.isLoadingText = 'Loading...';
|
|
2603
|
+
this.noSuggestionsText = 'No suggestions found';
|
|
2604
|
+
this.provideSuggestions = new EventEmitter();
|
|
2605
|
+
this.suggestionSelected = new EventEmitter();
|
|
2606
|
+
this.searchtermChange = new EventEmitter();
|
|
2607
|
+
this.submitted = new EventEmitter();
|
|
2608
|
+
this.showNoSuggestions$ = this.suggestions$
|
|
2609
|
+
.pipe(map(suggestions => suggestions.length === 0));
|
|
1014
2610
|
}
|
|
1015
2611
|
ngAfterViewInit() {
|
|
1016
|
-
this.
|
|
2612
|
+
this.onResize();
|
|
1017
2613
|
}
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
this.
|
|
1023
|
-
}
|
|
1024
|
-
else if (dirs.length === 0) {
|
|
1025
|
-
this.activeDirective = (_a = this.directives.get(0)) !== null && _a !== void 0 ? _a : null;
|
|
2614
|
+
onProvideSuggestions(value) {
|
|
2615
|
+
this.searchtermChange.emit(value);
|
|
2616
|
+
if (value === '') {
|
|
2617
|
+
this.isOpen = false;
|
|
2618
|
+
this.suggestions$.next([]);
|
|
1026
2619
|
}
|
|
1027
2620
|
else {
|
|
1028
|
-
this.
|
|
2621
|
+
this.isLoading$.next(true);
|
|
2622
|
+
this.isOpen = true;
|
|
2623
|
+
this.provideSuggestions.emit(value);
|
|
1029
2624
|
}
|
|
1030
2625
|
}
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
2626
|
+
set suggestions(value) {
|
|
2627
|
+
this.isLoading$.next(false);
|
|
2628
|
+
this.suggestions$.next(value);
|
|
2629
|
+
}
|
|
2630
|
+
suggestionClicked(suggestion) {
|
|
2631
|
+
this.searchterm = suggestion.text;
|
|
2632
|
+
this.searchtermChange.emit(this.searchterm);
|
|
2633
|
+
this.isOpen = false;
|
|
2634
|
+
this.suggestionSelected.emit(suggestion);
|
|
2635
|
+
}
|
|
2636
|
+
onSubmit() {
|
|
2637
|
+
this.isOpen = false;
|
|
2638
|
+
this.submitted.emit(this.searchterm);
|
|
2639
|
+
}
|
|
2640
|
+
focus() {
|
|
2641
|
+
this.textbox.nativeElement.focus();
|
|
2642
|
+
}
|
|
2643
|
+
onResize() {
|
|
2644
|
+
this.hostWidth$.next(this.textbox.nativeElement.offsetWidth);
|
|
1034
2645
|
}
|
|
1035
2646
|
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
2647
|
+
BsTypeaheadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2648
|
+
BsTypeaheadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.1", type: BsTypeaheadComponent, selector: "bs-typeahead", inputs: { searchterm: "searchterm", isLoadingText: "isLoadingText", noSuggestionsText: "noSuggestionsText", suggestions: "suggestions" }, outputs: { provideSuggestions: "provideSuggestions", suggestionSelected: "suggestionSelected", searchtermChange: "searchtermChange", submitted: "submitted" }, host: { listeners: { "window:resize": "onResize()" } }, viewQueries: [{ propertyName: "textbox", first: true, predicate: ["textbox"], descendants: true }], ngImport: i0, template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\">\n <input type=\"text\" class=\"form-control\" #textbox [(ngModel)]=\"searchterm\" (ngModelChange)=\"onProvideSuggestions($event)\" (keyup.enter)=\"onSubmit()\" />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static\" [style.width.px]=\"hostWidth$ | async\">\n <bs-progress *ngIf=\"isLoading$ | async\" [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li *ngIf=\"isLoading$ | async\">\n <a class=\"dropdown-item disabled\">{{ isLoadingText }}</a>\n </li>\n <ng-container *ngIf=\"(isLoading$ | async) === false\">\n <li *ngIf=\"showNoSuggestions$ | async\">\n <a class=\"dropdown-item disabled\">{{ noSuggestionsText }}</a>\n </li>\n <li *ngFor=\"let suggestion of (suggestions$ | async)\" (click)=\"suggestionClicked(suggestion)\">\n <a class=\"dropdown-item cursor-pointer\">{{ suggestion.text }}</a>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>", styles: ["bs-progress{margin-top:-8px;margin-bottom:6px}\n"], components: [{ type: BsProgressComponent, selector: "bs-progress", inputs: ["height", "isIndeterminate"] }], directives: [{ type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "isOpen"], outputs: ["isOpenChange"] }, { type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i1.AsyncPipe } });
|
|
2649
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
|
|
1039
2650
|
type: Component,
|
|
1040
|
-
args: [{ selector: 'bs-
|
|
1041
|
-
}], ctorParameters: function () {
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
type:
|
|
1048
|
-
|
|
1049
|
-
|
|
2651
|
+
args: [{ selector: 'bs-typeahead', template: "<div bsDropdown [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [closeOnClickOutside]=\"true\">\n <input type=\"text\" class=\"form-control\" #textbox [(ngModel)]=\"searchterm\" (ngModelChange)=\"onProvideSuggestions($event)\" (keyup.enter)=\"onSubmit()\" />\n <div *bsDropdownMenu>\n <ul class=\"dropdown-menu d-block position-static\" [style.width.px]=\"hostWidth$ | async\">\n <bs-progress *ngIf=\"isLoading$ | async\" [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li *ngIf=\"isLoading$ | async\">\n <a class=\"dropdown-item disabled\">{{ isLoadingText }}</a>\n </li>\n <ng-container *ngIf=\"(isLoading$ | async) === false\">\n <li *ngIf=\"showNoSuggestions$ | async\">\n <a class=\"dropdown-item disabled\">{{ noSuggestionsText }}</a>\n </li>\n <li *ngFor=\"let suggestion of (suggestions$ | async)\" (click)=\"suggestionClicked(suggestion)\">\n <a class=\"dropdown-item cursor-pointer\">{{ suggestion.text }}</a>\n </li>\n </ng-container>\n </ul>\n </div>\n</div>", styles: ["bs-progress{margin-top:-8px;margin-bottom:6px}\n"] }]
|
|
2652
|
+
}], ctorParameters: function () { return []; }, propDecorators: { textbox: [{
|
|
2653
|
+
type: ViewChild,
|
|
2654
|
+
args: ['textbox']
|
|
2655
|
+
}], searchterm: [{
|
|
2656
|
+
type: Input
|
|
2657
|
+
}], isLoadingText: [{
|
|
2658
|
+
type: Input
|
|
2659
|
+
}], noSuggestionsText: [{
|
|
2660
|
+
type: Input
|
|
2661
|
+
}], provideSuggestions: [{
|
|
2662
|
+
type: Output
|
|
2663
|
+
}], suggestionSelected: [{
|
|
2664
|
+
type: Output
|
|
2665
|
+
}], searchtermChange: [{
|
|
2666
|
+
type: Output
|
|
2667
|
+
}], submitted: [{
|
|
2668
|
+
type: Output
|
|
2669
|
+
}], suggestions: [{
|
|
2670
|
+
type: Input
|
|
2671
|
+
}], onResize: [{
|
|
1050
2672
|
type: HostListener,
|
|
1051
|
-
args: ['window:
|
|
2673
|
+
args: ['window:resize']
|
|
1052
2674
|
}] } });
|
|
1053
2675
|
|
|
1054
|
-
class
|
|
2676
|
+
class BsTypeaheadModule {
|
|
1055
2677
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
2678
|
+
BsTypeaheadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2679
|
+
BsTypeaheadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, declarations: [BsTypeaheadComponent], imports: [CommonModule,
|
|
2680
|
+
FormsModule,
|
|
2681
|
+
BsDropdownModule,
|
|
2682
|
+
BsProgressBarModule], exports: [BsTypeaheadComponent] });
|
|
2683
|
+
BsTypeaheadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, imports: [[
|
|
2684
|
+
CommonModule,
|
|
2685
|
+
FormsModule,
|
|
2686
|
+
BsDropdownModule,
|
|
2687
|
+
BsProgressBarModule
|
|
2688
|
+
]] });
|
|
2689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsTypeaheadModule, decorators: [{
|
|
2690
|
+
type: NgModule,
|
|
2691
|
+
args: [{
|
|
2692
|
+
declarations: [
|
|
2693
|
+
BsTypeaheadComponent
|
|
2694
|
+
],
|
|
2695
|
+
imports: [
|
|
2696
|
+
CommonModule,
|
|
2697
|
+
FormsModule,
|
|
2698
|
+
BsDropdownModule,
|
|
2699
|
+
BsProgressBarModule
|
|
2700
|
+
],
|
|
2701
|
+
exports: [
|
|
2702
|
+
BsTypeaheadComponent
|
|
2703
|
+
]
|
|
2704
|
+
}]
|
|
2705
|
+
}] });
|
|
2706
|
+
|
|
2707
|
+
class BsFontColorPipe {
|
|
2708
|
+
transform(color_hex) {
|
|
2709
|
+
if (color_hex === undefined || color_hex === null || color_hex.length < 7 || typeof (color_hex) !== 'string') {
|
|
2710
|
+
return '#FFFFFF';
|
|
2711
|
+
}
|
|
2712
|
+
const R_HEX = color_hex.substr(1, 2);
|
|
2713
|
+
const G_HEX = color_hex.substr(3, 2);
|
|
2714
|
+
const B_HEX = color_hex.substr(5, 2);
|
|
2715
|
+
const R_DEC = parseInt(R_HEX, 16);
|
|
2716
|
+
const G_DEC = parseInt(G_HEX, 16);
|
|
2717
|
+
const B_DEC = parseInt(B_HEX, 16);
|
|
2718
|
+
const CONTRAST_HEX = R_DEC * 0.299 + G_DEC * 0.587 + B_DEC * 0.114 > 186 ? '#000000' : '#FFFFFF';
|
|
2719
|
+
return CONTRAST_HEX;
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
BsFontColorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
2723
|
+
BsFontColorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, name: "bsFontColor" });
|
|
2724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipe, decorators: [{
|
|
2725
|
+
type: Pipe,
|
|
2726
|
+
args: [{
|
|
2727
|
+
name: 'bsFontColor'
|
|
2728
|
+
}]
|
|
2729
|
+
}] });
|
|
2730
|
+
|
|
2731
|
+
class BsFontColorPipeModule {
|
|
2732
|
+
}
|
|
2733
|
+
BsFontColorPipeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
2734
|
+
BsFontColorPipeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, declarations: [BsFontColorPipe], imports: [CommonModule], exports: [BsFontColorPipe] });
|
|
2735
|
+
BsFontColorPipeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, imports: [[
|
|
1061
2736
|
CommonModule
|
|
1062
2737
|
]] });
|
|
1063
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type:
|
|
2738
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: BsFontColorPipeModule, decorators: [{
|
|
1064
2739
|
type: NgModule,
|
|
1065
2740
|
args: [{
|
|
1066
2741
|
declarations: [
|
|
1067
|
-
|
|
1068
|
-
BsScrollspyDirective
|
|
2742
|
+
BsFontColorPipe
|
|
1069
2743
|
],
|
|
1070
2744
|
imports: [
|
|
1071
2745
|
CommonModule
|
|
1072
2746
|
],
|
|
1073
2747
|
exports: [
|
|
1074
|
-
|
|
1075
|
-
BsScrollspyDirective
|
|
2748
|
+
BsFontColorPipe
|
|
1076
2749
|
]
|
|
1077
2750
|
}]
|
|
1078
2751
|
}] });
|
|
@@ -1081,5 +2754,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
|
|
|
1081
2754
|
* Generated bundle index. Do not edit.
|
|
1082
2755
|
*/
|
|
1083
2756
|
|
|
1084
|
-
export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, Color, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective };
|
|
2757
|
+
export { BsAccordionComponent, BsAccordionModule, BsAccordionTabComponent, BsAccordionTabHeaderComponent, BsAlertCloseComponent, BsAlertComponent, BsAlertModule, BsCalendarComponent, BsCalendarModule, BsCardComponent, BsCardHeaderComponent, BsCardModule, BsCarouselComponent, BsCarouselImageDirective, BsCarouselModule, BsContextMenuDirective, BsContextMenuModule, BsDatatableColumnDirective, BsDatatableComponent, BsDatatableModule, BsDatepickerComponent, BsDatepickerModule, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownModule, BsDropdownToggleDirective, BsFontColorPipe, BsFontColorPipeModule, BsItemTemplateDirective, BsListGroupComponent, BsListGroupItemComponent, BsListGroupModule, BsMultiselectComponent, BsMultiselectModule, BsNavbarComponent, BsNavbarDropdownComponent, BsNavbarItemComponent, BsNavbarModule, BsNavbarNavComponent, BsPaginationComponent, BsPaginationModule, BsProgressBarComponent, BsProgressBarModule, BsProgressComponent, BsRowTemplateDirective, BsScrollspyComponent, BsScrollspyDirective, BsScrollspyModule, BsSelect2Component, BsSelect2Module, BsSnackbarCloseDirective, BsSnackbarComponent, BsSnackbarModule, BsSnackbarService, BsTabControlComponent, BsTabControlModule, BsTabPageComponent, BsToggleButtonComponent, BsToggleButtonModule, BsTooltipDirective, BsTooltipModule, BsTypeaheadComponent, BsTypeaheadModule, Color, DatatableSettings, DropdownToggleDirective, NavLinkDirective, NavbarContentDirective, Position };
|
|
1085
2758
|
//# sourceMappingURL=mintplayer-ng-bootstrap.mjs.map
|