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

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 (289) hide show
  1. package/fesm2022/{acorex-modules-application-management-features-widget-view.component-uc8eGA-k.mjs → acorex-modules-application-management-features-widget-view.component-BNTT58PB.mjs} +2 -2
  2. package/fesm2022/{acorex-modules-application-management-features-widget-view.component-uc8eGA-k.mjs.map → acorex-modules-application-management-features-widget-view.component-BNTT58PB.mjs.map} +1 -1
  3. package/fesm2022/acorex-modules-application-management.mjs +1 -1
  4. package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-WGRBHMmQ.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-BDU2DZEq.mjs} +108 -53
  5. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-BDU2DZEq.mjs.map +1 -0
  6. package/fesm2022/{acorex-modules-assessment-management-assessment-session-answers-view.util-BWG9hI3t.mjs → acorex-modules-assessment-management-assessment-session-answers-view.util-CzgivU3s.mjs} +2 -2
  7. package/fesm2022/{acorex-modules-assessment-management-assessment-session-answers-view.util-BWG9hI3t.mjs.map → acorex-modules-assessment-management-assessment-session-answers-view.util-CzgivU3s.mjs.map} +1 -1
  8. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-BtZ68Wt5.mjs → acorex-modules-assessment-management-fill-assessment-session.command-D6i0YZ3k.mjs} +2 -2
  9. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-BtZ68Wt5.mjs.map → acorex-modules-assessment-management-fill-assessment-session.command-D6i0YZ3k.mjs.map} +1 -1
  10. package/fesm2022/{acorex-modules-assessment-management-index-_rWx2Vje.mjs → acorex-modules-assessment-management-index-BPQ9AiD6.mjs} +3 -3
  11. package/fesm2022/{acorex-modules-assessment-management-index-_rWx2Vje.mjs.map → acorex-modules-assessment-management-index-BPQ9AiD6.mjs.map} +1 -1
  12. package/fesm2022/{acorex-modules-assessment-management-index-CL6OmKwh.mjs → acorex-modules-assessment-management-index-BaMs2R6k.mjs} +3 -3
  13. package/fesm2022/{acorex-modules-assessment-management-index-CL6OmKwh.mjs.map → acorex-modules-assessment-management-index-BaMs2R6k.mjs.map} +1 -1
  14. package/fesm2022/{acorex-modules-assessment-management-index-BDqMpgdu.mjs → acorex-modules-assessment-management-index-YVENsZN4.mjs} +2 -2
  15. package/fesm2022/{acorex-modules-assessment-management-index-BDqMpgdu.mjs.map → acorex-modules-assessment-management-index-YVENsZN4.mjs.map} +1 -1
  16. package/fesm2022/{acorex-modules-assessment-management-index-BwZPHD1o.mjs → acorex-modules-assessment-management-index-oXkGQDat.mjs} +2 -2
  17. package/fesm2022/{acorex-modules-assessment-management-index-BwZPHD1o.mjs.map → acorex-modules-assessment-management-index-oXkGQDat.mjs.map} +1 -1
  18. package/fesm2022/{acorex-modules-assessment-management-preview-question.command-DMeQF_J0.mjs → acorex-modules-assessment-management-preview-question.command-B6rHNI4x.mjs} +2 -2
  19. package/fesm2022/{acorex-modules-assessment-management-preview-question.command-DMeQF_J0.mjs.map → acorex-modules-assessment-management-preview-question.command-B6rHNI4x.mjs.map} +1 -1
  20. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-CKmY95wj.mjs → acorex-modules-assessment-management-preview-questionnaire.command-DXB1Y7hz.mjs} +2 -2
  21. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-CKmY95wj.mjs.map → acorex-modules-assessment-management-preview-questionnaire.command-DXB1Y7hz.mjs.map} +1 -1
  22. package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-CXf2p-tS.mjs → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-D2CNfj8T.mjs} +2 -2
  23. package/fesm2022/{acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-CXf2p-tS.mjs.map → acorex-modules-assessment-management-question-bank-interface-editor-widget-edit.component-D2CNfj8T.mjs.map} +1 -1
  24. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-CLZuPzUo.mjs → acorex-modules-assessment-management-questionnaire-viewer-popup.component-CF_tV-2p.mjs} +2 -2
  25. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer-popup.component-CLZuPzUo.mjs.map → acorex-modules-assessment-management-questionnaire-viewer-popup.component-CF_tV-2p.mjs.map} +1 -1
  26. package/fesm2022/{acorex-modules-assessment-management-review-assessment-session.command-CcGyOKUI.mjs → acorex-modules-assessment-management-review-assessment-session.command-CtEvoUxA.mjs} +3 -3
  27. package/fesm2022/{acorex-modules-assessment-management-review-assessment-session.command-CcGyOKUI.mjs.map → acorex-modules-assessment-management-review-assessment-session.command-CtEvoUxA.mjs.map} +1 -1
  28. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-CmieuVjM.mjs → acorex-modules-assessment-management-view-session-answers.command-CkyBkiXC.mjs} +3 -3
  29. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-CmieuVjM.mjs.map → acorex-modules-assessment-management-view-session-answers.command-CkyBkiXC.mjs.map} +1 -1
  30. package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
  31. package/fesm2022/acorex-modules-asset-management.mjs +37 -23
  32. package/fesm2022/acorex-modules-asset-management.mjs.map +1 -1
  33. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CMRT9dQC.mjs → acorex-modules-auth-acorex-modules-auth-Nw701LHa.mjs} +30 -30
  34. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-CMRT9dQC.mjs.map → acorex-modules-auth-acorex-modules-auth-Nw701LHa.mjs.map} +1 -1
  35. package/fesm2022/{acorex-modules-auth-app-chooser.component-mOPBXcQc.mjs → acorex-modules-auth-app-chooser.component-FqCIt_8E.mjs} +2 -2
  36. package/fesm2022/{acorex-modules-auth-app-chooser.component-mOPBXcQc.mjs.map → acorex-modules-auth-app-chooser.component-FqCIt_8E.mjs.map} +1 -1
  37. package/fesm2022/{acorex-modules-auth-change-password.command-CceYk6DE.mjs → acorex-modules-auth-change-password.command-DND9Oka4.mjs} +2 -2
  38. package/fesm2022/{acorex-modules-auth-change-password.command-CceYk6DE.mjs.map → acorex-modules-auth-change-password.command-DND9Oka4.mjs.map} +1 -1
  39. package/fesm2022/{acorex-modules-auth-edit-account-info.command-jF8A_Jsy.mjs → acorex-modules-auth-edit-account-info.command-bmdkZzYt.mjs} +2 -2
  40. package/fesm2022/{acorex-modules-auth-edit-account-info.command-jF8A_Jsy.mjs.map → acorex-modules-auth-edit-account-info.command-bmdkZzYt.mjs.map} +1 -1
  41. package/fesm2022/{acorex-modules-auth-lock-screen.command-BvruxuiF.mjs → acorex-modules-auth-lock-screen.command-DSGXqDVD.mjs} +2 -2
  42. package/fesm2022/{acorex-modules-auth-lock-screen.command-BvruxuiF.mjs.map → acorex-modules-auth-lock-screen.command-DSGXqDVD.mjs.map} +1 -1
  43. package/fesm2022/{acorex-modules-auth-login.module-CmBClJv2.mjs → acorex-modules-auth-login.module-DC3dzDf0.mjs} +4 -4
  44. package/fesm2022/{acorex-modules-auth-login.module-CmBClJv2.mjs.map → acorex-modules-auth-login.module-DC3dzDf0.mjs.map} +1 -1
  45. package/fesm2022/{acorex-modules-auth-master.layout-CLGmgSqo.mjs → acorex-modules-auth-master.layout-iMOvevEv.mjs} +2 -2
  46. package/fesm2022/{acorex-modules-auth-master.layout-CLGmgSqo.mjs.map → acorex-modules-auth-master.layout-iMOvevEv.mjs.map} +1 -1
  47. package/fesm2022/{acorex-modules-auth-oauth-callback.component-yxfNoBS-.mjs → acorex-modules-auth-oauth-callback.component-s9WMG92M.mjs} +3 -3
  48. package/fesm2022/{acorex-modules-auth-oauth-callback.component-yxfNoBS-.mjs.map → acorex-modules-auth-oauth-callback.component-s9WMG92M.mjs.map} +1 -1
  49. package/fesm2022/{acorex-modules-auth-open-sessions.command-DsWueHa3.mjs → acorex-modules-auth-open-sessions.command-CLL8rgjE.mjs} +2 -2
  50. package/fesm2022/{acorex-modules-auth-open-sessions.command-DsWueHa3.mjs.map → acorex-modules-auth-open-sessions.command-CLL8rgjE.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-auth-password.component-C3_tAt8j.mjs → acorex-modules-auth-password.component-BOEi91f7.mjs} +2 -2
  52. package/fesm2022/{acorex-modules-auth-password.component-C3_tAt8j.mjs.map → acorex-modules-auth-password.component-BOEi91f7.mjs.map} +1 -1
  53. package/fesm2022/{acorex-modules-auth-password.component-BrTEuc51.mjs → acorex-modules-auth-password.component-eA_3LtcO.mjs} +2 -2
  54. package/fesm2022/{acorex-modules-auth-password.component-BrTEuc51.mjs.map → acorex-modules-auth-password.component-eA_3LtcO.mjs.map} +1 -1
  55. package/fesm2022/{acorex-modules-auth-profile-activity-chart.component-C6_0oeCC.mjs → acorex-modules-auth-profile-activity-chart.component-BK1k4Lrh.mjs} +2 -2
  56. package/fesm2022/{acorex-modules-auth-profile-activity-chart.component-C6_0oeCC.mjs.map → acorex-modules-auth-profile-activity-chart.component-BK1k4Lrh.mjs.map} +1 -1
  57. package/fesm2022/{acorex-modules-auth-profile-delete-account-danger-zone.component-EhmuT88j.mjs → acorex-modules-auth-profile-delete-account-danger-zone.component-CHru1be-.mjs} +2 -2
  58. package/fesm2022/{acorex-modules-auth-profile-delete-account-danger-zone.component-EhmuT88j.mjs.map → acorex-modules-auth-profile-delete-account-danger-zone.component-CHru1be-.mjs.map} +1 -1
  59. package/fesm2022/{acorex-modules-auth-profile-page-component.provider-BHEdqBbF.mjs → acorex-modules-auth-profile-page-component.provider-MCsUPTrt.mjs} +4 -4
  60. package/fesm2022/{acorex-modules-auth-profile-page-component.provider-BHEdqBbF.mjs.map → acorex-modules-auth-profile-page-component.provider-MCsUPTrt.mjs.map} +1 -1
  61. package/fesm2022/{acorex-modules-auth-profile-page.component-Q0ixAWtC.mjs → acorex-modules-auth-profile-page.component-DOj2GhFJ.mjs} +2 -2
  62. package/fesm2022/{acorex-modules-auth-profile-page.component-Q0ixAWtC.mjs.map → acorex-modules-auth-profile-page.component-DOj2GhFJ.mjs.map} +1 -1
  63. package/fesm2022/{acorex-modules-auth-remove-pin-code.command-j5iobHAs.mjs → acorex-modules-auth-remove-pin-code.command-CqRxKR4Y.mjs} +2 -2
  64. package/fesm2022/{acorex-modules-auth-remove-pin-code.command-j5iobHAs.mjs.map → acorex-modules-auth-remove-pin-code.command-CqRxKR4Y.mjs.map} +1 -1
  65. package/fesm2022/{acorex-modules-auth-routes-BFACBfAG.mjs → acorex-modules-auth-routes-FZRnzT9V.mjs} +2 -2
  66. package/fesm2022/{acorex-modules-auth-routes-BFACBfAG.mjs.map → acorex-modules-auth-routes-FZRnzT9V.mjs.map} +1 -1
  67. package/fesm2022/{acorex-modules-auth-session-lock-overlay.component-flpWlR8p.mjs → acorex-modules-auth-session-lock-overlay.component-6o2uU9U5.mjs} +2 -2
  68. package/fesm2022/{acorex-modules-auth-session-lock-overlay.component-flpWlR8p.mjs.map → acorex-modules-auth-session-lock-overlay.component-6o2uU9U5.mjs.map} +1 -1
  69. package/fesm2022/{acorex-modules-auth-set-pin-code.command-B0sXGsok.mjs → acorex-modules-auth-set-pin-code.command-CsXJ30Fs.mjs} +2 -2
  70. package/fesm2022/{acorex-modules-auth-set-pin-code.command-B0sXGsok.mjs.map → acorex-modules-auth-set-pin-code.command-CsXJ30Fs.mjs.map} +1 -1
  71. package/fesm2022/{acorex-modules-auth-set-pin-code.component-D95Hn8R-.mjs → acorex-modules-auth-set-pin-code.component-DJhqru7e.mjs} +2 -2
  72. package/fesm2022/{acorex-modules-auth-set-pin-code.component-D95Hn8R-.mjs.map → acorex-modules-auth-set-pin-code.component-DJhqru7e.mjs.map} +1 -1
  73. package/fesm2022/{acorex-modules-auth-settings.provider-D0-hEHd2.mjs → acorex-modules-auth-settings.provider-BJ7lDjbr.mjs} +2 -2
  74. package/fesm2022/{acorex-modules-auth-settings.provider-D0-hEHd2.mjs.map → acorex-modules-auth-settings.provider-BJ7lDjbr.mjs.map} +1 -1
  75. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-DBIVSBaM.mjs → acorex-modules-auth-tenant-chooser.component-DR7rH0m1.mjs} +2 -2
  76. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-DBIVSBaM.mjs.map → acorex-modules-auth-tenant-chooser.component-DR7rH0m1.mjs.map} +1 -1
  77. package/fesm2022/{acorex-modules-auth-two-factor.module-DwXsAUlJ.mjs → acorex-modules-auth-two-factor.module-BvvDIlqe.mjs} +2 -2
  78. package/fesm2022/{acorex-modules-auth-two-factor.module-DwXsAUlJ.mjs.map → acorex-modules-auth-two-factor.module-BvvDIlqe.mjs.map} +1 -1
  79. package/fesm2022/{acorex-modules-auth-view-login-history.command-BpCog3dx.mjs → acorex-modules-auth-view-login-history.command-BUiXUbjA.mjs} +2 -2
  80. package/fesm2022/{acorex-modules-auth-view-login-history.command-BpCog3dx.mjs.map → acorex-modules-auth-view-login-history.command-BUiXUbjA.mjs.map} +1 -1
  81. package/fesm2022/acorex-modules-auth.mjs +1 -1
  82. package/fesm2022/acorex-modules-business-core.mjs +0 -6
  83. package/fesm2022/acorex-modules-business-core.mjs.map +1 -1
  84. package/fesm2022/{acorex-modules-common-search-popup.component-6_qrYkc2.mjs → acorex-modules-common-search-popup.component-BhItO3Sr.mjs} +2 -2
  85. package/fesm2022/{acorex-modules-common-search-popup.component-6_qrYkc2.mjs.map → acorex-modules-common-search-popup.component-BhItO3Sr.mjs.map} +1 -1
  86. package/fesm2022/acorex-modules-common.mjs +30 -43
  87. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  88. package/fesm2022/{acorex-modules-contact-core-acorex-modules-contact-core-CBMdv1GN.mjs → acorex-modules-contact-core-acorex-modules-contact-core-CELmV51p.mjs} +8 -7
  89. package/fesm2022/acorex-modules-contact-core-acorex-modules-contact-core-CELmV51p.mjs.map +1 -0
  90. package/fesm2022/{acorex-modules-contact-core-entity.provider-B8__CVGP.mjs → acorex-modules-contact-core-entity.provider-AH-gvpLJ.mjs} +3 -3
  91. package/fesm2022/{acorex-modules-contact-core-entity.provider-B8__CVGP.mjs.map → acorex-modules-contact-core-entity.provider-AH-gvpLJ.mjs.map} +1 -1
  92. package/fesm2022/{acorex-modules-contact-core-menu.provider-C-iEIPGe.mjs → acorex-modules-contact-core-menu.provider-T9IuzSBf.mjs} +11 -5
  93. package/fesm2022/acorex-modules-contact-core-menu.provider-T9IuzSBf.mjs.map +1 -0
  94. package/fesm2022/{acorex-modules-contact-core-permission-definition.provider-DXjdp846.mjs → acorex-modules-contact-core-permission-definition.provider-CnxI1ujq.mjs} +2 -2
  95. package/fesm2022/{acorex-modules-contact-core-permission-definition.provider-DXjdp846.mjs.map → acorex-modules-contact-core-permission-definition.provider-CnxI1ujq.mjs.map} +1 -1
  96. package/fesm2022/acorex-modules-contact-core.mjs +1 -1
  97. package/fesm2022/{acorex-modules-conversation-acorex-modules-conversation-CUjTT3M7.mjs → acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs} +6394 -3666
  98. package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-B_JcAHvL.mjs.map +1 -0
  99. package/fesm2022/acorex-modules-conversation-after-message-sent.command-DcrS7_vV.mjs +34 -0
  100. package/fesm2022/acorex-modules-conversation-after-message-sent.command-DcrS7_vV.mjs.map +1 -0
  101. package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-CGcngwdA.mjs → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BCkJEAmX.mjs} +5 -5
  102. package/fesm2022/{acorex-modules-conversation-assist-delegated-agent-detail-popup.component-CGcngwdA.mjs.map → acorex-modules-conversation-assist-delegated-agent-detail-popup.component-BCkJEAmX.mjs.map} +1 -1
  103. package/fesm2022/{acorex-modules-conversation-comments-page.component-hopaF6xW.mjs → acorex-modules-conversation-comments-page.component-B6TJhe4T.mjs} +2 -2
  104. package/fesm2022/{acorex-modules-conversation-comments-page.component-hopaF6xW.mjs.map → acorex-modules-conversation-comments-page.component-B6TJhe4T.mjs.map} +1 -1
  105. package/fesm2022/acorex-modules-conversation-emit-typing-indicator.command-CWRdPl-S.mjs +30 -0
  106. package/fesm2022/acorex-modules-conversation-emit-typing-indicator.command-CWRdPl-S.mjs.map +1 -0
  107. package/fesm2022/acorex-modules-conversation-mark-conversation-unread.command-CZlsLAsb.mjs +30 -0
  108. package/fesm2022/acorex-modules-conversation-mark-conversation-unread.command-CZlsLAsb.mjs.map +1 -0
  109. package/fesm2022/acorex-modules-conversation-retry-assist-response.command-Cly1-RKt.mjs +34 -0
  110. package/fesm2022/acorex-modules-conversation-retry-assist-response.command-Cly1-RKt.mjs.map +1 -0
  111. package/fesm2022/{acorex-modules-conversation-send-assist-chat-message.command-CqDrZKFK.mjs → acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs} +19 -9
  112. package/fesm2022/acorex-modules-conversation-send-assist-chat-message.command-D5QWTKqh.mjs.map +1 -0
  113. package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DiDAz-Is.mjs → acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs} +2 -2
  114. package/fesm2022/{acorex-modules-conversation-start-assist-chat.command-DiDAz-Is.mjs.map → acorex-modules-conversation-start-assist-chat.command-DkSZj8fj.mjs.map} +1 -1
  115. package/fesm2022/acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs +62 -0
  116. package/fesm2022/acorex-modules-conversation-sync-read-state.command-jiEsdxUB.mjs.map +1 -0
  117. package/fesm2022/acorex-modules-conversation.mjs +1 -1
  118. package/fesm2022/acorex-modules-customer-management.mjs +2 -2
  119. package/fesm2022/acorex-modules-customer-management.mjs.map +1 -1
  120. package/fesm2022/{acorex-modules-dashboard-management-acorex-modules-dashboard-management-Lx3VuIg6.mjs → acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs} +1034 -395
  121. package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-DLuhOPFz.mjs.map +1 -0
  122. package/fesm2022/{acorex-modules-dashboard-management-index-DvY9N8FF.mjs → acorex-modules-dashboard-management-index-gjCiELmH.mjs} +2 -2
  123. package/fesm2022/{acorex-modules-dashboard-management-index-DvY9N8FF.mjs.map → acorex-modules-dashboard-management-index-gjCiELmH.mjs.map} +1 -1
  124. package/fesm2022/acorex-modules-dashboard-management.mjs +1 -1
  125. package/fesm2022/{acorex-modules-data-management-index-CxVSgxTM.mjs → acorex-modules-data-management-index-BYQncZ6e.mjs} +28 -6
  126. package/fesm2022/acorex-modules-data-management-index-BYQncZ6e.mjs.map +1 -0
  127. package/fesm2022/acorex-modules-data-management.mjs +6 -6
  128. package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
  129. package/fesm2022/acorex-modules-document-management.mjs +4 -4
  130. package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
  131. package/fesm2022/{acorex-modules-form-template-management-template-picker.component-cLToc9fP.mjs → acorex-modules-form-template-management-template-picker.component-BGf98ooQ.mjs} +2 -2
  132. package/fesm2022/{acorex-modules-form-template-management-template-picker.component-cLToc9fP.mjs.map → acorex-modules-form-template-management-template-picker.component-BGf98ooQ.mjs.map} +1 -1
  133. package/fesm2022/acorex-modules-form-template-management.mjs +1 -1
  134. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-DpVAfk3i.mjs → acorex-modules-human-capital-management-acorex-modules-human-capital-management-VJ2NUSm1.mjs} +20 -20
  135. package/fesm2022/{acorex-modules-human-capital-management-acorex-modules-human-capital-management-DpVAfk3i.mjs.map → acorex-modules-human-capital-management-acorex-modules-human-capital-management-VJ2NUSm1.mjs.map} +1 -1
  136. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-BDv_eotn.mjs → acorex-modules-human-capital-management-approve-leave-request.command-FgXkyZR_.mjs} +2 -2
  137. package/fesm2022/{acorex-modules-human-capital-management-approve-leave-request.command-BDv_eotn.mjs.map → acorex-modules-human-capital-management-approve-leave-request.command-FgXkyZR_.mjs.map} +1 -1
  138. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-CT49oS39.mjs → acorex-modules-human-capital-management-assign-position-assignment.command-D2yCvifI.mjs} +2 -2
  139. package/fesm2022/{acorex-modules-human-capital-management-assign-position-assignment.command-CT49oS39.mjs.map → acorex-modules-human-capital-management-assign-position-assignment.command-D2yCvifI.mjs.map} +1 -1
  140. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-zAunbLbf.mjs → acorex-modules-human-capital-management-cancel-leave-request.command-DnmsVNwU.mjs} +2 -2
  141. package/fesm2022/{acorex-modules-human-capital-management-cancel-leave-request.command-zAunbLbf.mjs.map → acorex-modules-human-capital-management-cancel-leave-request.command-DnmsVNwU.mjs.map} +1 -1
  142. package/fesm2022/{acorex-modules-human-capital-management-edit-personal-info.command-8LKMNm4Z.mjs → acorex-modules-human-capital-management-edit-personal-info.command-B0ZUfbqn.mjs} +2 -6
  143. package/fesm2022/acorex-modules-human-capital-management-edit-personal-info.command-B0ZUfbqn.mjs.map +1 -0
  144. package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-BQ6Ysh-A.mjs → acorex-modules-human-capital-management-edit-signature.command-h2kTqSg0.mjs} +2 -2
  145. package/fesm2022/{acorex-modules-human-capital-management-edit-signature.command-BQ6Ysh-A.mjs.map → acorex-modules-human-capital-management-edit-signature.command-h2kTqSg0.mjs.map} +1 -1
  146. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-CEAUhv0o.mjs → acorex-modules-human-capital-management-reject-leave-request.command-BdrdgvbN.mjs} +2 -2
  147. package/fesm2022/{acorex-modules-human-capital-management-reject-leave-request.command-CEAUhv0o.mjs.map → acorex-modules-human-capital-management-reject-leave-request.command-BdrdgvbN.mjs.map} +1 -1
  148. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-DakWOslg.mjs → acorex-modules-human-capital-management-revoke-position-assignment.command-S7Px6Y4B.mjs} +2 -2
  149. package/fesm2022/{acorex-modules-human-capital-management-revoke-position-assignment.command-DakWOslg.mjs.map → acorex-modules-human-capital-management-revoke-position-assignment.command-S7Px6Y4B.mjs.map} +1 -1
  150. package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-BXMGzUuM.mjs → acorex-modules-human-capital-management-start-leave-request-flow.command-C_tE-D_Y.mjs} +2 -2
  151. package/fesm2022/{acorex-modules-human-capital-management-start-leave-request-flow.command-BXMGzUuM.mjs.map → acorex-modules-human-capital-management-start-leave-request-flow.command-C_tE-D_Y.mjs.map} +1 -1
  152. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B1s_i8U3.mjs → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-mMP3Yy01.mjs} +2 -2
  153. package/fesm2022/{acorex-modules-human-capital-management-start-lifecycle-event-flow.command-B1s_i8U3.mjs.map → acorex-modules-human-capital-management-start-lifecycle-event-flow.command-mMP3Yy01.mjs.map} +1 -1
  154. package/fesm2022/acorex-modules-human-capital-management.mjs +1 -1
  155. package/fesm2022/acorex-modules-learning-management.mjs +1 -1
  156. package/fesm2022/acorex-modules-learning-management.mjs.map +1 -1
  157. package/fesm2022/acorex-modules-location-management.mjs +2 -2
  158. package/fesm2022/acorex-modules-location-management.mjs.map +1 -1
  159. package/fesm2022/acorex-modules-meeting-management.mjs +1 -1
  160. package/fesm2022/acorex-modules-meeting-management.mjs.map +1 -1
  161. package/fesm2022/{acorex-modules-notification-management-acorex-modules-notification-management-DZSXFNgo.mjs → acorex-modules-notification-management-acorex-modules-notification-management-DZWUyu54.mjs} +4 -4
  162. package/fesm2022/{acorex-modules-notification-management-acorex-modules-notification-management-DZSXFNgo.mjs.map → acorex-modules-notification-management-acorex-modules-notification-management-DZWUyu54.mjs.map} +1 -1
  163. package/fesm2022/{acorex-modules-notification-management-notification-page.component-swzDjJUP.mjs → acorex-modules-notification-management-notification-page.component-BNxTMY-C.mjs} +3 -3
  164. package/fesm2022/{acorex-modules-notification-management-notification-page.component-swzDjJUP.mjs.map → acorex-modules-notification-management-notification-page.component-BNxTMY-C.mjs.map} +1 -1
  165. package/fesm2022/acorex-modules-notification-management.mjs +1 -1
  166. package/fesm2022/{acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs → acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs} +37 -37
  167. package/fesm2022/{acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs.map → acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs.map} +1 -1
  168. package/fesm2022/{acorex-modules-organization-management-add-business-unit-to-business-unit.command-BG6AQs-j.mjs → acorex-modules-organization-management-add-business-unit-to-business-unit.command-CgqydSZh.mjs} +2 -2
  169. package/fesm2022/{acorex-modules-organization-management-add-business-unit-to-business-unit.command-BG6AQs-j.mjs.map → acorex-modules-organization-management-add-business-unit-to-business-unit.command-CgqydSZh.mjs.map} +1 -1
  170. package/fesm2022/{acorex-modules-organization-management-add-position-to-business-unit.command-DzA0h9ED.mjs → acorex-modules-organization-management-add-position-to-business-unit.command-B_BIg-aF.mjs} +2 -2
  171. package/fesm2022/{acorex-modules-organization-management-add-position-to-business-unit.command-DzA0h9ED.mjs.map → acorex-modules-organization-management-add-position-to-business-unit.command-B_BIg-aF.mjs.map} +1 -1
  172. package/fesm2022/{acorex-modules-organization-management-add-team-to-business-unit.command-5ZGzmp95.mjs → acorex-modules-organization-management-add-team-to-business-unit.command-zFql0VH1.mjs} +2 -2
  173. package/fesm2022/{acorex-modules-organization-management-add-team-to-business-unit.command-5ZGzmp95.mjs.map → acorex-modules-organization-management-add-team-to-business-unit.command-zFql0VH1.mjs.map} +1 -1
  174. package/fesm2022/{acorex-modules-organization-management-entity.provider-DKhXlL2j.mjs → acorex-modules-organization-management-entity.provider-Buchg68Q.mjs} +15 -15
  175. package/fesm2022/{acorex-modules-organization-management-entity.provider-DKhXlL2j.mjs.map → acorex-modules-organization-management-entity.provider-Buchg68Q.mjs.map} +1 -1
  176. package/fesm2022/{acorex-modules-organization-management-feature-definition.provider-DhCn97pE.mjs → acorex-modules-organization-management-feature-definition.provider-CulEun4H.mjs} +2 -2
  177. package/fesm2022/{acorex-modules-organization-management-feature-definition.provider-DhCn97pE.mjs.map → acorex-modules-organization-management-feature-definition.provider-CulEun4H.mjs.map} +1 -1
  178. package/fesm2022/{acorex-modules-organization-management-job-definition-pages-component.provider-C1WFmQ2x.mjs → acorex-modules-organization-management-job-definition-pages-component.provider-D3k2BNKU.mjs} +4 -4
  179. package/fesm2022/{acorex-modules-organization-management-job-definition-pages-component.provider-C1WFmQ2x.mjs.map → acorex-modules-organization-management-job-definition-pages-component.provider-D3k2BNKU.mjs.map} +1 -1
  180. package/fesm2022/{acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs → acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs} +3 -3
  181. package/fesm2022/{acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs.map → acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs.map} +1 -1
  182. package/fesm2022/{acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs → acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs} +2 -2
  183. package/fesm2022/{acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs.map → acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs.map} +1 -1
  184. package/fesm2022/{acorex-modules-organization-management-job-level.datasource-DcOVF99r.mjs → acorex-modules-organization-management-job-level.datasource-CMxMInko.mjs} +2 -2
  185. package/fesm2022/{acorex-modules-organization-management-job-level.datasource-DcOVF99r.mjs.map → acorex-modules-organization-management-job-level.datasource-CMxMInko.mjs.map} +1 -1
  186. package/fesm2022/{acorex-modules-organization-management-menu.provider-B0v8w3eH.mjs → acorex-modules-organization-management-menu.provider-BL99vlod.mjs} +3 -3
  187. package/fesm2022/{acorex-modules-organization-management-menu.provider-B0v8w3eH.mjs.map → acorex-modules-organization-management-menu.provider-BL99vlod.mjs.map} +1 -1
  188. package/fesm2022/{acorex-modules-organization-management-org-chart-default-node-contribution.provider-B07M8tKi.mjs → acorex-modules-organization-management-org-chart-default-node-contribution.provider-CfvmOwYD.mjs} +2 -2
  189. package/fesm2022/{acorex-modules-organization-management-org-chart-default-node-contribution.provider-B07M8tKi.mjs.map → acorex-modules-organization-management-org-chart-default-node-contribution.provider-CfvmOwYD.mjs.map} +1 -1
  190. package/fesm2022/{acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-DSvij02R.mjs → acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-CsvhhcoW.mjs} +2 -2
  191. package/fesm2022/{acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-DSvij02R.mjs.map → acorex-modules-organization-management-org-chart-employee-flyout-contribution.provider-CsvhhcoW.mjs.map} +1 -1
  192. package/fesm2022/{acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-BYWq-Aco.mjs → acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Dvo2XEHn.mjs} +2 -2
  193. package/fesm2022/{acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-BYWq-Aco.mjs.map → acorex-modules-organization-management-org-chart-position-employee-node-contribution.provider-Dvo2XEHn.mjs.map} +1 -1
  194. package/fesm2022/{acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DiMvAEbk.mjs → acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BsBsdoII.mjs} +2 -2
  195. package/fesm2022/{acorex-modules-organization-management-org-chart-ux-node-contribution.provider-DiMvAEbk.mjs.map → acorex-modules-organization-management-org-chart-ux-node-contribution.provider-BsBsdoII.mjs.map} +1 -1
  196. package/fesm2022/{acorex-modules-organization-management-org-chart.page-DwHB4ZGl.mjs → acorex-modules-organization-management-org-chart.page-DJNfsp4z.mjs} +2 -2
  197. package/fesm2022/{acorex-modules-organization-management-org-chart.page-DwHB4ZGl.mjs.map → acorex-modules-organization-management-org-chart.page-DJNfsp4z.mjs.map} +1 -1
  198. package/fesm2022/{acorex-modules-organization-management-permission-definition.provider-CynLhaYz.mjs → acorex-modules-organization-management-permission-definition.provider-CuReVYo1.mjs} +2 -2
  199. package/fesm2022/{acorex-modules-organization-management-permission-definition.provider-CynLhaYz.mjs.map → acorex-modules-organization-management-permission-definition.provider-CuReVYo1.mjs.map} +1 -1
  200. package/fesm2022/{acorex-modules-organization-management-remove-position-from-business-unit.command-DUgDxwtI.mjs → acorex-modules-organization-management-remove-position-from-business-unit.command-mPTX8Vpc.mjs} +2 -2
  201. package/fesm2022/{acorex-modules-organization-management-remove-position-from-business-unit.command-DUgDxwtI.mjs.map → acorex-modules-organization-management-remove-position-from-business-unit.command-mPTX8Vpc.mjs.map} +1 -1
  202. package/fesm2022/{acorex-modules-organization-management-replace-position-assignee.command-BTAwsZNP.mjs → acorex-modules-organization-management-replace-position-assignee.command-DibpVA88.mjs} +2 -2
  203. package/fesm2022/{acorex-modules-organization-management-replace-position-assignee.command-BTAwsZNP.mjs.map → acorex-modules-organization-management-replace-position-assignee.command-DibpVA88.mjs.map} +1 -1
  204. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-D904V181.mjs → acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-zN1Vz3Om.mjs} +2 -2
  205. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-D904V181.mjs.map → acorex-modules-organization-management-responsibilities-matrix-widget-edit.component-zN1Vz3Om.mjs.map} +1 -1
  206. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BMFws_6Y.mjs → acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BYOs9nrw.mjs} +2 -2
  207. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BMFws_6Y.mjs.map → acorex-modules-organization-management-responsibilities-matrix-widget-view.component-BYOs9nrw.mjs.map} +1 -1
  208. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix.component-DXmsR1qV.mjs → acorex-modules-organization-management-responsibilities-matrix.component-DVlThT1h.mjs} +2 -2
  209. package/fesm2022/{acorex-modules-organization-management-responsibilities-matrix.component-DXmsR1qV.mjs.map → acorex-modules-organization-management-responsibilities-matrix.component-DVlThT1h.mjs.map} +1 -1
  210. package/fesm2022/{acorex-modules-organization-management-settings.provider-UFqps4Zg.mjs → acorex-modules-organization-management-settings.provider-BxoCS3w7.mjs} +2 -2
  211. package/fesm2022/{acorex-modules-organization-management-settings.provider-UFqps4Zg.mjs.map → acorex-modules-organization-management-settings.provider-BxoCS3w7.mjs.map} +1 -1
  212. package/fesm2022/acorex-modules-organization-management.mjs +1 -1
  213. package/fesm2022/acorex-modules-person-core.mjs +0 -6
  214. package/fesm2022/acorex-modules-person-core.mjs.map +1 -1
  215. package/fesm2022/acorex-modules-platform-dev-tools.mjs +2 -2
  216. package/fesm2022/acorex-modules-platform-dev-tools.mjs.map +1 -1
  217. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-DsKPOWpy.mjs → acorex-modules-platform-management-acorex-modules-platform-management-B5hMhQp-.mjs} +2 -2
  218. package/fesm2022/{acorex-modules-platform-management-acorex-modules-platform-management-DsKPOWpy.mjs.map → acorex-modules-platform-management-acorex-modules-platform-management-B5hMhQp-.mjs.map} +1 -1
  219. package/fesm2022/{acorex-modules-platform-management-menu-list.component-Br4nL9zq.mjs → acorex-modules-platform-management-menu-list.component-DcOr1v-f.mjs} +3 -3
  220. package/fesm2022/{acorex-modules-platform-management-menu-list.component-Br4nL9zq.mjs.map → acorex-modules-platform-management-menu-list.component-DcOr1v-f.mjs.map} +1 -1
  221. package/fesm2022/acorex-modules-platform-management.mjs +1 -1
  222. package/fesm2022/acorex-modules-product-catalog.mjs +7 -6
  223. package/fesm2022/acorex-modules-product-catalog.mjs.map +1 -1
  224. package/fesm2022/acorex-modules-project-management.mjs +1 -1
  225. package/fesm2022/acorex-modules-project-management.mjs.map +1 -1
  226. package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-DaPEmTm9.mjs → acorex-modules-report-management-report-runner-root-page.component-CgrBAgqq.mjs} +2 -2
  227. package/fesm2022/{acorex-modules-report-management-report-runner-root-page.component-DaPEmTm9.mjs.map → acorex-modules-report-management-report-runner-root-page.component-CgrBAgqq.mjs.map} +1 -1
  228. package/fesm2022/acorex-modules-report-management.mjs +7 -7
  229. package/fesm2022/acorex-modules-report-management.mjs.map +1 -1
  230. package/fesm2022/acorex-modules-risk-management-preview-risk-matrix-cell.command-CWG3zUBo.mjs +120 -0
  231. package/fesm2022/acorex-modules-risk-management-preview-risk-matrix-cell.command-CWG3zUBo.mjs.map +1 -0
  232. package/fesm2022/acorex-modules-risk-management.mjs +13 -0
  233. package/fesm2022/acorex-modules-risk-management.mjs.map +1 -1
  234. package/fesm2022/acorex-modules-security-management.mjs +1 -1
  235. package/fesm2022/acorex-modules-security-management.mjs.map +1 -1
  236. package/fesm2022/{acorex-modules-settings-management-setting-view.component-CG-GW2yS.mjs → acorex-modules-settings-management-setting-view.component-BRhZR1br.mjs} +109 -15
  237. package/fesm2022/acorex-modules-settings-management-setting-view.component-BRhZR1br.mjs.map +1 -0
  238. package/fesm2022/acorex-modules-settings-management.mjs +1 -1
  239. package/fesm2022/acorex-modules-supplier-management.mjs +1 -1
  240. package/fesm2022/acorex-modules-supplier-management.mjs.map +1 -1
  241. package/fesm2022/{acorex-modules-task-management-task-board.page-FFhsAyHF.mjs → acorex-modules-task-management-task-board.page-DTWxd_vG.mjs} +41 -32
  242. package/fesm2022/acorex-modules-task-management-task-board.page-DTWxd_vG.mjs.map +1 -0
  243. package/fesm2022/acorex-modules-task-management.mjs +55 -23
  244. package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
  245. package/fesm2022/{acorex-modules-workflow-management-acorex-modules-workflow-management-DJeUheQT.mjs → acorex-modules-workflow-management-acorex-modules-workflow-management-D04WU8wX.mjs} +32 -25
  246. package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-D04WU8wX.mjs.map +1 -0
  247. package/fesm2022/{acorex-modules-workflow-management-index--6gz3uRb.mjs → acorex-modules-workflow-management-index-Bfzsu6VL.mjs} +2 -2
  248. package/fesm2022/{acorex-modules-workflow-management-index--6gz3uRb.mjs.map → acorex-modules-workflow-management-index-Bfzsu6VL.mjs.map} +1 -1
  249. package/fesm2022/{acorex-modules-workflow-management-index-DV7Uf5hP.mjs → acorex-modules-workflow-management-index-CG1-u2Va.mjs} +3 -3
  250. package/fesm2022/{acorex-modules-workflow-management-index-DV7Uf5hP.mjs.map → acorex-modules-workflow-management-index-CG1-u2Va.mjs.map} +1 -1
  251. package/fesm2022/{acorex-modules-workflow-management-index-C702Snjg.mjs → acorex-modules-workflow-management-index-DtKZARCI.mjs} +3 -3
  252. package/fesm2022/{acorex-modules-workflow-management-index-C702Snjg.mjs.map → acorex-modules-workflow-management-index-DtKZARCI.mjs.map} +1 -1
  253. package/fesm2022/{acorex-modules-workflow-management-save-workflow-definition-activities.command-C60ABOUE.mjs → acorex-modules-workflow-management-save-workflow-definition-activities.command-80PIS1oE.mjs} +2 -2
  254. package/fesm2022/{acorex-modules-workflow-management-save-workflow-definition-activities.command-C60ABOUE.mjs.map → acorex-modules-workflow-management-save-workflow-definition-activities.command-80PIS1oE.mjs.map} +1 -1
  255. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-column.component-ChnPuG_J.mjs → acorex-modules-workflow-management-workflow-configurator-widget-column.component-CXhrrqa_.mjs} +2 -2
  256. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-column.component-ChnPuG_J.mjs.map → acorex-modules-workflow-management-workflow-configurator-widget-column.component-CXhrrqa_.mjs.map} +1 -1
  257. package/fesm2022/{acorex-modules-workflow-management-workflow-configurator-widget-edit.component-BqydSkbP.mjs → acorex-modules-workflow-management-workflow-configurator-widget-edit.component-CzPQUA9m.mjs} +47 -25
  258. package/fesm2022/acorex-modules-workflow-management-workflow-configurator-widget-edit.component-CzPQUA9m.mjs.map +1 -0
  259. package/fesm2022/{acorex-modules-workflow-management-workflow-run-history-popup.component-D_yi-Ccp.mjs → acorex-modules-workflow-management-workflow-run-history-popup.component-CTs6Sdm2.mjs} +2 -2
  260. package/fesm2022/{acorex-modules-workflow-management-workflow-run-history-popup.component-D_yi-Ccp.mjs.map → acorex-modules-workflow-management-workflow-run-history-popup.component-CTs6Sdm2.mjs.map} +1 -1
  261. package/fesm2022/{acorex-modules-workflow-management-workflow-task-popover.component-CdvuOzXH.mjs → acorex-modules-workflow-management-workflow-task-popover.component-CaIIzv1r.mjs} +2 -2
  262. package/fesm2022/{acorex-modules-workflow-management-workflow-task-popover.component-CdvuOzXH.mjs.map → acorex-modules-workflow-management-workflow-task-popover.component-CaIIzv1r.mjs.map} +1 -1
  263. package/fesm2022/acorex-modules-workflow-management.mjs +1 -1
  264. package/fesm2022/acorex-modules-workplacesafety-management-hazard-risk-ppe-rule-status.provider-BsRNRZ6z.mjs +42 -0
  265. package/fesm2022/acorex-modules-workplacesafety-management-hazard-risk-ppe-rule-status.provider-BsRNRZ6z.mjs.map +1 -0
  266. package/fesm2022/acorex-modules-workplacesafety-management.mjs +494 -294
  267. package/fesm2022/acorex-modules-workplacesafety-management.mjs.map +1 -1
  268. package/package.json +2 -2
  269. package/types/acorex-modules-asset-management.d.ts +7 -3
  270. package/types/acorex-modules-contact-core.d.ts +1 -0
  271. package/types/acorex-modules-conversation.d.ts +898 -161
  272. package/types/acorex-modules-dashboard-management.d.ts +56 -10
  273. package/types/acorex-modules-document-management.d.ts +4 -0
  274. package/types/acorex-modules-report-management.d.ts +2 -0
  275. package/types/acorex-modules-task-management.d.ts +21 -5
  276. package/types/acorex-modules-workflow-management.d.ts +9 -4
  277. package/types/acorex-modules-workplacesafety-management.d.ts +55 -32
  278. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-WGRBHMmQ.mjs.map +0 -1
  279. package/fesm2022/acorex-modules-contact-core-acorex-modules-contact-core-CBMdv1GN.mjs.map +0 -1
  280. package/fesm2022/acorex-modules-contact-core-menu.provider-C-iEIPGe.mjs.map +0 -1
  281. package/fesm2022/acorex-modules-conversation-acorex-modules-conversation-CUjTT3M7.mjs.map +0 -1
  282. package/fesm2022/acorex-modules-conversation-send-assist-chat-message.command-CqDrZKFK.mjs.map +0 -1
  283. package/fesm2022/acorex-modules-dashboard-management-acorex-modules-dashboard-management-Lx3VuIg6.mjs.map +0 -1
  284. package/fesm2022/acorex-modules-data-management-index-CxVSgxTM.mjs.map +0 -1
  285. package/fesm2022/acorex-modules-human-capital-management-edit-personal-info.command-8LKMNm4Z.mjs.map +0 -1
  286. package/fesm2022/acorex-modules-settings-management-setting-view.component-CG-GW2yS.mjs.map +0 -1
  287. package/fesm2022/acorex-modules-task-management-task-board.page-FFhsAyHF.mjs.map +0 -1
  288. package/fesm2022/acorex-modules-workflow-management-acorex-modules-workflow-management-DJeUheQT.mjs.map +0 -1
  289. package/fesm2022/acorex-modules-workflow-management-workflow-configurator-widget-edit.component-BqydSkbP.mjs.map +0 -1
