ng-prime-tools 1.1.18 → 1.1.20

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.
@@ -52,7 +52,7 @@ import { InputOtpModule } from 'primeng/inputotp';
52
52
  import { Chart, registerables } from 'chart.js';
53
53
  import ChartDataLabels from 'chartjs-plugin-datalabels';
54
54
  import { Subject, interval, BehaviorSubject } from 'rxjs';
55
- import { takeUntil, filter } from 'rxjs/operators';
55
+ import { takeUntil, filter, debounceTime, distinctUntilChanged } from 'rxjs/operators';
56
56
  import * as i1$2 from '@angular/router';
57
57
  import { RouterModule, NavigationEnd } from '@angular/router';
58
58
  import * as i2$1 from 'primeng/breadcrumb';
@@ -67,6 +67,8 @@ import * as i2$4 from 'primeng/accordion';
67
67
  import { AccordionModule } from 'primeng/accordion';
68
68
  import * as i5$1 from 'primeng/menu';
69
69
  import { MenuModule } from 'primeng/menu';
70
+ import * as i2$5 from 'primeng/paginator';
71
+ import { PaginatorModule } from 'primeng/paginator';
70
72
 
71
73
  /**
72
74
  * Calculates the width required for a column based on the header text (column title).
@@ -6080,17 +6082,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
6080
6082
 
6081
6083
  class PTNotificationComponent {
6082
6084
  constructor() {
6085
+ /**
6086
+ * Notifications already loaded from the server.
6087
+ *
6088
+ * With infinite scroll, the consumer should append each
6089
+ * newly loaded server page to this array.
6090
+ */
6083
6091
  this.notifications = [];
6084
6092
  this.config = {};
6093
+ /**
6094
+ * Total number of notifications available on the server.
6095
+ *
6096
+ * Used to determine whether another page can be loaded.
6097
+ */
6098
+ this.totalRecords = 0;
6099
+ /**
6100
+ * Last server page currently loaded.
6101
+ *
6102
+ * Zero-based.
6103
+ */
6104
+ this.page = 0;
6105
+ /**
6106
+ * Server page size.
6107
+ */
6108
+ this.rows = 10;
6109
+ /**
6110
+ * True while the consumer is fetching the next page.
6111
+ *
6112
+ * Prevents duplicate loadMore events.
6113
+ */
6114
+ this.loading = false;
6085
6115
  this.notificationClick = new EventEmitter();
6086
6116
  this.action = new EventEmitter();
6087
6117
  this.globalAction = new EventEmitter();
6088
6118
  this.viewAll = new EventEmitter();
6089
6119
  this.panelOpened = new EventEmitter();
6090
6120
  this.panelClosed = new EventEmitter();
6121
+ /**
6122
+ * Emitted when the list approaches its bottom
6123
+ * and another server page is available.
6124
+ */
6125
+ this.loadMore = new EventEmitter();
6091
6126
  this.isOpen = false;
6092
6127
  this.openedActionMenuId = null;
6093
6128
  this.isGlobalActionMenuOpen = false;
