@coreui/angular 2.11.2 → 2.13.0
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/README.md +84 -81
- package/coreui-angular.d.ts +1 -19
- package/esm2020/coreui-angular.mjs +5 -0
- package/esm2020/lib/aside/app-aside.component.mjs +58 -0
- package/esm2020/lib/aside/app-aside.module.mjs +30 -0
- package/{esm2015/lib/aside/index.js → esm2020/lib/aside/index.mjs} +0 -0
- package/{esm2015/lib/aside/public_api.js → esm2020/lib/aside/public_api.mjs} +0 -0
- package/esm2020/lib/breadcrumb/app-breadcrumb.component.mjs +62 -0
- package/esm2020/lib/breadcrumb/app-breadcrumb.module.mjs +31 -0
- package/esm2020/lib/breadcrumb/app-breadcrumb.service.mjs +46 -0
- package/esm2020/lib/breadcrumb/cui-breadcrumb.component.mjs +38 -0
- package/{esm2015/lib/breadcrumb/index.js → esm2020/lib/breadcrumb/index.mjs} +0 -0
- package/{esm2015/lib/breadcrumb/public_api.js → esm2020/lib/breadcrumb/public_api.mjs} +0 -0
- package/esm2020/lib/footer/app-footer.component.mjs +40 -0
- package/esm2020/lib/footer/app-footer.module.mjs +18 -0
- package/{esm2015/lib/footer/index.js → esm2020/lib/footer/index.mjs} +0 -0
- package/{esm2015/lib/footer/public_api.js → esm2020/lib/footer/public_api.mjs} +0 -0
- package/esm2020/lib/header/app-header.component.mjs +97 -0
- package/esm2020/lib/header/app-header.module.mjs +34 -0
- package/{esm2015/lib/header/index.js → esm2020/lib/header/index.mjs} +0 -0
- package/{esm2015/lib/header/public_api.js → esm2020/lib/header/public_api.mjs} +0 -0
- package/{esm2015/lib/shared/classes.js → esm2020/lib/shared/classes.mjs} +0 -0
- package/esm2020/lib/shared/index.mjs +2 -0
- package/esm2020/lib/shared/layout/layout.directive.mjs +233 -0
- package/esm2020/lib/shared/layout/layout.module.mjs +56 -0
- package/esm2020/lib/shared/public_api.mjs +5 -0
- package/esm2020/lib/shared/replace.mjs +12 -0
- package/esm2020/lib/shared/toggle-classes.mjs +46 -0
- package/esm2020/lib/sidebar/app-sidebar-footer.component.mjs +20 -0
- package/esm2020/lib/sidebar/app-sidebar-form.component.mjs +20 -0
- package/esm2020/lib/sidebar/app-sidebar-header.component.mjs +20 -0
- package/esm2020/lib/sidebar/app-sidebar-minimizer.component.mjs +35 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-badge.pipe.mjs +22 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-divider.component.mjs +18 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-icon.pipe.mjs +21 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-item-class.pipe.mjs +31 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-items.component.mjs +181 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-label.component.mjs +44 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.component.mjs +97 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.pipe.mjs +21 -0
- package/esm2020/lib/sidebar/app-sidebar-nav/app-sidebar-nav-title.component.mjs +67 -0
- package/esm2020/lib/sidebar/app-sidebar-nav.component.mjs +33 -0
- package/esm2020/lib/sidebar/app-sidebar-nav.directive.mjs +42 -0
- package/esm2020/lib/sidebar/app-sidebar-nav.mjs +2 -0
- package/esm2020/lib/sidebar/app-sidebar-nav.service.mjs +53 -0
- package/esm2020/lib/sidebar/app-sidebar.component.mjs +112 -0
- package/esm2020/lib/sidebar/app-sidebar.module.mjs +119 -0
- package/esm2020/lib/sidebar/app-sidebar.service.mjs +21 -0
- package/{esm2015/lib/sidebar/index.js → esm2020/lib/sidebar/index.mjs} +0 -0
- package/esm2020/lib/sidebar/public_api.mjs +16 -0
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/coreui-angular.mjs +1680 -0
- package/fesm2015/coreui-angular.mjs.map +1 -0
- package/fesm2020/coreui-angular.mjs +1655 -0
- package/fesm2020/coreui-angular.mjs.map +1 -0
- package/lib/aside/app-aside.component.d.ts +7 -4
- package/lib/aside/app-aside.module.d.ts +7 -0
- package/lib/breadcrumb/app-breadcrumb.component.d.ts +7 -3
- package/lib/breadcrumb/app-breadcrumb.module.d.ts +8 -0
- package/lib/breadcrumb/app-breadcrumb.service.d.ts +3 -0
- package/lib/breadcrumb/cui-breadcrumb.component.d.ts +7 -3
- package/lib/footer/app-footer.component.d.ts +5 -2
- package/lib/footer/app-footer.module.d.ts +6 -0
- package/lib/header/app-header.component.d.ts +8 -5
- package/lib/header/app-header.module.d.ts +8 -0
- package/lib/shared/index.d.ts +1 -3
- package/lib/shared/layout/layout.directive.d.ts +20 -5
- package/lib/shared/layout/layout.module.d.ts +6 -0
- package/lib/shared/public_api.d.ts +4 -0
- package/lib/shared/toggle-classes.d.ts +6 -3
- package/lib/sidebar/app-sidebar-footer.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-form.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-header.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-minimizer.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-badge.pipe.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-divider.component.d.ts +4 -1
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-icon.pipe.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-item-class.pipe.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-items.component.d.ts +10 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-label.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.component.d.ts +7 -2
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.pipe.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-title.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav.component.d.ts +3 -0
- package/lib/sidebar/app-sidebar-nav.d.ts +2 -1
- package/lib/sidebar/app-sidebar-nav.directive.d.ts +5 -0
- package/lib/sidebar/app-sidebar-nav.service.d.ts +10 -5
- package/lib/sidebar/app-sidebar.component.d.ts +9 -6
- package/lib/sidebar/app-sidebar.module.d.ts +23 -0
- package/lib/sidebar/app-sidebar.service.d.ts +3 -0
- package/lib/sidebar/public_api.d.ts +3 -0
- package/package.json +24 -12
- package/bundles/coreui-angular.umd.js +0 -1811
- package/bundles/coreui-angular.umd.js.map +0 -1
- package/bundles/coreui-angular.umd.min.js +0 -2
- package/bundles/coreui-angular.umd.min.js.map +0 -1
- package/coreui-angular.metadata.json +0 -1
- package/esm2015/coreui-angular.js +0 -24
- package/esm2015/lib/aside/app-aside.component.js +0 -52
- package/esm2015/lib/aside/app-aside.module.js +0 -22
- package/esm2015/lib/breadcrumb/app-breadcrumb.component.js +0 -51
- package/esm2015/lib/breadcrumb/app-breadcrumb.module.js +0 -26
- package/esm2015/lib/breadcrumb/app-breadcrumb.service.js +0 -48
- package/esm2015/lib/breadcrumb/cui-breadcrumb.component.js +0 -39
- package/esm2015/lib/footer/app-footer.component.js +0 -36
- package/esm2015/lib/footer/app-footer.module.js +0 -13
- package/esm2015/lib/header/app-header.component.js +0 -76
- package/esm2015/lib/header/app-header.module.js +0 -24
- package/esm2015/lib/shared/index.js +0 -4
- package/esm2015/lib/shared/layout/index.js +0 -2
- package/esm2015/lib/shared/layout/layout.directive.js +0 -216
- package/esm2015/lib/shared/layout/layout.module.js +0 -35
- package/esm2015/lib/shared/replace.js +0 -11
- package/esm2015/lib/shared/toggle-classes.js +0 -46
- package/esm2015/lib/sidebar/app-sidebar-footer.component.js +0 -17
- package/esm2015/lib/sidebar/app-sidebar-form.component.js +0 -17
- package/esm2015/lib/sidebar/app-sidebar-header.component.js +0 -17
- package/esm2015/lib/sidebar/app-sidebar-minimizer.component.js +0 -28
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-badge.pipe.js +0 -18
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-divider.component.js +0 -16
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-dropdown.component.js +0 -35
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-icon.pipe.js +0 -17
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-item-class.pipe.js +0 -30
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-items.component.js +0 -81
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-label.component.js +0 -40
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.component.js +0 -86
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-link.pipe.js +0 -17
- package/esm2015/lib/sidebar/app-sidebar-nav/app-sidebar-nav-title.component.js +0 -67
- package/esm2015/lib/sidebar/app-sidebar-nav.component.js +0 -29
- package/esm2015/lib/sidebar/app-sidebar-nav.directive.js +0 -41
- package/esm2015/lib/sidebar/app-sidebar-nav.js +0 -2
- package/esm2015/lib/sidebar/app-sidebar-nav.service.js +0 -49
- package/esm2015/lib/sidebar/app-sidebar.component.js +0 -104
- package/esm2015/lib/sidebar/app-sidebar.module.js +0 -81
- package/esm2015/lib/sidebar/app-sidebar.service.js +0 -20
- package/esm2015/lib/sidebar/public_api.js +0 -6
- package/fesm2015/coreui-angular.js +0 -1428
- package/fesm2015/coreui-angular.js.map +0 -1
- package/lib/shared/layout/index.d.ts +0 -1
- package/lib/sidebar/app-sidebar-nav/app-sidebar-nav-dropdown.component.d.ts +0 -7
|
@@ -1,1428 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject, Renderer2, Directive, Input, HostListener, ElementRef, NgModule, Component, HostBinding, ɵɵdefineInjectable, ɵɵinject, EventEmitter, Output, Pipe } from '@angular/core';
|
|
2
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
|
-
import { NavigationEnd, Router, ActivatedRoute, RouterModule } from '@angular/router';
|
|
4
|
-
import { BehaviorSubject } from 'rxjs';
|
|
5
|
-
import { filter } from 'rxjs/operators';
|
|
6
|
-
|
|
7
|
-
const sidebarCssClasses = [
|
|
8
|
-
'sidebar-show',
|
|
9
|
-
'sidebar-sm-show',
|
|
10
|
-
'sidebar-md-show',
|
|
11
|
-
'sidebar-lg-show',
|
|
12
|
-
'sidebar-xl-show'
|
|
13
|
-
];
|
|
14
|
-
const asideMenuCssClasses = [
|
|
15
|
-
'aside-menu-show',
|
|
16
|
-
'aside-menu-sm-show',
|
|
17
|
-
'aside-menu-md-show',
|
|
18
|
-
'aside-menu-lg-show',
|
|
19
|
-
'aside-menu-xl-show'
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
const RemoveClasses = (NewClassNames) => {
|
|
23
|
-
const MatchClasses = NewClassNames.map((Class) => document.body.classList.contains(Class));
|
|
24
|
-
return MatchClasses.indexOf(true) !== -1;
|
|
25
|
-
};
|
|
26
|
-
const ɵ0 = RemoveClasses;
|
|
27
|
-
const ToggleClasses = (Toggle, ClassNames) => {
|
|
28
|
-
const Level = ClassNames.indexOf(Toggle);
|
|
29
|
-
const NewClassNames = ClassNames.slice(0, Level + 1);
|
|
30
|
-
if (RemoveClasses(NewClassNames)) {
|
|
31
|
-
NewClassNames.map((Class) => document.body.classList.remove(Class));
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
document.body.classList.add(Toggle);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
class ClassToggler {
|
|
38
|
-
constructor(document, renderer) {
|
|
39
|
-
this.document = document;
|
|
40
|
-
this.renderer = renderer;
|
|
41
|
-
}
|
|
42
|
-
removeClasses(NewClassNames) {
|
|
43
|
-
const MatchClasses = NewClassNames.map((Class) => this.document.body.classList.contains(Class));
|
|
44
|
-
return MatchClasses.indexOf(true) !== -1;
|
|
45
|
-
}
|
|
46
|
-
toggleClasses(Toggle, ClassNames) {
|
|
47
|
-
const Level = ClassNames.indexOf(Toggle);
|
|
48
|
-
const NewClassNames = ClassNames.slice(0, Level + 1);
|
|
49
|
-
if (this.removeClasses(NewClassNames)) {
|
|
50
|
-
NewClassNames.map((Class) => this.renderer.removeClass(this.document.body, Class));
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
this.renderer.addClass(this.document.body, Toggle);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
ClassToggler.decorators = [
|
|
58
|
-
{ type: Injectable }
|
|
59
|
-
];
|
|
60
|
-
ClassToggler.ctorParameters = () => [
|
|
61
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
62
|
-
{ type: Renderer2 }
|
|
63
|
-
];
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Allows the sidebar to be toggled via click.
|
|
67
|
-
*/
|
|
68
|
-
class SidebarToggleDirective {
|
|
69
|
-
constructor(classToggler) {
|
|
70
|
-
this.classToggler = classToggler;
|
|
71
|
-
}
|
|
72
|
-
ngOnInit() {
|
|
73
|
-
this.bp = this.breakpoint;
|
|
74
|
-
}
|
|
75
|
-
toggleOpen($event) {
|
|
76
|
-
$event.preventDefault();
|
|
77
|
-
const cssClass = this.bp ? `sidebar-${this.bp}-show` : sidebarCssClasses[0];
|
|
78
|
-
this.classToggler.toggleClasses(cssClass, sidebarCssClasses);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
SidebarToggleDirective.decorators = [
|
|
82
|
-
{ type: Directive, args: [{
|
|
83
|
-
selector: '[appSidebarToggler]',
|
|
84
|
-
providers: [ClassToggler]
|
|
85
|
-
},] }
|
|
86
|
-
];
|
|
87
|
-
SidebarToggleDirective.ctorParameters = () => [
|
|
88
|
-
{ type: ClassToggler }
|
|
89
|
-
];
|
|
90
|
-
SidebarToggleDirective.propDecorators = {
|
|
91
|
-
breakpoint: [{ type: Input, args: ['appSidebarToggler',] }],
|
|
92
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
93
|
-
};
|
|
94
|
-
class SidebarMinimizeDirective {
|
|
95
|
-
constructor(document, renderer) {
|
|
96
|
-
this.document = document;
|
|
97
|
-
this.renderer = renderer;
|
|
98
|
-
}
|
|
99
|
-
toggleOpen($event) {
|
|
100
|
-
$event.preventDefault();
|
|
101
|
-
const body = this.document.body;
|
|
102
|
-
body.classList.contains('sidebar-minimized') ?
|
|
103
|
-
this.renderer.removeClass(body, 'sidebar-minimized') :
|
|
104
|
-
this.renderer.addClass(body, 'sidebar-minimized');
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
SidebarMinimizeDirective.decorators = [
|
|
108
|
-
{ type: Directive, args: [{
|
|
109
|
-
selector: '[appSidebarMinimizer]'
|
|
110
|
-
},] }
|
|
111
|
-
];
|
|
112
|
-
SidebarMinimizeDirective.ctorParameters = () => [
|
|
113
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
114
|
-
{ type: Renderer2 }
|
|
115
|
-
];
|
|
116
|
-
SidebarMinimizeDirective.propDecorators = {
|
|
117
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
118
|
-
};
|
|
119
|
-
class MobileSidebarToggleDirective {
|
|
120
|
-
constructor(document, renderer) {
|
|
121
|
-
this.document = document;
|
|
122
|
-
this.renderer = renderer;
|
|
123
|
-
}
|
|
124
|
-
toggleOpen($event) {
|
|
125
|
-
$event.preventDefault();
|
|
126
|
-
const body = this.document.body;
|
|
127
|
-
body.classList.contains('sidebar-show') ?
|
|
128
|
-
this.renderer.removeClass(body, 'sidebar-show') :
|
|
129
|
-
this.renderer.addClass(body, 'sidebar-show');
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
MobileSidebarToggleDirective.decorators = [
|
|
133
|
-
{ type: Directive, args: [{
|
|
134
|
-
selector: '[appMobileSidebarToggler]'
|
|
135
|
-
},] }
|
|
136
|
-
];
|
|
137
|
-
MobileSidebarToggleDirective.ctorParameters = () => [
|
|
138
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
139
|
-
{ type: Renderer2 }
|
|
140
|
-
];
|
|
141
|
-
MobileSidebarToggleDirective.propDecorators = {
|
|
142
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
143
|
-
};
|
|
144
|
-
/**
|
|
145
|
-
* Allows the off-canvas sidebar to be closed via click.
|
|
146
|
-
*/
|
|
147
|
-
class SidebarOffCanvasCloseDirective {
|
|
148
|
-
constructor(document, renderer) {
|
|
149
|
-
this.document = document;
|
|
150
|
-
this.renderer = renderer;
|
|
151
|
-
}
|
|
152
|
-
toggleOpen($event) {
|
|
153
|
-
$event.preventDefault();
|
|
154
|
-
const body = this.document.body;
|
|
155
|
-
if (body.classList.contains('sidebar-off-canvas')) {
|
|
156
|
-
body.classList.contains('sidebar-show') ?
|
|
157
|
-
this.renderer.removeClass(body, 'sidebar-show') :
|
|
158
|
-
this.renderer.addClass(body, 'sidebar-show');
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
SidebarOffCanvasCloseDirective.decorators = [
|
|
163
|
-
{ type: Directive, args: [{
|
|
164
|
-
selector: '[appSidebarClose]'
|
|
165
|
-
},] }
|
|
166
|
-
];
|
|
167
|
-
SidebarOffCanvasCloseDirective.ctorParameters = () => [
|
|
168
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
169
|
-
{ type: Renderer2 }
|
|
170
|
-
];
|
|
171
|
-
SidebarOffCanvasCloseDirective.propDecorators = {
|
|
172
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
173
|
-
};
|
|
174
|
-
class BrandMinimizeDirective {
|
|
175
|
-
constructor(document, renderer) {
|
|
176
|
-
this.document = document;
|
|
177
|
-
this.renderer = renderer;
|
|
178
|
-
}
|
|
179
|
-
toggleOpen($event) {
|
|
180
|
-
$event.preventDefault();
|
|
181
|
-
const body = this.document.body;
|
|
182
|
-
body.classList.contains('brand-minimized') ?
|
|
183
|
-
this.renderer.removeClass(body, 'brand-minimized') :
|
|
184
|
-
this.renderer.addClass(body, 'brand-minimized');
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
BrandMinimizeDirective.decorators = [
|
|
188
|
-
{ type: Directive, args: [{
|
|
189
|
-
selector: '[appBrandMinimizer]'
|
|
190
|
-
},] }
|
|
191
|
-
];
|
|
192
|
-
BrandMinimizeDirective.ctorParameters = () => [
|
|
193
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
194
|
-
{ type: Renderer2 }
|
|
195
|
-
];
|
|
196
|
-
BrandMinimizeDirective.propDecorators = {
|
|
197
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Allows the aside to be toggled via click.
|
|
201
|
-
*/
|
|
202
|
-
class AsideToggleDirective {
|
|
203
|
-
constructor(classToggler) {
|
|
204
|
-
this.classToggler = classToggler;
|
|
205
|
-
}
|
|
206
|
-
ngOnInit() {
|
|
207
|
-
this.bp = this.breakpoint;
|
|
208
|
-
}
|
|
209
|
-
toggleOpen($event) {
|
|
210
|
-
$event.preventDefault();
|
|
211
|
-
const cssClass = this.bp ? `aside-menu-${this.bp}-show` : asideMenuCssClasses[0];
|
|
212
|
-
this.classToggler.toggleClasses(cssClass, asideMenuCssClasses);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
AsideToggleDirective.decorators = [
|
|
216
|
-
{ type: Directive, args: [{
|
|
217
|
-
selector: '[appAsideMenuToggler]',
|
|
218
|
-
providers: [ClassToggler]
|
|
219
|
-
},] }
|
|
220
|
-
];
|
|
221
|
-
AsideToggleDirective.ctorParameters = () => [
|
|
222
|
-
{ type: ClassToggler }
|
|
223
|
-
];
|
|
224
|
-
AsideToggleDirective.propDecorators = {
|
|
225
|
-
breakpoint: [{ type: Input, args: ['appAsideMenuToggler',] }],
|
|
226
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
227
|
-
};
|
|
228
|
-
class HtmlAttributesDirective {
|
|
229
|
-
constructor(renderer, el) {
|
|
230
|
-
this.renderer = renderer;
|
|
231
|
-
this.el = el;
|
|
232
|
-
}
|
|
233
|
-
ngOnInit() {
|
|
234
|
-
const attribs = this.appHtmlAttr;
|
|
235
|
-
for (const attr in attribs) {
|
|
236
|
-
if (attr === 'style' && typeof (attribs[attr]) === 'object') {
|
|
237
|
-
this.setStyle(attribs[attr]);
|
|
238
|
-
}
|
|
239
|
-
else if (attr === 'class') {
|
|
240
|
-
this.addClass(attribs[attr]);
|
|
241
|
-
}
|
|
242
|
-
else {
|
|
243
|
-
this.setAttrib(attr, attribs[attr]);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
setStyle(styles) {
|
|
248
|
-
for (const style in styles) {
|
|
249
|
-
this.renderer.setStyle(this.el.nativeElement, style, styles[style]);
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
addClass(classes) {
|
|
253
|
-
const classArray = (Array.isArray(classes) ? classes : classes.split(' '));
|
|
254
|
-
classArray.filter((element) => element.length > 0).forEach(element => {
|
|
255
|
-
this.renderer.addClass(this.el.nativeElement, element);
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
setAttrib(key, value) {
|
|
259
|
-
value !== null ?
|
|
260
|
-
this.renderer.setAttribute(this.el.nativeElement, key, value) :
|
|
261
|
-
this.renderer.removeAttribute(this.el.nativeElement, key);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
HtmlAttributesDirective.decorators = [
|
|
265
|
-
{ type: Directive, args: [{
|
|
266
|
-
selector: '[appHtmlAttr]'
|
|
267
|
-
},] }
|
|
268
|
-
];
|
|
269
|
-
HtmlAttributesDirective.ctorParameters = () => [
|
|
270
|
-
{ type: Renderer2 },
|
|
271
|
-
{ type: ElementRef }
|
|
272
|
-
];
|
|
273
|
-
HtmlAttributesDirective.propDecorators = {
|
|
274
|
-
appHtmlAttr: [{ type: Input }]
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
class LayoutModule {
|
|
278
|
-
}
|
|
279
|
-
LayoutModule.decorators = [
|
|
280
|
-
{ type: NgModule, args: [{
|
|
281
|
-
imports: [
|
|
282
|
-
CommonModule
|
|
283
|
-
],
|
|
284
|
-
exports: [
|
|
285
|
-
AsideToggleDirective,
|
|
286
|
-
BrandMinimizeDirective,
|
|
287
|
-
MobileSidebarToggleDirective,
|
|
288
|
-
SidebarToggleDirective,
|
|
289
|
-
SidebarMinimizeDirective,
|
|
290
|
-
SidebarOffCanvasCloseDirective,
|
|
291
|
-
HtmlAttributesDirective
|
|
292
|
-
],
|
|
293
|
-
declarations: [
|
|
294
|
-
AsideToggleDirective,
|
|
295
|
-
BrandMinimizeDirective,
|
|
296
|
-
MobileSidebarToggleDirective,
|
|
297
|
-
SidebarToggleDirective,
|
|
298
|
-
SidebarMinimizeDirective,
|
|
299
|
-
SidebarOffCanvasCloseDirective,
|
|
300
|
-
HtmlAttributesDirective
|
|
301
|
-
],
|
|
302
|
-
providers: [
|
|
303
|
-
ClassToggler
|
|
304
|
-
]
|
|
305
|
-
},] }
|
|
306
|
-
];
|
|
307
|
-
|
|
308
|
-
function Replace(el) {
|
|
309
|
-
const nativeElement = el.nativeElement;
|
|
310
|
-
const parentElement = nativeElement.parentElement;
|
|
311
|
-
// move all children out of the element
|
|
312
|
-
while (nativeElement.firstChild) {
|
|
313
|
-
parentElement.insertBefore(nativeElement.firstChild, nativeElement);
|
|
314
|
-
}
|
|
315
|
-
// remove the empty element(the host)
|
|
316
|
-
parentElement.removeChild(nativeElement);
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
class AppAsideComponent {
|
|
320
|
-
constructor(document, renderer) {
|
|
321
|
-
this.document = document;
|
|
322
|
-
this.renderer = renderer;
|
|
323
|
-
this.fixedClass = 'aside-menu-fixed';
|
|
324
|
-
this.asideMenuClass = true;
|
|
325
|
-
}
|
|
326
|
-
ngOnInit() {
|
|
327
|
-
this.isFixed(this.fixed);
|
|
328
|
-
this.isOffCanvas(this.offCanvas);
|
|
329
|
-
this.displayBreakpoint(this.display);
|
|
330
|
-
}
|
|
331
|
-
ngOnDestroy() {
|
|
332
|
-
this.renderer.removeClass(this.document.body, this.fixedClass);
|
|
333
|
-
}
|
|
334
|
-
isFixed(fixed = this.fixed) {
|
|
335
|
-
if (fixed) {
|
|
336
|
-
this.renderer.addClass(this.document.body, this.fixedClass);
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
isOffCanvas(offCanvas = this.offCanvas) {
|
|
340
|
-
if (offCanvas) {
|
|
341
|
-
this.renderer.addClass(this.document.body, 'aside-menu-off-canvas');
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
displayBreakpoint(display = this.display) {
|
|
345
|
-
if (display !== false) {
|
|
346
|
-
const cssClass = this.display ? `aside-menu-${this.display}-show` : asideMenuCssClasses[0];
|
|
347
|
-
this.renderer.addClass(this.document.body, cssClass);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
AppAsideComponent.decorators = [
|
|
352
|
-
{ type: Component, args: [{
|
|
353
|
-
selector: 'app-aside, cui-aside',
|
|
354
|
-
template: `<ng-content></ng-content>`
|
|
355
|
-
},] }
|
|
356
|
-
];
|
|
357
|
-
AppAsideComponent.ctorParameters = () => [
|
|
358
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
359
|
-
{ type: Renderer2 }
|
|
360
|
-
];
|
|
361
|
-
AppAsideComponent.propDecorators = {
|
|
362
|
-
display: [{ type: Input }],
|
|
363
|
-
fixed: [{ type: Input }],
|
|
364
|
-
offCanvas: [{ type: Input }],
|
|
365
|
-
asideMenuClass: [{ type: HostBinding, args: ['class.aside-menu',] }]
|
|
366
|
-
};
|
|
367
|
-
|
|
368
|
-
class AppAsideModule {
|
|
369
|
-
}
|
|
370
|
-
AppAsideModule.decorators = [
|
|
371
|
-
{ type: NgModule, args: [{
|
|
372
|
-
imports: [
|
|
373
|
-
CommonModule,
|
|
374
|
-
LayoutModule
|
|
375
|
-
],
|
|
376
|
-
exports: [
|
|
377
|
-
AppAsideComponent,
|
|
378
|
-
LayoutModule
|
|
379
|
-
],
|
|
380
|
-
declarations: [
|
|
381
|
-
AppAsideComponent
|
|
382
|
-
]
|
|
383
|
-
},] }
|
|
384
|
-
];
|
|
385
|
-
|
|
386
|
-
class AppBreadcrumbService {
|
|
387
|
-
constructor(router, route) {
|
|
388
|
-
this.router = router;
|
|
389
|
-
this.route = route;
|
|
390
|
-
this.breadcrumbSubject = new BehaviorSubject(new Array());
|
|
391
|
-
this.breadcrumbs = this.breadcrumbSubject.asObservable();
|
|
392
|
-
this.router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe((event) => {
|
|
393
|
-
const breadcrumbs = [];
|
|
394
|
-
let currentRoute = this.route.root;
|
|
395
|
-
let url = '';
|
|
396
|
-
do {
|
|
397
|
-
const childrenRoutes = currentRoute.children;
|
|
398
|
-
currentRoute = null;
|
|
399
|
-
// tslint:disable-next-line:no-shadowed-variable
|
|
400
|
-
childrenRoutes.forEach(route => {
|
|
401
|
-
if (route.outlet === 'primary') {
|
|
402
|
-
const routeSnapshot = route.snapshot;
|
|
403
|
-
url += '/' + routeSnapshot.url.map(segment => segment.path).join('/');
|
|
404
|
-
breadcrumbs.push({
|
|
405
|
-
label: route.snapshot.data,
|
|
406
|
-
url
|
|
407
|
-
});
|
|
408
|
-
currentRoute = route;
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
} while (currentRoute);
|
|
412
|
-
this.breadcrumbSubject.next(Object.assign([], breadcrumbs));
|
|
413
|
-
return breadcrumbs;
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
AppBreadcrumbService.ɵprov = ɵɵdefineInjectable({ factory: function AppBreadcrumbService_Factory() { return new AppBreadcrumbService(ɵɵinject(Router), ɵɵinject(ActivatedRoute)); }, token: AppBreadcrumbService, providedIn: "root" });
|
|
418
|
-
AppBreadcrumbService.decorators = [
|
|
419
|
-
{ type: Injectable, args: [{
|
|
420
|
-
providedIn: 'root'
|
|
421
|
-
},] }
|
|
422
|
-
];
|
|
423
|
-
AppBreadcrumbService.ctorParameters = () => [
|
|
424
|
-
{ type: Router },
|
|
425
|
-
{ type: ActivatedRoute }
|
|
426
|
-
];
|
|
427
|
-
|
|
428
|
-
class AppBreadcrumbComponent {
|
|
429
|
-
constructor(document, renderer, service, el) {
|
|
430
|
-
this.document = document;
|
|
431
|
-
this.renderer = renderer;
|
|
432
|
-
this.service = service;
|
|
433
|
-
this.el = el;
|
|
434
|
-
this.fixedClass = 'breadcrumb-fixed';
|
|
435
|
-
}
|
|
436
|
-
ngOnInit() {
|
|
437
|
-
Replace(this.el);
|
|
438
|
-
this.isFixed(this.fixed);
|
|
439
|
-
this.breadcrumbs = this.service.breadcrumbs;
|
|
440
|
-
}
|
|
441
|
-
ngOnDestroy() {
|
|
442
|
-
this.renderer.removeClass(this.document.body, this.fixedClass);
|
|
443
|
-
}
|
|
444
|
-
isFixed(fixed = this.fixed) {
|
|
445
|
-
if (fixed) {
|
|
446
|
-
this.renderer.addClass(this.document.body, this.fixedClass);
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}
|
|
450
|
-
AppBreadcrumbComponent.decorators = [
|
|
451
|
-
{ type: Component, args: [{
|
|
452
|
-
selector: 'app-breadcrumb',
|
|
453
|
-
template: `
|
|
454
|
-
<ng-template ngFor let-breadcrumb [ngForOf]="breadcrumbs | async" let-last = last>
|
|
455
|
-
<li class="breadcrumb-item"
|
|
456
|
-
*ngIf="breadcrumb.label.title && (breadcrumb.url.slice(-1) == '/' || last)"
|
|
457
|
-
[ngClass]="{active: last}">
|
|
458
|
-
<a *ngIf="!last" [routerLink]="breadcrumb.url">{{breadcrumb.label.title}}</a>
|
|
459
|
-
<span *ngIf="last" [routerLink]="breadcrumb.url">{{breadcrumb.label.title}}</span>
|
|
460
|
-
</li>
|
|
461
|
-
</ng-template>
|
|
462
|
-
`
|
|
463
|
-
},] }
|
|
464
|
-
];
|
|
465
|
-
AppBreadcrumbComponent.ctorParameters = () => [
|
|
466
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
467
|
-
{ type: Renderer2 },
|
|
468
|
-
{ type: AppBreadcrumbService },
|
|
469
|
-
{ type: ElementRef }
|
|
470
|
-
];
|
|
471
|
-
AppBreadcrumbComponent.propDecorators = {
|
|
472
|
-
fixed: [{ type: Input }]
|
|
473
|
-
};
|
|
474
|
-
|
|
475
|
-
class CuiBreadcrumbComponent {
|
|
476
|
-
constructor(document, renderer, service) {
|
|
477
|
-
this.document = document;
|
|
478
|
-
this.renderer = renderer;
|
|
479
|
-
this.service = service;
|
|
480
|
-
this.fixedClass = 'breadcrumb-fixed';
|
|
481
|
-
}
|
|
482
|
-
ngOnInit() {
|
|
483
|
-
this.isFixed(this.fixed);
|
|
484
|
-
this.breadcrumbs = this.service.breadcrumbs;
|
|
485
|
-
}
|
|
486
|
-
ngOnDestroy() {
|
|
487
|
-
this.renderer.removeClass(this.document.body, this.fixedClass);
|
|
488
|
-
}
|
|
489
|
-
isFixed(fixed = this.fixed) {
|
|
490
|
-
if (fixed) {
|
|
491
|
-
this.renderer.addClass(this.document.body, this.fixedClass);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
CuiBreadcrumbComponent.decorators = [
|
|
496
|
-
{ type: Component, args: [{
|
|
497
|
-
// tslint:disable-next-line:component-selector
|
|
498
|
-
selector: 'cui-breadcrumb',
|
|
499
|
-
template: "<ol class=\"breadcrumb\">\r\n <ng-template ngFor let-breadcrumb [ngForOf]=\"breadcrumbs | async\" let-last = last>\r\n <li class=\"breadcrumb-item\"\r\n *ngIf=\"breadcrumb.label.title && (breadcrumb.url.slice(-1) == '/' || last)\"\r\n [ngClass]=\"{active: last}\">\r\n <a *ngIf=\"!last\" [routerLink]=\"breadcrumb.url\">{{breadcrumb.label.title}}</a>\r\n <span *ngIf=\"last\" [routerLink]=\"breadcrumb.url\">{{breadcrumb.label.title}}</span>\r\n </li>\r\n </ng-template>\r\n <ng-content></ng-content>\r\n</ol>\r\n"
|
|
500
|
-
},] }
|
|
501
|
-
];
|
|
502
|
-
CuiBreadcrumbComponent.ctorParameters = () => [
|
|
503
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
504
|
-
{ type: Renderer2 },
|
|
505
|
-
{ type: AppBreadcrumbService }
|
|
506
|
-
];
|
|
507
|
-
CuiBreadcrumbComponent.propDecorators = {
|
|
508
|
-
fixed: [{ type: Input }]
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
// @dynamic
|
|
512
|
-
class AppBreadcrumbModule {
|
|
513
|
-
static forRoot(config) {
|
|
514
|
-
return {
|
|
515
|
-
ngModule: AppBreadcrumbModule,
|
|
516
|
-
providers: [
|
|
517
|
-
AppBreadcrumbService
|
|
518
|
-
]
|
|
519
|
-
};
|
|
520
|
-
}
|
|
521
|
-
}
|
|
522
|
-
AppBreadcrumbModule.decorators = [
|
|
523
|
-
{ type: NgModule, args: [{
|
|
524
|
-
imports: [CommonModule, RouterModule],
|
|
525
|
-
exports: [AppBreadcrumbComponent, CuiBreadcrumbComponent],
|
|
526
|
-
declarations: [AppBreadcrumbComponent, CuiBreadcrumbComponent]
|
|
527
|
-
},] }
|
|
528
|
-
];
|
|
529
|
-
|
|
530
|
-
class AppFooterComponent {
|
|
531
|
-
constructor(document, renderer) {
|
|
532
|
-
this.document = document;
|
|
533
|
-
this.renderer = renderer;
|
|
534
|
-
this.fixedClass = 'footer-fixed';
|
|
535
|
-
this.appFooterClass = true;
|
|
536
|
-
}
|
|
537
|
-
ngOnInit() {
|
|
538
|
-
this.isFixed(this.fixed);
|
|
539
|
-
}
|
|
540
|
-
ngOnDestroy() {
|
|
541
|
-
this.renderer.removeClass(this.document.body, this.fixedClass);
|
|
542
|
-
}
|
|
543
|
-
isFixed(fixed = this.fixed) {
|
|
544
|
-
if (fixed) {
|
|
545
|
-
this.renderer.addClass(this.document.body, this.fixedClass);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
AppFooterComponent.decorators = [
|
|
550
|
-
{ type: Component, args: [{
|
|
551
|
-
selector: 'app-footer, cui-footer',
|
|
552
|
-
template: `<ng-content></ng-content>`
|
|
553
|
-
},] }
|
|
554
|
-
];
|
|
555
|
-
AppFooterComponent.ctorParameters = () => [
|
|
556
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
557
|
-
{ type: Renderer2 }
|
|
558
|
-
];
|
|
559
|
-
AppFooterComponent.propDecorators = {
|
|
560
|
-
fixed: [{ type: Input }],
|
|
561
|
-
appFooterClass: [{ type: HostBinding, args: ['class.app-footer',] }]
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
class AppFooterModule {
|
|
565
|
-
}
|
|
566
|
-
AppFooterModule.decorators = [
|
|
567
|
-
{ type: NgModule, args: [{
|
|
568
|
-
imports: [CommonModule],
|
|
569
|
-
exports: [AppFooterComponent],
|
|
570
|
-
declarations: [AppFooterComponent]
|
|
571
|
-
},] }
|
|
572
|
-
];
|
|
573
|
-
|
|
574
|
-
class AppHeaderComponent {
|
|
575
|
-
constructor(document, renderer) {
|
|
576
|
-
this.document = document;
|
|
577
|
-
this.renderer = renderer;
|
|
578
|
-
this.navbarBrandText = { icon: '🅲', text: '🅲 CoreUI' };
|
|
579
|
-
this.navbarBrandRouterLink = '';
|
|
580
|
-
this.fixedClass = 'header-fixed';
|
|
581
|
-
this.appHeaderClass = true;
|
|
582
|
-
this.navbarClass = true;
|
|
583
|
-
this.breakpoints = ['xl', 'lg', 'md', 'sm', 'xs'];
|
|
584
|
-
this.sidebarTogglerClass = 'd-none d-md-block';
|
|
585
|
-
this.sidebarTogglerMobileClass = 'd-lg-none';
|
|
586
|
-
this.asideTogglerClass = 'd-none d-md-block';
|
|
587
|
-
this.asideTogglerMobileClass = 'd-lg-none';
|
|
588
|
-
}
|
|
589
|
-
ngOnInit() {
|
|
590
|
-
this.isFixed(this.fixed);
|
|
591
|
-
this.navbarBrandImg = Boolean(this.navbarBrand || this.navbarBrandFull || this.navbarBrandMinimized);
|
|
592
|
-
this.navbarBrandRouterLink = this.navbarBrandRouterLink[0] ? this.navbarBrandRouterLink : this.navbarBrandHref;
|
|
593
|
-
this.sidebarTogglerClass = this.setToggerBreakpointClass(this.sidebarToggler);
|
|
594
|
-
this.sidebarTogglerMobileClass = this.setToggerMobileBreakpointClass(this.sidebarToggler);
|
|
595
|
-
this.asideTogglerClass = this.setToggerBreakpointClass(this.asideMenuToggler);
|
|
596
|
-
this.asideTogglerMobileClass = this.setToggerMobileBreakpointClass(this.asideMenuToggler);
|
|
597
|
-
}
|
|
598
|
-
ngOnDestroy() {
|
|
599
|
-
this.renderer.removeClass(this.document.body, this.fixedClass);
|
|
600
|
-
}
|
|
601
|
-
isFixed(fixed = this.fixed) {
|
|
602
|
-
if (fixed) {
|
|
603
|
-
this.renderer.addClass(this.document.body, this.fixedClass);
|
|
604
|
-
}
|
|
605
|
-
}
|
|
606
|
-
setToggerBreakpointClass(breakpoint = 'md') {
|
|
607
|
-
let togglerClass = 'd-none d-md-block';
|
|
608
|
-
if (this.breakpoints.includes(breakpoint)) {
|
|
609
|
-
const breakpointIndex = this.breakpoints.indexOf(breakpoint);
|
|
610
|
-
togglerClass = `d-none d-${breakpoint}-block`;
|
|
611
|
-
}
|
|
612
|
-
return togglerClass;
|
|
613
|
-
}
|
|
614
|
-
setToggerMobileBreakpointClass(breakpoint = 'lg') {
|
|
615
|
-
let togglerClass = 'd-lg-none';
|
|
616
|
-
if (this.breakpoints.includes(breakpoint)) {
|
|
617
|
-
togglerClass = `d-${breakpoint}-none`;
|
|
618
|
-
}
|
|
619
|
-
return togglerClass;
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
AppHeaderComponent.decorators = [
|
|
623
|
-
{ type: Component, args: [{
|
|
624
|
-
selector: 'app-header, cui-header',
|
|
625
|
-
template: "<ng-template [ngIf]=\"mobileSidebarToggler != false\">\r\n <button class=\"navbar-toggler {{sidebarTogglerMobileClass}}\" type=\"button\" appSidebarToggler>\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n</ng-template>\r\n<a class=\"navbar-brand\" [routerLink]=\"navbarBrandRouterLink\">\r\n <ng-template [ngIf]=\"navbarBrandImg\">\r\n <img *ngIf=\"navbarBrand\"\r\n [appHtmlAttr]=\"navbarBrand\"\r\n [ngClass]=\"'navbar-brand'\">\r\n <img *ngIf=\"navbarBrandFull\"\r\n [appHtmlAttr]=\"navbarBrandFull\"\r\n [ngClass]=\"'navbar-brand-full'\">\r\n <img *ngIf=\"navbarBrandMinimized\"\r\n [appHtmlAttr]=\"navbarBrandMinimized\"\r\n [ngClass]=\"'navbar-brand-minimized'\">\r\n </ng-template>\r\n <ng-template [ngIf]=\"!navbarBrandImg\">\r\n <div class=\"navbar-brand-full\" [innerHTML]=\"navbarBrandText.text\"></div>\r\n <div class=\"navbar-brand-minimized\" [innerHTML]=\"navbarBrandText.icon\"></div>\r\n </ng-template>\r\n</a>\r\n<ng-template [ngIf]=\"sidebarToggler != false\">\r\n <button class=\"navbar-toggler {{sidebarTogglerClass}}\" type=\"button\" [appSidebarToggler]=\"sidebarToggler\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n</ng-template>\r\n<ng-content></ng-content>\r\n<ng-template [ngIf]=\"asideMenuToggler != false\">\r\n <button class=\"navbar-toggler {{asideTogglerClass}}\" type=\"button\" [appAsideMenuToggler]=\"asideMenuToggler\">\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n</ng-template>\r\n<ng-template [ngIf]=\"mobileAsideMenuToggler != false\">\r\n <button class=\"navbar-toggler {{asideTogglerMobileClass}}\" type=\"button\" appAsideMenuToggler>\r\n <span class=\"navbar-toggler-icon\"></span>\r\n </button>\r\n</ng-template>\r\n"
|
|
626
|
-
},] }
|
|
627
|
-
];
|
|
628
|
-
AppHeaderComponent.ctorParameters = () => [
|
|
629
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
630
|
-
{ type: Renderer2 }
|
|
631
|
-
];
|
|
632
|
-
AppHeaderComponent.propDecorators = {
|
|
633
|
-
fixed: [{ type: Input }],
|
|
634
|
-
navbarBrand: [{ type: Input }],
|
|
635
|
-
navbarBrandFull: [{ type: Input }],
|
|
636
|
-
navbarBrandMinimized: [{ type: Input }],
|
|
637
|
-
navbarBrandText: [{ type: Input }],
|
|
638
|
-
navbarBrandHref: [{ type: Input }],
|
|
639
|
-
navbarBrandRouterLink: [{ type: Input }],
|
|
640
|
-
sidebarToggler: [{ type: Input }],
|
|
641
|
-
mobileSidebarToggler: [{ type: Input }],
|
|
642
|
-
asideMenuToggler: [{ type: Input }],
|
|
643
|
-
mobileAsideMenuToggler: [{ type: Input }],
|
|
644
|
-
appHeaderClass: [{ type: HostBinding, args: ['class.app-header',] }],
|
|
645
|
-
navbarClass: [{ type: HostBinding, args: ['class.navbar',] }]
|
|
646
|
-
};
|
|
647
|
-
|
|
648
|
-
class AppHeaderModule {
|
|
649
|
-
}
|
|
650
|
-
AppHeaderModule.decorators = [
|
|
651
|
-
{ type: NgModule, args: [{
|
|
652
|
-
imports: [
|
|
653
|
-
CommonModule,
|
|
654
|
-
RouterModule,
|
|
655
|
-
LayoutModule
|
|
656
|
-
],
|
|
657
|
-
exports: [
|
|
658
|
-
AppHeaderComponent,
|
|
659
|
-
LayoutModule
|
|
660
|
-
],
|
|
661
|
-
declarations: [
|
|
662
|
-
AppHeaderComponent
|
|
663
|
-
]
|
|
664
|
-
},] }
|
|
665
|
-
];
|
|
666
|
-
|
|
667
|
-
class AppSidebarService {
|
|
668
|
-
constructor() {
|
|
669
|
-
this.events = new BehaviorSubject({});
|
|
670
|
-
this.events$ = this.events.asObservable();
|
|
671
|
-
}
|
|
672
|
-
toggle(action) {
|
|
673
|
-
this.events.next(action);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
AppSidebarService.ɵprov = ɵɵdefineInjectable({ factory: function AppSidebarService_Factory() { return new AppSidebarService(); }, token: AppSidebarService, providedIn: "root" });
|
|
677
|
-
AppSidebarService.decorators = [
|
|
678
|
-
{ type: Injectable, args: [{
|
|
679
|
-
providedIn: 'root'
|
|
680
|
-
},] }
|
|
681
|
-
];
|
|
682
|
-
AppSidebarService.ctorParameters = () => [];
|
|
683
|
-
|
|
684
|
-
class AppSidebarComponent {
|
|
685
|
-
constructor(document, renderer, sidebarService) {
|
|
686
|
-
this.document = document;
|
|
687
|
-
this.renderer = renderer;
|
|
688
|
-
this.sidebarService = sidebarService;
|
|
689
|
-
this._minimized = false;
|
|
690
|
-
/**
|
|
691
|
-
* Emits whenever the minimized state of the sidebar changes.
|
|
692
|
-
* Primarily used to facilitate two-way binding.
|
|
693
|
-
*/
|
|
694
|
-
this.minimizedChange = new EventEmitter();
|
|
695
|
-
this.sidebarClass = true;
|
|
696
|
-
}
|
|
697
|
-
get minimized() {
|
|
698
|
-
return this._minimized;
|
|
699
|
-
}
|
|
700
|
-
set minimized(value) {
|
|
701
|
-
// only update / emit events when the value changes
|
|
702
|
-
if (this._minimized !== value) {
|
|
703
|
-
this._minimized = value;
|
|
704
|
-
this._updateMinimized(value);
|
|
705
|
-
this.minimizedChange.emit(value);
|
|
706
|
-
this.sidebarService.toggle({ minimize: value });
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
ngOnInit() {
|
|
710
|
-
this.displayBreakpoint(this.display);
|
|
711
|
-
this.isCompact(this.compact);
|
|
712
|
-
this.isFixed(this.fixed);
|
|
713
|
-
this.isOffCanvas(this.offCanvas);
|
|
714
|
-
this.sidebarService.toggle({ minimize: this.minimized });
|
|
715
|
-
this.subscriptionEvents = this.sidebarService.events$.subscribe(action => {
|
|
716
|
-
if (action.minimize !== undefined) {
|
|
717
|
-
action.minimize === 'toggle' ? this.toggleMinimized() : this.minimized = !!action.minimize;
|
|
718
|
-
}
|
|
719
|
-
});
|
|
720
|
-
}
|
|
721
|
-
ngOnDestroy() {
|
|
722
|
-
this.subscriptionEvents.unsubscribe();
|
|
723
|
-
this.minimizedChange.complete();
|
|
724
|
-
this.renderer.removeClass(this.document.body, 'sidebar-fixed');
|
|
725
|
-
this._updateMinimized(false);
|
|
726
|
-
}
|
|
727
|
-
isCompact(compact = this.compact) {
|
|
728
|
-
if (compact) {
|
|
729
|
-
this.renderer.addClass(this.document.body, 'sidebar-compact');
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
isFixed(fixed = this.fixed) {
|
|
733
|
-
if (fixed) {
|
|
734
|
-
this.renderer.addClass(this.document.body, 'sidebar-fixed');
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
toggleMinimized() {
|
|
738
|
-
this.minimized = !this._minimized;
|
|
739
|
-
}
|
|
740
|
-
isOffCanvas(offCanvas = this.offCanvas) {
|
|
741
|
-
if (offCanvas) {
|
|
742
|
-
this.renderer.addClass(this.document.body, 'sidebar-off-canvas');
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
displayBreakpoint(display = this.display) {
|
|
746
|
-
if (display !== false) {
|
|
747
|
-
const cssClass = display ? `sidebar-${display}-show` : sidebarCssClasses[0];
|
|
748
|
-
this.renderer.addClass(this.document.body, cssClass);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
_updateMinimized(minimized) {
|
|
752
|
-
const body = this.document.body;
|
|
753
|
-
if (minimized) {
|
|
754
|
-
this.renderer.addClass(body, 'sidebar-minimized');
|
|
755
|
-
this.renderer.addClass(body, 'brand-minimized');
|
|
756
|
-
}
|
|
757
|
-
else {
|
|
758
|
-
this.renderer.removeClass(body, 'sidebar-minimized');
|
|
759
|
-
this.renderer.removeClass(body, 'brand-minimized');
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
AppSidebarComponent.decorators = [
|
|
764
|
-
{ type: Component, args: [{
|
|
765
|
-
selector: 'app-sidebar, cui-sidebar',
|
|
766
|
-
template: `<ng-content></ng-content>`
|
|
767
|
-
},] }
|
|
768
|
-
];
|
|
769
|
-
AppSidebarComponent.ctorParameters = () => [
|
|
770
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
771
|
-
{ type: Renderer2 },
|
|
772
|
-
{ type: AppSidebarService }
|
|
773
|
-
];
|
|
774
|
-
AppSidebarComponent.propDecorators = {
|
|
775
|
-
compact: [{ type: Input }],
|
|
776
|
-
display: [{ type: Input }],
|
|
777
|
-
fixed: [{ type: Input }],
|
|
778
|
-
offCanvas: [{ type: Input }],
|
|
779
|
-
minimized: [{ type: Input }],
|
|
780
|
-
minimizedChange: [{ type: Output }],
|
|
781
|
-
sidebarClass: [{ type: HostBinding, args: ['class.sidebar',] }]
|
|
782
|
-
};
|
|
783
|
-
|
|
784
|
-
class AppSidebarNavComponent {
|
|
785
|
-
constructor(router) {
|
|
786
|
-
this.router = router;
|
|
787
|
-
this.navItems = [];
|
|
788
|
-
this.sidebarNavClass = true;
|
|
789
|
-
this.role = 'nav';
|
|
790
|
-
this.navItemsArray = [];
|
|
791
|
-
}
|
|
792
|
-
ngOnChanges(changes) {
|
|
793
|
-
this.navItemsArray = Array.isArray(this.navItems) ? this.navItems.slice() : [];
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
AppSidebarNavComponent.decorators = [
|
|
797
|
-
{ type: Component, args: [{
|
|
798
|
-
selector: 'app-sidebar-nav, cui-sidebar-nav',
|
|
799
|
-
template: "<app-sidebar-nav-items\n class=\"nav\"\n [items]=\"navItemsArray\">\n</app-sidebar-nav-items>\n"
|
|
800
|
-
},] }
|
|
801
|
-
];
|
|
802
|
-
AppSidebarNavComponent.ctorParameters = () => [
|
|
803
|
-
{ type: Router }
|
|
804
|
-
];
|
|
805
|
-
AppSidebarNavComponent.propDecorators = {
|
|
806
|
-
navItems: [{ type: Input }],
|
|
807
|
-
sidebarNavClass: [{ type: HostBinding, args: ['class.sidebar-nav',] }],
|
|
808
|
-
role: [{ type: HostBinding, args: ['attr.role',] }, { type: Input }]
|
|
809
|
-
};
|
|
810
|
-
|
|
811
|
-
class AppSidebarMinimizerComponent {
|
|
812
|
-
constructor(sidebarService) {
|
|
813
|
-
this.sidebarService = sidebarService;
|
|
814
|
-
this.role = 'button';
|
|
815
|
-
this.sidebarMinimizerClass = true;
|
|
816
|
-
}
|
|
817
|
-
toggleOpen($event) {
|
|
818
|
-
$event.preventDefault();
|
|
819
|
-
this.sidebarService.toggle({ minimize: 'toggle' });
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
AppSidebarMinimizerComponent.decorators = [
|
|
823
|
-
{ type: Component, args: [{
|
|
824
|
-
selector: 'app-sidebar-minimizer, cui-sidebar-minimizer',
|
|
825
|
-
template: ``
|
|
826
|
-
},] }
|
|
827
|
-
];
|
|
828
|
-
AppSidebarMinimizerComponent.ctorParameters = () => [
|
|
829
|
-
{ type: AppSidebarService }
|
|
830
|
-
];
|
|
831
|
-
AppSidebarMinimizerComponent.propDecorators = {
|
|
832
|
-
role: [{ type: HostBinding, args: ['attr.role',] }, { type: Input }],
|
|
833
|
-
sidebarMinimizerClass: [{ type: HostBinding, args: ['class.sidebar-minimizer',] }],
|
|
834
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
835
|
-
};
|
|
836
|
-
|
|
837
|
-
class SidebarNavService {
|
|
838
|
-
}
|
|
839
|
-
SidebarNavService.decorators = [
|
|
840
|
-
{ type: Injectable }
|
|
841
|
-
];
|
|
842
|
-
class SidebarNavHelper {
|
|
843
|
-
constructor() {
|
|
844
|
-
this.hasBadge = (item) => Boolean(item.badge);
|
|
845
|
-
this.hasIcon = (item) => Boolean(item.icon);
|
|
846
|
-
}
|
|
847
|
-
itemType(item) {
|
|
848
|
-
if (item.divider) {
|
|
849
|
-
return 'divider';
|
|
850
|
-
}
|
|
851
|
-
else if (item.title) {
|
|
852
|
-
return 'title';
|
|
853
|
-
}
|
|
854
|
-
else if (item.children) {
|
|
855
|
-
return 'dropdown';
|
|
856
|
-
}
|
|
857
|
-
else if (item.label) {
|
|
858
|
-
return 'label';
|
|
859
|
-
}
|
|
860
|
-
else if (!Object.keys(item).length) {
|
|
861
|
-
return 'empty';
|
|
862
|
-
}
|
|
863
|
-
else {
|
|
864
|
-
return 'link';
|
|
865
|
-
}
|
|
866
|
-
}
|
|
867
|
-
isActive(router, item) {
|
|
868
|
-
return router.isActive(item.url, false);
|
|
869
|
-
}
|
|
870
|
-
getIconClass(item) {
|
|
871
|
-
const classes = {
|
|
872
|
-
'nav-icon': true
|
|
873
|
-
};
|
|
874
|
-
if (this.hasIcon(item)) {
|
|
875
|
-
const icon = item.icon;
|
|
876
|
-
classes[icon] = this.hasIcon(item);
|
|
877
|
-
}
|
|
878
|
-
return classes;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
SidebarNavHelper.decorators = [
|
|
882
|
-
{ type: Injectable }
|
|
883
|
-
];
|
|
884
|
-
|
|
885
|
-
class AppSidebarFooterComponent {
|
|
886
|
-
constructor() {
|
|
887
|
-
this.sidebarFooterClass = true;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
AppSidebarFooterComponent.decorators = [
|
|
891
|
-
{ type: Component, args: [{
|
|
892
|
-
selector: 'app-sidebar-footer, cui-sidebar-footer',
|
|
893
|
-
template: `<ng-content></ng-content>`
|
|
894
|
-
},] }
|
|
895
|
-
];
|
|
896
|
-
AppSidebarFooterComponent.ctorParameters = () => [];
|
|
897
|
-
AppSidebarFooterComponent.propDecorators = {
|
|
898
|
-
sidebarFooterClass: [{ type: HostBinding, args: ['class.sidebar-footer',] }]
|
|
899
|
-
};
|
|
900
|
-
|
|
901
|
-
class AppSidebarFormComponent {
|
|
902
|
-
constructor() {
|
|
903
|
-
this.sidebarFormClass = true;
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
AppSidebarFormComponent.decorators = [
|
|
907
|
-
{ type: Component, args: [{
|
|
908
|
-
selector: 'app-sidebar-form, cui-sidebar-form',
|
|
909
|
-
template: `<ng-content></ng-content>`
|
|
910
|
-
},] }
|
|
911
|
-
];
|
|
912
|
-
AppSidebarFormComponent.ctorParameters = () => [];
|
|
913
|
-
AppSidebarFormComponent.propDecorators = {
|
|
914
|
-
sidebarFormClass: [{ type: HostBinding, args: ['class.sidebar-form',] }]
|
|
915
|
-
};
|
|
916
|
-
|
|
917
|
-
class AppSidebarHeaderComponent {
|
|
918
|
-
constructor() {
|
|
919
|
-
this.sidebarHeaderClass = true;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
AppSidebarHeaderComponent.decorators = [
|
|
923
|
-
{ type: Component, args: [{
|
|
924
|
-
selector: 'app-sidebar-header, cui-sidebar-header',
|
|
925
|
-
template: `<ng-content></ng-content>`
|
|
926
|
-
},] }
|
|
927
|
-
];
|
|
928
|
-
AppSidebarHeaderComponent.ctorParameters = () => [];
|
|
929
|
-
AppSidebarHeaderComponent.propDecorators = {
|
|
930
|
-
sidebarHeaderClass: [{ type: HostBinding, args: ['class.sidebar-header',] }]
|
|
931
|
-
};
|
|
932
|
-
|
|
933
|
-
class NavDropdownDirective {
|
|
934
|
-
constructor(el) {
|
|
935
|
-
this.el = el;
|
|
936
|
-
}
|
|
937
|
-
toggle() {
|
|
938
|
-
this.el.nativeElement.classList.toggle('open');
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
NavDropdownDirective.decorators = [
|
|
942
|
-
{ type: Directive, args: [{
|
|
943
|
-
selector: '[appNavDropdown]'
|
|
944
|
-
},] }
|
|
945
|
-
];
|
|
946
|
-
NavDropdownDirective.ctorParameters = () => [
|
|
947
|
-
{ type: ElementRef }
|
|
948
|
-
];
|
|
949
|
-
/**
|
|
950
|
-
* Allows the dropdown to be toggled via click.
|
|
951
|
-
*/
|
|
952
|
-
class NavDropdownToggleDirective {
|
|
953
|
-
constructor(dropdown) {
|
|
954
|
-
this.dropdown = dropdown;
|
|
955
|
-
}
|
|
956
|
-
toggleOpen($event) {
|
|
957
|
-
$event.preventDefault();
|
|
958
|
-
this.dropdown.toggle();
|
|
959
|
-
}
|
|
960
|
-
}
|
|
961
|
-
NavDropdownToggleDirective.decorators = [
|
|
962
|
-
{ type: Directive, args: [{
|
|
963
|
-
selector: '[appNavDropdownToggle]'
|
|
964
|
-
},] }
|
|
965
|
-
];
|
|
966
|
-
NavDropdownToggleDirective.ctorParameters = () => [
|
|
967
|
-
{ type: NavDropdownDirective }
|
|
968
|
-
];
|
|
969
|
-
NavDropdownToggleDirective.propDecorators = {
|
|
970
|
-
toggleOpen: [{ type: HostListener, args: ['click', ['$event'],] }]
|
|
971
|
-
};
|
|
972
|
-
|
|
973
|
-
class AppSidebarNavDividerComponent {
|
|
974
|
-
constructor() { }
|
|
975
|
-
ngOnInit() { }
|
|
976
|
-
}
|
|
977
|
-
AppSidebarNavDividerComponent.decorators = [
|
|
978
|
-
{ type: Component, args: [{
|
|
979
|
-
selector: 'app-sidebar-nav-divider, cui-sidebar-nav-divider',
|
|
980
|
-
template: ``
|
|
981
|
-
},] }
|
|
982
|
-
];
|
|
983
|
-
AppSidebarNavDividerComponent.ctorParameters = () => [];
|
|
984
|
-
AppSidebarNavDividerComponent.propDecorators = {
|
|
985
|
-
item: [{ type: Input }]
|
|
986
|
-
};
|
|
987
|
-
|
|
988
|
-
class AppSidebarNavDropdownComponent {
|
|
989
|
-
constructor(helper) {
|
|
990
|
-
this.helper = helper;
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
AppSidebarNavDropdownComponent.decorators = [
|
|
994
|
-
{ type: Component, args: [{
|
|
995
|
-
selector: 'app-sidebar-nav-dropdown, cui-sidebar-nav-dropdown',
|
|
996
|
-
template: `
|
|
997
|
-
<a class="nav-link nav-dropdown-toggle"
|
|
998
|
-
appNavDropdownToggle
|
|
999
|
-
[appHtmlAttr]="item.attributes">
|
|
1000
|
-
<i *ngIf="helper.hasIcon(item)" [ngClass]="item | appSidebarNavIcon"></i>
|
|
1001
|
-
<ng-container>{{item.name}}</ng-container>
|
|
1002
|
-
<span *ngIf="helper.hasBadge(item)" [ngClass]="item | appSidebarNavBadge">{{ item.badge.text }}</span>
|
|
1003
|
-
</a>
|
|
1004
|
-
<app-sidebar-nav-items
|
|
1005
|
-
class="nav-dropdown-items"
|
|
1006
|
-
[items]="item.children">
|
|
1007
|
-
</app-sidebar-nav-items>
|
|
1008
|
-
`,
|
|
1009
|
-
providers: [SidebarNavHelper],
|
|
1010
|
-
styles: ['.nav-dropdown-toggle { cursor: pointer; }',
|
|
1011
|
-
'.nav-dropdown-items { display: block; }']
|
|
1012
|
-
},] }
|
|
1013
|
-
];
|
|
1014
|
-
AppSidebarNavDropdownComponent.ctorParameters = () => [
|
|
1015
|
-
{ type: SidebarNavHelper }
|
|
1016
|
-
];
|
|
1017
|
-
AppSidebarNavDropdownComponent.propDecorators = {
|
|
1018
|
-
item: [{ type: Input }]
|
|
1019
|
-
};
|
|
1020
|
-
|
|
1021
|
-
class AppSidebarNavItemsComponent {
|
|
1022
|
-
constructor(document, renderer, router, helper) {
|
|
1023
|
-
this.document = document;
|
|
1024
|
-
this.renderer = renderer;
|
|
1025
|
-
this.router = router;
|
|
1026
|
-
this.helper = helper;
|
|
1027
|
-
}
|
|
1028
|
-
set items(items) {
|
|
1029
|
-
this._items = [...items];
|
|
1030
|
-
}
|
|
1031
|
-
get items() {
|
|
1032
|
-
return this._items;
|
|
1033
|
-
}
|
|
1034
|
-
hideMobile() {
|
|
1035
|
-
if (this.document.body.classList.contains('sidebar-show')) {
|
|
1036
|
-
this.renderer.removeClass(this.document.body, 'sidebar-show');
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
AppSidebarNavItemsComponent.decorators = [
|
|
1041
|
-
{ type: Component, args: [{
|
|
1042
|
-
selector: 'app-sidebar-nav-items, cui-sidebar-nav-items',
|
|
1043
|
-
template: `
|
|
1044
|
-
<ng-container *ngFor="let item of items">
|
|
1045
|
-
<ng-container [ngSwitch]="helper.itemType(item)">
|
|
1046
|
-
<app-sidebar-nav-dropdown
|
|
1047
|
-
*ngSwitchCase="'dropdown'"
|
|
1048
|
-
[item]="item"
|
|
1049
|
-
[class.open]="helper.isActive(router, item)"
|
|
1050
|
-
[ngClass]="item | appSidebarNavItemClass"
|
|
1051
|
-
appNavDropdown
|
|
1052
|
-
routerLinkActive="open">
|
|
1053
|
-
</app-sidebar-nav-dropdown>
|
|
1054
|
-
<app-sidebar-nav-divider
|
|
1055
|
-
*ngSwitchCase="'divider'"
|
|
1056
|
-
[item]="item"
|
|
1057
|
-
[ngClass]="item | appSidebarNavItemClass"
|
|
1058
|
-
[appHtmlAttr]="item.attributes">
|
|
1059
|
-
</app-sidebar-nav-divider>
|
|
1060
|
-
<app-sidebar-nav-title
|
|
1061
|
-
*ngSwitchCase="'title'"
|
|
1062
|
-
[item]="item"
|
|
1063
|
-
[ngClass]="item | appSidebarNavItemClass"
|
|
1064
|
-
[appHtmlAttr]="item.attributes">
|
|
1065
|
-
</app-sidebar-nav-title>
|
|
1066
|
-
<app-sidebar-nav-label
|
|
1067
|
-
*ngSwitchCase="'label'"
|
|
1068
|
-
[item]="item"
|
|
1069
|
-
class="nav-item"
|
|
1070
|
-
[ngClass]="item | appSidebarNavItemClass">
|
|
1071
|
-
</app-sidebar-nav-label>
|
|
1072
|
-
<ng-container
|
|
1073
|
-
*ngSwitchCase="'empty'">
|
|
1074
|
-
</ng-container>
|
|
1075
|
-
<app-sidebar-nav-link
|
|
1076
|
-
*ngSwitchDefault
|
|
1077
|
-
[item]="item"
|
|
1078
|
-
class="nav-item"
|
|
1079
|
-
[ngClass]="item | appSidebarNavItemClass"
|
|
1080
|
-
(linkClick)="hideMobile()"
|
|
1081
|
-
>
|
|
1082
|
-
</app-sidebar-nav-link>
|
|
1083
|
-
</ng-container>
|
|
1084
|
-
</ng-container>
|
|
1085
|
-
`
|
|
1086
|
-
},] }
|
|
1087
|
-
];
|
|
1088
|
-
AppSidebarNavItemsComponent.ctorParameters = () => [
|
|
1089
|
-
{ type: undefined, decorators: [{ type: Inject, args: [DOCUMENT,] }] },
|
|
1090
|
-
{ type: Renderer2 },
|
|
1091
|
-
{ type: Router },
|
|
1092
|
-
{ type: SidebarNavHelper }
|
|
1093
|
-
];
|
|
1094
|
-
AppSidebarNavItemsComponent.propDecorators = {
|
|
1095
|
-
items: [{ type: Input }]
|
|
1096
|
-
};
|
|
1097
|
-
|
|
1098
|
-
class AppSidebarNavLinkContentComponent {
|
|
1099
|
-
constructor(helper) {
|
|
1100
|
-
this.helper = helper;
|
|
1101
|
-
}
|
|
1102
|
-
ngOnInit() { }
|
|
1103
|
-
ngOnDestroy() { }
|
|
1104
|
-
}
|
|
1105
|
-
AppSidebarNavLinkContentComponent.decorators = [
|
|
1106
|
-
{ type: Component, args: [{
|
|
1107
|
-
selector: 'app-sidebar-nav-link-content, cui-sidebar-nav-link-content',
|
|
1108
|
-
template: `
|
|
1109
|
-
<ng-container *ngIf="true">
|
|
1110
|
-
<i *ngIf="helper.hasIcon(item)" [ngClass]="item | appSidebarNavIcon"></i>
|
|
1111
|
-
<ng-container>{{item.name}}</ng-container>
|
|
1112
|
-
<span *ngIf="helper.hasBadge(item)" [ngClass]="item | appSidebarNavBadge">{{ item.badge.text }}</span>
|
|
1113
|
-
</ng-container>
|
|
1114
|
-
`,
|
|
1115
|
-
providers: [SidebarNavHelper]
|
|
1116
|
-
},] }
|
|
1117
|
-
];
|
|
1118
|
-
AppSidebarNavLinkContentComponent.ctorParameters = () => [
|
|
1119
|
-
{ type: SidebarNavHelper }
|
|
1120
|
-
];
|
|
1121
|
-
AppSidebarNavLinkContentComponent.propDecorators = {
|
|
1122
|
-
item: [{ type: Input }]
|
|
1123
|
-
};
|
|
1124
|
-
class AppSidebarNavLinkComponent {
|
|
1125
|
-
constructor(router) {
|
|
1126
|
-
this.router = router;
|
|
1127
|
-
this.linkClick = new EventEmitter();
|
|
1128
|
-
this.navigationEndObservable = router.events.pipe(filter(event => {
|
|
1129
|
-
return event instanceof NavigationEnd;
|
|
1130
|
-
}));
|
|
1131
|
-
}
|
|
1132
|
-
set item(item) {
|
|
1133
|
-
this._Item = JSON.parse(JSON.stringify(item));
|
|
1134
|
-
}
|
|
1135
|
-
get item() {
|
|
1136
|
-
return this._Item;
|
|
1137
|
-
}
|
|
1138
|
-
ngOnInit() {
|
|
1139
|
-
this.url = typeof this.item.url === 'string' ? this.item.url : this.router.serializeUrl(this.router.createUrlTree(this.item.url));
|
|
1140
|
-
this.linkType = this.getLinkType();
|
|
1141
|
-
this.href = this.isDisabled() ? '' : (this.item.href || this.url);
|
|
1142
|
-
this.linkActive = this.router.url.split(/[?#(;]/)[0] === this.href.split(/[?#(;]/)[0];
|
|
1143
|
-
this.navSubscription = this.navigationEndObservable.subscribe(event => {
|
|
1144
|
-
const itemUrlArray = this.href.split(/[?#(;]/)[0].split('/');
|
|
1145
|
-
const urlArray = event.urlAfterRedirects.split(/[?#(;]/)[0].split('/');
|
|
1146
|
-
this.linkActive = itemUrlArray.every((value, index) => value === urlArray[index]);
|
|
1147
|
-
});
|
|
1148
|
-
}
|
|
1149
|
-
ngOnDestroy() {
|
|
1150
|
-
this.navSubscription.unsubscribe();
|
|
1151
|
-
}
|
|
1152
|
-
getLinkType() {
|
|
1153
|
-
return this.isDisabled() ? 'disabled' : this.isExternalLink() ? 'external' : 'link';
|
|
1154
|
-
}
|
|
1155
|
-
isDisabled() {
|
|
1156
|
-
return (this.item.attributes && this.item.attributes.disabled) ? true : null;
|
|
1157
|
-
}
|
|
1158
|
-
isExternalLink() {
|
|
1159
|
-
return !!this.item.href || this.url.substring(0, 4) === 'http';
|
|
1160
|
-
}
|
|
1161
|
-
linkClicked() {
|
|
1162
|
-
this.linkClick.emit();
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
AppSidebarNavLinkComponent.decorators = [
|
|
1166
|
-
{ type: Component, args: [{
|
|
1167
|
-
selector: 'app-sidebar-nav-link, cui-sidebar-nav-link',
|
|
1168
|
-
template: "<ng-container [ngSwitch]=\"linkType\">\r\n <a *ngSwitchCase=\"'disabled'\"\r\n [ngClass]=\"item | appSidebarNavLink\"\r\n [appHtmlAttr]=\"item.attributes\"\r\n >\r\n <app-sidebar-nav-link-content [item]=\"item\"></app-sidebar-nav-link-content>\r\n </a>\r\n <a *ngSwitchCase=\"'external'\"\r\n [ngClass]=\"item | appSidebarNavLink\"\r\n [href]=\"href\"\r\n [appHtmlAttr]=\"item.attributes\"\r\n (click)=\"linkClicked()\"\r\n >\r\n <app-sidebar-nav-link-content [item]=\"item\"></app-sidebar-nav-link-content>\r\n </a>\r\n <a *ngSwitchDefault\r\n [ngClass]=\"item | appSidebarNavLink\"\r\n [appHtmlAttr]=\"item.attributes\"\r\n [target]=\"item.attributes?.target\"\r\n [queryParams]=\"item.linkProps?.queryParams\"\r\n [fragment]=\"item.linkProps?.fragment\"\r\n [queryParamsHandling]=\"item.linkProps?.queryParamsHandling\"\r\n [preserveFragment]=\"item.linkProps?.preserveFragment\"\r\n [skipLocationChange]=\"item.linkProps?.skipLocationChange\"\r\n [replaceUrl]=\"item.linkProps?.replaceUrl\"\r\n [state]=\"item.linkProps?.state\"\r\n [routerLink]=\"item.url\"\r\n [routerLinkActive]=\"item.linkProps?.routerLinkActive || 'active'\"\r\n [routerLinkActiveOptions]=\"item.linkProps?.routerLinkActiveOptions?.exact ? item.linkProps?.routerLinkActiveOptions : {exact: false}\"\r\n [class.active]=\"linkActive && !item.linkProps?.routerLinkActiveOptions\"\r\n (click)=\"linkClicked()\"\r\n >\r\n <app-sidebar-nav-link-content [item]=\"item\"></app-sidebar-nav-link-content>\r\n </a>\r\n</ng-container>\r\n",
|
|
1169
|
-
providers: [SidebarNavHelper]
|
|
1170
|
-
},] }
|
|
1171
|
-
];
|
|
1172
|
-
AppSidebarNavLinkComponent.ctorParameters = () => [
|
|
1173
|
-
{ type: Router }
|
|
1174
|
-
];
|
|
1175
|
-
AppSidebarNavLinkComponent.propDecorators = {
|
|
1176
|
-
item: [{ type: Input }],
|
|
1177
|
-
linkClick: [{ type: Output }]
|
|
1178
|
-
};
|
|
1179
|
-
|
|
1180
|
-
class AppSidebarNavTitleComponent {
|
|
1181
|
-
constructor(el, renderer) {
|
|
1182
|
-
this.el = el;
|
|
1183
|
-
this.renderer = renderer;
|
|
1184
|
-
}
|
|
1185
|
-
ngOnInit() {
|
|
1186
|
-
const nativeElement = this.el.nativeElement;
|
|
1187
|
-
const name = this.renderer.createText(this.item.name);
|
|
1188
|
-
if (this.item.class) {
|
|
1189
|
-
const classes = this.item.class;
|
|
1190
|
-
this.renderer.addClass(nativeElement, classes);
|
|
1191
|
-
}
|
|
1192
|
-
if (this.item.wrapper) {
|
|
1193
|
-
const wrapper = this.renderer.createElement(this.item.wrapper.element);
|
|
1194
|
-
this.addAttribs(this.item.wrapper.attributes, wrapper);
|
|
1195
|
-
this.renderer.appendChild(wrapper, name);
|
|
1196
|
-
this.renderer.appendChild(nativeElement, wrapper);
|
|
1197
|
-
}
|
|
1198
|
-
else {
|
|
1199
|
-
this.renderer.appendChild(nativeElement, name);
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
addAttribs(attribs, element) {
|
|
1203
|
-
if (attribs) {
|
|
1204
|
-
for (const attr in attribs) {
|
|
1205
|
-
if (attr === 'style' && typeof (attribs[attr]) === 'object') {
|
|
1206
|
-
this.setStyle(attribs[attr], element);
|
|
1207
|
-
}
|
|
1208
|
-
else if (attr === 'class') {
|
|
1209
|
-
this.addClass(attribs[attr], element);
|
|
1210
|
-
}
|
|
1211
|
-
else {
|
|
1212
|
-
this.setAttrib(attr, attribs[attr], element);
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
setStyle(styles, el) {
|
|
1218
|
-
for (const style in styles) {
|
|
1219
|
-
this.renderer.setStyle(el, style, styles[style]);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
addClass(classes, el) {
|
|
1223
|
-
const classArray = (Array.isArray(classes) ? classes : classes.split(' '));
|
|
1224
|
-
classArray.filter((element) => element.length > 0).forEach(element => {
|
|
1225
|
-
this.renderer.addClass(el, element);
|
|
1226
|
-
});
|
|
1227
|
-
}
|
|
1228
|
-
setAttrib(key, value, el) {
|
|
1229
|
-
this.renderer.setAttribute(el, key, value);
|
|
1230
|
-
}
|
|
1231
|
-
}
|
|
1232
|
-
AppSidebarNavTitleComponent.decorators = [
|
|
1233
|
-
{ type: Component, args: [{
|
|
1234
|
-
selector: 'app-sidebar-nav-title, cui-sidebar-nav-title',
|
|
1235
|
-
template: ''
|
|
1236
|
-
},] }
|
|
1237
|
-
];
|
|
1238
|
-
AppSidebarNavTitleComponent.ctorParameters = () => [
|
|
1239
|
-
{ type: ElementRef },
|
|
1240
|
-
{ type: Renderer2 }
|
|
1241
|
-
];
|
|
1242
|
-
AppSidebarNavTitleComponent.propDecorators = {
|
|
1243
|
-
item: [{ type: Input }]
|
|
1244
|
-
};
|
|
1245
|
-
|
|
1246
|
-
class AppSidebarNavLabelComponent {
|
|
1247
|
-
constructor(helper) {
|
|
1248
|
-
this.helper = helper;
|
|
1249
|
-
this.classes = {
|
|
1250
|
-
'nav-label': true,
|
|
1251
|
-
active: true
|
|
1252
|
-
};
|
|
1253
|
-
this.iconClasses = {};
|
|
1254
|
-
}
|
|
1255
|
-
ngOnInit() {
|
|
1256
|
-
this.iconClasses = this.helper.getIconClass(this.item);
|
|
1257
|
-
}
|
|
1258
|
-
getItemClass() {
|
|
1259
|
-
const itemClass = this.item.class;
|
|
1260
|
-
this.classes[itemClass] = !!itemClass;
|
|
1261
|
-
return this.classes;
|
|
1262
|
-
}
|
|
1263
|
-
getLabelIconClass() {
|
|
1264
|
-
const variant = `text-${this.item.label.variant}`;
|
|
1265
|
-
this.iconClasses[variant] = !!this.item.label.variant;
|
|
1266
|
-
const labelClass = this.item.label.class;
|
|
1267
|
-
this.iconClasses[labelClass] = !!labelClass;
|
|
1268
|
-
return this.iconClasses;
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
AppSidebarNavLabelComponent.decorators = [
|
|
1272
|
-
{ type: Component, args: [{
|
|
1273
|
-
selector: 'app-sidebar-nav-label, cui-sidebar-nav-label',
|
|
1274
|
-
template: "<a [ngClass]=\"getItemClass()\"\r\n href=\"{{item.url}}\"\r\n [appHtmlAttr]=\"item.attributes\">\r\n <i *ngIf=\"helper.hasIcon(item)\" [ngClass]=\"getLabelIconClass()\"></i>\r\n <ng-container>{{item.name}}</ng-container>\r\n <span *ngIf=\"helper.hasBadge(item)\" [ngClass]=\"item | appSidebarNavBadge\">{{ item.badge.text }}</span>\r\n</a>\r\n"
|
|
1275
|
-
},] }
|
|
1276
|
-
];
|
|
1277
|
-
AppSidebarNavLabelComponent.ctorParameters = () => [
|
|
1278
|
-
{ type: SidebarNavHelper }
|
|
1279
|
-
];
|
|
1280
|
-
AppSidebarNavLabelComponent.propDecorators = {
|
|
1281
|
-
item: [{ type: Input }]
|
|
1282
|
-
};
|
|
1283
|
-
|
|
1284
|
-
class AppSidebarNavIconPipe {
|
|
1285
|
-
transform(item, args) {
|
|
1286
|
-
const classes = {
|
|
1287
|
-
'nav-icon': true
|
|
1288
|
-
};
|
|
1289
|
-
const icon = item.icon;
|
|
1290
|
-
classes[icon] = !!item.icon;
|
|
1291
|
-
return classes;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
AppSidebarNavIconPipe.decorators = [
|
|
1295
|
-
{ type: Pipe, args: [{
|
|
1296
|
-
name: 'appSidebarNavIcon'
|
|
1297
|
-
},] }
|
|
1298
|
-
];
|
|
1299
|
-
|
|
1300
|
-
class AppSidebarNavBadgePipe {
|
|
1301
|
-
transform(item, args) {
|
|
1302
|
-
const classes = {
|
|
1303
|
-
badge: true
|
|
1304
|
-
};
|
|
1305
|
-
const variant = `badge-${item.badge.variant}`;
|
|
1306
|
-
classes[variant] = !!item.badge.variant;
|
|
1307
|
-
classes[item.badge.class] = !!item.badge.class;
|
|
1308
|
-
return classes;
|
|
1309
|
-
}
|
|
1310
|
-
}
|
|
1311
|
-
AppSidebarNavBadgePipe.decorators = [
|
|
1312
|
-
{ type: Pipe, args: [{
|
|
1313
|
-
name: 'appSidebarNavBadge'
|
|
1314
|
-
},] }
|
|
1315
|
-
];
|
|
1316
|
-
|
|
1317
|
-
class AppSidebarNavLinkPipe {
|
|
1318
|
-
transform(item) {
|
|
1319
|
-
const classes = { 'nav-link': true };
|
|
1320
|
-
const disabled = item.attributes && item.attributes.disabled;
|
|
1321
|
-
classes['disabled'] = disabled;
|
|
1322
|
-
classes['btn-link'] = disabled;
|
|
1323
|
-
classes[`nav-link-${item.variant}`] = !!item.variant;
|
|
1324
|
-
return classes;
|
|
1325
|
-
}
|
|
1326
|
-
}
|
|
1327
|
-
AppSidebarNavLinkPipe.decorators = [
|
|
1328
|
-
{ type: Pipe, args: [{
|
|
1329
|
-
name: 'appSidebarNavLink'
|
|
1330
|
-
},] }
|
|
1331
|
-
];
|
|
1332
|
-
|
|
1333
|
-
class AppSidebarNavItemClassPipe {
|
|
1334
|
-
constructor(helper) {
|
|
1335
|
-
this.helper = helper;
|
|
1336
|
-
}
|
|
1337
|
-
transform(item, ...args) {
|
|
1338
|
-
const itemType = this.helper.itemType(item);
|
|
1339
|
-
let itemClass;
|
|
1340
|
-
if (['divider', 'title'].includes(itemType)) {
|
|
1341
|
-
itemClass = `nav-${itemType}`;
|
|
1342
|
-
}
|
|
1343
|
-
else if (itemType === 'dropdown') {
|
|
1344
|
-
itemClass = 'nav-item nav-dropdown';
|
|
1345
|
-
}
|
|
1346
|
-
else {
|
|
1347
|
-
itemClass = 'nav-item';
|
|
1348
|
-
}
|
|
1349
|
-
return item.class ? `${itemClass} ${item.class}` : itemClass;
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
AppSidebarNavItemClassPipe.decorators = [
|
|
1353
|
-
{ type: Pipe, args: [{
|
|
1354
|
-
name: 'appSidebarNavItemClass'
|
|
1355
|
-
},] }
|
|
1356
|
-
];
|
|
1357
|
-
AppSidebarNavItemClassPipe.ctorParameters = () => [
|
|
1358
|
-
{ type: SidebarNavHelper }
|
|
1359
|
-
];
|
|
1360
|
-
|
|
1361
|
-
class AppSidebarModule {
|
|
1362
|
-
}
|
|
1363
|
-
AppSidebarModule.decorators = [
|
|
1364
|
-
{ type: NgModule, args: [{
|
|
1365
|
-
imports: [
|
|
1366
|
-
CommonModule,
|
|
1367
|
-
RouterModule,
|
|
1368
|
-
LayoutModule
|
|
1369
|
-
],
|
|
1370
|
-
exports: [
|
|
1371
|
-
AppSidebarFooterComponent,
|
|
1372
|
-
AppSidebarFormComponent,
|
|
1373
|
-
AppSidebarHeaderComponent,
|
|
1374
|
-
AppSidebarMinimizerComponent,
|
|
1375
|
-
AppSidebarComponent,
|
|
1376
|
-
AppSidebarNavItemsComponent,
|
|
1377
|
-
AppSidebarNavComponent,
|
|
1378
|
-
AppSidebarNavDividerComponent,
|
|
1379
|
-
AppSidebarNavDropdownComponent,
|
|
1380
|
-
AppSidebarNavLabelComponent,
|
|
1381
|
-
AppSidebarNavLinkComponent,
|
|
1382
|
-
AppSidebarNavLinkContentComponent,
|
|
1383
|
-
AppSidebarNavTitleComponent,
|
|
1384
|
-
NavDropdownDirective,
|
|
1385
|
-
NavDropdownToggleDirective,
|
|
1386
|
-
LayoutModule
|
|
1387
|
-
],
|
|
1388
|
-
declarations: [
|
|
1389
|
-
AppSidebarFooterComponent,
|
|
1390
|
-
AppSidebarFormComponent,
|
|
1391
|
-
AppSidebarHeaderComponent,
|
|
1392
|
-
AppSidebarMinimizerComponent,
|
|
1393
|
-
AppSidebarMinimizerComponent,
|
|
1394
|
-
AppSidebarComponent,
|
|
1395
|
-
AppSidebarNavItemsComponent,
|
|
1396
|
-
AppSidebarNavComponent,
|
|
1397
|
-
AppSidebarNavDividerComponent,
|
|
1398
|
-
AppSidebarNavDropdownComponent,
|
|
1399
|
-
AppSidebarNavLinkComponent,
|
|
1400
|
-
AppSidebarNavLinkContentComponent,
|
|
1401
|
-
AppSidebarNavTitleComponent,
|
|
1402
|
-
NavDropdownDirective,
|
|
1403
|
-
NavDropdownToggleDirective,
|
|
1404
|
-
AppSidebarNavLabelComponent,
|
|
1405
|
-
AppSidebarNavIconPipe,
|
|
1406
|
-
AppSidebarNavBadgePipe,
|
|
1407
|
-
AppSidebarNavLinkPipe,
|
|
1408
|
-
AppSidebarNavItemClassPipe
|
|
1409
|
-
],
|
|
1410
|
-
providers: [
|
|
1411
|
-
SidebarNavHelper,
|
|
1412
|
-
AppSidebarService
|
|
1413
|
-
]
|
|
1414
|
-
},] }
|
|
1415
|
-
];
|
|
1416
|
-
|
|
1417
|
-
/*
|
|
1418
|
-
* Public API Surface of @coreui/angular
|
|
1419
|
-
*/
|
|
1420
|
-
// export * from './lib/shared/index';
|
|
1421
|
-
// export * from './lib/coreui.module';
|
|
1422
|
-
|
|
1423
|
-
/**
|
|
1424
|
-
* Generated bundle index. Do not edit.
|
|
1425
|
-
*/
|
|
1426
|
-
|
|
1427
|
-
export { AppAsideComponent, AppAsideModule, AppBreadcrumbComponent, AppBreadcrumbModule, AppFooterComponent, AppFooterModule, AppHeaderComponent, AppHeaderModule, AppSidebarComponent, AppSidebarMinimizerComponent, AppSidebarModule, AppSidebarNavComponent, CuiBreadcrumbComponent, SidebarNavHelper, LayoutModule as ɵa, SidebarToggleDirective as ɵb, AppSidebarNavItemClassPipe as ɵba, SidebarMinimizeDirective as ɵc, MobileSidebarToggleDirective as ɵd, SidebarOffCanvasCloseDirective as ɵe, BrandMinimizeDirective as ɵf, AsideToggleDirective as ɵg, HtmlAttributesDirective as ɵh, ClassToggler as ɵi, AppBreadcrumbService as ɵj, AppSidebarService as ɵk, AppSidebarFooterComponent as ɵl, AppSidebarFormComponent as ɵm, AppSidebarHeaderComponent as ɵn, AppSidebarNavItemsComponent as ɵo, AppSidebarNavDividerComponent as ɵp, AppSidebarNavDropdownComponent as ɵq, AppSidebarNavLabelComponent as ɵr, AppSidebarNavLinkContentComponent as ɵs, AppSidebarNavLinkComponent as ɵt, AppSidebarNavTitleComponent as ɵu, NavDropdownDirective as ɵv, NavDropdownToggleDirective as ɵw, AppSidebarNavIconPipe as ɵx, AppSidebarNavBadgePipe as ɵy, AppSidebarNavLinkPipe as ɵz };
|
|
1428
|
-
//# sourceMappingURL=coreui-angular.js.map
|