@acorex/modules 21.0.0-next.89 → 21.0.0-next.90

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 (91) hide show
  1. package/fesm2022/acorex-modules-common.mjs +9 -9
  2. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  3. package/fesm2022/{acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs → acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs} +364 -237
  4. package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs.map +1 -0
  5. package/fesm2022/{acorex-modules-conversation-after-message-sent.command-DcrS7_vV.mjs → acorex-modules-conversation-after-message-sent.command-DxDe6o9N.mjs} +2 -2
  6. package/fesm2022/{acorex-modules-conversation-after-message-sent.command-DcrS7_vV.mjs.map → acorex-modules-conversation-after-message-sent.command-DxDe6o9N.mjs.map} +1 -1
  7. package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BCkJEAmX.mjs → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Dyx_n0bi.mjs} +3 -3
  8. package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BCkJEAmX.mjs.map → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Dyx_n0bi.mjs.map} +1 -1
  9. package/fesm2022/{acorex-modules-conversation-comments-page.component-B6TJhe4T.mjs → acorex-modules-conversation-comments-page.component--g4ugC_L.mjs} +2 -2
  10. package/fesm2022/{acorex-modules-conversation-comments-page.component-B6TJhe4T.mjs.map → acorex-modules-conversation-comments-page.component--g4ugC_L.mjs.map} +1 -1
  11. package/fesm2022/{acorex-modules-conversation-emit-typing-indicator.command-CWRdPl-S.mjs → acorex-modules-conversation-emit-typing-indicator.command-BOldPLQ0.mjs} +2 -2
  12. package/fesm2022/{acorex-modules-conversation-emit-typing-indicator.command-CWRdPl-S.mjs.map → acorex-modules-conversation-emit-typing-indicator.command-BOldPLQ0.mjs.map} +1 -1
  13. package/fesm2022/{acorex-modules-conversation-mark-conversation-unread.command-CZlsLAsb.mjs → acorex-modules-conversation-mark-conversation-unread.command-O_zPrBQ0.mjs} +2 -2
  14. package/fesm2022/{acorex-modules-conversation-mark-conversation-unread.command-CZlsLAsb.mjs.map → acorex-modules-conversation-mark-conversation-unread.command-O_zPrBQ0.mjs.map} +1 -1
  15. package/fesm2022/{acorex-modules-conversation-retry-assist-response.command-Cly1-RKt.mjs → acorex-modules-conversation-retry-assist-response.command-DsB-CP3R.mjs} +2 -2
  16. package/fesm2022/{acorex-modules-conversation-retry-assist-response.command-Cly1-RKt.mjs.map → acorex-modules-conversation-retry-assist-response.command-DsB-CP3R.mjs.map} +1 -1
  17. package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs → acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs} +2 -2
  18. package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs.map → acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs.map} +1 -1
  19. package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs → acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs} +2 -2
  20. package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs.map → acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs.map} +1 -1
  21. package/fesm2022/{acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs → acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs} +2 -2
  22. package/fesm2022/{acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs.map → acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs.map} +1 -1
  23. package/fesm2022/acorex-modules-conversation.mjs +1 -1
  24. package/fesm2022/{acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs → acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs} +94 -41
  25. package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs.map +1 -0
  26. package/fesm2022/{acorex-modules-dashboard-management-index-gjCiELmH.mjs → acorex-modules-dashboard-management-index-rp9dgARq.mjs} +2 -2
  27. package/fesm2022/{acorex-modules-dashboard-management-index-gjCiELmH.mjs.map → acorex-modules-dashboard-management-index-rp9dgARq.mjs.map} +1 -1
  28. package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
  29. package/fesm2022/{acorex-modules-document-management-drive-choose.component-DyJoXajP.mjs → acorex-modules-document-management-drive-choose.component-Dx1slMSA.mjs} +3 -3
  30. package/fesm2022/{acorex-modules-document-management-drive-choose.component-DyJoXajP.mjs.map → acorex-modules-document-management-drive-choose.component-Dx1slMSA.mjs.map} +1 -1
  31. package/fesm2022/acorex-modules-document-management.mjs +268 -351
  32. package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
  33. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-VJ2NUSm1.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-BZwLfZkb.mjs} +42 -21
  34. package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-BZwLfZkb.mjs.map +1 -0
  35. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-FgXkyZR_.mjs → acorex-modules-human-capital-management-approve-leave-request.command-B_EBDijL.mjs} +2 -2
  36. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-FgXkyZR_.mjs.map → acorex-modules-human-capital-management-approve-leave-request.command-B_EBDijL.mjs.map} +1 -1
  37. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-D2yCvifI.mjs → acorex-modules-human-capital-management-assign-position-assignment.command-ZzWBeTv1.mjs} +2 -2
  38. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-D2yCvifI.mjs.map → acorex-modules-human-capital-management-assign-position-assignment.command-ZzWBeTv1.mjs.map} +1 -1
  39. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-DnmsVNwU.mjs → acorex-modules-human-capital-management-cancel-leave-request.command-Bd3RvlNm.mjs} +2 -2
  40. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-DnmsVNwU.mjs.map → acorex-modules-human-capital-management-cancel-leave-request.command-Bd3RvlNm.mjs.map} +1 -1
  41. package/fesm2022/{acorex-modules-human-capital-management-edit-personal-info.command-B0ZUfbqn.mjs → acorex-modules-human-capital-management-edit-personal-info.command-Drbi1WMd.mjs} +2 -2
  42. package/fesm2022/{acorex-modules-human-capital-management-edit-personal-info.command-B0ZUfbqn.mjs.map → acorex-modules-human-capital-management-edit-personal-info.command-Drbi1WMd.mjs.map} +1 -1
  43. package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-h2kTqSg0.mjs → acorex-modules-human-capital-management-edit-signature.command-CRPqnXIj.mjs} +2 -2
  44. package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-h2kTqSg0.mjs.map → acorex-modules-human-capital-management-edit-signature.command-CRPqnXIj.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-BdrdgvbN.mjs → acorex-modules-human-capital-management-reject-leave-request.command-BC-1Kixd.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-BdrdgvbN.mjs.map → acorex-modules-human-capital-management-reject-leave-request.command-BC-1Kixd.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-S7Px6Y4B.mjs → acorex-modules-human-capital-management-revoke-position-assignment.command-Caylq9Rv.mjs} +2 -2
  48. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-S7Px6Y4B.mjs.map → acorex-modules-human-capital-management-revoke-position-assignment.command-Caylq9Rv.mjs.map} +1 -1
  49. package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-C_tE-D_Y.mjs → acorex-modules-human-capital-management-start-leave-request-flow.command-BsEwA1VM.mjs} +2 -2
  50. package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-C_tE-D_Y.mjs.map → acorex-modules-human-capital-management-start-leave-request-flow.command-BsEwA1VM.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-mMP3Yy01.mjs → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B8xK2iTn.mjs} +2 -2
  52. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-mMP3Yy01.mjs.map → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B8xK2iTn.mjs.map} +1 -1
  53. package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
  54. package/fesm2022/acorex-modules-platform-dev-tools.mjs +2 -2
  55. package/fesm2022/acorex-modules-platform-dev-tools.mjs.map +1 -1
  56. package/fesm2022/acorex-modules-project-management.mjs +707 -424
  57. package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
  58. package/fesm2022/acorex-modules-report-management.mjs +1 -1
  59. package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
  60. package/fesm2022/acorex-modules-task-management-start-task-flow.command-HYdQOWDe.mjs +115 -0
  61. package/fesm2022/acorex-modules-task-management-start-task-flow.command-HYdQOWDe.mjs.map +1 -0
  62. package/fesm2022/{acorex-modules-task-management-task-board.page-DTWxd_vG.mjs → acorex-modules-task-management-task-board.page-BMTjJlry.mjs} +3 -3
  63. package/fesm2022/{acorex-modules-task-management-task-board.page-DTWxd_vG.mjs.map → acorex-modules-task-management-task-board.page-BMTjJlry.mjs.map} +1 -1
  64. package/fesm2022/acorex-modules-task-management.mjs +433 -460
  65. package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
  66. package/fesm2022/{acorex-modules-timesheet-management-report-hours-by-project.query-z38wZLKJ.mjs → acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs} +2 -2
  67. package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-CGc1Q6aB.mjs.map +1 -0
  68. package/fesm2022/{acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-BDfvz6fH.mjs → acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs} +2 -2
  69. package/fesm2022/{acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-BDfvz6fH.mjs.map → acorex-modules-timesheet-management-resolve-work-item-from-jira-issue.command-AIcAUd3s.mjs.map} +1 -1
  70. package/fesm2022/acorex-modules-timesheet-management.mjs +8 -8
  71. package/fesm2022/acorex-modules-timesheet-management.mjs.map +1 -1
  72. package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-edit.component-CFF7X1MO.mjs +70 -0
  73. package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-edit.component-CFF7X1MO.mjs.map +1 -0
  74. package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-view.component-DwC2aHVt.mjs +70 -0
  75. package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram-widget-view.component-DwC2aHVt.mjs.map +1 -0
  76. package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram.types-DmzV305e.mjs +195 -0
  77. package/fesm2022/acorex-modules-workplacesafety-management-control-hierarchy-diagram.types-DmzV305e.mjs.map +1 -0
  78. package/fesm2022/acorex-modules-workplacesafety-management.mjs +139 -16
  79. package/fesm2022/acorex-modules-workplacesafety-management.mjs.map +1 -1
  80. package/package.json +2 -2
  81. package/types/acorex-modules-dashboard-management.d.ts +30 -11
  82. package/types/acorex-modules-document-management.d.ts +21 -5
  83. package/types/acorex-modules-human-capital-management.d.ts +4 -0
  84. package/types/acorex-modules-project-management.d.ts +46 -23
  85. package/types/acorex-modules-task-management.d.ts +80 -11
  86. package/types/acorex-modules-timesheet-management.d.ts +2 -2
  87. package/types/acorex-modules-workplacesafety-management.d.ts +7 -2
  88. package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs.map +0 -1
  89. package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs.map +0 -1
  90. package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-VJ2NUSm1.mjs.map +0 -1
  91. package/fesm2022/acorex-modules-timesheet-management-report-hours-by-project.query-z38wZLKJ.mjs.map +0 -1
