ng-prime-tools 1.1.30 → 1.1.32
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.
|
@@ -6102,6 +6102,151 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
6102
6102
|
}]
|
|
6103
6103
|
}] });
|
|
6104
6104
|
|
|
6105
|
+
class PTMenuFancyComponent {
|
|
6106
|
+
static { this.DEFAULT_TEXT_COLOR = '#000'; }
|
|
6107
|
+
static { this.DEFAULT_TEXT_FONT_SIZE = '15px'; }
|
|
6108
|
+
static { this.DEFAULT_ICON_COLOR = '#000'; }
|
|
6109
|
+
static { this.DEFAULT_ICON_FONT_SIZE = '15px'; }
|
|
6110
|
+
static { this.DEFAULT_ICON_CODE = 'pi pi-ellipsis-v'; }
|
|
6111
|
+
/**
|
|
6112
|
+
* Track the currently opened PTMenuFancyComponent instance.
|
|
6113
|
+
* Only one menu can remain open at a time.
|
|
6114
|
+
*/
|
|
6115
|
+
static { this.openMenuInstance = null; }
|
|
6116
|
+
constructor(elementRef) {
|
|
6117
|
+
this.elementRef = elementRef;
|
|
6118
|
+
this.config = {
|
|
6119
|
+
icon: {
|
|
6120
|
+
code: 'pi pi-ellipsis-v',
|
|
6121
|
+
color: '#000',
|
|
6122
|
+
fontSize: '15px',
|
|
6123
|
+
},
|
|
6124
|
+
menuDirection: 'right',
|
|
6125
|
+
};
|
|
6126
|
+
this.cardMenuConfig = {
|
|
6127
|
+
noBorder: true,
|
|
6128
|
+
margin: '0',
|
|
6129
|
+
padding: '5px',
|
|
6130
|
+
};
|
|
6131
|
+
this.isOpen = false;
|
|
6132
|
+
}
|
|
6133
|
+
// ============================================================
|
|
6134
|
+
// MENU OPEN / CLOSE
|
|
6135
|
+
// ============================================================
|
|
6136
|
+
toggleMenu() {
|
|
6137
|
+
const currentOpenMenu = PTMenuFancyComponent.openMenuInstance;
|
|
6138
|
+
// Close another menu before opening this one.
|
|
6139
|
+
if (currentOpenMenu && currentOpenMenu !== this) {
|
|
6140
|
+
currentOpenMenu.closeMenu();
|
|
6141
|
+
}
|
|
6142
|
+
this.isOpen = !this.isOpen;
|
|
6143
|
+
PTMenuFancyComponent.openMenuInstance = this.isOpen ? this : null;
|
|
6144
|
+
}
|
|
6145
|
+
closeMenu() {
|
|
6146
|
+
this.isOpen = false;
|
|
6147
|
+
if (PTMenuFancyComponent.openMenuInstance === this) {
|
|
6148
|
+
PTMenuFancyComponent.openMenuInstance = null;
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6151
|
+
// ============================================================
|
|
6152
|
+
// ICONS
|
|
6153
|
+
// ============================================================
|
|
6154
|
+
/**
|
|
6155
|
+
* Supports PrimeIcons, Font Awesome, and any CSS icon library.
|
|
6156
|
+
* The icon classes are preserved without transformation.
|
|
6157
|
+
*/
|
|
6158
|
+
getMenuItemIconClass(item) {
|
|
6159
|
+
if (typeof item.icon === 'string') {
|
|
6160
|
+
return item.icon.trim();
|
|
6161
|
+
}
|
|
6162
|
+
return item.icon?.code?.trim() || '';
|
|
6163
|
+
}
|
|
6164
|
+
getMenuItemIconStyles(item) {
|
|
6165
|
+
if (typeof item.icon !== 'string') {
|
|
6166
|
+
return {
|
|
6167
|
+
color: item.icon?.color || PTMenuFancyComponent.DEFAULT_ICON_COLOR,
|
|
6168
|
+
fontSize: item.icon?.fontSize || PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
|
|
6169
|
+
};
|
|
6170
|
+
}
|
|
6171
|
+
return {
|
|
6172
|
+
color: PTMenuFancyComponent.DEFAULT_ICON_COLOR,
|
|
6173
|
+
fontSize: PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
|
|
6174
|
+
};
|
|
6175
|
+
}
|
|
6176
|
+
getIconClass() {
|
|
6177
|
+
return (this.config.icon?.code?.trim() || PTMenuFancyComponent.DEFAULT_ICON_CODE);
|
|
6178
|
+
}
|
|
6179
|
+
getIconStyles() {
|
|
6180
|
+
return {
|
|
6181
|
+
color: this.config.color ||
|
|
6182
|
+
this.config.icon?.color ||
|
|
6183
|
+
PTMenuFancyComponent.DEFAULT_ICON_COLOR,
|
|
6184
|
+
fontSize: this.config.fontSize ||
|
|
6185
|
+
this.config.icon?.fontSize ||
|
|
6186
|
+
PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
|
|
6187
|
+
};
|
|
6188
|
+
}
|
|
6189
|
+
// ============================================================
|
|
6190
|
+
// MENU ITEMS
|
|
6191
|
+
// ============================================================
|
|
6192
|
+
getTextStyles(item) {
|
|
6193
|
+
return {
|
|
6194
|
+
color: item.color || PTMenuFancyComponent.DEFAULT_TEXT_COLOR,
|
|
6195
|
+
fontSize: item.fontSize || PTMenuFancyComponent.DEFAULT_TEXT_FONT_SIZE,
|
|
6196
|
+
};
|
|
6197
|
+
}
|
|
6198
|
+
isItemDisabled(item) {
|
|
6199
|
+
return !!item?.disabled || !!item?.isHeader || !item?.action;
|
|
6200
|
+
}
|
|
6201
|
+
onItemClick(item) {
|
|
6202
|
+
if (this.isItemDisabled(item)) {
|
|
6203
|
+
return;
|
|
6204
|
+
}
|
|
6205
|
+
// Close the dropdown before executing the action.
|
|
6206
|
+
this.closeMenu();
|
|
6207
|
+
item.action?.();
|
|
6208
|
+
}
|
|
6209
|
+
// ============================================================
|
|
6210
|
+
// CLICK OUTSIDE
|
|
6211
|
+
// ============================================================
|
|
6212
|
+
/**
|
|
6213
|
+
* Close this menu when clicking anywhere outside its host.
|
|
6214
|
+
*
|
|
6215
|
+
* ElementRef ensures the comparison is made against this
|
|
6216
|
+
* specific component instance rather than another menu.
|
|
6217
|
+
*/
|
|
6218
|
+
onDocumentClick(event) {
|
|
6219
|
+
if (!this.isOpen) {
|
|
6220
|
+
return;
|
|
6221
|
+
}
|
|
6222
|
+
const target = event.target;
|
|
6223
|
+
if (!(target instanceof Node)) {
|
|
6224
|
+
this.closeMenu();
|
|
6225
|
+
return;
|
|
6226
|
+
}
|
|
6227
|
+
if (!this.elementRef.nativeElement.contains(target)) {
|
|
6228
|
+
this.closeMenu();
|
|
6229
|
+
}
|
|
6230
|
+
}
|
|
6231
|
+
// ============================================================
|
|
6232
|
+
// CLEANUP
|
|
6233
|
+
// ============================================================
|
|
6234
|
+
ngOnDestroy() {
|
|
6235
|
+
this.closeMenu();
|
|
6236
|
+
}
|
|
6237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTMenuFancyComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6238
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTMenuFancyComponent, isStandalone: false, selector: "pt-menu-fancy", inputs: { config: "config" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu-fancy\"\n >\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n\n @if (isOpen) {\n <div class=\"menu-dropdown\">\n <pt-card [config]=\"cardMenuConfig\">\n @for (item of config.menuItems; track item) {\n <div\n class=\"menu-item\"\n [class.menu-item-disabled]=\"isItemDisabled(item)\"\n [class.menu-item-header]=\"item.isHeader\"\n (click)=\"onItemClick(item)\"\n >\n @if (getMenuItemIconClass(item)) {\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n }\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n }\n </pt-card>\n </div>\n }\n</div>\n", styles: [".pt-menu-fancy{position:relative;display:inline-block}.pt-menu-fancy .menu-icon{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu-fancy .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu-fancy .menu-dropdown{position:absolute;top:calc(100% + 8px);background-color:#fff;min-width:220px;z-index:3;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08);box-shadow:0 10px 22px #0000001f;opacity:0;transform:translateY(-12px);pointer-events:none;transition:transform .18s ease-out,opacity .18s ease-out}.pt-menu-fancy.open .menu-dropdown{display:block;opacity:1;transform:translateY(0);pointer-events:auto}.pt-menu-fancy.menu-left .menu-dropdown{right:0;left:auto}.pt-menu-fancy.menu-right .menu-dropdown{left:0;right:auto}.pt-menu-fancy .menu-item{padding:10px 14px;cursor:pointer;display:flex;align-items:center;gap:10px;-webkit-user-select:none;user-select:none;transition:background-color .15s ease-in-out}.pt-menu-fancy .menu-item i{margin-right:0}.pt-menu-fancy .menu-item:hover{background-color:#f1f1f1}.pt-menu-fancy .menu-item.menu-item-header{cursor:default;background:#fafafa;font-weight:700;opacity:.98;border-bottom:1px solid rgba(0,0,0,.08)}.pt-menu-fancy .menu-item.menu-item-header:hover{background:#fafafa}.pt-menu-fancy .menu-item.menu-item-disabled{cursor:not-allowed}.pt-menu-fancy .menu-item.menu-item-disabled:hover{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }] }); }
|
|
6239
|
+
}
|
|
6240
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTMenuFancyComponent, decorators: [{
|
|
6241
|
+
type: Component,
|
|
6242
|
+
args: [{ selector: 'pt-menu-fancy', standalone: false, template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu-fancy\"\n >\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n\n @if (isOpen) {\n <div class=\"menu-dropdown\">\n <pt-card [config]=\"cardMenuConfig\">\n @for (item of config.menuItems; track item) {\n <div\n class=\"menu-item\"\n [class.menu-item-disabled]=\"isItemDisabled(item)\"\n [class.menu-item-header]=\"item.isHeader\"\n (click)=\"onItemClick(item)\"\n >\n @if (getMenuItemIconClass(item)) {\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n }\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n }\n </pt-card>\n </div>\n }\n</div>\n", styles: [".pt-menu-fancy{position:relative;display:inline-block}.pt-menu-fancy .menu-icon{cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu-fancy .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu-fancy .menu-dropdown{position:absolute;top:calc(100% + 8px);background-color:#fff;min-width:220px;z-index:3;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08);box-shadow:0 10px 22px #0000001f;opacity:0;transform:translateY(-12px);pointer-events:none;transition:transform .18s ease-out,opacity .18s ease-out}.pt-menu-fancy.open .menu-dropdown{display:block;opacity:1;transform:translateY(0);pointer-events:auto}.pt-menu-fancy.menu-left .menu-dropdown{right:0;left:auto}.pt-menu-fancy.menu-right .menu-dropdown{left:0;right:auto}.pt-menu-fancy .menu-item{padding:10px 14px;cursor:pointer;display:flex;align-items:center;gap:10px;-webkit-user-select:none;user-select:none;transition:background-color .15s ease-in-out}.pt-menu-fancy .menu-item i{margin-right:0}.pt-menu-fancy .menu-item:hover{background-color:#f1f1f1}.pt-menu-fancy .menu-item.menu-item-header{cursor:default;background:#fafafa;font-weight:700;opacity:.98;border-bottom:1px solid rgba(0,0,0,.08)}.pt-menu-fancy .menu-item.menu-item-header:hover{background:#fafafa}.pt-menu-fancy .menu-item.menu-item-disabled{cursor:not-allowed}.pt-menu-fancy .menu-item.menu-item-disabled:hover{background-color:transparent}\n"] }]
|
|
6243
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { config: [{
|
|
6244
|
+
type: Input
|
|
6245
|
+
}], onDocumentClick: [{
|
|
6246
|
+
type: HostListener,
|
|
6247
|
+
args: ['document:click', ['$event']]
|
|
6248
|
+
}] } });
|
|
6249
|
+
|
|
6105
6250
|
class PTNotificationComponent {
|
|
6106
6251
|
constructor() {
|
|
6107
6252
|
/**
|
|
@@ -7462,11 +7607,11 @@ class PTNavbarMenuComponent {
|
|
|
7462
7607
|
};
|
|
7463
7608
|
}
|
|
7464
7609
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNavbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7465
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTNavbarMenuComponent, isStandalone: false, selector: "pt-nav-bar-menu", inputs: { navBarMenuConfig: "navBarMenuConfig", serverDateTime: "serverDateTime", notifications: "notifications", notificationConfig: "notificationConfig", notificationTotalRecords: "notificationTotalRecords", notificationTotalUnreadRecords: "notificationTotalUnreadRecords", notificationPage: "notificationPage", notificationRows: "notificationRows", notificationLoading: "notificationLoading", releaseNotes: "releaseNotes", releaseNotesConfig: "releaseNotesConfig", releaseNotesLoading: "releaseNotesLoading", releaseNotesHasMore: "releaseNotesHasMore", releaseNotesPageSize: "releaseNotesPageSize", releaseNotesTotalUnreadRecords: "releaseNotesTotalUnreadRecords" }, outputs: { toggleSidebar: "toggleSidebar", notificationAction: "notificationAction", notificationClick: "notificationClick", notificationPanelOpened: "notificationPanelOpened", notificationPanelClosed: "notificationPanelClosed", notificationGlobalAction: "notificationGlobalAction", notificationViewAll: "notificationViewAll", notificationLoadMore: "notificationLoadMore", releaseNoteClick: "releaseNoteClick", releaseNoteAction: "releaseNoteAction", releaseNoteGlobalAction: "releaseNoteGlobalAction", releaseNotesViewAll: "releaseNotesViewAll", releaseNotesLoadMore: "releaseNotesLoadMore" }, host: { listeners: { "document:click": "closeUserMenu()" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a class=\"logo-link\" routerLink=\"/\">\n @if (getLogoUrl()) {\n <img\n class=\"navbar-logo\"\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n />\n }\n\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n\n <a class=\"toggle-btn\" (click)=\"toggleMenu()\">\n <i\n [class]=\"getToggleButtonIcon()\"\n [ngStyle]=\"getToggleButtonStyles()\"\n ></i>\n </a>\n </div>\n\n @if (hasDateTime()) {\n <div class=\"navbar-middle\" [ngClass]=\"getDateTimePositionClass()\">\n <div class=\"navbar-datetime\">\n <span class=\"dt-value\" [ngStyle]=\"getDateTimeTextStyles()\">\n {{ dateTimeText }}\n </span>\n\n @if (isFixedMode()) {\n <input\n class=\"dt-input\"\n type=\"datetime-local\"\n step=\"1\"\n [value]=\"manualDateTimeLocal\"\n (input)=\"onManualDateTimeChange($any($event.target).value)\"\n />\n }\n </div>\n </div>\n }\n\n <div class=\"pt-navbar-actions\">\n <pt-release-notes\n [releases]=\"releaseNotes\"\n [config]=\"releaseNotesConfig\"\n [loading]=\"releaseNotesLoading\"\n [hasMore]=\"releaseNotesHasMore\"\n [pageSize]=\"releaseNotesPageSize\"\n [totalUnreadRecords]=\"releaseNotesTotalUnreadRecords\"\n (releaseClick)=\"onReleaseNoteClick($event)\"\n (action)=\"onReleaseNoteAction($event)\"\n (globalAction)=\"onReleaseNoteGlobalAction($event)\"\n (viewAll)=\"onReleaseNotesViewAll()\"\n (loadMore)=\"onReleaseNotesLoadMore($event)\"\n ></pt-release-notes>\n\n <pt-notification\n [notifications]=\"notifications\"\n [config]=\"notificationConfig\"\n [totalRecords]=\"notificationTotalRecords\"\n [totalUnreadRecords]=\"notificationTotalUnreadRecords\"\n [page]=\"notificationPage\"\n [rows]=\"notificationRows\"\n [loading]=\"notificationLoading\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n (loadMore)=\"onNotificationLoadMore($event)\"\n ></pt-notification>\n @if (hasUser()) {\n <div class=\"navbar-user\" (click)=\"$event.stopPropagation()\">\n @if (showProfileLeftOfAvatar()) {\n <div\n class=\"navbar-user-profile-left\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <button\n type=\"button\"\n class=\"navbar-user-trigger\"\n (click)=\"toggleUserMenu()\"\n >\n <div class=\"navbar-user-avatar\" [ngStyle]=\"getUserAvatarStyles()\">\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n </button>\n\n @if (isUserMenuOpen) {\n <div class=\"navbar-user-menu\">\n <div class=\"navbar-user-menu-header\">\n <div\n class=\"navbar-user-menu-avatar\"\n [ngStyle]=\"getUserAvatarStyles()\"\n >\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n\n <div class=\"navbar-user-menu-identity\">\n <div class=\"navbar-user-menu-name\">\n {{ getUserFullName() }}\n </div>\n\n @if (showProfileInMenu()) {\n <div\n class=\"navbar-user-menu-profile\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <div class=\"navbar-user-menu-username\">\n {{ getUsername() }}\n </div>\n </div>\n </div>\n\n @if (hasUserMenuItems()) {\n <div class=\"navbar-user-menu-separator\"></div>\n\n @for (item of getUserMenuItems(); track item) {\n @if (item.separatorBefore) {\n <div class=\"navbar-user-menu-separator\"></div>\n }\n\n <button\n type=\"button\"\n [class]=\"getUserMenuItemClasses(item)\"\n [disabled]=\"item.disabled\"\n (click)=\"onUserMenuItemClick(item)\"\n >\n @if (getUserMenuItemIcon(item)) {\n <i [class]=\"getUserMenuItemIcon(item)\"></i>\n }\n\n <span>\n {{ item.text }}\n </span>\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;box-sizing:border-box;padding-right:16px;padding-left:16px;border-bottom:1px solid var(--pt-navbar-border, #e5e7eb);background-color:var(--pt-navbar-bg, #ffffff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:16px}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center;gap:12px;min-width:0;flex:0 0 auto}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;min-width:0;color:inherit;text-decoration:none}.pt-nav-bar-menu .navbar-logo{display:block;margin-left:0;margin-right:16px;object-fit:contain}.pt-nav-bar-menu .navbar-title{min-width:0;color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;margin-left:8px;padding:0;border-radius:10px;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f5f9)}.pt-nav-bar-menu .toggle-btn>i{line-height:1}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{color:var(--pt-navbar-toggle-color, #333333);font-size:1.35rem}.pt-nav-bar-menu .navbar-middle{display:flex;align-items:center;min-width:0;flex:1 1 auto;padding:0 16px}.pt-nav-bar-menu .navbar-middle.dt-pos-left{justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-center{justify-content:center}.pt-nav-bar-menu .navbar-middle.dt-pos-right{justify-content:flex-end}.pt-nav-bar-menu .navbar-datetime{display:inline-flex;align-items:center;gap:10px;max-width:100%;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap;line-height:1}.pt-nav-bar-menu .navbar-datetime .dt-input{height:34px;padding:0 9px;border:1px solid var(--pt-navbar-input-border, #d1d5db);border-radius:8px;background:var(--pt-navbar-input-bg, #ffffff);color:var(--pt-navbar-input-text, #333333);font-size:12px;outline:none;box-sizing:border-box}.pt-nav-bar-menu .navbar-datetime .dt-input:focus{border-color:var(--pt-navbar-input-focus-border, rgba(3, 76, 131, .7));box-shadow:0 0 0 3px var(--pt-navbar-input-focus-shadow, rgba(3, 76, 131, .12))}.pt-nav-bar-menu .pt-navbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu pt-release-notes,.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:10px;margin-left:4px;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{display:inline-flex;align-items:center;justify-content:center;max-width:170px;min-height:34px;padding:0 14px;border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-profile-bg, #eff6ff);color:var(--pt-navbar-user-profile-text, #334155);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.82rem;font-weight:700;line-height:1}.pt-nav-bar-menu .navbar-user-trigger{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:999px;background:transparent;cursor:pointer;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-navbar-user-focus-shadow, rgba(37, 99, 235, .14))}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);box-sizing:border-box;font-size:.92rem;font-weight:800;letter-spacing:.04em;line-height:1;text-transform:uppercase}.pt-nav-bar-menu .navbar-user-avatar i,.pt-nav-bar-menu .navbar-user-menu-avatar i{font-size:1rem}.pt-nav-bar-menu .navbar-user-menu{position:absolute;top:calc(100% + 10px);right:0;width:260px;padding:.75rem;border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10005}.pt-nav-bar-menu .navbar-user-menu-header{display:flex;align-items:center;gap:.75rem;padding:.35rem .25rem .65rem}.pt-nav-bar-menu .navbar-user-menu-avatar{width:46px;height:46px;min-width:46px;font-size:1.05rem}.pt-nav-bar-menu .navbar-user-menu-identity{min-width:0;flex:1 1 auto}.pt-nav-bar-menu .navbar-user-menu-name{color:var(--pt-navbar-user-menu-name, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-profile{margin-top:.15rem;color:var(--pt-navbar-user-menu-profile, #2563eb);font-size:.8rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-username{margin-top:.15rem;color:var(--pt-navbar-user-menu-username, #64748b);font-size:.78rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-separator{height:1px;margin:.4rem 0;background:var(--pt-navbar-user-menu-separator, #e5e7eb)}.pt-nav-bar-menu .navbar-user-menu-item{display:flex;align-items:center;gap:.55rem;width:100%;min-height:38px;padding:.5rem .55rem;border:none;border-radius:9px;background:transparent;color:var(--pt-navbar-user-menu-item-text, #334155);box-sizing:border-box;cursor:pointer;text-align:left;font-size:.86rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-nav-bar-menu .navbar-user-menu-item:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-hover-bg, #f1f5f9);color:var(--pt-navbar-user-menu-item-hover-text, #0f172a)}.pt-nav-bar-menu .navbar-user-menu-item.danger{color:var(--pt-navbar-user-menu-item-danger-text, #dc2626)}.pt-nav-bar-menu .navbar-user-menu-item.danger:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-danger-hover-bg, #fef2f2);color:var(--pt-navbar-user-menu-item-danger-hover-text, #b91c1c)}.pt-nav-bar-menu .navbar-user-menu-item.disabled,.pt-nav-bar-menu .navbar-user-menu-item:disabled{opacity:.55;cursor:not-allowed}.pt-nav-bar-menu .navbar-user-menu-item i{width:18px;flex:0 0 18px;text-align:center}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px;padding-top:8px;padding-bottom:8px}.pt-nav-bar-menu .navbar-left{flex:1 1 auto}.pt-nav-bar-menu .navbar-middle{order:3;width:100%;flex:1 0 100%;padding:4px 0 0;justify-content:center}.pt-nav-bar-menu .pt-navbar-actions{flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:650px){.pt-nav-bar-menu{gap:8px}.pt-nav-bar-menu .navbar-title{display:none}.pt-nav-bar-menu .toggle-btn{margin-left:0}.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .pt-navbar-actions{gap:4px}}@media(max-width:520px){.pt-nav-bar-menu{padding-right:8px;padding-left:8px}.pt-nav-bar-menu .navbar-datetime .dt-value{font-size:.8rem!important}.pt-nav-bar-menu .navbar-user-menu{position:fixed;top:60px;right:8px;width:240px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: PTNotificationComponent, selector: "pt-notification", inputs: ["notifications", "config", "totalRecords", "totalUnreadRecords", "page", "rows", "loading"], outputs: ["notificationClick", "action", "globalAction", "viewAll", "panelOpened", "panelClosed", "loadMore"] }, { kind: "component", type: PTReleaseNotesComponent, selector: "pt-release-notes", inputs: ["releases", "config", "loading", "hasMore", "pageSize", "totalUnreadRecords"], outputs: ["releaseClick", "action", "globalAction", "viewAll", "loadMore", "panelOpened", "panelClosed"] }] }); }
|
|
7610
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTNavbarMenuComponent, isStandalone: false, selector: "pt-nav-bar-menu", inputs: { navBarMenuConfig: "navBarMenuConfig", serverDateTime: "serverDateTime", notifications: "notifications", notificationConfig: "notificationConfig", notificationTotalRecords: "notificationTotalRecords", notificationTotalUnreadRecords: "notificationTotalUnreadRecords", notificationPage: "notificationPage", notificationRows: "notificationRows", notificationLoading: "notificationLoading", releaseNotes: "releaseNotes", releaseNotesConfig: "releaseNotesConfig", releaseNotesLoading: "releaseNotesLoading", releaseNotesHasMore: "releaseNotesHasMore", releaseNotesPageSize: "releaseNotesPageSize", releaseNotesTotalUnreadRecords: "releaseNotesTotalUnreadRecords" }, outputs: { toggleSidebar: "toggleSidebar", notificationAction: "notificationAction", notificationClick: "notificationClick", notificationPanelOpened: "notificationPanelOpened", notificationPanelClosed: "notificationPanelClosed", notificationGlobalAction: "notificationGlobalAction", notificationViewAll: "notificationViewAll", notificationLoadMore: "notificationLoadMore", releaseNoteClick: "releaseNoteClick", releaseNoteAction: "releaseNoteAction", releaseNoteGlobalAction: "releaseNoteGlobalAction", releaseNotesViewAll: "releaseNotesViewAll", releaseNotesLoadMore: "releaseNotesLoadMore" }, host: { listeners: { "document:click": "closeUserMenu()" } }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a class=\"logo-link\" routerLink=\"/\">\n @if (getLogoUrl()) {\n <img\n class=\"navbar-logo\"\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n />\n }\n\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n\n <a class=\"toggle-btn\" (click)=\"toggleMenu()\">\n <i\n [class]=\"getToggleButtonIcon()\"\n [ngStyle]=\"getToggleButtonStyles()\"\n ></i>\n </a>\n </div>\n\n @if (hasDateTime()) {\n <div class=\"navbar-middle\" [ngClass]=\"getDateTimePositionClass()\">\n <div class=\"navbar-datetime\">\n <span class=\"dt-value\" [ngStyle]=\"getDateTimeTextStyles()\">\n {{ dateTimeText }}\n </span>\n\n @if (isFixedMode()) {\n <input\n class=\"dt-input\"\n type=\"datetime-local\"\n step=\"1\"\n [value]=\"manualDateTimeLocal\"\n (input)=\"onManualDateTimeChange($any($event.target).value)\"\n />\n }\n </div>\n </div>\n }\n\n <div class=\"pt-navbar-actions\">\n <!-- ====================================================== -->\n <!-- CONFIGURABLE NAVBAR MENUS -->\n <!-- ====================================================== -->\n @for (menu of navBarMenuConfig.menus ?? []; track $index) {\n <pt-menu-fancy [config]=\"menu\"></pt-menu-fancy>\n }\n\n <!-- ====================================================== -->\n <!-- RELEASE NOTES -->\n <!-- ====================================================== -->\n <pt-release-notes\n [releases]=\"releaseNotes\"\n [config]=\"releaseNotesConfig\"\n [loading]=\"releaseNotesLoading\"\n [hasMore]=\"releaseNotesHasMore\"\n [pageSize]=\"releaseNotesPageSize\"\n [totalUnreadRecords]=\"releaseNotesTotalUnreadRecords\"\n (releaseClick)=\"onReleaseNoteClick($event)\"\n (action)=\"onReleaseNoteAction($event)\"\n (globalAction)=\"onReleaseNoteGlobalAction($event)\"\n (viewAll)=\"onReleaseNotesViewAll()\"\n (loadMore)=\"onReleaseNotesLoadMore($event)\"\n ></pt-release-notes>\n\n <!-- ====================================================== -->\n <!-- NOTIFICATIONS -->\n <!-- ====================================================== -->\n <pt-notification\n [notifications]=\"notifications\"\n [config]=\"notificationConfig\"\n [totalRecords]=\"notificationTotalRecords\"\n [totalUnreadRecords]=\"notificationTotalUnreadRecords\"\n [page]=\"notificationPage\"\n [rows]=\"notificationRows\"\n [loading]=\"notificationLoading\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n (loadMore)=\"onNotificationLoadMore($event)\"\n ></pt-notification>\n\n <!-- ====================================================== -->\n <!-- USER PROFILE -->\n <!-- ====================================================== -->\n @if (hasUser()) {\n <div class=\"navbar-user\" (click)=\"$event.stopPropagation()\">\n @if (showProfileLeftOfAvatar()) {\n <div\n class=\"navbar-user-profile-left\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <button\n type=\"button\"\n class=\"navbar-user-trigger\"\n (click)=\"toggleUserMenu()\"\n >\n <div class=\"navbar-user-avatar\" [ngStyle]=\"getUserAvatarStyles()\">\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n </button>\n\n @if (isUserMenuOpen) {\n <div class=\"navbar-user-menu\">\n <div class=\"navbar-user-menu-header\">\n <div\n class=\"navbar-user-menu-avatar\"\n [ngStyle]=\"getUserAvatarStyles()\"\n >\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n\n <div class=\"navbar-user-menu-identity\">\n <div class=\"navbar-user-menu-name\">\n {{ getUserFullName() }}\n </div>\n\n @if (showProfileInMenu()) {\n <div\n class=\"navbar-user-menu-profile\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <div class=\"navbar-user-menu-username\">\n {{ getUsername() }}\n </div>\n </div>\n </div>\n\n @if (hasUserMenuItems()) {\n <div class=\"navbar-user-menu-separator\"></div>\n\n @for (item of getUserMenuItems(); track item) {\n @if (item.separatorBefore) {\n <div class=\"navbar-user-menu-separator\"></div>\n }\n\n <button\n type=\"button\"\n [class]=\"getUserMenuItemClasses(item)\"\n [disabled]=\"item.disabled\"\n (click)=\"onUserMenuItemClick(item)\"\n >\n @if (getUserMenuItemIcon(item)) {\n <i [class]=\"getUserMenuItemIcon(item)\"></i>\n }\n\n <span>\n {{ item.text }}\n </span>\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;box-sizing:border-box;padding-right:16px;padding-left:16px;border-bottom:1px solid var(--pt-navbar-border, #e5e7eb);background-color:var(--pt-navbar-bg, #ffffff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:16px}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center;gap:12px;min-width:0;flex:0 0 auto}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;min-width:0;color:inherit;text-decoration:none}.pt-nav-bar-menu .navbar-logo{display:block;margin-left:0;margin-right:16px;object-fit:contain}.pt-nav-bar-menu .navbar-title{min-width:0;color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;margin-left:8px;padding:0;border-radius:10px;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f5f9)}.pt-nav-bar-menu .toggle-btn>i{line-height:1}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{color:var(--pt-navbar-toggle-color, #333333);font-size:1.35rem}.pt-nav-bar-menu .navbar-middle{display:flex;align-items:center;min-width:0;flex:1 1 auto;padding:0 16px}.pt-nav-bar-menu .navbar-middle.dt-pos-left{justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-center{justify-content:center}.pt-nav-bar-menu .navbar-middle.dt-pos-right{justify-content:flex-end}.pt-nav-bar-menu .navbar-datetime{display:inline-flex;align-items:center;gap:10px;max-width:100%;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap;line-height:1}.pt-nav-bar-menu .navbar-datetime .dt-input{height:34px;padding:0 9px;border:1px solid var(--pt-navbar-input-border, #d1d5db);border-radius:8px;background:var(--pt-navbar-input-bg, #ffffff);color:var(--pt-navbar-input-text, #333333);font-size:12px;outline:none;box-sizing:border-box}.pt-nav-bar-menu .navbar-datetime .dt-input:focus{border-color:var(--pt-navbar-input-focus-border, rgba(3, 76, 131, .7));box-shadow:0 0 0 3px var(--pt-navbar-input-focus-shadow, rgba(3, 76, 131, .12))}.pt-nav-bar-menu .pt-navbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu pt-menu-fancy,.pt-nav-bar-menu pt-release-notes,.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:10px;margin-left:4px;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{display:inline-flex;align-items:center;justify-content:center;max-width:170px;min-height:34px;padding:0 14px;border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-profile-bg, #eff6ff);color:var(--pt-navbar-user-profile-text, #334155);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.82rem;font-weight:700;line-height:1}.pt-nav-bar-menu .navbar-user-trigger{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:999px;background:transparent;cursor:pointer;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-navbar-user-focus-shadow, rgba(37, 99, 235, .14))}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);box-sizing:border-box;font-size:.92rem;font-weight:800;letter-spacing:.04em;line-height:1;text-transform:uppercase}.pt-nav-bar-menu .navbar-user-avatar i,.pt-nav-bar-menu .navbar-user-menu-avatar i{font-size:1rem}.pt-nav-bar-menu .navbar-user-menu{position:absolute;top:calc(100% + 10px);right:0;width:260px;padding:.75rem;border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10005}.pt-nav-bar-menu .navbar-user-menu-header{display:flex;align-items:center;gap:.75rem;padding:.35rem .25rem .65rem}.pt-nav-bar-menu .navbar-user-menu-avatar{width:46px;height:46px;min-width:46px;font-size:1.05rem}.pt-nav-bar-menu .navbar-user-menu-identity{min-width:0;flex:1 1 auto}.pt-nav-bar-menu .navbar-user-menu-name{color:var(--pt-navbar-user-menu-name, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-profile{margin-top:.15rem;color:var(--pt-navbar-user-menu-profile, #2563eb);font-size:.8rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-username{margin-top:.15rem;color:var(--pt-navbar-user-menu-username, #64748b);font-size:.78rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-separator{height:1px;margin:.4rem 0;background:var(--pt-navbar-user-menu-separator, #e5e7eb)}.pt-nav-bar-menu .navbar-user-menu-item{display:flex;align-items:center;gap:.55rem;width:100%;min-height:38px;padding:.5rem .55rem;border:none;border-radius:9px;background:transparent;color:var(--pt-navbar-user-menu-item-text, #334155);box-sizing:border-box;cursor:pointer;text-align:left;font-size:.86rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-nav-bar-menu .navbar-user-menu-item:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-hover-bg, #f1f5f9);color:var(--pt-navbar-user-menu-item-hover-text, #0f172a)}.pt-nav-bar-menu .navbar-user-menu-item.danger{color:var(--pt-navbar-user-menu-item-danger-text, #dc2626)}.pt-nav-bar-menu .navbar-user-menu-item.danger:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-danger-hover-bg, #fef2f2);color:var(--pt-navbar-user-menu-item-danger-hover-text, #b91c1c)}.pt-nav-bar-menu .navbar-user-menu-item.disabled,.pt-nav-bar-menu .navbar-user-menu-item:disabled{opacity:.55;cursor:not-allowed}.pt-nav-bar-menu .navbar-user-menu-item i{width:18px;flex:0 0 18px;text-align:center}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px;padding-top:8px;padding-bottom:8px}.pt-nav-bar-menu .navbar-left{flex:1 1 auto}.pt-nav-bar-menu .navbar-middle{order:3;width:100%;flex:1 0 100%;padding:4px 0 0;justify-content:center}.pt-nav-bar-menu .pt-navbar-actions{flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:650px){.pt-nav-bar-menu{gap:8px}.pt-nav-bar-menu .navbar-title{display:none}.pt-nav-bar-menu .toggle-btn{margin-left:0}.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .pt-navbar-actions{gap:4px}}@media(max-width:520px){.pt-nav-bar-menu{padding-right:8px;padding-left:8px}.pt-nav-bar-menu .navbar-datetime .dt-value{font-size:.8rem!important}.pt-nav-bar-menu .navbar-user-menu{position:fixed;top:60px;right:8px;width:240px}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: PTMenuFancyComponent, selector: "pt-menu-fancy", inputs: ["config"] }, { kind: "component", type: PTNotificationComponent, selector: "pt-notification", inputs: ["notifications", "config", "totalRecords", "totalUnreadRecords", "page", "rows", "loading"], outputs: ["notificationClick", "action", "globalAction", "viewAll", "panelOpened", "panelClosed", "loadMore"] }, { kind: "component", type: PTReleaseNotesComponent, selector: "pt-release-notes", inputs: ["releases", "config", "loading", "hasMore", "pageSize", "totalUnreadRecords"], outputs: ["releaseClick", "action", "globalAction", "viewAll", "loadMore", "panelOpened", "panelClosed"] }] }); }
|
|
7466
7611
|
}
|
|
7467
7612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNavbarMenuComponent, decorators: [{
|
|
7468
7613
|
type: Component,
|
|
7469
|
-
args: [{ selector: 'pt-nav-bar-menu', standalone: false, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a class=\"logo-link\" routerLink=\"/\">\n @if (getLogoUrl()) {\n <img\n class=\"navbar-logo\"\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n />\n }\n\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n\n <a class=\"toggle-btn\" (click)=\"toggleMenu()\">\n <i\n [class]=\"getToggleButtonIcon()\"\n [ngStyle]=\"getToggleButtonStyles()\"\n ></i>\n </a>\n </div>\n\n @if (hasDateTime()) {\n <div class=\"navbar-middle\" [ngClass]=\"getDateTimePositionClass()\">\n <div class=\"navbar-datetime\">\n <span class=\"dt-value\" [ngStyle]=\"getDateTimeTextStyles()\">\n {{ dateTimeText }}\n </span>\n\n @if (isFixedMode()) {\n <input\n class=\"dt-input\"\n type=\"datetime-local\"\n step=\"1\"\n [value]=\"manualDateTimeLocal\"\n (input)=\"onManualDateTimeChange($any($event.target).value)\"\n />\n }\n </div>\n </div>\n }\n\n <div class=\"pt-navbar-actions\">\n <pt-release-notes\n [releases]=\"releaseNotes\"\n [config]=\"releaseNotesConfig\"\n [loading]=\"releaseNotesLoading\"\n [hasMore]=\"releaseNotesHasMore\"\n [pageSize]=\"releaseNotesPageSize\"\n [totalUnreadRecords]=\"releaseNotesTotalUnreadRecords\"\n (releaseClick)=\"onReleaseNoteClick($event)\"\n (action)=\"onReleaseNoteAction($event)\"\n (globalAction)=\"onReleaseNoteGlobalAction($event)\"\n (viewAll)=\"onReleaseNotesViewAll()\"\n (loadMore)=\"onReleaseNotesLoadMore($event)\"\n ></pt-release-notes>\n\n <pt-notification\n [notifications]=\"notifications\"\n [config]=\"notificationConfig\"\n [totalRecords]=\"notificationTotalRecords\"\n [totalUnreadRecords]=\"notificationTotalUnreadRecords\"\n [page]=\"notificationPage\"\n [rows]=\"notificationRows\"\n [loading]=\"notificationLoading\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n (loadMore)=\"onNotificationLoadMore($event)\"\n ></pt-notification>\n @if (hasUser()) {\n <div class=\"navbar-user\" (click)=\"$event.stopPropagation()\">\n @if (showProfileLeftOfAvatar()) {\n <div\n class=\"navbar-user-profile-left\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <button\n type=\"button\"\n class=\"navbar-user-trigger\"\n (click)=\"toggleUserMenu()\"\n >\n <div class=\"navbar-user-avatar\" [ngStyle]=\"getUserAvatarStyles()\">\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n </button>\n\n @if (isUserMenuOpen) {\n <div class=\"navbar-user-menu\">\n <div class=\"navbar-user-menu-header\">\n <div\n class=\"navbar-user-menu-avatar\"\n [ngStyle]=\"getUserAvatarStyles()\"\n >\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n\n <div class=\"navbar-user-menu-identity\">\n <div class=\"navbar-user-menu-name\">\n {{ getUserFullName() }}\n </div>\n\n @if (showProfileInMenu()) {\n <div\n class=\"navbar-user-menu-profile\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <div class=\"navbar-user-menu-username\">\n {{ getUsername() }}\n </div>\n </div>\n </div>\n\n @if (hasUserMenuItems()) {\n <div class=\"navbar-user-menu-separator\"></div>\n\n @for (item of getUserMenuItems(); track item) {\n @if (item.separatorBefore) {\n <div class=\"navbar-user-menu-separator\"></div>\n }\n\n <button\n type=\"button\"\n [class]=\"getUserMenuItemClasses(item)\"\n [disabled]=\"item.disabled\"\n (click)=\"onUserMenuItemClick(item)\"\n >\n @if (getUserMenuItemIcon(item)) {\n <i [class]=\"getUserMenuItemIcon(item)\"></i>\n }\n\n <span>\n {{ item.text }}\n </span>\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;box-sizing:border-box;padding-right:16px;padding-left:16px;border-bottom:1px solid var(--pt-navbar-border, #e5e7eb);background-color:var(--pt-navbar-bg, #ffffff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:16px}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center;gap:12px;min-width:0;flex:0 0 auto}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;min-width:0;color:inherit;text-decoration:none}.pt-nav-bar-menu .navbar-logo{display:block;margin-left:0;margin-right:16px;object-fit:contain}.pt-nav-bar-menu .navbar-title{min-width:0;color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;margin-left:8px;padding:0;border-radius:10px;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f5f9)}.pt-nav-bar-menu .toggle-btn>i{line-height:1}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{color:var(--pt-navbar-toggle-color, #333333);font-size:1.35rem}.pt-nav-bar-menu .navbar-middle{display:flex;align-items:center;min-width:0;flex:1 1 auto;padding:0 16px}.pt-nav-bar-menu .navbar-middle.dt-pos-left{justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-center{justify-content:center}.pt-nav-bar-menu .navbar-middle.dt-pos-right{justify-content:flex-end}.pt-nav-bar-menu .navbar-datetime{display:inline-flex;align-items:center;gap:10px;max-width:100%;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap;line-height:1}.pt-nav-bar-menu .navbar-datetime .dt-input{height:34px;padding:0 9px;border:1px solid var(--pt-navbar-input-border, #d1d5db);border-radius:8px;background:var(--pt-navbar-input-bg, #ffffff);color:var(--pt-navbar-input-text, #333333);font-size:12px;outline:none;box-sizing:border-box}.pt-nav-bar-menu .navbar-datetime .dt-input:focus{border-color:var(--pt-navbar-input-focus-border, rgba(3, 76, 131, .7));box-shadow:0 0 0 3px var(--pt-navbar-input-focus-shadow, rgba(3, 76, 131, .12))}.pt-nav-bar-menu .pt-navbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu pt-release-notes,.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:10px;margin-left:4px;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{display:inline-flex;align-items:center;justify-content:center;max-width:170px;min-height:34px;padding:0 14px;border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-profile-bg, #eff6ff);color:var(--pt-navbar-user-profile-text, #334155);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.82rem;font-weight:700;line-height:1}.pt-nav-bar-menu .navbar-user-trigger{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:999px;background:transparent;cursor:pointer;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-navbar-user-focus-shadow, rgba(37, 99, 235, .14))}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);box-sizing:border-box;font-size:.92rem;font-weight:800;letter-spacing:.04em;line-height:1;text-transform:uppercase}.pt-nav-bar-menu .navbar-user-avatar i,.pt-nav-bar-menu .navbar-user-menu-avatar i{font-size:1rem}.pt-nav-bar-menu .navbar-user-menu{position:absolute;top:calc(100% + 10px);right:0;width:260px;padding:.75rem;border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10005}.pt-nav-bar-menu .navbar-user-menu-header{display:flex;align-items:center;gap:.75rem;padding:.35rem .25rem .65rem}.pt-nav-bar-menu .navbar-user-menu-avatar{width:46px;height:46px;min-width:46px;font-size:1.05rem}.pt-nav-bar-menu .navbar-user-menu-identity{min-width:0;flex:1 1 auto}.pt-nav-bar-menu .navbar-user-menu-name{color:var(--pt-navbar-user-menu-name, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-profile{margin-top:.15rem;color:var(--pt-navbar-user-menu-profile, #2563eb);font-size:.8rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-username{margin-top:.15rem;color:var(--pt-navbar-user-menu-username, #64748b);font-size:.78rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-separator{height:1px;margin:.4rem 0;background:var(--pt-navbar-user-menu-separator, #e5e7eb)}.pt-nav-bar-menu .navbar-user-menu-item{display:flex;align-items:center;gap:.55rem;width:100%;min-height:38px;padding:.5rem .55rem;border:none;border-radius:9px;background:transparent;color:var(--pt-navbar-user-menu-item-text, #334155);box-sizing:border-box;cursor:pointer;text-align:left;font-size:.86rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-nav-bar-menu .navbar-user-menu-item:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-hover-bg, #f1f5f9);color:var(--pt-navbar-user-menu-item-hover-text, #0f172a)}.pt-nav-bar-menu .navbar-user-menu-item.danger{color:var(--pt-navbar-user-menu-item-danger-text, #dc2626)}.pt-nav-bar-menu .navbar-user-menu-item.danger:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-danger-hover-bg, #fef2f2);color:var(--pt-navbar-user-menu-item-danger-hover-text, #b91c1c)}.pt-nav-bar-menu .navbar-user-menu-item.disabled,.pt-nav-bar-menu .navbar-user-menu-item:disabled{opacity:.55;cursor:not-allowed}.pt-nav-bar-menu .navbar-user-menu-item i{width:18px;flex:0 0 18px;text-align:center}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px;padding-top:8px;padding-bottom:8px}.pt-nav-bar-menu .navbar-left{flex:1 1 auto}.pt-nav-bar-menu .navbar-middle{order:3;width:100%;flex:1 0 100%;padding:4px 0 0;justify-content:center}.pt-nav-bar-menu .pt-navbar-actions{flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:650px){.pt-nav-bar-menu{gap:8px}.pt-nav-bar-menu .navbar-title{display:none}.pt-nav-bar-menu .toggle-btn{margin-left:0}.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .pt-navbar-actions{gap:4px}}@media(max-width:520px){.pt-nav-bar-menu{padding-right:8px;padding-left:8px}.pt-nav-bar-menu .navbar-datetime .dt-value{font-size:.8rem!important}.pt-nav-bar-menu .navbar-user-menu{position:fixed;top:60px;right:8px;width:240px}}\n"] }]
|
|
7614
|
+
args: [{ selector: 'pt-nav-bar-menu', standalone: false, template: "<div class=\"pt-nav-bar-menu\" [ngStyle]=\"getNavbarStyles()\">\n <div class=\"navbar-left\">\n <a class=\"logo-link\" routerLink=\"/\">\n @if (getLogoUrl()) {\n <img\n class=\"navbar-logo\"\n [src]=\"getLogoUrl()\"\n [alt]=\"getLogoAltText()\"\n [ngStyle]=\"getLogoStyles()\"\n />\n }\n\n <span class=\"navbar-title\" [ngStyle]=\"getAppNameStyles()\">\n {{ getAppName() }}\n </span>\n </a>\n\n <a class=\"toggle-btn\" (click)=\"toggleMenu()\">\n <i\n [class]=\"getToggleButtonIcon()\"\n [ngStyle]=\"getToggleButtonStyles()\"\n ></i>\n </a>\n </div>\n\n @if (hasDateTime()) {\n <div class=\"navbar-middle\" [ngClass]=\"getDateTimePositionClass()\">\n <div class=\"navbar-datetime\">\n <span class=\"dt-value\" [ngStyle]=\"getDateTimeTextStyles()\">\n {{ dateTimeText }}\n </span>\n\n @if (isFixedMode()) {\n <input\n class=\"dt-input\"\n type=\"datetime-local\"\n step=\"1\"\n [value]=\"manualDateTimeLocal\"\n (input)=\"onManualDateTimeChange($any($event.target).value)\"\n />\n }\n </div>\n </div>\n }\n\n <div class=\"pt-navbar-actions\">\n <!-- ====================================================== -->\n <!-- CONFIGURABLE NAVBAR MENUS -->\n <!-- ====================================================== -->\n @for (menu of navBarMenuConfig.menus ?? []; track $index) {\n <pt-menu-fancy [config]=\"menu\"></pt-menu-fancy>\n }\n\n <!-- ====================================================== -->\n <!-- RELEASE NOTES -->\n <!-- ====================================================== -->\n <pt-release-notes\n [releases]=\"releaseNotes\"\n [config]=\"releaseNotesConfig\"\n [loading]=\"releaseNotesLoading\"\n [hasMore]=\"releaseNotesHasMore\"\n [pageSize]=\"releaseNotesPageSize\"\n [totalUnreadRecords]=\"releaseNotesTotalUnreadRecords\"\n (releaseClick)=\"onReleaseNoteClick($event)\"\n (action)=\"onReleaseNoteAction($event)\"\n (globalAction)=\"onReleaseNoteGlobalAction($event)\"\n (viewAll)=\"onReleaseNotesViewAll()\"\n (loadMore)=\"onReleaseNotesLoadMore($event)\"\n ></pt-release-notes>\n\n <!-- ====================================================== -->\n <!-- NOTIFICATIONS -->\n <!-- ====================================================== -->\n <pt-notification\n [notifications]=\"notifications\"\n [config]=\"notificationConfig\"\n [totalRecords]=\"notificationTotalRecords\"\n [totalUnreadRecords]=\"notificationTotalUnreadRecords\"\n [page]=\"notificationPage\"\n [rows]=\"notificationRows\"\n [loading]=\"notificationLoading\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n (loadMore)=\"onNotificationLoadMore($event)\"\n ></pt-notification>\n\n <!-- ====================================================== -->\n <!-- USER PROFILE -->\n <!-- ====================================================== -->\n @if (hasUser()) {\n <div class=\"navbar-user\" (click)=\"$event.stopPropagation()\">\n @if (showProfileLeftOfAvatar()) {\n <div\n class=\"navbar-user-profile-left\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <button\n type=\"button\"\n class=\"navbar-user-trigger\"\n (click)=\"toggleUserMenu()\"\n >\n <div class=\"navbar-user-avatar\" [ngStyle]=\"getUserAvatarStyles()\">\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n </button>\n\n @if (isUserMenuOpen) {\n <div class=\"navbar-user-menu\">\n <div class=\"navbar-user-menu-header\">\n <div\n class=\"navbar-user-menu-avatar\"\n [ngStyle]=\"getUserAvatarStyles()\"\n >\n @if (isInitialsAvatar()) {\n <span>\n {{ getUserInitials() }}\n </span>\n } @else {\n <i class=\"fa fa-user\"></i>\n }\n </div>\n\n <div class=\"navbar-user-menu-identity\">\n <div class=\"navbar-user-menu-name\">\n {{ getUserFullName() }}\n </div>\n\n @if (showProfileInMenu()) {\n <div\n class=\"navbar-user-menu-profile\"\n [ngStyle]=\"getUserProfileTextStyles()\"\n >\n {{ getUserProfile() }}\n </div>\n }\n\n <div class=\"navbar-user-menu-username\">\n {{ getUsername() }}\n </div>\n </div>\n </div>\n\n @if (hasUserMenuItems()) {\n <div class=\"navbar-user-menu-separator\"></div>\n\n @for (item of getUserMenuItems(); track item) {\n @if (item.separatorBefore) {\n <div class=\"navbar-user-menu-separator\"></div>\n }\n\n <button\n type=\"button\"\n [class]=\"getUserMenuItemClasses(item)\"\n [disabled]=\"item.disabled\"\n (click)=\"onUserMenuItemClick(item)\"\n >\n @if (getUserMenuItemIcon(item)) {\n <i [class]=\"getUserMenuItemIcon(item)\"></i>\n }\n\n <span>\n {{ item.text }}\n </span>\n </button>\n }\n }\n </div>\n }\n </div>\n }\n </div>\n</div>\n", styles: [".pt-nav-bar-menu{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;min-width:0;box-sizing:border-box;padding-right:16px;padding-left:16px;border-bottom:1px solid var(--pt-navbar-border, #e5e7eb);background-color:var(--pt-navbar-bg, #ffffff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:16px}.pt-nav-bar-menu .navbar-left{display:flex;align-items:center;gap:12px;min-width:0;flex:0 0 auto}.pt-nav-bar-menu .logo-link{display:flex;align-items:center;min-width:0;color:inherit;text-decoration:none}.pt-nav-bar-menu .navbar-logo{display:block;margin-left:0;margin-right:16px;object-fit:contain}.pt-nav-bar-menu .navbar-title{min-width:0;color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .toggle-btn{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;margin-left:8px;padding:0;border-radius:10px;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f5f9)}.pt-nav-bar-menu .toggle-btn>i{line-height:1}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{color:var(--pt-navbar-toggle-color, #333333);font-size:1.35rem}.pt-nav-bar-menu .navbar-middle{display:flex;align-items:center;min-width:0;flex:1 1 auto;padding:0 16px}.pt-nav-bar-menu .navbar-middle.dt-pos-left{justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-center{justify-content:center}.pt-nav-bar-menu .navbar-middle.dt-pos-right{justify-content:flex-end}.pt-nav-bar-menu .navbar-datetime{display:inline-flex;align-items:center;gap:10px;max-width:100%;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap;line-height:1}.pt-nav-bar-menu .navbar-datetime .dt-input{height:34px;padding:0 9px;border:1px solid var(--pt-navbar-input-border, #d1d5db);border-radius:8px;background:var(--pt-navbar-input-bg, #ffffff);color:var(--pt-navbar-input-text, #333333);font-size:12px;outline:none;box-sizing:border-box}.pt-nav-bar-menu .navbar-datetime .dt-input:focus{border-color:var(--pt-navbar-input-focus-border, rgba(3, 76, 131, .7));box-shadow:0 0 0 3px var(--pt-navbar-input-focus-shadow, rgba(3, 76, 131, .12))}.pt-nav-bar-menu .pt-navbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex:0 0 auto;white-space:nowrap}.pt-nav-bar-menu pt-menu-fancy,.pt-nav-bar-menu pt-release-notes,.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:10px;margin-left:4px;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{display:inline-flex;align-items:center;justify-content:center;max-width:170px;min-height:34px;padding:0 14px;border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-profile-bg, #eff6ff);color:var(--pt-navbar-user-profile-text, #334155);box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.82rem;font-weight:700;line-height:1}.pt-nav-bar-menu .navbar-user-trigger{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;border-radius:999px;background:transparent;cursor:pointer;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-navbar-user-focus-shadow, rgba(37, 99, 235, .14))}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{display:flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);box-sizing:border-box;font-size:.92rem;font-weight:800;letter-spacing:.04em;line-height:1;text-transform:uppercase}.pt-nav-bar-menu .navbar-user-avatar i,.pt-nav-bar-menu .navbar-user-menu-avatar i{font-size:1rem}.pt-nav-bar-menu .navbar-user-menu{position:absolute;top:calc(100% + 10px);right:0;width:260px;padding:.75rem;border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10005}.pt-nav-bar-menu .navbar-user-menu-header{display:flex;align-items:center;gap:.75rem;padding:.35rem .25rem .65rem}.pt-nav-bar-menu .navbar-user-menu-avatar{width:46px;height:46px;min-width:46px;font-size:1.05rem}.pt-nav-bar-menu .navbar-user-menu-identity{min-width:0;flex:1 1 auto}.pt-nav-bar-menu .navbar-user-menu-name{color:var(--pt-navbar-user-menu-name, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-profile{margin-top:.15rem;color:var(--pt-navbar-user-menu-profile, #2563eb);font-size:.8rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-username{margin-top:.15rem;color:var(--pt-navbar-user-menu-username, #64748b);font-size:.78rem;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-menu-separator{height:1px;margin:.4rem 0;background:var(--pt-navbar-user-menu-separator, #e5e7eb)}.pt-nav-bar-menu .navbar-user-menu-item{display:flex;align-items:center;gap:.55rem;width:100%;min-height:38px;padding:.5rem .55rem;border:none;border-radius:9px;background:transparent;color:var(--pt-navbar-user-menu-item-text, #334155);box-sizing:border-box;cursor:pointer;text-align:left;font-size:.86rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-nav-bar-menu .navbar-user-menu-item:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-hover-bg, #f1f5f9);color:var(--pt-navbar-user-menu-item-hover-text, #0f172a)}.pt-nav-bar-menu .navbar-user-menu-item.danger{color:var(--pt-navbar-user-menu-item-danger-text, #dc2626)}.pt-nav-bar-menu .navbar-user-menu-item.danger:hover:not(:disabled){background:var(--pt-navbar-user-menu-item-danger-hover-bg, #fef2f2);color:var(--pt-navbar-user-menu-item-danger-hover-text, #b91c1c)}.pt-nav-bar-menu .navbar-user-menu-item.disabled,.pt-nav-bar-menu .navbar-user-menu-item:disabled{opacity:.55;cursor:not-allowed}.pt-nav-bar-menu .navbar-user-menu-item i{width:18px;flex:0 0 18px;text-align:center}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px;padding-top:8px;padding-bottom:8px}.pt-nav-bar-menu .navbar-left{flex:1 1 auto}.pt-nav-bar-menu .navbar-middle{order:3;width:100%;flex:1 0 100%;padding:4px 0 0;justify-content:center}.pt-nav-bar-menu .pt-navbar-actions{flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:650px){.pt-nav-bar-menu{gap:8px}.pt-nav-bar-menu .navbar-title{display:none}.pt-nav-bar-menu .toggle-btn{margin-left:0}.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .pt-navbar-actions{gap:4px}}@media(max-width:520px){.pt-nav-bar-menu{padding-right:8px;padding-left:8px}.pt-nav-bar-menu .navbar-datetime .dt-value{font-size:.8rem!important}.pt-nav-bar-menu .navbar-user-menu{position:fixed;top:60px;right:8px;width:240px}}\n"] }]
|
|
7470
7615
|
}], propDecorators: { navBarMenuConfig: [{
|
|
7471
7616
|
type: Input
|
|
7472
7617
|
}], serverDateTime: [{
|
|
@@ -7528,107 +7673,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
|
|
|
7528
7673
|
args: ['document:click']
|
|
7529
7674
|
}] } });
|
|
7530
7675
|
|
|
7531
|
-
class PTMenuFancyComponent {
|
|
7532
|
-
constructor() {
|
|
7533
|
-
this.config = {
|
|
7534
|
-
icon: { code: 'pi pi-ellipsis-v', color: '#000', fontSize: '15px' },
|
|
7535
|
-
menuDirection: 'right',
|
|
7536
|
-
};
|
|
7537
|
-
this.cardMenuConfig = {
|
|
7538
|
-
noBorder: true,
|
|
7539
|
-
margin: '0',
|
|
7540
|
-
padding: '5px',
|
|
7541
|
-
};
|
|
7542
|
-
this.isOpen = false;
|
|
7543
|
-
}
|
|
7544
|
-
static { this.DEFAULT_TEXT_COLOR = '#000'; }
|
|
7545
|
-
static { this.DEFAULT_TEXT_FONT_SIZE = '15px'; }
|
|
7546
|
-
static { this.DEFAULT_ICON_COLOR = '#000'; }
|
|
7547
|
-
static { this.DEFAULT_ICON_FONT_SIZE = '15px'; }
|
|
7548
|
-
static { this.DEFAULT_ICON_CODE = 'pi pi-ellipsis-v'; }
|
|
7549
|
-
static { this.openMenuInstance = null; }
|
|
7550
|
-
toggleMenu() {
|
|
7551
|
-
if (PTMenuFancyComponent.openMenuInstance &&
|
|
7552
|
-
PTMenuFancyComponent.openMenuInstance !== this) {
|
|
7553
|
-
PTMenuFancyComponent.openMenuInstance.closeMenu();
|
|
7554
|
-
}
|
|
7555
|
-
this.isOpen = !this.isOpen;
|
|
7556
|
-
if (this.isOpen) {
|
|
7557
|
-
PTMenuFancyComponent.openMenuInstance = this;
|
|
7558
|
-
}
|
|
7559
|
-
else {
|
|
7560
|
-
PTMenuFancyComponent.openMenuInstance = null;
|
|
7561
|
-
}
|
|
7562
|
-
}
|
|
7563
|
-
closeMenu() {
|
|
7564
|
-
this.isOpen = false;
|
|
7565
|
-
if (PTMenuFancyComponent.openMenuInstance === this) {
|
|
7566
|
-
PTMenuFancyComponent.openMenuInstance = null;
|
|
7567
|
-
}
|
|
7568
|
-
}
|
|
7569
|
-
getMenuItemIconClass(item) {
|
|
7570
|
-
// Assuming that icons starting with "fa" are FontAwesome icons
|
|
7571
|
-
return typeof item.icon === 'string' ? item.icon : item.icon?.code || '';
|
|
7572
|
-
}
|
|
7573
|
-
getMenuItemIconStyles(item) {
|
|
7574
|
-
if (typeof item.icon !== 'string') {
|
|
7575
|
-
return {
|
|
7576
|
-
color: item.icon?.color || PTMenuFancyComponent.DEFAULT_ICON_COLOR,
|
|
7577
|
-
fontSize: item.icon?.fontSize || PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
|
|
7578
|
-
};
|
|
7579
|
-
}
|
|
7580
|
-
return {
|
|
7581
|
-
color: PTMenuFancyComponent.DEFAULT_ICON_COLOR,
|
|
7582
|
-
fontSize: PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
|
|
7583
|
-
};
|
|
7584
|
-
}
|
|
7585
|
-
getIconClass() {
|
|
7586
|
-
return this.config.icon?.code || PTMenuFancyComponent.DEFAULT_ICON_CODE;
|
|
7587
|
-
}
|
|
7588
|
-
getIconStyles() {
|
|
7589
|
-
return {
|
|
7590
|
-
color: this.config.color ||
|
|
7591
|
-
this.config.icon?.color ||
|
|
7592
|
-
PTMenuFancyComponent.DEFAULT_ICON_COLOR,
|
|
7593
|
-
fontSize: this.config.fontSize ||
|
|
7594
|
-
this.config.icon?.fontSize ||
|
|
7595
|
-
PTMenuFancyComponent.DEFAULT_ICON_FONT_SIZE,
|
|
7596
|
-
};
|
|
7597
|
-
}
|
|
7598
|
-
getTextStyles(item) {
|
|
7599
|
-
return {
|
|
7600
|
-
color: item.color || PTMenuFancyComponent.DEFAULT_TEXT_COLOR,
|
|
7601
|
-
fontSize: item.fontSize || PTMenuFancyComponent.DEFAULT_TEXT_FONT_SIZE,
|
|
7602
|
-
};
|
|
7603
|
-
}
|
|
7604
|
-
isItemDisabled(item) {
|
|
7605
|
-
return !!item?.disabled || !!item?.isHeader || !item?.action;
|
|
7606
|
-
}
|
|
7607
|
-
onItemClick(item) {
|
|
7608
|
-
if (this.isItemDisabled(item))
|
|
7609
|
-
return;
|
|
7610
|
-
item.action?.();
|
|
7611
|
-
this.closeMenu(); // optional UX: close after click
|
|
7612
|
-
}
|
|
7613
|
-
onDocumentClick(event) {
|
|
7614
|
-
const clickedInside = event.target.closest('.pt-menu-fancy');
|
|
7615
|
-
if (!clickedInside) {
|
|
7616
|
-
this.closeMenu();
|
|
7617
|
-
}
|
|
7618
|
-
}
|
|
7619
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTMenuFancyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7620
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTMenuFancyComponent, isStandalone: false, selector: "pt-menu-fancy", inputs: { config: "config" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, ngImport: i0, template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu-fancy\"\n >\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n\n @if (isOpen) {\n <div class=\"menu-dropdown\">\n <pt-card [config]=\"cardMenuConfig\">\n @for (item of config.menuItems; track item) {\n <div\n class=\"menu-item\"\n [class.menu-item-disabled]=\"isItemDisabled(item)\"\n [class.menu-item-header]=\"item.isHeader\"\n (click)=\"onItemClick(item)\"\n >\n @if (getMenuItemIconClass(item)) {\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n }\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n }\n </pt-card>\n </div>\n }\n</div>\n", styles: [".pt-menu-fancy{position:relative;display:inline-block}.pt-menu-fancy .menu-icon{font-style:normal;font-weight:400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu-fancy .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu-fancy .menu-dropdown{position:absolute;top:calc(100% + 8px);background-color:#fff;min-width:220px;z-index:3;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08);box-shadow:0 10px 22px #0000001f;opacity:0;transform:translateY(-12px);pointer-events:none;transition:transform .18s ease-out,opacity .18s ease-out}.pt-menu-fancy.open .menu-dropdown{display:block;opacity:1;transform:translateY(0);pointer-events:auto}.pt-menu-fancy.menu-left .menu-dropdown{right:0;left:auto}.pt-menu-fancy.menu-right .menu-dropdown{left:0;right:auto}.pt-menu-fancy .menu-item{padding:10px 14px;cursor:pointer;display:flex;align-items:center;gap:10px;-webkit-user-select:none;user-select:none;transition:background-color .15s ease-in-out}.pt-menu-fancy .menu-item i{margin-right:0}.pt-menu-fancy .menu-item:hover{background-color:#f1f1f1}.pt-menu-fancy .menu-item.menu-item-header{cursor:default;background:#fafafa;font-weight:700;opacity:.98;border-bottom:1px solid rgba(0,0,0,.08)}.pt-menu-fancy .menu-item.menu-item-header:hover{background:#fafafa}.pt-menu-fancy .menu-item.menu-item-disabled{cursor:not-allowed}.pt-menu-fancy .menu-item.menu-item-disabled:hover{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }] }); }
|
|
7621
|
-
}
|
|
7622
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTMenuFancyComponent, decorators: [{
|
|
7623
|
-
type: Component,
|
|
7624
|
-
args: [{ selector: 'pt-menu-fancy', standalone: false, template: "<div\n [ngClass]=\"{\n open: isOpen,\n 'menu-left': config.menuDirection === 'left',\n 'menu-right': config.menuDirection === 'right'\n }\"\n class=\"pt-menu-fancy\"\n >\n <i\n class=\"menu-icon\"\n (click)=\"toggleMenu()\"\n [ngClass]=\"getIconClass()\"\n [ngStyle]=\"getIconStyles()\"\n ></i>\n\n @if (isOpen) {\n <div class=\"menu-dropdown\">\n <pt-card [config]=\"cardMenuConfig\">\n @for (item of config.menuItems; track item) {\n <div\n class=\"menu-item\"\n [class.menu-item-disabled]=\"isItemDisabled(item)\"\n [class.menu-item-header]=\"item.isHeader\"\n (click)=\"onItemClick(item)\"\n >\n @if (getMenuItemIconClass(item)) {\n <i\n [ngClass]=\"getMenuItemIconClass(item)\"\n [ngStyle]=\"getMenuItemIconStyles(item)\"\n ></i>\n }\n <span [ngStyle]=\"getTextStyles(item)\">{{ item.text }}</span>\n </div>\n }\n </pt-card>\n </div>\n }\n</div>\n", styles: [".pt-menu-fancy{position:relative;display:inline-block}.pt-menu-fancy .menu-icon{font-style:normal;font-weight:400;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;padding:8px;transition:background-color .2s,box-shadow .2s}.pt-menu-fancy .menu-icon:hover{background-color:#5959591a;box-shadow:0 0 0 1px #5959591a}.pt-menu-fancy .menu-dropdown{position:absolute;top:calc(100% + 8px);background-color:#fff;min-width:220px;z-index:3;border-radius:8px;overflow:hidden;border:1px solid rgba(0,0,0,.08);box-shadow:0 10px 22px #0000001f;opacity:0;transform:translateY(-12px);pointer-events:none;transition:transform .18s ease-out,opacity .18s ease-out}.pt-menu-fancy.open .menu-dropdown{display:block;opacity:1;transform:translateY(0);pointer-events:auto}.pt-menu-fancy.menu-left .menu-dropdown{right:0;left:auto}.pt-menu-fancy.menu-right .menu-dropdown{left:0;right:auto}.pt-menu-fancy .menu-item{padding:10px 14px;cursor:pointer;display:flex;align-items:center;gap:10px;-webkit-user-select:none;user-select:none;transition:background-color .15s ease-in-out}.pt-menu-fancy .menu-item i{margin-right:0}.pt-menu-fancy .menu-item:hover{background-color:#f1f1f1}.pt-menu-fancy .menu-item.menu-item-header{cursor:default;background:#fafafa;font-weight:700;opacity:.98;border-bottom:1px solid rgba(0,0,0,.08)}.pt-menu-fancy .menu-item.menu-item-header:hover{background:#fafafa}.pt-menu-fancy .menu-item.menu-item-disabled{cursor:not-allowed}.pt-menu-fancy .menu-item.menu-item-disabled:hover{background-color:transparent}\n"] }]
|
|
7625
|
-
}], propDecorators: { config: [{
|
|
7626
|
-
type: Input
|
|
7627
|
-
}], onDocumentClick: [{
|
|
7628
|
-
type: HostListener,
|
|
7629
|
-
args: ['document:click', ['$event']]
|
|
7630
|
-
}] } });
|
|
7631
|
-
|
|
7632
7676
|
class PTMenuFancyModule {
|
|
7633
7677
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTMenuFancyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
7634
7678
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: PTMenuFancyModule, declarations: [PTMenuFancyComponent], imports: [CommonModule, PTCardModule], exports: [PTMenuFancyComponent] }); }
|