@acorex/modules 21.0.0-next.71 → 21.0.0-next.72

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 (421) hide show
  1. package/fesm2022/acorex-modules-ai-management.mjs +102 -6
  2. package/fesm2022/acorex-modules-ai-management.mjs.map +1 -1
  3. package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-BnfSTevp.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-D7bHX4-0.mjs} +50 -39
  4. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-D7bHX4-0.mjs.map +1 -0
  5. package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-BWMbcZFT.mjs → acorex-modules-assessment-management-assessment-case.entity-Cpbj5sCP.mjs} +2 -2
  6. package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-BWMbcZFT.mjs.map → acorex-modules-assessment-management-assessment-case.entity-Cpbj5sCP.mjs.map} +1 -1
  7. package/fesm2022/{acorex-modules-assessment-management-assessment-session-answers-view.util-B42XNJUV.mjs → acorex-modules-assessment-management-assessment-session-answers-view.util-ALsxM0ww.mjs} +2 -2
  8. package/fesm2022/{acorex-modules-assessment-management-assessment-session-answers-view.util-B42XNJUV.mjs.map → acorex-modules-assessment-management-assessment-session-answers-view.util-ALsxM0ww.mjs.map} +1 -1
  9. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-osEWRiw1.mjs → acorex-modules-assessment-management-assessment-session.entity-CMW7wsoN.mjs} +2 -2
  10. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-osEWRiw1.mjs.map → acorex-modules-assessment-management-assessment-session.entity-CMW7wsoN.mjs.map} +1 -1
  11. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-DIUV6Az-.mjs → acorex-modules-assessment-management-fill-assessment-session.command-C-dGKO7p.mjs} +2 -2
  12. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-DIUV6Az-.mjs.map → acorex-modules-assessment-management-fill-assessment-session.command-C-dGKO7p.mjs.map} +1 -1
  13. package/fesm2022/{acorex-modules-assessment-management-preview-question.command-B0kZz-BV.mjs → acorex-modules-assessment-management-preview-question.command-CBewUZSF.mjs} +2 -2
  14. package/fesm2022/{acorex-modules-assessment-management-preview-question.command-B0kZz-BV.mjs.map → acorex-modules-assessment-management-preview-question.command-CBewUZSF.mjs.map} +1 -1
  15. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BUUnlr7g.mjs → acorex-modules-assessment-management-preview-questionnaire.command-DlwBZ7mO.mjs} +2 -2
  16. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BUUnlr7g.mjs.map → acorex-modules-assessment-management-preview-questionnaire.command-DlwBZ7mO.mjs.map} +1 -1
  17. package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-BvqEePUh.mjs → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-BEhxeR8A.mjs} +2 -2
  18. package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-BvqEePUh.mjs.map → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-BEhxeR8A.mjs.map} +1 -1
  19. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-DZBQOgAg.mjs → acorex-modules-assessment-management-question-bank-item.entity-CfCWKqN5.mjs} +2 -2
  20. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-DZBQOgAg.mjs.map → acorex-modules-assessment-management-question-bank-item.entity-CfCWKqN5.mjs.map} +1 -1
  21. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-BMv-XkZk.mjs → acorex-modules-assessment-management-questionnaire-viewer-popup.component-C03wF6Oy.mjs} +2 -2
  22. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-BMv-XkZk.mjs.map → acorex-modules-assessment-management-questionnaire-viewer-popup.component-C03wF6Oy.mjs.map} +1 -1
  23. package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-BGkWU83k.mjs → acorex-modules-assessment-management-questionnaire.entity-CPMGkhGu.mjs} +2 -2
  24. package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-BGkWU83k.mjs.map → acorex-modules-assessment-management-questionnaire.entity-CPMGkhGu.mjs.map} +1 -1
  25. package/fesm2022/{acorex-modules-assessment-management-review-assessment-session.command-Bqi7YO0X.mjs → acorex-modules-assessment-management-review-assessment-session.command-XK3IK3MH.mjs} +3 -3
  26. package/fesm2022/{acorex-modules-assessment-management-review-assessment-session.command-Bqi7YO0X.mjs.map → acorex-modules-assessment-management-review-assessment-session.command-XK3IK3MH.mjs.map} +1 -1
  27. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-2LB7JKZx.mjs → acorex-modules-assessment-management-view-session-answers.command-BPoF0v9C.mjs} +3 -3
  28. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-2LB7JKZx.mjs.map → acorex-modules-assessment-management-view-session-answers.command-BPoF0v9C.mjs.map} +1 -1
  29. package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
  30. package/fesm2022/{acorex-modules-asset-management-acorex-modules-asset-management-BdiaXlkx.mjs → acorex-modules-asset-management-acorex-modules-asset-management-BCs0QS-r.mjs} +11 -8
  31. package/fesm2022/{acorex-modules-asset-management-acorex-modules-asset-management-BdiaXlkx.mjs.map → acorex-modules-asset-management-acorex-modules-asset-management-BCs0QS-r.mjs.map} +1 -1
  32. package/fesm2022/{acorex-modules-asset-management-asset-system-assignment.entity-Bf9nJTkD.mjs → acorex-modules-asset-management-asset-system-assignment.entity-B0sf4MzL.mjs} +2 -2
  33. package/fesm2022/{acorex-modules-asset-management-asset-system-assignment.entity-Bf9nJTkD.mjs.map → acorex-modules-asset-management-asset-system-assignment.entity-B0sf4MzL.mjs.map} +1 -1
  34. package/fesm2022/{acorex-modules-asset-management-asset-system-type.entity-Cbzu3bqC.mjs → acorex-modules-asset-management-asset-system-type.entity-Cpcgr3KS.mjs} +2 -2
  35. package/fesm2022/{acorex-modules-asset-management-asset-system-type.entity-Cbzu3bqC.mjs.map → acorex-modules-asset-management-asset-system-type.entity-Cpcgr3KS.mjs.map} +1 -1
  36. package/fesm2022/{acorex-modules-asset-management-asset-system.entity-DA7dO3eE.mjs → acorex-modules-asset-management-asset-system.entity-CEuEjyuQ.mjs} +2 -2
  37. package/fesm2022/{acorex-modules-asset-management-asset-system.entity-DA7dO3eE.mjs.map → acorex-modules-asset-management-asset-system.entity-CEuEjyuQ.mjs.map} +1 -1
  38. package/fesm2022/{acorex-modules-asset-management-asset-type-section-component.entity-C9B-TUQD.mjs → acorex-modules-asset-management-asset-type-section-component.entity-CwaPrUlk.mjs} +2 -2
  39. package/fesm2022/{acorex-modules-asset-management-asset-type-section-component.entity-C9B-TUQD.mjs.map → acorex-modules-asset-management-asset-type-section-component.entity-CwaPrUlk.mjs.map} +1 -1
  40. package/fesm2022/{acorex-modules-asset-management-asset-type-section.entity-BNz1Zfox.mjs → acorex-modules-asset-management-asset-type-section.entity-CK0dAIU4.mjs} +2 -2
  41. package/fesm2022/{acorex-modules-asset-management-asset-type-section.entity-BNz1Zfox.mjs.map → acorex-modules-asset-management-asset-type-section.entity-CK0dAIU4.mjs.map} +1 -1
  42. package/fesm2022/{acorex-modules-asset-management-asset-type.entity-D_bBxBKI.mjs → acorex-modules-asset-management-asset-type.entity-DexywYoA.mjs} +2 -2
  43. package/fesm2022/{acorex-modules-asset-management-asset-type.entity-D_bBxBKI.mjs.map → acorex-modules-asset-management-asset-type.entity-DexywYoA.mjs.map} +1 -1
  44. package/fesm2022/{acorex-modules-asset-management-asset.entity-Cf_H7edH.mjs → acorex-modules-asset-management-asset.entity-BNj3kuHC.mjs} +2 -2
  45. package/fesm2022/{acorex-modules-asset-management-asset.entity-Cf_H7edH.mjs.map → acorex-modules-asset-management-asset.entity-BNj3kuHC.mjs.map} +1 -1
  46. package/fesm2022/acorex-modules-asset-management.mjs +1 -1
  47. package/fesm2022/acorex-modules-auth-acorex-modules-auth-JEkso4J7.mjs +1580 -0
  48. package/fesm2022/acorex-modules-auth-acorex-modules-auth-JEkso4J7.mjs.map +1 -0
  49. package/fesm2022/{acorex-modules-auth-app-chooser.component-DTlzE1Rd.mjs → acorex-modules-auth-app-chooser.component-MjGWaBI0.mjs} +5 -6
  50. package/fesm2022/acorex-modules-auth-app-chooser.component-MjGWaBI0.mjs.map +1 -0
  51. package/fesm2022/acorex-modules-auth-change-password.command-Ctyw3WfE.mjs +32 -0
  52. package/fesm2022/acorex-modules-auth-change-password.command-Ctyw3WfE.mjs.map +1 -0
  53. package/fesm2022/acorex-modules-auth-change-photo.command-_vxTFH0X.mjs +32 -0
  54. package/fesm2022/acorex-modules-auth-change-photo.command-_vxTFH0X.mjs.map +1 -0
  55. package/fesm2022/acorex-modules-auth-edit-signature.command-CcTJJwAX.mjs +32 -0
  56. package/fesm2022/acorex-modules-auth-edit-signature.command-CcTJJwAX.mjs.map +1 -0
  57. package/fesm2022/{acorex-modules-auth-login.module-DSQfhKUZ.mjs → acorex-modules-auth-login.module-FJxkiTeX.mjs} +4 -4
  58. package/fesm2022/{acorex-modules-auth-login.module-DSQfhKUZ.mjs.map → acorex-modules-auth-login.module-FJxkiTeX.mjs.map} +1 -1
  59. package/fesm2022/{acorex-modules-auth-master.layout-BDM5XtcM.mjs → acorex-modules-auth-master.layout-B4Vpqg2F.mjs} +2 -2
  60. package/fesm2022/{acorex-modules-auth-master.layout-BDM5XtcM.mjs.map → acorex-modules-auth-master.layout-B4Vpqg2F.mjs.map} +1 -1
  61. package/fesm2022/{acorex-modules-auth-oauth-callback.component-C4Q78fuo.mjs → acorex-modules-auth-oauth-callback.component-It5tkYuf.mjs} +2 -2
  62. package/fesm2022/{acorex-modules-auth-oauth-callback.component-C4Q78fuo.mjs.map → acorex-modules-auth-oauth-callback.component-It5tkYuf.mjs.map} +1 -1
  63. package/fesm2022/{acorex-modules-auth-user-sessions.component-ChF8OYdd.mjs → acorex-modules-auth-open-sessions.command-Qik0eKUR.mjs} +32 -7
  64. package/fesm2022/acorex-modules-auth-open-sessions.command-Qik0eKUR.mjs.map +1 -0
  65. package/fesm2022/{acorex-modules-auth-password.component-C_55t9er.mjs → acorex-modules-auth-password.component-B2BIaXZ_.mjs} +2 -2
  66. package/fesm2022/{acorex-modules-auth-password.component-C_55t9er.mjs.map → acorex-modules-auth-password.component-B2BIaXZ_.mjs.map} +1 -1
  67. package/fesm2022/{acorex-modules-auth-password.component-VwEsbfR1.mjs → acorex-modules-auth-password.component-BRnlp4j1.mjs} +6 -6
  68. package/fesm2022/{acorex-modules-auth-password.component-VwEsbfR1.mjs.map → acorex-modules-auth-password.component-BRnlp4j1.mjs.map} +1 -1
  69. package/fesm2022/acorex-modules-auth-profile-activity-chart.component-CmtkTEI5.mjs +177 -0
  70. package/fesm2022/acorex-modules-auth-profile-activity-chart.component-CmtkTEI5.mjs.map +1 -0
  71. package/fesm2022/acorex-modules-auth-profile-coming-soon.command-DBbFbzAx.mjs +31 -0
  72. package/fesm2022/acorex-modules-auth-profile-coming-soon.command-DBbFbzAx.mjs.map +1 -0
  73. package/fesm2022/acorex-modules-auth-profile-delete-account-danger-zone.component-62K4A_lM.mjs +78 -0
  74. package/fesm2022/acorex-modules-auth-profile-delete-account-danger-zone.component-62K4A_lM.mjs.map +1 -0
  75. package/fesm2022/acorex-modules-auth-profile-page-component.provider-Dz9yFSnA.mjs +27 -0
  76. package/fesm2022/acorex-modules-auth-profile-page-component.provider-Dz9yFSnA.mjs.map +1 -0
  77. package/fesm2022/acorex-modules-auth-profile-page.component-BGkPr1_o.mjs +370 -0
  78. package/fesm2022/acorex-modules-auth-profile-page.component-BGkPr1_o.mjs.map +1 -0
  79. package/fesm2022/{acorex-modules-auth-routes-prPiMAL6.mjs → acorex-modules-auth-routes-D6PLdcTC.mjs} +2 -2
  80. package/fesm2022/{acorex-modules-auth-routes-prPiMAL6.mjs.map → acorex-modules-auth-routes-D6PLdcTC.mjs.map} +1 -1
  81. package/fesm2022/acorex-modules-auth-signout-command-IUSkq50M.mjs +24 -0
  82. package/fesm2022/acorex-modules-auth-signout-command-IUSkq50M.mjs.map +1 -0
  83. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-DVyI9cGU.mjs → acorex-modules-auth-tenant-chooser.component-qGfNSQ6H.mjs} +2 -2
  84. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-DVyI9cGU.mjs.map → acorex-modules-auth-tenant-chooser.component-qGfNSQ6H.mjs.map} +1 -1
  85. package/fesm2022/{acorex-modules-auth-two-factor.module-C7vZrBHK.mjs → acorex-modules-auth-two-factor.module-DcvqZOIq.mjs} +2 -2
  86. package/fesm2022/{acorex-modules-auth-two-factor.module-C7vZrBHK.mjs.map → acorex-modules-auth-two-factor.module-DcvqZOIq.mjs.map} +1 -1
  87. package/fesm2022/acorex-modules-auth.mjs +1 -1
  88. package/fesm2022/acorex-modules-business-core.mjs +2 -2
  89. package/fesm2022/acorex-modules-business-core.mjs.map +1 -1
  90. package/fesm2022/acorex-modules-calendar-management-datasource.provider-CnxTy81J.mjs +225 -0
  91. package/fesm2022/acorex-modules-calendar-management-datasource.provider-CnxTy81J.mjs.map +1 -0
  92. package/fesm2022/acorex-modules-calendar-management.mjs +481 -392
  93. package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
  94. package/fesm2022/acorex-modules-common.mjs +63 -26
  95. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  96. package/fesm2022/{acorex-modules-conversation-acorex-modules-conversation-B1ijk48q.mjs → acorex-modules-conversation-acorex-modules-conversation-BX09r8Xj.mjs} +178 -35
  97. package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-BX09r8Xj.mjs.map +1 -0
  98. package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Mlan0ADR.mjs → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-hMiSfvL2.mjs} +5 -5
  99. package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-Mlan0ADR.mjs.map → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-hMiSfvL2.mjs.map} +1 -1
  100. package/fesm2022/{acorex-modules-conversation-comments-page.component--Q5RxEyI.mjs → acorex-modules-conversation-comments-page.component-BJu6CoNR.mjs} +18 -6
  101. package/fesm2022/acorex-modules-conversation-comments-page.component-BJu6CoNR.mjs.map +1 -0
  102. package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command--_hCn9Et.mjs → acorex-modules-conversation-send-assist-chat-message.command-B471NQRh.mjs} +2 -2
  103. package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command--_hCn9Et.mjs.map → acorex-modules-conversation-send-assist-chat-message.command-B471NQRh.mjs.map} +1 -1
  104. package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-BE1BPjj2.mjs → acorex-modules-conversation-start-assist-chat.command-CasClVbR.mjs} +2 -2
  105. package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-BE1BPjj2.mjs.map → acorex-modules-conversation-start-assist-chat.command-CasClVbR.mjs.map} +1 -1
  106. package/fesm2022/acorex-modules-conversation.mjs +1 -1
  107. package/fesm2022/{acorex-modules-dashboard-management-acorex-modules-dashboard-management-DJMJFziT.mjs → acorex-modules-dashboard-management-acorex-modules-dashboard-management-9MoalNjW.mjs} +6 -6
  108. package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-9MoalNjW.mjs.map +1 -0
  109. package/fesm2022/{acorex-modules-dashboard-management-index-DoTVg9ro.mjs → acorex-modules-dashboard-management-index-Dsu3Yw8O.mjs} +2 -2
  110. package/fesm2022/{acorex-modules-dashboard-management-index-DoTVg9ro.mjs.map → acorex-modules-dashboard-management-index-Dsu3Yw8O.mjs.map} +1 -1
  111. package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
  112. package/fesm2022/{acorex-modules-data-management-index-DEm_BsbE.mjs → acorex-modules-data-management-index-CxVSgxTM.mjs} +4 -1
  113. package/fesm2022/acorex-modules-data-management-index-CxVSgxTM.mjs.map +1 -0
  114. package/fesm2022/acorex-modules-data-management.mjs +2 -2
  115. package/fesm2022/acorex-modules-document-management.mjs +6 -3
  116. package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
  117. package/fesm2022/acorex-modules-financial-core.mjs +7 -7
  118. package/fesm2022/acorex-modules-financial-core.mjs.map +1 -1
  119. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-C1lNgBrC.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-Cb7_mEJt.mjs} +71 -26
  120. package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-Cb7_mEJt.mjs.map +1 -0
  121. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-CDBhDXr8.mjs → acorex-modules-human-capital-management-approve-leave-request.command-wO2u1IKg.mjs} +2 -2
  122. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-CDBhDXr8.mjs.map → acorex-modules-human-capital-management-approve-leave-request.command-wO2u1IKg.mjs.map} +1 -1
  123. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-pz0IOxa3.mjs → acorex-modules-human-capital-management-assign-position-assignment.command-BDesaehJ.mjs} +2 -2
  124. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-pz0IOxa3.mjs.map → acorex-modules-human-capital-management-assign-position-assignment.command-BDesaehJ.mjs.map} +1 -1
  125. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-Czwdu-nH.mjs → acorex-modules-human-capital-management-cancel-leave-request.command-D8u45bHk.mjs} +2 -2
  126. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-Czwdu-nH.mjs.map → acorex-modules-human-capital-management-cancel-leave-request.command-D8u45bHk.mjs.map} +1 -1
  127. package/fesm2022/{acorex-modules-human-capital-management-employee.entity-ZTRqQfRv.mjs → acorex-modules-human-capital-management-employee.entity-sq1G--OE.mjs} +3 -3
  128. package/fesm2022/acorex-modules-human-capital-management-employee.entity-sq1G--OE.mjs.map +1 -0
  129. package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-BIIc7EpP.mjs → acorex-modules-human-capital-management-employment-type.entity-qgNm-AAZ.mjs} +2 -2
  130. package/fesm2022/{acorex-modules-human-capital-management-employment-type.entity-BIIc7EpP.mjs.map → acorex-modules-human-capital-management-employment-type.entity-qgNm-AAZ.mjs.map} +1 -1
  131. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-Bmv7oLAr.mjs → acorex-modules-human-capital-management-leave-request.entity-DcdYnwyN.mjs} +2 -2
  132. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-Bmv7oLAr.mjs.map → acorex-modules-human-capital-management-leave-request.entity-DcdYnwyN.mjs.map} +1 -1
  133. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-OwdxjYKk.mjs → acorex-modules-human-capital-management-leave-type.entity-Dr5YHs8p.mjs} +2 -2
  134. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-OwdxjYKk.mjs.map → acorex-modules-human-capital-management-leave-type.entity-Dr5YHs8p.mjs.map} +1 -1
  135. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event-type.entity-C_XVrmZt.mjs → acorex-modules-human-capital-management-lifecycle-event-type.entity-Bni4vgt5.mjs} +2 -2
  136. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event-type.entity-C_XVrmZt.mjs.map → acorex-modules-human-capital-management-lifecycle-event-type.entity-Bni4vgt5.mjs.map} +1 -1
  137. package/fesm2022/{acorex-modules-human-capital-management-lifecycle-event.entity-BwLAEtqA.mjs → acorex-modules-human-capital-management-lifecycle-event.entity-ds4Iq82f.mjs} +5 -5
  138. package/fesm2022/acorex-modules-human-capital-management-lifecycle-event.entity-ds4Iq82f.mjs.map +1 -0
  139. package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-DdMmiGbn.mjs → acorex-modules-human-capital-management-position-assignment.entity-CalDJQrD.mjs} +2 -2
  140. package/fesm2022/{acorex-modules-human-capital-management-position-assignment.entity-DdMmiGbn.mjs.map → acorex-modules-human-capital-management-position-assignment.entity-CalDJQrD.mjs.map} +1 -1
  141. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-Bdwwkcs3.mjs → acorex-modules-human-capital-management-reject-leave-request.command-CshyWVLH.mjs} +2 -2
  142. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-Bdwwkcs3.mjs.map → acorex-modules-human-capital-management-reject-leave-request.command-CshyWVLH.mjs.map} +1 -1
  143. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-Cq-aA79w.mjs → acorex-modules-human-capital-management-revoke-position-assignment.command-BENxT4Qg.mjs} +2 -2
  144. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-Cq-aA79w.mjs.map → acorex-modules-human-capital-management-revoke-position-assignment.command-BENxT4Qg.mjs.map} +1 -1
  145. package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-Cx9TRMlY.mjs → acorex-modules-human-capital-management-start-leave-request-flow.command-DjkzwxHN.mjs} +17 -5
  146. package/fesm2022/acorex-modules-human-capital-management-start-leave-request-flow.command-DjkzwxHN.mjs.map +1 -0
  147. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-DjepuAcu.mjs → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-x8J2kneo.mjs} +2 -2
  148. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-DjepuAcu.mjs.map → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-x8J2kneo.mjs.map} +1 -1
  149. package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
  150. package/fesm2022/{acorex-modules-learning-management-course.entity-DUUgeikJ.mjs → acorex-modules-learning-management-course.entity-BG6TaQk4.mjs} +4 -4
  151. package/fesm2022/acorex-modules-learning-management-course.entity-BG6TaQk4.mjs.map +1 -0
  152. package/fesm2022/{acorex-modules-learning-management-enrollment.entity-CdJafrUh.mjs → acorex-modules-learning-management-enrollment.entity-DjpUDcLv.mjs} +5 -5
  153. package/fesm2022/acorex-modules-learning-management-enrollment.entity-DjpUDcLv.mjs.map +1 -0
  154. package/fesm2022/{acorex-modules-learning-management-learning-path.entity-Zo--bDto.mjs → acorex-modules-learning-management-learning-path.entity-C2S0VVeq.mjs} +2 -2
  155. package/fesm2022/acorex-modules-learning-management-learning-path.entity-C2S0VVeq.mjs.map +1 -0
  156. package/fesm2022/{acorex-modules-learning-management-skill.entity-VXkLbaD4.mjs → acorex-modules-learning-management-skill.entity-DAM-_nuT.mjs} +2 -2
  157. package/fesm2022/acorex-modules-learning-management-skill.entity-DAM-_nuT.mjs.map +1 -0
  158. package/fesm2022/{acorex-modules-learning-management-training.entity-C4KDv1uh.mjs → acorex-modules-learning-management-training.entity-THsY3DiM.mjs} +4 -4
  159. package/fesm2022/acorex-modules-learning-management-training.entity-THsY3DiM.mjs.map +1 -0
  160. package/fesm2022/acorex-modules-learning-management.mjs +5 -5
  161. package/fesm2022/{acorex-modules-locale-management-profiles-BOveGIcE.mjs → acorex-modules-locale-management-profiles-BYZa_Ti0.mjs} +23 -8
  162. package/fesm2022/acorex-modules-locale-management-profiles-BYZa_Ti0.mjs.map +1 -0
  163. package/fesm2022/acorex-modules-locale-management.mjs +31 -15
  164. package/fesm2022/acorex-modules-locale-management.mjs.map +1 -1
  165. package/fesm2022/acorex-modules-location-management.mjs +4 -4
  166. package/fesm2022/acorex-modules-location-management.mjs.map +1 -1
  167. package/fesm2022/{acorex-modules-maintenance-management-acorex-modules-maintenance-management-DiM2aFgg.mjs → acorex-modules-maintenance-management-acorex-modules-maintenance-management-Xyu3jpEh.mjs} +14 -14
  168. package/fesm2022/acorex-modules-maintenance-management-acorex-modules-maintenance-management-Xyu3jpEh.mjs.map +1 -0
  169. package/fesm2022/{acorex-modules-maintenance-management-failure-effect.entity-BCMeHmxS.mjs → acorex-modules-maintenance-management-failure-effect.entity-CYQ3ExC3.mjs} +2 -2
  170. package/fesm2022/{acorex-modules-maintenance-management-failure-effect.entity-BCMeHmxS.mjs.map → acorex-modules-maintenance-management-failure-effect.entity-CYQ3ExC3.mjs.map} +1 -1
  171. package/fesm2022/{acorex-modules-maintenance-management-failure-mode-asset-type.entity-ByBoVQ8D.mjs → acorex-modules-maintenance-management-failure-mode-asset-type.entity-Cz0tQkwZ.mjs} +2 -2
  172. package/fesm2022/{acorex-modules-maintenance-management-failure-mode-asset-type.entity-ByBoVQ8D.mjs.map → acorex-modules-maintenance-management-failure-mode-asset-type.entity-Cz0tQkwZ.mjs.map} +1 -1
  173. package/fesm2022/{acorex-modules-maintenance-management-failure-mode-mechanism.entity-BJs4KhkU.mjs → acorex-modules-maintenance-management-failure-mode-mechanism.entity-vqX88zIA.mjs} +2 -2
  174. package/fesm2022/{acorex-modules-maintenance-management-failure-mode-mechanism.entity-BJs4KhkU.mjs.map → acorex-modules-maintenance-management-failure-mode-mechanism.entity-vqX88zIA.mjs.map} +1 -1
  175. package/fesm2022/{acorex-modules-maintenance-management-failure-mode-solution.entity-rw24sQxb.mjs → acorex-modules-maintenance-management-failure-mode-solution.entity-CpefPKAY.mjs} +2 -2
  176. package/fesm2022/{acorex-modules-maintenance-management-failure-mode-solution.entity-rw24sQxb.mjs.map → acorex-modules-maintenance-management-failure-mode-solution.entity-CpefPKAY.mjs.map} +1 -1
  177. package/fesm2022/{acorex-modules-maintenance-management-failure-register-cause.entity-C_6sjW8z.mjs → acorex-modules-maintenance-management-failure-register-cause.entity-C1_4BQBR.mjs} +2 -2
  178. package/fesm2022/{acorex-modules-maintenance-management-failure-register-cause.entity-C_6sjW8z.mjs.map → acorex-modules-maintenance-management-failure-register-cause.entity-C1_4BQBR.mjs.map} +1 -1
  179. package/fesm2022/{acorex-modules-maintenance-management-failure-register-effect.entity-DCIAzSYQ.mjs → acorex-modules-maintenance-management-failure-register-effect.entity-BRssxEl6.mjs} +2 -2
  180. package/fesm2022/{acorex-modules-maintenance-management-failure-register-effect.entity-DCIAzSYQ.mjs.map → acorex-modules-maintenance-management-failure-register-effect.entity-BRssxEl6.mjs.map} +1 -1
  181. package/fesm2022/{acorex-modules-maintenance-management-failure-register-mechanism.entity-DlXr6A4i.mjs → acorex-modules-maintenance-management-failure-register-mechanism.entity-YyBWG00N.mjs} +2 -2
  182. package/fesm2022/{acorex-modules-maintenance-management-failure-register-mechanism.entity-DlXr6A4i.mjs.map → acorex-modules-maintenance-management-failure-register-mechanism.entity-YyBWG00N.mjs.map} +1 -1
  183. package/fesm2022/{acorex-modules-maintenance-management-failure-register.entity-C4J3um7j.mjs → acorex-modules-maintenance-management-failure-register.entity-CH-C6Q7m.mjs} +2 -2
  184. package/fesm2022/{acorex-modules-maintenance-management-failure-register.entity-C4J3um7j.mjs.map → acorex-modules-maintenance-management-failure-register.entity-CH-C6Q7m.mjs.map} +1 -1
  185. package/fesm2022/{acorex-modules-maintenance-management-failure-severity.entity-C-spQtYx.mjs → acorex-modules-maintenance-management-failure-severity.entity-BMoUEcVC.mjs} +2 -2
  186. package/fesm2022/{acorex-modules-maintenance-management-failure-severity.entity-C-spQtYx.mjs.map → acorex-modules-maintenance-management-failure-severity.entity-BMoUEcVC.mjs.map} +1 -1
  187. package/fesm2022/{acorex-modules-maintenance-management-maintenance-template.entity-Huahnjhd.mjs → acorex-modules-maintenance-management-maintenance-template.entity-CBayAtRD.mjs} +2 -2
  188. package/fesm2022/{acorex-modules-maintenance-management-maintenance-template.entity-Huahnjhd.mjs.map → acorex-modules-maintenance-management-maintenance-template.entity-CBayAtRD.mjs.map} +1 -1
  189. package/fesm2022/{acorex-modules-maintenance-management-work-order-list-command-1YsWctqu.mjs → acorex-modules-maintenance-management-work-order-list-command-mMZGiG3q.mjs} +2 -2
  190. package/fesm2022/{acorex-modules-maintenance-management-work-order-list-command-1YsWctqu.mjs.map → acorex-modules-maintenance-management-work-order-list-command-mMZGiG3q.mjs.map} +1 -1
  191. package/fesm2022/acorex-modules-maintenance-management.mjs +1 -1
  192. package/fesm2022/acorex-modules-measurement-core.mjs +4 -4
  193. package/fesm2022/acorex-modules-measurement-core.mjs.map +1 -1
  194. package/fesm2022/acorex-modules-notification-management-acorex-modules-notification-management-BSf1wd6j.mjs +3836 -0
  195. package/fesm2022/acorex-modules-notification-management-acorex-modules-notification-management-BSf1wd6j.mjs.map +1 -0
  196. package/fesm2022/acorex-modules-notification-management-notification-page.component-ATFOFL7C.mjs +548 -0
  197. package/fesm2022/acorex-modules-notification-management-notification-page.component-ATFOFL7C.mjs.map +1 -0
  198. package/fesm2022/acorex-modules-notification-management.mjs +1 -3590
  199. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  200. package/fesm2022/{acorex-modules-order-management-bulk-buy-order-item.entity-DGtHoqqj.mjs → acorex-modules-order-management-bulk-buy-order-item.entity-63BpszqL.mjs} +2 -2
  201. package/fesm2022/acorex-modules-order-management-bulk-buy-order-item.entity-63BpszqL.mjs.map +1 -0
  202. package/fesm2022/{acorex-modules-order-management-entity.provider-DVHBXOCD.mjs → acorex-modules-order-management-entity.provider-DGwVhM91.mjs} +3 -3
  203. package/fesm2022/{acorex-modules-order-management-entity.provider-DVHBXOCD.mjs.map → acorex-modules-order-management-entity.provider-DGwVhM91.mjs.map} +1 -1
  204. package/fesm2022/{acorex-modules-order-management-member-order-line.entity-DZJ90WHI.mjs → acorex-modules-order-management-member-order-line.entity-Czu7qE7i.mjs} +2 -2
  205. package/fesm2022/acorex-modules-order-management-member-order-line.entity-Czu7qE7i.mjs.map +1 -0
  206. package/fesm2022/acorex-modules-order-management.mjs +2 -2
  207. package/fesm2022/{acorex-modules-organization-management-acorex-modules-organization-management-Iopv_G-d.mjs → acorex-modules-organization-management-acorex-modules-organization-management-smWojO0l.mjs} +40 -40
  208. package/fesm2022/{acorex-modules-organization-management-acorex-modules-organization-management-Iopv_G-d.mjs.map → acorex-modules-organization-management-acorex-modules-organization-management-smWojO0l.mjs.map} +1 -1
  209. package/fesm2022/{acorex-modules-organization-management-add-business-unit-to-business-unit.command-D7NChP_A.mjs → acorex-modules-organization-management-add-business-unit-to-business-unit.command-BLifgeRF.mjs} +2 -2
  210. package/fesm2022/{acorex-modules-organization-management-add-business-unit-to-business-unit.command-D7NChP_A.mjs.map → acorex-modules-organization-management-add-business-unit-to-business-unit.command-BLifgeRF.mjs.map} +1 -1
  211. package/fesm2022/{acorex-modules-organization-management-add-position-to-business-unit.command-PkeqXFt1.mjs → acorex-modules-organization-management-add-position-to-business-unit.command-CKFqYBLD.mjs} +2 -2
  212. package/fesm2022/{acorex-modules-organization-management-add-position-to-business-unit.command-PkeqXFt1.mjs.map → acorex-modules-organization-management-add-position-to-business-unit.command-CKFqYBLD.mjs.map} +1 -1
  213. package/fesm2022/{acorex-modules-organization-management-add-team-to-business-unit.command-jalyX-F4.mjs → acorex-modules-organization-management-add-team-to-business-unit.command-DfaLXvTw.mjs} +2 -2
  214. package/fesm2022/{acorex-modules-organization-management-add-team-to-business-unit.command-jalyX-F4.mjs.map → acorex-modules-organization-management-add-team-to-business-unit.command-DfaLXvTw.mjs.map} +1 -1
  215. package/fesm2022/{acorex-modules-organization-management-business-unit.entity-CBjAC9Ip.mjs → acorex-modules-organization-management-business-unit.entity-BkeFPaIT.mjs} +2 -2
  216. package/fesm2022/{acorex-modules-organization-management-business-unit.entity-CBjAC9Ip.mjs.map → acorex-modules-organization-management-business-unit.entity-BkeFPaIT.mjs.map} +1 -1
  217. package/fesm2022/{acorex-modules-organization-management-chart.entity-CaY_5LGN.mjs → acorex-modules-organization-management-chart.entity-bWx4IFSv.mjs} +2 -2
  218. package/fesm2022/{acorex-modules-organization-management-chart.entity-CaY_5LGN.mjs.map → acorex-modules-organization-management-chart.entity-bWx4IFSv.mjs.map} +1 -1
  219. package/fesm2022/{acorex-modules-organization-management-company.entity-BUBhqyCn.mjs → acorex-modules-organization-management-company.entity-yPUVhIzy.mjs} +2 -2
  220. package/fesm2022/{acorex-modules-organization-management-company.entity-BUBhqyCn.mjs.map → acorex-modules-organization-management-company.entity-yPUVhIzy.mjs.map} +1 -1
  221. package/fesm2022/{acorex-modules-organization-management-entity.provider-BZsy_wi6.mjs → acorex-modules-organization-management-entity.provider-IhJwnzd-.mjs} +15 -15
  222. package/fesm2022/{acorex-modules-organization-management-entity.provider-BZsy_wi6.mjs.map → acorex-modules-organization-management-entity.provider-IhJwnzd-.mjs.map} +1 -1
  223. package/fesm2022/{acorex-modules-organization-management-feature-definition.provider-CEO1nSFP.mjs → acorex-modules-organization-management-feature-definition.provider-B5yqFa4Z.mjs} +2 -2
  224. package/fesm2022/{acorex-modules-organization-management-feature-definition.provider-CEO1nSFP.mjs.map → acorex-modules-organization-management-feature-definition.provider-B5yqFa4Z.mjs.map} +1 -1
  225. package/fesm2022/{acorex-modules-organization-management-job-definition-pages-component.provider-ChRGp5ZI.mjs → acorex-modules-organization-management-job-definition-pages-component.provider-C51sgWyG.mjs} +3 -3
  226. package/fesm2022/{acorex-modules-organization-management-job-definition-pages-component.provider-ChRGp5ZI.mjs.map → acorex-modules-organization-management-job-definition-pages-component.provider-C51sgWyG.mjs.map} +1 -1
  227. package/fesm2022/{acorex-modules-organization-management-job-definition-responsibilities-page.component-aWZO09Xw.mjs → acorex-modules-organization-management-job-definition-responsibilities-page.component-EEWB5VUq.mjs} +8 -3
  228. package/fesm2022/acorex-modules-organization-management-job-definition-responsibilities-page.component-EEWB5VUq.mjs.map +1 -0
  229. package/fesm2022/{acorex-modules-organization-management-job-definition-skills-page.component-DJcFhQM9.mjs → acorex-modules-organization-management-job-definition-skills-page.component-L2GmFRra.mjs} +7 -2
  230. package/fesm2022/acorex-modules-organization-management-job-definition-skills-page.component-L2GmFRra.mjs.map +1 -0
  231. package/fesm2022/{acorex-modules-organization-management-job-definition.entity-BoM49wYi.mjs → acorex-modules-organization-management-job-definition.entity-CDXsJADe.mjs} +2 -2
  232. package/fesm2022/{acorex-modules-organization-management-job-definition.entity-BoM49wYi.mjs.map → acorex-modules-organization-management-job-definition.entity-CDXsJADe.mjs.map} +1 -1
  233. package/fesm2022/{acorex-modules-organization-management-job-level.datasource-DbQG79uR.mjs → acorex-modules-organization-management-job-level.datasource-C84zFgVo.mjs} +2 -2
  234. package/fesm2022/{acorex-modules-organization-management-job-level.datasource-DbQG79uR.mjs.map → acorex-modules-organization-management-job-level.datasource-C84zFgVo.mjs.map} +1 -1
  235. package/fesm2022/{acorex-modules-organization-management-job-level.entity-XO-NsBG-.mjs → acorex-modules-organization-management-job-level.entity-BqjP04k-.mjs} +2 -2
  236. package/fesm2022/{acorex-modules-organization-management-job-level.entity-XO-NsBG-.mjs.map → acorex-modules-organization-management-job-level.entity-BqjP04k-.mjs.map} +1 -1
  237. package/fesm2022/{acorex-modules-organization-management-menu.provider-DXW6aUIX.mjs → acorex-modules-organization-management-menu.provider-ChR3Rh4W.mjs} +2 -2
  238. package/fesm2022/{acorex-modules-organization-management-menu.provider-DXW6aUIX.mjs.map → acorex-modules-organization-management-menu.provider-ChR3Rh4W.mjs.map} +1 -1
  239. package/fesm2022/{acorex-modules-organization-management-org-chart-default-node-contribution.provider-ClKr6K6Y.mjs → acorex-modules-organization-management-org-chart-default-node-contribution.provider-DFVts4Q2.mjs} +2 -2
  240. package/fesm2022/{acorex-modules-organization-management-org-chart-default-node-contribution.provider-ClKr6K6Y.mjs.map → acorex-modules-organization-management-org-chart-default-node-contribution.provider-DFVts4Q2.mjs.map} +1 -1
  241. package/fesm2022/{acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-BjIDzwXF.mjs → acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-D1r0YQbL.mjs} +2 -2
  242. package/fesm2022/{acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-BjIDzwXF.mjs.map → acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-D1r0YQbL.mjs.map} +1 -1
  243. package/fesm2022/{acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-DRAlUmIa.mjs → acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Df1x_VF0.mjs} +2 -2
  244. package/fesm2022/{acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-DRAlUmIa.mjs.map → acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Df1x_VF0.mjs.map} +1 -1
  245. package/fesm2022/{acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DwSjov_Z.mjs → acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BPWFJSx2.mjs} +2 -2
  246. package/fesm2022/{acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DwSjov_Z.mjs.map → acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BPWFJSx2.mjs.map} +1 -1
  247. package/fesm2022/{acorex-modules-organization-management-org-chart.page-CuPEM-_N.mjs → acorex-modules-organization-management-org-chart.page-BzKPjJwY.mjs} +2 -2
  248. package/fesm2022/{acorex-modules-organization-management-org-chart.page-CuPEM-_N.mjs.map → acorex-modules-organization-management-org-chart.page-BzKPjJwY.mjs.map} +1 -1
  249. package/fesm2022/{acorex-modules-organization-management-permission-definition.provider-BNthP0QV.mjs → acorex-modules-organization-management-permission-definition.provider-DShSa-Wp.mjs} +2 -2
  250. package/fesm2022/{acorex-modules-organization-management-permission-definition.provider-BNthP0QV.mjs.map → acorex-modules-organization-management-permission-definition.provider-DShSa-Wp.mjs.map} +1 -1
  251. package/fesm2022/{acorex-modules-organization-management-position.entity-Cja3CYmL.mjs → acorex-modules-organization-management-position.entity-DyF02saN.mjs} +2 -2
  252. package/fesm2022/{acorex-modules-organization-management-position.entity-Cja3CYmL.mjs.map → acorex-modules-organization-management-position.entity-DyF02saN.mjs.map} +1 -1
  253. package/fesm2022/{acorex-modules-organization-management-remove-position-from-business-unit.command-Dm1a6-uO.mjs → acorex-modules-organization-management-remove-position-from-business-unit.command-CGYBDMLJ.mjs} +2 -2
  254. package/fesm2022/{acorex-modules-organization-management-remove-position-from-business-unit.command-Dm1a6-uO.mjs.map → acorex-modules-organization-management-remove-position-from-business-unit.command-CGYBDMLJ.mjs.map} +1 -1
  255. package/fesm2022/{acorex-modules-organization-management-replace-position-assignee.command-BWtzQZyW.mjs → acorex-modules-organization-management-replace-position-assignee.command-DgR5-k3v.mjs} +2 -2
  256. package/fesm2022/{acorex-modules-organization-management-replace-position-assignee.command-BWtzQZyW.mjs.map → acorex-modules-organization-management-replace-position-assignee.command-DgR5-k3v.mjs.map} +1 -1
  257. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-C4W0VlL5.mjs → acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-oqrqfc2t.mjs} +2 -2
  258. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-C4W0VlL5.mjs.map → acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-oqrqfc2t.mjs.map} +1 -1
  259. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-view.component-CaPqjai7.mjs → acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BEZm8HRq.mjs} +2 -2
  260. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-view.component-CaPqjai7.mjs.map → acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BEZm8HRq.mjs.map} +1 -1
  261. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix.component-nJuP6fA0.mjs → acorex-modules-organization-management-responsibilities-matrix.component-CBfTsRx4.mjs} +2 -2
  262. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix.component-nJuP6fA0.mjs.map → acorex-modules-organization-management-responsibilities-matrix.component-CBfTsRx4.mjs.map} +1 -1
  263. package/fesm2022/{acorex-modules-organization-management-responsibility-level.entity-CvvzIjvE.mjs → acorex-modules-organization-management-responsibility-level.entity-BAm1en5A.mjs} +2 -2
  264. package/fesm2022/{acorex-modules-organization-management-responsibility-level.entity-CvvzIjvE.mjs.map → acorex-modules-organization-management-responsibility-level.entity-BAm1en5A.mjs.map} +1 -1
  265. package/fesm2022/{acorex-modules-organization-management-responsibility.entity-Cc0Ou-hc.mjs → acorex-modules-organization-management-responsibility.entity-DTCMbqNy.mjs} +2 -2
  266. package/fesm2022/{acorex-modules-organization-management-responsibility.entity-Cc0Ou-hc.mjs.map → acorex-modules-organization-management-responsibility.entity-DTCMbqNy.mjs.map} +1 -1
  267. package/fesm2022/{acorex-modules-organization-management-settings.provider-C33ZatCD.mjs → acorex-modules-organization-management-settings.provider-C6op-yff.mjs} +2 -2
  268. package/fesm2022/{acorex-modules-organization-management-settings.provider-C33ZatCD.mjs.map → acorex-modules-organization-management-settings.provider-C6op-yff.mjs.map} +1 -1
  269. package/fesm2022/{acorex-modules-organization-management-team-business-unit.entity-DGuF5ux1.mjs → acorex-modules-organization-management-team-business-unit.entity-B4Wra1YB.mjs} +3 -3
  270. package/fesm2022/acorex-modules-organization-management-team-business-unit.entity-B4Wra1YB.mjs.map +1 -0
  271. package/fesm2022/{acorex-modules-organization-management-team-member-role.entity-BMXkNavp.mjs → acorex-modules-organization-management-team-member-role.entity-CVH2m8uw.mjs} +2 -2
  272. package/fesm2022/{acorex-modules-organization-management-team-member-role.entity-BMXkNavp.mjs.map → acorex-modules-organization-management-team-member-role.entity-CVH2m8uw.mjs.map} +1 -1
  273. package/fesm2022/{acorex-modules-organization-management-team-member.entity-Deem7M3N.mjs → acorex-modules-organization-management-team-member.entity-By97LISn.mjs} +3 -3
  274. package/fesm2022/acorex-modules-organization-management-team-member.entity-By97LISn.mjs.map +1 -0
  275. package/fesm2022/{acorex-modules-organization-management-team.entity-CNmpaJ3F.mjs → acorex-modules-organization-management-team.entity-Cezsw5Vq.mjs} +2 -2
  276. package/fesm2022/{acorex-modules-organization-management-team.entity-CNmpaJ3F.mjs.map → acorex-modules-organization-management-team.entity-Cezsw5Vq.mjs.map} +1 -1
  277. package/fesm2022/acorex-modules-organization-management.mjs +1 -1
  278. package/fesm2022/acorex-modules-person-core.mjs +1 -1
  279. package/fesm2022/acorex-modules-person-core.mjs.map +1 -1
  280. package/fesm2022/acorex-modules-platform-dev-tools.mjs +3 -3
  281. package/fesm2022/acorex-modules-platform-dev-tools.mjs.map +1 -1
  282. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-Cbf1rlEK.mjs → acorex-modules-platform-management-acorex-modules-platform-management-LJBIjN39.mjs} +5 -5
  283. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-LJBIjN39.mjs.map +1 -0
  284. package/fesm2022/{acorex-modules-platform-management-menu-list.component-DIf_-oaM.mjs → acorex-modules-platform-management-menu-list.component-SXuHsuj0.mjs} +3 -3
  285. package/fesm2022/{acorex-modules-platform-management-menu-list.component-DIf_-oaM.mjs.map → acorex-modules-platform-management-menu-list.component-SXuHsuj0.mjs.map} +1 -1
  286. package/fesm2022/acorex-modules-platform-management.mjs +1 -1
  287. package/fesm2022/acorex-modules-procurement-management.mjs +2 -2
  288. package/fesm2022/acorex-modules-procurement-management.mjs.map +1 -1
  289. package/fesm2022/{acorex-modules-product-catalog-product-sku.entity-C3ynevYI.mjs → acorex-modules-product-catalog-product-sku.entity-DNgCnDtL.mjs} +2 -2
  290. package/fesm2022/acorex-modules-product-catalog-product-sku.entity-DNgCnDtL.mjs.map +1 -0
  291. package/fesm2022/{acorex-modules-product-catalog-product.entity-BbB7GAg7.mjs → acorex-modules-product-catalog-product.entity-CBwSFTL2.mjs} +2 -2
  292. package/fesm2022/acorex-modules-product-catalog-product.entity-CBwSFTL2.mjs.map +1 -0
  293. package/fesm2022/acorex-modules-product-catalog.mjs +2 -2
  294. package/fesm2022/acorex-modules-report-management.mjs +5 -5
  295. package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
  296. package/fesm2022/{acorex-modules-reservation-management-acorex-modules-reservation-management-BoUiTlmu.mjs → acorex-modules-reservation-management-acorex-modules-reservation-management-D7YtuAbZ.mjs} +7 -7
  297. package/fesm2022/{acorex-modules-reservation-management-acorex-modules-reservation-management-BoUiTlmu.mjs.map → acorex-modules-reservation-management-acorex-modules-reservation-management-D7YtuAbZ.mjs.map} +1 -1
  298. package/fesm2022/{acorex-modules-reservation-management-reservation-class-status.entity-D-ZdqKa8.mjs → acorex-modules-reservation-management-reservation-class-status.entity-D4insz8u.mjs} +2 -2
  299. package/fesm2022/{acorex-modules-reservation-management-reservation-class-status.entity-D-ZdqKa8.mjs.map → acorex-modules-reservation-management-reservation-class-status.entity-D4insz8u.mjs.map} +1 -1
  300. package/fesm2022/{acorex-modules-reservation-management-reservation-resource-type.entity-zPD-Psml.mjs → acorex-modules-reservation-management-reservation-resource-type.entity-Dn2CMqO9.mjs} +2 -2
  301. package/fesm2022/{acorex-modules-reservation-management-reservation-resource-type.entity-zPD-Psml.mjs.map → acorex-modules-reservation-management-reservation-resource-type.entity-Dn2CMqO9.mjs.map} +1 -1
  302. package/fesm2022/{acorex-modules-reservation-management-reservation-status-transition.entity-CQ85ZAGF.mjs → acorex-modules-reservation-management-reservation-status-transition.entity-CrwUrIrC.mjs} +2 -2
  303. package/fesm2022/{acorex-modules-reservation-management-reservation-status-transition.entity-CQ85ZAGF.mjs.map → acorex-modules-reservation-management-reservation-status-transition.entity-CrwUrIrC.mjs.map} +1 -1
  304. package/fesm2022/acorex-modules-reservation-management.mjs +1 -1
  305. package/fesm2022/acorex-modules-security-management.mjs +4 -4
  306. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  307. package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BfbVV7di.mjs → acorex-modules-settings-management-acorex-modules-settings-management-O8kBegUF.mjs} +136 -65
  308. package/fesm2022/acorex-modules-settings-management-acorex-modules-settings-management-O8kBegUF.mjs.map +1 -0
  309. package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-BBb5hqkc.mjs → acorex-modules-settings-management-permission-definition.provider-CU7SEx6v.mjs} +2 -2
  310. package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-BBb5hqkc.mjs.map → acorex-modules-settings-management-permission-definition.provider-CU7SEx6v.mjs.map} +1 -1
  311. package/fesm2022/{acorex-modules-settings-management-setting-page.component-Dn8CYgux.mjs → acorex-modules-settings-management-setting-page.component-D8_cjOzW.mjs} +181 -19
  312. package/fesm2022/acorex-modules-settings-management-setting-page.component-D8_cjOzW.mjs.map +1 -0
  313. package/fesm2022/{acorex-modules-settings-management-setting-view.component-B5jpPo9k.mjs → acorex-modules-settings-management-setting-view.component-DIvERzMC.mjs} +65 -17
  314. package/fesm2022/acorex-modules-settings-management-setting-view.component-DIvERzMC.mjs.map +1 -0
  315. package/fesm2022/acorex-modules-settings-management.mjs +1 -1
  316. package/fesm2022/acorex-modules-subscription-management.mjs +2 -2
  317. package/fesm2022/acorex-modules-subscription-management.mjs.map +1 -1
  318. package/fesm2022/{acorex-modules-task-management-acorex-modules-task-management-BB7eeaYX.mjs → acorex-modules-task-management-acorex-modules-task-management-Bp-9vZdR.mjs} +939 -383
  319. package/fesm2022/acorex-modules-task-management-acorex-modules-task-management-Bp-9vZdR.mjs.map +1 -0
  320. package/fesm2022/acorex-modules-task-management-task-board.page-Brgg9wJa.mjs +3368 -0
  321. package/fesm2022/acorex-modules-task-management-task-board.page-Brgg9wJa.mjs.map +1 -0
  322. package/fesm2022/acorex-modules-task-management.mjs +1 -1
  323. package/fesm2022/acorex-modules-tenant-management.mjs +2 -2
  324. package/fesm2022/acorex-modules-tenant-management.mjs.map +1 -1
  325. package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-gXP-srRO.mjs +5600 -0
  326. package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-gXP-srRO.mjs.map +1 -0
  327. package/fesm2022/{acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-B4DLmioy.mjs → acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-BW6kK9Av.mjs} +3 -3
  328. package/fesm2022/{acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-B4DLmioy.mjs.map → acorex-modules-workflow-management-activity-command-configurator-widget-edit.component-BW6kK9Av.mjs.map} +1 -1
  329. package/fesm2022/{acorex-modules-workflow-management-activity-definition.entity-B3DkgDQb.mjs → acorex-modules-workflow-management-activity-definition.entity-BlK-sL_3.mjs} +2 -2
  330. package/fesm2022/{acorex-modules-workflow-management-activity-definition.entity-B3DkgDQb.mjs.map → acorex-modules-workflow-management-activity-definition.entity-BlK-sL_3.mjs.map} +1 -1
  331. package/fesm2022/{acorex-modules-workflow-management-automation.entity-BigK8yE2.mjs → acorex-modules-workflow-management-automation.entity-C9q24TPu.mjs} +3 -3
  332. package/fesm2022/acorex-modules-workflow-management-automation.entity-C9q24TPu.mjs.map +1 -0
  333. package/fesm2022/{acorex-modules-workflow-management-index-1B7oRAKX.mjs → acorex-modules-workflow-management-index-BFdyFvcu.mjs} +8 -5
  334. package/fesm2022/acorex-modules-workflow-management-index-BFdyFvcu.mjs.map +1 -0
  335. package/fesm2022/{acorex-modules-workflow-management-index-DC_9M9dk.mjs → acorex-modules-workflow-management-index-BbVGViSE.mjs} +7 -163
  336. package/fesm2022/acorex-modules-workflow-management-index-BbVGViSE.mjs.map +1 -0
  337. package/fesm2022/{acorex-modules-workflow-management-index-34UZrsxw.mjs → acorex-modules-workflow-management-index-Bq5tBgif.mjs} +2 -2
  338. package/fesm2022/{acorex-modules-workflow-management-index-34UZrsxw.mjs.map → acorex-modules-workflow-management-index-Bq5tBgif.mjs.map} +1 -1
  339. package/fesm2022/{acorex-modules-workflow-management-index-CztICioV.mjs → acorex-modules-workflow-management-index-CIV7Abnc.mjs} +53 -5
  340. package/fesm2022/acorex-modules-workflow-management-index-CIV7Abnc.mjs.map +1 -0
  341. package/fesm2022/{acorex-modules-workflow-management-save-workflow-definition-activities.command-CGNwslcn.mjs → acorex-modules-workflow-management-save-workflow-definition-activities.command-B_tjSneV.mjs} +2 -2
  342. package/fesm2022/{acorex-modules-workflow-management-save-workflow-definition-activities.command-CGNwslcn.mjs.map → acorex-modules-workflow-management-save-workflow-definition-activities.command-B_tjSneV.mjs.map} +1 -1
  343. package/fesm2022/acorex-modules-workflow-management-workflow-activity-instance-rows.utils-L8W4ogSI.mjs +172 -0
  344. package/fesm2022/acorex-modules-workflow-management-workflow-activity-instance-rows.utils-L8W4ogSI.mjs.map +1 -0
  345. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-column.component-Cpi0Pq3n.mjs → acorex-modules-workflow-management-workflow-configurator-widget-column.component-CPOQZxsq.mjs} +2 -2
  346. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-column.component-Cpi0Pq3n.mjs.map → acorex-modules-workflow-management-workflow-configurator-widget-column.component-CPOQZxsq.mjs.map} +1 -1
  347. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-edit.component-RbwX6Nd_.mjs → acorex-modules-workflow-management-workflow-configurator-widget-edit.component-CqF3z8Xq.mjs} +2 -2
  348. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-edit.component-RbwX6Nd_.mjs.map → acorex-modules-workflow-management-workflow-configurator-widget-edit.component-CqF3z8Xq.mjs.map} +1 -1
  349. package/fesm2022/{acorex-modules-workflow-management-workflow-definition.entity-BfACGpo4.mjs → acorex-modules-workflow-management-workflow-definition.entity-BbnGGXZs.mjs} +2 -2
  350. package/fesm2022/{acorex-modules-workflow-management-workflow-definition.entity-BfACGpo4.mjs.map → acorex-modules-workflow-management-workflow-definition.entity-BbnGGXZs.mjs.map} +1 -1
  351. package/fesm2022/{acorex-modules-workflow-management-workflow-instance.entity-BnKT3Wgh.mjs → acorex-modules-workflow-management-workflow-instance.entity-Ci6c4VoI.mjs} +3 -3
  352. package/fesm2022/{acorex-modules-workflow-management-workflow-instance.entity-BnKT3Wgh.mjs.map → acorex-modules-workflow-management-workflow-instance.entity-Ci6c4VoI.mjs.map} +1 -1
  353. package/fesm2022/acorex-modules-workflow-management-workflow-run-history-popup.component-CJ0cRwUE.mjs +579 -0
  354. package/fesm2022/acorex-modules-workflow-management-workflow-run-history-popup.component-CJ0cRwUE.mjs.map +1 -0
  355. package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-CHv2_W75.mjs +285 -0
  356. package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-CHv2_W75.mjs.map +1 -0
  357. package/fesm2022/acorex-modules-workflow-management.mjs +1 -5358
  358. package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
  359. package/fesm2022/acorex-modules-workplacesafety-management-hazard-ppe-rule-status.provider-D1a0CBhs.mjs +42 -0
  360. package/fesm2022/acorex-modules-workplacesafety-management-hazard-ppe-rule-status.provider-D1a0CBhs.mjs.map +1 -0
  361. package/fesm2022/acorex-modules-workplacesafety-management-ppe-item-status.provider-VH_Bp0l5.mjs +70 -0
  362. package/fesm2022/acorex-modules-workplacesafety-management-ppe-item-status.provider-VH_Bp0l5.mjs.map +1 -0
  363. package/fesm2022/acorex-modules-workplacesafety-management.mjs +1229 -67
  364. package/fesm2022/acorex-modules-workplacesafety-management.mjs.map +1 -1
  365. package/package.json +2 -2
  366. package/types/acorex-modules-ai-management.d.ts +21 -2
  367. package/types/acorex-modules-asset-management.d.ts +1 -0
  368. package/types/acorex-modules-calendar-management.d.ts +61 -33
  369. package/types/acorex-modules-common.d.ts +1 -1
  370. package/types/acorex-modules-conversation.d.ts +40 -6
  371. package/types/acorex-modules-document-management.d.ts +2 -0
  372. package/types/acorex-modules-notification-management.d.ts +32 -3
  373. package/types/acorex-modules-settings-management.d.ts +12 -2
  374. package/types/acorex-modules-task-management.d.ts +196 -47
  375. package/types/acorex-modules-workflow-management.d.ts +23 -28
  376. package/types/acorex-modules-workplacesafety-management.d.ts +124 -4
  377. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-BnfSTevp.mjs.map +0 -1
  378. package/fesm2022/acorex-modules-auth-acorex-modules-auth-BKMD5v6t.mjs +0 -807
  379. package/fesm2022/acorex-modules-auth-acorex-modules-auth-BKMD5v6t.mjs.map +0 -1
  380. package/fesm2022/acorex-modules-auth-app-chooser.component-DTlzE1Rd.mjs.map +0 -1
  381. package/fesm2022/acorex-modules-auth-user-sessions.component-ChF8OYdd.mjs.map +0 -1
  382. package/fesm2022/acorex-modules-calendar-management-datasource.provider-C_iazC89.mjs +0 -95
  383. package/fesm2022/acorex-modules-calendar-management-datasource.provider-C_iazC89.mjs.map +0 -1
  384. package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-B1ijk48q.mjs.map +0 -1
  385. package/fesm2022/acorex-modules-conversation-comments-page.component--Q5RxEyI.mjs.map +0 -1
  386. package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-DJMJFziT.mjs.map +0 -1
  387. package/fesm2022/acorex-modules-data-management-index-DEm_BsbE.mjs.map +0 -1
  388. package/fesm2022/acorex-modules-human-capital-management-acorex-modules-human-capital-management-C1lNgBrC.mjs.map +0 -1
  389. package/fesm2022/acorex-modules-human-capital-management-employee.entity-ZTRqQfRv.mjs.map +0 -1
  390. package/fesm2022/acorex-modules-human-capital-management-lifecycle-event.entity-BwLAEtqA.mjs.map +0 -1
  391. package/fesm2022/acorex-modules-human-capital-management-start-leave-request-flow.command-Cx9TRMlY.mjs.map +0 -1
  392. package/fesm2022/acorex-modules-learning-management-course.entity-DUUgeikJ.mjs.map +0 -1
  393. package/fesm2022/acorex-modules-learning-management-enrollment.entity-CdJafrUh.mjs.map +0 -1
  394. package/fesm2022/acorex-modules-learning-management-learning-path.entity-Zo--bDto.mjs.map +0 -1
  395. package/fesm2022/acorex-modules-learning-management-skill.entity-VXkLbaD4.mjs.map +0 -1
  396. package/fesm2022/acorex-modules-learning-management-training.entity-C4KDv1uh.mjs.map +0 -1
  397. package/fesm2022/acorex-modules-locale-management-profiles-BOveGIcE.mjs.map +0 -1
  398. package/fesm2022/acorex-modules-maintenance-management-acorex-modules-maintenance-management-DiM2aFgg.mjs.map +0 -1
  399. package/fesm2022/acorex-modules-notification-management-notification-page.component-6YOiGgKm.mjs +0 -858
  400. package/fesm2022/acorex-modules-notification-management-notification-page.component-6YOiGgKm.mjs.map +0 -1
  401. package/fesm2022/acorex-modules-order-management-bulk-buy-order-item.entity-DGtHoqqj.mjs.map +0 -1
  402. package/fesm2022/acorex-modules-order-management-member-order-line.entity-DZJ90WHI.mjs.map +0 -1
  403. package/fesm2022/acorex-modules-organization-management-job-definition-responsibilities-page.component-aWZO09Xw.mjs.map +0 -1
  404. package/fesm2022/acorex-modules-organization-management-job-definition-skills-page.component-DJcFhQM9.mjs.map +0 -1
  405. package/fesm2022/acorex-modules-organization-management-team-business-unit.entity-DGuF5ux1.mjs.map +0 -1
  406. package/fesm2022/acorex-modules-organization-management-team-member.entity-Deem7M3N.mjs.map +0 -1
  407. package/fesm2022/acorex-modules-platform-management-acorex-modules-platform-management-Cbf1rlEK.mjs.map +0 -1
  408. package/fesm2022/acorex-modules-product-catalog-product-sku.entity-C3ynevYI.mjs.map +0 -1
  409. package/fesm2022/acorex-modules-product-catalog-product.entity-BbB7GAg7.mjs.map +0 -1
  410. package/fesm2022/acorex-modules-settings-management-acorex-modules-settings-management-BfbVV7di.mjs.map +0 -1
  411. package/fesm2022/acorex-modules-settings-management-setting-page.component-Dn8CYgux.mjs.map +0 -1
  412. package/fesm2022/acorex-modules-settings-management-setting-view.component-B5jpPo9k.mjs.map +0 -1
  413. package/fesm2022/acorex-modules-task-management-acorex-modules-task-management-BB7eeaYX.mjs.map +0 -1
  414. package/fesm2022/acorex-modules-task-management-task-board.page-BmUIngWk.mjs +0 -2284
  415. package/fesm2022/acorex-modules-task-management-task-board.page-BmUIngWk.mjs.map +0 -1
  416. package/fesm2022/acorex-modules-workflow-management-automation.entity-BigK8yE2.mjs.map +0 -1
  417. package/fesm2022/acorex-modules-workflow-management-index-1B7oRAKX.mjs.map +0 -1
  418. package/fesm2022/acorex-modules-workflow-management-index-CztICioV.mjs.map +0 -1
  419. package/fesm2022/acorex-modules-workflow-management-index-DC_9M9dk.mjs.map +0 -1
  420. package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-B4hEv2-a.mjs +0 -255
  421. package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-B4hEv2-a.mjs.map +0 -1
