@acorex-platform/module-communication-management-client 0.0.32 → 0.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/fesm2022/{acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-G4wzzccx.mjs → acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-CZh_tBTN.mjs} +28 -12
  2. package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-CZh_tBTN.mjs.map +1 -0
  3. package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-send.command-De8K6vIB.mjs → acorex-platform-module-communication-management-client-communication-email-send.command-Bnqy-YMs.mjs} +2 -2
  4. package/fesm2022/{acorex-platform-module-communication-management-client-communication-email-send.command-De8K6vIB.mjs.map → acorex-platform-module-communication-management-client-communication-email-send.command-Bnqy-YMs.mjs.map} +1 -1
  5. package/fesm2022/acorex-platform-module-communication-management-client-communication-email-show-dialog.command-NuJLiYs_.mjs.map +1 -1
  6. package/fesm2022/{acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-BjJjqWja.mjs → acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-D4o0Bhce.mjs} +3 -3
  7. package/fesm2022/{acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-BjJjqWja.mjs.map → acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-D4o0Bhce.mjs.map} +1 -1
  8. package/fesm2022/{acorex-platform-module-communication-management-client-communication-send.command-NEXrsogP.mjs → acorex-platform-module-communication-management-client-communication-send.command-BH9jjHfA.mjs} +2 -2
  9. package/fesm2022/{acorex-platform-module-communication-management-client-communication-send.command-NEXrsogP.mjs.map → acorex-platform-module-communication-management-client-communication-send.command-BH9jjHfA.mjs.map} +1 -1
  10. package/fesm2022/acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs.map +1 -1
  11. package/fesm2022/{acorex-platform-module-communication-management-client-communication-test-smtp.command-Cp5fHOh4.mjs → acorex-platform-module-communication-management-client-communication-test-smtp.command-BMsTVFBN.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-communication-management-client-communication-test-smtp.command-Cp5fHOh4.mjs.map → acorex-platform-module-communication-management-client-communication-test-smtp.command-BMsTVFBN.mjs.map} +1 -1
  13. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.mjs +235 -0
  14. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication.mjs +254 -0
  16. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entities-communication.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-BvLoGDK5.mjs +60 -0
  18. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-acorex-platform-module-communication-management-client-contracts-entity-catalog-BvLoGDK5.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DPCU8P32.mjs +183 -0
  20. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication-delivery.entity-DPCU8P32.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-DGj9OD3Z.mjs +202 -0
  22. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-communication.entity-DGj9OD3Z.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-status.keys-JESc4HlO.mjs +15 -0
  24. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog-status.keys-JESc4HlO.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog.mjs +2 -0
  26. package/fesm2022/acorex-platform-module-communication-management-client-contracts-entity-catalog.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-communication-management-client-contracts.mjs.map +1 -1
  28. package/fesm2022/acorex-platform-module-communication-management-client-local-entities.mjs +30 -0
  29. package/fesm2022/acorex-platform-module-communication-management-client-local-entities.mjs.map +1 -0
  30. package/fesm2022/acorex-platform-module-communication-management-client.mjs +1 -1
  31. package/package.json +19 -3
  32. package/types/acorex-platform-module-communication-management-client-contracts-entities-communication-delivery.d.ts +5 -0
  33. package/types/acorex-platform-module-communication-management-client-contracts-entities-communication.d.ts +5 -0
  34. package/types/acorex-platform-module-communication-management-client-contracts-entity-catalog.d.ts +10 -0
  35. package/types/acorex-platform-module-communication-management-client-local-entities.d.ts +12 -0
  36. package/types/acorex-platform-module-communication-management-client.d.ts +2 -0
  37. package/fesm2022/acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-G4wzzccx.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-communication-management-client-communication-email-show-dialog.command-NuJLiYs_.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/features/email/communication-email-composer.service.ts","../../../../libs/modules/communication-management/client/src/lib/features/email/communication-email-show-dialog.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDataSourceFilterOption } from '@acorex/cdk/common';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY } from '@acorex-platform/module-content-management-client';\nimport { AXPRuntimeCommandResult, runtimeCommandPayloadData} from '@acorex-platform/framework-shared/core';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { COMMUNICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY } from '@acorex-platform/module-communication-management-client/contracts';\nimport type { AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n CommunicationManagementEmailSendInput,\n CommunicationManagementEmailSendResult,\n CommunicationManagementEmailShowDialogInput,\n} from '@acorex-platform/module-communication-management-client/contracts';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction normalizeTextTemplateId(value: unknown): string | undefined {\n if (typeof value === 'string') {\n const t = value.trim();\n return t || undefined;\n }\n if (value != null && typeof value === 'object' && 'id' in value) {\n const id = (value as { id: unknown }).id;\n if (typeof id === 'string' && id.trim()) return id.trim();\n }\n return undefined;\n}\n\nfunction parseDataRecord(value: unknown): Record<string, unknown> {\n if (value == null) return {};\n if (typeof value === 'object' && !Array.isArray(value)) {\n return { ...(value as Record<string, unknown>) };\n }\n return {};\n}\n\n/**\n * True when HTML/plain body has no user-visible text (handles empty `<p><br></p>` etc.).\n */\nfunction isEffectivelyEmptyRichTextBody(value: string): boolean {\n const trimmed = value.trim();\n if (!trimmed) {\n return true;\n }\n const withoutTags = trimmed\n .replace(/<[^>]+>/g, ' ')\n .replace(/&nbsp;/gi, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n return withoutTags.length === 0;\n}\n\n/** Resolved entity module for the text-template data selector. */\nconst TEXT_TEMPLATE_ENTITY_MODULE = 'ContentManagement';\n\n/** Resolved entity name for the text-template data selector. */\nconst TEXT_TEMPLATE_ENTITY_NAME = 'TextTemplate';\n\n/** List filter: only templates with a non-empty `channels.email.body` (excludes SMS-only rows). */\nconst TEXT_TEMPLATE_LIST_EMAIL_BODY_FILTER = {\n field: 'channels.email.body',\n operator: { type: 'isNotEmpty' },\n} as unknown as AXDataSourceFilterOption;\n\n//#endregion\n\n//#region ---- Service ----\n\n/**\n * Opens the send-email dialog built with the layout dialog builder and delegates send to\n * {@link COMMUNICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AXMCommunicationEmailComposerService {\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly translationService = inject(AXTranslationService);\n private readonly commandService = inject(AXPCommandService);\n private readonly entityDataSelector = inject(AXPEntityDataSelectorService);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n\n /**\n * Shows the compose dialog; on submit runs the send command with the dialog context.\n * When {@link CommunicationManagementEmailShowDialogInput.textTemplateId} is not set, the standard\n * entity data selector ({@link AXPEntityDataSelectorService}) runs first; the compose dialog has no template field.\n */\n async openSendEmailDialog(\n input: CommunicationManagementEmailShowDialogInput,\n ): AXPCommandExecuteResultPromise<CommunicationManagementEmailSendResult | null> {\n const data = parseDataRecord(input.data);\n let textTemplateId = input.textTemplateId?.trim() ?? '';\n\n if (!textTemplateId) {\n const picked = await this.openTextTemplatePickerDialog();\n if (picked === null) {\n return { success: false };\n }\n textTemplateId = picked;\n }\n\n let subject = input.subject ?? '';\n let body = input.body ?? '';\n\n if (textTemplateId) {\n const rendered = await this.commandService.execute<\n { textTemplateId: string; channel: string; data: Record<string, unknown>; locale?: string },\n { subject?: string; body: string }\n >(AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY, {\n textTemplateId,\n channel: 'email',\n data,\n locale: this.translationService.getActiveLang() ?? 'en-US',\n });\n const __single_rendered = runtimeCommandPayloadData(rendered);\n if (__single_rendered) {\n subject = __single_rendered.subject ?? subject;\n body = __single_rendered.body ?? body;\n }\n }\n\n const defaultTitle = await this.translationService.translateAsync(\n '@communication-management:email.dialog.title',\n );\n const title = input.dialogTitle?.trim()\n ? await this.translationService.translateAsync(input.dialogTitle)\n : defaultTitle;\n\n try {\n const result = await this.layoutBuilder\n .create()\n .dialog<AXPRuntimeCommandResult<CommunicationManagementEmailSendResult | null>>((dialog) => {\n dialog\n .setTitle(title)\n .setSize('lg')\n .setCloseButton(true)\n .setContext({\n to: input.to ?? '',\n cc: input.cc ?? '',\n bcc: input.bcc ?? '',\n subject,\n body,\n textTemplateId,\n })\n .content((flex) => {\n flex\n .setDirection('column')\n .setGap('16px')\n .formField('@communication-management:email.dialog.fields.to.title', (field) => {\n field.path('to');\n field.textBox({\n validations: [{ rule: 'required' }],\n placeholder: '@communication-management:email.dialog.fields.to.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.cc.title', (field) => {\n field.path('cc');\n field.textBox({\n placeholder: '@communication-management:email.dialog.fields.cc.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.bcc.title', (field) => {\n field.path('bcc');\n field.textBox({\n placeholder: '@communication-management:email.dialog.fields.bcc.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.subject.title', (field) => {\n field.path('subject');\n field.textBox({\n validations: [{ rule: 'required' }],\n placeholder: '@communication-management:email.dialog.fields.subject.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.body.title', (field) => {\n field.path('body');\n field.richText({\n validations: [{ rule: 'required' }],\n placeholder: '@communication-management:email.dialog.fields.body.placeholder',\n });\n });\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.cancel.title').submit('@general:actions.send.title');\n })\n .onAction(async (dialogRef) => {\n const context = dialogRef.context() as Record<string, unknown> | null;\n const action = dialogRef.action();\n if (!context || action === 'cancel') {\n return { success: false };\n }\n const to = String(context['to'] ?? '').trim();\n const subjectOut = String(context['subject'] ?? '').trim();\n const bodyOut = String(context['body'] ?? '');\n if (!to || !subjectOut || isEffectivelyEmptyRichTextBody(bodyOut)) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@communication-management:email.dialog.messages.required-fields',\n ),\n },\n data: null,\n };\n }\n const sendInput: CommunicationManagementEmailSendInput = {\n to,\n cc: String(context['cc'] ?? '').trim() || undefined,\n bcc: String(context['bcc'] ?? '').trim() || undefined,\n subject: subjectOut,\n body: bodyOut.trim(),\n textTemplateId: normalizeTextTemplateId(context['textTemplateId']),\n };\n const sendResult = await this.commandService.execute<\n CommunicationManagementEmailSendInput,\n CommunicationManagementEmailSendResult\n >(COMMUNICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY, sendInput);\n return (\n sendResult ?? {\n success: false,\n message: { text: 'Send command did not return a result.' },\n data: null,\n }\n );\n });\n })\n .show();\n\n return result;\n } catch (e) {\n return {\n success: false,\n message: {\n text: e instanceof Error ? e.message : 'Failed to open send email dialog.',\n },\n };\n }\n }\n\n /**\n * Opens {@link AXPEntityDataSelectorService} for `ContentManagement.TextTemplate`. Returns `null` if\n * the selector is dismissed without applying, `''` if the user applies with no row selected (compose\n * without a template), or the selected template id.\n */\n private async openTextTemplatePickerDialog(): Promise<string | null> {\n const entity = await this.entityRegistry.resolve(TEXT_TEMPLATE_ENTITY_MODULE, TEXT_TEMPLATE_ENTITY_NAME);\n if (!entity) {\n return null;\n }\n\n const title = await this.translationService.translateAsync(\n '@communication-management:email.template-picker.title',\n );\n\n try {\n const result = await this.entityDataSelector.open({\n entity,\n title,\n allowMultiple: false,\n allowCreate: 'none',\n filters: TEXT_TEMPLATE_LIST_EMAIL_BODY_FILTER,\n columns: ['title', 'name'],\n searchFields: ['title', 'name'],\n });\n if (result == null) {\n return null;\n }\n const items = result.items ?? [];\n if (items.length === 0) {\n return '';\n }\n const rawId = (items[0] as Record<string, unknown>)['id'];\n if (rawId != null && String(rawId).trim() !== '') {\n return String(rawId).trim();\n }\n return '';\n } catch {\n return null;\n }\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { Injectable, inject } from '@angular/core';\nimport type {\n CommunicationManagementEmailSendResult,\n CommunicationManagementEmailShowDialogInput,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { AXMCommunicationEmailComposerService } from './communication-email-composer.service';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommunicationManagementEmailShowDialogCommand\n implements AXPCommand<CommunicationManagementEmailShowDialogInput, CommunicationManagementEmailSendResult | null>\n{\n private readonly composer = inject(AXMCommunicationEmailComposerService);\n\n async execute(\n input: CommunicationManagementEmailShowDialogInput | unknown,\n ): AXPCommandExecuteResultPromise<CommunicationManagementEmailSendResult | null> {\n const raw = input as { options?: CommunicationManagementEmailShowDialogInput } & Record<string, unknown>;\n const evaluated: CommunicationManagementEmailShowDialogInput = {\n ...(raw.options ?? {}),\n ...(raw as CommunicationManagementEmailShowDialogInput),\n };\n\n return this.composer.openSendEmailDialog(evaluated);\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAkBA;AAEA;AAEA,SAAS,uBAAuB,CAAC,KAAc,EAAA;AAC7C,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,QAAA,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE;QACtB,OAAO,CAAC,IAAI,SAAS;IACvB;AACA,IAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,IAAI,KAAK,EAAE;AAC/D,QAAA,MAAM,EAAE,GAAI,KAAyB,CAAC,EAAE;QACxC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,EAAE;AAAE,YAAA,OAAO,EAAE,CAAC,IAAI,EAAE;IAC3D;AACA,IAAA,OAAO,SAAS;AAClB;AAEA,SAAS,eAAe,CAAC,KAAc,EAAA;IACrC,IAAI,KAAK,IAAI,IAAI;AAAE,QAAA,OAAO,EAAE;AAC5B,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACtD,QAAA,OAAO,EAAE,GAAI,KAAiC,EAAE;IAClD;AACA,IAAA,OAAO,EAAE;AACX;AAEA;;AAEG;AACH,SAAS,8BAA8B,CAAC,KAAa,EAAA;AACnD,IAAA,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE;IAC5B,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,OAAO,IAAI;IACb;IACA,MAAM,WAAW,GAAG;AACjB,SAAA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,iBAAA;;;ACrED;AAEA;MAKa,6CAA6C,CAAA;AAH1D,IAAA,WAAA,GAAA;AAMmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,oCAAoC,CAAC;AAazE,IAAA;IAXC,MAAM,OAAO,CACX,KAA4D,EAAA;QAE5D,MAAM,GAAG,GAAG,KAA4F;AACxG,QAAA,MAAM,SAAS,GAAgD;AAC7D,YAAA,IAAI,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;AACtB,YAAA,GAAI,GAAmD;SACxD;QAED,OAAO,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC;IACrD;8GAfW,6CAA6C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA7C,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,6CAA6C,cAF5C,MAAM,EAAA,CAAA,CAAA;;2FAEP,6CAA6C,EAAA,UAAA,EAAA,CAAA;kBAHzD,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-email-show-dialog.command-NuJLiYs_.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/features/email/communication-email-composer.service.ts","../../../../libs/modules/communication-management/client/src/lib/features/email/communication-email-show-dialog.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDataSourceFilterOption } from '@acorex/cdk/common';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY } from '@acorex-platform/module-content-management-client';\nimport { AXPRuntimeCommandResult, runtimeCommandPayloadData} from '@acorex-platform/framework-shared/core';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommandService } from '@acorex-platform/framework-client/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { COMMUNICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY } from '@acorex-platform/module-communication-management-client/contracts';\nimport type { AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport type {\n CommunicationManagementEmailSendInput,\n CommunicationManagementEmailSendResult,\n CommunicationManagementEmailShowDialogInput,\n} from '@acorex-platform/module-communication-management-client/contracts';\n\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction normalizeTextTemplateId(value: unknown): string | undefined {\n if (typeof value === 'string') {\n const t = value.trim();\n return t || undefined;\n }\n if (value != null && typeof value === 'object' && 'id' in value) {\n const id = (value as { id: unknown }).id;\n if (typeof id === 'string' && id.trim()) return id.trim();\n }\n return undefined;\n}\n\nfunction parseDataRecord(value: unknown): Record<string, unknown> {\n if (value == null) return {};\n if (typeof value === 'object' && !Array.isArray(value)) {\n return { ...(value as Record<string, unknown>) };\n }\n return {};\n}\n\n/**\n * True when HTML/plain body has no user-visible text (handles empty `<p><br></p>` etc.).\n */\nfunction isEffectivelyEmptyRichTextBody(value: string): boolean {\n const trimmed = value.trim();\n if (!trimmed) {\n return true;\n }\n const withoutTags = trimmed\n .replace(/<[^>]+>/g, ' ')\n .replace(/&nbsp;/gi, ' ')\n .replace(/\\s+/g, ' ')\n .trim();\n return withoutTags.length === 0;\n}\n\n/** Resolved entity module for the text-template data selector. */\nconst TEXT_TEMPLATE_ENTITY_MODULE = 'ContentManagement';\n\n/** Resolved entity name for the text-template data selector. */\nconst TEXT_TEMPLATE_ENTITY_NAME = 'TextTemplate';\n\n/** List filter: only templates with a non-empty `channels.email.body` (excludes SMS-only rows). */\nconst TEXT_TEMPLATE_LIST_EMAIL_BODY_FILTER = {\n field: 'channels.email.body',\n operator: { type: 'isNotEmpty' },\n} as unknown as AXDataSourceFilterOption;\n\n//#endregion\n\n//#region ---- Service ----\n\n/**\n * Opens the send-email dialog built with the layout dialog builder and delegates send to\n * {@link COMMUNICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY}.\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class AXMCommunicationEmailComposerService {\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly translationService = inject(AXTranslationService);\n private readonly commandService = inject(AXPCommandService);\n private readonly entityDataSelector = inject(AXPEntityDataSelectorService);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n\n /**\n * Shows the compose dialog; on submit runs the send command with the dialog context.\n * When {@link CommunicationManagementEmailShowDialogInput.textTemplateId} is not set, the standard\n * entity data selector ({@link AXPEntityDataSelectorService}) runs first; the compose dialog has no template field.\n */\n async openSendEmailDialog(\n input: CommunicationManagementEmailShowDialogInput,\n ): AXPCommandExecuteResultPromise<CommunicationManagementEmailSendResult | null> {\n const data = parseDataRecord(input.data);\n let textTemplateId = input.textTemplateId?.trim() ?? '';\n\n if (!textTemplateId) {\n const picked = await this.openTextTemplatePickerDialog();\n if (picked === null) {\n return { success: false };\n }\n textTemplateId = picked;\n }\n\n let subject = input.subject ?? '';\n let body = input.body ?? '';\n\n if (textTemplateId) {\n const rendered = await this.commandService.execute<\n { textTemplateId: string; channel: string; data: Record<string, unknown>; locale?: string },\n { subject?: string; body: string }\n >(AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY, {\n textTemplateId,\n channel: 'email',\n data,\n locale: this.translationService.getActiveLang() ?? 'en-US',\n });\n const __single_rendered = runtimeCommandPayloadData(rendered);\n if (__single_rendered) {\n subject = __single_rendered.subject ?? subject;\n body = __single_rendered.body ?? body;\n }\n }\n\n const defaultTitle = await this.translationService.translateAsync(\n '@communication-management:email.dialog.title',\n );\n const title = input.dialogTitle?.trim()\n ? await this.translationService.translateAsync(input.dialogTitle)\n : defaultTitle;\n\n try {\n const result = await this.layoutBuilder\n .create()\n .dialog<AXPRuntimeCommandResult<CommunicationManagementEmailSendResult | null>>((dialog) => {\n dialog\n .setTitle(title)\n .setSize('lg')\n .setCloseButton(true)\n .setContext({\n to: input.to ?? '',\n cc: input.cc ?? '',\n bcc: input.bcc ?? '',\n subject,\n body,\n textTemplateId,\n })\n .content((flex) => {\n flex\n .setDirection('column')\n .setGap('16px')\n .formField('@communication-management:email.dialog.fields.to.title', (field) => {\n field.path('to');\n field.textBox({\n validations: [{ rule: 'required' }],\n placeholder: '@communication-management:email.dialog.fields.to.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.cc.title', (field) => {\n field.path('cc');\n field.textBox({\n placeholder: '@communication-management:email.dialog.fields.cc.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.bcc.title', (field) => {\n field.path('bcc');\n field.textBox({\n placeholder: '@communication-management:email.dialog.fields.bcc.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.subject.title', (field) => {\n field.path('subject');\n field.textBox({\n validations: [{ rule: 'required' }],\n placeholder: '@communication-management:email.dialog.fields.subject.placeholder',\n });\n })\n .formField('@communication-management:email.dialog.fields.body.title', (field) => {\n field.path('body');\n field.richText({\n validations: [{ rule: 'required' }],\n placeholder: '@communication-management:email.dialog.fields.body.placeholder',\n });\n });\n })\n .setActions((actions) => {\n actions.cancel('@general:actions.cancel.title').submit('@general:actions.send.title');\n })\n .onAction(async (dialogRef) => {\n const context = dialogRef.context() as Record<string, unknown> | null;\n const action = dialogRef.action();\n if (!context || action === 'cancel') {\n return { success: false };\n }\n const to = String(context['to'] ?? '').trim();\n const subjectOut = String(context['subject'] ?? '').trim();\n const bodyOut = String(context['body'] ?? '');\n if (!to || !subjectOut || isEffectivelyEmptyRichTextBody(bodyOut)) {\n return {\n success: false,\n message: {\n text: await this.translationService.translateAsync(\n '@communication-management:email.dialog.messages.required-fields',\n ),\n },\n data: null,\n };\n }\n const sendInput: CommunicationManagementEmailSendInput = {\n to,\n cc: String(context['cc'] ?? '').trim() || undefined,\n bcc: String(context['bcc'] ?? '').trim() || undefined,\n subject: subjectOut,\n body: bodyOut.trim(),\n textTemplateId: normalizeTextTemplateId(context['textTemplateId']),\n };\n const sendResult = await this.commandService.execute<\n CommunicationManagementEmailSendInput,\n CommunicationManagementEmailSendResult\n >(COMMUNICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY, sendInput);\n return (\n sendResult ?? {\n success: false,\n message: { text: 'Send command did not return a result.' },\n data: null,\n }\n );\n });\n })\n .show();\n\n return result;\n } catch (e) {\n return {\n success: false,\n message: {\n text: e instanceof Error ? e.message : 'Failed to open send email dialog.',\n },\n };\n }\n }\n\n /**\n * Opens {@link AXPEntityDataSelectorService} for `ContentManagement.TextTemplate`. Returns `null` if\n * the selector is dismissed without applying, `''` if the user applies with no row selected (compose\n * without a template), or the selected template id.\n */\n private async openTextTemplatePickerDialog(): Promise<string | null> {\n const entity = await this.entityRegistry.resolve(TEXT_TEMPLATE_ENTITY_MODULE, TEXT_TEMPLATE_ENTITY_NAME);\n if (!entity) {\n return null;\n }\n\n const title = await this.translationService.translateAsync(\n '@communication-management:email.template-picker.title',\n );\n\n try {\n const result = await this.entityDataSelector.open({\n entity,\n title,\n allowMultiple: false,\n allowCreate: 'none',\n filters: TEXT_TEMPLATE_LIST_EMAIL_BODY_FILTER,\n columns: ['title', 'name'],\n searchFields: ['title', 'name'],\n });\n if (result == null) {\n return null;\n }\n const items = result.items ?? [];\n if (items.length === 0) {\n return '';\n }\n const rawId = (items[0] as Record<string, unknown>)['id'];\n if (rawId != null && String(rawId).trim() !== '') {\n return String(rawId).trim();\n }\n return '';\n } catch {\n return null;\n }\n }\n}\n\n//#endregion\n","//#region ---- Imports ----\n\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { Injectable, inject } from '@angular/core';\nimport type {\n CommunicationManagementEmailSendResult,\n CommunicationManagementEmailShowDialogInput,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { AXMCommunicationEmailComposerService } from './communication-email-composer.service';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CommunicationManagementEmailShowDialogCommand\n implements AXPCommand<CommunicationManagementEmailShowDialogInput, CommunicationManagementEmailSendResult | null>\n{\n private readonly composer = inject(AXMCommunicationEmailComposerService);\n\n async execute(\n input: CommunicationManagementEmailShowDialogInput | unknown,\n ): AXPCommandExecuteResultPromise<CommunicationManagementEmailSendResult | null> {\n const raw = input as { options?: CommunicationManagementEmailShowDialogInput } & Record<string, unknown>;\n const evaluated: CommunicationManagementEmailShowDialogInput = {\n ...(raw.options ?? {}),\n ...(raw as CommunicationManagementEmailShowDialogInput),\n };\n\n return this.composer.openSendEmailDialog(evaluated);\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAkBA;AAEA;AAEA,SAAS,uBAAuB,CAAC,KAAc,EAAA;AAC7C,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,QAAA,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE;QACtB,OAAO,CAAC,IAAI,SAAS;IACvB;AACA,IAAA,IAAI,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,IAAI,IAAI,KAAK,EAAE;AAC/D,QAAA,MAAM,EAAE,GAAI,KAAyB,CAAC,EAAE;QACxC,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,EAAE;AAAE,YAAA,OAAO,EAAE,CAAC,IAAI,EAAE;IAC3D;AACA,IAAA,OAAO,SAAS;AAClB;AAEA,SAAS,eAAe,CAAC,KAAc,EAAA;IACrC,IAAI,KAAK,IAAI,IAAI;AAAE,QAAA,OAAO,EAAE;AAC5B,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KA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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-G4wzzccx.mjs';
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-CZh_tBTN.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", "size", "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", "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 }); }
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-BjJjqWja.mjs.map
514
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-D4o0Bhce.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-communication-management-client-communication-in-app-inbox-page.component-BjJjqWja.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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ox-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,QAA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AA,MAAA,EAAA,IAAA,EAAAA,IAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGjB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBA5BnD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,qCAAqC,EAAA,eAAA,EAG9B,uBAAuB,CAAC,MAAM,aACpC,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAA,uCAAyC,EAAE,CAAC,EAAA,IAAA,EAC3F;AACJ,wBAAA,KAAK,EAAE,qCAAqC;AAC5C,wBAAA,2BAA2B,EAAE,eAAe;qBAC7C,EAAA,OAAA,EACQ;wBACP,YAAY;wBACZ,cAAc;wBACd,iBAAiB;wBACjB,gBAAgB;wBAChB,mBAAmB;wBACnB,gBAAgB;wBAChB,aAAa;wBACb,mBAAmB;wBACnB,iBAAiB;wBACjB,sBAAsB;wBACtB,sBAAsB;wBACtB,4BAA4B;wBAC5B,wBAAwB;wBACxB,wBAAwB;wBACxB,0BAA0B;AAC3B,qBAAA,EAAA,QAAA,EAAA,0sNAAA,EAAA,MAAA,EAAA,CAAA,+6GAAA,CAAA,EAAA;yEAwByD,aAAa,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
@@ -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-G4wzzccx.mjs';
4
+ import { d as AXPCommunicationManagementClient, e as AXPInAppInboxRealtimeService } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-CZh_tBTN.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-NEXrsogP.mjs.map
86
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-communication-send.command-BH9jjHfA.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-communication-management-client-communication-send.command-NEXrsogP.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,SA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AAK,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;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-send.command-BH9jjHfA.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,IA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AAE,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;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/commands/communication-show-sent-message.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n resolveCommunicationMessage,\n RootConfig,\n type AXMCommunicationModel,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Types -----\n\ntype ShowSentMessageInput = {\n communicationId?: string;\n id?: string;\n data?: Record<string, unknown>;\n options?: { communicationId?: string };\n};\n\n//#endregion\n\n//#region ----- Command -----\n\n/** Opens a read-only dialog previewing the communication body from a Communications list row. */\n@Injectable({ providedIn: 'root' })\nexport class CommunicationShowSentMessageCommand implements AXPCommand {\n //#region ----- Services & Dependencies -----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n\n //#endregion\n\n //#region ----- Command -----\n\n async execute(input: ShowSentMessageInput | unknown): AXPCommandExecuteResultPromise<void> {\n const communication = await this.resolveCommunication(input);\n if (!communication) {\n const message = await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.messages.not-found',\n );\n this.toastService.show({\n color: 'warning',\n title: await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.messages.error-title',\n ),\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n\n const resolved = resolveCommunicationMessage(communication as unknown as Record<string, unknown>);\n const title =\n (typeof communication.title === 'string' && communication.title.trim()) ||\n resolved.subject ||\n (await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.dialog.title',\n ));\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle(title)\n .setSize('lg')\n .setCloseButton(true)\n .content((flex) => {\n flex.mode('view').setDirection('column').setGap('16px').customWidget('text-block-layout', {\n content: resolved.body || '',\n });\n });\n })\n .show();\n\n // Read-only preview: Close / X must not reload the Communications list.\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private async resolveCommunication(input: unknown): Promise<AXMCommunicationModel | null> {\n const raw = (input ?? {}) as ShowSentMessageInput;\n const data =\n raw.data != null &&\n typeof raw.data === 'object' &&\n !Array.isArray(raw.data)\n ? (raw.data as Record<string, unknown>)\n : null;\n\n const communicationId = this.resolveCommunicationId(raw, data);\n if (communicationId) {\n const communicationData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.communication.name)\n .data<string, AXMCommunicationModel>();\n const loaded = await communicationData.byKey(communicationId);\n if (loaded) {\n return loaded;\n }\n }\n\n // List rows include title but not message.body — only reuse the row when a body is present.\n if (data && this.hasPreviewableBody(data)) {\n return data as unknown as AXMCommunicationModel;\n }\n\n return null;\n }\n\n private hasPreviewableBody(data: Record<string, unknown>): boolean {\n const message = data['message'];\n if (message != null && typeof message === 'object' && !Array.isArray(message)) {\n const body = (message as Record<string, unknown>)['body'];\n return typeof body === 'string' && body.trim().length > 0;\n }\n return typeof data['body'] === 'string' && data['body'].trim().length > 0;\n }\n\n private resolveCommunicationId(\n raw: ShowSentMessageInput,\n data: Record<string, unknown> | null,\n ): string {\n const candidates = [\n raw.options?.communicationId,\n raw.communicationId,\n raw.id,\n data?.['id'],\n data?.['communicationId'],\n ];\n\n for (const candidate of candidates) {\n if (typeof candidate === 'string' && candidate.trim()) {\n return candidate.trim();\n }\n }\n\n return '';\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAAA;AAyBA;AAEA;AAEA;MAEa,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AAuHvD,IAAA;;;IAjHC,MAAM,OAAO,CAAC,KAAqC,EAAA;QACjD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;QAC5D,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,qFAAqF,CACtF;AACD,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;AACrB,gBAAA,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CACjD,uFAAuF,CACxF;AACD,gBAAA,OAAO,EAAE,OAAO;AAChB,gBAAA,WAAW,EAAE,IAAI;AACjB,gBAAA,OAAO,EAAE,IAAI;AACd,aAAA,CAAC;AACF,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;QACvD;AAEA,QAAA,MAAM,QAAQ,GAAG,2BAA2B,CAAC,aAAmD,CA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AC;SAC1B;AAED,QAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,EAAE;AACrD,gBAAA,OAAO,SAAS,CAAC,IAAI,EAAE;YACzB;QACF;AAEA,QAAA,OAAO,EAAE;IACX;8GA1HW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-communication-management-client-communication-show-sent-message.command-D9KRxkdp.mjs","sources":["../../../../libs/modules/communication-management/client/src/lib/commands/communication-show-sent-message.command.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n resolveCommunicationMessage,\n RootConfig,\n type AXMCommunicationModel,\n} from '@acorex-platform/module-communication-management-client/contracts';\nimport { inject, Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Types -----\n\ntype ShowSentMessageInput = {\n communicationId?: string;\n id?: string;\n data?: Record<string, unknown>;\n options?: { communicationId?: string };\n};\n\n//#endregion\n\n//#region ----- Command -----\n\n/** Opens a read-only dialog previewing the communication body from a Communications list row. */\n@Injectable({ providedIn: 'root' })\nexport class CommunicationShowSentMessageCommand implements AXPCommand {\n //#region ----- Services & Dependencies -----\n\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n\n //#endregion\n\n //#region ----- Command -----\n\n async execute(input: ShowSentMessageInput | unknown): AXPCommandExecuteResultPromise<void> {\n const communication = await this.resolveCommunication(input);\n if (!communication) {\n const message = await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.messages.not-found',\n );\n this.toastService.show({\n color: 'warning',\n title: await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.messages.error-title',\n ),\n content: message,\n closeButton: true,\n timeOut: 5000,\n });\n return { success: false, message: { text: message } };\n }\n\n const resolved = resolveCommunicationMessage(communication as unknown as Record<string, unknown>);\n const title =\n (typeof communication.title === 'string' && communication.title.trim()) ||\n resolved.subject ||\n (await this.translationService.translateAsync(\n '@communication-management:entities.communication.actions.preview.dialog.title',\n ));\n\n await this.layoutBuilder\n .create()\n .dialog((dialog) => {\n dialog\n .setTitle(title)\n .setSize('lg')\n .setCloseButton(true)\n .content((flex) => {\n flex.mode('view').setDirection('column').setGap('16px').customWidget('text-block-layout', {\n content: resolved.body || '',\n });\n });\n })\n .show();\n\n // Read-only preview: Close / X must not reload the Communications list.\n return {\n success: true,\n kind: 'object',\n data: undefined,\n metadata: { refresh: false },\n };\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private async resolveCommunication(input: unknown): Promise<AXMCommunicationModel | null> {\n const raw = (input ?? {}) as ShowSentMessageInput;\n const data =\n raw.data != null &&\n typeof raw.data === 'object' &&\n !Array.isArray(raw.data)\n ? (raw.data as Record<string, unknown>)\n : null;\n\n const communicationId = this.resolveCommunicationId(raw, data);\n if (communicationId) {\n const communicationData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.communication.name)\n .data<string, AXMCommunicationModel>();\n const loaded = await communicationData.byKey(communicationId);\n if (loaded) {\n return loaded;\n }\n }\n\n // List rows include title but not message.body — only reuse the row when a body is present.\n if (data && this.hasPreviewableBody(data)) {\n return data as unknown as AXMCommunicationModel;\n }\n\n return null;\n }\n\n private hasPreviewableBody(data: Record<string, unknown>): boolean {\n const message = data['message'];\n if (message != null && typeof message === 'object' && !Array.isArray(message)) {\n const body = (message as Record<string, unknown>)['body'];\n return typeof body === 'string' && body.trim().length > 0;\n }\n return typeof data['body'] === 'string' && data['body'].trim().length > 0;\n }\n\n private resolveCommunicationId(\n raw: ShowSentMessageInput,\n data: Record<string, unknown> | null,\n ): string {\n const candidates = [\n raw.options?.communicationId,\n raw.communicationId,\n raw.id,\n data?.['id'],\n data?.['communicationId'],\n ];\n\n for (const candidate of candidates) {\n if (typeof candidate === 'string' && candidate.trim()) {\n return candidate.trim();\n }\n }\n\n return '';\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;AAAA;AAyBA;AAEA;AAEA;MAEa,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,uBAAuB,CAAC;AAC/C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AAuHvD,IAAA;;;IAjHC,MAAM,OAAO,CAAC,KAAqC,EAAA;QACjD,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;QAC5D,IAAI,CAAC,aAAa,EAAE;YAClB,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,qFAAqF,CACtF;AACD,YAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC;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AACA,QAAA,OAAO,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;IAC3E;IAEQ,sBAAsB,CAC5B,GAAyB,EACzB,IAAoC,EAAA;AAEpC,QAAA,MAAM,UAAU,GAAG;YACjB,GAAG,CAAC,OAAO,EAAE,eAAe;AAC5B,YAAA,GAAG,CAAC,eAAe;AACnB,YAAA,GAAG,CAAC,EAAE;YACN,IAAI,GAAG,IAAI,CAAC;YACZ,IAAI,GAAG,iBAAiB,CAAC;SAC1B;AAED,QAAA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAClC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,EAAE,EAAE;AACrD,gBAAA,OAAO,SAAS,CAAC,IAAI,EAAE;YACzB;QACF;AAEA,QAAA,OAAO,EAAE;IACX;8GA1HW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;"}
@@ -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-G4wzzccx.mjs';
10
+ import { d as AXPCommunicationManagementClient } from './acorex-platform-module-communication-management-client-acorex-platform-module-communication-management-client-CZh_tBTN.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-Cp5fHOh4.mjs.map
155
+ //# sourceMappingURL=acorex-platform-module-communication-management-client-communication-test-smtp.command-BMsTVFBN.mjs.map