@acorex-platform/module-communication-management-client 1.0.1 → 2.0.0-beta.0

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.
Files changed (45) hide show
  1. package/fesm2022/{acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-j4HNwZEj.mjs → acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-Byqo1BAL.mjs} +381 -226
  2. package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-Byqo1BAL.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-send.command-BwdbP0wm.mjs → acorex-platform-module-communication-management-client-communication-email-send.command-DjOOsW25.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-send.command-BwdbP0wm.mjs.map → acorex-platform-module-communication-management-client-communication-email-send.command-DjOOsW25.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-show-dialog.command-D63L_w8I.mjs → acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CNgMVOFx.mjs} +1 -1
  6. package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-show-dialog.command-D63L_w8I.mjs.map → acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CNgMVOFx.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-DGnr-vVQ.mjs → acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-Bk5Zx0GW.mjs} +13 -3
  8. package/fesm2022/acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-Bk5Zx0GW.mjs.map +1 -0
  9. package/fesm2022/{acorex-platform-module-communication-management-client-communication-send.command-DtGeXWNS.mjs → acorex-platform-module-communication-management-client-communication-send.command-D7TIw1-P.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-communication-management-client-communication-send.command-DtGeXWNS.mjs.map → acorex-platform-module-communication-management-client-communication-send.command-D7TIw1-P.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs → acorex-platform-module-communication-management-client-communication-show-sent-message.command-BhsqhXKA.mjs} +1 -1
  12. package/fesm2022/{acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs.map → acorex-platform-module-communication-management-client-communication-show-sent-message.command-BhsqhXKA.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-communication-management-client-communication-test-smtp.command-nZH0GlLw.mjs → acorex-platform-module-communication-management-client-communication-test-smtp.command-BN0gkpAr.mjs} +2 -2
  14. package/fesm2022/{acorex-platform-module-communication-management-client-communication-test-smtp.command-nZH0GlLw.mjs.map → acorex-platform-module-communication-management-client-communication-test-smtp.command-BN0gkpAr.mjs.map} +1 -1
  15. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.mjs +4 -2
  16. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.mjs.map +1 -1
  17. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication.mjs +4 -0
  18. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication.mjs.map +1 -1
  19. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-entity-change-notify-policy.mjs +1 -1
  20. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-entity-change-notify-policy.mjs.map +1 -1
  21. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-DTHjzWFn.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-DAS2LKJ2.mjs} +4 -4
  22. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-DTHjzWFn.mjs.map → acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-DAS2LKJ2.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DN0_CPBO.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-CNgzUWFa.mjs} +7 -5
  24. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-CNgzUWFa.mjs.map +1 -0
  25. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-BAa4oCXu.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-DM-x4id2.mjs} +7 -3
  26. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-DM-x4id2.mjs.map +1 -0
  27. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-entity-change-notify-policy.entity-DmM894ok.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-entity-change-notify-policy.entity-Ls-F3qVM.mjs} +3 -3
  28. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-entity-change-notify-policy.entity-Ls-F3qVM.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-status.keys-JESc4HlO.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-status.keys-DBsqvhwD.mjs} +1 -1
  30. package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-status.keys-JESc4HlO.mjs.map → acorex-platform-module-communication-management-client-contracts-entity-catalog-status.keys-DBsqvhwD.mjs.map} +1 -1
  31. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog.mjs +1 -1
  32. package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs +49 -2
  33. package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs.map +1 -1
  34. package/fesm2022/acorex-platform-module-communication-management-client.mjs +1 -1
  35. package/i18n/en-AU/communication-management.json +3 -1
  36. package/i18n/en-US/communication-management.json +3 -1
  37. package/i18n/fa-IR/communication-management.json +3 -1
  38. package/package.json +3 -3
  39. package/types/acorex-platform-module-communication-management-client-contracts.d.ts +43 -4
  40. package/types/acorex-platform-module-communication-management-client.d.ts +33 -5
  41. package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-j4HNwZEj.mjs.map +0 -1
  42. package/fesm2022/acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-DGnr-vVQ.mjs.map +0 -1
  43. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DN0_CPBO.mjs.map +0 -1
  44. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-BAa4oCXu.mjs.map +0 -1
  45. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-entity-change-notify-policy.entity-DmM894ok.mjs.map +0 -1
@@ -1,19 +1,19 @@
1
1
  import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/auth';
