@acorex-platform/module-communication-management-client 0.0.38 → 0.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/{acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-CZh_tBTN.mjs → acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-BJvTWpBc.mjs} +268 -91
- package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-BJvTWpBc.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-send.command-Bnqy-YMs.mjs → acorex-platform-module-communication-management-client-communication-email-send.command-CR4RjM-X.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-send.command-Bnqy-YMs.mjs.map → acorex-platform-module-communication-management-client-communication-email-send.command-CR4RjM-X.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-D4o0Bhce.mjs → acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-yaRijsuh.mjs} +3 -3
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-D4o0Bhce.mjs.map → acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-yaRijsuh.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-send.command-BH9jjHfA.mjs → acorex-platform-module-communication-management-client-communication-send.command-D19heywC.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-send.command-BH9jjHfA.mjs.map → acorex-platform-module-communication-management-client-communication-send.command-D19heywC.mjs.map} +1 -1
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-test-smtp.command-BMsTVFBN.mjs → acorex-platform-module-communication-management-client-communication-test-smtp.command-Bck8R4as.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-communication-management-client-communication-test-smtp.command-BMsTVFBN.mjs.map → acorex-platform-module-communication-management-client-communication-test-smtp.command-Bck8R4as.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.mjs +25 -0
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication.mjs +25 -0
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-entity-change-notify-policy.mjs +195 -0
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-entity-change-notify-policy.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-BvLoGDK5.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-DTHjzWFn.mjs} +15 -3
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-DTHjzWFn.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DPCU8P32.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DN0_CPBO.mjs} +16 -2
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DN0_CPBO.mjs.map +1 -0
- package/fesm2022/{acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-DGj9OD3Z.mjs → acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-BAa4oCXu.mjs} +16 -2
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-BAa4oCXu.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-entity-change-notify-policy.entity-DmM894ok.mjs +144 -0
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-entity-change-notify-policy.entity-DmM894ok.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog.mjs +1 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs +29 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-communication-management-client-local-entities.mjs +1 -0
- package/fesm2022/acorex-platform-module-communication-management-client-local-entities.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-communication-management-client.mjs +1 -1
- package/package.json +7 -3
- package/types/acorex-platform-module-communication-management-client-contracts-entities-entity-change-notify-policy.d.ts +5 -0
- package/types/acorex-platform-module-communication-management-client-contracts.d.ts +48 -2
- package/types/acorex-platform-module-communication-management-client.d.ts +17 -0
- package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-CZh_tBTN.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-BvLoGDK5.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DPCU8P32.mjs.map +0 -1
- package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-DGj9OD3Z.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-email-send.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-email-send.command-CR4RjM-X.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/features/email/communication-email-send.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport type {\n CommunicationManagementEmailSendInput,\n CommunicationManagementEmailSendResult,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\nimport { AXPCommunicationManagementClient } from '../../communication-management-client.port';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction parseSendInput(\n raw: unknown,\n): { ok: true; value: CommunicationManagementEmailSendInput } | { 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 const to = typeof obj['to'] === 'string' ? obj['to'].trim() : '';\n const subject = typeof obj['subject'] === 'string' ? obj['subject'].trim() : '';\n const body = typeof obj['body'] === 'string' ? obj['body'].trim() : '';\n if (!to || !subject || !body) {\n return { ok: false, error: 'Invalid arguments: \"to\", \"subject\", and \"body\" are required.' };\n }\n const cc = typeof obj['cc'] === 'string' ? obj['cc'].trim() : '';\n const bcc = typeof obj['bcc'] === 'string' ? obj['bcc'].trim() : '';\n const textTemplateId = typeof obj['textTemplateId'] === 'string' ? obj['textTemplateId'].trim() : '';\n return {\n ok: true,\n value: {\n to,\n subject,\n body,\n ...(cc ? { cc } : {}),\n ...(bcc ? { bcc } : {}),\n ...(textTemplateId ? { textTemplateId } : {}),\n },\n };\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable()\nexport class CommunicationManagementEmailSendCommand\n implements AXPCommand<CommunicationManagementEmailSendInput, CommunicationManagementEmailSendResult>\n{\n private readonly client = inject(AXPCommunicationManagementClient);\n\n async execute(\n input: CommunicationManagementEmailSendInput,\n ): AXPCommandExecuteResultPromise<CommunicationManagementEmailSendResult> {\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({\n channel: 'email-smtp',\n title: parsed.value.subject,\n message: {\n subject: parsed.value.subject,\n body: parsed.value.body,\n },\n recipientAddress: parsed.value.to,\n });\n return { success: true, kind: 'object', data };\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Email send failed.';\n return { success: false, message: { text: message } };\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAWA;AAEA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AK,CAAC,OAAO,GAAG,oBAAoB;AAC7E,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACvD;IACF;8GA5BW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAvC,uCAAuC,EAAA,CAAA,CAAA;;2FAAvC,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD;;;"}
|
|
@@ -23,7 +23,7 @@ import * as i1 from '@angular/common';
|
|
|
23
23
|
import { CommonModule } from '@angular/common';
|
|
24
24
|
import * as i0 from '@angular/core';
|
|
25
25
|
import { inject, computed, signal, viewChild, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
26
|
-
import { A as AXPInAppInboxConnectorService, a as AXPInAppInboxActionService, b as AXP_IN_APP_INBOX_I18N, c as AXPInAppInboxItemComponent } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-
|
|
26
|
+
import { A as AXPInAppInboxConnectorService, a as AXPInAppInboxActionService, b as AXP_IN_APP_INBOX_I18N, c as AXPInAppInboxItemComponent } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-BJvTWpBc.mjs';
|
|
27
27
|
|
|
28
28
|
//#region ---- Communication in-app inbox page ----
|
|
29
29
|
class AXMCommunicationInAppInboxPageComponent extends AXPPageLayoutBaseComponent {
|
|
@@ -484,7 +484,7 @@ class AXMCommunicationInAppInboxPageComponent extends AXPPageLayoutBaseComponent
|
|
|
484
484
|
]);
|
|
485
485
|
}
|
|
486
486
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCommunicationInAppInboxPageComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
487
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMCommunicationInAppInboxPageComponent, isStandalone: true, selector: "axm-communication-in-app-inbox-page", host: { listeners: { "document:keydown.escape": "deselectAll()" }, classAttribute: "axm-communication-in-app-inbox-page" }, providers: [{ provide: AXPPageLayoutBase, useExisting: AXMCommunicationInAppInboxPageComponent }], viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: ["@reference \"@acorex/styles/themes/default.css\";.axm-communication-in-app-inbox-page{@apply flex min-h-0 flex-1 flex-col;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__selection-bar{@apply flex h-10 w-full items-center gap-3;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__selection-count{@apply text-xl font-semibold;color:rgb(var(--ax-sys-color-on-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__unselect{@apply cursor-pointer border-0 bg-transparent p-0 text-sm underline;color:rgb(var(--ax-sys-color-on-surface-variant))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__content,.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__panel{@apply flex min-h-0 flex-1 flex-col overflow-hidden;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__list{@apply min-h-0 flex-1 overflow-auto rounded-lg border;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__list--loading{@apply space-y-0 p-2;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row{@apply flex max-w-full items-center gap-3 border-b transition-colors;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row:last-child{@apply border-b-0;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row:hover{background:rgb(var(--ax-sys-color-lightest-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row.--selected{background:rgb(var(--ax-sys-color-lighter-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__checkbox{@apply shrink-0 ps-4;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__sliding-item{@apply max-h-24 overflow-hidden border-b;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__sliding-item:last-child{@apply border-b-0;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer{@apply w-full;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer ax-data-pager{@apply w-full;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer--compact ::ng-deep ax-data-pager{@apply justify-center;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer--compact ::ng-deep ax-data-pager .compact-prefix{@apply flex w-full justify-center;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer--compact ::ng-deep ax-data-pager .compact-suffix{@apply hidden;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton{@apply flex gap-4 p-4;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-avatar{@apply size-12 shrink-0 rounded-full;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-body{@apply flex-1 space-y-2 py-1;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-line{@apply h-3 rounded-md;background:rgb(var(--ax-sys-color-lighter-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-line.--wide{@apply w-3/4;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-line:not(.--wide){@apply w-1/2;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i4.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i6.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXSlidingItemModule }, { kind: "component", type: i7.AXSlidingItemComponent, selector: "ax-sliding-item" }, { kind: "component", type: i7.AXSlidingItemSuffixComponent, selector: "ax-sliding-item-suffix", inputs: ["color", "text"], outputs: ["onClick"] }, { kind: "ngmodule", type: AXDataPagerModule }, { kind: "component", type: i8.AXDataPagerComponent, selector: "ax-data-pager", inputs: ["value", "name", "disabled", "readonly", "isLoading", "size", "total", "displayMode"], outputs: ["valueChange", "onValueChanged", "disabledChange", "readonlyChange", "displayModeChange", "onChanged"] }, { kind: "component", type: AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "closeOnRouteChange", "items", "target"], outputs: ["onItemClick", "onOpening", "onClose"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "component", type: AXPQueryFiltersComponent, selector: "axp-query-filters", inputs: ["filtersDefinitions", "initialFilters", "quickSearch"], outputs: ["onFiltersChanged"] }, { 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: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
487
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMCommunicationInAppInboxPageComponent, isStandalone: true, selector: "axm-communication-in-app-inbox-page", host: { listeners: { "document:keydown.escape": "deselectAll()" }, classAttribute: "axm-communication-in-app-inbox-page" }, providers: [{ provide: AXPPageLayoutBase, useExisting: AXMCommunicationInAppInboxPageComponent }], viewQueries: [{ propertyName: "contextMenu", first: true, predicate: ["contextMenu"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<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", styles: ["@reference \"@acorex/styles/themes/default.css\";.axm-communication-in-app-inbox-page{@apply flex min-h-0 flex-1 flex-col;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__selection-bar{@apply flex h-10 w-full items-center gap-3;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__selection-count{@apply text-xl font-semibold;color:rgb(var(--ax-sys-color-on-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__unselect{@apply cursor-pointer border-0 bg-transparent p-0 text-sm underline;color:rgb(var(--ax-sys-color-on-surface-variant))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__content,.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__panel{@apply flex min-h-0 flex-1 flex-col overflow-hidden;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__list{@apply min-h-0 flex-1 overflow-auto rounded-lg border;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__list--loading{@apply space-y-0 p-2;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row{@apply flex max-w-full items-center gap-3 border-b transition-colors;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row:last-child{@apply border-b-0;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row:hover{background:rgb(var(--ax-sys-color-lightest-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__row.--selected{background:rgb(var(--ax-sys-color-lighter-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__checkbox{@apply shrink-0 ps-4;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__sliding-item{@apply max-h-24 overflow-hidden border-b;border-color:rgb(var(--ax-sys-color-border-lightest-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__sliding-item:last-child{@apply border-b-0;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer{@apply w-full;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer ax-data-pager{@apply w-full;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer--compact ::ng-deep ax-data-pager{@apply justify-center;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer--compact ::ng-deep ax-data-pager .compact-prefix{@apply flex w-full justify-center;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__footer--compact ::ng-deep ax-data-pager .compact-suffix{@apply hidden;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton{@apply flex gap-4 p-4;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-avatar{@apply size-12 shrink-0 rounded-full;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-body{@apply flex-1 space-y-2 py-1;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-line{@apply h-3 rounded-md;background:rgb(var(--ax-sys-color-lighter-surface))}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-line.--wide{@apply w-3/4;}.axm-communication-in-app-inbox-page .axm-communication-in-app-inbox-page__skeleton-line:not(.--wide){@apply w-1/2;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { 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: "component", type: i3.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXSkeletonModule }, { kind: "component", type: i4.AXSkeletonComponent, selector: "ax-skeleton", inputs: ["animated"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "component", type: i5.AXCheckBoxComponent, selector: "ax-check-box", inputs: ["disabled", "tabIndex", "readonly", "color", "value", "name", "id", "isLoading", "indeterminate"], outputs: ["onBlur", "onFocus", "valueChange", "onValueChanged"] }, { kind: "ngmodule", type: AXLabelModule }, { kind: "component", type: i6.AXLabelComponent, selector: "ax-label", inputs: ["required", "for"], outputs: ["requiredChange"] }, { kind: "ngmodule", type: AXSlidingItemModule }, { kind: "component", type: i7.AXSlidingItemComponent, selector: "ax-sliding-item" }, { kind: "component", type: i7.AXSlidingItemSuffixComponent, selector: "ax-sliding-item-suffix", inputs: ["color", "text"], outputs: ["onClick"] }, { kind: "ngmodule", type: AXDataPagerModule }, { kind: "component", type: i8.AXDataPagerComponent, selector: "ax-data-pager", inputs: ["value", "name", "disabled", "readonly", "isLoading", "size", "total", "displayMode"], outputs: ["valueChange", "onValueChanged", "disabledChange", "readonlyChange", "displayModeChange", "onChanged"] }, { kind: "component", type: AXContextMenuComponent, selector: "ax-context-menu", inputs: ["orientation", "openOn", "closeOn", "closeOnRouteChange", "items", "target"], outputs: ["onItemClick", "onOpening", "onClose"] }, { kind: "component", type: AXPPageLayoutComponent, selector: "axp-page-layout" }, { kind: "component", type: AXPThemeLayoutBlockComponent, selector: " axp-page-content, axp-page-footer-container, axp-page-footer, axp-page-header, axp-page-header-container, axp-page-toolbar, axp-layout-content, axp-layout-page-content, axp-layout-sections, axp-layout-body, axp-layout-page-body, axp-layout-prefix, axp-layout-suffix, axp-layout-title-bar, axp-layout-title, axp-layout-title-actions, axp-layout-nav-button, axp-layout-description, axp-layout-breadcrumbs, axp-layout-list-action, " }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "titleParams", "descriptionParams", "look"] }, { kind: "component", type: AXPQueryFiltersComponent, selector: "axp-query-filters", inputs: ["filtersDefinitions", "initialFilters", "mode", "quickSearch", "sortPresets", "activeSortPresetName"], outputs: ["onFiltersChanged", "onSortPresetSelected"] }, { 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: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
488
488
|
}
|
|
489
489
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMCommunicationInAppInboxPageComponent, decorators: [{
|
|
490
490
|
type: Component,
|
|
@@ -511,4 +511,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
511
511
|
}], propDecorators: { contextMenu: [{ type: i0.ViewChild, args: ['contextMenu', { isSignal: true }] }] } });
|
|
512
512
|
|
|
513
513
|
export { AXMCommunicationInAppInboxPageComponent };
|
|
514
|
-
//# sourceMappingURL=acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-
|
|
514
|
+
//# sourceMappingURL=acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-yaRijsuh.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-D4o0Bhce.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,CAAC,cAAc;AACzC,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU;AACrC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,WAAW;AACxC,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK;AACjC,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,UAAU;oFAAC;QAEhE,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAwB,EAAE;8FAAC;QACrD,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAmB,EAAE;gGAAC;QAClD,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,CAAC;4FAAC;QAC7B,IAAA,CAAA,aAAa,GAAG,MAAM,CAAmB,EAAE;0FAAC;QAC1C,IAAA,CAAA,SAAS,GAAG,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A,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;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-yaRijsuh.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+Bm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;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;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXToastService } from '@acorex/components/toast';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
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-
|
|
4
|
+
import { d as AXPCommunicationManagementClient, e as AXPInAppInboxRealtimeService } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-BJvTWpBc.mjs';
|
|
5
5
|
|
|
6
6
|
function parseMessage(raw) {
|
|
7
7
|
if (raw == null || typeof raw !== 'object' || Array.isArray(raw)) {
|
|
@@ -83,4 +83,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
83
83
|
}] });
|
|
84
84
|
|
|
85
85
|
export { CommunicationSendCommand };
|
|
86
|
-
//# sourceMappingURL=acorex-platform-module-communication-management-client-communication-send.command-
|
|
86
|
+
//# sourceMappingURL=acorex-platform-module-communication-management-client-communication-send.command-D19heywC.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-send.command-
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-send.command-D19heywC.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 bypassDebugRedirect: obj['bypassDebugRedirect'] === true,\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,E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CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;YACjD,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAChD,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,gBAAA,KAAK,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;;;"}
|
|
@@ -7,7 +7,7 @@ import { AXPSettingsService } from '@acorex-platform/framework-client/common';
|
|
|
7
7
|
import { AXPPlatformScope } from '@acorex-platform/framework-shared/core';
|
|
8
8
|
import { AXPLayoutBuilderService, resolveLayoutBuilderDialogResult } from '@acorex-platform/framework-client/layout/builder';
|
|
9
9
|
import { AXPOrganizationManagementSettings } from '@acorex-platform/module-organization-management-client/contracts';
|
|
10
|
-
import { d as AXPCommunicationManagementClient } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-
|
|
10
|
+
import { d as AXPCommunicationManagementClient } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-BJvTWpBc.mjs';
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ----- SMTP test dialog -----
|
|
@@ -152,4 +152,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
152
152
|
}] });
|
|
153
153
|
|
|
154
154
|
export { CommunicationTestSmtpCommand };
|
|
155
|
-
//# sourceMappingURL=acorex-platform-module-communication-management-client-communication-test-smtp.command-
|
|
155
|
+
//# sourceMappingURL=acorex-platform-module-communication-management-client-communication-test-smtp.command-Bck8R4as.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-test-smtp.command-BMsTVFBN.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-client/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,EAAE;IACX;AAEA,IAAA,MAAM,YAAY,GAAI,IAA4B,CAAC,KAAK;AACxD,IAAA,MAAM,WAAW,GAAG,uBAAuB,CAAC,YAAY,CAAC;IACzD,IAAI,WAAW,EAAE;AACf,QAAA,OAAO,WAAW;IACpB;IAEA,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;AAC1C,IAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;AAClC,QAAA,MAAM,KAAK,GAAG,uBAAuB,CAAC,SAAS,CAAC;QAChD,IA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,CAAC,OAAO,CACvB,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1C,6EAA6E,CAC9E,CACF;AACD,YAAA,OAAO,MAAM;QACf;AAEA,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE;AACxB,YAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;AACjF,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;QAC5E;AAEA,QAAA,OAAO,MAAM;IACf;8GA5BW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5B,4BAA4B,EAAA,CAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC;;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-communication-management-client-communication-test-smtp.command-Bck8R4as.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-client/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,EAAE;IACX;AAEA,IAAA,MAAM,YAAY,GAAI,IAA4B,CAAC,KAAK;AACxD,IAAA,MAAM,WAAW,GAAG,uBAAuB,CAAC,YAAY,CAAC;IACzD,IAAI,WAAW,EAAE;AACf,QAAA,OAAO,WAAW;IACpB;IAEA,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC;AAC1C,IAAA,KAAK,MA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AE,IAAI,EAAE;QACtD;AAEA,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE;AAClB,YAAA,IAAI,CAAC,YAAY,CAAC,OAAO,CACvB,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1C,6EAA6E,CAC9E,CACF;AACD,YAAA,OAAO,MAAM;QACf;AAEA,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE,IAAI,EAAE;AACxB,YAAA,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;AACjF,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;QAC5E;AAEA,QAAA,OAAO,MAAM;IACf;8GA5BW,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA5B,4BAA4B,EAAA,CAAA,CAAA;;2FAA5B,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBADxC;;;"}
|
|
@@ -38,6 +38,12 @@ const RootConfig = {
|
|
|
38
38
|
titlePlural: '@communication-management:entities.communication-delivery.plural',
|
|
39
39
|
icon: 'fa-light fa-truck-fast',
|
|
40
40
|
},
|
|
41
|
+
entityChangeNotifyPolicy: {
|
|
42
|
+
name: 'EntityChangeNotifyPolicy',
|
|
43
|
+
title: '@communication-management:entities.entity-change-notify-policy.title',
|
|
44
|
+
titlePlural: '@communication-management:entities.entity-change-notify-policy.plural',
|
|
45
|
+
icon: 'fa-light fa-bell-on',
|
|
46
|
+
},
|
|
41
47
|
},
|
|
42
48
|
widgets: {
|
|
43
49
|
myInAppInboxDashboard: dashboardWidgetId('MyInAppInboxDashboard'),
|
|
@@ -50,6 +56,11 @@ const RootConfig = {
|
|
|
50
56
|
};
|
|
51
57
|
const COMMUNICATION_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.communication.name}`;
|
|
52
58
|
const COMMUNICATION_DELIVERY_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.communicationDelivery.name}`;
|
|
59
|
+
const ENTITY_CHANGE_NOTIFY_POLICY_ENTITY_NAME = `${RootConfig.module.name}.${RootConfig.entities.entityChangeNotifyPolicy.name}`;
|
|
60
|
+
const ENTITY_CHANGE_NOTIFY_JOB_PROVIDER_KEY = 'communication-management';
|
|
61
|
+
const DEFAULT_ENTITY_CHANGE_NOTIFY_DEBOUNCE_SECONDS = 60;
|
|
62
|
+
/** Namespace for {@link tenantMasterId} when cloning notify policies per tenant. */
|
|
63
|
+
const ENTITY_CHANGE_NOTIFY_POLICY_TENANT_MASTER_NAMESPACE = 'communication';
|
|
53
64
|
|
|
54
65
|
const listOptions = {
|
|
55
66
|
filter: { inline: { enabled: true }, advance: { enabled: true } },
|
|
@@ -62,6 +73,20 @@ async function communicationDeliveryEntityFactory() {
|
|
|
62
73
|
name: RootConfig.entities.communicationDelivery.name,
|
|
63
74
|
title: RootConfig.entities.communicationDelivery.title,
|
|
64
75
|
icon: RootConfig.entities.communicationDelivery.icon,
|
|
76
|
+
searchTags: [
|
|
77
|
+
'communication-delivery',
|
|
78
|
+
'delivery',
|
|
79
|
+
'delivery-tracking',
|
|
80
|
+
'sent',
|
|
81
|
+
'delivered',
|
|
82
|
+
'read-receipt',
|
|
83
|
+
'channel-delivery',
|
|
84
|
+
'recipient-address',
|
|
85
|
+
'تحویل',
|
|
86
|
+
'تحویلها',
|
|
87
|
+
'ردیابی تحویل',
|
|
88
|
+
'کانال',
|
|
89
|
+
],
|
|
65
90
|
plugins: [
|
|
66
91
|
{
|
|
67
92
|
name: 'status',
|