@@ -5,7 +5,7 @@ import * as i0 from '@angular/core';
5
5
  import { inject, Injectable } from '@angular/core';
6
6
  import { Router } from '@angular/router';
7
7
  import { AXPSessionService } from '@acorex/platform/auth';
8
- import { A as AXMChatAssistLauncherService, a as AXMEntityChatService, C as CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND } from './acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs';
8
+ import { A as AXMChatAssistLauncherService, a as AXMEntityChatService, C as CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND } from './acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs';
9
9
 
10
10
  //#region ---- Imports ----
11
11
  //#endregion
@@ -97,4 +97,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
97
97
  }] });
98
98
 
99
99
  export { AXMConversationSendAssistChatMessageCommand };
100
- //# sourceMappingURL=acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs.map
100
+ //# sourceMappingURL=acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs","sources":["../../../../libs/modules/conversation/src/lib/features/commands/send-assist-chat-message.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXConversationService, type AXMessagePayload } from '@acorex/components/conversation2';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXMChatAssistLauncherService } from '../chat/services/assist-chat-launcher.service';\nimport { AXMEntityChatService } from '../mini-chat/entity-chat.service';\nimport { CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND } from './conversation-command.keys';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMSendAssistChatMessageOptions {\n text: string;\n conversationId?: string;\n assistId?: string;\n targetId?: string;\n navigate?: boolean;\n /** When provided (with {@link entityType}), a new chat is created as an entity-scoped conversation. */\n entityId?: string;\n entityType?: string;\n}\n\nexport interface AXMSendAssistChatMessageResult {\n conversationId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationSendAssistChatMessageCommand\n implements AXPCommand<AXMSendAssistChatMessageOptions, AXMSendAssistChatMessageResult>\n{\n private readonly conversationService = inject(AXConversationService);\n private readonly launcher = inject(AXMChatAssistLauncherService);\n private readonly entityChatService = inject(AXMEntityChatService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly router = inject(Router);\n private readonly sessionService = inject(AXPSessionService);\n\n async execute(\n input: AXMSendAssistChatMessageOptions | unknown,\n ): Promise<AXPExecuteCommandResult<AXMSendAssistChatMessageResult>> {\n const raw = input as { __context__?: { options?: Partial<AXMSendAssistChatMessageOptions> } } & Record<\n string,\n unknown\n >;\n const { __context__: _workflowContext, ...rest } = raw;\n const options: Partial<AXMSendAssistChatMessageOptions> = {\n ...(_workflowContext?.options ?? {}),\n ...(rest as unknown as Partial<AXMSendAssistChatMessageOptions>),\n };\n\n const text = (typeof options.text === 'string' ? options.text : '').trim();\n if (!text) {\n return {\n success: false,\n message: { text: 'text is required for Conversation:SendAssistChatMessage.' },\n };\n }\n\n let conversationId =\n (typeof options.conversationId === 'string' ? options.conversationId.trim() : '') ||\n this.conversationService.activeConversationId()?.trim() ||\n '';\n\n try {\n if (!conversationId) {\n const assistId =\n (typeof options.assistId === 'string' ? options.assistId.trim() : '') ||\n (typeof options.targetId === 'string' ? options.targetId.trim() : '');\n if (!assistId) {\n return {\n success: false,\n message: {\n text: 'conversationId or assistId is required for Conversation:SendAssistChatMessage.',\n },\n };\n }\n\n const entityId = typeof options.entityId === 'string' ? options.entityId.trim() : '';\n const entityType = typeof options.entityType === 'string' ? options.entityType.trim() : '';\n\n if (entityId && entityType) {\n // Mini chat: keep the chip-created conversation bound to its entity.\n const conversation = await this.entityChatService.createEntityChat({ entityId, entityType }, assistId);\n conversationId = conversation.id;\n } else {\n const started = await this.launcher.startAssistChat({\n targetId: assistId,\n navigate: false,\n });\n if (!started?.conversation.id) {\n return { success: false };\n }\n conversationId = started.conversation.id;\n }\n }\n\n const payload: AXMessagePayload = { type: 'text', text };\n await this.conversationService.sendMessage({\n conversationId,\n type: 'text',\n payload,\n });\n\n if (options.navigate !== false) {\n await this.router.navigate([this.#applicationRouteSegment(), 'chat', conversationId]);\n }\n\n return { success: true, data: { conversationId } };\n } catch (error: unknown) {\n console.error(`[${CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND}] Failed:`, error);\n const message = await this.translationService.translateAsync(\n '@conversation:chat.starter-prompts.errors.send',\n );\n this.toastService.danger(message);\n return { success: false };\n }\n }\n\n #applicationRouteSegment(): string {\n return this.sessionService.application?.name ?? 'platform';\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAiCA;AAEA;MAGa,2CAA2C,CAAA;AADxD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACnD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAC/C,QAAA,IAAA,CAAA,iBAAiB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAChD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM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A,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;YACvF;YAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,EAAE;QACpD;QAAE,OAAO,KAAc,EAAE;YACvB,OAAO,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,6CAA6C,CAAA,SAAA,CAAW,EAAE,KAAK,CAAC;YAClF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,gDAAgD,CACjD;AACD,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC;AACjC,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;IACF;IAEA,wBAAwB,GAAA;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,IAAI,UAAU;IAC5D;8GA9FW,2CAA2C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3C,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,2CAA2C,cAD9B,MAAM,EAAA,CAAA,CAAA;;2FACnB,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBADvD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-modules-conversation-send-assist-chat-message.command-g_NgPuxP.mjs","sources":["../../../../libs/modules/conversation/src/lib/features/commands/send-assist-chat-message.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXConversationService, type AXMessagePayload } from '@acorex/components/conversation2';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXMChatAssistLauncherService } from '../chat/services/assist-chat-launcher.service';\nimport { AXMEntityChatService } from '../mini-chat/entity-chat.service';\nimport { CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND } from './conversation-command.keys';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMSendAssistChatMessageOptions {\n text: string;\n conversationId?: string;\n assistId?: string;\n targetId?: string;\n navigate?: boolean;\n /** When provided (with {@link entityType}), a new chat is created as an entity-scoped conversation. */\n entityId?: string;\n entityType?: string;\n}\n\nexport interface AXMSendAssistChatMessageResult {\n conversationId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationSendAssistChatMessageCommand\n implements AXPCommand<AXMSendAssistChatMessageOptions, AXMSendAssistChatMessageResult>\n{\n private readonly conversationService = inject(AXConversationService);\n private readonly launcher = inject(AXMChatAssistLauncherService);\n private readonly entityChatService = inject(AXMEntityChatService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly router = inject(Router);\n private readonly sessionService = inject(AXPSessionService);\n\n async execute(\n input: AXMSendAssistChatMessageOptions | unknown,\n ): Promise<AXPExecuteCommandResult<AXMSendAssistChatMessageResult>> {\n const raw = input as { __context__?: { options?: Partial<AXMSendAssistChatMessageOptions> } } & Record<\n string,\n unknown\n >;\n const { __context__: _workflowContext, ...rest } = raw;\n const options: Partial<AXMSendAssistChatMessageOptions> = {\n ...(_workflowContext?.options ?? {}),\n ...(rest as unknown as Partial<AXMSendAssistChatMessageOptions>),\n };\n\n const text = (typeof options.text === 'string' ? options.text : '').trim();\n if (!text) {\n return {\n success: false,\n message: { text: 'text is required for Conversation:SendAssistChatMessage.' },\n };\n }\n\n let conversationId =\n (typeof options.conversationId === 'string' ? options.conversationId.trim() : '') ||\n this.conversationService.activeConversationId()?.trim() ||\n '';\n\n try {\n if (!conversationId) {\n const assistId =\n (typeof options.assistId === 'string' ? options.assistId.trim() : '') ||\n (typeof options.targetId === 'string' ? options.targetId.trim() : '');\n if (!assistId) {\n return {\n success: false,\n message: {\n text: 'conversationId or assistId is required for Conversation:SendAssistChatMessage.',\n },\n };\n }\n\n const entityId = typeof options.entityId === 'string' ? options.entityId.trim() : '';\n const entityType = typeof options.entityType === 'string' ? options.entityType.trim() : '';\n\n if (entityId && entityType) {\n // Mini chat: keep the chip-created conversation bound to its entity.\n const conversation = await this.entityChatService.createEntityChat({ entityId, entityType }, assistId);\n conversationId = conversation.id;\n } else {\n const started = await this.launcher.startAssistChat({\n targetId: assistId,\n navigate: false,\n });\n if (!started?.conversation.id) {\n return { success: false };\n }\n conversationId = started.conversation.id;\n }\n }\n\n const payload: AXMessagePayload = { type: 'text', text };\n await this.conversationService.sendMessage({\n conversationId,\n type: 'text',\n payload,\n });\n\n if (options.navigate !== false) {\n await this.router.navigate([this.#applicationRouteSegment(), 'chat', conversationId]);\n }\n\n return { success: true, data: { conversationId } };\n } catch (error: unknown) {\n console.error(`[${CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND}] Failed:`, error);\n const message = await this.translationService.translateAsync(\n '@conversation:chat.starter-prompts.errors.send',\n );\n this.toastService.danger(message);\n return { success: false };\n }\n }\n\n #applicationRouteSegment(): string {\n return this.sessionService.application?.name ?? 'platform';\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAiCA;AAEA;MAGa,2CAA2C,CAAA;AADxD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACnD,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAC/C,QAAA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gBACZ,OAAO;AACR,aAAA,CAAC;AAEF,YAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,KAAK,EAAE;AAC9B,gBAAA,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;YACvF;YAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,EAAE;QACpD;QAAE,OAAO,KAAc,EAAE;YACvB,OAAO,CAAC,KAAK,CAAC,CAAA,CAAA,EAAI,6CAA6C,CAAA,SAAA,CAAW,EAAE,KAAK,CAAC;YAClF,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,gDAAgD,CACjD;AACD,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC;AACjC,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;IACF;IAEA,wBAAwB,GAAA;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,IAAI,IAAI,UAAU;IAC5D;8GA9FW,2CAA2C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAA3C,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,2CAA2C,cAD9B,MAAM,EAAA,CAAA,CAAA;;2FACnB,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBADvD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable } from '@angular/core';
3
- import { A as AXMChatAssistLauncherService } from './acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs';
3
+ import { A as AXMChatAssistLauncherService } from './acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs';
4
4
 