@@ -6,7 +6,7 @@ import { AXPEntityService } from '@acorex/platform/layout/entity';
6
6
  import { AXPCommandService } from '@acorex/platform/runtime';
7
7
  import * as i0 from '@angular/core';
8
8
  import { inject, Injectable } from '@angular/core';
9
- import { R as RootConfig, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
9
+ import { R as RootConfig, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
10
10
 
11
11
  //#region ---- Imports ----
12
12
  class AXMAddBusinessUnitToBusinessUnitCommand {
@@ -162,4 +162,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
162
162
  }] });
163
163
 
164
164
  export { AXMAddBusinessUnitToBusinessUnitCommand };
165
- //# sourceMappingURL=acorex-modules-organization-management-add-business-unit-to-business-unit.command-BG6AQs-j.mjs.map
165
+ //# sourceMappingURL=acorex-modules-organization-management-add-business-unit-to-business-unit.command-CgqydSZh.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-add-business-unit-to-business-unit.command-BG6AQs-j.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/commands/add-business-unit-to-business-unit.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport type { AXMOrganizationManagementBusinessUnitEntityModel } from '../../../entities/business-unit/business-unit.types';\n\n//#endregion\n\nexport interface AXMAddBusinessUnitToBusinessUnitInput {\n /** Parent BU when adding under a business unit; omit or empty from company root. */\n parentBusinessUnitId?: string | null;\n typeId: string;\n}\n\nexport interface AXMAddBusinessUnitToBusinessUnitResult {\n childBusinessUnitId: string;\n /** True when HCM position assignment for the unit head completed successfully. */\n headAssignCompleted?: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMAddBusinessUnitToBusinessUnitCommand\n implements AXPCommand<AXMAddBusinessUnitToBusinessUnitInput, AXMAddBusinessUnitToBusinessUnitResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly dialogService = inject(AXDialogService);\n private readonly toastService = inject(AXToastService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly positionAssignmentCreatePermission =\n 'HumanCapitalManagement:Permission:PositionAssignment.Create';\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(\n input: AXMAddBusinessUnitToBusinessUnitInput,\n ): Promise<AXPExecuteCommandResult<AXMAddBusinessUnitToBusinessUnitResult>> {\n const typeId = input?.typeId?.trim() ?? '';\n if (!typeId) {\n return { success: false };\n }\n\n const parentId = this.normalizeOptionalId(input?.parentBusinessUnitId);\n\n const createResult = await this.commandService.execute('Entity:Create', {\n __context__: {\n entity: RootConfig.entities.businessUnit.source,\n entityInfo: {\n module: RootConfig.module.name,\n name: RootConfig.entities.businessUnit.name,\n title: RootConfig.entities.businessUnit.title,\n parentKey: 'parentId',\n },\n data: {\n ...(parentId ? { parentId } : {}),\n typeId,\n },\n options: {\n process: {\n redirect: false,\n },\n },\n },\n });\n\n if (!createResult?.success) {\n return { success: false };\n }\n\n const childBusinessUnitId = this.extractCreatedEntityId(createResult.data);\n if (!childBusinessUnitId) {\n return { success: true };\n }\n\n if (!(await this.typeAllowsDirectPositions(typeId))) {\n return { success: true, data: { childBusinessUnitId } };\n }\n\n if (!this.sessionService.authorize(this.positionAssignmentCreatePermission)) {\n return { success: true, data: { childBusinessUnitId } };\n }\n\n if (!(await this.confirmAssignHeadNow())) {\n return { success: true, data: { childBusinessUnitId } };\n }\n\n const headPositionId = await this.resolveHeadPositionId(childBusinessUnitId);\n if (!headPositionId) {\n await this.showMissingHeadPositionHint();\n return { success: true, data: { childBusinessUnitId } };\n }\n\n const assignResult = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: childBusinessUnitId,\n positionId: headPositionId,\n isPrimary: true,\n },\n });\n\n return {\n success: true,\n data: {\n childBusinessUnitId,\n headAssignCompleted: assignResult?.success === true,\n },\n };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * When false, the business unit type cannot hold direct positions (no head-assignment prompt after create).\n */\n private async typeAllowsDirectPositions(businessUnitTypeId: string): Promise<boolean> {\n const id = businessUnitTypeId.trim();\n if (!id) {\n return true;\n }\n try {\n const row = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .byKey(id);\n return (row as { allowsDirectPositions?: boolean } | null)?.allowsDirectPositions !== false;\n } catch {\n return true;\n }\n }\n\n private normalizeOptionalId(value: unknown): string | undefined {\n if (value == null) {\n return undefined;\n }\n const s = String(value).trim();\n return s.length > 0 ? s : undefined;\n }\n\n private extractCreatedEntityId(data: unknown): string {\n if (data == null || typeof data !== 'object') {\n return '';\n }\n const record = data as Record<string, unknown>;\n const item = record['item'] ?? data;\n if (item == null || typeof item !== 'object') {\n return '';\n }\n const id = (item as Record<string, unknown>)['id'];\n if (typeof id === 'string') {\n return id.trim();\n }\n if (typeof id === 'number' && Number.isFinite(id)) {\n return String(id);\n }\n return '';\n }\n\n private async confirmAssignHeadNow(): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-after-bu-create.title',\n );\n const message = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-after-bu-create.message',\n );\n const result = await this.dialogService.confirm(title, message, 'primary', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private async resolveHeadPositionId(businessUnitId: string): Promise<string> {\n const buData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnit.name)\n .data<string, AXMOrganizationManagementBusinessUnitEntityModel>();\n const row = await buData.byKey(businessUnitId);\n const raw = row?.headPositionId;\n if (typeof raw === 'string') {\n const id = raw.trim();\n return id.length > 0 ? id : '';\n }\n return '';\n }\n\n private async showMissingHeadPositionHint(): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-missing-head-position.title',\n );\n const content = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-missing-head-position.message',\n );\n this.toastService.show({ color: 'warning', title, content });\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;AAAA;MA6Ba,uCAAuC,CAAA;AADpD,IAAA,WAAA,GAAA;;AAMmB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O,GAAG,KAAK,QAAQ,EAAE;AAC3B,YAAA,MAAM,EAAE,GAAG,GAAG,CAAC,IAAI,EAAE;AACrB,YAAA,OAAO,EAAE,CAAC,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE;QAChC;AACA,QAAA,OAAO,EAAE;IACX;AAEQ,IAAA,MAAM,2BAA2B,GAAA;QACvC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CACxD,kGAAkG,CACnG;QACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,oGAAoG,CACrG;AACD,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAC9D;8GAhLW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uCAAuC,cAD1B,MAAM,EAAA,CAAA,CAAA;;2FACnB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-add-business-unit-to-business-unit.command-CgqydSZh.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/commands/add-business-unit-to-business-unit.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport type { AXMOrganizationManagementBusinessUnitEntityModel } from '../../../entities/business-unit/business-unit.types';\n\n//#endregion\n\nexport interface AXMAddBusinessUnitToBusinessUnitInput {\n /** Parent BU when adding under a business unit; omit or empty from company root. */\n parentBusinessUnitId?: string | null;\n typeId: string;\n}\n\nexport interface AXMAddBusinessUnitToBusinessUnitResult {\n childBusinessUnitId: string;\n /** True when HCM position assignment for the unit head completed successfully. */\n headAssignCompleted?: boolean;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMAddBusinessUnitToBusinessUnitCommand\n implements AXPCommand<AXMAddBusinessUnitToBusinessUnitInput, AXMAddBusinessUnitToBusinessUnitResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly dialogService = inject(AXDialogService);\n private readonly toastService = inject(AXToastService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly positionAssignmentCreatePermission =\n 'HumanCapitalManagement:Permission:PositionAssignment.Create';\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(\n input: AXMAddBusinessUnitToBusinessUnitInput,\n ): Promise<AXPExecuteCommandResult<AXMAddBusinessUnitToBusinessUnitResult>> {\n const typeId = input?.typeId?.trim() ?? '';\n if (!typeId) {\n return { success: false };\n }\n\n const parentId = this.normalizeOptionalId(input?.parentBusinessUnitId);\n\n const createResult = await this.commandService.execute('Entity:Create', {\n __context__: {\n entity: RootConfig.entities.businessUnit.source,\n entityInfo: {\n module: RootConfig.module.name,\n name: RootConfig.entities.businessUnit.name,\n title: RootConfig.entities.businessUnit.title,\n parentKey: 'parentId',\n },\n data: {\n ...(parentId ? { parentId } : {}),\n typeId,\n },\n options: {\n process: {\n redirect: false,\n },\n },\n },\n });\n\n if (!createResult?.success) {\n return { success: false };\n }\n\n const childBusinessUnitId = this.extractCreatedEntityId(createResult.data);\n if (!childBusinessUnitId) {\n return { success: true };\n }\n\n if (!(await this.typeAllowsDirectPositions(typeId))) {\n return { success: true, data: { childBusinessUnitId } };\n }\n\n if (!this.sessionService.authorize(this.positionAssignmentCreatePermission)) {\n return { success: true, data: { childBusinessUnitId } };\n }\n\n if (!(await this.confirmAssignHeadNow())) {\n return { success: true, data: { childBusinessUnitId } };\n }\n\n const headPositionId = await this.resolveHeadPositionId(childBusinessUnitId);\n if (!headPositionId) {\n await this.showMissingHeadPositionHint();\n return { success: true, data: { childBusinessUnitId } };\n }\n\n const assignResult = await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId: childBusinessUnitId,\n positionId: headPositionId,\n isPrimary: true,\n },\n });\n\n return {\n success: true,\n data: {\n childBusinessUnitId,\n headAssignCompleted: assignResult?.success === true,\n },\n };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * When false, the business unit type cannot hold direct positions (no head-assignment prompt after create).\n */\n private async typeAllowsDirectPositions(businessUnitTypeId: string): Promise<boolean> {\n const id = businessUnitTypeId.trim();\n if (!id) {\n return true;\n }\n try {\n const row = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .byKey(id);\n return (row as { allowsDirectPositions?: boolean } | null)?.allowsDirectPositions !== false;\n } catch {\n return true;\n }\n }\n\n private normalizeOptionalId(value: unknown): string | undefined {\n if (value == null) {\n return undefined;\n }\n const s = String(value).trim();\n return s.length > 0 ? s : undefined;\n }\n\n private extractCreatedEntityId(data: unknown): string {\n if (data == null || typeof data !== 'object') {\n return '';\n }\n const record = data as Record<string, unknown>;\n const item = record['item'] ?? data;\n if (item == null || typeof item !== 'object') {\n return '';\n }\n const id = (item as Record<string, unknown>)['id'];\n if (typeof id === 'string') {\n return id.trim();\n }\n if (typeof id === 'number' && Number.isFinite(id)) {\n return String(id);\n }\n return '';\n }\n\n private async confirmAssignHeadNow(): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-after-bu-create.title',\n );\n const message = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-after-bu-create.message',\n );\n const result = await this.dialogService.confirm(title, message, 'primary', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private async resolveHeadPositionId(businessUnitId: string): Promise<string> {\n const buData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnit.name)\n .data<string, AXMOrganizationManagementBusinessUnitEntityModel>();\n const row = await buData.byKey(businessUnitId);\n const raw = row?.headPositionId;\n if (typeof raw === 'string') {\n const id = raw.trim();\n return id.length > 0 ? id : '';\n }\n return '';\n }\n\n private async showMissingHeadPositionHint(): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-missing-head-position.title',\n );\n const content = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-head-missing-head-position.message',\n );\n this.toastService.show({ color: 'warning', title, content });\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;AAAA;MA6Ba,uCAAuC,CAAA;AADpD,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CA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,CAC1D,oGAAoG,CACrG;AACD,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAC9D;8GAhLW,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAvC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uCAAuC,cAD1B,MAAM,EAAA,CAAA,CAAA;;2FACnB,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBADnD,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -5,7 +5,7 @@ import { AXPEntityService, AXPEntityDefinitionRegistryService, AXPEntityDataSele
5
5
  import { AXPCommandService } from '@acorex/platform/runtime';
