@memberjunction/ng-explorer-core 6.1.4 → 6.2.0-edge.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-routing.module.d.ts +23 -1
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +73 -17
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +1 -8
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/command-palette/command-palette.component.d.ts +7 -1
- package/dist/lib/command-palette/command-palette.component.d.ts.map +1 -1
- package/dist/lib/command-palette/command-palette.component.js +28 -14
- package/dist/lib/command-palette/command-palette.component.js.map +1 -1
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts +103 -13
- package/dist/lib/conversation-feedback/conversation-feedback.d.ts.map +1 -1
- package/dist/lib/conversation-feedback/conversation-feedback.js +219 -67
- package/dist/lib/conversation-feedback/conversation-feedback.js.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts +64 -10
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.d.ts.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +172 -66
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js.map +1 -1
- package/dist/lib/generic/resource-container-component.d.ts +19 -5
- package/dist/lib/generic/resource-container-component.d.ts.map +1 -1
- package/dist/lib/generic/resource-container-component.js +43 -13
- package/dist/lib/generic/resource-container-component.js.map +1 -1
- package/dist/lib/guards/entities.guard.d.ts +4 -0
- package/dist/lib/guards/entities.guard.d.ts.map +1 -1
- package/dist/lib/guards/entities.guard.js +10 -2
- package/dist/lib/guards/entities.guard.js.map +1 -1
- package/dist/lib/identity-claims/claim-redeem.component.d.ts +4 -0
- package/dist/lib/identity-claims/claim-redeem.component.d.ts.map +1 -1
- package/dist/lib/identity-claims/claim-redeem.component.js +10 -2
- package/dist/lib/identity-claims/claim-redeem.component.js.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.d.ts +4 -0
- package/dist/lib/oauth/oauth-callback.component.d.ts.map +1 -1
- package/dist/lib/oauth/oauth-callback.component.js +10 -2
- package/dist/lib/oauth/oauth-callback.component.js.map +1 -1
- package/dist/lib/profile/profile-dialog.component.d.ts.map +1 -1
- package/dist/lib/profile/profile-dialog.component.js +194 -191
- package/dist/lib/profile/profile-dialog.component.js.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts +20 -2
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.js +33 -9
- package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts +80 -10
- package/dist/lib/resource-wrappers/chat-collections-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js +168 -56
- package/dist/lib/resource-wrappers/chat-collections-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +186 -23
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +500 -177
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts +2 -0
- package/dist/lib/resource-wrappers/chat-deeplink-params.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.js +5 -1
- package/dist/lib/resource-wrappers/chat-deeplink-params.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts +25 -0
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/chat-search-routing.js +24 -0
- package/dist/lib/resource-wrappers/chat-search-routing.js.map +1 -0
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts +14 -2
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js +32 -8
- package/dist/lib/resource-wrappers/chat-tasks-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +54 -8
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +138 -46
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +223 -30
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js +438 -118
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +7 -3
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +23 -15
- package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +68 -10
- package/dist/lib/resource-wrappers/view-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +178 -62
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/services/startup-validation.service.d.ts +4 -0
- package/dist/lib/services/startup-validation.service.d.ts.map +1 -1
- package/dist/lib/services/startup-validation.service.js +10 -2
- package/dist/lib/services/startup-validation.service.js.map +1 -1
- package/dist/lib/services/system-validation.service.d.ts +13 -1
- package/dist/lib/services/system-validation.service.d.ts.map +1 -1
- package/dist/lib/services/system-validation.service.js +29 -5
- package/dist/lib/services/system-validation.service.js.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts +54 -4
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.d.ts.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js +130 -40
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts +29 -1
- package/dist/lib/shell/components/header/app-nav.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-nav.component.js +56 -12
- package/dist/lib/shell/components/header/app-nav.component.js.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.d.ts +33 -5
- package/dist/lib/shell/components/header/app-switcher.component.d.ts.map +1 -1
- package/dist/lib/shell/components/header/app-switcher.component.js +85 -29
- package/dist/lib/shell/components/header/app-switcher.component.js.map +1 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.d.ts +7 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.d.ts.map +1 -1
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.js +63 -9
- package/dist/lib/shell/components/record-open/record-origin-crumb.component.js.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts +30 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.js +63 -15
- package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts +99 -9
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +310 -110
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/loading-themes.d.ts +16 -12
- package/dist/lib/shell/loading-themes.d.ts.map +1 -1
- package/dist/lib/shell/loading-themes.js +145 -137
- package/dist/lib/shell/loading-themes.js.map +1 -1
- package/dist/lib/shell/readiness-beacon.d.ts +24 -0
- package/dist/lib/shell/readiness-beacon.d.ts.map +1 -0
- package/dist/lib/shell/readiness-beacon.js +40 -0
- package/dist/lib/shell/readiness-beacon.js.map +1 -0
- package/dist/lib/shell/services/about-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/about-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/about-dialog.service.js +16 -4
- package/dist/lib/shell/services/about-dialog.service.js.map +1 -1
- package/dist/lib/shell/services/profile-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/profile-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/profile-dialog.service.js +16 -4
- package/dist/lib/shell/services/profile-dialog.service.js.map +1 -1
- package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts +6 -0
- package/dist/lib/shell/services/user-sharing-center-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/user-sharing-center-dialog.service.js +15 -3
- package/dist/lib/shell/services/user-sharing-center-dialog.service.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +275 -40
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +704 -290
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +64 -8
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +129 -37
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts +26 -2
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js +48 -10
- package/dist/lib/single-dashboard/Components/delete-item/delete-item.component.js.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +84 -6
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +133 -29
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +173 -23
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +383 -109
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts +383 -55
- package/dist/lib/single-list-detail/single-list-detail.component.d.ts.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +962 -326
- package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
- package/dist/lib/single-query/single-query.component.d.ts +22 -2
- package/dist/lib/single-query/single-query.component.d.ts.map +1 -1
- package/dist/lib/single-query/single-query.component.js +40 -10
- package/dist/lib/single-query/single-query.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.d.ts +41 -3
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +71 -11
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.d.ts +23 -3
- package/dist/lib/single-search-result/single-search-result.component.d.ts.map +1 -1
- package/dist/lib/single-search-result/single-search-result.component.js +42 -12
- package/dist/lib/single-search-result/single-search-result.component.js.map +1 -1
- package/dist/lib/system-validation/system-validation-banner.component.d.ts +12 -2
- package/dist/lib/system-validation/system-validation-banner.component.d.ts.map +1 -1
- package/dist/lib/system-validation/system-validation-banner.component.js +25 -5
- package/dist/lib/system-validation/system-validation-banner.component.js.map +1 -1
- package/dist/lib/user-menu/user-menu.types.d.ts +4 -0
- package/dist/lib/user-menu/user-menu.types.d.ts.map +1 -1
- package/dist/lib/user-menu/user-menu.types.js +10 -2
- package/dist/lib/user-menu/user-menu.types.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +59 -7
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +151 -47
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/lib/user-profile/user-profile.component.d.ts +3 -2
- package/dist/lib/user-profile/user-profile.component.d.ts.map +1 -1
- package/dist/lib/user-profile/user-profile.component.js +5 -4
- package/dist/lib/user-profile/user-profile.component.js.map +1 -1
- package/package.json +52 -52
|
@@ -364,27 +364,75 @@ const PREVIEW_MAX_CHARS = 240;
|
|
|
364
364
|
/** How often the snapshot relative-time labels refresh. */
|
|
365
365
|
const RELATIVE_REFRESH_MS = 60_000;
|
|
366
366
|
export class UserNotificationsComponent extends BaseAngularComponent {
|
|
367
|
-
|
|
367
|
+
SharedService;
|
|
368
368
|
navigationService;
|
|
369
369
|
appManager;
|
|
370
370
|
cdr = inject(ChangeDetectorRef);
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
371
|
+
RadioSelected = 'All';
|
|
372
|
+
/** @deprecated Use {@link RadioSelected}. */
|
|
373
|
+
get radioSelected() {
|
|
374
|
+
return this.RadioSelected;
|
|
375
|
+
}
|
|
376
|
+
/** @deprecated Use {@link RadioSelected}. */
|
|
377
|
+
set radioSelected(value) {
|
|
378
|
+
this.RadioSelected = value;
|
|
379
|
+
}
|
|
380
|
+
CurrentFilter = '';
|
|
381
|
+
/** @deprecated Use {@link CurrentFilter}. */
|
|
382
|
+
get currentFilter() {
|
|
383
|
+
return this.CurrentFilter;
|
|
384
|
+
}
|
|
385
|
+
/** @deprecated Use {@link CurrentFilter}. */
|
|
386
|
+
set currentFilter(value) {
|
|
387
|
+
this.CurrentFilter = value;
|
|
388
|
+
}
|
|
389
|
+
NotificationTypes = [];
|
|
390
|
+
/** @deprecated Use {@link NotificationTypes}. */
|
|
391
|
+
get notificationTypes() {
|
|
392
|
+
return this.NotificationTypes;
|
|
393
|
+
}
|
|
394
|
+
/** @deprecated Use {@link NotificationTypes}. */
|
|
395
|
+
set notificationTypes(value) {
|
|
396
|
+
this.NotificationTypes = value;
|
|
397
|
+
}
|
|
398
|
+
SelectedTypeFilter = null;
|
|
399
|
+
/** @deprecated Use {@link SelectedTypeFilter}. */
|
|
400
|
+
get selectedTypeFilter() {
|
|
401
|
+
return this.SelectedTypeFilter;
|
|
402
|
+
}
|
|
403
|
+
/** @deprecated Use {@link SelectedTypeFilter}. */
|
|
404
|
+
set selectedTypeFilter(value) {
|
|
405
|
+
this.SelectedTypeFilter = value;
|
|
406
|
+
}
|
|
407
|
+
LoadingTypes = true;
|
|
408
|
+
/** @deprecated Use {@link LoadingTypes}. */
|
|
409
|
+
get loadingTypes() {
|
|
410
|
+
return this.LoadingTypes;
|
|
411
|
+
}
|
|
412
|
+
/** @deprecated Use {@link LoadingTypes}. */
|
|
413
|
+
set loadingTypes(value) {
|
|
414
|
+
this.LoadingTypes = value;
|
|
415
|
+
}
|
|
376
416
|
/** IDs of cards currently expanded to their full rendered content. */
|
|
377
417
|
Expanded = new Set();
|
|
378
418
|
groups = [];
|
|
379
419
|
groupsKey = '';
|
|
380
420
|
vmCache = new Map();
|
|
381
421
|
relativeTimer = null;
|
|
382
|
-
constructor(
|
|
422
|
+
constructor(SharedService, navigationService, appManager) {
|
|
383
423
|
super();
|
|
384
|
-
this.
|
|
424
|
+
this.SharedService = SharedService;
|
|
385
425
|
this.navigationService = navigationService;
|
|
386
426
|
this.appManager = appManager;
|
|
387
427
|
}
|
|
428
|
+
/** @deprecated Use {@link SharedService}. */
|
|
429
|
+
get sharedService() {
|
|
430
|
+
return this.SharedService;
|
|
431
|
+
}
|
|
432
|
+
/** @deprecated Use {@link SharedService}. */
|
|
433
|
+
set sharedService(value) {
|
|
434
|
+
this.SharedService = value;
|
|
435
|
+
}
|
|
388
436
|
async ngOnInit() {
|
|
389
437
|
this.loadNotificationTypes();
|
|
390
438
|
// Refresh the snapshot relative-time labels between change-detection passes.
|
|
@@ -397,7 +445,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
397
445
|
}, RELATIVE_REFRESH_MS);
|
|
398
446
|
}
|
|
399
447
|
ngAfterViewInit() {
|
|
400
|
-
this.
|
|
448
|
+
this.SharedService.InvokeManualResize(); // make sure the notifications component is sized correctly
|
|
401
449
|
}
|
|
402
450
|
ngOnDestroy() {
|
|
403
451
|
if (this.relativeTimer != null) {
|
|
@@ -407,7 +455,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
407
455
|
loadNotificationTypes() {
|
|
408
456
|
// Get notification types from UserInfoEngine cache, sorted client-side
|
|
409
457
|
// UserInfoEngine is auto-configured via @RegisterForStartup()
|
|
410
|
-
this.
|
|
458
|
+
this.NotificationTypes = [...UserInfoEngine.Instance.NotificationTypes].sort((a, b) => {
|
|
411
459
|
const priorityA = a.Priority ?? 999;
|
|
412
460
|
const priorityB = b.Priority ?? 999;
|
|
413
461
|
if (priorityA !== priorityB) {
|
|
@@ -415,14 +463,14 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
415
463
|
}
|
|
416
464
|
return a.Name.localeCompare(b.Name);
|
|
417
465
|
});
|
|
418
|
-
this.
|
|
466
|
+
this.LoadingTypes = false;
|
|
419
467
|
}
|
|
420
468
|
// ========================================================================
|
|
421
469
|
// Data shaping (filter → view models → day groups)
|
|
422
470
|
// ========================================================================
|
|
423
471
|
get NotificationsToShow() {
|
|
424
472
|
let temp = [];
|
|
425
|
-
switch (this.
|
|
473
|
+
switch (this.RadioSelected) {
|
|
426
474
|
case 'All':
|
|
427
475
|
temp = this.AllNotifications;
|
|
428
476
|
break;
|
|
@@ -434,14 +482,14 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
434
482
|
break;
|
|
435
483
|
}
|
|
436
484
|
// Apply type filter if selected
|
|
437
|
-
if (this.
|
|
438
|
-
temp = temp.filter(n => UUIDsEqual(n.NotificationTypeID, this.
|
|
485
|
+
if (this.SelectedTypeFilter) {
|
|
486
|
+
temp = temp.filter(n => UUIDsEqual(n.NotificationTypeID, this.SelectedTypeFilter));
|
|
439
487
|
}
|
|
440
488
|
// Apply text filter if it is not empty
|
|
441
|
-
if (this.
|
|
489
|
+
if (this.CurrentFilter.trim().length > 0) {
|
|
442
490
|
// check for inclusion of filter value in title or message
|
|
443
|
-
temp = temp.filter(n => n.Title?.toLowerCase().includes(this.
|
|
444
|
-
n.Message?.toLowerCase().includes(this.
|
|
491
|
+
temp = temp.filter(n => n.Title?.toLowerCase().includes(this.CurrentFilter.trim().toLowerCase()) ||
|
|
492
|
+
n.Message?.toLowerCase().includes(this.CurrentFilter.trim().toLowerCase()));
|
|
445
493
|
}
|
|
446
494
|
return temp;
|
|
447
495
|
}
|
|
@@ -453,7 +501,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
453
501
|
get Groups() {
|
|
454
502
|
const list = this.NotificationsToShow;
|
|
455
503
|
const unread = list.filter(n => n.Unread).length;
|
|
456
|
-
const key = `${list.length}|${unread}|${this.
|
|
504
|
+
const key = `${list.length}|${unread}|${this.RadioSelected}|${this.SelectedTypeFilter}|${this.CurrentFilter}|${list[0]?.ID ?? ''}|${list[list.length - 1]?.ID ?? ''}`;
|
|
457
505
|
if (key !== this.groupsKey) {
|
|
458
506
|
this.groups = this.buildGroups(list);
|
|
459
507
|
this.groupsKey = key;
|
|
@@ -477,7 +525,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
477
525
|
const cached = this.vmCache.get(n.ID);
|
|
478
526
|
if (cached) {
|
|
479
527
|
cached.N = n;
|
|
480
|
-
cached.Clickable = this.
|
|
528
|
+
cached.Clickable = this.IsNotificationClickable(n);
|
|
481
529
|
return cached;
|
|
482
530
|
}
|
|
483
531
|
const { kind, body, preview, expandable } = this.classifyMessage(n.Message ?? '');
|
|
@@ -488,7 +536,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
488
536
|
Preview: preview,
|
|
489
537
|
Expandable: expandable,
|
|
490
538
|
Relative: this.relativeTime(n.__mj_CreatedAt),
|
|
491
|
-
Clickable: this.
|
|
539
|
+
Clickable: this.IsNotificationClickable(n),
|
|
492
540
|
};
|
|
493
541
|
this.vmCache.set(n.ID, vm);
|
|
494
542
|
return vm;
|
|
@@ -584,7 +632,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
584
632
|
this.Expanded.add(vm.N.ID);
|
|
585
633
|
// Reading the full content is reading — mark it as such.
|
|
586
634
|
if (vm.N.Unread) {
|
|
587
|
-
void this.
|
|
635
|
+
void this.MarkAsRead(vm.N, true, null);
|
|
588
636
|
}
|
|
589
637
|
}
|
|
590
638
|
this.cdr.markForCheck();
|
|
@@ -592,7 +640,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
592
640
|
// ========================================================================
|
|
593
641
|
// Clickability + navigation (unchanged behavior)
|
|
594
642
|
// ========================================================================
|
|
595
|
-
|
|
643
|
+
IsNotificationClickable(notification) {
|
|
596
644
|
// Check for special types navigated via NavigationService (not a URL)
|
|
597
645
|
if (notification.ResourceConfiguration && notification.ResourceConfiguration.trim().length > 0) {
|
|
598
646
|
const config = SafeJSONParse(notification.ResourceConfiguration);
|
|
@@ -604,20 +652,24 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
604
652
|
return true;
|
|
605
653
|
}
|
|
606
654
|
}
|
|
607
|
-
const info = this.
|
|
655
|
+
const info = this.NotificationUrl(notification);
|
|
608
656
|
return (info !== null && info.urlParts && info.urlParts.length > 0);
|
|
609
657
|
}
|
|
610
|
-
|
|
658
|
+
/** @deprecated Use {@link IsNotificationClickable}. */
|
|
659
|
+
isNotificationClickable(notification) {
|
|
660
|
+
return this.IsNotificationClickable(notification);
|
|
661
|
+
}
|
|
662
|
+
NotificationUrl(notification) {
|
|
611
663
|
const url = [];
|
|
612
664
|
let queryString = '';
|
|
613
665
|
if (notification.ResourceRecordID && notification.ResourceRecordID.length > 0 &&
|
|
614
666
|
notification.ResourceTypeID && notification.ResourceTypeID.length > 0) {
|
|
615
667
|
// we have a resource here, like a Report, Dashboard, etc
|
|
616
668
|
// we can generate a url to navigate to it
|
|
617
|
-
const rt = this.
|
|
669
|
+
const rt = this.SharedService.ResourceTypeByID(notification.ResourceTypeID);
|
|
618
670
|
let routeSegment;
|
|
619
671
|
if (rt)
|
|
620
|
-
routeSegment = this.
|
|
672
|
+
routeSegment = this.SharedService.mapResourceTypeNameToRouteSegment(rt.Name);
|
|
621
673
|
if (rt && routeSegment && routeSegment.trim().length > 0) {
|
|
622
674
|
url.push('resource');
|
|
623
675
|
url.push(routeSegment);
|
|
@@ -658,6 +710,10 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
658
710
|
}
|
|
659
711
|
return { urlParts: url, queryString };
|
|
660
712
|
}
|
|
713
|
+
/** @deprecated Use {@link NotificationUrl}. */
|
|
714
|
+
notificationUrl(notification) {
|
|
715
|
+
return this.NotificationUrl(notification);
|
|
716
|
+
}
|
|
661
717
|
get AllNotifications() {
|
|
662
718
|
return SharedService.UserNotifications;
|
|
663
719
|
}
|
|
@@ -667,13 +723,21 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
667
723
|
get ReadNotifications() {
|
|
668
724
|
return this.AllNotifications.filter(n => !n.Unread);
|
|
669
725
|
}
|
|
726
|
+
SelectReadOption(option) {
|
|
727
|
+
this.RadioSelected = option;
|
|
728
|
+
}
|
|
729
|
+
/** @deprecated Use {@link SelectReadOption}. */
|
|
670
730
|
selectReadOption(option) {
|
|
671
|
-
this.
|
|
731
|
+
return this.SelectReadOption(option);
|
|
732
|
+
}
|
|
733
|
+
OnFilterChanged(value) {
|
|
734
|
+
this.CurrentFilter = value;
|
|
672
735
|
}
|
|
736
|
+
/** @deprecated Use {@link OnFilterChanged}. */
|
|
673
737
|
onFilterChanged(value) {
|
|
674
|
-
this.
|
|
738
|
+
return this.OnFilterChanged(value);
|
|
675
739
|
}
|
|
676
|
-
async
|
|
740
|
+
async MarkAsRead(notification, bRead, transGroup) {
|
|
677
741
|
if (notification) {
|
|
678
742
|
const notificationId = notification.ID;
|
|
679
743
|
notification.Unread = !bRead;
|
|
@@ -707,13 +771,25 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
707
771
|
return false;
|
|
708
772
|
}
|
|
709
773
|
}
|
|
774
|
+
/** @deprecated Use {@link MarkAsRead}. */
|
|
775
|
+
async markAsRead(notification, bRead, transGroup) {
|
|
776
|
+
return this.MarkAsRead(notification, bRead, transGroup);
|
|
777
|
+
}
|
|
778
|
+
async MarkAllAsRead() {
|
|
779
|
+
await this.MarkAll(true);
|
|
780
|
+
}
|
|
781
|
+
/** @deprecated Use {@link MarkAllAsRead}. */
|
|
710
782
|
async markAllAsRead() {
|
|
711
|
-
|
|
783
|
+
return this.MarkAllAsRead();
|
|
784
|
+
}
|
|
785
|
+
async MarkAllAsUnread() {
|
|
786
|
+
await this.MarkAll(false);
|
|
712
787
|
}
|
|
788
|
+
/** @deprecated Use {@link MarkAllAsUnread}. */
|
|
713
789
|
async markAllAsUnread() {
|
|
714
|
-
|
|
790
|
+
return this.MarkAllAsUnread();
|
|
715
791
|
}
|
|
716
|
-
async
|
|
792
|
+
async MarkAll(bRead) {
|
|
717
793
|
// Use transaction group for batching - all saves are queued and sent in one round-trip
|
|
718
794
|
const md = this.ProviderToUse;
|
|
719
795
|
const transGroup = await md.CreateTransactionGroup();
|
|
@@ -721,19 +797,23 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
721
797
|
for (const notification of this.AllNotifications) {
|
|
722
798
|
if (notification.Unread && bRead || !notification.Unread && !bRead) {
|
|
723
799
|
// Don't await - Save() with transaction group queues the operation immediately
|
|
724
|
-
this.
|
|
800
|
+
this.MarkAsRead(notification, bRead, transGroup);
|
|
725
801
|
}
|
|
726
802
|
}
|
|
727
803
|
// Submit transaction group - this is where the actual network call happens
|
|
728
804
|
if (!await transGroup.Submit())
|
|
729
|
-
this.
|
|
805
|
+
this.SharedService.CreateSimpleNotification('Unable to mark all notifications as read', 'error', 5000);
|
|
730
806
|
else
|
|
731
807
|
SharedService.RefreshUserNotifications();
|
|
732
808
|
}
|
|
733
|
-
|
|
734
|
-
|
|
809
|
+
/** @deprecated Use {@link MarkAll}. */
|
|
810
|
+
async markAll(bRead) {
|
|
811
|
+
return this.MarkAll(bRead);
|
|
812
|
+
}
|
|
813
|
+
NotificationClicked(notification) {
|
|
814
|
+
if (this.IsNotificationClickable(notification)) {
|
|
735
815
|
// also mark this as read when we click it
|
|
736
|
-
this.
|
|
816
|
+
this.MarkAsRead(notification, true, null);
|
|
737
817
|
// Check for special navigation types that use NavigationService (not router)
|
|
738
818
|
if (this.navigateToAgentRequest(notification)) {
|
|
739
819
|
return;
|
|
@@ -747,6 +827,10 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
747
827
|
this.navigateToResource(notification);
|
|
748
828
|
}
|
|
749
829
|
}
|
|
830
|
+
/** @deprecated Use {@link NotificationClicked}. */
|
|
831
|
+
notificationClicked(notification) {
|
|
832
|
+
return this.NotificationClicked(notification);
|
|
833
|
+
}
|
|
750
834
|
/**
|
|
751
835
|
* Opens the Meet app's Live Room in JOIN mode for a `meet-room` invite notification (the
|
|
752
836
|
* `{ type:'meet-room', room }` ResourceConfiguration), mirroring {@link navigateToConversation}.
|
|
@@ -778,7 +862,7 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
778
862
|
navigateToResource(notification) {
|
|
779
863
|
if (!notification.ResourceRecordID || !notification.ResourceTypeID)
|
|
780
864
|
return;
|
|
781
|
-
const rt = this.
|
|
865
|
+
const rt = this.SharedService.ResourceTypeByID(notification.ResourceTypeID);
|
|
782
866
|
if (!rt)
|
|
783
867
|
return;
|
|
784
868
|
const recordId = notification.ResourceRecordID.toString();
|
|
@@ -861,25 +945,45 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
861
945
|
this.navigationService.OpenNavItemByName('Conversations', navConfig, chatApp.ID);
|
|
862
946
|
return true;
|
|
863
947
|
}
|
|
864
|
-
|
|
948
|
+
GetNotificationType(typeId) {
|
|
865
949
|
if (!typeId)
|
|
866
950
|
return null;
|
|
867
|
-
return this.
|
|
951
|
+
return this.NotificationTypes.find(t => UUIDsEqual(t.ID, typeId)) || null;
|
|
868
952
|
}
|
|
869
|
-
|
|
870
|
-
|
|
953
|
+
/** @deprecated Use {@link GetNotificationType}. */
|
|
954
|
+
getNotificationType(typeId) {
|
|
955
|
+
return this.GetNotificationType(typeId);
|
|
956
|
+
}
|
|
957
|
+
GetTypeIcon(notification) {
|
|
958
|
+
const type = this.GetNotificationType(notification.NotificationTypeID);
|
|
871
959
|
return type?.Icon || 'fa-bell';
|
|
872
960
|
}
|
|
873
|
-
|
|
874
|
-
|
|
961
|
+
/** @deprecated Use {@link GetTypeIcon}. */
|
|
962
|
+
getTypeIcon(notification) {
|
|
963
|
+
return this.GetTypeIcon(notification);
|
|
964
|
+
}
|
|
965
|
+
GetTypeColor(notification) {
|
|
966
|
+
const type = this.GetNotificationType(notification.NotificationTypeID);
|
|
875
967
|
return type?.Color || 'var(--mj-text-muted)';
|
|
876
968
|
}
|
|
877
|
-
|
|
878
|
-
|
|
969
|
+
/** @deprecated Use {@link GetTypeColor}. */
|
|
970
|
+
getTypeColor(notification) {
|
|
971
|
+
return this.GetTypeColor(notification);
|
|
972
|
+
}
|
|
973
|
+
GetTypeName(notification) {
|
|
974
|
+
const type = this.GetNotificationType(notification.NotificationTypeID);
|
|
879
975
|
return type ? type.Name : 'Notification';
|
|
880
976
|
}
|
|
977
|
+
/** @deprecated Use {@link GetTypeName}. */
|
|
978
|
+
getTypeName(notification) {
|
|
979
|
+
return this.GetTypeName(notification);
|
|
980
|
+
}
|
|
981
|
+
OnTypeFilterChange(typeId) {
|
|
982
|
+
this.SelectedTypeFilter = typeId;
|
|
983
|
+
}
|
|
984
|
+
/** @deprecated Use {@link OnTypeFilterChange}. */
|
|
881
985
|
onTypeFilterChange(typeId) {
|
|
882
|
-
this.
|
|
986
|
+
return this.OnTypeFilterChange(typeId);
|
|
883
987
|
}
|
|
884
988
|
static ɵfac = function UserNotificationsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || UserNotificationsComponent)(i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i1.NavigationService), i0.ɵɵdirectiveInject(i2.ApplicationManager)); };
|
|
885
989
|
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UserNotificationsComponent, selectors: [["app-user-notifications"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 17, vars: 4, consts: [[1, "notifications-container"], [1, "notifications-header"], [1, "header-top"], [1, "header-title"], [1, "title-icon"], [1, "fa-solid", "fa-bell"], [1, "title-text"], [1, "title-subtitle"], [1, "header-actions"], [1, "filters-section"], [1, "notifications-content"], ["Variant", "success", "Icon", "fa-solid fa-bell-slash", "Title", "No Notifications", "Message", "You're all caught up! New notifications will appear here."], ["Variant", "no-results", "Icon", "fa-solid fa-filter-circle-xmark", "Title", "No Matching Notifications", "Message", "Try adjusting your filters to see more notifications."], [1, "notifications-list"], ["type", "button", "aria-label", "Mark all notifications as read", 1, "action-btn", "action-btn-ghost"], ["type", "button", "aria-label", "Mark all notifications as unread", 1, "action-btn", "action-btn-secondary"], ["type", "button", "aria-label", "Mark all notifications as read", 1, "action-btn", "action-btn-ghost", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-check-double"], [1, "btn-text"], ["type", "button", "aria-label", "Mark all notifications as unread", 1, "action-btn", "action-btn-secondary", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-envelope"], [1, "filters-slider"], [1, "slider-content"], ["role", "group", "aria-label", "Filter notifications by read status", 1, "header-stats"], ["type", "button", "aria-label", "Show all notifications", 1, "stat-pill", 3, "click"], [1, "stat-label"], [1, "stat-count"], ["type", "button", "aria-label", "Show unread notifications", 1, "stat-pill", 3, "active", "has-unread"], ["type", "button", "aria-label", "Show read notifications", 1, "stat-pill", 3, "active"], [1, "filter-item", "type-filter-slider"], [1, "search-section"], [1, "search-container"], ["aria-hidden", "true", 1, "fa-solid", "fa-magnifying-glass", "search-icon"], ["type", "text", "placeholder", "Search notifications...", "aria-label", "Search notifications", 1, "search-input", 3, "input", "value"], [1, "filter-info"], ["type", "button", "aria-label", "Show unread notifications", 1, "stat-pill", 3, "click"], ["type", "button", "aria-label", "Show read notifications", 1, "stat-pill", 3, "click"], ["aria-label", "Filter by notification type", 1, "type-select", 3, "ngModelChange", "change", "ngModel"], [3, "value"], [1, "filter-badge"], ["aria-hidden", "true", 1, "fa-solid", "fa-filter"], [1, "group-label"], ["role", "article", 1, "notification-card", 3, "unread", "expanded", "clickable"], ["role", "article", 1, "notification-card"], ["aria-hidden", "true", 1, "card-indicator"], ["aria-hidden", "true", 1, "card-icon"], [1, "card-content", 3, "click"], [1, "card-header"], [1, "card-title"], [1, "card-time", 3, "title"], [1, "card-meta"], [1, "card-type"], [1, "card-open-hint"], [1, "card-message"], [1, "card-rich"], ["type", "button", 1, "card-expand-btn"], [1, "card-actions"], ["type", "button", "title", "Mark as Read", 1, "card-action-btn"], ["type", "button", "title", "Mark as Unread", 1, "card-action-btn"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrow-up-right-from-square"], [1, "card-rich", 3, "click"], [1, "card-rich-html", 3, "innerHTML"], [1, "card-rich-md", 3, "data", "enableMermaid"], [1, "card-message", "card-message-full"], ["type", "button", 1, "card-expand-btn", 3, "click"], ["aria-hidden", "true", 1, "fa-solid"], ["type", "button", "title", "Mark as Read", 1, "card-action-btn", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-check"], [1, "action-text"], ["type", "button", "title", "Mark as Unread", 1, "card-action-btn", 3, "click"]], template: function UserNotificationsComponent_Template(rf, ctx) { if (rf & 1) {
|