6129
+ this.lastRequestedPage = null;
6094
6130
  this.defaultActions = [
6095
6131
  {
6096
6132
  id: 'MARK_AS_READ',
@@ -6124,6 +6160,7 @@ class PTNotificationComponent {
6124
6160
  this.openedActionMenuId = null;
6125
6161
  this.isGlobalActionMenuOpen = false;
6126
6162
  if (this.isOpen) {
6163
+ this.lastRequestedPage = null;
6127
6164
  this.panelOpened.emit();
6128
6165
  return;
6129
6166
  }
@@ -6136,6 +6173,7 @@ class PTNotificationComponent {
6136
6173
  this.isOpen = false;
6137
6174
  this.openedActionMenuId = null;
6138
6175
  this.isGlobalActionMenuOpen = false;
6176
+ this.lastRequestedPage = null;
6139
6177
  this.panelClosed.emit();
6140
6178
  }
6141
6179
  onPanelClick(event) {
@@ -6143,6 +6181,27 @@ class PTNotificationComponent {
6143
6181
  this.openedActionMenuId = null;
6144
6182
  this.isGlobalActionMenuOpen = false;
6145
6183
  }
6184
+ onListScroll(event) {
6185
+ if (!this.isInfiniteScrollEnabled()) {
6186
+ return;
6187
+ }
6188
+ if (this.loading) {
6189
+ return;
6190
+ }
6191
+ if (!this.hasMoreNotifications()) {
6192
+ return;
6193
+ }
6194
+ const element = event.target;
6195
+ if (!element) {
6196
+ return;
6197
+ }
6198
+ const threshold = this.getInfiniteScrollThreshold();
6199
+ const distanceFromBottom = element.scrollHeight - element.scrollTop - element.clientHeight;
6200
+ if (distanceFromBottom > threshold) {
6201
+ return;
6202
+ }
6203
+ this.requestNextPage();
6204
+ }
6146
6205
  onNotificationClick(notification, event) {
6147
6206
  event.stopPropagation();
6148
6207
  if (notification.disabled) {
@@ -6216,6 +6275,9 @@ class PTNotificationComponent {
6216
6275
  return this.getNotifications().length > 0;
6217
6276
  }
6218
6277
  getUnreadCount() {
6278
+ if (this.totalUnreadRecords !== undefined) {
6279
+ return Math.max(0, this.totalUnreadRecords);
6280
+ }
6219
6281
  return this.getNotifications().filter((notification) => notification.read !== true).length;
6220
6282
  }
6221
6283
  hasUnreadNotifications() {
@@ -6242,6 +6304,27 @@ class PTNotificationComponent {
6242
6304
  return (this.config.showGlobalActions !== false &&
6243
6305
  this.getGlobalActions().length > 0);
6244
6306
  }
6307
+ isInfiniteScrollEnabled() {
6308
+ return this.config.infiniteScroll === true;
6309
+ }
6310
+ hasMoreNotifications() {
6311
+ if (!this.isInfiniteScrollEnabled()) {
6312
+ return false;
6313
+ }
6314
+ return this.getNotifications().length < Math.max(0, this.totalRecords);
6315
+ }
6316
+ showInfiniteScrollLoader() {
6317
+ return (this.isInfiniteScrollEnabled() &&
6318
+ this.loading &&
6319
+ this.hasMoreNotifications());
6320
+ }
6321
+ getLoadingText() {
6322
+ return this.config.loadingText?.trim() || 'Chargement...';
6323
+ }
6324
+ getInfiniteScrollThreshold() {
6325
+ const threshold = this.config.infiniteScrollThreshold ?? 80;
6326
+ return Math.max(0, threshold);
6327
+ }
6245
6328
  getTitle() {
6246
6329
  return this.config.title?.trim() || 'Notifications';
6247
6330
  }
@@ -6269,7 +6352,7 @@ class PTNotificationComponent {
6269
6352
  }
6270
6353
  getNotificationClasses(notification) {
6271
6354
  const classes = ['pt-notification-item'];
6272
- if (!notification.read) {
6355
+ if (notification.read !== true) {
6273
6356
  classes.push('unread');
6274
6357
  }
6275
6358
  if (notification.disabled) {
@@ -6347,6 +6430,25 @@ class PTNotificationComponent {
6347
6430
  hasMetadata(notification) {
6348
6431
  return !!(notification.date || notification.sender?.trim());
6349
6432
  }
6433
+ requestNextPage() {
6434
+ const size = Math.max(1, this.rows);
6435
+ const nextPage = Math.max(0, this.page) + 1;
6436
+ /*
6437
+ * Scroll events may fire several times before
6438
+ * the consumer switches loading=true.
6439
+ *
6440
+ * Avoid emitting the same page repeatedly.
6441
+ */
6442
+ if (this.lastRequestedPage === nextPage) {
6443
+ return;
6444
+ }
6445
+ this.lastRequestedPage = nextPage;
6446
+ this.loadMore.emit({
6447
+ page: nextPage,
6448
+ size,
6449
+ first: nextPage * size,
6450
+ });
6451
+ }
6350
6452
  formatRelativeDate(date) {
6351
6453
  const now = new Date();
6352
6454
  const differenceMs = now.getTime() - date.getTime();
@@ -6375,10 +6477,9 @@ class PTNotificationComponent {
6375
6477
  return this.formatAbsoluteDate(date);
6376
6478
  }
6377
6479
  getCalendarDayDifference(left, right) {
6378
- const leftDate = new Date(left.getFullYear(), left.getMonth(), left.getDate());
6379
- const rightDate = new Date(right.getFullYear(), right.getMonth(), right.getDate());
6380
- const millisecondsPerDay = 24 * 60 * 60 * 1000;
6381
- return Math.round((leftDate.getTime() - rightDate.getTime()) / millisecondsPerDay);
6480
+ const leftDay = Date.UTC(left.getFullYear(), left.getMonth(), left.getDate());
6481
+ const rightDay = Date.UTC(right.getFullYear(), right.getMonth(), right.getDate());
6482
+ return Math.round((leftDay - rightDay) / (24 * 60 * 60 * 1000));
6382
6483
  }
6383
6484
  toDate(value) {
6384
6485
  if (value instanceof Date) {
@@ -6388,20 +6489,18 @@ class PTNotificationComponent {
6388
6489
  if (!normalized) {
6389
6490
  return null;
6390
6491
  }
6391
- const parsedDate = new Date(normalized);
6392
- if (!Number.isNaN(parsedDate.getTime())) {
6393
- return parsedDate;
6394
- }
6395
- const isoWithoutTimezoneMatch = normalized.match(/^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2})(?::(\d{2}))?(?:\.(\d+))?$/);
6396
- if (!isoWithoutTimezoneMatch) {
6397
- return null;
6492
+ /*
6493
+ * Parse a Java LocalDateTime as local wall time.
6494
+ */
6495
+ const localDateMatch = normalized.match(/^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2})(?::(\d{2}))?(?:\.(\d+))?$/);
6496
+ if (localDateMatch) {
6497
+ const [, year, month, day, hours, minutes, seconds = '0', fraction = ''] = localDateMatch;
6498
+ const milliseconds = Number(fraction.padEnd(3, '0').substring(0, 3) || '0');
6499
+ const date = new Date(Number(year), Number(month) - 1, Number(day), Number(hours), Number(minutes), Number(seconds), milliseconds);
6500
+ return Number.isNaN(date.getTime()) ? null : date;
6398
6501
  }
6399
- const [, year, month, day, hours, minutes, seconds, fraction] = isoWithoutTimezoneMatch;
6400
- const milliseconds = fraction
6401
- ? Number(fraction.padEnd(3, '0').substring(0, 3))
6402
- : 0;
6403
- const date = new Date(Number(year), Number(month) - 1, Number(day), Number(hours), Number(minutes), Number(seconds ?? 0), milliseconds);
6404
- return Number.isNaN(date.getTime()) ? null : date;
6502
+ const parsedDate = new Date(normalized);
6503
+ return Number.isNaN(parsedDate.getTime()) ? null : parsedDate;
6405
6504
  }
6406
6505
  formatAbsoluteDate(date) {
6407
6506
  const day = this.pad2(date.getDate());
@@ -6418,15 +6517,25 @@ class PTNotificationComponent {
6418
6517
  return String(value).padStart(2, '0');
6419
6518
  }
6420
6519
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6421
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTNotificationComponent, isStandalone: false, selector: "pt-notification", inputs: { notifications: "notifications", config: "config" }, outputs: { notificationClick: "notificationClick", action: "action", globalAction: "globalAction", viewAll: "viewAll", panelOpened: "panelOpened", panelClosed: "panelClosed" }, host: { listeners: { "document:click": "onDocumentClick()" } }, ngImport: i0, template: "@if (isVisible()) {\n <div class=\"pt-notification\">\n <button\n type=\"button\"\n class=\"pt-notification-trigger\"\n aria-label=\"Notifications\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"togglePanel($event)\"\n >\n <i [class]=\"getBellIcon()\"></i>\n\n @if (showBadge()) {\n <span class=\"pt-notification-badge\">\n {{ getBadgeText() }}\n </span>\n }\n </button>\n\n @if (isOpen) {\n <div\n class=\"pt-notification-panel\"\n [ngStyle]=\"getPanelStyles()\"\n (click)=\"onPanelClick($event)\"\n >\n <div class=\"pt-notification-header\">\n <div class=\"pt-notification-header-left\">\n <div class=\"pt-notification-header-title\">\n {{ getTitle() }}\n </div>\n\n @if (showHeaderCount()) {\n <span class=\"pt-notification-header-count\">\n {{ getUnreadCount() }}\n </span>\n }\n </div>\n\n @if (showGlobalActions()) {\n <div\n class=\"pt-notification-global-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-global-more-button\"\n aria-label=\"Notification global actions\"\n (click)=\"toggleGlobalActionMenu($event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isGlobalActionMenuOpen) {\n <div\n class=\"pt-notification-global-action-menu\"\n (click)=\"onGlobalActionMenuClick($event)\"\n >\n @for (menuAction of getGlobalActions(); track menuAction.id) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onGlobalActionClick(menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n\n @if (hasNotifications()) {\n <div class=\"pt-notification-list\" [ngStyle]=\"getListStyles()\">\n @for (notification of getNotifications(); track notification.id) {\n <div\n [class]=\"getNotificationClasses(notification)\"\n (click)=\"onNotificationClick(notification, $event)\"\n >\n <div class=\"pt-notification-item-icon-wrapper\">\n <div class=\"pt-notification-item-icon\">\n <i\n [class]=\"getNotificationIcon(notification)\"\n [ngStyle]=\"getNotificationIconStyles(notification)\"\n ></i>\n </div>\n </div>\n\n <div class=\"pt-notification-item-content\">\n <div class=\"pt-notification-item-text\">\n {{ notification.text }}\n </div>\n\n @if (hasMetadata(notification)) {\n <div class=\"pt-notification-item-metadata\">\n @if (notification.date) {\n <span class=\"pt-notification-item-date\">\n <i class=\"pi pi-clock\"></i>\n {{ getDateText(notification) }}\n </span>\n }\n\n @if (notification.sender) {\n <span class=\"pt-notification-item-sender\">\n <i class=\"pi pi-user\"></i>\n {{ notification.sender }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (hasActions(notification)) {\n <div\n class=\"pt-notification-item-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-more-button\"\n aria-label=\"Notification actions\"\n [disabled]=\"notification.disabled\"\n (click)=\"toggleActionMenu(notification, $event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isActionMenuOpen(notification)) {\n <div\n class=\"pt-notification-action-menu\"\n (click)=\"onActionMenuClick($event)\"\n >\n @for (\n menuAction of getActions(notification);\n track menuAction.id\n ) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"\n onActionClick(notification, menuAction, $event)\n \"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (!notification.read) {\n <span class=\"pt-notification-unread-indicator\"></span>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"pt-notification-empty\">\n <i class=\"pi pi-bell-slash\"></i>\n\n <span>\n {{ getEmptyText() }}\n </span>\n </div>\n }\n\n @if (showViewAll()) {\n <div class=\"pt-notification-footer\">\n <button\n type=\"button\"\n class=\"pt-notification-view-all\"\n (click)=\"onViewAllClick($event)\"\n >\n <span>\n {{ getViewAllText() }}\n </span>\n\n <i [class]=\"getViewAllIcon()\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}.pt-notification{position:relative;display:inline-flex;align-items:center;justify-content:center}.pt-notification-trigger{position:relative;width:40px;height:40px;min-width:40px;padding:0;border:none;border-radius:999px;background:transparent;color:var(--pt-notification-bell-color, #475569);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .2s ease,color .2s ease}.pt-notification-trigger:hover{background:var(--pt-notification-bell-hover-bg, #f1f5f9);color:var(--pt-notification-bell-hover-color, #0f172a)}.pt-notification-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-bell-focus-shadow, rgba(37, 99, 235, .16))}.pt-notification-trigger>i{font-size:1.25rem;line-height:1}.pt-notification-badge{position:absolute;top:-1px;right:-3px;min-width:18px;height:18px;padding:0 4px;border:2px solid var(--pt-notification-badge-border, #ffffff);border-radius:999px;background:var(--pt-notification-badge-bg, #dc2626);color:var(--pt-notification-badge-text, #ffffff);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:.65rem;font-weight:800;line-height:1;pointer-events:none}.pt-notification-panel{position:absolute;top:calc(100% + 10px);right:0;min-width:320px;max-width:min(420px,calc(100vw - 24px));background:var(--pt-notification-panel-bg, #ffffff);color:var(--pt-notification-panel-text, #334155);border:1px solid var(--pt-notification-panel-border, #e2e8f0);border-radius:14px;box-shadow:var( --pt-notification-panel-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;overflow:visible;z-index:10000}.pt-notification-header{min-height:52px;padding:0 16px;border-bottom:1px solid var(--pt-notification-header-border, #e2e8f0);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.pt-notification-header-title{min-width:0;color:var(--pt-notification-header-title, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-notification-header-count{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--pt-notification-header-count-bg, #eff6ff);color:var(--pt-notification-header-count-text, #2563eb);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;font-size:.75rem;font-weight:800;line-height:1}.pt-notification-list{overflow-y:auto;overflow-x:visible;overscroll-behavior:contain}.pt-notification-item{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 34px;align-items:flex-start;gap:10px;min-height:76px;padding:13px 14px 13px 12px;border-bottom:1px solid var(--pt-notification-item-border, #f1f5f9);background:var(--pt-notification-item-bg, #ffffff);cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-notification-item:last-child{border-bottom:none}.pt-notification-item:hover{background:var(--pt-notification-item-hover-bg, #f8fafc)}.pt-notification-item.unread{background:var(--pt-notification-item-unread-bg, #f8fbff)}.pt-notification-item.unread:hover{background:var(--pt-notification-item-unread-hover-bg, #f1f7ff)}.pt-notification-item.disabled{opacity:.55;cursor:not-allowed}.pt-notification-item-icon-wrapper{display:flex;justify-content:center;align-items:flex-start}.pt-notification-item-icon{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-notification-item-icon-bg, #eff6ff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-item-icon i{font-size:1rem;line-height:1}.pt-notification-item-content{min-width:0;padding-top:1px}.pt-notification-item-text{color:var(--pt-notification-item-text, #1e293b);font-size:.86rem;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.pt-notification-item.unread .pt-notification-item-text{color:var(--pt-notification-item-unread-text, #0f172a);font-weight:700}.pt-notification-item-metadata{margin-top:6px;display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;color:var(--pt-notification-metadata-text, #94a3b8);font-size:.71rem;font-weight:500;line-height:1.3}.pt-notification-item-date,.pt-notification-item-sender{min-width:0;display:inline-flex;align-items:center;gap:4px}.pt-notification-item-date i,.pt-notification-item-sender i{flex:0 0 auto;font-size:.68rem}.pt-notification-item-sender{max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pt-notification-item-actions{position:relative;display:flex;justify-content:flex-end;align-items:flex-start}.pt-notification-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-more-color, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-more-button:hover{background:var(--pt-notification-more-hover-bg, #e2e8f0);color:var(--pt-notification-more-hover-color, #0f172a)}.pt-notification-more-button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-more-button:disabled{opacity:.5;cursor:not-allowed}.pt-notification-more-button i{font-size:.95rem;line-height:1}.pt-notification-action-menu{position:absolute;top:34px;right:0;width:200px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10002}.pt-notification-action-menu-item{width:100%;min-height:36px;padding:7px 9px;border:none;border-radius:7px;background:transparent;color:var(--pt-notification-action-text, #334155);display:flex;align-items:center;gap:8px;box-sizing:border-box;text-align:left;cursor:pointer;font-size:.78rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-notification-action-menu-item:hover{background:var(--pt-notification-action-hover-bg, #f1f5f9);color:var(--pt-notification-action-hover-text, #0f172a)}.pt-notification-action-menu-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-action-menu-item.danger{color:var(--pt-notification-action-danger-text, #dc2626)}.pt-notification-action-menu-item.danger:hover{background:var(--pt-notification-action-danger-hover-bg, #fef2f2);color:var(--pt-notification-action-danger-hover-text, #b91c1c)}.pt-notification-action-menu-item.disabled,.pt-notification-action-menu-item:disabled{opacity:.5;cursor:not-allowed}.pt-notification-action-menu-item i{width:16px;flex:0 0 16px;font-size:.82rem;text-align:center}.pt-notification-action-menu-item span{min-width:0;flex:1 1 auto}.pt-notification-unread-indicator{position:absolute;top:50%;right:4px;width:6px;height:6px;border-radius:999px;background:var(--pt-notification-unread-indicator, #2563eb);transform:translateY(-50%);pointer-events:none}.pt-notification-empty{min-height:160px;padding:25px;color:var(--pt-notification-empty-text, #94a3b8);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;text-align:center}.pt-notification-empty i{font-size:1.8rem}.pt-notification-empty span{font-size:.84rem;font-weight:600}@media(max-width:520px){.pt-notification-panel{position:fixed;top:60px;right:8px;left:8px;width:auto!important;min-width:0;max-width:none}.pt-notification-item{grid-template-columns:38px minmax(0,1fr) 32px;gap:8px;padding-right:13px}.pt-notification-item-icon{width:36px;height:36px;min-width:36px}.pt-notification-item-metadata{flex-direction:column;align-items:flex-start;gap:4px}.pt-notification-item-sender{max-width:190px}.pt-notification-action-menu{right:0;width:190px}}.pt-notification-header-left{display:flex;align-items:center;gap:8px;min-width:0}.pt-notification-global-actions{position:relative;display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}.pt-notification-global-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-global-more-color, #64748b);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-global-more-button:hover{background:var(--pt-notification-global-more-hover-bg, #f1f5f9);color:var(--pt-notification-global-more-hover-color, #0f172a)}.pt-notification-global-more-button i{font-size:.95rem}.pt-notification-global-action-menu{position:absolute;top:36px;right:0;width:210px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10003}.pt-notification-footer{min-height:50px;padding:7px;border-top:1px solid var(--pt-notification-footer-border, #e2e8f0);background:var(--pt-notification-footer-bg, #ffffff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-view-all{width:100%;min-height:36px;padding:7px 12px;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-view-all-text, #2563eb);display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-size:.82rem;font-weight:700;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-view-all:hover{background:var(--pt-notification-view-all-hover-bg, #eff6ff);color:var(--pt-notification-view-all-hover-text, #1d4ed8)}.pt-notification-view-all i{font-size:.75rem}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
6520
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTNotificationComponent, isStandalone: false, selector: "pt-notification", inputs: { notifications: "notifications", config: "config", totalRecords: "totalRecords", totalUnreadRecords: "totalUnreadRecords", page: "page", rows: "rows", loading: "loading" }, outputs: { notificationClick: "notificationClick", action: "action", globalAction: "globalAction", viewAll: "viewAll", panelOpened: "panelOpened", panelClosed: "panelClosed", loadMore: "loadMore" }, host: { listeners: { "document:click": "onDocumentClick()" } }, ngImport: i0, template: "@if (isVisible()) {\n <div class=\"pt-notification\">\n <button\n type=\"button\"\n class=\"pt-notification-trigger\"\n [attr.aria-expanded]=\"isOpen\"\n aria-label=\"Notifications\"\n (click)=\"togglePanel($event)\"\n >\n <i [class]=\"getBellIcon()\"></i>\n\n @if (showBadge()) {\n <span class=\"pt-notification-badge\">\n {{ getBadgeText() }}\n </span>\n }\n </button>\n\n @if (isOpen) {\n <div\n class=\"pt-notification-panel\"\n [ngStyle]=\"getPanelStyles()\"\n (click)=\"onPanelClick($event)\"\n >\n <div class=\"pt-notification-header\">\n <div class=\"pt-notification-header-left\">\n <div class=\"pt-notification-header-title\">\n {{ getTitle() }}\n </div>\n\n @if (showHeaderCount()) {\n <span class=\"pt-notification-header-count\">\n {{ getUnreadCount() }}\n </span>\n }\n </div>\n\n @if (showGlobalActions()) {\n <div\n class=\"pt-notification-global-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-global-more-button\"\n aria-label=\"Notification global actions\"\n (click)=\"toggleGlobalActionMenu($event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isGlobalActionMenuOpen) {\n <div\n class=\"pt-notification-global-action-menu\"\n (click)=\"onGlobalActionMenuClick($event)\"\n >\n @for (menuAction of getGlobalActions(); track menuAction.id) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onGlobalActionClick(menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n\n @if (hasNotifications()) {\n <div\n class=\"pt-notification-list\"\n [ngStyle]=\"getListStyles()\"\n (scroll)=\"onListScroll($event)\"\n >\n @for (notification of getNotifications(); track notification.id) {\n <div\n [class]=\"getNotificationClasses(notification)\"\n (click)=\"onNotificationClick(notification, $event)\"\n >\n <div class=\"pt-notification-item-icon-wrapper\">\n <div class=\"pt-notification-item-icon\">\n <i\n [class]=\"getNotificationIcon(notification)\"\n [ngStyle]=\"getNotificationIconStyles(notification)\"\n ></i>\n </div>\n </div>\n\n <div class=\"pt-notification-item-content\">\n <div class=\"pt-notification-item-text\">\n {{ notification.text }}\n </div>\n\n @if (hasMetadata(notification)) {\n <div class=\"pt-notification-item-metadata\">\n @if (notification.date) {\n <span class=\"pt-notification-item-date\">\n <i class=\"pi pi-clock\"></i>\n\n {{ getDateText(notification) }}\n </span>\n }\n\n @if (notification.sender) {\n <span class=\"pt-notification-item-sender\">\n <i class=\"pi pi-user\"></i>\n\n {{ notification.sender }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (hasActions(notification)) {\n <div\n class=\"pt-notification-item-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-more-button\"\n aria-label=\"Notification actions\"\n [disabled]=\"notification.disabled\"\n (click)=\"toggleActionMenu(notification, $event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isActionMenuOpen(notification)) {\n <div\n class=\"pt-notification-action-menu\"\n (click)=\"onActionMenuClick($event)\"\n >\n @for (\n menuAction of getActions(notification);\n track menuAction.id\n ) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"\n onActionClick(notification, menuAction, $event)\n \"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (notification.read !== true) {\n <span class=\"pt-notification-unread-indicator\"></span>\n }\n </div>\n }\n\n @if (showInfiniteScrollLoader()) {\n <div class=\"pt-notification-load-more\">\n <i class=\"pi pi-spin pi-spinner\"></i>\n\n <span>\n {{ getLoadingText() }}\n </span>\n </div>\n }\n </div>\n } @else {\n <div class=\"pt-notification-empty\">\n @if (loading) {\n <i class=\"pi pi-spin pi-spinner\"></i>\n\n <span>\n {{ getLoadingText() }}\n </span>\n } @else {\n <i class=\"pi pi-bell-slash\"></i>\n\n <span>\n {{ getEmptyText() }}\n </span>\n }\n </div>\n }\n\n @if (showViewAll()) {\n <div class=\"pt-notification-footer\">\n <button\n type=\"button\"\n class=\"pt-notification-view-all\"\n (click)=\"onViewAllClick($event)\"\n >\n <span>\n {{ getViewAllText() }}\n </span>\n\n <i [class]=\"getViewAllIcon()\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}.pt-notification{position:relative;display:inline-flex;align-items:center;justify-content:center}.pt-notification-trigger{position:relative;width:40px;height:40px;min-width:40px;padding:0;border:none;border-radius:999px;background:transparent;color:var(--pt-notification-bell-color, #475569);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .2s ease,color .2s ease}.pt-notification-trigger:hover{background:var(--pt-notification-bell-hover-bg, #f1f5f9);color:var(--pt-notification-bell-hover-color, #0f172a)}.pt-notification-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-bell-focus-shadow, rgba(37, 99, 235, .16))}.pt-notification-trigger>i{font-size:1.25rem;line-height:1}.pt-notification-badge{position:absolute;top:-1px;right:-3px;min-width:18px;height:18px;padding:0 4px;border:2px solid var(--pt-notification-badge-border, #ffffff);border-radius:999px;background:var(--pt-notification-badge-bg, #dc2626);color:var(--pt-notification-badge-text, #ffffff);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:.65rem;font-weight:800;line-height:1;pointer-events:none}.pt-notification-panel{position:absolute;top:calc(100% + 10px);right:0;min-width:320px;max-width:min(420px,calc(100vw - 24px));background:var(--pt-notification-panel-bg, #ffffff);color:var(--pt-notification-panel-text, #334155);border:1px solid var(--pt-notification-panel-border, #e2e8f0);border-radius:14px;box-shadow:var( --pt-notification-panel-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;overflow:visible;z-index:10000}.pt-notification-header{min-height:52px;padding:0 16px;border-bottom:1px solid var(--pt-notification-header-border, #e2e8f0);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.pt-notification-header-title{min-width:0;color:var(--pt-notification-header-title, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-notification-header-count{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--pt-notification-header-count-bg, #eff6ff);color:var(--pt-notification-header-count-text, #2563eb);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;font-size:.75rem;font-weight:800;line-height:1}.pt-notification-list{overflow-y:auto;overflow-x:visible;overscroll-behavior:contain}.pt-notification-item{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 34px;align-items:flex-start;gap:10px;min-height:76px;padding:13px 14px 13px 12px;border-bottom:1px solid var(--pt-notification-item-border, #f1f5f9);background:var(--pt-notification-item-bg, #ffffff);cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-notification-item:last-child{border-bottom:none}.pt-notification-item:hover{background:var(--pt-notification-item-hover-bg, #f8fafc)}.pt-notification-item.unread{background:var(--pt-notification-item-unread-bg, #f8fbff)}.pt-notification-item.unread:hover{background:var(--pt-notification-item-unread-hover-bg, #f1f7ff)}.pt-notification-item.disabled{opacity:.55;cursor:not-allowed}.pt-notification-item-icon-wrapper{display:flex;justify-content:center;align-items:flex-start}.pt-notification-item-icon{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-notification-item-icon-bg, #eff6ff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-item-icon i{font-size:1rem;line-height:1}.pt-notification-item-content{min-width:0;padding-top:1px}.pt-notification-item-text{color:var(--pt-notification-item-text, #1e293b);font-size:.86rem;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.pt-notification-item.unread .pt-notification-item-text{color:var(--pt-notification-item-unread-text, #0f172a);font-weight:700}.pt-notification-item-metadata{margin-top:6px;display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;color:var(--pt-notification-metadata-text, #94a3b8);font-size:.71rem;font-weight:500;line-height:1.3}.pt-notification-item-date,.pt-notification-item-sender{min-width:0;display:inline-flex;align-items:center;gap:4px}.pt-notification-item-date i,.pt-notification-item-sender i{flex:0 0 auto;font-size:.68rem}.pt-notification-item-sender{max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pt-notification-item-actions{position:relative;display:flex;justify-content:flex-end;align-items:flex-start}.pt-notification-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-more-color, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-more-button:hover{background:var(--pt-notification-more-hover-bg, #e2e8f0);color:var(--pt-notification-more-hover-color, #0f172a)}.pt-notification-more-button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-more-button:disabled{opacity:.5;cursor:not-allowed}.pt-notification-more-button i{font-size:.95rem;line-height:1}.pt-notification-action-menu{position:absolute;top:34px;right:0;width:200px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10002}.pt-notification-action-menu-item{width:100%;min-height:36px;padding:7px 9px;border:none;border-radius:7px;background:transparent;color:var(--pt-notification-action-text, #334155);display:flex;align-items:center;gap:8px;box-sizing:border-box;text-align:left;cursor:pointer;font-size:.78rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-notification-action-menu-item:hover{background:var(--pt-notification-action-hover-bg, #f1f5f9);color:var(--pt-notification-action-hover-text, #0f172a)}.pt-notification-action-menu-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-action-menu-item.danger{color:var(--pt-notification-action-danger-text, #dc2626)}.pt-notification-action-menu-item.danger:hover{background:var(--pt-notification-action-danger-hover-bg, #fef2f2);color:var(--pt-notification-action-danger-hover-text, #b91c1c)}.pt-notification-action-menu-item.disabled,.pt-notification-action-menu-item:disabled{opacity:.5;cursor:not-allowed}.pt-notification-action-menu-item i{width:16px;flex:0 0 16px;font-size:.82rem;text-align:center}.pt-notification-action-menu-item span{min-width:0;flex:1 1 auto}.pt-notification-unread-indicator{position:absolute;top:50%;right:4px;width:6px;height:6px;border-radius:999px;background:var(--pt-notification-unread-indicator, #2563eb);transform:translateY(-50%);pointer-events:none}.pt-notification-empty{min-height:160px;padding:25px;color:var(--pt-notification-empty-text, #94a3b8);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;text-align:center}.pt-notification-empty i{font-size:1.8rem}.pt-notification-empty span{font-size:.84rem;font-weight:600}@media(max-width:520px){.pt-notification-panel{position:fixed;top:60px;right:8px;left:8px;width:auto!important;min-width:0;max-width:none}.pt-notification-item{grid-template-columns:38px minmax(0,1fr) 32px;gap:8px;padding-right:13px}.pt-notification-item-icon{width:36px;height:36px;min-width:36px}.pt-notification-item-metadata{flex-direction:column;align-items:flex-start;gap:4px}.pt-notification-item-sender{max-width:190px}.pt-notification-action-menu{right:0;width:190px}}.pt-notification-header-left{display:flex;align-items:center;gap:8px;min-width:0}.pt-notification-global-actions{position:relative;display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}.pt-notification-global-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-global-more-color, #64748b);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-global-more-button:hover{background:var(--pt-notification-global-more-hover-bg, #f1f5f9);color:var(--pt-notification-global-more-hover-color, #0f172a)}.pt-notification-global-more-button i{font-size:.95rem}.pt-notification-global-action-menu{position:absolute;top:36px;right:0;width:210px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10003}.pt-notification-footer{min-height:50px;padding:7px;border-top:1px solid var(--pt-notification-footer-border, #e2e8f0);background:var(--pt-notification-footer-bg, #ffffff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-view-all{width:100%;min-height:36px;padding:7px 12px;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-view-all-text, #2563eb);display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-size:.82rem;font-weight:700;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-view-all:hover{background:var(--pt-notification-view-all-hover-bg, #eff6ff);color:var(--pt-notification-view-all-hover-text, #1d4ed8)}.pt-notification-view-all i{font-size:.75rem}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
6422
6521
  }
6423
6522
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationComponent, decorators: [{
6424
6523
  type: Component,
6425
- args: [{ selector: 'pt-notification', standalone: false, template: "@if (isVisible()) {\n <div class=\"pt-notification\">\n <button\n type=\"button\"\n class=\"pt-notification-trigger\"\n aria-label=\"Notifications\"\n [attr.aria-expanded]=\"isOpen\"\n (click)=\"togglePanel($event)\"\n >\n <i [class]=\"getBellIcon()\"></i>\n\n @if (showBadge()) {\n <span class=\"pt-notification-badge\">\n {{ getBadgeText() }}\n </span>\n }\n </button>\n\n @if (isOpen) {\n <div\n class=\"pt-notification-panel\"\n [ngStyle]=\"getPanelStyles()\"\n (click)=\"onPanelClick($event)\"\n >\n <div class=\"pt-notification-header\">\n <div class=\"pt-notification-header-left\">\n <div class=\"pt-notification-header-title\">\n {{ getTitle() }}\n </div>\n\n @if (showHeaderCount()) {\n <span class=\"pt-notification-header-count\">\n {{ getUnreadCount() }}\n </span>\n }\n </div>\n\n @if (showGlobalActions()) {\n <div\n class=\"pt-notification-global-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-global-more-button\"\n aria-label=\"Notification global actions\"\n (click)=\"toggleGlobalActionMenu($event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isGlobalActionMenuOpen) {\n <div\n class=\"pt-notification-global-action-menu\"\n (click)=\"onGlobalActionMenuClick($event)\"\n >\n @for (menuAction of getGlobalActions(); track menuAction.id) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onGlobalActionClick(menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n\n @if (hasNotifications()) {\n <div class=\"pt-notification-list\" [ngStyle]=\"getListStyles()\">\n @for (notification of getNotifications(); track notification.id) {\n <div\n [class]=\"getNotificationClasses(notification)\"\n (click)=\"onNotificationClick(notification, $event)\"\n >\n <div class=\"pt-notification-item-icon-wrapper\">\n <div class=\"pt-notification-item-icon\">\n <i\n [class]=\"getNotificationIcon(notification)\"\n [ngStyle]=\"getNotificationIconStyles(notification)\"\n ></i>\n </div>\n </div>\n\n <div class=\"pt-notification-item-content\">\n <div class=\"pt-notification-item-text\">\n {{ notification.text }}\n </div>\n\n @if (hasMetadata(notification)) {\n <div class=\"pt-notification-item-metadata\">\n @if (notification.date) {\n <span class=\"pt-notification-item-date\">\n <i class=\"pi pi-clock\"></i>\n {{ getDateText(notification) }}\n </span>\n }\n\n @if (notification.sender) {\n <span class=\"pt-notification-item-sender\">\n <i class=\"pi pi-user\"></i>\n {{ notification.sender }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (hasActions(notification)) {\n <div\n class=\"pt-notification-item-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-more-button\"\n aria-label=\"Notification actions\"\n [disabled]=\"notification.disabled\"\n (click)=\"toggleActionMenu(notification, $event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isActionMenuOpen(notification)) {\n <div\n class=\"pt-notification-action-menu\"\n (click)=\"onActionMenuClick($event)\"\n >\n @for (\n menuAction of getActions(notification);\n track menuAction.id\n ) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"\n onActionClick(notification, menuAction, $event)\n \"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (!notification.read) {\n <span class=\"pt-notification-unread-indicator\"></span>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"pt-notification-empty\">\n <i class=\"pi pi-bell-slash\"></i>\n\n <span>\n {{ getEmptyText() }}\n </span>\n </div>\n }\n\n @if (showViewAll()) {\n <div class=\"pt-notification-footer\">\n <button\n type=\"button\"\n class=\"pt-notification-view-all\"\n (click)=\"onViewAllClick($event)\"\n >\n <span>\n {{ getViewAllText() }}\n </span>\n\n <i [class]=\"getViewAllIcon()\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}.pt-notification{position:relative;display:inline-flex;align-items:center;justify-content:center}.pt-notification-trigger{position:relative;width:40px;height:40px;min-width:40px;padding:0;border:none;border-radius:999px;background:transparent;color:var(--pt-notification-bell-color, #475569);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .2s ease,color .2s ease}.pt-notification-trigger:hover{background:var(--pt-notification-bell-hover-bg, #f1f5f9);color:var(--pt-notification-bell-hover-color, #0f172a)}.pt-notification-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-bell-focus-shadow, rgba(37, 99, 235, .16))}.pt-notification-trigger>i{font-size:1.25rem;line-height:1}.pt-notification-badge{position:absolute;top:-1px;right:-3px;min-width:18px;height:18px;padding:0 4px;border:2px solid var(--pt-notification-badge-border, #ffffff);border-radius:999px;background:var(--pt-notification-badge-bg, #dc2626);color:var(--pt-notification-badge-text, #ffffff);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:.65rem;font-weight:800;line-height:1;pointer-events:none}.pt-notification-panel{position:absolute;top:calc(100% + 10px);right:0;min-width:320px;max-width:min(420px,calc(100vw - 24px));background:var(--pt-notification-panel-bg, #ffffff);color:var(--pt-notification-panel-text, #334155);border:1px solid var(--pt-notification-panel-border, #e2e8f0);border-radius:14px;box-shadow:var( --pt-notification-panel-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;overflow:visible;z-index:10000}.pt-notification-header{min-height:52px;padding:0 16px;border-bottom:1px solid var(--pt-notification-header-border, #e2e8f0);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.pt-notification-header-title{min-width:0;color:var(--pt-notification-header-title, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-notification-header-count{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--pt-notification-header-count-bg, #eff6ff);color:var(--pt-notification-header-count-text, #2563eb);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;font-size:.75rem;font-weight:800;line-height:1}.pt-notification-list{overflow-y:auto;overflow-x:visible;overscroll-behavior:contain}.pt-notification-item{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 34px;align-items:flex-start;gap:10px;min-height:76px;padding:13px 14px 13px 12px;border-bottom:1px solid var(--pt-notification-item-border, #f1f5f9);background:var(--pt-notification-item-bg, #ffffff);cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-notification-item:last-child{border-bottom:none}.pt-notification-item:hover{background:var(--pt-notification-item-hover-bg, #f8fafc)}.pt-notification-item.unread{background:var(--pt-notification-item-unread-bg, #f8fbff)}.pt-notification-item.unread:hover{background:var(--pt-notification-item-unread-hover-bg, #f1f7ff)}.pt-notification-item.disabled{opacity:.55;cursor:not-allowed}.pt-notification-item-icon-wrapper{display:flex;justify-content:center;align-items:flex-start}.pt-notification-item-icon{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-notification-item-icon-bg, #eff6ff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-item-icon i{font-size:1rem;line-height:1}.pt-notification-item-content{min-width:0;padding-top:1px}.pt-notification-item-text{color:var(--pt-notification-item-text, #1e293b);font-size:.86rem;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.pt-notification-item.unread .pt-notification-item-text{color:var(--pt-notification-item-unread-text, #0f172a);font-weight:700}.pt-notification-item-metadata{margin-top:6px;display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;color:var(--pt-notification-metadata-text, #94a3b8);font-size:.71rem;font-weight:500;line-height:1.3}.pt-notification-item-date,.pt-notification-item-sender{min-width:0;display:inline-flex;align-items:center;gap:4px}.pt-notification-item-date i,.pt-notification-item-sender i{flex:0 0 auto;font-size:.68rem}.pt-notification-item-sender{max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pt-notification-item-actions{position:relative;display:flex;justify-content:flex-end;align-items:flex-start}.pt-notification-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-more-color, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-more-button:hover{background:var(--pt-notification-more-hover-bg, #e2e8f0);color:var(--pt-notification-more-hover-color, #0f172a)}.pt-notification-more-button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-more-button:disabled{opacity:.5;cursor:not-allowed}.pt-notification-more-button i{font-size:.95rem;line-height:1}.pt-notification-action-menu{position:absolute;top:34px;right:0;width:200px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10002}.pt-notification-action-menu-item{width:100%;min-height:36px;padding:7px 9px;border:none;border-radius:7px;background:transparent;color:var(--pt-notification-action-text, #334155);display:flex;align-items:center;gap:8px;box-sizing:border-box;text-align:left;cursor:pointer;font-size:.78rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-notification-action-menu-item:hover{background:var(--pt-notification-action-hover-bg, #f1f5f9);color:var(--pt-notification-action-hover-text, #0f172a)}.pt-notification-action-menu-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-action-menu-item.danger{color:var(--pt-notification-action-danger-text, #dc2626)}.pt-notification-action-menu-item.danger:hover{background:var(--pt-notification-action-danger-hover-bg, #fef2f2);color:var(--pt-notification-action-danger-hover-text, #b91c1c)}.pt-notification-action-menu-item.disabled,.pt-notification-action-menu-item:disabled{opacity:.5;cursor:not-allowed}.pt-notification-action-menu-item i{width:16px;flex:0 0 16px;font-size:.82rem;text-align:center}.pt-notification-action-menu-item span{min-width:0;flex:1 1 auto}.pt-notification-unread-indicator{position:absolute;top:50%;right:4px;width:6px;height:6px;border-radius:999px;background:var(--pt-notification-unread-indicator, #2563eb);transform:translateY(-50%);pointer-events:none}.pt-notification-empty{min-height:160px;padding:25px;color:var(--pt-notification-empty-text, #94a3b8);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;text-align:center}.pt-notification-empty i{font-size:1.8rem}.pt-notification-empty span{font-size:.84rem;font-weight:600}@media(max-width:520px){.pt-notification-panel{position:fixed;top:60px;right:8px;left:8px;width:auto!important;min-width:0;max-width:none}.pt-notification-item{grid-template-columns:38px minmax(0,1fr) 32px;gap:8px;padding-right:13px}.pt-notification-item-icon{width:36px;height:36px;min-width:36px}.pt-notification-item-metadata{flex-direction:column;align-items:flex-start;gap:4px}.pt-notification-item-sender{max-width:190px}.pt-notification-action-menu{right:0;width:190px}}.pt-notification-header-left{display:flex;align-items:center;gap:8px;min-width:0}.pt-notification-global-actions{position:relative;display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}.pt-notification-global-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-global-more-color, #64748b);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-global-more-button:hover{background:var(--pt-notification-global-more-hover-bg, #f1f5f9);color:var(--pt-notification-global-more-hover-color, #0f172a)}.pt-notification-global-more-button i{font-size:.95rem}.pt-notification-global-action-menu{position:absolute;top:36px;right:0;width:210px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10003}.pt-notification-footer{min-height:50px;padding:7px;border-top:1px solid var(--pt-notification-footer-border, #e2e8f0);background:var(--pt-notification-footer-bg, #ffffff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-view-all{width:100%;min-height:36px;padding:7px 12px;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-view-all-text, #2563eb);display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-size:.82rem;font-weight:700;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-view-all:hover{background:var(--pt-notification-view-all-hover-bg, #eff6ff);color:var(--pt-notification-view-all-hover-text, #1d4ed8)}.pt-notification-view-all i{font-size:.75rem}\n"] }]
6524
+ args: [{ selector: 'pt-notification', standalone: false, template: "@if (isVisible()) {\n <div class=\"pt-notification\">\n <button\n type=\"button\"\n class=\"pt-notification-trigger\"\n [attr.aria-expanded]=\"isOpen\"\n aria-label=\"Notifications\"\n (click)=\"togglePanel($event)\"\n >\n <i [class]=\"getBellIcon()\"></i>\n\n @if (showBadge()) {\n <span class=\"pt-notification-badge\">\n {{ getBadgeText() }}\n </span>\n }\n </button>\n\n @if (isOpen) {\n <div\n class=\"pt-notification-panel\"\n [ngStyle]=\"getPanelStyles()\"\n (click)=\"onPanelClick($event)\"\n >\n <div class=\"pt-notification-header\">\n <div class=\"pt-notification-header-left\">\n <div class=\"pt-notification-header-title\">\n {{ getTitle() }}\n </div>\n\n @if (showHeaderCount()) {\n <span class=\"pt-notification-header-count\">\n {{ getUnreadCount() }}\n </span>\n }\n </div>\n\n @if (showGlobalActions()) {\n <div\n class=\"pt-notification-global-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-global-more-button\"\n aria-label=\"Notification global actions\"\n (click)=\"toggleGlobalActionMenu($event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isGlobalActionMenuOpen) {\n <div\n class=\"pt-notification-global-action-menu\"\n (click)=\"onGlobalActionMenuClick($event)\"\n >\n @for (menuAction of getGlobalActions(); track menuAction.id) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onGlobalActionClick(menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n\n @if (hasNotifications()) {\n <div\n class=\"pt-notification-list\"\n [ngStyle]=\"getListStyles()\"\n (scroll)=\"onListScroll($event)\"\n >\n @for (notification of getNotifications(); track notification.id) {\n <div\n [class]=\"getNotificationClasses(notification)\"\n (click)=\"onNotificationClick(notification, $event)\"\n >\n <div class=\"pt-notification-item-icon-wrapper\">\n <div class=\"pt-notification-item-icon\">\n <i\n [class]=\"getNotificationIcon(notification)\"\n [ngStyle]=\"getNotificationIconStyles(notification)\"\n ></i>\n </div>\n </div>\n\n <div class=\"pt-notification-item-content\">\n <div class=\"pt-notification-item-text\">\n {{ notification.text }}\n </div>\n\n @if (hasMetadata(notification)) {\n <div class=\"pt-notification-item-metadata\">\n @if (notification.date) {\n <span class=\"pt-notification-item-date\">\n <i class=\"pi pi-clock\"></i>\n\n {{ getDateText(notification) }}\n </span>\n }\n\n @if (notification.sender) {\n <span class=\"pt-notification-item-sender\">\n <i class=\"pi pi-user\"></i>\n\n {{ notification.sender }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (hasActions(notification)) {\n <div\n class=\"pt-notification-item-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notification-more-button\"\n aria-label=\"Notification actions\"\n [disabled]=\"notification.disabled\"\n (click)=\"toggleActionMenu(notification, $event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isActionMenuOpen(notification)) {\n <div\n class=\"pt-notification-action-menu\"\n (click)=\"onActionMenuClick($event)\"\n >\n @for (\n menuAction of getActions(notification);\n track menuAction.id\n ) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"\n onActionClick(notification, menuAction, $event)\n \"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (notification.read !== true) {\n <span class=\"pt-notification-unread-indicator\"></span>\n }\n </div>\n }\n\n @if (showInfiniteScrollLoader()) {\n <div class=\"pt-notification-load-more\">\n <i class=\"pi pi-spin pi-spinner\"></i>\n\n <span>\n {{ getLoadingText() }}\n </span>\n </div>\n }\n </div>\n } @else {\n <div class=\"pt-notification-empty\">\n @if (loading) {\n <i class=\"pi pi-spin pi-spinner\"></i>\n\n <span>\n {{ getLoadingText() }}\n </span>\n } @else {\n <i class=\"pi pi-bell-slash\"></i>\n\n <span>\n {{ getEmptyText() }}\n </span>\n }\n </div>\n }\n\n @if (showViewAll()) {\n <div class=\"pt-notification-footer\">\n <button\n type=\"button\"\n class=\"pt-notification-view-all\"\n (click)=\"onViewAllClick($event)\"\n >\n <span>\n {{ getViewAllText() }}\n </span>\n\n <i [class]=\"getViewAllIcon()\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center}.pt-notification{position:relative;display:inline-flex;align-items:center;justify-content:center}.pt-notification-trigger{position:relative;width:40px;height:40px;min-width:40px;padding:0;border:none;border-radius:999px;background:transparent;color:var(--pt-notification-bell-color, #475569);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .2s ease,color .2s ease}.pt-notification-trigger:hover{background:var(--pt-notification-bell-hover-bg, #f1f5f9);color:var(--pt-notification-bell-hover-color, #0f172a)}.pt-notification-trigger:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-bell-focus-shadow, rgba(37, 99, 235, .16))}.pt-notification-trigger>i{font-size:1.25rem;line-height:1}.pt-notification-badge{position:absolute;top:-1px;right:-3px;min-width:18px;height:18px;padding:0 4px;border:2px solid var(--pt-notification-badge-border, #ffffff);border-radius:999px;background:var(--pt-notification-badge-bg, #dc2626);color:var(--pt-notification-badge-text, #ffffff);display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;font-size:.65rem;font-weight:800;line-height:1;pointer-events:none}.pt-notification-panel{position:absolute;top:calc(100% + 10px);right:0;min-width:320px;max-width:min(420px,calc(100vw - 24px));background:var(--pt-notification-panel-bg, #ffffff);color:var(--pt-notification-panel-text, #334155);border:1px solid var(--pt-notification-panel-border, #e2e8f0);border-radius:14px;box-shadow:var( --pt-notification-panel-shadow, 0 18px 45px rgba(15, 23, 42, .16) );box-sizing:border-box;overflow:visible;z-index:10000}.pt-notification-header{min-height:52px;padding:0 16px;border-bottom:1px solid var(--pt-notification-header-border, #e2e8f0);display:flex;align-items:center;justify-content:space-between;gap:12px;box-sizing:border-box}.pt-notification-header-title{min-width:0;color:var(--pt-notification-header-title, #0f172a);font-size:.95rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-notification-header-count{min-width:24px;height:24px;padding:0 7px;border-radius:999px;background:var(--pt-notification-header-count-bg, #eff6ff);color:var(--pt-notification-header-count-text, #2563eb);display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;box-sizing:border-box;font-size:.75rem;font-weight:800;line-height:1}.pt-notification-list{overflow-y:auto;overflow-x:visible;overscroll-behavior:contain}.pt-notification-item{position:relative;display:grid;grid-template-columns:42px minmax(0,1fr) 34px;align-items:flex-start;gap:10px;min-height:76px;padding:13px 14px 13px 12px;border-bottom:1px solid var(--pt-notification-item-border, #f1f5f9);background:var(--pt-notification-item-bg, #ffffff);cursor:pointer;box-sizing:border-box;transition:background-color .15s ease}.pt-notification-item:last-child{border-bottom:none}.pt-notification-item:hover{background:var(--pt-notification-item-hover-bg, #f8fafc)}.pt-notification-item.unread{background:var(--pt-notification-item-unread-bg, #f8fbff)}.pt-notification-item.unread:hover{background:var(--pt-notification-item-unread-hover-bg, #f1f7ff)}.pt-notification-item.disabled{opacity:.55;cursor:not-allowed}.pt-notification-item-icon-wrapper{display:flex;justify-content:center;align-items:flex-start}.pt-notification-item-icon{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-notification-item-icon-bg, #eff6ff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-item-icon i{font-size:1rem;line-height:1}.pt-notification-item-content{min-width:0;padding-top:1px}.pt-notification-item-text{color:var(--pt-notification-item-text, #1e293b);font-size:.86rem;font-weight:600;line-height:1.4;overflow-wrap:anywhere}.pt-notification-item.unread .pt-notification-item-text{color:var(--pt-notification-item-unread-text, #0f172a);font-weight:700}.pt-notification-item-metadata{margin-top:6px;display:flex;flex-wrap:wrap;align-items:center;gap:5px 12px;color:var(--pt-notification-metadata-text, #94a3b8);font-size:.71rem;font-weight:500;line-height:1.3}.pt-notification-item-date,.pt-notification-item-sender{min-width:0;display:inline-flex;align-items:center;gap:4px}.pt-notification-item-date i,.pt-notification-item-sender i{flex:0 0 auto;font-size:.68rem}.pt-notification-item-sender{max-width:160px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pt-notification-item-actions{position:relative;display:flex;justify-content:flex-end;align-items:flex-start}.pt-notification-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-more-color, #64748b);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-more-button:hover{background:var(--pt-notification-more-hover-bg, #e2e8f0);color:var(--pt-notification-more-hover-color, #0f172a)}.pt-notification-more-button:focus-visible{outline:none;box-shadow:0 0 0 3px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-more-button:disabled{opacity:.5;cursor:not-allowed}.pt-notification-more-button i{font-size:.95rem;line-height:1}.pt-notification-action-menu{position:absolute;top:34px;right:0;width:200px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10002}.pt-notification-action-menu-item{width:100%;min-height:36px;padding:7px 9px;border:none;border-radius:7px;background:transparent;color:var(--pt-notification-action-text, #334155);display:flex;align-items:center;gap:8px;box-sizing:border-box;text-align:left;cursor:pointer;font-size:.78rem;font-weight:600;transition:background-color .15s ease,color .15s ease}.pt-notification-action-menu-item:hover{background:var(--pt-notification-action-hover-bg, #f1f5f9);color:var(--pt-notification-action-hover-text, #0f172a)}.pt-notification-action-menu-item:focus-visible{outline:none;box-shadow:0 0 0 2px var(--pt-notification-action-focus-shadow, rgba(37, 99, 235, .14))}.pt-notification-action-menu-item.danger{color:var(--pt-notification-action-danger-text, #dc2626)}.pt-notification-action-menu-item.danger:hover{background:var(--pt-notification-action-danger-hover-bg, #fef2f2);color:var(--pt-notification-action-danger-hover-text, #b91c1c)}.pt-notification-action-menu-item.disabled,.pt-notification-action-menu-item:disabled{opacity:.5;cursor:not-allowed}.pt-notification-action-menu-item i{width:16px;flex:0 0 16px;font-size:.82rem;text-align:center}.pt-notification-action-menu-item span{min-width:0;flex:1 1 auto}.pt-notification-unread-indicator{position:absolute;top:50%;right:4px;width:6px;height:6px;border-radius:999px;background:var(--pt-notification-unread-indicator, #2563eb);transform:translateY(-50%);pointer-events:none}.pt-notification-empty{min-height:160px;padding:25px;color:var(--pt-notification-empty-text, #94a3b8);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-sizing:border-box;text-align:center}.pt-notification-empty i{font-size:1.8rem}.pt-notification-empty span{font-size:.84rem;font-weight:600}@media(max-width:520px){.pt-notification-panel{position:fixed;top:60px;right:8px;left:8px;width:auto!important;min-width:0;max-width:none}.pt-notification-item{grid-template-columns:38px minmax(0,1fr) 32px;gap:8px;padding-right:13px}.pt-notification-item-icon{width:36px;height:36px;min-width:36px}.pt-notification-item-metadata{flex-direction:column;align-items:flex-start;gap:4px}.pt-notification-item-sender{max-width:190px}.pt-notification-action-menu{right:0;width:190px}}.pt-notification-header-left{display:flex;align-items:center;gap:8px;min-width:0}.pt-notification-global-actions{position:relative;display:flex;align-items:center;justify-content:flex-end;flex:0 0 auto}.pt-notification-global-more-button{width:32px;height:32px;padding:0;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-global-more-color, #64748b);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-global-more-button:hover{background:var(--pt-notification-global-more-hover-bg, #f1f5f9);color:var(--pt-notification-global-more-hover-color, #0f172a)}.pt-notification-global-more-button i{font-size:.95rem}.pt-notification-global-action-menu{position:absolute;top:36px;right:0;width:210px;padding:5px;background:var(--pt-notification-action-menu-bg, #ffffff);border:1px solid var(--pt-notification-action-menu-border, #e2e8f0);border-radius:10px;box-shadow:var( --pt-notification-action-menu-shadow, 0 12px 30px rgba(15, 23, 42, .16) );box-sizing:border-box;z-index:10003}.pt-notification-footer{min-height:50px;padding:7px;border-top:1px solid var(--pt-notification-footer-border, #e2e8f0);background:var(--pt-notification-footer-bg, #ffffff);display:flex;align-items:center;justify-content:center;box-sizing:border-box}.pt-notification-view-all{width:100%;min-height:36px;padding:7px 12px;border:none;border-radius:8px;background:transparent;color:var(--pt-notification-view-all-text, #2563eb);display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;font-size:.82rem;font-weight:700;box-sizing:border-box;transition:background-color .15s ease,color .15s ease}.pt-notification-view-all:hover{background:var(--pt-notification-view-all-hover-bg, #eff6ff);color:var(--pt-notification-view-all-hover-text, #1d4ed8)}.pt-notification-view-all i{font-size:.75rem}\n"] }]
6426
6525
  }], propDecorators: { notifications: [{
6427
6526
  type: Input
6428
6527
  }], config: [{
6429
6528
  type: Input
6529
+ }], totalRecords: [{
6530
+ type: Input
6531
+ }], totalUnreadRecords: [{
6532
+ type: Input
6533
+ }], page: [{
6534
+ type: Input
6535
+ }], rows: [{
6536
+ type: Input
6537
+ }], loading: [{
6538
+ type: Input
6430
6539
  }], notificationClick: [{
6431
6540
  type: Output
6432
6541
  }], action: [{
@@ -6439,6 +6548,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
6439
6548
  type: Output
6440
6549
  }], panelClosed: [{
6441
6550
  type: Output
6551
+ }], loadMore: [{
6552
+ type: Output
6442
6553
  }], onDocumentClick: [{
6443
6554
  type: HostListener,
6444
6555
  args: ['document:click']
@@ -6449,6 +6560,10 @@ class PTNavbarMenuComponent {
6449
6560
  this.navBarMenuConfig = {};
6450
6561
  this.notifications = [];
6451
6562
  this.notificationConfig = {};
6563
+ this.notificationTotalRecords = 0;
6564
+ this.notificationPage = 0;
6565
+ this.notificationRows = 10;
6566
+ this.notificationLoading = false;
6452
6567
  this.toggleSidebar = new EventEmitter();
6453
6568
  this.notificationAction = new EventEmitter();
6454
6569
  this.notificationClick = new EventEmitter();
@@ -6456,6 +6571,7 @@ class PTNavbarMenuComponent {
6456
6571
  this.notificationPanelClosed = new EventEmitter();
6457
6572
  this.notificationGlobalAction = new EventEmitter();
6458
6573
  this.notificationViewAll = new EventEmitter();
6574
+ this.notificationLoadMore = new EventEmitter();
6459
6575
  this.destroy$ = new Subject();
6460
6576
  this.dateTimeText = '';
6461
6577
  this.isUserMenuOpen = false;
@@ -6536,6 +6652,9 @@ class PTNavbarMenuComponent {
6536
6652
  onNotificationPanelClosed() {
6537
6653
  this.notificationPanelClosed.emit();
6538
6654
  }
6655
+ onNotificationLoadMore(event) {
6656
+ this.notificationLoadMore.emit(event);
6657
+ }
6539
6658
  hasDateTime() {
6540
6659
  return !!this.navBarMenuConfig.dateTime;
6541
6660
  }
@@ -6877,11 +6996,11 @@ class PTNavbarMenuComponent {
6877
6996
  };
6878
6997
  }
6879
6998
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNavbarMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
6880
- 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" }, outputs: { toggleSidebar: "toggleSidebar", notificationAction: "notificationAction", notificationClick: "notificationClick", notificationPanelOpened: "notificationPanelOpened", notificationPanelClosed: "notificationPanelClosed", notificationGlobalAction: "notificationGlobalAction", notificationViewAll: "notificationViewAll" }, 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=\"navbar-actions\">\n <div class=\"navbar-right\"></div>\n\n <pt-notification\n [notifications]=\"notifications\"\n [config]=\"notificationConfig\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n ></pt-notification>\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{display:flex;align-items:center;justify-content:space-between;padding-right:10px;padding-left:10px;border-bottom:1px solid var(--pt-navbar-border, #ddd);background-color:var(--pt-navbar-bg, #fff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:12px;min-width:0;width:100%;box-sizing:border-box}.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;text-decoration:none;color:inherit;min-width:0}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-title{color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-middle{flex:1 1 auto;display:flex;align-items:center;min-width:0;padding:0 12px}.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;flex:0 0 auto;white-space:nowrap;max-width:100%}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-input{height:32px;padding:0 8px;border:1px solid var(--pt-navbar-input-border, rgba(0, 0, 0, .18));border-radius:6px;background:var(--pt-navbar-input-bg, #fff);font-size:12px;color:var(--pt-navbar-input-text, #333);outline:none}.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 .navbar-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto;min-width:0}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center;gap:10px;flex:0 0 auto}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:var(--pt-navbar-link, #333);text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:var(--pt-navbar-link-hover, #000)}.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:var(--pt-navbar-toggle-color, #333)}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f1f1)}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:.65rem;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:170px;color:var(--pt-navbar-user-profile-text, #334155);font-size:.82rem;font-weight:700;background:var(--pt-navbar-user-profile-bg, #eff6ff);border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;padding:.28rem .65rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-trigger{border:none;background:transparent;padding:0;cursor:pointer;display:flex;align-items:center}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);display:flex;align-items:center;justify-content:center;font-size:.92rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;line-height:1;box-sizing:border-box}.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;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );z-index:9999;padding:.75rem;box-sizing:border-box}.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}.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;background:var(--pt-navbar-user-menu-separator, #e5e7eb);margin:.4rem 0}.pt-nav-bar-menu .navbar-user-menu-item{width:100%;min-height:36px;border:none;background:transparent;border-radius:9px;color:var(--pt-navbar-user-menu-item-text, #334155);display:flex;align-items:center;gap:.55rem;padding:.5rem .55rem;font-size:.86rem;font-weight:600;cursor:pointer;text-align:left;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-menu-item:hover{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{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}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px}.pt-nav-bar-menu .navbar-left{width:100%;justify-content:space-between}.pt-nav-bar-menu .navbar-middle{width:100%;padding:0;justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-right .navbar-datetime,.pt-nav-bar-menu .navbar-middle.dt-pos-center .navbar-datetime{padding-left:0;border-left:none}.pt-nav-bar-menu .navbar-actions{width:100%;justify-content:flex-end}.pt-nav-bar-menu .navbar-user-menu{right:0}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:520px){.pt-nav-bar-menu .navbar-datetime .dt-value,.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .navbar-user-menu{width:240px}.pt-nav-bar-menu .navbar-actions{gap:8px}}\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"], outputs: ["notificationClick", "action", "globalAction", "viewAll", "panelOpened", "panelClosed"] }] }); }
6999
+ 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" }, outputs: { toggleSidebar: "toggleSidebar", notificationAction: "notificationAction", notificationClick: "notificationClick", notificationPanelOpened: "notificationPanelOpened", notificationPanelClosed: "notificationPanelClosed", notificationGlobalAction: "notificationGlobalAction", notificationViewAll: "notificationViewAll", notificationLoadMore: "notificationLoadMore" }, 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=\"navbar-actions\">\n <div class=\"navbar-right\"></div>\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 (loadMore)=\"onNotificationLoadMore($event)\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n ></pt-notification>\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{display:flex;align-items:center;justify-content:space-between;padding-right:10px;padding-left:10px;border-bottom:1px solid var(--pt-navbar-border, #ddd);background-color:var(--pt-navbar-bg, #fff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:12px;min-width:0;width:100%;box-sizing:border-box}.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;text-decoration:none;color:inherit;min-width:0}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-title{color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-middle{flex:1 1 auto;display:flex;align-items:center;min-width:0;padding:0 12px}.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;flex:0 0 auto;white-space:nowrap;max-width:100%}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-input{height:32px;padding:0 8px;border:1px solid var(--pt-navbar-input-border, rgba(0, 0, 0, .18));border-radius:6px;background:var(--pt-navbar-input-bg, #fff);font-size:12px;color:var(--pt-navbar-input-text, #333);outline:none}.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 .navbar-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto;min-width:0}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center;gap:10px;flex:0 0 auto}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:var(--pt-navbar-link, #333);text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:var(--pt-navbar-link-hover, #000)}.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:var(--pt-navbar-toggle-color, #333)}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f1f1)}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:.65rem;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:170px;color:var(--pt-navbar-user-profile-text, #334155);font-size:.82rem;font-weight:700;background:var(--pt-navbar-user-profile-bg, #eff6ff);border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;padding:.28rem .65rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-trigger{border:none;background:transparent;padding:0;cursor:pointer;display:flex;align-items:center}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);display:flex;align-items:center;justify-content:center;font-size:.92rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;line-height:1;box-sizing:border-box}.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;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );z-index:9999;padding:.75rem;box-sizing:border-box}.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}.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;background:var(--pt-navbar-user-menu-separator, #e5e7eb);margin:.4rem 0}.pt-nav-bar-menu .navbar-user-menu-item{width:100%;min-height:36px;border:none;background:transparent;border-radius:9px;color:var(--pt-navbar-user-menu-item-text, #334155);display:flex;align-items:center;gap:.55rem;padding:.5rem .55rem;font-size:.86rem;font-weight:600;cursor:pointer;text-align:left;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-menu-item:hover{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{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}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px}.pt-nav-bar-menu .navbar-left{width:100%;justify-content:space-between}.pt-nav-bar-menu .navbar-middle{width:100%;padding:0;justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-right .navbar-datetime,.pt-nav-bar-menu .navbar-middle.dt-pos-center .navbar-datetime{padding-left:0;border-left:none}.pt-nav-bar-menu .navbar-actions{width:100%;justify-content:flex-end}.pt-nav-bar-menu .navbar-user-menu{right:0}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:520px){.pt-nav-bar-menu .navbar-datetime .dt-value,.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .navbar-user-menu{width:240px}.pt-nav-bar-menu .navbar-actions{gap:8px}}\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"] }] }); }
6881
7000
  }
6882
7001
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNavbarMenuComponent, decorators: [{
6883
7002
  type: Component,
6884
- 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=\"navbar-actions\">\n <div class=\"navbar-right\"></div>\n\n <pt-notification\n [notifications]=\"notifications\"\n [config]=\"notificationConfig\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n ></pt-notification>\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{display:flex;align-items:center;justify-content:space-between;padding-right:10px;padding-left:10px;border-bottom:1px solid var(--pt-navbar-border, #ddd);background-color:var(--pt-navbar-bg, #fff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:12px;min-width:0;width:100%;box-sizing:border-box}.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;text-decoration:none;color:inherit;min-width:0}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-title{color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-middle{flex:1 1 auto;display:flex;align-items:center;min-width:0;padding:0 12px}.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;flex:0 0 auto;white-space:nowrap;max-width:100%}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-input{height:32px;padding:0 8px;border:1px solid var(--pt-navbar-input-border, rgba(0, 0, 0, .18));border-radius:6px;background:var(--pt-navbar-input-bg, #fff);font-size:12px;color:var(--pt-navbar-input-text, #333);outline:none}.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 .navbar-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto;min-width:0}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center;gap:10px;flex:0 0 auto}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:var(--pt-navbar-link, #333);text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:var(--pt-navbar-link-hover, #000)}.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:var(--pt-navbar-toggle-color, #333)}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f1f1)}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:.65rem;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:170px;color:var(--pt-navbar-user-profile-text, #334155);font-size:.82rem;font-weight:700;background:var(--pt-navbar-user-profile-bg, #eff6ff);border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;padding:.28rem .65rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-trigger{border:none;background:transparent;padding:0;cursor:pointer;display:flex;align-items:center}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);display:flex;align-items:center;justify-content:center;font-size:.92rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;line-height:1;box-sizing:border-box}.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;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );z-index:9999;padding:.75rem;box-sizing:border-box}.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}.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;background:var(--pt-navbar-user-menu-separator, #e5e7eb);margin:.4rem 0}.pt-nav-bar-menu .navbar-user-menu-item{width:100%;min-height:36px;border:none;background:transparent;border-radius:9px;color:var(--pt-navbar-user-menu-item-text, #334155);display:flex;align-items:center;gap:.55rem;padding:.5rem .55rem;font-size:.86rem;font-weight:600;cursor:pointer;text-align:left;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-menu-item:hover{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{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}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px}.pt-nav-bar-menu .navbar-left{width:100%;justify-content:space-between}.pt-nav-bar-menu .navbar-middle{width:100%;padding:0;justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-right .navbar-datetime,.pt-nav-bar-menu .navbar-middle.dt-pos-center .navbar-datetime{padding-left:0;border-left:none}.pt-nav-bar-menu .navbar-actions{width:100%;justify-content:flex-end}.pt-nav-bar-menu .navbar-user-menu{right:0}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:520px){.pt-nav-bar-menu .navbar-datetime .dt-value,.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .navbar-user-menu{width:240px}.pt-nav-bar-menu .navbar-actions{gap:8px}}\n"] }]
7003
+ 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=\"navbar-actions\">\n <div class=\"navbar-right\"></div>\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 (loadMore)=\"onNotificationLoadMore($event)\"\n (notificationClick)=\"onNotificationClick($event)\"\n (action)=\"onNotificationAction($event)\"\n (globalAction)=\"onNotificationGlobalAction($event)\"\n (viewAll)=\"onNotificationViewAll()\"\n (panelOpened)=\"onNotificationPanelOpened()\"\n (panelClosed)=\"onNotificationPanelClosed()\"\n ></pt-notification>\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{display:flex;align-items:center;justify-content:space-between;padding-right:10px;padding-left:10px;border-bottom:1px solid var(--pt-navbar-border, #ddd);background-color:var(--pt-navbar-bg, #fff);color:var(--pt-navbar-text, #1f2937);background-size:cover;background-position:center;gap:12px;min-width:0;width:100%;box-sizing:border-box}.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;text-decoration:none;color:inherit;min-width:0}.pt-nav-bar-menu .navbar-logo{margin-left:10px;margin-right:20px}.pt-nav-bar-menu .navbar-title{color:var(--pt-navbar-title, inherit);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-middle{flex:1 1 auto;display:flex;align-items:center;min-width:0;padding:0 12px}.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;flex:0 0 auto;white-space:nowrap;max-width:100%}.pt-nav-bar-menu .navbar-datetime .dt-value{color:var(--pt-navbar-datetime-text, inherit);white-space:nowrap}.pt-nav-bar-menu .navbar-datetime .dt-input{height:32px;padding:0 8px;border:1px solid var(--pt-navbar-input-border, rgba(0, 0, 0, .18));border-radius:6px;background:var(--pt-navbar-input-bg, #fff);font-size:12px;color:var(--pt-navbar-input-text, #333);outline:none}.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 .navbar-actions{display:flex;align-items:center;gap:12px;flex:0 0 auto;min-width:0}.pt-nav-bar-menu .navbar-right{display:flex;align-items:center;gap:10px;flex:0 0 auto}.pt-nav-bar-menu .navbar-right a{margin-left:20px;color:var(--pt-navbar-link, #333);text-decoration:none;font-size:20px;cursor:pointer}.pt-nav-bar-menu .navbar-right a:hover{color:var(--pt-navbar-link-hover, #000)}.pt-nav-bar-menu pt-notification{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto}.pt-nav-bar-menu .toggle-btn{margin-left:2rem;cursor:pointer;padding:7px;border-radius:6px;display:inline-flex;align-items:center;justify-content:center}.pt-nav-bar-menu .toggle-btn>.pi.pi-bars{font-size:1.5rem;color:var(--pt-navbar-toggle-color, #333)}.pt-nav-bar-menu .toggle-btn:hover{background-color:var(--pt-navbar-toggle-hover-bg, #f1f1f1)}.pt-nav-bar-menu .navbar-user{position:relative;display:flex;align-items:center;gap:.65rem;flex:0 0 auto}.pt-nav-bar-menu .navbar-user-profile-left{max-width:170px;color:var(--pt-navbar-user-profile-text, #334155);font-size:.82rem;font-weight:700;background:var(--pt-navbar-user-profile-bg, #eff6ff);border:1px solid var(--pt-navbar-user-profile-border, #bfdbfe);border-radius:999px;padding:.28rem .65rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pt-nav-bar-menu .navbar-user-trigger{border:none;background:transparent;padding:0;cursor:pointer;display:flex;align-items:center}.pt-nav-bar-menu .navbar-user-avatar,.pt-nav-bar-menu .navbar-user-menu-avatar{width:38px;height:38px;min-width:38px;border-radius:999px;background:var(--pt-navbar-user-avatar-bg, #eff6ff);color:var(--pt-navbar-user-avatar-text, #2563eb);border:1px solid var(--pt-navbar-user-avatar-border, #bfdbfe);display:flex;align-items:center;justify-content:center;font-size:.92rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;line-height:1;box-sizing:border-box}.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;background:var(--pt-navbar-user-menu-bg, #ffffff);color:var(--pt-navbar-user-menu-text, #334155);border:1px solid var(--pt-navbar-user-menu-border, #e5e7eb);border-radius:14px;box-shadow:var( --pt-navbar-user-menu-shadow, 0 18px 45px rgba(15, 23, 42, .16) );z-index:9999;padding:.75rem;box-sizing:border-box}.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}.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;background:var(--pt-navbar-user-menu-separator, #e5e7eb);margin:.4rem 0}.pt-nav-bar-menu .navbar-user-menu-item{width:100%;min-height:36px;border:none;background:transparent;border-radius:9px;color:var(--pt-navbar-user-menu-item-text, #334155);display:flex;align-items:center;gap:.55rem;padding:.5rem .55rem;font-size:.86rem;font-weight:600;cursor:pointer;text-align:left;box-sizing:border-box}.pt-nav-bar-menu .navbar-user-menu-item:hover{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{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}@media(max-width:900px){.pt-nav-bar-menu{flex-wrap:wrap;row-gap:8px}.pt-nav-bar-menu .navbar-left{width:100%;justify-content:space-between}.pt-nav-bar-menu .navbar-middle{width:100%;padding:0;justify-content:flex-start}.pt-nav-bar-menu .navbar-middle.dt-pos-right .navbar-datetime,.pt-nav-bar-menu .navbar-middle.dt-pos-center .navbar-datetime{padding-left:0;border-left:none}.pt-nav-bar-menu .navbar-actions{width:100%;justify-content:flex-end}.pt-nav-bar-menu .navbar-user-menu{right:0}.pt-nav-bar-menu .navbar-user-profile-left{max-width:130px}}@media(max-width:520px){.pt-nav-bar-menu .navbar-datetime .dt-value,.pt-nav-bar-menu .navbar-user-profile-left{display:none}.pt-nav-bar-menu .navbar-user-menu{width:240px}.pt-nav-bar-menu .navbar-actions{gap:8px}}\n"] }]
6885
7004
  }], propDecorators: { navBarMenuConfig: [{
6886
7005
  type: Input
6887
7006
  }], serverDateTime: [{
@@ -6890,6 +7009,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
6890
7009
  type: Input
6891
7010
  }], notificationConfig: [{
6892
7011
  type: Input
7012
+ }], notificationTotalRecords: [{
7013
+ type: Input
7014
+ }], notificationTotalUnreadRecords: [{
7015
+ type: Input
7016
+ }], notificationPage: [{
7017
+ type: Input
7018
+ }], notificationRows: [{
7019
+ type: Input
7020
+ }], notificationLoading: [{
7021
+ type: Input
6893
7022
  }], toggleSidebar: [{
6894
7023
  type: Output
6895
7024
  }], notificationAction: [{
@@ -6904,6 +7033,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
6904
7033
  type: Output
6905
7034
  }], notificationViewAll: [{
6906
7035
  type: Output
7036
+ }], notificationLoadMore: [{
7037
+ type: Output
6907
7038
  }], closeUserMenu: [{
6908
7039
  type: HostListener,
6909
7040
  args: ['document:click']
@@ -7530,6 +7661,10 @@ class PTPageSkeletonComponent {
7530
7661
  constructor() {
7531
7662
  this.notifications = [];
7532
7663
  this.notificationConfig = {};
7664
+ this.notificationTotalRecords = 0;
7665
+ this.notificationPage = 0;
7666
+ this.notificationRows = 10;
7667
+ this.notificationLoading = false;
7533
7668
  this.toggleSidebar = new EventEmitter();
7534
7669
  this.notificationAction = new EventEmitter();
7535
7670
  this.notificationClick = new EventEmitter();
@@ -7537,6 +7672,7 @@ class PTPageSkeletonComponent {
7537
7672
  this.notificationPanelClosed = new EventEmitter();
7538
7673
  this.notificationGlobalAction = new EventEmitter();
7539
7674
  this.notificationViewAll = new EventEmitter();
7675
+ this.notificationLoadMore = new EventEmitter();
7540
7676
  this.isSidebarVisible = true;
7541
7677
  }
7542
7678
  ngOnInit() {
@@ -7565,6 +7701,9 @@ class PTPageSkeletonComponent {
7565
7701
  onNotificationPanelClosed() {
7566
7702
  this.notificationPanelClosed.emit();
7567
7703
  }
7704
+ onNotificationLoadMore(event) {
7705
+ this.notificationLoadMore.emit(event);
7706
+ }
7568
7707
  initializeBackgroundCardConfig() {
7569
7708
  this.pageSkeletonConfig.backgroundCardConfig = {
7570
7709
  identifier: 'pt-page-skeleton/background',
@@ -7597,11 +7736,11 @@ class PTPageSkeletonComponent {
7597
7736
  };
7598
7737
  }
7599
7738
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTPageSkeletonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7600
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTPageSkeletonComponent, isStandalone: false, selector: "pt-page-skeleton", inputs: { pageSkeletonConfig: "pageSkeletonConfig", serverDateTime: "serverDateTime", notifications: "notifications", notificationConfig: "notificationConfig" }, outputs: { toggleSidebar: "toggleSidebar", notificationAction: "notificationAction", notificationClick: "notificationClick", notificationPanelOpened: "notificationPanelOpened", notificationPanelClosed: "notificationPanelClosed", notificationGlobalAction: "notificationGlobalAction", notificationViewAll: "notificationViewAll" }, ngImport: i0, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n [serverDateTime]=\"serverDateTime\"\n [notifications]=\"notifications\"\n [notificationConfig]=\"notificationConfig\"\n (toggleSidebar)=\"onToggleSidebar()\"\n (notificationClick)=\"onNotificationClick($event)\"\n (notificationAction)=\"onNotificationAction($event)\"\n (notificationGlobalAction)=\"onNotificationGlobalAction($event)\"\n (notificationViewAll)=\"onNotificationViewAll()\"\n (notificationPanelOpened)=\"onNotificationPanelOpened()\"\n (notificationPanelClosed)=\"onNotificationPanelClosed()\"\n ></pt-nav-bar-menu>\n\n <div class=\"main-content\">\n @if (pageSkeletonConfig.sideMenuBarConfig) {\n <pt-side-bar-menu\n class=\"sidebar\"\n [menuConfig]=\"pageSkeletonConfig.sideMenuBarConfig\"\n [ngClass]=\"{ hidden: !isSidebarVisible }\"\n ></pt-side-bar-menu>\n }\n\n <div class=\"content-area\" [ngClass]=\"{ 'full-width': !isSidebarVisible }\">\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n @if (pageSkeletonConfig.breadCrumbConfig) {\n <pt-bread-crumb\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n }\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n </div>\n\n @if (pageSkeletonConfig.footerConfig) {\n <pt-footer\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n }\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px;color:var(--pt-page-skeleton-breadcrumb-text, inherit)}.app-container{display:flex;flex-direction:column;height:100vh;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out;background:var(--pt-page-skeleton-main-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden;background:var(--pt-page-skeleton-content-area-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}.sidebar{transition:all .3s ease-in-out;background:var(--pt-page-skeleton-sidebar-bg, transparent);color:var(--pt-page-skeleton-sidebar-text, inherit)}.content-area.full-width{margin-left:0;width:100%}:host{display:block;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}:host>pt-card{width:100%;min-height:100vh;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area>pt-card{width:100%;height:100%;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-content-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{display:block;width:100%;position:relative;z-index:0;margin-top:0;background:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}:host ::ng-deep .pt-footer .footer-card,:host ::ng-deep .pt-footer pt-card{height:auto!important;overflow:visible!important;background:var(--pt-page-skeleton-footer-bg, transparent)!important;color:var(--pt-page-skeleton-footer-text, inherit)!important}.footer-card{width:100%;background-color:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: ["navBarMenuConfig", "serverDateTime", "notifications", "notificationConfig"], outputs: ["toggleSidebar", "notificationAction", "notificationClick", "notificationPanelOpened", "notificationPanelClosed", "notificationGlobalAction", "notificationViewAll"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "component", type: PTSideBarMenuComponent, selector: "pt-side-bar-menu", inputs: ["menuConfig"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: PTFooterComponent, selector: "pt-footer", inputs: ["footerConfig"] }, { kind: "component", type: PTBreadCrumbComponent, selector: "pt-bread-crumb", inputs: ["breadCrumbConfig"] }] }); }
7739
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTPageSkeletonComponent, isStandalone: false, selector: "pt-page-skeleton", inputs: { pageSkeletonConfig: "pageSkeletonConfig", serverDateTime: "serverDateTime", notifications: "notifications", notificationConfig: "notificationConfig", notificationTotalRecords: "notificationTotalRecords", notificationTotalUnreadRecords: "notificationTotalUnreadRecords", notificationPage: "notificationPage", notificationRows: "notificationRows", notificationLoading: "notificationLoading" }, outputs: { toggleSidebar: "toggleSidebar", notificationAction: "notificationAction", notificationClick: "notificationClick", notificationPanelOpened: "notificationPanelOpened", notificationPanelClosed: "notificationPanelClosed", notificationGlobalAction: "notificationGlobalAction", notificationViewAll: "notificationViewAll", notificationLoadMore: "notificationLoadMore" }, ngImport: i0, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n [serverDateTime]=\"serverDateTime\"\n [notifications]=\"notifications\"\n [notificationConfig]=\"notificationConfig\"\n [notificationTotalRecords]=\"notificationTotalRecords\"\n [notificationTotalUnreadRecords]=\"notificationTotalUnreadRecords\"\n [notificationPage]=\"notificationPage\"\n [notificationRows]=\"notificationRows\"\n [notificationLoading]=\"notificationLoading\"\n (toggleSidebar)=\"onToggleSidebar()\"\n (notificationClick)=\"onNotificationClick($event)\"\n (notificationAction)=\"onNotificationAction($event)\"\n (notificationGlobalAction)=\"onNotificationGlobalAction($event)\"\n (notificationViewAll)=\"onNotificationViewAll()\"\n (notificationLoadMore)=\"onNotificationLoadMore($event)\"\n (notificationPanelOpened)=\"onNotificationPanelOpened()\"\n (notificationPanelClosed)=\"onNotificationPanelClosed()\"\n ></pt-nav-bar-menu>\n\n <div\n class=\"content-area\"\n [ngClass]=\"{\n 'full-width': !isSidebarVisible,\n }\"\n >\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n @if (pageSkeletonConfig.breadCrumbConfig) {\n <pt-bread-crumb\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n }\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n\n @if (pageSkeletonConfig.footerConfig) {\n <pt-footer\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n }\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px;color:var(--pt-page-skeleton-breadcrumb-text, inherit)}.app-container{display:flex;flex-direction:column;height:100vh;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out;background:var(--pt-page-skeleton-main-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden;background:var(--pt-page-skeleton-content-area-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}.sidebar{transition:all .3s ease-in-out;background:var(--pt-page-skeleton-sidebar-bg, transparent);color:var(--pt-page-skeleton-sidebar-text, inherit)}.content-area.full-width{margin-left:0;width:100%}:host{display:block;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}:host>pt-card{width:100%;min-height:100vh;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area>pt-card{width:100%;height:100%;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-content-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{display:block;width:100%;position:relative;z-index:0;margin-top:0;background:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}:host ::ng-deep .pt-footer .footer-card,:host ::ng-deep .pt-footer pt-card{height:auto!important;overflow:visible!important;background:var(--pt-page-skeleton-footer-bg, transparent)!important;color:var(--pt-page-skeleton-footer-text, inherit)!important}.footer-card{width:100%;background-color:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: PTNavbarMenuComponent, selector: "pt-nav-bar-menu", inputs: ["navBarMenuConfig", "serverDateTime", "notifications", "notificationConfig", "notificationTotalRecords", "notificationTotalUnreadRecords", "notificationPage", "notificationRows", "notificationLoading"], outputs: ["toggleSidebar", "notificationAction", "notificationClick", "notificationPanelOpened", "notificationPanelClosed", "notificationGlobalAction", "notificationViewAll", "notificationLoadMore"] }, { kind: "component", type: PTCardComponent, selector: "pt-card", inputs: ["config"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: PTFooterComponent, selector: "pt-footer", inputs: ["footerConfig"] }, { kind: "component", type: PTBreadCrumbComponent, selector: "pt-bread-crumb", inputs: ["breadCrumbConfig"] }] }); }
7601
7740
  }
7602
7741
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTPageSkeletonComponent, decorators: [{
7603
7742
  type: Component,
7604
- args: [{ selector: 'pt-page-skeleton', standalone: false, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n [serverDateTime]=\"serverDateTime\"\n [notifications]=\"notifications\"\n [notificationConfig]=\"notificationConfig\"\n (toggleSidebar)=\"onToggleSidebar()\"\n (notificationClick)=\"onNotificationClick($event)\"\n (notificationAction)=\"onNotificationAction($event)\"\n (notificationGlobalAction)=\"onNotificationGlobalAction($event)\"\n (notificationViewAll)=\"onNotificationViewAll()\"\n (notificationPanelOpened)=\"onNotificationPanelOpened()\"\n (notificationPanelClosed)=\"onNotificationPanelClosed()\"\n ></pt-nav-bar-menu>\n\n <div class=\"main-content\">\n @if (pageSkeletonConfig.sideMenuBarConfig) {\n <pt-side-bar-menu\n class=\"sidebar\"\n [menuConfig]=\"pageSkeletonConfig.sideMenuBarConfig\"\n [ngClass]=\"{ hidden: !isSidebarVisible }\"\n ></pt-side-bar-menu>\n }\n\n <div class=\"content-area\" [ngClass]=\"{ 'full-width': !isSidebarVisible }\">\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n @if (pageSkeletonConfig.breadCrumbConfig) {\n <pt-bread-crumb\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n }\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n </div>\n\n @if (pageSkeletonConfig.footerConfig) {\n <pt-footer\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n }\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px;color:var(--pt-page-skeleton-breadcrumb-text, inherit)}.app-container{display:flex;flex-direction:column;height:100vh;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out;background:var(--pt-page-skeleton-main-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden;background:var(--pt-page-skeleton-content-area-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}.sidebar{transition:all .3s ease-in-out;background:var(--pt-page-skeleton-sidebar-bg, transparent);color:var(--pt-page-skeleton-sidebar-text, inherit)}.content-area.full-width{margin-left:0;width:100%}:host{display:block;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}:host>pt-card{width:100%;min-height:100vh;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area>pt-card{width:100%;height:100%;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-content-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{display:block;width:100%;position:relative;z-index:0;margin-top:0;background:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}:host ::ng-deep .pt-footer .footer-card,:host ::ng-deep .pt-footer pt-card{height:auto!important;overflow:visible!important;background:var(--pt-page-skeleton-footer-bg, transparent)!important;color:var(--pt-page-skeleton-footer-text, inherit)!important}.footer-card{width:100%;background-color:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}\n"] }]
7743
+ args: [{ selector: 'pt-page-skeleton', standalone: false, template: "<pt-card [config]=\"pageSkeletonConfig.backgroundCardConfig!\">\n <pt-nav-bar-menu\n [navBarMenuConfig]=\"pageSkeletonConfig.navBarMenuConfig\"\n [serverDateTime]=\"serverDateTime\"\n [notifications]=\"notifications\"\n [notificationConfig]=\"notificationConfig\"\n [notificationTotalRecords]=\"notificationTotalRecords\"\n [notificationTotalUnreadRecords]=\"notificationTotalUnreadRecords\"\n [notificationPage]=\"notificationPage\"\n [notificationRows]=\"notificationRows\"\n [notificationLoading]=\"notificationLoading\"\n (toggleSidebar)=\"onToggleSidebar()\"\n (notificationClick)=\"onNotificationClick($event)\"\n (notificationAction)=\"onNotificationAction($event)\"\n (notificationGlobalAction)=\"onNotificationGlobalAction($event)\"\n (notificationViewAll)=\"onNotificationViewAll()\"\n (notificationLoadMore)=\"onNotificationLoadMore($event)\"\n (notificationPanelOpened)=\"onNotificationPanelOpened()\"\n (notificationPanelClosed)=\"onNotificationPanelClosed()\"\n ></pt-nav-bar-menu>\n\n <div\n class=\"content-area\"\n [ngClass]=\"{\n 'full-width': !isSidebarVisible,\n }\"\n >\n <pt-card [config]=\"pageSkeletonConfig.contentCardConfig\">\n @if (pageSkeletonConfig.breadCrumbConfig) {\n <pt-bread-crumb\n [breadCrumbConfig]=\"pageSkeletonConfig.breadCrumbConfig\"\n class=\"bread-crumb\"\n ></pt-bread-crumb>\n }\n\n <router-outlet></router-outlet>\n </pt-card>\n </div>\n\n @if (pageSkeletonConfig.footerConfig) {\n <pt-footer\n [footerConfig]=\"pageSkeletonConfig.footerConfig\"\n class=\"pt-footer\"\n ></pt-footer>\n }\n</pt-card>\n", styles: [".bread-crumb{margin-bottom:15px;color:var(--pt-page-skeleton-breadcrumb-text, inherit)}.app-container{display:flex;flex-direction:column;height:100vh;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.main-content{display:flex;flex-grow:1;transition:all .3s ease-in-out;background:var(--pt-page-skeleton-main-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area{flex-grow:1;display:flex;justify-content:center;align-items:flex-start;transition:all .3s ease-in-out;margin-left:14px;width:100%;overflow-x:hidden;background:var(--pt-page-skeleton-content-area-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}.sidebar{transition:all .3s ease-in-out;background:var(--pt-page-skeleton-sidebar-bg, transparent);color:var(--pt-page-skeleton-sidebar-text, inherit)}.content-area.full-width{margin-left:0;width:100%}:host{display:block;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}:host>pt-card{width:100%;min-height:100vh;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-bg, transparent);color:var(--pt-page-skeleton-text, inherit)}.content-area>pt-card{width:100%;height:100%;max-width:100%;overflow:hidden;background:var(--pt-page-skeleton-content-bg, transparent);color:var(--pt-page-skeleton-content-text, inherit)}pt-card .card-body-scrollable{overflow-x:auto}.pt-footer{display:block;width:100%;position:relative;z-index:0;margin-top:0;background:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}:host ::ng-deep .pt-footer .footer-card,:host ::ng-deep .pt-footer pt-card{height:auto!important;overflow:visible!important;background:var(--pt-page-skeleton-footer-bg, transparent)!important;color:var(--pt-page-skeleton-footer-text, inherit)!important}.footer-card{width:100%;background-color:var(--pt-page-skeleton-footer-bg, transparent);color:var(--pt-page-skeleton-footer-text, inherit)}\n"] }]
7605
7744
  }], propDecorators: { pageSkeletonConfig: [{
7606
7745
  type: Input
7607
7746
  }], serverDateTime: [{
@@ -7610,6 +7749,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
7610
7749
  type: Input
7611
7750
  }], notificationConfig: [{
7612
7751
  type: Input
7752
+ }], notificationTotalRecords: [{
7753
+ type: Input
7754
+ }], notificationTotalUnreadRecords: [{
7755
+ type: Input
7756
+ }], notificationPage: [{
7757
+ type: Input
7758
+ }], notificationRows: [{
7759
+ type: Input
7760
+ }], notificationLoading: [{
7761
+ type: Input
7613
7762
  }], toggleSidebar: [{
7614
7763
  type: Output
7615
7764
  }], notificationAction: [{
@@ -7624,6 +7773,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
7624
7773
  type: Output
7625
7774
  }], notificationViewAll: [{
7626
7775
  type: Output
7776
+ }], notificationLoadMore: [{
7777
+ type: Output
7627
7778
  }] } });
7628
7779
 
7629
7780
  class PTFooterModule {
@@ -11642,6 +11793,486 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
11642
11793
  }]
11643
11794
  }] });