6
6
  import * as i0 from '@angular/core';
7
7
  import { inject, Injectable } from '@angular/core';
8
- import { R as RootConfig, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
8
+ import { R as RootConfig, k as AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
9
9
 
10
10
  //#region ---- Imports ----
11
11
  class AXMAddPositionToBusinessUnitCommand {
@@ -136,4 +136,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
136
136
  }] });
137
137
 
138
138
  export { AXMAddPositionToBusinessUnitCommand };
139
- //# sourceMappingURL=acorex-modules-organization-management-add-position-to-business-unit.command-DzA0h9ED.mjs.map
139
+ //# sourceMappingURL=acorex-modules-organization-management-add-position-to-business-unit.command-B_BIg-aF.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-add-position-to-business-unit.command-DzA0h9ED.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/commands/add-position-to-business-unit.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport {\n AXPEntityDataSelectorService,\n AXPEntityDefinitionRegistryService,\n AXPEntityService,\n} from '@acorex/platform/layout/entity';\nimport { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport type { AXMOrganizationManagementBusinessUnitEntityModel } from '../../../entities/business-unit/business-unit.types';\n\n//#endregion\n\nexport interface AXMAddPositionToBusinessUnitInput {\n businessUnitId: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMAddPositionToBusinessUnitCommand\n implements AXPCommand<AXMAddPositionToBusinessUnitInput, { businessUnitId: string; positionId: string }>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly entitySelector = inject(AXPEntityDataSelectorService);\n private readonly translationService = inject(AXTranslationService);\n private readonly dialogService = inject(AXDialogService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly positionAssignmentCreatePermission =\n 'HumanCapitalManagement:Permission:PositionAssignment.Create';\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(\n input: AXMAddPositionToBusinessUnitInput,\n ): Promise<AXPExecuteCommandResult<{ businessUnitId: string; positionId: string }>> {\n const businessUnitId = input?.businessUnitId?.trim() ?? '';\n if (!businessUnitId) {\n return { success: false };\n }\n\n const buData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnit.name)\n .data<string, AXMOrganizationManagementBusinessUnitEntityModel>();\n\n const businessUnit = await buData.byKey(businessUnitId);\n if (!businessUnit?.id) {\n return { success: false };\n }\n\n if (!(await this.businessUnitTypeAllowsDirectPositions(businessUnit))) {\n const text = await this.translationService.translateAsync(\n '@organization-management:organization-chart.commands.add-position.type-not-allowed',\n );\n return { success: false, message: { text } };\n }\n\n const existingIds = this.normalizePositionIds(businessUnit.positionIds);\n const positionEntity = await this.entityRegistry.resolve(\n RootConfig.module.name,\n RootConfig.entities.position.name,\n );\n if (!positionEntity) {\n return { success: false };\n }\n\n const selectTitle = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.select-position',\n );\n\n const selectorResult = await this.entitySelector.open({\n entity: positionEntity,\n title: selectTitle,\n allowMultiple: false,\n columns: ['code', 'title'],\n });\n\n const selected = selectorResult?.items?.[0];\n const rawPositionId = selected?.['id'] ?? selected?.['_id'];\n const positionId = typeof rawPositionId === 'string' && rawPositionId.trim().length > 0 ? rawPositionId : '';\n if (!positionId) {\n return { success: false };\n }\n\n if (existingIds.includes(positionId)) {\n return { success: true, data: { businessUnitId, positionId } };\n }\n\n const nextPositionIds = [...existingIds, positionId];\n\n try {\n await buData.update(businessUnitId, { positionIds: nextPositionIds });\n } catch {\n return { success: false };\n }\n\n const canAssign = this.sessionService.authorize(this.positionAssignmentCreatePermission);\n if (canAssign && (await this.confirmAssignEmployee())) {\n await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId,\n positionId,\n isPrimary: false,\n },\n });\n }\n\n return { success: true, data: { businessUnitId, positionId } };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * Returns false when the business unit type explicitly disallows direct positions; true otherwise.\n */\n private async businessUnitTypeAllowsDirectPositions(\n bu: AXMOrganizationManagementBusinessUnitEntityModel,\n ): Promise<boolean> {\n const nested = bu.type?.allowsDirectPositions;\n if (nested === false) {\n return false;\n }\n if (nested === true) {\n return true;\n }\n const typeId = bu.typeId?.trim();\n if (!typeId) {\n return true;\n }\n try {\n const row = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .byKey(typeId);\n return (row as { allowsDirectPositions?: boolean } | null)?.allowsDirectPositions !== false;\n } catch {\n return true;\n }\n }\n\n private normalizePositionIds(value: unknown): string[] {\n if (value == null) {\n return [];\n }\n if (Array.isArray(value)) {\n return value.map((v) => String(v ?? '').trim()).filter((id) => id.length > 0);\n }\n if (typeof value === 'string') {\n return value\n .split(',')\n .map((id) => id.trim())\n .filter((id) => id.length > 0);\n }\n return [];\n }\n\n private async confirmAssignEmployee(): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-employee-confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-employee-confirm.message',\n );\n const result = await this.dialogService.confirm(title, message, 'primary', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;MAwBa,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACrD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE1C,IAAA,C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,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/E;AACA,QAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AAC7B,YAAA,OAAO;iBACJ,KAAK,CAAC,GAAG;iBACT,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE;AACrB,iBAAA,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QAClC;AACA,QAAA,OAAO,EAAE;IACX;AAEQ,IAAA,MAAM,qBAAqB,GAAA;QACjC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CACxD,wFAAwF,CACzF;QACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,0FAA0F,CAC3F;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC;AACzG,QAAA,OAAO,MAAM,CAAC,MAAM,KAAK,IAAI;IAC/B;8GA1JW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-add-position-to-business-unit.command-B_BIg-aF.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/commands/add-position-to-business-unit.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPSessionService } from '@acorex/platform/auth';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport {\n AXPEntityDataSelectorService,\n AXPEntityDefinitionRegistryService,\n AXPEntityService,\n} from '@acorex/platform/layout/entity';\nimport { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport { AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND } from '../../../contracts/commands.keys';\nimport { RootConfig } from '../../../contracts';\nimport type { AXMOrganizationManagementBusinessUnitEntityModel } from '../../../entities/business-unit/business-unit.types';\n\n//#endregion\n\nexport interface AXMAddPositionToBusinessUnitInput {\n businessUnitId: string;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXMAddPositionToBusinessUnitCommand\n implements AXPCommand<AXMAddPositionToBusinessUnitInput, { businessUnitId: string; positionId: string }>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly entityRegistry = inject(AXPEntityDefinitionRegistryService);\n private readonly entitySelector = inject(AXPEntityDataSelectorService);\n private readonly translationService = inject(AXTranslationService);\n private readonly dialogService = inject(AXDialogService);\n private readonly sessionService = inject(AXPSessionService);\n\n private readonly positionAssignmentCreatePermission =\n 'HumanCapitalManagement:Permission:PositionAssignment.Create';\n\n //#endregion\n\n //#region ---- Command ----\n\n async execute(\n input: AXMAddPositionToBusinessUnitInput,\n ): Promise<AXPExecuteCommandResult<{ businessUnitId: string; positionId: string }>> {\n const businessUnitId = input?.businessUnitId?.trim() ?? '';\n if (!businessUnitId) {\n return { success: false };\n }\n\n const buData = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnit.name)\n .data<string, AXMOrganizationManagementBusinessUnitEntityModel>();\n\n const businessUnit = await buData.byKey(businessUnitId);\n if (!businessUnit?.id) {\n return { success: false };\n }\n\n if (!(await this.businessUnitTypeAllowsDirectPositions(businessUnit))) {\n const text = await this.translationService.translateAsync(\n '@organization-management:organization-chart.commands.add-position.type-not-allowed',\n );\n return { success: false, message: { text } };\n }\n\n const existingIds = this.normalizePositionIds(businessUnit.positionIds);\n const positionEntity = await this.entityRegistry.resolve(\n RootConfig.module.name,\n RootConfig.entities.position.name,\n );\n if (!positionEntity) {\n return { success: false };\n }\n\n const selectTitle = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.select-position',\n );\n\n const selectorResult = await this.entitySelector.open({\n entity: positionEntity,\n title: selectTitle,\n allowMultiple: false,\n columns: ['code', 'title'],\n });\n\n const selected = selectorResult?.items?.[0];\n const rawPositionId = selected?.['id'] ?? selected?.['_id'];\n const positionId = typeof rawPositionId === 'string' && rawPositionId.trim().length > 0 ? rawPositionId : '';\n if (!positionId) {\n return { success: false };\n }\n\n if (existingIds.includes(positionId)) {\n return { success: true, data: { businessUnitId, positionId } };\n }\n\n const nextPositionIds = [...existingIds, positionId];\n\n try {\n await buData.update(businessUnitId, { positionIds: nextPositionIds });\n } catch {\n return { success: false };\n }\n\n const canAssign = this.sessionService.authorize(this.positionAssignmentCreatePermission);\n if (canAssign && (await this.confirmAssignEmployee())) {\n await this.commandService.execute(AXM_HCM_POSITION_ASSIGNMENT_ASSIGN_COMMAND, {\n data: {\n businessUnitId,\n positionId,\n isPrimary: false,\n },\n });\n }\n\n return { success: true, data: { businessUnitId, positionId } };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * Returns false when the business unit type explicitly disallows direct positions; true otherwise.\n */\n private async businessUnitTypeAllowsDirectPositions(\n bu: AXMOrganizationManagementBusinessUnitEntityModel,\n ): Promise<boolean> {\n const nested = bu.type?.allowsDirectPositions;\n if (nested === false) {\n return false;\n }\n if (nested === true) {\n return true;\n }\n const typeId = bu.typeId?.trim();\n if (!typeId) {\n return true;\n }\n try {\n const row = await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.businessUnitType.name)\n .data()\n .byKey(typeId);\n return (row as { allowsDirectPositions?: boolean } | null)?.allowsDirectPositions !== false;\n } catch {\n return true;\n }\n }\n\n private normalizePositionIds(value: unknown): string[] {\n if (value == null) {\n return [];\n }\n if (Array.isArray(value)) {\n return value.map((v) => String(v ?? '').trim()).filter((id) => id.length > 0);\n }\n if (typeof value === 'string') {\n return value\n .split(',')\n .map((id) => id.trim())\n .filter((id) => id.length > 0);\n }\n return [];\n }\n\n private async confirmAssignEmployee(): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-employee-confirm.title',\n );\n const message = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.assign-employee-confirm.message',\n );\n const result = await this.dialogService.confirm(title, message, 'primary', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;MAwBa,mCAAmC,CAAA;AADhD,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,kCAAkC,CAAC;AAC3D,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACrD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;QAE1C,IAAA,CAAA,kCAAkC,GACjD,6DAA6D;AA+IhE,IAAA;;;IAzIC,MAAM,OAAO,CACX,KAAwC,EAAA;QAExC,MAAM,cAAc,GAAG,KAAK,EAAE,cAAc,EAA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J,KAAK,CAAC,GAAG;iBACT,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE;AACrB,iBAAA,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QAClC;AACA,QAAA,OAAO,EAAE;IACX;AAEQ,IAAA,MAAM,qBAAqB,GAAA;QACjC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CACxD,wFAAwF,CACzF;QACD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,cAAc,CAC1D,0FAA0F,CAC3F;QACD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,QAAQ,CAAC;AACzG,QAAA,OAAO,MAAM,CAAC,MAAM,KAAK,IAAI;IAC/B;8GA1JW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAnC,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mCAAmC,cADtB,MAAM,EAAA,CAAA,CAAA;;2FACnB,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
@@ -5,7 +5,7 @@ import { AXPEntityService } from '@acorex/platform/layout/entity';
5
5
  import { AXPCommandService } from '@acorex/platform/runtime';
