@acorex-platform/module-communication-management-client 0.0.21

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 (21) hide show
  1. package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-09UhY2Rc.mjs +2375 -0
  2. package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-09UhY2Rc.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-communication-management-client-communication-email-send.command-wuqLiY8s.mjs +69 -0
  4. package/fesm2022/acorex-platform-module-communication-management-client-communication-email-send.command-wuqLiY8s.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CP0zAEe4.mjs +285 -0
  6. package/fesm2022/acorex-platform-module-communication-management-client-communication-email-show-dialog.command-CP0zAEe4.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-b7ZqkMTt.mjs +514 -0
  8. package/fesm2022/acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-b7ZqkMTt.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-communication-management-client-communication-send.command-D7_MmGQe.mjs +85 -0
  10. package/fesm2022/acorex-platform-module-communication-management-client-communication-send.command-D7_MmGQe.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-communication-management-client-communication-show-sent-message.command-D8125Jxi.mjs +111 -0
  12. package/fesm2022/acorex-platform-module-communication-management-client-communication-show-sent-message.command-D8125Jxi.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-communication-management-client-communication-test-smtp.command-BySmN1Lz.mjs +155 -0
  14. package/fesm2022/acorex-platform-module-communication-management-client-communication-test-smtp.command-BySmN1Lz.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs +278 -0
  16. package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-communication-management-client.mjs +2 -0
  18. package/fesm2022/acorex-platform-module-communication-management-client.mjs.map +1 -0
  19. package/package.json +28 -0
  20. package/types/acorex-platform-module-communication-management-client-contracts.d.ts +330 -0
  21. package/types/acorex-platform-module-communication-management-client.d.ts +360 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-b7ZqkMTt.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/features/in-app/communication-in-app-inbox-page.component.ts","../../../../libs/modules/communication-management/client/src/lib/features/in-app/communication-in-app-inbox-page.component.html"],"sourcesContent":["import { AXValueChangedEvent } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXDataPagerChangedEvent, AXDataPagerMode, AXDataPagerModule } from '@acorex/components/data-pager';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXLabelModule } from '@acorex/components/label';\nimport {\n AXContextMenuComponent,\n AXContextMenuItemsClickEvent,\n AXContextMenuOpeningEvent,\n} from '@acorex/components/menu';\nimport { AXSkeletonModule } from '@acorex/components/skeleton';\nimport { AXSlidingItemModule } from '@acorex/components/sliding-item';\nimport { AXTranslationModule } from '@acorex/core/translation';\nimport { AXPDeviceService } from '@acorex-platform/framework-client/core';\nimport {\n AXPQueryFiltersComponent,\n AXPStateMessageComponent,\n AXPThemeLayoutBlockComponent,\n} from '@acorex-platform/framework-client/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n AXPPageLayoutComponent,\n} from '@acorex-platform/framework-client/layout/views';\nimport { AXPActionMenuItem, AXPExecuteCommand, AXPFilterDefinition, AXPFilterQuery, AXP_QUERY_QUICK_SEARCH_FIELD } from '@acorex-platform/framework-shared/core';\nimport { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, OnInit, signal, viewChild } from '@angular/core';\nimport {\n AXPInAppInboxConnectorService,\n AXPInAppInboxItemComponent,\n AXP_IN_APP_INBOX_I18N,\n type AXPInAppInboxItem,\n} from './inbox';\nimport { AXPInAppInboxActionService } from './inbox/in-app-inbox-action.service';\n\n//#region ---- Communication in-app inbox page ----\n\n@Component({\n selector: 'axm-communication-in-app-inbox-page',\n templateUrl: './communication-in-app-inbox-page.component.html',\n styleUrls: ['./communication-in-app-inbox-page.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: AXPPageLayoutBase, useExisting: AXMCommunicationInAppInboxPageComponent }],\n host: {\n class: 'axm-communication-in-app-inbox-page',\n '(document:keydown.escape)': 'deselectAll()',\n },\n imports: [\n CommonModule,\n AXButtonModule,\n AXDecoratorModule,\n AXSkeletonModule,\n AXTranslationModule,\n AXCheckBoxModule,\n AXLabelModule,\n AXSlidingItemModule,\n AXDataPagerModule,\n AXContextMenuComponent,\n AXPPageLayoutComponent,\n AXPThemeLayoutBlockComponent,\n AXPStateMessageComponent,\n AXPQueryFiltersComponent,\n AXPInAppInboxItemComponent,\n ],\n})\nexport class AXMCommunicationInAppInboxPageComponent extends AXPPageLayoutBaseComponent implements OnInit {\n private static readonly DEFAULT_PAGE_SIZE = 10;\n\n private readonly connector = inject(AXPInAppInboxConnectorService);\n private readonly inboxActions = inject(AXPInAppInboxActionService);\n protected readonly i18n = inject(AXP_IN_APP_INBOX_I18N);\n protected readonly deviceService = inject(AXPDeviceService);\n\n protected readonly pageLoading = this.connector.pageLoadingState;\n protected readonly pageItems = this.connector.pagedInboxList;\n protected readonly pageTotal = this.connector.pagedTotal;\n protected readonly unreadCount = this.connector.unreadCount;\n protected readonly totalCount = this.connector.total;\n protected readonly showPin = computed(() => this.connector.capabilities.pinSupport);\n\n protected readonly filterDefinitions = signal<AXPFilterDefinition[]>([]);\n protected readonly panelInitialFilters = signal<AXPFilterQuery[]>([]);\n protected readonly queryFiltersKey = signal(0);\n private readonly activeFilters = signal<AXPFilterQuery[]>([]);\n protected readonly pageIndex = signal(0);\n protected readonly pageSize = signal(AXMCommunicationInAppInboxPageComponent.DEFAULT_PAGE_SIZE);\n protected isEditing = signal(false);\n protected contextMenu = viewChild<AXContextMenuComponent>('contextMenu');\n protected contextItem = signal<AXPInAppInboxItem | null>(null);\n\n private readonly selectedIds = signal<Set<string>>(new Set<string>());\n selectedCount = computed(() => this.selectedIds().size);\n\n protected readonly pagerDisplayMode = computed(\n (): AXDataPagerMode => (this.deviceService.isSmall() ? 'compact' : 'full'),\n );\n\n protected readonly skeletonPlaceholders = computed(() =>\n Array.from({ length: Math.max(this.pageSize(), 1) }, (_, index) => index),\n );\n\n readonly hasActiveFilters = computed(() =>\n this.activeFilters().some((filter) => {\n if (filter.field === 'readStatus' && (!filter.value || filter.value === 'all')) {\n return false;\n }\n return filter.value != null && String(filter.value).trim() !== '';\n }),\n );\n\n private readonly searchText = computed(() => {\n const searchFilter = this.activeFilters().find(\n (f) => f.field === 'all' || f.field === AXP_QUERY_QUICK_SEARCH_FIELD,\n );\n return searchFilter?.value != null ? String(searchFilter.value).trim().toLowerCase() : '';\n });\n\n private readonly isUnreadFilterActive = computed(() => {\n const readFilter = this.activeFilters().find((f) => f.field === 'readStatus');\n return readFilter?.value === 'unread';\n });\n\n protected readonly highlightUnreadBackground = computed(() => !this.isUnreadFilterActive());\n\n override async ngOnInit(): Promise<void> {\n super.ngOnInit();\n await this.loadFilterDefinitions();\n await this.connector.ensureReady();\n await this.loadPage();\n await this.connector.markUnseenAsSeen();\n }\n\n override async getPageTitle(): Promise<string> {\n return this.translateService.translateAsync(this.i18n.pageTitle);\n }\n\n override async getPageDescription(): Promise<string> {\n const unread = this.unreadCount();\n const total = this.totalCount();\n if (!total) {\n return this.translateService.translateAsync(this.i18n.pageDescriptionNone);\n }\n if (unread > 0) {\n return this.translateService.translateAsync(this.i18n.pageDescriptionUnread, {\n params: { unread, total },\n });\n }\n return this.translateService.translateAsync(this.i18n.pageDescriptionAllRead, { params: { total } });\n }\n\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n if (this.selectedCount() === 0) {\n return [];\n }\n\n return [\n {\n title: await this.translateService.translateAsync(this.i18n.delete),\n icon: 'fa-light fa-trash',\n command: { name: 'delete-selected' },\n color: 'danger',\n },\n {\n title: await this.translateService.translateAsync(this.i18n.archive),\n icon: 'fa-light fa-box-archive',\n command: { name: 'archive-selected' },\n },\n {\n title: await this.translateService.translateAsync(this.i18n.markAsRead),\n icon: 'fa-light fa-envelopes-bulk',\n command: { name: 'mark-selected-as-read' },\n color: 'primary',\n },\n ];\n }\n\n override async getSecondaryMenuItems(): Promise<AXPActionMenuItem[]> {\n if (this.selectedCount() > 0) {\n return [];\n }\n\n return [\n {\n title: await this.translateService.translateAsync(this.i18n.refresh),\n icon: 'fa-light fa-rotate',\n command: { name: 'refresh' },\n },\n {\n title: await this.translateService.translateAsync(this.i18n.markAllAsRead),\n icon: 'fa-light fa-envelopes-bulk',\n command: { name: 'mark-all-read' },\n disabled: this.unreadCount() === 0,\n },\n {\n title: await this.translateService.translateAsync(this.i18n.selectItems),\n icon: 'fa-light fa-pen',\n command: { name: 'edit-mode' },\n color: 'primary',\n },\n ];\n }\n\n override async execute(command: AXPExecuteCommand): Promise<void> {\n switch (command.name) {\n case 'refresh':\n await this.onRefresh();\n this.exitEditModeIfNeeded();\n break;\n case 'delete-selected':\n await this.deleteSelected();\n this.exitEditModeIfNeeded();\n break;\n case 'archive-selected':\n await this.archiveSelected();\n this.exitEditModeIfNeeded();\n break;\n case 'mark-selected-as-read':\n await this.markSelectedAsRead();\n this.exitEditModeIfNeeded();\n break;\n case 'mark-all-read':\n await this.onMarkAllAsRead();\n this.exitEditModeIfNeeded();\n break;\n case 'edit-mode':\n if (this.isEditing()) {\n this.deselectAll();\n } else {\n this.isEditing.set(true);\n }\n this.recompute();\n break;\n }\n }\n\n protected handleFiltersChanged(filters: AXPFilterQuery[]): void {\n this.activeFilters.set(filters);\n this.pageIndex.set(0);\n void this.loadPage();\n }\n\n protected clearFilters(): void {\n this.activeFilters.set([]);\n this.panelInitialFilters.set([]);\n this.pageIndex.set(0);\n this.queryFiltersKey.update((key) => key + 1);\n void this.loadPage();\n }\n\n protected onPageChanged(event: AXDataPagerChangedEvent): void {\n if (!event.isUserInteraction) {\n return;\n }\n\n const nextIndex = Math.floor(event.skip / event.take);\n if (nextIndex === this.pageIndex() && event.take === this.pageSize()) {\n return;\n }\n\n this.pageSize.set(event.take);\n this.pageIndex.set(nextIndex);\n void this.loadPage();\n }\n\n protected async onItemPress(id: string): Promise<void> {\n if (this.isEditing()) {\n this.toggleSelectionById(id);\n return;\n }\n if (this.selectedCount() > 0) {\n return;\n }\n await this.inboxActions.openItem(id);\n }\n\n protected async onTogglePin(id: string): Promise<void> {\n await this.connector.togglePin(id);\n }\n\n protected async onDismissUnread(id: string): Promise<void> {\n await this.connector.markAsRead([id]);\n this.recompute();\n }\n\n protected isSelected(id: string): boolean {\n return this.selectedIds().has(id);\n }\n\n protected toggleSelectionWithModel(id: string, event: AXValueChangedEvent<boolean>): void {\n const checked = Boolean(event.value);\n const next = new Set(this.selectedIds());\n if (checked) {\n next.add(id);\n } else {\n next.delete(id);\n }\n this.selectedIds.set(next);\n this.recompute();\n }\n\n protected deselectAll(): void {\n if (this.selectedCount() > 0) {\n this.selectedIds.set(new Set());\n }\n if (this.isEditing()) {\n this.isEditing.set(false);\n }\n this.recompute();\n }\n\n protected slidingItemsHandler(item: AXPInAppInboxItem, action: 'mark-as-read' | 'delete' | 'archive'): void {\n switch (action) {\n case 'mark-as-read':\n void this.markSelectedAsRead(item);\n break;\n case 'delete':\n void this.deleteSelected(item);\n break;\n case 'archive':\n void this.archiveSelected(item);\n break;\n }\n }\n\n protected openContextMenu(event: MouseEvent, item: AXPInAppInboxItem): void {\n if (this.isEditing() || this.selectedCount() > 0) {\n return;\n }\n event.preventDefault();\n this.contextItem.set(item);\n this.contextMenu()?.showAt({ x: event.clientX, y: event.clientY });\n }\n\n protected async handleContextMenuOpening(event: AXContextMenuOpeningEvent): Promise<void> {\n const item = this.contextItem();\n const isPinned = item?.isPinned ?? false;\n\n event.items = [\n {\n name: isPinned ? 'unpin' : 'pin',\n text: await this.translateService.translateAsync(isPinned ? this.i18n.unpin : this.i18n.pin),\n icon: isPinned ? 'fa-light fa-thumbtack-slash' : 'fa-light fa-thumbtack',\n },\n {\n name: 'mark-as-read',\n text: await this.translateService.translateAsync(this.i18n.markAsRead),\n icon: 'fa-light fa-envelopes-bulk',\n color: 'primary',\n },\n {\n name: 'archive',\n text: await this.translateService.translateAsync(this.i18n.archive),\n icon: 'fa-light fa-box-archive',\n },\n {\n name: 'delete',\n text: await this.translateService.translateAsync(this.i18n.delete),\n icon: 'fa-light fa-trash-can',\n color: 'danger',\n },\n ];\n }\n\n protected handleContextMenuItemClick(event: AXContextMenuItemsClickEvent): void {\n const item = this.contextItem();\n if (!item) {\n return;\n }\n\n switch (event.item.name) {\n case 'mark-as-read':\n void this.markSelectedAsRead(item);\n break;\n case 'pin':\n case 'unpin':\n void this.onTogglePin(item.id);\n break;\n case 'archive':\n void this.archiveSelected(item);\n break;\n case 'delete':\n void this.deleteSelected(item);\n break;\n }\n }\n\n protected getEmptyIcon(): string {\n if (this.searchText()) {\n return 'fa-solid fa-magnifying-glass';\n }\n if (this.isUnreadFilterActive()) {\n return 'fa-solid fa-check-circle';\n }\n return 'fa-solid fa-bell';\n }\n\n protected getEmptyTitle(): string {\n if (this.hasActiveFilters()) {\n return '@communication-management:in-app.state.no-results.title';\n }\n if (this.isUnreadFilterActive()) {\n return '@communication-management:in-app.state.all-caught-up.title';\n }\n return this.i18n.emptyTitle;\n }\n\n protected getEmptyDescription(): string {\n if (this.hasActiveFilters()) {\n return '@communication-management:in-app.state.no-results.description';\n }\n if (this.isUnreadFilterActive()) {\n return '@communication-management:in-app.state.all-caught-up.description';\n }\n return this.i18n.emptyDescription;\n }\n\n private async onRefresh(): Promise<void> {\n await this.connector.refresh();\n await this.loadPage();\n }\n\n private async onMarkAllAsRead(): Promise<void> {\n await this.connector.markAllAsRead();\n }\n\n private async markSelectedAsRead(item?: AXPInAppInboxItem): Promise<void> {\n const ids = item ? [item.id] : Array.from(this.selectedIds());\n if (ids.length === 0) {\n return;\n }\n await this.connector.markAsRead(ids);\n this.selectedIds.set(new Set());\n this.recompute();\n }\n\n private async deleteSelected(item?: AXPInAppInboxItem): Promise<void> {\n const ids = item ? [item.id] : Array.from(this.selectedIds());\n for (const id of ids) {\n await this.connector.deleteOne(id);\n }\n this.selectedIds.set(new Set());\n this.recompute();\n }\n\n private async archiveSelected(item?: AXPInAppInboxItem): Promise<void> {\n const ids = item ? [item.id] : Array.from(this.selectedIds());\n if (ids.length === 0) {\n return;\n }\n await this.connector.archive(ids);\n this.selectedIds.set(new Set());\n this.recompute();\n }\n\n private toggleSelectionById(id: string): void {\n const next = new Set(this.selectedIds());\n if (next.has(id)) {\n next.delete(id);\n } else {\n next.add(id);\n }\n this.selectedIds.set(next);\n this.recompute();\n }\n\n private exitEditModeIfNeeded(): void {\n if (this.isEditing()) {\n this.isEditing.set(false);\n }\n }\n\n private async loadPage(): Promise<void> {\n await this.connector.loadPage(this.activeFilters(), this.pageIndex() * this.pageSize(), this.pageSize());\n }\n\n private async loadFilterDefinitions(): Promise<void> {\n const [allLabel, unreadLabel, inboxLabel, archiveLabel, warningLabel, dangerLabel, noticeLabel] =\n await Promise.all([\n this.translateService.translateAsync(this.i18n.all),\n this.translateService.translateAsync(this.i18n.unread),\n this.translateService.translateAsync('@communication-management:in-app.filters.category.options.inbox'),\n this.translateService.translateAsync('@communication-management:in-app.filters.category.options.archive'),\n this.translateService.translateAsync('@communication-management:in-app.filters.priority.options.warning'),\n this.translateService.translateAsync('@communication-management:in-app.filters.priority.options.danger'),\n this.translateService.translateAsync('@communication-management:in-app.filters.priority.options.notice'),\n ]);\n\n this.filterDefinitions.set([\n {\n field: 'all',\n title: '@communication-management:in-app.filters.search.title',\n icon: 'fa-light fa-magnifying-glass',\n widget: { type: 'string-filter' },\n filterType: { inline: true, advance: false },\n },\n {\n field: 'readStatus',\n operator: { type: 'equal' },\n title: '@communication-management:in-app.filters.read-status.title',\n icon: 'fa-light fa-envelope-open-text',\n widget: {\n type: 'select-filter',\n options: {\n dataSource: [\n { id: 'all', title: allLabel },\n { id: 'unread', title: unreadLabel },\n ],\n valueField: 'id',\n textField: 'title',\n allowClear: true,\n },\n },\n filterType: { advance: true, inline: false },\n },\n {\n field: 'priority',\n operator: { type: 'equal' },\n title: '@communication-management:in-app.filters.priority.title',\n icon: 'fa-light fa-flag',\n widget: {\n type: 'select-filter',\n options: {\n dataSource: [\n { id: 'Warning', title: warningLabel },\n { id: 'Danger', title: dangerLabel },\n { id: 'Notice', title: noticeLabel },\n ],\n valueField: 'id',\n textField: 'title',\n allowClear: true,\n },\n },\n filterType: { advance: true, inline: false },\n },\n {\n field: 'category',\n operator: { type: 'equal' },\n title: '@communication-management:in-app.filters.category.title',\n icon: 'fa-light fa-inbox',\n widget: {\n type: 'select-filter',\n options: {\n dataSource: [\n { id: 'Inbox', title: inboxLabel },\n { id: 'Archive', title: archiveLabel },\n ],\n valueField: 'id',\n textField: 'title',\n allowClear: true,\n },\n },\n filterType: { advance: true, inline: false },\n },\n ]);\n }\n}\n\n//#endregion\n","<axp-page-layout>\n <axp-page-toolbar>\n <div class=\"w-full flex items-center\">\n <axp-layout-prefix class=\"w-full\">\n @if (selectedCount() > 0 || isEditing()) {\n <!-- ----- Bulk selection bar ----- -->\n <div class=\"axm-communication-in-app-inbox-page__selection-bar\">\n <span class=\"axm-communication-in-app-inbox-page__selection-count\">\n {{ selectedCount() }} {{ '@general:terms.items-selected' | translate | async }}\n </span>\n <button type=\"button\" class=\"axm-communication-in-app-inbox-page__unselect\" (click)=\"deselectAll()\">\n {{ '@general:actions.unselect.title' | translate | async }}\n </button>\n </div>\n } @else {\n @for (_k of [queryFiltersKey()]; track _k) {\n <axp-query-filters\n [filtersDefinitions]=\"filterDefinitions()\"\n [initialFilters]=\"panelInitialFilters()\"\n [quickSearch]=\"true\"\n (onFiltersChanged)=\"handleFiltersChanged($event)\"\n />\n }\n }\n </axp-layout-prefix>\n </div>\n </axp-page-toolbar>\n\n <axp-page-content class=\"axm-communication-in-app-inbox-page__content\">\n <div class=\"axm-communication-in-app-inbox-page__panel\">\n @if (pageLoading()) {\n <!-- ----- Loading skeleton list ----- -->\n <div class=\"axm-communication-in-app-inbox-page__list axm-communication-in-app-inbox-page__list--loading\">\n @for (_ of skeletonPlaceholders(); track $index) {\n <div class=\"axm-communication-in-app-inbox-page__skeleton\">\n <ax-skeleton [animated]=\"true\" class=\"axm-communication-in-app-inbox-page__skeleton-avatar\"></ax-skeleton>\n <div class=\"axm-communication-in-app-inbox-page__skeleton-body\">\n <ax-skeleton [animated]=\"true\" class=\"axm-communication-in-app-inbox-page__skeleton-line --wide\"></ax-skeleton>\n <ax-skeleton [animated]=\"true\" class=\"axm-communication-in-app-inbox-page__skeleton-line\"></ax-skeleton>\n </div>\n </div>\n }\n </div>\n } @else if (pageTotal() === 0) {\n <axp-state-message\n mode=\"empty\"\n [icon]=\"getEmptyIcon()\"\n [title]=\"getEmptyTitle()\"\n [description]=\"getEmptyDescription()\"\n >\n @if (hasActiveFilters()) {\n <ax-button\n slot=\"actions\"\n look=\"outline\"\n [text]=\"((i18n.clearFilters | translate | async) ?? '')\"\n (onClick)=\"clearFilters()\"\n />\n }\n </axp-state-message>\n } @else {\n <div class=\"axm-communication-in-app-inbox-page__list\">\n @for (item of pageItems(); track item.id) {\n @if (deviceService.isMobileDevice()) {\n <ng-container [ngTemplateOutlet]=\"mobile\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n } @else {\n <ng-container [ngTemplateOutlet]=\"desktop\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n }\n }\n </div>\n }\n </div>\n </axp-page-content>\n\n @if (!pageLoading() && pageTotal() > 0) {\n <!-- ----- Pagination pinned to page footer ----- -->\n <axp-page-footer\n class=\"axm-communication-in-app-inbox-page__footer\"\n [class.axm-communication-in-app-inbox-page__footer--compact]=\"deviceService.isSmall()\"\n >\n <ax-data-pager\n [displayMode]=\"pagerDisplayMode()\"\n [total]=\"pageTotal()\"\n [size]=\"pageSize()\"\n [value]=\"pageIndex() + 1\"\n (onChanged)=\"onPageChanged($event)\"\n />\n </axp-page-footer>\n }\n</axp-page-layout>\n\n<ng-template #mobile let-item>\n <ax-sliding-item class=\"axm-communication-in-app-inbox-page__sliding-item\">\n <ax-content class=\"p-0!\">\n <div\n class=\"axm-communication-in-app-inbox-page__row\"\n [class.--selected]=\"isSelected(item.id)\"\n (contextmenu)=\"openContextMenu($event, item)\"\n >\n @if (isEditing()) {\n <ax-check-box\n class=\"axm-communication-in-app-inbox-page__checkbox\"\n [value]=\"isSelected(item.id)\"\n (onValueChanged)=\"toggleSelectionWithModel(item.id, $event)\"\n >\n <ax-label></ax-label>\n </ax-check-box>\n }\n <axp-in-app-inbox-item\n class=\"flex-1 min-w-0\"\n [data]=\"item\"\n [highlightUnreadBackground]=\"highlightUnreadBackground()\"\n [showPin]=\"showPin()\"\n [pinLabelKey]=\"i18n.pin\"\n [unpinLabelKey]=\"i18n.unpin\"\n [markAsReadLabelKey]=\"i18n.markAsRead\"\n (itemPress)=\"onItemPress($event)\"\n (markAsRead)=\"onDismissUnread($event)\"\n (togglePin)=\"onTogglePin($event)\"\n />\n </div>\n </ax-content>\n\n <ax-sliding-item-suffix (onClick)=\"slidingItemsHandler(item, 'mark-as-read')\" color=\"primary\">\n <ax-icon class=\"fa-light fa-envelopes-bulk fa-xl\"></ax-icon>\n </ax-sliding-item-suffix>\n\n <ax-sliding-item-suffix (onClick)=\"slidingItemsHandler(item, 'archive')\" color=\"default\">\n <ax-icon class=\"fa-light fa-box-archive fa-xl\"></ax-icon>\n </ax-sliding-item-suffix>\n\n <ax-sliding-item-suffix (onClick)=\"slidingItemsHandler(item, 'delete')\" color=\"danger\">\n <ax-icon class=\"fa-light fa-trash-can fa-xl\"></ax-icon>\n </ax-sliding-item-suffix>\n </ax-sliding-item>\n</ng-template>\n\n<ng-template #desktop let-item>\n <div\n class=\"axm-communication-in-app-inbox-page__row\"\n [class.--selected]=\"isSelected(item.id)\"\n (contextmenu)=\"openContextMenu($event, item)\"\n >\n @if (isEditing()) {\n <ax-check-box\n class=\"axm-communication-in-app-inbox-page__checkbox\"\n [value]=\"isSelected(item.id)\"\n (onValueChanged)=\"toggleSelectionWithModel(item.id, $event)\"\n >\n <ax-label></ax-label>\n </ax-check-box>\n }\n <axp-in-app-inbox-item\n class=\"flex-1 min-w-0\"\n [data]=\"item\"\n [highlightUnreadBackground]=\"highlightUnreadBackground()\"\n [showPin]=\"showPin()\"\n [pinLabelKey]=\"i18n.pin\"\n [unpinLabelKey]=\"i18n.unpin\"\n [markAsReadLabelKey]=\"i18n.markAsRead\"\n (itemPress)=\"onItemPress($event)\"\n (markAsRead)=\"onDismissUnread($event)\"\n (togglePin)=\"onTogglePin($event)\"\n />\n </div>\n</ng-template>\n\n<ax-context-menu\n #contextMenu\n [openOn]=\"'click'\"\n [closeOn]=\"'click'\"\n [orientation]=\"'horizontal'\"\n (onOpening)=\"handleContextMenuOpening($event)\"\n (onItemClick)=\"handleContextMenuItemClick($event)\"\n/>\n"],"names":["i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA;AA8BM,MAAO,uCAAwC,SAAQ,0BAA0B,CAAA;AA5BvF,IAAA,WAAA,GAAA;;AA+BmB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,6BAA6B,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,0BAA0B,CAAC;AAC/C,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACpC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AAExC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,gBAAgB;AAC7C,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,SAAS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mBAAA,EAAA,oBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,WAAA,EAAA,YAAA,EAAA,WAAA,EAAA,cAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,OAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGjB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBA5BnD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qCAAqC,EAAA,eAAA,EAG9B,uBAAuB,CAAC,MAAM,aACpC,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAA,uCAAyC,EAAE,CAAC,EAAA,IAAA,EAC3F;AACJ,wBAAA,KAAK,EAAE,qCAAqC;AAC5C,wBAAA,2BAA2B,EAAE,eAAe;qBAC7C,EAAA,OAAA,EACQ;wBACP,YAAY;wBACZ,cAAc;wBACd,iBAAiB;wBACjB,gBAAgB;wBAChB,mBAAmB;wBACnB,gBAAgB;wBAChB,aAAa;wBACb,mBAAmB;wBACnB,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,wBAAwB;wBACxB,wBAAwB;wBACxB,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,0sNAAA,EAAA,MAAA,EAAA,CAAA,+6GAAA,CAAA,EAAA;yEAwByD,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