11644
11795
 
11796
+ class PTNotificationsPageComponent {
11797
+ constructor() {
11798
+ /**
11799
+ * Current server page only.
11800
+ */
11801
+ this.notifications = [];
11802
+ /**
11803
+ * Number of records matching the current:
11804
+ *
11805
+ * search + selected filter
11806
+ *
11807
+ * This value is used by the paginator.
11808
+ */
11809
+ this.totalRecords = 0;
11810
+ /**
11811
+ * Number of all notifications matching the current search,
11812
+ * before applying ALL / UNREAD / READ.
11813
+ *
11814
+ * Used by the "Toutes" counter.
11815
+ */
11816
+ this.totalAllRecords = 0;
11817
+ /**
11818
+ * Current zero-based page.
11819
+ */
11820
+ this.page = 0;
11821
+ /**
11822
+ * Current server page size.
11823
+ */
11824
+ this.rows = 10;
11825
+ this.config = {};
11826
+ this.notificationClick = new EventEmitter();
11827
+ this.action = new EventEmitter();
11828
+ this.globalAction = new EventEmitter();
11829
+ /**
11830
+ * Request for a new server page.
11831
+ *
11832
+ * Emitted on:
11833
+ * - pagination
11834
+ * - page size change
11835
+ * - filter change
11836
+ * - search
11837
+ */
11838
+ this.queryChange = new EventEmitter();
11839
+ this.searchText = '';
11840
+ this.selectedFilter = 'ALL';
11841
+ this.openedActionMenuId = null;
11842
+ this.isGlobalActionMenuOpen = false;
11843
+ this.destroy$ = new Subject();
11844
+ this.searchSubject = new Subject();
11845
+ this.defaultActions = [
11846
+ {
11847
+ id: 'MARK_AS_READ',
11848
+ label: 'Marquer comme lue',
11849
+ icon: 'pi pi-check',
11850
+ },
11851
+ {
11852
+ id: 'DELETE',
11853
+ label: 'Supprimer',
11854
+ icon: 'pi pi-trash',
11855
+ danger: true,
11856
+ },
11857
+ ];
11858
+ this.defaultGlobalActions = [
11859
+ {
11860
+ id: 'MARK_ALL_AS_READ',
11861
+ label: 'Tout marquer comme lu',
11862
+ icon: 'pi pi-check-circle',
11863
+ },
11864
+ ];
11865
+ this.searchSubject
11866
+ .pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.destroy$))
11867
+ .subscribe(() => {
11868
+ this.page = 0;
11869
+ this.closeMenus();
11870
+ this.emitQueryChange();
11871
+ });
11872
+ }
11873
+ ngOnChanges(changes) {
11874
+ if (changes['config']?.firstChange) {
11875
+ this.selectedFilter = this.config.defaultFilter ?? 'ALL';
11876
+ }
11877
+ }
11878
+ ngOnDestroy() {
11879
+ this.destroy$.next();
11880
+ this.destroy$.complete();
11881
+ }
11882
+ getNotifications() {
11883
+ return this.notifications ?? [];
11884
+ }
11885
+ /**
11886
+ * The supplied notifications already correspond
11887
+ * to one server page.
11888
+ *
11889
+ * No filtering, sorting or pagination is performed here.
11890
+ */
11891
+ getDisplayedNotifications() {
11892
+ return this.getNotifications();
11893
+ }
11894
+ getTotalCount() {
11895
+ return Math.max(0, this.totalAllRecords ?? 0);
11896
+ }
11897
+ getUnreadCount() {
11898
+ if (this.totalUnreadRecords !== undefined) {
11899
+ return Math.max(0, this.totalUnreadRecords);
11900
+ }
11901
+ return this.getNotifications().filter((notification) => notification.read !== true).length;
11902
+ }
11903
+ getReadCount() {
11904
+ if (this.totalReadRecords !== undefined) {
11905
+ return Math.max(0, this.totalReadRecords);
11906
+ }
11907
+ return this.getNotifications().filter((notification) => notification.read === true).length;
11908
+ }
11909
+ hasNotifications() {
11910
+ return this.getDisplayedNotifications().length > 0;
11911
+ }
11912
+ hasSearch() {
11913
+ return this.searchText.trim().length > 0;
11914
+ }
11915
+ showSearch() {
11916
+ return this.config.showSearch !== false;
11917
+ }
11918
+ showFilters() {
11919
+ return this.config.showFilters !== false;
11920
+ }
11921
+ showCounters() {
11922
+ return this.config.showCounters !== false;
11923
+ }
11924
+ showPagination() {
11925
+ return this.config.showPagination !== false && this.totalRecords > 0;
11926
+ }
11927
+ showGlobalActions() {
11928
+ return (this.config.showGlobalActions !== false &&
11929
+ this.getGlobalActions().length > 0);
11930
+ }
11931
+ getTitle() {
11932
+ return this.config.title?.trim() || 'Notifications';
11933
+ }
11934
+ getSubtitle() {
11935
+ return this.config.subtitle?.trim() || 'Consultez toutes vos notifications';
11936
+ }
11937
+ getEmptyText() {
11938
+ return this.config.emptyText?.trim() || 'Aucune notification';
11939
+ }
11940
+ getNoSearchResultText() {
11941
+ return (this.config.noSearchResultText?.trim() ||
11942
+ 'Aucune notification ne correspond à votre recherche');
11943
+ }
11944
+ getEmptyIcon() {
11945
+ return this.config.emptyIcon?.trim() || 'pi pi-bell-slash';
11946
+ }
11947
+ getSearchPlaceholder() {
11948
+ return (this.config.searchPlaceholder?.trim() || 'Rechercher une notification...');
11949
+ }
11950
+ getAllLabel() {
11951
+ return this.config.allLabel?.trim() || 'Toutes';
11952
+ }
11953
+ getUnreadLabel() {
11954
+ return this.config.unreadLabel?.trim() || 'Non lues';
11955
+ }
11956
+ getReadLabel() {
11957
+ return this.config.readLabel?.trim() || 'Lues';
11958
+ }
11959
+ getRowsPerPageOptions() {
11960
+ return this.config.rowsPerPageOptions ?? [5, 10, 20, 50];
11961
+ }
11962
+ showCurrentPageReport() {
11963
+ return this.config.showCurrentPageReport !== false;
11964
+ }
11965
+ getCurrentPageReportTemplate() {
11966
+ return (this.config.currentPageReportTemplate?.trim() ||
11967
+ '{first} - {last} sur {totalRecords}');
11968
+ }
11969
+ getFirst() {
11970
+ return Math.max(0, this.page) * Math.max(1, this.rows);
11971
+ }
11972
+ selectFilter(filter) {
11973
+ if (this.selectedFilter === filter) {
11974
+ return;
11975
+ }
11976
+ this.selectedFilter = filter;
11977
+ /*
11978
+ * A server-side filter always restarts
11979
+ * pagination from the first page.
11980
+ */
11981
+ this.page = 0;
11982
+ this.closeMenus();
11983
+ this.emitQueryChange();
11984
+ }
11985
+ isFilterSelected(filter) {
11986
+ return this.selectedFilter === filter;
11987
+ }
11988
+ onSearch(value) {
11989
+ this.searchText = value ?? '';
11990
+ this.searchSubject.next(this.searchText.trim());
11991
+ }
11992
+ clearSearch() {
11993
+ if (!this.hasSearch()) {
11994
+ return;
11995
+ }
11996
+ this.searchText = '';
11997
+ this.page = 0;
11998
+ this.closeMenus();
11999
+ /*
12000
+ * Explicit clear must execute immediately
12001
+ * without waiting for the debounce.
12002
+ */
12003
+ this.emitQueryChange();
12004
+ }
12005
+ onPageChange(event) {
12006
+ const nextRows = event.rows ?? this.rows;
12007
+ const nextFirst = event.first ?? 0;
12008
+ this.rows = nextRows > 0 ? nextRows : this.rows;
12009
+ this.page = this.rows > 0 ? Math.floor(nextFirst / this.rows) : 0;
12010
+ this.closeMenus();
12011
+ this.emitQueryChange();
12012
+ }
12013
+ onNotificationClick(notification, event) {
12014
+ event.stopPropagation();
12015
+ if (notification.disabled) {
12016
+ return;
12017
+ }
12018
+ this.closeMenus();
12019
+ this.notificationClick.emit({
12020
+ notification,
12021
+ });
12022
+ }
12023
+ toggleActionMenu(notification, event) {
12024
+ event.stopPropagation();
12025
+ if (notification.disabled) {
12026
+ return;
12027
+ }
12028
+ this.isGlobalActionMenuOpen = false;
12029
+ this.openedActionMenuId =
12030
+ this.openedActionMenuId === notification.id ? null : notification.id;
12031
+ }
12032
+ onActionMenuClick(event) {
12033
+ event.stopPropagation();
12034
+ }
12035
+ onActionClick(notification, menuAction, event) {
12036
+ event.stopPropagation();
12037
+ if (notification.disabled || menuAction.disabled) {
12038
+ return;
12039
+ }
12040
+ this.action.emit({
12041
+ notification,
12042
+ action: menuAction,
12043
+ });
12044
+ this.openedActionMenuId = null;
12045
+ }
12046
+ toggleGlobalActionMenu(event) {
12047
+ event.stopPropagation();
12048
+ this.openedActionMenuId = null;
12049
+ this.isGlobalActionMenuOpen = !this.isGlobalActionMenuOpen;
12050
+ }
12051
+ onGlobalActionMenuClick(event) {
12052
+ event.stopPropagation();
12053
+ }
12054
+ onGlobalActionClick(menuAction, event) {
12055
+ event.stopPropagation();
12056
+ if (menuAction.disabled) {
12057
+ return;
12058
+ }
12059
+ this.globalAction.emit({
12060
+ action: menuAction,
12061
+ /*
12062
+ * Since this is server pagination,
12063
+ * notifications contains only the current page.
12064
+ */
12065
+ notifications: this.getNotifications(),
12066
+ });
12067
+ this.isGlobalActionMenuOpen = false;
12068
+ }
12069
+ closeMenus() {
12070
+ this.openedActionMenuId = null;
12071
+ this.isGlobalActionMenuOpen = false;
12072
+ }
12073
+ getNotificationClasses(notification) {
12074
+ const classes = ['pt-notifications-page-item'];
12075
+ if (notification.read !== true) {
12076
+ classes.push('unread');
12077
+ }
12078
+ if (notification.disabled) {
12079
+ classes.push('disabled');
12080
+ }
12081
+ if (notification.styleClass) {
12082
+ classes.push(notification.styleClass);
12083
+ }
12084
+ return classes.join(' ');
12085
+ }
12086
+ getNotificationIcon(notification) {
12087
+ return notification.icon?.trim() || 'pi pi-bell';
12088
+ }
12089
+ getNotificationIconStyles(notification) {
12090
+ return {
12091
+ color: notification.iconColor ??
12092
+ 'var(--pt-notifications-page-icon-color, #3F2564)',
12093
+ };
12094
+ }
12095
+ getActions(notification) {
12096
+ const configuredActions = notification.actions !== undefined
12097
+ ? notification.actions
12098
+ : this.defaultActions;
12099
+ return configuredActions.filter((menuAction) => {
12100
+ if (menuAction.visible === false) {
12101
+ return false;
12102
+ }
12103
+ if (menuAction.id === 'MARK_AS_READ' && notification.read === true) {
12104
+ return false;
12105
+ }
12106
+ return true;
12107
+ });
12108
+ }
12109
+ getGlobalActions() {
12110
+ const configuredActions = this.config.globalActions !== undefined
12111
+ ? this.config.globalActions
12112
+ : this.defaultGlobalActions;
12113
+ return configuredActions.filter((menuAction) => {
12114
+ if (menuAction.visible === false) {
12115
+ return false;
12116
+ }
12117
+ if (menuAction.id === 'MARK_ALL_AS_READ' && this.getUnreadCount() === 0) {
12118
+ return false;
12119
+ }
12120
+ return true;
12121
+ });
12122
+ }
12123
+ hasActions(notification) {
12124
+ return this.getActions(notification).length > 0;
12125
+ }
12126
+ isActionMenuOpen(notification) {
12127
+ return this.openedActionMenuId === notification.id;
12128
+ }
12129
+ getActionClasses(menuAction) {
12130
+ const classes = ['pt-notifications-page-action-item'];
12131
+ if (menuAction.danger) {
12132
+ classes.push('danger');
12133
+ }
12134
+ if (menuAction.disabled) {
12135
+ classes.push('disabled');
12136
+ }
12137
+ return classes.join(' ');
12138
+ }
12139
+ hasMetadata(notification) {
12140
+ return !!(notification.date || notification.sender?.trim());
12141
+ }
12142
+ getDateText(notification) {
12143
+ if (!notification.date) {
12144
+ return '';
12145
+ }
12146
+ const date = this.toDate(notification.date);
12147
+ if (!date) {
12148
+ return String(notification.date);
12149
+ }
12150
+ return this.formatRelativeDate(date);
12151
+ }
12152
+ emitQueryChange() {
12153
+ this.queryChange.emit({
12154
+ page: Math.max(0, this.page),
12155
+ size: Math.max(1, this.rows),
12156
+ first: this.getFirst(),
12157
+ filter: this.selectedFilter,
12158
+ search: this.searchText.trim(),
12159
+ });
12160
+ }
12161
+ formatRelativeDate(date) {
12162
+ const now = new Date();
12163
+ const differenceMs = now.getTime() - date.getTime();
12164
+ if (differenceMs < 0) {
12165
+ return this.formatAbsoluteDate(date);
12166
+ }
12167
+ const differenceSeconds = Math.floor(differenceMs / 1000);
12168
+ const differenceMinutes = Math.floor(differenceSeconds / 60);
12169
+ const differenceHours = Math.floor(differenceMinutes / 60);
12170
+ const differenceDays = this.getCalendarDayDifference(now, date);
12171
+ if (differenceSeconds < 60) {
12172
+ return "À l'instant";
12173
+ }
12174
+ if (differenceMinutes < 60) {
12175
+ return `Il y a ${differenceMinutes} min`;
12176
+ }
12177
+ if (differenceDays === 0) {
12178
+ return `Il y a ${differenceHours} h`;
12179
+ }
12180
+ if (differenceDays === 1) {
12181
+ return `Hier à ${this.formatTime(date)}`;
12182
+ }
12183
+ if (differenceDays < 7) {
12184
+ return `Il y a ${differenceDays} j`;
12185
+ }
12186
+ return this.formatAbsoluteDate(date);
12187
+ }
12188
+ getCalendarDayDifference(left, right) {
12189
+ const leftDay = Date.UTC(left.getFullYear(), left.getMonth(), left.getDate());
12190
+ const rightDay = Date.UTC(right.getFullYear(), right.getMonth(), right.getDate());
12191
+ return Math.round((leftDay - rightDay) / (24 * 60 * 60 * 1000));
12192
+ }
12193
+ toDate(value) {
12194
+ if (value instanceof Date) {
12195
+ return Number.isNaN(value.getTime()) ? null : value;
12196
+ }
12197
+ const normalized = value.trim();
12198
+ if (!normalized) {
12199
+ return null;
12200
+ }
12201
+ /*
12202
+ * Java LocalDateTime / local date-time
12203
+ * without timezone.
12204
+ *
12205
+ * Example:
12206
+ * 2026-08-10T11:15:32.653839
12207
+ */
12208
+ const localDateMatch = normalized.match(/^(\d{4})-(\d{2})-(\d{2})[T\s](\d{2}):(\d{2})(?::(\d{2}))?(?:\.(\d+))?$/);
12209
+ if (localDateMatch) {
12210
+ const [, year, month, day, hour, minute, second = '0', fraction = ''] = localDateMatch;
12211
+ const milliseconds = Number(fraction.padEnd(3, '0').substring(0, 3) || '0');
12212
+ const parsedDate = new Date(Number(year), Number(month) - 1, Number(day), Number(hour), Number(minute), Number(second), milliseconds);
12213
+ return Number.isNaN(parsedDate.getTime()) ? null : parsedDate;
12214
+ }
12215
+ const parsedDate = new Date(normalized);
12216
+ return Number.isNaN(parsedDate.getTime()) ? null : parsedDate;
12217
+ }
12218
+ formatAbsoluteDate(date) {
12219
+ const day = this.pad2(date.getDate());
12220
+ const month = this.pad2(date.getMonth() + 1);
12221
+ const year = date.getFullYear();
12222
+ return `${day}/${month}/${year} ${this.formatTime(date)}`;
12223
+ }
12224
+ formatTime(date) {
12225
+ return `${this.pad2(date.getHours())}:${this.pad2(date.getMinutes())}`;
12226
+ }
12227
+ pad2(value) {
12228
+ return String(value).padStart(2, '0');
12229
+ }
12230
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationsPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12231
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PTNotificationsPageComponent, isStandalone: false, selector: "pt-notifications-page", inputs: { notifications: "notifications", totalRecords: "totalRecords", totalAllRecords: "totalAllRecords", totalUnreadRecords: "totalUnreadRecords", totalReadRecords: "totalReadRecords", page: "page", rows: "rows", config: "config" }, outputs: { notificationClick: "notificationClick", action: "action", globalAction: "globalAction", queryChange: "queryChange" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"pt-notifications-page\" (click)=\"closeMenus()\">\n <div class=\"pt-notifications-page-header\">\n <div class=\"pt-notifications-page-heading\">\n <div class=\"pt-notifications-page-title-row\">\n <div class=\"pt-notifications-page-title-icon\">\n <i class=\"pi pi-bell\"></i>\n </div>\n\n <div>\n <h2 class=\"pt-notifications-page-title\">\n {{ getTitle() }}\n </h2>\n\n <div class=\"pt-notifications-page-subtitle\">\n {{ getSubtitle() }}\n </div>\n </div>\n </div>\n\n @if (showCounters()) {\n <div class=\"pt-notifications-page-counters\">\n <span class=\"pt-notifications-page-counter\">\n {{ getTotalCount() }}\n notification(s)\n </span>\n\n @if (getUnreadCount() > 0) {\n <span class=\"pt-notifications-page-counter unread\">\n {{ getUnreadCount() }}\n non lue(s)\n </span>\n }\n </div>\n }\n </div>\n\n @if (showGlobalActions()) {\n <div\n class=\"pt-notifications-page-global-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notifications-page-global-button\"\n aria-label=\"Actions globales\"\n (click)=\"toggleGlobalActionMenu($event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isGlobalActionMenuOpen) {\n <div\n class=\"pt-notifications-page-global-menu\"\n (click)=\"onGlobalActionMenuClick($event)\"\n >\n @for (menuAction of getGlobalActions(); track menuAction.id) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onGlobalActionClick(menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"pt-notifications-page-toolbar\">\n @if (showFilters()) {\n <div class=\"pt-notifications-page-filters\">\n <button\n type=\"button\"\n class=\"pt-notifications-page-filter\"\n [class.selected]=\"isFilterSelected('ALL')\"\n (click)=\"selectFilter('ALL')\"\n >\n {{ getAllLabel() }}\n\n <span class=\"pt-notifications-page-filter-count\">\n {{ getTotalCount() }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"pt-notifications-page-filter\"\n [class.selected]=\"isFilterSelected('UNREAD')\"\n (click)=\"selectFilter('UNREAD')\"\n >\n {{ getUnreadLabel() }}\n\n <span class=\"pt-notifications-page-filter-count\">\n {{ getUnreadCount() }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"pt-notifications-page-filter\"\n [class.selected]=\"isFilterSelected('READ')\"\n (click)=\"selectFilter('READ')\"\n >\n {{ getReadLabel() }}\n\n <span class=\"pt-notifications-page-filter-count\">\n {{ getReadCount() }}\n </span>\n </button>\n </div>\n }\n\n @if (showSearch()) {\n <div class=\"pt-notifications-page-search\">\n <i class=\"pi pi-search\"></i>\n\n <input\n type=\"text\"\n [value]=\"searchText\"\n [placeholder]=\"getSearchPlaceholder()\"\n (input)=\"onSearch($any($event.target).value)\"\n />\n\n @if (hasSearch()) {\n <button\n type=\"button\"\n class=\"pt-notifications-page-search-clear\"\n aria-label=\"Effacer la recherche\"\n (click)=\"clearSearch()\"\n >\n <i class=\"pi pi-times\"></i>\n </button>\n }\n </div>\n }\n </div>\n\n @if (hasNotifications()) {\n <div class=\"pt-notifications-page-list\">\n @for (\n notification of getDisplayedNotifications();\n track notification.id\n ) {\n <div\n [class]=\"getNotificationClasses(notification)\"\n (click)=\"onNotificationClick(notification, $event)\"\n >\n <div class=\"pt-notifications-page-item-icon-wrapper\">\n <div class=\"pt-notifications-page-item-icon\">\n <i\n [class]=\"getNotificationIcon(notification)\"\n [ngStyle]=\"getNotificationIconStyles(notification)\"\n ></i>\n </div>\n </div>\n\n <div class=\"pt-notifications-page-item-content\">\n <div class=\"pt-notifications-page-item-text\">\n {{ notification.text }}\n </div>\n\n @if (hasMetadata(notification)) {\n <div class=\"pt-notifications-page-item-metadata\">\n @if (notification.date) {\n <span>\n <i class=\"pi pi-clock\"></i>\n\n {{ getDateText(notification) }}\n </span>\n }\n\n @if (notification.sender?.trim()) {\n <span>\n <i class=\"pi pi-user\"></i>\n\n {{ notification.sender }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (hasActions(notification)) {\n <div\n class=\"pt-notifications-page-item-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notifications-page-more-button\"\n aria-label=\"Actions notification\"\n [disabled]=\"notification.disabled\"\n (click)=\"toggleActionMenu(notification, $event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isActionMenuOpen(notification)) {\n <div\n class=\"pt-notifications-page-action-menu\"\n (click)=\"onActionMenuClick($event)\"\n >\n @for (\n menuAction of getActions(notification);\n track menuAction.id\n ) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onActionClick(notification, menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (notification.read !== true) {\n <span class=\"pt-notifications-page-unread-indicator\"></span>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"pt-notifications-page-empty\">\n <div class=\"pt-notifications-page-empty-icon\">\n <i [class]=\"getEmptyIcon()\"></i>\n </div>\n\n <div class=\"pt-notifications-page-empty-text\">\n @if (hasSearch()) {\n {{ getNoSearchResultText() }}\n } @else {\n {{ getEmptyText() }}\n }\n </div>\n </div>\n }\n\n @if (showPagination()) {\n <div class=\"pt-notifications-page-pagination\">\n <p-paginator\n [first]=\"getFirst()\"\n [rows]=\"rows\"\n [totalRecords]=\"totalRecords\"\n [rowsPerPageOptions]=\"getRowsPerPageOptions()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"getCurrentPageReportTemplate()\"\n (onPageChange)=\"onPageChange($event)\"\n ></p-paginator>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.pt-notifications-page{position:relative;width:100%;background:var(--pt-notifications-page-bg, #ffffff);border:1px solid var(--pt-notifications-page-border, #e5e7eb);border-radius:14px;overflow:visible}.pt-notifications-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.25rem 1.5rem;border-bottom:1px solid var(--pt-notifications-page-border, #e5e7eb)}.pt-notifications-page-heading{display:flex;flex-direction:column;gap:.85rem}.pt-notifications-page-title-row{display:flex;align-items:center;gap:.8rem}.pt-notifications-page-title-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:var(--pt-notifications-page-title-icon-bg, #f3f0f8);color:var(--pt-notifications-page-title-icon-color, #3f2564);font-size:1.15rem}.pt-notifications-page-title{margin:0;color:var(--pt-notifications-page-title-color, #1f2937);font-size:1.25rem;font-weight:700}.pt-notifications-page-subtitle{margin-top:.2rem;color:var(--pt-notifications-page-subtitle-color, #6b7280);font-size:.875rem}.pt-notifications-page-counters{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.pt-notifications-page-counter{display:inline-flex;align-items:center;padding:.3rem .65rem;border-radius:999px;background:var(--pt-notifications-page-counter-bg, #f3f4f6);color:var(--pt-notifications-page-counter-color, #4b5563);font-size:.78rem;font-weight:600}.pt-notifications-page-counter.unread{background:var(--pt-notifications-page-unread-counter-bg, #f3f0f8);color:var(--pt-notifications-page-unread-counter-color, #3f2564)}.pt-notifications-page-global-actions{position:relative}.pt-notifications-page-global-button,.pt-notifications-page-more-button,.pt-notifications-page-search-clear{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;cursor:pointer;color:var(--pt-notifications-page-action-color, #6b7280)}.pt-notifications-page-global-button{width:36px;height:36px;border-radius:50%}.pt-notifications-page-global-button:hover,.pt-notifications-page-more-button:hover{background:var(--pt-notifications-page-action-hover-bg, #f3f4f6)}.pt-notifications-page-global-menu,.pt-notifications-page-action-menu{position:absolute;z-index:1000;min-width:200px;padding:.35rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 10px 25px #0f172a24}.pt-notifications-page-global-menu{top:calc(100% + 5px);right:0}.pt-notifications-page-action-menu{top:30px;right:0}.pt-notifications-page-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--pt-notifications-page-border, #e5e7eb)}.pt-notifications-page-filters{display:flex;align-items:center;gap:.4rem}.pt-notifications-page-filter{display:flex;align-items:center;gap:.45rem;padding:.5rem .85rem;border:1px solid var(--pt-notifications-page-filter-border, #e5e7eb);border-radius:8px;background:var(--pt-notifications-page-filter-bg, #ffffff);color:var(--pt-notifications-page-filter-color, #4b5563);font-size:.82rem;font-weight:600;cursor:pointer}.pt-notifications-page-filter:hover{background:#f9fafb}.pt-notifications-page-filter.selected{border-color:var(--pt-notifications-page-primary, #3f2564);background:var(--pt-notifications-page-selected-bg, #f3f0f8);color:var(--pt-notifications-page-primary, #3f2564)}.pt-notifications-page-filter-count{min-width:20px;padding:.1rem .35rem;border-radius:999px;background:#0000000d;text-align:center;font-size:.72rem}.pt-notifications-page-search{position:relative;display:flex;align-items:center;width:min(360px,100%)}.pt-notifications-page-search>.pi-search{position:absolute;left:.85rem;color:#9ca3af}.pt-notifications-page-search input{width:100%;padding:.65rem 2.5rem .65rem 2.4rem;border:1px solid #d1d5db;border-radius:8px;outline:none;font-size:.85rem}.pt-notifications-page-search input:focus{border-color:var(--pt-notifications-page-primary, #3f2564);box-shadow:0 0 0 2px #3f256414}.pt-notifications-page-search-clear{position:absolute;right:.6rem;width:28px;height:28px}.pt-notifications-page-list{width:100%}.pt-notifications-page-item{position:relative;display:flex;align-items:flex-start;gap:1rem;padding:1.1rem 1.5rem;border-bottom:1px solid var(--pt-notifications-page-border, #e5e7eb);background:var(--pt-notifications-page-item-bg, #ffffff);cursor:pointer;transition:background .15s ease}.pt-notifications-page-item:last-child{border-bottom:0}.pt-notifications-page-item:hover{background:var(--pt-notifications-page-item-hover-bg, #f9fafb)}.pt-notifications-page-item.unread{background:var(--pt-notifications-page-unread-bg, #faf8fd)}.pt-notifications-page-item.unread:hover{background:var(--pt-notifications-page-unread-hover-bg, #f6f2fa)}.pt-notifications-page-item.disabled{opacity:.55;cursor:default}.pt-notifications-page-item-icon-wrapper{flex:0 0 auto}.pt-notifications-page-item-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:var(--pt-notifications-page-item-icon-bg, #f3f4f6);font-size:1rem}.pt-notifications-page-item-content{flex:1 1 auto;min-width:0}.pt-notifications-page-item-text{color:var(--pt-notifications-page-text-color, #1f2937);font-size:.9rem;line-height:1.5}.pt-notifications-page-item.unread .pt-notifications-page-item-text{font-weight:600}.pt-notifications-page-item-metadata{display:flex;align-items:center;flex-wrap:wrap;gap:1rem;margin-top:.5rem;color:var(--pt-notifications-page-metadata-color, #6b7280);font-size:.78rem}.pt-notifications-page-item-metadata span{display:inline-flex;align-items:center;gap:.35rem}.pt-notifications-page-item-actions{position:relative;flex:0 0 auto}.pt-notifications-page-more-button{width:30px;height:30px;border-radius:50%}.pt-notifications-page-action-item{display:flex;align-items:center;gap:.6rem;width:100%;padding:.55rem .7rem;border:0;border-radius:6px;background:transparent;color:#374151;font-size:.8rem;text-align:left;cursor:pointer}.pt-notifications-page-action-item:hover{background:#f3f4f6}.pt-notifications-page-action-item.danger{color:#dc2626}.pt-notifications-page-action-item.disabled{opacity:.5;cursor:default}.pt-notifications-page-unread-indicator{position:absolute;top:50%;right:.5rem;width:7px;height:7px;border-radius:50%;background:var(--pt-notifications-page-unread-indicator, #3f2564);transform:translateY(-50%)}.pt-notifications-page-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:280px;padding:3rem;color:#6b7280;text-align:center}.pt-notifications-page-empty-icon{display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin-bottom:1rem;border-radius:50%;background:#f3f4f6;color:#9ca3af;font-size:1.6rem}.pt-notifications-page-empty-text{max-width:450px;font-size:.9rem}@media(max-width:768px){.pt-notifications-page-header,.pt-notifications-page-toolbar{flex-direction:column;align-items:stretch}.pt-notifications-page-filters{overflow-x:auto}.pt-notifications-page-search{width:100%}.pt-notifications-page-item{padding:1rem 1.1rem}.pt-notifications-page-item-metadata{gap:.5rem 1rem}}.pt-notifications-page-pagination{display:flex;align-items:center;justify-content:center;width:100%;padding:.75rem 1rem;box-sizing:border-box;border-top:1px solid var(--pt-notifications-page-border, #e5e7eb);background:var(--pt-notifications-page-pagination-bg, #ffffff)}.pt-notifications-page-pagination ::ng-deep .p-paginator{width:100%;border:0;background:transparent}@media(max-width:768px){.pt-notifications-page-pagination{padding:.5rem}}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i2$5.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first", "appendTo"], outputs: ["onPageChange"] }] }); }
12232
+ }
12233
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationsPageComponent, decorators: [{
12234
+ type: Component,
12235
+ args: [{ selector: 'pt-notifications-page', standalone: false, template: "<div class=\"pt-notifications-page\" (click)=\"closeMenus()\">\n <div class=\"pt-notifications-page-header\">\n <div class=\"pt-notifications-page-heading\">\n <div class=\"pt-notifications-page-title-row\">\n <div class=\"pt-notifications-page-title-icon\">\n <i class=\"pi pi-bell\"></i>\n </div>\n\n <div>\n <h2 class=\"pt-notifications-page-title\">\n {{ getTitle() }}\n </h2>\n\n <div class=\"pt-notifications-page-subtitle\">\n {{ getSubtitle() }}\n </div>\n </div>\n </div>\n\n @if (showCounters()) {\n <div class=\"pt-notifications-page-counters\">\n <span class=\"pt-notifications-page-counter\">\n {{ getTotalCount() }}\n notification(s)\n </span>\n\n @if (getUnreadCount() > 0) {\n <span class=\"pt-notifications-page-counter unread\">\n {{ getUnreadCount() }}\n non lue(s)\n </span>\n }\n </div>\n }\n </div>\n\n @if (showGlobalActions()) {\n <div\n class=\"pt-notifications-page-global-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notifications-page-global-button\"\n aria-label=\"Actions globales\"\n (click)=\"toggleGlobalActionMenu($event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isGlobalActionMenuOpen) {\n <div\n class=\"pt-notifications-page-global-menu\"\n (click)=\"onGlobalActionMenuClick($event)\"\n >\n @for (menuAction of getGlobalActions(); track menuAction.id) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onGlobalActionClick(menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"pt-notifications-page-toolbar\">\n @if (showFilters()) {\n <div class=\"pt-notifications-page-filters\">\n <button\n type=\"button\"\n class=\"pt-notifications-page-filter\"\n [class.selected]=\"isFilterSelected('ALL')\"\n (click)=\"selectFilter('ALL')\"\n >\n {{ getAllLabel() }}\n\n <span class=\"pt-notifications-page-filter-count\">\n {{ getTotalCount() }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"pt-notifications-page-filter\"\n [class.selected]=\"isFilterSelected('UNREAD')\"\n (click)=\"selectFilter('UNREAD')\"\n >\n {{ getUnreadLabel() }}\n\n <span class=\"pt-notifications-page-filter-count\">\n {{ getUnreadCount() }}\n </span>\n </button>\n\n <button\n type=\"button\"\n class=\"pt-notifications-page-filter\"\n [class.selected]=\"isFilterSelected('READ')\"\n (click)=\"selectFilter('READ')\"\n >\n {{ getReadLabel() }}\n\n <span class=\"pt-notifications-page-filter-count\">\n {{ getReadCount() }}\n </span>\n </button>\n </div>\n }\n\n @if (showSearch()) {\n <div class=\"pt-notifications-page-search\">\n <i class=\"pi pi-search\"></i>\n\n <input\n type=\"text\"\n [value]=\"searchText\"\n [placeholder]=\"getSearchPlaceholder()\"\n (input)=\"onSearch($any($event.target).value)\"\n />\n\n @if (hasSearch()) {\n <button\n type=\"button\"\n class=\"pt-notifications-page-search-clear\"\n aria-label=\"Effacer la recherche\"\n (click)=\"clearSearch()\"\n >\n <i class=\"pi pi-times\"></i>\n </button>\n }\n </div>\n }\n </div>\n\n @if (hasNotifications()) {\n <div class=\"pt-notifications-page-list\">\n @for (\n notification of getDisplayedNotifications();\n track notification.id\n ) {\n <div\n [class]=\"getNotificationClasses(notification)\"\n (click)=\"onNotificationClick(notification, $event)\"\n >\n <div class=\"pt-notifications-page-item-icon-wrapper\">\n <div class=\"pt-notifications-page-item-icon\">\n <i\n [class]=\"getNotificationIcon(notification)\"\n [ngStyle]=\"getNotificationIconStyles(notification)\"\n ></i>\n </div>\n </div>\n\n <div class=\"pt-notifications-page-item-content\">\n <div class=\"pt-notifications-page-item-text\">\n {{ notification.text }}\n </div>\n\n @if (hasMetadata(notification)) {\n <div class=\"pt-notifications-page-item-metadata\">\n @if (notification.date) {\n <span>\n <i class=\"pi pi-clock\"></i>\n\n {{ getDateText(notification) }}\n </span>\n }\n\n @if (notification.sender?.trim()) {\n <span>\n <i class=\"pi pi-user\"></i>\n\n {{ notification.sender }}\n </span>\n }\n </div>\n }\n </div>\n\n @if (hasActions(notification)) {\n <div\n class=\"pt-notifications-page-item-actions\"\n (click)=\"$event.stopPropagation()\"\n >\n <button\n type=\"button\"\n class=\"pt-notifications-page-more-button\"\n aria-label=\"Actions notification\"\n [disabled]=\"notification.disabled\"\n (click)=\"toggleActionMenu(notification, $event)\"\n >\n <i class=\"pi pi-ellipsis-v\"></i>\n </button>\n\n @if (isActionMenuOpen(notification)) {\n <div\n class=\"pt-notifications-page-action-menu\"\n (click)=\"onActionMenuClick($event)\"\n >\n @for (\n menuAction of getActions(notification);\n track menuAction.id\n ) {\n <button\n type=\"button\"\n [class]=\"getActionClasses(menuAction)\"\n [disabled]=\"menuAction.disabled\"\n (click)=\"onActionClick(notification, menuAction, $event)\"\n >\n @if (menuAction.icon) {\n <i [class]=\"menuAction.icon\"></i>\n }\n\n <span>\n {{ menuAction.label }}\n </span>\n </button>\n }\n </div>\n }\n </div>\n }\n\n @if (notification.read !== true) {\n <span class=\"pt-notifications-page-unread-indicator\"></span>\n }\n </div>\n }\n </div>\n } @else {\n <div class=\"pt-notifications-page-empty\">\n <div class=\"pt-notifications-page-empty-icon\">\n <i [class]=\"getEmptyIcon()\"></i>\n </div>\n\n <div class=\"pt-notifications-page-empty-text\">\n @if (hasSearch()) {\n {{ getNoSearchResultText() }}\n } @else {\n {{ getEmptyText() }}\n }\n </div>\n </div>\n }\n\n @if (showPagination()) {\n <div class=\"pt-notifications-page-pagination\">\n <p-paginator\n [first]=\"getFirst()\"\n [rows]=\"rows\"\n [totalRecords]=\"totalRecords\"\n [rowsPerPageOptions]=\"getRowsPerPageOptions()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"getCurrentPageReportTemplate()\"\n (onPageChange)=\"onPageChange($event)\"\n ></p-paginator>\n </div>\n }\n</div>\n", styles: [":host{display:block;width:100%}.pt-notifications-page{position:relative;width:100%;background:var(--pt-notifications-page-bg, #ffffff);border:1px solid var(--pt-notifications-page-border, #e5e7eb);border-radius:14px;overflow:visible}.pt-notifications-page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding:1.25rem 1.5rem;border-bottom:1px solid var(--pt-notifications-page-border, #e5e7eb)}.pt-notifications-page-heading{display:flex;flex-direction:column;gap:.85rem}.pt-notifications-page-title-row{display:flex;align-items:center;gap:.8rem}.pt-notifications-page-title-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:var(--pt-notifications-page-title-icon-bg, #f3f0f8);color:var(--pt-notifications-page-title-icon-color, #3f2564);font-size:1.15rem}.pt-notifications-page-title{margin:0;color:var(--pt-notifications-page-title-color, #1f2937);font-size:1.25rem;font-weight:700}.pt-notifications-page-subtitle{margin-top:.2rem;color:var(--pt-notifications-page-subtitle-color, #6b7280);font-size:.875rem}.pt-notifications-page-counters{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem}.pt-notifications-page-counter{display:inline-flex;align-items:center;padding:.3rem .65rem;border-radius:999px;background:var(--pt-notifications-page-counter-bg, #f3f4f6);color:var(--pt-notifications-page-counter-color, #4b5563);font-size:.78rem;font-weight:600}.pt-notifications-page-counter.unread{background:var(--pt-notifications-page-unread-counter-bg, #f3f0f8);color:var(--pt-notifications-page-unread-counter-color, #3f2564)}.pt-notifications-page-global-actions{position:relative}.pt-notifications-page-global-button,.pt-notifications-page-more-button,.pt-notifications-page-search-clear{display:inline-flex;align-items:center;justify-content:center;border:0;background:transparent;cursor:pointer;color:var(--pt-notifications-page-action-color, #6b7280)}.pt-notifications-page-global-button{width:36px;height:36px;border-radius:50%}.pt-notifications-page-global-button:hover,.pt-notifications-page-more-button:hover{background:var(--pt-notifications-page-action-hover-bg, #f3f4f6)}.pt-notifications-page-global-menu,.pt-notifications-page-action-menu{position:absolute;z-index:1000;min-width:200px;padding:.35rem;background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 10px 25px #0f172a24}.pt-notifications-page-global-menu{top:calc(100% + 5px);right:0}.pt-notifications-page-action-menu{top:30px;right:0}.pt-notifications-page-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.5rem;border-bottom:1px solid var(--pt-notifications-page-border, #e5e7eb)}.pt-notifications-page-filters{display:flex;align-items:center;gap:.4rem}.pt-notifications-page-filter{display:flex;align-items:center;gap:.45rem;padding:.5rem .85rem;border:1px solid var(--pt-notifications-page-filter-border, #e5e7eb);border-radius:8px;background:var(--pt-notifications-page-filter-bg, #ffffff);color:var(--pt-notifications-page-filter-color, #4b5563);font-size:.82rem;font-weight:600;cursor:pointer}.pt-notifications-page-filter:hover{background:#f9fafb}.pt-notifications-page-filter.selected{border-color:var(--pt-notifications-page-primary, #3f2564);background:var(--pt-notifications-page-selected-bg, #f3f0f8);color:var(--pt-notifications-page-primary, #3f2564)}.pt-notifications-page-filter-count{min-width:20px;padding:.1rem .35rem;border-radius:999px;background:#0000000d;text-align:center;font-size:.72rem}.pt-notifications-page-search{position:relative;display:flex;align-items:center;width:min(360px,100%)}.pt-notifications-page-search>.pi-search{position:absolute;left:.85rem;color:#9ca3af}.pt-notifications-page-search input{width:100%;padding:.65rem 2.5rem .65rem 2.4rem;border:1px solid #d1d5db;border-radius:8px;outline:none;font-size:.85rem}.pt-notifications-page-search input:focus{border-color:var(--pt-notifications-page-primary, #3f2564);box-shadow:0 0 0 2px #3f256414}.pt-notifications-page-search-clear{position:absolute;right:.6rem;width:28px;height:28px}.pt-notifications-page-list{width:100%}.pt-notifications-page-item{position:relative;display:flex;align-items:flex-start;gap:1rem;padding:1.1rem 1.5rem;border-bottom:1px solid var(--pt-notifications-page-border, #e5e7eb);background:var(--pt-notifications-page-item-bg, #ffffff);cursor:pointer;transition:background .15s ease}.pt-notifications-page-item:last-child{border-bottom:0}.pt-notifications-page-item:hover{background:var(--pt-notifications-page-item-hover-bg, #f9fafb)}.pt-notifications-page-item.unread{background:var(--pt-notifications-page-unread-bg, #faf8fd)}.pt-notifications-page-item.unread:hover{background:var(--pt-notifications-page-unread-hover-bg, #f6f2fa)}.pt-notifications-page-item.disabled{opacity:.55;cursor:default}.pt-notifications-page-item-icon-wrapper{flex:0 0 auto}.pt-notifications-page-item-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:50%;background:var(--pt-notifications-page-item-icon-bg, #f3f4f6);font-size:1rem}.pt-notifications-page-item-content{flex:1 1 auto;min-width:0}.pt-notifications-page-item-text{color:var(--pt-notifications-page-text-color, #1f2937);font-size:.9rem;line-height:1.5}.pt-notifications-page-item.unread .pt-notifications-page-item-text{font-weight:600}.pt-notifications-page-item-metadata{display:flex;align-items:center;flex-wrap:wrap;gap:1rem;margin-top:.5rem;color:var(--pt-notifications-page-metadata-color, #6b7280);font-size:.78rem}.pt-notifications-page-item-metadata span{display:inline-flex;align-items:center;gap:.35rem}.pt-notifications-page-item-actions{position:relative;flex:0 0 auto}.pt-notifications-page-more-button{width:30px;height:30px;border-radius:50%}.pt-notifications-page-action-item{display:flex;align-items:center;gap:.6rem;width:100%;padding:.55rem .7rem;border:0;border-radius:6px;background:transparent;color:#374151;font-size:.8rem;text-align:left;cursor:pointer}.pt-notifications-page-action-item:hover{background:#f3f4f6}.pt-notifications-page-action-item.danger{color:#dc2626}.pt-notifications-page-action-item.disabled{opacity:.5;cursor:default}.pt-notifications-page-unread-indicator{position:absolute;top:50%;right:.5rem;width:7px;height:7px;border-radius:50%;background:var(--pt-notifications-page-unread-indicator, #3f2564);transform:translateY(-50%)}.pt-notifications-page-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:280px;padding:3rem;color:#6b7280;text-align:center}.pt-notifications-page-empty-icon{display:flex;align-items:center;justify-content:center;width:64px;height:64px;margin-bottom:1rem;border-radius:50%;background:#f3f4f6;color:#9ca3af;font-size:1.6rem}.pt-notifications-page-empty-text{max-width:450px;font-size:.9rem}@media(max-width:768px){.pt-notifications-page-header,.pt-notifications-page-toolbar{flex-direction:column;align-items:stretch}.pt-notifications-page-filters{overflow-x:auto}.pt-notifications-page-search{width:100%}.pt-notifications-page-item{padding:1rem 1.1rem}.pt-notifications-page-item-metadata{gap:.5rem 1rem}}.pt-notifications-page-pagination{display:flex;align-items:center;justify-content:center;width:100%;padding:.75rem 1rem;box-sizing:border-box;border-top:1px solid var(--pt-notifications-page-border, #e5e7eb);background:var(--pt-notifications-page-pagination-bg, #ffffff)}.pt-notifications-page-pagination ::ng-deep .p-paginator{width:100%;border:0;background:transparent}@media(max-width:768px){.pt-notifications-page-pagination{padding:.5rem}}\n"] }]
12236
+ }], ctorParameters: () => [], propDecorators: { notifications: [{
12237
+ type: Input
12238
+ }], totalRecords: [{
12239
+ type: Input
12240
+ }], totalAllRecords: [{
12241
+ type: Input
12242
+ }], totalUnreadRecords: [{
12243
+ type: Input
12244
+ }], totalReadRecords: [{
12245
+ type: Input
12246
+ }], page: [{
12247
+ type: Input
12248
+ }], rows: [{
12249
+ type: Input
12250
+ }], config: [{
12251
+ type: Input
12252
+ }], notificationClick: [{
12253
+ type: Output
12254
+ }], action: [{
12255
+ type: Output
12256
+ }], globalAction: [{
12257
+ type: Output
12258
+ }], queryChange: [{
12259
+ type: Output
12260
+ }] } });
12261
+
12262
+ class PTNotificationsPageModule {
12263
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationsPageModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
12264
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationsPageModule, declarations: [PTNotificationsPageComponent], imports: [CommonModule, PaginatorModule], exports: [PTNotificationsPageComponent] }); }
12265
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationsPageModule, imports: [CommonModule, PaginatorModule] }); }
12266
+ }
12267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PTNotificationsPageModule, decorators: [{
12268
+ type: NgModule,
12269
+ args: [{
12270
+ declarations: [PTNotificationsPageComponent],
12271
+ imports: [CommonModule, PaginatorModule],
12272
+ exports: [PTNotificationsPageComponent],
12273
+ }]
12274
+ }] });
12275
+
11645
12276
  // projects/ng-prime-tools/src/lib/models/form-multi-select.model.ts