6
6
  import * as i0 from '@angular/core';
7
7
  import { inject, Injectable } from '@angular/core';
8
- import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
8
+ import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
9
9
 
10
10
  //#region ---- Imports ----
11
11
  /**
@@ -127,4 +127,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
127
127
  }] });
128
128
 
129
129
  export { AXMAddTeamToBusinessUnitCommand };
130
- //# sourceMappingURL=acorex-modules-organization-management-add-team-to-business-unit.command-5ZGzmp95.mjs.map
130
+ //# sourceMappingURL=acorex-modules-organization-management-add-team-to-business-unit.command-zFql0VH1.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-add-team-to-business-unit.command-5ZGzmp95.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/commands/add-team-to-business-unit.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport type { AXMOrganizationManagementTeamBusinessUnitEntityModel } from '../../../entities/team-business-unit/team-business-unit.types';\nimport { RootConfig } from '../../../contracts';\n\n//#endregion\n\nexport interface AXMAddTeamToBusinessUnitInput {\n businessUnitId: string;\n}\n\nexport interface AXMAddTeamToBusinessUnitResult {\n teamId: string;\n}\n\n/**\n * Opens **Team** create (`Entity:Create`), then links the new team to the given business unit via **TeamBusinessUnit**\n * (`isPrimary: true`, `effectiveFrom` = today) and optionally navigates to the team record.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMAddTeamToBusinessUnitCommand\n implements AXPCommand<AXMAddTeamToBusinessUnitInput, AXMAddTeamToBusinessUnitResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- AXPCommand ----\n\n async execute(\n input: AXMAddTeamToBusinessUnitInput,\n ): Promise<AXPExecuteCommandResult<AXMAddTeamToBusinessUnitResult>> {\n const businessUnitId = input?.businessUnitId?.trim() ?? '';\n if (!businessUnitId) {\n return { success: false };\n }\n\n const createResult = await this.commandService.execute('Entity:Create', {\n __context__: {\n entity: RootConfig.entities.team.source,\n entityInfo: {\n module: RootConfig.module.name,\n name: RootConfig.entities.team.name,\n title: RootConfig.entities.team.title,\n },\n data: {},\n options: {\n process: {\n redirect: false,\n },\n },\n },\n });\n\n if (!createResult?.success) {\n return { success: false };\n }\n\n const teamId = this.extractCreatedEntityId(createResult.data);\n if (!teamId) {\n return { success: false };\n }\n\n let linkSucceeded = false;\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.teamBusinessUnit.name)\n .data<string, AXMOrganizationManagementTeamBusinessUnitEntityModel>()\n .create({\n teamId,\n businessUnitId,\n isPrimary: true,\n effectiveFrom: this.todayLocalDateOnly(),\n });\n linkSucceeded = true;\n } catch (e) {\n const content =\n e instanceof Error\n ? e.message\n : await this.translationService.translateAsync('@general:messages.generic.error.description');\n const title = await this.translationService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'warning', title, content });\n }\n\n if (await this.confirmOpenTeamDetails(linkSucceeded)) {\n await this.commandService.execute('Entity:OpenDetails', {\n entity: RootConfig.entities.team.source,\n data: { id: teamId },\n });\n }\n\n return { success: true, data: { teamId } };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * Local calendar date as `YYYY-MM-DD` for {@link AXMOrganizationManagementTeamBusinessUnitEntityModel.effectiveFrom}.\n */\n private todayLocalDateOnly(): string {\n const d = new Date();\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, '0');\n const day = String(d.getDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n }\n\n private async confirmOpenTeamDetails(linkSucceeded: boolean): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.navigate-to-team-after-create.title',\n );\n const messageKey = linkSucceeded\n ? '@organization-management:organization-chart.node-actions.navigate-to-team-after-create.message'\n : '@organization-management:organization-chart.node-actions.navigate-to-team-after-create.message-link-failed';\n const message = await this.translationService.translateAsync(messageKey);\n const result = await this.dialogService.confirm(title, message, 'primary', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private extractCreatedEntityId(data: unknown): string {\n if (data == null || typeof data !== 'object') {\n return '';\n }\n const record = data as Record<string, unknown>;\n const item = record['item'] ?? data;\n if (item == null || typeof item !== 'object') {\n return '';\n }\n const id = (item as Record<string, unknown>)['id'];\n if (typeof id === 'string') {\n return id.trim();\n }\n if (typeof id === 'number' && Number.isFinite(id)) {\n return String(id);\n }\n return '';\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAsBA;;;AAGG;MAEU,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAsHnE,IAAA;;;IAhHC,MAAM,OAAO,CACX,KAAoC,EAAA;QAEpC,MAAM,cAAc,GAAG,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1D,IAAI,CAAC,cAAc,EAAE;AACnB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,MAAM,YAAY,GAAG,MAAM,IA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,EAAA,IAAA,EAAA,+BAA+B,cADlB,MAAM,EAAA,CAAA,CAAA;;2FACnB,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-add-team-to-business-unit.command-zFql0VH1.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/organization-chart/commands/add-team-to-business-unit.command.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXDialogService } from '@acorex/components/dialog';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPCommand, AXPCommandService } from '@acorex/platform/runtime';\nimport { inject, Injectable } from '@angular/core';\nimport type { AXMOrganizationManagementTeamBusinessUnitEntityModel } from '../../../entities/team-business-unit/team-business-unit.types';\nimport { RootConfig } from '../../../contracts';\n\n//#endregion\n\nexport interface AXMAddTeamToBusinessUnitInput {\n businessUnitId: string;\n}\n\nexport interface AXMAddTeamToBusinessUnitResult {\n teamId: string;\n}\n\n/**\n * Opens **Team** create (`Entity:Create`), then links the new team to the given business unit via **TeamBusinessUnit**\n * (`isPrimary: true`, `effectiveFrom` = today) and optionally navigates to the team record.\n */\n@Injectable({ providedIn: 'root' })\nexport class AXMAddTeamToBusinessUnitCommand\n implements AXPCommand<AXMAddTeamToBusinessUnitInput, AXMAddTeamToBusinessUnitResult>\n{\n //#region ---- Services & Dependencies ----\n\n private readonly commandService = inject(AXPCommandService);\n private readonly entityService = inject(AXPEntityService);\n private readonly dialogService = inject(AXDialogService);\n private readonly toastService = inject(AXToastService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ---- AXPCommand ----\n\n async execute(\n input: AXMAddTeamToBusinessUnitInput,\n ): Promise<AXPExecuteCommandResult<AXMAddTeamToBusinessUnitResult>> {\n const businessUnitId = input?.businessUnitId?.trim() ?? '';\n if (!businessUnitId) {\n return { success: false };\n }\n\n const createResult = await this.commandService.execute('Entity:Create', {\n __context__: {\n entity: RootConfig.entities.team.source,\n entityInfo: {\n module: RootConfig.module.name,\n name: RootConfig.entities.team.name,\n title: RootConfig.entities.team.title,\n },\n data: {},\n options: {\n process: {\n redirect: false,\n },\n },\n },\n });\n\n if (!createResult?.success) {\n return { success: false };\n }\n\n const teamId = this.extractCreatedEntityId(createResult.data);\n if (!teamId) {\n return { success: false };\n }\n\n let linkSucceeded = false;\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.teamBusinessUnit.name)\n .data<string, AXMOrganizationManagementTeamBusinessUnitEntityModel>()\n .create({\n teamId,\n businessUnitId,\n isPrimary: true,\n effectiveFrom: this.todayLocalDateOnly(),\n });\n linkSucceeded = true;\n } catch (e) {\n const content =\n e instanceof Error\n ? e.message\n : await this.translationService.translateAsync('@general:messages.generic.error.description');\n const title = await this.translationService.translateAsync('@general:messages.generic.error.title');\n this.toastService.show({ color: 'warning', title, content });\n }\n\n if (await this.confirmOpenTeamDetails(linkSucceeded)) {\n await this.commandService.execute('Entity:OpenDetails', {\n entity: RootConfig.entities.team.source,\n data: { id: teamId },\n });\n }\n\n return { success: true, data: { teamId } };\n }\n\n //#endregion\n\n //#region ---- Helpers ----\n\n /**\n * Local calendar date as `YYYY-MM-DD` for {@link AXMOrganizationManagementTeamBusinessUnitEntityModel.effectiveFrom}.\n */\n private todayLocalDateOnly(): string {\n const d = new Date();\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, '0');\n const day = String(d.getDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n }\n\n private async confirmOpenTeamDetails(linkSucceeded: boolean): Promise<boolean> {\n const title = await this.translationService.translateAsync(\n '@organization-management:organization-chart.node-actions.navigate-to-team-after-create.title',\n );\n const messageKey = linkSucceeded\n ? '@organization-management:organization-chart.node-actions.navigate-to-team-after-create.message'\n : '@organization-management:organization-chart.node-actions.navigate-to-team-after-create.message-link-failed';\n const message = await this.translationService.translateAsync(messageKey);\n const result = await this.dialogService.confirm(title, message, 'primary', 'horizontal', false, 'cancel');\n return result.result === true;\n }\n\n private extractCreatedEntityId(data: unknown): string {\n if (data == null || typeof data !== 'object') {\n return '';\n }\n const record = data as Record<string, unknown>;\n const item = record['item'] ?? data;\n if (item == null || typeof item !== 'object') {\n return '';\n }\n const id = (item as Record<string, unknown>)['id'];\n if (typeof id === 'string') {\n return id.trim();\n }\n if (typeof id === 'number' && Number.isFinite(id)) {\n return String(id);\n }\n return '';\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;AAAA;AAsBA;;;AAGG;MAEU,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;;AAMmB,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,eAAe,CAAC;AACvC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAsHnE,IAAA;;;IAhHC,MAAM,OAAO,CACX,KAAoC,EAAA;QAEpC,MAAM,cAAc,GAAG,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE;QAC1D,IAAI,CAAC,cAAc,EAAE;AACnB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;QAC3B;QAEA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,eAAe,EAAE;AACtE,YAAA,WAAW,EAAE;AACX,gBAAA,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM;AACvC,gBAAA,UAAU,EAAE;AACV,oBAAA,MAAM,EAA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import * as i0 from '@angular/core';
2
2
  import { Injectable } from '@angular/core';
