@skysoftware-co/bayan-core-widgets-ui 0.0.4 → 0.0.8
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/.editorconfig +17 -0
- package/.github/copilot/WidgetDevelopmentGuide.md +632 -0
- package/.github/copilot/WidgetProjectStructure.md +81 -0
- package/.github/copilot/git.md +176 -0
- package/.github/copilot/guideline.md +466 -0
- package/.github/copilot-instructions.md +697 -0
- package/.github/prompts/As world class developer, create unit tests for.prompt.md +7 -0
- package/README.md +1 -337
- package/Web.config +7 -0
- package/angular.json +43 -0
- package/package.json +54 -31
- package/projects/bayan-core-ui/README.md +522 -0
- package/projects/bayan-core-ui/ng-package.json +7 -0
- package/projects/bayan-core-ui/package.json +36 -0
- package/projects/bayan-core-ui/src/assets/i18n/ar.json +725 -0
- package/projects/bayan-core-ui/src/assets/i18n/en.json +683 -0
- package/projects/bayan-core-ui/src/assets/i18n/fr.json +687 -0
- package/projects/bayan-core-ui/src/lib/shared/common-methods/navigation.utils.ts +21 -0
- package/projects/bayan-core-ui/src/lib/shared/menu.dtos.ts +107 -0
- package/projects/bayan-core-ui/src/lib/shared/menu.service.ts +157 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/about-dialog-widget/about-dialog-widget.component.html +37 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/about-dialog-widget/about-dialog-widget.component.ts +68 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/change-password-widget/change-password-widget.component.html +56 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/change-password-widget/change-password-widget.component.ts +158 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/global-search-widget/global-search-widget.component.html +39 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/global-search-widget/global-search-widget.component.ts +152 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/item-widget/item-widget.component.html +39 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/item-widget/item-widget.component.ts +80 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/notifications-widget/notifications-widget.component.html +10 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/notifications-widget/notifications-widget.component.ts +89 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/settings-widget/settings-widget.component.html +111 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/settings-widget/settings-widget.component.ts +235 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/user-panel-widget/user-panel-widget.component.html +54 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/components/user-panel-widget/user-panel-widget.component.ts +140 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/top-menu-widget.component.html +107 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/top-menu-widget.component.ts +164 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/top-menu-widget.models.ts +29 -0
- package/projects/bayan-core-ui/src/lib/top-menu-widget/top-menu-widget.styles.css +1378 -0
- package/projects/bayan-core-ui/src/public-api.ts +14 -0
- package/projects/bayan-core-ui/tsconfig.lib.json +16 -0
- package/projects/bayan-core-ui/tsconfig.lib.prod.json +9 -0
- package/projects/bayan-core-ui/tsconfig.spec.json +13 -0
- package/tsconfig.json +40 -0
- package/fesm2022/skysoftware-co-bayan-core-widgets-ui.mjs +0 -1092
- package/fesm2022/skysoftware-co-bayan-core-widgets-ui.mjs.map +0 -1
- package/index.d.ts +0 -6
- package/lib/shared/common-methods/navigation.utils.d.ts +0 -4
- package/lib/shared/common-methods/navigation.utils.d.ts.map +0 -1
- package/lib/shared/menu.dtos.d.ts +0 -91
- package/lib/shared/menu.dtos.d.ts.map +0 -1
- package/lib/shared/menu.service.d.ts +0 -24
- package/lib/shared/menu.service.d.ts.map +0 -1
- package/lib/top-menu-widget/components/about-dialog-widget/about-dialog-widget.component.d.ts +0 -18
- package/lib/top-menu-widget/components/about-dialog-widget/about-dialog-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/components/change-password-widget/change-password-widget.component.d.ts +0 -30
- package/lib/top-menu-widget/components/change-password-widget/change-password-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/components/global-search-widget/global-search-widget.component.d.ts +0 -59
- package/lib/top-menu-widget/components/global-search-widget/global-search-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/components/item-widget/item-widget.component.d.ts +0 -29
- package/lib/top-menu-widget/components/item-widget/item-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/components/notifications-widget/notifications-widget.component.d.ts +0 -23
- package/lib/top-menu-widget/components/notifications-widget/notifications-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/components/settings-widget/settings-widget.component.d.ts +0 -37
- package/lib/top-menu-widget/components/settings-widget/settings-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/components/user-panel-widget/user-panel-widget.component.d.ts +0 -43
- package/lib/top-menu-widget/components/user-panel-widget/user-panel-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/top-menu-widget.component.d.ts +0 -76
- package/lib/top-menu-widget/top-menu-widget.component.d.ts.map +0 -1
- package/lib/top-menu-widget/top-menu-widget.models.d.ts +0 -36
- package/lib/top-menu-widget/top-menu-widget.models.d.ts.map +0 -1
- package/public-api.d.ts +0 -4
- package/public-api.d.ts.map +0 -1
- package/skysoftware-co-bayan-core-widgets-ui.d.ts.map +0 -1
|
@@ -1,1092 +0,0 @@
|
|
|
1
|
-
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
2
|
-
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Injectable, EventEmitter, Output, Input, ChangeDetectionStrategy, Component, signal, ViewChild, HostListener, computed } from '@angular/core';
|
|
4
|
-
import { map, catchError, throwError } from 'rxjs';
|
|
5
|
-
import * as i1$2 from '@angular/common';
|
|
6
|
-
import { CommonModule, DOCUMENT } from '@angular/common';
|
|
7
|
-
import * as i1 from '@fortawesome/angular-fontawesome';
|
|
8
|
-
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
9
|
-
import { faCheckCircle, faTools, faGrid, faDollar, faUsers, faRightLeft, faMedal, faGraduationCap, faBell, faCheck, faCog, faInfoCircle, faPersonRunning, faQuestionCircle } from '@fortawesome/pro-solid-svg-icons';
|
|
10
|
-
import { Router } from '@angular/router';
|
|
11
|
-
import * as i1$1 from 'devextreme-angular';
|
|
12
|
-
import { DxPopupModule, DxFormModule, DxAutocompleteModule, DxToolbarModule } from 'devextreme-angular';
|
|
13
|
-
import { TranslatePipe, SkyFooterActionsComponent } from '@skysoftware-co/sky-components-ui';
|
|
14
|
-
import * as i2 from 'devextreme-angular/core';
|
|
15
|
-
import * as i3 from 'devextreme-angular/ui/nested';
|
|
16
|
-
import { faClock } from '@fortawesome/pro-light-svg-icons';
|
|
17
|
-
import { BayanEmployeeBadgeComponent } from '@skysoftware-co/bayan-components-ui';
|
|
18
|
-
|
|
19
|
-
class BayanCoreTopMenuService {
|
|
20
|
-
http = inject(HttpClient);
|
|
21
|
-
unwrap(obs) {
|
|
22
|
-
return obs.pipe(map((env) => {
|
|
23
|
-
if (!env.ResponseData) {
|
|
24
|
-
throw new Error('No data received');
|
|
25
|
-
}
|
|
26
|
-
return env.ResponseData;
|
|
27
|
-
}), catchError((error) => throwError(() => error)));
|
|
28
|
-
}
|
|
29
|
-
getBaseUrl(baseUrl) {
|
|
30
|
-
let url = baseUrl.replace('/api', '');
|
|
31
|
-
return `${url.replace(/\/$/, '')}/api/app-frame`;
|
|
32
|
-
}
|
|
33
|
-
getMicroserviceMenusByProperty(baseUrl, propertyId, systemModule) {
|
|
34
|
-
const params = new HttpParams()
|
|
35
|
-
.set('PropertyId', propertyId)
|
|
36
|
-
.set('SystemModule', systemModule);
|
|
37
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/left-menu`, { params }));
|
|
38
|
-
}
|
|
39
|
-
getMicroserviceTopMenusShortcut(baseUrl, propertyId, systemModule) {
|
|
40
|
-
const params = new HttpParams()
|
|
41
|
-
.set('PropertyId', propertyId)
|
|
42
|
-
.set('SystemModule', systemModule);
|
|
43
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/top-shortcuts`, {
|
|
44
|
-
params,
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
getGlobalSearchMenus(baseUrl, propertyId) {
|
|
48
|
-
let params = new HttpParams();
|
|
49
|
-
if (propertyId != null) {
|
|
50
|
-
params = params.set('PropertyId', propertyId);
|
|
51
|
-
}
|
|
52
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/global-search-menu`, { params }));
|
|
53
|
-
}
|
|
54
|
-
getUserPanel(baseUrl) {
|
|
55
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/user-panel`));
|
|
56
|
-
}
|
|
57
|
-
switchProperty(baseUrl, request) {
|
|
58
|
-
return this.unwrap(this.http.post(`${this.getBaseUrl(baseUrl)}/switch-property`, request));
|
|
59
|
-
}
|
|
60
|
-
getPreferences(baseUrl) {
|
|
61
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/preferences`));
|
|
62
|
-
}
|
|
63
|
-
setDisplayAlternateNames(baseUrl, request) {
|
|
64
|
-
return this.http.post(`${this.getBaseUrl(baseUrl)}/preferences/alternate-names`, request);
|
|
65
|
-
}
|
|
66
|
-
setEmployeeNamesMode(baseUrl, request) {
|
|
67
|
-
return this.http.post(`${this.getBaseUrl(baseUrl)}/preferences/employee-names-mode`, request);
|
|
68
|
-
}
|
|
69
|
-
getModuleBlockState(baseUrl, systemModule) {
|
|
70
|
-
const params = new HttpParams().set('SystemModule', systemModule);
|
|
71
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/module-block-state`, {
|
|
72
|
-
params,
|
|
73
|
-
}));
|
|
74
|
-
}
|
|
75
|
-
blockModule(baseUrl, request) {
|
|
76
|
-
return this.http.post(`${this.getBaseUrl(baseUrl)}/block-module`, request);
|
|
77
|
-
}
|
|
78
|
-
releaseModule(baseUrl, request) {
|
|
79
|
-
return this.http.post(`${this.getBaseUrl(baseUrl)}/release-module`, request);
|
|
80
|
-
}
|
|
81
|
-
getNotificationsSummary(baseUrl) {
|
|
82
|
-
return this.unwrap(this.http.get(`${this.getBaseUrl(baseUrl)}/notifications-summary`));
|
|
83
|
-
}
|
|
84
|
-
changePassword(baseUrl, request) {
|
|
85
|
-
return this.http.post(`${this.getBaseUrl(baseUrl)}/change-password`, request);
|
|
86
|
-
}
|
|
87
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreTopMenuService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
88
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreTopMenuService, providedIn: 'root' });
|
|
89
|
-
}
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreTopMenuService, decorators: [{
|
|
91
|
-
type: Injectable,
|
|
92
|
-
args: [{
|
|
93
|
-
providedIn: 'root',
|
|
94
|
-
}]
|
|
95
|
-
}] });
|
|
96
|
-
|
|
97
|
-
class BayanCoreAboutDialogWidgetComponent {
|
|
98
|
-
baseUrl = '';
|
|
99
|
-
visible = false;
|
|
100
|
-
config;
|
|
101
|
-
visibleChange = new EventEmitter();
|
|
102
|
-
licenseClick = new EventEmitter();
|
|
103
|
-
releaseNotesClick = new EventEmitter();
|
|
104
|
-
supportClick = new EventEmitter();
|
|
105
|
-
checkCircleIcon = faCheckCircle;
|
|
106
|
-
onBackdropClick(event) {
|
|
107
|
-
if (event.target.classList.contains('about-backdrop')) {
|
|
108
|
-
this.closeDialog();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
closeDialog() {
|
|
112
|
-
this.visibleChange.emit(false);
|
|
113
|
-
}
|
|
114
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreAboutDialogWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
115
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreAboutDialogWidgetComponent, isStandalone: true, selector: "bayan-core-about-dialog-widget", inputs: { baseUrl: "baseUrl", visible: "visible", config: "config" }, outputs: { visibleChange: "visibleChange", licenseClick: "licenseClick", releaseNotesClick: "releaseNotesClick", supportClick: "supportClick" }, ngImport: i0, template: "@if (visible) {\r\n <div class=\"about-backdrop\" (click)=\"onBackdropClick($event)\">\r\n <div class=\"about-modal\" role=\"dialog\" aria-labelledby=\"topMenuAboutDialogTitle\" aria-modal=\"true\">\r\n <div class=\"about-modal-header\">\r\n <h4 class=\"about-modal-title\" id=\"topMenuAboutDialogTitle\">{{ config.title || 'AboutSkyBayan' | translate }}</h4>\r\n <button type=\"button\" class=\"about-close-btn\" (click)=\"closeDialog()\" [attr.aria-label]=\"(config.closeButtonLabel || 'Close') | translate\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"about-modal-body\">\r\n <div class=\"row align-items-start\">\r\n <div class=\"col-4\">\r\n @if (config.logoUrl) {\r\n <img [src]=\"config.logoUrl\" alt=\"Logo\" class=\"img-fluid about-logo\">\r\n }\r\n </div>\r\n <div class=\"col-8\">\r\n <h3 class=\"about-product-name\">{{ config.title || 'AboutSkyBayan' | translate }}</h3>\r\n <p class=\"about-version-text mb-1\">{{ (config.versionLabel || 'Version') | translate }} {{ config.version || '' }}</p>\r\n <p class=\"about-up-to-date mb-2\">\r\n <fa-icon [icon]=\"checkCircleIcon\" class=\"text-info me-1\"></fa-icon>\r\n <small class=\"text-muted\">{{ (config.statusLabel || 'SkyBayanUpToDate') | translate }}</small>\r\n </p>\r\n <p class=\"about-copyright mb-0\">{{ config.copyright || '' }}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"about-modal-actions\">\r\n <button type=\"button\" class=\"about-action-btn\" (click)=\"licenseClick.emit()\">{{ (config.licenseButtonLabel || 'LicenseInformation') | translate }}</button>\r\n <button type=\"button\" class=\"about-action-btn\" (click)=\"releaseNotesClick.emit()\">{{ (config.releaseNotesButtonLabel || 'ReleaseNotes') | translate }}</button>\r\n <button type=\"button\" class=\"about-action-btn\" (click)=\"supportClick.emit()\">{{ (config.supportButtonLabel || 'TechnicalSupport') | translate }}</button>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
116
|
-
}
|
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreAboutDialogWidgetComponent, decorators: [{
|
|
118
|
-
type: Component,
|
|
119
|
-
args: [{ selector: 'bayan-core-about-dialog-widget', standalone: true, imports: [CommonModule, FontAwesomeModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (visible) {\r\n <div class=\"about-backdrop\" (click)=\"onBackdropClick($event)\">\r\n <div class=\"about-modal\" role=\"dialog\" aria-labelledby=\"topMenuAboutDialogTitle\" aria-modal=\"true\">\r\n <div class=\"about-modal-header\">\r\n <h4 class=\"about-modal-title\" id=\"topMenuAboutDialogTitle\">{{ config.title || 'AboutSkyBayan' | translate }}</h4>\r\n <button type=\"button\" class=\"about-close-btn\" (click)=\"closeDialog()\" [attr.aria-label]=\"(config.closeButtonLabel || 'Close') | translate\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n </div>\r\n\r\n <div class=\"about-modal-body\">\r\n <div class=\"row align-items-start\">\r\n <div class=\"col-4\">\r\n @if (config.logoUrl) {\r\n <img [src]=\"config.logoUrl\" alt=\"Logo\" class=\"img-fluid about-logo\">\r\n }\r\n </div>\r\n <div class=\"col-8\">\r\n <h3 class=\"about-product-name\">{{ config.title || 'AboutSkyBayan' | translate }}</h3>\r\n <p class=\"about-version-text mb-1\">{{ (config.versionLabel || 'Version') | translate }} {{ config.version || '' }}</p>\r\n <p class=\"about-up-to-date mb-2\">\r\n <fa-icon [icon]=\"checkCircleIcon\" class=\"text-info me-1\"></fa-icon>\r\n <small class=\"text-muted\">{{ (config.statusLabel || 'SkyBayanUpToDate') | translate }}</small>\r\n </p>\r\n <p class=\"about-copyright mb-0\">{{ config.copyright || '' }}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"about-modal-actions\">\r\n <button type=\"button\" class=\"about-action-btn\" (click)=\"licenseClick.emit()\">{{ (config.licenseButtonLabel || 'LicenseInformation') | translate }}</button>\r\n <button type=\"button\" class=\"about-action-btn\" (click)=\"releaseNotesClick.emit()\">{{ (config.releaseNotesButtonLabel || 'ReleaseNotes') | translate }}</button>\r\n <button type=\"button\" class=\"about-action-btn\" (click)=\"supportClick.emit()\">{{ (config.supportButtonLabel || 'TechnicalSupport') | translate }}</button>\r\n </div>\r\n </div>\r\n </div>\r\n}\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"] }]
|
|
120
|
-
}], propDecorators: { baseUrl: [{
|
|
121
|
-
type: Input
|
|
122
|
-
}], visible: [{
|
|
123
|
-
type: Input
|
|
124
|
-
}], config: [{
|
|
125
|
-
type: Input,
|
|
126
|
-
args: [{ required: true }]
|
|
127
|
-
}], visibleChange: [{
|
|
128
|
-
type: Output
|
|
129
|
-
}], licenseClick: [{
|
|
130
|
-
type: Output
|
|
131
|
-
}], releaseNotesClick: [{
|
|
132
|
-
type: Output
|
|
133
|
-
}], supportClick: [{
|
|
134
|
-
type: Output
|
|
135
|
-
}] } });
|
|
136
|
-
|
|
137
|
-
class BayanCoreChangePasswordWidgetComponent {
|
|
138
|
-
baseUrl = '';
|
|
139
|
-
visible = false;
|
|
140
|
-
config;
|
|
141
|
-
isSubmitting = false;
|
|
142
|
-
visibleChange = new EventEmitter();
|
|
143
|
-
submitPasswordChange = new EventEmitter();
|
|
144
|
-
changePasswordForm;
|
|
145
|
-
currentPasswordMode = signal('password');
|
|
146
|
-
newPasswordMode = signal('password');
|
|
147
|
-
confirmNewPasswordMode = signal('password');
|
|
148
|
-
formData = {
|
|
149
|
-
currentPassword: '',
|
|
150
|
-
newPassword: '',
|
|
151
|
-
confirmNewPassword: '',
|
|
152
|
-
};
|
|
153
|
-
closeDialog() {
|
|
154
|
-
this.visible = false;
|
|
155
|
-
this.visibleChange.emit(false);
|
|
156
|
-
this.resetForm();
|
|
157
|
-
}
|
|
158
|
-
resetForm() {
|
|
159
|
-
this.formData = {
|
|
160
|
-
currentPassword: '',
|
|
161
|
-
newPassword: '',
|
|
162
|
-
confirmNewPassword: '',
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
onSaveButtonClick() {
|
|
166
|
-
const isValid = this.changePasswordForm?.instance.validate().isValid ?? false;
|
|
167
|
-
if (!isValid) {
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
this.submitPasswordChange.emit({ ...this.formData });
|
|
171
|
-
}
|
|
172
|
-
togglePasswordMode(field) {
|
|
173
|
-
const current = this[field]();
|
|
174
|
-
this[field].set(current === 'text' ? 'password' : 'text');
|
|
175
|
-
}
|
|
176
|
-
updateField(field, value) {
|
|
177
|
-
this.formData = {
|
|
178
|
-
...this.formData,
|
|
179
|
-
[field]: value,
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
isChangePasswordValid() {
|
|
183
|
-
return !!this.formData.currentPassword && !!this.formData.newPassword && !!this.formData.confirmNewPassword && this.formData.newPassword === this.formData.confirmNewPassword;
|
|
184
|
-
}
|
|
185
|
-
getCurrentPasswordEditorOptions() {
|
|
186
|
-
return {
|
|
187
|
-
maxLength: 256,
|
|
188
|
-
disabled: this.isSubmitting,
|
|
189
|
-
mode: this.currentPasswordMode(),
|
|
190
|
-
onValueChanged: (event) => this.updateField('currentPassword', event.value ?? ''),
|
|
191
|
-
buttons: [{
|
|
192
|
-
name: 'password',
|
|
193
|
-
location: 'after',
|
|
194
|
-
options: {
|
|
195
|
-
stylingMode: 'text',
|
|
196
|
-
icon: this.currentPasswordMode() === 'text' ? 'eyeopen' : 'eyeclose',
|
|
197
|
-
onClick: () => this.togglePasswordMode('currentPasswordMode'),
|
|
198
|
-
},
|
|
199
|
-
}],
|
|
200
|
-
};
|
|
201
|
-
}
|
|
202
|
-
getNewPasswordEditorOptions() {
|
|
203
|
-
return {
|
|
204
|
-
maxLength: 256,
|
|
205
|
-
disabled: this.isSubmitting,
|
|
206
|
-
mode: this.newPasswordMode(),
|
|
207
|
-
onValueChanged: (event) => this.updateField('newPassword', event.value ?? ''),
|
|
208
|
-
buttons: [{
|
|
209
|
-
name: 'password',
|
|
210
|
-
location: 'after',
|
|
211
|
-
options: {
|
|
212
|
-
stylingMode: 'text',
|
|
213
|
-
icon: this.newPasswordMode() === 'text' ? 'eyeopen' : 'eyeclose',
|
|
214
|
-
onClick: () => this.togglePasswordMode('newPasswordMode'),
|
|
215
|
-
},
|
|
216
|
-
}],
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
getConfirmPasswordEditorOptions() {
|
|
220
|
-
return {
|
|
221
|
-
maxLength: 256,
|
|
222
|
-
disabled: this.isSubmitting,
|
|
223
|
-
mode: this.confirmNewPasswordMode(),
|
|
224
|
-
onValueChanged: (event) => this.updateField('confirmNewPassword', event.value ?? ''),
|
|
225
|
-
buttons: [{
|
|
226
|
-
name: 'password',
|
|
227
|
-
location: 'after',
|
|
228
|
-
options: {
|
|
229
|
-
stylingMode: 'text',
|
|
230
|
-
icon: this.confirmNewPasswordMode() === 'text' ? 'eyeopen' : 'eyeclose',
|
|
231
|
-
onClick: () => this.togglePasswordMode('confirmNewPasswordMode'),
|
|
232
|
-
},
|
|
233
|
-
}],
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
passwordComparison = () => this.formData.newPassword;
|
|
237
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreChangePasswordWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
238
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.21", type: BayanCoreChangePasswordWidgetComponent, isStandalone: true, selector: "bayan-core-change-password-widget", inputs: { baseUrl: "baseUrl", visible: "visible", config: "config", isSubmitting: "isSubmitting" }, outputs: { visibleChange: "visibleChange", submitPasswordChange: "submitPasswordChange" }, viewQueries: [{ propertyName: "changePasswordForm", first: true, predicate: ["changePasswordForm"], descendants: true }], ngImport: i0, template: "<dx-popup\r\n [visible]=\"visible\"\r\n (onHiding)=\"closeDialog()\"\r\n [title]=\"config.title | translate\"\r\n [showCloseButton]=\"true\"\r\n [width]=\"450\"\r\n [height]=\"'auto'\"\r\n [dragEnabled]=\"false\"\r\n [shading]=\"true\"\r\n shadingColor=\"rgba(0,0,0,0.4)\">\r\n <div *dxTemplate=\"let data of 'content'\">\r\n <dx-form\r\n #changePasswordForm\r\n [formData]=\"formData\"\r\n labelLocation=\"top\"\r\n [showColonAfterLabel]=\"false\"\r\n class=\"mb-3 mx-2\">\r\n <dxi-item\r\n dataField=\"currentPassword\"\r\n editorType=\"dxTextBox\"\r\n [editorOptions]=\"getCurrentPasswordEditorOptions()\">\r\n <dxo-label [text]=\"config.currentPasswordLabel | translate\"></dxo-label>\r\n <dxi-validation-rule type=\"required\"></dxi-validation-rule>\r\n </dxi-item>\r\n\r\n <dxi-item\r\n dataField=\"newPassword\"\r\n editorType=\"dxTextBox\"\r\n [editorOptions]=\"getNewPasswordEditorOptions()\">\r\n <dxo-label [text]=\"config.newPasswordLabel | translate\"></dxo-label>\r\n <dxi-validation-rule type=\"required\"></dxi-validation-rule>\r\n </dxi-item>\r\n\r\n <dxi-item\r\n dataField=\"confirmNewPassword\"\r\n editorType=\"dxTextBox\"\r\n [editorOptions]=\"getConfirmPasswordEditorOptions()\">\r\n <dxo-label [text]=\"config.confirmNewPasswordLabel | translate\"></dxo-label>\r\n <dxi-validation-rule type=\"required\"></dxi-validation-rule>\r\n <dxi-validation-rule\r\n type=\"compare\"\r\n [comparisonTarget]=\"passwordComparison\">\r\n </dxi-validation-rule>\r\n </dxi-item>\r\n </dx-form>\r\n\r\n <sky-footer-actions\r\n [primaryButtonText]=\"config.primaryButtonText | translate\"\r\n [showSecondaryButton]=\"false\"\r\n [isLoading]=\"isSubmitting\"\r\n [disabledPrimaryButton]=\"isSubmitting || !isChangePasswordValid()\"\r\n (PrimaryButtonClick)=\"onSaveButtonClick()\">\r\n </sky-footer-actions>\r\n </div>\r\n</dx-popup>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DxPopupModule }, { kind: "component", type: i1$1.DxPopupComponent, selector: "dx-popup", inputs: ["accessKey", "animation", "closeOnOutsideClick", "container", "contentTemplate", "deferRendering", "disabled", "dragAndResizeArea", "dragEnabled", "dragOutsideBoundary", "enableBodyScroll", "focusStateEnabled", "fullScreen", "height", "hideOnOutsideClick", "hideOnParentScroll", "hint", "hoverStateEnabled", "maxHeight", "maxWidth", "minHeight", "minWidth", "position", "resizeEnabled", "restorePosition", "rtlEnabled", "shading", "shadingColor", "showCloseButton", "showTitle", "tabIndex", "title", "titleTemplate", "toolbarItems", "visible", "width", "wrapperAttr"], outputs: ["onContentReady", "onDisposing", "onHidden", "onHiding", "onInitialized", "onOptionChanged", "onResize", "onResizeEnd", "onResizeStart", "onShowing", "onShown", "onTitleRendered", "accessKeyChange", "animationChange", "closeOnOutsideClickChange", "containerChange", "contentTemplateChange", "deferRenderingChange", "disabledChange", "dragAndResizeAreaChange", "dragEnabledChange", "dragOutsideBoundaryChange", "enableBodyScrollChange", "focusStateEnabledChange", "fullScreenChange", "heightChange", "hideOnOutsideClickChange", "hideOnParentScrollChange", "hintChange", "hoverStateEnabledChange", "maxHeightChange", "maxWidthChange", "minHeightChange", "minWidthChange", "positionChange", "resizeEnabledChange", "restorePositionChange", "rtlEnabledChange", "shadingChange", "shadingColorChange", "showCloseButtonChange", "showTitleChange", "tabIndexChange", "titleChange", "titleTemplateChange", "toolbarItemsChange", "visibleChange", "widthChange", "wrapperAttrChange"] }, { kind: "directive", type: i2.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "ngmodule", type: DxFormModule }, { kind: "component", type: i1$1.DxFormComponent, selector: "dx-form", inputs: ["accessKey", "activeStateEnabled", "alignItemLabels", "alignItemLabelsInAllGroups", "colCount", "colCountByScreen", "customizeItem", "disabled", "elementAttr", "focusStateEnabled", "formData", "height", "hint", "hoverStateEnabled", "isDirty", "items", "labelLocation", "labelMode", "minColWidth", "optionalMark", "readOnly", "requiredMark", "requiredMessage", "rtlEnabled", "screenByWidth", "scrollingEnabled", "showColonAfterLabel", "showOptionalMark", "showRequiredMark", "showValidationSummary", "tabIndex", "validationGroup", "visible", "width"], outputs: ["onContentReady", "onDisposing", "onEditorEnterKey", "onFieldDataChanged", "onInitialized", "onOptionChanged", "accessKeyChange", "activeStateEnabledChange", "alignItemLabelsChange", "alignItemLabelsInAllGroupsChange", "colCountChange", "colCountByScreenChange", "customizeItemChange", "disabledChange", "elementAttrChange", "focusStateEnabledChange", "formDataChange", "heightChange", "hintChange", "hoverStateEnabledChange", "isDirtyChange", "itemsChange", "labelLocationChange", "labelModeChange", "minColWidthChange", "optionalMarkChange", "readOnlyChange", "requiredMarkChange", "requiredMessageChange", "rtlEnabledChange", "screenByWidthChange", "scrollingEnabledChange", "showColonAfterLabelChange", "showOptionalMarkChange", "showRequiredMarkChange", "showValidationSummaryChange", "tabIndexChange", "validationGroupChange", "visibleChange", "widthChange"] }, { kind: "component", type: i3.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "author", "id", "timestamp", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "captionTemplate", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "linkAttr", "url", "collapsed", "collapsedSize", "collapsible", "maxSize", "minSize", "resizable", "size", "splitter", "heightRatio", "widthRatio", "expanded", "hasItems", "parentId"] }, { kind: "component", type: i3.DxoLabelComponent, selector: "dxo-label", inputs: ["connectorColor", "connectorWidth", "customizeText", "font", "format", "indent", "visible", "horizontalAlignment", "position", "text", "verticalAlignment", "alignment", "customizeHint", "displayMode", "indentFromAxis", "overlappingBehavior", "rotationAngle", "staggeringSpacing", "template", "textOverflow", "wordWrap", "argumentFormat", "backgroundColor", "border", "connector", "displayFormat", "horizontalOffset", "showForZeroValues", "verticalOffset", "hideFirstOrLast", "indentFromTick", "useRangeColors", "location", "showColon", "radialOffset", "topIndent", "shadow", "useNodeColors", "dataField", "enabled"] }, { kind: "component", type: i3.DxiValidationRuleComponent, selector: "dxi-validation-rule", inputs: ["message", "trim", "type", "ignoreEmptyValue", "max", "min", "reevaluate", "validationCallback", "comparisonTarget", "comparisonType", "pattern"] }, { kind: "component", type: SkyFooterActionsComponent, selector: "sky-footer-actions", inputs: ["primaryButtonText", "extraButtonText", "secondaryButtonText", "primaryButtonWidth", "secondaryButtonWidth", "extraButtonWidth", "isFillRowWidth", "primaryButtonHeight", "secondaryButtonHeight", "extraButtonHeight", "showPrimaryButton", "showSecondaryButton", "showExtraButton", "primaryButtonType", "secondaryButtonType", "extraButtonType", "disabledPrimaryButton", "disabledSecondaryButton", "disabledExtraButton", "primarySubmitBehavior", "secondarySubmitBehavior", "extraSubmitBehavior", "primaryButtonClass", "secondaryButtonClass", "extraButtonClass", "formValidationGroup", "isLoading", "loadingText", "disabled", "EditMode", "validatePrimaryAction", "validateExtraAction", "showErrorLabel", "errorMessage", "errorLabel", "closeButtonClass", "marginClass", "successMessage"], outputs: ["PrimaryButtonClick", "SecondaryButtonClick", "ExtraButtonClick"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
239
|
-
}
|
|
240
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreChangePasswordWidgetComponent, decorators: [{
|
|
241
|
-
type: Component,
|
|
242
|
-
args: [{ selector: 'bayan-core-change-password-widget', standalone: true, imports: [CommonModule, DxPopupModule, DxFormModule, SkyFooterActionsComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<dx-popup\r\n [visible]=\"visible\"\r\n (onHiding)=\"closeDialog()\"\r\n [title]=\"config.title | translate\"\r\n [showCloseButton]=\"true\"\r\n [width]=\"450\"\r\n [height]=\"'auto'\"\r\n [dragEnabled]=\"false\"\r\n [shading]=\"true\"\r\n shadingColor=\"rgba(0,0,0,0.4)\">\r\n <div *dxTemplate=\"let data of 'content'\">\r\n <dx-form\r\n #changePasswordForm\r\n [formData]=\"formData\"\r\n labelLocation=\"top\"\r\n [showColonAfterLabel]=\"false\"\r\n class=\"mb-3 mx-2\">\r\n <dxi-item\r\n dataField=\"currentPassword\"\r\n editorType=\"dxTextBox\"\r\n [editorOptions]=\"getCurrentPasswordEditorOptions()\">\r\n <dxo-label [text]=\"config.currentPasswordLabel | translate\"></dxo-label>\r\n <dxi-validation-rule type=\"required\"></dxi-validation-rule>\r\n </dxi-item>\r\n\r\n <dxi-item\r\n dataField=\"newPassword\"\r\n editorType=\"dxTextBox\"\r\n [editorOptions]=\"getNewPasswordEditorOptions()\">\r\n <dxo-label [text]=\"config.newPasswordLabel | translate\"></dxo-label>\r\n <dxi-validation-rule type=\"required\"></dxi-validation-rule>\r\n </dxi-item>\r\n\r\n <dxi-item\r\n dataField=\"confirmNewPassword\"\r\n editorType=\"dxTextBox\"\r\n [editorOptions]=\"getConfirmPasswordEditorOptions()\">\r\n <dxo-label [text]=\"config.confirmNewPasswordLabel | translate\"></dxo-label>\r\n <dxi-validation-rule type=\"required\"></dxi-validation-rule>\r\n <dxi-validation-rule\r\n type=\"compare\"\r\n [comparisonTarget]=\"passwordComparison\">\r\n </dxi-validation-rule>\r\n </dxi-item>\r\n </dx-form>\r\n\r\n <sky-footer-actions\r\n [primaryButtonText]=\"config.primaryButtonText | translate\"\r\n [showSecondaryButton]=\"false\"\r\n [isLoading]=\"isSubmitting\"\r\n [disabledPrimaryButton]=\"isSubmitting || !isChangePasswordValid()\"\r\n (PrimaryButtonClick)=\"onSaveButtonClick()\">\r\n </sky-footer-actions>\r\n </div>\r\n</dx-popup>\r\n" }]
|
|
243
|
-
}], propDecorators: { baseUrl: [{
|
|
244
|
-
type: Input
|
|
245
|
-
}], visible: [{
|
|
246
|
-
type: Input
|
|
247
|
-
}], config: [{
|
|
248
|
-
type: Input,
|
|
249
|
-
args: [{ required: true }]
|
|
250
|
-
}], isSubmitting: [{
|
|
251
|
-
type: Input
|
|
252
|
-
}], visibleChange: [{
|
|
253
|
-
type: Output
|
|
254
|
-
}], submitPasswordChange: [{
|
|
255
|
-
type: Output
|
|
256
|
-
}], changePasswordForm: [{
|
|
257
|
-
type: ViewChild,
|
|
258
|
-
args: ['changePasswordForm']
|
|
259
|
-
}] } });
|
|
260
|
-
|
|
261
|
-
class BayanCoreGlobalSearchWidgetComponent {
|
|
262
|
-
menuService = inject(BayanCoreTopMenuService);
|
|
263
|
-
document = inject(DOCUMENT);
|
|
264
|
-
router = inject(Router);
|
|
265
|
-
searchAutoComplete;
|
|
266
|
-
baseUrl = '';
|
|
267
|
-
ActivePropertyChanged = false;
|
|
268
|
-
ActivePropertyId = 0;
|
|
269
|
-
placeholder = 'Type to search';
|
|
270
|
-
searchMode = 'contains';
|
|
271
|
-
stylingMode = 'filled';
|
|
272
|
-
searchWrapperClass = 'top-menu-widget__search';
|
|
273
|
-
searchItemClass = 'top-menu-widget__search-item d-flex flex-column text-decoration-none';
|
|
274
|
-
searchItemTitleClass = 'top-menu-widget__search-item-title text-light fs-11 mb-1 d-flex align-content-center';
|
|
275
|
-
searchItemSubtitleClass = 'top-menu-widget__search-item-subtitle text-dark fs-13 ms-2 ps-1';
|
|
276
|
-
iconClass = 'fs-11 fw-medium me-1';
|
|
277
|
-
search = new EventEmitter();
|
|
278
|
-
itemNavigate = new EventEmitter();
|
|
279
|
-
dataSource = [];
|
|
280
|
-
toolsIcon = faTools;
|
|
281
|
-
gridIcon = faGrid;
|
|
282
|
-
creditIcon = faDollar;
|
|
283
|
-
usersIcon = faUsers;
|
|
284
|
-
clockIcon = faClock;
|
|
285
|
-
swapIcon = faRightLeft;
|
|
286
|
-
medalIcon = faMedal;
|
|
287
|
-
graduateIcon = faGraduationCap;
|
|
288
|
-
ngOnInit() {
|
|
289
|
-
this.loadMenus();
|
|
290
|
-
}
|
|
291
|
-
// Removed duplicate ngOnChanges
|
|
292
|
-
loadMenus() {
|
|
293
|
-
if (this.baseUrl && this.ActivePropertyId > 0) {
|
|
294
|
-
this.menuService.getGlobalSearchMenus(this.baseUrl, this.ActivePropertyId).subscribe({
|
|
295
|
-
next: (menus) => this.dataSource = menus ?? [],
|
|
296
|
-
error: () => this.dataSource = []
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
ngOnChanges(changes) {
|
|
301
|
-
if (changes['ActivePropertyChanged']
|
|
302
|
-
&& !changes['ActivePropertyChanged'].firstChange
|
|
303
|
-
&& changes['ActivePropertyChanged'].previousValue !== changes['ActivePropertyChanged'].currentValue) {
|
|
304
|
-
this.reset();
|
|
305
|
-
this.loadMenus();
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
onInput(event) {
|
|
309
|
-
const searchTerm = event.event?.target?.value;
|
|
310
|
-
if (typeof searchTerm === 'string' && searchTerm.startsWith(' ')) {
|
|
311
|
-
event.component?.option('value', searchTerm.trim());
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
onEnterKey(event) {
|
|
315
|
-
const searchTerm = (event.event?.target?.value ?? '').toString().trim();
|
|
316
|
-
if (!searchTerm) {
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
const match = this.dataSource.find((item) => item.MenuSubTitle.toLowerCase().trim() === searchTerm.toLowerCase().trim());
|
|
320
|
-
if (match) {
|
|
321
|
-
window.location.href = match.MenuUrl;
|
|
322
|
-
this.itemNavigate.emit(match);
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
this.search.emit(searchTerm);
|
|
326
|
-
}
|
|
327
|
-
onItemSelected(event, item) {
|
|
328
|
-
event.preventDefault();
|
|
329
|
-
event.stopPropagation();
|
|
330
|
-
if (item.MenuUrl) {
|
|
331
|
-
window.location.href = item.MenuUrl;
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
reset() {
|
|
335
|
-
this.searchAutoComplete?.instance?.option('value', '');
|
|
336
|
-
}
|
|
337
|
-
getText(text, isTranslatable = false) {
|
|
338
|
-
return isTranslatable ? text : text;
|
|
339
|
-
}
|
|
340
|
-
getIconForClass(iconClass) {
|
|
341
|
-
switch (iconClass) {
|
|
342
|
-
case 'icon icon-tools':
|
|
343
|
-
return this.toolsIcon;
|
|
344
|
-
case 'icon icon-grid':
|
|
345
|
-
return this.gridIcon;
|
|
346
|
-
case 'icon icon-credit':
|
|
347
|
-
return this.creditIcon;
|
|
348
|
-
case 'icon icon-users':
|
|
349
|
-
return this.usersIcon;
|
|
350
|
-
case 'icon icon-clock':
|
|
351
|
-
return this.clockIcon;
|
|
352
|
-
case 'icon icon-swap':
|
|
353
|
-
return this.swapIcon;
|
|
354
|
-
case 'icon icon-medal':
|
|
355
|
-
return this.medalIcon;
|
|
356
|
-
case 'icon icon-graduation-cap':
|
|
357
|
-
return this.graduateIcon;
|
|
358
|
-
default:
|
|
359
|
-
return this.toolsIcon;
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreGlobalSearchWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
363
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreGlobalSearchWidgetComponent, isStandalone: true, selector: "bayan-core-global-search-widget", inputs: { baseUrl: "baseUrl", ActivePropertyChanged: "ActivePropertyChanged", ActivePropertyId: "ActivePropertyId", placeholder: "placeholder", searchMode: "searchMode", stylingMode: "stylingMode", searchWrapperClass: "searchWrapperClass", searchItemClass: "searchItemClass", searchItemTitleClass: "searchItemTitleClass", searchItemSubtitleClass: "searchItemSubtitleClass", iconClass: "iconClass" }, outputs: { search: "search", itemNavigate: "itemNavigate" }, viewQueries: [{ propertyName: "searchAutoComplete", first: true, predicate: ["searchAutoComplete"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div [class]=\"searchWrapperClass\">\r\n <dx-autocomplete\r\n #searchAutoComplete\r\n [placeholder]=\"placeholder | translate\"\r\n [dataSource]=\"dataSource\"\r\n valueExpr=\"menuSubTitle\"\r\n [searchExpr]=\"['menuSubTitle']\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [searchMode]=\"searchMode\"\r\n [width]=\"'100%'\"\r\n [stylingMode]=\"stylingMode\"\r\n [wrapItemText]=\"true\"\r\n [searchTimeout]=\"100\"\r\n (onInput)=\"onInput($event)\"\r\n (onEnterKey)=\"onEnterKey($event)\">\r\n <div class=\"w-100\" *dxTemplate=\"let item of 'item'\">\r\n <a\r\n [class]=\"searchItemClass\"\r\n href=\"{{item.MenuUrl}}\" >\r\n <div [class]=\"searchItemTitleClass\">\r\n <fa-icon [icon]=\"getIconForClass(item.iconClass)\" [class]=\"iconClass\"></fa-icon>\r\n @if (item.isTranslatable) {\r\n {{ item.menuTitle | translate }}\r\n } @else {\r\n {{ item.menuTitle }}\r\n }\r\n </div>\r\n <div [class]=\"searchItemSubtitleClass\">\r\n @if (item.isTranslatable) {\r\n {{ item.menuSubTitle | translate }}\r\n } @else {\r\n {{ item.menuSubTitle }}\r\n }\r\n </div>\r\n </a>\r\n </div>\r\n </dx-autocomplete>\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n", ":host{display:flex;align-items:center;height:56px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DxAutocompleteModule }, { kind: "component", type: i1$1.DxAutocompleteComponent, selector: "dx-autocomplete", inputs: ["accessKey", "activeStateEnabled", "buttons", "dataSource", "deferRendering", "disabled", "displayValue", "dropDownButtonTemplate", "dropDownOptions", "elementAttr", "focusStateEnabled", "grouped", "groupTemplate", "height", "hint", "hoverStateEnabled", "inputAttr", "isDirty", "isValid", "items", "itemTemplate", "label", "labelMode", "maxItemCount", "maxLength", "minSearchLength", "name", "opened", "openOnFieldClick", "placeholder", "readOnly", "rtlEnabled", "searchExpr", "searchMode", "searchTimeout", "selectedItem", "showClearButton", "showDropDownButton", "spellcheck", "stylingMode", "tabIndex", "text", "useItemTextAsTitle", "validationError", "validationErrors", "validationMessageMode", "validationMessagePosition", "validationStatus", "value", "valueChangeEvent", "valueExpr", "visible", "width", "wrapItemText"], outputs: ["onChange", "onClosed", "onContentReady", "onCopy", "onCut", "onDisposing", "onEnterKey", "onFocusIn", "onFocusOut", "onInitialized", "onInput", "onItemClick", "onKeyDown", "onKeyUp", "onOpened", "onOptionChanged", "onPaste", "onSelectionChanged", "onValueChanged", "accessKeyChange", "activeStateEnabledChange", "buttonsChange", "dataSourceChange", "deferRenderingChange", "disabledChange", "displayValueChange", "dropDownButtonTemplateChange", "dropDownOptionsChange", "elementAttrChange", "focusStateEnabledChange", "groupedChange", "groupTemplateChange", "heightChange", "hintChange", "hoverStateEnabledChange", "inputAttrChange", "isDirtyChange", "isValidChange", "itemsChange", "itemTemplateChange", "labelChange", "labelModeChange", "maxItemCountChange", "maxLengthChange", "minSearchLengthChange", "nameChange", "openedChange", "openOnFieldClickChange", "placeholderChange", "readOnlyChange", "rtlEnabledChange", "searchExprChange", "searchModeChange", "searchTimeoutChange", "selectedItemChange", "showClearButtonChange", "showDropDownButtonChange", "spellcheckChange", "stylingModeChange", "tabIndexChange", "textChange", "useItemTextAsTitleChange", "validationErrorChange", "validationErrorsChange", "validationMessageModeChange", "validationMessagePositionChange", "validationStatusChange", "valueChange", "valueChangeEventChange", "valueExprChange", "visibleChange", "widthChange", "wrapItemTextChange", "onBlur"] }, { kind: "directive", type: i2.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
364
|
-
}
|
|
365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreGlobalSearchWidgetComponent, decorators: [{
|
|
366
|
-
type: Component,
|
|
367
|
-
args: [{ selector: 'bayan-core-global-search-widget', standalone: true, imports: [CommonModule, DxAutocompleteModule, FontAwesomeModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"searchWrapperClass\">\r\n <dx-autocomplete\r\n #searchAutoComplete\r\n [placeholder]=\"placeholder | translate\"\r\n [dataSource]=\"dataSource\"\r\n valueExpr=\"menuSubTitle\"\r\n [searchExpr]=\"['menuSubTitle']\"\r\n [showClearButton]=\"false\"\r\n [showDropDownButton]=\"false\"\r\n [searchMode]=\"searchMode\"\r\n [width]=\"'100%'\"\r\n [stylingMode]=\"stylingMode\"\r\n [wrapItemText]=\"true\"\r\n [searchTimeout]=\"100\"\r\n (onInput)=\"onInput($event)\"\r\n (onEnterKey)=\"onEnterKey($event)\">\r\n <div class=\"w-100\" *dxTemplate=\"let item of 'item'\">\r\n <a\r\n [class]=\"searchItemClass\"\r\n href=\"{{item.MenuUrl}}\" >\r\n <div [class]=\"searchItemTitleClass\">\r\n <fa-icon [icon]=\"getIconForClass(item.iconClass)\" [class]=\"iconClass\"></fa-icon>\r\n @if (item.isTranslatable) {\r\n {{ item.menuTitle | translate }}\r\n } @else {\r\n {{ item.menuTitle }}\r\n }\r\n </div>\r\n <div [class]=\"searchItemSubtitleClass\">\r\n @if (item.isTranslatable) {\r\n {{ item.menuSubTitle | translate }}\r\n } @else {\r\n {{ item.menuSubTitle }}\r\n }\r\n </div>\r\n </a>\r\n </div>\r\n </dx-autocomplete>\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n", ":host{display:flex;align-items:center;height:56px}\n"] }]
|
|
368
|
-
}], propDecorators: { searchAutoComplete: [{
|
|
369
|
-
type: ViewChild,
|
|
370
|
-
args: ['searchAutoComplete']
|
|
371
|
-
}], baseUrl: [{
|
|
372
|
-
type: Input
|
|
373
|
-
}], ActivePropertyChanged: [{
|
|
374
|
-
type: Input
|
|
375
|
-
}], ActivePropertyId: [{
|
|
376
|
-
type: Input
|
|
377
|
-
}], placeholder: [{
|
|
378
|
-
type: Input
|
|
379
|
-
}], searchMode: [{
|
|
380
|
-
type: Input
|
|
381
|
-
}], stylingMode: [{
|
|
382
|
-
type: Input
|
|
383
|
-
}], searchWrapperClass: [{
|
|
384
|
-
type: Input
|
|
385
|
-
}], searchItemClass: [{
|
|
386
|
-
type: Input
|
|
387
|
-
}], searchItemTitleClass: [{
|
|
388
|
-
type: Input
|
|
389
|
-
}], searchItemSubtitleClass: [{
|
|
390
|
-
type: Input
|
|
391
|
-
}], iconClass: [{
|
|
392
|
-
type: Input
|
|
393
|
-
}], search: [{
|
|
394
|
-
type: Output
|
|
395
|
-
}], itemNavigate: [{
|
|
396
|
-
type: Output
|
|
397
|
-
}] } });
|
|
398
|
-
|
|
399
|
-
class BayanCoreItemWidgetComponent {
|
|
400
|
-
elementRef;
|
|
401
|
-
document = inject(DOCUMENT);
|
|
402
|
-
router = inject(Router);
|
|
403
|
-
baseUrl = '';
|
|
404
|
-
ActivePropertyChanged = false;
|
|
405
|
-
item;
|
|
406
|
-
navItemClass = 'nav-item';
|
|
407
|
-
navLinkClass = 'nav-link';
|
|
408
|
-
dropdownClass = 'nav-item dropdown';
|
|
409
|
-
dropdownOpenClass = 'open';
|
|
410
|
-
dropdownToggleClass = 'nav-link dropdown-toggle';
|
|
411
|
-
caretClass = 'caret';
|
|
412
|
-
dropdownMenuClass = 'dropdown-menu menu-dropdown-panel';
|
|
413
|
-
itemClick = new EventEmitter();
|
|
414
|
-
open = signal(false);
|
|
415
|
-
constructor(elementRef) {
|
|
416
|
-
this.elementRef = elementRef;
|
|
417
|
-
}
|
|
418
|
-
ngOnChanges(changes) {
|
|
419
|
-
if (changes['ActivePropertyChanged']
|
|
420
|
-
&& !changes['ActivePropertyChanged'].firstChange
|
|
421
|
-
&& changes['ActivePropertyChanged'].previousValue !== changes['ActivePropertyChanged'].currentValue) {
|
|
422
|
-
this.open.set(false);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
onDocumentClick(event) {
|
|
426
|
-
const target = event.target;
|
|
427
|
-
if (target && !this.elementRef.nativeElement.contains(target)) {
|
|
428
|
-
this.open.set(false);
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
hasChildren() {
|
|
432
|
-
return (this.item.Children ?? []).length > 0;
|
|
433
|
-
}
|
|
434
|
-
onItemActivated(event) {
|
|
435
|
-
event.preventDefault();
|
|
436
|
-
if (this.hasChildren()) {
|
|
437
|
-
event.stopPropagation();
|
|
438
|
-
this.open.update((value) => !value);
|
|
439
|
-
return;
|
|
440
|
-
}
|
|
441
|
-
this.itemClick.emit(this.item);
|
|
442
|
-
if (typeof this.item.MenuUrl === 'string' && this.item.MenuName == 'Reports') {
|
|
443
|
-
window.open(this.item.MenuUrl, '_blank');
|
|
444
|
-
}
|
|
445
|
-
else if (this.item.MenuUrl) {
|
|
446
|
-
window.location.href = this.item.MenuUrl;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
onChildItemClick(item) {
|
|
450
|
-
this.open.set(false);
|
|
451
|
-
this.itemClick.emit(item);
|
|
452
|
-
}
|
|
453
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreItemWidgetComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
454
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreItemWidgetComponent, isStandalone: true, selector: "bayan-core-item-widget", inputs: { baseUrl: "baseUrl", ActivePropertyChanged: "ActivePropertyChanged", item: "item", navItemClass: "navItemClass", navLinkClass: "navLinkClass", dropdownClass: "dropdownClass", dropdownOpenClass: "dropdownOpenClass", dropdownToggleClass: "dropdownToggleClass", caretClass: "caretClass", dropdownMenuClass: "dropdownMenuClass" }, outputs: { itemClick: "itemClick" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "@if (!hasChildren()) {\r\n <li [class]=\"navItemClass\">\r\n <a\r\n [class]=\"navLinkClass\"\r\n href=\"#\"\r\n (click)=\"onItemActivated($event)\">\r\n {{ item.MenuName | translate }}\r\n </a>\r\n </li>\r\n}\r\n\r\n@if (hasChildren()) {\r\n <li [class]=\"dropdownClass\" [class.open]=\"open()\">\r\n <a href=\"#\" [class]=\"dropdownToggleClass\" (click)=\"onItemActivated($event)\">\r\n {{ item.MenuName | translate }} <span [class]=\"caretClass\"></span>\r\n </a>\r\n\r\n @if (open()) {\r\n <ul [class]=\"dropdownMenuClass\">\r\n @for (child of item.Children; track child.MenuName) {\r\n <bayan-core-item-widget\r\n [baseUrl]=\"baseUrl\"\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n [item]=\"child\"\r\n (itemClick)=\"onChildItemClick($event)\"\r\n [navItemClass]=\"navItemClass\"\r\n [navLinkClass]=\"navLinkClass\"\r\n [dropdownClass]=\"dropdownClass\"\r\n [dropdownOpenClass]=\"dropdownOpenClass\"\r\n [dropdownToggleClass]=\"dropdownToggleClass\"\r\n [caretClass]=\"caretClass\"\r\n [dropdownMenuClass]=\"dropdownMenuClass\"\r\n >\r\n </bayan-core-item-widget>\r\n }\r\n </ul>\r\n }\r\n </li>\r\n}\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n", ":host{display:contents}\n"], dependencies: [{ kind: "component", type: BayanCoreItemWidgetComponent, selector: "bayan-core-item-widget", inputs: ["baseUrl", "ActivePropertyChanged", "item", "navItemClass", "navLinkClass", "dropdownClass", "dropdownOpenClass", "dropdownToggleClass", "caretClass", "dropdownMenuClass"], outputs: ["itemClick"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
455
|
-
}
|
|
456
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreItemWidgetComponent, decorators: [{
|
|
457
|
-
type: Component,
|
|
458
|
-
args: [{ selector: 'bayan-core-item-widget', standalone: true, imports: [CommonModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!hasChildren()) {\r\n <li [class]=\"navItemClass\">\r\n <a\r\n [class]=\"navLinkClass\"\r\n href=\"#\"\r\n (click)=\"onItemActivated($event)\">\r\n {{ item.MenuName | translate }}\r\n </a>\r\n </li>\r\n}\r\n\r\n@if (hasChildren()) {\r\n <li [class]=\"dropdownClass\" [class.open]=\"open()\">\r\n <a href=\"#\" [class]=\"dropdownToggleClass\" (click)=\"onItemActivated($event)\">\r\n {{ item.MenuName | translate }} <span [class]=\"caretClass\"></span>\r\n </a>\r\n\r\n @if (open()) {\r\n <ul [class]=\"dropdownMenuClass\">\r\n @for (child of item.Children; track child.MenuName) {\r\n <bayan-core-item-widget\r\n [baseUrl]=\"baseUrl\"\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n [item]=\"child\"\r\n (itemClick)=\"onChildItemClick($event)\"\r\n [navItemClass]=\"navItemClass\"\r\n [navLinkClass]=\"navLinkClass\"\r\n [dropdownClass]=\"dropdownClass\"\r\n [dropdownOpenClass]=\"dropdownOpenClass\"\r\n [dropdownToggleClass]=\"dropdownToggleClass\"\r\n [caretClass]=\"caretClass\"\r\n [dropdownMenuClass]=\"dropdownMenuClass\"\r\n >\r\n </bayan-core-item-widget>\r\n }\r\n </ul>\r\n }\r\n </li>\r\n}\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n", ":host{display:contents}\n"] }]
|
|
459
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { baseUrl: [{
|
|
460
|
-
type: Input
|
|
461
|
-
}], ActivePropertyChanged: [{
|
|
462
|
-
type: Input
|
|
463
|
-
}], item: [{
|
|
464
|
-
type: Input,
|
|
465
|
-
args: [{ required: true }]
|
|
466
|
-
}], navItemClass: [{
|
|
467
|
-
type: Input
|
|
468
|
-
}], navLinkClass: [{
|
|
469
|
-
type: Input
|
|
470
|
-
}], dropdownClass: [{
|
|
471
|
-
type: Input
|
|
472
|
-
}], dropdownOpenClass: [{
|
|
473
|
-
type: Input
|
|
474
|
-
}], dropdownToggleClass: [{
|
|
475
|
-
type: Input
|
|
476
|
-
}], caretClass: [{
|
|
477
|
-
type: Input
|
|
478
|
-
}], dropdownMenuClass: [{
|
|
479
|
-
type: Input
|
|
480
|
-
}], itemClick: [{
|
|
481
|
-
type: Output
|
|
482
|
-
}], onDocumentClick: [{
|
|
483
|
-
type: HostListener,
|
|
484
|
-
args: ['document:click', ['$event']]
|
|
485
|
-
}] } });
|
|
486
|
-
|
|
487
|
-
class BayanCoreNotificationsWidgetComponent {
|
|
488
|
-
document = inject(DOCUMENT);
|
|
489
|
-
topMenuService = inject(BayanCoreTopMenuService);
|
|
490
|
-
baseUrl = '';
|
|
491
|
-
title = 'Notifications';
|
|
492
|
-
wrapperClass = 'notifications-icon-wrap menu-dropdown-host';
|
|
493
|
-
linkClass = 'menu-icon-btn cursor-pointer notifications-icon-btn';
|
|
494
|
-
iconClass = 'fs-6';
|
|
495
|
-
badgeClass = 'notifications-badge';
|
|
496
|
-
bellIcon = faBell;
|
|
497
|
-
notificationsSummary = signal({
|
|
498
|
-
NotificationsUrl: '',
|
|
499
|
-
TotalNotificationsCount: 0,
|
|
500
|
-
});
|
|
501
|
-
ngOnInit() {
|
|
502
|
-
this.loadNotificationsSummary();
|
|
503
|
-
}
|
|
504
|
-
ngOnChanges(changes) {
|
|
505
|
-
if (changes['baseUrl'] && !changes['baseUrl'].firstChange) {
|
|
506
|
-
this.loadNotificationsSummary();
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
onNotificationClick(event) {
|
|
510
|
-
event?.preventDefault();
|
|
511
|
-
const rawNotificationUrl = this.notificationsSummary().NotificationsUrl;
|
|
512
|
-
if (rawNotificationUrl) {
|
|
513
|
-
this.document.location.href = `${window.location.origin}${rawNotificationUrl}`;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
loadNotificationsSummary() {
|
|
517
|
-
if (!this.baseUrl) {
|
|
518
|
-
this.resetNotificationsData();
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
this.topMenuService.getNotificationsSummary(this.baseUrl).subscribe({
|
|
522
|
-
next: (summary) => {
|
|
523
|
-
this.notificationsSummary.set({
|
|
524
|
-
NotificationsUrl: summary.NotificationsUrl,
|
|
525
|
-
TotalNotificationsCount: summary.TotalNotificationsCount,
|
|
526
|
-
});
|
|
527
|
-
},
|
|
528
|
-
error: () => {
|
|
529
|
-
this.resetNotificationsData();
|
|
530
|
-
},
|
|
531
|
-
});
|
|
532
|
-
}
|
|
533
|
-
resetNotificationsData() {
|
|
534
|
-
this.notificationsSummary.set({
|
|
535
|
-
NotificationsUrl: '',
|
|
536
|
-
TotalNotificationsCount: 0,
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreNotificationsWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
540
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreNotificationsWidgetComponent, isStandalone: true, selector: "bayan-core-notifications-widget", inputs: { baseUrl: "baseUrl", title: "title", wrapperClass: "wrapperClass", linkClass: "linkClass", iconClass: "iconClass", badgeClass: "badgeClass" }, usesOnChanges: true, ngImport: i0, template: "<div [class]=\"wrapperClass\">\r\n <a [class]=\"linkClass\"\r\n [title]=\"title | translate\"\r\n (click)=\"onNotificationClick($event)\">\r\n <fa-icon [class]=\"iconClass\" [icon]=\"bellIcon\"></fa-icon>\r\n @if ((notificationsSummary().TotalNotificationsCount || 0) > 0) {\r\n <span [class]=\"badgeClass\">{{ notificationsSummary().TotalNotificationsCount }}</span>\r\n }\r\n </a>\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n", ":host{display:flex;align-items:center;height:56px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
541
|
-
}
|
|
542
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreNotificationsWidgetComponent, decorators: [{
|
|
543
|
-
type: Component,
|
|
544
|
-
args: [{ selector: 'bayan-core-notifications-widget', standalone: true, imports: [CommonModule, FontAwesomeModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [class]=\"wrapperClass\">\r\n <a [class]=\"linkClass\"\r\n [title]=\"title | translate\"\r\n (click)=\"onNotificationClick($event)\">\r\n <fa-icon [class]=\"iconClass\" [icon]=\"bellIcon\"></fa-icon>\r\n @if ((notificationsSummary().TotalNotificationsCount || 0) > 0) {\r\n <span [class]=\"badgeClass\">{{ notificationsSummary().TotalNotificationsCount }}</span>\r\n }\r\n </a>\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n", ":host{display:flex;align-items:center;height:56px}\n"] }]
|
|
545
|
-
}], propDecorators: { baseUrl: [{
|
|
546
|
-
type: Input
|
|
547
|
-
}], title: [{
|
|
548
|
-
type: Input
|
|
549
|
-
}], wrapperClass: [{
|
|
550
|
-
type: Input
|
|
551
|
-
}], linkClass: [{
|
|
552
|
-
type: Input
|
|
553
|
-
}], iconClass: [{
|
|
554
|
-
type: Input
|
|
555
|
-
}], badgeClass: [{
|
|
556
|
-
type: Input
|
|
557
|
-
}] } });
|
|
558
|
-
|
|
559
|
-
class BayanCoreSettingsWidgetComponent {
|
|
560
|
-
elementRef;
|
|
561
|
-
ActivePropertyChanged = false;
|
|
562
|
-
useAlternateNames = false;
|
|
563
|
-
displayAlternateNames = false;
|
|
564
|
-
hrBlocked = false;
|
|
565
|
-
hrCanBlock = false;
|
|
566
|
-
tkBlocked = false;
|
|
567
|
-
tkCanBlock = false;
|
|
568
|
-
nameModeItems = [];
|
|
569
|
-
settingsEnabled = true;
|
|
570
|
-
alternateNamesChange = new EventEmitter();
|
|
571
|
-
nameModeChange = new EventEmitter();
|
|
572
|
-
blockHrClick = new EventEmitter();
|
|
573
|
-
releaseHrClick = new EventEmitter();
|
|
574
|
-
blockTkClick = new EventEmitter();
|
|
575
|
-
releaseTkClick = new EventEmitter();
|
|
576
|
-
changePasswordClick = new EventEmitter();
|
|
577
|
-
openAboutClick = new EventEmitter();
|
|
578
|
-
checkIcon = faCheck;
|
|
579
|
-
cogIcon = faCog;
|
|
580
|
-
infoIcon = faInfoCircle;
|
|
581
|
-
dropdownOpen = signal(false);
|
|
582
|
-
constructor(elementRef) {
|
|
583
|
-
this.elementRef = elementRef;
|
|
584
|
-
}
|
|
585
|
-
ngOnChanges(changes) {
|
|
586
|
-
if (changes['ActivePropertyChanged']
|
|
587
|
-
&& !changes['ActivePropertyChanged'].firstChange
|
|
588
|
-
&& changes['ActivePropertyChanged'].previousValue !== changes['ActivePropertyChanged'].currentValue) {
|
|
589
|
-
this.dropdownOpen.set(false);
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
onDocumentClick(event) {
|
|
593
|
-
const target = event.target;
|
|
594
|
-
if (target && !this.elementRef.nativeElement.contains(target)) {
|
|
595
|
-
this.dropdownOpen.set(false);
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
toggleDropdown(event) {
|
|
599
|
-
event.preventDefault();
|
|
600
|
-
this.dropdownOpen.update((value) => !value);
|
|
601
|
-
}
|
|
602
|
-
onAlternateNamesClick(event) {
|
|
603
|
-
event.preventDefault();
|
|
604
|
-
if (!this.settingsEnabled) {
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
this.alternateNamesChange.emit();
|
|
608
|
-
}
|
|
609
|
-
onNameModeClick(index, event) {
|
|
610
|
-
event.preventDefault();
|
|
611
|
-
if (!this.settingsEnabled) {
|
|
612
|
-
return;
|
|
613
|
-
}
|
|
614
|
-
this.dropdownOpen.set(false);
|
|
615
|
-
this.nameModeChange.emit(index);
|
|
616
|
-
}
|
|
617
|
-
emitAndClose(event, emitter) {
|
|
618
|
-
event.preventDefault();
|
|
619
|
-
this.dropdownOpen.set(false);
|
|
620
|
-
emitter.emit();
|
|
621
|
-
}
|
|
622
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreSettingsWidgetComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
623
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreSettingsWidgetComponent, isStandalone: true, selector: "bayan-core-settings-widget", inputs: { ActivePropertyChanged: "ActivePropertyChanged", useAlternateNames: "useAlternateNames", displayAlternateNames: "displayAlternateNames", hrBlocked: "hrBlocked", hrCanBlock: "hrCanBlock", tkBlocked: "tkBlocked", tkCanBlock: "tkCanBlock", nameModeItems: "nameModeItems", settingsEnabled: "settingsEnabled" }, outputs: { alternateNamesChange: "alternateNamesChange", nameModeChange: "nameModeChange", blockHrClick: "blockHrClick", releaseHrClick: "releaseHrClick", blockTkClick: "blockTkClick", releaseTkClick: "releaseTkClick", changePasswordClick: "changePasswordClick", openAboutClick: "openAboutClick" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"dropdown menu-dropdown-host\" [class.open]=\"dropdownOpen()\">\r\n <a href=\"#\" class=\"settings-toggle menu-icon-btn\" (click)=\"toggleDropdown($event)\" [title]=\"'Settings' | translate\">\r\n <fa-icon [icon]=\"cogIcon\" class=\"fs-6\"></fa-icon>\r\n </a>\r\n\r\n @if (dropdownOpen()) {\r\n <ul class=\"settings-menu menu-dropdown-panel\">\r\n @if (useAlternateNames) {\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" [class.disabled]=\"!settingsEnabled\" (click)=\"onAlternateNamesClick($event)\">\r\n @if (displayAlternateNames) {\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n } @else {\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n }\r\n {{ 'DisplayAlternateNames' | translate }}\r\n </a>\r\n </li>\r\n <li><hr class=\"dropdown-divider\"></li>\r\n }\r\n\r\n @if (hrCanBlock) {\r\n <li>\r\n @if (hrBlocked) {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, releaseHrClick)\">\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'ReleaseHR' | translate }}\r\n </a>\r\n } @else {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, blockHrClick)\">\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'BlockHR' | translate }}\r\n </a>\r\n }\r\n </li>\r\n }\r\n\r\n @if (tkCanBlock) {\r\n <li>\r\n @if (tkBlocked) {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, releaseTkClick)\">\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'ReleaseTK' | translate }}\r\n </a>\r\n } @else {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, blockTkClick)\">\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'BlockTK' | translate }}\r\n </a>\r\n }\r\n </li>\r\n }\r\n\r\n @if (hrCanBlock || tkCanBlock) {\r\n <li><hr class=\"dropdown-divider\"></li>\r\n }\r\n\r\n @if (nameModeItems.length > 0) {\r\n <li>\r\n <span class=\"menu-section-label\">{{ 'EmployeeNamesMode' | translate }}</span>\r\n </li>\r\n\r\n @for (item of nameModeItems; track item.id; let index = $index) {\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" [class.disabled]=\"!settingsEnabled\" (click)=\"onNameModeClick(index, $event)\">\r\n @if (item.selected) {\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n } @else {\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n }\r\n {{ item.text }}\r\n </a>\r\n </li>\r\n }\r\n\r\n <li><hr class=\"dropdown-divider\"></li>\r\n }\r\n\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, changePasswordClick)\">\r\n <span class=\"menu-indicator\"></span>\r\n {{ 'ChangePassword' | translate }}\r\n </a>\r\n </li>\r\n\r\n <li><hr class=\"dropdown-divider\"></li>\r\n\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, openAboutClick)\">\r\n <fa-icon class=\"menu-indicator\" [icon]=\"infoIcon\"></fa-icon>\r\n {{ 'About' | translate }}\r\n </a>\r\n </li>\r\n </ul>\r\n }\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
624
|
-
}
|
|
625
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreSettingsWidgetComponent, decorators: [{
|
|
626
|
-
type: Component,
|
|
627
|
-
args: [{ selector: 'bayan-core-settings-widget', standalone: true, imports: [CommonModule, FontAwesomeModule, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"dropdown menu-dropdown-host\" [class.open]=\"dropdownOpen()\">\r\n <a href=\"#\" class=\"settings-toggle menu-icon-btn\" (click)=\"toggleDropdown($event)\" [title]=\"'Settings' | translate\">\r\n <fa-icon [icon]=\"cogIcon\" class=\"fs-6\"></fa-icon>\r\n </a>\r\n\r\n @if (dropdownOpen()) {\r\n <ul class=\"settings-menu menu-dropdown-panel\">\r\n @if (useAlternateNames) {\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" [class.disabled]=\"!settingsEnabled\" (click)=\"onAlternateNamesClick($event)\">\r\n @if (displayAlternateNames) {\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n } @else {\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n }\r\n {{ 'DisplayAlternateNames' | translate }}\r\n </a>\r\n </li>\r\n <li><hr class=\"dropdown-divider\"></li>\r\n }\r\n\r\n @if (hrCanBlock) {\r\n <li>\r\n @if (hrBlocked) {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, releaseHrClick)\">\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'ReleaseHR' | translate }}\r\n </a>\r\n } @else {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, blockHrClick)\">\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'BlockHR' | translate }}\r\n </a>\r\n }\r\n </li>\r\n }\r\n\r\n @if (tkCanBlock) {\r\n <li>\r\n @if (tkBlocked) {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, releaseTkClick)\">\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'ReleaseTK' | translate }}\r\n </a>\r\n } @else {\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, blockTkClick)\">\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n {{ 'BlockTK' | translate }}\r\n </a>\r\n }\r\n </li>\r\n }\r\n\r\n @if (hrCanBlock || tkCanBlock) {\r\n <li><hr class=\"dropdown-divider\"></li>\r\n }\r\n\r\n @if (nameModeItems.length > 0) {\r\n <li>\r\n <span class=\"menu-section-label\">{{ 'EmployeeNamesMode' | translate }}</span>\r\n </li>\r\n\r\n @for (item of nameModeItems; track item.id; let index = $index) {\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" [class.disabled]=\"!settingsEnabled\" (click)=\"onNameModeClick(index, $event)\">\r\n @if (item.selected) {\r\n <fa-icon class=\"menu-indicator menu-indicator-active\" [icon]=\"checkIcon\"></fa-icon>\r\n } @else {\r\n <fa-icon class=\"menu-indicator invisible\" [icon]=\"checkIcon\"></fa-icon>\r\n }\r\n {{ item.text }}\r\n </a>\r\n </li>\r\n }\r\n\r\n <li><hr class=\"dropdown-divider\"></li>\r\n }\r\n\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, changePasswordClick)\">\r\n <span class=\"menu-indicator\"></span>\r\n {{ 'ChangePassword' | translate }}\r\n </a>\r\n </li>\r\n\r\n <li><hr class=\"dropdown-divider\"></li>\r\n\r\n <li>\r\n <a class=\"dropdown-item header-dropdown-item menu-row text-dark-gray\" (click)=\"emitAndClose($event, openAboutClick)\">\r\n <fa-icon class=\"menu-indicator\" [icon]=\"infoIcon\"></fa-icon>\r\n {{ 'About' | translate }}\r\n </a>\r\n </li>\r\n </ul>\r\n }\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"] }]
|
|
628
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { ActivePropertyChanged: [{
|
|
629
|
-
type: Input
|
|
630
|
-
}], useAlternateNames: [{
|
|
631
|
-
type: Input
|
|
632
|
-
}], displayAlternateNames: [{
|
|
633
|
-
type: Input
|
|
634
|
-
}], hrBlocked: [{
|
|
635
|
-
type: Input
|
|
636
|
-
}], hrCanBlock: [{
|
|
637
|
-
type: Input
|
|
638
|
-
}], tkBlocked: [{
|
|
639
|
-
type: Input
|
|
640
|
-
}], tkCanBlock: [{
|
|
641
|
-
type: Input
|
|
642
|
-
}], nameModeItems: [{
|
|
643
|
-
type: Input
|
|
644
|
-
}], settingsEnabled: [{
|
|
645
|
-
type: Input
|
|
646
|
-
}], alternateNamesChange: [{
|
|
647
|
-
type: Output
|
|
648
|
-
}], nameModeChange: [{
|
|
649
|
-
type: Output
|
|
650
|
-
}], blockHrClick: [{
|
|
651
|
-
type: Output
|
|
652
|
-
}], releaseHrClick: [{
|
|
653
|
-
type: Output
|
|
654
|
-
}], blockTkClick: [{
|
|
655
|
-
type: Output
|
|
656
|
-
}], releaseTkClick: [{
|
|
657
|
-
type: Output
|
|
658
|
-
}], changePasswordClick: [{
|
|
659
|
-
type: Output
|
|
660
|
-
}], openAboutClick: [{
|
|
661
|
-
type: Output
|
|
662
|
-
}], onDocumentClick: [{
|
|
663
|
-
type: HostListener,
|
|
664
|
-
args: ['document:click', ['$event']]
|
|
665
|
-
}] } });
|
|
666
|
-
|
|
667
|
-
class BayanCoreUserPanelWidgetComponent {
|
|
668
|
-
elementRef;
|
|
669
|
-
topMenuService = inject(BayanCoreTopMenuService);
|
|
670
|
-
baseUrl = '';
|
|
671
|
-
wrapperClass = 'menu-dropdown-host';
|
|
672
|
-
dropdownOpenClass = 'open';
|
|
673
|
-
toggleButtonClass = 'employee-toggle';
|
|
674
|
-
employeeInfoClass = 'employee-info';
|
|
675
|
-
userNameClass = 'user-name';
|
|
676
|
-
propertyNameClass = 'property-name';
|
|
677
|
-
caretClass = 'employee-caret';
|
|
678
|
-
menuClass = 'employee-menu menu-dropdown-panel';
|
|
679
|
-
sectionLabelClass = 'menu-section-label';
|
|
680
|
-
menuItemClass = 'menu-item';
|
|
681
|
-
menuItemActiveClass = 'menu-item-active';
|
|
682
|
-
indicatorClass = 'menu-indicator';
|
|
683
|
-
invisibleIndicatorClass = 'invisible';
|
|
684
|
-
dividerClass = 'menu-divider';
|
|
685
|
-
signOutButtonClass = 'menu-item menu-item-signout';
|
|
686
|
-
showSignOutIcon = true;
|
|
687
|
-
signOutIconClass = 'mx-2';
|
|
688
|
-
propertyChanged = new EventEmitter();
|
|
689
|
-
signOutClick = new EventEmitter();
|
|
690
|
-
signOutIcon = faPersonRunning;
|
|
691
|
-
dropdownOpen = signal(false);
|
|
692
|
-
userPanel = signal(null);
|
|
693
|
-
badge = computed(() => ({
|
|
694
|
-
EmployeePhotoKey: this.userPanel()?.PhotoPath ?? null,
|
|
695
|
-
EmployeePhotoFailed: false,
|
|
696
|
-
EmployeeNameInitials: this.userPanel()?.NameInitials ?? '',
|
|
697
|
-
}));
|
|
698
|
-
constructor(elementRef) {
|
|
699
|
-
this.elementRef = elementRef;
|
|
700
|
-
}
|
|
701
|
-
ngOnInit() {
|
|
702
|
-
this.loadUserPanel();
|
|
703
|
-
}
|
|
704
|
-
ngOnChanges(changes) {
|
|
705
|
-
if (changes['baseUrl'] && !changes['baseUrl'].firstChange) {
|
|
706
|
-
this.loadUserPanel();
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
onDocumentClick(event) {
|
|
710
|
-
const target = event.target;
|
|
711
|
-
if (target && !this.elementRef.nativeElement.contains(target)) {
|
|
712
|
-
this.dropdownOpen.set(false);
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
toggleDropdown(event) {
|
|
716
|
-
event.preventDefault();
|
|
717
|
-
this.dropdownOpen.update((value) => !value);
|
|
718
|
-
}
|
|
719
|
-
selectProperty(event, property) {
|
|
720
|
-
event.preventDefault();
|
|
721
|
-
if (property.PropertyId === this.userPanel()?.ActivePropertyId) {
|
|
722
|
-
this.dropdownOpen.set(false);
|
|
723
|
-
return;
|
|
724
|
-
}
|
|
725
|
-
this.dropdownOpen.set(false);
|
|
726
|
-
this.topMenuService
|
|
727
|
-
.switchProperty(this.baseUrl, { PropertyId: property.PropertyId })
|
|
728
|
-
.subscribe({
|
|
729
|
-
next: () => {
|
|
730
|
-
this.topMenuService.getUserPanel(this.baseUrl).subscribe({
|
|
731
|
-
next: (userPanel) => {
|
|
732
|
-
this.userPanel.set(userPanel);
|
|
733
|
-
this.propertyChanged.emit(property);
|
|
734
|
-
},
|
|
735
|
-
});
|
|
736
|
-
},
|
|
737
|
-
});
|
|
738
|
-
}
|
|
739
|
-
signOut(event) {
|
|
740
|
-
event.preventDefault();
|
|
741
|
-
this.dropdownOpen.set(false);
|
|
742
|
-
this.signOutClick.emit();
|
|
743
|
-
}
|
|
744
|
-
loadUserPanel() {
|
|
745
|
-
if (!this.baseUrl) {
|
|
746
|
-
this.userPanel.set(null);
|
|
747
|
-
return;
|
|
748
|
-
}
|
|
749
|
-
this.topMenuService.getUserPanel(this.baseUrl).subscribe({
|
|
750
|
-
next: (userPanel) => {
|
|
751
|
-
this.userPanel.set(userPanel);
|
|
752
|
-
},
|
|
753
|
-
error: () => {
|
|
754
|
-
this.userPanel.set(null);
|
|
755
|
-
},
|
|
756
|
-
});
|
|
757
|
-
}
|
|
758
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreUserPanelWidgetComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
759
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreUserPanelWidgetComponent, isStandalone: true, selector: "bayan-core-user-panel-widget", inputs: { baseUrl: "baseUrl", wrapperClass: "wrapperClass", dropdownOpenClass: "dropdownOpenClass", toggleButtonClass: "toggleButtonClass", employeeInfoClass: "employeeInfoClass", userNameClass: "userNameClass", propertyNameClass: "propertyNameClass", caretClass: "caretClass", menuClass: "menuClass", sectionLabelClass: "sectionLabelClass", menuItemClass: "menuItemClass", menuItemActiveClass: "menuItemActiveClass", indicatorClass: "indicatorClass", invisibleIndicatorClass: "invisibleIndicatorClass", dividerClass: "dividerClass", signOutButtonClass: "signOutButtonClass", showSignOutIcon: "showSignOutIcon", signOutIconClass: "signOutIconClass" }, outputs: { propertyChanged: "propertyChanged", signOutClick: "signOutClick" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, usesOnChanges: true, ngImport: i0, template: "<div [ngClass]=\"[wrapperClass, dropdownOpen() ? dropdownOpenClass : '']\">\r\n <a href=\"#\" [class]=\"toggleButtonClass\" (click)=\"toggleDropdown($event)\">\r\n <bayan-employee-badge [badge]=\"badge()\" width=\"34px\" height=\"34px\"></bayan-employee-badge>\r\n\r\n <div [class]=\"employeeInfoClass\">\r\n <span [class]=\"userNameClass\">{{ userPanel()?.UserDisplayName || '' }}</span>\r\n\r\n @if (userPanel()?.ActivePropertyName) {\r\n <span [class]=\"propertyNameClass\">{{ userPanel()?.ActivePropertyName }}</span>\r\n }\r\n </div>\r\n\r\n <span [class]=\"caretClass\">▼</span>\r\n </a>\r\n\r\n @if (dropdownOpen()) {\r\n <ul [class]=\"menuClass\">\r\n @if ((userPanel()?.Properties?.length || 0) > 0) {\r\n <li [class]=\"sectionLabelClass\">{{ 'Properties' | translate }}</li>\r\n\r\n @for (property of userPanel()?.Properties ?? []; track property.PropertyId) {\r\n <li>\r\n <a\r\n class=\"text-dark-gray\"\r\n [ngClass]=\"[menuItemClass, property.PropertyId === userPanel()?.ActivePropertyId ? menuItemActiveClass : '']\"\r\n (click)=\"selectProperty($event, property)\">\r\n @if (property.PropertyId === userPanel()?.ActivePropertyId) {\r\n <span [class]=\"indicatorClass\">►</span>\r\n } @else {\r\n <span [class]=\"indicatorClass + ' ' + invisibleIndicatorClass\"></span>\r\n }\r\n\r\n {{ property.PropertyName }}\r\n </a>\r\n </li>\r\n }\r\n\r\n <li><hr [class]=\"dividerClass\"></li>\r\n }\r\n\r\n @if (!userPanel()?.IsSSOLogin) {\r\n <li>\r\n <a class=\"text-dark-gray\" [class]=\"signOutButtonClass\" (click)=\"signOut($event)\">\r\n @if (showSignOutIcon) {\r\n <fa-icon [class]=\"signOutIconClass\" [icon]=\"signOutIcon\"></fa-icon>\r\n }\r\n {{ 'SignOut' | translate }}\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "component", type: BayanEmployeeBadgeComponent, selector: "bayan-employee-badge", inputs: ["badge", "width", "height", "imageClass", "badgeClass"], outputs: ["employeePhotoError"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
760
|
-
}
|
|
761
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreUserPanelWidgetComponent, decorators: [{
|
|
762
|
-
type: Component,
|
|
763
|
-
args: [{ selector: 'bayan-core-user-panel-widget', standalone: true, imports: [CommonModule, FontAwesomeModule, BayanEmployeeBadgeComponent, TranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div [ngClass]=\"[wrapperClass, dropdownOpen() ? dropdownOpenClass : '']\">\r\n <a href=\"#\" [class]=\"toggleButtonClass\" (click)=\"toggleDropdown($event)\">\r\n <bayan-employee-badge [badge]=\"badge()\" width=\"34px\" height=\"34px\"></bayan-employee-badge>\r\n\r\n <div [class]=\"employeeInfoClass\">\r\n <span [class]=\"userNameClass\">{{ userPanel()?.UserDisplayName || '' }}</span>\r\n\r\n @if (userPanel()?.ActivePropertyName) {\r\n <span [class]=\"propertyNameClass\">{{ userPanel()?.ActivePropertyName }}</span>\r\n }\r\n </div>\r\n\r\n <span [class]=\"caretClass\">▼</span>\r\n </a>\r\n\r\n @if (dropdownOpen()) {\r\n <ul [class]=\"menuClass\">\r\n @if ((userPanel()?.Properties?.length || 0) > 0) {\r\n <li [class]=\"sectionLabelClass\">{{ 'Properties' | translate }}</li>\r\n\r\n @for (property of userPanel()?.Properties ?? []; track property.PropertyId) {\r\n <li>\r\n <a\r\n class=\"text-dark-gray\"\r\n [ngClass]=\"[menuItemClass, property.PropertyId === userPanel()?.ActivePropertyId ? menuItemActiveClass : '']\"\r\n (click)=\"selectProperty($event, property)\">\r\n @if (property.PropertyId === userPanel()?.ActivePropertyId) {\r\n <span [class]=\"indicatorClass\">►</span>\r\n } @else {\r\n <span [class]=\"indicatorClass + ' ' + invisibleIndicatorClass\"></span>\r\n }\r\n\r\n {{ property.PropertyName }}\r\n </a>\r\n </li>\r\n }\r\n\r\n <li><hr [class]=\"dividerClass\"></li>\r\n }\r\n\r\n @if (!userPanel()?.IsSSOLogin) {\r\n <li>\r\n <a class=\"text-dark-gray\" [class]=\"signOutButtonClass\" (click)=\"signOut($event)\">\r\n @if (showSignOutIcon) {\r\n <fa-icon [class]=\"signOutIconClass\" [icon]=\"signOutIcon\"></fa-icon>\r\n }\r\n {{ 'SignOut' | translate }}\r\n </a>\r\n </li>\r\n }\r\n </ul>\r\n }\r\n</div>\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"] }]
|
|
764
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { baseUrl: [{
|
|
765
|
-
type: Input
|
|
766
|
-
}], wrapperClass: [{
|
|
767
|
-
type: Input
|
|
768
|
-
}], dropdownOpenClass: [{
|
|
769
|
-
type: Input
|
|
770
|
-
}], toggleButtonClass: [{
|
|
771
|
-
type: Input
|
|
772
|
-
}], employeeInfoClass: [{
|
|
773
|
-
type: Input
|
|
774
|
-
}], userNameClass: [{
|
|
775
|
-
type: Input
|
|
776
|
-
}], propertyNameClass: [{
|
|
777
|
-
type: Input
|
|
778
|
-
}], caretClass: [{
|
|
779
|
-
type: Input
|
|
780
|
-
}], menuClass: [{
|
|
781
|
-
type: Input
|
|
782
|
-
}], sectionLabelClass: [{
|
|
783
|
-
type: Input
|
|
784
|
-
}], menuItemClass: [{
|
|
785
|
-
type: Input
|
|
786
|
-
}], menuItemActiveClass: [{
|
|
787
|
-
type: Input
|
|
788
|
-
}], indicatorClass: [{
|
|
789
|
-
type: Input
|
|
790
|
-
}], invisibleIndicatorClass: [{
|
|
791
|
-
type: Input
|
|
792
|
-
}], dividerClass: [{
|
|
793
|
-
type: Input
|
|
794
|
-
}], signOutButtonClass: [{
|
|
795
|
-
type: Input
|
|
796
|
-
}], showSignOutIcon: [{
|
|
797
|
-
type: Input
|
|
798
|
-
}], signOutIconClass: [{
|
|
799
|
-
type: Input
|
|
800
|
-
}], propertyChanged: [{
|
|
801
|
-
type: Output
|
|
802
|
-
}], signOutClick: [{
|
|
803
|
-
type: Output
|
|
804
|
-
}], onDocumentClick: [{
|
|
805
|
-
type: HostListener,
|
|
806
|
-
args: ['document:click', ['$event']]
|
|
807
|
-
}] } });
|
|
808
|
-
|
|
809
|
-
class BayanCoreTopMenuWidgetComponent {
|
|
810
|
-
document = inject(DOCUMENT);
|
|
811
|
-
router = inject(Router);
|
|
812
|
-
menuService = inject(BayanCoreTopMenuService);
|
|
813
|
-
baseUrl = '';
|
|
814
|
-
systemModule = null;
|
|
815
|
-
ShowShourtcutMenus = true;
|
|
816
|
-
menuItems = [];
|
|
817
|
-
sidebarCollapsed = false;
|
|
818
|
-
homeUrl = null;
|
|
819
|
-
logoUrl = 'https://cdn-dev.skysoftware.cloud/bayan/images/logo-enterprise-dark.png';
|
|
820
|
-
collapsedLogoUrl = 'https://cdn-dev.skysoftware.cloud/bayan/images/logo-collapsed.png';
|
|
821
|
-
logoClick = new EventEmitter();
|
|
822
|
-
isSsoLogin = false;
|
|
823
|
-
useAlternateNames = false;
|
|
824
|
-
displayAlternateNames = false;
|
|
825
|
-
hrBlocked = false;
|
|
826
|
-
hrCanBlock = false;
|
|
827
|
-
tkBlocked = false;
|
|
828
|
-
tkCanBlock = false;
|
|
829
|
-
nameModeItems = [];
|
|
830
|
-
settingsEnabled = true;
|
|
831
|
-
useInternalDialogs = false;
|
|
832
|
-
changePasswordLoading = false;
|
|
833
|
-
changePasswordDialog = {
|
|
834
|
-
title: 'ChangePassword',
|
|
835
|
-
currentPasswordLabel: 'CurrentPassword',
|
|
836
|
-
newPasswordLabel: 'NewPassword',
|
|
837
|
-
confirmNewPasswordLabel: 'ConfirmPassword',
|
|
838
|
-
primaryButtonText: 'Change',
|
|
839
|
-
};
|
|
840
|
-
aboutDialog = {
|
|
841
|
-
title: 'Sky Bayan Human Resources Management',
|
|
842
|
-
logoUrl: 'https://cdn-dev.skysoftware.cloud/bayan/images/logo-enterprise.png',
|
|
843
|
-
version: '',
|
|
844
|
-
versionLabel: 'Version',
|
|
845
|
-
copyright: `Copyright 2026, Sky Software Co LLC All Rights Reserved
|
|
846
|
-
Sky Bayan and Sky Bayan Logo are registered trademarks of Sky Software`,
|
|
847
|
-
statusLabel: 'SkyBayanUpToDate',
|
|
848
|
-
licenseButtonLabel: 'LicenseInformation',
|
|
849
|
-
releaseNotesButtonLabel: 'ReleaseNotes',
|
|
850
|
-
supportButtonLabel: 'TechnicalSupport',
|
|
851
|
-
closeButtonLabel: 'Close',
|
|
852
|
-
};
|
|
853
|
-
showGlobalSearch = true;
|
|
854
|
-
showUserPanel = true;
|
|
855
|
-
showSettings = false;
|
|
856
|
-
showNotifications = true;
|
|
857
|
-
notificationsTitle = 'Notifications';
|
|
858
|
-
showHelp = true;
|
|
859
|
-
helpTitle = 'Help';
|
|
860
|
-
helpUrl = 'https://docs.bayan.solutions/Bayan/index.html';
|
|
861
|
-
helpIcon = faQuestionCircle;
|
|
862
|
-
helpAnchorClass = 'menu-icon-btn';
|
|
863
|
-
helpUrlTarget = '_blank';
|
|
864
|
-
helpClick = new EventEmitter();
|
|
865
|
-
menuItemClick = new EventEmitter();
|
|
866
|
-
searchSubmit = new EventEmitter();
|
|
867
|
-
propertyChanged = new EventEmitter();
|
|
868
|
-
signOutClick = new EventEmitter();
|
|
869
|
-
alternateNamesChange = new EventEmitter();
|
|
870
|
-
nameModeChange = new EventEmitter();
|
|
871
|
-
blockHrClick = new EventEmitter();
|
|
872
|
-
releaseHrClick = new EventEmitter();
|
|
873
|
-
blockTkClick = new EventEmitter();
|
|
874
|
-
releaseTkClick = new EventEmitter();
|
|
875
|
-
changePasswordClick = new EventEmitter();
|
|
876
|
-
openAboutClick = new EventEmitter();
|
|
877
|
-
aboutLicenseClick = new EventEmitter();
|
|
878
|
-
aboutReleaseNotesClick = new EventEmitter();
|
|
879
|
-
aboutSupportClick = new EventEmitter();
|
|
880
|
-
submitPasswordChange = new EventEmitter();
|
|
881
|
-
aboutVisible = signal(false);
|
|
882
|
-
changePasswordVisible = signal(false);
|
|
883
|
-
ActivePropertyChanged = false;
|
|
884
|
-
ActivePropertyId = 0;
|
|
885
|
-
getLogoSrc() {
|
|
886
|
-
if (this.sidebarCollapsed) {
|
|
887
|
-
return this.collapsedLogoUrl || null;
|
|
888
|
-
}
|
|
889
|
-
return this.logoUrl || null;
|
|
890
|
-
}
|
|
891
|
-
onLogoClicked(event) {
|
|
892
|
-
event?.preventDefault();
|
|
893
|
-
if (this.homeUrl) {
|
|
894
|
-
window.location.href = this.homeUrl;
|
|
895
|
-
return;
|
|
896
|
-
}
|
|
897
|
-
this.logoClick.emit();
|
|
898
|
-
}
|
|
899
|
-
onHelpClicked(event) {
|
|
900
|
-
event?.preventDefault();
|
|
901
|
-
if (this.helpUrl) {
|
|
902
|
-
window.open(this.helpUrl, this.helpUrlTarget);
|
|
903
|
-
return;
|
|
904
|
-
}
|
|
905
|
-
this.helpClick.emit();
|
|
906
|
-
}
|
|
907
|
-
onChangePasswordRequested() {
|
|
908
|
-
this.changePasswordClick.emit();
|
|
909
|
-
if (this.useInternalDialogs) {
|
|
910
|
-
this.changePasswordVisible.set(true);
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
onAboutRequested() {
|
|
914
|
-
this.openAboutClick.emit();
|
|
915
|
-
if (this.useInternalDialogs) {
|
|
916
|
-
this.aboutVisible.set(true);
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
onPropertyChanged(property) {
|
|
920
|
-
this.ActivePropertyChanged = !this.ActivePropertyChanged;
|
|
921
|
-
this.ActivePropertyId = property.PropertyId;
|
|
922
|
-
this.propertyChanged.emit(property);
|
|
923
|
-
this.loadShortcutMenus();
|
|
924
|
-
}
|
|
925
|
-
ngOnInit() {
|
|
926
|
-
this.loadShortcutMenus();
|
|
927
|
-
}
|
|
928
|
-
loadShortcutMenus() {
|
|
929
|
-
if (this.ShowShourtcutMenus && this.ActivePropertyId > 0 && this.systemModule && this.baseUrl) {
|
|
930
|
-
this.menuService.getMicroserviceTopMenusShortcut(this.baseUrl, this.ActivePropertyId, this.systemModule)
|
|
931
|
-
.subscribe({
|
|
932
|
-
next: (menus) => this.menuItems = menus ?? [],
|
|
933
|
-
error: () => this.menuItems = []
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
else {
|
|
937
|
-
this.menuItems = [];
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreTopMenuWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
941
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.21", type: BayanCoreTopMenuWidgetComponent, isStandalone: true, selector: "bayan-core-top-menu-widget", inputs: { baseUrl: "baseUrl", systemModule: "systemModule", ShowShourtcutMenus: "ShowShourtcutMenus", sidebarCollapsed: "sidebarCollapsed", homeUrl: "homeUrl", logoUrl: "logoUrl", collapsedLogoUrl: "collapsedLogoUrl", isSsoLogin: "isSsoLogin", useAlternateNames: "useAlternateNames", displayAlternateNames: "displayAlternateNames", hrBlocked: "hrBlocked", hrCanBlock: "hrCanBlock", tkBlocked: "tkBlocked", tkCanBlock: "tkCanBlock", nameModeItems: "nameModeItems", settingsEnabled: "settingsEnabled", useInternalDialogs: "useInternalDialogs", changePasswordLoading: "changePasswordLoading", changePasswordDialog: "changePasswordDialog", aboutDialog: "aboutDialog", showGlobalSearch: "showGlobalSearch", showUserPanel: "showUserPanel", showSettings: "showSettings", showNotifications: "showNotifications", notificationsTitle: "notificationsTitle", showHelp: "showHelp", helpTitle: "helpTitle", helpUrl: "helpUrl", helpIcon: "helpIcon", helpAnchorClass: "helpAnchorClass", helpUrlTarget: "helpUrlTarget" }, outputs: { logoClick: "logoClick", helpClick: "helpClick", menuItemClick: "menuItemClick", searchSubmit: "searchSubmit", propertyChanged: "propertyChanged", signOutClick: "signOutClick", alternateNamesChange: "alternateNamesChange", nameModeChange: "nameModeChange", blockHrClick: "blockHrClick", releaseHrClick: "releaseHrClick", blockTkClick: "blockTkClick", releaseTkClick: "releaseTkClick", changePasswordClick: "changePasswordClick", openAboutClick: "openAboutClick", aboutLicenseClick: "aboutLicenseClick", aboutReleaseNotesClick: "aboutReleaseNotesClick", aboutSupportClick: "aboutSupportClick", submitPasswordChange: "submitPasswordChange" }, ngImport: i0, template: "<header class=\"top-bar-header shadow-sm w-100 sticky-top\">\r\n <dx-toolbar class=\"header-toolbar px-4\">\r\n <dxi-item location=\"before\">\r\n <div *dxTemplate>\r\n <a\r\n class=\"navbar-brand-link\" href=\"#\"\r\n [class.collapsed]=\"sidebarCollapsed\"\r\n (click)=\"onLogoClicked($event)\">\r\n <img\r\n [src]=\"getLogoSrc()\"\r\n alt=\"\"\r\n [class.header-logo]=\"!sidebarCollapsed\"\r\n [class.header-logo-collapsed]=\"sidebarCollapsed && !!collapsedLogoUrl\">\r\n </a>\r\n </div>\r\n </dxi-item>\r\n\r\n @if (ShowShourtcutMenus) {\r\n <dxi-item location=\"before\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <ul class=\"nav navbar-nav d-flex flex-row align-items-center mb-0 gap-1\">\r\n @for (item of menuItems; track item.MenuName) {\r\n <bayan-core-item-widget [item]=\"item\"\r\n [baseUrl]=\"baseUrl\"\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n (itemClick)=\"menuItemClick.emit($event)\">\r\n </bayan-core-item-widget>\r\n }\r\n </ul>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-global-search-widget\r\n [baseUrl]=\"baseUrl\"\r\n [ActivePropertyId]=\"ActivePropertyId\"\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n (search)=\"searchSubmit.emit($event)\">\r\n </bayan-core-global-search-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showUserPanel) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-user-panel-widget\r\n [baseUrl]=\"baseUrl\"\r\n [showSignOutIcon]=\"false\"\r\n (propertyChanged)=\"onPropertyChanged($event)\"\r\n (signOutClick)=\"signOutClick.emit()\">\r\n </bayan-core-user-panel-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showSettings) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-settings-widget\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n [useAlternateNames]=\"useAlternateNames\"\r\n [displayAlternateNames]=\"displayAlternateNames\"\r\n [hrBlocked]=\"hrBlocked\"\r\n [hrCanBlock]=\"hrCanBlock\"\r\n [tkBlocked]=\"tkBlocked\"\r\n [tkCanBlock]=\"tkCanBlock\"\r\n [nameModeItems]=\"nameModeItems\"\r\n [settingsEnabled]=\"settingsEnabled\"\r\n (alternateNamesChange)=\"alternateNamesChange.emit()\"\r\n (nameModeChange)=\"nameModeChange.emit($event)\"\r\n (blockHrClick)=\"blockHrClick.emit()\"\r\n (releaseHrClick)=\"releaseHrClick.emit()\"\r\n (blockTkClick)=\"blockTkClick.emit()\"\r\n (releaseTkClick)=\"releaseTkClick.emit()\"\r\n (changePasswordClick)=\"onChangePasswordRequested()\"\r\n (openAboutClick)=\"onAboutRequested()\">\r\n </bayan-core-settings-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showNotifications) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-notifications-widget [baseUrl]=\"baseUrl\"\r\n [title]=\"notificationsTitle | translate\" >\r\n </bayan-core-notifications-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showHelp) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <a\r\n [class]=\"helpAnchorClass\"\r\n [title]=\"helpTitle | translate\"\r\n [target]=\"helpUrlTarget\"\r\n href=\"#\"\r\n (click)=\"onHelpClicked($event)\">\r\n <fa-icon [icon]=\"helpIcon\" class=\"fs-6\"></fa-icon>\r\n </a>\r\n </div>\r\n </dxi-item>\r\n }\r\n </dx-toolbar>\r\n</header>\r\n\r\n@if (useInternalDialogs) {\r\n <bayan-core-about-dialog-widget\r\n [baseUrl]=\"baseUrl\"\r\n [visible]=\"aboutVisible()\"\r\n [config]=\"aboutDialog\"\r\n (visibleChange)=\"aboutVisible.set($event)\"\r\n (licenseClick)=\"aboutLicenseClick.emit()\"\r\n (releaseNotesClick)=\"aboutReleaseNotesClick.emit()\"\r\n (supportClick)=\"aboutSupportClick.emit()\">\r\n </bayan-core-about-dialog-widget>\r\n\r\n <bayan-core-change-password-widget\r\n [baseUrl]=\"baseUrl\"\r\n [visible]=\"changePasswordVisible()\"\r\n [config]=\"changePasswordDialog\"\r\n [isSubmitting]=\"changePasswordLoading\"\r\n (visibleChange)=\"changePasswordVisible.set($event)\"\r\n (submitPasswordChange)=\"submitPasswordChange.emit($event)\">\r\n </bayan-core-change-password-widget>\r\n}\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: DxToolbarModule }, { kind: "component", type: i1$1.DxToolbarComponent, selector: "dx-toolbar", inputs: ["dataSource", "disabled", "elementAttr", "hint", "hoverStateEnabled", "itemHoldTimeout", "items", "itemTemplate", "menuItemTemplate", "multiline", "noDataText", "rtlEnabled", "visible", "width"], outputs: ["onContentReady", "onDisposing", "onInitialized", "onItemClick", "onItemContextMenu", "onItemHold", "onItemRendered", "onOptionChanged", "dataSourceChange", "disabledChange", "elementAttrChange", "hintChange", "hoverStateEnabledChange", "itemHoldTimeoutChange", "itemsChange", "itemTemplateChange", "menuItemTemplateChange", "multilineChange", "noDataTextChange", "rtlEnabledChange", "visibleChange", "widthChange"] }, { kind: "component", type: i3.DxiItemComponent, selector: "dxi-item", inputs: ["disabled", "html", "icon", "template", "text", "title", "titleTemplate", "visible", "onClick", "stylingMode", "type", "baseSize", "box", "ratio", "shrink", "elementAttr", "hint", "author", "id", "timestamp", "beginGroup", "closeMenuOnClick", "items", "selectable", "selected", "colSpan", "cssClass", "dataField", "editorOptions", "editorType", "helpText", "isRequired", "itemType", "label", "name", "validationRules", "visibleIndex", "alignItemLabels", "caption", "captionTemplate", "colCount", "colCountByScreen", "tabPanelOptions", "tabs", "badge", "tabTemplate", "buttonOptions", "horizontalAlignment", "verticalAlignment", "locateInMenu", "location", "menuItemTemplate", "options", "showText", "widget", "height", "width", "imageAlt", "imageSrc", "acceptedValues", "formatName", "formatValues", "key", "showChevron", "linkAttr", "url", "collapsed", "collapsedSize", "collapsible", "maxSize", "minSize", "resizable", "size", "splitter", "heightRatio", "widthRatio", "expanded", "hasItems", "parentId"] }, { kind: "directive", type: i2.DxTemplateDirective, selector: "[dxTemplate]", inputs: ["dxTemplateOf"] }, { kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: BayanCoreItemWidgetComponent, selector: "bayan-core-item-widget", inputs: ["baseUrl", "ActivePropertyChanged", "item", "navItemClass", "navLinkClass", "dropdownClass", "dropdownOpenClass", "dropdownToggleClass", "caretClass", "dropdownMenuClass"], outputs: ["itemClick"] }, { kind: "component", type: BayanCoreGlobalSearchWidgetComponent, selector: "bayan-core-global-search-widget", inputs: ["baseUrl", "ActivePropertyChanged", "ActivePropertyId", "placeholder", "searchMode", "stylingMode", "searchWrapperClass", "searchItemClass", "searchItemTitleClass", "searchItemSubtitleClass", "iconClass"], outputs: ["search", "itemNavigate"] }, { kind: "component", type: BayanCoreUserPanelWidgetComponent, selector: "bayan-core-user-panel-widget", inputs: ["baseUrl", "wrapperClass", "dropdownOpenClass", "toggleButtonClass", "employeeInfoClass", "userNameClass", "propertyNameClass", "caretClass", "menuClass", "sectionLabelClass", "menuItemClass", "menuItemActiveClass", "indicatorClass", "invisibleIndicatorClass", "dividerClass", "signOutButtonClass", "showSignOutIcon", "signOutIconClass"], outputs: ["propertyChanged", "signOutClick"] }, { kind: "component", type: BayanCoreSettingsWidgetComponent, selector: "bayan-core-settings-widget", inputs: ["ActivePropertyChanged", "useAlternateNames", "displayAlternateNames", "hrBlocked", "hrCanBlock", "tkBlocked", "tkCanBlock", "nameModeItems", "settingsEnabled"], outputs: ["alternateNamesChange", "nameModeChange", "blockHrClick", "releaseHrClick", "blockTkClick", "releaseTkClick", "changePasswordClick", "openAboutClick"] }, { kind: "component", type: BayanCoreAboutDialogWidgetComponent, selector: "bayan-core-about-dialog-widget", inputs: ["baseUrl", "visible", "config"], outputs: ["visibleChange", "licenseClick", "releaseNotesClick", "supportClick"] }, { kind: "component", type: BayanCoreChangePasswordWidgetComponent, selector: "bayan-core-change-password-widget", inputs: ["baseUrl", "visible", "config", "isSubmitting"], outputs: ["visibleChange", "submitPasswordChange"] }, { kind: "component", type: BayanCoreNotificationsWidgetComponent, selector: "bayan-core-notifications-widget", inputs: ["baseUrl", "title", "wrapperClass", "linkClass", "iconClass", "badgeClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
942
|
-
}
|
|
943
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.21", ngImport: i0, type: BayanCoreTopMenuWidgetComponent, decorators: [{
|
|
944
|
-
type: Component,
|
|
945
|
-
args: [{ selector: 'bayan-core-top-menu-widget', standalone: true, imports: [
|
|
946
|
-
CommonModule,
|
|
947
|
-
DxToolbarModule,
|
|
948
|
-
FontAwesomeModule,
|
|
949
|
-
TranslatePipe,
|
|
950
|
-
BayanCoreItemWidgetComponent,
|
|
951
|
-
BayanCoreGlobalSearchWidgetComponent,
|
|
952
|
-
BayanCoreUserPanelWidgetComponent,
|
|
953
|
-
BayanCoreSettingsWidgetComponent,
|
|
954
|
-
BayanCoreAboutDialogWidgetComponent,
|
|
955
|
-
BayanCoreChangePasswordWidgetComponent,
|
|
956
|
-
BayanCoreNotificationsWidgetComponent,
|
|
957
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<header class=\"top-bar-header shadow-sm w-100 sticky-top\">\r\n <dx-toolbar class=\"header-toolbar px-4\">\r\n <dxi-item location=\"before\">\r\n <div *dxTemplate>\r\n <a\r\n class=\"navbar-brand-link\" href=\"#\"\r\n [class.collapsed]=\"sidebarCollapsed\"\r\n (click)=\"onLogoClicked($event)\">\r\n <img\r\n [src]=\"getLogoSrc()\"\r\n alt=\"\"\r\n [class.header-logo]=\"!sidebarCollapsed\"\r\n [class.header-logo-collapsed]=\"sidebarCollapsed && !!collapsedLogoUrl\">\r\n </a>\r\n </div>\r\n </dxi-item>\r\n\r\n @if (ShowShourtcutMenus) {\r\n <dxi-item location=\"before\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <ul class=\"nav navbar-nav d-flex flex-row align-items-center mb-0 gap-1\">\r\n @for (item of menuItems; track item.MenuName) {\r\n <bayan-core-item-widget [item]=\"item\"\r\n [baseUrl]=\"baseUrl\"\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n (itemClick)=\"menuItemClick.emit($event)\">\r\n </bayan-core-item-widget>\r\n }\r\n </ul>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showGlobalSearch) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-global-search-widget\r\n [baseUrl]=\"baseUrl\"\r\n [ActivePropertyId]=\"ActivePropertyId\"\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n (search)=\"searchSubmit.emit($event)\">\r\n </bayan-core-global-search-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showUserPanel) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-user-panel-widget\r\n [baseUrl]=\"baseUrl\"\r\n [showSignOutIcon]=\"false\"\r\n (propertyChanged)=\"onPropertyChanged($event)\"\r\n (signOutClick)=\"signOutClick.emit()\">\r\n </bayan-core-user-panel-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showSettings) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-settings-widget\r\n [ActivePropertyChanged]=\"ActivePropertyChanged\"\r\n [useAlternateNames]=\"useAlternateNames\"\r\n [displayAlternateNames]=\"displayAlternateNames\"\r\n [hrBlocked]=\"hrBlocked\"\r\n [hrCanBlock]=\"hrCanBlock\"\r\n [tkBlocked]=\"tkBlocked\"\r\n [tkCanBlock]=\"tkCanBlock\"\r\n [nameModeItems]=\"nameModeItems\"\r\n [settingsEnabled]=\"settingsEnabled\"\r\n (alternateNamesChange)=\"alternateNamesChange.emit()\"\r\n (nameModeChange)=\"nameModeChange.emit($event)\"\r\n (blockHrClick)=\"blockHrClick.emit()\"\r\n (releaseHrClick)=\"releaseHrClick.emit()\"\r\n (blockTkClick)=\"blockTkClick.emit()\"\r\n (releaseTkClick)=\"releaseTkClick.emit()\"\r\n (changePasswordClick)=\"onChangePasswordRequested()\"\r\n (openAboutClick)=\"onAboutRequested()\">\r\n </bayan-core-settings-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showNotifications) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <bayan-core-notifications-widget [baseUrl]=\"baseUrl\"\r\n [title]=\"notificationsTitle | translate\" >\r\n </bayan-core-notifications-widget>\r\n </div>\r\n </dxi-item>\r\n }\r\n\r\n @if (showHelp) {\r\n <dxi-item location=\"after\" locateInMenu=\"never\">\r\n <div *dxTemplate>\r\n <a\r\n [class]=\"helpAnchorClass\"\r\n [title]=\"helpTitle | translate\"\r\n [target]=\"helpUrlTarget\"\r\n href=\"#\"\r\n (click)=\"onHelpClicked($event)\">\r\n <fa-icon [icon]=\"helpIcon\" class=\"fs-6\"></fa-icon>\r\n </a>\r\n </div>\r\n </dxi-item>\r\n }\r\n </dx-toolbar>\r\n</header>\r\n\r\n@if (useInternalDialogs) {\r\n <bayan-core-about-dialog-widget\r\n [baseUrl]=\"baseUrl\"\r\n [visible]=\"aboutVisible()\"\r\n [config]=\"aboutDialog\"\r\n (visibleChange)=\"aboutVisible.set($event)\"\r\n (licenseClick)=\"aboutLicenseClick.emit()\"\r\n (releaseNotesClick)=\"aboutReleaseNotesClick.emit()\"\r\n (supportClick)=\"aboutSupportClick.emit()\">\r\n </bayan-core-about-dialog-widget>\r\n\r\n <bayan-core-change-password-widget\r\n [baseUrl]=\"baseUrl\"\r\n [visible]=\"changePasswordVisible()\"\r\n [config]=\"changePasswordDialog\"\r\n [isSubmitting]=\"changePasswordLoading\"\r\n (visibleChange)=\"changePasswordVisible.set($event)\"\r\n (submitPasswordChange)=\"submitPasswordChange.emit($event)\">\r\n </bayan-core-change-password-widget>\r\n}\r\n", styles: [":host{flex:0 0 auto;z-index:1}.top-bar-header{width:100%;background:#222;color:#fff}::ng-deep .dx-autocomplete.dx-state-focused .dx-texteditor-input,::ng-deep .dx-autocomplete .dx-texteditor-input:focus{outline:none!important;box-shadow:none!important}::ng-deep .dx-autocomplete.dx-state-focused.dx-texteditor-filled{border-color:transparent!important;box-shadow:none!important}.menu-dropdown-host{position:relative;display:flex;align-items:center}.menu-icon-btn{display:flex;align-items:center;justify-content:center;width:40px;height:56px;text-decoration:none;color:var(--Secondary-Light-Color, #999)!important;transition:color var(--tran-02, .2s);cursor:pointer}.menu-icon-btn:hover{color:var(--bs-white, #fff)!important}.menu-dropdown-panel{position:absolute;top:100%;background:var(--bs-white, #fff);color:var(--dark-text-color, #333);border:1px solid var(--bs-gray, #dee2e6);box-shadow:0 4px 12px #0000001f;z-index:1050;padding:4px 0;list-style:none;border-radius:4px;margin-top:0}.menu-section-label{font-size:12px;color:var(--Secondary-Light-Color, #888);padding:4px 16px 6px;letter-spacing:.03em;display:block}.menu-row{display:flex;align-items:center;gap:6px}.menu-divider{border:none;border-top:1px solid rgba(0,0,0,.8);margin:4px 0}.menu-indicator{display:inline-flex;align-items:center;justify-content:center;width:16px;flex-shrink:0;font-size:12px;padding-top:2px}.menu-indicator-active{color:var(--primary-color, #f18206)}::ng-deep .top-bar-header .dx-toolbar{padding:0!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-items-container{height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-before,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-center,::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{display:flex!important;align-items:center!important;height:56px!important}::ng-deep .top-bar-header .dx-toolbar .dx-item.dx-toolbar-item,::ng-deep .top-bar-header .dx-toolbar .dx-item-content.dx-toolbar-item-content{display:flex!important;align-items:center!important}::ng-deep .top-bar-header .dx-toolbar .dx-toolbar-after{padding:0 20px!important}.navbar-brand-link{display:flex;align-items:center;text-decoration:none;width:235px;min-width:235px;transition:width var(--tran-03, .3s),min-width var(--tran-03, .3s);overflow:hidden}.navbar-brand-link.collapsed{width:60px;min-width:60px}.header-logo{height:38px;object-fit:contain}.header-logo-collapsed{height:32px;object-fit:contain}.nav.navbar-nav{list-style:none;padding:0;margin:0}ul{margin-top:0}.employee-toggle{display:flex;align-items:center;height:56px;padding:0 6px;text-decoration:none;cursor:pointer;color:var(--Secondary-Light-Color, #999);transition:color var(--tran-02, .2s)}.employee-toggle:hover{color:var(--bs-white, #fff)}.employee-info{display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:4px}.user-name{font-size:13px;font-weight:500;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;display:block}.property-name{font-size:11px;color:var(--Secondary-Light-Color, #999);max-width:140px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3;letter-spacing:.03em;display:block}.user-name:hover,.property-name:hover{color:var(--bs-white, #fff)}.employee-caret{font-size:9px;color:var(--Secondary-Light-Color, #999);flex-shrink:0;margin-left:2px}.employee-menu{right:0;min-width:200px;padding:6px 0;border-color:#0000001f;box-shadow:0 4px 16px #00000026}.menu-item{display:flex;align-items:center;padding:7px 16px;font-size:14px;color:var(--dark-text-color, #333);text-decoration:none;cursor:pointer;transition:background var(--tran-02, .15s)}.menu-item:hover,.menu-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.menu-item-active{color:var(--dark-text-color, #333);font-weight:600}.menu-item-active .menu-indicator{color:var(--primary-color, #f18206)}.menu-item-signout:hover,.menu-item-signout:focus{background:#f5f5f5!important}.settings-menu{right:0;min-width:240px}.header-dropdown-item{display:flex;align-items:center;width:100%;background:transparent;border:0;color:var(--dark-text-color, #333);text-align:left;text-decoration:none;cursor:pointer;gap:6px;padding:7px 16px;font-size:14px}.header-dropdown-item:hover,.header-dropdown-item:focus{background:#f5f5f5;color:var(--dark-text-color, #333)!important}.header-dropdown-item.disabled,.disabled{opacity:.5}.dropdown-divider{border-top:1px solid rgba(0,0,0,.175)}.notifications-icon-btn{position:relative}.notifications-badge{position:absolute;top:4px;right:4px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;font-size:9px;line-height:18px;text-align:center;background:var(--danger-color, #D9534F);color:#fff}.nav-item .nav-link{color:var(--Secondary-Light-Color, #999);font-weight:500;padding:0 14px;height:56px;display:flex;align-items:center;justify-content:flex-start;text-decoration:none;font-size:13px;white-space:nowrap;transition:color .2s;background:#222;border:0}.nav-item .nav-link:hover,.nav-item.dropdown.open>.nav-link{color:var(--bs-white, #fff);background:#222}.nav-item .nav-link .caret{margin-left:4px;font-size:10px}.nav-item.dropdown{position:relative}.dropdown-menu{left:0;min-width:200px}.nav-item.dropdown.open>.dropdown-menu{display:block}.top-bar-header .nav-item .nav-link,.top-bar-header .nav-item .nav-link:hover,.top-bar-header .nav-item .nav-link:focus{background:#222!important;color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown.open>.nav-link,.top-bar-header .nav-item .nav-link:hover{color:var(--bs-white, #fff)!important}.top-bar-header .nav-item{margin:0}.top-bar-header .dropdown-menu.menu-dropdown-panel{top:100%;margin-top:0;min-width:220px;padding:0;border-radius:0 0 4px 4px;overflow:hidden;background:#fff!important;z-index:1200}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link{height:44px;padding:0 22px;background:#fff!important;color:var(--dark-text-color, #333)!important;border-bottom:none;font-weight:400;text-decoration:none!important}.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item .nav-link:hover,.top-bar-header .dropdown-menu.menu-dropdown-panel .nav-item.dropdown.open>.nav-link{background:#f5f6f8!important;color:var(--dark-text-color, #222)!important;text-decoration:none!important}.top-bar-header .nav-item.dropdown>.nav-link,.top-bar-header .nav-item.dropdown>.nav-link:focus{color:var(--Secondary-Light-Color, #999)!important}.top-bar-header .nav-item.dropdown>.nav-link:hover,.top-bar-header .nav-item.dropdown.open>.nav-link{color:#fff!important}.top-menu-widget__search{width:280px;display:flex;align-items:center}::ng-deep .top-menu-widget__search .dx-texteditor{border-radius:6px}::ng-deep .top-menu-widget__search .dx-texteditor-input{color:#333}.top-menu-widget__search-item{display:flex;flex-direction:column;text-decoration:none}.top-menu-widget__search-item-title{display:flex;align-items:center;gap:4px;color:#666;font-size:11px;margin-bottom:4px}.top-menu-widget__search-item-subtitle{color:#222;font-size:13px;margin-left:18px}.top-menu-widget__help-link{display:inline-flex}.invisible{visibility:hidden}.disabled{pointer-events:none}.about-backdrop{position:fixed;inset:0;background:#00000073;z-index:2000;display:flex;align-items:center;justify-content:center}.about-modal{background:#fff;border-radius:6px;width:560px;max-width:95vw;box-shadow:0 5px 30px #00000040;overflow:hidden}.about-modal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #e5e5e5}.about-modal-title{margin:0;font-size:18px;font-weight:600}.about-close-btn{border:0;background:transparent;font-size:24px;line-height:1;color:#666}.about-modal-body{padding:20px}.about-logo{max-height:80px;object-fit:contain}.about-product-name{font-size:20px;font-weight:600;margin-bottom:8px}.about-version-text,.about-copyright{color:#555}.about-modal-actions{display:flex;gap:8px;justify-content:flex-end;padding:0 20px 20px}.about-action-btn{border:1px solid #d0d0d0;border-radius:6px;background:#fff;color:#333;padding:8px 12px}\n"] }]
|
|
958
|
-
}], propDecorators: { baseUrl: [{
|
|
959
|
-
type: Input
|
|
960
|
-
}], systemModule: [{
|
|
961
|
-
type: Input
|
|
962
|
-
}], ShowShourtcutMenus: [{
|
|
963
|
-
type: Input
|
|
964
|
-
}], sidebarCollapsed: [{
|
|
965
|
-
type: Input
|
|
966
|
-
}], homeUrl: [{
|
|
967
|
-
type: Input
|
|
968
|
-
}], logoUrl: [{
|
|
969
|
-
type: Input
|
|
970
|
-
}], collapsedLogoUrl: [{
|
|
971
|
-
type: Input
|
|
972
|
-
}], logoClick: [{
|
|
973
|
-
type: Output
|
|
974
|
-
}], isSsoLogin: [{
|
|
975
|
-
type: Input
|
|
976
|
-
}], useAlternateNames: [{
|
|
977
|
-
type: Input
|
|
978
|
-
}], displayAlternateNames: [{
|
|
979
|
-
type: Input
|
|
980
|
-
}], hrBlocked: [{
|
|
981
|
-
type: Input
|
|
982
|
-
}], hrCanBlock: [{
|
|
983
|
-
type: Input
|
|
984
|
-
}], tkBlocked: [{
|
|
985
|
-
type: Input
|
|
986
|
-
}], tkCanBlock: [{
|
|
987
|
-
type: Input
|
|
988
|
-
}], nameModeItems: [{
|
|
989
|
-
type: Input
|
|
990
|
-
}], settingsEnabled: [{
|
|
991
|
-
type: Input
|
|
992
|
-
}], useInternalDialogs: [{
|
|
993
|
-
type: Input
|
|
994
|
-
}], changePasswordLoading: [{
|
|
995
|
-
type: Input
|
|
996
|
-
}], changePasswordDialog: [{
|
|
997
|
-
type: Input
|
|
998
|
-
}], aboutDialog: [{
|
|
999
|
-
type: Input
|
|
1000
|
-
}], showGlobalSearch: [{
|
|
1001
|
-
type: Input
|
|
1002
|
-
}], showUserPanel: [{
|
|
1003
|
-
type: Input
|
|
1004
|
-
}], showSettings: [{
|
|
1005
|
-
type: Input
|
|
1006
|
-
}], showNotifications: [{
|
|
1007
|
-
type: Input
|
|
1008
|
-
}], notificationsTitle: [{
|
|
1009
|
-
type: Input
|
|
1010
|
-
}], showHelp: [{
|
|
1011
|
-
type: Input
|
|
1012
|
-
}], helpTitle: [{
|
|
1013
|
-
type: Input
|
|
1014
|
-
}], helpUrl: [{
|
|
1015
|
-
type: Input
|
|
1016
|
-
}], helpIcon: [{
|
|
1017
|
-
type: Input
|
|
1018
|
-
}], helpAnchorClass: [{
|
|
1019
|
-
type: Input
|
|
1020
|
-
}], helpUrlTarget: [{
|
|
1021
|
-
type: Input
|
|
1022
|
-
}], helpClick: [{
|
|
1023
|
-
type: Output
|
|
1024
|
-
}], menuItemClick: [{
|
|
1025
|
-
type: Output
|
|
1026
|
-
}], searchSubmit: [{
|
|
1027
|
-
type: Output
|
|
1028
|
-
}], propertyChanged: [{
|
|
1029
|
-
type: Output
|
|
1030
|
-
}], signOutClick: [{
|
|
1031
|
-
type: Output
|
|
1032
|
-
}], alternateNamesChange: [{
|
|
1033
|
-
type: Output
|
|
1034
|
-
}], nameModeChange: [{
|
|
1035
|
-
type: Output
|
|
1036
|
-
}], blockHrClick: [{
|
|
1037
|
-
type: Output
|
|
1038
|
-
}], releaseHrClick: [{
|
|
1039
|
-
type: Output
|
|
1040
|
-
}], blockTkClick: [{
|
|
1041
|
-
type: Output
|
|
1042
|
-
}], releaseTkClick: [{
|
|
1043
|
-
type: Output
|
|
1044
|
-
}], changePasswordClick: [{
|
|
1045
|
-
type: Output
|
|
1046
|
-
}], openAboutClick: [{
|
|
1047
|
-
type: Output
|
|
1048
|
-
}], aboutLicenseClick: [{
|
|
1049
|
-
type: Output
|
|
1050
|
-
}], aboutReleaseNotesClick: [{
|
|
1051
|
-
type: Output
|
|
1052
|
-
}], aboutSupportClick: [{
|
|
1053
|
-
type: Output
|
|
1054
|
-
}], submitPasswordChange: [{
|
|
1055
|
-
type: Output
|
|
1056
|
-
}] } });
|
|
1057
|
-
|
|
1058
|
-
var EmployeeNamesModeOption;
|
|
1059
|
-
(function (EmployeeNamesModeOption) {
|
|
1060
|
-
EmployeeNamesModeOption[EmployeeNamesModeOption["ShortNames"] = 1] = "ShortNames";
|
|
1061
|
-
EmployeeNamesModeOption[EmployeeNamesModeOption["StandardNames"] = 2] = "StandardNames";
|
|
1062
|
-
EmployeeNamesModeOption[EmployeeNamesModeOption["FullNames"] = 3] = "FullNames";
|
|
1063
|
-
})(EmployeeNamesModeOption || (EmployeeNamesModeOption = {}));
|
|
1064
|
-
var BlockableModule;
|
|
1065
|
-
(function (BlockableModule) {
|
|
1066
|
-
BlockableModule[BlockableModule["HumanResources"] = 4] = "HumanResources";
|
|
1067
|
-
BlockableModule[BlockableModule["Timekeeping"] = 5] = "Timekeeping";
|
|
1068
|
-
})(BlockableModule || (BlockableModule = {}));
|
|
1069
|
-
var SystemModule;
|
|
1070
|
-
(function (SystemModule) {
|
|
1071
|
-
SystemModule[SystemModule["Corporate"] = 1] = "Corporate";
|
|
1072
|
-
SystemModule[SystemModule["Cluster"] = 2] = "Cluster";
|
|
1073
|
-
SystemModule[SystemModule["Setup"] = 3] = "Setup";
|
|
1074
|
-
SystemModule[SystemModule["HumanResources"] = 4] = "HumanResources";
|
|
1075
|
-
SystemModule[SystemModule["Timekeeping"] = 5] = "Timekeeping";
|
|
1076
|
-
SystemModule[SystemModule["Payroll"] = 6] = "Payroll";
|
|
1077
|
-
SystemModule[SystemModule["Training"] = 7] = "Training";
|
|
1078
|
-
SystemModule[SystemModule["Workflow"] = 8] = "Workflow";
|
|
1079
|
-
SystemModule[SystemModule["Appraisal"] = 9] = "Appraisal";
|
|
1080
|
-
SystemModule[SystemModule["BusinessIntelligence"] = 10] = "BusinessIntelligence";
|
|
1081
|
-
})(SystemModule || (SystemModule = {}));
|
|
1082
|
-
|
|
1083
|
-
/*
|
|
1084
|
-
* Public API Surface of bayan-core-ui
|
|
1085
|
-
*/
|
|
1086
|
-
|
|
1087
|
-
/**
|
|
1088
|
-
* Generated bundle index. Do not edit.
|
|
1089
|
-
*/
|
|
1090
|
-
|
|
1091
|
-
export { BayanCoreTopMenuService, BayanCoreTopMenuWidgetComponent, BlockableModule, EmployeeNamesModeOption, SystemModule };
|
|
1092
|
-
//# sourceMappingURL=skysoftware-co-bayan-core-widgets-ui.mjs.map
|