11646
12277
 
11647
12278
  // projects/ng-prime-tools/src/lib/models/pt-accordion-config.model.ts
@@ -11708,5 +12339,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
11708
12339
  * Generated bundle index. Do not edit.
11709
12340
  */
11710
12341
 
11711
- export { AlignEnum, BadgeType, BadgeTypeStyles, ButtonColorEnum, DateUtilityService, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgPrimeToolsModule, PTAccordionComponent, PTAccordionModule, PTAccordionPanelDirective, PTAdvancedPrimeTableComponent, PTAdvancedPrimeTableModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChangePasswordPageComponent, PTChangePasswordPageModule, PTChartComparisonComponent, PTChartComparisonModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTConfirmDialogComponent, PTConfirmDialogModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTGroupComponent, PTGroupModule, PTLineChartComponent, PTLineChartModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTMetricPanelComponent, PTMetricPanelModule, PTMultiSelectComponent, PTMultiSelectModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNewsTickerComponent, PTNewsTickerDirection, PTNewsTickerModule, PTNewsTickerTrend, PTNewsTickerType, PTNotificationComponent, PTNotificationModule, PTNumberInputComponent, PTNumberInputModule, PTOtpInputComponent, PTOtpInputModule, PTOtpPageComponent, PTOtpPageModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTPasswordInputComponent, PTPasswordInputModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, PTToastNotifierComponent, PTToastNotifierModule, SearchCriteriaTypeEnum, SeverityEnum, TableTypeEnum };
12342
+ export { AlignEnum, BadgeType, BadgeTypeStyles, ButtonColorEnum, DateUtilityService, FormInputTypeEnum, InputValidationEnum, MultiSearchCriteriaComponent, MultiSearchCriteriaModule, NgPrimeToolsModule, PTAccordionComponent, PTAccordionModule, PTAccordionPanelDirective, PTAdvancedPrimeTableComponent, PTAdvancedPrimeTableModule, PTBreadCrumbComponent, PTBreadCrumbModule, PTButtonComponent, PTButtonModule, PTCardComponent, PTCardModule, PTChangePasswordPageComponent, PTChangePasswordPageModule, PTChartComparisonComponent, PTChartComparisonModule, PTChartComponent, PTChartModule, PTCheckBoxInputComponent, PTCheckBoxInputModule, PTConfirmDialogComponent, PTConfirmDialogModule, PTDateInputComponent, PTDateInputModule, PTDialogComponent, PTDialogModule, PTDropdownComponent, PTDropdownModule, PTFooterComponent, PTFooterModule, PTFormBuilderComponent, PTFormBuilderModule, PTGroupComponent, PTGroupModule, PTLineChartComponent, PTLineChartModule, PTLoginPageComponent, PTLoginPageModule, PTMenuComponent, PTMenuFancyComponent, PTMenuFancyModule, PTMenuModule, PTMetricCardComponent, PTMetricCardGroupComponent, PTMetricCardGroupModule, PTMetricCardModule, PTMetricPanelComponent, PTMetricPanelModule, PTMultiSelectComponent, PTMultiSelectModule, PTNavbarMenuComponent, PTNavbarMenuModule, PTNewsTickerComponent, PTNewsTickerDirection, PTNewsTickerModule, PTNewsTickerTrend, PTNewsTickerType, PTNotificationComponent, PTNotificationModule, PTNotificationsPageComponent, PTNotificationsPageModule, PTNumberInputComponent, PTNumberInputModule, PTOtpInputComponent, PTOtpInputModule, PTOtpPageComponent, PTOtpPageModule, PTPageSkeletonComponent, PTPageSkeletonModule, PTPasswordInputComponent, PTPasswordInputModule, PTSideBarMenuComponent, PTSideBarMenuModule, PTSwitchInputComponent, PTSwitchInputModule, PTTextAreaInputComponent, PTTextAreaInputModule, PTTextInputComponent, PTTextInputModule, PTToastNotifierComponent, PTToastNotifierModule, SearchCriteriaTypeEnum, SeverityEnum, TableTypeEnum };
11712
12343
  //# sourceMappingURL=ng-prime-tools.mjs.map