3
- import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
3
+ import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
4
4
 
5
5
  class AXMOrganizationModuleEntityProvider {
6
6
  preload() {
@@ -14,31 +14,31 @@ class AXMOrganizationModuleEntityProvider {
14
14
  if (moduleName == RootConfig.module.name) {
15
15
  switch (entityName) {
16
16
  case RootConfig.entities.company.name:
17
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.T; })).factoryCompany();
17
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.T; })).factoryCompany();
18
18
  case RootConfig.entities.businessUnitType.name:
19
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.Q; })).factoryBusinessUnitType();
19
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.Q; })).factoryBusinessUnitType();
20
20
  case RootConfig.entities.businessUnit.name:
21
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.P; })).factoryBusinessUnit();
21
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.P; })).factoryBusinessUnit();
22
22
  case RootConfig.entities.position.name:
23
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.W; })).factoryPosition();
23
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.W; })).factoryPosition();
24
24
  case RootConfig.entities.chart.name:
25
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.S; })).factoryChart();
25
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.S; })).factoryChart();
26
26
  case RootConfig.entities.team.name:
27
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.Z; })).factoryTeam();
27
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.Z; })).factoryTeam();
28
28
  case RootConfig.entities.teamMemberRole.name:
29
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.a0; })).factoryTeamMemberRole();
29
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.a0; })).factoryTeamMemberRole();
30
30
  case RootConfig.entities.teamMember.name:
31
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.$; })).factoryTeamMember();
31
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.$; })).factoryTeamMember();
32
32
  case RootConfig.entities.teamBusinessUnit.name:
