@juice-js/layout 1.0.0-alpha.2
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 +24 -0
- package/esm2022/juice-js-layout.mjs +5 -0
- package/esm2022/lib/components/dark-mode/dark-mode.component.mjs +53 -0
- package/esm2022/lib/components/expandable-menu/expandable-menu.component.mjs +27 -0
- package/esm2022/lib/components/nav-menu/nav-menu.component.mjs +66 -0
- package/esm2022/lib/components/search-bar/search-bar.component.mjs +48 -0
- package/esm2022/lib/components/tooltip/tooltip.component.mjs +48 -0
- package/esm2022/lib/components/tooltip/tooltip.directive.mjs +84 -0
- package/esm2022/lib/components/tooltip/tooltip.module.mjs +31 -0
- package/esm2022/lib/components/user-profile/profile-dialog.service.mjs +4 -0
- package/esm2022/lib/components/user-profile/user-profile.component.mjs +45 -0
- package/esm2022/lib/dev.guard.mjs +25 -0
- package/esm2022/lib/layout.config.mjs +22 -0
- package/esm2022/lib/layout.module.mjs +111 -0
- package/esm2022/lib/layout.service.mjs +75 -0
- package/esm2022/lib/page/page.component.mjs +118 -0
- package/esm2022/lib/pages/page-notfound/page-notfound.component.mjs +12 -0
- package/esm2022/lib/services/search.service.mjs +37 -0
- package/esm2022/public-api.mjs +15 -0
- package/fesm2022/juice-js-layout.mjs +732 -0
- package/fesm2022/juice-js-layout.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/components/dark-mode/dark-mode.component.d.ts +17 -0
- package/lib/components/expandable-menu/expandable-menu.component.d.ts +13 -0
- package/lib/components/nav-menu/nav-menu.component.d.ts +24 -0
- package/lib/components/search-bar/search-bar.component.d.ts +11 -0
- package/lib/components/tooltip/tooltip.component.d.ts +15 -0
- package/lib/components/tooltip/tooltip.directive.d.ts +28 -0
- package/lib/components/tooltip/tooltip.module.d.ts +9 -0
- package/lib/components/user-profile/profile-dialog.service.d.ts +3 -0
- package/lib/components/user-profile/user-profile.component.d.ts +15 -0
- package/lib/dev.guard.d.ts +8 -0
- package/lib/layout.config.d.ts +28 -0
- package/lib/layout.module.d.ts +29 -0
- package/lib/layout.service.d.ts +22 -0
- package/lib/page/page.component.d.ts +16 -0
- package/lib/pages/page-notfound/page-notfound.component.d.ts +5 -0
- package/lib/services/search.service.d.ts +12 -0
- package/package.json +45 -0
- package/public-api.d.ts +11 -0
- package/styles/_theming.scss +94 -0
|
@@ -0,0 +1,732 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Injectable, Optional, Component, booleanAttribute, Directive, Input, HostListener, NgModule, inject } from '@angular/core';
|
|
3
|
+
import * as i1 from '@juice-js/core';
|
|
4
|
+
import { AsyncDialog } from '@juice-js/core';
|
|
5
|
+
import * as i4$2 from '@angular/cdk/layout';
|
|
6
|
+
import { Breakpoints } from '@angular/cdk/layout';
|
|
7
|
+
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
8
|
+
import * as i1$1 from '@angular/router';
|
|
9
|
+
import { NavigationStart, RouterModule } from '@angular/router';
|
|
10
|
+
import * as i2$1 from '@angular/common';
|
|
11
|
+
import { CommonModule } from '@angular/common';
|
|
12
|
+
import * as i2 from '@angular/material/icon';
|
|
13
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
14
|
+
import * as i6 from '@angular/material/toolbar';
|
|
15
|
+
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
16
|
+
import * as i7$1 from '@angular/material/sidenav';
|
|
17
|
+
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
18
|
+
import * as i3 from '@angular/material/button';
|
|
19
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
20
|
+
import * as i4 from '@angular/material/tooltip';
|
|
21
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
22
|
+
import * as i5 from '@ngx-translate/core';
|
|
23
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
24
|
+
import * as i7 from '@angular/material/list';
|
|
25
|
+
import { MatListModule } from '@angular/material/list';
|
|
26
|
+
import * as i8 from '@angular/material/divider';
|
|
27
|
+
import * as i4$1 from '@angular/material/expansion';
|
|
28
|
+
import { MatExpansionModule } from '@angular/material/expansion';
|
|
29
|
+
import * as i3$1 from '@angular/forms';
|
|
30
|
+
import { FormsModule } from '@angular/forms';
|
|
31
|
+
import * as i3$2 from 'angular-oauth2-oidc';
|
|
32
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
33
|
+
import { MatInputModule } from '@angular/material/input';
|
|
34
|
+
|
|
35
|
+
var ThemeMode;
|
|
36
|
+
(function (ThemeMode) {
|
|
37
|
+
ThemeMode["Light"] = "light";
|
|
38
|
+
ThemeMode["Dark"] = "dark";
|
|
39
|
+
ThemeMode["Auto"] = "auto";
|
|
40
|
+
})(ThemeMode || (ThemeMode = {}));
|
|
41
|
+
class LayoutConfig {
|
|
42
|
+
constructor(options) {
|
|
43
|
+
this.favicon = "favicon.ico";
|
|
44
|
+
this.brand = "Juice";
|
|
45
|
+
this.brandLogo = "assets/images/logo.png";
|
|
46
|
+
this.defaultThemeMode = ThemeMode.Auto;
|
|
47
|
+
this.defaultLanguage = "en-US";
|
|
48
|
+
this.defaultMenuOpen = false;
|
|
49
|
+
if (options) {
|
|
50
|
+
Object.assign(this, options);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const IS_PRODUCTION = new InjectionToken('production');
|
|
55
|
+
|
|
56
|
+
class LayoutService {
|
|
57
|
+
static { this.DARK_MODE = "IS_DARK_MODE"; }
|
|
58
|
+
static { this.MENU_OPEN = "IS_MENU_OPEN"; }
|
|
59
|
+
constructor(options, tenantService) {
|
|
60
|
+
this.tenantIdentifier = "";
|
|
61
|
+
this._tenant = null;
|
|
62
|
+
tenantService?.getTenantInfo().then(tenantInfo => {
|
|
63
|
+
this.tenantIdentifier = tenantInfo?.identifier ?? "";
|
|
64
|
+
this._tenant = tenantInfo;
|
|
65
|
+
});
|
|
66
|
+
this._options = options ?? new LayoutConfig();
|
|
67
|
+
}
|
|
68
|
+
getThemeMode() {
|
|
69
|
+
let mode = localStorage.getItem(LayoutService.DARK_MODE);
|
|
70
|
+
if (mode) {
|
|
71
|
+
return JSON.parse(mode);
|
|
72
|
+
}
|
|
73
|
+
return this._options.defaultThemeMode;
|
|
74
|
+
}
|
|
75
|
+
toggleDarkMode() {
|
|
76
|
+
var state = this.getThemeMode();
|
|
77
|
+
if (state == ThemeMode.Auto) {
|
|
78
|
+
state = ThemeMode.Light;
|
|
79
|
+
}
|
|
80
|
+
else if (state == ThemeMode.Light) {
|
|
81
|
+
state = ThemeMode.Dark;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
state = ThemeMode.Auto;
|
|
85
|
+
}
|
|
86
|
+
localStorage.setItem(LayoutService.DARK_MODE, JSON.stringify(state));
|
|
87
|
+
}
|
|
88
|
+
isMenuOpen() {
|
|
89
|
+
let isMenuOpen = localStorage.getItem(LayoutService.MENU_OPEN);
|
|
90
|
+
if (isMenuOpen) {
|
|
91
|
+
return JSON.parse(isMenuOpen);
|
|
92
|
+
}
|
|
93
|
+
return this._options.defaultMenuOpen;
|
|
94
|
+
}
|
|
95
|
+
toggleMenu() {
|
|
96
|
+
let state = !this.isMenuOpen();
|
|
97
|
+
localStorage.setItem(LayoutService.MENU_OPEN, JSON.stringify(state));
|
|
98
|
+
}
|
|
99
|
+
favicon() {
|
|
100
|
+
return this._tenant?.favicon ?? this._options.favicon;
|
|
101
|
+
}
|
|
102
|
+
brandName() {
|
|
103
|
+
return this._tenant?.name ?? this._options.brand;
|
|
104
|
+
}
|
|
105
|
+
brandLogo() {
|
|
106
|
+
return this._tenant?.logo ?? this._options.brandLogo;
|
|
107
|
+
}
|
|
108
|
+
settingUrl() {
|
|
109
|
+
return this._options.settingUrl;
|
|
110
|
+
}
|
|
111
|
+
userImageUrl(username) {
|
|
112
|
+
return this._options.userImageUrl ? this._options.userImageUrl.replace("{username}", username) : "";
|
|
113
|
+
}
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutService, deps: [{ token: LayoutConfig, optional: true }, { token: i1.TenantService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
115
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutService, providedIn: 'root' }); }
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutService, decorators: [{
|
|
118
|
+
type: Injectable,
|
|
119
|
+
args: [{
|
|
120
|
+
providedIn: 'root'
|
|
121
|
+
}]
|
|
122
|
+
}], ctorParameters: function () { return [{ type: LayoutConfig, decorators: [{
|
|
123
|
+
type: Optional
|
|
124
|
+
}] }, { type: i1.TenantService }]; } });
|
|
125
|
+
|
|
126
|
+
class DarkModeComponent {
|
|
127
|
+
constructor(service) {
|
|
128
|
+
this.service = service;
|
|
129
|
+
this.ThemeMode = ThemeMode;
|
|
130
|
+
this.prefersDark = window.matchMedia("(prefers-color-scheme: dark)");
|
|
131
|
+
this.icons = new Map([
|
|
132
|
+
[ThemeMode.Light, "light_mode"],
|
|
133
|
+
[ThemeMode.Dark, "dark_mode"],
|
|
134
|
+
[ThemeMode.Auto, "adjust"]
|
|
135
|
+
]);
|
|
136
|
+
this.names = new Map([
|
|
137
|
+
[ThemeMode.Light, "Light"],
|
|
138
|
+
[ThemeMode.Dark, "Dark"],
|
|
139
|
+
[ThemeMode.Auto, "Adaptive"]
|
|
140
|
+
]);
|
|
141
|
+
this.name = "";
|
|
142
|
+
this.icon = "light_mode";
|
|
143
|
+
this.prefersDark.addEventListener("change", e => {
|
|
144
|
+
this.initTheme(e.matches);
|
|
145
|
+
});
|
|
146
|
+
this.initTheme(this.prefersDark.matches);
|
|
147
|
+
}
|
|
148
|
+
toggleDarkMode() {
|
|
149
|
+
this.service.toggleDarkMode();
|
|
150
|
+
this.initTheme(this.prefersDark.matches);
|
|
151
|
+
}
|
|
152
|
+
initTheme(prefersDark = false) {
|
|
153
|
+
var mode = this.service.getThemeMode();
|
|
154
|
+
var scheme = mode == ThemeMode.Auto ? prefersDark ? ThemeMode.Dark : ThemeMode.Light
|
|
155
|
+
: mode;
|
|
156
|
+
document.body.classList.remove("dark");
|
|
157
|
+
if (scheme == ThemeMode.Dark) {
|
|
158
|
+
document.body.classList.add(scheme);
|
|
159
|
+
}
|
|
160
|
+
this.icon = this.icons.get(mode) ?? "";
|
|
161
|
+
this.name = this.names.get(mode) ?? "";
|
|
162
|
+
}
|
|
163
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DarkModeComponent, deps: [{ token: LayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
164
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DarkModeComponent, selector: "juice-dark-mode", ngImport: i0, template: "<button mat-icon-button (click)=\"toggleDarkMode()\" matTooltip=\"{{ name | translate }}\" matTooltipPosition=\"left\"><mat-icon>{{icon}}</mat-icon></button>", dependencies: [{ kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] }); }
|
|
165
|
+
}
|
|
166
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DarkModeComponent, decorators: [{
|
|
167
|
+
type: Component,
|
|
168
|
+
args: [{ selector: 'juice-dark-mode', template: "<button mat-icon-button (click)=\"toggleDarkMode()\" matTooltip=\"{{ name | translate }}\" matTooltipPosition=\"left\"><mat-icon>{{icon}}</mat-icon></button>" }]
|
|
169
|
+
}], ctorParameters: function () { return [{ type: LayoutService }]; } });
|
|
170
|
+
|
|
171
|
+
class TooltipComponent {
|
|
172
|
+
constructor(elementRef) {
|
|
173
|
+
this.elementRef = elementRef;
|
|
174
|
+
this.tooltip = '';
|
|
175
|
+
this.position = TooltipPosition.DEFAULT;
|
|
176
|
+
this.left = 0;
|
|
177
|
+
this.top = 0;
|
|
178
|
+
this.display = true;
|
|
179
|
+
}
|
|
180
|
+
calculatePosition(left, right, top, bottom) {
|
|
181
|
+
switch (this.position) {
|
|
182
|
+
case TooltipPosition.BELOW: {
|
|
183
|
+
this.left = Math.round((right - left) / 2 + left);
|
|
184
|
+
this.top = Math.round(bottom);
|
|
185
|
+
break;
|
|
186
|
+
}
|
|
187
|
+
case TooltipPosition.ABOVE: {
|
|
188
|
+
this.left = Math.round((right - left) / 2 + left);
|
|
189
|
+
this.top = Math.round(top);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
case TooltipPosition.RIGHT: {
|
|
193
|
+
this.left = Math.round(right);
|
|
194
|
+
this.top = Math.round(top + (bottom - top) / 2);
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
case TooltipPosition.LEFT: {
|
|
198
|
+
this.left = Math.round(left);
|
|
199
|
+
this.top = Math.round(top + (bottom - top) / 2);
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
default: {
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
208
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TooltipComponent, selector: "tooltip", ngImport: i0, template: "<div #tooltipId *ngIf=\"display\" class=\"tooltip\" [ngClass]=\"['tooltip--'+position]\"\n [style.left]=\"left + 'px'\" [style.top]=\"top + 'px'\">\n {{tooltip}}\n</div>", styles: [".tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;font-family:Arial;padding:3px 6px;font-size:13px;z-index:9999}.tooltip:before{content:\"\";width:0;height:0;position:absolute}.tooltip--visible{opacity:1;transition:opacity .3s}.tooltip--light{background-color:#fff;color:#000}.tooltip--light:before{border:5px solid white}.tooltip--dark{background-color:#000;color:#fff}.tooltip--dark:before{border:5px solid black}.tooltip--below{transform:translate(-50%);margin-top:7px}.tooltip--below:before{border-left-color:transparent;border-right-color:transparent;border-top:none;left:calc(50% - 5px);top:-5px}.tooltip--above{transform:translate(-50%,-100%);margin-bottom:7px}.tooltip--above:before{border-left-color:transparent;border-right-color:transparent;border-bottom:none;left:calc(50% - 5px);bottom:-5px}.tooltip--left{transform:translate(calc(-100% - 7px),-50%)}.tooltip--left:before{border-top-color:transparent;border-bottom-color:transparent;border-right:none;right:-5px;top:calc(50% - 5px)}.tooltip--right{transform:translateY(-50%);margin-left:7px}.tooltip--right:before{border-top-color:transparent;border-bottom-color:transparent;border-left:none;left:-5px;top:calc(50% - 5px)}.tooltip--dynamic{margin-left:20px}.tooltip--dynamic:before{display:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
209
|
+
}
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
211
|
+
type: Component,
|
|
212
|
+
args: [{ selector: 'tooltip', template: "<div #tooltipId *ngIf=\"display\" class=\"tooltip\" [ngClass]=\"['tooltip--'+position]\"\n [style.left]=\"left + 'px'\" [style.top]=\"top + 'px'\">\n {{tooltip}}\n</div>", styles: [".tooltip{position:fixed;background-color:#000;border-radius:4px;color:#fff;font-family:Arial;padding:3px 6px;font-size:13px;z-index:9999}.tooltip:before{content:\"\";width:0;height:0;position:absolute}.tooltip--visible{opacity:1;transition:opacity .3s}.tooltip--light{background-color:#fff;color:#000}.tooltip--light:before{border:5px solid white}.tooltip--dark{background-color:#000;color:#fff}.tooltip--dark:before{border:5px solid black}.tooltip--below{transform:translate(-50%);margin-top:7px}.tooltip--below:before{border-left-color:transparent;border-right-color:transparent;border-top:none;left:calc(50% - 5px);top:-5px}.tooltip--above{transform:translate(-50%,-100%);margin-bottom:7px}.tooltip--above:before{border-left-color:transparent;border-right-color:transparent;border-bottom:none;left:calc(50% - 5px);bottom:-5px}.tooltip--left{transform:translate(calc(-100% - 7px),-50%)}.tooltip--left:before{border-top-color:transparent;border-bottom-color:transparent;border-right:none;right:-5px;top:calc(50% - 5px)}.tooltip--right{transform:translateY(-50%);margin-left:7px}.tooltip--right:before{border-top-color:transparent;border-bottom-color:transparent;border-left:none;left:-5px;top:calc(50% - 5px)}.tooltip--dynamic{margin-left:20px}.tooltip--dynamic:before{display:none}\n"] }]
|
|
213
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
|
214
|
+
|
|
215
|
+
var TooltipPosition;
|
|
216
|
+
(function (TooltipPosition) {
|
|
217
|
+
TooltipPosition["ABOVE"] = "above";
|
|
218
|
+
TooltipPosition["BELOW"] = "below";
|
|
219
|
+
TooltipPosition["LEFT"] = "left";
|
|
220
|
+
TooltipPosition["RIGHT"] = "right";
|
|
221
|
+
TooltipPosition["DEFAULT"] = "above";
|
|
222
|
+
})(TooltipPosition || (TooltipPosition = {}));
|
|
223
|
+
function tooltipPosition(position) {
|
|
224
|
+
switch (position) {
|
|
225
|
+
case TooltipPosition.ABOVE: return TooltipPosition.ABOVE;
|
|
226
|
+
case TooltipPosition.BELOW: return TooltipPosition.BELOW;
|
|
227
|
+
case TooltipPosition.LEFT: return TooltipPosition.LEFT;
|
|
228
|
+
case TooltipPosition.RIGHT: return TooltipPosition.RIGHT;
|
|
229
|
+
default: return TooltipPosition.DEFAULT;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
class TooltipDirective {
|
|
233
|
+
constructor(elementRef, viewContainerRef) {
|
|
234
|
+
this.elementRef = elementRef;
|
|
235
|
+
this.viewContainerRef = viewContainerRef;
|
|
236
|
+
this.tooltip = '';
|
|
237
|
+
this.tooltipPosition = TooltipPosition.DEFAULT;
|
|
238
|
+
}
|
|
239
|
+
onMouseEnter() {
|
|
240
|
+
if (!this.componentRef) {
|
|
241
|
+
this.componentRef = this.viewContainerRef.createComponent(TooltipComponent);
|
|
242
|
+
const domElem = this.componentRef.hostView
|
|
243
|
+
.rootNodes[0];
|
|
244
|
+
document.body.appendChild(domElem);
|
|
245
|
+
this.setTooltipComponentProperties();
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
getPosition() {
|
|
249
|
+
return this.tooltipPosition;
|
|
250
|
+
}
|
|
251
|
+
setTooltipComponentProperties() {
|
|
252
|
+
if (this.componentRef) {
|
|
253
|
+
this.componentRef.instance.tooltip = this.tooltip;
|
|
254
|
+
this.componentRef.instance.position = this.getPosition();
|
|
255
|
+
this.componentRef.instance.display = this.tooltipDisplay;
|
|
256
|
+
const { left, right, top, bottom } = this.elementRef.nativeElement.getBoundingClientRect();
|
|
257
|
+
this.componentRef.instance.calculatePosition(left, right, top, bottom);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
onMouseLeave() {
|
|
261
|
+
this.destroy();
|
|
262
|
+
}
|
|
263
|
+
ngOnDestroy() {
|
|
264
|
+
this.destroy();
|
|
265
|
+
}
|
|
266
|
+
destroy() {
|
|
267
|
+
if (this.componentRef) {
|
|
268
|
+
this.componentRef.destroy();
|
|
269
|
+
this.componentRef = undefined;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipDirective, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
273
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "16.2.12", type: TooltipDirective, selector: "[tooltip]", inputs: { tooltip: "tooltip", tooltipPosition: ["tooltipPosition", "tooltipPosition", tooltipPosition], tooltipDisplay: ["tooltipDisplay", "tooltipDisplay", booleanAttribute] }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()" } }, ngImport: i0 }); }
|
|
274
|
+
}
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipDirective, decorators: [{
|
|
276
|
+
type: Directive,
|
|
277
|
+
args: [{
|
|
278
|
+
selector: '[tooltip]'
|
|
279
|
+
}]
|
|
280
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }]; }, propDecorators: { tooltip: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}], tooltipPosition: [{
|
|
283
|
+
type: Input,
|
|
284
|
+
args: [{ transform: tooltipPosition }]
|
|
285
|
+
}], tooltipDisplay: [{
|
|
286
|
+
type: Input,
|
|
287
|
+
args: [{ transform: booleanAttribute }]
|
|
288
|
+
}], onMouseEnter: [{
|
|
289
|
+
type: HostListener,
|
|
290
|
+
args: ['mouseenter']
|
|
291
|
+
}], onMouseLeave: [{
|
|
292
|
+
type: HostListener,
|
|
293
|
+
args: ['mouseleave']
|
|
294
|
+
}] } });
|
|
295
|
+
|
|
296
|
+
class ExpandableMenuComponent {
|
|
297
|
+
constructor(router) {
|
|
298
|
+
this.router = router;
|
|
299
|
+
this.isExpanded = false;
|
|
300
|
+
this.item = {};
|
|
301
|
+
this.TooltipPosition = TooltipPosition;
|
|
302
|
+
}
|
|
303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandableMenuComponent, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ExpandableMenuComponent, selector: "juice-expandable-menu", inputs: { isExpanded: "isExpanded", item: "item" }, ngImport: i0, template: "<mat-expansion-panel [expanded]=\"router.isActive(item.routerLink, false)\" [hideToggle]=\"!isExpanded\" [ngClass]=\"router.isActive(item.routerLink, false)?'active':''\">\n <mat-expansion-panel-header >\n <mat-list-item routerLink=\"{{ item.routerLink }}\" [routerLinkActive]=\"['active']\" \n [routerLinkActiveOptions]=\"{exact: true}\">\n <mat-icon matListItemIcon>{{ item.icon }}</mat-icon>\n <span matListItemTitle *ngIf=\"isExpanded\" style=\"margin-left: 4px;\"> {{ item.label }}</span>\n </mat-list-item>\n </mat-expansion-panel-header>\n <mat-nav-list>\n <mat-list-item routerLink=\"{{ subitem.routerLink }}\" [routerLinkActive]=\"['active']\"\n [routerLinkActiveOptions]=\"{exact: true}\" *ngFor=\" let subitem of item.children \">\n <mat-icon matListItemIcon>{{ subitem.icon }}</mat-icon>\n <span matListItemTitle *ngIf=\"isExpanded\" style=\"margin-left: 4px;\"> {{ subitem.label }}</span>\n </mat-list-item>\n </mat-nav-list>\n</mat-expansion-panel>\n", styles: [":host ::ng-deep .mat-expansion-panel-header{padding:0}:host ::ng-deep .mat-expansion-panel-header .mdc-list-item{padding:0}:host ::ng-deep .mat-expansion-panel-header .mat-expansion-indicator{position:absolute;right:0;padding:16px}:host ::ng-deep .mat-expansion-panel-body{padding:0}:host ::ng-deep .mat-content.mat-content-hide-toggle{margin-right:0}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatExpansionPanel, selector: "mat-expansion-panel", inputs: ["disabled", "expanded", "hideToggle", "togglePosition"], outputs: ["opened", "closed", "expandedChange", "afterExpand", "afterCollapse"], exportAs: ["matExpansionPanel"] }, { kind: "component", type: i4$1.MatExpansionPanelHeader, selector: "mat-expansion-panel-header", inputs: ["tabIndex", "expandedHeight", "collapsedHeight"] }, { kind: "component", type: i7.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i7.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i7.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "directive", type: i7.MatListItemTitle, selector: "[matListItemTitle]" }] }); }
|
|
305
|
+
}
|
|
306
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ExpandableMenuComponent, decorators: [{
|
|
307
|
+
type: Component,
|
|
308
|
+
args: [{ selector: 'juice-expandable-menu', template: "<mat-expansion-panel [expanded]=\"router.isActive(item.routerLink, false)\" [hideToggle]=\"!isExpanded\" [ngClass]=\"router.isActive(item.routerLink, false)?'active':''\">\n <mat-expansion-panel-header >\n <mat-list-item routerLink=\"{{ item.routerLink }}\" [routerLinkActive]=\"['active']\" \n [routerLinkActiveOptions]=\"{exact: true}\">\n <mat-icon matListItemIcon>{{ item.icon }}</mat-icon>\n <span matListItemTitle *ngIf=\"isExpanded\" style=\"margin-left: 4px;\"> {{ item.label }}</span>\n </mat-list-item>\n </mat-expansion-panel-header>\n <mat-nav-list>\n <mat-list-item routerLink=\"{{ subitem.routerLink }}\" [routerLinkActive]=\"['active']\"\n [routerLinkActiveOptions]=\"{exact: true}\" *ngFor=\" let subitem of item.children \">\n <mat-icon matListItemIcon>{{ subitem.icon }}</mat-icon>\n <span matListItemTitle *ngIf=\"isExpanded\" style=\"margin-left: 4px;\"> {{ subitem.label }}</span>\n </mat-list-item>\n </mat-nav-list>\n</mat-expansion-panel>\n", styles: [":host ::ng-deep .mat-expansion-panel-header{padding:0}:host ::ng-deep .mat-expansion-panel-header .mdc-list-item{padding:0}:host ::ng-deep .mat-expansion-panel-header .mat-expansion-indicator{position:absolute;right:0;padding:16px}:host ::ng-deep .mat-expansion-panel-body{padding:0}:host ::ng-deep .mat-content.mat-content-hide-toggle{margin-right:0}\n"] }]
|
|
309
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; }, propDecorators: { isExpanded: [{
|
|
310
|
+
type: Input
|
|
311
|
+
}], item: [{
|
|
312
|
+
type: Input
|
|
313
|
+
}] } });
|
|
314
|
+
|
|
315
|
+
class NavMenuComponent {
|
|
316
|
+
constructor(service, layout, tenantService, route, breakpointObserver) {
|
|
317
|
+
this.service = service;
|
|
318
|
+
this.layout = layout;
|
|
319
|
+
this.tenantService = tenantService;
|
|
320
|
+
this.route = route;
|
|
321
|
+
this.breakpointObserver = breakpointObserver;
|
|
322
|
+
this.isExpanded = false;
|
|
323
|
+
this.isMobile = false;
|
|
324
|
+
this.items = [];
|
|
325
|
+
this.TooltipPosition = TooltipPosition;
|
|
326
|
+
if (route.snapshot.data['settingUrl']) {
|
|
327
|
+
this.settingUrl = route.snapshot.data['settingUrl'];
|
|
328
|
+
}
|
|
329
|
+
else {
|
|
330
|
+
this.settingUrl = layout.settingUrl();
|
|
331
|
+
}
|
|
332
|
+
tenantService.getTenantIdentifier().then(tenant => { this.settingUrl = this.settingUrl?.injectTenant(tenant); });
|
|
333
|
+
breakpointObserver.observe([
|
|
334
|
+
Breakpoints.HandsetLandscape,
|
|
335
|
+
Breakpoints.HandsetPortrait
|
|
336
|
+
]).subscribe(result => {
|
|
337
|
+
this.isMobile = result.matches;
|
|
338
|
+
this.isExpanded = result.matches ? true : this.layout.isMenuOpen();
|
|
339
|
+
});
|
|
340
|
+
this.service.getMenu().subscribe(items => {
|
|
341
|
+
this.items = items;
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
toggle() {
|
|
345
|
+
this.layout.toggleMenu();
|
|
346
|
+
this.isExpanded = this.layout.isMenuOpen();
|
|
347
|
+
}
|
|
348
|
+
mouseEnter() {
|
|
349
|
+
if (!this.isMobile) {
|
|
350
|
+
this.isExpanded = true;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
mouseLeave() {
|
|
354
|
+
if (!this.isMobile) {
|
|
355
|
+
this.isExpanded = this.layout.isMenuOpen();
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavMenuComponent, deps: [{ token: i1.MenuService }, { token: LayoutService }, { token: i1.TenantService }, { token: i1$1.ActivatedRoute }, { token: i4$2.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
359
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: NavMenuComponent, selector: "juice-nav-menu", ngImport: i0, template: "<mat-nav-list class=\"menu-scroll\" (mouseenter)=\"mouseEnter()\" (mouseleave)=\"mouseLeave()\">\n <ng-container *ngFor=\"let item of items\">\n <mat-list-item *ngIf=\"!item.children || item.children.length==0\" \n routerLink=\"{{ item.routerLink }}\" [routerLinkActive]=\"['active']\" \n [routerLinkActiveOptions]=\"{exact:true}\">\n <mat-icon matListItemIcon color=\"accent\">{{ item.icon }}</mat-icon>\n <span matListItemTitle style=\"margin-left: 4px;\"> {{ item.label }}</span>\n </mat-list-item>\n <juice-expandable-menu *ngIf=\"item.children && item.children.length>0\" \n [item]=\"item\" [isExpanded]=\"isExpanded\"></juice-expandable-menu>\n </ng-container>\n</mat-nav-list>\n<mat-divider></mat-divider>\n<mat-action-list class=\"list-horizontal bottom-menu\">\n <a mat-list-item *ngIf=\"settingUrl\" [href]=\"settingUrl\"\n matTooltip=\"{{'Settings' | translate}}\" matTooltipPosition=\"right\" [matTooltipDisabled]=\"isExpanded\">\n <mat-icon>settings</mat-icon>\n </a>\n <button mat-list-item (click)=\"toggle()\" *ngIf=\"!isMobile\">\n <mat-icon [style.transform]= \"isExpanded ? 'rotate(-180deg)':'rotate(0)'\">double_arrow</mat-icon>\n </button>\n</mat-action-list>", styles: [":host ::ng-deep{display:flex;flex-direction:column;justify-content:space-between;height:100%}:host ::ng-deep .menu-scroll{overflow-y:auto;overflow-x:hidden;flex:1}:host ::ng-deep .menu-scroll .mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{margin-right:10px}:host ::ng-deep .list-horizontal{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end}:host ::ng-deep .list-horizontal .mat-mdc-list-item{width:auto;flex:1 auto}:host ::ng-deep .list-horizontal .mat-mdc-list-item .mdc-list-item__content{display:flex;justify-content:center}:host ::ng-deep .list-horizontal .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-unscoped-content{padding-top:5px}:host ::ng-deep .mat-mdc-list-base{padding:0}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i7.MatActionList, selector: "mat-action-list", exportAs: ["matActionList"] }, { kind: "component", type: i7.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i7.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i7.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "component", type: i8.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: ExpandableMenuComponent, selector: "juice-expandable-menu", inputs: ["isExpanded", "item"] }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] }); }
|
|
360
|
+
}
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NavMenuComponent, decorators: [{
|
|
362
|
+
type: Component,
|
|
363
|
+
args: [{ selector: 'juice-nav-menu', template: "<mat-nav-list class=\"menu-scroll\" (mouseenter)=\"mouseEnter()\" (mouseleave)=\"mouseLeave()\">\n <ng-container *ngFor=\"let item of items\">\n <mat-list-item *ngIf=\"!item.children || item.children.length==0\" \n routerLink=\"{{ item.routerLink }}\" [routerLinkActive]=\"['active']\" \n [routerLinkActiveOptions]=\"{exact:true}\">\n <mat-icon matListItemIcon color=\"accent\">{{ item.icon }}</mat-icon>\n <span matListItemTitle style=\"margin-left: 4px;\"> {{ item.label }}</span>\n </mat-list-item>\n <juice-expandable-menu *ngIf=\"item.children && item.children.length>0\" \n [item]=\"item\" [isExpanded]=\"isExpanded\"></juice-expandable-menu>\n </ng-container>\n</mat-nav-list>\n<mat-divider></mat-divider>\n<mat-action-list class=\"list-horizontal bottom-menu\">\n <a mat-list-item *ngIf=\"settingUrl\" [href]=\"settingUrl\"\n matTooltip=\"{{'Settings' | translate}}\" matTooltipPosition=\"right\" [matTooltipDisabled]=\"isExpanded\">\n <mat-icon>settings</mat-icon>\n </a>\n <button mat-list-item (click)=\"toggle()\" *ngIf=\"!isMobile\">\n <mat-icon [style.transform]= \"isExpanded ? 'rotate(-180deg)':'rotate(0)'\">double_arrow</mat-icon>\n </button>\n</mat-action-list>", styles: [":host ::ng-deep{display:flex;flex-direction:column;justify-content:space-between;height:100%}:host ::ng-deep .menu-scroll{overflow-y:auto;overflow-x:hidden;flex:1}:host ::ng-deep .menu-scroll .mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{margin-right:10px}:host ::ng-deep .list-horizontal{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end}:host ::ng-deep .list-horizontal .mat-mdc-list-item{width:auto;flex:1 auto}:host ::ng-deep .list-horizontal .mat-mdc-list-item .mdc-list-item__content{display:flex;justify-content:center}:host ::ng-deep .list-horizontal .mat-mdc-list-item .mdc-list-item__content .mat-mdc-list-item-unscoped-content{padding-top:5px}:host ::ng-deep .mat-mdc-list-base{padding:0}\n"] }]
|
|
364
|
+
}], ctorParameters: function () { return [{ type: i1.MenuService }, { type: LayoutService }, { type: i1.TenantService }, { type: i1$1.ActivatedRoute }, { type: i4$2.BreakpointObserver }]; } });
|
|
365
|
+
|
|
366
|
+
class SearchService {
|
|
367
|
+
constructor(router) {
|
|
368
|
+
this.isEnabled = false;
|
|
369
|
+
this._callback = undefined;
|
|
370
|
+
router.events.subscribe((event) => {
|
|
371
|
+
if (event instanceof NavigationStart) {
|
|
372
|
+
this.disable();
|
|
373
|
+
}
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
disable() {
|
|
377
|
+
this.isEnabled = false;
|
|
378
|
+
this._callback = undefined;
|
|
379
|
+
}
|
|
380
|
+
enable(callback) {
|
|
381
|
+
this.isEnabled = true;
|
|
382
|
+
this._callback = callback;
|
|
383
|
+
}
|
|
384
|
+
callback(searchText, event) {
|
|
385
|
+
if (this._callback) {
|
|
386
|
+
this._callback(searchText, event);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchService, deps: [{ token: i1$1.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
390
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchService, providedIn: 'root' }); }
|
|
391
|
+
}
|
|
392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchService, decorators: [{
|
|
393
|
+
type: Injectable,
|
|
394
|
+
args: [{
|
|
395
|
+
providedIn: 'root'
|
|
396
|
+
}]
|
|
397
|
+
}], ctorParameters: function () { return [{ type: i1$1.Router }]; } });
|
|
398
|
+
|
|
399
|
+
class SearchBarComponent {
|
|
400
|
+
constructor(service) {
|
|
401
|
+
this.service = service;
|
|
402
|
+
this.searchText = "";
|
|
403
|
+
}
|
|
404
|
+
isEnabled() {
|
|
405
|
+
return this.service.isEnabled;
|
|
406
|
+
}
|
|
407
|
+
onSearchTextChange(event) {
|
|
408
|
+
this.service.callback(this.searchText, event);
|
|
409
|
+
}
|
|
410
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchBarComponent, deps: [{ token: SearchService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
411
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: SearchBarComponent, selector: "juice-search-bar", ngImport: i0, template: "<div @enableTrigger *ngIf=\"isEnabled()\" class=\"search-container\">\n <input type=\"search\" [(ngModel)] =\"searchText\"\n (keyup)=\"onSearchTextChange($event)\" placeholder=\"Search\">\n <mat-icon *ngIf=\"searchText\" (click)=\"searchText='';onSearchTextChange($event)\" color=\"primary\">\n close</mat-icon>\n</div>", styles: [".search-container{width:200px;min-width:150px;height:100%;margin-left:2rem;margin-right:2rem;position:relative;display:flex;align-items:center;transition:width .2s ease-in-out}.search-container input{border:none;border-radius:100px;padding:5px 3em 5px 16px;line-height:normal;font-size:1rem;width:100%;max-width:240px}.search-container input:focus{border:0;outline:none}.search-container input[type=search]::-webkit-search-decoration,.search-container input[type=search]::-webkit-search-cancel-button,.search-container input[type=search]::-webkit-search-results-button,.search-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}.search-container:focus-within,.search-container:has(.mat-icon){width:240px}.search-container .mat-icon{position:absolute;right:.7rem;font-size:1.4rem;cursor:pointer}@media screen and (max-width: 600px){.search-container{margin-left:.5rem;margin-right:.5rem}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], animations: [
|
|
412
|
+
trigger('enableTrigger', [
|
|
413
|
+
transition(':enter', [
|
|
414
|
+
style({ opacity: 0 }),
|
|
415
|
+
animate('100ms', style({ opacity: 1 })),
|
|
416
|
+
]),
|
|
417
|
+
transition(':leave', [
|
|
418
|
+
animate('100ms', style({ opacity: 0 }))
|
|
419
|
+
])
|
|
420
|
+
]),
|
|
421
|
+
] }); }
|
|
422
|
+
}
|
|
423
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchBarComponent, decorators: [{
|
|
424
|
+
type: Component,
|
|
425
|
+
args: [{ selector: 'juice-search-bar', animations: [
|
|
426
|
+
trigger('enableTrigger', [
|
|
427
|
+
transition(':enter', [
|
|
428
|
+
style({ opacity: 0 }),
|
|
429
|
+
animate('100ms', style({ opacity: 1 })),
|
|
430
|
+
]),
|
|
431
|
+
transition(':leave', [
|
|
432
|
+
animate('100ms', style({ opacity: 0 }))
|
|
433
|
+
])
|
|
434
|
+
]),
|
|
435
|
+
], template: "<div @enableTrigger *ngIf=\"isEnabled()\" class=\"search-container\">\n <input type=\"search\" [(ngModel)] =\"searchText\"\n (keyup)=\"onSearchTextChange($event)\" placeholder=\"Search\">\n <mat-icon *ngIf=\"searchText\" (click)=\"searchText='';onSearchTextChange($event)\" color=\"primary\">\n close</mat-icon>\n</div>", styles: [".search-container{width:200px;min-width:150px;height:100%;margin-left:2rem;margin-right:2rem;position:relative;display:flex;align-items:center;transition:width .2s ease-in-out}.search-container input{border:none;border-radius:100px;padding:5px 3em 5px 16px;line-height:normal;font-size:1rem;width:100%;max-width:240px}.search-container input:focus{border:0;outline:none}.search-container input[type=search]::-webkit-search-decoration,.search-container input[type=search]::-webkit-search-cancel-button,.search-container input[type=search]::-webkit-search-results-button,.search-container input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none}.search-container:focus-within,.search-container:has(.mat-icon){width:240px}.search-container .mat-icon{position:absolute;right:.7rem;font-size:1.4rem;cursor:pointer}@media screen and (max-width: 600px){.search-container{margin-left:.5rem;margin-right:.5rem}}\n"] }]
|
|
436
|
+
}], ctorParameters: function () { return [{ type: SearchService }]; } });
|
|
437
|
+
|
|
438
|
+
class ProfileDialogService extends AsyncDialog {
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
class UserProfileComponent {
|
|
442
|
+
constructor(dialogService, layoutService, oauthService) {
|
|
443
|
+
this.dialogService = dialogService;
|
|
444
|
+
this.layoutService = layoutService;
|
|
445
|
+
this.oauthService = oauthService;
|
|
446
|
+
this.imageUrl = "";
|
|
447
|
+
if (this.hasValidToken()) {
|
|
448
|
+
const claims = this.oauthService.getIdentityClaims();
|
|
449
|
+
if (claims["picture"]) {
|
|
450
|
+
this.imageUrl = claims["picture"];
|
|
451
|
+
}
|
|
452
|
+
else if (claims["avatar"]) {
|
|
453
|
+
this.imageUrl = claims["avatar"];
|
|
454
|
+
}
|
|
455
|
+
else {
|
|
456
|
+
const username = claims["preferred_username"];
|
|
457
|
+
if (username) {
|
|
458
|
+
this.imageUrl = layoutService.userImageUrl(username);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
onClick() {
|
|
464
|
+
if (this.dialogService) {
|
|
465
|
+
this.dialogService.open(this.imageUrl);
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
hasValidToken() {
|
|
469
|
+
return this.oauthService.hasValidAccessToken() && this.oauthService.hasValidIdToken();
|
|
470
|
+
}
|
|
471
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UserProfileComponent, deps: [{ token: ProfileDialogService, optional: true }, { token: LayoutService }, { token: i3$2.OAuthService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
472
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UserProfileComponent, selector: "juice-user-profile", ngImport: i0, template: "<button class=\"user-image\" (click)=\"onClick()\">\n <img [src]=\"imageUrl\"/>\n</button>", styles: [":host{height:100%;aspect-ratio:1/1;display:flex;padding:3px;box-sizing:border-box}.user-image{flex:1 auto;border:0;padding:0;background:none}.user-image img{width:100%;height:100%;border-radius:50%;object-fit:cover;cursor:pointer}\n"] }); }
|
|
473
|
+
}
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UserProfileComponent, decorators: [{
|
|
475
|
+
type: Component,
|
|
476
|
+
args: [{ selector: 'juice-user-profile', template: "<button class=\"user-image\" (click)=\"onClick()\">\n <img [src]=\"imageUrl\"/>\n</button>", styles: [":host{height:100%;aspect-ratio:1/1;display:flex;padding:3px;box-sizing:border-box}.user-image{flex:1 auto;border:0;padding:0;background:none}.user-image img{width:100%;height:100%;border-radius:50%;object-fit:cover;cursor:pointer}\n"] }]
|
|
477
|
+
}], ctorParameters: function () { return [{ type: ProfileDialogService, decorators: [{
|
|
478
|
+
type: Optional
|
|
479
|
+
}] }, { type: LayoutService }, { type: i3$2.OAuthService }]; } });
|
|
480
|
+
|
|
481
|
+
class PageComponent {
|
|
482
|
+
constructor(service, breakpointObserver) {
|
|
483
|
+
this.service = service;
|
|
484
|
+
this.breakpointObserver = breakpointObserver;
|
|
485
|
+
this.isMobile = false;
|
|
486
|
+
this.isSnavOpenned = false;
|
|
487
|
+
breakpointObserver.observe([
|
|
488
|
+
Breakpoints.HandsetLandscape,
|
|
489
|
+
Breakpoints.HandsetPortrait
|
|
490
|
+
]).subscribe(result => {
|
|
491
|
+
this.isMobile = result.matches;
|
|
492
|
+
this.isSnavOpenned = !this.isMobile;
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
hideSidenavOnMobile() {
|
|
496
|
+
if (this.isMobile) {
|
|
497
|
+
this.isSnavOpenned = false;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
toggleSidenav() {
|
|
501
|
+
this.isSnavOpenned = !this.isSnavOpenned;
|
|
502
|
+
}
|
|
503
|
+
toolbarHeight() {
|
|
504
|
+
return "48px"; // this.isMobile ? "42px" : "48px";
|
|
505
|
+
}
|
|
506
|
+
onAttach(e) {
|
|
507
|
+
console.log("attached", e);
|
|
508
|
+
}
|
|
509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageComponent, deps: [{ token: LayoutService }, { token: i4$2.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
510
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PageComponent, selector: "app-page", ngImport: i0, template: "<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * Delete the template below * * * * * * * * * * -->\n<!-- * * * * * * * to get started with your project! * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<div class=\"container\" [class.mobile]=\"isMobile\">\n <!-- Toolbar -->\n <mat-toolbar color=\"primary\" [style.height]=\"toolbarHeight()\">\n <button *ngIf=\"isMobile\" mat-icon-button (click)=\"toggleSidenav()\" class=\"m-r\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"menu\"></mat-icon>\n </button>\n <a *ngIf=\"!isMobile\" [routerLink]=\"['/',service.tenantIdentifier]\" class=\"nav-link home\">\n <img height=\"40 \" alt=\"{{service.brandName()}} Logo \" [src]=\"service.brandLogo() \" class=\"p-r \" />\n </a>\n <span *ngIf=\"!isMobile\">{{service.brandName()}}</span>\n <juice-search-bar></juice-search-bar>\n <span class=\"toolbar-spacer \"></span>\n <juice-dark-mode></juice-dark-mode>\n <juice-user-profile></juice-user-profile>\n </mat-toolbar>\n\n <mat-sidenav-container>\n <mat-sidenav [opened]=\"isSnavOpenned\" (closed)=\"isSnavOpenned = false\" #snav \n (navigate)=\"hideSidenavOnMobile\" (click)=\"hideSidenavOnMobile\" (swipeRight)=\"hideSidenavOnMobile\"\n [mode]=\"isMobile ? 'over': 'side' \" \n [@menuTransition]=\" menu.isExpanded ? 'expand' : 'collapsed' \" [fixedInViewport]=\"true\" \n [style.top]=\"isMobile ? toolbarHeight():0\">\n <juice-nav-menu #menu [class.menu-expanded]=\"isSnavOpenned\" \n [class.menu-collapsed]=\"!isSnavOpenned\"></juice-nav-menu>\n </mat-sidenav>\n\n <mat-sidenav-content style=\"margin-left: 0;\">\n <router-outlet (activate)=\"onAttach\"></router-outlet>\n </mat-sidenav-content>\n\n </mat-sidenav-container>\n</div>\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content above * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->", styles: [":host .toolbar-spacer{flex:1 1 auto}:host .nav-link{display:flex;margin-right:.5em}:host .mat-sidenav-container{display:flex;flex-direction:row}:host .mat-sidenav-container .mat-drawer-side{position:relative;flex:0 auto}:host .mat-sidenav-container .mat-drawer-over{position:fixed}:host .mat-sidenav-container .mat-sidenav-content{flex:1;height:auto}:host .container{display:flex;flex-direction:column}:host .container .mat-toolbar{flex:0 0 auto}:host .container .mat-sidenav-container{flex:1 1 auto;display:flex;flex-direction:row}\n"], dependencies: [{ kind: "directive", type: i1$1.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "component", type: i7$1.MatSidenav, selector: "mat-sidenav", inputs: ["fixedInViewport", "fixedTopGap", "fixedBottomGap"], exportAs: ["matSidenav"] }, { kind: "component", type: i7$1.MatSidenavContainer, selector: "mat-sidenav-container", exportAs: ["matSidenavContainer"] }, { kind: "component", type: i7$1.MatSidenavContent, selector: "mat-sidenav-content" }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: DarkModeComponent, selector: "juice-dark-mode" }, { kind: "component", type: NavMenuComponent, selector: "juice-nav-menu" }, { kind: "component", type: SearchBarComponent, selector: "juice-search-bar" }, { kind: "component", type: UserProfileComponent, selector: "juice-user-profile" }], animations: [
|
|
511
|
+
trigger('menuTransition', [
|
|
512
|
+
state('expand', style({
|
|
513
|
+
width: '220px'
|
|
514
|
+
})),
|
|
515
|
+
state('collapsed', style({
|
|
516
|
+
width: '60px'
|
|
517
|
+
})),
|
|
518
|
+
transition('* => collapsed', [
|
|
519
|
+
animate('0.15s')
|
|
520
|
+
]),
|
|
521
|
+
transition('* => expand', [
|
|
522
|
+
animate('0.15s')
|
|
523
|
+
])
|
|
524
|
+
]),
|
|
525
|
+
trigger('contentTransition', [
|
|
526
|
+
state('expand', style({
|
|
527
|
+
"margin-left": "60px"
|
|
528
|
+
})),
|
|
529
|
+
state('collapsed', style({
|
|
530
|
+
"margin-left": "220px"
|
|
531
|
+
})),
|
|
532
|
+
state("full", style({
|
|
533
|
+
"margin-left": "0"
|
|
534
|
+
})),
|
|
535
|
+
transition('* => collapsed', [
|
|
536
|
+
animate('0.15s')
|
|
537
|
+
]),
|
|
538
|
+
transition('* => expand', [
|
|
539
|
+
animate('0.15s')
|
|
540
|
+
])
|
|
541
|
+
])
|
|
542
|
+
] }); }
|
|
543
|
+
}
|
|
544
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageComponent, decorators: [{
|
|
545
|
+
type: Component,
|
|
546
|
+
args: [{ selector: 'app-page', animations: [
|
|
547
|
+
trigger('menuTransition', [
|
|
548
|
+
state('expand', style({
|
|
549
|
+
width: '220px'
|
|
550
|
+
})),
|
|
551
|
+
state('collapsed', style({
|
|
552
|
+
width: '60px'
|
|
553
|
+
})),
|
|
554
|
+
transition('* => collapsed', [
|
|
555
|
+
animate('0.15s')
|
|
556
|
+
]),
|
|
557
|
+
transition('* => expand', [
|
|
558
|
+
animate('0.15s')
|
|
559
|
+
])
|
|
560
|
+
]),
|
|
561
|
+
trigger('contentTransition', [
|
|
562
|
+
state('expand', style({
|
|
563
|
+
"margin-left": "60px"
|
|
564
|
+
})),
|
|
565
|
+
state('collapsed', style({
|
|
566
|
+
"margin-left": "220px"
|
|
567
|
+
})),
|
|
568
|
+
state("full", style({
|
|
569
|
+
"margin-left": "0"
|
|
570
|
+
})),
|
|
571
|
+
transition('* => collapsed', [
|
|
572
|
+
animate('0.15s')
|
|
573
|
+
]),
|
|
574
|
+
transition('* => expand', [
|
|
575
|
+
animate('0.15s')
|
|
576
|
+
])
|
|
577
|
+
])
|
|
578
|
+
], template: "<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content below * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * Delete the template below * * * * * * * * * * -->\n<!-- * * * * * * * to get started with your project! * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<div class=\"container\" [class.mobile]=\"isMobile\">\n <!-- Toolbar -->\n <mat-toolbar color=\"primary\" [style.height]=\"toolbarHeight()\">\n <button *ngIf=\"isMobile\" mat-icon-button (click)=\"toggleSidenav()\" class=\"m-r\">\n <mat-icon aria-hidden=\"false\" fontIcon=\"menu\"></mat-icon>\n </button>\n <a *ngIf=\"!isMobile\" [routerLink]=\"['/',service.tenantIdentifier]\" class=\"nav-link home\">\n <img height=\"40 \" alt=\"{{service.brandName()}} Logo \" [src]=\"service.brandLogo() \" class=\"p-r \" />\n </a>\n <span *ngIf=\"!isMobile\">{{service.brandName()}}</span>\n <juice-search-bar></juice-search-bar>\n <span class=\"toolbar-spacer \"></span>\n <juice-dark-mode></juice-dark-mode>\n <juice-user-profile></juice-user-profile>\n </mat-toolbar>\n\n <mat-sidenav-container>\n <mat-sidenav [opened]=\"isSnavOpenned\" (closed)=\"isSnavOpenned = false\" #snav \n (navigate)=\"hideSidenavOnMobile\" (click)=\"hideSidenavOnMobile\" (swipeRight)=\"hideSidenavOnMobile\"\n [mode]=\"isMobile ? 'over': 'side' \" \n [@menuTransition]=\" menu.isExpanded ? 'expand' : 'collapsed' \" [fixedInViewport]=\"true\" \n [style.top]=\"isMobile ? toolbarHeight():0\">\n <juice-nav-menu #menu [class.menu-expanded]=\"isSnavOpenned\" \n [class.menu-collapsed]=\"!isSnavOpenned\"></juice-nav-menu>\n </mat-sidenav>\n\n <mat-sidenav-content style=\"margin-left: 0;\">\n <router-outlet (activate)=\"onAttach\"></router-outlet>\n </mat-sidenav-content>\n\n </mat-sidenav-container>\n</div>\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * The content above * * * * * * * * * * * -->\n<!-- * * * * * * * * * * is only a placeholder * * * * * * * * * * -->\n<!-- * * * * * * * * * * and can be replaced. * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->\n<!-- * * * * * * * * * * End of Placeholder * * * * * * * * * * * -->\n<!-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -->", styles: [":host .toolbar-spacer{flex:1 1 auto}:host .nav-link{display:flex;margin-right:.5em}:host .mat-sidenav-container{display:flex;flex-direction:row}:host .mat-sidenav-container .mat-drawer-side{position:relative;flex:0 auto}:host .mat-sidenav-container .mat-drawer-over{position:fixed}:host .mat-sidenav-container .mat-sidenav-content{flex:1;height:auto}:host .container{display:flex;flex-direction:column}:host .container .mat-toolbar{flex:0 0 auto}:host .container .mat-sidenav-container{flex:1 1 auto;display:flex;flex-direction:row}\n"] }]
|
|
579
|
+
}], ctorParameters: function () { return [{ type: LayoutService }, { type: i4$2.BreakpointObserver }]; } });
|
|
580
|
+
|
|
581
|
+
class PageNotfoundComponent {
|
|
582
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotfoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
583
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: PageNotfoundComponent, selector: "juice-page-notfound", ngImport: i0, template: "<div class=\"container pt-4\">\n <h1>{{'Not found' | translate }}</h1>\n <p>{{ 'Your requested resource could not be found' | translate}}</p>\n </div>\n ", styles: [""], dependencies: [{ kind: "pipe", type: i5.TranslatePipe, name: "translate" }] }); }
|
|
584
|
+
}
|
|
585
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: PageNotfoundComponent, decorators: [{
|
|
586
|
+
type: Component,
|
|
587
|
+
args: [{ selector: 'juice-page-notfound', template: "<div class=\"container pt-4\">\n <h1>{{'Not found' | translate }}</h1>\n <p>{{ 'Your requested resource could not be found' | translate}}</p>\n </div>\n " }]
|
|
588
|
+
}] });
|
|
589
|
+
|
|
590
|
+
const routes = [];
|
|
591
|
+
class LayoutModule {
|
|
592
|
+
static forRoot(production, options) {
|
|
593
|
+
let config = new LayoutConfig(options);
|
|
594
|
+
return {
|
|
595
|
+
ngModule: LayoutModule,
|
|
596
|
+
providers: [
|
|
597
|
+
LayoutService,
|
|
598
|
+
{
|
|
599
|
+
provide: IS_PRODUCTION,
|
|
600
|
+
useValue: production
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
provide: LayoutConfig,
|
|
604
|
+
useValue: config
|
|
605
|
+
}
|
|
606
|
+
]
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
610
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: LayoutModule, declarations: [PageComponent,
|
|
611
|
+
DarkModeComponent,
|
|
612
|
+
NavMenuComponent,
|
|
613
|
+
ExpandableMenuComponent,
|
|
614
|
+
PageNotfoundComponent,
|
|
615
|
+
SearchBarComponent,
|
|
616
|
+
UserProfileComponent], imports: [i1$1.RouterModule, CommonModule,
|
|
617
|
+
FormsModule, i5.TranslateModule, MatIconModule,
|
|
618
|
+
MatToolbarModule,
|
|
619
|
+
MatSidenavModule,
|
|
620
|
+
MatButtonModule,
|
|
621
|
+
MatExpansionModule,
|
|
622
|
+
MatListModule,
|
|
623
|
+
MatFormFieldModule,
|
|
624
|
+
MatInputModule,
|
|
625
|
+
MatTooltipModule], exports: [PageComponent,
|
|
626
|
+
RouterModule] }); }
|
|
627
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutModule, imports: [RouterModule.forChild(routes),
|
|
628
|
+
CommonModule,
|
|
629
|
+
FormsModule,
|
|
630
|
+
TranslateModule.forChild(),
|
|
631
|
+
MatIconModule,
|
|
632
|
+
MatToolbarModule,
|
|
633
|
+
MatSidenavModule,
|
|
634
|
+
MatButtonModule,
|
|
635
|
+
MatExpansionModule,
|
|
636
|
+
MatListModule,
|
|
637
|
+
MatFormFieldModule,
|
|
638
|
+
MatInputModule,
|
|
639
|
+
MatTooltipModule, RouterModule] }); }
|
|
640
|
+
}
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LayoutModule, decorators: [{
|
|
642
|
+
type: NgModule,
|
|
643
|
+
args: [{
|
|
644
|
+
declarations: [
|
|
645
|
+
PageComponent,
|
|
646
|
+
DarkModeComponent,
|
|
647
|
+
NavMenuComponent,
|
|
648
|
+
ExpandableMenuComponent,
|
|
649
|
+
PageNotfoundComponent,
|
|
650
|
+
SearchBarComponent,
|
|
651
|
+
UserProfileComponent,
|
|
652
|
+
],
|
|
653
|
+
imports: [
|
|
654
|
+
RouterModule.forChild(routes),
|
|
655
|
+
CommonModule,
|
|
656
|
+
FormsModule,
|
|
657
|
+
TranslateModule.forChild(),
|
|
658
|
+
MatIconModule,
|
|
659
|
+
MatToolbarModule,
|
|
660
|
+
MatSidenavModule,
|
|
661
|
+
MatButtonModule,
|
|
662
|
+
MatExpansionModule,
|
|
663
|
+
MatListModule,
|
|
664
|
+
MatFormFieldModule,
|
|
665
|
+
MatInputModule,
|
|
666
|
+
MatTooltipModule
|
|
667
|
+
],
|
|
668
|
+
exports: [
|
|
669
|
+
PageComponent,
|
|
670
|
+
RouterModule
|
|
671
|
+
]
|
|
672
|
+
}]
|
|
673
|
+
}] });
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* This module for study purpose only.
|
|
677
|
+
* Consider using matTooltip from @angular/material
|
|
678
|
+
*/
|
|
679
|
+
class TooltipModule {
|
|
680
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
681
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, declarations: [TooltipComponent,
|
|
682
|
+
TooltipDirective], imports: [CommonModule], exports: [TooltipDirective] }); }
|
|
683
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, imports: [CommonModule] }); }
|
|
684
|
+
}
|
|
685
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TooltipModule, decorators: [{
|
|
686
|
+
type: NgModule,
|
|
687
|
+
args: [{
|
|
688
|
+
declarations: [
|
|
689
|
+
TooltipComponent,
|
|
690
|
+
TooltipDirective
|
|
691
|
+
],
|
|
692
|
+
imports: [
|
|
693
|
+
CommonModule
|
|
694
|
+
],
|
|
695
|
+
exports: [
|
|
696
|
+
TooltipDirective
|
|
697
|
+
]
|
|
698
|
+
}]
|
|
699
|
+
}] });
|
|
700
|
+
|
|
701
|
+
class DevGuard {
|
|
702
|
+
constructor() {
|
|
703
|
+
this.isProduction = inject(IS_PRODUCTION);
|
|
704
|
+
}
|
|
705
|
+
canActivate() {
|
|
706
|
+
console.log('DevGuard: this route is available in development environment only!', this.isProduction);
|
|
707
|
+
return !this.isProduction;
|
|
708
|
+
}
|
|
709
|
+
canDisplay() {
|
|
710
|
+
console.log('DevGuard: this menu is available in development environment only!', this.isProduction);
|
|
711
|
+
return !this.isProduction;
|
|
712
|
+
}
|
|
713
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DevGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
714
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DevGuard, providedIn: 'root' }); }
|
|
715
|
+
}
|
|
716
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DevGuard, decorators: [{
|
|
717
|
+
type: Injectable,
|
|
718
|
+
args: [{
|
|
719
|
+
providedIn: 'root'
|
|
720
|
+
}]
|
|
721
|
+
}] });
|
|
722
|
+
|
|
723
|
+
/*
|
|
724
|
+
* Public API Surface of layout
|
|
725
|
+
*/
|
|
726
|
+
|
|
727
|
+
/**
|
|
728
|
+
* Generated bundle index. Do not edit.
|
|
729
|
+
*/
|
|
730
|
+
|
|
731
|
+
export { DevGuard, ExpandableMenuComponent, LayoutModule, LayoutService, NavMenuComponent, PageComponent, PageNotfoundComponent, ProfileDialogService, SearchService, TooltipDirective, TooltipModule, TooltipPosition };
|
|
732
|
+
//# sourceMappingURL=juice-js-layout.mjs.map
|