2
- import { AXPLocalEntityEngine, AXPLocalEntityRealtimeBridge, AXPLocalEntityOutboxService, AXPNetworkConnectivityService, axpLocalEntitySupportsOfflineWrite, axpIsLikelyNetworkFailure, AXP_IN_APP_NOTIFICATION_SERVICE, AXPSearchCommandProvider, AXP_PROTECTED_ROUTE_GUARDS, AXP_MENU_PROVIDER, AXP_STATUS_PROVIDERS, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/common';
2
+ import { AXPDataMutationService, AXPDataExecutionRuntime, AXPLocalEntityEngine, AXPEntityExecutionAdapter, AXPLocalEntityRealtimeBridge, AXPLocalEntityOutboxService, AXPDataSynchronizationService, AXP_IN_APP_NOTIFICATION_SERVICE, AXPSearchCommandProvider, AXP_PROTECTED_ROUTE_GUARDS, AXP_MENU_PROVIDER, AXP_STATUS_PROVIDERS, AXP_SEARCH_PROVIDER, AXP_SETTING_DEFINITION_PROVIDER } from '@acorex-platform/framework-client/common';
3
3
  import * as i1$2 from '@acorex-platform/framework-client/core';
4
- import { provideAppStartUpTask, AXP_APP_STARTUP_PRIORITY, AXPComponentSlotModule } from '@acorex-platform/framework-client/core';
4
+ import { provideAppStartUpTask, AXPEntityBroadcastService, AXP_APP_STARTUP_PRIORITY, ensureRuntimeSurfaceClass, AXPComponentSlotModule } from '@acorex-platform/framework-client/core';
5
5
  import { AXPUserAvatarComponent, AXPUserCardDirective, AXPStateMessageComponent, AXP_TASK_BADGE_PROVIDERS } from '@acorex-platform/framework-client/layout/components';
6
6
  import { AXPRootLayoutComponent } from '@acorex-platform/framework-client/themes/default';
7
- import { AXPCommandService, provideCommandSetups } from '@acorex-platform/framework-client/runtime';
7
+ import { AXPCommandService, AXPQueryService, provideCommandSetups } from '@acorex-platform/framework-client/runtime';
8
8
  import * as i0 from '@angular/core';
9
9
  import { Injectable, InjectionToken, inject, DestroyRef, signal, computed, input, output, ChangeDetectionStrategy, Component, effect, viewChild, ViewEncapsulation, ChangeDetectorRef, NgModule } from '@angular/core';
10
10
  import { Router, ROUTES } from '@angular/router';
11
- import { AXP_COMMUNICATION_DELIVERY_STATUS_DEFINITION_KEY, AXP_COMMUNICATION_DELIVERY_STATUS_PENDING, AXP_COMMUNICATION_STATUS_DEFINITION_KEY, AXP_COMMUNICATION_STATUS_PENDING, RootConfig, resolveCommunicationMessage, AXPCollaborationPermissionKeys, AXMCommunicationManagementMenuKeys, AXMCommunicationManagementCommandKeys as AXMCommunicationManagementCommandKeys$1 } from '@acorex-platform/module-communication-management-client/contracts';
11
+ import { AXP_COMMUNICATION_DELIVERY_STATUS_DEFINITION_KEY, AXP_COMMUNICATION_DELIVERY_STATUS_PENDING, AXP_COMMUNICATION_STATUS_DEFINITION_KEY, AXP_COMMUNICATION_STATUS_PENDING, RootConfig, resolveCommunicationMessage, COMMUNICATION_ENTITY_NAME, COMMUNICATION_DELIVERY_ENTITY_NAME, AXPCollaborationPermissionKeys, AXMCommunicationManagementMenuKeys, AXMCommunicationManagementCommandKeys as AXMCommunicationManagementCommandKeys$1 } from '@acorex-platform/module-communication-management-client/contracts';
12
+ import { AXP_QUERY_QUICK_SEARCH_FIELD, runtimeCommandSuccessValue, AXPStatusProvider, resolveToSurfaceClass, containsHtmlMarkup, AXPWidgetsList, AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
12
13
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
13
- import { Subject, distinctUntilChanged, filter, debounceTime, merge, timer, switchMap, EMPTY } from 'rxjs';
14
- import { AXP_QUERY_QUICK_SEARCH_FIELD, AXPStatusProvider, containsHtmlMarkup, AXPWidgetsList, AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
15
- import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
16
- import { AXPRealtimeDispatcherService, AXP_REALTIME_TOPIC_INBOX_REFRESH, AXPRealtimeConnectionService } from '@acorex-platform/framework-client/realtime';
14
+ import { Subject, debounceTime, distinctUntilChanged, filter, merge } from 'rxjs';
15
+ import { AXPEntityService, AXPFileListComponent } from '@acorex-platform/framework-client/layout/entity';
16
+ import { AXPRealtimeDispatcherService, AXP_REALTIME_TOPIC_INBOX_REFRESH } from '@acorex-platform/framework-client/realtime';
17
17
  import * as i4$1 from '@acorex/components/badge';
18
18
  import { AXBadgeModule } from '@acorex/components/badge';
19
19
  import * as i3 from '@acorex/components/decorators';
@@ -42,15 +42,6 @@ import { cloneProperty, AXPWidgetGroupEnum } from '@acorex-platform/framework-sh
42
42
  import { defineDashboardWidgetDimensions, AXP_WIDGETS_UTILITY_CATEGORY, layoutFromDimensions } from '@acorex-platform/module-dashboard-management-client';
43
43
  import { AXP_STYLING_PROPERTY_GROUP, AXP_APPEARANCE_PROPERTY_GROUP, AXP_DATA_PATH_PROPERTY } from '@acorex-platform/framework-client/layout/widgets';
44
44
 
45
- //#region ----- Constants -----
46
- /** Local-entity engine key for the active in-app inbox hot subset. */
47
- const AXP_IN_APP_INBOX_LOCAL_ENTITY_KEY = 'CommunicationManagement.InAppInbox';
48
- /** Max active deliveries kept in the local hot subset. */
49
- const AXP_IN_APP_INBOX_LOCAL_MAX_ITEMS = 100;
50
- /** Legacy IndexedDB name from the inbox-only store (deleted on migrate). */
51
- const AXP_IN_APP_INBOX_LEGACY_DB_NAME = 'ACoreXInAppInbox';
52
- //#endregion
53
-
54
45
  //#region ---- Conversation in-app inbox mapping ----
55
46
  const IN_APP_CONVERSATION_CHAT_DEFINITION_KEY = 'conversation-chat-message';
56
47
  const IN_APP_CONVERSATION_OPEN_CHAT_COMMAND = 'Conversation:OpenChat';
@@ -261,6 +252,7 @@ function normalizeInAppInboxItem(item) {
261
252
  readAt: item.readAt ? new Date(item.readAt) : item.readAt ?? null,
262
253
  sender: item.sender,
263
254
  iconClass: item.iconClass ?? resolveInAppInboxIconClass(item),
255
+ iconColor: item.iconColor,
264
256
  showAvatar: item.showAvatar,
265
257
  priority: item.priority ?? 'Notice',
266
258
  isPinned: item.isPinned ?? false,
@@ -270,6 +262,7 @@ function normalizeInAppInboxItem(item) {
270
262
  recipientUserId: item.recipientUserId,
271
263
  archivedAt: item.archivedAt ? new Date(item.archivedAt) : item.archivedAt ?? null,
272
264
  actions: Array.isArray(item.actions) ? item.actions : undefined,
265
+ attachments: Array.isArray(item.attachments) ? item.attachments : undefined,
273
266
  };
274
267
  }
275
268
  //#endregion
@@ -319,6 +312,26 @@ function filterInAppInboxItemsLocally(items, filters) {
319
312
  }
320
313
  //#endregion
321
314
 
315
+ //#region ----- Constants -----
316
+ /** Local-entity engine key for the active in-app inbox hot subset. */
317
+ const AXP_IN_APP_INBOX_LOCAL_ENTITY_KEY = 'CommunicationManagement.InAppInbox';
318
+ /** Max active deliveries kept in the local hot subset. */
319
+ const AXP_IN_APP_INBOX_LOCAL_MAX_ITEMS = 100;
320
+ /** Legacy IndexedDB name from the inbox-only store (deleted on migrate). */
321
+ const AXP_IN_APP_INBOX_LEGACY_DB_NAME = 'ACoreXInAppInbox';
322
+ //#endregion
323
+
324
+ //#region ----- Inbox outbox actions -----
325
+ const AXP_IN_APP_INBOX_OUTBOX_ACTIONS = {
326
+ markSeen: 'markSeen',
327
+ markRead: 'markRead',
328
+ markAllRead: 'markAllRead',
329
+ togglePin: 'togglePin',
330
+ archive: 'archive',
331
+ delete: 'delete',
332
+ };
333
+ //#endregion
334
+
322
335
  //#region ---- In-app inbox realtime events ----
323
336
  class AXPInAppInboxRealtimeService {
324
337
  constructor() {
@@ -342,17 +355,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
342
355
  const AXP_IN_APP_INBOX_PORT = new InjectionToken('AXP_IN_APP_INBOX_PORT');
343
356
  //#endregion
344
357
 
345
- //#region ----- Inbox outbox actions -----
346
- const AXP_IN_APP_INBOX_OUTBOX_ACTIONS = {
347
- markSeen: 'markSeen',
348
- markRead: 'markRead',
349
- markAllRead: 'markAllRead',
350
- togglePin: 'togglePin',
351
- archive: 'archive',
352
- delete: 'delete',
353
- };
354
- //#endregion
355
-
356
358
  //#region ----- Imports -----
357
359
  //#endregion
358
360
  //#region ----- Shared in-app inbox connector -----
@@ -363,19 +365,28 @@ const AXP_IN_APP_INBOX_OUTBOX_ACTIONS = {
363
365
  * Archived views always load from the API.
364
366
  */
365
367
  class AXPInAppInboxConnectorService {
368
+ hasRetryableChanges() { return this.outbox.pendingFor(this.entityKey).some(op => op.status === 'pending' || op.status === 'failed'); }
366
369
  constructor() {
370
+ this.mutations = inject(AXPDataMutationService);
371
+ this.commands = inject(AXPCommandService);
372
+ this.queries = inject(AXPQueryService, { optional: true });
373
+ this.executionRuntime = inject(AXPDataExecutionRuntime, { optional: true });
367
374
  this.port = inject(AXP_IN_APP_INBOX_PORT);
368
375
  this.realtime = inject(AXPInAppInboxRealtimeService);
369
376
  this.engine = inject(AXPLocalEntityEngine);
377
+ this.dataPolicies = inject(AXPEntityExecutionAdapter);
378
+ this.policyCapabilitiesReady = import('@acorex-platform/module-communication-management-client/contracts').then(({ AXP_IN_APP_INBOX_DATA_CAPABILITIES }) => this.dataPolicies.register(AXP_IN_APP_INBOX_DATA_CAPABILITIES));
370
379
  this.localBridge = inject(AXPLocalEntityRealtimeBridge);
371
380
  this.outbox = inject(AXPLocalEntityOutboxService);
372
- this.connectivity = inject(AXPNetworkConnectivityService);
373
381
  this.sessionService = inject(AXPSessionService);
374
382
  this.destroyRef = inject(DestroyRef);
375
383
  this.entityKey = AXP_IN_APP_INBOX_LOCAL_ENTITY_KEY;
376
384
  this.localItems = this.engine.itemsSignal(this.entityKey);
377
385
  this.isLoading = signal(false, /* @ts-ignore */
378
386
  ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
387
+ this.bootstrapActive = signal(false, /* @ts-ignore */
388
+ ...(ngDevMode ? [{ debugName: "bootstrapActive" }] : /* istanbul ignore next */ []));
389
+ this.bootstrapGeneration = 0;
379
390
  this.pageLoading = signal(false, /* @ts-ignore */
380
391
  ...(ngDevMode ? [{ debugName: "pageLoading" }] : /* istanbul ignore next */ []));
381
392
  this.error = signal(null, /* @ts-ignore */
@@ -391,13 +402,20 @@ class AXPInAppInboxConnectorService {
391
402
  this.syncInFlight = null;
392
403
  this.boundUserKey = null;
393
404
  this.legacyDbCleanupDone = false;
405
+ this.unreadQueryKey = 'CommunicationManagement:Inbox:UnreadCount';
406
+ this.unreadSummary = signal(null, /* @ts-ignore */
407
+ ...(ngDevMode ? [{ debugName: "unreadSummary" }] : /* istanbul ignore next */ []));
394
408
  this.capabilities = this.port.capabilities;
395
- this.loading = computed(() => this.isLoading(), /* @ts-ignore */
409
+ this.loading = computed(() => this.isLoading() || this.bootstrapActive(), /* @ts-ignore */
396
410
  ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
397
411
  this.pageLoadingState = computed(() => this.pageLoading(), /* @ts-ignore */
398
412
  ...(ngDevMode ? [{ debugName: "pageLoadingState" }] : /* istanbul ignore next */ []));
399
413
  this.errorMessage = computed(() => this.error(), /* @ts-ignore */
400
414
  ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
415
+ this.blockedLegacyOperations = computed(() => this.outbox.legacyPendingFor(this.entityKey).length, /* @ts-ignore */
416
+ ...(ngDevMode ? [{ debugName: "blockedLegacyOperations" }] : /* istanbul ignore next */ []));
417
+ this.pendingChanges = computed(() => this.outbox.pendingFor(this.entityKey).length > 0, /* @ts-ignore */
418
+ ...(ngDevMode ? [{ debugName: "pendingChanges" }] : /* istanbul ignore next */ []));
401
419
  this.inboxList = computed(() => this.readLocalItems(), /* @ts-ignore */
402
420
  ...(ngDevMode ? [{ debugName: "inboxList" }] : /* istanbul ignore next */ []));
403
421
  this.total = computed(() => {
@@ -430,25 +448,61 @@ class AXPInAppInboxConnectorService {
430
448
  return filterInAppInboxItemsLocally(this.readLocalItems(), query.filters).length;
431
449
  }, /* @ts-ignore */
432
450
  ...(ngDevMode ? [{ debugName: "pagedTotal" }] : /* istanbul ignore next */ []));
433
- this.unreadCount = computed(() => this.readLocalItems().filter((item) => isInAppInboxUnread(item.readAt)).length, /* @ts-ignore */
451
+ this.unreadCount = computed(() => {
452
+ const hot = this.readLocalItems().filter((item) => isInAppInboxUnread(item.readAt)).length;
453
+ const summary = this.unreadSummary();
454
+ return summary ? Math.max(0, summary.count + hot - summary.hotUnread) : hot;
455
+ }, /* @ts-ignore */
434
456
  ...(ngDevMode ? [{ debugName: "unreadCount" }] : /* istanbul ignore next */ []));
435
- this.engine.registerPolicy(this.entityKey, {
436
- mode: 'offline-write',
437
- maxItems: AXP_IN_APP_INBOX_LOCAL_MAX_ITEMS,
438
- sortField: 'createdAt',
439
- role: 'entity',
457
+ if (this.port.loadUnreadCount && this.queries && !this.queries.exists(this.unreadQueryKey)) {
458
+ this.queries.register(this.unreadQueryKey, async () => ({ fetch: async () => ({ success: true, kind: 'object', data: { count: await this.port.loadUnreadCount(), capturedAt: Date.now() } }) }));
459
+ }
460
+ for (const action of ['markSeen', 'markRead', 'markAllRead', 'togglePin', 'archive', 'delete']) {
461
+ const key = `CommunicationManagement:ReplayInbox:${action}`;
462
+ if (!this.commands.exists(key))
463
+ this.commands.register(key, async () => ({
464
+ execute: async (input) => {
465
+ const op = input;
466
+ if (op.entityKey !== this.entityKey || op.action !== action || !op.id || op.idempotencyKey !== op.id || op.userKey !== this.engine.resolveUserKey())
467
+ throw new Error('Invalid Inbox replay context.');
468
+ await this.flushOutboxOp(op);
469
+ return runtimeCommandSuccessValue(true);
470
+ },
471
+ }));
472
+ }
473
+ this.dataPolicies.changed$.pipe(debounceTime(0), takeUntilDestroyed(this.destroyRef)).subscribe((entityName) => {
474
+ if (entityName && entityName !== this.entityKey)
475
+ return;
476
+ this.bootstrapPromise = null;
477
+ this.unreadSummary.set(null);
478
+ this.syncInFlight = null;
479
+ this.archivePageItems.set([]);
480
+ this.archiveTotalCount.set(0);
481
+ if (this.canLoadInbox())
482
+ void this.ensureReady();
440
483
  });
441
484
  this.localBridge.register(this.entityKey, {
485
+ acceptNewIds: true,
442
486
  fetchByIds: this.port.loadByIds ? (ids) => this.fetchActiveByIds(ids) : undefined,
443
487
  fetchHot: () => this.fetchActiveHot(),
488
+ reconcile: () => {
489
+ // Reauthorization clears the module binding as well as engine memory.
490
+ // Re-enter bootstrap so a successful sync cannot be discarded against
491
+ // a null boundUserKey, and retained deliveries hydrate before transport.
492
+ this.bootstrapPromise = this.bootstrap(true);
493
+ return this.bootstrapPromise;
494
+ },
495
+ afterApply: async () => {
496
+ await this.refreshUnreadSummary(true);
497
+ await this.reapplyPendingOutboxOps();
498
+ },
444
499
  });
445
500
  this.outbox.register(this.entityKey, {
501
+ supportedOperations: ['markSeen', 'markRead', 'markAllRead', ...(this.port.setPinned ? ['togglePin'] : []), ...(this.port.archive ? ['archive'] : []), ...(this.port.deleteDeliveries ? ['delete'] : [])],
446
502
  flush: (op) => this.flushOutboxOp(op),
447
503
  revert: (op) => this.revertOutboxOp(op),
448
504
  });
449
- this.sessionService.isReadyForAppScopedApi$
450
- .pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef))
451
- .subscribe((isReady) => {
505
+ this.sessionService.isReadyForAppScopedApi$.pipe(distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe((isReady) => {
452
506
  if (isReady) {
453
507
  void this.ensureReady();
454
508
  return;
@@ -468,11 +522,26 @@ class AXPInAppInboxConnectorService {
468
522
  if (!this.canLoadInbox()) {
469
523
  return Promise.resolve();
470
524
  }
525
+ if (this.boundUserKey && this.boundUserKey !== this.engine.resolveUserKey())
526
+ this.bootstrapPromise = null;
527
+ // Initialization is idempotent even for network-only/unavailable policies.
528
+ // List observers (including the chat bridge) call this after every update;
529
+ // revalidating here would turn each response into another request.
471
530
  if (!this.bootstrapPromise) {
472
531
  this.bootstrapPromise = this.bootstrap();
473
532
  }
474
533
  return this.bootstrapPromise;
475
534
  }
535
+ /** Explicit retry preserves operation ids, original payloads and current-user isolation. */
536
+ async retryPendingWrites() {
537
+ const userKey = this.engine.resolveUserKey();
538
+ const operations = this.outbox.pendingFor(this.entityKey).filter((op) => op.status === 'pending' || op.status === 'failed');
539
+ for (const operation of operations) {
540
+ if (userKey !== this.engine.resolveUserKey())
541
+ break;
542
+ await this.outbox.retry(operation.id);
543
+ }
544
+ }
476
545
  async refresh() {
477
546
  if (!this.canLoadInbox()) {
478
547
  return { items: [], total: 0 };
@@ -480,6 +549,33 @@ class AXPInAppInboxConnectorService {
480
549
  await this.ensureReady();
481
550
  return this.syncActiveFromServer();
482
551
  }
552
+ /** Reconnect and fallback enter the same policy-aware, coalesced synchronization path. */
553
+ async reconcile(_reason) { await this.refresh(); }
554
+ async refreshUnreadSummary(invalidate = false) {
555
+ if (!this.port.loadUnreadCount || !this.queries)
556
+ return;
557
+ const context = JSON.stringify(this.dataPolicies.context()), userKey = this.engine.resolveUserKey();
558
+ try {
559
+ if (invalidate)
560
+ await this.executionRuntime?.invalidateQuery(this.unreadQueryKey);
561
+ const result = await this.queries.fetch(this.unreadQueryKey, undefined, { snapshot: false, dataExecution: { scenarioKey: 'notifications.active' } });
562
+ if (context !== JSON.stringify(this.dataPolicies.context()) || userKey !== this.engine.resolveUserKey())
563
+ return;
564
+ if (result?.success && result.kind === 'object' && Number.isFinite(result.data?.count)) {
565
+ const items = this.readLocalItems();
566
+ // Hydrated rows may already contain optimistic writes made after the saved aggregate.
567
+ const pendingUnread = new Set(this.outbox
568
+ .pendingFor(this.entityKey)
569
+ .filter((op) => Date.parse(op.queuedAt) > result.data.capturedAt)
570
+ .flatMap((op) => (Array.isArray(op.payload?.['unreadIds']) ? op.payload['unreadIds'] : []))
571
+ .filter((id) => !items.some((item) => item.id === id && isInAppInboxUnread(item.readAt))));
572
+ this.unreadSummary.set({ count: Math.max(0, result.data.count), hotUnread: items.filter((item) => isInAppInboxUnread(item.readAt)).length + pendingUnread.size });
573
+ }
574
+ }
575
+ catch {
576
+ /* Keep the last authorized count and local optimistic delta while offline. */
577
+ }
578
+ }
483
579
  async loadPage(filtersOrSkip, skipOrTake, takeArg) {
484
580
  const filters = Array.isArray(filtersOrSkip) ? filtersOrSkip : [];
485
581
  const skip = Array.isArray(filtersOrSkip) ? (skipOrTake ?? 0) : filtersOrSkip;
@@ -495,7 +591,12 @@ class AXPInAppInboxConnectorService {
495
591
  return this.loadArchivePage(filters, skip, take);
496
592
  }
497
593
  if (this.canLoadInbox()) {
594
+ const initialized = this.bootstrapPromise !== null;
498
595
  await this.ensureReady();
596
+ const policy = this.engine.getPolicy(this.entityKey)?.resolved;
597
+ if (initialized && (!policy?.enabled || policy.read.strategy === 'network-only' || !this.engine.canServeListLocally(this.entityKey, { skip: 0, take: policy.storage.maxItems, sort: [{ field: policy.storage.sortField, dir: 'desc' }] }))) {
598
+ await this.syncActiveFromServer();
599
+ }
499
600
  }
500
601
  this.pageLoading.set(false);
501
602
  return { items: this.pagedInboxList(), total: this.pagedTotal() };
@@ -512,7 +613,7 @@ class AXPInAppInboxConnectorService {
512
613
  return;
513
614
  }
514
615
  const now = new Date().toISOString();
515
- await this.engine.patchMany(this.entityKey, unseenIds, (item) => item['seenAt'] ? item : { ...item, seenAt: now });
616
+ await this.engine.patchMany(this.entityKey, unseenIds, (item) => (item['seenAt'] ? item : { ...item, seenAt: now }));
516
617
  await this.commitOrEnqueue({
517
618
  action: AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markSeen,
518
619
  recordIds: unseenIds,
@@ -529,19 +630,34 @@ class AXPInAppInboxConnectorService {
529
630
  return;
530
631
  }
531
632
  await this.ensureReady();
532
- const now = new Date().toISOString();
533
- await this.engine.patchMany(this.entityKey, ids, (item) => ({
534
- ...item,
535
- seenAt: item['seenAt'] ?? now,
536
- readAt: item['readAt'] ?? now,
537
- }));
538
- await this.commitOrEnqueue({
539
- action: AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markRead,
540
- recordIds: ids,
541
- payload: { readAt: now, seenAt: now },
542
- commit: () => this.port.markRead(ids),
543
- revert: () => this.localBridge.apply({ entityKey: this.entityKey, type: 'upsert', ids }),
544
- failureMessage: 'Failed to mark inbox as read',
633
+ const context = JSON.stringify(this.dataPolicies.context());
634
+ await this.mutations.runExclusive(this.entityKey, 'read-state', async () => {
635
+ await this.engine.refreshFromStorage(this.entityKey);
636
+ if (!this.canLoadInbox() || context !== JSON.stringify(this.dataPolicies.context()))
637
+ return;
638
+ const before = new Map(this.readLocalItems().map(item => [item.id, item]));
639
+ // Unknown explicit IDs remain server-authorized writes; known read rows are no-ops.
640
+ const unreadIds = [...new Set(ids)].filter(id => !before.has(id) || isInAppInboxUnread(before.get(id).readAt));
641
+ if (!unreadIds.length)
642
+ return;
643
+ const now = new Date().toISOString();
644
+ await this.engine.patchMany(this.entityKey, unreadIds, item => ({ ...item, seenAt: item['seenAt'] ?? now, readAt: item['readAt'] ?? now }));
645
+ if (context !== JSON.stringify(this.dataPolicies.context()))
646
+ return;
647
+ await this.commitOrEnqueue({
648
+ action: AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markRead,
649
+ recordIds: unreadIds,
650
+ payload: { readAt: now, seenAt: now, unreadIds },
651
+ commit: () => this.port.markRead(unreadIds),
652
+ revert: async () => {
653
+ await this.engine.patchMany(this.entityKey, unreadIds, item => {
654
+ const previous = before.get(String(item['id']));
655
+ return previous && previous.correlationId === item['correlationId'] ? { ...item, readAt: previous.readAt?.toISOString() ?? null, seenAt: previous.seenAt?.toISOString() ?? null } : item;
656
+ });
657
+ await this.localBridge.apply({ entityKey: this.entityKey, type: 'upsert', ids: unreadIds });
658
+ },
659
+ failureMessage: 'Failed to mark inbox as read',
660
+ });
545
661
  });
546
662
  }
547
663
  async markAllAsRead() {
@@ -549,6 +665,9 @@ class AXPInAppInboxConnectorService {
549
665
  return;
550
666
  }
551
667
  await this.ensureReady();
668
+ const unreadIds = this.readLocalItems()
669
+ .filter((item) => isInAppInboxUnread(item.readAt))
670
+ .map((item) => item.id);
552
671
  const now = new Date().toISOString();
553
672
  await this.engine.patchAll(this.entityKey, (item) => {
554
673
  const readAt = item['readAt'];
@@ -559,8 +678,8 @@ class AXPInAppInboxConnectorService {
559
678
  });
560
679
  await this.commitOrEnqueue({
561
680
  action: AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markAllRead,
562
- recordIds: [],
563
- payload: { readAt: now, seenAt: now },
681
+ recordIds: this.readLocalItems().map((item) => item.id),
682
+ payload: { readAt: now, seenAt: now, unreadIds },
564
683
  commit: () => this.port.markAllRead(),
565
684
  revert: async () => {
566
685
  await this.syncActiveFromServer();
@@ -598,10 +717,14 @@ class AXPInAppInboxConnectorService {
598
717
  return;
599
718
  }
600
719
  await this.ensureReady();
720
+ const unreadIds = this.readLocalItems()
721
+ .filter((item) => ids.includes(item.id) && isInAppInboxUnread(item.readAt))
722
+ .map((item) => item.id);
601
723
  await this.engine.removeMany(this.entityKey, ids);
602
724
  await this.commitOrEnqueue({
603
725
  action: AXP_IN_APP_INBOX_OUTBOX_ACTIONS.archive,
604
726
  recordIds: ids,
727
+ payload: { unreadIds },
605
728
  commit: async () => {
606
729
  if (this.port.archive) {
607
730
  await this.port.archive(ids);
@@ -623,10 +746,14 @@ class AXPInAppInboxConnectorService {
623
746
  }
624
747
  const deleteDeliveries = this.port.deleteDeliveries;
625
748
  await this.ensureReady();
749
+ const unreadIds = this.readLocalItems()
750
+ .filter((item) => item.id === id && isInAppInboxUnread(item.readAt))
751
+ .map((item) => item.id);
626
752
  await this.engine.removeMany(this.entityKey, [id]);
627
753
  await this.commitOrEnqueue({
628
754
  action: AXP_IN_APP_INBOX_OUTBOX_ACTIONS.delete,
629
755
  recordIds: [id],
756
+ payload: { unreadIds },
630
757
  commit: async () => {
631
758
  if (!deleteDeliveries) {
632
759
  return;
@@ -737,22 +864,39 @@ class AXPInAppInboxConnectorService {
737
864
  }
738
865
  }
739
866
  //#region ----- Bootstrap & sync -----
740
- async bootstrap() {
867
+ async bootstrap(forceSync = false) {
868
+ const generation = ++this.bootstrapGeneration;
741
869
  if (!this.canLoadInbox()) {
870
+ this.bootstrapActive.set(false);
742
871
  return;
743
872
  }
873
+ this.bootstrapActive.set(true);
744
874
  try {
875
+ await this.policyCapabilitiesReady;
745
876
  this.deleteLegacyInboxDb();
746
877
  this.boundUserKey = this.engine.resolveUserKey();
878
+ const context = JSON.stringify(this.dataPolicies.context());
879
+ const resolution = await this.dataPolicies.resolve(this.entityKey);
880
+ if (context !== JSON.stringify(this.dataPolicies.context()))
881
+ return;
882
+ await this.engine.applyResolvedPolicy(this.entityKey, resolution.status === 'ready' ? resolution.policy : null);
747
883
  await this.engine.hydrate(this.entityKey);
884
+ await this.refreshUnreadSummary();
885
+ await this.reapplyPendingOutboxOps();
748
886
  if (!this.boundUserKey) {
749
887
  return;
750
888
  }
751
- await this.syncActiveFromServer();
889
+ const policy = this.engine.getPolicy(this.entityKey)?.resolved;
890
+ if (forceSync || !policy?.enabled || policy.freshness.startup === 'revalidate-working-set' || !this.readLocalItems().length)
891
+ await this.syncActiveFromServer();
752
892
  }
753
893
  catch (err) {
754
894
  this.error.set(err instanceof Error ? err.message : 'Failed to bootstrap inbox');
755
895
  }
896
+ finally {
897
+ if (generation === this.bootstrapGeneration)
898
+ this.bootstrapActive.set(false);
899
+ }
756
900
  }
757
901
  async syncActiveFromServer() {
758
902
  if (!this.canLoadInbox()) {
@@ -761,39 +905,64 @@ class AXPInAppInboxConnectorService {
761
905
  if (this.syncInFlight) {
762
906
  return this.syncInFlight;
763
907
  }
764
- this.syncInFlight = this.syncActiveFromServerInternal();
908
+ const task = this.syncActiveFromServerInternal();
909
+ this.syncInFlight = task;
765
910
  try {
766
911
  return await this.syncInFlight;
767
912
  }
768
913
  finally {
769
- this.syncInFlight = null;
914
+ if (this.syncInFlight === task) {
915
+ this.syncInFlight = null;
916
+ // Drain only after releasing the older request. Otherwise the follow-up
917
+ // coalesces back onto that same response and loses the realtime delta.
918
+ if (this.pendingRealtimeRefresh) {
919
+ this.pendingRealtimeRefresh = false;
920
+ void this.syncActiveFromServer();
921
+ }
922
+ }
770
923
  }
771
924
  }
772
925
  async syncActiveFromServerInternal() {
773
926
  if (!this.canLoadInbox()) {
774
927
  return { items: [], total: 0 };
775
928
  }
929
+ const context = JSON.stringify(this.dataPolicies.context());
776
930
  try {
777
931
  this.isLoading.set(true);
778
932
  this.error.set(null);
933
+ // Startup/reconnect may have first bootstrapped while the catalog was
934
+ // unavailable. Install the current read plan before persisting live data.
935
+ const resolution = await this.dataPolicies.resolve(this.entityKey);
936
+ if (context !== JSON.stringify(this.dataPolicies.context()))
937
+ return { items: [], total: 0 };
938
+ await this.engine.applyResolvedPolicy(this.entityKey, resolution.status === 'ready' ? resolution.policy : null);
779
939
  const response = await this.fetchActiveHot();
940
+ if (this.boundUserKey !== this.engine.resolveUserKey() || context !== JSON.stringify(this.dataPolicies.context()))
941
+ return { items: [], total: 0 };
942
+ if (this.pendingRealtimeRefresh) {
943
+ // A newer delivery/read receipt arrived during this request. Publishing
944
+ // its older unread snapshot would make the chat bridge acknowledge again.
945
+ // syncActiveFromServer drains the pending refresh after this one finishes.
946
+ const local = this.readLocalItems();
947
+ return { items: local, total: local.length };
948
+ }
780
949
  const items = sortInAppInboxItems(response.items.map((item) => normalizeInAppInboxItem(item)));
781
- await this.engine.replaceAll(this.entityKey, items.map((item) => this.toPayload(item)));
950
+ await this.engine.replaceAll(this.entityKey, items.map((item) => this.toPayload(item)), response.total);
951
+ await this.refreshUnreadSummary(true);
782
952
  await this.reapplyPendingOutboxOps();
783
953
  const local = this.readLocalItems();
784
954
  return { items: local, total: local.length };
785
955
  }
786
956
  catch (err) {
957
+ if (context !== JSON.stringify(this.dataPolicies.context()))
958
+ return { items: [], total: 0 };
787
959
  this.error.set(err instanceof Error ? err.message : 'Failed to load inbox');
960
+ await this.engine.reconcileReadFailure(this.entityKey, err);
788
961
  const local = this.readLocalItems();
789
962
  return { items: local, total: local.length };
790
963
  }
791
964
  finally {
792
965
  this.isLoading.set(false);
793
- if (this.pendingRealtimeRefresh) {
794
- this.pendingRealtimeRefresh = false;
795
- void this.syncActiveFromServer();
796
- }
797
966
  }
798
967
  }
799
968
  async fetchActiveHot() {
@@ -802,23 +971,36 @@ class AXPInAppInboxConnectorService {
802
971
  }
803
972
  const response = await this.port.loadInbox({
804
973
  skip: 0,
805
- take: AXP_IN_APP_INBOX_LOCAL_MAX_ITEMS,
974
+ take: this.engine.getPolicy(this.entityKey)?.resolved?.storage.maxItems ?? AXP_IN_APP_INBOX_LOCAL_MAX_ITEMS,
806
975
  excludeArchived: true,
807
976
  });
977
+ await this.engine.refreshFromStorage(this.entityKey);
808
978
  return {
809
- items: response.items.map((item) => this.toPayload(normalizeInAppInboxItem(item))),
979
+ items: this.preserveAcknowledgedVersions(response.items.map(item => this.toPayload(normalizeInAppInboxItem(item)))),
810
980
  total: response.total,
811
981
  };
812
982
  }
983
+ /** Read is monotonic for one chat delivery version; a new correlationId admits new unread content. */
984
+ preserveAcknowledgedVersions(items) {
985
+ const current = new Map(this.engine.items(this.entityKey).map(item => [String(item['id']), item]));
986
+ return items.map(item => {
987
+ const previous = current.get(String(item['id']));
988
+ const version = item['correlationId'];
989
+ return item['definitionKey'] === 'conversation-chat-message' && typeof version === 'string' && version.startsWith('conversation:') && previous?.['correlationId'] === version && previous['readAt'] != null && item['readAt'] == null
990
+ ? { ...item, readAt: previous['readAt'], seenAt: item['seenAt'] ?? previous['seenAt'] } : item;
991
+ });
992
+ }
813
993
  async fetchActiveByIds(ids) {
814
994
  if (!this.canLoadInbox() || !this.port.loadByIds) {
815
995
  return [];
816
996
  }
817
997
  try {
998
+ const context = JSON.stringify(this.dataPolicies.context());
818
999
  const result = await this.port.loadByIds(ids);
819
- return result.items
820
- .filter((item) => item.archivedAt == null)
821
- .map((item) => this.toPayload(normalizeInAppInboxItem(item)));
1000
+ if (context !== JSON.stringify(this.dataPolicies.context()))
1001
+ return [];
1002
+ await this.engine.refreshFromStorage(this.entityKey);
1003
+ return this.preserveAcknowledgedVersions(result.items.filter(item => item.archivedAt == null).map(item => this.toPayload(normalizeInAppInboxItem(item))));
822
1004
  }
823
1005
  catch (error) {
824
1006
  if (this.isBenignDeliveryDeleteError(error)) {
@@ -838,6 +1020,7 @@ class AXPInAppInboxConnectorService {
838
1020
  try {
839
1021
  this.pageLoading.set(true);
840
1022
  this.error.set(null);
1023
+ const context = JSON.stringify(this.dataPolicies.context());
841
1024
  const result = await this.port.loadInbox({
842
1025
  skip,
843
1026
  take,
@@ -845,6 +1028,8 @@ class AXPInAppInboxConnectorService {
845
1028
  excludeArchived: false,
846
1029
  });
847
1030
  const items = sortInAppInboxItems(result.items.map((item) => normalizeInAppInboxItem(item)));
1031
+ if (context !== JSON.stringify(this.dataPolicies.context()))
1032
+ return { items: [], total: 0 };
848
1033
  this.archivePageItems.set(items);
849
1034
  this.archiveTotalCount.set(result.total);
850
1035
  return { items, total: result.total };
@@ -898,35 +1083,10 @@ class AXPInAppInboxConnectorService {
898
1083
  }
899
1084
  //#endregion
900
1085
  //#region ----- Outbox -----
901
- canQueueWrites() {
902
- return axpLocalEntitySupportsOfflineWrite(this.engine.getPolicy(this.entityKey)?.mode);
903
- }
904
1086
  async commitOrEnqueue(options) {
905
- if (!this.connectivity.online && this.canQueueWrites()) {
906
- await this.outbox.enqueue({
907
- entityKey: this.entityKey,
908
- action: options.action,
909
- recordIds: options.recordIds,
910
- payload: options.payload,
911
- });
912
- return;
913
- }
914
- try {
915
- await options.commit();
916
- }
917
- catch (err) {
918
- if (this.canQueueWrites() && axpIsLikelyNetworkFailure(err)) {
919
- await this.outbox.enqueue({
920
- entityKey: this.entityKey,
921
- action: options.action,
922
- recordIds: options.recordIds,
923
- payload: options.payload,
924
- });
925
- return;
926
- }
927
- this.error.set(err instanceof Error ? err.message : options.failureMessage);
928
- await options.revert();
929
- }
1087
+ await this.mutations.commit({ ...options, entity: this.entityKey, durableSupported: options.action !== 'togglePin' || !!this.port.setPinned,
1088
+ onError: error => this.error.set(error instanceof Error ? error.message : options.failureMessage),
1089
+ });
930
1090
  }
931
1091
  async flushOutboxOp(op) {
932
1092
  switch (op.action) {
@@ -941,12 +1101,15 @@ class AXPInAppInboxConnectorService {
941
1101
  }
942
1102
  return;
943
1103
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markAllRead:
944
- await this.port.markAllRead();
1104
+ // Replay only the captured working set, never messages arriving afterward.
1105
+ if (op.recordIds.length)
1106
+ await this.port.markRead(op.recordIds);
945
1107
  return;
946
1108
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.togglePin:
947
- if (op.recordIds[0] && this.port.togglePin) {
948
- await this.port.togglePin(op.recordIds[0]);
949
- }
1109
+ if (!this.port.setPinned)
1110
+ throw new Error('Pin replay requires a desired-state handler.');
1111
+ if (op.recordIds[0])
1112
+ await this.port.setPinned(op.recordIds[0], Boolean(op.payload?.['isPinned']));
950
1113
  return;
951
1114
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.archive:
952
1115
  if (op.recordIds.length > 0 && this.port.archive) {
@@ -970,9 +1133,7 @@ class AXPInAppInboxConnectorService {
970
1133
  }
971
1134
  }
972
1135
  async revertOutboxOp(op) {
973
- if (op.action === AXP_IN_APP_INBOX_OUTBOX_ACTIONS.delete ||
974
- op.action === AXP_IN_APP_INBOX_OUTBOX_ACTIONS.archive ||
975
- op.action === AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markAllRead) {
1136
+ if (op.action === AXP_IN_APP_INBOX_OUTBOX_ACTIONS.delete || op.action === AXP_IN_APP_INBOX_OUTBOX_ACTIONS.archive || op.action === AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markAllRead) {
976
1137
  await this.syncActiveFromServer();
977
1138
  return;
978
1139
  }
@@ -983,6 +1144,12 @@ class AXPInAppInboxConnectorService {
983
1144
  async reapplyPendingOutboxOps() {
984
1145
  const ops = this.outbox.pendingFor(this.entityKey);
985
1146
  for (const op of ops) {
1147
+ const scope = JSON.stringify(this.dataPolicies.context());
1148
+ const policy = await this.dataPolicies.resolve(this.entityKey, op.action);
1149
+ if (scope !== JSON.stringify(this.dataPolicies.context()))
1150
+ return;
1151
+ if (policy.status !== 'ready' || !policy.policy.enabled || policy.policy.write.mode !== 'offline-queue' || !policy.policy.write.offlineOperations.includes(op.action))
1152
+ continue;
986
1153
  await this.applyOutboxOpLocally(op);
987
1154
  }
988
1155
  }
@@ -991,7 +1158,7 @@ class AXPInAppInboxConnectorService {
991
1158
  const readAt = typeof op.payload?.['readAt'] === 'string' ? op.payload['readAt'] : new Date().toISOString();
992
1159
  switch (op.action) {
993
1160
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markSeen:
994
- await this.engine.patchMany(this.entityKey, op.recordIds, (item) => item['seenAt'] ? item : { ...item, seenAt });
1161
+ await this.engine.patchMany(this.entityKey, op.recordIds, (item) => (item['seenAt'] ? item : { ...item, seenAt }));
995
1162
  return;
996
1163
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markRead:
997
1164
  await this.engine.patchMany(this.entityKey, op.recordIds, (item) => ({
@@ -1001,7 +1168,7 @@ class AXPInAppInboxConnectorService {
1001
1168
  }));
1002
1169
  return;
1003
1170
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.markAllRead:
1004
- await this.engine.patchAll(this.entityKey, (item) => item['readAt'] != null ? item : { ...item, readAt, seenAt: item['seenAt'] ?? seenAt });
1171
+ await this.engine.patchMany(this.entityKey, op.recordIds, (item) => (item['readAt'] != null ? item : { ...item, readAt, seenAt: item['seenAt'] ?? seenAt }));
1005
1172
  return;
1006
1173
  case AXP_IN_APP_INBOX_OUTBOX_ACTIONS.togglePin:
1007
1174
  await this.engine.patchMany(this.entityKey, op.recordIds, (item) => ({
@@ -1023,6 +1190,9 @@ class AXPInAppInboxConnectorService {
1023
1190
  return this.sessionService.isReadyForAppScopedApi;
1024
1191
  }
1025
1192
  async clearInboxState() {
1193
+ this.bootstrapGeneration++;
1194
+ this.bootstrapActive.set(false);
1195
+ this.unreadSummary.set(null);
1026
1196
  this.bootstrapPromise = null;
1027
1197
  this.syncInFlight = null;
1028
1198
  this.boundUserKey = null;
@@ -1033,11 +1203,20 @@ class AXPInAppInboxConnectorService {
1033
1203
  this.error.set(null);
1034
1204
  this.isLoading.set(false);
1035
1205
  this.pageLoading.set(false);
1036
- await this.engine.clear(this.entityKey);
1206
+ // Not-ready also occurs during cold startup and reconnect authentication.
1207
+ // Revoke the in-memory view until policy restoration; retain scoped durable
1208
+ // rows so a transient readiness transition cannot erase the offline Inbox.
1209
+ await this.engine.applyResolvedPolicy(this.entityKey, null);
1037
1210
  }
1038
1211
  readLocalItems() {
1212
+ // Always track the record signal, including the initial not-ready render.
1213
+ // Otherwise Angular memoizes an empty result without any reactive dependency.
1214
+ const localItems = this.localItems();
1215
+ if (!this.canLoadInbox())
1216
+ return [];
1039
1217
  const userId = this.sessionService.user?.id?.trim();
1040
- const items = sortInAppInboxItems(this.localItems().map((row) => normalizeInAppInboxItem(row)));
1218
+ const items = sortInAppInboxItems(localItems
1219
+ .map((row) => normalizeInAppInboxItem(row)));
1041
1220
  if (!userId) {
1042
1221
  return [];
1043
1222
  }
@@ -1067,6 +1246,7 @@ class AXPInAppInboxConnectorService {
1067
1246
  readAt: item.readAt ? item.readAt.toISOString() : null,
1068
1247
  sender: item.sender,
1069
1248
  iconClass: item.iconClass,
1249
+ iconColor: item.iconColor,
1070
1250
  showAvatar: item.showAvatar,
1071
1251
  priority: item.priority ?? 'Notice',
1072
1252
  isPinned: Boolean(item.isPinned),
@@ -1076,6 +1256,7 @@ class AXPInAppInboxConnectorService {
1076
1256
  recipientUserId: item.recipientUserId,
1077
1257
  archivedAt: item.archivedAt ? item.archivedAt.toISOString() : null,
1078
1258
  actions: item.actions,
1259
+ attachments: item.attachments,
1079
1260
  };
1080
1261
  }
1081
1262
  deleteLegacyInboxDb() {
@@ -1124,6 +1305,8 @@ function collectErrorText(error) {
1124
1305
  return String(error);
1125
1306
  }
1126
1307
 
1308
+ /** Public compatibility entry point; implementation belongs to the module data adapter. */
1309
+
1127
1310
  //#region ---- Communication in-app inbox badge ----
1128
1311
  class AXMCommunicationInboxBadgeProvider {
1129
1312
  constructor() {
@@ -1345,7 +1528,18 @@ class AXMCommunicationInAppInboxPort {
1345
1528
  });
1346
1529
  const deliveries = result.items;
1347
1530
  const items = (await this.mapDeliveriesToInboxItems(deliveries)).filter((item) => item.recipientUserId?.trim() === userId);
1348
- return { total: items.length, items };
1531
+ return { total: result.total, items };
1532
+ }
1533
+ async loadUnreadCount() {
1534
+ if (!this.sessionService.isReadyForAppScopedApi || !this.sessionService.user?.id)
1535
+ return 0;
1536
+ const result = await this.deliveryData.query({ skip: 0, take: 1, fields: ['id'], filter: { logic: 'and', filters: [
1537
+ { field: 'channel', operator: { type: 'equal' }, value: IN_APP_CHANNEL },
1538
+ { field: 'recipientUserId', operator: { type: 'equal' }, value: this.sessionService.user.id },
1539
+ { field: 'archivedAt', operator: { type: 'isNull' }, value: null },
1540
+ { field: 'readAt', operator: { type: 'isNull' }, value: null },
1541
+ ] } });
1542
+ return result.total;
1349
1543
  }
1350
1544
  async loadByIds(ids) {
1351
1545
  if (!this.sessionService.isReadyForAppScopedApi) {
@@ -1407,6 +1601,10 @@ class AXMCommunicationInAppInboxPort {
1407
1601
  }
1408
1602
  await this.client.toggleInAppPin({ deliveryIds: [id] });
1409
1603
  }
1604
+ async setPinned(id, isPinned) {
1605
+ if (id.trim())
1606
+ await this.client.toggleInAppPin({ deliveryIds: [id], isPinned });
1607
+ }
1410
1608
  async archive(ids) {
1411
1609
  const deliveryIds = ids.filter(Boolean);
1412
1610
  if (deliveryIds.length === 0) {
@@ -1504,7 +1702,7 @@ class AXMCommunicationInAppInboxPort {
1504
1702
  correlationId: communication?.correlationId,
1505
1703
  actions,
1506
1704
  });
1507
- const iconClass = resolveInAppInboxIconClass({ definitionKey, priority, sender });
1705
+ const iconClass = resolveInAppInboxIconClass({ iconClass: communication?.appearance?.iconClass, definitionKey, priority, sender });
1508
1706
  return {
1509
1707
  id: delivery.id,
1510
1708
  title,
@@ -1514,6 +1712,7 @@ class AXMCommunicationInAppInboxPort {
1514
1712
  readAt: delivery.readAt ? new Date(delivery.readAt) : delivery.readAt ?? null,
1515
1713
  sender,
1516
1714
  iconClass,
1715
+ iconColor: communication?.appearance?.color,
1517
1716
  priority,
1518
1717
  isPinned: Boolean(delivery.isPinned),
1519
1718
  definitionKey,
@@ -1521,6 +1720,7 @@ class AXMCommunicationInAppInboxPort {
1521
1720
  recipientUserId: delivery.recipientUserId?.trim() || undefined,
1522
1721
  archivedAt: delivery.archivedAt ? new Date(delivery.archivedAt) : delivery.archivedAt ?? null,
1523
1722
  actions,
1723
+ attachments: communication?.attachments,
1524
1724
  };
1525
1725
  }
1526
1726
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCommunicationInAppInboxPort, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
@@ -1536,6 +1736,7 @@ function provideCommunicationInAppRealtimeHandlers() {
1536
1736
  provideAppStartUpTask(() => {
1537
1737
  const dispatcher = inject(AXPRealtimeDispatcherService, { optional: true });
1538
1738
  const inboxRealtime = inject(AXPInAppInboxRealtimeService);
1739
+ const entityEvents = inject(AXPEntityBroadcastService);
1539
1740
  return {
1540
1741
  name: 'communication-in-app-realtime-handlers',
1541
1742
  priority: AXP_APP_STARTUP_PRIORITY.realtimeHandlers,
@@ -1544,6 +1745,10 @@ function provideCommunicationInAppRealtimeHandlers() {
1544
1745
  topic: AXP_REALTIME_TOPIC_INBOX_REFRESH,
1545
1746
  handle: (envelope) => {
1546
1747
  const payload = (envelope.payload ?? {});
1748
+ // This recipient-scoped topic owns inbox reconciliation. Clear the
1749
+ // raw entity reads first, but do not start a second generic refresh.
1750
+ entityEvents.publishLayoutRefresh(COMMUNICATION_ENTITY_NAME, { invalidateOnly: true });
1751
+ entityEvents.publishLayoutRefresh(COMMUNICATION_DELIVERY_ENTITY_NAME, { invalidateOnly: true });
1547
1752
  const ids = [
1548
1753
  ...(payload.deliveryIds ?? []),
1549
1754
  ...(payload.deliveryId ? [payload.deliveryId] : []),
@@ -1588,77 +1793,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1588
1793
  args: [{ providedIn: 'root' }]
1589
1794
  }] });
1590
1795
 
1591
- //#region ---- Constants ----
1592
- const POLL_INTERVAL_MS = 60_000;
1593
- const RECONNECT_REFRESH_DELAY_MS = 250;
1594
- //#endregion
1595
- //#region ---- In-app inbox fallback sync ----
1596
- /**
1597
- * Keeps the inbox fresh when Socket.IO is down: poll while disconnected,
1598
- * refresh on reconnect and when the tab becomes visible again while disconnected.
1599
- */
1796
+ /** Registers the Inbox's refresh intent; infrastructure owns policy and scheduling. */
1600
1797
  function provideCommunicationInAppInboxFallbackSync() {
1601
- return [
1602
- provideAppStartUpTask(() => {
1603
- const connector = inject(AXPInAppInboxConnectorService);
1604
- const sessionService = inject(AXPSessionService);
1605
- const outbox = inject(AXPLocalEntityOutboxService);
1606
- const syncStatus = inject(AXMCommunicationInAppInboxSyncStatusService);
1607
- const connection = inject(AXPRealtimeConnectionService, { optional: true });
1608
- const destroyRef = inject(DestroyRef);
1609
- const refreshIfAuthorized = () => {
1610
- if (!sessionService.isReadyForAppScopedApi) {
1611
- return;
1612
- }
1613
- void (async () => {
1614
- await outbox.flushAll();
1615
- await connector.refresh();
1616
- })();
1617
- };
1618
- return {
1619
- name: 'communication-in-app-inbox-fallback',
1620
- priority: AXP_APP_STARTUP_PRIORITY.realtimeSubscriptions,
1621
- run: async () => {
1622
- if (!connection) {
1623
- syncStatus.liveUpdatesConnected.set(false);
1624
- return;
1625
- }
1626
- let wasConnected = connection.isSocketConnected();
1627
- connection.connectionStatus$
1628
- .pipe(distinctUntilChanged(), takeUntilDestroyed(destroyRef))
1629
- .subscribe((status) => {
1630
- const connected = status === 'connected';
1631
- syncStatus.liveUpdatesConnected.set(connected);
1632
- if (connected && !wasConnected) {
1633
- timer(RECONNECT_REFRESH_DELAY_MS)
1634
- .pipe(takeUntilDestroyed(destroyRef))
1635
- .subscribe(() => {
1636
- refreshIfAuthorized();
1637
- });
1638
- }
1639
- wasConnected = connected;
1640
- });
1641
- connection.connectionStatus$
1642
- .pipe(distinctUntilChanged(), switchMap((status) => {
1643
- if (status === 'connected') {
1644
- return EMPTY;
1645
- }
1646
- return timer(POLL_INTERVAL_MS, POLL_INTERVAL_MS);
1647
- }), takeUntilDestroyed(destroyRef))
1648
- .subscribe(() => {
1649
- refreshIfAuthorized();
1650
- });
1651
- document.addEventListener('visibilitychange', () => {
1652
- if (document.visibilityState === 'visible' && !connection.isSocketConnected()) {
1653
- refreshIfAuthorized();
1654
- }
1655
- }, { passive: true });
1656
- },
1798
+ return [provideAppStartUpTask(() => {
1799
+ const data = inject(AXPInAppInboxConnectorService);
1800
+ const synchronization = inject(AXPDataSynchronizationService);
1801
+ const status = inject(AXMCommunicationInAppInboxSyncStatusService);
1802
+ const destroy = inject(DestroyRef);
1803
+ return { name: 'communication-in-app-inbox-fallback', priority: AXP_APP_STARTUP_PRIORITY.realtimeSubscriptions,
1804
+ run: async () => synchronization.watch({ entity: AXP_IN_APP_INBOX_LOCAL_ENTITY_KEY, refresh: () => data.refresh(), connectionChanged: connected => status.liveUpdatesConnected.set(connected) }, destroy),
1657
1805
  };
1658
- }),
1659
- ];
1806
+ })];
1660
1807
  }
1661
- //#endregion
1662
1808
 
1663
1809
  //#region ---- Communication-backed in-app notification port ----
1664
1810
  class AXMCommunicationInAppNotificationService {
@@ -1710,6 +1856,26 @@ const AXP_IN_APP_INBOX_SYNC_STATUS = new InjectionToken('AXP_IN_APP_INBOX_SYNC_S
1710
1856
  //#region ---- Shared in-app inbox row item ----
1711
1857
  class AXPInAppInboxItemComponent {
1712
1858
  constructor() {
1859
+ this.communicationClient = inject(AXPCommunicationManagementClient);
1860
+ this.downloadFailed = signal(false, /* @ts-ignore */
1861
+ ...(ngDevMode ? [{ debugName: "downloadFailed" }] : /* istanbul ignore next */ []));
1862
+ this.attachmentFiles = computed(() => (this.data().attachments ?? []).map(file => ({
1863
+ id: file.fileId, name: file.name, size: file.size, meta: { mimeType: file.mimeType },
1864
+ status: 'uploaded', source: { kind: 'fileId', value: file.fileId },
1865
+ })), /* @ts-ignore */
1866
+ ...(ngDevMode ? [{ debugName: "attachmentFiles" }] : /* istanbul ignore next */ []));
1867
+ this.downloadAttachment = async (file) => {
1868
+ this.downloadFailed.set(false);
1869
+ try {
1870
+ if (!file.id)
1871
+ throw new Error('Attachment file id is required.');
1872
+ return await this.communicationClient.downloadAttachment(this.data().id, file.id);
1873
+ }
1874
+ catch (error) {
1875
+ this.downloadFailed.set(true);
1876
+ throw error;
1877
+ }
1878
+ };
1713
1879
  this.data = input.required(/* @ts-ignore */
1714
1880
  ...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
1715
1881
  this.showAvatar = input(true, /* @ts-ignore */
@@ -1745,6 +1911,11 @@ class AXPInAppInboxItemComponent {
1745
1911
  return item.title ?? '';
1746
1912
  }, /* @ts-ignore */
1747
1913
  ...(ngDevMode ? [{ debugName: "headline" }] : /* istanbul ignore next */ []));
1914
+ this.iconSurfaceClass = computed(() => {
1915
+ const color = this.data().iconColor;
1916
+ return color ? ensureRuntimeSurfaceClass(resolveToSurfaceClass(color) ?? 'secondary-lighter-surface') ?? '' : '';
1917
+ }, /* @ts-ignore */
1918
+ ...(ngDevMode ? [{ debugName: "iconSurfaceClass" }] : /* istanbul ignore next */ []));
1748
1919
  this.itemIconClass = computed(() => resolveInAppInboxIconClass(this.data()), /* @ts-ignore */
1749
1920
  ...(ngDevMode ? [{ debugName: "itemIconClass" }] : /* istanbul ignore next */ []));
1750
1921
  this.showItemLeading = computed(() => this.showAvatar() && this.data().showAvatar !== false, /* @ts-ignore */
@@ -1792,7 +1963,7 @@ class AXPInAppInboxItemComponent {
1792
1963
  this.markAsRead.emit(this.data().id);
1793
1964
  }
1794
1965
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPInAppInboxItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1795
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPInAppInboxItemComponent, isStandalone: true, selector: "axp-in-app-inbox-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, showAvatar: { classPropertyName: "showAvatar", publicName: "showAvatar", isSignal: true, isRequired: false, transformFunction: null }, showDate: { classPropertyName: "showDate", publicName: "showDate", isSignal: true, isRequired: false, transformFunction: null }, showPin: { classPropertyName: "showPin", publicName: "showPin", isSignal: true, isRequired: false, transformFunction: null }, pinLabelKey: { classPropertyName: "pinLabelKey", publicName: "pinLabelKey", isSignal: true, isRequired: false, transformFunction: null }, unpinLabelKey: { classPropertyName: "unpinLabelKey", publicName: "unpinLabelKey", isSignal: true, isRequired: false, transformFunction: null }, highlightUnreadBackground: { classPropertyName: "highlightUnreadBackground", publicName: "highlightUnreadBackground", isSignal: true, isRequired: false, transformFunction: null }, showDismissUnread: { classPropertyName: "showDismissUnread", publicName: "showDismissUnread", isSignal: true, isRequired: false, transformFunction: null }, markAsReadLabelKey: { classPropertyName: "markAsReadLabelKey", publicName: "markAsReadLabelKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemPress: "itemPress", markAsRead: "markAsRead", togglePin: "togglePin", closePopover: "closePopover" }, ngImport: i0, template: "<div\n class=\"axp-in-app-inbox-item\"\n [id]=\"data().id\"\n (click)=\"onPress(data().id)\"\n [class]=\"[\n priorityClass(),\n isUnread() ? 'unread' : 'read',\n isUnread() && highlightUnreadBackground() ? 'unread-highlight' : '',\n bodyIsHtml() ? 'axp-in-app-inbox-item--rich' : '',\n ]\"\n>\n @if (showItemIcon()) {\n <!-- ----- Priority icon when the item has no real sender avatar ----- -->\n <div class=\"axp-in-app-inbox-item__icon\" [class]=\"priorityClass()\">\n <i [class]=\"itemIconClass()\" aria-hidden=\"true\"></i>\n </div>\n } @else if (showItemAvatar()) {\n <!-- ----- Sender avatar for conversation-style inbox rows ----- -->\n <div class=\"axp-in-app-inbox-item__avatar\">\n <axp-user-avatar\n [size]=\"48\"\n [userId]=\"data().sender!.id\"\n [axpUserCard]=\"data().sender!.id\"\n ></axp-user-avatar>\n @if (isUnread()) {\n <!-- ----- Unread status dot on the avatar ----- -->\n <div class=\"axp-in-app-inbox-item__unread-badge\"></div>\n }\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__content\">\n <div class=\"axp-in-app-inbox-item__headline\">\n <div class=\"axp-in-app-inbox-item__title\" [class.--unread]=\"isUnread()\">\n @if (isI18nKey(headline())) {\n <!-- ----- Localized headline ----- -->\n {{ headline() | translate | async }}\n } @else {\n <!-- ----- Plain-text sender name or title ----- -->\n {{ headline() }}\n }\n </div>\n @if (showPin()) {\n @if (data().isPinned) {\n <!-- ----- Pinned state next to the title ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin\"\n [attr.aria-label]=\"unpinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-solid fa-thumbtack\"></i></ax-icon>\n </button>\n } @else {\n <!-- ----- Unpinned control shown on hover ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin axp-in-app-inbox-item__pin--muted\"\n [attr.aria-label]=\"pinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-regular fa-thumbtack\"></i></ax-icon>\n </button>\n }\n }\n </div>\n\n @if (data().category) {\n <!-- ----- Optional category under the headline ----- -->\n <div class=\"axp-in-app-inbox-item__subline\">\n <span class=\"axp-in-app-inbox-item__category\">{{ data().category }}</span>\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__body\" [class.axp-in-app-inbox-item__body--html]=\"bodyIsHtml()\">\n @if (isI18nKey(data().body)) {\n <!-- ----- Localized body preview ----- -->\n {{ data().body | translate | async }}\n }\n <!-- ----- Light HTML body (lists, status badges) ----- -->\n @else if (bodyIsHtml()) {\n <div [innerHTML]=\"bodyHtml() | safe: 'html'\"></div>\n }\n <!-- ----- Plain-text body preview ----- -->\n @else {\n {{ data().body }}\n }\n </div>\n </div>\n\n @if (showMeta()) {\n <!-- ----- Time at top-end; close replaces it on hover ----- -->\n <div class=\"axp-in-app-inbox-item__meta\" [class.--has-dismiss]=\"showDismiss()\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time\">{{ data().createdAt | format: 'timeleft' | async }}</span>\n }\n @if (showDismiss()) {\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__dismiss\"\n [attr.aria-label]=\"markAsReadLabelKey() | translate | async\"\n (click)=\"onDismissMarkAsRead($event)\"\n >\n <ax-icon><i class=\"fa-light fa-xmark\" aria-hidden=\"true\"></i></ax-icon>\n </button>\n }\n </div>\n }\n\n @if (showDate() || hasDefaultAction()) {\n <!-- ----- Chevron always vertically centered in the row ----- -->\n <div class=\"axp-in-app-inbox-item__actions\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time-sizer\" aria-hidden=\"true\">\n {{ data().createdAt | format: 'timeleft' | async }}\n </span>\n }\n @if (hasDefaultAction()) {\n <div class=\"axp-in-app-inbox-item__chevron\" aria-hidden=\"true\">\n <ax-icon><i class=\"fa-light fa-chevron-right axp-in-app-inbox-item__chevron-icon\"></i></ax-icon>\n </div>\n }\n </div>\n }\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block text-start border-b;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}:host(:last-child){@apply border-b-0;}.axp-in-app-inbox-item{@apply relative flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors duration-150;}.axp-in-app-inbox-item.read,.axp-in-app-inbox-item.unread{background:transparent}.axp-in-app-inbox-item.unread-highlight{background:rgb(var(--ax-sys-color-warning-50))}@media(hover:hover){.axp-in-app-inbox-item:hover{background:rgb(var(--ax-sys-color-lightest-surface))}.axp-in-app-inbox-item:hover.unread-highlight{background:rgb(var(--ax-sys-color-warning-100))}.axp-in-app-inbox-item:hover .axp-in-app-inbox-item__pin--muted{visibility:visible;pointer-events:auto}}.axp-in-app-inbox-item__actions{@apply flex shrink-0 items-center justify-end;}.axp-in-app-inbox-item__meta{@apply absolute top-0 end-4 grid items-center justify-items-end pt-1;}.axp-in-app-inbox-item__time-sizer{@apply invisible block h-0 w-max shrink-0 overflow-hidden whitespace-nowrap;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__dismiss{grid-area:1 / 1}.axp-in-app-inbox-item__dismiss{@apply inline-flex size-6 items-center justify-center rounded-full border-0 bg-transparent p-0;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__dismiss i{@apply text-xs leading-none;}.axp-in-app-inbox-item__dismiss:hover{color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__chevron{@apply inline-flex size-6 items-center justify-center text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__avatar{@apply relative h-12 shrink-0;}.axp-in-app-inbox-item__icon{@apply flex size-12 shrink-0 items-center justify-center rounded-full border text-base leading-none;}.axp-in-app-inbox-item__icon i{@apply block text-base leading-none;}.axp-in-app-inbox-item__icon.Notice{@apply border;background-color:rgb(var(--ax-sys-color-success-lightest-surface));border-color:rgb(var(--ax-sys-color-border-success-light-surface))}.axp-in-app-inbox-item__icon.Notice i{color:rgb(var(--ax-sys-color-on-success-lightest-surface))}.axp-in-app-inbox-item__icon.Danger{@apply border;background-color:rgb(var(--ax-sys-color-danger-lightest-surface));border-color:rgb(var(--ax-sys-color-border-danger-light-surface))}.axp-in-app-inbox-item__icon.Danger i{color:rgb(var(--ax-sys-color-on-danger-lightest-surface))}.axp-in-app-inbox-item__icon.Warning{@apply border;background-color:rgb(var(--ax-sys-color-warning-lightest-surface));border-color:rgb(var(--ax-sys-color-border-warning-light-surface))}.axp-in-app-inbox-item__icon.Warning i{color:rgb(var(--ax-sys-color-on-warning-lightest-surface))}.axp-in-app-inbox-item__unread-badge{@apply absolute bottom-0 end-0;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.axp-in-app-inbox-item__content{@apply flex min-w-0 flex-1 flex-col text-start;}.axp-in-app-inbox-item__headline{@apply flex min-w-0 items-center gap-1;}.axp-in-app-inbox-item__title{@apply min-w-0 text-sm font-medium truncate;color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__title.--unread{@apply font-semibold;}.axp-in-app-inbox-item__subline{@apply mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__category{@apply text-xs whitespace-nowrap;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item--rich{@apply items-start;}.axp-in-app-inbox-item__body{@apply mt-1 line-clamp-2 text-start text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__body--html{display:block;overflow:visible;-webkit-line-clamp:unset;line-clamp:unset;margin-top:.125rem;font-size:12px;line-height:1.35}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4,p,ul,li,div,span):not(.axp-status-badge){font-size:inherit!important;line-height:inherit!important;font-family:inherit!important;margin:0!important}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4){display:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html ul{padding:0!important;list-style:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html li{margin:0 0 2px!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-meta{@apply mb-0.5 text-xs;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-row{@apply block truncate;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge{display:inline-block!important;position:relative;top:-1px;padding:1px 6px!important;border-radius:999px!important;font-size:10px!important;line-height:1.3!important;font-weight:600!important;white-space:nowrap!important;vertical-align:middle}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--danger,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--expired{background-color:#fee2e2!important;color:#b91c1c!important;border:1px solid #fecaca!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--warning,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--near{background-color:#ffedd5!important;color:#b45309!important;border:1px solid #fed7aa!important}.axp-in-app-inbox-item__pin{@apply inline-flex shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0.5;color:rgb(var(--ax-sys-color-primary))}.axp-in-app-inbox-item__pin i{@apply rotate-45 text-xs;}.axp-in-app-inbox-item__pin--muted{color:rgb(var(--ax-sys-color-on-surface-variant))}@media(hover:hover){.axp-in-app-inbox-item__pin--muted{visibility:hidden;pointer-events:none}}.axp-in-app-inbox-item__pin--muted:focus-visible{visibility:visible;pointer-events:auto}.axp-in-app-inbox-item__pin--muted:hover{color:rgb(var(--ax-sys-color-primary))}@media(hover:hover){.axp-in-app-inbox-item__dismiss{opacity:0;pointer-events:none}:host(:hover) .axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}:host(:hover) .axp-in-app-inbox-item__dismiss{opacity:1;pointer-events:auto}:host(:hover) .axp-in-app-inbox-item__chevron{color:rgb(var(--ax-sys-color-on-surface))}}@media(hover:none){.axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}}.axp-in-app-inbox-item__meta.--has-dismiss:focus-within .axp-in-app-inbox-item__time{opacity:0}.axp-in-app-inbox-item__dismiss:focus-visible{opacity:1;pointer-events:auto;color:rgb(var(--ax-sys-color-on-surface))}:host-context([dir=\"rtl\"]) .axp-in-app-inbox-item__chevron-icon{transform:scaleX(-1)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXPUserAvatarComponent, selector: "axp-user-avatar", inputs: ["size", "userId", "showPresence", "displayName", "displayAvatar"] }, { kind: "directive", type: AXPUserCardDirective, selector: "[axpUserCard]", inputs: ["axpUserCard", "axpUserCardDisabled", "axpUserCardTrigger"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXFormatPipe, name: "format" }, { kind: "pipe", type: AXSafePipe, name: "safe" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1966
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPInAppInboxItemComponent, isStandalone: true, selector: "axp-in-app-inbox-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, showAvatar: { classPropertyName: "showAvatar", publicName: "showAvatar", isSignal: true, isRequired: false, transformFunction: null }, showDate: { classPropertyName: "showDate", publicName: "showDate", isSignal: true, isRequired: false, transformFunction: null }, showPin: { classPropertyName: "showPin", publicName: "showPin", isSignal: true, isRequired: false, transformFunction: null }, pinLabelKey: { classPropertyName: "pinLabelKey", publicName: "pinLabelKey", isSignal: true, isRequired: false, transformFunction: null }, unpinLabelKey: { classPropertyName: "unpinLabelKey", publicName: "unpinLabelKey", isSignal: true, isRequired: false, transformFunction: null }, highlightUnreadBackground: { classPropertyName: "highlightUnreadBackground", publicName: "highlightUnreadBackground", isSignal: true, isRequired: false, transformFunction: null }, showDismissUnread: { classPropertyName: "showDismissUnread", publicName: "showDismissUnread", isSignal: true, isRequired: false, transformFunction: null }, markAsReadLabelKey: { classPropertyName: "markAsReadLabelKey", publicName: "markAsReadLabelKey", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemPress: "itemPress", markAsRead: "markAsRead", togglePin: "togglePin", closePopover: "closePopover" }, ngImport: i0, template: "<div\n class=\"axp-in-app-inbox-item\"\n [id]=\"data().id\"\n (click)=\"onPress(data().id)\"\n [class]=\"[\n priorityClass(),\n isUnread() ? 'unread' : 'read',\n isUnread() && highlightUnreadBackground() ? 'unread-highlight' : '',\n bodyIsHtml() ? 'axp-in-app-inbox-item--rich' : '',\n ]\"\n>\n @if (showItemIcon()) {\n <!-- ----- Priority icon when the item has no real sender avatar ----- -->\n <div class=\"axp-in-app-inbox-item__icon\" [class]=\"iconSurfaceClass() || priorityClass()\">\n <i [class]=\"itemIconClass()\" aria-hidden=\"true\"></i>\n </div>\n } @else if (showItemAvatar()) {\n <!-- ----- Sender avatar for conversation-style inbox rows ----- -->\n <div class=\"axp-in-app-inbox-item__avatar\">\n <axp-user-avatar\n [size]=\"48\"\n [userId]=\"data().sender!.id\"\n [axpUserCard]=\"data().sender!.id\"\n ></axp-user-avatar>\n @if (isUnread()) {\n <!-- ----- Unread status dot on the avatar ----- -->\n <div class=\"axp-in-app-inbox-item__unread-badge\"></div>\n }\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__content\">\n <div class=\"axp-in-app-inbox-item__headline\">\n <div class=\"axp-in-app-inbox-item__title\" [class.--unread]=\"isUnread()\">\n @if (isI18nKey(headline())) {\n <!-- ----- Localized headline ----- -->\n {{ headline() | translate | async }}\n } @else {\n <!-- ----- Plain-text sender name or title ----- -->\n {{ headline() }}\n }\n </div>\n @if (showPin()) {\n @if (data().isPinned) {\n <!-- ----- Pinned state next to the title ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin\"\n [attr.aria-label]=\"unpinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-solid fa-thumbtack\"></i></ax-icon>\n </button>\n } @else {\n <!-- ----- Unpinned control shown on hover ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin axp-in-app-inbox-item__pin--muted\"\n [attr.aria-label]=\"pinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-regular fa-thumbtack\"></i></ax-icon>\n </button>\n }\n }\n </div>\n\n @if (data().category) {\n <!-- ----- Optional category under the headline ----- -->\n <div class=\"axp-in-app-inbox-item__subline\">\n <span class=\"axp-in-app-inbox-item__category\">{{ data().category }}</span>\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__body\" [class.axp-in-app-inbox-item__body--html]=\"bodyIsHtml()\">\n @if (isI18nKey(data().body)) {\n <!-- ----- Localized body preview ----- -->\n {{ data().body | translate | async }}\n }\n <!-- ----- Light HTML body (lists, status badges) ----- -->\n @else if (bodyIsHtml()) {\n <div [innerHTML]=\"bodyHtml() | safe: 'html'\"></div>\n }\n <!-- ----- Plain-text body preview ----- -->\n @else {\n {{ data().body }}\n }\n </div>\n @if (data().attachments?.length) {\n <div class=\"axp-in-app-inbox-item__attachments\">\n <axp-file-list\n [files]=\"attachmentFiles()\"\n [readonly]=\"true\"\n [mini]=\"true\"\n [downloadFile]=\"downloadAttachment\"\n />\n @if (downloadFailed()) { <span role=\"alert\">{{ '@communication-management:in-app.errors.download-failed' | translate | async }}</span> }\n </div>\n }\n </div>\n\n @if (showMeta()) {\n <!-- ----- Time at top-end; close replaces it on hover ----- -->\n <div class=\"axp-in-app-inbox-item__meta\" [class.--has-dismiss]=\"showDismiss()\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time\">{{ data().createdAt | format: 'timeleft' | async }}</span>\n }\n @if (showDismiss()) {\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__dismiss\"\n [attr.aria-label]=\"markAsReadLabelKey() | translate | async\"\n (click)=\"onDismissMarkAsRead($event)\"\n >\n <ax-icon><i class=\"fa-light fa-xmark\" aria-hidden=\"true\"></i></ax-icon>\n </button>\n }\n </div>\n }\n\n @if (showDate() || hasDefaultAction()) {\n <!-- ----- Chevron always vertically centered in the row ----- -->\n <div class=\"axp-in-app-inbox-item__actions\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time-sizer\" aria-hidden=\"true\">\n {{ data().createdAt | format: 'timeleft' | async }}\n </span>\n }\n @if (hasDefaultAction()) {\n <div class=\"axp-in-app-inbox-item__chevron\" aria-hidden=\"true\">\n <ax-icon><i class=\"fa-light fa-chevron-right axp-in-app-inbox-item__chevron-icon\"></i></ax-icon>\n </div>\n }\n </div>\n }\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block text-start border-b;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}:host(:last-child){@apply border-b-0;}.axp-in-app-inbox-item{@apply relative flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors duration-150;}.axp-in-app-inbox-item.read,.axp-in-app-inbox-item.unread{background:transparent}.axp-in-app-inbox-item.unread-highlight{background:rgb(var(--ax-sys-color-warning-50))}@media(hover:hover){.axp-in-app-inbox-item:hover{background:rgb(var(--ax-sys-color-lightest-surface))}.axp-in-app-inbox-item:hover.unread-highlight{background:rgb(var(--ax-sys-color-warning-100))}.axp-in-app-inbox-item:hover .axp-in-app-inbox-item__pin--muted{visibility:visible;pointer-events:auto}}.axp-in-app-inbox-item__actions{@apply flex shrink-0 items-center justify-end;}.axp-in-app-inbox-item__meta{@apply absolute top-0 end-4 grid items-center justify-items-end pt-1;}.axp-in-app-inbox-item__time-sizer{@apply invisible block h-0 w-max shrink-0 overflow-hidden whitespace-nowrap;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__dismiss{grid-area:1 / 1}.axp-in-app-inbox-item__dismiss{@apply inline-flex size-6 items-center justify-center rounded-full border-0 bg-transparent p-0;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__dismiss i{@apply text-xs leading-none;}.axp-in-app-inbox-item__dismiss:hover{color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__chevron{@apply inline-flex size-6 items-center justify-center text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__avatar{@apply relative h-12 shrink-0;}.axp-in-app-inbox-item__icon{@apply flex size-12 shrink-0 items-center justify-center rounded-full border text-base leading-none;}.axp-in-app-inbox-item__icon i{@apply block text-base leading-none;}.axp-in-app-inbox-item__icon.Notice{@apply border;background-color:rgb(var(--ax-sys-color-success-lightest-surface));border-color:rgb(var(--ax-sys-color-border-success-light-surface))}.axp-in-app-inbox-item__icon.Notice i{color:rgb(var(--ax-sys-color-on-success-lightest-surface))}.axp-in-app-inbox-item__icon.Danger{@apply border;background-color:rgb(var(--ax-sys-color-danger-lightest-surface));border-color:rgb(var(--ax-sys-color-border-danger-light-surface))}.axp-in-app-inbox-item__icon.Danger i{color:rgb(var(--ax-sys-color-on-danger-lightest-surface))}.axp-in-app-inbox-item__icon.Warning{@apply border;background-color:rgb(var(--ax-sys-color-warning-lightest-surface));border-color:rgb(var(--ax-sys-color-border-warning-light-surface))}.axp-in-app-inbox-item__icon.Warning i{color:rgb(var(--ax-sys-color-on-warning-lightest-surface))}.axp-in-app-inbox-item__unread-badge{@apply absolute bottom-0 end-0;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.axp-in-app-inbox-item__content{@apply flex min-w-0 flex-1 flex-col text-start;}.axp-in-app-inbox-item__headline{@apply flex min-w-0 items-center gap-1;}.axp-in-app-inbox-item__title{@apply min-w-0 text-sm font-medium truncate;color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__title.--unread{@apply font-semibold;}.axp-in-app-inbox-item__subline{@apply mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__category{@apply text-xs whitespace-nowrap;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item--rich{@apply items-start;}.axp-in-app-inbox-item__body{@apply mt-1 line-clamp-2 text-start text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__body--html{display:block;overflow:visible;-webkit-line-clamp:unset;line-clamp:unset;margin-top:.125rem;font-size:12px;line-height:1.35}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4,p,ul,li,div,span):not(.axp-status-badge){font-size:inherit!important;line-height:inherit!important;font-family:inherit!important;margin:0!important}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4){display:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html ul{padding:0!important;list-style:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html li{margin:0 0 2px!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-meta{@apply mb-0.5 text-xs;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-row{@apply block truncate;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge{display:inline-block!important;position:relative;top:-1px;padding:1px 6px!important;border-radius:999px!important;font-size:10px!important;line-height:1.3!important;font-weight:600!important;white-space:nowrap!important;vertical-align:middle}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--danger,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--expired{background-color:#fee2e2!important;color:#b91c1c!important;border:1px solid #fecaca!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--warning,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--near{background-color:#ffedd5!important;color:#b45309!important;border:1px solid #fed7aa!important}.axp-in-app-inbox-item__pin{@apply inline-flex shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0.5;color:rgb(var(--ax-sys-color-primary))}.axp-in-app-inbox-item__pin i{@apply rotate-45 text-xs;}.axp-in-app-inbox-item__pin--muted{color:rgb(var(--ax-sys-color-on-surface-variant))}@media(hover:hover){.axp-in-app-inbox-item__pin--muted{visibility:hidden;pointer-events:none}}.axp-in-app-inbox-item__pin--muted:focus-visible{visibility:visible;pointer-events:auto}.axp-in-app-inbox-item__pin--muted:hover{color:rgb(var(--ax-sys-color-primary))}@media(hover:hover){.axp-in-app-inbox-item__dismiss{opacity:0;pointer-events:none}:host(:hover) .axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}:host(:hover) .axp-in-app-inbox-item__dismiss{opacity:1;pointer-events:auto}:host(:hover) .axp-in-app-inbox-item__chevron{color:rgb(var(--ax-sys-color-on-surface))}}@media(hover:none){.axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}}.axp-in-app-inbox-item__meta.--has-dismiss:focus-within .axp-in-app-inbox-item__time{opacity:0}.axp-in-app-inbox-item__dismiss:focus-visible{opacity:1;pointer-events:auto;color:rgb(var(--ax-sys-color-on-surface))}:host-context([dir=\"rtl\"]) .axp-in-app-inbox-item__chevron-icon{transform:scaleX(-1)}.axp-in-app-inbox-item__attachments{margin-top:.5rem}@container dashboard-inbox (width < 24rem){:host(.inbox-widget-row) .axp-in-app-inbox-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.5rem;row-gap:.125rem;padding:.5rem}:host(.inbox-widget-row) :is(.axp-in-app-inbox-item__avatar,.axp-in-app-inbox-item__icon){grid-column:1;grid-row:1}:host(.inbox-widget-row) .axp-in-app-inbox-item__content{grid-column:2;grid-row:1;overflow-wrap:anywhere}:host(.inbox-widget-row) .axp-in-app-inbox-item__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}:host(.inbox-widget-row) .axp-in-app-inbox-item__actions{grid-column:3;grid-row:1}:host(.inbox-widget-row) .axp-in-app-inbox-item__time-sizer{display:none}:host(.inbox-widget-row) .axp-in-app-inbox-item__meta{position:static;grid-column:2 / -1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.375rem;padding:0}:host(.inbox-widget-row) :is(.axp-in-app-inbox-item__category,.axp-in-app-inbox-item__time){white-space:normal;overflow-wrap:anywhere}:host(.inbox-widget-row) .axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time,:host(.inbox-widget-row) .axp-in-app-inbox-item__meta .axp-in-app-inbox-item__dismiss{opacity:1;pointer-events:auto}}@media(any-pointer:coarse){@container dashboard-inbox (width < 24rem){:host(.inbox-widget-row) .axp-in-app-inbox-item__dismiss{min-inline-size:44px;min-block-size:44px}}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXPUserAvatarComponent, selector: "axp-user-avatar", inputs: ["size", "userId", "showPresence", "displayName", "displayAvatar"] }, { kind: "directive", type: AXPUserCardDirective, selector: "[axpUserCard]", inputs: ["axpUserCard", "axpUserCardDisabled", "axpUserCardTrigger"] }, { kind: "component", type: AXPFileListComponent, selector: "axp-file-list", inputs: ["readonly", "fileEditable", "enableTitleDescription", "multiple", "mini", "look", "showActions", "titleKey", "showLabel", "linksLayout", "files", "downloadFile", "accept", "maxFileSize", "showUploadZoneHint", "plugins", "excludePlugins", "capabilities"], outputs: ["onRemove", "onRevert", "onRename"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.AXFormatPipe, name: "format" }, { kind: "pipe", type: AXSafePipe, name: "safe" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1796
1967
  }
1797
1968
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPInAppInboxItemComponent, decorators: [{
1798
1969
  type: Component,
@@ -1801,11 +1972,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1801
1972
  AXDecoratorModule,
1802
1973
  AXPUserAvatarComponent,
1803
1974
  AXPUserCardDirective,
1975
+ AXPFileListComponent,
1804
1976
  AXBadgeModule,
1805
1977
  AXFormatModule,
1806
1978
  AXSafePipe,
1807
1979
  AXTranslationModule,
1808
- ], template: "<div\n class=\"axp-in-app-inbox-item\"\n [id]=\"data().id\"\n (click)=\"onPress(data().id)\"\n [class]=\"[\n priorityClass(),\n isUnread() ? 'unread' : 'read',\n isUnread() && highlightUnreadBackground() ? 'unread-highlight' : '',\n bodyIsHtml() ? 'axp-in-app-inbox-item--rich' : '',\n ]\"\n>\n @if (showItemIcon()) {\n <!-- ----- Priority icon when the item has no real sender avatar ----- -->\n <div class=\"axp-in-app-inbox-item__icon\" [class]=\"priorityClass()\">\n <i [class]=\"itemIconClass()\" aria-hidden=\"true\"></i>\n </div>\n } @else if (showItemAvatar()) {\n <!-- ----- Sender avatar for conversation-style inbox rows ----- -->\n <div class=\"axp-in-app-inbox-item__avatar\">\n <axp-user-avatar\n [size]=\"48\"\n [userId]=\"data().sender!.id\"\n [axpUserCard]=\"data().sender!.id\"\n ></axp-user-avatar>\n @if (isUnread()) {\n <!-- ----- Unread status dot on the avatar ----- -->\n <div class=\"axp-in-app-inbox-item__unread-badge\"></div>\n }\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__content\">\n <div class=\"axp-in-app-inbox-item__headline\">\n <div class=\"axp-in-app-inbox-item__title\" [class.--unread]=\"isUnread()\">\n @if (isI18nKey(headline())) {\n <!-- ----- Localized headline ----- -->\n {{ headline() | translate | async }}\n } @else {\n <!-- ----- Plain-text sender name or title ----- -->\n {{ headline() }}\n }\n </div>\n @if (showPin()) {\n @if (data().isPinned) {\n <!-- ----- Pinned state next to the title ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin\"\n [attr.aria-label]=\"unpinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-solid fa-thumbtack\"></i></ax-icon>\n </button>\n } @else {\n <!-- ----- Unpinned control shown on hover ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin axp-in-app-inbox-item__pin--muted\"\n [attr.aria-label]=\"pinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-regular fa-thumbtack\"></i></ax-icon>\n </button>\n }\n }\n </div>\n\n @if (data().category) {\n <!-- ----- Optional category under the headline ----- -->\n <div class=\"axp-in-app-inbox-item__subline\">\n <span class=\"axp-in-app-inbox-item__category\">{{ data().category }}</span>\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__body\" [class.axp-in-app-inbox-item__body--html]=\"bodyIsHtml()\">\n @if (isI18nKey(data().body)) {\n <!-- ----- Localized body preview ----- -->\n {{ data().body | translate | async }}\n }\n <!-- ----- Light HTML body (lists, status badges) ----- -->\n @else if (bodyIsHtml()) {\n <div [innerHTML]=\"bodyHtml() | safe: 'html'\"></div>\n }\n <!-- ----- Plain-text body preview ----- -->\n @else {\n {{ data().body }}\n }\n </div>\n </div>\n\n @if (showMeta()) {\n <!-- ----- Time at top-end; close replaces it on hover ----- -->\n <div class=\"axp-in-app-inbox-item__meta\" [class.--has-dismiss]=\"showDismiss()\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time\">{{ data().createdAt | format: 'timeleft' | async }}</span>\n }\n @if (showDismiss()) {\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__dismiss\"\n [attr.aria-label]=\"markAsReadLabelKey() | translate | async\"\n (click)=\"onDismissMarkAsRead($event)\"\n >\n <ax-icon><i class=\"fa-light fa-xmark\" aria-hidden=\"true\"></i></ax-icon>\n </button>\n }\n </div>\n }\n\n @if (showDate() || hasDefaultAction()) {\n <!-- ----- Chevron always vertically centered in the row ----- -->\n <div class=\"axp-in-app-inbox-item__actions\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time-sizer\" aria-hidden=\"true\">\n {{ data().createdAt | format: 'timeleft' | async }}\n </span>\n }\n @if (hasDefaultAction()) {\n <div class=\"axp-in-app-inbox-item__chevron\" aria-hidden=\"true\">\n <ax-icon><i class=\"fa-light fa-chevron-right axp-in-app-inbox-item__chevron-icon\"></i></ax-icon>\n </div>\n }\n </div>\n }\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block text-start border-b;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}:host(:last-child){@apply border-b-0;}.axp-in-app-inbox-item{@apply relative flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors duration-150;}.axp-in-app-inbox-item.read,.axp-in-app-inbox-item.unread{background:transparent}.axp-in-app-inbox-item.unread-highlight{background:rgb(var(--ax-sys-color-warning-50))}@media(hover:hover){.axp-in-app-inbox-item:hover{background:rgb(var(--ax-sys-color-lightest-surface))}.axp-in-app-inbox-item:hover.unread-highlight{background:rgb(var(--ax-sys-color-warning-100))}.axp-in-app-inbox-item:hover .axp-in-app-inbox-item__pin--muted{visibility:visible;pointer-events:auto}}.axp-in-app-inbox-item__actions{@apply flex shrink-0 items-center justify-end;}.axp-in-app-inbox-item__meta{@apply absolute top-0 end-4 grid items-center justify-items-end pt-1;}.axp-in-app-inbox-item__time-sizer{@apply invisible block h-0 w-max shrink-0 overflow-hidden whitespace-nowrap;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__dismiss{grid-area:1 / 1}.axp-in-app-inbox-item__dismiss{@apply inline-flex size-6 items-center justify-center rounded-full border-0 bg-transparent p-0;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__dismiss i{@apply text-xs leading-none;}.axp-in-app-inbox-item__dismiss:hover{color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__chevron{@apply inline-flex size-6 items-center justify-center text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__avatar{@apply relative h-12 shrink-0;}.axp-in-app-inbox-item__icon{@apply flex size-12 shrink-0 items-center justify-center rounded-full border text-base leading-none;}.axp-in-app-inbox-item__icon i{@apply block text-base leading-none;}.axp-in-app-inbox-item__icon.Notice{@apply border;background-color:rgb(var(--ax-sys-color-success-lightest-surface));border-color:rgb(var(--ax-sys-color-border-success-light-surface))}.axp-in-app-inbox-item__icon.Notice i{color:rgb(var(--ax-sys-color-on-success-lightest-surface))}.axp-in-app-inbox-item__icon.Danger{@apply border;background-color:rgb(var(--ax-sys-color-danger-lightest-surface));border-color:rgb(var(--ax-sys-color-border-danger-light-surface))}.axp-in-app-inbox-item__icon.Danger i{color:rgb(var(--ax-sys-color-on-danger-lightest-surface))}.axp-in-app-inbox-item__icon.Warning{@apply border;background-color:rgb(var(--ax-sys-color-warning-lightest-surface));border-color:rgb(var(--ax-sys-color-border-warning-light-surface))}.axp-in-app-inbox-item__icon.Warning i{color:rgb(var(--ax-sys-color-on-warning-lightest-surface))}.axp-in-app-inbox-item__unread-badge{@apply absolute bottom-0 end-0;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.axp-in-app-inbox-item__content{@apply flex min-w-0 flex-1 flex-col text-start;}.axp-in-app-inbox-item__headline{@apply flex min-w-0 items-center gap-1;}.axp-in-app-inbox-item__title{@apply min-w-0 text-sm font-medium truncate;color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__title.--unread{@apply font-semibold;}.axp-in-app-inbox-item__subline{@apply mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__category{@apply text-xs whitespace-nowrap;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item--rich{@apply items-start;}.axp-in-app-inbox-item__body{@apply mt-1 line-clamp-2 text-start text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__body--html{display:block;overflow:visible;-webkit-line-clamp:unset;line-clamp:unset;margin-top:.125rem;font-size:12px;line-height:1.35}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4,p,ul,li,div,span):not(.axp-status-badge){font-size:inherit!important;line-height:inherit!important;font-family:inherit!important;margin:0!important}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4){display:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html ul{padding:0!important;list-style:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html li{margin:0 0 2px!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-meta{@apply mb-0.5 text-xs;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-row{@apply block truncate;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge{display:inline-block!important;position:relative;top:-1px;padding:1px 6px!important;border-radius:999px!important;font-size:10px!important;line-height:1.3!important;font-weight:600!important;white-space:nowrap!important;vertical-align:middle}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--danger,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--expired{background-color:#fee2e2!important;color:#b91c1c!important;border:1px solid #fecaca!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--warning,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--near{background-color:#ffedd5!important;color:#b45309!important;border:1px solid #fed7aa!important}.axp-in-app-inbox-item__pin{@apply inline-flex shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0.5;color:rgb(var(--ax-sys-color-primary))}.axp-in-app-inbox-item__pin i{@apply rotate-45 text-xs;}.axp-in-app-inbox-item__pin--muted{color:rgb(var(--ax-sys-color-on-surface-variant))}@media(hover:hover){.axp-in-app-inbox-item__pin--muted{visibility:hidden;pointer-events:none}}.axp-in-app-inbox-item__pin--muted:focus-visible{visibility:visible;pointer-events:auto}.axp-in-app-inbox-item__pin--muted:hover{color:rgb(var(--ax-sys-color-primary))}@media(hover:hover){.axp-in-app-inbox-item__dismiss{opacity:0;pointer-events:none}:host(:hover) .axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}:host(:hover) .axp-in-app-inbox-item__dismiss{opacity:1;pointer-events:auto}:host(:hover) .axp-in-app-inbox-item__chevron{color:rgb(var(--ax-sys-color-on-surface))}}@media(hover:none){.axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}}.axp-in-app-inbox-item__meta.--has-dismiss:focus-within .axp-in-app-inbox-item__time{opacity:0}.axp-in-app-inbox-item__dismiss:focus-visible{opacity:1;pointer-events:auto;color:rgb(var(--ax-sys-color-on-surface))}:host-context([dir=\"rtl\"]) .axp-in-app-inbox-item__chevron-icon{transform:scaleX(-1)}\n"] }]
1980
+ ], template: "<div\n class=\"axp-in-app-inbox-item\"\n [id]=\"data().id\"\n (click)=\"onPress(data().id)\"\n [class]=\"[\n priorityClass(),\n isUnread() ? 'unread' : 'read',\n isUnread() && highlightUnreadBackground() ? 'unread-highlight' : '',\n bodyIsHtml() ? 'axp-in-app-inbox-item--rich' : '',\n ]\"\n>\n @if (showItemIcon()) {\n <!-- ----- Priority icon when the item has no real sender avatar ----- -->\n <div class=\"axp-in-app-inbox-item__icon\" [class]=\"iconSurfaceClass() || priorityClass()\">\n <i [class]=\"itemIconClass()\" aria-hidden=\"true\"></i>\n </div>\n } @else if (showItemAvatar()) {\n <!-- ----- Sender avatar for conversation-style inbox rows ----- -->\n <div class=\"axp-in-app-inbox-item__avatar\">\n <axp-user-avatar\n [size]=\"48\"\n [userId]=\"data().sender!.id\"\n [axpUserCard]=\"data().sender!.id\"\n ></axp-user-avatar>\n @if (isUnread()) {\n <!-- ----- Unread status dot on the avatar ----- -->\n <div class=\"axp-in-app-inbox-item__unread-badge\"></div>\n }\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__content\">\n <div class=\"axp-in-app-inbox-item__headline\">\n <div class=\"axp-in-app-inbox-item__title\" [class.--unread]=\"isUnread()\">\n @if (isI18nKey(headline())) {\n <!-- ----- Localized headline ----- -->\n {{ headline() | translate | async }}\n } @else {\n <!-- ----- Plain-text sender name or title ----- -->\n {{ headline() }}\n }\n </div>\n @if (showPin()) {\n @if (data().isPinned) {\n <!-- ----- Pinned state next to the title ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin\"\n [attr.aria-label]=\"unpinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-solid fa-thumbtack\"></i></ax-icon>\n </button>\n } @else {\n <!-- ----- Unpinned control shown on hover ----- -->\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__pin axp-in-app-inbox-item__pin--muted\"\n [attr.aria-label]=\"pinLabelKey() | translate | async\"\n (click)=\"onTogglePin($event)\"\n >\n <ax-icon><i class=\"fa-regular fa-thumbtack\"></i></ax-icon>\n </button>\n }\n }\n </div>\n\n @if (data().category) {\n <!-- ----- Optional category under the headline ----- -->\n <div class=\"axp-in-app-inbox-item__subline\">\n <span class=\"axp-in-app-inbox-item__category\">{{ data().category }}</span>\n </div>\n }\n\n <div class=\"axp-in-app-inbox-item__body\" [class.axp-in-app-inbox-item__body--html]=\"bodyIsHtml()\">\n @if (isI18nKey(data().body)) {\n <!-- ----- Localized body preview ----- -->\n {{ data().body | translate | async }}\n }\n <!-- ----- Light HTML body (lists, status badges) ----- -->\n @else if (bodyIsHtml()) {\n <div [innerHTML]=\"bodyHtml() | safe: 'html'\"></div>\n }\n <!-- ----- Plain-text body preview ----- -->\n @else {\n {{ data().body }}\n }\n </div>\n @if (data().attachments?.length) {\n <div class=\"axp-in-app-inbox-item__attachments\">\n <axp-file-list\n [files]=\"attachmentFiles()\"\n [readonly]=\"true\"\n [mini]=\"true\"\n [downloadFile]=\"downloadAttachment\"\n />\n @if (downloadFailed()) { <span role=\"alert\">{{ '@communication-management:in-app.errors.download-failed' | translate | async }}</span> }\n </div>\n }\n </div>\n\n @if (showMeta()) {\n <!-- ----- Time at top-end; close replaces it on hover ----- -->\n <div class=\"axp-in-app-inbox-item__meta\" [class.--has-dismiss]=\"showDismiss()\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time\">{{ data().createdAt | format: 'timeleft' | async }}</span>\n }\n @if (showDismiss()) {\n <button\n type=\"button\"\n class=\"axp-in-app-inbox-item__dismiss\"\n [attr.aria-label]=\"markAsReadLabelKey() | translate | async\"\n (click)=\"onDismissMarkAsRead($event)\"\n >\n <ax-icon><i class=\"fa-light fa-xmark\" aria-hidden=\"true\"></i></ax-icon>\n </button>\n }\n </div>\n }\n\n @if (showDate() || hasDefaultAction()) {\n <!-- ----- Chevron always vertically centered in the row ----- -->\n <div class=\"axp-in-app-inbox-item__actions\">\n @if (showDate()) {\n <span class=\"axp-in-app-inbox-item__time-sizer\" aria-hidden=\"true\">\n {{ data().createdAt | format: 'timeleft' | async }}\n </span>\n }\n @if (hasDefaultAction()) {\n <div class=\"axp-in-app-inbox-item__chevron\" aria-hidden=\"true\">\n <ax-icon><i class=\"fa-light fa-chevron-right axp-in-app-inbox-item__chevron-icon\"></i></ax-icon>\n </div>\n }\n </div>\n }\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block text-start border-b;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}:host(:last-child){@apply border-b-0;}.axp-in-app-inbox-item{@apply relative flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors duration-150;}.axp-in-app-inbox-item.read,.axp-in-app-inbox-item.unread{background:transparent}.axp-in-app-inbox-item.unread-highlight{background:rgb(var(--ax-sys-color-warning-50))}@media(hover:hover){.axp-in-app-inbox-item:hover{background:rgb(var(--ax-sys-color-lightest-surface))}.axp-in-app-inbox-item:hover.unread-highlight{background:rgb(var(--ax-sys-color-warning-100))}.axp-in-app-inbox-item:hover .axp-in-app-inbox-item__pin--muted{visibility:visible;pointer-events:auto}}.axp-in-app-inbox-item__actions{@apply flex shrink-0 items-center justify-end;}.axp-in-app-inbox-item__meta{@apply absolute top-0 end-4 grid items-center justify-items-end pt-1;}.axp-in-app-inbox-item__time-sizer{@apply invisible block h-0 w-max shrink-0 overflow-hidden whitespace-nowrap;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__dismiss{grid-area:1 / 1}.axp-in-app-inbox-item__dismiss{@apply inline-flex size-6 items-center justify-center rounded-full border-0 bg-transparent p-0;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__dismiss i{@apply text-xs leading-none;}.axp-in-app-inbox-item__dismiss:hover{color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__chevron{@apply inline-flex size-6 items-center justify-center text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__avatar{@apply relative h-12 shrink-0;}.axp-in-app-inbox-item__icon{@apply flex size-12 shrink-0 items-center justify-center rounded-full border text-base leading-none;}.axp-in-app-inbox-item__icon i{@apply block text-base leading-none;}.axp-in-app-inbox-item__icon.Notice{@apply border;background-color:rgb(var(--ax-sys-color-success-lightest-surface));border-color:rgb(var(--ax-sys-color-border-success-light-surface))}.axp-in-app-inbox-item__icon.Notice i{color:rgb(var(--ax-sys-color-on-success-lightest-surface))}.axp-in-app-inbox-item__icon.Danger{@apply border;background-color:rgb(var(--ax-sys-color-danger-lightest-surface));border-color:rgb(var(--ax-sys-color-border-danger-light-surface))}.axp-in-app-inbox-item__icon.Danger i{color:rgb(var(--ax-sys-color-on-danger-lightest-surface))}.axp-in-app-inbox-item__icon.Warning{@apply border;background-color:rgb(var(--ax-sys-color-warning-lightest-surface));border-color:rgb(var(--ax-sys-color-border-warning-light-surface))}.axp-in-app-inbox-item__icon.Warning i{color:rgb(var(--ax-sys-color-on-warning-lightest-surface))}.axp-in-app-inbox-item__unread-badge{@apply absolute bottom-0 end-0;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.axp-in-app-inbox-item__content{@apply flex min-w-0 flex-1 flex-col text-start;}.axp-in-app-inbox-item__headline{@apply flex min-w-0 items-center gap-1;}.axp-in-app-inbox-item__title{@apply min-w-0 text-sm font-medium truncate;color:rgb(var(--ax-sys-color-on-surface))}.axp-in-app-inbox-item__title.--unread{@apply font-semibold;}.axp-in-app-inbox-item__subline{@apply mt-0.5 flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5;}.axp-in-app-inbox-item__time,.axp-in-app-inbox-item__category{@apply text-xs whitespace-nowrap;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item--rich{@apply items-start;}.axp-in-app-inbox-item__body{@apply mt-1 line-clamp-2 text-start text-sm;color:rgb(var(--ax-sys-color-on-surface-variant))}.axp-in-app-inbox-item__body--html{display:block;overflow:visible;-webkit-line-clamp:unset;line-clamp:unset;margin-top:.125rem;font-size:12px;line-height:1.35}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4,p,ul,li,div,span):not(.axp-status-badge){font-size:inherit!important;line-height:inherit!important;font-family:inherit!important;margin:0!important}:host ::ng-deep .axp-in-app-inbox-item__body--html :where(h1,h2,h3,h4){display:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html ul{padding:0!important;list-style:none!important}:host ::ng-deep .axp-in-app-inbox-item__body--html li{margin:0 0 2px!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-meta{@apply mb-0.5 text-xs;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-in-app-digest-row{@apply block truncate;}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge{display:inline-block!important;position:relative;top:-1px;padding:1px 6px!important;border-radius:999px!important;font-size:10px!important;line-height:1.3!important;font-weight:600!important;white-space:nowrap!important;vertical-align:middle}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--danger,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--expired{background-color:#fee2e2!important;color:#b91c1c!important;border:1px solid #fecaca!important}:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--warning,:host ::ng-deep .axp-in-app-inbox-item__body--html .axp-status-badge--near{background-color:#ffedd5!important;color:#b45309!important;border:1px solid #fed7aa!important}.axp-in-app-inbox-item__pin{@apply inline-flex shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0.5;color:rgb(var(--ax-sys-color-primary))}.axp-in-app-inbox-item__pin i{@apply rotate-45 text-xs;}.axp-in-app-inbox-item__pin--muted{color:rgb(var(--ax-sys-color-on-surface-variant))}@media(hover:hover){.axp-in-app-inbox-item__pin--muted{visibility:hidden;pointer-events:none}}.axp-in-app-inbox-item__pin--muted:focus-visible{visibility:visible;pointer-events:auto}.axp-in-app-inbox-item__pin--muted:hover{color:rgb(var(--ax-sys-color-primary))}@media(hover:hover){.axp-in-app-inbox-item__dismiss{opacity:0;pointer-events:none}:host(:hover) .axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}:host(:hover) .axp-in-app-inbox-item__dismiss{opacity:1;pointer-events:auto}:host(:hover) .axp-in-app-inbox-item__chevron{color:rgb(var(--ax-sys-color-on-surface))}}@media(hover:none){.axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time{opacity:0}}.axp-in-app-inbox-item__meta.--has-dismiss:focus-within .axp-in-app-inbox-item__time{opacity:0}.axp-in-app-inbox-item__dismiss:focus-visible{opacity:1;pointer-events:auto;color:rgb(var(--ax-sys-color-on-surface))}:host-context([dir=\"rtl\"]) .axp-in-app-inbox-item__chevron-icon{transform:scaleX(-1)}.axp-in-app-inbox-item__attachments{margin-top:.5rem}@container dashboard-inbox (width < 24rem){:host(.inbox-widget-row) .axp-in-app-inbox-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.5rem;row-gap:.125rem;padding:.5rem}:host(.inbox-widget-row) :is(.axp-in-app-inbox-item__avatar,.axp-in-app-inbox-item__icon){grid-column:1;grid-row:1}:host(.inbox-widget-row) .axp-in-app-inbox-item__content{grid-column:2;grid-row:1;overflow-wrap:anywhere}:host(.inbox-widget-row) .axp-in-app-inbox-item__title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;white-space:normal}:host(.inbox-widget-row) .axp-in-app-inbox-item__actions{grid-column:3;grid-row:1}:host(.inbox-widget-row) .axp-in-app-inbox-item__time-sizer{display:none}:host(.inbox-widget-row) .axp-in-app-inbox-item__meta{position:static;grid-column:2 / -1;grid-row:2;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.375rem;padding:0}:host(.inbox-widget-row) :is(.axp-in-app-inbox-item__category,.axp-in-app-inbox-item__time){white-space:normal;overflow-wrap:anywhere}:host(.inbox-widget-row) .axp-in-app-inbox-item__meta.--has-dismiss .axp-in-app-inbox-item__time,:host(.inbox-widget-row) .axp-in-app-inbox-item__meta .axp-in-app-inbox-item__dismiss{opacity:1;pointer-events:auto}}@media(any-pointer:coarse){@container dashboard-inbox (width < 24rem){:host(.inbox-widget-row) .axp-in-app-inbox-item__dismiss{min-inline-size:44px;min-block-size:44px}}}\n"] }]
1809
1981
  }], propDecorators: { data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], showAvatar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAvatar", required: false }] }], showDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDate", required: false }] }], showPin: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPin", required: false }] }], pinLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinLabelKey", required: false }] }], unpinLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "unpinLabelKey", required: false }] }], highlightUnreadBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "highlightUnreadBackground", required: false }] }], showDismissUnread: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDismissUnread", required: false }] }], markAsReadLabelKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "markAsReadLabelKey", required: false }] }], itemPress: [{ type: i0.Output, args: ["itemPress"] }], markAsRead: [{ type: i0.Output, args: ["markAsRead"] }], togglePin: [{ type: i0.Output, args: ["togglePin"] }], closePopover: [{ type: i0.Output, args: ["closePopover"] }] } });
1810
1982
  function stripInboxHeadingMarkup(html) {
1811
1983
  return html
@@ -1964,11 +2136,10 @@ class AXPInAppInboxSlotComponent {
1964
2136
  this.i18n = inject(AXP_IN_APP_INBOX_I18N);
1965
2137
  this.themeStore = inject(AXPLayoutThemeService);
1966
2138
  this.connector = inject(AXPInAppInboxConnectorService);
1967
- this.outbox = inject(AXPLocalEntityOutboxService);
1968
2139
  this.syncStatus = inject(AXP_IN_APP_INBOX_SYNC_STATUS, { optional: true });
1969
2140
  this.liveUpdatesOffline = computed(() => this.syncStatus != null && !this.syncStatus.liveUpdatesConnected(), /* @ts-ignore */
1970
2141
  ...(ngDevMode ? [{ debugName: "liveUpdatesOffline" }] : /* istanbul ignore next */ []));
1971
- this.pendingSync = computed(() => this.outbox.pendingCount() > 0, /* @ts-ignore */
2142
+ this.pendingSync = computed(() => this.connector.pendingChanges(), /* @ts-ignore */
1972
2143
  ...(ngDevMode ? [{ debugName: "pendingSync" }] : /* istanbul ignore next */ []));
1973
2144
  this.statusTitleKey = computed(() => {
1974
2145
  if (this.pendingSync()) {
@@ -1995,7 +2166,7 @@ class AXPInAppInboxSlotComponent {
1995
2166
  this.popover()?.close();
1996
2167
  }
1997
2168
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPInAppInboxSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1998
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPInAppInboxSlotComponent, isStandalone: true, selector: "axp-in-app-inbox-slot", viewQueries: [{ propertyName: "popover", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-button\n [iconOnly]=\"true\"\n class=\"relative axp-in-app-inbox-slot__button\"\n [color]=\"themeStore.headerButtonColor()\"\n [look]=\"themeStore.headerButtonLook()\"\n #inboxTrigger\n [title]=\"statusTitleKey() ? ((statusTitleKey() | translate | async) ?? '') : ''\"\n>\n <ax-icon>\n <i [class]=\"config.headerIconClass\"></i>\n </ax-icon>\n</ax-button>\n\n<div\n class=\"axp-in-app-inbox-slot__badge\"\n [class.--xs]=\"badgeDisplay().length > 2\"\n>\n @if (badgeDisplay()) {\n <ax-badge color=\"danger\" [text]=\"badgeDisplay()\"></ax-badge>\n }\n</div>\n<ax-popover\n [target]=\"inboxTrigger\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n>\n <div class=\"bg-lightest rounded-md w-full\">\n <axp-in-app-inbox-panel (closePopover)=\"closePopover()\" />\n </div>\n</ax-popover>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";axp-in-app-inbox-slot{@apply relative;}axp-in-app-inbox-slot .axp-in-app-inbox-slot__badge{@apply absolute top-[-.25rem] end-[-.25rem];pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i4$2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPInAppInboxPanelComponent, selector: "axp-in-app-inbox-panel", outputs: ["unreadCountChange", "closePopover"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPInAppInboxSlotComponent, isStandalone: true, selector: "axp-in-app-inbox-slot", viewQueries: [{ propertyName: "popover", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-button\n [iconOnly]=\"true\"\n class=\"relative axp-in-app-inbox-slot__button\"\n [color]=\"themeStore.headerButtonColor()\"\n [look]=\"themeStore.headerButtonLook()\"\n #inboxTrigger\n [title]=\"statusTitleKey() ? ((statusTitleKey() | translate | async) ?? '') : ''\"\n>\n <ax-icon>\n <i [class]=\"config.headerIconClass\"></i>\n </ax-icon>\n</ax-button>\n\n<div\n class=\"axp-in-app-inbox-slot__badge\"\n [class.--xs]=\"badgeDisplay().length > 2\"\n>\n @if (badgeDisplay()) {\n <ax-badge color=\"danger\" [text]=\"badgeDisplay()\"></ax-badge>\n }\n</div>\n<ax-popover\n [target]=\"inboxTrigger\"\n [openOn]=\"'toggle'\"\n [closeOn]=\"'clickOut'\"\n [adaptivityEnabled]=\"true\"\n>\n <div class=\"bg-lightest rounded-md w-full\">\n <axp-in-app-inbox-panel (closePopover)=\"closePopover()\" />\n </div>\n</ax-popover>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";axp-in-app-inbox-slot{@apply relative;}axp-in-app-inbox-slot .axp-in-app-inbox-slot__badge{@apply absolute top-[-.25rem] end-[-.25rem];pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1$1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i3.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i4$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i4$2.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "visualContextScope", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "restoreFocusOnClose", "openAfter", "closeAfter", "closeOnScroll", "closeOnNavigation", "backdropClass", "panelClass", "adaptivityEnabled", "draggable"], outputs: ["onOpened", "onClosed"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPInAppInboxPanelComponent, selector: "axp-in-app-inbox-panel", outputs: ["unreadCountChange", "closePopover"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
1999
2170
  }
2000
2171
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPInAppInboxSlotComponent, decorators: [{
2001
2172
  type: Component,
@@ -2376,7 +2547,7 @@ class AXPCommunicationInAppInboxWidgetViewComponent extends AXPValueWidgetCompon
2376
2547
  this.cdr.detectChanges();
2377
2548
  }
2378
2549
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCommunicationInAppInboxWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2379
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPCommunicationInAppInboxWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"size-full p-3 flex flex-col min-h-0\">\n <div class=\"overflow-auto flex-1 min-h-0 flex flex-col\">\n @for (item of inboxItems(); track item.id) {\n <axp-in-app-inbox-item\n [data]=\"item\"\n [showAvatar]=\"showAvatar()\"\n [showDate]=\"showDate()\"\n [markAsReadLabelKey]=\"i18n.markAsRead\"\n (itemPress)=\"onItemPress($event)\"\n (markAsRead)=\"onDismissUnread($event)\"\n />\n } @empty {\n <axp-state-message\n icon=\"fa-light fa-inbox\"\n [title]=\"i18n.emptyTitle\"\n [description]=\"i18n.emptyDescription\"\n />\n }\n </div>\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block size-full;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPInAppInboxItemComponent, selector: "axp-in-app-inbox-item", inputs: ["data", "showAvatar", "showDate", "showPin", "pinLabelKey", "unpinLabelKey", "highlightUnreadBackground", "showDismissUnread", "markAsReadLabelKey"], outputs: ["itemPress", "markAsRead", "togglePin", "closePopover"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2550
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXPCommunicationInAppInboxWidgetViewComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"inbox-widget size-full flex flex-col min-h-0\">\n <div class=\"inbox-widget__scroll overflow-auto flex-1 min-h-0 flex flex-col\">\n @for (item of inboxItems(); track item.id) {\n <axp-in-app-inbox-item\n class=\"inbox-widget-row\"\n [data]=\"item\"\n [showAvatar]=\"showAvatar()\"\n [showDate]=\"showDate()\"\n [markAsReadLabelKey]=\"i18n.markAsRead\"\n (itemPress)=\"onItemPress($event)\"\n (markAsRead)=\"onDismissUnread($event)\"\n />\n } @empty {\n <axp-state-message\n look=\"widget\"\n icon=\"fa-light fa-inbox\"\n [title]=\"i18n.emptyTitle\"\n [description]=\"i18n.emptyDescription\"\n />\n }\n </div>\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block size-full min-h-0 min-w-0;container:dashboard-inbox / inline-size}.inbox-widget{padding:clamp(.375rem,2.5cqi,.75rem)}.inbox-widget__scroll{overscroll-behavior:contain}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPInAppInboxItemComponent, selector: "axp-in-app-inbox-item", inputs: ["data", "showAvatar", "showDate", "showPin", "pinLabelKey", "unpinLabelKey", "highlightUnreadBackground", "showDismissUnread", "markAsReadLabelKey"], outputs: ["itemPress", "markAsRead", "togglePin", "closePopover"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2380
2551
  }
2381
2552
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXPCommunicationInAppInboxWidgetViewComponent, decorators: [{
2382
2553
  type: Component,
@@ -2385,7 +2556,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2385
2556
  AXTranslationModule,
2386
2557
  AXPInAppInboxItemComponent,
2387
2558
  AXPStateMessageComponent,
2388
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"size-full p-3 flex flex-col min-h-0\">\n <div class=\"overflow-auto flex-1 min-h-0 flex flex-col\">\n @for (item of inboxItems(); track item.id) {\n <axp-in-app-inbox-item\n [data]=\"item\"\n [showAvatar]=\"showAvatar()\"\n [showDate]=\"showDate()\"\n [markAsReadLabelKey]=\"i18n.markAsRead\"\n (itemPress)=\"onItemPress($event)\"\n (markAsRead)=\"onDismissUnread($event)\"\n />\n } @empty {\n <axp-state-message\n icon=\"fa-light fa-inbox\"\n [title]=\"i18n.emptyTitle\"\n [description]=\"i18n.emptyDescription\"\n />\n }\n </div>\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block size-full;}\n"] }]
2559
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"inbox-widget size-full flex flex-col min-h-0\">\n <div class=\"inbox-widget__scroll overflow-auto flex-1 min-h-0 flex flex-col\">\n @for (item of inboxItems(); track item.id) {\n <axp-in-app-inbox-item\n class=\"inbox-widget-row\"\n [data]=\"item\"\n [showAvatar]=\"showAvatar()\"\n [showDate]=\"showDate()\"\n [markAsReadLabelKey]=\"i18n.markAsRead\"\n (itemPress)=\"onItemPress($event)\"\n (markAsRead)=\"onDismissUnread($event)\"\n />\n } @empty {\n <axp-state-message\n look=\"widget\"\n icon=\"fa-light fa-inbox\"\n [title]=\"i18n.emptyTitle\"\n [description]=\"i18n.emptyDescription\"\n />\n }\n </div>\n</div>\n", styles: ["@reference \"@acorex/styles/themes/default.css\";:host{@apply block size-full min-h-0 min-w-0;container:dashboard-inbox / inline-size}.inbox-widget{padding:clamp(.375rem,2.5cqi,.75rem)}.inbox-widget__scroll{overscroll-behavior:contain}\n"] }]
2389
2560
  }] });
2390
2561
 
2391
2562
  var communicationInAppInboxWidget_component = /*#__PURE__*/Object.freeze({
@@ -2396,33 +2567,16 @@ var communicationInAppInboxWidget_component = /*#__PURE__*/Object.freeze({
2396
2567
  //#region ----- Imports -----
2397
2568
  //#endregion
2398
2569
  //#region ----- Communication dashboard presets -----
2570
+ const IN_APP_INBOX_SIZES = [
2571
+ [4, 4],
2572
+ [3, 4],
2573
+ [5, 4],
2574
+ ];
2399
2575
  /** Unread in-app inbox dashboard tile. */
2400
2576
  const AXP_MY_IN_APP_INBOX_DASHBOARD_DIMENSIONS = defineDashboardWidgetDimensions({
2401
- sm: [[1, 5]],
2402
- md: [
2403
- [3, 4],
2404
- [4, 4],
2405
- ],
2406
- lg: [
2407
- [3, 4],
2408
- [4, 4],
2409
- ],
2410
- xl: [
2411
- [3, 4],
2412
- [4, 4],
2413
- ],
2414
- '2xl': [
2415
- [3, 4],
2416
- [4, 4],
2417
- ],
2418
- '3xl': [
2419
- [3, 4],
2420
- [4, 4],
2421
- ],
2422
- '4xl': [
2423
- [3, 4],
2424
- [4, 4],
2425
- ],
2577
+ sm: [[1, 6], [1, 5]],
2578
+ md: IN_APP_INBOX_SIZES,
2579
+ lg: IN_APP_INBOX_SIZES,
2426
2580
  });
2427
2581
  //#endregion
2428
2582
 
@@ -2498,6 +2652,7 @@ const AXPMyInAppInboxDashboardWidget = {
2498
2652
  meta: {
2499
2653
  dimensions: AXP_MY_IN_APP_INBOX_DASHBOARD_DIMENSIONS,
2500
2654
  },
2655
+ toString: `value == null || value === '' ? '' : display(value)`,
2501
2656
  };
2502
2657
  //#endregion
2503
2658
 
@@ -2528,7 +2683,7 @@ function routesFactory() {
2528
2683
  children: [
2529
2684
  {
2530
2685
  path: '',
2531
- loadComponent: () => import('./acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-DGnr-vVQ.mjs').then((m) => m.AXMCommunicationInAppInboxPageComponent),
2686
+ loadComponent: () => import('./acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-Bk5Zx0GW.mjs').then((m) => m.AXMCommunicationInAppInboxPageComponent),
2532
2687
  data: { reuse: true },
2533
2688
  },
2534
2689
  ],
@@ -2542,31 +2697,31 @@ class AXMCommunicationManagementModule {
2542
2697
  provideCommandSetups([
2543
2698
  {
2544
2699
  key: AXMCommunicationManagementCommandKeys$1.Send,
2545
- command: () => import('./acorex-platform-module-communication-management-client-communication-send.command-DtGeXWNS.mjs').then((m) => m.CommunicationSendCommand),
2700
+ command: () => import('./acorex-platform-module-communication-management-client-communication-send.command-D7TIw1-P.mjs').then((m) => m.CommunicationSendCommand),
2546
2701
  },
2547
2702
  {
2548
2703
  key: AXMCommunicationManagementCommandKeys$1.TestSmtp,
2549
- command: () => import('./acorex-platform-module-communication-management-client-communication-test-smtp.command-nZH0GlLw.mjs').then((m) => m.CommunicationTestSmtpCommand),
2704
+ command: () => import('./acorex-platform-module-communication-management-client-communication-test-smtp.command-BN0gkpAr.mjs').then((m) => m.CommunicationTestSmtpCommand),
2550
2705
  },
2551
2706
  {
2552
2707
  key: AXMCommunicationManagementCommandKeys$1.EmailShowDialog,
2553
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-D63L_w8I.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2708
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CNgMVOFx.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2554
2709
  },
2555
2710
  {
2556
2711
  key: AXMCommunicationManagementCommandKeys$1.EmailSend,
2557
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-BwdbP0wm.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2712
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-DjOOsW25.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2558
2713
  },
2559
2714
  {
2560
2715
  key: AXMCommunicationManagementCommandKeys$1.ShowSentMessage,
2561
- command: () => import('./acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs').then((m) => m.CommunicationShowSentMessageCommand),
2716
+ command: () => import('./acorex-platform-module-communication-management-client-communication-show-sent-message.command-BhsqhXKA.mjs').then((m) => m.CommunicationShowSentMessageCommand),
2562
2717
  },
2563
2718
  {
2564
2719
  key: LEGACY_NOTIFICATION_EMAIL_SHOW_DIALOG_COMMAND_KEY,
2565
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-D63L_w8I.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2720
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CNgMVOFx.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2566
2721
  },
2567
2722
  {
2568
2723
  key: LEGACY_NOTIFICATION_EMAIL_SEND_COMMAND_KEY,
2569
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-BwdbP0wm.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2724
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-DjOOsW25.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2570
2725
  },
2571
2726
  ]),
2572
2727
  {
@@ -2665,31 +2820,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
2665
2820
  provideCommandSetups([
2666
2821
  {
2667
2822
  key: AXMCommunicationManagementCommandKeys$1.Send,
2668
- command: () => import('./acorex-platform-module-communication-management-client-communication-send.command-DtGeXWNS.mjs').then((m) => m.CommunicationSendCommand),
2823
+ command: () => import('./acorex-platform-module-communication-management-client-communication-send.command-D7TIw1-P.mjs').then((m) => m.CommunicationSendCommand),
2669
2824
  },
2670
2825
  {
2671
2826
  key: AXMCommunicationManagementCommandKeys$1.TestSmtp,
2672
- command: () => import('./acorex-platform-module-communication-management-client-communication-test-smtp.command-nZH0GlLw.mjs').then((m) => m.CommunicationTestSmtpCommand),
2827
+ command: () => import('./acorex-platform-module-communication-management-client-communication-test-smtp.command-BN0gkpAr.mjs').then((m) => m.CommunicationTestSmtpCommand),
2673
2828
  },
2674
2829
  {
2675
2830
  key: AXMCommunicationManagementCommandKeys$1.EmailShowDialog,
2676
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-D63L_w8I.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2831
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CNgMVOFx.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2677
2832
  },
2678
2833
  {
2679
2834
  key: AXMCommunicationManagementCommandKeys$1.EmailSend,
2680
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-BwdbP0wm.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2835
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-DjOOsW25.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2681
2836
  },
2682
2837
  {
2683
2838
  key: AXMCommunicationManagementCommandKeys$1.ShowSentMessage,
2684
- command: () => import('./acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs').then((m) => m.CommunicationShowSentMessageCommand),
2839
+ command: () => import('./acorex-platform-module-communication-management-client-communication-show-sent-message.command-BhsqhXKA.mjs').then((m) => m.CommunicationShowSentMessageCommand),
2685
2840
  },
2686
2841
  {
2687
2842
  key: LEGACY_NOTIFICATION_EMAIL_SHOW_DIALOG_COMMAND_KEY,
2688
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-D63L_w8I.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2843
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CNgMVOFx.mjs').then((m) => m.CommunicationManagementEmailShowDialogCommand),
2689
2844
  },
2690
2845
  {
2691
2846
  key: LEGACY_NOTIFICATION_EMAIL_SEND_COMMAND_KEY,
2692
- command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-BwdbP0wm.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2847
+ command: () => import('./acorex-platform-module-communication-management-client-communication-email-send.command-DjOOsW25.mjs').then((m) => m.CommunicationManagementEmailSendCommand),
2693
2848
  },
2694
2849
  ]),
2695
2850
  {
@@ -2805,4 +2960,4 @@ function resolveCommunicationDeliveryChannelsSettingsSection(context) {
2805
2960
  */
2806
2961
 
2807
2962
  export { AXPInAppInboxConnectorService as A, isInAppInboxUnseen as B, normalizeInAppInboxItem as C, resolveCommunicationDeliveryChannelsSettingsSection as D, sortInAppInboxItems as E, AXPInAppInboxActionService as a, AXP_IN_APP_INBOX_I18N as b, AXPInAppInboxItemComponent as c, AXPCommunicationManagementClient as d, AXPInAppInboxRealtimeService as e, AXMCommunicationManagementMenuProvider as f, AXMCommunicationManagementModule as g, AXMCommunicationManagementPermissionDefinitionProvider as h, AXMCommunicationManagementSearchCommandProvider as i, AXPCommunicationInAppInboxWidgetViewComponent as j, AXPInAppInboxPanelComponent as k, AXPInAppInboxSlotComponent as l, AXPMyInAppInboxDashboardWidget as m, AXP_IN_APP_INBOX_CONFIG as n, AXP_IN_APP_INBOX_LEGACY_DB_NAME as o, AXP_IN_APP_INBOX_LOCAL_ENTITY_KEY as p, AXP_IN_APP_INBOX_LOCAL_MAX_ITEMS as q, AXP_IN_APP_INBOX_PORT as r, AXP_IN_APP_INBOX_SYNC_STATUS as s, AXP_MY_IN_APP_INBOX_DASHBOARD_DIMENSIONS as t, buildMyInAppInboxDashboardWidget as u, dedupeInAppInboxItems as v, filterInAppInboxItemsLocally as w, getInAppInboxPriorityClass as x, isArchiveCategoryFilter as y, isInAppInboxUnread as z };
2808
- //# sourceMappingURL=acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-j4HNwZEj.mjs.map
2963
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-Byqo1BAL.mjs.map