5
5
  //#endregion
6
6
  //#region ---- Command ----
@@ -41,4 +41,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
41
41
  }] });
42
42
 
43
43
  export { AXMConversationStartAssistChatCommand };
44
- //# sourceMappingURL=acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs.map
44
+ //# sourceMappingURL=acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs","sources":["../../../../libs/modules/conversation/src/lib/features/commands/start-assist-chat.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { AXMChatAssistLauncherService } from '../chat/services/assist-chat-launcher.service';\nimport type { AXMStartAssistChatOptions, AXMStartAssistChatResult } from '../chat/services/assist-chat-launcher.types';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationStartAssistChatCommand\n implements AXPCommand<AXMStartAssistChatOptions, AXMStartAssistChatResult | null>\n{\n private readonly launcher = inject(AXMChatAssistLauncherService);\n\n async execute(\n input: AXMStartAssistChatOptions | unknown,\n ): Promise<AXPExecuteCommandResult<AXMStartAssistChatResult | null>> {\n const raw = input as { __context__?: { options?: Partial<AXMStartAssistChatOptions> } } & Record<\n string,\n unknown\n >;\n const { __context__: _workflowContext, ...rest } = raw;\n const options: Partial<AXMStartAssistChatOptions> = {\n ...(_workflowContext?.options ?? {}),\n ...(rest as unknown as Partial<AXMStartAssistChatOptions>),\n };\n\n const targetId =\n (typeof options.targetId === 'string' ? options.targetId.trim() : '') ||\n (typeof options.assistId === 'string' ? options.assistId.trim() : '');\n if (!targetId) {\n return {\n success: false,\n message: { text: 'targetId is required for Conversation:StartAssistChat.' },\n };\n }\n\n const result = await this.launcher.startAssistChat({\n targetId,\n navigate: options.navigate,\n });\n\n if (!result) {\n return { success: false };\n }\n\n return { success: true, data: result };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAQA;AAEA;MAGa,qCAAqC,CAAA;AADlD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAoCjE,IAAA;IAlCC,MAAM,OAAO,CACX,KAA0C,EAAA;QAE1C,MAAM,GAAG,GAAG,KAGX;QACD,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG;AACtD,QAAA,MAAM,OAAO,GAAuC;AAClD,YAAA,IAAI,gBAAgB,EAAE,OAAO,IAAI,EAAE,CAAC;AACpC,YAAA,GAAI,IAAsD;SAC3D;QAED,MAAM,QAAQ,GACZ,CAAC,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE;aACnE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;QACvE,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,EAAE,IAAI,EAAE,wDAAwD,EAAE;aAC5E;QACH;QAEA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;YACjD,QAAQ;YACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC3B,SAAA,CAAC;QAEF,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IACxC;8GAtCW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArC,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,qCAAqC,cADxB,MAAM,EAAA,CAAA,CAAA;;2FACnB,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-modules-conversation-start-assist-chat.command-DeMmJdd6.mjs","sources":["../../../../libs/modules/conversation/src/lib/features/commands/start-assist-chat.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { Injectable, inject } from '@angular/core';\nimport { AXMChatAssistLauncherService } from '../chat/services/assist-chat-launcher.service';\nimport type { AXMStartAssistChatOptions, AXMStartAssistChatResult } from '../chat/services/assist-chat-launcher.types';\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationStartAssistChatCommand\n implements AXPCommand<AXMStartAssistChatOptions, AXMStartAssistChatResult | null>\n{\n private readonly launcher = inject(AXMChatAssistLauncherService);\n\n async execute(\n input: AXMStartAssistChatOptions | unknown,\n ): Promise<AXPExecuteCommandResult<AXMStartAssistChatResult | null>> {\n const raw = input as { __context__?: { options?: Partial<AXMStartAssistChatOptions> } } & Record<\n string,\n unknown\n >;\n const { __context__: _workflowContext, ...rest } = raw;\n const options: Partial<AXMStartAssistChatOptions> = {\n ...(_workflowContext?.options ?? {}),\n ...(rest as unknown as Partial<AXMStartAssistChatOptions>),\n };\n\n const targetId =\n (typeof options.targetId === 'string' ? options.targetId.trim() : '') ||\n (typeof options.assistId === 'string' ? options.assistId.trim() : '');\n if (!targetId) {\n return {\n success: false,\n message: { text: 'targetId is required for Conversation:StartAssistChat.' },\n };\n }\n\n const result = await this.launcher.startAssistChat({\n targetId,\n navigate: options.navigate,\n });\n\n if (!result) {\n return { success: false };\n }\n\n return { success: true, data: result };\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAQA;AAEA;MAGa,qCAAqC,CAAA;AADlD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,4BAA4B,CAAC;AAoCjE,IAAA;IAlCC,MAAM,OAAO,CACX,KAA0C,EAAA;QAE1C,MAAM,GAAG,GAAG,KAGX;QACD,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG;AACtD,QAAA,MAAM,OAAO,GAAuC;AAClD,YAAA,IAAI,gBAAgB,EAAE,OAAO,IAAI,EAAE,CAAC;AACpC,YAAA,GAAI,IAAsD;SAC3D;QAED,MAAM,QAAQ,GACZ,CAAC,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE;aACnE,OAAO,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;QACvE,IAAI,CAAC,QAAQ,EAAE;YACb,OAAO;AACL,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,OAAO,EAAE,EAAE,IAAI,EAAE,wDAAwD,EAAE;aAC5E;QACH;QAEA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC;YACjD,QAAQ;YACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;AAC3B,SAAA,CAAC;QAEF,IAAI,CAAC,MAAM,EAAE;AACX,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE;IACxC;8GAtCW,qCAAqC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAArC,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,qCAAqC,cADxB,MAAM,EAAA,CAAA,CAAA;;2FACnB,qCAAqC,EAAA,UAAA,EAAA,CAAA;kBADjD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, Injectable } from '@angular/core';
3
3
  import { AXMNotificationService } from '@acorex/modules/notification-management';
4
- import { b as AXMConversationEntityStoreService, f as AXMConversationFocusService, g as axmIsAssistStreamingMessage } from './acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs';
4
+ import { b as AXMConversationEntityStoreService, f as AXMConversationFocusService, g as axmIsAssistStreamingMessage } from './acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs';
5
5
 
6
6
  //#endregion
7
7
  //#region ---- Command ----
@@ -59,4 +59,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
59
59
  }] });
60
60
 
61
61
  export { AXMConversationSyncReadStateCommand };