@@ -0,0 +1,3836 @@
1
+ import { createAllQueryView, AXPEntityQueryType, AXP_IN_APP_NOTIFICATION_SERVICE, AXP_PROTECTED_ROUTE_GUARDS, AXP_MENU_PROVIDER, AXPEntityCommandScope } from '@acorex/platform/common';
2
+ import { AXPWidgetsCatalog, AXPValueWidgetComponent, cloneProperty, AXPWidgetGroupEnum, AXPWidgetCoreModule, AXP_WIDGET_DEFINITION_PROVIDER } from '@acorex/platform/layout/widget-core';
3
+ import { AXMEntityCrudServiceImpl, entityMasterCrudActions, entityMasterRecordActions, AXPEntityDataSelectorService, AXPEntityDefinitionRegistryService, AXP_ENTITY_DEFINITION_LOADER, AXPEntityStorageService, AXPEntityDataProviderImpl } from '@acorex/platform/layout/entity';
4
+ import * as i0 from '@angular/core';
5
+ import { Injectable, NgModule, inject, signal, DestroyRef, computed, Injector, InjectionToken, viewChild, ViewContainerRef, input, output, afterNextRender, inputBinding, outputBinding, ChangeDetectionStrategy, Component, effect, ViewEncapsulation, ChangeDetectorRef } from '@angular/core';
6
+ import { AXPSessionService, AXP_PERMISSION_DEFINITION_PROVIDER } from '@acorex/platform/auth';
7
+ import { firstValueFrom, Subject, debounceTime } from 'rxjs';
8
+ import { AXPUserAvatarComponent, AXPStateMessageComponent, AXP_TASK_BADGE_PROVIDERS } from '@acorex/platform/layout/components';
9
+ import * as i1$2 from '@acorex/platform/core';
10
+ import { AXPComponentSlotModule, AXP_MODULE_MANIFEST_PROVIDER, AXPDataGenerator } from '@acorex/platform/core';
11
+ import { AXPRootLayoutComponent } from '@acorex/platform/themes/default';
12
+ import { Router, ROUTES } from '@angular/router';
13
+ import { AXPCommandService, provideCommandSetups } from '@acorex/platform/runtime';
14
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
15
+ import * as i4 from '@acorex/core/translation';
16
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
17
+ import * as i3$1 from '@acorex/components/badge';
18
+ import { AXBadgeModule } from '@acorex/components/badge';
19
+ import * as i1$1 from '@acorex/components/button';
20
+ import { AXButtonModule } from '@acorex/components/button';
21
+ import * as i1 from '@acorex/components/decorators';
22
+ import { AXDecoratorModule } from '@acorex/components/decorators';
23
+ import * as i4$1 from '@acorex/components/popover';
24
+ import { AXPopoverModule, AXPopoverComponent } from '@acorex/components/popover';
25
+ import * as i2$1 from '@acorex/components/tabs';
26
+ import { AXTabsModule } from '@acorex/components/tabs';
27
+ import { AXToastService } from '@acorex/components/toast';
28
+ import * as i3 from '@acorex/core/format';
29
+ import { AXFormatModule } from '@acorex/core/format';
30
+ import * as i2 from '@angular/common';
31
+ import { CommonModule, DatePipe } from '@angular/common';
32
+ import { AXImageModule } from '@acorex/components/image';
33
+ import { AXP_WIDGETS_UTILITY_CATEGORY } from '@acorex/modules/dashboard-management';
34
+ import { AXP_APPEARANCE_PROPERTY_GROUP, AXP_STYLING_PROPERTY_GROUP, AXP_DATA_PATH_PROPERTY } from '@acorex/platform/layout/widgets';
35
+ import { AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY } from '@acorex/modules/content-management';
36
+ import { AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
37
+ import { RootConfig as RootConfig$1 } from '@acorex/modules/form-template-management';
38
+ import { AXPWidgetsList } from '@acorex/modules/common';
39
+
40
+ const config = {
41
+ i18n: 'notification-management',
42
+ route: 'notifications',
43
+ module: 'NotificationManagement',
44
+ };
45
+ /** Dashboard widget type ids for notification-management-hosted widgets (`{module}:Widget:Dashboard:{Segment}`). */
46
+ const dashboardWidgetId = (segment) => `${config.module}:Widget:Dashboard:${segment}`;
47
+ const RootConfig = {
48
+ config,
49
+ module: {
50
+ route: 'notification-management',
51
+ name: config.module,
52
+ title: `@${config.i18n}:module.title`,
53
+ icon: 'fa-light fa-bell',
54
+ },
55
+ entities: {
56
+ channel: {
57
+ name: 'Channels',
58
+ title: `t("channel", {scope:"${config.i18n}"})`,
59
+ icon: 'fa-light fa-list',
60
+ },
61
+ template: {
62
+ name: 'Templates',
63
+ title: `t("template",{scope:"${config.i18n}"})`,
64
+ icon: 'fa-light fa-file-code',
65
+ },
66
+ notification: {
67
+ name: 'Notifications',
68
+ title: `t("notification",{scope:"${config.i18n}"})`,
69
+ icon: 'fa-light fa-file-code',
70
+ },
71
+ },
72
+ widgets: {
73
+ myNotificationDashboard: dashboardWidgetId('MyNotificationDashboard'),
74
+ },
75
+ };
76
+
77
+ class AXMNotificationEntityService extends AXMEntityCrudServiceImpl {
78
+ }
79
+ class AXMNotificationEntityServiceImpl extends AXMNotificationEntityService {
80
+ getList() {
81
+ throw new Error('Method not implemented.');
82
+ }
83
+ markAsRead(payload) {
84
+ throw new Error('Method not implemented.');
85
+ }
86
+ markAllAsRead() {
87
+ throw new Error('Method not implemented.');
88
+ }
89
+ create(payload) {
90
+ throw new Error('Method not implemented.');
91
+ }
92
+ constructor() {
93
+ super(`${RootConfig.module.name}.${RootConfig.entities.notification.name}`);
94
+ }
95
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
96
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityServiceImpl }); }
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityServiceImpl, decorators: [{
99
+ type: Injectable
100
+ }], ctorParameters: () => [] });
101
+
102
+ async function notificationEntityFactory(injector) {
103
+ const dataService = injector.get(AXMNotificationEntityService);
104
+ const entityDef = {
105
+ module: RootConfig.module.name,
106
+ name: RootConfig.entities.notification.name,
107
+ title: RootConfig.entities.notification.title,
108
+ icon: RootConfig.entities.notification.icon,
109
+ formats: {
110
+ individual: '@notification-management:entities.notification.title',
111
+ plural: '@notification-management:entities.notification.plural',
112
+ },
113
+ relatedEntities: [
114
+ {
115
+ entity: 'notification-management.notificationLog',
116
+ columns: ['title', 'status'],
117
+ },
118
+ ],
119
+ groups: [
120
+ {
121
+ id: 'notification',
122
+ title: 'Notification',
123
+ },
124
+ ],
125
+ properties: [
126
+ {
127
+ name: 'name',
128
+ title: '@notification-management:entities.notification.fields.name.title',
129
+ groupId: 'notification',
130
+ schema: {
131
+ dataType: 'string',
132
+ interface: {
133
+ type: AXPWidgetsCatalog.text,
134
+ },
135
+ },
136
+ validations: [
137
+ {
138
+ rule: 'required',
139
+ },
140
+ ],
141
+ },
142
+ {
143
+ name: 'title',
144
+ title: '@notification-management:entities.notification.fields.title.title',
145
+ groupId: 'notification',
146
+ schema: {
147
+ dataType: 'string',
148
+ interface: {
149
+ type: AXPWidgetsCatalog.text,
150
+ },
151
+ },
152
+ validations: [
153
+ {
154
+ rule: 'required',
155
+ },
156
+ ],
157
+ },
158
+ {
159
+ name: 'body',
160
+ title: '@notification-management:entities.notification.fields.body.title',
161
+ groupId: 'notification',
162
+ schema: {
163
+ dataType: 'string',
164
+ interface: {
165
+ type: AXPWidgetsCatalog.richText,
166
+ },
167
+ },
168
+ validations: [
169
+ {
170
+ rule: 'required',
171
+ },
172
+ ],
173
+ },
174
+ {
175
+ name: 'channel',
176
+ title: '@notification-management:entities.notification.fields.channel.title',
177
+ groupId: 'notification',
178
+ schema: {
179
+ dataType: 'string',
180
+ interface: {
181
+ type: AXPWidgetsCatalog.text,
182
+ },
183
+ },
184
+ },
185
+ {
186
+ name: 'user.name',
187
+ title: '@notification-management:entities.notification.fields.user-name.title',
188
+ groupId: 'notification',
189
+ schema: {
190
+ dataType: 'string',
191
+ interface: {
192
+ type: AXPWidgetsCatalog.text,
193
+ },
194
+ },
195
+ },
196
+ ],
197
+ columns: [{ name: 'title' }, { name: 'body' }, { name: 'user.name' }, { name: 'channel' }],
198
+ queries: {
199
+ byKey: {
200
+ execute: async (id) => {
201
+ return new Promise((resolve) => {
202
+ setTimeout(async () => {
203
+ const entity = await dataService.getOne(id);
204
+ resolve(entity);
205
+ }, 500);
206
+ });
207
+ },
208
+ type: AXPEntityQueryType.Single,
209
+ },
210
+ list: {
211
+ execute: async (e) => {
212
+ return await dataService.query(e);
213
+ },
214
+ type: AXPEntityQueryType.List,
215
+ },
216
+ },
217
+ interfaces: {
218
+ master: {
219
+ single: {
220
+ title: '{{title}}',
221
+ sections: [
222
+ {
223
+ id: 'notification',
224
+ layout: {
225
+ positions: {
226
+ lg: {
227
+ colSpan: 12,
228
+ },
229
+ },
230
+ },
231
+ },
232
+ ],
233
+ properties: [
234
+ {
235
+ name: 'name',
236
+ layout: {
237
+ positions: {
238
+ lg: {
239
+ colSpan: 6,
240
+ },
241
+ },
242
+ },
243
+ },
244
+ {
245
+ name: 'user.name',
246
+ layout: {
247
+ positions: {
248
+ lg: {
249
+ colSpan: 6,
250
+ },
251
+ },
252
+ },
253
+ },
254
+ {
255
+ name: 'title',
256
+ layout: {
257
+ positions: {
258
+ lg: {
259
+ colSpan: 12,
260
+ },
261
+ },
262
+ },
263
+ },
264
+ {
265
+ name: 'body',
266
+ layout: {
267
+ positions: {
268
+ lg: {
269
+ colSpan: 12,
270
+ },
271
+ },
272
+ },
273
+ },
274
+ {
275
+ name: 'channel',
276
+ layout: {
277
+ positions: {
278
+ lg: {
279
+ colSpan: 6,
280
+ },
281
+ },
282
+ },
283
+ },
284
+ ],
285
+ actions: [...entityMasterRecordActions()],
286
+ },
287
+ list: {
288
+ actions: [...entityMasterCrudActions()],
289
+ views: [createAllQueryView()],
290
+ },
291
+ },
292
+ },
293
+ };
294
+ return entityDef;
295
+ }
296
+
297
+ var notification_entity = /*#__PURE__*/Object.freeze({
298
+ __proto__: null,
299
+ notificationEntityFactory: notificationEntityFactory
300
+ });
301
+
302
+ async function notificationTemplateEntityFactory(injector) {
303
+ const i18n = RootConfig.config.i18n;
304
+ const entityDef = {
305
+ module: RootConfig.module.name,
306
+ name: RootConfig.entities.template.name,
307
+ title: RootConfig.entities.template.title,
308
+ icon: RootConfig.entities.template.icon,
309
+ formats: {
310
+ individual: 't("template",{scope: "notification-management"})',
311
+ plural: 't("template",{scope: "notification-management"})',
312
+ },
313
+ relatedEntities: [
314
+ {
315
+ entity: `${RootConfig.module.name}.${RootConfig.entities.channel.name}`,
316
+ columns: ['title', 'body', 'channel'],
317
+ conditions: [
318
+ {
319
+ name: 'notificationId',
320
+ operator: {
321
+ type: 'equal',
322
+ },
323
+ value: 'id',
324
+ },
325
+ ],
326
+ },
327
+ ],
328
+ groups: [
329
+ {
330
+ id: 'notification',
331
+ title: '@general:terms.common.title',
332
+ },
333
+ ],
334
+ properties: [
335
+ {
336
+ name: 'name',
337
+ title: '@general:terms.common.name',
338
+ groupId: 'notification',
339
+ schema: {
340
+ dataType: 'string',
341
+ interface: {
342
+ type: AXPWidgetsCatalog.text,
343
+ },
344
+ },
345
+ validations: [
346
+ {
347
+ rule: 'required',
348
+ },
349
+ ],
350
+ },
351
+ {
352
+ name: 'title',
353
+ title: '@general:terms.common.title',
354
+ groupId: 'notification',
355
+ schema: {
356
+ dataType: 'string',
357
+ interface: {
358
+ type: AXPWidgetsCatalog.text,
359
+ },
360
+ },
361
+ validations: [
362
+ {
363
+ rule: 'required',
364
+ },
365
+ ],
366
+ },
367
+ {
368
+ name: 'description',
369
+ title: '@general:terms.common.description',
370
+ groupId: 'notification',
371
+ schema: {
372
+ dataType: 'string',
373
+ interface: {
374
+ type: AXPWidgetsCatalog.text,
375
+ },
376
+ },
377
+ validations: [
378
+ {
379
+ rule: 'required',
380
+ },
381
+ ],
382
+ },
383
+ ],
384
+ columns: [{ name: 'name' }, { name: 'title' }],
385
+ interfaces: {
386
+ master: {
387
+ create: {
388
+ sections: [
389
+ {
390
+ id: 'notification',
391
+ },
392
+ ],
393
+ properties: [
394
+ {
395
+ name: 'name',
396
+ layout: {
397
+ positions: {
398
+ lg: {
399
+ colSpan: 6,
400
+ },
401
+ },
402
+ },
403
+ },
404
+ {
405
+ name: 'title',
406
+ layout: {
407
+ positions: {
408
+ lg: {
409
+ colSpan: 6,
410
+ },
411
+ },
412
+ },
413
+ },
414
+ {
415
+ name: 'description',
416
+ layout: {
417
+ positions: {
418
+ lg: {
419
+ colSpan: 12,
420
+ },
421
+ },
422
+ },
423
+ },
424
+ ],
425
+ },
426
+ update: {
427
+ sections: [
428
+ {
429
+ id: 'notification',
430
+ },
431
+ ],
432
+ properties: [
433
+ {
434
+ name: 'name',
435
+ layout: {
436
+ positions: {
437
+ lg: {
438
+ colSpan: 6,
439
+ },
440
+ },
441
+ },
442
+ },
443
+ {
444
+ name: 'title',
445
+ layout: {
446
+ positions: {
447
+ lg: {
448
+ colSpan: 6,
449
+ },
450
+ },
451
+ },
452
+ },
453
+ {
454
+ name: 'description',
455
+ layout: {
456
+ positions: {
457
+ lg: {
458
+ colSpan: 12,
459
+ },
460
+ },
461
+ },
462
+ },
463
+ ],
464
+ },
465
+ single: {
466
+ title: '{{title}}',
467
+ sections: [
468
+ {
469
+ id: 'notification',
470
+ layout: {
471
+ positions: {
472
+ lg: {
473
+ colSpan: 12,
474
+ },
475
+ },
476
+ },
477
+ },
478
+ ],
479
+ properties: [
480
+ {
481
+ name: 'name',
482
+ layout: {
483
+ positions: {
484
+ lg: {
485
+ colSpan: 6,
486
+ },
487
+ },
488
+ },
489
+ },
490
+ {
491
+ name: 'title',
492
+ layout: {
493
+ positions: {
494
+ lg: {
495
+ colSpan: 6,
496
+ },
497
+ },
498
+ },
499
+ },
500
+ {
501
+ name: 'description',
502
+ layout: {
503
+ positions: {
504
+ lg: {
505
+ colSpan: 12,
506
+ },
507
+ },
508
+ },
509
+ },
510
+ ],
511
+ actions: [...entityMasterRecordActions()],
512
+ },
513
+ list: {
514
+ actions: [...entityMasterCrudActions()],
515
+ views: [createAllQueryView()],
516
+ },
517
+ },
518
+ },
519
+ };
520
+ return entityDef;
521
+ }
522
+
523
+ var template_entity = /*#__PURE__*/Object.freeze({
524
+ __proto__: null,
525
+ notificationTemplateEntityFactory: notificationTemplateEntityFactory
526
+ });
527
+
528
+ class AXMNotificationManagementTemplateEntityService extends AXMEntityCrudServiceImpl {
529
+ }
530
+ class AXMNotificationManagementTemplateEntityServiceImpl extends AXMNotificationManagementTemplateEntityService {
531
+ constructor() {
532
+ super(`${RootConfig.module.name}.${RootConfig.entities.template.name}`);
533
+ }
534
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementTemplateEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
535
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementTemplateEntityServiceImpl }); }
536
+ }
537
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementTemplateEntityServiceImpl, decorators: [{
538
+ type: Injectable
539
+ }], ctorParameters: () => [] });
540
+
541
+ class AXMNotificationTemplateEntityModule {
542
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationTemplateEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
543
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationTemplateEntityModule }); }
544
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationTemplateEntityModule, providers: [
545
+ {
546
+ provide: AXMNotificationManagementTemplateEntityService,
547
+ useClass: AXMNotificationManagementTemplateEntityServiceImpl,
548
+ },
549
+ ] }); }
550
+ }
551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationTemplateEntityModule, decorators: [{
552
+ type: NgModule,
553
+ args: [{
554
+ imports: [],
555
+ exports: [],
556
+ declarations: [],
557
+ providers: [
558
+ {
559
+ provide: AXMNotificationManagementTemplateEntityService,
560
+ useClass: AXMNotificationManagementTemplateEntityServiceImpl,
561
+ },
562
+ ],
563
+ }]
564
+ }] });
565
+
566
+ async function notificationChannelEntityFactory(injector) {
567
+ const i18n = RootConfig.config.i18n;
568
+ const entityDef = {
569
+ module: RootConfig.module.name,
570
+ name: RootConfig.entities.channel.name,
571
+ title: RootConfig.entities.channel.title,
572
+ icon: RootConfig.entities.channel.icon,
573
+ formats: {
574
+ individual: `@${i18n}:channel`,
575
+ plural: `@${i18n}:channels`,
576
+ },
577
+ relatedEntities: [],
578
+ groups: [
579
+ {
580
+ id: 'notificationChannel',
581
+ title: 'Notification Channel',
582
+ },
583
+ {
584
+ id: 'in-app',
585
+ title: 'In App',
586
+ },
587
+ ],
588
+ properties: [
589
+ {
590
+ name: 'title',
591
+ title: '@general:terms.common.title',
592
+ groupId: 'notificationChannel',
593
+ schema: {
594
+ dataType: 'string',
595
+ interface: {
596
+ type: AXPWidgetsCatalog.text,
597
+ },
598
+ },
599
+ validations: [
600
+ {
601
+ rule: 'required',
602
+ },
603
+ ],
604
+ },
605
+ {
606
+ name: 'template',
607
+ title: `@${i18n}:template`,
608
+ groupId: 'notificationChannel',
609
+ schema: {
610
+ dataType: 'string',
611
+ interface: {
612
+ type: AXPWidgetsCatalog.richText,
613
+ },
614
+ },
615
+ },
616
+ {
617
+ name: 'body',
618
+ title: `@${i18n}:body`,
619
+ groupId: 'notificationChannel',
620
+ schema: {
621
+ dataType: 'string',
622
+ interface: {
623
+ type: AXPWidgetsCatalog.richText,
624
+ },
625
+ },
626
+ validations: [
627
+ {
628
+ rule: 'required',
629
+ },
630
+ ],
631
+ },
632
+ {
633
+ name: 'imageId',
634
+ title: `@${i18n}:body`,
635
+ groupId: 'notificationChannel',
636
+ schema: {
637
+ dataType: 'string',
638
+ interface: {
639
+ type: AXPWidgetsCatalog.attachments,
640
+ options: {
641
+ multiple: false,
642
+ },
643
+ },
644
+ },
645
+ },
646
+ {
647
+ name: 'channel',
648
+ title: `@${i18n}:channel`,
649
+ groupId: 'notificationChannel',
650
+ schema: {
651
+ dataType: 'string',
652
+ interface: {
653
+ type: AXPWidgetsCatalog.select,
654
+ options: {
655
+ valueField: 'name',
656
+ textField: 'title',
657
+ dataSource: [
658
+ { title: 'SMS', name: 'sms' },
659
+ { title: 'Email', name: 'email' },
660
+ { title: 'In App', name: 'inApp' },
661
+ ],
662
+ direction: 'horizontal',
663
+ multiple: false,
664
+ },
665
+ },
666
+ },
667
+ validations: [
668
+ {
669
+ rule: 'required',
670
+ },
671
+ ],
672
+ },
673
+ {
674
+ name: 'type',
675
+ title: `@${i18n}:type`,
676
+ groupId: 'in-app',
677
+ schema: {
678
+ dataType: 'string',
679
+ interface: {
680
+ type: AXPWidgetsCatalog.select,
681
+ options: {
682
+ valueField: 'name',
683
+ textField: 'title',
684
+ dataSource: [
685
+ { title: 'Notification', name: 'notification' },
686
+ { title: 'Promotion', name: 'promotion' },
687
+ { title: 'PopUp', name: 'popup' },
688
+ ],
689
+ direction: 'horizontal',
690
+ multiple: false,
691
+ },
692
+ },
693
+ },
694
+ },
695
+ {
696
+ name: 'contentType',
697
+ title: `@${i18n}:contentType`,
698
+ groupId: 'in-app',
699
+ schema: {
700
+ dataType: 'string',
701
+ interface: {
702
+ type: AXPWidgetsCatalog.select,
703
+ options: {
704
+ valueField: 'name',
705
+ textField: 'title',
706
+ dataSource: [
707
+ { title: 'Media', name: 'media' },
708
+ { title: 'Text', name: 'text' },
709
+ ],
710
+ direction: 'horizontal',
711
+ multiple: false,
712
+ },
713
+ },
714
+ },
715
+ validations: [
716
+ {
717
+ rule: 'required',
718
+ },
719
+ ],
720
+ },
721
+ {
722
+ name: 'shape',
723
+ title: `@${i18n}:shape`,
724
+ groupId: 'in-app',
725
+ schema: {
726
+ dataType: 'string',
727
+ interface: {
728
+ type: AXPWidgetsCatalog.select,
729
+ options: {
730
+ valueField: 'name',
731
+ textField: 'title',
732
+ dataSource: [
733
+ { title: 'Circle', name: 'circle' },
734
+ { title: 'Square', name: 'square' },
735
+ ],
736
+ direction: 'horizontal',
737
+ multiple: false,
738
+ },
739
+ },
740
+ },
741
+ validations: [
742
+ {
743
+ rule: 'required',
744
+ },
745
+ ],
746
+ },
747
+ {
748
+ name: 'placement',
749
+ title: `t("placement", { scope: "${i18n}" })`,
750
+ groupId: 'in-app',
751
+ schema: {
752
+ dataType: 'string',
753
+ interface: {
754
+ type: AXPWidgetsCatalog.select,
755
+ options: {
756
+ valueField: 'name',
757
+ textField: 'title',
758
+ dataSource: [
759
+ { title: 'Side Menu Footer', name: 'side-menu-footer' },
760
+ { title: 'Side Menu Header', name: 'side-menu-header' },
761
+ ],
762
+ direction: 'horizontal',
763
+ multiple: false,
764
+ },
765
+ },
766
+ },
767
+ validations: [
768
+ {
769
+ rule: 'required',
770
+ },
771
+ ],
772
+ },
773
+ {
774
+ name: 'pin',
775
+ title: `t("pin", { scope: "${i18n}" })`,
776
+ groupId: 'in-app',
777
+ schema: {
778
+ dataType: 'string',
779
+ interface: {
780
+ type: AXPWidgetsCatalog.checkbox,
781
+ },
782
+ },
783
+ validations: [
784
+ {
785
+ rule: 'required',
786
+ },
787
+ ],
788
+ },
789
+ {
790
+ name: 'trigger',
791
+ title: `t("trigger", { scope: "${i18n}" })`,
792
+ groupId: 'notificationChannel',
793
+ schema: {
794
+ dataType: 'string',
795
+ interface: {
796
+ type: AXPWidgetsCatalog.cronJob,
797
+ },
798
+ },
799
+ validations: [
800
+ {
801
+ rule: 'required',
802
+ },
803
+ ],
804
+ },
805
+ ],
806
+ columns: [{ name: 'title' }, { name: 'body' }, { name: 'channel' }],
807
+ interfaces: {
808
+ master: {
809
+ create: {
810
+ sections: [
811
+ {
812
+ id: 'notificationChannel',
813
+ },
814
+ {
815
+ id: 'in-app',
816
+ },
817
+ ],
818
+ properties: [
819
+ {
820
+ name: 'title',
821
+ layout: {
822
+ positions: {
823
+ lg: {
824
+ colSpan: 12,
825
+ order: 1,
826
+ },
827
+ },
828
+ },
829
+ },
830
+ {
831
+ name: 'body',
832
+ layout: {
833
+ positions: {
834
+ lg: {
835
+ colSpan: 12,
836
+ order: 2,
837
+ },
838
+ },
839
+ },
840
+ },
841
+ {
842
+ name: 'imageId',
843
+ layout: {
844
+ positions: {
845
+ lg: {
846
+ colSpan: 12,
847
+ order: 2,
848
+ },
849
+ },
850
+ },
851
+ },
852
+ {
853
+ name: 'template',
854
+ layout: {
855
+ positions: {
856
+ lg: {
857
+ colSpan: 12,
858
+ },
859
+ },
860
+ },
861
+ },
862
+ {
863
+ name: 'trigger',
864
+ layout: {
865
+ positions: {
866
+ lg: {
867
+ colSpan: 12,
868
+ order: 10,
869
+ },
870
+ },
871
+ },
872
+ },
873
+ {
874
+ name: 'channel',
875
+ layout: {
876
+ positions: {
877
+ lg: {
878
+ colSpan: 12,
879
+ },
880
+ },
881
+ },
882
+ },
883
+ {
884
+ name: 'type',
885
+ layout: {
886
+ positions: {
887
+ lg: {
888
+ colSpan: 12,
889
+ order: 3,
890
+ },
891
+ },
892
+ },
893
+ },
894
+ {
895
+ name: 'contentType',
896
+ layout: {
897
+ positions: {
898
+ lg: {
899
+ colSpan: 4,
900
+ order: 4,
901
+ },
902
+ },
903
+ },
904
+ },
905
+ {
906
+ name: 'shape',
907
+ layout: {
908
+ positions: {
909
+ lg: {
910
+ colSpan: 4,
911
+ order: 5,
912
+ },
913
+ },
914
+ },
915
+ },
916
+ {
917
+ name: 'placement',
918
+ layout: {
919
+ positions: {
920
+ lg: {
921
+ colSpan: 4,
922
+ order: 6,
923
+ },
924
+ },
925
+ },
926
+ },
927
+ {
928
+ name: 'pin',
929
+ layout: {
930
+ positions: {
931
+ lg: {
932
+ colSpan: 4,
933
+ },
934
+ },
935
+ },
936
+ },
937
+ ],
938
+ },
939
+ update: {
940
+ sections: [
941
+ {
942
+ id: 'notificationChannel',
943
+ },
944
+ {
945
+ id: 'in-app',
946
+ },
947
+ ],
948
+ properties: [
949
+ {
950
+ name: 'title',
951
+ layout: {
952
+ positions: {
953
+ lg: {
954
+ colSpan: 12,
955
+ order: 1,
956
+ },
957
+ },
958
+ },
959
+ },
960
+ {
961
+ name: 'body',
962
+ layout: {
963
+ positions: {
964
+ lg: {
965
+ colSpan: 12,
966
+ order: 2,
967
+ },
968
+ },
969
+ },
970
+ },
971
+ {
972
+ name: 'imageId',
973
+ layout: {
974
+ positions: {
975
+ lg: {
976
+ colSpan: 12,
977
+ order: 2,
978
+ },
979
+ },
980
+ },
981
+ },
982
+ {
983
+ name: 'template',
984
+ layout: {
985
+ positions: {
986
+ lg: {
987
+ colSpan: 12,
988
+ },
989
+ },
990
+ },
991
+ },
992
+ {
993
+ name: 'trigger',
994
+ layout: {
995
+ positions: {
996
+ lg: {
997
+ colSpan: 12,
998
+ order: 10,
999
+ },
1000
+ },
1001
+ },
1002
+ },
1003
+ {
1004
+ name: 'channel',
1005
+ layout: {
1006
+ positions: {
1007
+ lg: {
1008
+ colSpan: 12,
1009
+ },
1010
+ },
1011
+ },
1012
+ },
1013
+ {
1014
+ name: 'type',
1015
+ layout: {
1016
+ positions: {
1017
+ lg: {
1018
+ colSpan: 12,
1019
+ order: 3,
1020
+ },
1021
+ },
1022
+ },
1023
+ },
1024
+ {
1025
+ name: 'contentType',
1026
+ layout: {
1027
+ positions: {
1028
+ lg: {
1029
+ colSpan: 4,
1030
+ order: 4,
1031
+ },
1032
+ },
1033
+ },
1034
+ },
1035
+ {
1036
+ name: 'shape',
1037
+ layout: {
1038
+ positions: {
1039
+ lg: {
1040
+ colSpan: 4,
1041
+ order: 5,
1042
+ },
1043
+ },
1044
+ },
1045
+ },
1046
+ {
1047
+ name: 'placement',
1048
+ layout: {
1049
+ positions: {
1050
+ lg: {
1051
+ colSpan: 4,
1052
+ order: 6,
1053
+ },
1054
+ },
1055
+ },
1056
+ },
1057
+ {
1058
+ name: 'pin',
1059
+ layout: {
1060
+ positions: {
1061
+ lg: {
1062
+ colSpan: 4,
1063
+ },
1064
+ },
1065
+ },
1066
+ },
1067
+ ],
1068
+ },
1069
+ single: {
1070
+ title: '{{title}}',
1071
+ sections: [
1072
+ {
1073
+ id: 'notificationChannel',
1074
+ },
1075
+ {
1076
+ id: 'in-app',
1077
+ },
1078
+ ],
1079
+ properties: [
1080
+ {
1081
+ name: 'title',
1082
+ layout: {
1083
+ positions: {
1084
+ lg: {
1085
+ colSpan: 6,
1086
+ },
1087
+ },
1088
+ },
1089
+ },
1090
+ {
1091
+ name: 'body',
1092
+ layout: {
1093
+ positions: {
1094
+ lg: {
1095
+ colSpan: 6,
1096
+ },
1097
+ },
1098
+ },
1099
+ },
1100
+ {
1101
+ name: 'imageId',
1102
+ layout: {
1103
+ positions: {
1104
+ lg: {
1105
+ colSpan: 12,
1106
+ order: 2,
1107
+ },
1108
+ },
1109
+ },
1110
+ },
1111
+ {
1112
+ name: 'channel',
1113
+ layout: {
1114
+ positions: {
1115
+ lg: {
1116
+ colSpan: 12,
1117
+ },
1118
+ },
1119
+ },
1120
+ },
1121
+ {
1122
+ name: 'template',
1123
+ layout: {
1124
+ positions: {
1125
+ lg: {
1126
+ colSpan: 12,
1127
+ },
1128
+ },
1129
+ },
1130
+ },
1131
+ {
1132
+ name: 'trigger',
1133
+ layout: {
1134
+ positions: {
1135
+ lg: {
1136
+ colSpan: 12,
1137
+ order: 10,
1138
+ },
1139
+ },
1140
+ },
1141
+ },
1142
+ {
1143
+ name: 'channel',
1144
+ layout: {
1145
+ positions: {
1146
+ lg: {
1147
+ colSpan: 12,
1148
+ },
1149
+ },
1150
+ },
1151
+ },
1152
+ {
1153
+ name: 'type',
1154
+ layout: {
1155
+ positions: {
1156
+ lg: {
1157
+ colSpan: 12,
1158
+ order: 3,
1159
+ },
1160
+ },
1161
+ },
1162
+ },
1163
+ {
1164
+ name: 'contentType',
1165
+ layout: {
1166
+ positions: {
1167
+ lg: {
1168
+ colSpan: 4,
1169
+ order: 4,
1170
+ },
1171
+ },
1172
+ },
1173
+ },
1174
+ {
1175
+ name: 'shape',
1176
+ layout: {
1177
+ positions: {
1178
+ lg: {
1179
+ colSpan: 4,
1180
+ order: 5,
1181
+ },
1182
+ },
1183
+ },
1184
+ },
1185
+ {
1186
+ name: 'placement',
1187
+ layout: {
1188
+ positions: {
1189
+ lg: {
1190
+ colSpan: 4,
1191
+ order: 6,
1192
+ },
1193
+ },
1194
+ },
1195
+ },
1196
+ {
1197
+ name: 'pin',
1198
+ layout: {
1199
+ positions: {
1200
+ lg: {
1201
+ colSpan: 4,
1202
+ },
1203
+ },
1204
+ },
1205
+ },
1206
+ ],
1207
+ actions: [...entityMasterRecordActions()],
1208
+ },
1209
+ list: {
1210
+ actions: [...entityMasterCrudActions()],
1211
+ views: [
1212
+ {
1213
+ name: 'all',
1214
+ title: '@general:terms.interface.selection.all-items',
1215
+ fixed: true,
1216
+ columns: [],
1217
+ conditions: [],
1218
+ sorts: [],
1219
+ },
1220
+ ],
1221
+ },
1222
+ },
1223
+ },
1224
+ };
1225
+ return entityDef;
1226
+ }
1227
+
1228
+ var channel_entity = /*#__PURE__*/Object.freeze({
1229
+ __proto__: null,
1230
+ notificationChannelEntityFactory: notificationChannelEntityFactory
1231
+ });
1232
+
1233
+ class AXMNotificationManagementChannelEntityService extends AXMEntityCrudServiceImpl {
1234
+ }
1235
+ class AXMNotificationManagementChannelEntityServiceImpl extends AXMNotificationManagementChannelEntityService {
1236
+ constructor() {
1237
+ super(`${RootConfig.module.name}.${RootConfig.entities.channel.name}`);
1238
+ }
1239
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementChannelEntityServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1240
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementChannelEntityServiceImpl }); }
1241
+ }
1242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementChannelEntityServiceImpl, decorators: [{
1243
+ type: Injectable
1244
+ }], ctorParameters: () => [] });
1245
+
1246
+ class AXMNotificationEntityModule {
1247
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1248
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityModule }); }
1249
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityModule, providers: [
1250
+ {
1251
+ provide: AXMNotificationEntityService,
1252
+ useClass: AXMNotificationEntityServiceImpl,
1253
+ },
1254
+ ] }); }
1255
+ }
1256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEntityModule, decorators: [{
1257
+ type: NgModule,
1258
+ args: [{
1259
+ imports: [],
1260
+ exports: [],
1261
+ declarations: [],
1262
+ providers: [
1263
+ {
1264
+ provide: AXMNotificationEntityService,
1265
+ useClass: AXMNotificationEntityServiceImpl,
1266
+ },
1267
+ ],
1268
+ }]
1269
+ }] });
1270
+
1271
+ class AXMNotificationChannelEntityModule {
1272
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationChannelEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1273
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationChannelEntityModule }); }
1274
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationChannelEntityModule, providers: [
1275
+ {
1276
+ provide: AXMNotificationManagementChannelEntityService,
1277
+ useClass: AXMNotificationManagementChannelEntityServiceImpl,
1278
+ },
1279
+ ] }); }
1280
+ }
1281
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationChannelEntityModule, decorators: [{
1282
+ type: NgModule,
1283
+ args: [{
1284
+ imports: [],
1285
+ exports: [],
1286
+ declarations: [],
1287
+ providers: [
1288
+ {
1289
+ provide: AXMNotificationManagementChannelEntityService,
1290
+ useClass: AXMNotificationManagementChannelEntityServiceImpl,
1291
+ },
1292
+ ],
1293
+ }]
1294
+ }] });
1295
+
1296
+ // Entity Services
1297
+
1298
+ class AXMMenuProvider {
1299
+ constructor() {
1300
+ this.sessionService = inject(AXPSessionService);
1301
+ }
1302
+ async provide(context) {
1303
+ const isAuthorized = await firstValueFrom(this.sessionService.isAuthorized$);
1304
+ if (!isAuthorized) {
1305
+ return;
1306
+ }
1307
+ }
1308
+ }
1309
+
1310
+ //#region ---- Imports ----
1311
+ //#endregion
1312
+ //#region ---- Manifest Definition ----
1313
+ /**
1314
+ * Notification Management Module Manifest.
1315
+ * Defines module metadata, features, and provider references.
1316
+ */
1317
+ const NotificationManagementManifest = {
1318
+ name: RootConfig.module.name,
1319
+ version: '1.0.0',
1320
+ title: RootConfig.module.title,
1321
+ icon: RootConfig.module.icon,
1322
+ i18n: RootConfig.config.i18n,
1323
+ required: true,
1324
+ // Module dependencies (optional)
1325
+ };
1326
+ //#endregion
1327
+
1328
+ /** Default notification list sort: pinned first, then newest first within each group. */
1329
+ const NOTIFICATION_LIST_SORT = [
1330
+ { field: 'template.isPinned', dir: 'desc' },
1331
+ { field: 'createAt', dir: 'desc' },
1332
+ ];
1333
+ /**
1334
+ * Sorts notifications with pinned items first, then by `createAt` descending.
1335
+ */
1336
+ function sortNotificationsByPinnedThenDate(items) {
1337
+ return [...items].sort(compareNotificationsByPinnedThenDate);
1338
+ }
1339
+ function compareNotificationsByPinnedThenDate(a, b) {
1340
+ const aPinned = a.template.isPinned ? 1 : 0;
1341
+ const bPinned = b.template.isPinned ? 1 : 0;
1342
+ if (aPinned !== bPinned) {
1343
+ return bPinned - aPinned;
1344
+ }
1345
+ return new Date(b.createAt).getTime() - new Date(a.createAt).getTime();
1346
+ }
1347
+
1348
+ const UNREAD_NOTIFICATION_FILTER = {
1349
+ logic: 'or',
1350
+ filters: [
1351
+ {
1352
+ field: 'readAt',
1353
+ operator: { type: 'isNull' },
1354
+ value: null,
1355
+ },
1356
+ {
1357
+ field: 'readAt',
1358
+ operator: { type: 'equal' },
1359
+ value: false,
1360
+ },
1361
+ ],
1362
+ };
1363
+ /**
1364
+ * Maps notification page filter chips to an entity query request (filter, sort, paging).
1365
+ */
1366
+ function buildNotificationPageQuery(filters, skip, take) {
1367
+ const conditions = [];
1368
+ const readFilter = filters.find((f) => f.field === 'readStatus');
1369
+ if (readFilter?.value === 'unread') {
1370
+ conditions.push(UNREAD_NOTIFICATION_FILTER);
1371
+ }
1372
+ const typeFilter = filters.find((f) => f.field === 'type');
1373
+ if (typeFilter?.value) {
1374
+ conditions.push({
1375
+ field: 'type',
1376
+ operator: { type: 'equal' },
1377
+ value: typeFilter.value,
1378
+ });
1379
+ }
1380
+ const priorityFilter = filters.find((f) => f.field === 'priority');
1381
+ if (priorityFilter?.value) {
1382
+ conditions.push({
1383
+ field: 'template.prority',
1384
+ operator: { type: 'equal' },
1385
+ value: priorityFilter.value,
1386
+ });
1387
+ }
1388
+ const channelFilter = filters.find((f) => f.field === 'channel');
1389
+ if (channelFilter?.value) {
1390
+ conditions.push({
1391
+ field: 'channel',
1392
+ operator: { type: 'equal' },
1393
+ value: channelFilter.value,
1394
+ });
1395
+ }
1396
+ const categoryFilter = filters.find((f) => f.field === 'category');
1397
+ if (categoryFilter?.value) {
1398
+ conditions.push({
1399
+ field: 'template.category',
1400
+ operator: { type: 'equal' },
1401
+ value: categoryFilter.value,
1402
+ });
1403
+ }
1404
+ const searchFilter = filters.find((f) => f.field === 'all');
1405
+ const searchText = searchFilter?.value != null ? String(searchFilter.value).trim() : '';
1406
+ if (searchText) {
1407
+ conditions.push({
1408
+ logic: 'or',
1409
+ filters: [
1410
+ { field: 'title', operator: { type: 'contains' }, value: searchText },
1411
+ { field: 'body', operator: { type: 'contains' }, value: searchText },
1412
+ { field: 'sender.fullName', operator: { type: 'contains' }, value: searchText },
1413
+ ],
1414
+ });
1415
+ }
1416
+ return {
1417
+ skip,
1418
+ take,
1419
+ sort: NOTIFICATION_LIST_SORT,
1420
+ filter: conditions.length > 0 ? { logic: 'and', filters: conditions } : undefined,
1421
+ };
1422
+ }
1423
+
1424
+ class AXMNotificationRealtimeService {
1425
+ constructor() {
1426
+ this.changedSubject = new Subject();
1427
+ this.changed$ = this.changedSubject.asObservable();
1428
+ }
1429
+ notifyChanged(event) {
1430
+ this.changedSubject.next(event);
1431
+ }
1432
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationRealtimeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1433
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationRealtimeService, providedIn: 'root' }); }
1434
+ }
1435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationRealtimeService, decorators: [{
1436
+ type: Injectable,
1437
+ args: [{
1438
+ providedIn: 'root',
1439
+ }]
1440
+ }] });
1441
+
1442
+ //#region ---- Core Imports ----
1443
+ /**
1444
+ * Service to display OS-level notifications using the browser's Notification API.
1445
+ */
1446
+ class AXMOsNotificationService {
1447
+ constructor() {
1448
+ this.isSupported = signal(false, ...(ngDevMode ? [{ debugName: "isSupported" }] : /* istanbul ignore next */ []));
1449
+ this.permission = signal(false, ...(ngDevMode ? [{ debugName: "permission" }] : /* istanbul ignore next */ []));
1450
+ this.isSupported.set('Notification' in window);
1451
+ }
1452
+ /**
1453
+ * Requests permission from the user to display desktop notifications.
1454
+ * @returns A promise that resolves to true if permission is granted, false otherwise.
1455
+ */
1456
+ async requestPermission() {
1457
+ if (!this.isSupported()) {
1458
+ console.warn('This browser does not support desktop notifications.');
1459
+ return false;
1460
+ }
1461
+ switch (Notification.permission) {
1462
+ case 'granted':
1463
+ this.permission.set(true);
1464
+ return true;
1465
+ case 'default':
1466
+ const permission = await Notification.requestPermission();
1467
+ this.permission.set(permission === 'granted');
1468
+ return this.permission();
1469
+ default:
1470
+ this.permission.set(false);
1471
+ return false;
1472
+ }
1473
+ }
1474
+ /**
1475
+ * Shows a desktop notification.
1476
+ * This method should be called after ensuring permission has been granted via requestPermission().
1477
+ *
1478
+ * @param title The title of the notification.
1479
+ * @param options Optional notification options including an onClick handler and window focusing.
1480
+ * @returns The Notification object if displayed, otherwise null.
1481
+ */
1482
+ show(title, options) {
1483
+ if (!this.isSupported()) {
1484
+ console.warn('This browser does not support desktop notifications.');
1485
+ return null;
1486
+ }
1487
+ if (!this.permission()) {
1488
+ console.warn(`Notification permission is ${Notification.permission}. Call requestPermission() first.`);
1489
+ return null;
1490
+ }
1491
+ const notification = new Notification(title, options);
1492
+ if (options?.onClick) {
1493
+ notification.onclick = () => {
1494
+ if (options.activeWindow) {
1495
+ window.focus();
1496
+ }
1497
+ options.onClick();
1498
+ };
1499
+ }
1500
+ return notification;
1501
+ }
1502
+ /**
1503
+ * Dismisses all active notifications or a specific one.
1504
+ * @param notification Optional. Pass a specific notification to close it; otherwise closes all.
1505
+ */
1506
+ dismiss(notification) {
1507
+ if (notification) {
1508
+ notification.close();
1509
+ }
1510
+ }
1511
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOsNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1512
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOsNotificationService, providedIn: 'root' }); }
1513
+ }
1514
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMOsNotificationService, decorators: [{
1515
+ type: Injectable,
1516
+ args: [{
1517
+ providedIn: 'root',
1518
+ }]
1519
+ }], ctorParameters: () => [] });
1520
+
1521
+ /**
1522
+ * Signal store that provides a reactive interface for notification-related operations
1523
+ * Acts as a layer between notification components and the entity service
1524
+ */
1525
+ class AXMNotificationConnectorService {
1526
+ constructor() {
1527
+ this.notificationService = inject(AXMNotificationEntityService);
1528
+ this.osNotificationService = inject(AXMOsNotificationService);
1529
+ this.notificationRealtime = inject(AXMNotificationRealtimeService);
1530
+ this.destroyRef = inject(DestroyRef);
1531
+ this.osNotifiedIds = new Set();
1532
+ // State signals
1533
+ this.isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
1534
+ this.pageLoading = signal(false, ...(ngDevMode ? [{ debugName: "pageLoading" }] : /* istanbul ignore next */ []));
1535
+ this.error = signal(null, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
1536
+ this.notifications = signal([], ...(ngDevMode ? [{ debugName: "notifications" }] : /* istanbul ignore next */ []));
1537
+ this.totalCount = signal(0, ...(ngDevMode ? [{ debugName: "totalCount" }] : /* istanbul ignore next */ []));
1538
+ this.pageItems = signal([], ...(ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []));
1539
+ this.pageTotalCount = signal(0, ...(ngDevMode ? [{ debugName: "pageTotalCount" }] : /* istanbul ignore next */ []));
1540
+ // Public computed signals
1541
+ this.loading = computed(() => this.isLoading(), ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
1542
+ this.pageLoadingState = computed(() => this.pageLoading(), ...(ngDevMode ? [{ debugName: "pageLoadingState" }] : /* istanbul ignore next */ []));
1543
+ this.errorMessage = computed(() => this.error(), ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
1544
+ this.notificationList = computed(() => this.notifications(), ...(ngDevMode ? [{ debugName: "notificationList" }] : /* istanbul ignore next */ []));
1545
+ this.total = computed(() => this.totalCount(), ...(ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []));
1546
+ this.pagedNotificationList = computed(() => this.pageItems(), ...(ngDevMode ? [{ debugName: "pagedNotificationList" }] : /* istanbul ignore next */ []));
1547
+ this.pagedTotal = computed(() => this.pageTotalCount(), ...(ngDevMode ? [{ debugName: "pagedTotal" }] : /* istanbul ignore next */ []));
1548
+ this.unreadCount = computed(() => this.notifications().filter((notification) => notification.readAt === null).length, ...(ngDevMode ? [{ debugName: "unreadCount" }] : /* istanbul ignore next */ []));
1549
+ void this.getList();
1550
+ this.notificationRealtime.changed$
1551
+ .pipe(debounceTime(100), takeUntilDestroyed(this.destroyRef))
1552
+ .subscribe((event) => {
1553
+ if (event.type === 'created' && event.notification) {
1554
+ void this.showOsNotificationForItem(event.notification);
1555
+ }
1556
+ // Read paths already sync `notifications` in markAsRead / markAllAsRead; refetch would duplicate work.
1557
+ if (event.type === 'read') {
1558
+ return;
1559
+ }
1560
+ if (!this.isLoading()) {
1561
+ void this.getList();
1562
+ }
1563
+ });
1564
+ }
1565
+ // Methods from entity service with additional state management
1566
+ /**
1567
+ * Get list of notifications
1568
+ */
1569
+ async getList() {
1570
+ try {
1571
+ this.isLoading.set(true);
1572
+ this.error.set(null);
1573
+ const response = await this.notificationService.getList();
1574
+ const sortedItems = sortNotificationsByPinnedThenDate(response.items);
1575
+ this.notifications.set(sortedItems);
1576
+ this.totalCount.set(response.total);
1577
+ return {
1578
+ ...response,
1579
+ items: sortedItems,
1580
+ };
1581
+ }
1582
+ catch (err) {
1583
+ this.error.set(err instanceof Error ? err.message : 'Failed to fetch notifications');
1584
+ return { total: 0, items: [] };
1585
+ }
1586
+ finally {
1587
+ this.isLoading.set(false);
1588
+ }
1589
+ }
1590
+ /**
1591
+ * Loads a single page for the notifications list view without replacing the global notification cache.
1592
+ */
1593
+ async loadPage(filters, skip, take) {
1594
+ try {
1595
+ this.pageLoading.set(true);
1596
+ this.error.set(null);
1597
+ const request = buildNotificationPageQuery(filters, skip, take);
1598
+ const result = await this.notificationService.query(request);
1599
+ const items = sortNotificationsByPinnedThenDate(result.items);
1600
+ this.pageItems.set(items);
1601
+ this.pageTotalCount.set(result.total);
1602
+ return { items, total: result.total };
1603
+ }
1604
+ catch (err) {
1605
+ this.error.set(err instanceof Error ? err.message : 'Failed to load notifications');
1606
+ this.pageItems.set([]);
1607
+ this.pageTotalCount.set(0);
1608
+ return { items: [], total: 0 };
1609
+ }
1610
+ finally {
1611
+ this.pageLoading.set(false);
1612
+ }
1613
+ }
1614
+ /**
1615
+ * Toggle pinned state for a notification.
1616
+ */
1617
+ async togglePin(id) {
1618
+ try {
1619
+ this.error.set(null);
1620
+ const notification = this.notifications().find((item) => item.id === id) ??
1621
+ this.pageItems().find((item) => item.id === id);
1622
+ if (!notification) {
1623
+ return;
1624
+ }
1625
+ const isPinned = !notification.template.isPinned;
1626
+ const updated = {
1627
+ ...notification,
1628
+ template: { ...notification.template, isPinned },
1629
+ };
1630
+ await this.notificationService.updateOne(id, {
1631
+ template: { ...notification.template, isPinned },
1632
+ });
1633
+ const patchList = (items) => sortNotificationsByPinnedThenDate(items.map((item) => (item.id === id ? updated : item)));
1634
+ this.notifications.update(patchList);
1635
+ this.pageItems.update(patchList);
1636
+ }
1637
+ catch (err) {
1638
+ this.error.set(err instanceof Error ? err.message : 'Failed to update notification pin');
1639
+ throw err;
1640
+ }
1641
+ }
1642
+ /**
1643
+ * Mark notifications as read
1644
+ * If no specific IDs are provided, mark all unread notifications as read
1645
+ * If specific IDs are provided, set readAt only when it is currently null (no toggling)
1646
+ */
1647
+ async markAsRead(payload = { id: [] }) {
1648
+ try {
1649
+ // this.isLoading.set(true);
1650
+ this.error.set(null);
1651
+ await this.notificationService.markAsRead(payload);
1652
+ // Update local state to reflect read status without toggling
1653
+ if (payload?.id?.length) {
1654
+ const patchRead = (notifications) => notifications.map((notification) => {
1655
+ if (payload.id.includes(notification.id)) {
1656
+ return notification.readAt === null ? { ...notification, readAt: new Date() } : notification;
1657
+ }
1658
+ return notification;
1659
+ });
1660
+ this.notifications.update(patchRead);
1661
+ this.pageItems.update(patchRead);
1662
+ }
1663
+ else {
1664
+ const patchAllRead = (notifications) => notifications.map((notification) => notification.readAt ? notification : { ...notification, readAt: new Date() });
1665
+ this.notifications.update(patchAllRead);
1666
+ this.pageItems.update(patchAllRead);
1667
+ }
1668
+ }
1669
+ catch (err) {
1670
+ this.error.set(err instanceof Error ? err.message : 'Failed to mark notifications as read');
1671
+ }
1672
+ finally {
1673
+ // this.isLoading.set(false);
1674
+ }
1675
+ }
1676
+ async markAllAsRead() {
1677
+ try {
1678
+ this.error.set(null);
1679
+ await this.notificationService.markAllAsRead();
1680
+ const readAt = new Date();
1681
+ const patchAllRead = (notifications) => notifications.map((notification) => notification.readAt ? notification : { ...notification, readAt });
1682
+ this.notifications.update(patchAllRead);
1683
+ this.pageItems.update(patchAllRead);
1684
+ }
1685
+ catch (err) {
1686
+ this.error.set(err instanceof Error ? err.message : 'Failed to mark all notifications as read');
1687
+ }
1688
+ }
1689
+ /**
1690
+ * Create a new notification
1691
+ */
1692
+ async create(payload, options) {
1693
+ this.isLoading.set(true);
1694
+ this.error.set(null);
1695
+ //send os notification
1696
+ const isPermissionGranted = await this.osNotificationService.requestPermission();
1697
+ if (payload && isPermissionGranted) {
1698
+ this.osNotificationService.show(payload.title || 'Notification', {
1699
+ body: payload.body || 'No body',
1700
+ ...options,
1701
+ });
1702
+ this.osNotifiedIds.add(payload.id);
1703
+ }
1704
+ const createdNotification = await this.notificationService.create(payload);
1705
+ // Refresh list after creating a notification
1706
+ this.notifications.update((notifications) => sortNotificationsByPinnedThenDate([createdNotification, ...notifications]));
1707
+ this.totalCount.update((count) => count + 1);
1708
+ await this.getList();
1709
+ this.isLoading.set(false);
1710
+ }
1711
+ async showOsNotificationForItem(notification, options) {
1712
+ if (!notification.id || this.osNotifiedIds.has(notification.id)) {
1713
+ return;
1714
+ }
1715
+ const isPermissionGranted = await this.osNotificationService.requestPermission();
1716
+ if (!isPermissionGranted) {
1717
+ return;
1718
+ }
1719
+ this.osNotificationService.show(notification.title || 'Notification', {
1720
+ body: notification.body || 'No body',
1721
+ ...options,
1722
+ });
1723
+ this.osNotifiedIds.add(notification.id);
1724
+ }
1725
+ // Methods from AXMEntityCrudServiceImpl
1726
+ /**
1727
+ * Insert one notification
1728
+ */
1729
+ async insertOne(request) {
1730
+ try {
1731
+ this.isLoading.set(true);
1732
+ this.error.set(null);
1733
+ const id = await this.notificationService.insertOne(request);
1734
+ // Refresh list after inserting
1735
+ await this.getList();
1736
+ return id;
1737
+ }
1738
+ catch (err) {
1739
+ this.error.set(err instanceof Error ? err.message : 'Failed to insert notification');
1740
+ throw err;
1741
+ }
1742
+ finally {
1743
+ this.isLoading.set(false);
1744
+ }
1745
+ }
1746
+ /**
1747
+ * Get one notification by id
1748
+ */
1749
+ async getOne(id) {
1750
+ try {
1751
+ this.isLoading.set(true);
1752
+ this.error.set(null);
1753
+ return await this.notificationService.getOne(id);
1754
+ }
1755
+ catch (err) {
1756
+ this.error.set(err instanceof Error ? err.message : `Failed to get notification with id ${id}`);
1757
+ throw err;
1758
+ }
1759
+ finally {
1760
+ this.isLoading.set(false);
1761
+ }
1762
+ }
1763
+ /**
1764
+ * Delete one notification
1765
+ */
1766
+ async deleteOne(id) {
1767
+ try {
1768
+ // this.isLoading.set(true);
1769
+ this.error.set(null);
1770
+ await this.notificationService.deleteOne(id);
1771
+ // Update local state to remove deleted notification
1772
+ this.notifications.update((notifications) => notifications.filter((notification) => notification.id !== id));
1773
+ this.pageItems.update((notifications) => notifications.filter((notification) => notification.id !== id));
1774
+ this.totalCount.update((count) => count - 1);
1775
+ this.pageTotalCount.update((count) => Math.max(0, count - 1));
1776
+ }
1777
+ catch (err) {
1778
+ this.error.set(err instanceof Error ? err.message : `Failed to delete notification with id ${id}`);
1779
+ throw err;
1780
+ }
1781
+ finally {
1782
+ // this.isLoading.set(false);
1783
+ }
1784
+ }
1785
+ /**
1786
+ * Update one notification
1787
+ */
1788
+ async updateOne(id, values) {
1789
+ try {
1790
+ this.isLoading.set(true);
1791
+ this.error.set(null);
1792
+ const updated = await this.notificationService.updateOne(id, values);
1793
+ // Update local state to reflect changes
1794
+ this.notifications.update((notifications) => notifications.map((notification) => notification.id === id ? { ...notification, ...values } : notification));
1795
+ return updated;
1796
+ }
1797
+ catch (err) {
1798
+ this.error.set(err instanceof Error ? err.message : `Failed to update notification with id ${id}`);
1799
+ throw err;
1800
+ }
1801
+ finally {
1802
+ this.isLoading.set(false);
1803
+ }
1804
+ }
1805
+ /**
1806
+ * Query notifications
1807
+ */
1808
+ async query(request = { skip: 0, take: 100 }) {
1809
+ try {
1810
+ this.isLoading.set(true);
1811
+ this.error.set(null);
1812
+ const result = await this.notificationService.query(request);
1813
+ // Update local state with query results
1814
+ this.notifications.set(result.items);
1815
+ this.totalCount.set(result.total);
1816
+ return result;
1817
+ }
1818
+ catch (err) {
1819
+ this.error.set(err instanceof Error ? err.message : 'Failed to query notifications');
1820
+ throw err;
1821
+ }
1822
+ finally {
1823
+ this.isLoading.set(false);
1824
+ }
1825
+ }
1826
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationConnectorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1827
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationConnectorService, providedIn: 'root' }); }
1828
+ }
1829
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationConnectorService, decorators: [{
1830
+ type: Injectable,
1831
+ args: [{
1832
+ providedIn: 'root',
1833
+ }]
1834
+ }], ctorParameters: () => [] });
1835
+
1836
+ // Provides a live unread notifications count for header/task badges
1837
+ class AXMNotificationBadgeProvider {
1838
+ constructor() {
1839
+ this.notificationService = inject(AXMNotificationConnectorService);
1840
+ this.key = 'badge-notification';
1841
+ this.count = computed(() => this.notificationService.unreadCount(), ...(ngDevMode ? [{ debugName: "count" }] : /* istanbul ignore next */ []));
1842
+ }
1843
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationBadgeProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1844
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationBadgeProvider }); }
1845
+ }
1846
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationBadgeProvider, decorators: [{
1847
+ type: Injectable
1848
+ }] });
1849
+
1850
+ //#region ---- Permission Keys ----
1851
+ const AXPNotificationManagementPermissionKeys = {
1852
+ NotificationManagement: {
1853
+ Management: 'NotificationManagement:Permission:Management',
1854
+ Email: {
1855
+ ShowDialog: 'NotificationManagement:Permission:Email.ShowDialog',
1856
+ Send: 'NotificationManagement:Permission:Email.Send',
1857
+ },
1858
+ },
1859
+ };
1860
+ //#endregion
1861
+
1862
+ class AXMPermissionDefinitionProvider {
1863
+ constructor() {
1864
+ this.translateService = inject(AXTranslationService);
1865
+ }
1866
+ async define(context) {
1867
+ const trans = async (key) => await this.translateService.translateAsync(`@notification-management:permissions.${key}`);
1868
+ const keys = AXPNotificationManagementPermissionKeys.NotificationManagement;
1869
+ context
1870
+ .addGroup(RootConfig.module.name, await trans('manage.title'), await trans('manage.description'))
1871
+ .addPermission(keys.Management, await trans('manage.permission.title'), await trans('manage.permission.description'))
1872
+ .endPermission()
1873
+ .addPermission(keys.Email.ShowDialog, await trans('email.show-dialog.title'), await trans('email.show-dialog.description'))
1874
+ .endPermission()
1875
+ .addPermission(keys.Email.Send, await trans('email.send.title'), await trans('email.send.description'))
1876
+ .endPermission()
1877
+ .endGroup();
1878
+ }
1879
+ }
1880
+
1881
+ class AXMEntityLoader {
1882
+ constructor() {
1883
+ this.injector = inject(Injector);
1884
+ }
1885
+ preload() {
1886
+ const module = RootConfig.module.name;
1887
+ return Array.from(Object.values(RootConfig.entities)).map((entity) => ({
1888
+ module: module,
1889
+ entity: entity.name,
1890
+ }));
1891
+ }
1892
+ async get(moduleName, entityName) {
1893
+ if (moduleName == RootConfig.module.name) {
1894
+ return new Promise(async (resolve) => {
1895
+ switch (entityName) {
1896
+ case RootConfig.entities.template.name: {
1897
+ const entity = (await Promise.resolve().then(function () { return template_entity; })).notificationTemplateEntityFactory;
1898
+ resolve(entity(this.injector));
1899
+ break;
1900
+ }
1901
+ case RootConfig.entities.channel.name: {
1902
+ const entity = (await Promise.resolve().then(function () { return channel_entity; })).notificationChannelEntityFactory;
1903
+ resolve(entity(this.injector));
1904
+ break;
1905
+ }
1906
+ //TODO: Add your custom entity here
1907
+ case 'my-notification': {
1908
+ const entity = (await Promise.resolve().then(function () { return myNotification; })).myNotificationEntityFactory;
1909
+ resolve(entity(this.injector));
1910
+ break;
1911
+ }
1912
+ case RootConfig.entities.notification.name: {
1913
+ const entity = (await Promise.resolve().then(function () { return notification_entity; })).notificationEntityFactory;
1914
+ resolve(entity(this.injector));
1915
+ break;
1916
+ }
1917
+ default:
1918
+ resolve(null);
1919
+ }
1920
+ });
1921
+ }
1922
+ return null;
1923
+ }
1924
+ async list() {
1925
+ const m = RootConfig.module.name;
1926
+ return Promise.resolve(Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m })));
1927
+ }
1928
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityLoader, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1929
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityLoader }); }
1930
+ }
1931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMEntityLoader, decorators: [{
1932
+ type: Injectable
1933
+ }] });
1934
+
1935
+ class AXPNotificationDefinitionProvider {
1936
+ }
1937
+ const DEFAULT_NOTIFICATION_DEFINITION = [
1938
+ // {
1939
+ // name: 'File',
1940
+ // title: 'Email',
1941
+ // icon: 'fa-solid fa-envelope',
1942
+ // async execute(command: AXPExecuteCommand, item: AXMNotificationItem): Promise<void> {
1943
+ // console.log('Execute for email', item);
1944
+ // // In a real implementation, you would perform an action
1945
+ // return Promise.resolve();
1946
+ // },
1947
+ // },
1948
+ // {
1949
+ // name: 'Chat',
1950
+ // title: 'SMS',
1951
+ // icon: 'fa-solid fa-comment-sms',
1952
+ // async execute(command: AXPExecuteCommand, item: AXMNotificationItem): Promise<void> {
1953
+ // console.log('Execute for sms', item);
1954
+ // // In a real implementation, you would perform an action
1955
+ // return Promise.resolve();
1956
+ // },
1957
+ // },
1958
+ // {
1959
+ // name: 'Comment',
1960
+ // title: 'Comment',
1961
+ // icon: 'fa-solid fa-comment'
1962
+ // async execute(command: AXPExecuteCommand, item: AXMNotificationItem): Promise<void> {
1963
+ // console.log('Execute for comment', item);
1964
+ // // In a real implementation, you would perform an action
1965
+ // return Promise.resolve();
1966
+ // },
1967
+ // },
1968
+ // {
1969
+ // name: 'Log',
1970
+ // title: 'Log',
1971
+ // icon: 'fa-solid fa-file-lines',
1972
+ // async execute(command: AXPExecuteCommand, item: AXMNotificationItem): Promise<void> {
1973
+ // console.log('Execute for log', item);
1974
+ // // In a real implementation, you would perform an action
1975
+ // return Promise.resolve();
1976
+ // },
1977
+ // },
1978
+ ];
1979
+ class AXPNotificationDefinitionProviderDefault extends AXPNotificationDefinitionProvider {
1980
+ async provide() {
1981
+ return DEFAULT_NOTIFICATION_DEFINITION;
1982
+ }
1983
+ }
1984
+ const AXP_NOTIFICATION_DEFINITION_PROVIDER = new InjectionToken('AXP_NOTIFICATION_DEFINITION_PROVIDER');
1985
+ class AXPNotificationDefinitionService {
1986
+ constructor() {
1987
+ this.providers = inject(AXP_NOTIFICATION_DEFINITION_PROVIDER, { optional: true });
1988
+ }
1989
+ getProviders() {
1990
+ return this.providers?.flat() ?? [];
1991
+ }
1992
+ resolve(name) {
1993
+ return this.getProviders()?.find((p) => p.name === name) ?? null;
1994
+ }
1995
+ execute(command, item) {
1996
+ const provider = this.getProviders()?.find((p) => p.name === item.type);
1997
+ if (!provider) {
1998
+ throw new Error('Notification provider not found');
1999
+ }
2000
+ provider.execute(command, item);
2001
+ }
2002
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNotificationDefinitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2003
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNotificationDefinitionService, providedIn: 'root' }); }
2004
+ }
2005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNotificationDefinitionService, decorators: [{
2006
+ type: Injectable,
2007
+ args: [{ providedIn: 'root' }]
2008
+ }] });
2009
+
2010
+ class AXMAdminNotificationItemComponent {
2011
+ constructor() {
2012
+ //#region ---- Services & Dependencies ----
2013
+ this.notificationDefinitionService = inject(AXPNotificationDefinitionService);
2014
+ //#endregion
2015
+ //#region ---- View Queries ----
2016
+ this.div = viewChild('component', { ...(ngDevMode ? { debugName: "div" } : /* istanbul ignore next */ {}), read: ViewContainerRef });
2017
+ //#endregion
2018
+ //#region ---- Inputs & Outputs ----
2019
+ this.data = input.required(...(ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []));
2020
+ this.showAvatar = input(true, ...(ngDevMode ? [{ debugName: "showAvatar" }] : /* istanbul ignore next */ []));
2021
+ this.showDate = input(true, ...(ngDevMode ? [{ debugName: "showDate" }] : /* istanbul ignore next */ []));
2022
+ this.selectionMode = input(false, ...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
2023
+ this.onPressNotificationItem = output();
2024
+ /** Emits when the popover should be closed (e.g., after clicking an item or action) */
2025
+ this.onClosePopover = output();
2026
+ /** Emits when the user toggles pin on the notification row */
2027
+ this.onTogglePin = output();
2028
+ this.#af = afterNextRender(() => this.renderComponent());
2029
+ }
2030
+ //#endregion
2031
+ //#region ---- Event Handlers ----
2032
+ pressNotificationItem(id) {
2033
+ this.onPressNotificationItem.emit(id);
2034
+ if (this.selectionMode()) {
2035
+ return;
2036
+ }
2037
+ this.getNotificationProvider()?.execute({ name: 'click' }, this.data());
2038
+ this.onClosePopover.emit();
2039
+ }
2040
+ onAction(command) {
2041
+ this.getNotificationProvider()?.execute(command, this.data());
2042
+ this.onClosePopover.emit();
2043
+ }
2044
+ togglePin(event) {
2045
+ event.preventDefault();
2046
+ event.stopPropagation();
2047
+ this.onTogglePin.emit(this.data().id);
2048
+ }
2049
+ //#endregion
2050
+ //#region ---- Utility Methods ----
2051
+ getNotificationProvider() {
2052
+ return this.notificationDefinitionService.resolve(this.data().type);
2053
+ }
2054
+ getNotificationContent() {
2055
+ const provider = this.getNotificationProvider();
2056
+ return provider?.content?.();
2057
+ }
2058
+ async renderComponent() {
2059
+ if (this.getNotificationContent() && this.getNotificationProvider()) {
2060
+ const component = await this.getNotificationContent();
2061
+ if (component) {
2062
+ this.div()?.createComponent(component, {
2063
+ bindings: [
2064
+ inputBinding('item', this.data),
2065
+ outputBinding('execute', (e) => this.onAction(e)),
2066
+ ],
2067
+ });
2068
+ }
2069
+ }
2070
+ }
2071
+ #af;
2072
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAdminNotificationItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2073
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMAdminNotificationItemComponent, isStandalone: true, selector: "axp-master-notification-item", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, showAvatar: { classPropertyName: "showAvatar", publicName: "showAvatar", isSignal: true, isRequired: false, transformFunction: null }, showDate: { classPropertyName: "showDate", publicName: "showDate", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onPressNotificationItem: "onPressNotificationItem", onClosePopover: "onClosePopover", onTogglePin: "onTogglePin" }, viewQueries: [{ propertyName: "div", first: true, predicate: ["component"], descendants: true, read: ViewContainerRef, isSignal: true }], ngImport: i0, template: "<div\n class=\"notification-item ax-text-start\"\n [id]=\"data().id\"\n (click)=\"pressNotificationItem(data().id)\"\n [class]=\"[data().template.prority, data().readAt ? 'read' : 'unread']\"\n>\n @if (showAvatar()) {\n <div class=\"notification-avatar\">\n <axp-user-avatar [size]=\"48\" [userId]=\"data().sender.id\"></axp-user-avatar>\n @if (!data().readAt) {\n <div class=\"unread-badge\"></div>\n }\n </div>\n }\n\n <div class=\"notification-content\">\n <div class=\"notification-header\">\n <div class=\"notification-title\" [class.--unread]=\"!data().readAt\">\n {{ data().sender.fullName || data().title }}\n </div>\n <div class=\"notification-meta\">\n @if (data().template.isPinned) {\n <button\n type=\"button\"\n class=\"pin-notification\"\n [attr.aria-label]=\"'@notification-management:actions.unpin' | translate | async\"\n (click)=\"togglePin($event)\"\n >\n <ax-icon>\n <i class=\"fa-solid fa-thumbtack\"></i>\n </ax-icon>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"pin-notification pin-notification--muted\"\n [attr.aria-label]=\"'@notification-management:actions.pin' | translate | async\"\n (click)=\"togglePin($event)\"\n >\n <ax-icon>\n <i class=\"fa-regular fa-thumbtack\"></i>\n </ax-icon>\n </button>\n }\n @if (showDate()) {\n <div class=\"notification-time\">{{ data().createAt | format: 'timeleft' | async }}</div>\n }\n </div>\n </div>\n @if (this.getNotificationContent() && this.getNotificationProvider()) {\n <div #component></div>\n } @else {\n <div class=\"notification-body\">{{ data().body }}</div>\n }\n </div>\n</div>\n", styles: [".notification-item{position:relative;display:flex;cursor:pointer;gap:.75rem;border-radius:.375rem;padding:.75rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;animation-duration:.15s}.notification-item.read{background:transparent}.notification-item.unread{background:rgb(var(--ax-sys-color-lighter-surface))}@media(hover:hover){.notification-item:hover .pin-notification--muted{visibility:visible;pointer-events:auto}}.notification-item.Notice:before,.notification-item.Danger:before,.notification-item.Warning:before{content:\"\";position:absolute;top:.75rem;bottom:.75rem;inset-inline-start:0px;width:.125rem;border-radius:9999px}.notification-item.Notice:before{background:rgb(var(--ax-sys-color-success-500))}.notification-item.Danger:before{background:rgb(var(--ax-sys-color-danger-500))}.notification-item.Warning:before{background:rgb(var(--ax-sys-color-warning-500))}.notification-item .notification-avatar{position:relative;height:3rem;flex-shrink:0}.notification-item .notification-avatar .unread-badge{position:absolute;bottom:0;inset-inline-end:0px;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.notification-item .notification-content{min-width:0px;flex:1 1 0%}.notification-item .notification-content .notification-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.notification-item .notification-content .notification-header .notification-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface))}.notification-item .notification-content .notification-header .notification-title.--unread{font-weight:600}.notification-item .notification-content .notification-header .notification-meta{display:flex;flex-shrink:0;align-items:center;gap:.375rem}.notification-item .notification-content .notification-header .notification-meta .notification-time{white-space:nowrap;font-size:.75rem;line-height:1rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.notification-item .notification-content .notification-body{margin-top:.125rem;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:.875rem;line-height:1.25rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.notification-item .pin-notification{display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;border-width:0px;background-color:transparent;padding:.125rem;color:rgb(var(--ax-sys-color-primary))}.notification-item .pin-notification--muted{color:rgb(var(--ax-sys-color-on-surface-variant))}@media(hover:hover){.notification-item .pin-notification--muted{visibility:hidden;pointer-events:none}}.notification-item .pin-notification--muted:focus-visible{visibility:visible;pointer-events:auto}.notification-item .pin-notification--muted:hover{color:rgb(var(--ax-sys-color-primary))}.notification-item .pin-notification i{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:.75rem;line-height:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: AXPUserAvatarComponent, selector: "axp-user-avatar", inputs: ["size", "userId"] }, { kind: "ngmodule", type: AXImageModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i3.AXFormatPipe, name: "format" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2074
+ }
2075
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAdminNotificationItemComponent, decorators: [{
2076
+ type: Component,
2077
+ args: [{ selector: 'axp-master-notification-item', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2078
+ CommonModule,
2079
+ AXButtonModule,
2080
+ AXDecoratorModule,
2081
+ AXPUserAvatarComponent,
2082
+ AXImageModule,
2083
+ AXBadgeModule,
2084
+ AXFormatModule,
2085
+ AXTranslationModule,
2086
+ ], template: "<div\n class=\"notification-item ax-text-start\"\n [id]=\"data().id\"\n (click)=\"pressNotificationItem(data().id)\"\n [class]=\"[data().template.prority, data().readAt ? 'read' : 'unread']\"\n>\n @if (showAvatar()) {\n <div class=\"notification-avatar\">\n <axp-user-avatar [size]=\"48\" [userId]=\"data().sender.id\"></axp-user-avatar>\n @if (!data().readAt) {\n <div class=\"unread-badge\"></div>\n }\n </div>\n }\n\n <div class=\"notification-content\">\n <div class=\"notification-header\">\n <div class=\"notification-title\" [class.--unread]=\"!data().readAt\">\n {{ data().sender.fullName || data().title }}\n </div>\n <div class=\"notification-meta\">\n @if (data().template.isPinned) {\n <button\n type=\"button\"\n class=\"pin-notification\"\n [attr.aria-label]=\"'@notification-management:actions.unpin' | translate | async\"\n (click)=\"togglePin($event)\"\n >\n <ax-icon>\n <i class=\"fa-solid fa-thumbtack\"></i>\n </ax-icon>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"pin-notification pin-notification--muted\"\n [attr.aria-label]=\"'@notification-management:actions.pin' | translate | async\"\n (click)=\"togglePin($event)\"\n >\n <ax-icon>\n <i class=\"fa-regular fa-thumbtack\"></i>\n </ax-icon>\n </button>\n }\n @if (showDate()) {\n <div class=\"notification-time\">{{ data().createAt | format: 'timeleft' | async }}</div>\n }\n </div>\n </div>\n @if (this.getNotificationContent() && this.getNotificationProvider()) {\n <div #component></div>\n } @else {\n <div class=\"notification-body\">{{ data().body }}</div>\n }\n </div>\n</div>\n", styles: [".notification-item{position:relative;display:flex;cursor:pointer;gap:.75rem;border-radius:.375rem;padding:.75rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;animation-duration:.15s}.notification-item.read{background:transparent}.notification-item.unread{background:rgb(var(--ax-sys-color-lighter-surface))}@media(hover:hover){.notification-item:hover .pin-notification--muted{visibility:visible;pointer-events:auto}}.notification-item.Notice:before,.notification-item.Danger:before,.notification-item.Warning:before{content:\"\";position:absolute;top:.75rem;bottom:.75rem;inset-inline-start:0px;width:.125rem;border-radius:9999px}.notification-item.Notice:before{background:rgb(var(--ax-sys-color-success-500))}.notification-item.Danger:before{background:rgb(var(--ax-sys-color-danger-500))}.notification-item.Warning:before{background:rgb(var(--ax-sys-color-warning-500))}.notification-item .notification-avatar{position:relative;height:3rem;flex-shrink:0}.notification-item .notification-avatar .unread-badge{position:absolute;bottom:0;inset-inline-end:0px;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.notification-item .notification-content{min-width:0px;flex:1 1 0%}.notification-item .notification-content .notification-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.notification-item .notification-content .notification-header .notification-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface))}.notification-item .notification-content .notification-header .notification-title.--unread{font-weight:600}.notification-item .notification-content .notification-header .notification-meta{display:flex;flex-shrink:0;align-items:center;gap:.375rem}.notification-item .notification-content .notification-header .notification-meta .notification-time{white-space:nowrap;font-size:.75rem;line-height:1rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.notification-item .notification-content .notification-body{margin-top:.125rem;overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;text-align:start;font-size:.875rem;line-height:1.25rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.notification-item .pin-notification{display:inline-flex;align-items:center;justify-content:center;border-radius:9999px;border-width:0px;background-color:transparent;padding:.125rem;color:rgb(var(--ax-sys-color-primary))}.notification-item .pin-notification--muted{color:rgb(var(--ax-sys-color-on-surface-variant))}@media(hover:hover){.notification-item .pin-notification--muted{visibility:hidden;pointer-events:none}}.notification-item .pin-notification--muted:focus-visible{visibility:visible;pointer-events:auto}.notification-item .pin-notification--muted:hover{color:rgb(var(--ax-sys-color-primary))}.notification-item .pin-notification i{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));font-size:.75rem;line-height:1rem}\n"] }]
2087
+ }], propDecorators: { div: [{ type: i0.ViewChild, args: ['component', { ...{ read: ViewContainerRef }, isSignal: true }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: true }] }], showAvatar: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAvatar", required: false }] }], showDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDate", required: false }] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], onPressNotificationItem: [{ type: i0.Output, args: ["onPressNotificationItem"] }], onClosePopover: [{ type: i0.Output, args: ["onClosePopover"] }], onTogglePin: [{ type: i0.Output, args: ["onTogglePin"] }] } });
2088
+
2089
+ class AXMAdminNotificationPanelComponent {
2090
+ constructor() {
2091
+ //#region ---- Outputs ----
2092
+ this.onNewNotification = output();
2093
+ /** Emits when the popover should be closed (bubbled from item components) */
2094
+ this.onClosePopover = output();
2095
+ //#endregion
2096
+ //#region ---- Services & Dependencies ----
2097
+ this.notificationConnector = inject(AXMNotificationConnectorService);
2098
+ this.toastService = inject(AXToastService);
2099
+ this.router = inject(Router);
2100
+ this.sessionService = inject(AXPSessionService);
2101
+ //#endregion
2102
+ //#region ---- Signals & Inputs ----
2103
+ /**
2104
+ * Tabs provided by the parent (custom categories). The component will prepend
2105
+ * "Unread" and "All" before these tabs.
2106
+ */
2107
+ this.providedTabs = input([], ...(ngDevMode ? [{ debugName: "providedTabs" }] : /* istanbul ignore next */ []));
2108
+ // Use store's signals directly
2109
+ this.notifications = this.notificationConnector.notificationList;
2110
+ this.totalNotifications = this.notificationConnector.total;
2111
+ this.isLoading = this.notificationConnector.loading;
2112
+ this.errorMessage = this.notificationConnector.errorMessage;
2113
+ // Default active tab is Unread
2114
+ this.activeTab = signal('Unread', ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
2115
+ //#endregion
2116
+ //#region ---- Computed Properties ----
2117
+ this.tabItems = computed(() => this.getTabItems(this.notifications(), this.providedTabs()), { ...(ngDevMode ? { debugName: "tabItems" } : /* istanbul ignore next */ {}), equal: (a, b) => JSON.stringify(a) === JSON.stringify(b) });
2118
+ this.NewNotification = computed(() => this.getNewNotification(this.tabItems()), ...(ngDevMode ? [{ debugName: "NewNotification" }] : /* istanbul ignore next */ []));
2119
+ this.NewNotificationEffect = effect(() => this.onNewNotification.emit(this.NewNotification()), ...(ngDevMode ? [{ debugName: "NewNotificationEffect" }] : /* istanbul ignore next */ []));
2120
+ }
2121
+ changeActiveTab(tab) {
2122
+ this.activeTab.set(tab);
2123
+ }
2124
+ //#endregion
2125
+ ngOnInit() {
2126
+ this.loadNotification();
2127
+ }
2128
+ async loadNotification() {
2129
+ try {
2130
+ await this.notificationConnector.getList();
2131
+ }
2132
+ catch (error) {
2133
+ this.toastService.show({
2134
+ content: typeof error === 'string' ? error : 'Failed to load notifications!',
2135
+ color: 'danger',
2136
+ location: 'bottom-center',
2137
+ closeButton: true,
2138
+ timeOut: 3000,
2139
+ timeOutProgress: true,
2140
+ });
2141
+ }
2142
+ }
2143
+ //#region ---- Utility Methods ----
2144
+ getTabItems(notifications, userTabs) {
2145
+ // Base when no notifications loaded yet
2146
+ if (!notifications) {
2147
+ const base = [
2148
+ { key: 'Unread', labelKey: '@notification-management:unread', count: 0 },
2149
+ { key: 'All', labelKey: '@notification-management:all', count: 0 },
2150
+ ];
2151
+ return base.concat((userTabs ?? []).map((t) => ({ key: t, labelKey: t, count: 0 })));
2152
+ }
2153
+ // Count unread by category
2154
+ const unreadCountByCategory = new Map();
2155
+ for (const notification of notifications) {
2156
+ const category = notification.template.category;
2157
+ if (!unreadCountByCategory.has(category)) {
2158
+ unreadCountByCategory.set(category, 0);
2159
+ }
2160
+ if (!notification.readAt) {
2161
+ unreadCountByCategory.set(category, (unreadCountByCategory.get(category) ?? 0) + 1);
2162
+ }
2163
+ }
2164
+ const unreadTotal = Array.from(unreadCountByCategory.values()).reduce((a, b) => a + b, 0);
2165
+ // Keep previous behavior: 'All' badge shows total UNREAD across all categories
2166
+ const allTotal = unreadTotal;
2167
+ // Determine which tabs to show after Unread and All
2168
+ let finalUserTabs = userTabs ?? [];
2169
+ if (finalUserTabs.length === 0) {
2170
+ // Fallback to discovered categories if parent has not provided tabs
2171
+ finalUserTabs = Array.from(unreadCountByCategory.keys());
2172
+ }
2173
+ // Ensure uniqueness and preserve provided order
2174
+ const seen = new Set(['Unread', 'All']);
2175
+ const userCategoryTabs = finalUserTabs.filter((t) => {
2176
+ if (seen.has(t))
2177
+ return false;
2178
+ seen.add(t);
2179
+ return true;
2180
+ });
2181
+ const result = [
2182
+ { key: 'Unread', labelKey: '@notification-management:unread', count: unreadTotal },
2183
+ { key: 'All', labelKey: '@notification-management:all', count: allTotal },
2184
+ ...userCategoryTabs.map((category) => ({
2185
+ key: category,
2186
+ labelKey: category,
2187
+ count: unreadCountByCategory.get(category) ?? 0,
2188
+ })),
2189
+ ];
2190
+ return result;
2191
+ }
2192
+ getNewNotification(data) {
2193
+ // Use the Unread tab as the single source of truth for new notifications
2194
+ return data.find((tab) => tab.key === 'Unread')?.count ?? 0;
2195
+ }
2196
+ getNotificationItems(category) {
2197
+ const list = this.notifications();
2198
+ if (!list)
2199
+ return [];
2200
+ if (category === 'All') {
2201
+ return list;
2202
+ }
2203
+ if (category === 'Unread') {
2204
+ return list.filter((item) => !item.readAt);
2205
+ }
2206
+ return list.filter((item) => item.template.category === category);
2207
+ }
2208
+ /**
2209
+ * Mark a notification as read or unread (toggle read status)
2210
+ */
2211
+ async markAsRead(id) {
2212
+ try {
2213
+ await this.notificationConnector.markAsRead({ id: [id] });
2214
+ }
2215
+ catch (error) {
2216
+ console.error('Failed to toggle notification read status:', error);
2217
+ }
2218
+ }
2219
+ async togglePin(id) {
2220
+ try {
2221
+ await this.notificationConnector.togglePin(id);
2222
+ }
2223
+ catch (error) {
2224
+ console.error('Failed to toggle notification pin:', error);
2225
+ }
2226
+ }
2227
+ /**
2228
+ * Mark all unread notifications as read
2229
+ */
2230
+ async markAllAsRead() {
2231
+ try {
2232
+ await this.notificationConnector.markAllAsRead();
2233
+ }
2234
+ catch (error) {
2235
+ console.error('Failed to mark all notifications as read:', error);
2236
+ }
2237
+ }
2238
+ viewAllNotifications() {
2239
+ this.onClosePopover.emit();
2240
+ this.router.navigate([`${this.sessionService.application?.name}/notifications`]);
2241
+ }
2242
+ openSettings() {
2243
+ this.onClosePopover.emit();
2244
+ this.router.navigate([
2245
+ this.sessionService.application?.name,
2246
+ 'settings',
2247
+ 'tenant',
2248
+ 'notification-settings',
2249
+ ]);
2250
+ }
2251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAdminNotificationPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMAdminNotificationPanelComponent, isStandalone: true, selector: "axm-admin-notification-panel", inputs: { providedTabs: { classPropertyName: "providedTabs", publicName: "providedTabs", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onNewNotification: "onNewNotification", onClosePopover: "onClosePopover" }, ngImport: i0, template: "<div class=\"notification-panel__header\">\n <span class=\"notification-panel__title\">\n {{ '@notification-management:notifications' | translate | async }}\n </span>\n <ax-button color=\"default\" look=\"blank\" (onClick)=\"openSettings()\">\n <ax-icon>\n <i class=\"fa-regular fa-gear fa-lg\"></i>\n </ax-icon>\n </ax-button>\n</div>\n<ax-tabs [content]=\"cons\" look=\"with-line\" location=\"bottom\">\n @for (tab of tabItems(); track tab.key) {\n <ax-tab-item\n [text]=\"(tab.labelKey | translate | async) ?? ''\"\n [active]=\"activeTab() === tab.key\"\n (activeChange)=\"changeActiveTab(tab.key)\"\n >\n <ax-suffix>\n @if (tab.count && tab.key === 'Unread') {\n <ax-badge [color]=\"activeTab() === tab.key ? 'primary' : 'ghost'\" [text]=\"tab.count.toString()\"></ax-badge>\n }\n </ax-suffix>\n <ax-content>\n <div class=\"notification-panel__list\">\n @if (isLoading()) {\n <div class=\"notification-panel__loading\">\n @for (_ of [1, 2, 3]; track $index) {\n <div class=\"notification-panel__skeleton\">\n <div class=\"notification-panel__skeleton-avatar\"></div>\n <div class=\"notification-panel__skeleton-lines\">\n <div class=\"notification-panel__skeleton-line --wide\"></div>\n <div class=\"notification-panel__skeleton-line\"></div>\n </div>\n </div>\n }\n </div>\n } @else if (getNotificationItems(tab.key).length === 0) {\n <axp-state-message\n icon=\"fa-regular fa-bell-slash\"\n [title]=\"'@notification-management:state-message.no-notifications.title'\"\n [description]=\"'@notification-management:state-message.no-notifications.description'\"\n />\n } @else {\n @for (notif of getNotificationItems(tab.key); track notif.id) {\n <axp-master-notification-item\n [data]=\"notif\"\n (onPressNotificationItem)=\"markAsRead($event)\"\n (onTogglePin)=\"togglePin($event)\"\n (onClosePopover)=\"onClosePopover.emit()\"\n />\n }\n }\n </div>\n <div class=\"notification-panel__footer\">\n <ax-button\n [disabled]=\"NewNotification() === 0\"\n color=\"default\"\n [text]=\"('@notification-management:actions.mark-all-as-read' | translate | async) ?? ''\"\n (onClick)=\"markAllAsRead()\"\n />\n <ax-button\n color=\"primary\"\n [text]=\"('@notification-management:actions.view-all' | translate | async) ?? ''\"\n (onClick)=\"viewAllNotifications()\"\n />\n </div>\n </ax-content>\n </ax-tab-item>\n }\n</ax-tabs>\n\n<ng-template [axTabContent] #cons=\"axTabContent\"></ng-template>\n", styles: [".notification-panel__header{display:flex;align-items:center;justify-content:space-between;padding:1rem}.notification-panel__title{font-size:1.25rem;line-height:1.75rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.notification-panel__list{max-height:50vh;overflow-y:auto}@media(min-width:768px){.notification-panel__list{width:32rem}}.notification-panel__footer{display:flex;justify-content:space-between;gap:1rem;border-top-width:1px;padding:1rem;border-color:rgb(var(--ax-sys-color-border-surface))}.notification-panel__loading>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.notification-panel__loading{padding:.5rem}.notification-panel__skeleton{display:flex}@keyframes ax-pulse{50%{transform:scale3d(1.05,1.05,1.05)}}.notification-panel__skeleton{animation:1s ease-in-out both ax-pulse;gap:1rem;padding:1rem}.notification-panel__skeleton-avatar{height:3rem;width:3rem;flex-shrink:0;border-radius:9999px;background:rgb(var(--ax-sys-color-lighter-surface))}.notification-panel__skeleton-lines{flex:1 1 0%}.notification-panel__skeleton-lines>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.notification-panel__skeleton-lines{padding-top:.25rem;padding-bottom:.25rem}.notification-panel__skeleton-line{height:.75rem;border-radius:.375rem;background:rgb(var(--ax-sys-color-lighter-surface))}.notification-panel__skeleton-line.--wide{width:75%}.notification-panel__skeleton-line:not(.--wide){width:50%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: AXTabsModule }, { kind: "component", type: i2$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "directive", type: i2$1.AXTabContentDirective, selector: "[axTabContent]", inputs: ["axTabContent"], exportAs: ["axTabContent"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.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: AXBadgeModule }, { kind: "component", type: i3$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: AXMAdminNotificationItemComponent, selector: "axp-master-notification-item", inputs: ["data", "showAvatar", "showDate", "selectionMode"], outputs: ["onPressNotificationItem", "onClosePopover", "onTogglePin"] }, { kind: "ngmodule", type: AXFormatModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "look"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2253
+ }
2254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAdminNotificationPanelComponent, decorators: [{
2255
+ type: Component,
2256
+ args: [{ selector: 'axm-admin-notification-panel', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
2257
+ CommonModule,
2258
+ AXButtonModule,
2259
+ AXTabsModule,
2260
+ AXDecoratorModule,
2261
+ AXBadgeModule,
2262
+ AXPopoverModule,
2263
+ AXMAdminNotificationItemComponent,
2264
+ AXFormatModule,
2265
+ AXTranslationModule,
2266
+ AXPStateMessageComponent,
2267
+ ], template: "<div class=\"notification-panel__header\">\n <span class=\"notification-panel__title\">\n {{ '@notification-management:notifications' | translate | async }}\n </span>\n <ax-button color=\"default\" look=\"blank\" (onClick)=\"openSettings()\">\n <ax-icon>\n <i class=\"fa-regular fa-gear fa-lg\"></i>\n </ax-icon>\n </ax-button>\n</div>\n<ax-tabs [content]=\"cons\" look=\"with-line\" location=\"bottom\">\n @for (tab of tabItems(); track tab.key) {\n <ax-tab-item\n [text]=\"(tab.labelKey | translate | async) ?? ''\"\n [active]=\"activeTab() === tab.key\"\n (activeChange)=\"changeActiveTab(tab.key)\"\n >\n <ax-suffix>\n @if (tab.count && tab.key === 'Unread') {\n <ax-badge [color]=\"activeTab() === tab.key ? 'primary' : 'ghost'\" [text]=\"tab.count.toString()\"></ax-badge>\n }\n </ax-suffix>\n <ax-content>\n <div class=\"notification-panel__list\">\n @if (isLoading()) {\n <div class=\"notification-panel__loading\">\n @for (_ of [1, 2, 3]; track $index) {\n <div class=\"notification-panel__skeleton\">\n <div class=\"notification-panel__skeleton-avatar\"></div>\n <div class=\"notification-panel__skeleton-lines\">\n <div class=\"notification-panel__skeleton-line --wide\"></div>\n <div class=\"notification-panel__skeleton-line\"></div>\n </div>\n </div>\n }\n </div>\n } @else if (getNotificationItems(tab.key).length === 0) {\n <axp-state-message\n icon=\"fa-regular fa-bell-slash\"\n [title]=\"'@notification-management:state-message.no-notifications.title'\"\n [description]=\"'@notification-management:state-message.no-notifications.description'\"\n />\n } @else {\n @for (notif of getNotificationItems(tab.key); track notif.id) {\n <axp-master-notification-item\n [data]=\"notif\"\n (onPressNotificationItem)=\"markAsRead($event)\"\n (onTogglePin)=\"togglePin($event)\"\n (onClosePopover)=\"onClosePopover.emit()\"\n />\n }\n }\n </div>\n <div class=\"notification-panel__footer\">\n <ax-button\n [disabled]=\"NewNotification() === 0\"\n color=\"default\"\n [text]=\"('@notification-management:actions.mark-all-as-read' | translate | async) ?? ''\"\n (onClick)=\"markAllAsRead()\"\n />\n <ax-button\n color=\"primary\"\n [text]=\"('@notification-management:actions.view-all' | translate | async) ?? ''\"\n (onClick)=\"viewAllNotifications()\"\n />\n </div>\n </ax-content>\n </ax-tab-item>\n }\n</ax-tabs>\n\n<ng-template [axTabContent] #cons=\"axTabContent\"></ng-template>\n", styles: [".notification-panel__header{display:flex;align-items:center;justify-content:space-between;padding:1rem}.notification-panel__title{font-size:1.25rem;line-height:1.75rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.notification-panel__list{max-height:50vh;overflow-y:auto}@media(min-width:768px){.notification-panel__list{width:32rem}}.notification-panel__footer{display:flex;justify-content:space-between;gap:1rem;border-top-width:1px;padding:1rem;border-color:rgb(var(--ax-sys-color-border-surface))}.notification-panel__loading>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.notification-panel__loading{padding:.5rem}.notification-panel__skeleton{display:flex}@keyframes ax-pulse{50%{transform:scale3d(1.05,1.05,1.05)}}.notification-panel__skeleton{animation:1s ease-in-out both ax-pulse;gap:1rem;padding:1rem}.notification-panel__skeleton-avatar{height:3rem;width:3rem;flex-shrink:0;border-radius:9999px;background:rgb(var(--ax-sys-color-lighter-surface))}.notification-panel__skeleton-lines{flex:1 1 0%}.notification-panel__skeleton-lines>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.notification-panel__skeleton-lines{padding-top:.25rem;padding-bottom:.25rem}.notification-panel__skeleton-line{height:.75rem;border-radius:.375rem;background:rgb(var(--ax-sys-color-lighter-surface))}.notification-panel__skeleton-line.--wide{width:75%}.notification-panel__skeleton-line:not(.--wide){width:50%}\n"] }]
2268
+ }], propDecorators: { onNewNotification: [{ type: i0.Output, args: ["onNewNotification"] }], onClosePopover: [{ type: i0.Output, args: ["onClosePopover"] }], providedTabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "providedTabs", required: false }] }] } });
2269
+
2270
+ class AXMAdminNotificationSlotComponent {
2271
+ constructor() {
2272
+ //#region ---- Signals ----
2273
+ this.totalNewNotification = signal(0, ...(ngDevMode ? [{ debugName: "totalNewNotification" }] : /* istanbul ignore next */ []));
2274
+ this.badgeDisplay = computed(() => {
2275
+ const total = this.totalNewNotification();
2276
+ if (total <= 0) {
2277
+ return '';
2278
+ }
2279
+ return total > 50 ? '50+' : total.toString();
2280
+ }, ...(ngDevMode ? [{ debugName: "badgeDisplay" }] : /* istanbul ignore next */ []));
2281
+ //#endregion
2282
+ //#region ---- View Queries ----
2283
+ this.popover = viewChild(AXPopoverComponent, ...(ngDevMode ? [{ debugName: "popover" }] : /* istanbul ignore next */ []));
2284
+ }
2285
+ //#endregion
2286
+ //#region ---- Event Handlers ----
2287
+ setTotalNewNotification(value) {
2288
+ this.totalNewNotification.set(value);
2289
+ }
2290
+ closePopover() {
2291
+ this.popover()?.close();
2292
+ }
2293
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAdminNotificationSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2294
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXMAdminNotificationSlotComponent, isStandalone: true, selector: "axm-admin-notification-slot", viewQueries: [{ propertyName: "popover", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<ax-button class=\"ax-relative\" color=\"primary\" #notification>\n <ax-icon>\n <i class=\"fa-regular fa-bell\"></i>\n </ax-icon>\n\n</ax-button>\n<div class=\"__badge\" [class.--xs]=\"badgeDisplay().length > 2\">\n @if (badgeDisplay()) {\n <ax-badge color=\"danger\" [text]=\"badgeDisplay()\"></ax-badge>\n }\n</div>\n<ax-popover [target]=\"notification\" [openOn]=\"'toggle'\" [closeOn]=\"'clickOut'\" [adaptivityEnabled]=\"true\">\n <div class=\"ax-bg-lightest ax-rounded-md ax-w-full\">\n <axm-admin-notification-panel (onNewNotification)=\"setTotalNewNotification($event)\"\n (onClosePopover)=\"closePopover()\">\n </axm-admin-notification-panel>\n </div>\n</ax-popover>", styles: ["axm-admin-notification-slot{position:relative}axm-admin-notification-slot .__badge{position:absolute;top:-.25rem;inset-inline-end:-.25rem;pointer-events:none}\n"], dependencies: [{ 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: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i3$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXPopoverModule }, { kind: "component", type: i4$1.AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "component", type: AXMAdminNotificationPanelComponent, selector: "axm-admin-notification-panel", inputs: ["providedTabs"], outputs: ["onNewNotification", "onClosePopover"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
2295
+ }
2296
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMAdminNotificationSlotComponent, decorators: [{
2297
+ type: Component,
2298
+ args: [{ selector: 'axm-admin-notification-slot', changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXButtonModule, AXDecoratorModule, AXBadgeModule, AXPopoverModule, AXMAdminNotificationPanelComponent], encapsulation: ViewEncapsulation.None, template: "<ax-button class=\"ax-relative\" color=\"primary\" #notification>\n <ax-icon>\n <i class=\"fa-regular fa-bell\"></i>\n </ax-icon>\n\n</ax-button>\n<div class=\"__badge\" [class.--xs]=\"badgeDisplay().length > 2\">\n @if (badgeDisplay()) {\n <ax-badge color=\"danger\" [text]=\"badgeDisplay()\"></ax-badge>\n }\n</div>\n<ax-popover [target]=\"notification\" [openOn]=\"'toggle'\" [closeOn]=\"'clickOut'\" [adaptivityEnabled]=\"true\">\n <div class=\"ax-bg-lightest ax-rounded-md ax-w-full\">\n <axm-admin-notification-panel (onNewNotification)=\"setTotalNewNotification($event)\"\n (onClosePopover)=\"closePopover()\">\n </axm-admin-notification-panel>\n </div>\n</ax-popover>", styles: ["axm-admin-notification-slot{position:relative}axm-admin-notification-slot .__badge{position:absolute;top:-.25rem;inset-inline-end:-.25rem;pointer-events:none}\n"] }]
2299
+ }], propDecorators: { popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPopoverComponent), { isSignal: true }] }] } });
2300
+
2301
+ /**
2302
+ * Notification Widget Component
2303
+ * Displays notifications in a card with tabs
2304
+ */
2305
+ class AXPNotificationWidgetViewComponent extends AXPValueWidgetComponent {
2306
+ constructor() {
2307
+ super();
2308
+ // Outputs
2309
+ this.notificationClick = output();
2310
+ this.markAsRead = output();
2311
+ // Dependencies
2312
+ this.cdr = inject(ChangeDetectorRef);
2313
+ this.datePipe = inject(DatePipe);
2314
+ this.notificationConnector = inject(AXMNotificationConnectorService);
2315
+ this.toastService = inject(AXToastService);
2316
+ // State
2317
+ this.activeTab = signal('unread', ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
2318
+ this.refreshTimerId = null;
2319
+ // Configuration
2320
+ this.maxItems = computed(() => this.options()?.['maxItems'] ?? 10, ...(ngDevMode ? [{ debugName: "maxItems" }] : /* istanbul ignore next */ []));
2321
+ this.showAvatar = computed(() => this.options()?.['showAvatar'] ?? true, ...(ngDevMode ? [{ debugName: "showAvatar" }] : /* istanbul ignore next */ []));
2322
+ this.showDate = computed(() => this.options()?.['showDate'] ?? true, ...(ngDevMode ? [{ debugName: "showDate" }] : /* istanbul ignore next */ []));
2323
+ this.autoRefresh = computed(() => this.options()?.['autoRefresh'] ?? true, ...(ngDevMode ? [{ debugName: "autoRefresh" }] : /* istanbul ignore next */ []));
2324
+ this.refreshInterval = computed(() => (this.options()?.['refreshInterval'] ?? 60) * 1000, ...(ngDevMode ? [{ debugName: "refreshInterval" }] : /* istanbul ignore next */ [])); // Convert to milliseconds
2325
+ // Use store's signals directly
2326
+ this.notifications = this.notificationConnector.notificationList;
2327
+ this.totalNotifications = this.notificationConnector.total;
2328
+ this.isLoading = this.notificationConnector.loading;
2329
+ // Computed data
2330
+ this.notificationItems = computed(() => {
2331
+ const items = this.notifications();
2332
+ if (!items?.length)
2333
+ return [];
2334
+ const sortedItems = sortNotificationsByPinnedThenDate(items);
2335
+ // Filter by active tab
2336
+ const filtered = this.activeTab() === 'unread' ? sortedItems.filter((n) => !n.readAt) : sortedItems;
2337
+ return filtered.slice(0, this.maxItems());
2338
+ }, ...(ngDevMode ? [{ debugName: "notificationItems" }] : /* istanbul ignore next */ []));
2339
+ /**
2340
+ * Bridge click from admin item (emits notification id)
2341
+ */
2342
+ this.onAdminItemClick = async (id) => {
2343
+ const item = this.notifications()?.find((n) => n.id === id);
2344
+ if (!item) {
2345
+ return;
2346
+ }
2347
+ await this.markAsReadIfNeeded(item);
2348
+ this.notificationClick.emit(item);
2349
+ };
2350
+ this.onTogglePin = async (id) => {
2351
+ try {
2352
+ await this.notificationConnector.togglePin(id);
2353
+ this.cdr.detectChanges();
2354
+ }
2355
+ catch (error) {
2356
+ this.toastService.show({
2357
+ content: 'Failed to update notification pin',
2358
+ color: 'danger',
2359
+ location: 'bottom-center',
2360
+ closeButton: true,
2361
+ timeOut: 3000,
2362
+ });
2363
+ }
2364
+ };
2365
+ // Watch for changes to auto-refresh settings
2366
+ effect(() => {
2367
+ this.setupAutoRefresh();
2368
+ });
2369
+ }
2370
+ ngOnInit() {
2371
+ this.loadNotifications();
2372
+ }
2373
+ ngOnDestroy() {
2374
+ this.clearRefreshTimer();
2375
+ }
2376
+ /**
2377
+ * Set up auto-refresh timer based on configuration
2378
+ */
2379
+ setupAutoRefresh() {
2380
+ this.clearRefreshTimer();
2381
+ if (this.autoRefresh()) {
2382
+ const interval = this.refreshInterval();
2383
+ this.refreshTimerId = setInterval(() => {
2384
+ this.loadNotifications();
2385
+ }, interval);
2386
+ }
2387
+ }
2388
+ /**
2389
+ * Clear the refresh timer if it exists
2390
+ */
2391
+ clearRefreshTimer() {
2392
+ if (this.refreshTimerId !== null) {
2393
+ clearInterval(this.refreshTimerId);
2394
+ this.refreshTimerId = null;
2395
+ }
2396
+ }
2397
+ /**
2398
+ * Load notifications data from service
2399
+ */
2400
+ async loadNotifications() {
2401
+ try {
2402
+ await this.notificationConnector.getList();
2403
+ this.cdr.detectChanges();
2404
+ }
2405
+ catch (error) {
2406
+ this.toastService.show({
2407
+ content: typeof error === 'string' ? error : 'Failed to load notifications!',
2408
+ color: 'danger',
2409
+ location: 'bottom-center',
2410
+ closeButton: true,
2411
+ timeOut: 3000,
2412
+ timeOutProgress: true,
2413
+ });
2414
+ }
2415
+ }
2416
+ /**
2417
+ * Manually refresh notifications
2418
+ */
2419
+ refreshNotifications() {
2420
+ this.loadNotifications();
2421
+ }
2422
+ /**
2423
+ * Get the count of new messages for the badge
2424
+ */
2425
+ getNewMessageCount() {
2426
+ const items = this.notifications();
2427
+ if (!items?.length)
2428
+ return 0;
2429
+ return items.filter((n) => !n.readAt).length;
2430
+ }
2431
+ /**
2432
+ * Handle tab change event from ax-tabs component
2433
+ * @param data The tab change event data
2434
+ */
2435
+ handleTabChange(data) {
2436
+ const index = data.index;
2437
+ // Map index to tab name: 0 = 'unread', 1 = 'all'
2438
+ const tabName = index === 0 ? 'unread' : 'all';
2439
+ this.onTabChange(tabName);
2440
+ }
2441
+ /**
2442
+ * Mark all notifications as read
2443
+ */
2444
+ async markAllAsRead() {
2445
+ try {
2446
+ await this.notificationConnector.markAsRead({ id: [] });
2447
+ this.cdr.detectChanges();
2448
+ }
2449
+ catch (error) {
2450
+ this.toastService.show({
2451
+ content: 'Failed to mark notifications as read',
2452
+ color: 'danger',
2453
+ location: 'bottom-center',
2454
+ closeButton: true,
2455
+ timeOut: 3000,
2456
+ });
2457
+ }
2458
+ }
2459
+ /**
2460
+ * Change the active tab
2461
+ */
2462
+ onTabChange(tabName) {
2463
+ this.activeTab.set(tabName);
2464
+ this.cdr.detectChanges();
2465
+ }
2466
+ /**
2467
+ * Handle notification click event
2468
+ */
2469
+ onNotificationClick(notification) {
2470
+ this.markAsReadIfNeeded(notification);
2471
+ this.notificationClick.emit(notification);
2472
+ }
2473
+ /**
2474
+ * Format the timestamp in a user-friendly way
2475
+ */
2476
+ formatTime(date) {
2477
+ if (!date)
2478
+ return '';
2479
+ const dateObj = typeof date === 'string' ? new Date(date) : date;
2480
+ const diffDays = this.getDaysDifference(dateObj);
2481
+ // Format based on how recent the date is
2482
+ if (diffDays === 0)
2483
+ return this.datePipe.transform(dateObj, 'h:mm a') || ''; // Today
2484
+ if (diffDays === 1)
2485
+ return 'Yesterday';
2486
+ if (diffDays < 7)
2487
+ return this.datePipe.transform(dateObj, 'EEE') || ''; // Day of week
2488
+ return this.datePipe.transform(dateObj, 'MM/DD/YYYY') || ''; // Older date
2489
+ }
2490
+ /**
2491
+ * Mark notification as read if needed
2492
+ */
2493
+ async markAsReadIfNeeded(notification) {
2494
+ try {
2495
+ // Always mark as read on click if unread, but don't toggle back to unread
2496
+ if (notification.readAt)
2497
+ return;
2498
+ await this.notificationConnector.markAsRead({ id: [notification.id] });
2499
+ // Emit the updated notification with readAt set
2500
+ // It will be read now because we only call this for unread notifications
2501
+ const updatedNotification = {
2502
+ ...notification,
2503
+ readAt: new Date(),
2504
+ };
2505
+ this.markAsRead.emit(updatedNotification);
2506
+ this.cdr.detectChanges();
2507
+ }
2508
+ catch (error) {
2509
+ console.error('Failed to mark notification as read:', error);
2510
+ }
2511
+ }
2512
+ /**
2513
+ * Calculate days difference from now
2514
+ */
2515
+ getDaysDifference(date) {
2516
+ const now = new Date();
2517
+ const diffMs = now.getTime() - date.getTime();
2518
+ return Math.floor(diffMs / (1000 * 60 * 60 * 24));
2519
+ }
2520
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNotificationWidgetViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2521
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: AXPNotificationWidgetViewComponent, isStandalone: true, selector: "ng-component", outputs: { notificationClick: "notificationClick", markAsRead: "markAsRead" }, providers: [
2522
+ DatePipe,
2523
+ // Provide a lightweight stub for AXMAdminNotificationSlotComponent so the admin item can inject it
2524
+ {
2525
+ provide: AXMAdminNotificationSlotComponent,
2526
+ useValue: {
2527
+ popover: () => ({ close: () => { } }),
2528
+ },
2529
+ },
2530
+ ], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-p-2 ax-size-full ax-flex ax-flex-col ax-gap-2\">\n <ax-tabs\n class=\"ax-bg-light-start ax-border-b ax-border-default ax-shrink-0\"\n [fitParent]=\"true\"\n location=\"bottom\"\n (onActiveTabChanged)=\"handleTabChange($event)\"\n >\n <ax-tab-item [text]=\"('@notification-management:unread' | translate | async) ?? 'Unread'\" class=\"ax-font-medium\">\n <ax-suffix>\n @if (getNewMessageCount() > 0) {\n <ax-badge color=\"primary\" [text]=\"getNewMessageCount().toString()\" size=\"sm\" class=\"ax-ml-1\"></ax-badge>\n }\n </ax-suffix>\n </ax-tab-item>\n <ax-tab-item\n [text]=\"('@notification-management:all' | translate | async) ?? 'All'\"\n class=\"ax-font-medium\"\n ></ax-tab-item>\n </ax-tabs>\n <div class=\"ax-space-y-1 ax-overflow-auto\">\n @for (item of notificationItems(); track item.id) {\n <axp-master-notification-item\n [data]=\"item\"\n [showAvatar]=\"showAvatar()\"\n [showDate]=\"showDate()\"\n (onPressNotificationItem)=\"onAdminItemClick($event)\"\n (onTogglePin)=\"onTogglePin($event)\"\n />\n } @empty {\n <axp-state-message\n icon=\"fa-light fa-bell-slash\"\n [title]=\"'@notification-management:no-notifications.title'\"\n [description]=\"'@notification-management:no-notifications.description'\"\n >\n </axp-state-message>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.notification-item{position:relative;margin-top:2px;margin-bottom:2px;display:flex;cursor:pointer;gap:1rem;border-radius:1rem;padding:.5rem;text-align:start;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));animation-duration:.2s}.notification-item .notification-avatar{position:relative;height:3rem}.notification-item .notification-avatar .unread-badge{position:absolute;bottom:.25rem;inset-inline-end:.25rem;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.notification-item .notification-content{min-width:0px;flex:1 1 0%}.notification-item .notification-content .notification-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.notification-item .notification-content .notification-header .notification-title{font-size:1rem;line-height:1.5rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface))}.notification-item .notification-content .notification-header .notification-time{white-space:nowrap;font-size:.75rem;line-height:1rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.notification-item .notification-content .notification-body{margin-top:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;color:rgb(var(--ax-sys-color-on-surface-variant))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i2$1.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { kind: "component", type: i2$1.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.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: AXButtonModule }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i3$1.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXMAdminNotificationItemComponent, selector: "axp-master-notification-item", inputs: ["data", "showAvatar", "showDate", "selectionMode"], outputs: ["onPressNotificationItem", "onClosePopover", "onTogglePin"] }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "look"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2531
+ }
2532
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXPNotificationWidgetViewComponent, decorators: [{
2533
+ type: Component,
2534
+ args: [{ standalone: true, imports: [
2535
+ CommonModule,
2536
+ AXTabsModule,
2537
+ AXDecoratorModule,
2538
+ AXButtonModule,
2539
+ AXBadgeModule,
2540
+ AXTranslationModule,
2541
+ AXMAdminNotificationItemComponent,
2542
+ AXPStateMessageComponent,
2543
+ ], providers: [
2544
+ DatePipe,
2545
+ // Provide a lightweight stub for AXMAdminNotificationSlotComponent so the admin item can inject it
2546
+ {
2547
+ provide: AXMAdminNotificationSlotComponent,
2548
+ useValue: {
2549
+ popover: () => ({ close: () => { } }),
2550
+ },
2551
+ },
2552
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"ax-p-2 ax-size-full ax-flex ax-flex-col ax-gap-2\">\n <ax-tabs\n class=\"ax-bg-light-start ax-border-b ax-border-default ax-shrink-0\"\n [fitParent]=\"true\"\n location=\"bottom\"\n (onActiveTabChanged)=\"handleTabChange($event)\"\n >\n <ax-tab-item [text]=\"('@notification-management:unread' | translate | async) ?? 'Unread'\" class=\"ax-font-medium\">\n <ax-suffix>\n @if (getNewMessageCount() > 0) {\n <ax-badge color=\"primary\" [text]=\"getNewMessageCount().toString()\" size=\"sm\" class=\"ax-ml-1\"></ax-badge>\n }\n </ax-suffix>\n </ax-tab-item>\n <ax-tab-item\n [text]=\"('@notification-management:all' | translate | async) ?? 'All'\"\n class=\"ax-font-medium\"\n ></ax-tab-item>\n </ax-tabs>\n <div class=\"ax-space-y-1 ax-overflow-auto\">\n @for (item of notificationItems(); track item.id) {\n <axp-master-notification-item\n [data]=\"item\"\n [showAvatar]=\"showAvatar()\"\n [showDate]=\"showDate()\"\n (onPressNotificationItem)=\"onAdminItemClick($event)\"\n (onTogglePin)=\"onTogglePin($event)\"\n />\n } @empty {\n <axp-state-message\n icon=\"fa-light fa-bell-slash\"\n [title]=\"'@notification-management:no-notifications.title'\"\n [description]=\"'@notification-management:no-notifications.description'\"\n >\n </axp-state-message>\n }\n </div>\n</div>\n", styles: [":host{display:block;width:100%;height:100%}.notification-item{position:relative;margin-top:2px;margin-bottom:2px;display:flex;cursor:pointer;gap:1rem;border-radius:1rem;padding:.5rem;text-align:start;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;background-color:rgb(var(--ax-sys-color-lightest-surface));color:rgb(var(--ax-sys-color-on-lightest-surface));border-color:rgb(var(--ax-sys-color-border-lightest-surface));animation-duration:.2s}.notification-item .notification-avatar{position:relative;height:3rem}.notification-item .notification-avatar .unread-badge{position:absolute;bottom:.25rem;inset-inline-end:.25rem;width:10px;height:10px;background:rgb(var(--ax-sys-color-primary-500));border:2px solid rgb(var(--ax-sys-color-surface));border-radius:50%}.notification-item .notification-content{min-width:0px;flex:1 1 0%}.notification-item .notification-content .notification-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.notification-item .notification-content .notification-header .notification-title{font-size:1rem;line-height:1.5rem;font-weight:500;color:rgb(var(--ax-sys-color-on-surface))}.notification-item .notification-content .notification-header .notification-time{white-space:nowrap;font-size:.75rem;line-height:1rem;color:rgb(var(--ax-sys-color-on-surface-variant))}.notification-item .notification-content .notification-body{margin-top:.25rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;line-height:1.25rem;color:rgb(var(--ax-sys-color-on-surface-variant))}\n"] }]
2553
+ }], ctorParameters: () => [], propDecorators: { notificationClick: [{ type: i0.Output, args: ["notificationClick"] }], markAsRead: [{ type: i0.Output, args: ["markAsRead"] }] } });
2554
+
2555
+ var notificationWidget_component = /*#__PURE__*/Object.freeze({
2556
+ __proto__: null,
2557
+ AXPNotificationWidgetViewComponent: AXPNotificationWidgetViewComponent
2558
+ });
2559
+
2560
+ /**
2561
+ * Configuration for the Notification Widget
2562
+ */
2563
+ const AXPMyNotificationDashboardWidget = {
2564
+ name: RootConfig.widgets.myNotificationDashboard,
2565
+ title: '@dashboard:widgets.my-notification.widget-title',
2566
+ categories: [AXP_WIDGETS_UTILITY_CATEGORY],
2567
+ groups: [AXPWidgetGroupEnum.DashboardWidget],
2568
+ type: 'dashboard',
2569
+ description: '@dashboard:widgets.my-notification.widget-description',
2570
+ icon: 'fa-regular fa-bell',
2571
+ properties: [
2572
+ cloneProperty(AXP_DATA_PATH_PROPERTY, { visible: false }),
2573
+ // ====== Title ======
2574
+ {
2575
+ name: 'title',
2576
+ title: '@notification-management:widgets.my-notification-dashboard.chart-title',
2577
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2578
+ schema: {
2579
+ defaultValue: '',
2580
+ dataType: 'string',
2581
+ interface: {
2582
+ name: 'title',
2583
+ path: 'options.title',
2584
+ type: AXPWidgetsCatalog.text,
2585
+ options: {
2586
+ placeholder: '@dashboard:widgets.my-notification.title-placeholder',
2587
+ },
2588
+ },
2589
+ },
2590
+ visible: true,
2591
+ },
2592
+ {
2593
+ name: 'maxItems',
2594
+ title: '@notification-management:widgets.my-notification-dashboard.max-items',
2595
+ description: 'Maximum number of notification items to display',
2596
+ group: AXP_STYLING_PROPERTY_GROUP,
2597
+ schema: {
2598
+ defaultValue: 10,
2599
+ dataType: 'number',
2600
+ interface: {
2601
+ name: 'maxItems',
2602
+ path: 'options.maxItems',
2603
+ type: AXPWidgetsCatalog.number,
2604
+ options: {
2605
+ minValue: 1,
2606
+ maxValue: 100,
2607
+ },
2608
+ },
2609
+ },
2610
+ visible: true,
2611
+ },
2612
+ {
2613
+ name: 'showAvatar',
2614
+ title: '@notification-management:widgets.my-notification-dashboard.show-avatar',
2615
+ description: 'Whether to show avatars in notifications',
2616
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2617
+ schema: {
2618
+ defaultValue: true,
2619
+ dataType: 'boolean',
2620
+ interface: {
2621
+ name: 'showAvatar',
2622
+ path: 'options.showAvatar',
2623
+ type: AXPWidgetsCatalog.toggle,
2624
+ },
2625
+ },
2626
+ visible: true,
2627
+ },
2628
+ {
2629
+ name: 'showDate',
2630
+ title: '@notification-management:widgets.my-notification-dashboard.show-date',
2631
+ description: 'Whether to show date in notifications',
2632
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2633
+ schema: {
2634
+ defaultValue: true,
2635
+ dataType: 'boolean',
2636
+ interface: {
2637
+ name: 'showDate',
2638
+ path: 'options.showDate',
2639
+ type: AXPWidgetsCatalog.toggle,
2640
+ },
2641
+ },
2642
+ visible: true,
2643
+ },
2644
+ {
2645
+ name: 'autoRefresh',
2646
+ title: '@notification-management:widgets.my-notification-dashboard.auto-refresh',
2647
+ description: 'Automatically refresh notifications at regular intervals',
2648
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2649
+ schema: {
2650
+ defaultValue: true,
2651
+ dataType: 'boolean',
2652
+ interface: {
2653
+ name: 'autoRefresh',
2654
+ path: 'options.autoRefresh',
2655
+ type: AXPWidgetsCatalog.toggle,
2656
+ },
2657
+ },
2658
+ visible: true,
2659
+ },
2660
+ {
2661
+ name: 'refreshInterval',
2662
+ title: '@notification-management:widgets.my-notification-dashboard.refresh-interval',
2663
+ description: 'Interval in seconds between automatic refreshes',
2664
+ group: AXP_APPEARANCE_PROPERTY_GROUP,
2665
+ schema: {
2666
+ defaultValue: 60,
2667
+ dataType: 'number',
2668
+ interface: {
2669
+ name: 'refreshInterval',
2670
+ path: 'options.refreshInterval',
2671
+ type: AXPWidgetsCatalog.number,
2672
+ options: {
2673
+ minValue: 10,
2674
+ maxValue: 3600,
2675
+ },
2676
+ },
2677
+ },
2678
+ visible: true,
2679
+ },
2680
+ ],
2681
+ components: {
2682
+ view: {
2683
+ component: () => Promise.resolve().then(function () { return notificationWidget_component; }).then((c) => c.AXPNotificationWidgetViewComponent),
2684
+ },
2685
+ },
2686
+ meta: {
2687
+ dimensions: {
2688
+ lg: {
2689
+ width: 3,
2690
+ height: 5,
2691
+ minWidth: 2,
2692
+ minHeight: 4,
2693
+ maxWidth: 4,
2694
+ maxHeight: 7,
2695
+ },
2696
+ md: {
2697
+ width: 3,
2698
+ height: 5,
2699
+ minWidth: 2,
2700
+ minHeight: 4,
2701
+ maxWidth: 4,
2702
+ maxHeight: 7,
2703
+ },
2704
+ sm: {
2705
+ height: 5,
2706
+ minHeight: 4,
2707
+ maxHeight: 7,
2708
+ },
2709
+ },
2710
+ },
2711
+ };
2712
+
2713
+ //#endregion
2714
+ //#region ---- Notification Management Widgets Provider ----
2715
+ class AXMNotificationManagementWidgetsProvider {
2716
+ getWidgets() {
2717
+ return [AXPMyNotificationDashboardWidget];
2718
+ }
2719
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementWidgetsProvider, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2720
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementWidgetsProvider }); }
2721
+ }
2722
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementWidgetsProvider, decorators: [{
2723
+ type: Injectable
2724
+ }] });
2725
+
2726
+ //#region ---- Command keys ----
2727
+ const NOTIFICATION_MANAGEMENT_EMAIL_SHOW_DIALOG_COMMAND_KEY = 'NotificationManagement:Email:ShowDialog';
2728
+ const NOTIFICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY = 'NotificationManagement:Email:Send';
2729
+ //#endregion
2730
+
2731
+ //#region ---- Types ----
2732
+ //#endregion
2733
+
2734
+ //#endregion
2735
+ //#region ---- Helpers ----
2736
+ function normalizeTextTemplateId(value) {
2737
+ if (typeof value === 'string') {
2738
+ const t = value.trim();
2739
+ return t || undefined;
2740
+ }
2741
+ if (value != null && typeof value === 'object' && 'id' in value) {
2742
+ const id = value.id;
2743
+ if (typeof id === 'string' && id.trim())
2744
+ return id.trim();
2745
+ }
2746
+ return undefined;
2747
+ }
2748
+ function parseMergeRecord(value) {
2749
+ if (value == null)
2750
+ return {};
2751
+ if (typeof value === 'object' && !Array.isArray(value)) {
2752
+ const out = {};
2753
+ for (const [k, v] of Object.entries(value)) {
2754
+ out[k] = v == null ? '' : String(v);
2755
+ }
2756
+ return out;
2757
+ }
2758
+ return {};
2759
+ }
2760
+ /**
2761
+ * True when HTML/plain body has no user-visible text (handles empty `<p><br></p>` etc.).
2762
+ */
2763
+ function isEffectivelyEmptyRichTextBody(value) {
2764
+ const trimmed = value.trim();
2765
+ if (!trimmed) {
2766
+ return true;
2767
+ }
2768
+ const withoutTags = trimmed
2769
+ .replace(/<[^>]+>/g, ' ')
2770
+ .replace(/&nbsp;/gi, ' ')
2771
+ .replace(/\s+/g, ' ')
2772
+ .trim();
2773
+ return withoutTags.length === 0;
2774
+ }
2775
+ /** Resolved entity module for the text-template data selector. */
2776
+ const TEXT_TEMPLATE_ENTITY_MODULE = 'ContentManagement';
2777
+ /** Resolved entity name for the text-template data selector. */
2778
+ const TEXT_TEMPLATE_ENTITY_NAME = 'TextTemplate';
2779
+ /** List filter: only templates with a non-empty `channels.email.body` (excludes SMS-only rows). */
2780
+ const TEXT_TEMPLATE_LIST_EMAIL_BODY_FILTER = {
2781
+ field: 'channels.email.body',
2782
+ operator: { type: 'isNotEmpty' },
2783
+ };
2784
+ //#endregion
2785
+ //#region ---- Service ----
2786
+ /**
2787
+ * Opens the send-email dialog built with the layout dialog builder and delegates send to
2788
+ * {@link NOTIFICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY}.
2789
+ */
2790
+ class AXMNotificationEmailComposerService {
2791
+ constructor() {
2792
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
2793
+ this.translationService = inject(AXTranslationService);
2794
+ this.commandService = inject(AXPCommandService);
2795
+ this.entityDataSelector = inject(AXPEntityDataSelectorService);
2796
+ this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
2797
+ }
2798
+ /**
2799
+ * Shows the compose dialog; on submit runs the send command with the dialog context.
2800
+ * When {@link NotificationManagementEmailShowDialogInput.textTemplateId} is not set, the standard
2801
+ * entity data selector ({@link AXPEntityDataSelectorService}) runs first; the compose dialog has no template field.
2802
+ */
2803
+ async openSendEmailDialog(input) {
2804
+ const merge = parseMergeRecord(input.merge);
2805
+ let textTemplateId = input.textTemplateId?.trim() ?? '';
2806
+ if (!textTemplateId) {
2807
+ const picked = await this.openTextTemplatePickerDialog();
2808
+ if (picked === null) {
2809
+ return { success: false, data: null };
2810
+ }
2811
+ textTemplateId = picked;
2812
+ }
2813
+ let subject = input.subject ?? '';
2814
+ let body = input.body ?? '';
2815
+ if (textTemplateId) {
2816
+ const rendered = await this.commandService.execute(AXC_TEXT_TEMPLATE_RENDER_COMMAND_KEY, {
2817
+ textTemplateId,
2818
+ channel: 'email',
2819
+ merge,
2820
+ locale: this.translationService.getActiveLang() ?? 'en-US',
2821
+ });
2822
+ if (rendered?.success && rendered.data) {
2823
+ subject = rendered.data.subject ?? subject;
2824
+ body = rendered.data.body ?? body;
2825
+ }
2826
+ }
2827
+ const defaultTitle = await this.translationService.translateAsync('@notification-management:email.dialog.title');
2828
+ const title = input.dialogTitle?.trim()
2829
+ ? await this.translationService.translateAsync(input.dialogTitle)
2830
+ : defaultTitle;
2831
+ try {
2832
+ const result = await this.layoutBuilder
2833
+ .create()
2834
+ .dialog((dialog) => {
2835
+ dialog
2836
+ .setTitle(title)
2837
+ .setSize('lg')
2838
+ .setCloseButton(true)
2839
+ .setContext({
2840
+ to: input.to ?? '',
2841
+ cc: input.cc ?? '',
2842
+ bcc: input.bcc ?? '',
2843
+ subject,
2844
+ body,
2845
+ textTemplateId,
2846
+ })
2847
+ .content((flex) => {
2848
+ flex
2849
+ .setDirection('column')
2850
+ .setGap('16px')
2851
+ .formField('@notification-management:email.dialog.fields.to.title', (field) => {
2852
+ field.path('to');
2853
+ field.textBox({
2854
+ validations: [{ rule: 'required' }],
2855
+ placeholder: '@notification-management:email.dialog.fields.to.placeholder',
2856
+ });
2857
+ })
2858
+ .formField('@notification-management:email.dialog.fields.cc.title', (field) => {
2859
+ field.path('cc');
2860
+ field.textBox({
2861
+ placeholder: '@notification-management:email.dialog.fields.cc.placeholder',
2862
+ });
2863
+ })
2864
+ .formField('@notification-management:email.dialog.fields.bcc.title', (field) => {
2865
+ field.path('bcc');
2866
+ field.textBox({
2867
+ placeholder: '@notification-management:email.dialog.fields.bcc.placeholder',
2868
+ });
2869
+ })
2870
+ .formField('@notification-management:email.dialog.fields.subject.title', (field) => {
2871
+ field.path('subject');
2872
+ field.textBox({
2873
+ validations: [{ rule: 'required' }],
2874
+ placeholder: '@notification-management:email.dialog.fields.subject.placeholder',
2875
+ });
2876
+ })
2877
+ .formField('@notification-management:email.dialog.fields.body.title', (field) => {
2878
+ field.path('body');
2879
+ field.richText({
2880
+ validations: [{ rule: 'required' }],
2881
+ placeholder: '@notification-management:email.dialog.fields.body.placeholder',
2882
+ });
2883
+ });
2884
+ })
2885
+ .setActions((actions) => {
2886
+ actions.cancel('@general:actions.cancel.title').submit('@general:actions.send.title');
2887
+ })
2888
+ .onAction(async (dialogRef) => {
2889
+ const context = dialogRef.context();
2890
+ const action = dialogRef.action();
2891
+ if (!context || action === 'cancel') {
2892
+ return { success: false, data: null };
2893
+ }
2894
+ const to = String(context['to'] ?? '').trim();
2895
+ const subjectOut = String(context['subject'] ?? '').trim();
2896
+ const bodyOut = String(context['body'] ?? '');
2897
+ if (!to || !subjectOut || isEffectivelyEmptyRichTextBody(bodyOut)) {
2898
+ return {
2899
+ success: false,
2900
+ message: {
2901
+ text: await this.translationService.translateAsync('@notification-management:email.dialog.messages.required-fields'),
2902
+ },
2903
+ data: null,
2904
+ };
2905
+ }
2906
+ const sendInput = {
2907
+ to,
2908
+ cc: String(context['cc'] ?? '').trim() || undefined,
2909
+ bcc: String(context['bcc'] ?? '').trim() || undefined,
2910
+ subject: subjectOut,
2911
+ body: bodyOut.trim(),
2912
+ textTemplateId: normalizeTextTemplateId(context['textTemplateId']),
2913
+ };
2914
+ const sendResult = await this.commandService.execute(NOTIFICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY, sendInput);
2915
+ return (sendResult ?? {
2916
+ success: false,
2917
+ message: { text: 'Send command did not return a result.' },
2918
+ data: null,
2919
+ });
2920
+ });
2921
+ })
2922
+ .show();
2923
+ return result;
2924
+ }
2925
+ catch (e) {
2926
+ return {
2927
+ success: false,
2928
+ message: {
2929
+ text: e instanceof Error ? e.message : 'Failed to open send email dialog.',
2930
+ },
2931
+ data: null,
2932
+ };
2933
+ }
2934
+ }
2935
+ /**
2936
+ * Opens {@link AXPEntityDataSelectorService} for `ContentManagement.TextTemplate`. Returns `null` if
2937
+ * the selector is dismissed without applying, `''` if the user applies with no row selected (compose
2938
+ * without a template), or the selected template id.
2939
+ */
2940
+ async openTextTemplatePickerDialog() {
2941
+ const entity = await this.entityRegistry.resolve(TEXT_TEMPLATE_ENTITY_MODULE, TEXT_TEMPLATE_ENTITY_NAME);
2942
+ if (!entity) {
2943
+ return null;
2944
+ }
2945
+ const title = await this.translationService.translateAsync('@notification-management:email.template-picker.title');
2946
+ try {
2947
+ const result = await this.entityDataSelector.open({
2948
+ entity,
2949
+ title,
2950
+ allowMultiple: false,
2951
+ allowCreate: 'none',
2952
+ filters: TEXT_TEMPLATE_LIST_EMAIL_BODY_FILTER,
2953
+ columns: ['title', 'name'],
2954
+ searchFields: ['title', 'name'],
2955
+ });
2956
+ if (result == null) {
2957
+ return null;
2958
+ }
2959
+ const items = result.items ?? [];
2960
+ if (items.length === 0) {
2961
+ return '';
2962
+ }
2963
+ const rawId = items[0]['id'];
2964
+ if (rawId != null && String(rawId).trim() !== '') {
2965
+ return String(rawId).trim();
2966
+ }
2967
+ return '';
2968
+ }
2969
+ catch {
2970
+ return null;
2971
+ }
2972
+ }
2973
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEmailComposerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2974
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEmailComposerService, providedIn: 'root' }); }
2975
+ }
2976
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationEmailComposerService, decorators: [{
2977
+ type: Injectable,
2978
+ args: [{
2979
+ providedIn: 'root',
2980
+ }]
2981
+ }] });
2982
+
2983
+ //#endregion
2984
+ //#region ---- Command ----
2985
+ class NotificationManagementEmailShowDialogCommand {
2986
+ constructor() {
2987
+ this.composer = inject(AXMNotificationEmailComposerService);
2988
+ }
2989
+ async execute(input) {
2990
+ const raw = input;
2991
+ const { __context__: _workflowContext, ...rest } = raw;
2992
+ const contextOptions = _workflowContext?.options;
2993
+ const evaluated = {
2994
+ ...(contextOptions ?? {}),
2995
+ ...rest,
2996
+ };
2997
+ return this.composer.openSendEmailDialog(evaluated);
2998
+ }
2999
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NotificationManagementEmailShowDialogCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3000
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NotificationManagementEmailShowDialogCommand, providedIn: 'root' }); }
3001
+ }
3002
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: NotificationManagementEmailShowDialogCommand, decorators: [{
3003
+ type: Injectable,
3004
+ args: [{
3005
+ providedIn: 'root',
3006
+ }]
3007
+ }] });
3008
+
3009
+ var showEmailDialog_command = /*#__PURE__*/Object.freeze({
3010
+ __proto__: null,
3011
+ NotificationManagementEmailShowDialogCommand: NotificationManagementEmailShowDialogCommand
3012
+ });
3013
+
3014
+ //#region ---- Imports ----
3015
+ //#endregion
3016
+ //#region ---- Service ----
3017
+ class AXMInAppNotificationService {
3018
+ constructor() {
3019
+ this.notificationService = inject(AXMNotificationEntityService);
3020
+ }
3021
+ async create(request) {
3022
+ await this.notificationService.create({
3023
+ id: request.id,
3024
+ title: request.title,
3025
+ body: request.body,
3026
+ type: 'Log',
3027
+ channel: 'InApp',
3028
+ content: {
3029
+ content: request.body,
3030
+ contentType: 'text',
3031
+ },
3032
+ sender: {
3033
+ id: 'system',
3034
+ type: 'user',
3035
+ fullName: 'System',
3036
+ },
3037
+ receiver: request.receiver,
3038
+ template: {
3039
+ category: 'Inbox',
3040
+ prority: request.priority,
3041
+ icon: request.icon,
3042
+ isPinned: false,
3043
+ },
3044
+ readAt: null,
3045
+ createAt: new Date(),
3046
+ entityName: 'notifications',
3047
+ data: request.data,
3048
+ name: request.name,
3049
+ });
3050
+ }
3051
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMInAppNotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3052
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMInAppNotificationService }); }
3053
+ }
3054
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMInAppNotificationService, decorators: [{
3055
+ type: Injectable
3056
+ }] });
3057
+ //#endregion
3058
+ //#region ---- Provider ----
3059
+ const AXM_IN_APP_NOTIFICATION_SERVICE_PROVIDER = {
3060
+ provide: AXP_IN_APP_NOTIFICATION_SERVICE,
3061
+ useClass: AXMInAppNotificationService,
3062
+ };
3063
+
3064
+ function routesFactory() {
3065
+ const routes = [
3066
+ {
3067
+ path: ':app/notifications',
3068
+ canActivate: [...AXP_PROTECTED_ROUTE_GUARDS],
3069
+ loadComponent: () => {
3070
+ return AXPRootLayoutComponent;
3071
+ },
3072
+ title: 'Notifications',
3073
+ children: [
3074
+ {
3075
+ path: '',
3076
+ loadComponent: () => import('./acorex-modules-notification-management-notification-page.component-ATFOFL7C.mjs').then((c) => c.AXMNotificationPageComponent),
3077
+ data: { reuse: true },
3078
+ },
3079
+ ],
3080
+ },
3081
+ ];
3082
+ return routes;
3083
+ }
3084
+ class AXMNotificationManagementModule {
3085
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3086
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementModule, imports: [i1$2.AXPComponentSlotModule, AXPWidgetCoreModule,
3087
+ // Entity Modules
3088
+ AXMNotificationEntityModule,
3089
+ AXMNotificationTemplateEntityModule,
3090
+ AXMNotificationChannelEntityModule] }); }
3091
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementModule, providers: [
3092
+ AXM_IN_APP_NOTIFICATION_SERVICE_PROVIDER,
3093
+ // Module-specific providers (not part of manifest system)
3094
+ {
3095
+ provide: ROUTES,
3096
+ multi: true,
3097
+ useFactory: routesFactory,
3098
+ },
3099
+ {
3100
+ provide: AXP_TASK_BADGE_PROVIDERS,
3101
+ useClass: AXMNotificationBadgeProvider,
3102
+ multi: true,
3103
+ },
3104
+ // Module Manifest Provider
3105
+ {
3106
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
3107
+ useValue: NotificationManagementManifest,
3108
+ multi: true,
3109
+ },
3110
+ // Provider references (now using tokens)
3111
+ {
3112
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
3113
+ useClass: AXMPermissionDefinitionProvider,
3114
+ multi: true,
3115
+ },
3116
+ {
3117
+ provide: AXP_MENU_PROVIDER,
3118
+ useClass: AXMMenuProvider,
3119
+ multi: true,
3120
+ },
3121
+ {
3122
+ provide: AXP_ENTITY_DEFINITION_LOADER,
3123
+ useClass: AXMEntityLoader,
3124
+ multi: true,
3125
+ },
3126
+ {
3127
+ provide: AXP_WIDGET_DEFINITION_PROVIDER,
3128
+ useClass: AXMNotificationManagementWidgetsProvider,
3129
+ multi: true,
3130
+ },
3131
+ provideCommandSetups([
3132
+ {
3133
+ key: NOTIFICATION_MANAGEMENT_EMAIL_SHOW_DIALOG_COMMAND_KEY,
3134
+ command: () => Promise.resolve().then(function () { return showEmailDialog_command; }).then((m) => m.NotificationManagementEmailShowDialogCommand),
3135
+ },
3136
+ ]),
3137
+ ], imports: [AXPComponentSlotModule.forChild({
3138
+ 'root-header-end': [
3139
+ {
3140
+ name: 'notification',
3141
+ component: AXMAdminNotificationSlotComponent,
3142
+ },
3143
+ ],
3144
+ }),
3145
+ AXPWidgetCoreModule,
3146
+ // Entity Modules
3147
+ AXMNotificationEntityModule,
3148
+ AXMNotificationTemplateEntityModule,
3149
+ AXMNotificationChannelEntityModule] }); }
3150
+ }
3151
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: AXMNotificationManagementModule, decorators: [{
3152
+ type: NgModule,
3153
+ args: [{
3154
+ imports: [
3155
+ AXPComponentSlotModule.forChild({
3156
+ 'root-header-end': [
3157
+ {
3158
+ name: 'notification',
3159
+ component: AXMAdminNotificationSlotComponent,
3160
+ },
3161
+ ],
3162
+ }),
3163
+ AXPWidgetCoreModule,
3164
+ // Entity Modules
3165
+ AXMNotificationEntityModule,
3166
+ AXMNotificationTemplateEntityModule,
3167
+ AXMNotificationChannelEntityModule,
3168
+ ],
3169
+ exports: [],
3170
+ declarations: [],
3171
+ providers: [
3172
+ AXM_IN_APP_NOTIFICATION_SERVICE_PROVIDER,
3173
+ // Module-specific providers (not part of manifest system)
3174
+ {
3175
+ provide: ROUTES,
3176
+ multi: true,
3177
+ useFactory: routesFactory,
3178
+ },
3179
+ {
3180
+ provide: AXP_TASK_BADGE_PROVIDERS,
3181
+ useClass: AXMNotificationBadgeProvider,
3182
+ multi: true,
3183
+ },
3184
+ // Module Manifest Provider
3185
+ {
3186
+ provide: AXP_MODULE_MANIFEST_PROVIDER,
3187
+ useValue: NotificationManagementManifest,
3188
+ multi: true,
3189
+ },
3190
+ // Provider references (now using tokens)
3191
+ {
3192
+ provide: AXP_PERMISSION_DEFINITION_PROVIDER,
3193
+ useClass: AXMPermissionDefinitionProvider,
3194
+ multi: true,
3195
+ },
3196
+ {
3197
+ provide: AXP_MENU_PROVIDER,
3198
+ useClass: AXMMenuProvider,
3199
+ multi: true,
3200
+ },
3201
+ {
3202
+ provide: AXP_ENTITY_DEFINITION_LOADER,
3203
+ useClass: AXMEntityLoader,
3204
+ multi: true,
3205
+ },
3206
+ {
3207
+ provide: AXP_WIDGET_DEFINITION_PROVIDER,
3208
+ useClass: AXMNotificationManagementWidgetsProvider,
3209
+ multi: true,
3210
+ },
3211
+ provideCommandSetups([
3212
+ {
3213
+ key: NOTIFICATION_MANAGEMENT_EMAIL_SHOW_DIALOG_COMMAND_KEY,
3214
+ command: () => Promise.resolve().then(function () { return showEmailDialog_command; }).then((m) => m.NotificationManagementEmailShowDialogCommand),
3215
+ },
3216
+ ]),
3217
+ ],
3218
+ }]
3219
+ }] });
3220
+
3221
+ var AXPSettingKeys;
3222
+ (function (AXPSettingKeys) {
3223
+ // Email Settings
3224
+ AXPSettingKeys["Server"] = "NotificationManagement:Setting:Email.Server";
3225
+ AXPSettingKeys["Port"] = "NotificationManagement:Setting:Email.Port";
3226
+ AXPSettingKeys["Username"] = "NotificationManagement:Setting:Email.Username";
3227
+ AXPSettingKeys["Password"] = "NotificationManagement:Setting:Email.Password";
3228
+ AXPSettingKeys["FromAddress"] = "NotificationManagement:Setting:Email.FromAddress";
3229
+ AXPSettingKeys["UseSSL"] = "NotificationManagement:Setting:Email.UseSSL";
3230
+ AXPSettingKeys["UseTLS"] = "NotificationManagement:Setting:Email.UseTLS";
3231
+ // Telegram Settings
3232
+ AXPSettingKeys["TelegramToken"] = "NotificationManagement:Setting:Telegram.Token";
3233
+ AXPSettingKeys["TelegramChatId"] = "NotificationManagement:Setting:Telegram.ChatId";
3234
+ // WhatsApp Settings
3235
+ AXPSettingKeys["WhatsAppApiUrl"] = "NotificationManagement:Setting:WhatsApp.ApiUrl";
3236
+ AXPSettingKeys["WhatsAppAuthToken"] = "NotificationManagement:Setting:WhatsApp.AuthToken";
3237
+ // Firebase Settings
3238
+ AXPSettingKeys["FirebaseApiKey"] = "NotificationManagement:Setting:Firebase.ApiKey";
3239
+ AXPSettingKeys["FirebaseProjectId"] = "NotificationManagement:Setting:Firebase.ProjectId";
3240
+ AXPSettingKeys["FirebaseSenderId"] = "NotificationManagement:Setting:Firebase.SenderId";
3241
+ AXPSettingKeys["FirebaseAppId"] = "NotificationManagement:Setting:Firebase.AppId";
3242
+ })(AXPSettingKeys || (AXPSettingKeys = {}));
3243
+
3244
+ const I18N = '@notification-management:settings.notification-settings';
3245
+ class AXMSettingProvider {
3246
+ async provide(context) {
3247
+ context
3248
+ // Add Notification Settings Group
3249
+ .addGroup('notification-settings', `${I18N}.nav-title`, `${I18N}.description`, RootConfig$1.module.icon, `${I18N}.title`, 95)
3250
+ // SMTP Settings Section
3251
+ .addSection('smtp-settings', `${I18N}.smtp.title`, `${I18N}.smtp.description`)
3252
+ .addSetting({
3253
+ key: AXPSettingKeys.Server,
3254
+ title: `${I18N}.smtp.server.title`,
3255
+ scope: 'T',
3256
+ isInherited: true,
3257
+ defaultValue: '',
3258
+ widget: {
3259
+ type: AXPWidgetsList.Editors.TextBox,
3260
+ },
3261
+ description: `${I18N}.smtp.server.description`,
3262
+ })
3263
+ .addSetting({
3264
+ key: AXPSettingKeys.Port,
3265
+ title: `${I18N}.smtp.port.title`,
3266
+ scope: 'T',
3267
+ isInherited: true,
3268
+ defaultValue: 587,
3269
+ widget: {
3270
+ type: AXPWidgetsList.Editors.NumberBox,
3271
+ options: {
3272
+ minValue: 1,
3273
+ maxValue: 65535,
3274
+ },
3275
+ },
3276
+ description: `${I18N}.smtp.port.description`,
3277
+ })
3278
+ .addSetting({
3279
+ key: AXPSettingKeys.Username,
3280
+ title: `${I18N}.smtp.username.title`,
3281
+ scope: 'T',
3282
+ isInherited: true,
3283
+ defaultValue: '',
3284
+ widget: {
3285
+ type: AXPWidgetsList.Editors.TextBox,
3286
+ },
3287
+ description: `${I18N}.smtp.username.description`,
3288
+ })
3289
+ .addSetting({
3290
+ key: AXPSettingKeys.Password,
3291
+ title: `${I18N}.smtp.password.title`,
3292
+ scope: 'T',
3293
+ isInherited: true,
3294
+ defaultValue: '',
3295
+ widget: {
3296
+ type: AXPWidgetsList.Editors.PasswordBox,
3297
+ },
3298
+ description: `${I18N}.smtp.password.description`,
3299
+ })
3300
+ .addSetting({
3301
+ key: AXPSettingKeys.UseSSL,
3302
+ title: `${I18N}.smtp.ssl.title`,
3303
+ scope: 'T',
3304
+ isInherited: true,
3305
+ defaultValue: false,
3306
+ widget: {
3307
+ type: AXPWidgetsList.Editors.ToggleSwitch,
3308
+ },
3309
+ description: `${I18N}.smtp.ssl.description`,
3310
+ })
3311
+ .addSetting({
3312
+ key: AXPSettingKeys.UseTLS,
3313
+ title: `${I18N}.smtp.tls.title`,
3314
+ scope: 'T',
3315
+ isInherited: true,
3316
+ defaultValue: true,
3317
+ widget: {
3318
+ type: AXPWidgetsList.Editors.ToggleSwitch,
3319
+ },
3320
+ description: `${I18N}.smtp.tls.description`,
3321
+ })
3322
+ .endSection()
3323
+ // Telegram Settings Section
3324
+ .addSection('telegram-settings', `${I18N}.telegram.title`, `${I18N}.telegram.description`)
3325
+ .addSetting({
3326
+ key: AXPSettingKeys.TelegramToken,
3327
+ title: `${I18N}.telegram.token.title`,
3328
+ scope: 'T',
3329
+ isInherited: true,
3330
+ defaultValue: '',
3331
+ widget: {
3332
+ type: AXPWidgetsList.Editors.TextBox,
3333
+ },
3334
+ description: `${I18N}.telegram.token.description`,
3335
+ })
3336
+ .addSetting({
3337
+ key: AXPSettingKeys.TelegramChatId,
3338
+ title: `${I18N}.telegram.chat-id.title`,
3339
+ scope: 'T',
3340
+ isInherited: true,
3341
+ defaultValue: '',
3342
+ widget: {
3343
+ type: AXPWidgetsList.Editors.TextBox,
3344
+ },
3345
+ description: `${I18N}.telegram.chat-id.description`,
3346
+ })
3347
+ .endSection()
3348
+ // WhatsApp Settings Section
3349
+ .addSection('whatsapp-settings', `${I18N}.whatsapp.title`, `${I18N}.whatsapp.description`)
3350
+ .addSetting({
3351
+ key: AXPSettingKeys.WhatsAppApiUrl,
3352
+ title: `${I18N}.whatsapp.api-url.title`,
3353
+ scope: 'T',
3354
+ isInherited: true,
3355
+ defaultValue: '',
3356
+ widget: {
3357
+ type: AXPWidgetsList.Editors.TextBox,
3358
+ },
3359
+ description: `${I18N}.whatsapp.api-url.description`,
3360
+ })
3361
+ .addSetting({
3362
+ key: AXPSettingKeys.WhatsAppAuthToken,
3363
+ title: `${I18N}.whatsapp.auth-token.title`,
3364
+ scope: 'T',
3365
+ isInherited: true,
3366
+ defaultValue: '',
3367
+ widget: {
3368
+ type: AXPWidgetsList.Editors.PasswordBox,
3369
+ },
3370
+ description: `${I18N}.whatsapp.auth-token.description`,
3371
+ })
3372
+ .endSection()
3373
+ // Firebase Settings Section
3374
+ .addSection('firebase-settings', `${I18N}.firebase.title`, `${I18N}.firebase.description`)
3375
+ .addSetting({
3376
+ key: AXPSettingKeys.FirebaseApiKey,
3377
+ title: `${I18N}.firebase.api-key.title`,
3378
+ scope: 'T',
3379
+ isInherited: true,
3380
+ defaultValue: '',
3381
+ widget: {
3382
+ type: AXPWidgetsList.Editors.TextBox,
3383
+ },
3384
+ description: `${I18N}.firebase.api-key.description`,
3385
+ })
3386
+ .addSetting({
3387
+ key: AXPSettingKeys.FirebaseProjectId,
3388
+ title: `${I18N}.firebase.project-id.title`,
3389
+ scope: 'T',
3390
+ isInherited: true,
3391
+ defaultValue: '',
3392
+ widget: {
3393
+ type: AXPWidgetsList.Editors.TextBox,
3394
+ },
3395
+ description: `${I18N}.firebase.project-id.description`,
3396
+ })
3397
+ .addSetting({
3398
+ key: AXPSettingKeys.FirebaseSenderId,
3399
+ title: `${I18N}.firebase.sender-id.title`,
3400
+ scope: 'T',
3401
+ isInherited: true,
3402
+ defaultValue: '',
3403
+ widget: {
3404
+ type: AXPWidgetsList.Editors.TextBox,
3405
+ },
3406
+ description: `${I18N}.firebase.sender-id.description`,
3407
+ })
3408
+ .addSetting({
3409
+ key: AXPSettingKeys.FirebaseAppId,
3410
+ title: `${I18N}.firebase.app-id.title`,
3411
+ scope: 'T',
3412
+ isInherited: true,
3413
+ defaultValue: '',
3414
+ widget: {
3415
+ type: AXPWidgetsList.Editors.TextBox,
3416
+ },
3417
+ description: `${I18N}.firebase.app-id.description`,
3418
+ })
3419
+ .endSection()
3420
+ // End Notification Settings Group
3421
+ .endGroup();
3422
+ }
3423
+ }
3424
+
3425
+ async function myNotificationEntityFactory(injector) {
3426
+ const storageService = injector.get(AXPEntityStorageService);
3427
+ const dataProvider = new AXPEntityDataProviderImpl(storageService, 'notifications');
3428
+ const moduleName = 'notification-management';
3429
+ const scope = `#${moduleName}`;
3430
+ const entityDef = {
3431
+ module: moduleName,
3432
+ name: 'notification',
3433
+ title: '@notification-management:my',
3434
+ formats: {
3435
+ individual: '@notification-management:my',
3436
+ plural: '@notification-management:my',
3437
+ },
3438
+ groups: [
3439
+ { id: 'data', title: 'Data' },
3440
+ { id: 'content', title: 'Content' },
3441
+ { id: 'action', title: 'Action' },
3442
+ { id: 'user', title: 'User' },
3443
+ { id: 'template', title: 'Template' },
3444
+ ],
3445
+ properties: [
3446
+ {
3447
+ name: 'id',
3448
+ title: 'ID',
3449
+ groupId: 'data',
3450
+ schema: {
3451
+ dataType: 'string',
3452
+ visible: false,
3453
+ nullable: false,
3454
+ readonly: true,
3455
+ unique: { enabled: true },
3456
+ },
3457
+ },
3458
+ {
3459
+ name: 'title',
3460
+ title: '@general:terms.common.title',
3461
+ groupId: 'data',
3462
+ schema: {
3463
+ dataType: 'string',
3464
+ interface: {
3465
+ type: AXPWidgetsCatalog.text,
3466
+ },
3467
+ },
3468
+ },
3469
+ {
3470
+ name: 'body',
3471
+ title: '@general:terms.body',
3472
+ groupId: 'data',
3473
+ schema: {
3474
+ dataType: 'string',
3475
+ interface: {
3476
+ type: AXPWidgetsCatalog.largeText,
3477
+ },
3478
+ },
3479
+ },
3480
+ {
3481
+ name: 'channel',
3482
+ title: '@notification-management:channel',
3483
+ groupId: 'data',
3484
+ schema: {
3485
+ dataType: 'string',
3486
+ interface: {
3487
+ type: AXPWidgetsCatalog.select,
3488
+ options: { dataSource: ['InApp', 'Email', 'SMS'], multiple: false },
3489
+ },
3490
+ },
3491
+ },
3492
+ {
3493
+ name: 'content.type',
3494
+ title: '@notification-management:content.type',
3495
+ groupId: 'content',
3496
+ schema: {
3497
+ dataType: 'object',
3498
+ interface: {
3499
+ type: AXPWidgetsCatalog.richText,
3500
+ },
3501
+ },
3502
+ },
3503
+ {
3504
+ name: 'action.type',
3505
+ title: '@general:terms.workflow.action.type',
3506
+ groupId: 'action',
3507
+ schema: {
3508
+ dataType: 'string',
3509
+ interface: {
3510
+ type: AXPWidgetsCatalog.select,
3511
+ options: { dataSource: ['Link', 'Entity', 'Popup'], multiple: false },
3512
+ },
3513
+ },
3514
+ },
3515
+ {
3516
+ name: 'User.name',
3517
+ title: '@general:terms.people.user',
3518
+ groupId: 'user',
3519
+ schema: {
3520
+ dataType: 'string',
3521
+ interface: {
3522
+ type: AXPWidgetsCatalog.text,
3523
+ },
3524
+ },
3525
+ },
3526
+ {
3527
+ name: 'template.category',
3528
+ title: '@notification-management:template.category',
3529
+ groupId: 'template',
3530
+ schema: {
3531
+ dataType: 'string',
3532
+ interface: {
3533
+ type: AXPWidgetsCatalog.select,
3534
+ options: { dataSource: ['Inbox', 'Archive'], multiple: false },
3535
+ },
3536
+ },
3537
+ },
3538
+ {
3539
+ name: 'template.prority',
3540
+ title: '@notification-management:template.priority',
3541
+ groupId: 'template',
3542
+ schema: {
3543
+ dataType: 'string',
3544
+ interface: {
3545
+ type: AXPWidgetsCatalog.select,
3546
+ options: { dataSource: ['Warning', 'Danger', 'Notice'], multiple: false },
3547
+ },
3548
+ },
3549
+ },
3550
+ {
3551
+ name: 'template.isPinned',
3552
+ title: '@notification-management:template.isPinned',
3553
+ groupId: 'template',
3554
+ schema: {
3555
+ dataType: 'boolean',
3556
+ interface: {
3557
+ type: AXPWidgetsCatalog.checkbox,
3558
+ options: {
3559
+ label: 'Is Pinned',
3560
+ },
3561
+ },
3562
+ },
3563
+ },
3564
+ {
3565
+ name: 'readAt',
3566
+ title: '@notification-management:readAt',
3567
+ groupId: 'data',
3568
+ schema: {
3569
+ dataType: 'datetime',
3570
+ interface: {
3571
+ type: AXPWidgetsCatalog.dateTime,
3572
+ options: { format: 'date' },
3573
+ },
3574
+ },
3575
+ },
3576
+ {
3577
+ name: 'createAt',
3578
+ title: '@notification-management:createAt',
3579
+ groupId: 'data',
3580
+ schema: {
3581
+ dataType: 'datetime',
3582
+ interface: {
3583
+ type: AXPWidgetsCatalog.dateTime,
3584
+ options: { format: 'date' },
3585
+ },
3586
+ },
3587
+ },
3588
+ ],
3589
+ columns: [
3590
+ { name: 'title' },
3591
+ { name: 'body' },
3592
+ { name: 'channel' },
3593
+ { name: 'user.name' },
3594
+ { name: 'template.category' },
3595
+ { name: 'template.prority' },
3596
+ { name: 'createAt' },
3597
+ { name: 'readAt' },
3598
+ ],
3599
+ commands: {
3600
+ create: {
3601
+ execute: async (data) => {
3602
+ const entity = Object.assign(data, { id: AXPDataGenerator.uuid() });
3603
+ await dataProvider.insertOne(entity);
3604
+ return entity;
3605
+ },
3606
+ },
3607
+ delete: {
3608
+ execute: async (id) => {
3609
+ await dataProvider.deleteOne(id);
3610
+ },
3611
+ },
3612
+ update: {
3613
+ execute: async (data) => {
3614
+ await dataProvider.updateOne(data.id, data);
3615
+ },
3616
+ },
3617
+ },
3618
+ queries: {
3619
+ byKey: {
3620
+ execute: async (id) => {
3621
+ return await dataProvider.getOne(id);
3622
+ },
3623
+ type: AXPEntityQueryType.Single,
3624
+ },
3625
+ list: {
3626
+ execute: async (e) => {
3627
+ const list = await dataProvider.getAll();
3628
+ return {
3629
+ total: list.length,
3630
+ items: list.slice(e.skip, e.skip + e.take),
3631
+ };
3632
+ },
3633
+ type: AXPEntityQueryType.List,
3634
+ },
3635
+ },
3636
+ interfaces: {
3637
+ master: {
3638
+ list: {
3639
+ actions: [
3640
+ {
3641
+ title: 'Delete',
3642
+ command: 'delete-entity',
3643
+ priority: 'primary',
3644
+ type: 'delete',
3645
+ scope: AXPEntityCommandScope.Selected,
3646
+ },
3647
+ ],
3648
+ views: [{ name: 'all', title: 'All Notifications', fixed: true, columns: [], conditions: [], sorts: [] }],
3649
+ },
3650
+ },
3651
+ },
3652
+ };
3653
+ return entityDef;
3654
+ }
3655
+
3656
+ var myNotification = /*#__PURE__*/Object.freeze({
3657
+ __proto__: null,
3658
+ myNotificationEntityFactory: myNotificationEntityFactory
3659
+ });
3660
+
3661
+ async function notificationLogEntityFactory(injector) {
3662
+ const dataService = injector.get(AXMNotificationManagementChannelEntityService);
3663
+ const i18n = RootConfig.config.i18n;
3664
+ const entityDef = {
3665
+ module: 'notification-management',
3666
+ name: 'notification',
3667
+ title: 'Notification',
3668
+ formats: {
3669
+ individual: 'NotificationLog',
3670
+ plural: 'NotificationLogs',
3671
+ },
3672
+ relatedEntities: [],
3673
+ groups: [
3674
+ {
3675
+ id: 'notification',
3676
+ title: 'Notification',
3677
+ },
3678
+ ],
3679
+ properties: [
3680
+ {
3681
+ name: 'name',
3682
+ title: `t("name", { scope: "${i18n}" })`,
3683
+ groupId: 'notification',
3684
+ schema: {
3685
+ dataType: 'string',
3686
+ interface: {
3687
+ type: AXPWidgetsCatalog.text,
3688
+ },
3689
+ },
3690
+ },
3691
+ {
3692
+ name: 'title',
3693
+ title: `t("title", { scope: "${i18n}" })`,
3694
+ groupId: 'notification',
3695
+ schema: {
3696
+ dataType: 'string',
3697
+ interface: {
3698
+ type: AXPWidgetsCatalog.text,
3699
+ },
3700
+ },
3701
+ },
3702
+ {
3703
+ name: 'status',
3704
+ title: `t("status", { scope: "${i18n}" })`,
3705
+ groupId: 'notification',
3706
+ schema: {
3707
+ dataType: 'string',
3708
+ interface: {
3709
+ type: AXPWidgetsCatalog.richText,
3710
+ },
3711
+ },
3712
+ },
3713
+ ],
3714
+ columns: [{ name: 'name' }, { name: 'title' }, { name: 'body' }, { name: 'user.name' }, { name: 'channel' }],
3715
+ queries: {
3716
+ byKey: {
3717
+ execute: async (id) => {
3718
+ return new Promise((resolve) => {
3719
+ setTimeout(async () => {
3720
+ const entity = await dataService.getOne(id);
3721
+ resolve(entity);
3722
+ }, 500);
3723
+ });
3724
+ },
3725
+ type: AXPEntityQueryType.Single,
3726
+ },
3727
+ list: {
3728
+ execute: async (e) => {
3729
+ return await dataService.query(e);
3730
+ },
3731
+ type: AXPEntityQueryType.List,
3732
+ },
3733
+ },
3734
+ interfaces: {
3735
+ master: {
3736
+ single: {
3737
+ title: '{{title}}',
3738
+ sections: [
3739
+ {
3740
+ id: 'notification',
3741
+ layout: {
3742
+ positions: {
3743
+ lg: {
3744
+ colSpan: 12,
3745
+ },
3746
+ },
3747
+ },
3748
+ },
3749
+ ],
3750
+ properties: [
3751
+ {
3752
+ name: 'name',
3753
+ layout: {
3754
+ positions: {
3755
+ lg: {
3756
+ colSpan: 6,
3757
+ },
3758
+ },
3759
+ },
3760
+ },
3761
+ {
3762
+ name: 'user.name',
3763
+ layout: {
3764
+ positions: {
3765
+ lg: {
3766
+ colSpan: 6,
3767
+ },
3768
+ },
3769
+ },
3770
+ },
3771
+ {
3772
+ name: 'title',
3773
+ layout: {
3774
+ positions: {
3775
+ lg: {
3776
+ colSpan: 12,
3777
+ },
3778
+ },
3779
+ },
3780
+ },
3781
+ {
3782
+ name: 'body',
3783
+ layout: {
3784
+ positions: {
3785
+ lg: {
3786
+ colSpan: 12,
3787
+ },
3788
+ },
3789
+ },
3790
+ },
3791
+ {
3792
+ name: 'channel',
3793
+ layout: {
3794
+ positions: {
3795
+ lg: {
3796
+ colSpan: 6,
3797
+ },
3798
+ },
3799
+ },
3800
+ },
3801
+ ],
3802
+ actions: [],
3803
+ },
3804
+ list: {
3805
+ actions: [
3806
+ {
3807
+ title: '@general:actions.detail.title',
3808
+ command: 'open-entity',
3809
+ priority: 'primary',
3810
+ type: 'view',
3811
+ scope: AXPEntityCommandScope.Individual,
3812
+ },
3813
+ ],
3814
+ views: [
3815
+ {
3816
+ name: 'all',
3817
+ title: '@general:terms.interface.selection.all-items',
3818
+ fixed: true,
3819
+ columns: [],
3820
+ conditions: [],
3821
+ sorts: [],
3822
+ },
3823
+ ],
3824
+ },
3825
+ },
3826
+ },
3827
+ };
3828
+ return entityDef;
3829
+ }
3830
+
3831
+ /**
3832
+ * Generated bundle index. Do not edit.
3833
+ */
3834
+
3835
+ export { AXMNotificationConnectorService as A, compareNotificationsByPinnedThenDate as B, myNotificationEntityFactory as C, notificationChannelEntityFactory as D, notificationEntityFactory as E, notificationLogEntityFactory as F, notificationTemplateEntityFactory as G, sortNotificationsByPinnedThenDate as H, NOTIFICATION_LIST_SORT as N, RootConfig as R, AXMAdminNotificationItemComponent as a, AXMMenuProvider as b, AXMNotificationChannelEntityModule as c, AXMNotificationEmailComposerService as d, AXMNotificationEntityModule as e, AXMNotificationEntityService as f, AXMNotificationEntityServiceImpl as g, AXMNotificationManagementChannelEntityService as h, AXMNotificationManagementChannelEntityServiceImpl as i, AXMNotificationManagementModule as j, AXMNotificationManagementTemplateEntityService as k, AXMNotificationManagementTemplateEntityServiceImpl as l, AXMNotificationRealtimeService as m, AXMNotificationTemplateEntityModule as n, AXMOsNotificationService as o, AXMSettingProvider as p, AXPMyNotificationDashboardWidget as q, AXPNotificationDefinitionProvider as r, AXPNotificationDefinitionProviderDefault as s, AXPNotificationDefinitionService as t, AXPNotificationWidgetViewComponent as u, AXP_NOTIFICATION_DEFINITION_PROVIDER as v, NOTIFICATION_MANAGEMENT_EMAIL_SEND_COMMAND_KEY as w, NOTIFICATION_MANAGEMENT_EMAIL_SHOW_DIALOG_COMMAND_KEY as x, NotificationManagementEmailShowDialogCommand as y, buildNotificationPageQuery as z };
3836
+ //# sourceMappingURL=acorex-modules-notification-management-acorex-modules-notification-management-BSf1wd6j.mjs.map