33
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n._; })).factoryTeamBusinessUnit();
33
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n._; })).factoryTeamBusinessUnit();
34
34
  case RootConfig.entities.jobDefinition.name:
35
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.U; })).factoryJobDefinition();
35
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.U; })).factoryJobDefinition();
36
36
  case RootConfig.entities.responsibility.name:
37
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.X; })).factoryResponsibility();
37
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.X; })).factoryResponsibility();
38
38
  case RootConfig.entities.responsibilityLevel.name:
39
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.Y; })).factoryResponsibilityLevel();
39
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.Y; })).factoryResponsibilityLevel();
40
40
  case RootConfig.entities.jobLevel.name:
41
- return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs').then(function (n) { return n.V; })).factoryJobLevel();
41
+ return (await import('./acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs').then(function (n) { return n.V; })).factoryJobLevel();
42
42
  }
43
43
  }
44
44
  return null;
@@ -55,4 +55,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
55
55
  }] });
56
56
 
57
57
  export { AXMOrganizationModuleEntityProvider };
58
- //# sourceMappingURL=acorex-modules-organization-management-entity.provider-DKhXlL2j.mjs.map
58
+ //# sourceMappingURL=acorex-modules-organization-management-entity.provider-Buchg68Q.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-entity.provider-DKhXlL2j.mjs","sources":["../../../../libs/modules/organization-management/src/lib/entity.provider.ts"],"sourcesContent":["import { AXPEntity } from '@acorex/platform/common';\nimport { AXPEntityDefinitionLoader, AXPEntityPreloadEntity } from '@acorex/platform/layout/entity';\nimport { Injectable } from '@angular/core';\nimport { RootConfig } from './contracts';\n\n@Injectable()\nexport class AXMOrganizationModuleEntityProvider implements AXPEntityDefinitionLoader {\n public preload(): AXPEntityPreloadEntity[] {\n const module = RootConfig.module.name;\n return Array.from(Object.values(RootConfig.entities)).map((entity: any) => ({\n module: module,\n entity: entity.name,\n }));\n }\n async get(moduleName: string, entityName: string): Promise<AXPEntity | null> {\n if (moduleName == RootConfig.module.name) {\n switch (entityName) {\n case RootConfig.entities.company.name:\n return (await import('./entities/company')).factoryCompany();\n case RootConfig.entities.businessUnitType.name:\n return (await import('./entities/business-unit-type')).factoryBusinessUnitType();\n case RootConfig.entities.businessUnit.name:\n return (await import('./entities/business-unit')).factoryBusinessUnit();\n case RootConfig.entities.position.name:\n return (await import('./entities/position')).factoryPosition();\n case RootConfig.entities.chart.name:\n return (await import('./entities/chart')).factoryChart();\n case RootConfig.entities.team.name:\n return (await import('./entities/team')).factoryTeam();\n case RootConfig.entities.teamMemberRole.name:\n return (await import('./entities/team-member-role')).factoryTeamMemberRole();\n case RootConfig.entities.teamMember.name:\n return (await import('./entities/team-member')).factoryTeamMember();\n case RootConfig.entities.teamBusinessUnit.name:\n return (await import('./entities/team-business-unit')).factoryTeamBusinessUnit();\n case RootConfig.entities.jobDefinition.name:\n return (await import('./entities/job-definition')).factoryJobDefinition();\n case RootConfig.entities.responsibility.name:\n return (await import('./entities/responsibility')).factoryResponsibility();\n case RootConfig.entities.responsibilityLevel.name:\n return (await import('./entities/responsibility-level')).factoryResponsibilityLevel();\n case RootConfig.entities.jobLevel.name:\n return (await import('./entities/job-level')).factoryJobLevel();\n }\n }\n return null;\n }\n\n async list(): Promise<{ name: string; module: string }[]> {\n const m = RootConfig.module.name;\n return Promise.resolve(\n Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m }))\n );\n }\n}\n"],"names":[],"mappings":";;;;MAMa,mCAAmC,CAAA;IACvC,OAAO,GAAA;AACZ,QAAA,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;QACrC,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,MAAW,MAAM;AAC1E,YAAA,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM,CAAC,IAAI;AACpB,SAAA,CAAC,CAAC;IACL;AACA,IAAA,MAAM,GAAG,CAAC,UAAkB,EAAE,UAAkB,EAAA;QAC9C,I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BAAuB,EAAE;AAClF,gBAAA,KAAK,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI;oBACzC,OAAO,CAAC,MAAM,OAAO,8FAA2B,oCAAC,EAAE,oBAAoB,EAAE;AAC3E,gBAAA,KAAK,UAAU,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI;oBAC1C,OAAO,CAAC,MAAM,OAAO,8FAA2B,oCAAC,EAAE,qBAAqB,EAAE;AAC5E,gBAAA,KAAK,UAAU,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI;oBAC/C,OAAO,CAAC,MAAM,OAAO,8FAAiC,oCAAC,EAAE,0BAA0B,EAAE;AACvF,gBAAA,KAAK,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI;oBACpC,OAAO,CAAC,MAAM,OAAO,8FAAsB,oCAAC,EAAE,eAAe,EAAE;;QAErE;AACA,QAAA,OAAO,IAAI;IACb;AAEA,IAAA,MAAM,IAAI,GAAA;AACR,QAAA,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;AAChC,QAAA,OAAO,OAAO,CAAC,OAAO,CACpB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,CAC7E;IACH;8GA/CW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnC,mCAAmC,EAAA,CAAA,CAAA;;2FAAnC,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-entity.provider-Buchg68Q.mjs","sources":["../../../../libs/modules/organization-management/src/lib/entity.provider.ts"],"sourcesContent":["import { AXPEntity } from '@acorex/platform/common';\nimport { AXPEntityDefinitionLoader, AXPEntityPreloadEntity } from '@acorex/platform/layout/entity';\nimport { Injectable } from '@angular/core';\nimport { RootConfig } from './contracts';\n\n@Injectable()\nexport class AXMOrganizationModuleEntityProvider implements AXPEntityDefinitionLoader {\n public preload(): AXPEntityPreloadEntity[] {\n const module = RootConfig.module.name;\n return Array.from(Object.values(RootConfig.entities)).map((entity: any) => ({\n module: module,\n entity: entity.name,\n }));\n }\n async get(moduleName: string, entityName: string): Promise<AXPEntity | null> {\n if (moduleName == RootConfig.module.name) {\n switch (entityName) {\n case RootConfig.entities.company.name:\n return (await import('./entities/company')).factoryCompany();\n case RootConfig.entities.businessUnitType.name:\n return (await import('./entities/business-unit-type')).factoryBusinessUnitType();\n case RootConfig.entities.businessUnit.name:\n return (await import('./entities/business-unit')).factoryBusinessUnit();\n case RootConfig.entities.position.name:\n return (await import('./entities/position')).factoryPosition();\n case RootConfig.entities.chart.name:\n return (await import('./entities/chart')).factoryChart();\n case RootConfig.entities.team.name:\n return (await import('./entities/team')).factoryTeam();\n case RootConfig.entities.teamMemberRole.name:\n return (await import('./entities/team-member-role')).factoryTeamMemberRole();\n case RootConfig.entities.teamMember.name:\n return (await import('./entities/team-member')).factoryTeamMember();\n case RootConfig.entities.teamBusinessUnit.name:\n return (await import('./entities/team-business-unit')).factoryTeamBusinessUnit();\n case RootConfig.entities.jobDefinition.name:\n return (await import('./entities/job-definition')).factoryJobDefinition();\n case RootConfig.entities.responsibility.name:\n return (await import('./entities/responsibility')).factoryResponsibility();\n case RootConfig.entities.responsibilityLevel.name:\n return (await import('./entities/responsibility-level')).factoryResponsibilityLevel();\n case RootConfig.entities.jobLevel.name:\n return (await import('./entities/job-level')).factoryJobLevel();\n }\n }\n return null;\n }\n\n async list(): Promise<{ name: string; module: string }[]> {\n const m = RootConfig.module.name;\n return Promise.resolve(\n Object.values(RootConfig.entities).map((e) => ({ name: e.name, module: m }))\n );\n }\n}\n"],"names":[],"mappings":";;;;MAMa,mCAAmC,CAAA;IACvC,OAAO,G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8GA/CW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAnC,mCAAmC,EAAA,CAAA,CAAA;;2FAAnC,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAD/C;;;;;"}
@@ -1,4 +1,4 @@
1
- import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
1
+ import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
2
2
 
3
3
  //#region ---- Imports ----
4
4
  //#endregion
@@ -16,4 +16,4 @@ class AXPOrganizationManagementFeatureDefinitionProvider {
16
16
  //#endregion
17
17
 
18
18
  export { AXPOrganizationManagementFeatureDefinitionProvider };
19
- //# sourceMappingURL=acorex-modules-organization-management-feature-definition.provider-DhCn97pE.mjs.map
19
+ //# sourceMappingURL=acorex-modules-organization-management-feature-definition.provider-CulEun4H.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-feature-definition.provider-DhCn97pE.mjs","sources":["../../../../libs/modules/organization-management/src/lib/feature-definition.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AXPFeatureDefinitionProvider,\n AXPFeatureDefinitionProviderContext,\n} from '@acorex/platform/core';\nimport { RootConfig } from './contracts';\n\n//#endregion\n\n//#region ---- Feature Definition Provider ----\n\n/**\n * Organization Management Module Feature Definition Provider.\n * Provides feature definitions for the Organization Management module.\n */\nexport class AXPOrganizationManagementFeatureDefinitionProvider\n implements AXPFeatureDefinitionProvider {\n async provide(context: AXPFeatureDefinitionProviderContext): Promise<void> {\n const i18n = RootConfig.config.i18n;\n\n // Management feature removed - module name is used directly as feature key\n }\n}\n\n//#endregion\n\n"],"names":[],"mappings":";;AAAA;AAQA;AAEA;AAEA;;;AAGG;MACU,kDAAkD,CAAA;IAE3D,MAAM,OAAO,CAAC,OAA4C,EAAA;AACtD,QAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;;IAGvC;AACH;AAED;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-feature-definition.provider-CulEun4H.mjs","sources":["../../../../libs/modules/organization-management/src/lib/feature-definition.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AXPFeatureDefinitionProvider,\n AXPFeatureDefinitionProviderContext,\n} from '@acorex/platform/core';\nimport { RootConfig } from './contracts';\n\n//#endregion\n\n//#region ---- Feature Definition Provider ----\n\n/**\n * Organization Management Module Feature Definition Provider.\n * Provides feature definitions for the Organization Management module.\n */\nexport class AXPOrganizationManagementFeatureDefinitionProvider\n implements AXPFeatureDefinitionProvider {\n async provide(context: AXPFeatureDefinitionProviderContext): Promise<void> {\n const i18n = RootConfig.config.i18n;\n\n // Management feature removed - module name is used directly as feature key\n }\n}\n\n//#endregion\n\n"],"names":[],"mappings":";;AAAA;AAQA;AAEA;AAEA;;;AAGG;MACU,kDAAkD,CAAA;IAE3D,MAAM,OAAO,CAAC,OAA4C,EAAA;AACtD,QAAA,MAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,IAAI;;IAGvC;AACH;AAED;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable } from '@angular/core';
3
- import { J as JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY, i as JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
3
+ import { J as JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY, i as JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
4
4
 
5
5
  //#endregion
6
6
  //#region ---- Job definition entity page components provider ----
@@ -9,11 +9,11 @@ class AXMJobDefinitionPagesComponentProvider {
9
9
  return [
10
10
  {
11
11
  key: JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,
12
- loader: () => import('./acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs').then((m) => m.AXMJobDefinitionResponsibilitiesPageComponent),
12
+ loader: () => import('./acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs').then((m) => m.AXMJobDefinitionResponsibilitiesPageComponent),
13
13
  },
14
14
  {
15
15
  key: JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,
16
- loader: () => import('./acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs').then((m) => m.AXMJobDefinitionSkillsPageComponent),
16
+ loader: () => import('./acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs').then((m) => m.AXMJobDefinitionSkillsPageComponent),
17
17
  },
18
18
  ];
19
19
  }
@@ -25,4 +25,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
25
25
  }] });
26
26
 
27
27
  export { AXMJobDefinitionPagesComponentProvider };
28
- //# sourceMappingURL=acorex-modules-organization-management-job-definition-pages-component.provider-C1WFmQ2x.mjs.map
28
+ //# sourceMappingURL=acorex-modules-organization-management-job-definition-pages-component.provider-D3k2BNKU.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-job-definition-pages-component.provider-C1WFmQ2x.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/job-definition-pages/job-definition-pages-component.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex/platform/layout/components';\nimport { Injectable } from '@angular/core';\nimport {\n JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,\n JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,\n} from '../../contracts';\n\n//#endregion\n\n//#region ---- Job definition entity page components provider ----\n\n@Injectable()\nexport class AXMJobDefinitionPagesComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./job-definition-responsibilities-page.component').then(\n (m) => m.AXMJobDefinitionResponsibilitiesPageComponent,\n ),\n },\n {\n key: JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./job-definition-skills-page.component').then((m) => m.AXMJobDefinitionSkillsPageComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAYA;AAEA;MAGa,sCAAsC,CAAA;AACjD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,kDAAkD;AACvD,gBAAA,MAAM,EAAE,MACN,OAAO,sGAAkD,CAAC,CAAC,IAAI,CAC7D,CAAC,CAAC,KAAK,CAAC,CAAC,6CAA6C,CACvD;AACJ,aAAA;AACD,YAAA;AACE,gBAAA,GAAG,EAAE,wCAAwC;AAC7C,gBAAA,MAAM,EAAE,MACN,OAAO,4FAAwC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mCAAmC,CAAC;AACtG,aAAA;SACF;IACH;8GAhBW,sCAAsC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAtC,sCAAsC,EAAA,CAAA,CAAA;;2FAAtC,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBADlD;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-job-definition-pages-component.provider-D3k2BNKU.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/job-definition-pages/job-definition-pages-component.provider.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport {\n AXPPageComponentDefinition,\n AXPPageComponentProvider,\n} from '@acorex/platform/layout/components';\nimport { Injectable } from '@angular/core';\nimport {\n JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,\n JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,\n} from '../../contracts';\n\n//#endregion\n\n//#region ---- Job definition entity page components provider ----\n\n@Injectable()\nexport class AXMJobDefinitionPagesComponentProvider implements AXPPageComponentProvider {\n async components(): Promise<AXPPageComponentDefinition[]> {\n return [\n {\n key: JOB_DEFINITION_RESPONSIBILITIES_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./job-definition-responsibilities-page.component').then(\n (m) => m.AXMJobDefinitionResponsibilitiesPageComponent,\n ),\n },\n {\n key: JOB_DEFINITION_SKILLS_PAGE_COMPONENT_KEY,\n loader: () =>\n import('./job-definition-skills-page.component').then((m) => m.AXMJobDefinitionSkillsPageComponent),\n },\n ];\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;AAYA;AAEA;MAGa,sCAAsC,CAAA;AACjD,IAAA,MAAM,UAAU,GAAA;QACd,OAAO;AACL,YAAA;AACE,gBAAA,GAAG,EAAE,kDAAkD;AACvD,gBAAA,MAAM,EAAE,MACN,OAAO,sGAAkD,CAAC,CAAC,IAAI,CAC7D,CAAC,CAAC,KAAK,CAAC,CAAC,6CAA6C,CACvD;AACJ,aAAA;AACD,YAAA;AACE,gBAAA,GAAG,EAAE,wCAAwC;AAC7C,gBAAA,MAAM,EAAE,MACN,OAAO,4FAAwC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mCAAmC,CAAC;AACtG,aAAA;SACF;IACH;8GAhBW,sCAAsC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAtC,sCAAsC,EAAA,CAAA,CAAA;;2FAAtC,sCAAsC,EAAA,UAAA,EAAA,CAAA;kBADlD;;;;;"}
@@ -4,8 +4,8 @@ import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex/platform/
4
4
  import * as i0 from '@angular/core';