62
- //# sourceMappingURL=acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs.map
62
+ //# sourceMappingURL=acorex-modules-conversation-sync-read-state.command-4YxdwLaE.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs","sources":["../../../../libs/modules/conversation/src/lib/features/commands/sync-read-state.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXMNotificationService } from '@acorex/modules/notification-management';\n\nimport { AXMConversationEntityStoreService } from '../chat/services/conversation-entity-store.service';\nimport { AXMConversationFocusService } from '../chat/services/conversation-focus.service';\nimport { axmIsAssistStreamingMessage } from '../chat/plugins/utils/conversation-unread.util';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMSyncReadStateOptions {\n conversationId: string;\n messageIds?: string[];\n currentUserId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationSyncReadStateCommand implements AXPCommand<AXMSyncReadStateOptions, void> {\n private readonly store = inject(AXMConversationEntityStoreService);\n private readonly focus = inject(AXMConversationFocusService);\n private readonly notificationService = inject(AXMNotificationService);\n\n async execute(input: AXMSyncReadStateOptions | unknown): Promise<AXPExecuteCommandResult<void>> {\n const options = input as AXMSyncReadStateOptions;\n const conversationId = options.conversationId?.trim();\n if (!conversationId) {\n return { success: true };\n }\n\n this.focus.setFocusedConversation(conversationId);\n\n const messageIds =\n options.messageIds && options.messageIds.length > 0\n ? options.messageIds\n : (await this.store.loadConversationMessages(conversationId))\n .filter((m) => m.senderId !== options.currentUserId)\n .map((m) => m.id);\n\n const marked = await this.focus.markMessagesRead(conversationId, messageIds, options.currentUserId);\n await this.syncNotifications(conversationId, options.currentUserId);\n void marked;\n return { success: true };\n }\n\n private async syncNotifications(conversationId: string, currentUserId: string): Promise<void> {\n const messages = await this.store.loadConversationMessages(conversationId);\n const notificationIds: string[] = [];\n for (const message of messages) {\n if (message.senderId === currentUserId || message.status !== 'read') {\n continue;\n }\n if (axmIsAssistStreamingMessage(message)) {\n continue;\n }\n notificationIds.push(`notif-chat-${message.id}`);\n }\n if (notificationIds.length === 0) {\n return;\n }\n try {\n await this.notificationService.markAsRead({ id: notificationIds });\n } catch {\n // Ignore if notifications do not exist.\n }\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAqBA;AAEA;MAGa,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iCAAiC,CAAC;AACjD,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAC3C,QAAA,IAAA,CAAA,mBAAmB,GAAG,MAAM,CAAC,sBAAsB,CAAC;AA6CtE,IAAA;IA3CC,MAAM,OAAO,CAAC,KAAwC,EAAA;QACpD,MAAM,OAAO,GAAG,KAAgC;QAChD,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,IAAI,EAAE;QACrD,IAAI,CAAC,cAAc,EAAE;AACnB,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;QAC1B;AAEA,QAAA,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,cAAc,CAAC;AAEjD,QAAA,MAAM,UAAU,GACd,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG;cAC9C,OAAO,CAAC;cACR,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,cAAc,CAAC;AACvD,iBAAA,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,KAAK,OAAO,CAAC,aAAa;iBAClD,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;AAEzB,QAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,cAAc,EAAE,UAAU,EAAE,OAAO,CAAC,aAAa,CAAC;QACnG,MAAM,IAAI,CAAC,iBAAiB,CAAC,cAAc,EAAE,OAAO,CAAC,aAAa,CAAC;AACnE,QAAA,KAAK,MAAM;AACX,QAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;IAC1B;AAEQ,IAAA,MAAM,iBAAiB,CAAC,cAAsB,EAAE,aAAqB,EAAA;QAC3E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,cAAc,CAAC;QAC1E,MAAM,eAAe,GAAa,EAAE;AACpC,QAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAC9B,YAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;gBACnE;YACF;AACA,YAAA,IAAI,2BAA2B,CAAC,OAAO,CAAC,EAAE;gBACxC;YACF;YACA,eAAe,CAAC,IAAI,CAAC,CAAA,WAAA,EAAc,OAAO,CAAC,EAAE,CAAA,CAAE,CAAC;QAClD;AACA,QAAA,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC;QACF;AACA,QAAA,IAAI;AACF,YAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;QACpE;AAAE,QAAA,MAAM;;QAER;IACF;8GA/CW,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-modules-conversation-sync-read-state.command-4YxdwLaE.mjs","sources":["../../../../libs/modules/conversation/src/lib/features/commands/sync-read-state.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPCommand } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXMNotificationService } from '@acorex/modules/notification-management';\n\nimport { AXMConversationEntityStoreService } from '../chat/services/conversation-entity-store.service';\nimport { AXMConversationFocusService } from '../chat/services/conversation-focus.service';\nimport { axmIsAssistStreamingMessage } from '../chat/plugins/utils/conversation-unread.util';\n\n//#endregion\n\n//#region ---- Types ----\n\nexport interface AXMSyncReadStateOptions {\n conversationId: string;\n messageIds?: string[];\n currentUserId: string;\n}\n\n//#endregion\n\n//#region ---- Command ----\n\n@Injectable({ providedIn: 'root' })\nexport class AXMConversationSyncReadStateCommand implements AXPCommand<AXMSyncReadStateOptions, void> {\n private readonly store = inject(AXMConversationEntityStoreService);\n private readonly focus = inject(AXMConversationFocusService);\n private readonly notificationService = inject(AXMNotificationService);\n\n async execute(input: AXMSyncReadStateOptions | unknown): Promise<AXPExecuteCommandResult<void>> {\n const options = input as AXMSyncReadStateOptions;\n const conversationId = options.conversationId?.trim();\n if (!conversationId) {\n return { success: true };\n }\n\n this.focus.setFocusedConversation(conversationId);\n\n const messageIds =\n options.messageIds && options.messageIds.length > 0\n ? options.messageIds\n : (await this.store.loadConversationMessages(conversationId))\n .filter((m) => m.senderId !== options.currentUserId)\n .map((m) => m.id);\n\n const marked = await this.focus.markMessagesRead(conversationId, messageIds, options.currentUserId);\n await this.syncNotifications(conversationId, options.currentUserId);\n void marked;\n return { success: true };\n }\n\n private async syncNotifications(conversationId: string, currentUserId: string): Promise<void> {\n const messages = await this.store.loadConversationMessages(conversationId);\n const notificationIds: string[] = [];\n for (const message of messages) {\n if (message.senderId === currentUserId || message.status !== 'read') {\n continue;\n }\n if (axmIsAssistStreamingMessage(message)) {\n continue;\n }\n notificationIds.push(`notif-chat-${message.id}`);\n }\n if (notificationIds.length === 0) {\n return;\n }\n try {\n await this.notificationService.markAsRead({ id: notificationIds });\n } catch {\n // Ignore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,cAAsB,EAAE,aAAqB,EAAA;QAC3E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,cAAc,CAAC;QAC1E,MAAM,eAAe,GAAa,EAAE;AACpC,QAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;AAC9B,YAAA,IAAI,OAAO,CAAC,QAAQ,KAAK,aAAa,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;gBACnE;YACF;AACA,YAAA,IAAI,2BAA2B,CAAC,OAAO,CAAC,EAAE;gBACxC;YACF;YACA,eAAe,CAAC,IAAI,CAAC,CAAA,WAAA,EAAc,OAAO,CAAC,EAAE,CAAA,CAAE,CAAC;QAClD;AACA,QAAA,IAAI,eAAe,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC;QACF;AACA,QAAA,IAAI;AACF,YAAA,MAAM,IAAI,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,eAAe,EAAE,CAAC;QACpE;AAAE,QAAA,MAAM;;QAER;IACF;8GA/CW,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,2 +1,2 @@
1
- export { r as AXMChatComponent, s as AXMChatConversationApi, t as AXMChatEntityConversationApi, u as AXMChatEntityMessageApi, v as AXMChatEntityRealtimeApi, w as AXMChatEntityUserApi, x as AXMChatMessageApi, y as AXMChatRealtimeApi, z as AXMChatUserApi, h as AXMCommentComponent, B as AXMCommentManagementService, D as AXMCommentPopupComponent, E as AXMCommentPopupStartAction, F as AXMCommentPopupWorkflow, G as AXMCommentRealtimeService, H as AXMCommentRealtimeServiceImpl, I as AXMCommentService, J as AXMCommentServiceImpl, K as AXMCommentWidgetViewComponent, L as AXMConversationAssistBackgroundOperationHandler, b as AXMConversationEntityStoreService, f as AXMConversationFocusService, M as AXMConversationModule, N as AXMConversationRealtimeBus, a as AXMEntityChatService, O as AXMMiniChatComponent, P as AXMMiniChatHeaderSlotComponent, Q as AXMMiniChatHistoryComponent, R as AXMMiniChatInboxHistoryComponent, S as AXMMiniChatInboxPanelHostComponent, T as AXMMiniChatLauncherComponent, U as AXMMiniChatPanelComponent, V as AXMMiniChatPanelService, W as AXMPermissionsKeys, X as AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE, Y as AXM_COMMENT_LIKE_EMOJI, Z as AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS, _ as AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_KEY, c as AXM_CONVERSATION_ASSIST_RESPONSE_PORT, $ as AXM_CONVERSATION_CHAT_ATTACHMENT_CATEGORY, a0 as AXM_CONVERSATION_CHAT_ATTACHMENT_REF_TYPE, d as AXM_CONVERSATION_REGULAR_AUTO_REPLY_PORT, a1 as AXM_MINI_CHAT_INBOX_SESSION_KEY, a2 as AXPCommentWidget, a3 as AXPConversationMenuKeys, a4 as COMMENTS_PAGE_COMPONENT_KEY, a5 as CONVERSATION_AFTER_MESSAGE_SENT_COMMAND, a6 as CONVERSATION_EMIT_TYPING_INDICATOR_COMMAND, a7 as CONVERSATION_MARK_CONVERSATION_UNREAD_COMMAND, a8 as CONVERSATION_RETRY_ASSIST_RESPONSE_COMMAND, C as CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND, a9 as CONVERSATION_START_ASSIST_CHAT_COMMAND, aa as CONVERSATION_SYNC_READ_STATE_COMMAND, ab as RootConfig, ac as axmApplyAnswerTextToAssistPayloadLine, ad as axmAssistFollowUpItemsFromUnknown, ae as axmAssistLastTranscriptLine, af as axmAssistUserFacingPayloadLine, ag as axmAssistUserVisibleItemsForLine, m as axmAssistWidgetNodeFromUnknown, ah as axmBuildAssistPeerParticipantFromCreateData, ai as axmBuildAssistPeerParticipantFromId, aj as axmBuildAssistTranscriptLinePayload, ak as axmBuildEntityChatConversationMetadata, al as axmCoerceDate, am as axmCoerceTimestampMs, an as axmComputeConversationUnreadCount, e as axmConversationHasAiChat, ao as axmConversationIsEntityChat, ap as axmConversationMatchesEntity, aq as axmExtractAssistIdFromMetadata, ar as axmExtractDirectAgentIdFromMetadata, as as axmExtractEntityRefFromMetadata, at as axmExtractTextFromPayload, au as axmIsAssistPeerParticipant, av as axmIsAssistRetryableStatus, g as axmIsAssistStreamingMessage, aw as axmIsAssistStreamingStatus, ax as axmMessageCountsTowardUnread, ay as axmMessageEntityToMessage, az as axmNormalizeAssistTranscriptForChatUi, aA as axmNormalizeAssistTranscriptLineResponses, aB as axmParseAssistTranscriptLinePayload, l as axmParseAssistTranscriptTextEnvelope, aC as axmPartitionAssistAnswerText, aD as axmReadAssistAiTranscript, aE as axmReadAssistAiTranscriptRaw, aF as axmReadAssistResponseError, aG as axmReadAssistResponseStatus, aH as axmResolveAssistFinalAnswerText, aI as axmRoomEntityToConversation, aJ as axmSanitizeAssistUserAnswerText, aK as axmSortMessagesNewestFirst, n as axmSyntheticEmbedMessage, aL as axmUserRowToParticipant, aM as commentsPlugin, aN as messageFactory, aO as persistChatAttachment, aP as roomFactory } from './acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs';
1
+ export { r as AXMChatComponent, s as AXMChatConversationApi, t as AXMChatEntityConversationApi, u as AXMChatEntityMessageApi, v as AXMChatEntityRealtimeApi, w as AXMChatEntityUserApi, x as AXMChatMessageApi, y as AXMChatRealtimeApi, z as AXMChatUserApi, h as AXMCommentComponent, B as AXMCommentManagementService, D as AXMCommentPopupComponent, E as AXMCommentPopupStartAction, F as AXMCommentPopupWorkflow, G as AXMCommentRealtimeService, H as AXMCommentRealtimeServiceImpl, I as AXMCommentService, J as AXMCommentServiceImpl, K as AXMCommentWidgetViewComponent, L as AXMConversationAssistBackgroundOperationHandler, b as AXMConversationEntityStoreService, f as AXMConversationFocusService, M as AXMConversationModule, N as AXMConversationRealtimeBus, a as AXMEntityChatService, O as AXMMiniChatComponent, P as AXMMiniChatHeaderSlotComponent, Q as AXMMiniChatHistoryComponent, R as AXMMiniChatInboxHistoryComponent, S as AXMMiniChatInboxPanelHostComponent, T as AXMMiniChatLauncherComponent, U as AXMMiniChatPanelComponent, V as AXMMiniChatPanelService, W as AXMPermissionsKeys, X as AXM_ASSIST_TRANSCRIPT_LINE_PAYLOAD_TYPE, Y as AXM_COMMENT_LIKE_EMOJI, Z as AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_HANDLERS, _ as AXM_CONVERSATION_ASSIST_BACKGROUND_OPERATION_KEY, c as AXM_CONVERSATION_ASSIST_RESPONSE_PORT, $ as AXM_CONVERSATION_CHAT_ATTACHMENT_CATEGORY, a0 as AXM_CONVERSATION_CHAT_ATTACHMENT_REF_TYPE, d as AXM_CONVERSATION_REGULAR_AUTO_REPLY_PORT, a1 as AXM_MINI_CHAT_INBOX_SESSION_KEY, a2 as AXPCommentWidget, a3 as AXPConversationMenuKeys, a4 as COMMENTS_PAGE_COMPONENT_KEY, a5 as CONVERSATION_AFTER_MESSAGE_SENT_COMMAND, a6 as CONVERSATION_EMIT_TYPING_INDICATOR_COMMAND, a7 as CONVERSATION_MARK_CONVERSATION_UNREAD_COMMAND, a8 as CONVERSATION_RETRY_ASSIST_RESPONSE_COMMAND, C as CONVERSATION_SEND_ASSIST_CHAT_MESSAGE_COMMAND, a9 as CONVERSATION_START_ASSIST_CHAT_COMMAND, aa as CONVERSATION_SYNC_READ_STATE_COMMAND, ab as RootConfig, ac as axmApplyAnswerTextToAssistPayloadLine, ad as axmAssistFollowUpItemsFromUnknown, ae as axmAssistLastTranscriptLine, af as axmAssistUserFacingPayloadLine, ag as axmAssistUserVisibleItemsForLine, m as axmAssistWidgetNodeFromUnknown, ah as axmBuildAssistPeerParticipantFromCreateData, ai as axmBuildAssistPeerParticipantFromId, aj as axmBuildAssistTranscriptLinePayload, ak as axmBuildEntityChatConversationMetadata, al as axmCoerceDate, am as axmCoerceTimestampMs, an as axmComputeConversationUnreadCount, e as axmConversationHasAiChat, ao as axmConversationIsEntityChat, ap as axmConversationMatchesEntity, aq as axmExtractAssistIdFromMetadata, ar as axmExtractDirectAgentIdFromMetadata, as as axmExtractEntityRefFromMetadata, at as axmExtractTextFromPayload, au as axmIsAssistPeerParticipant, av as axmIsAssistRetryableStatus, g as axmIsAssistStreamingMessage, aw as axmIsAssistStreamingStatus, ax as axmMessageCountsTowardUnread, ay as axmMessageEntityToMessage, az as axmNormalizeAssistTranscriptForChatUi, aA as axmNormalizeAssistTranscriptLineResponses, aB as axmParseAssistTranscriptLinePayload, l as axmParseAssistTranscriptTextEnvelope, aC as axmPartitionAssistAnswerText, aD as axmReadAssistAiTranscript, aE as axmReadAssistAiTranscriptRaw, aF as axmReadAssistResponseError, aG as axmReadAssistResponseStatus, aH as axmResolveAssistFinalAnswerText, aI as axmRoomEntityToConversation, aJ as axmSanitizeAssistUserAnswerText, aK as axmSortMessagesNewestFirst, n as axmSyntheticEmbedMessage, aL as axmUserRowToParticipant, aM as commentsPlugin, aN as messageFactory, aO as persistChatAttachment, aP as roomFactory } from './acorex-modules-conversation-acorex-modules-conversation-Dc8te-PO.mjs';
2
2
  //# sourceMappingURL=acorex-modules-conversation.mjs.map
