@flusys/ng-layout 5.4.1 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/layout/_core.scss +19 -0
- package/assets/layout/_forms.scss +12 -32
- package/assets/layout/_menu.scss +5 -5
- package/assets/layout/_topbar_nav.scss +6 -6
- package/assets/layout/_typography.scss +0 -1
- package/assets/layout/variables/_common.scss +17 -17
- package/assets/layout/variables/_dark.scss +3 -3
- package/assets/layout/variables/_light.scss +3 -3
- package/assets/style.scss +3 -3
- package/fesm2022/flusys-ng-layout.mjs +517 -708
- package/fesm2022/flusys-ng-layout.mjs.map +1 -1
- package/package.json +8 -10
- package/types/flusys-ng-layout.d.ts +24 -98
|
@@ -1,35 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, PLATFORM_ID, Injectable, DOCUMENT, signal, computed, effect, Component, InjectionToken, input,
|
|
3
|
-
import * as
|
|
4
|
-
import { evaluateLogicNode, PermissionValidatorService, InlineSvgComponent, TranslatePipe, TranslateService, IconComponent, AngularModule
|
|
5
|
-
import { isPlatformBrowser, NgComponentOutlet, DOCUMENT as DOCUMENT$1
|
|
2
|
+
import { inject, PLATFORM_ID, Injectable, DOCUMENT, signal, DestroyRef, computed, effect, Component, InjectionToken, input, viewChild, ElementRef, Renderer2 } from '@angular/core';
|
|
3
|
+
import * as i3 from '@flusys/ng-shared';
|
|
4
|
+
import { evaluateLogicNode, PermissionValidatorService, InlineSvgComponent, TranslatePipe, TranslateService, IconComponent, AngularModule } from '@flusys/ng-shared';
|
|
5
|
+
import { isPlatformBrowser, NgComponentOutlet, DOCUMENT as DOCUMENT$1 } from '@angular/common';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
6
7
|
import { APP_CONFIG, DEFAULT_APP_NAME, DEFAULT_AUTHOR, isCompanyFeatureEnabled, isSignUpEnabled } from '@flusys/ng-core';
|
|
7
8
|
import { Subject, fromEvent, filter as filter$1 } from 'rxjs';
|
|
8
|
-
import * as
|
|
9
|
+
import * as i2 from '@angular/forms';
|
|
9
10
|
import { FormsModule } from '@angular/forms';
|
|
10
|
-
import * as
|
|
11
|
-
import { Router, NavigationEnd, RouterModule } from '@angular/router';
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
import Nora from '@primeuix/themes/nora';
|
|
16
|
-
import * as i2 from 'primeng/selectbutton';
|
|
17
|
-
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
18
|
-
import * as i1$1 from 'primeng/button';
|
|
19
|
-
import { ButtonModule } from 'primeng/button';
|
|
20
|
-
import * as i2$1 from 'primeng/styleclass';
|
|
21
|
-
import { StyleClassModule } from 'primeng/styleclass';
|
|
22
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
|
+
import * as i2$1 from '@angular/router';
|
|
12
|
+
import { Router, NavigationEnd, isActive, RouterModule } from '@angular/router';
|
|
13
|
+
import * as i1 from '@flusys/ng-ui';
|
|
14
|
+
import { PRESET_NAMES, applyTheme, SURFACE_PALETTES, PRIMARY_PALETTES, applyPrimaryPalette, applySurfacePalette, UiModule, MessageService } from '@flusys/ng-ui';
|
|
15
|
+
export { applyTheme, buildBootstrapPreset } from '@flusys/ng-ui';
|
|
23
16
|
import { filter } from 'rxjs/operators';
|
|
24
|
-
import * as i2$2 from 'primeng/ripple';
|
|
25
|
-
import { RippleModule } from 'primeng/ripple';
|
|
26
|
-
import { MessageService } from 'primeng/api';
|
|
27
|
-
import * as i4 from 'primeng/select';
|
|
28
|
-
import { SelectModule } from 'primeng/select';
|
|
29
|
-
import * as i3 from 'primeng/iconfield';
|
|
30
|
-
import * as i4$1 from 'primeng/inputicon';
|
|
31
|
-
import * as i5 from 'primeng/inputtext';
|
|
32
|
-
import Material from '@primeuix/themes/material';
|
|
33
17
|
|
|
34
18
|
/** Filter launcher apps based on user permission codes */
|
|
35
19
|
function filterAppsByPermissions(apps, permissionCodes) {
|
|
@@ -148,14 +132,15 @@ class LayoutPersistenceService {
|
|
|
148
132
|
const { _version, ...cleanConfig } = config;
|
|
149
133
|
return cleanConfig;
|
|
150
134
|
}
|
|
151
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
152
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LayoutPersistenceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
136
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LayoutPersistenceService, providedIn: 'root' });
|
|
153
137
|
}
|
|
154
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LayoutPersistenceService, decorators: [{
|
|
155
139
|
type: Injectable,
|
|
156
140
|
args: [{ providedIn: 'root' }]
|
|
157
141
|
}] });
|
|
158
142
|
|
|
143
|
+
const DESKTOP_BREAKPOINT = 991;
|
|
159
144
|
class LayoutService {
|
|
160
145
|
document = inject(DOCUMENT);
|
|
161
146
|
platformId = inject(PLATFORM_ID);
|
|
@@ -181,17 +166,27 @@ class LayoutService {
|
|
|
181
166
|
_layoutConfig = signal({
|
|
182
167
|
...this.DEFAULT_CONFIG,
|
|
183
168
|
...(this.memorable ? this.persistence.load() : null),
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
|
|
169
|
+
}, /* @ts-ignore */
|
|
170
|
+
...(ngDevMode ? [{ debugName: "_layoutConfig" }] : /* istanbul ignore next */ []));
|
|
171
|
+
_layoutState = signal(this.DEFAULT_STATE, /* @ts-ignore */
|
|
172
|
+
...(ngDevMode ? [{ debugName: "_layoutState" }] : /* istanbul ignore next */ []));
|
|
173
|
+
_transitionComplete = signal(false, /* @ts-ignore */
|
|
174
|
+
...(ngDevMode ? [{ debugName: "_transitionComplete" }] : /* istanbul ignore next */ []));
|
|
187
175
|
layoutConfig = this._layoutConfig.asReadonly();
|
|
188
176
|
layoutState = this._layoutState.asReadonly();
|
|
189
177
|
transitionComplete = this._transitionComplete.asReadonly();
|
|
190
|
-
_userProfile = signal(null,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
178
|
+
_userProfile = signal(null, /* @ts-ignore */
|
|
179
|
+
...(ngDevMode ? [{ debugName: "_userProfile" }] : /* istanbul ignore next */ []));
|
|
180
|
+
_companyProfile = signal(null, /* @ts-ignore */
|
|
181
|
+
...(ngDevMode ? [{ debugName: "_companyProfile" }] : /* istanbul ignore next */ []));
|
|
182
|
+
_rawMenu = signal([], /* @ts-ignore */
|
|
183
|
+
...(ngDevMode ? [{ debugName: "_rawMenu" }] : /* istanbul ignore next */ []));
|
|
184
|
+
_rawApps = signal([], /* @ts-ignore */
|
|
185
|
+
...(ngDevMode ? [{ debugName: "_rawApps" }] : /* istanbul ignore next */ []));
|
|
194
186
|
permissionValidator = inject(PermissionValidatorService);
|
|
187
|
+
destroyRef = inject(DestroyRef);
|
|
188
|
+
_windowWidth = signal(this.isBrowser ? window.innerWidth : DESKTOP_BREAKPOINT + 1, /* @ts-ignore */
|
|
189
|
+
...(ngDevMode ? [{ debugName: "_windowWidth" }] : /* istanbul ignore next */ []));
|
|
195
190
|
userProfile = this._userProfile.asReadonly();
|
|
196
191
|
companyProfile = this._companyProfile.asReadonly();
|
|
197
192
|
appName = this.appConfig?.appName ?? DEFAULT_APP_NAME;
|
|
@@ -199,26 +194,45 @@ class LayoutService {
|
|
|
199
194
|
isAppLogoSvg = this.appLogo.toLowerCase().endsWith('.svg');
|
|
200
195
|
authorName = this.appConfig?.author?.name ?? DEFAULT_AUTHOR.name;
|
|
201
196
|
authorUrl = this.appConfig?.author?.url ?? DEFAULT_AUTHOR.url;
|
|
202
|
-
menu = computed(() => filterMenuByPermissions(this._rawMenu(), this.permissionValidator.permissions()),
|
|
203
|
-
|
|
204
|
-
|
|
197
|
+
menu = computed(() => filterMenuByPermissions(this._rawMenu(), this.permissionValidator.permissions()), /* @ts-ignore */
|
|
198
|
+
...(ngDevMode ? [{ debugName: "menu" }] : /* istanbul ignore next */ []));
|
|
199
|
+
apps = computed(() => filterAppsByPermissions(this._rawApps(), this.permissionValidator.permissions()), /* @ts-ignore */
|
|
200
|
+
...(ngDevMode ? [{ debugName: "apps" }] : /* istanbul ignore next */ []));
|
|
201
|
+
hasApps = computed(() => this.apps().length > 0, /* @ts-ignore */
|
|
202
|
+
...(ngDevMode ? [{ debugName: "hasApps" }] : /* istanbul ignore next */ []));
|
|
205
203
|
isSidebarActive = computed(() => this._layoutState().overlayMenuActive ||
|
|
206
|
-
this._layoutState().staticMenuMobileActive,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
204
|
+
this._layoutState().staticMenuMobileActive, /* @ts-ignore */
|
|
205
|
+
...(ngDevMode ? [{ debugName: "isSidebarActive" }] : /* istanbul ignore next */ []));
|
|
206
|
+
isDesktop = computed(() => this._windowWidth() > DESKTOP_BREAKPOINT, /* @ts-ignore */
|
|
207
|
+
...(ngDevMode ? [{ debugName: "isDesktop" }] : /* istanbul ignore next */ []));
|
|
208
|
+
isMobile = computed(() => !this.isDesktop(), /* @ts-ignore */
|
|
209
|
+
...(ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []));
|
|
210
|
+
isDarkTheme = computed(() => this._layoutConfig().darkTheme, /* @ts-ignore */
|
|
211
|
+
...(ngDevMode ? [{ debugName: "isDarkTheme" }] : /* istanbul ignore next */ []));
|
|
212
|
+
isOverlay = computed(() => this._layoutConfig().menuMode === 'overlay', /* @ts-ignore */
|
|
213
|
+
...(ngDevMode ? [{ debugName: "isOverlay" }] : /* istanbul ignore next */ []));
|
|
214
|
+
isTopbar = computed(() => this._layoutConfig().menuMode === 'topbar', /* @ts-ignore */
|
|
215
|
+
...(ngDevMode ? [{ debugName: "isTopbar" }] : /* istanbul ignore next */ []));
|
|
216
|
+
userName = computed(() => this._userProfile()?.name ?? 'Guest', /* @ts-ignore */
|
|
217
|
+
...(ngDevMode ? [{ debugName: "userName" }] : /* istanbul ignore next */ []));
|
|
218
|
+
userEmail = computed(() => this._userProfile()?.email ?? '', /* @ts-ignore */
|
|
219
|
+
...(ngDevMode ? [{ debugName: "userEmail" }] : /* istanbul ignore next */ []));
|
|
220
|
+
userProfilePictureUrl = computed(() => this._userProfile()?.profilePictureUrl ?? null, /* @ts-ignore */
|
|
221
|
+
...(ngDevMode ? [{ debugName: "userProfilePictureUrl" }] : /* istanbul ignore next */ []));
|
|
222
|
+
companyLogoUrl = computed(() => this._companyProfile()?.logoUrl ?? null, /* @ts-ignore */
|
|
223
|
+
...(ngDevMode ? [{ debugName: "companyLogoUrl" }] : /* istanbul ignore next */ []));
|
|
224
|
+
isAuthenticated = computed(() => !!this._userProfile(), /* @ts-ignore */
|
|
225
|
+
...(ngDevMode ? [{ debugName: "isAuthenticated" }] : /* istanbul ignore next */ []));
|
|
215
226
|
companyName = computed(() => {
|
|
216
227
|
if (!this.appConfig || !isCompanyFeatureEnabled(this.appConfig))
|
|
217
228
|
return this.appName;
|
|
218
229
|
return this._companyProfile()?.name ?? this.appName;
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
|
|
230
|
+
}, /* @ts-ignore */
|
|
231
|
+
...(ngDevMode ? [{ debugName: "companyName" }] : /* istanbul ignore next */ []));
|
|
232
|
+
displayLogo = computed(() => this.companyLogoUrl() ?? this.appLogo, /* @ts-ignore */
|
|
233
|
+
...(ngDevMode ? [{ debugName: "displayLogo" }] : /* istanbul ignore next */ []));
|
|
234
|
+
isDisplayLogoSvg = computed(() => this.displayLogo().toLowerCase().endsWith('.svg'), /* @ts-ignore */
|
|
235
|
+
...(ngDevMode ? [{ debugName: "isDisplayLogoSvg" }] : /* istanbul ignore next */ []));
|
|
222
236
|
overlayOpen = new Subject();
|
|
223
237
|
menuSource = new Subject();
|
|
224
238
|
resetSource = new Subject();
|
|
@@ -227,6 +241,14 @@ class LayoutService {
|
|
|
227
241
|
overlayOpen$ = this.overlayOpen.asObservable();
|
|
228
242
|
initialized = false;
|
|
229
243
|
constructor() {
|
|
244
|
+
if (this.isBrowser) {
|
|
245
|
+
this.toggleDarkMode();
|
|
246
|
+
fromEvent(window, 'resize')
|
|
247
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
248
|
+
.subscribe(() => {
|
|
249
|
+
this._windowWidth.set(window.innerWidth);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
230
252
|
effect(() => {
|
|
231
253
|
const config = this._layoutConfig();
|
|
232
254
|
if (this.initialized) {
|
|
@@ -297,12 +319,6 @@ class LayoutService {
|
|
|
297
319
|
}));
|
|
298
320
|
}
|
|
299
321
|
}
|
|
300
|
-
isDesktop() {
|
|
301
|
-
return this.isBrowser ? window.innerWidth > 991 : true;
|
|
302
|
-
}
|
|
303
|
-
isMobile() {
|
|
304
|
-
return !this.isDesktop();
|
|
305
|
-
}
|
|
306
322
|
onMenuStateChange(event) {
|
|
307
323
|
this.menuSource.next(event);
|
|
308
324
|
}
|
|
@@ -333,10 +349,10 @@ class LayoutService {
|
|
|
333
349
|
clearApps() {
|
|
334
350
|
this._rawApps.set([]);
|
|
335
351
|
}
|
|
336
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
337
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
352
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LayoutService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
353
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LayoutService, providedIn: 'root' });
|
|
338
354
|
}
|
|
339
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
355
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: LayoutService, decorators: [{
|
|
340
356
|
type: Injectable,
|
|
341
357
|
args: [{ providedIn: 'root' }]
|
|
342
358
|
}], ctorParameters: () => [] });
|
|
@@ -348,8 +364,8 @@ class AppFooter {
|
|
|
348
364
|
isLogoSvg = this.layoutService.isAppLogoSvg;
|
|
349
365
|
authorName = this.layoutService.authorName;
|
|
350
366
|
authorUrl = this.layoutService.authorUrl;
|
|
351
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
352
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
367
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppFooter, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
368
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppFooter, isStandalone: true, selector: "app-footer", ngImport: i0, template: `<div class="layout-footer">
|
|
353
369
|
@if (displayLogo) {
|
|
354
370
|
@if (isLogoSvg) {
|
|
355
371
|
<inline-svg [src]="displayLogo" class="logo-image" />
|
|
@@ -369,7 +385,7 @@ class AppFooter {
|
|
|
369
385
|
</span>
|
|
370
386
|
</div>`, isInline: true, dependencies: [{ kind: "component", type: InlineSvgComponent, selector: "inline-svg", inputs: ["src"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
371
387
|
}
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
388
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppFooter, decorators: [{
|
|
373
389
|
type: Component,
|
|
374
390
|
args: [{
|
|
375
391
|
selector: 'app-footer',
|
|
@@ -396,306 +412,65 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
396
412
|
}]
|
|
397
413
|
}] });
|
|
398
414
|
|
|
399
|
-
const _presets = { Aura, Lara, Nora };
|
|
400
|
-
const _noirPrimary = {
|
|
401
|
-
50: '{surface.50}', 100: '{surface.100}', 200: '{surface.200}',
|
|
402
|
-
300: '{surface.300}', 400: '{surface.400}', 500: '{surface.500}',
|
|
403
|
-
600: '{surface.600}', 700: '{surface.700}', 800: '{surface.800}',
|
|
404
|
-
900: '{surface.900}', 950: '{surface.950}',
|
|
405
|
-
};
|
|
406
|
-
const _noraScheme = {
|
|
407
|
-
light: {
|
|
408
|
-
primary: { color: '{primary.600}', contrastColor: '#ffffff', hoverColor: '{primary.700}', activeColor: '{primary.800}' },
|
|
409
|
-
highlight: { background: '{primary.600}', focusBackground: '{primary.700}', color: '#ffffff', focusColor: '#ffffff' },
|
|
410
|
-
},
|
|
411
|
-
dark: {
|
|
412
|
-
primary: { color: '{primary.500}', contrastColor: '{surface.900}', hoverColor: '{primary.400}', activeColor: '{primary.300}' },
|
|
413
|
-
highlight: { background: '{primary.500}', focusBackground: '{primary.400}', color: '{surface.900}', focusColor: '{surface.900}' },
|
|
414
|
-
},
|
|
415
|
-
};
|
|
416
|
-
const _defaultScheme = {
|
|
417
|
-
light: {
|
|
418
|
-
primary: { color: '{primary.500}', contrastColor: '#ffffff', hoverColor: '{primary.600}', activeColor: '{primary.700}' },
|
|
419
|
-
highlight: { background: '{primary.50}', focusBackground: '{primary.100}', color: '{primary.700}', focusColor: '{primary.800}' },
|
|
420
|
-
},
|
|
421
|
-
dark: {
|
|
422
|
-
primary: { color: '{primary.400}', contrastColor: '{surface.900}', hoverColor: '{primary.300}', activeColor: '{primary.200}' },
|
|
423
|
-
highlight: {
|
|
424
|
-
background: 'color-mix(in srgb, {primary.400}, transparent 84%)',
|
|
425
|
-
focusBackground: 'color-mix(in srgb, {primary.400}, transparent 76%)',
|
|
426
|
-
color: 'rgba(255,255,255,.87)',
|
|
427
|
-
focusColor: 'rgba(255,255,255,.87)',
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
};
|
|
431
|
-
function buildSemanticExt(palette, presetName) {
|
|
432
|
-
if (palette === null) {
|
|
433
|
-
return {
|
|
434
|
-
semantic: {
|
|
435
|
-
primary: _noirPrimary,
|
|
436
|
-
colorScheme: {
|
|
437
|
-
light: {
|
|
438
|
-
primary: { color: '{primary.950}', contrastColor: '#ffffff', hoverColor: '{primary.800}', activeColor: '{primary.700}' },
|
|
439
|
-
highlight: { background: '{primary.950}', focusBackground: '{primary.700}', color: '#ffffff', focusColor: '#ffffff' },
|
|
440
|
-
},
|
|
441
|
-
dark: {
|
|
442
|
-
primary: { color: '{primary.50}', contrastColor: '{primary.950}', hoverColor: '{primary.200}', activeColor: '{primary.300}' },
|
|
443
|
-
highlight: { background: '{primary.50}', focusBackground: '{primary.300}', color: '{primary.950}', focusColor: '{primary.950}' },
|
|
444
|
-
},
|
|
445
|
-
},
|
|
446
|
-
},
|
|
447
|
-
};
|
|
448
|
-
}
|
|
449
|
-
return { semantic: { primary: palette, colorScheme: presetName === 'Nora' ? _noraScheme : _defaultScheme } };
|
|
450
|
-
}
|
|
451
|
-
function buildPreset(presetName, primary) {
|
|
452
|
-
const base = _presets[presetName in _presets ? presetName : 'Aura'];
|
|
453
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
454
|
-
const palette = primary === 'noir' ? null : base.primitive?.[primary];
|
|
455
|
-
if (primary !== 'noir' && !palette)
|
|
456
|
-
return base;
|
|
457
|
-
return definePreset(base, buildSemanticExt(palette, presetName));
|
|
458
|
-
}
|
|
459
|
-
function buildBootstrapPreset(envConfig) {
|
|
460
|
-
const preset = envConfig?.preset ?? 'Aura';
|
|
461
|
-
const primary = envConfig?.primary ?? 'violet';
|
|
462
|
-
if (envConfig?.isMemorable !== false) {
|
|
463
|
-
try {
|
|
464
|
-
const stored = localStorage.getItem('flusys.layout.config');
|
|
465
|
-
if (stored) {
|
|
466
|
-
const parsed = JSON.parse(stored);
|
|
467
|
-
return buildPreset(parsed.preset ?? preset, parsed.primary ?? primary);
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
catch { /* SSR or storage disabled */ }
|
|
471
|
-
}
|
|
472
|
-
return buildPreset(preset, primary);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
const presets = {
|
|
476
|
-
Aura,
|
|
477
|
-
Lara,
|
|
478
|
-
Nora,
|
|
479
|
-
};
|
|
480
415
|
class AppConfigurator {
|
|
481
416
|
router = inject(Router);
|
|
482
417
|
translateAdapter = inject(TranslateService, { optional: true });
|
|
483
418
|
platformId = inject(PLATFORM_ID);
|
|
484
419
|
layoutService = inject(LayoutService);
|
|
485
|
-
presets =
|
|
486
|
-
showMenuModeButton = signal(!this.router.url.includes('auth'),
|
|
420
|
+
presets = PRESET_NAMES;
|
|
421
|
+
showMenuModeButton = signal(!this.router.url.includes('auth'), /* @ts-ignore */
|
|
422
|
+
...(ngDevMode ? [{ debugName: "showMenuModeButton" }] : /* istanbul ignore next */ []));
|
|
487
423
|
menuModeOptions = computed(() => {
|
|
488
424
|
const options = [
|
|
489
|
-
{
|
|
490
|
-
|
|
491
|
-
value: 'static',
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
label: this.translate('layout.configurator.menu.mode.overlay'),
|
|
495
|
-
value: 'overlay',
|
|
496
|
-
},
|
|
425
|
+
{ label: this.translate('layout.configurator.menu.mode.static'), value: 'static' },
|
|
426
|
+
{ label: this.translate('layout.configurator.menu.mode.overlay'), value: 'overlay' },
|
|
497
427
|
];
|
|
498
428
|
if (this.layoutService.isDesktop()) {
|
|
499
|
-
options.push({
|
|
500
|
-
label: this.translate('layout.configurator.menu.mode.topbar'),
|
|
501
|
-
value: 'topbar',
|
|
502
|
-
});
|
|
429
|
+
options.push({ label: this.translate('layout.configurator.menu.mode.topbar'), value: 'topbar' });
|
|
503
430
|
}
|
|
504
431
|
return options;
|
|
505
|
-
},
|
|
432
|
+
}, /* @ts-ignore */
|
|
433
|
+
...(ngDevMode ? [{ debugName: "menuModeOptions" }] : /* istanbul ignore next */ []));
|
|
506
434
|
constructor() {
|
|
507
435
|
if (isPlatformBrowser(this.platformId)) {
|
|
508
|
-
|
|
509
|
-
|
|
436
|
+
effect(() => {
|
|
437
|
+
const config = this.layoutService.layoutConfig();
|
|
438
|
+
applyTheme({
|
|
439
|
+
preset: (config.preset ?? 'Aura'),
|
|
440
|
+
primary: config.primary ?? 'violet',
|
|
441
|
+
surface: config.surface ?? null,
|
|
442
|
+
darkTheme: config.darkTheme ?? false,
|
|
443
|
+
});
|
|
444
|
+
});
|
|
510
445
|
}
|
|
511
446
|
}
|
|
512
|
-
surfaces = [
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
300: '#cbd5e1',
|
|
521
|
-
400: '#94a3b8',
|
|
522
|
-
500: '#64748b',
|
|
523
|
-
600: '#475569',
|
|
524
|
-
700: '#334155',
|
|
525
|
-
800: '#1e293b',
|
|
526
|
-
900: '#0f172a',
|
|
527
|
-
950: '#020617',
|
|
528
|
-
},
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
name: 'gray',
|
|
532
|
-
palette: {
|
|
533
|
-
0: '#ffffff',
|
|
534
|
-
50: '#f9fafb',
|
|
535
|
-
100: '#f3f4f6',
|
|
536
|
-
200: '#e5e7eb',
|
|
537
|
-
300: '#d1d5db',
|
|
538
|
-
400: '#9ca3af',
|
|
539
|
-
500: '#6b7280',
|
|
540
|
-
600: '#4b5563',
|
|
541
|
-
700: '#374151',
|
|
542
|
-
800: '#1f2937',
|
|
543
|
-
900: '#111827',
|
|
544
|
-
950: '#030712',
|
|
545
|
-
},
|
|
546
|
-
},
|
|
547
|
-
{
|
|
548
|
-
name: 'zinc',
|
|
549
|
-
palette: {
|
|
550
|
-
0: '#ffffff',
|
|
551
|
-
50: '#fafafa',
|
|
552
|
-
100: '#f4f4f5',
|
|
553
|
-
200: '#e4e4e7',
|
|
554
|
-
300: '#d4d4d8',
|
|
555
|
-
400: '#a1a1aa',
|
|
556
|
-
500: '#71717a',
|
|
557
|
-
600: '#52525b',
|
|
558
|
-
700: '#3f3f46',
|
|
559
|
-
800: '#27272a',
|
|
560
|
-
900: '#18181b',
|
|
561
|
-
950: '#09090b',
|
|
562
|
-
},
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
name: 'neutral',
|
|
566
|
-
palette: {
|
|
567
|
-
0: '#ffffff',
|
|
568
|
-
50: '#fafafa',
|
|
569
|
-
100: '#f5f5f5',
|
|
570
|
-
200: '#e5e5e5',
|
|
571
|
-
300: '#d4d4d4',
|
|
572
|
-
400: '#a3a3a3',
|
|
573
|
-
500: '#737373',
|
|
574
|
-
600: '#525252',
|
|
575
|
-
700: '#404040',
|
|
576
|
-
800: '#262626',
|
|
577
|
-
900: '#171717',
|
|
578
|
-
950: '#0a0a0a',
|
|
579
|
-
},
|
|
580
|
-
},
|
|
581
|
-
{
|
|
582
|
-
name: 'stone',
|
|
583
|
-
palette: {
|
|
584
|
-
0: '#ffffff',
|
|
585
|
-
50: '#fafaf9',
|
|
586
|
-
100: '#f5f5f4',
|
|
587
|
-
200: '#e7e5e4',
|
|
588
|
-
300: '#d6d3d1',
|
|
589
|
-
400: '#a8a29e',
|
|
590
|
-
500: '#78716c',
|
|
591
|
-
600: '#57534e',
|
|
592
|
-
700: '#44403c',
|
|
593
|
-
800: '#292524',
|
|
594
|
-
900: '#1c1917',
|
|
595
|
-
950: '#0c0a09',
|
|
596
|
-
},
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
name: 'soho',
|
|
600
|
-
palette: {
|
|
601
|
-
0: '#ffffff',
|
|
602
|
-
50: '#ececec',
|
|
603
|
-
100: '#dedfdf',
|
|
604
|
-
200: '#c4c4c6',
|
|
605
|
-
300: '#adaeb0',
|
|
606
|
-
400: '#97979b',
|
|
607
|
-
500: '#7f8084',
|
|
608
|
-
600: '#6a6b70',
|
|
609
|
-
700: '#55565b',
|
|
610
|
-
800: '#3f4046',
|
|
611
|
-
900: '#2c2c34',
|
|
612
|
-
950: '#16161d',
|
|
613
|
-
},
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
name: 'viva',
|
|
617
|
-
palette: {
|
|
618
|
-
0: '#ffffff',
|
|
619
|
-
50: '#f3f3f3',
|
|
620
|
-
100: '#e7e7e8',
|
|
621
|
-
200: '#cfd0d0',
|
|
622
|
-
300: '#b7b8b9',
|
|
623
|
-
400: '#9fa1a1',
|
|
624
|
-
500: '#87898a',
|
|
625
|
-
600: '#6e7173',
|
|
626
|
-
700: '#565a5b',
|
|
627
|
-
800: '#3e4244',
|
|
628
|
-
900: '#262b2c',
|
|
629
|
-
950: '#0e1315',
|
|
630
|
-
},
|
|
631
|
-
},
|
|
632
|
-
{
|
|
633
|
-
name: 'ocean',
|
|
634
|
-
palette: {
|
|
635
|
-
0: '#ffffff',
|
|
636
|
-
50: '#fbfcfc',
|
|
637
|
-
100: '#F7F9F8',
|
|
638
|
-
200: '#EFF3F2',
|
|
639
|
-
300: '#DADEDD',
|
|
640
|
-
400: '#B1B7B6',
|
|
641
|
-
500: '#828787',
|
|
642
|
-
600: '#5F7274',
|
|
643
|
-
700: '#415B61',
|
|
644
|
-
800: '#29444E',
|
|
645
|
-
900: '#183240',
|
|
646
|
-
950: '#0c1920',
|
|
647
|
-
},
|
|
648
|
-
},
|
|
649
|
-
];
|
|
650
|
-
selectedPrimaryColor = computed(() => this.layoutService.layoutConfig().primary, ...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : []));
|
|
651
|
-
selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : []));
|
|
447
|
+
surfaces = Object.entries(SURFACE_PALETTES).map(([name, pal]) => ({
|
|
448
|
+
name,
|
|
449
|
+
palette: pal,
|
|
450
|
+
}));
|
|
451
|
+
selectedPrimaryColor = computed(() => this.layoutService.layoutConfig().primary, /* @ts-ignore */
|
|
452
|
+
...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : /* istanbul ignore next */ []));
|
|
453
|
+
selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, /* @ts-ignore */
|
|
454
|
+
...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : /* istanbul ignore next */ []));
|
|
652
455
|
isSurfaceSelected(surfaceName) {
|
|
653
|
-
const
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
menuMode = computed(() => this.layoutService.layoutConfig().menuMode, ...(ngDevMode ? [{ debugName: "menuMode" }] : []));
|
|
456
|
+
const sel = this.selectedSurfaceColor();
|
|
457
|
+
if (sel)
|
|
458
|
+
return sel === surfaceName;
|
|
459
|
+
const isDark = this.layoutService.layoutConfig().darkTheme;
|
|
460
|
+
return isDark ? surfaceName === 'zinc' : surfaceName === 'slate';
|
|
461
|
+
}
|
|
462
|
+
selectedPreset = computed(() => this.layoutService.layoutConfig().preset, /* @ts-ignore */
|
|
463
|
+
...(ngDevMode ? [{ debugName: "selectedPreset" }] : /* istanbul ignore next */ []));
|
|
464
|
+
menuMode = computed(() => this.layoutService.layoutConfig().menuMode, /* @ts-ignore */
|
|
465
|
+
...(ngDevMode ? [{ debugName: "menuMode" }] : /* istanbul ignore next */ []));
|
|
664
466
|
primaryColors = computed(() => {
|
|
665
|
-
const presetPalette = presets[this.layoutService.layoutConfig().preset].primitive;
|
|
666
|
-
const colors = [
|
|
667
|
-
'emerald',
|
|
668
|
-
'green',
|
|
669
|
-
'lime',
|
|
670
|
-
'orange',
|
|
671
|
-
'amber',
|
|
672
|
-
'yellow',
|
|
673
|
-
'teal',
|
|
674
|
-
'cyan',
|
|
675
|
-
'sky',
|
|
676
|
-
'blue',
|
|
677
|
-
'indigo',
|
|
678
|
-
'violet',
|
|
679
|
-
'purple',
|
|
680
|
-
'fuchsia',
|
|
681
|
-
'pink',
|
|
682
|
-
'rose',
|
|
683
|
-
];
|
|
684
467
|
const palettes = [{ name: 'noir', palette: {} }];
|
|
685
|
-
|
|
686
|
-
palettes.push({
|
|
687
|
-
|
|
688
|
-
palette: presetPalette?.[color],
|
|
689
|
-
});
|
|
690
|
-
});
|
|
468
|
+
for (const [name, pal] of Object.entries(PRIMARY_PALETTES)) {
|
|
469
|
+
palettes.push({ name, palette: pal });
|
|
470
|
+
}
|
|
691
471
|
return palettes;
|
|
692
|
-
},
|
|
693
|
-
|
|
694
|
-
const color = this.primaryColors().find(c => c.name === this.selectedPrimaryColor()) ?? {};
|
|
695
|
-
const preset = this.layoutService.layoutConfig().preset ?? 'Aura';
|
|
696
|
-
const palette = color.name === 'noir' ? null : (color.palette ?? {});
|
|
697
|
-
return buildSemanticExt(palette, preset);
|
|
698
|
-
}
|
|
472
|
+
}, /* @ts-ignore */
|
|
473
|
+
...(ngDevMode ? [{ debugName: "primaryColors" }] : /* istanbul ignore next */ []));
|
|
699
474
|
updateColors(event, type, color) {
|
|
700
475
|
if (type === 'primary') {
|
|
701
476
|
this.layoutService.updateLayoutConfig({ primary: color.name });
|
|
@@ -703,31 +478,31 @@ class AppConfigurator {
|
|
|
703
478
|
else if (type === 'surface') {
|
|
704
479
|
this.layoutService.updateLayoutConfig({ surface: color.name });
|
|
705
480
|
}
|
|
706
|
-
this.
|
|
481
|
+
this._applyColorChange(type, color);
|
|
707
482
|
event.stopPropagation();
|
|
708
483
|
}
|
|
709
|
-
|
|
484
|
+
_applyColorChange(type, color) {
|
|
485
|
+
const isDark = this.layoutService.layoutConfig().darkTheme ?? false;
|
|
710
486
|
if (type === 'primary') {
|
|
711
|
-
|
|
487
|
+
const primary = color.name ?? 'violet';
|
|
488
|
+
const pal = primary === 'noir'
|
|
489
|
+
? Object.fromEntries(Object.entries(SURFACE_PALETTES['slate']).map(([k, v]) => [k, v]))
|
|
490
|
+
: PRIMARY_PALETTES[primary];
|
|
491
|
+
if (pal)
|
|
492
|
+
applyPrimaryPalette(pal, isDark);
|
|
712
493
|
}
|
|
713
494
|
else if (type === 'surface') {
|
|
714
|
-
|
|
495
|
+
const surfacePal = SURFACE_PALETTES[color.name ?? 'slate'];
|
|
496
|
+
if (surfacePal)
|
|
497
|
+
applySurfacePalette(surfacePal);
|
|
715
498
|
}
|
|
716
499
|
}
|
|
717
500
|
onPresetChange(event) {
|
|
718
501
|
this.layoutService.updateLayoutConfig({ preset: event });
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
const
|
|
722
|
-
|
|
723
|
-
? 'zinc'
|
|
724
|
-
: 'slate';
|
|
725
|
-
const surfacePalette = this.surfaces.find((s) => s.name === (selectedSurface || defaultSurface))?.palette;
|
|
726
|
-
$t()
|
|
727
|
-
.preset(preset)
|
|
728
|
-
.preset(this.getPresetExt())
|
|
729
|
-
.surfacePalette(surfacePalette)
|
|
730
|
-
.use({ useDefaultOptions: true });
|
|
502
|
+
const isDark = this.layoutService.layoutConfig().darkTheme ?? false;
|
|
503
|
+
const primary = this.layoutService.layoutConfig().primary ?? 'violet';
|
|
504
|
+
const surface = this.layoutService.layoutConfig().surface ?? null;
|
|
505
|
+
applyTheme({ preset: event, primary, surface, darkTheme: isDark });
|
|
731
506
|
}
|
|
732
507
|
onMenuModeChange(event) {
|
|
733
508
|
this.layoutService.updateLayoutConfig({ menuMode: event });
|
|
@@ -735,8 +510,8 @@ class AppConfigurator {
|
|
|
735
510
|
translate(key) {
|
|
736
511
|
return this.translateAdapter?.translate(key) ?? key;
|
|
737
512
|
}
|
|
738
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
739
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
513
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
514
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppConfigurator, isStandalone: true, selector: "app-configurator", host: { styleAttribute: "background-color: var(--surface-overlay); inset-inline-end: 0;", classAttribute: "hidden absolute top-[3.25rem] w-[calc(100vw-2rem)] sm:w-72 max-w-72 p-4 border border-surface rounded-border origin-top shadow-xl" }, ngImport: i0, template: `
|
|
740
515
|
<div class="flex flex-col gap-4">
|
|
741
516
|
<div>
|
|
742
517
|
<span class="text-sm text-muted-color font-semibold">{{
|
|
@@ -748,13 +523,11 @@ class AppConfigurator {
|
|
|
748
523
|
type="button"
|
|
749
524
|
[title]="primaryColor.name"
|
|
750
525
|
(click)="updateColors($event, 'primary', primaryColor)"
|
|
751
|
-
[class.outline-primary]="
|
|
752
|
-
primaryColor.name === selectedPrimaryColor()
|
|
753
|
-
"
|
|
526
|
+
[class.outline-primary]="primaryColor.name === selectedPrimaryColor()"
|
|
754
527
|
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
755
528
|
[style.background-color]="
|
|
756
529
|
primaryColor?.name === 'noir'
|
|
757
|
-
? 'var(--text-color)'
|
|
530
|
+
? 'var(--f-text-color)'
|
|
758
531
|
: primaryColor?.palette?.['500']
|
|
759
532
|
"
|
|
760
533
|
></button>
|
|
@@ -775,7 +548,7 @@ class AppConfigurator {
|
|
|
775
548
|
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
776
549
|
[style.background-color]="
|
|
777
550
|
surface?.name === 'noir'
|
|
778
|
-
? 'var(--text-color)'
|
|
551
|
+
? 'var(--f-text-color)'
|
|
779
552
|
: surface?.palette?.['500']
|
|
780
553
|
"
|
|
781
554
|
></button>
|
|
@@ -786,7 +559,7 @@ class AppConfigurator {
|
|
|
786
559
|
<span class="text-sm text-muted-color font-semibold">{{
|
|
787
560
|
'layout.configurator.presets' | translate
|
|
788
561
|
}}</span>
|
|
789
|
-
<
|
|
562
|
+
<f-selectbutton
|
|
790
563
|
[options]="presets"
|
|
791
564
|
[ngModel]="selectedPreset()"
|
|
792
565
|
(ngModelChange)="onPresetChange($event)"
|
|
@@ -799,7 +572,7 @@ class AppConfigurator {
|
|
|
799
572
|
<span class="text-sm text-muted-color font-semibold">{{
|
|
800
573
|
'layout.configurator.menu.mode' | translate
|
|
801
574
|
}}</span>
|
|
802
|
-
<
|
|
575
|
+
<f-selectbutton
|
|
803
576
|
[ngModel]="menuMode()"
|
|
804
577
|
(ngModelChange)="onMenuModeChange($event)"
|
|
805
578
|
[options]="menuModeOptions()"
|
|
@@ -809,13 +582,13 @@ class AppConfigurator {
|
|
|
809
582
|
</div>
|
|
810
583
|
}
|
|
811
584
|
</div>
|
|
812
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
585
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: UiModule }, { kind: "component", type: i1.SelectButtonComponent, selector: "f-selectbutton", inputs: ["options", "optionLabel", "optionValue", "multiple", "disabled", "allowEmpty", "size"], outputs: ["onChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
813
586
|
}
|
|
814
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppConfigurator, decorators: [{
|
|
815
588
|
type: Component,
|
|
816
589
|
args: [{
|
|
817
590
|
selector: 'app-configurator',
|
|
818
|
-
imports: [
|
|
591
|
+
imports: [UiModule, FormsModule, TranslatePipe],
|
|
819
592
|
template: `
|
|
820
593
|
<div class="flex flex-col gap-4">
|
|
821
594
|
<div>
|
|
@@ -828,13 +601,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
828
601
|
type="button"
|
|
829
602
|
[title]="primaryColor.name"
|
|
830
603
|
(click)="updateColors($event, 'primary', primaryColor)"
|
|
831
|
-
[class.outline-primary]="
|
|
832
|
-
primaryColor.name === selectedPrimaryColor()
|
|
833
|
-
"
|
|
604
|
+
[class.outline-primary]="primaryColor.name === selectedPrimaryColor()"
|
|
834
605
|
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
835
606
|
[style.background-color]="
|
|
836
607
|
primaryColor?.name === 'noir'
|
|
837
|
-
? 'var(--text-color)'
|
|
608
|
+
? 'var(--f-text-color)'
|
|
838
609
|
: primaryColor?.palette?.['500']
|
|
839
610
|
"
|
|
840
611
|
></button>
|
|
@@ -855,7 +626,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
855
626
|
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
856
627
|
[style.background-color]="
|
|
857
628
|
surface?.name === 'noir'
|
|
858
|
-
? 'var(--text-color)'
|
|
629
|
+
? 'var(--f-text-color)'
|
|
859
630
|
: surface?.palette?.['500']
|
|
860
631
|
"
|
|
861
632
|
></button>
|
|
@@ -866,7 +637,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
866
637
|
<span class="text-sm text-muted-color font-semibold">{{
|
|
867
638
|
'layout.configurator.presets' | translate
|
|
868
639
|
}}</span>
|
|
869
|
-
<
|
|
640
|
+
<f-selectbutton
|
|
870
641
|
[options]="presets"
|
|
871
642
|
[ngModel]="selectedPreset()"
|
|
872
643
|
(ngModelChange)="onPresetChange($event)"
|
|
@@ -879,7 +650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
879
650
|
<span class="text-sm text-muted-color font-semibold">{{
|
|
880
651
|
'layout.configurator.menu.mode' | translate
|
|
881
652
|
}}</span>
|
|
882
|
-
<
|
|
653
|
+
<f-selectbutton
|
|
883
654
|
[ngModel]="menuMode()"
|
|
884
655
|
(ngModelChange)="onMenuModeChange($event)"
|
|
885
656
|
[options]="menuModeOptions()"
|
|
@@ -891,7 +662,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
891
662
|
</div>
|
|
892
663
|
`,
|
|
893
664
|
host: {
|
|
894
|
-
class: 'hidden absolute top-[3.25rem] w-[calc(100vw-2rem)] sm:w-72 max-w-72 p-4 border border-surface rounded-border origin-top shadow-
|
|
665
|
+
class: 'hidden absolute top-[3.25rem] w-[calc(100vw-2rem)] sm:w-72 max-w-72 p-4 border border-surface rounded-border origin-top shadow-xl',
|
|
895
666
|
style: 'background-color: var(--surface-overlay); inset-inline-end: 0;',
|
|
896
667
|
},
|
|
897
668
|
}]
|
|
@@ -911,28 +682,31 @@ class AppFloatingConfigurator {
|
|
|
911
682
|
languageSelectorPanel = inject(LAYOUT_LANGUAGE_SELECTOR_PANEL, {
|
|
912
683
|
optional: true,
|
|
913
684
|
});
|
|
914
|
-
isDarkTheme = computed(() => this.layoutService.layoutConfig().darkTheme,
|
|
685
|
+
isDarkTheme = computed(() => this.layoutService.layoutConfig().darkTheme, /* @ts-ignore */
|
|
686
|
+
...(ngDevMode ? [{ debugName: "isDarkTheme" }] : /* istanbul ignore next */ []));
|
|
915
687
|
toggleDarkMode() {
|
|
916
688
|
const currentDarkTheme = this.layoutService.layoutConfig().darkTheme;
|
|
917
689
|
this.layoutService.updateLayoutConfig({ darkTheme: !currentDarkTheme });
|
|
918
690
|
}
|
|
919
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
920
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
691
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppFloatingConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
692
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppFloatingConfigurator, isStandalone: true, selector: "app-floating-configurator", ngImport: i0, template: `
|
|
921
693
|
<div
|
|
922
694
|
class="floating-configurator fixed flex flex-col md:flex-row gap-2 md:gap-4 top-4 md:top-8 z-50"
|
|
923
695
|
>
|
|
924
|
-
<
|
|
696
|
+
<button
|
|
697
|
+
fButton
|
|
925
698
|
type="button"
|
|
926
|
-
(
|
|
699
|
+
(click)="toggleDarkMode()"
|
|
927
700
|
[rounded]="true"
|
|
928
|
-
[icon]="isDarkTheme() ? 'pi pi-moon' : 'pi pi-sun'"
|
|
929
701
|
severity="secondary"
|
|
930
|
-
|
|
702
|
+
>
|
|
703
|
+
<ui-icon pButtonIcon [name]="isDarkTheme() ? 'moon' : 'sun'"></ui-icon>
|
|
704
|
+
</button>
|
|
931
705
|
@if (languageSelectorPanel) {
|
|
932
706
|
<div class="relative">
|
|
933
|
-
<
|
|
934
|
-
|
|
935
|
-
|
|
707
|
+
<button
|
|
708
|
+
fButton
|
|
709
|
+
fStyleClass="@next"
|
|
936
710
|
enterFromClass="hidden"
|
|
937
711
|
enterActiveClass="animate-scalein"
|
|
938
712
|
leaveToClass="hidden"
|
|
@@ -940,14 +714,16 @@ class AppFloatingConfigurator {
|
|
|
940
714
|
[hideOnOutsideClick]="true"
|
|
941
715
|
type="button"
|
|
942
716
|
rounded
|
|
943
|
-
|
|
717
|
+
>
|
|
718
|
+
<ui-icon pButtonIcon name="globe"></ui-icon>
|
|
719
|
+
</button>
|
|
944
720
|
<ng-container *ngComponentOutlet="languageSelectorPanel" />
|
|
945
721
|
</div>
|
|
946
722
|
}
|
|
947
723
|
<div class="relative">
|
|
948
|
-
<
|
|
949
|
-
|
|
950
|
-
|
|
724
|
+
<button
|
|
725
|
+
fButton
|
|
726
|
+
fStyleClass="@next"
|
|
951
727
|
enterFromClass="hidden"
|
|
952
728
|
enterActiveClass="animate-scalein"
|
|
953
729
|
leaveToClass="hidden"
|
|
@@ -955,30 +731,34 @@ class AppFloatingConfigurator {
|
|
|
955
731
|
[hideOnOutsideClick]="true"
|
|
956
732
|
type="button"
|
|
957
733
|
rounded
|
|
958
|
-
|
|
734
|
+
>
|
|
735
|
+
<ui-icon pButtonIcon name="palette"></ui-icon>
|
|
736
|
+
</button>
|
|
959
737
|
<app-configurator />
|
|
960
738
|
</div>
|
|
961
739
|
</div>
|
|
962
|
-
`, isInline: true, styles: [".floating-configurator{inset-inline-end:.5rem}@media(min-width:768px){.floating-configurator{inset-inline-end:2rem}}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type:
|
|
740
|
+
`, isInline: true, styles: [".floating-configurator{inset-inline-end:.5rem}@media(min-width:768px){.floating-configurator{inset-inline-end:2rem}}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: UiModule }, { kind: "directive", type: i1.FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "rounded", "raised", "fluid", "disabled", "loading", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "directive", type: i1.StyleClassDirective, selector: "[fStyleClass]", inputs: ["fStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }] });
|
|
963
741
|
}
|
|
964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
742
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppFloatingConfigurator, decorators: [{
|
|
965
743
|
type: Component,
|
|
966
|
-
args: [{ selector: 'app-floating-configurator', imports: [NgComponentOutlet,
|
|
744
|
+
args: [{ selector: 'app-floating-configurator', imports: [NgComponentOutlet, UiModule, AppConfigurator], template: `
|
|
967
745
|
<div
|
|
968
746
|
class="floating-configurator fixed flex flex-col md:flex-row gap-2 md:gap-4 top-4 md:top-8 z-50"
|
|
969
747
|
>
|
|
970
|
-
<
|
|
748
|
+
<button
|
|
749
|
+
fButton
|
|
971
750
|
type="button"
|
|
972
|
-
(
|
|
751
|
+
(click)="toggleDarkMode()"
|
|
973
752
|
[rounded]="true"
|
|
974
|
-
[icon]="isDarkTheme() ? 'pi pi-moon' : 'pi pi-sun'"
|
|
975
753
|
severity="secondary"
|
|
976
|
-
|
|
754
|
+
>
|
|
755
|
+
<ui-icon pButtonIcon [name]="isDarkTheme() ? 'moon' : 'sun'"></ui-icon>
|
|
756
|
+
</button>
|
|
977
757
|
@if (languageSelectorPanel) {
|
|
978
758
|
<div class="relative">
|
|
979
|
-
<
|
|
980
|
-
|
|
981
|
-
|
|
759
|
+
<button
|
|
760
|
+
fButton
|
|
761
|
+
fStyleClass="@next"
|
|
982
762
|
enterFromClass="hidden"
|
|
983
763
|
enterActiveClass="animate-scalein"
|
|
984
764
|
leaveToClass="hidden"
|
|
@@ -986,14 +766,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
986
766
|
[hideOnOutsideClick]="true"
|
|
987
767
|
type="button"
|
|
988
768
|
rounded
|
|
989
|
-
|
|
769
|
+
>
|
|
770
|
+
<ui-icon pButtonIcon name="globe"></ui-icon>
|
|
771
|
+
</button>
|
|
990
772
|
<ng-container *ngComponentOutlet="languageSelectorPanel" />
|
|
991
773
|
</div>
|
|
992
774
|
}
|
|
993
775
|
<div class="relative">
|
|
994
|
-
<
|
|
995
|
-
|
|
996
|
-
|
|
776
|
+
<button
|
|
777
|
+
fButton
|
|
778
|
+
fStyleClass="@next"
|
|
997
779
|
enterFromClass="hidden"
|
|
998
780
|
enterActiveClass="animate-scalein"
|
|
999
781
|
leaveToClass="hidden"
|
|
@@ -1001,7 +783,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1001
783
|
[hideOnOutsideClick]="true"
|
|
1002
784
|
type="button"
|
|
1003
785
|
rounded
|
|
1004
|
-
|
|
786
|
+
>
|
|
787
|
+
<ui-icon pButtonIcon name="palette"></ui-icon>
|
|
788
|
+
</button>
|
|
1005
789
|
<app-configurator />
|
|
1006
790
|
</div>
|
|
1007
791
|
</div>
|
|
@@ -1010,27 +794,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1010
794
|
|
|
1011
795
|
class AppMenuitem {
|
|
1012
796
|
// Signal inputs
|
|
1013
|
-
item = input.required(
|
|
1014
|
-
|
|
1015
|
-
|
|
797
|
+
item = input.required(/* @ts-ignore */
|
|
798
|
+
...(ngDevMode ? [{ debugName: "item" }] : /* istanbul ignore next */ []));
|
|
799
|
+
index = input.required(/* @ts-ignore */
|
|
800
|
+
...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
|
|
801
|
+
parentKey = input('', /* @ts-ignore */
|
|
802
|
+
...(ngDevMode ? [{ debugName: "parentKey" }] : /* istanbul ignore next */ []));
|
|
1016
803
|
// Injected services
|
|
1017
804
|
router = inject(Router);
|
|
1018
805
|
layoutService = inject(LayoutService);
|
|
1019
806
|
destroyRef = inject(DestroyRef);
|
|
1020
807
|
// View references
|
|
1021
|
-
parentLink = viewChild('parentLink',
|
|
808
|
+
parentLink = viewChild('parentLink', /* @ts-ignore */
|
|
809
|
+
...(ngDevMode ? [{ debugName: "parentLink" }] : /* istanbul ignore next */ []));
|
|
1022
810
|
// State signals - private writable + public readonly pattern
|
|
1023
|
-
_active = signal(false,
|
|
811
|
+
_active = signal(false, /* @ts-ignore */
|
|
812
|
+
...(ngDevMode ? [{ debugName: "_active" }] : /* istanbul ignore next */ []));
|
|
1024
813
|
active = this._active.asReadonly();
|
|
1025
814
|
// Computed signals
|
|
1026
815
|
key = computed(() => {
|
|
1027
816
|
const parent = this.parentKey();
|
|
1028
817
|
return parent ? `${parent}-${this.index()}` : String(this.index());
|
|
1029
|
-
},
|
|
818
|
+
}, /* @ts-ignore */
|
|
819
|
+
...(ngDevMode ? [{ debugName: "key" }] : /* istanbul ignore next */ []));
|
|
1030
820
|
routerLink = computed(() => {
|
|
1031
821
|
const menuItem = this.item();
|
|
1032
822
|
return menuItem.routerLink ?? [];
|
|
1033
|
-
},
|
|
823
|
+
}, /* @ts-ignore */
|
|
824
|
+
...(ngDevMode ? [{ debugName: "routerLink" }] : /* istanbul ignore next */ []));
|
|
1034
825
|
// Computed options for routerLinkActive - use 'exact' for root, 'subset' for others
|
|
1035
826
|
routerLinkActiveOptions = computed(() => {
|
|
1036
827
|
const link = this.routerLink();
|
|
@@ -1041,7 +832,8 @@ class AppMenuitem {
|
|
|
1041
832
|
matrixParams: 'ignored',
|
|
1042
833
|
fragment: 'ignored',
|
|
1043
834
|
};
|
|
1044
|
-
},
|
|
835
|
+
}, /* @ts-ignore */
|
|
836
|
+
...(ngDevMode ? [{ debugName: "routerLinkActiveOptions" }] : /* istanbul ignore next */ []));
|
|
1045
837
|
constructor() {
|
|
1046
838
|
// Subscribe to menu source changes
|
|
1047
839
|
this.layoutService.menuSource$
|
|
@@ -1111,13 +903,13 @@ class AppMenuitem {
|
|
|
1111
903
|
// Use 'exact' for root path to avoid matching all routes
|
|
1112
904
|
// Use 'subset' for all other paths to match child routes
|
|
1113
905
|
const pathsMatch = link[0] === '/' ? 'exact' : 'subset';
|
|
1114
|
-
const
|
|
906
|
+
const active = isActive(link[0], this.router, {
|
|
1115
907
|
paths: pathsMatch,
|
|
1116
908
|
queryParams: 'ignored',
|
|
1117
909
|
matrixParams: 'ignored',
|
|
1118
910
|
fragment: 'ignored',
|
|
1119
|
-
});
|
|
1120
|
-
if (
|
|
911
|
+
})();
|
|
912
|
+
if (active) {
|
|
1121
913
|
this.layoutService.onMenuStateChange({
|
|
1122
914
|
key: this.key(),
|
|
1123
915
|
routeEvent: true,
|
|
@@ -1130,8 +922,8 @@ class AppMenuitem {
|
|
|
1130
922
|
}
|
|
1131
923
|
this.layoutService.onMenuStateChange({ key: this.key() });
|
|
1132
924
|
}
|
|
1133
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1134
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
925
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppMenuitem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
926
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppMenuitem, isStandalone: true, selector: "[app-menuitem]", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null }, parentKey: { classPropertyName: "parentKey", publicName: "parentKey", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.active-menuitem": "active()" } }, viewQueries: [{ propertyName: "parentLink", first: true, predicate: ["parentLink"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
1135
927
|
<ng-container>
|
|
1136
928
|
@if (item().children?.length) {
|
|
1137
929
|
<a
|
|
@@ -1139,7 +931,6 @@ class AppMenuitem {
|
|
|
1139
931
|
(mouseenter)="onMouseEnter()"
|
|
1140
932
|
#parentLink
|
|
1141
933
|
tabindex="0"
|
|
1142
|
-
pRipple
|
|
1143
934
|
>
|
|
1144
935
|
@if (item().icon) {
|
|
1145
936
|
<lib-icon
|
|
@@ -1153,9 +944,9 @@ class AppMenuitem {
|
|
|
1153
944
|
}}</span>
|
|
1154
945
|
@if (item().children) {
|
|
1155
946
|
@if (layoutService.isTopbar()) {
|
|
1156
|
-
<
|
|
947
|
+
<ui-icon name="chevron-right" class="layout-submenu-toggler"></ui-icon>
|
|
1157
948
|
} @else {
|
|
1158
|
-
<
|
|
949
|
+
<ui-icon name="angle-down" class="layout-submenu-toggler"></ui-icon>
|
|
1159
950
|
}
|
|
1160
951
|
}
|
|
1161
952
|
</a>
|
|
@@ -1167,7 +958,6 @@ class AppMenuitem {
|
|
|
1167
958
|
routerLinkActive="active-route"
|
|
1168
959
|
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
1169
960
|
tabindex="0"
|
|
1170
|
-
pRipple
|
|
1171
961
|
>
|
|
1172
962
|
@if (item().icon) {
|
|
1173
963
|
<lib-icon
|
|
@@ -1202,11 +992,11 @@ class AppMenuitem {
|
|
|
1202
992
|
</ul>
|
|
1203
993
|
}
|
|
1204
994
|
</ng-container>
|
|
1205
|
-
`, isInline: true, styles: [":host ul{overflow:hidden;transition:max-height .4s cubic-bezier(.86,0,.07,1)}:host ul.submenu-collapsed{max-height:0}:host ul.submenu-expanded{max-height:1000px}\n"], dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "parentKey"] }, { kind: "component", type: IconComponent, selector: "lib-icon", inputs: ["icon", "iconType"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type:
|
|
995
|
+
`, isInline: true, styles: [":host ul{overflow:hidden;transition:max-height .4s cubic-bezier(.86,0,.07,1)}:host ul.submenu-collapsed{max-height:0}:host ul.submenu-expanded{max-height:1000px}\n"], dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "parentKey"] }, { kind: "ngmodule", type: UiModule }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "component", type: IconComponent, selector: "lib-icon", inputs: ["icon", "iconType"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i2$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1206
996
|
}
|
|
1207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
997
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppMenuitem, decorators: [{
|
|
1208
998
|
type: Component,
|
|
1209
|
-
args: [{ selector: '[app-menuitem]', imports: [IconComponent, RouterModule,
|
|
999
|
+
args: [{ selector: '[app-menuitem]', imports: [UiModule, IconComponent, RouterModule, TranslatePipe], template: `
|
|
1210
1000
|
<ng-container>
|
|
1211
1001
|
@if (item().children?.length) {
|
|
1212
1002
|
<a
|
|
@@ -1214,7 +1004,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1214
1004
|
(mouseenter)="onMouseEnter()"
|
|
1215
1005
|
#parentLink
|
|
1216
1006
|
tabindex="0"
|
|
1217
|
-
pRipple
|
|
1218
1007
|
>
|
|
1219
1008
|
@if (item().icon) {
|
|
1220
1009
|
<lib-icon
|
|
@@ -1228,9 +1017,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1228
1017
|
}}</span>
|
|
1229
1018
|
@if (item().children) {
|
|
1230
1019
|
@if (layoutService.isTopbar()) {
|
|
1231
|
-
<
|
|
1020
|
+
<ui-icon name="chevron-right" class="layout-submenu-toggler"></ui-icon>
|
|
1232
1021
|
} @else {
|
|
1233
|
-
<
|
|
1022
|
+
<ui-icon name="angle-down" class="layout-submenu-toggler"></ui-icon>
|
|
1234
1023
|
}
|
|
1235
1024
|
}
|
|
1236
1025
|
</a>
|
|
@@ -1242,7 +1031,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1242
1031
|
routerLinkActive="active-route"
|
|
1243
1032
|
[routerLinkActiveOptions]="routerLinkActiveOptions()"
|
|
1244
1033
|
tabindex="0"
|
|
1245
|
-
pRipple
|
|
1246
1034
|
>
|
|
1247
1035
|
@if (item().icon) {
|
|
1248
1036
|
<lib-icon
|
|
@@ -1296,8 +1084,8 @@ class AppMenu {
|
|
|
1296
1084
|
* - Permission state changes (user permissions updated)
|
|
1297
1085
|
*/
|
|
1298
1086
|
menuItems = this.layoutService.menu;
|
|
1299
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1300
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1087
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppMenu, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1088
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppMenu, isStandalone: true, selector: "app-menu", ngImport: i0, template: `<div class="layout-menu">
|
|
1301
1089
|
<ul>
|
|
1302
1090
|
@for (
|
|
1303
1091
|
item of menuItems();
|
|
@@ -1309,7 +1097,7 @@ class AppMenu {
|
|
|
1309
1097
|
</ul>
|
|
1310
1098
|
</div>`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "parentKey"] }, { kind: "ngmodule", type: RouterModule }] });
|
|
1311
1099
|
}
|
|
1312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppMenu, decorators: [{
|
|
1313
1101
|
type: Component,
|
|
1314
1102
|
args: [{
|
|
1315
1103
|
selector: 'app-menu',
|
|
@@ -1344,7 +1132,8 @@ class AppCompanyBranchSelector {
|
|
|
1344
1132
|
});
|
|
1345
1133
|
document = inject(DOCUMENT$1);
|
|
1346
1134
|
elementRef = inject(ElementRef);
|
|
1347
|
-
_isActive = signal(false,
|
|
1135
|
+
_isActive = signal(false, /* @ts-ignore */
|
|
1136
|
+
...(ngDevMode ? [{ debugName: "_isActive" }] : /* istanbul ignore next */ []));
|
|
1348
1137
|
isActive = this._isActive.asReadonly();
|
|
1349
1138
|
constructor() {
|
|
1350
1139
|
fromEvent(this.document, 'click')
|
|
@@ -1357,21 +1146,30 @@ class AppCompanyBranchSelector {
|
|
|
1357
1146
|
});
|
|
1358
1147
|
}
|
|
1359
1148
|
currentCompanyName = computed(() => this.authState?.currentCompanyInfo()?.name ??
|
|
1360
|
-
this.translate('layout.company.branch.selector.no.company'),
|
|
1361
|
-
|
|
1362
|
-
|
|
1149
|
+
this.translate('layout.company.branch.selector.no.company'), /* @ts-ignore */
|
|
1150
|
+
...(ngDevMode ? [{ debugName: "currentCompanyName" }] : /* istanbul ignore next */ []));
|
|
1151
|
+
currentBranchName = computed(() => this.authState?.currentBranchInfo()?.name ?? null, /* @ts-ignore */
|
|
1152
|
+
...(ngDevMode ? [{ debugName: "currentBranchName" }] : /* istanbul ignore next */ []));
|
|
1153
|
+
_companies = signal([], /* @ts-ignore */
|
|
1154
|
+
...(ngDevMode ? [{ debugName: "_companies" }] : /* istanbul ignore next */ []));
|
|
1363
1155
|
companies = this._companies.asReadonly();
|
|
1364
|
-
_branches = signal([],
|
|
1156
|
+
_branches = signal([], /* @ts-ignore */
|
|
1157
|
+
...(ngDevMode ? [{ debugName: "_branches" }] : /* istanbul ignore next */ []));
|
|
1365
1158
|
branches = this._branches.asReadonly();
|
|
1366
|
-
_selectedCompanyId = signal(null,
|
|
1159
|
+
_selectedCompanyId = signal(null, /* @ts-ignore */
|
|
1160
|
+
...(ngDevMode ? [{ debugName: "_selectedCompanyId" }] : /* istanbul ignore next */ []));
|
|
1367
1161
|
selectedCompanyId = this._selectedCompanyId.asReadonly();
|
|
1368
|
-
_selectedBranchId = signal(null,
|
|
1162
|
+
_selectedBranchId = signal(null, /* @ts-ignore */
|
|
1163
|
+
...(ngDevMode ? [{ debugName: "_selectedBranchId" }] : /* istanbul ignore next */ []));
|
|
1369
1164
|
selectedBranchId = this._selectedBranchId.asReadonly();
|
|
1370
|
-
_isLoadingCompanies = signal(false,
|
|
1165
|
+
_isLoadingCompanies = signal(false, /* @ts-ignore */
|
|
1166
|
+
...(ngDevMode ? [{ debugName: "_isLoadingCompanies" }] : /* istanbul ignore next */ []));
|
|
1371
1167
|
isLoadingCompanies = this._isLoadingCompanies.asReadonly();
|
|
1372
|
-
_isLoadingBranches = signal(false,
|
|
1168
|
+
_isLoadingBranches = signal(false, /* @ts-ignore */
|
|
1169
|
+
...(ngDevMode ? [{ debugName: "_isLoadingBranches" }] : /* istanbul ignore next */ []));
|
|
1373
1170
|
isLoadingBranches = this._isLoadingBranches.asReadonly();
|
|
1374
|
-
_isSwitching = signal(false,
|
|
1171
|
+
_isSwitching = signal(false, /* @ts-ignore */
|
|
1172
|
+
...(ngDevMode ? [{ debugName: "_isSwitching" }] : /* istanbul ignore next */ []));
|
|
1375
1173
|
isSwitching = this._isSwitching.asReadonly();
|
|
1376
1174
|
canSwitch = computed(() => {
|
|
1377
1175
|
const selectedCompany = this.selectedCompanyId();
|
|
@@ -1381,7 +1179,8 @@ class AppCompanyBranchSelector {
|
|
|
1381
1179
|
const currentBranchId = this.authState?.currentBranchInfo()?.id;
|
|
1382
1180
|
const selectedBranch = this.selectedBranchId();
|
|
1383
1181
|
return (selectedCompany !== currentCompanyId || selectedBranch !== currentBranchId);
|
|
1384
|
-
},
|
|
1182
|
+
}, /* @ts-ignore */
|
|
1183
|
+
...(ngDevMode ? [{ debugName: "canSwitch" }] : /* istanbul ignore next */ []));
|
|
1385
1184
|
onPanelToggle() {
|
|
1386
1185
|
this._isActive.update((v) => !v);
|
|
1387
1186
|
if (this.isActive() && this.companies().length === 0) {
|
|
@@ -1469,13 +1268,13 @@ class AppCompanyBranchSelector {
|
|
|
1469
1268
|
translate(key) {
|
|
1470
1269
|
return this.translateAdapter?.translate(key) ?? key;
|
|
1471
1270
|
}
|
|
1472
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1271
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppCompanyBranchSelector, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1272
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppCompanyBranchSelector, isStandalone: true, selector: "app-company-branch-selector", host: { classAttribute: "relative" }, ngImport: i0, template: `
|
|
1474
1273
|
<button
|
|
1475
1274
|
type="button"
|
|
1476
1275
|
class="layout-topbar-action"
|
|
1477
1276
|
[class.layout-topbar-action-highlight]="isActive()"
|
|
1478
|
-
|
|
1277
|
+
fStyleClass="@next"
|
|
1479
1278
|
enterFromClass="hidden"
|
|
1480
1279
|
enterActiveClass="animate-scalein"
|
|
1481
1280
|
leaveToClass="hidden"
|
|
@@ -1483,14 +1282,14 @@ class AppCompanyBranchSelector {
|
|
|
1483
1282
|
[hideOnOutsideClick]="true"
|
|
1484
1283
|
(click)="onPanelToggle()"
|
|
1485
1284
|
>
|
|
1486
|
-
<
|
|
1285
|
+
<ui-icon name="building"></ui-icon>
|
|
1487
1286
|
<span>{{ currentCompanyName() }}</span>
|
|
1488
1287
|
@if (currentBranchName()) {
|
|
1489
1288
|
<span class="text-xs opacity-70"> | {{ currentBranchName() }}</span>
|
|
1490
1289
|
}
|
|
1491
1290
|
</button>
|
|
1492
1291
|
<div
|
|
1493
|
-
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-
|
|
1292
|
+
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-xl w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[300px] max-w-[360px]"
|
|
1494
1293
|
style="background-color: var(--surface-overlay); inset-inline-end: 0;"
|
|
1495
1294
|
>
|
|
1496
1295
|
<div class="flex flex-col gap-4">
|
|
@@ -1503,7 +1302,7 @@ class AppCompanyBranchSelector {
|
|
|
1503
1302
|
<label class="text-sm text-muted-color font-semibold">{{
|
|
1504
1303
|
'shared.company' | translate
|
|
1505
1304
|
}}</label>
|
|
1506
|
-
<
|
|
1305
|
+
<f-select
|
|
1507
1306
|
[options]="companies()"
|
|
1508
1307
|
[ngModel]="selectedCompanyId()"
|
|
1509
1308
|
(ngModelChange)="onCompanyChange($event)"
|
|
@@ -1523,7 +1322,7 @@ class AppCompanyBranchSelector {
|
|
|
1523
1322
|
<label class="text-sm text-muted-color font-semibold">{{
|
|
1524
1323
|
'layout.company.branch.selector.branch' | translate
|
|
1525
1324
|
}}</label>
|
|
1526
|
-
<
|
|
1325
|
+
<f-select
|
|
1527
1326
|
[options]="branches()"
|
|
1528
1327
|
[ngModel]="selectedBranchId()"
|
|
1529
1328
|
(ngModelChange)="onBranchChange($event)"
|
|
@@ -1540,37 +1339,37 @@ class AppCompanyBranchSelector {
|
|
|
1540
1339
|
|
|
1541
1340
|
<!-- Actions -->
|
|
1542
1341
|
<div class="flex gap-2 pt-2">
|
|
1543
|
-
<
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
(
|
|
1550
|
-
|
|
1342
|
+
<button
|
|
1343
|
+
fButton
|
|
1344
|
+
class="flex-1"
|
|
1345
|
+
[disabled]="!canSwitch() || isSwitching()"
|
|
1346
|
+
(click)="onSwitch()"
|
|
1347
|
+
>
|
|
1348
|
+
@if (isSwitching()) {
|
|
1349
|
+
<ui-icon pButtonIcon name="spinner" [spin]="true"></ui-icon>
|
|
1350
|
+
} @else {
|
|
1351
|
+
<ui-icon pButtonIcon name="sync"></ui-icon>
|
|
1352
|
+
}
|
|
1353
|
+
<span pButtonLabel>{{ 'layout.company.branch.selector.switch.button' | translate }}</span>
|
|
1354
|
+
</button>
|
|
1551
1355
|
</div>
|
|
1552
1356
|
</div>
|
|
1553
1357
|
</div>
|
|
1554
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
1358
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: UiModule }, { kind: "directive", type: i1.FButtonDirective, selector: "[fButton]", inputs: ["severity", "text", "outlined", "link", "rounded", "raised", "fluid", "disabled", "loading", "size", "label", "icon", "iconPos", "ariaLabel", "plain"] }, { kind: "component", type: i1.SelectComponent, selector: "f-select", inputs: ["options", "optionLabel", "optionValue", "placeholder", "disabled", "filter", "showClear", "loading", "inputId", "invalid", "touched", "styleClass", "editable"], outputs: ["onFilter", "onChange", "onShow", "onHide", "onBlur"] }, { kind: "directive", type: i1.StyleClassDirective, selector: "[fStyleClass]", inputs: ["fStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1555
1359
|
}
|
|
1556
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1360
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppCompanyBranchSelector, decorators: [{
|
|
1557
1361
|
type: Component,
|
|
1558
1362
|
args: [{
|
|
1559
1363
|
selector: 'app-company-branch-selector',
|
|
1560
|
-
imports: [
|
|
1561
|
-
|
|
1562
|
-
StyleClassModule,
|
|
1563
|
-
ButtonModule,
|
|
1564
|
-
SelectModule,
|
|
1565
|
-
TranslatePipe,
|
|
1566
|
-
],
|
|
1364
|
+
imports: [UiModule, AngularModule,
|
|
1365
|
+
TranslatePipe,],
|
|
1567
1366
|
host: { class: 'relative' },
|
|
1568
1367
|
template: `
|
|
1569
1368
|
<button
|
|
1570
1369
|
type="button"
|
|
1571
1370
|
class="layout-topbar-action"
|
|
1572
1371
|
[class.layout-topbar-action-highlight]="isActive()"
|
|
1573
|
-
|
|
1372
|
+
fStyleClass="@next"
|
|
1574
1373
|
enterFromClass="hidden"
|
|
1575
1374
|
enterActiveClass="animate-scalein"
|
|
1576
1375
|
leaveToClass="hidden"
|
|
@@ -1578,14 +1377,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1578
1377
|
[hideOnOutsideClick]="true"
|
|
1579
1378
|
(click)="onPanelToggle()"
|
|
1580
1379
|
>
|
|
1581
|
-
<
|
|
1380
|
+
<ui-icon name="building"></ui-icon>
|
|
1582
1381
|
<span>{{ currentCompanyName() }}</span>
|
|
1583
1382
|
@if (currentBranchName()) {
|
|
1584
1383
|
<span class="text-xs opacity-70"> | {{ currentBranchName() }}</span>
|
|
1585
1384
|
}
|
|
1586
1385
|
</button>
|
|
1587
1386
|
<div
|
|
1588
|
-
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-
|
|
1387
|
+
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-xl w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[300px] max-w-[360px]"
|
|
1589
1388
|
style="background-color: var(--surface-overlay); inset-inline-end: 0;"
|
|
1590
1389
|
>
|
|
1591
1390
|
<div class="flex flex-col gap-4">
|
|
@@ -1598,7 +1397,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1598
1397
|
<label class="text-sm text-muted-color font-semibold">{{
|
|
1599
1398
|
'shared.company' | translate
|
|
1600
1399
|
}}</label>
|
|
1601
|
-
<
|
|
1400
|
+
<f-select
|
|
1602
1401
|
[options]="companies()"
|
|
1603
1402
|
[ngModel]="selectedCompanyId()"
|
|
1604
1403
|
(ngModelChange)="onCompanyChange($event)"
|
|
@@ -1618,7 +1417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1618
1417
|
<label class="text-sm text-muted-color font-semibold">{{
|
|
1619
1418
|
'layout.company.branch.selector.branch' | translate
|
|
1620
1419
|
}}</label>
|
|
1621
|
-
<
|
|
1420
|
+
<f-select
|
|
1622
1421
|
[options]="branches()"
|
|
1623
1422
|
[ngModel]="selectedBranchId()"
|
|
1624
1423
|
(ngModelChange)="onBranchChange($event)"
|
|
@@ -1635,14 +1434,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1635
1434
|
|
|
1636
1435
|
<!-- Actions -->
|
|
1637
1436
|
<div class="flex gap-2 pt-2">
|
|
1638
|
-
<
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
(
|
|
1645
|
-
|
|
1437
|
+
<button
|
|
1438
|
+
fButton
|
|
1439
|
+
class="flex-1"
|
|
1440
|
+
[disabled]="!canSwitch() || isSwitching()"
|
|
1441
|
+
(click)="onSwitch()"
|
|
1442
|
+
>
|
|
1443
|
+
@if (isSwitching()) {
|
|
1444
|
+
<ui-icon pButtonIcon name="spinner" [spin]="true"></ui-icon>
|
|
1445
|
+
} @else {
|
|
1446
|
+
<ui-icon pButtonIcon name="sync"></ui-icon>
|
|
1447
|
+
}
|
|
1448
|
+
<span pButtonLabel>{{ 'layout.company.branch.selector.switch.button' | translate }}</span>
|
|
1449
|
+
</button>
|
|
1646
1450
|
</div>
|
|
1647
1451
|
</div>
|
|
1648
1452
|
</div>
|
|
@@ -1651,15 +1455,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1651
1455
|
}], ctorParameters: () => [] });
|
|
1652
1456
|
|
|
1653
1457
|
class AppLauncher {
|
|
1458
|
+
layoutService = inject(LayoutService);
|
|
1654
1459
|
destroyRef = inject(DestroyRef);
|
|
1655
1460
|
document = inject(DOCUMENT$1);
|
|
1656
1461
|
elementRef = inject(ElementRef);
|
|
1657
|
-
|
|
1658
|
-
|
|
1462
|
+
_isActive = signal(false, /* @ts-ignore */
|
|
1463
|
+
...(ngDevMode ? [{ debugName: "_isActive" }] : /* istanbul ignore next */ []));
|
|
1659
1464
|
isActive = this._isActive.asReadonly();
|
|
1660
1465
|
constructor() {
|
|
1661
1466
|
fromEvent(this.document, 'click')
|
|
1662
|
-
.pipe(takeUntilDestroyed(this.destroyRef), filter(() => this.
|
|
1467
|
+
.pipe(takeUntilDestroyed(this.destroyRef), filter(() => this.isActive()))
|
|
1663
1468
|
.subscribe((event) => {
|
|
1664
1469
|
const target = event.target;
|
|
1665
1470
|
if (!this.elementRef.nativeElement.contains(target)) {
|
|
@@ -1667,117 +1472,121 @@ class AppLauncher {
|
|
|
1667
1472
|
}
|
|
1668
1473
|
});
|
|
1669
1474
|
}
|
|
1670
|
-
|
|
1475
|
+
toggleActive() {
|
|
1671
1476
|
this._isActive.update((v) => !v);
|
|
1672
1477
|
}
|
|
1673
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1674
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1478
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppLauncher, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1479
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppLauncher, isStandalone: true, selector: "app-launcher", host: { classAttribute: "relative" }, ngImport: i0, template: `
|
|
1675
1480
|
<button
|
|
1676
1481
|
type="button"
|
|
1677
1482
|
class="layout-topbar-action"
|
|
1678
1483
|
[class.layout-topbar-action-highlight]="isActive()"
|
|
1679
|
-
|
|
1484
|
+
fStyleClass="@next"
|
|
1680
1485
|
enterFromClass="hidden"
|
|
1681
1486
|
enterActiveClass="animate-scalein"
|
|
1682
1487
|
leaveToClass="hidden"
|
|
1683
1488
|
leaveActiveClass="animate-fadeout"
|
|
1684
1489
|
[hideOnOutsideClick]="true"
|
|
1685
|
-
(click)="
|
|
1490
|
+
(click)="toggleActive()"
|
|
1686
1491
|
>
|
|
1687
|
-
<
|
|
1492
|
+
<ui-icon name="th-large"></ui-icon>
|
|
1688
1493
|
<span>{{ 'layout.launcher.apps' | translate }}</span>
|
|
1689
1494
|
</button>
|
|
1690
1495
|
<div
|
|
1691
|
-
class="hidden absolute top-[3.25rem] z-50
|
|
1692
|
-
style="
|
|
1496
|
+
class="hidden absolute top-[3.25rem] z-50 border border-surface rounded-border origin-top surface-overlay"
|
|
1497
|
+
style="inset-inline-end: 0; min-width: 16rem; max-width: 22rem; width: calc(100vw - 2rem); box-shadow: var(--f-shadow-xl);"
|
|
1693
1498
|
>
|
|
1694
|
-
<div class="
|
|
1695
|
-
<span class="text-
|
|
1499
|
+
<div class="px-4 py-3 border-b border-surface">
|
|
1500
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-muted-color">{{
|
|
1696
1501
|
'layout.launcher.applications' | translate
|
|
1697
1502
|
}}</span>
|
|
1698
|
-
|
|
1503
|
+
</div>
|
|
1504
|
+
@if (layoutService.apps().length === 0) {
|
|
1505
|
+
<div class="px-4 py-6 text-center text-muted-color text-sm">
|
|
1506
|
+
{{ 'layout.launcher.no.apps' | translate }}
|
|
1507
|
+
</div>
|
|
1508
|
+
} @else {
|
|
1509
|
+
<div class="p-3 grid grid-cols-3 gap-1">
|
|
1699
1510
|
@for (app of layoutService.apps(); track app.id) {
|
|
1700
1511
|
<a
|
|
1701
|
-
class="group flex flex-col items-center
|
|
1512
|
+
class="group flex flex-col items-center gap-2 p-3 rounded-border cursor-pointer no-underline transition-colors duration-150 hover:bg-emphasis"
|
|
1702
1513
|
[href]="app.url"
|
|
1703
1514
|
target="_blank"
|
|
1704
1515
|
rel="noopener noreferrer"
|
|
1705
1516
|
>
|
|
1706
|
-
<div
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
[iconType]="app.iconType"
|
|
1712
|
-
class="text-xl text-primary group-hover:text-primary-contrast transition-colors duration-200"
|
|
1713
|
-
/>
|
|
1517
|
+
<div class="flex items-center justify-center w-9 h-9 rounded-border bg-primary/10 group-hover:bg-primary transition-colors duration-150">
|
|
1518
|
+
<ui-icon
|
|
1519
|
+
[name]="app.icon"
|
|
1520
|
+
class="text-base text-primary group-hover:text-primary-contrast transition-colors duration-150"
|
|
1521
|
+
></ui-icon>
|
|
1714
1522
|
</div>
|
|
1715
|
-
<span
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
>
|
|
1523
|
+
<span class="text-xs text-center text-muted-color group-hover:text-color transition-colors duration-150 truncate w-full text-center leading-tight">
|
|
1524
|
+
{{ app.nameKey ? (app.nameKey | translate) : app.name }}
|
|
1525
|
+
</span>
|
|
1719
1526
|
</a>
|
|
1720
1527
|
}
|
|
1721
1528
|
</div>
|
|
1722
|
-
|
|
1529
|
+
}
|
|
1723
1530
|
</div>
|
|
1724
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
1531
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: UiModule }, { kind: "directive", type: i1.StyleClassDirective, selector: "[fStyleClass]", inputs: ["fStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1725
1532
|
}
|
|
1726
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1533
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppLauncher, decorators: [{
|
|
1727
1534
|
type: Component,
|
|
1728
1535
|
args: [{
|
|
1729
1536
|
selector: 'app-launcher',
|
|
1730
|
-
imports: [
|
|
1537
|
+
imports: [UiModule, TranslatePipe],
|
|
1731
1538
|
host: { class: 'relative' },
|
|
1732
1539
|
template: `
|
|
1733
1540
|
<button
|
|
1734
1541
|
type="button"
|
|
1735
1542
|
class="layout-topbar-action"
|
|
1736
1543
|
[class.layout-topbar-action-highlight]="isActive()"
|
|
1737
|
-
|
|
1544
|
+
fStyleClass="@next"
|
|
1738
1545
|
enterFromClass="hidden"
|
|
1739
1546
|
enterActiveClass="animate-scalein"
|
|
1740
1547
|
leaveToClass="hidden"
|
|
1741
1548
|
leaveActiveClass="animate-fadeout"
|
|
1742
1549
|
[hideOnOutsideClick]="true"
|
|
1743
|
-
(click)="
|
|
1550
|
+
(click)="toggleActive()"
|
|
1744
1551
|
>
|
|
1745
|
-
<
|
|
1552
|
+
<ui-icon name="th-large"></ui-icon>
|
|
1746
1553
|
<span>{{ 'layout.launcher.apps' | translate }}</span>
|
|
1747
1554
|
</button>
|
|
1748
1555
|
<div
|
|
1749
|
-
class="hidden absolute top-[3.25rem] z-50
|
|
1750
|
-
style="
|
|
1556
|
+
class="hidden absolute top-[3.25rem] z-50 border border-surface rounded-border origin-top surface-overlay"
|
|
1557
|
+
style="inset-inline-end: 0; min-width: 16rem; max-width: 22rem; width: calc(100vw - 2rem); box-shadow: var(--f-shadow-xl);"
|
|
1751
1558
|
>
|
|
1752
|
-
<div class="
|
|
1753
|
-
<span class="text-
|
|
1559
|
+
<div class="px-4 py-3 border-b border-surface">
|
|
1560
|
+
<span class="text-xs font-semibold uppercase tracking-wide text-muted-color">{{
|
|
1754
1561
|
'layout.launcher.applications' | translate
|
|
1755
1562
|
}}</span>
|
|
1756
|
-
|
|
1563
|
+
</div>
|
|
1564
|
+
@if (layoutService.apps().length === 0) {
|
|
1565
|
+
<div class="px-4 py-6 text-center text-muted-color text-sm">
|
|
1566
|
+
{{ 'layout.launcher.no.apps' | translate }}
|
|
1567
|
+
</div>
|
|
1568
|
+
} @else {
|
|
1569
|
+
<div class="p-3 grid grid-cols-3 gap-1">
|
|
1757
1570
|
@for (app of layoutService.apps(); track app.id) {
|
|
1758
1571
|
<a
|
|
1759
|
-
class="group flex flex-col items-center
|
|
1572
|
+
class="group flex flex-col items-center gap-2 p-3 rounded-border cursor-pointer no-underline transition-colors duration-150 hover:bg-emphasis"
|
|
1760
1573
|
[href]="app.url"
|
|
1761
1574
|
target="_blank"
|
|
1762
1575
|
rel="noopener noreferrer"
|
|
1763
1576
|
>
|
|
1764
|
-
<div
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
[iconType]="app.iconType"
|
|
1770
|
-
class="text-xl text-primary group-hover:text-primary-contrast transition-colors duration-200"
|
|
1771
|
-
/>
|
|
1577
|
+
<div class="flex items-center justify-center w-9 h-9 rounded-border bg-primary/10 group-hover:bg-primary transition-colors duration-150">
|
|
1578
|
+
<ui-icon
|
|
1579
|
+
[name]="app.icon"
|
|
1580
|
+
class="text-base text-primary group-hover:text-primary-contrast transition-colors duration-150"
|
|
1581
|
+
></ui-icon>
|
|
1772
1582
|
</div>
|
|
1773
|
-
<span
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
>
|
|
1583
|
+
<span class="text-xs text-center text-muted-color group-hover:text-color transition-colors duration-150 truncate w-full text-center leading-tight">
|
|
1584
|
+
{{ app.nameKey ? (app.nameKey | translate) : app.name }}
|
|
1585
|
+
</span>
|
|
1777
1586
|
</a>
|
|
1778
1587
|
}
|
|
1779
1588
|
</div>
|
|
1780
|
-
|
|
1589
|
+
}
|
|
1781
1590
|
</div>
|
|
1782
1591
|
`,
|
|
1783
1592
|
}]
|
|
@@ -1795,7 +1604,8 @@ class AppProfile {
|
|
|
1795
1604
|
appConfig = inject(APP_CONFIG, { optional: true });
|
|
1796
1605
|
document = inject(DOCUMENT$1);
|
|
1797
1606
|
elementRef = inject(ElementRef);
|
|
1798
|
-
_isActive = signal(false,
|
|
1607
|
+
_isActive = signal(false, /* @ts-ignore */
|
|
1608
|
+
...(ngDevMode ? [{ debugName: "_isActive" }] : /* istanbul ignore next */ []));
|
|
1799
1609
|
isActive = this._isActive.asReadonly();
|
|
1800
1610
|
constructor() {
|
|
1801
1611
|
fromEvent(this.document, 'click')
|
|
@@ -1811,10 +1621,14 @@ class AppProfile {
|
|
|
1811
1621
|
this._isActive.update((v) => !v);
|
|
1812
1622
|
}
|
|
1813
1623
|
userName = computed(() => this.authState?.loginUserData()?.name ??
|
|
1814
|
-
this.translate('layout.profile.guest'),
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1624
|
+
this.translate('layout.profile.guest'), /* @ts-ignore */
|
|
1625
|
+
...(ngDevMode ? [{ debugName: "userName" }] : /* istanbul ignore next */ []));
|
|
1626
|
+
userEmail = computed(() => this.authState?.loginUserData()?.email ?? '', /* @ts-ignore */
|
|
1627
|
+
...(ngDevMode ? [{ debugName: "userEmail" }] : /* istanbul ignore next */ []));
|
|
1628
|
+
profilePicture = computed(() => this.layoutService.userProfilePictureUrl() ?? '', /* @ts-ignore */
|
|
1629
|
+
...(ngDevMode ? [{ debugName: "profilePicture" }] : /* istanbul ignore next */ []));
|
|
1630
|
+
signUpEnabled = computed(() => this.appConfig ? isSignUpEnabled(this.appConfig) : false, /* @ts-ignore */
|
|
1631
|
+
...(ngDevMode ? [{ debugName: "signUpEnabled" }] : /* istanbul ignore next */ []));
|
|
1818
1632
|
logout() {
|
|
1819
1633
|
if (!this.authApi)
|
|
1820
1634
|
return;
|
|
@@ -1861,13 +1675,13 @@ class AppProfile {
|
|
|
1861
1675
|
translate(key, vars) {
|
|
1862
1676
|
return this.translateAdapter?.translate(key, vars) ?? key;
|
|
1863
1677
|
}
|
|
1864
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1865
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1678
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppProfile, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1679
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppProfile, isStandalone: true, selector: "app-profile", host: { classAttribute: "relative" }, ngImport: i0, template: `
|
|
1866
1680
|
<button
|
|
1867
1681
|
type="button"
|
|
1868
1682
|
class="layout-topbar-action"
|
|
1869
1683
|
[class.layout-topbar-action-highlight]="isActive()"
|
|
1870
|
-
|
|
1684
|
+
fStyleClass="@next"
|
|
1871
1685
|
enterFromClass="hidden"
|
|
1872
1686
|
enterActiveClass="animate-scalein"
|
|
1873
1687
|
leaveToClass="hidden"
|
|
@@ -1875,11 +1689,11 @@ class AppProfile {
|
|
|
1875
1689
|
[hideOnOutsideClick]="true"
|
|
1876
1690
|
(click)="togglePanel()"
|
|
1877
1691
|
>
|
|
1878
|
-
<
|
|
1692
|
+
<ui-icon name="user"></ui-icon>
|
|
1879
1693
|
<span>{{ 'layout.profile.title' | translate }}</span>
|
|
1880
1694
|
</button>
|
|
1881
1695
|
<div
|
|
1882
|
-
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-
|
|
1696
|
+
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-xl w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]"
|
|
1883
1697
|
style="background-color: var(--surface-overlay); inset-inline-end: 0;"
|
|
1884
1698
|
>
|
|
1885
1699
|
<div class="flex flex-col gap-3">
|
|
@@ -1898,7 +1712,7 @@ class AppProfile {
|
|
|
1898
1712
|
<div
|
|
1899
1713
|
class="w-12 h-12 rounded-border bg-primary flex items-center justify-center"
|
|
1900
1714
|
>
|
|
1901
|
-
<
|
|
1715
|
+
<ui-icon name="user" class="text-xl text-primary-contrast"></ui-icon>
|
|
1902
1716
|
</div>
|
|
1903
1717
|
}
|
|
1904
1718
|
<div class="flex flex-col min-w-0 flex-1">
|
|
@@ -1921,7 +1735,7 @@ class AppProfile {
|
|
|
1921
1735
|
class="flex items-center gap-3 p-3 rounded-border cursor-pointer no-underline text-color hover:bg-emphasis transition-all duration-200"
|
|
1922
1736
|
(click)="copySignUpLink()"
|
|
1923
1737
|
>
|
|
1924
|
-
<
|
|
1738
|
+
<ui-icon name="link" class="text-muted-color"></ui-icon>
|
|
1925
1739
|
<span>{{ 'layout.profile.copy.sign.up.link' | translate }}</span>
|
|
1926
1740
|
</a>
|
|
1927
1741
|
}
|
|
@@ -1929,26 +1743,26 @@ class AppProfile {
|
|
|
1929
1743
|
class="flex items-center gap-3 p-3 rounded-border cursor-pointer no-underline text-color hover:bg-emphasis transition-all duration-200"
|
|
1930
1744
|
(click)="logout()"
|
|
1931
1745
|
>
|
|
1932
|
-
<
|
|
1746
|
+
<ui-icon name="sign-out" class="text-muted-color"></ui-icon>
|
|
1933
1747
|
<span>{{ 'layout.profile.logout' | translate }}</span>
|
|
1934
1748
|
</a>
|
|
1935
1749
|
</div>
|
|
1936
1750
|
</div>
|
|
1937
1751
|
</div>
|
|
1938
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
1752
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: UiModule }, { kind: "directive", type: i1.StyleClassDirective, selector: "[fStyleClass]", inputs: ["fStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: i3.IsEmptyImageDirective, selector: "img", inputs: ["src"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
1939
1753
|
}
|
|
1940
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1754
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppProfile, decorators: [{
|
|
1941
1755
|
type: Component,
|
|
1942
1756
|
args: [{
|
|
1943
1757
|
selector: 'app-profile',
|
|
1944
|
-
imports: [
|
|
1758
|
+
imports: [UiModule, AngularModule, TranslatePipe],
|
|
1945
1759
|
host: { class: 'relative' },
|
|
1946
1760
|
template: `
|
|
1947
1761
|
<button
|
|
1948
1762
|
type="button"
|
|
1949
1763
|
class="layout-topbar-action"
|
|
1950
1764
|
[class.layout-topbar-action-highlight]="isActive()"
|
|
1951
|
-
|
|
1765
|
+
fStyleClass="@next"
|
|
1952
1766
|
enterFromClass="hidden"
|
|
1953
1767
|
enterActiveClass="animate-scalein"
|
|
1954
1768
|
leaveToClass="hidden"
|
|
@@ -1956,11 +1770,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1956
1770
|
[hideOnOutsideClick]="true"
|
|
1957
1771
|
(click)="togglePanel()"
|
|
1958
1772
|
>
|
|
1959
|
-
<
|
|
1773
|
+
<ui-icon name="user"></ui-icon>
|
|
1960
1774
|
<span>{{ 'layout.profile.title' | translate }}</span>
|
|
1961
1775
|
</button>
|
|
1962
1776
|
<div
|
|
1963
|
-
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-
|
|
1777
|
+
class="hidden absolute top-[3.25rem] z-50 p-4 border border-surface rounded-border origin-top shadow-xl w-[calc(100vw-2rem)] sm:w-auto sm:min-w-[280px] max-w-[320px]"
|
|
1964
1778
|
style="background-color: var(--surface-overlay); inset-inline-end: 0;"
|
|
1965
1779
|
>
|
|
1966
1780
|
<div class="flex flex-col gap-3">
|
|
@@ -1979,7 +1793,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
1979
1793
|
<div
|
|
1980
1794
|
class="w-12 h-12 rounded-border bg-primary flex items-center justify-center"
|
|
1981
1795
|
>
|
|
1982
|
-
<
|
|
1796
|
+
<ui-icon name="user" class="text-xl text-primary-contrast"></ui-icon>
|
|
1983
1797
|
</div>
|
|
1984
1798
|
}
|
|
1985
1799
|
<div class="flex flex-col min-w-0 flex-1">
|
|
@@ -2002,7 +1816,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2002
1816
|
class="flex items-center gap-3 p-3 rounded-border cursor-pointer no-underline text-color hover:bg-emphasis transition-all duration-200"
|
|
2003
1817
|
(click)="copySignUpLink()"
|
|
2004
1818
|
>
|
|
2005
|
-
<
|
|
1819
|
+
<ui-icon name="link" class="text-muted-color"></ui-icon>
|
|
2006
1820
|
<span>{{ 'layout.profile.copy.sign.up.link' | translate }}</span>
|
|
2007
1821
|
</a>
|
|
2008
1822
|
}
|
|
@@ -2010,7 +1824,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2010
1824
|
class="flex items-center gap-3 p-3 rounded-border cursor-pointer no-underline text-color hover:bg-emphasis transition-all duration-200"
|
|
2011
1825
|
(click)="logout()"
|
|
2012
1826
|
>
|
|
2013
|
-
<
|
|
1827
|
+
<ui-icon name="sign-out" class="text-muted-color"></ui-icon>
|
|
2014
1828
|
<span>{{ 'layout.profile.logout' | translate }}</span>
|
|
2015
1829
|
</a>
|
|
2016
1830
|
</div>
|
|
@@ -2028,14 +1842,22 @@ class AppSearchbar {
|
|
|
2028
1842
|
});
|
|
2029
1843
|
destroyRef = inject(DestroyRef);
|
|
2030
1844
|
document = inject(DOCUMENT$1);
|
|
2031
|
-
searchTerm = signal('',
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
1845
|
+
searchTerm = signal('', /* @ts-ignore */
|
|
1846
|
+
...(ngDevMode ? [{ debugName: "searchTerm" }] : /* istanbul ignore next */ []));
|
|
1847
|
+
suggestionsOpen = signal(false, /* @ts-ignore */
|
|
1848
|
+
...(ngDevMode ? [{ debugName: "suggestionsOpen" }] : /* istanbul ignore next */ []));
|
|
1849
|
+
suggestions = signal([], /* @ts-ignore */
|
|
1850
|
+
...(ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []));
|
|
1851
|
+
focusedIndex = signal(-1, /* @ts-ignore */
|
|
1852
|
+
...(ngDevMode ? [{ debugName: "focusedIndex" }] : /* istanbul ignore next */ []));
|
|
1853
|
+
isSearchExpanded = signal(false, /* @ts-ignore */
|
|
1854
|
+
...(ngDevMode ? [{ debugName: "isSearchExpanded" }] : /* istanbul ignore next */ []));
|
|
1855
|
+
isResponsive = signal(typeof window !== 'undefined' ? window.innerWidth < 768 : false, /* @ts-ignore */
|
|
1856
|
+
...(ngDevMode ? [{ debugName: "isResponsive" }] : /* istanbul ignore next */ []));
|
|
1857
|
+
searchWrapper = viewChild('searchWrapper', /* @ts-ignore */
|
|
1858
|
+
...(ngDevMode ? [{ debugName: "searchWrapper" }] : /* istanbul ignore next */ []));
|
|
1859
|
+
searchInput = viewChild('searchInput', /* @ts-ignore */
|
|
1860
|
+
...(ngDevMode ? [{ debugName: "searchInput" }] : /* istanbul ignore next */ []));
|
|
2039
1861
|
searchTimeout;
|
|
2040
1862
|
constructor() {
|
|
2041
1863
|
// Track responsive breakpoint (mobile < 768px)
|
|
@@ -2151,8 +1973,8 @@ class AppSearchbar {
|
|
|
2151
1973
|
this.searchAdapter.onSearch(query);
|
|
2152
1974
|
}
|
|
2153
1975
|
}
|
|
2154
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2155
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
1976
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppSearchbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1977
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppSearchbar, isStandalone: true, selector: "app-searchbar", viewQueries: [{ propertyName: "searchWrapper", first: true, predicate: ["searchWrapper"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
2156
1978
|
<div
|
|
2157
1979
|
class="search-container h-full"
|
|
2158
1980
|
#searchWrapper
|
|
@@ -2162,23 +1984,20 @@ class AppSearchbar {
|
|
|
2162
1984
|
<!-- Topbar/Mobile Icon Mode -->
|
|
2163
1985
|
<button
|
|
2164
1986
|
type="button"
|
|
2165
|
-
|
|
2166
|
-
pRipple
|
|
2167
|
-
class="search-toggle-btn"
|
|
2168
|
-
icon="pi pi-search"
|
|
1987
|
+
class="search-toggle-btn layout-topbar-action"
|
|
2169
1988
|
(click)="toggleSearch()"
|
|
2170
1989
|
[attr.aria-label]="'layout.topbar.search' | translate"
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
1990
|
+
>
|
|
1991
|
+
<ui-icon name="search"></ui-icon>
|
|
1992
|
+
</button>
|
|
2174
1993
|
|
|
2175
1994
|
@if (isSearchExpanded()) {
|
|
2176
1995
|
<div class="search-dropdown-panel">
|
|
2177
|
-
<
|
|
2178
|
-
<
|
|
1996
|
+
<f-iconfield class="search-iconfield">
|
|
1997
|
+
<f-inputicon class="search-icon"><ui-icon name="search" /></f-inputicon>
|
|
2179
1998
|
<input
|
|
2180
1999
|
type="text"
|
|
2181
|
-
|
|
2000
|
+
fInputText
|
|
2182
2001
|
class="search-input w-full"
|
|
2183
2002
|
[placeholder]="'layout.topbar.search.placeholder' | translate"
|
|
2184
2003
|
[(ngModel)]="searchTerm"
|
|
@@ -2189,7 +2008,7 @@ class AppSearchbar {
|
|
|
2189
2008
|
#searchInput
|
|
2190
2009
|
autocomplete="off"
|
|
2191
2010
|
/>
|
|
2192
|
-
</
|
|
2011
|
+
</f-iconfield>
|
|
2193
2012
|
|
|
2194
2013
|
@if (suggestionsOpen() && suggestions().length > 0) {
|
|
2195
2014
|
<div class="search-suggestions">
|
|
@@ -2208,7 +2027,7 @@ class AppSearchbar {
|
|
|
2208
2027
|
[attr.aria-selected]="idx === focusedIndex()"
|
|
2209
2028
|
>
|
|
2210
2029
|
@if (item.icon) {
|
|
2211
|
-
<
|
|
2030
|
+
<ui-icon [name]="item.icon" class="suggestion-icon"></ui-icon>
|
|
2212
2031
|
}
|
|
2213
2032
|
<span class="suggestion-label">{{ item.label }}</span>
|
|
2214
2033
|
</li>
|
|
@@ -2220,11 +2039,11 @@ class AppSearchbar {
|
|
|
2220
2039
|
}
|
|
2221
2040
|
} @else {
|
|
2222
2041
|
<!-- Desktop Full Input Mode -->
|
|
2223
|
-
<
|
|
2224
|
-
<
|
|
2042
|
+
<f-iconfield class="search-iconfield">
|
|
2043
|
+
<f-inputicon class="search-icon cursor-pointer" (click)="onSearch()"><ui-icon name="search" /></f-inputicon>
|
|
2225
2044
|
<input
|
|
2226
2045
|
type="text"
|
|
2227
|
-
|
|
2046
|
+
fInputText
|
|
2228
2047
|
class="search-input w-full"
|
|
2229
2048
|
[placeholder]="'layout.topbar.search.placeholder' | translate"
|
|
2230
2049
|
[(ngModel)]="searchTerm"
|
|
@@ -2234,7 +2053,7 @@ class AppSearchbar {
|
|
|
2234
2053
|
[attr.aria-label]="'layout.topbar.search' | translate"
|
|
2235
2054
|
#searchInput
|
|
2236
2055
|
/>
|
|
2237
|
-
</
|
|
2056
|
+
</f-iconfield>
|
|
2238
2057
|
|
|
2239
2058
|
@if (suggestionsOpen() && suggestions().length > 0) {
|
|
2240
2059
|
<div class="search-dropdown">
|
|
@@ -2249,7 +2068,7 @@ class AppSearchbar {
|
|
|
2249
2068
|
[attr.aria-selected]="idx === focusedIndex()"
|
|
2250
2069
|
>
|
|
2251
2070
|
@if (item.icon) {
|
|
2252
|
-
<
|
|
2071
|
+
<ui-icon [name]="item.icon" class="suggestion-icon"></ui-icon>
|
|
2253
2072
|
}
|
|
2254
2073
|
<span class="suggestion-label">{{ item.label }}</span>
|
|
2255
2074
|
</li>
|
|
@@ -2259,11 +2078,11 @@ class AppSearchbar {
|
|
|
2259
2078
|
}
|
|
2260
2079
|
}
|
|
2261
2080
|
</div>
|
|
2262
|
-
`, isInline: true, styles: [".search-container{display:flex;align-items:center;position:relative;width:100%;flex:0 1 auto}.search-container.topbar-mode{width:auto}.search-dropdown-panel{position:absolute;top:100%;right:0;margin-top:.5rem;background-color:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--border-radius);box-shadow:
|
|
2081
|
+
`, isInline: true, styles: [".search-container{display:flex;align-items:center;position:relative;width:100%;flex:0 1 auto}.search-container.topbar-mode{width:auto}.search-dropdown-panel{position:absolute;top:100%;right:0;margin-top:.5rem;background-color:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--f-content-border-radius);box-shadow:var(--f-shadow-xl);z-index:1100;padding:1rem .75rem .75rem;min-width:300px;max-width:450px;animation:slideDown .2s ease-out}.search-suggestions{margin-top:.5rem;border-top:1px solid var(--surface-border);padding-top:.5rem;background-color:inherit}.suggestions-list{list-style:none;margin:0;padding:0;max-height:360px;overflow-y:auto;background-color:inherit}.suggestion-item{padding:.75rem 1rem;cursor:pointer;display:flex;align-items:center;gap:.75rem;color:var(--text-color);border-bottom:1px solid var(--surface-border);transition:background-color .15s ease,color .15s ease}.suggestion-item:last-child{border-bottom:none}.suggestion-item:hover,.suggestion-item.focused{background-color:var(--surface-50);color:var(--primary-color)}.suggestion-icon{color:var(--text-color-secondary);font-size:1rem;flex-shrink:0;transition:color .15s ease}.suggestion-item:hover .suggestion-icon,.suggestion-item.focused .suggestion-icon{color:var(--primary-color)}.suggestion-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-dropdown{position:absolute;top:calc(100% + .5rem);left:0;right:0;background-color:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--f-content-border-radius);box-shadow:var(--f-shadow-xl);z-index:1000;overflow:hidden}.search-dropdown .suggestions-list{background-color:inherit}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.search-dropdown-panel{min-width:280px;max-width:400px}}@media(max-width:576px){.search-dropdown-panel{position:fixed;top:4rem;left:0;right:0;bottom:auto;width:100vw;min-width:100vw;max-width:100vw;margin-top:0;padding:1rem;border-radius:0;border-bottom:1px solid var(--surface-border);z-index:1200}.search-dropdown-panel .search-iconfield{margin-bottom:1rem}.search-dropdown{max-width:100%;left:0!important;right:0!important;transform:none;position:static;border-radius:var(--f-content-border-radius);margin-top:0}.suggestion-item{padding:.75rem}}\n"], dependencies: [{ kind: "ngmodule", type: UiModule }, { kind: "component", type: i1.IconFieldComponent, selector: "f-iconfield" }, { kind: "component", type: i1.InputIconComponent, selector: "f-inputicon", inputs: ["styleClass"] }, { kind: "directive", type: i1.InputTextDirective, selector: "[fInputText]", inputs: ["invalid", "touched"] }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "ngmodule", type: AngularModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2263
2082
|
}
|
|
2264
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2083
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppSearchbar, decorators: [{
|
|
2265
2084
|
type: Component,
|
|
2266
|
-
args: [{ selector: 'app-searchbar', imports: [
|
|
2085
|
+
args: [{ selector: 'app-searchbar', imports: [UiModule, AngularModule, TranslatePipe], template: `
|
|
2267
2086
|
<div
|
|
2268
2087
|
class="search-container h-full"
|
|
2269
2088
|
#searchWrapper
|
|
@@ -2273,23 +2092,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2273
2092
|
<!-- Topbar/Mobile Icon Mode -->
|
|
2274
2093
|
<button
|
|
2275
2094
|
type="button"
|
|
2276
|
-
|
|
2277
|
-
pRipple
|
|
2278
|
-
class="search-toggle-btn"
|
|
2279
|
-
icon="pi pi-search"
|
|
2095
|
+
class="search-toggle-btn layout-topbar-action"
|
|
2280
2096
|
(click)="toggleSearch()"
|
|
2281
2097
|
[attr.aria-label]="'layout.topbar.search' | translate"
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2098
|
+
>
|
|
2099
|
+
<ui-icon name="search"></ui-icon>
|
|
2100
|
+
</button>
|
|
2285
2101
|
|
|
2286
2102
|
@if (isSearchExpanded()) {
|
|
2287
2103
|
<div class="search-dropdown-panel">
|
|
2288
|
-
<
|
|
2289
|
-
<
|
|
2104
|
+
<f-iconfield class="search-iconfield">
|
|
2105
|
+
<f-inputicon class="search-icon"><ui-icon name="search" /></f-inputicon>
|
|
2290
2106
|
<input
|
|
2291
2107
|
type="text"
|
|
2292
|
-
|
|
2108
|
+
fInputText
|
|
2293
2109
|
class="search-input w-full"
|
|
2294
2110
|
[placeholder]="'layout.topbar.search.placeholder' | translate"
|
|
2295
2111
|
[(ngModel)]="searchTerm"
|
|
@@ -2300,7 +2116,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2300
2116
|
#searchInput
|
|
2301
2117
|
autocomplete="off"
|
|
2302
2118
|
/>
|
|
2303
|
-
</
|
|
2119
|
+
</f-iconfield>
|
|
2304
2120
|
|
|
2305
2121
|
@if (suggestionsOpen() && suggestions().length > 0) {
|
|
2306
2122
|
<div class="search-suggestions">
|
|
@@ -2319,7 +2135,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2319
2135
|
[attr.aria-selected]="idx === focusedIndex()"
|
|
2320
2136
|
>
|
|
2321
2137
|
@if (item.icon) {
|
|
2322
|
-
<
|
|
2138
|
+
<ui-icon [name]="item.icon" class="suggestion-icon"></ui-icon>
|
|
2323
2139
|
}
|
|
2324
2140
|
<span class="suggestion-label">{{ item.label }}</span>
|
|
2325
2141
|
</li>
|
|
@@ -2331,11 +2147,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2331
2147
|
}
|
|
2332
2148
|
} @else {
|
|
2333
2149
|
<!-- Desktop Full Input Mode -->
|
|
2334
|
-
<
|
|
2335
|
-
<
|
|
2150
|
+
<f-iconfield class="search-iconfield">
|
|
2151
|
+
<f-inputicon class="search-icon cursor-pointer" (click)="onSearch()"><ui-icon name="search" /></f-inputicon>
|
|
2336
2152
|
<input
|
|
2337
2153
|
type="text"
|
|
2338
|
-
|
|
2154
|
+
fInputText
|
|
2339
2155
|
class="search-input w-full"
|
|
2340
2156
|
[placeholder]="'layout.topbar.search.placeholder' | translate"
|
|
2341
2157
|
[(ngModel)]="searchTerm"
|
|
@@ -2345,7 +2161,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2345
2161
|
[attr.aria-label]="'layout.topbar.search' | translate"
|
|
2346
2162
|
#searchInput
|
|
2347
2163
|
/>
|
|
2348
|
-
</
|
|
2164
|
+
</f-iconfield>
|
|
2349
2165
|
|
|
2350
2166
|
@if (suggestionsOpen() && suggestions().length > 0) {
|
|
2351
2167
|
<div class="search-dropdown">
|
|
@@ -2360,7 +2176,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2360
2176
|
[attr.aria-selected]="idx === focusedIndex()"
|
|
2361
2177
|
>
|
|
2362
2178
|
@if (item.icon) {
|
|
2363
|
-
<
|
|
2179
|
+
<ui-icon [name]="item.icon" class="suggestion-icon"></ui-icon>
|
|
2364
2180
|
}
|
|
2365
2181
|
<span class="suggestion-label">{{ item.label }}</span>
|
|
2366
2182
|
</li>
|
|
@@ -2370,7 +2186,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2370
2186
|
}
|
|
2371
2187
|
}
|
|
2372
2188
|
</div>
|
|
2373
|
-
`, styles: [".search-container{display:flex;align-items:center;position:relative;width:100%;flex:0 1 auto}.search-container.topbar-mode{width:auto}.search-dropdown-panel{position:absolute;top:100%;right:0;margin-top:.5rem;background-color:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--border-radius);box-shadow:
|
|
2189
|
+
`, styles: [".search-container{display:flex;align-items:center;position:relative;width:100%;flex:0 1 auto}.search-container.topbar-mode{width:auto}.search-dropdown-panel{position:absolute;top:100%;right:0;margin-top:.5rem;background-color:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--f-content-border-radius);box-shadow:var(--f-shadow-xl);z-index:1100;padding:1rem .75rem .75rem;min-width:300px;max-width:450px;animation:slideDown .2s ease-out}.search-suggestions{margin-top:.5rem;border-top:1px solid var(--surface-border);padding-top:.5rem;background-color:inherit}.suggestions-list{list-style:none;margin:0;padding:0;max-height:360px;overflow-y:auto;background-color:inherit}.suggestion-item{padding:.75rem 1rem;cursor:pointer;display:flex;align-items:center;gap:.75rem;color:var(--text-color);border-bottom:1px solid var(--surface-border);transition:background-color .15s ease,color .15s ease}.suggestion-item:last-child{border-bottom:none}.suggestion-item:hover,.suggestion-item.focused{background-color:var(--surface-50);color:var(--primary-color)}.suggestion-icon{color:var(--text-color-secondary);font-size:1rem;flex-shrink:0;transition:color .15s ease}.suggestion-item:hover .suggestion-icon,.suggestion-item.focused .suggestion-icon{color:var(--primary-color)}.suggestion-label{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.search-dropdown{position:absolute;top:calc(100% + .5rem);left:0;right:0;background-color:var(--surface-card);border:1px solid var(--surface-border);border-radius:var(--f-content-border-radius);box-shadow:var(--f-shadow-xl);z-index:1000;overflow:hidden}.search-dropdown .suggestions-list{background-color:inherit}@keyframes slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:768px){.search-dropdown-panel{min-width:280px;max-width:400px}}@media(max-width:576px){.search-dropdown-panel{position:fixed;top:4rem;left:0;right:0;bottom:auto;width:100vw;min-width:100vw;max-width:100vw;margin-top:0;padding:1rem;border-radius:0;border-bottom:1px solid var(--surface-border);z-index:1200}.search-dropdown-panel .search-iconfield{margin-bottom:1rem}.search-dropdown{max-width:100%;left:0!important;right:0!important;transform:none;position:static;border-radius:var(--f-content-border-radius);margin-top:0}.suggestion-item{padding:.75rem}}\n"] }]
|
|
2374
2190
|
}], ctorParameters: () => [], propDecorators: { searchWrapper: [{ type: i0.ViewChild, args: ['searchWrapper', { isSignal: true }] }], searchInput: [{ type: i0.ViewChild, args: ['searchInput', { isSignal: true }] }] } });
|
|
2375
2191
|
|
|
2376
2192
|
class AppTopbar {
|
|
@@ -2387,10 +2203,14 @@ class AppTopbar {
|
|
|
2387
2203
|
searchAdapter = inject(LAYOUT_SEARCH_ADAPTER, {
|
|
2388
2204
|
optional: true,
|
|
2389
2205
|
});
|
|
2390
|
-
hasSearchAdapter = computed(() => !!this.searchAdapter,
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2206
|
+
hasSearchAdapter = computed(() => !!this.searchAdapter, /* @ts-ignore */
|
|
2207
|
+
...(ngDevMode ? [{ debugName: "hasSearchAdapter" }] : /* istanbul ignore next */ []));
|
|
2208
|
+
configContainer = viewChild('configContainer', /* @ts-ignore */
|
|
2209
|
+
...(ngDevMode ? [{ debugName: "configContainer" }] : /* istanbul ignore next */ []));
|
|
2210
|
+
navContainer = viewChild('navContainer', /* @ts-ignore */
|
|
2211
|
+
...(ngDevMode ? [{ debugName: "navContainer" }] : /* istanbul ignore next */ []));
|
|
2212
|
+
activePanel = signal(null, /* @ts-ignore */
|
|
2213
|
+
...(ngDevMode ? [{ debugName: "activePanel" }] : /* istanbul ignore next */ []));
|
|
2394
2214
|
constructor() {
|
|
2395
2215
|
fromEvent(this.document, 'click')
|
|
2396
2216
|
.pipe(takeUntilDestroyed(this.destroyRef), filter(() => this.activePanel() !== null))
|
|
@@ -2436,8 +2256,8 @@ class AppTopbar {
|
|
|
2436
2256
|
li.style.setProperty('--submenu-top', `${top}px`);
|
|
2437
2257
|
});
|
|
2438
2258
|
}
|
|
2439
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2440
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
2259
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppTopbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2260
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: AppTopbar, isStandalone: true, selector: "app-topbar", viewQueries: [{ propertyName: "configContainer", first: true, predicate: ["configContainer"], descendants: true, isSignal: true }, { propertyName: "navContainer", first: true, predicate: ["navContainer"], descendants: true, isSignal: true }], ngImport: i0, template: `<div class="layout-topbar">
|
|
2441
2261
|
<div
|
|
2442
2262
|
class="layout-topbar-logo-container"
|
|
2443
2263
|
[class.layout-topbar-logo-container-desktop]="layoutService.isDesktop()"
|
|
@@ -2448,7 +2268,7 @@ class AppTopbar {
|
|
|
2448
2268
|
[attr.aria-label]="'layout.topbar.toggle.menu' | translate"
|
|
2449
2269
|
(click)="layoutService.onMenuToggle()"
|
|
2450
2270
|
>
|
|
2451
|
-
<
|
|
2271
|
+
<ui-icon name="bars"></ui-icon>
|
|
2452
2272
|
</button>
|
|
2453
2273
|
}
|
|
2454
2274
|
<a class="layout-topbar-logo" routerLink="/">
|
|
@@ -2471,7 +2291,7 @@ class AppTopbar {
|
|
|
2471
2291
|
[attr.aria-label]="'layout.topbar.toggle.menu' | translate"
|
|
2472
2292
|
(click)="layoutService.onMenuToggle()"
|
|
2473
2293
|
>
|
|
2474
|
-
<
|
|
2294
|
+
<ui-icon name="bars"></ui-icon>
|
|
2475
2295
|
</button>
|
|
2476
2296
|
}
|
|
2477
2297
|
</div>
|
|
@@ -2499,18 +2319,14 @@ class AppTopbar {
|
|
|
2499
2319
|
[attr.aria-label]="'layout.topbar.toggle.dark.mode' | translate"
|
|
2500
2320
|
(click)="toggleDarkMode()"
|
|
2501
2321
|
>
|
|
2502
|
-
<
|
|
2503
|
-
class="pi"
|
|
2504
|
-
[class.pi-moon]="layoutService.isDarkTheme()"
|
|
2505
|
-
[class.pi-sun]="!layoutService.isDarkTheme()"
|
|
2506
|
-
></i>
|
|
2322
|
+
<ui-icon [name]="layoutService.isDarkTheme() ? 'moon' : 'sun'"></ui-icon>
|
|
2507
2323
|
</button>
|
|
2508
2324
|
<div class="relative" #configContainer>
|
|
2509
2325
|
<button
|
|
2510
2326
|
class="layout-topbar-action"
|
|
2511
2327
|
[class.layout-topbar-action-highlight]="activePanel() === 'config'"
|
|
2512
2328
|
[attr.aria-label]="'layout.topbar.open.theme.settings' | translate"
|
|
2513
|
-
|
|
2329
|
+
fStyleClass="@next"
|
|
2514
2330
|
enterFromClass="hidden"
|
|
2515
2331
|
enterActiveClass="animate-scalein"
|
|
2516
2332
|
leaveToClass="hidden"
|
|
@@ -2518,7 +2334,7 @@ class AppTopbar {
|
|
|
2518
2334
|
[hideOnOutsideClick]="true"
|
|
2519
2335
|
(click)="togglePanel('config')"
|
|
2520
2336
|
>
|
|
2521
|
-
<
|
|
2337
|
+
<ui-icon name="palette"></ui-icon>
|
|
2522
2338
|
</button>
|
|
2523
2339
|
<app-configurator />
|
|
2524
2340
|
</div>
|
|
@@ -2527,14 +2343,14 @@ class AppTopbar {
|
|
|
2527
2343
|
<button
|
|
2528
2344
|
class="layout-topbar-menu-button layout-topbar-action"
|
|
2529
2345
|
[attr.aria-label]="'layout.topbar.more.options' | translate"
|
|
2530
|
-
|
|
2346
|
+
fStyleClass="@next"
|
|
2531
2347
|
enterFromClass="hidden"
|
|
2532
2348
|
enterActiveClass="animate-scalein"
|
|
2533
2349
|
leaveToClass="hidden"
|
|
2534
2350
|
leaveActiveClass="animate-fadeout"
|
|
2535
2351
|
[hideOnOutsideClick]="true"
|
|
2536
2352
|
>
|
|
2537
|
-
<
|
|
2353
|
+
<ui-icon name="ellipsis-v"></ui-icon>
|
|
2538
2354
|
</button>
|
|
2539
2355
|
|
|
2540
2356
|
<div class="layout-topbar-menu hidden lg:block">
|
|
@@ -2555,15 +2371,13 @@ class AppTopbar {
|
|
|
2555
2371
|
</div>
|
|
2556
2372
|
</div>
|
|
2557
2373
|
</div>
|
|
2558
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type:
|
|
2374
|
+
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: UiModule }, { kind: "directive", type: i1.StyleClassDirective, selector: "[fStyleClass]", inputs: ["fStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: i1.UiIconComponent, selector: "ui-icon", inputs: ["name", "size", "spin", "fill"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "component", type: InlineSvgComponent, selector: "inline-svg", inputs: ["src"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }, { kind: "component", type: AppMenu, selector: "app-menu" }, { kind: "component", type: AppProfile, selector: "app-profile" }, { kind: "component", type: AppCompanyBranchSelector, selector: "app-company-branch-selector" }, { kind: "component", type: AppLauncher, selector: "app-launcher" }, { kind: "component", type: AppSearchbar, selector: "app-searchbar" }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
2559
2375
|
}
|
|
2560
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppTopbar, decorators: [{
|
|
2561
2377
|
type: Component,
|
|
2562
2378
|
args: [{
|
|
2563
2379
|
selector: 'app-topbar',
|
|
2564
|
-
imports: [
|
|
2565
|
-
RouterModule,
|
|
2566
|
-
StyleClassModule,
|
|
2380
|
+
imports: [UiModule, RouterModule,
|
|
2567
2381
|
NgComponentOutlet,
|
|
2568
2382
|
TranslatePipe,
|
|
2569
2383
|
InlineSvgComponent,
|
|
@@ -2572,8 +2386,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2572
2386
|
AppProfile,
|
|
2573
2387
|
AppCompanyBranchSelector,
|
|
2574
2388
|
AppLauncher,
|
|
2575
|
-
AppSearchbar,
|
|
2576
|
-
],
|
|
2389
|
+
AppSearchbar,],
|
|
2577
2390
|
template: `<div class="layout-topbar">
|
|
2578
2391
|
<div
|
|
2579
2392
|
class="layout-topbar-logo-container"
|
|
@@ -2585,7 +2398,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2585
2398
|
[attr.aria-label]="'layout.topbar.toggle.menu' | translate"
|
|
2586
2399
|
(click)="layoutService.onMenuToggle()"
|
|
2587
2400
|
>
|
|
2588
|
-
<
|
|
2401
|
+
<ui-icon name="bars"></ui-icon>
|
|
2589
2402
|
</button>
|
|
2590
2403
|
}
|
|
2591
2404
|
<a class="layout-topbar-logo" routerLink="/">
|
|
@@ -2608,7 +2421,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2608
2421
|
[attr.aria-label]="'layout.topbar.toggle.menu' | translate"
|
|
2609
2422
|
(click)="layoutService.onMenuToggle()"
|
|
2610
2423
|
>
|
|
2611
|
-
<
|
|
2424
|
+
<ui-icon name="bars"></ui-icon>
|
|
2612
2425
|
</button>
|
|
2613
2426
|
}
|
|
2614
2427
|
</div>
|
|
@@ -2636,18 +2449,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2636
2449
|
[attr.aria-label]="'layout.topbar.toggle.dark.mode' | translate"
|
|
2637
2450
|
(click)="toggleDarkMode()"
|
|
2638
2451
|
>
|
|
2639
|
-
<
|
|
2640
|
-
class="pi"
|
|
2641
|
-
[class.pi-moon]="layoutService.isDarkTheme()"
|
|
2642
|
-
[class.pi-sun]="!layoutService.isDarkTheme()"
|
|
2643
|
-
></i>
|
|
2452
|
+
<ui-icon [name]="layoutService.isDarkTheme() ? 'moon' : 'sun'"></ui-icon>
|
|
2644
2453
|
</button>
|
|
2645
2454
|
<div class="relative" #configContainer>
|
|
2646
2455
|
<button
|
|
2647
2456
|
class="layout-topbar-action"
|
|
2648
2457
|
[class.layout-topbar-action-highlight]="activePanel() === 'config'"
|
|
2649
2458
|
[attr.aria-label]="'layout.topbar.open.theme.settings' | translate"
|
|
2650
|
-
|
|
2459
|
+
fStyleClass="@next"
|
|
2651
2460
|
enterFromClass="hidden"
|
|
2652
2461
|
enterActiveClass="animate-scalein"
|
|
2653
2462
|
leaveToClass="hidden"
|
|
@@ -2655,7 +2464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2655
2464
|
[hideOnOutsideClick]="true"
|
|
2656
2465
|
(click)="togglePanel('config')"
|
|
2657
2466
|
>
|
|
2658
|
-
<
|
|
2467
|
+
<ui-icon name="palette"></ui-icon>
|
|
2659
2468
|
</button>
|
|
2660
2469
|
<app-configurator />
|
|
2661
2470
|
</div>
|
|
@@ -2664,14 +2473,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2664
2473
|
<button
|
|
2665
2474
|
class="layout-topbar-menu-button layout-topbar-action"
|
|
2666
2475
|
[attr.aria-label]="'layout.topbar.more.options' | translate"
|
|
2667
|
-
|
|
2476
|
+
fStyleClass="@next"
|
|
2668
2477
|
enterFromClass="hidden"
|
|
2669
2478
|
enterActiveClass="animate-scalein"
|
|
2670
2479
|
leaveToClass="hidden"
|
|
2671
2480
|
leaveActiveClass="animate-fadeout"
|
|
2672
2481
|
[hideOnOutsideClick]="true"
|
|
2673
2482
|
>
|
|
2674
|
-
<
|
|
2483
|
+
<ui-icon name="ellipsis-v"></ui-icon>
|
|
2675
2484
|
</button>
|
|
2676
2485
|
|
|
2677
2486
|
<div class="layout-topbar-menu hidden lg:block">
|
|
@@ -2697,14 +2506,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2697
2506
|
}], ctorParameters: () => [], propDecorators: { configContainer: [{ type: i0.ViewChild, args: ['configContainer', { isSignal: true }] }], navContainer: [{ type: i0.ViewChild, args: ['navContainer', { isSignal: true }] }] } });
|
|
2698
2507
|
|
|
2699
2508
|
class AppSidebar {
|
|
2700
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2701
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
2509
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppSidebar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2510
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: AppSidebar, isStandalone: true, selector: "app-sidebar", ngImport: i0, template: `
|
|
2702
2511
|
<div class="layout-sidebar">
|
|
2703
2512
|
<app-menu />
|
|
2704
2513
|
</div>
|
|
2705
2514
|
`, isInline: true, dependencies: [{ kind: "component", type: AppMenu, selector: "app-menu" }] });
|
|
2706
2515
|
}
|
|
2707
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2516
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppSidebar, decorators: [{
|
|
2708
2517
|
type: Component,
|
|
2709
2518
|
args: [{
|
|
2710
2519
|
selector: 'app-sidebar',
|
|
@@ -2773,22 +2582,32 @@ class AppLayout {
|
|
|
2773
2582
|
unblockBodyScroll() {
|
|
2774
2583
|
this.document.body.classList.remove('blocked-scroll');
|
|
2775
2584
|
}
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
static
|
|
2791
|
-
|
|
2585
|
+
isOverlay = computed(() => this.layoutService.layoutConfig().menuMode === 'overlay', /* @ts-ignore */
|
|
2586
|
+
...(ngDevMode ? [{ debugName: "isOverlay" }] : /* istanbul ignore next */ []));
|
|
2587
|
+
isStatic = computed(() => this.layoutService.layoutConfig().menuMode === 'static', /* @ts-ignore */
|
|
2588
|
+
...(ngDevMode ? [{ debugName: "isStatic" }] : /* istanbul ignore next */ []));
|
|
2589
|
+
isTopbarMode = computed(() => this.layoutService.layoutConfig().menuMode === 'topbar', /* @ts-ignore */
|
|
2590
|
+
...(ngDevMode ? [{ debugName: "isTopbarMode" }] : /* istanbul ignore next */ []));
|
|
2591
|
+
isStaticInactive = computed(() => this.layoutService.layoutState().staticMenuDesktopInactive && this.isStatic(), /* @ts-ignore */
|
|
2592
|
+
...(ngDevMode ? [{ debugName: "isStaticInactive" }] : /* istanbul ignore next */ []));
|
|
2593
|
+
isOverlayActive = computed(() => this.layoutService.layoutState().overlayMenuActive, /* @ts-ignore */
|
|
2594
|
+
...(ngDevMode ? [{ debugName: "isOverlayActive" }] : /* istanbul ignore next */ []));
|
|
2595
|
+
isMobileActive = computed(() => this.layoutService.layoutState().staticMenuMobileActive, /* @ts-ignore */
|
|
2596
|
+
...(ngDevMode ? [{ debugName: "isMobileActive" }] : /* istanbul ignore next */ []));
|
|
2597
|
+
isTopbarNavHidden = computed(() => !this.layoutService.layoutState().topbarMenuVisible && this.isTopbarMode(), /* @ts-ignore */
|
|
2598
|
+
...(ngDevMode ? [{ debugName: "isTopbarNavHidden" }] : /* istanbul ignore next */ []));
|
|
2599
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2600
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: AppLayout, isStandalone: true, selector: "app-layout", ngImport: i0, template: `
|
|
2601
|
+
<div
|
|
2602
|
+
class="layout-wrapper"
|
|
2603
|
+
[class.layout-overlay]="isOverlay()"
|
|
2604
|
+
[class.layout-static]="isStatic()"
|
|
2605
|
+
[class.layout-topbar-mode]="isTopbarMode()"
|
|
2606
|
+
[class.layout-static-inactive]="isStaticInactive()"
|
|
2607
|
+
[class.layout-overlay-active]="isOverlayActive()"
|
|
2608
|
+
[class.layout-mobile-active]="isMobileActive()"
|
|
2609
|
+
[class.layout-topbar-nav-hidden]="isTopbarNavHidden()"
|
|
2610
|
+
>
|
|
2792
2611
|
<app-topbar></app-topbar>
|
|
2793
2612
|
<app-sidebar></app-sidebar>
|
|
2794
2613
|
<div class="layout-main-container">
|
|
@@ -2799,15 +2618,24 @@ class AppLayout {
|
|
|
2799
2618
|
</div>
|
|
2800
2619
|
<div class="layout-mask animate-fadein"></div>
|
|
2801
2620
|
</div>
|
|
2802
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
2621
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AppTopbar, selector: "app-topbar" }, { kind: "component", type: AppSidebar, selector: "app-sidebar" }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$1.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: AppFooter, selector: "app-footer" }] });
|
|
2803
2622
|
}
|
|
2804
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: AppLayout, decorators: [{
|
|
2805
2624
|
type: Component,
|
|
2806
2625
|
args: [{
|
|
2807
2626
|
selector: 'app-layout',
|
|
2808
|
-
imports: [
|
|
2627
|
+
imports: [AppTopbar, AppSidebar, RouterModule, AppFooter],
|
|
2809
2628
|
template: `
|
|
2810
|
-
<div
|
|
2629
|
+
<div
|
|
2630
|
+
class="layout-wrapper"
|
|
2631
|
+
[class.layout-overlay]="isOverlay()"
|
|
2632
|
+
[class.layout-static]="isStatic()"
|
|
2633
|
+
[class.layout-topbar-mode]="isTopbarMode()"
|
|
2634
|
+
[class.layout-static-inactive]="isStaticInactive()"
|
|
2635
|
+
[class.layout-overlay-active]="isOverlayActive()"
|
|
2636
|
+
[class.layout-mobile-active]="isMobileActive()"
|
|
2637
|
+
[class.layout-topbar-nav-hidden]="isTopbarNavHidden()"
|
|
2638
|
+
>
|
|
2811
2639
|
<app-topbar></app-topbar>
|
|
2812
2640
|
<app-sidebar></app-sidebar>
|
|
2813
2641
|
<div class="layout-main-container">
|
|
@@ -2822,47 +2650,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.5", ngImpor
|
|
|
2822
2650
|
}]
|
|
2823
2651
|
}], ctorParameters: () => [] });
|
|
2824
2652
|
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
light: {
|
|
2829
|
-
primary: {
|
|
2830
|
-
color: '#3535cd',
|
|
2831
|
-
inverseColor: '#0707a9',
|
|
2832
|
-
hoverColor: '#0707a9',
|
|
2833
|
-
activeColor: '#0707a9',
|
|
2834
|
-
},
|
|
2835
|
-
highlight: {
|
|
2836
|
-
background: '#e2e8f0',
|
|
2837
|
-
focusBackground: '#e2e8f0',
|
|
2838
|
-
color: '#3535cd',
|
|
2839
|
-
focusColor: '#3535cd',
|
|
2840
|
-
},
|
|
2841
|
-
},
|
|
2842
|
-
},
|
|
2843
|
-
},
|
|
2844
|
-
});
|
|
2653
|
+
function buildPreset(presetName, primary) {
|
|
2654
|
+
return { preset: presetName, primary };
|
|
2655
|
+
}
|
|
2845
2656
|
|
|
2846
|
-
const
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
},
|
|
2856
|
-
highlight: {
|
|
2857
|
-
background: '#e2e8f0',
|
|
2858
|
-
focusBackground: '#e2e8f0',
|
|
2859
|
-
color: '#01712c',
|
|
2860
|
-
focusColor: '#01712c',
|
|
2861
|
-
},
|
|
2862
|
-
},
|
|
2863
|
-
},
|
|
2864
|
-
},
|
|
2865
|
-
});
|
|
2657
|
+
const NavyBlueTheme = {
|
|
2658
|
+
preset: 'Aura',
|
|
2659
|
+
primary: 'indigo',
|
|
2660
|
+
};
|
|
2661
|
+
|
|
2662
|
+
const GreenTheme = {
|
|
2663
|
+
preset: 'Aura',
|
|
2664
|
+
primary: 'green',
|
|
2665
|
+
};
|
|
2866
2666
|
|
|
2867
2667
|
const LAYOUT_MESSAGES = {
|
|
2868
2668
|
// components/top-bar/app.profile.ts
|
|
@@ -2915,6 +2715,15 @@ const LAYOUT_MESSAGES = {
|
|
|
2915
2715
|
'menu.task.manager': 'Task Manager',
|
|
2916
2716
|
'menu.notifications': 'Notifications',
|
|
2917
2717
|
'menu.localization': 'Localization',
|
|
2718
|
+
'menu.components': 'Components',
|
|
2719
|
+
'menu.components.display': 'Display',
|
|
2720
|
+
'menu.components.menu': 'Menu',
|
|
2721
|
+
'menu.components.form': 'Form',
|
|
2722
|
+
'menu.components.overlay': 'Overlay',
|
|
2723
|
+
'menu.components.data': 'Data',
|
|
2724
|
+
'menu.components.panel': 'Panel',
|
|
2725
|
+
'menu.components.media': 'Media',
|
|
2726
|
+
'menu.components.misc': 'Directives',
|
|
2918
2727
|
'menu.projects': 'Projects',
|
|
2919
2728
|
'menu.projects.active': 'Active Projects',
|
|
2920
2729
|
'menu.projects.archived': 'Archived',
|
|
@@ -2939,5 +2748,5 @@ const LAYOUT_MESSAGES = {
|
|
|
2939
2748
|
* Generated bundle index. Do not edit.
|
|
2940
2749
|
*/
|
|
2941
2750
|
|
|
2942
|
-
export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSearchbar, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LAYOUT_IS_RTL, LAYOUT_LANGUAGE_SELECTOR, LAYOUT_LANGUAGE_SELECTOR_PANEL, LAYOUT_MESSAGES, LAYOUT_NOTIFICATION_BELL, LAYOUT_SEARCHBAR, LAYOUT_SEARCH_ADAPTER, LayoutPersistenceService, LayoutService, NavyBlueTheme,
|
|
2751
|
+
export { AppCompanyBranchSelector, AppConfigurator, AppFloatingConfigurator, AppFooter, AppLauncher, AppLayout, AppMenu, AppMenuitem, AppProfile, AppSearchbar, AppSidebar, AppTopbar, GreenTheme, LAYOUT_AUTH_API, LAYOUT_AUTH_STATE, LAYOUT_IS_RTL, LAYOUT_LANGUAGE_SELECTOR, LAYOUT_LANGUAGE_SELECTOR_PANEL, LAYOUT_MESSAGES, LAYOUT_NOTIFICATION_BELL, LAYOUT_SEARCHBAR, LAYOUT_SEARCH_ADAPTER, LayoutPersistenceService, LayoutService, NavyBlueTheme, buildPreset, filterAppsByPermissions, filterMenuByPermissions };
|
|
2943
2752
|
//# sourceMappingURL=flusys-ng-layout.mjs.map
|