5
5
  import { input, inject, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
6
6
  import { cloneDeep, isEqual } from 'lodash-es';
7
- import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
8
- import { A as AXMOrganizationManagementResponsibilitiesMatrixComponent } from './acorex-modules-organization-management-responsibilities-matrix.component-DXmsR1qV.mjs';
7
+ import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
8
+ import { A as AXMOrganizationManagementResponsibilitiesMatrixComponent } from './acorex-modules-organization-management-responsibilities-matrix.component-DVlThT1h.mjs';
9
9
  import { m as mergeJobDefinitionMatrixPageContext, j as jobLevelsToSpreadsheetTitles, c as collectIdsFromSpreadsheetMatrix } from './acorex-modules-organization-management-job-definition-matrix-page.utils-DD3jLujN.mjs';
10
10
 
11
11
  //#endregion
@@ -224,4 +224,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
224
224
  }], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }] } });
225
225
 
226
226
  export { AXMJobDefinitionResponsibilitiesPageComponent };
227
- //# sourceMappingURL=acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs.map
227
+ //# sourceMappingURL=acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-job-definition-responsibilities-page.component-Bs28OWW8.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/job-definition-pages/job-definition-responsibilities-page.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommand, AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPActionMenuItem, AXPBroadcastEventService } from '@acorex/platform/core';\nimport { AXPEntityEventsKeys, AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPSpreadsheetData } from '@acorex/platform/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex/platform/layout/views';\nimport type { AXPLayoutDetailsViewAction } from '@acorex/platform/layout/views';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash-es';\nimport { RootConfig } from '../../contracts';\nimport { AXMOrganizationManagementJobDefinitionEntityModel } from '../../entities/job-definition/job-definition.types';\nimport { AXMOrganizationManagementResponsibilitiesMatrixComponent } from '../responsibilities-matrix/responsibilities-matrix.component';\nimport {\n collectIdsFromSpreadsheetMatrix,\n jobLevelsToSpreadsheetTitles,\n mergeJobDefinitionMatrixPageContext,\n} from './job-definition-matrix-page.utils';\n\n//#endregion\n\nconst JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD = 'JobDefinition:Responsibilities:Discard';\nconst JOB_DEFINITION_RESPONSIBILITIES_SAVE = 'JobDefinition:Responsibilities:Save';\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-job-definition-responsibilities-page',\n standalone: true,\n imports: [AXMOrganizationManagementResponsibilitiesMatrixComponent],\n template: `\n <axm-responsibilities-matrix\n [titles]=\"titles()\"\n [value]=\"matrixValue()\"\n [readonly]=\"false\"\n (valueChange)=\"onMatrixChange($event)\"\n />\n `,\n host: {\n class: 'ax-block ax-w-full',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMJobDefinitionResponsibilitiesPageComponent,\n },\n ],\n})\nexport class AXMJobDefinitionResponsibilitiesPageComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ---- Services ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly eventService = inject(AXPBroadcastEventService);\n private readonly hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n //#endregion\n\n //#region ---- State ----\n\n private readonly localContext = signal<Record<string, unknown> | null>(null);\n private readonly ignoreNextMatrixChange = signal(false);\n private readonly baselineMatrix = signal<AXPSpreadsheetData | null>(null);\n protected readonly isDirty = signal(false);\n\n //#endregion\n\n //#region ---- Constructor ----\n\n constructor() {\n super();\n let previousRootId: unknown = undefined;\n\n effect(() => {\n const ctx = this.rootContext();\n const currentId = ctx != null && typeof ctx === 'object' ? ctx['id'] : undefined;\n if (currentId !== previousRootId) {\n previousRootId = currentId;\n this.localContext.set(null);\n const responsibilities = ctx?.['responsibilities'];\n const base =\n responsibilities != null && typeof responsibilities === 'object'\n ? cloneDeep(responsibilities as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n }\n });\n }\n\n //#endregion\n\n //#region ---- Computed ----\n\n /** Canonical payload for matrix bindings; must be a `computed` so `titles` / `matrixValue` track inputs. */\n private readonly mergedContext = computed(() =>\n mergeJobDefinitionMatrixPageContext(this.rootContext() ?? {}, this.localContext()),\n );\n\n protected titles = computed(() =>\n jobLevelsToSpreadsheetTitles(this.mergedContext()['jobLevels'], this.translateService),\n );\n\n protected matrixValue = computed((): AXPSpreadsheetData => {\n const v = this.mergedContext()['responsibilities'];\n if (v != null && typeof v === 'object') {\n return v as AXPSpreadsheetData;\n }\n return {};\n });\n\n //#endregion\n\n //#region ---- UI handlers ----\n\n protected onMatrixChange(data: AXPSpreadsheetData): void {\n if (this.ignoreNextMatrixChange()) {\n this.ignoreNextMatrixChange.set(false);\n return;\n }\n\n const base = this.localContext() ?? this.rootContext() ?? {};\n const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(data);\n this.localContext.set({\n ...base,\n responsibilities: data,\n responsibilityLevelIds,\n });\n const baseline = this.baselineMatrix() ?? {};\n this.isDirty.set(!isEqual(baseline, data));\n this.recompute();\n }\n\n //#endregion\n\n //#region ---- Unsaved Changes ----\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n //#endregion\n\n //#region ---- Page actions ----\n\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n const discardTitle =\n (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n\n const discardAction: AXPLayoutDetailsViewAction = {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD,\n options: {},\n },\n };\n const saveAction: AXPLayoutDetailsViewAction = {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_RESPONSIBILITIES_SAVE,\n options: {},\n },\n };\n\n return [discardAction, saveAction];\n }\n\n //#endregion\n\n //#region ---- Execute ----\n\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n if (command.name === JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD) {\n this.ignoreNextMatrixChange.set(true);\n this.localContext.set(null);\n const ctx = this.rootContext() ?? {};\n const responsibilities = ctx['responsibilities'];\n const base =\n responsibilities != null && typeof responsibilities === 'object'\n ? cloneDeep(responsibilities as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n this.recompute();\n return;\n }\n\n if (command.name !== JOB_DEFINITION_RESPONSIBILITIES_SAVE) {\n return;\n }\n\n return this.persistResponsibilities() as unknown as Promise<void>;\n }\n\n private async persistResponsibilities(): Promise<AXPExecuteCommandResult> {\n const ctx = this.mergedContext();\n const id = ctx['id'];\n if (typeof id !== 'string' || id.length === 0) {\n return {\n success: false,\n message: {\n text: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const responsibilities = (ctx['responsibilities'] as AXPSpreadsheetData) ?? {};\n const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(responsibilities);\n\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.jobDefinition.name)\n .data<string, AXMOrganizationManagementJobDefinitionEntityModel>()\n .update(id, {\n responsibilities,\n responsibilityLevelIds,\n });\n\n this.baselineMatrix.set(cloneDeep(responsibilities));\n this.localContext.set(null);\n this.isDirty.set(false);\n this.recompute();\n\n this.eventService.publish(AXPEntityEventsKeys.REFRESH_LAYOUT, {\n name: `${RootConfig.module.name}.${RootConfig.entities.jobDefinition.name}`,\n });\n\n return { success: true };\n } catch (error: unknown) {\n const text =\n error instanceof Error && error.message\n ? error.message\n : (await this.translateService.translateAsync('@general:messages.entity.invalid-data')) ?? 'Save failed';\n return {\n success: false,\n message: { text },\n };\n }\n }\n\n //#endregion\n\n //#region ---- Recompute ----\n\n protected override recompute(): void {\n super.recompute();\n const layout = this.hostPageLayout as { recompute?: () => void } | null;\n layout?.recompute?.();\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;AAsBA;AAEA,MAAM,4CAA4C,GAAG,wCAAwC;AAC7F,MAAM,oCAAoC,GAAG,qCAAqC;AAElF;AAyBM,MAAO,6CAA8C,SAAQ,0BAA0B,CAAA;;;AA2B3F,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAzBT,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;QAC9C,IAAA,CAAA,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;;;AAM5B,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,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E,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC5B,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,6CAA+C;AAC3D,yBAAA;AACF,qBAAA;AACF,iBAAA;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-job-definition-responsibilities-page.component-CSwHAkh5.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/job-definition-pages/job-definition-responsibilities-page.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommand, AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPActionMenuItem, AXPBroadcastEventService } from '@acorex/platform/core';\nimport { AXPEntityEventsKeys, AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPSpreadsheetData } from '@acorex/platform/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex/platform/layout/views';\nimport type { AXPLayoutDetailsViewAction } from '@acorex/platform/layout/views';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash-es';\nimport { RootConfig } from '../../contracts';\nimport { AXMOrganizationManagementJobDefinitionEntityModel } from '../../entities/job-definition/job-definition.types';\nimport { AXMOrganizationManagementResponsibilitiesMatrixComponent } from '../responsibilities-matrix/responsibilities-matrix.component';\nimport {\n collectIdsFromSpreadsheetMatrix,\n jobLevelsToSpreadsheetTitles,\n mergeJobDefinitionMatrixPageContext,\n} from './job-definition-matrix-page.utils';\n\n//#endregion\n\nconst JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD = 'JobDefinition:Responsibilities:Discard';\nconst JOB_DEFINITION_RESPONSIBILITIES_SAVE = 'JobDefinition:Responsibilities:Save';\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-job-definition-responsibilities-page',\n standalone: true,\n imports: [AXMOrganizationManagementResponsibilitiesMatrixComponent],\n template: `\n <axm-responsibilities-matrix\n [titles]=\"titles()\"\n [value]=\"matrixValue()\"\n [readonly]=\"false\"\n (valueChange)=\"onMatrixChange($event)\"\n />\n `,\n host: {\n class: 'ax-block ax-w-full',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMJobDefinitionResponsibilitiesPageComponent,\n },\n ],\n})\nexport class AXMJobDefinitionResponsibilitiesPageComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ---- Services ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly eventService = inject(AXPBroadcastEventService);\n private readonly hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n //#endregion\n\n //#region ---- State ----\n\n private readonly localContext = signal<Record<string, unknown> | null>(null);\n private readonly ignoreNextMatrixChange = signal(false);\n private readonly baselineMatrix = signal<AXPSpreadsheetData | null>(null);\n protected readonly isDirty = signal(false);\n\n //#endregion\n\n //#region ---- Constructor ----\n\n constructor() {\n super();\n let previousRootId: unknown = undefined;\n\n effect(() => {\n const ctx = this.rootContext();\n const currentId = ctx != null && typeof ctx === 'object' ? ctx['id'] : undefined;\n if (currentId !== previousRootId) {\n previousRootId = currentId;\n this.localContext.set(null);\n const responsibilities = ctx?.['responsibilities'];\n const base =\n responsibilities != null && typeof responsibilities === 'object'\n ? cloneDeep(responsibilities as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n }\n });\n }\n\n //#endregion\n\n //#region ---- Computed ----\n\n /** Canonical payload for matrix bindings; must be a `computed` so `titles` / `matrixValue` track inputs. */\n private readonly mergedContext = computed(() =>\n mergeJobDefinitionMatrixPageContext(this.rootContext() ?? {}, this.localContext()),\n );\n\n protected titles = computed(() =>\n jobLevelsToSpreadsheetTitles(this.mergedContext()['jobLevels'], this.translateService),\n );\n\n protected matrixValue = computed((): AXPSpreadsheetData => {\n const v = this.mergedContext()['responsibilities'];\n if (v != null && typeof v === 'object') {\n return v as AXPSpreadsheetData;\n }\n return {};\n });\n\n //#endregion\n\n //#region ---- UI handlers ----\n\n protected onMatrixChange(data: AXPSpreadsheetData): void {\n if (this.ignoreNextMatrixChange()) {\n this.ignoreNextMatrixChange.set(false);\n return;\n }\n\n const base = this.localContext() ?? this.rootContext() ?? {};\n const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(data);\n this.localContext.set({\n ...base,\n responsibilities: data,\n responsibilityLevelIds,\n });\n const baseline = this.baselineMatrix() ?? {};\n this.isDirty.set(!isEqual(baseline, data));\n this.recompute();\n }\n\n //#endregion\n\n //#region ---- Unsaved Changes ----\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n //#endregion\n\n //#region ---- Page actions ----\n\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n const discardTitle =\n (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n\n const discardAction: AXPLayoutDetailsViewAction = {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD,\n options: {},\n },\n };\n const saveAction: AXPLayoutDetailsViewAction = {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_RESPONSIBILITIES_SAVE,\n options: {},\n },\n };\n\n return [discardAction, saveAction];\n }\n\n //#endregion\n\n //#region ---- Execute ----\n\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n if (command.name === JOB_DEFINITION_RESPONSIBILITIES_PAGE_DISCARD) {\n this.ignoreNextMatrixChange.set(true);\n this.localContext.set(null);\n const ctx = this.rootContext() ?? {};\n const responsibilities = ctx['responsibilities'];\n const base =\n responsibilities != null && typeof responsibilities === 'object'\n ? cloneDeep(responsibilities as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n this.recompute();\n return;\n }\n\n if (command.name !== JOB_DEFINITION_RESPONSIBILITIES_SAVE) {\n return;\n }\n\n return this.persistResponsibilities() as unknown as Promise<void>;\n }\n\n private async persistResponsibilities(): Promise<AXPExecuteCommandResult> {\n const ctx = this.mergedContext();\n const id = ctx['id'];\n if (typeof id !== 'string' || id.length === 0) {\n return {\n success: false,\n message: {\n text: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const responsibilities = (ctx['responsibilities'] as AXPSpreadsheetData) ?? {};\n const responsibilityLevelIds = collectIdsFromSpreadsheetMatrix(responsibilities);\n\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.jobDefinition.name)\n .data<string, AXMOrganizationManagementJobDefinitionEntityModel>()\n .update(id, {\n responsibilities,\n responsibilityLevelIds,\n });\n\n this.baselineMatrix.set(cloneDeep(responsibilities));\n this.localContext.set(null);\n this.isDirty.set(false);\n this.recompute();\n\n this.eventService.publish(AXPEntityEventsKeys.REFRESH_LAYOUT, {\n name: `${RootConfig.module.name}.${RootConfig.entities.jobDefinition.name}`,\n });\n\n return { success: true };\n } catch (error: unknown) {\n const text =\n error instanceof Error && error.message\n ? error.message\n : (await this.translateService.translateAsync('@general:messages.entity.invalid-data')) ?? 'Save failed';\n return {\n success: false,\n message: { text },\n };\n }\n }\n\n //#endregion\n\n //#region ---- Recompute ----\n\n protected override recompute(): void {\n super.recompute();\n const layout = this.hostPageLayout as { recompute?: () => void } | null;\n layout?.recompute?.();\n }\n\n //#endregion\n}\n"],"names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AA,EAAA,EAAA,EAAA,QAAA,EAjBS;;;;;;;AAOT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EARS,wDAAwD,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,mBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,YAAA,EAAA,yBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAoBvD,6CAA6C,EAAA,UAAA,EAAA,CAAA;kBAvBzD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,0CAA0C;AACpD,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,wDAAwD,CAAC;AACnE,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC5B,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,6CAA+C;AAC3D,yBAAA;AACF,qBAAA;AACF,iBAAA;;;;;"}
@@ -5,7 +5,7 @@ import { AXPPageLayoutBaseComponent, AXPPageLayoutBase } from '@acorex/platform/
5
5
  import * as i0 from '@angular/core';
6
6
  import { input, inject, signal, computed, effect, ChangeDetectionStrategy, Component } from '@angular/core';
7
7
  import { cloneDeep, isEqual } from 'lodash-es';
8
- import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-B6zOrUAS.mjs';
8
+ import { R as RootConfig } from './acorex-modules-organization-management-acorex-modules-organization-management-BjKrMO_L.mjs';
9
9
  import { m as mergeJobDefinitionMatrixPageContext, j as jobLevelsToSpreadsheetTitles } from './acorex-modules-organization-management-job-definition-matrix-page.utils-DD3jLujN.mjs';
10
10
 
11
11
  //#endregion
@@ -220,4 +220,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
220
220
  }], ctorParameters: () => [], propDecorators: { rootContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "rootContext", required: false }] }], pageConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "pageConfig", required: false }] }] } });