@@ -7,13 +7,14 @@ import * as i3$2 from '@acorex/platform/layout/widget-core';
7
7
  import { AXPBaseWidgetComponent, cloneProperty, AXPWidgetGroupEnum, AXPValueWidgetComponent, createStringProperty, AXPWidgetRendererDirective, AXPWidgetCoreModule, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
8
8
  import { AXP_DATA_SOURCE_OPTIONS_PROPERTY, AXP_APPEARANCE_PROPERTY_GROUP, AXP_NAME_PROPERTY, AXP_DATA_PATH_PROPERTY, AXP_DATA_PROPERTY_GROUP, AXP_BEHAVIOR_PROPERTY_GROUP, AXP_COLOR_PROPERTY, AXP_BG_COLOR_PROPERTY, AXPWidgetsModule } from '@acorex/platform/layout/widgets';
9
9
  import * as i0 from '@angular/core';
10
- import { Injectable, inject, DestroyRef, afterNextRender, signal, effect, computed, ChangeDetectionStrategy, Component, InjectionToken, viewChild, input, ElementRef, ChangeDetectorRef, HostBinding, linkedSignal, HostListener, output, contentChild, ViewEncapsulation, NgModule, untracked, model } from '@angular/core';
10
+ import { Injectable, inject, computed, DestroyRef, afterNextRender, signal, effect, ChangeDetectionStrategy, Component, InjectionToken, viewChild, input, ElementRef, ChangeDetectorRef, HostBinding, linkedSignal, HostListener, output, contentChild, ViewEncapsulation, NgModule, untracked, model } from '@angular/core';
11
11
  import { AXPSystemActionType, AXPWidgetsCatalog, AXPDataGenerator, createMultiLanguageString, AXPPlatformScope, AXPWidgetsList } from '@acorex/platform/contracts';
12
12
  import { AXPCommonMenuKeys, AXP_GLOBAL_SEARCH_CONFIG_TOKEN } from '@acorex/modules/common';
13
13
  import { firstValueFrom, Subject, map, Observable, catchError, throwError, of, finalize, interval, switchMap, fromEvent } from 'rxjs';
14
14
  import * as i4 from '@acorex/core/translation';
15
15
  import { AXTranslationService, AXTranslationModule, resolveMultiLanguageString } from '@acorex/core/translation';
16
16
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
17
+ import { get, isObjectLike, isString, isArray, castArray, set } from 'lodash-es';
17
18
  import { throttleTime, debounceTime } from 'rxjs/operators';
18
19
  import { AXBarChartComponent } from '@acorex/charts/bar-chart';
19
20
  import { AXDonutChartComponent } from '@acorex/charts/donut-chart';
@@ -50,7 +51,6 @@ import * as i1$3 from '@acorex/components/wysiwyg';
50
51
  import { AXWysiwygModule } from '@acorex/components/wysiwyg';
51
52
  import * as i2$1 from '@angular/forms';
52
53
  import { FormsModule } from '@angular/forms';
53
- import { get, isString, isArray, castArray, set } from 'lodash-es';
54
54
  import { AXP_WIDGET_PICKER_TAB_CONTEXT, AXPWidgetPickerService, AXPDesignerService } from '@acorex/platform/layout/designer';
55
55
  import { RootConfig as RootConfig$1 } from '@acorex/modules/security-management';
56
56
  import { AXDialogService } from '@acorex/components/dialog';
@@ -271,6 +271,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
271
271
  //#region ---- Constants ----
272
272
  /** Minimum interval between container resize emissions to subscribers and {@link AXPDashboardWidgetComponent.onContainerSizeChanged}. */
273
273
  const AXPDASHBOARD_WIDGET_CONTAINER_RESIZE_THROTTLE_MS = 100;
274
+ /** Reserved widgets-container key for runtime entity detail context (entity dashboard plugin). */
275
+ const AXPDASHBOARD_ENTITY_CONTEXT_KEY = '__dashboardEntityContext';
276
+ //#endregion
277
+ //#region ---- Context helpers ----
278
+ /**
279
+ * Merges a persisted dashboard model with optional runtime entity context for widget rendering.
280
+ */
281
+ function buildDashboardWidgetsContext(dashboardModel, entityContext) {
282
+ if (!entityContext) {
283
+ return { ...dashboardModel };
284
+ }
285
+ return {
286
+ ...dashboardModel,
287
+ [AXPDASHBOARD_ENTITY_CONTEXT_KEY]: entityContext,
288
+ };
289
+ }
290
+ /**
291
+ * Reads {@link AXPDashboardEntityContext} from a widgets-container context object.
292
+ */
293
+ function readDashboardEntityContext(context) {
294
+ const value = get(context, AXPDASHBOARD_ENTITY_CONTEXT_KEY);
295
+ if (!isObjectLike(value)) {
296
+ return undefined;
297
+ }
298
+ const raw = value;
299
+ const entityType = raw['entityType'];
300
+ const entityId = raw['entityId'];
301
+ const data = raw['data'];
302
+ if (!isString(entityType) || !entityType.trim() || !isString(entityId) || !entityId.trim()) {
303
+ return undefined;
304
+ }
305
+ return {
306
+ entityType: entityType.trim(),
307
+ entityId: entityId.trim(),
308
+ data: isObjectLike(data) ? data : {},
309
+ };
310
+ }
274
311
  //#endregion
275
312
  //#region ---- Dashboard widget base ----
276
313
  /**
@@ -278,8 +315,19 @@ const AXPDASHBOARD_WIDGET_CONTAINER_RESIZE_THROTTLE_MS = 100;
278
315
  * Extend this to add shared dashboard logic and helpers.
279
316
  */
280
317
  class AXPDashboardWidgetComponent extends AXPBaseWidgetComponent {
318
+ /** True when {@link entityContext} is available for dynamic, record-scoped widget data. */
319
+ hasEntityContext() {
320
+ return this.entityContext() != null;
321
+ }
281
322
  constructor() {
282
323
  super();
324
+ //#region ---- Entity context ----
325
+ /**
326
+ * Runtime entity detail context when the dashboard is shown on an entity record (dashboard plugin).
327
+ * Undefined on home/tenant dashboards.
328
+ */
329
+ this.entityContext = computed(() => readDashboardEntityContext(this.contextService.data()), ...(ngDevMode ? [{ debugName: "entityContext" }] : /* istanbul ignore next */ []));
330
+ //#endregion
283
331
  //#region ---- Container resize ----
284
332
  this.containerResizeRawSubject = new Subject();
285
333
  this.containerSizeSubject = new Subject();
@@ -6262,9 +6310,11 @@ const ENTITY_DASHBOARD_PAGE_COMPONENT_KEY = 'entity-dashboard-page';
6262
6310
  //#region ---- Plugin ----
6263
6311
  /**
6264
6312
  * Dashboard plugin.
6313
+ * - Binds one dashboard layout per entity type (`scope: E`, `scopeRef.entityType`).
6265
6314
  * - When display is `page` (default), adds a page tab with {@link ENTITY_DASHBOARD_PAGE_COMPONENT_KEY}.
6266
6315
  * - When display is `section`, embeds the dashboard grid in the single layout.
6267
6316
  * - Adds a list action to open the entity dashboard page.
6317
+ * - Runtime entity record context is passed to dashboard widgets via `__dashboardEntityContext`.
6268
6318
  */
6269
6319
  const dashboardPlugin = {
6270
6320
  name: 'dashboard',
@@ -6384,11 +6434,8 @@ function buildTenantScopeRef(tenantId, roleIds) {
6384
6434
  roleIds: [...new Set(roleIds.map((id) => id.trim()).filter(Boolean))],
6385
6435
  };
6386
6436
  }
6387
- function buildEntityScopeRef(entityType, entityId) {
6388
- return {
6389
- entityType: entityType.trim(),
6390
- entityId: entityId.trim(),
6391
- };
6437
+ function buildEntityScopeRef(entityType) {
6438
+ return { entityType: entityType.trim() };
6392
6439
  }
6393
6440
  //#endregion
6394
6441
  //#region ---- Readers ----
@@ -6407,13 +6454,9 @@ function readScopeRoleIds(scopeRef) {
6407
6454
  }
6408
6455
  return roleIds.filter((id) => isString(id) && id.trim().length > 0);
6409
6456
  }
6410
- function readScopeEntityRef(scopeRef) {
6411
- const entityId = get(scopeRef, 'entityId');
6457
+ function readScopeEntityType(scopeRef) {
6412
6458
  const entityType = get(scopeRef, 'entityType');
6413
- if (!isString(entityId) || !entityId.trim() || !isString(entityType) || !entityType.trim()) {
6414
- return undefined;
6415
- }
6416
- return { entityId: entityId.trim(), entityType: entityType.trim() };
6459
+ return isString(entityType) && entityType.trim() ? entityType.trim() : undefined;
6417
6460
  }
6418
6461
  //#endregion
6419
6462
  //#region ---- Normalization ----
@@ -6429,7 +6472,7 @@ function normalizeDashboardScopeRef(scope, scopeRef, fallback) {
6429
6472
  ? readScopeRoleIds(scopeRef)
6430
6473
  : castArray(fallback?.roleIds ?? []));
6431
6474
  case 'E':
6432
- return buildEntityScopeRef(readScopeEntityRef(scopeRef)?.entityType ?? fallback?.entityType ?? '', readScopeEntityRef(scopeRef)?.entityId ?? fallback?.entityId ?? '');
6475
+ return buildEntityScopeRef(readScopeEntityType(scopeRef) ?? fallback?.entityType ?? '');
6433
6476
  default:
6434
6477
  return buildUserScopeRef(fallback?.userId ?? '');
6435
6478
  }
@@ -6440,7 +6483,8 @@ function normalizeDashboardScopeRef(scope, scopeRef, fallback) {
6440
6483
  //#endregion
6441
6484
  //#region ---- Service ----
6442
6485
  /**
6443
- * Resolves or creates entity-scoped dashboards (`scope: E`).
6486
+ * Resolves or creates entity-type dashboards (`scope: E`).
6487
+ * One dashboard layout is shared across all records of the same entity type.
6444
6488
  */
6445
6489
  class AXMEntityDashboardService {
6446
6490
  constructor() {
@@ -6453,9 +6497,9 @@ class AXMEntityDashboardService {
6453
6497
  //#endregion
6454
6498
  //#region ---- Public Methods ----
6455
6499
  /**
6456
- * Finds the dashboard bound to an entity record, if one exists.
6500
+ * Finds the dashboard bound to an entity type, if one exists.
6457
6501
  */
6458
- async findEntityDashboard(entityType, entityId) {
6502
+ async findEntityDashboard(entityType) {
6459
6503
  const result = await this.dashboardData.query({
6460
6504
  skip: 0,
6461
6505
  take: 1,
@@ -6464,17 +6508,16 @@ class AXMEntityDashboardService {
6464
6508
  filters: [
6465
6509
  { field: 'scope', operator: { type: 'equal' }, value: 'E' },
6466
6510
  { field: 'scopeRef.entityType', operator: { type: 'equal' }, value: entityType },
6467
- { field: 'scopeRef.entityId', operator: { type: 'equal' }, value: entityId },
6468
6511
  ],
6469
6512
  },
6470
6513
  });
6471
6514
  return result.items?.[0] ?? null;
6472
6515
  }
6473
6516
  /**
6474
- * Returns the entity dashboard, creating an empty one when missing.
6517
+ * Returns the entity-type dashboard, creating an empty one when missing.
6475
6518
  */
6476
- async ensureEntityDashboard(entityType, entityId, title) {
6477
- const existing = await this.findEntityDashboard(entityType, entityId);
6519
+ async ensureEntityDashboard(entityType, title) {
6520
+ const existing = await this.findEntityDashboard(entityType);
6478
6521
  if (existing) {
6479
6522
  return existing;
6480
6523
  }
@@ -6484,7 +6527,7 @@ class AXMEntityDashboardService {
6484
6527
  description: '',
6485
6528
  widgets: [],
6486
6529
  scope: 'E',
6487
- scopeRef: buildEntityScopeRef(entityType, entityId),
6530
+ scopeRef: buildEntityScopeRef(entityType),
6488
6531
  locked: false,
6489
6532
  isArchived: false,
6490
6533
  });
@@ -7897,7 +7940,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
7897
7940
  //#endregion
7898
7941
  //#region ---- Component ----
7899
7942
  /**
7900
- * Shared host that loads an entity-scoped dashboard and renders the grid layout section.
7943
+ * Shared host that loads an entity-type dashboard and renders the grid layout section.
7944
+ * Passes runtime entity context to widgets for record-scoped dynamic data.
7901
7945
  */
7902
7946
  class AXMEntityDashboardHostComponent {
7903
7947
  constructor() {
@@ -7909,6 +7953,8 @@ class AXMEntityDashboardHostComponent {
7909
7953
  this.entityType = input.required(...(ngDevMode ? [{ debugName: "entityType" }] : /* istanbul ignore next */ []));
7910
7954
  this.entityId = input.required(...(ngDevMode ? [{ debugName: "entityId" }] : /* istanbul ignore next */ []));
7911
7955
  this.entityTitle = input(...(ngDevMode ? [undefined, { debugName: "entityTitle" }] : /* istanbul ignore next */ []));
7956
+ /** Full entity record from detail view (rootContext). */
7957
+ this.entityData = input({}, ...(ngDevMode ? [{ debugName: "entityData" }] : /* istanbul ignore next */ []));
7912
7958
  //#endregion
7913
7959
  //#region ---- Local State ----
7914
7960
  this.context = signal({}, ...(ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []));
@@ -7919,14 +7965,17 @@ class AXMEntityDashboardHostComponent {
7919
7965
  const entityType = this.entityType();
7920
7966
  const entityId = this.entityId();
7921
7967
  const entityTitle = this.entityTitle();
7968
+ const entityData = this.entityData();
7922
7969
  if (!entityType || !entityId) {
7923
7970
  return;
7924
7971
  }
7925
- void this.entityDashboardService
7926
- .ensureEntityDashboard(entityType, entityId, entityTitle)
7927
- .then((model) => {
7972
+ void this.entityDashboardService.ensureEntityDashboard(entityType, entityTitle).then((model) => {
7928
7973
  this.store.hydrateFromEntityDetailModel(model);
7929
- this.context.set({ ...model });
7974
+ this.context.set(buildDashboardWidgetsContext({ ...model }, {
7975
+ entityType,
7976
+ entityId,
7977
+ data: isObjectLike(entityData) ? { ...entityData } : {},
7978
+ }));
7930
7979
  this.isReady.set(true);
7931
7980
  });
7932
7981
  }, ...(ngDevMode ? [{ debugName: "#loadEntityDashboard" }] : /* istanbul ignore next */ []));
@@ -7935,7 +7984,7 @@ class AXMEntityDashboardHostComponent {
7935
7984
  //#region ---- Effects ----
7936
7985
  #loadEntityDashboard;
7937
7986
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityDashboardHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
7938
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMEntityDashboardHostComponent, isStandalone: true, selector: "axm-entity-dashboard-host", inputs: { entityType: { classPropertyName: "entityType", publicName: "entityType", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, entityTitle: { classPropertyName: "entityTitle", publicName: "entityTitle", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
7987
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMEntityDashboardHostComponent, isStandalone: true, selector: "axm-entity-dashboard-host", inputs: { entityType: { classPropertyName: "entityType", publicName: "entityType", isSignal: true, isRequired: true, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: true, transformFunction: null }, entityTitle: { classPropertyName: "entityTitle", publicName: "entityTitle", isSignal: true, isRequired: false, transformFunction: null }, entityData: { classPropertyName: "entityData", publicName: "entityData", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
7939
7988
  AXPDesignerService,
7940
7989
  { provide: DASHBOARD_LAYOUT_ENTITY_MODE, useValue: true },
7941
7990
  { provide: DASHBOARD_READONLY_MODE, useValue: true },
@@ -7965,7 +8014,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
7965
8014
  AXMDashboardStore,
7966
8015
  ],
7967
8016
  }]
7968
- }], propDecorators: { entityType: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityType", required: true }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], entityTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityTitle", required: false }] }] } });
8017
+ }], propDecorators: { entityType: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityType", required: true }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: true }] }], entityTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityTitle", required: false }] }], entityData: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityData", required: false }] }] } });
7969
8018
 
7970
8019
  //#region ---- Imports ----
7971
8020
  //#endregion
@@ -7985,6 +8034,10 @@ class AXMEntityDashboardWidgetViewComponent extends AXPValueWidgetComponent {
7985
8034
  const subject = this.options()?.['subject'];
7986
8035
  return typeof subject === 'string' ? subject : undefined;
7987
8036
  }, ...(ngDevMode ? [{ debugName: "entityTitle" }] : /* istanbul ignore next */ []));
8037
+ this.entityData = computed(() => {
8038
+ const data = this.contextService.data();
8039
+ return isObjectLike(data) ? data : {};
8040
+ }, ...(ngDevMode ? [{ debugName: "entityData" }] : /* istanbul ignore next */ []));
7988
8041
  }
7989
8042
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityDashboardWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
7990
8043
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMEntityDashboardWidgetViewComponent, isStandalone: true, selector: "axm-entity-dashboard-widget-view", usesInheritance: true, ngImport: i0, template: `
@@ -7993,9 +8046,10 @@ class AXMEntityDashboardWidgetViewComponent extends AXPValueWidgetComponent {
7993
8046
  [entityType]="entityType()!"
7994
8047
  [entityId]="entityId()!"
7995
8048
  [entityTitle]="entityTitle()"
8049
+ [entityData]="entityData()"
7996
8050
  ></axm-entity-dashboard-host>
7997
8051
  }
7998
- `, isInline: true, dependencies: [{ kind: "component", type: AXMEntityDashboardHostComponent, selector: "axm-entity-dashboard-host", inputs: ["entityType", "entityId", "entityTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8052
+ `, isInline: true, dependencies: [{ kind: "component", type: AXMEntityDashboardHostComponent, selector: "axm-entity-dashboard-host", inputs: ["entityType", "entityId", "entityTitle", "entityData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
7999
8053
  }
8000
8054
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityDashboardWidgetViewComponent, decorators: [{
8001
8055
  type: Component,
@@ -8008,6 +8062,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
8008
8062
  [entityType]="entityType()!"
8009
8063
  [entityId]="entityId()!"
8010
8064
  [entityTitle]="entityTitle()"
8065
+ [entityData]="entityData()"
8011
8066
  ></axm-entity-dashboard-host>
8012
8067
  }
8013
8068
  `,
@@ -8050,9 +8105,10 @@ class AXMEntityDashboardPageComponent extends AXPPageLayoutBaseComponent {
8050
8105
  [entityType]="ref.entityType"
8051
8106
  [entityId]="ref.entityId"
8052
8107
  [entityTitle]="entityTitle()"
8108
+ [entityData]="rootContext()"
8053
8109
  ></axm-entity-dashboard-host>
8054
8110
  }
8055
- `, isInline: true, styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: AXMEntityDashboardHostComponent, selector: "axm-entity-dashboard-host", inputs: ["entityType", "entityId", "entityTitle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8111
+ `, isInline: true, styles: [":host{display:block;width:100%;height:100%}\n"], dependencies: [{ kind: "component", type: AXMEntityDashboardHostComponent, selector: "axm-entity-dashboard-host", inputs: ["entityType", "entityId", "entityTitle", "entityData"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8056
8112
  }
8057
8113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityDashboardPageComponent, decorators: [{
8058
8114
  type: Component,
@@ -8062,6 +8118,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
8062
8118
  [entityType]="ref.entityType"
8063
8119
  [entityId]="ref.entityId"
8064
8120
  [entityTitle]="entityTitle()"
8121
+ [entityData]="rootContext()"
8065
8122
  ></axm-entity-dashboard-host>
8066
8123
  }
8067
8124
  `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
@@ -8174,28 +8231,24 @@ const dashboardScopeMiddleware = {
8174
8231
  }
8175
8232
  const legacyUserId = get(payload, 'userId');
8176
8233
  const legacyRoleIds = get(payload, 'roleIds');
8177
- const legacyEntityId = get(payload, 'entityId');
8178
8234
  const legacyEntityType = get(payload, 'entityType');
8179
8235
  const legacyTenantId = get(payload, 'tenantId');
8180
8236
  const scopeRef = normalizeDashboardScopeRef(scope, payload['scopeRef'], {
8181
8237
  userId: isString(legacyUserId) ? legacyUserId : undefined,
8182
8238
  tenantId: isString(legacyTenantId) ? legacyTenantId : undefined,
8183
8239
  roleIds: Array.isArray(legacyRoleIds) ? legacyRoleIds : readScopeRoleIds(payload['scopeRef']),
8184
- entityId: isString(legacyEntityId) ? legacyEntityId : undefined,
8185
8240
  entityType: isString(legacyEntityType) ? legacyEntityType : undefined,
8186
8241
  });
8187
8242
  set(payload, 'scopeRef', scopeRef);
8188
8243
  delete payload['userId'];
8189
8244
  delete payload['roleIds'];
8190
- delete payload['entityId'];
8191
8245
  delete payload['entityType'];
8192
8246
  delete payload['tenantId'];
8193
8247
  if (scope === 'T') {
8194
8248
  payload['locked'] = true;
8195
8249
  }
8196
8250
  if (scope === 'E') {
8197
- const entityRef = buildEntityScopeRef(get(scopeRef, 'entityType'), get(scopeRef, 'entityId'));
8198
- set(payload, 'scopeRef', entityRef);
8251
+ set(payload, 'scopeRef', buildEntityScopeRef(get(scopeRef, 'entityType')));
8199
8252
  }
8200
8253
  if (scope === 'U') {
8201
8254
  set(payload, 'scopeRef', buildUserScopeRef(get(scopeRef, 'userId')));
@@ -8280,7 +8333,7 @@ class AXMDashboardManagementModule {
8280
8333
  useValue: dashboardScopeMiddleware,
8281
8334
  multi: true,
8282
8335
  },
8283
- provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => import('./acorex-modules-dashboard-management-index-gjCiELmH.mjs').then((m) => m.AXMDashboardLayoutPageComponentProvider)),
8336
+ provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => import('./acorex-modules-dashboard-management-index-rp9dgARq.mjs').then((m) => m.AXMDashboardLayoutPageComponentProvider)),
8284
8337
  provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => Promise.resolve().then(function () { return entityDashboardPageComponent_provider; }).then((m) => m.AXMEntityDashboardPageComponentProvider)),
8285
8338
  ], imports: [AXPWidgetCoreModule] }); }
8286
8339
  }
@@ -8342,7 +8395,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
8342
8395
  useValue: dashboardScopeMiddleware,
8343
8396
  multi: true,
8344
8397
  },
8345
- provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => import('./acorex-modules-dashboard-management-index-gjCiELmH.mjs').then((m) => m.AXMDashboardLayoutPageComponentProvider)),
8398
+ provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => import('./acorex-modules-dashboard-management-index-rp9dgARq.mjs').then((m) => m.AXMDashboardLayoutPageComponentProvider)),
8346
8399
  provideLazyProvider(AXP_PAGE_COMPONENT_PROVIDER, () => Promise.resolve().then(function () { return entityDashboardPageComponent_provider; }).then((m) => m.AXMEntityDashboardPageComponentProvider)),
8347
8400
  ],
8348
8401
  }]
@@ -8560,7 +8613,7 @@ var index = /*#__PURE__*/Object.freeze({
8560
8613
  buildUserScopeRef: buildUserScopeRef,
8561
8614
  dashboardFactory: dashboardFactory,
8562
8615
  normalizeDashboardScopeRef: normalizeDashboardScopeRef,
8563
- readScopeEntityRef: readScopeEntityRef,
8616
+ readScopeEntityType: readScopeEntityType,
8564
8617
  readScopeRoleIds: readScopeRoleIds,
8565
8618
  readScopeTenantId: readScopeTenantId,
8566
8619
  readScopeUserId: readScopeUserId
@@ -9047,5 +9100,5 @@ var AXPHomeDashboardSetting;
9047
9100
  * Generated bundle index. Do not edit.
9048
9101
  */
9049
9102
 
9050
- export { AXP_DASHBOARD_SHARED_SUB_CHART_SPECIALIZED as $, AXMDashboardStore as A, AXPHeatmapChartWidgetViewComponent as B, AXPHomeDashboardSetting as C, DASHBOARD_LAYOUT_PAGE_COMPONENT_KEY as D, AXPKpiDetailsWidget as E, AXPKpiDetailsWidgetViewComponent as F, AXPKpiProgressWidget as G, AXPKpiProgressWidgetViewComponent as H, AXPKpiSegmentedWidget as I, AXPKpiSegmentedWidgetViewComponent as J, AXPKpiStatCardWidget as K, AXPKpiStatCardWidgetViewComponent as L, AXPLineChartWidget as M, AXPLineChartWidgetViewComponent as N, AXPMinimalWeatherWidget as O, AXPShortcutWidget as P, AXPShortcutWidgetViewComponent as Q, AXPStickyNoteWidget as R, AXPStickyNoteWidgetViewComponent as S, AXPWeatherApiAbstract as T, AXPWeatherApiMockService as U, AXPWeatherApiService as V, AXPWeatherWidget as W, AXPWeatherWidgetViewComponent as X, AXP_DASHBOARD_SHARED_SUB_CHART_CARTESIAN as Y, AXP_DASHBOARD_SHARED_SUB_CHART_KPI as Z, AXP_DASHBOARD_SHARED_SUB_CHART_RADIAL as _, AXMDashboardGridLayoutSectionComponent as a, AXP_DASHBOARD_SHARED_SUB_UTILITY_NOTES as a0, AXP_DASHBOARD_SHARED_SUB_UTILITY_SHORTCUT as a1, AXP_DASHBOARD_SHARED_SUB_UTILITY_TIME as a2, AXP_DASHBOARD_SHARED_SUB_UTILITY_WEATHER as a3, AXP_DATE_FORMAT_OPTIONS as a4, AXP_TIMEZONE_OPTIONS as a5, AXP_WIDGETS_CHART_CATEGORY as a6, AXP_WIDGETS_UTILITY_CATEGORY as a7, RootConfig as a8, buildEntityScopeRef as a9, buildTenantScopeRef as aa, buildUserScopeRef as ab, dashboardFactory as ac, normalizeDashboardScopeRef as ad, readScopeEntityRef as ae, readScopeRoleIds as af, readScopeTenantId as ag, readScopeUserId as ah, DASHBOARD_LAYOUT_ENTITY_MODE as b, AXMAddDashboardPopup as c, AXMAdvancedWeatherViewComponent as d, AXMAnalogClockComponent as e, AXMClockWidgetViewComponent as f, AXMConfigurationPopup as g, AXMDashboardHomeComponent as h, AXMDashboardManagementModule as i, AXMDashboardPopupService as j, AXMDashboardWidgetWrapperComponent as k, AXMMinimalWeatherViewComponent as l, AXPAdvancedWeatherWidget as m, AXPAnalogClockWidget as n, AXPBarChartWidget as o, AXPBarChartWidgetViewComponent as p, AXPClockCalendarWidget as q, AXPClockCalendarWidgetViewComponent as r, AXPDashboardWidgetComponent as s, AXPDonutChartWidget as t, AXPDonutChartWidgetViewComponent as u, AXPFunnelChartWidget as v, AXPFunnelChartWidgetViewComponent as w, AXPGaugeChartWidget as x, AXPGaugeChartWidgetViewComponent as y, AXPHeatmapChartWidget as z };
9051
- //# sourceMappingURL=acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs.map
9103
+ export { AXP_DASHBOARD_SHARED_SUB_CHART_RADIAL as $, AXMDashboardStore as A, AXPHeatmapChartWidget as B, AXPHeatmapChartWidgetViewComponent as C, DASHBOARD_LAYOUT_PAGE_COMPONENT_KEY as D, AXPHomeDashboardSetting as E, AXPKpiDetailsWidget as F, AXPKpiDetailsWidgetViewComponent as G, AXPKpiProgressWidget as H, AXPKpiProgressWidgetViewComponent as I, AXPKpiSegmentedWidget as J, AXPKpiSegmentedWidgetViewComponent as K, AXPKpiStatCardWidget as L, AXPKpiStatCardWidgetViewComponent as M, AXPLineChartWidget as N, AXPLineChartWidgetViewComponent as O, AXPMinimalWeatherWidget as P, AXPShortcutWidget as Q, AXPShortcutWidgetViewComponent as R, AXPStickyNoteWidget as S, AXPStickyNoteWidgetViewComponent as T, AXPWeatherApiAbstract as U, AXPWeatherApiMockService as V, AXPWeatherApiService as W, AXPWeatherWidget as X, AXPWeatherWidgetViewComponent as Y, AXP_DASHBOARD_SHARED_SUB_CHART_CARTESIAN as Z, AXP_DASHBOARD_SHARED_SUB_CHART_KPI as _, AXMDashboardGridLayoutSectionComponent as a, AXP_DASHBOARD_SHARED_SUB_CHART_SPECIALIZED as a0, AXP_DASHBOARD_SHARED_SUB_UTILITY_NOTES as a1, AXP_DASHBOARD_SHARED_SUB_UTILITY_SHORTCUT as a2, AXP_DASHBOARD_SHARED_SUB_UTILITY_TIME as a3, AXP_DASHBOARD_SHARED_SUB_UTILITY_WEATHER as a4, AXP_DATE_FORMAT_OPTIONS as a5, AXP_TIMEZONE_OPTIONS as a6, AXP_WIDGETS_CHART_CATEGORY as a7, AXP_WIDGETS_UTILITY_CATEGORY as a8, RootConfig as a9, buildDashboardWidgetsContext as aa, buildEntityScopeRef as ab, buildTenantScopeRef as ac, buildUserScopeRef as ad, dashboardFactory as ae, normalizeDashboardScopeRef as af, readDashboardEntityContext as ag, readScopeEntityType as ah, readScopeRoleIds as ai, readScopeTenantId as aj, readScopeUserId as ak, DASHBOARD_LAYOUT_ENTITY_MODE as b, AXMAddDashboardPopup as c, AXMAdvancedWeatherViewComponent as d, AXMAnalogClockComponent as e, AXMClockWidgetViewComponent as f, AXMConfigurationPopup as g, AXMDashboardHomeComponent as h, AXMDashboardManagementModule as i, AXMDashboardPopupService as j, AXMDashboardWidgetWrapperComponent as k, AXMMinimalWeatherViewComponent as l, AXPAdvancedWeatherWidget as m, AXPAnalogClockWidget as n, AXPBarChartWidget as o, AXPBarChartWidgetViewComponent as p, AXPClockCalendarWidget as q, AXPClockCalendarWidgetViewComponent as r, AXPDASHBOARD_ENTITY_CONTEXT_KEY as s, AXPDashboardWidgetComponent as t, AXPDonutChartWidget as u, AXPDonutChartWidgetViewComponent as v, AXPFunnelChartWidget as w, AXPFunnelChartWidgetViewComponent as x, AXPGaugeChartWidget as y, AXPGaugeChartWidgetViewComponent as z };
9104
+ //# sourceMappingURL=acorex-modules-dashboard-management-acorex-modules-dashboard-management-kph3UxDu.mjs.map