@@ -0,0 +1,85 @@
1
+ import { AXToastService } from '@acorex/components/toast';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Injectable } from '@angular/core';
4
+ import { d as AXPCommunicationManagementClient, e as AXPInAppInboxRealtimeService } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-09UhY2Rc.mjs';
5
+
6
+ function parseMessage(raw) {
7
+ if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {
8
+ return null;
9
+ }
10
+ const message = raw;
11
+ const subject = typeof message['subject'] === 'string' ? message['subject'].trim() : '';
12
+ const body = typeof message['body'] === 'string' ? message['body'].trim() : '';
13
+ if (!subject || !body) {
14
+ return null;
15
+ }
16
+ return { subject, body };
17
+ }
18
+ function parseSendInput(raw) {
19
+ const obj = raw != null && typeof raw === 'object' && !Array.isArray(raw) ? raw : null;
20
+ if (!obj) {
21
+ return { ok: false, error: 'Invalid arguments: expected an object.' };
22
+ }
23
+ const title = typeof obj['title'] === 'string' ? obj['title'].trim() : '';
24
+ const message = parseMessage(obj['message']);
25
+ const channel = typeof obj['channel'] === 'string' ? obj['channel'].trim() : '';
26
+ if (!title || !message || !channel) {
27
+ return {
28
+ ok: false,
29
+ error: 'Invalid arguments: "title", "message" (with subject and body), and "channel" are required.',
30
+ };
31
+ }
32
+ return {
33
+ ok: true,
34
+ value: {
35
+ title,
36
+ message,
37
+ channel,
38
+ recipientUserId: typeof obj['recipientUserId'] === 'string' ? obj['recipientUserId'].trim() : undefined,
39
+ recipientAddress: typeof obj['recipientAddress'] === 'string' ? obj['recipientAddress'].trim() : undefined,
40
+ recipientName: typeof obj['recipientName'] === 'string' ? obj['recipientName'].trim() : undefined,
41
+ definitionKey: typeof obj['definitionKey'] === 'string' ? obj['definitionKey'].trim() : undefined,
42
+ correlationId: typeof obj['correlationId'] === 'string' ? obj['correlationId'].trim() : undefined,
43
+ idempotencyKey: typeof obj['idempotencyKey'] === 'string' ? obj['idempotencyKey'].trim() : undefined,
44
+ actions: Array.isArray(obj['actions'])
45
+ ? obj['actions']
46
+ : undefined,
47
+ },
48
+ };
49
+ }
50
+ class CommunicationSendCommand {
51
+ constructor() {
52
+ this.client = inject(AXPCommunicationManagementClient);
53
+ this.toastService = inject(AXToastService);
54
+ this.realtime = inject(AXPInAppInboxRealtimeService);
55
+ }
56
+ async execute(input) {
57
+ const parsed = parseSendInput(input);
58
+ if (!parsed.ok) {
59
+ return { success: false, message: { text: parsed.error } };
60
+ }
61
+ try {
62
+ const data = await this.client.send(parsed.value);
63
+ this.realtime.notifyChanged({ type: 'refresh' });
64
+ this.toastService.show({
65
+ color: 'success',
66
+ title: 'Communication queued',
67
+ content: `Communication ${data.communicationId} created with delivery ${data.deliveryId}.`,
68
+ });
69
+ return { success: true, kind: 'object', data };
70
+ }
71
+ catch (error) {
72
+ const message = error instanceof Error ? error.message : 'Communication send failed.';
73
+ this.toastService.show({ color: 'danger', title: 'Send failed', content: message });
74
+ return { success: false, message: { text: message } };
75
+ }
76
+ }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationSendCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
78
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationSendCommand }); }
79
+ }
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationSendCommand, decorators: [{
81
+ type: Injectable
82
+ }] });
83
+
84
+ export { CommunicationSendCommand };
85
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-communication-send.command-D7_MmGQe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-send.command-D7_MmGQe.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/commands/communication-send.command.ts"],"sourcesContent":["import { AXToastService } from '@acorex/components/toast';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport type {\n CommunicationMessage,\n CommunicationSendInput,\n CommunicationSendResult,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { AXPSessionService } from '@acorex-platform/framework-client/auth';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPCommunicationManagementClient } from '../communication-management-client.port';\nimport { AXPInAppInboxRealtimeService } from '../features/in-app/inbox/in-app-inbox-realtime.service';\n\nfunction parseMessage(raw: unknown): CommunicationMessage | null {\n if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {\n return null;\n }\n\n const message = raw as Record<string, unknown>;\n const subject = typeof message['subject'] === 'string' ? message['subject'].trim() : '';\n const body = typeof message['body'] === 'string' ? message['body'].trim() : '';\n if (!subject || !body) {\n return null;\n }\n\n return { subject, body };\n}\n\nfunction parseSendInput(\n raw: unknown,\n): { ok: true; value: CommunicationSendInput } | { ok: false; error: string } {\n const obj =\n raw != null && typeof raw === 'object' && !Array.isArray(raw) ? (raw as Record<string, unknown>) : null;\n if (!obj) {\n return { ok: false, error: 'Invalid arguments: expected an object.' };\n }\n\n const title = typeof obj['title'] === 'string' ? obj['title'].trim() : '';\n const message = parseMessage(obj['message']);\n const channel = typeof obj['channel'] === 'string' ? obj['channel'].trim() : '';\n\n if (!title || !message || !channel) {\n return {\n ok: false,\n error: 'Invalid arguments: \"title\", \"message\" (with subject and body), and \"channel\" are required.',\n };\n }\n\n return {\n ok: true,\n value: {\n title,\n message,\n channel,\n recipientUserId: typeof obj['recipientUserId'] === 'string' ? obj['recipientUserId'].trim() : undefined,\n recipientAddress: typeof obj['recipientAddress'] === 'string' ? obj['recipientAddress'].trim() : undefined,\n recipientName: typeof obj['recipientName'] === 'string' ? obj['recipientName'].trim() : undefined,\n definitionKey: typeof obj['definitionKey'] === 'string' ? obj['definitionKey'].trim() : undefined,\n correlationId: typeof obj['correlationId'] === 'string' ? obj['correlationId'].trim() : undefined,\n idempotencyKey: typeof obj['idempotencyKey'] === 'string' ? obj['idempotencyKey'].trim() : undefined,\n actions: Array.isArray(obj['actions'])\n ? (obj['actions'] as CommunicationSendInput['actions'])\n : undefined,\n },\n };\n}\n\n@Injectable()\nexport class CommunicationSendCommand implements AXPCommand<CommunicationSendInput, CommunicationSendResult> {\n private readonly client = inject(AXPCommunicationManagementClient);\n private readonly toastService = inject(AXToastService);\n private readonly realtime = inject(AXPInAppInboxRealtimeService);\n\n async execute(input: CommunicationSendInput): AXPCommandExecuteResultPromise<CommunicationSendResult> {\n const parsed = parseSendInput(input);\n if (!parsed.ok) {\n return { success: false, message: { text: parsed.error } };\n }\n\n try {\n const data = await this.client.send(parsed.value);\n this.realtime.notifyChanged({ type: 'refresh' });\n this.toastService.show({\n color: 'success',\n title: 'Communication queued',\n content: `Communication ${data.communicationId} created with delivery ${data.deliveryId}.`,\n });\n return { success: true, kind: 'object', data };\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Communication send failed.';\n this.toastService.show({ color: 'danger', title: 'Send failed', content: message });\n return { success: false, message: { text: message } };\n }\n }\n}\n"],"names":[],"mappings":";;;;;AAaA,SAAS,YAAY,CAAC,GAAY,EAAA;AAChC,IAAA,IAAI,GAAG,IAAI,IAAI,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;AAChE,QAAA,OAAO,IAAI;IACb;IAEA,MAAM,OAAO,GAAG,GAA8B;IAC9C,MAAM,OAAO,GAAG,OAAO,OAAO,CAAC,SAAS,CAAC,KAAK,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE;IACvF,MAAM,IAAI,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE;AAC9E,IAAA,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE;AACrB,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC1B;AAEA,SAAS,cAAc,CACrB,GAAY,EAAA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EAAE,SAAS;AAChB,gBAAA,KAAK,EAAE,sBAAsB;gBAC7B,OAAO,EAAE,iBAAiB,IAAI,CAAC,eAAe,CAAA,uBAAA,EAA0B,IAAI,CAAC,UAAU,CAAA,CAAA,CAAG;AAC3F,aAAA,CAAC;YACF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE;QAChD;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,4BAA4B;AACrF,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACnF,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACvD;IACF;8GAzBW,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAxB,wBAAwB,EAAA,CAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBADpC;;;;;"}
@@ -0,0 +1,111 @@
1
+ import { AXToastService } from '@acorex/components/toast';
2
+ import { AXTranslationService } from '@acorex/core/translation';
3
+ import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';
4
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
5
+ import { resolveCommunicationMessage, RootConfig } from '@acorex-platform/module-communication-management-client/contracts';
6
+ import * as i0 from '@angular/core';
7
+ import { inject, Injectable } from '@angular/core';
8
+
9
+ //#region ----- Imports -----
10
+ //#endregion
11
+ //#region ----- Command -----
12
+ /** Opens a read-only dialog previewing the communication body from a Communications list row. */
13
+ class CommunicationShowSentMessageCommand {
14
+ constructor() {
15
+ //#region ----- Services & Dependencies -----
16
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
17
+ this.entityService = inject(AXPEntityService);
18
+ this.translationService = inject(AXTranslationService);
19
+ this.toastService = inject(AXToastService);
20
+ }
21
+ //#endregion
22
+ //#region ----- Command -----
23
+ async execute(input) {
24
+ const communication = await this.resolveCommunication(input);
25
+ if (!communication) {
26
+ const message = await this.translationService.translateAsync('@communication-management:entities.communication.actions.preview.messages.not-found');
27
+ this.toastService.show({
28
+ color: 'warning',
29
+ title: await this.translationService.translateAsync('@communication-management:entities.communication.actions.preview.messages.error-title'),
30
+ content: message,
31
+ closeButton: true,
32
+ timeOut: 5000,
33
+ });
34
+ return { success: false, message: { text: message } };
35
+ }
36
+ const resolved = resolveCommunicationMessage(communication);
37
+ const title = (typeof communication.title === 'string' && communication.title.trim()) ||
38
+ resolved.subject ||
39
+ (await this.translationService.translateAsync('@communication-management:entities.communication.actions.preview.dialog.title'));
40
+ await this.layoutBuilder
41
+ .create()
42
+ .dialog((dialog) => {
43
+ dialog
44
+ .setTitle(title)
45
+ .setSize('lg')
46
+ .setCloseButton(true)
47
+ .content((flex) => {
48
+ flex.mode('view').setDirection('column').setGap('16px').customWidget('text-block-layout', {
49
+ content: resolved.body || '',
50
+ });
51
+ })
52
+ .setActions((actions) => {
53
+ actions.cancel('@general:actions.close.title');
54
+ });
55
+ })
56
+ .show();
57
+ // Read-only preview: Close / X must not reload the Communications list.
58
+ return {
59
+ success: true,
60
+ kind: 'object',
61
+ data: undefined,
62
+ metadata: { refresh: false },
63
+ };
64
+ }
65
+ //#endregion
66
+ //#region ----- Helpers -----
67
+ async resolveCommunication(input) {
68
+ const raw = (input ?? {});
69
+ const data = raw.data != null &&
70
+ typeof raw.data === 'object' &&
71
+ !Array.isArray(raw.data)
72
+ ? raw.data
73
+ : null;
74
+ // Prefer the Communications list row payload when it already includes the message.
75
+ if (data && (data['message'] != null || data['title'] != null || data['subject'] != null)) {
76
+ return data;
77
+ }
78
+ const communicationId = this.resolveCommunicationId(raw, data);
79
+ if (!communicationId) {
80
+ return null;
81
+ }
82
+ const communicationData = this.entityService
83
+ .withEntity(RootConfig.module.name, RootConfig.entities.communication.name)
84
+ .data();
85
+ return (await communicationData.byKey(communicationId)) ?? null;
86
+ }
87
+ resolveCommunicationId(raw, data) {
88
+ const candidates = [
89
+ raw.options?.communicationId,
90
+ raw.communicationId,
91
+ raw.id,
92
+ data?.['id'],
93
+ data?.['communicationId'],
94
+ ];
95
+ for (const candidate of candidates) {
96
+ if (typeof candidate === 'string' && candidate.trim()) {
97
+ return candidate.trim();
98
+ }
99
+ }
100
+ return '';
101
+ }
102
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationShowSentMessageCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
103
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationShowSentMessageCommand, providedIn: 'root' }); }
104
+ }
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationShowSentMessageCommand, decorators: [{
106
+ type: Injectable,
107
+ args: [{ providedIn: 'root' }]
108
+ }] });
109
+
110
+ export { CommunicationShowSentMessageCommand };
111
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-communication-show-sent-message.command-D8125Jxi.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-show-sent-message.command-D8125Jxi.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/commands/communication-show-sent-message.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n resolveCommunicationMessage,\n RootConfig,\n type AXMCommunicationModel,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Types -----\n\ntype ShowSentMessageInput = {\n communicationId?: string;\n id?: string;\n data?: Record<string, unknown>;\n options?: { communicationId?: string };\n};\n\n//#endregion\n\n//#region ----- Command -----\n\n/** Opens a read-only dialog previewing the communication body from a Communications list row. */\n@Injectable({ providedIn: 'root' })\nexport class CommunicationShowSentMessageCommand implements AXPCommand {\n //#region ----- Services & Dependencies -----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n\n //#endregion\n\n //#region ----- Command -----\n\n async execute(input: ShowSentMessageInput | unknown): AXPCommandExecuteResultPromise<void> {\n const communication = await this.resolveCommunication(input);\n if (!communication) {\n const message = await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.messages.not-found',\n );\n this.toastService.show({\n color: 'warning',\n title: await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.messages.error-title',\n ),\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n\n const resolved = resolveCommunicationMessage(communication as unknown as Record<string, unknown>);\n const title =\n (typeof communication.title === 'string' && communication.title.trim()) ||\n resolved.subject ||\n (await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.dialog.title',\n ));\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle(title)\n .setSize('lg')\n .setCloseButton(true)\n .content((flex) => {\n flex.mode('view').setDirection('column').setGap('16px').customWidget('text-block-layout', {\n content: resolved.body || '',\n });\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.close.title');\n });\n })\n .show();\n\n // Read-only preview: Close / X must not reload the Communications list.\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private async resolveCommunication(input: unknown): Promise<AXMCommunicationModel | null> {\n const raw = (input ?? {}) as ShowSentMessageInput;\n const data =\n raw.data != null &&\n typeof raw.data === 'object' &&\n !Array.isArray(raw.data)\n ? (raw.data as Record<string, unknown>)\n : null;\n\n // Prefer the Communications list row payload when it already includes the message.\n if (data && (data['message'] != null || data['title'] != null || data['subject'] != null)) {\n return data as unknown as AXMCommunicationModel;\n }\n\n const communicationId = this.resolveCommunicationId(raw, data);\n if (!communicationId) {\n return null;\n }\n\n const communicationData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.communication.name)\n .data<string, AXMCommunicationModel>();\n\n return (await communicationData.byKey(communicationId)) ?? null;\n }\n\n private resolveCommunicationId(\n raw: ShowSentMessageInput,\n data: Record<string, unknown> | null,\n ): string {\n const candidates = [\n raw.options?.communicationId,\n raw.communicationId,\n raw.id,\n data?.['id'],\n data?.['communicationId'],\n ];\n\n for (const candidate of candidates) {\n if (typeof candidate === 'string' && candidate.trim()) {\n return candidate.trim();\n }\n }\n\n return '';\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAAA;AAyBA;AAEA;AAEA;MAEa,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AA+GvD,IAAA;;;IAzGC,MAAM,OAAO,CAAC,KAAqC,EAAA;QACjD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;QAC5D,IAAI,CAAC,aAAa,EAAE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G,CAAC,OAAO,EAAE,eAAe;AAC5B,YAAA,GAAG,CAAC,eAAe;AACnB,YAAA,GAAG,CAAC,EAAE;YACN,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,GAAG,iBAAiB,CAAC;SAC1B;AAED,QAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,EAAE;AACrD,gBAAA,OAAO,SAAS,CAAC,IAAI,EAAE;YACzB;QACF;AAEA,QAAA,OAAO,EAAE;IACX;8GAlHW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -0,0 +1,155 @@
1
+ import { AXToastService } from '@acorex/components/toast';
2
+ import { AXTranslationService } from '@acorex/core/translation';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, Injectable } from '@angular/core';
5
+ import { AXPSessionService } from '@acorex-platform/framework-client/auth';
6
+ import { AXPSettingsService } from '@acorex-platform/framework-client/common';
7
+ import { AXPPlatformScope } from '@acorex-platform/framework-shared/core';
8
+ import { AXPLayoutBuilderService, resolveLayoutBuilderDialogResult } from '@acorex-platform/framework-client/layout/builder';
9
+ import { AXPOrganizationManagementSettings } from '@acorex-platform/module-organization-management-contracts';
10
+ import { d as AXPCommunicationManagementClient } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-09UhY2Rc.mjs';
11
+
12
+ //#endregion
13
+ //#region ----- SMTP test dialog -----
14
+ function coerceEmailSettingValue(value) {
15
+ if (typeof value === 'string' && value.includes('@')) {
16
+ return value.trim();
17
+ }
18
+ if (value != null && typeof value === 'object' && 'value' in value) {
19
+ const nested = value.value;
20
+ if (typeof nested === 'string' && nested.includes('@')) {
21
+ return nested.trim();
22
+ }
23
+ }
24
+ return '';
25
+ }
26
+ function resolveUserRecipientEmail(user) {
27
+ if (!user) {
28
+ return '';
29
+ }
30
+ const runtimeEmail = user.email;
31
+ const fromRuntime = coerceEmailSettingValue(runtimeEmail);
32
+ if (fromRuntime) {
33
+ return fromRuntime;
34
+ }
35
+ const candidates = [user.name, user.title];
36
+ for (const candidate of candidates) {
37
+ const email = coerceEmailSettingValue(candidate);
38
+ if (email) {
39
+ return email;
40
+ }
41
+ }
42
+ return '';
43
+ }
44
+ class AXMCommunicationSmtpTestDialogService {
45
+ constructor() {
46
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
47
+ this.translationService = inject(AXTranslationService);
48
+ this.sessionService = inject(AXPSessionService);
49
+ this.settingsService = inject(AXPSettingsService);
50
+ this.client = inject(AXPCommunicationManagementClient);
51
+ }
52
+ async resolveDefaultRecipientEmail() {
53
+ const fromUser = resolveUserRecipientEmail(this.sessionService.user);
54
+ if (fromUser) {
55
+ return fromUser;
56
+ }
57
+ const supportEmail = await this.settingsService
58
+ .scope(AXPPlatformScope.Tenant)
59
+ .get(AXPOrganizationManagementSettings.SupportEmail);
60
+ return coerceEmailSettingValue(supportEmail);
61
+ }
62
+ async openAndSendTestEmail() {
63
+ const defaultRecipient = await this.resolveDefaultRecipientEmail();
64
+ try {
65
+ const result = await this.layoutBuilder
66
+ .create()
67
+ .dialog((dialog) => {
68
+ dialog
69
+ .setTitle('@communication-management:settings.communication.smtp.test.dialog.title')
70
+ .setSize('sm')
71
+ .setCloseButton(true)
72
+ .setContext({
73
+ recipientAddress: defaultRecipient,
74
+ })
75
+ .content((flex) => {
76
+ flex
77
+ .setDirection('column')
78
+ .setGap('16px')
79
+ .formField('@communication-management:settings.communication.smtp.test.dialog.fields.recipient.title', (field) => {
80
+ field.path('recipientAddress');
81
+ field.textBox({
82
+ validations: [{ rule: 'required' }, { rule: 'email' }],
83
+ placeholder: '@communication-management:settings.communication.smtp.test.dialog.fields.recipient.placeholder',
84
+ });
85
+ });
86
+ })
87
+ .setActions((actions) => {
88
+ actions
89
+ .cancel('@general:actions.cancel.title')
90
+ .submit('@communication-management:settings.communication.smtp.test.dialog.actions.send');
91
+ })
92
+ .onAction(async (dialogRef) => {
93
+ if (dialogRef.action() === 'cancel') {
94
+ return null;
95
+ }
96
+ const context = dialogRef.context();
97
+ const recipientAddress = String(context?.['recipientAddress'] ?? '').trim();
98
+ if (!recipientAddress) {
99
+ throw new Error(await this.translationService.translateAsync('@communication-management:settings.communication.smtp.test.messages.recipient-required'));
100
+ }
101
+ const data = await this.client.testSmtp({ recipientAddress });
102
+ return { success: true, kind: 'object', data };
103
+ });
104
+ })
105
+ .show();
106
+ return resolveLayoutBuilderDialogResult(result);
107
+ }
108
+ catch (error) {
109
+ const message = error instanceof Error ? error.message : 'SMTP test failed.';
110
+ return {
111
+ success: false,
112
+ message: { text: message },
113
+ };
114
+ }
115
+ }
116
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCommunicationSmtpTestDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
117
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCommunicationSmtpTestDialogService, providedIn: 'root' }); }
118
+ }
119
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCommunicationSmtpTestDialogService, decorators: [{
120
+ type: Injectable,
121
+ args: [{ providedIn: 'root' }]
122
+ }] });
123
+
124
+ //#region ----- Communication SMTP test command -----
125
+ class CommunicationTestSmtpCommand {
126
+ constructor() {
127
+ this.dialog = inject(AXMCommunicationSmtpTestDialogService);
128
+ this.toastService = inject(AXToastService);
129
+ this.translationService = inject(AXTranslationService);
130
+ }
131
+ async execute() {
132
+ const result = await this.dialog.openAndSendTestEmail();
133
+ // Cancel / header close — not a failure for the integrations panel.
134
+ if (!result) {
135
+ return { success: true, kind: 'object', data: null };
136
+ }
137
+ if (result.success) {
138
+ this.toastService.success(await this.translationService.translateAsync('@communication-management:settings.communication.smtp.test.messages.success'));
139
+ return result;
140
+ }
141
+ if (result.message?.text) {
142
+ const content = await this.translationService.translateAsync(result.message.text);
143
+ this.toastService.show({ color: 'danger', title: 'Test failed', content });
144
+ }
145
+ return result;
146
+ }
147
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationTestSmtpCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
148
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationTestSmtpCommand }); }
149
+ }
150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: CommunicationTestSmtpCommand, decorators: [{
151
+ type: Injectable
152
+ }] });
153
+
154
+ export { CommunicationTestSmtpCommand };
155
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-communication-test-smtp.command-BySmN1Lz.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-test-smtp.command-BySmN1Lz.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/features/smtp/communication-smtp-test-dialog.service.ts","../../../../libs/modules/communication-management/client/src/lib/commands/communication-test-smtp.command.ts"],"sourcesContent":["import { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService, type AXPUser } from '@acorex-platform/framework-client/auth';\nimport { AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPRuntimeCommandResult, AXPPlatformScope } from '@acorex-platform/framework-shared/core';\nimport {\n AXPLayoutBuilderService,\n resolveLayoutBuilderDialogResult,\n type AXPDialogRef,\n} from '@acorex-platform/framework-client/layout/builder';\nimport { Injectable, inject } from '@angular/core';\nimport type { CommunicationSmtpTestResult } from '@acorex-platform/module-communication-management-client/contracts';\nimport { AXPOrganizationManagementSettings } from '@acorex-platform/module-organization-management-contracts';\nimport { AXPCommunicationManagementClient } from '../../communication-management-client.port';\n\n//#region ----- Types -----\n\ntype SmtpTestDialogResult = AXPRuntimeCommandResult<CommunicationSmtpTestResult> | null;\n\n//#endregion\n\n//#region ----- SMTP test dialog -----\n\nfunction coerceEmailSettingValue(value: unknown): string {\n if (typeof value === 'string' && value.includes('@')) {\n return value.trim();\n }\n\n if (value != null && typeof value === 'object' && 'value' in value) {\n const nested = (value as { value?: unknown }).value;\n if (typeof nested === 'string' && nested.includes('@')) {\n return nested.trim();\n }\n }\n\n return '';\n}\n\nfunction resolveUserRecipientEmail(user: AXPUser | null): string {\n if (!user) {\n return '';\n }\n\n const runtimeEmail = (user as { email?: unknown }).email;\n const fromRuntime = coerceEmailSettingValue(runtimeEmail);\n if (fromRuntime) {\n return fromRuntime;\n }\n\n const candidates = [user.name, user.title];\n for (const candidate of candidates) {\n const email = coerceEmailSettingValue(candidate);\n if (email) {\n return email;\n }\n }\n\n return '';\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMCommunicationSmtpTestDialogService {\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly translationService = inject(AXTranslationService);\n private readonly sessionService = inject(AXPSessionService);\n private readonly settingsService = inject(AXPSettingsService);\n private readonly client = inject(AXPCommunicationManagementClient);\n\n private async resolveDefaultRecipientEmail(): Promise<string> {\n const fromUser = resolveUserRecipientEmail(this.sessionService.user);\n if (fromUser) {\n return fromUser;\n }\n\n const supportEmail = await this.settingsService\n .scope(AXPPlatformScope.Tenant)\n .get(AXPOrganizationManagementSettings.SupportEmail);\n\n return coerceEmailSettingValue(supportEmail);\n }\n\n async openAndSendTestEmail(): Promise<SmtpTestDialogResult> {\n const defaultRecipient = await this.resolveDefaultRecipientEmail();\n\n try {\n const result = await this.layoutBuilder\n .create()\n .dialog<SmtpTestDialogResult>((dialog) => {\n dialog\n .setTitle('@communication-management:settings.communication.smtp.test.dialog.title')\n .setSize('sm')\n .setCloseButton(true)\n .setContext({\n recipientAddress: defaultRecipient,\n })\n .content((flex) => {\n flex\n .setDirection('column')\n .setGap('16px')\n .formField('@communication-management:settings.communication.smtp.test.dialog.fields.recipient.title', (field) => {\n field.path('recipientAddress');\n field.textBox({\n validations: [{ rule: 'required' }, { rule: 'email' }],\n placeholder:\n '@communication-management:settings.communication.smtp.test.dialog.fields.recipient.placeholder',\n });\n });\n })\n .setActions((actions) => {\n actions\n .cancel('@general:actions.cancel.title')\n .submit('@communication-management:settings.communication.smtp.test.dialog.actions.send');\n })\n .onAction(async (dialogRef: AXPDialogRef) => {\n if (dialogRef.action() === 'cancel') {\n return null;\n }\n\n const context = dialogRef.context() as Record<string, unknown> | null;\n const recipientAddress = String(context?.['recipientAddress'] ?? '').trim();\n if (!recipientAddress) {\n throw new Error(\n await this.translationService.translateAsync(\n '@communication-management:settings.communication.smtp.test.messages.recipient-required',\n ),\n );\n }\n\n const data = await this.client.testSmtp({ recipientAddress });\n return { success: true, kind: 'object', data };\n });\n })\n .show();\n\n return resolveLayoutBuilderDialogResult<AXPRuntimeCommandResult<CommunicationSmtpTestResult>>(result);\n } catch (error) {\n const message = error instanceof Error ? error.message : 'SMTP test failed.';\n return {\n success: false,\n message: { text: message },\n };\n }\n }\n}\n\n//#endregion\n","import { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXPCommand, AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport type { CommunicationSmtpTestResult } from '@acorex-platform/module-communication-management-client/contracts';\nimport { Injectable, inject } from '@angular/core';\nimport { AXMCommunicationSmtpTestDialogService } from '../features/smtp/communication-smtp-test-dialog.service';\n\n//#region ----- Communication SMTP test command -----\n\n@Injectable()\nexport class CommunicationTestSmtpCommand implements AXPCommand<void, CommunicationSmtpTestResult | null> {\n private readonly dialog = inject(AXMCommunicationSmtpTestDialogService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(): AXPCommandExecuteResultPromise<CommunicationSmtpTestResult | null> {\n const result = await this.dialog.openAndSendTestEmail();\n\n // Cancel / header close — not a failure for the integrations panel.\n if (!result) {\n return { success: true, kind: 'object', data: null };\n }\n\n if (result.success) {\n this.toastService.success(\n await this.translationService.translateAsync(\n '@communication-management:settings.communication.smtp.test.messages.success',\n ),\n );\n return result;\n }\n\n if (result.message?.text) {\n const content = await this.translationService.translateAsync(result.message.text);\n this.toastService.show({ color: 'danger', title: 'Test failed', content });\n }\n\n return result;\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;;AAkBA;AAEA;AAEA,SAAS,uBAAuB,CAAC,KAAc,EAAA;AAC7C,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACpD,QAAA,OAAO,KAAK,CAAC,IAAI,EAAE;IACrB;AAEA,IAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KAAK,EAAE;AAClE,QAAA,MAAM,MAAM,GAAI,KAA6B,CAAC,KAAK;AACnD,QAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;AACtD,YAAA,OAAO,MAAM,CAAC,IAAI,EAAE;QACtB;IACF;AAEA,IAAA,OAAO,EAAE;AACX;AAEA,SAAS,yBAAyB,CAAC,IAAoB,EAAA;IACrD,IAAI,CAAC,IAAI,EAAE;AACT,QAAA,OAAO,EAA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