221
221
 
222
222
  export { AXMJobDefinitionSkillsPageComponent };
223
- //# sourceMappingURL=acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs.map
223
+ //# sourceMappingURL=acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-modules-organization-management-job-definition-skills-page.component-C66FEcxc.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/job-definition-pages/job-definition-skills-page.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommand, AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPActionMenuItem, AXPBroadcastEventService } from '@acorex/platform/core';\nimport { AXMLearningManagementSkillMatrixComponent } from '@acorex/modules/learning-management';\nimport { AXPEntityEventsKeys, AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPSpreadsheetData } from '@acorex/platform/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex/platform/layout/views';\nimport type { AXPLayoutDetailsViewAction } from '@acorex/platform/layout/views';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash-es';\nimport { RootConfig } from '../../contracts';\nimport { AXMOrganizationManagementJobDefinitionEntityModel } from '../../entities/job-definition/job-definition.types';\nimport { jobLevelsToSpreadsheetTitles, mergeJobDefinitionMatrixPageContext } from './job-definition-matrix-page.utils';\n\n//#endregion\n\nconst JOB_DEFINITION_SKILLS_PAGE_DISCARD = 'JobDefinition:Skills:Discard';\nconst JOB_DEFINITION_SKILLS_SAVE = 'JobDefinition:Skills:Save';\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-job-definition-skills-page',\n standalone: true,\n imports: [AXMLearningManagementSkillMatrixComponent],\n template: `\n <axm-skill-matrix\n [titles]=\"titles()\"\n [value]=\"matrixValue()\"\n [readonly]=\"false\"\n (valueChange)=\"onMatrixChange($event)\"\n />\n `,\n host: {\n class: 'ax-block ax-w-full',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMJobDefinitionSkillsPageComponent,\n },\n ],\n})\nexport class AXMJobDefinitionSkillsPageComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ---- Services ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly eventService = inject(AXPBroadcastEventService);\n private readonly hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n //#endregion\n\n //#region ---- State ----\n\n private readonly localContext = signal<Record<string, unknown> | null>(null);\n private readonly ignoreNextMatrixChange = signal(false);\n private readonly baselineMatrix = signal<AXPSpreadsheetData | null>(null);\n protected readonly isDirty = signal(false);\n\n //#endregion\n\n //#region ---- Constructor ----\n\n constructor() {\n super();\n let previousRootId: unknown = undefined;\n\n effect(() => {\n const ctx = this.rootContext();\n const currentId = ctx != null && typeof ctx === 'object' ? ctx['id'] : undefined;\n if (currentId !== previousRootId) {\n previousRootId = currentId;\n this.localContext.set(null);\n const skillRequirements = ctx?.['skillRequirements'];\n const base =\n skillRequirements != null && typeof skillRequirements === 'object'\n ? cloneDeep(skillRequirements as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n }\n });\n }\n\n //#endregion\n\n //#region ---- Computed ----\n\n /** Canonical payload for matrix bindings; must be a `computed` so `titles` / `matrixValue` track inputs. */\n private readonly mergedContext = computed(() =>\n mergeJobDefinitionMatrixPageContext(this.rootContext() ?? {}, this.localContext()),\n );\n\n protected titles = computed(() =>\n jobLevelsToSpreadsheetTitles(this.mergedContext()['jobLevels'], this.translateService),\n );\n\n protected matrixValue = computed((): AXPSpreadsheetData => {\n const v = this.mergedContext()['skillRequirements'];\n if (v != null && typeof v === 'object') {\n return v as AXPSpreadsheetData;\n }\n return {};\n });\n\n //#endregion\n\n //#region ---- UI handlers ----\n\n protected onMatrixChange(data: AXPSpreadsheetData): void {\n if (this.ignoreNextMatrixChange()) {\n this.ignoreNextMatrixChange.set(false);\n return;\n }\n\n const base = this.localContext() ?? this.rootContext() ?? {};\n this.localContext.set({\n ...base,\n skillRequirements: data,\n });\n const baseline = this.baselineMatrix() ?? {};\n this.isDirty.set(!isEqual(baseline, data));\n this.recompute();\n }\n\n //#endregion\n\n //#region ---- Unsaved Changes ----\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n //#endregion\n\n //#region ---- Page actions ----\n\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n const discardTitle =\n (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n\n const discardAction: AXPLayoutDetailsViewAction = {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_SKILLS_PAGE_DISCARD,\n options: {},\n },\n };\n const saveAction: AXPLayoutDetailsViewAction = {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_SKILLS_SAVE,\n options: {},\n },\n };\n\n return [discardAction, saveAction];\n }\n\n //#endregion\n\n //#region ---- Execute ----\n\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n if (command.name === JOB_DEFINITION_SKILLS_PAGE_DISCARD) {\n this.ignoreNextMatrixChange.set(true);\n this.localContext.set(null);\n const ctx = this.rootContext() ?? {};\n const skillRequirements = ctx['skillRequirements'];\n const base =\n skillRequirements != null && typeof skillRequirements === 'object'\n ? cloneDeep(skillRequirements as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n this.recompute();\n return;\n }\n\n if (command.name !== JOB_DEFINITION_SKILLS_SAVE) {\n return;\n }\n\n return this.persistSkills() as unknown as Promise<void>;\n }\n\n private async persistSkills(): Promise<AXPExecuteCommandResult> {\n const ctx = this.mergedContext();\n const id = ctx['id'];\n if (typeof id !== 'string' || id.length === 0) {\n return {\n success: false,\n message: {\n text: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const skillRequirements = (ctx['skillRequirements'] as AXPSpreadsheetData) ?? {};\n\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.jobDefinition.name)\n .data<string, AXMOrganizationManagementJobDefinitionEntityModel>()\n .update(id, {\n skillRequirements,\n });\n\n this.baselineMatrix.set(cloneDeep(skillRequirements));\n this.localContext.set(null);\n this.isDirty.set(false);\n this.recompute();\n\n this.eventService.publish(AXPEntityEventsKeys.REFRESH_LAYOUT, {\n name: `${RootConfig.module.name}.${RootConfig.entities.jobDefinition.name}`,\n });\n\n return { success: true };\n } catch (error: unknown) {\n const text =\n error instanceof Error && error.message\n ? error.message\n : (await this.translateService.translateAsync('@general:messages.entity.invalid-data')) ?? 'Save failed';\n return {\n success: false,\n message: { text },\n };\n }\n }\n\n //#endregion\n\n //#region ---- Recompute ----\n\n protected override recompute(): void {\n super.recompute();\n const layout = this.hostPageLayout as { recompute?: () => void } | null;\n layout?.recompute?.();\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;AAkBA;AAEA,MAAM,kCA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AA,QAAA,EAAA,OAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,EAAA,YAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAoBxC,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAvB/C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gCAAgC;AAC1C,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,yCAAyC,CAAC;AACpD,oBAAA,QAAQ,EAAE;;;;;;;AAOT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,oBAAoB;AAC5B,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAA,mCAAqC;AACjD,yBAAA;AACF,qBAAA;AACF,iBAAA;;;;;"}
1
+ {"version":3,"file":"acorex-modules-organization-management-job-definition-skills-page.component-CVo37Mx0.mjs","sources":["../../../../libs/modules/organization-management/src/lib/features/job-definition-pages/job-definition-skills-page.component.ts"],"sourcesContent":["//#region ---- Imports ----\n\nimport { AXPExecuteCommand, AXPExecuteCommandResult } from '@acorex/platform/contracts';\nimport { AXPActionMenuItem, AXPBroadcastEventService } from '@acorex/platform/core';\nimport { AXMLearningManagementSkillMatrixComponent } from '@acorex/modules/learning-management';\nimport { AXPEntityEventsKeys, AXPEntityService } from '@acorex/platform/layout/entity';\nimport { AXPSpreadsheetData } from '@acorex/platform/layout/components';\nimport {\n AXPPageLayoutBase,\n AXPPageLayoutBaseComponent,\n} from '@acorex/platform/layout/views';\nimport type { AXPLayoutDetailsViewAction } from '@acorex/platform/layout/views';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep, isEqual } from 'lodash-es';\nimport { RootConfig } from '../../contracts';\nimport { AXMOrganizationManagementJobDefinitionEntityModel } from '../../entities/job-definition/job-definition.types';\nimport { jobLevelsToSpreadsheetTitles, mergeJobDefinitionMatrixPageContext } from './job-definition-matrix-page.utils';\n\n//#endregion\n\nconst JOB_DEFINITION_SKILLS_PAGE_DISCARD = 'JobDefinition:Skills:Discard';\nconst JOB_DEFINITION_SKILLS_SAVE = 'JobDefinition:Skills:Save';\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-job-definition-skills-page',\n standalone: true,\n imports: [AXMLearningManagementSkillMatrixComponent],\n template: `\n <axm-skill-matrix\n [titles]=\"titles()\"\n [value]=\"matrixValue()\"\n [readonly]=\"false\"\n (valueChange)=\"onMatrixChange($event)\"\n />\n `,\n host: {\n class: 'ax-block ax-w-full',\n },\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AXPPageLayoutBase,\n useExisting: AXMJobDefinitionSkillsPageComponent,\n },\n ],\n})\nexport class AXMJobDefinitionSkillsPageComponent extends AXPPageLayoutBaseComponent {\n //#region ---- Inputs ----\n\n rootContext = input<Record<string, unknown>>();\n pageConfig = input<Record<string, unknown>>();\n\n //#endregion\n\n //#region ---- Services ----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly eventService = inject(AXPBroadcastEventService);\n private readonly hostPageLayout = inject(AXPPageLayoutBase, { optional: true, skipSelf: true });\n\n //#endregion\n\n //#region ---- State ----\n\n private readonly localContext = signal<Record<string, unknown> | null>(null);\n private readonly ignoreNextMatrixChange = signal(false);\n private readonly baselineMatrix = signal<AXPSpreadsheetData | null>(null);\n protected readonly isDirty = signal(false);\n\n //#endregion\n\n //#region ---- Constructor ----\n\n constructor() {\n super();\n let previousRootId: unknown = undefined;\n\n effect(() => {\n const ctx = this.rootContext();\n const currentId = ctx != null && typeof ctx === 'object' ? ctx['id'] : undefined;\n if (currentId !== previousRootId) {\n previousRootId = currentId;\n this.localContext.set(null);\n const skillRequirements = ctx?.['skillRequirements'];\n const base =\n skillRequirements != null && typeof skillRequirements === 'object'\n ? cloneDeep(skillRequirements as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n }\n });\n }\n\n //#endregion\n\n //#region ---- Computed ----\n\n /** Canonical payload for matrix bindings; must be a `computed` so `titles` / `matrixValue` track inputs. */\n private readonly mergedContext = computed(() =>\n mergeJobDefinitionMatrixPageContext(this.rootContext() ?? {}, this.localContext()),\n );\n\n protected titles = computed(() =>\n jobLevelsToSpreadsheetTitles(this.mergedContext()['jobLevels'], this.translateService),\n );\n\n protected matrixValue = computed((): AXPSpreadsheetData => {\n const v = this.mergedContext()['skillRequirements'];\n if (v != null && typeof v === 'object') {\n return v as AXPSpreadsheetData;\n }\n return {};\n });\n\n //#endregion\n\n //#region ---- UI handlers ----\n\n protected onMatrixChange(data: AXPSpreadsheetData): void {\n if (this.ignoreNextMatrixChange()) {\n this.ignoreNextMatrixChange.set(false);\n return;\n }\n\n const base = this.localContext() ?? this.rootContext() ?? {};\n this.localContext.set({\n ...base,\n skillRequirements: data,\n });\n const baseline = this.baselineMatrix() ?? {};\n this.isDirty.set(!isEqual(baseline, data));\n this.recompute();\n }\n\n //#endregion\n\n //#region ---- Unsaved Changes ----\n\n override hasUnsavedChanges(): boolean {\n return this.isDirty();\n }\n\n //#endregion\n\n //#region ---- Page actions ----\n\n override async getPrimaryMenuItems(): Promise<AXPActionMenuItem[]> {\n const discardTitle =\n (await this.translateService.translateAsync('@general:actions.discard.title')) || 'Discard';\n const saveTitle = (await this.translateService.translateAsync('@general:actions.save.title')) || 'Save';\n\n const discardAction: AXPLayoutDetailsViewAction = {\n title: discardTitle,\n icon: 'fa-light fa-rotate-left',\n zone: 'footer',\n priority: 'secondary',\n color: 'default',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_SKILLS_PAGE_DISCARD,\n options: {},\n },\n };\n const saveAction: AXPLayoutDetailsViewAction = {\n title: saveTitle,\n icon: 'fa-light fa-floppy-disk',\n zone: 'footer',\n priority: 'primary',\n color: 'primary',\n visible: this.isDirty(),\n command: {\n name: JOB_DEFINITION_SKILLS_SAVE,\n options: {},\n },\n };\n\n return [discardAction, saveAction];\n }\n\n //#endregion\n\n //#region ---- Execute ----\n\n override execute(command: AXPExecuteCommand): void | Promise<void> {\n if (command.name === JOB_DEFINITION_SKILLS_PAGE_DISCARD) {\n this.ignoreNextMatrixChange.set(true);\n this.localContext.set(null);\n const ctx = this.rootContext() ?? {};\n const skillRequirements = ctx['skillRequirements'];\n const base =\n skillRequirements != null && typeof skillRequirements === 'object'\n ? cloneDeep(skillRequirements as AXPSpreadsheetData)\n : {};\n this.baselineMatrix.set(base);\n this.isDirty.set(false);\n this.recompute();\n return;\n }\n\n if (command.name !== JOB_DEFINITION_SKILLS_SAVE) {\n return;\n }\n\n return this.persistSkills() as unknown as Promise<void>;\n }\n\n private async persistSkills(): Promise<AXPExecuteCommandResult> {\n const ctx = this.mergedContext();\n const id = ctx['id'];\n if (typeof id !== 'string' || id.length === 0) {\n return {\n success: false,\n message: {\n text: await this.translateService.translateAsync('@general:messages.entity.invalid-data'),\n },\n };\n }\n\n const skillRequirements = (ctx['skillRequirements'] as AXPSpreadsheetData) ?? {};\n\n try {\n await this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.jobDefinition.name)\n .data<string, AXMOrganizationManagementJobDefinitionEntityModel>()\n .update(id, {\n skillRequirements,\n });\n\n this.baselineMatrix.set(cloneDeep(skillRequirements));\n this.localContext.set(null);\n this.isDirty.set(false);\n this.recompute();\n\n this.eventService.publish(AXPEntityEventsKeys.REFRESH_LAYOUT, {\n name: `${RootConfig.module.name}.${RootConfig.entities.jobDefinition.name}`,\n });\n\n return { success: true };\n } catch (error: unknown) {\n const text =\n error instanceof Error && error.message\n ? error.message\n : (await this.translateService.translateAsync('@general:messages.entity.invalid-data')) ?? 'Save failed';\n return {\n success: false,\n message: { text },\n };\n }\n }\n\n //#endregion\n\n //#region ---- Recompute ----\n\n protected override recompute(): void {\n super.recompute();\n const layout = this.hostPageLayout as { recompute?: () => void } | null;\n layout?.recompute?.();\n }\n\n //#endregion\n}\n"],"names":[],"mappings":";;;;;;;;;;AAkBA;AAEA,MAAM,kCAAkC,GAAG,8BAA8B;AACzE,MAAM,0BAA0B,GAAG,2BAA2B;AAE9D;AAyBM,MAAO,mCAAoC,SAAQ,0BAA0B,CAAA;;;AA2BjF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;;QAzBT,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;QAC9C,IAAA,CAAA,UAAU,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,YAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAA2B;;;AAM5B,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,wBAAwB,CAAC;AAC/C,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;;AAM9E,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAiC,IAAI,mFAAC;AAC3D,QAAA,IAAA,CAAA,sBAAsB,GAAG,MAAM,CAAC,KAAK,6FAAC;AACtC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAA4B,IAAI,qFAAC;AACtD,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,KAAK,8EAAC;;;;QAgCzB,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MACxC,mCAAmC,CAAC,IAAI,CAAC,WAAW,EAA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