@acorex/modules 20.7.12 → 20.7.15

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 (194) hide show
  1. package/application-management/index.d.ts +1 -1
  2. package/assessment-management/README.md +11 -0
  3. package/assessment-management/index.d.ts +122 -24
  4. package/auth/index.d.ts +1 -1
  5. package/common/index.d.ts +9 -3
  6. package/contact-core/index.d.ts +90 -0
  7. package/content-management/index.d.ts +2 -2
  8. package/data-management/index.d.ts +449 -7
  9. package/document-management/index.d.ts +170 -375
  10. package/fesm2022/acorex-modules-application-management.mjs +3 -3
  11. package/fesm2022/acorex-modules-application-management.mjs.map +1 -1
  12. package/fesm2022/{acorex-modules-assessment-management-acorex-modules-assessment-management-ClgGS32i.mjs → acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs} +950 -468
  13. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-HgaOIA2U.mjs.map +1 -0
  14. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-UmXUT6Xn.mjs → acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs} +2 -2
  15. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-column.component-UmXUT6Xn.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-column.component-DyxE9Xec.mjs.map} +1 -1
  16. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-vVfXtden.mjs → acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs} +2 -2
  17. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-edit.component-vVfXtden.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-edit.component-DC2Ep3r1.mjs.map} +1 -1
  18. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C75zxKgV.mjs → acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs} +2 -2
  19. package/fesm2022/{acorex-modules-assessment-management-answers-viewer-widget-view.component-C75zxKgV.mjs.map → acorex-modules-assessment-management-answers-viewer-widget-view.component-iKqac5PE.mjs.map} +1 -1
  20. package/fesm2022/{acorex-modules-assessment-management-assessment-case.entity-CjhC5YAF.mjs → acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs} +3 -3
  21. package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-CsCMlcvF.mjs.map +1 -0
  22. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-B_IDiEzp.mjs → acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs} +2 -2
  23. package/fesm2022/{acorex-modules-assessment-management-assessment-session.entity-B_IDiEzp.mjs.map → acorex-modules-assessment-management-assessment-session.entity-BkNVe3FO.mjs.map} +1 -1
  24. package/fesm2022/{acorex-modules-assessment-management-fill-assessment-session.command-zT5u3h_s.mjs → acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs} +32 -33
  25. package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-Dgeh3E5f.mjs.map +1 -0
  26. package/fesm2022/{acorex-modules-assessment-management-preview-questionnaire.command-BIXy9eut.mjs → acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs} +24 -8
  27. package/fesm2022/acorex-modules-assessment-management-preview-questionnaire.command-NcZlE6DU.mjs.map +1 -0
  28. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-BWYLXvCp.mjs → acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs} +2 -2
  29. package/fesm2022/{acorex-modules-assessment-management-question-bank-item.entity-BWYLXvCp.mjs.map → acorex-modules-assessment-management-question-bank-item.entity-vNxSmJuv.mjs.map} +1 -1
  30. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-edit.component-3wVcKQGE.mjs → acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs} +20 -4
  31. package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-edit.component-CbfHOFT1.mjs.map +1 -0
  32. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder-view.component-meuUo7Vx.mjs → acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs} +3 -3
  33. package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-view.component-DDqDjzwH.mjs.map +1 -0
  34. package/fesm2022/{acorex-modules-assessment-management-questionnaire-builder.component-CGgUUkOY.mjs → acorex-modules-assessment-management-questionnaire-builder.component-BOnwdWj7.mjs} +11 -5
  35. package/fesm2022/acorex-modules-assessment-management-questionnaire-builder.component-BOnwdWj7.mjs.map +1 -0
  36. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-BX8Q2Kfn.mjs +392 -0
  37. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-BX8Q2Kfn.mjs.map +1 -0
  38. package/fesm2022/{acorex-modules-assessment-management-questionnaire-viewer.service-D3k3J93r.mjs → acorex-modules-assessment-management-questionnaire-viewer.service-CSdVNxV2.mjs} +21 -6
  39. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer.service-CSdVNxV2.mjs.map +1 -0
  40. package/fesm2022/{acorex-modules-assessment-management-questionnaire.entity-C8sX0d_p.mjs → acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs} +138 -23
  41. package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-DFQIvlza.mjs.map +1 -0
  42. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-Czq7cj9R.mjs → acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs} +3 -3
  43. package/fesm2022/{acorex-modules-assessment-management-view-session-answers.command-Czq7cj9R.mjs.map → acorex-modules-assessment-management-view-session-answers.command-CMmE72Kt.mjs.map} +1 -1
  44. package/fesm2022/acorex-modules-assessment-management.mjs +1 -1
  45. package/fesm2022/{acorex-modules-auth-acorex-modules-auth-IIyirCLb.mjs → acorex-modules-auth-acorex-modules-auth-CZuDhBx5.mjs} +18 -18
  46. package/fesm2022/acorex-modules-auth-acorex-modules-auth-CZuDhBx5.mjs.map +1 -0
  47. package/fesm2022/{acorex-modules-auth-app-chooser.component-BGLW8Qtn.mjs → acorex-modules-auth-app-chooser.component-DJE47I8p.mjs} +2 -2
  48. package/fesm2022/{acorex-modules-auth-app-chooser.component-BGLW8Qtn.mjs.map → acorex-modules-auth-app-chooser.component-DJE47I8p.mjs.map} +1 -1
  49. package/fesm2022/{acorex-modules-auth-login.module-uUQkWCgY.mjs → acorex-modules-auth-login.module-CI_lkyb7.mjs} +4 -4
  50. package/fesm2022/{acorex-modules-auth-login.module-uUQkWCgY.mjs.map → acorex-modules-auth-login.module-CI_lkyb7.mjs.map} +1 -1
  51. package/fesm2022/{acorex-modules-auth-master.layout-XkwT3Slv.mjs → acorex-modules-auth-master.layout-CdY380qS.mjs} +5 -4
  52. package/fesm2022/acorex-modules-auth-master.layout-CdY380qS.mjs.map +1 -0
  53. package/fesm2022/{acorex-modules-auth-oauth-callback.component-C0p17V1b.mjs → acorex-modules-auth-oauth-callback.component-BvPk9b3e.mjs} +2 -2
  54. package/fesm2022/{acorex-modules-auth-oauth-callback.component-C0p17V1b.mjs.map → acorex-modules-auth-oauth-callback.component-BvPk9b3e.mjs.map} +1 -1
  55. package/fesm2022/{acorex-modules-auth-password.component-CaH-OaIv.mjs → acorex-modules-auth-password.component-CefISnvd.mjs} +2 -2
  56. package/fesm2022/{acorex-modules-auth-password.component-CaH-OaIv.mjs.map → acorex-modules-auth-password.component-CefISnvd.mjs.map} +1 -1
  57. package/fesm2022/{acorex-modules-auth-password.component-DDFOsrkt.mjs → acorex-modules-auth-password.component-Dw_v_EFQ.mjs} +2 -2
  58. package/fesm2022/{acorex-modules-auth-password.component-DDFOsrkt.mjs.map → acorex-modules-auth-password.component-Dw_v_EFQ.mjs.map} +1 -1
  59. package/fesm2022/{acorex-modules-auth-routes-Cik9Y3RJ.mjs → acorex-modules-auth-routes-CwcJHbAi.mjs} +2 -2
  60. package/fesm2022/{acorex-modules-auth-routes-Cik9Y3RJ.mjs.map → acorex-modules-auth-routes-CwcJHbAi.mjs.map} +1 -1
  61. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-B9VJd12P.mjs → acorex-modules-auth-tenant-chooser.component-DFhTYEDt.mjs} +2 -2
  62. package/fesm2022/{acorex-modules-auth-tenant-chooser.component-B9VJd12P.mjs.map → acorex-modules-auth-tenant-chooser.component-DFhTYEDt.mjs.map} +1 -1
  63. package/fesm2022/{acorex-modules-auth-two-factor.module-D1TKyIXZ.mjs → acorex-modules-auth-two-factor.module-BOZB6sLo.mjs} +2 -2
  64. package/fesm2022/{acorex-modules-auth-two-factor.module-D1TKyIXZ.mjs.map → acorex-modules-auth-two-factor.module-BOZB6sLo.mjs.map} +1 -1
  65. package/fesm2022/{acorex-modules-auth-user-sessions.component-MZJramlf.mjs → acorex-modules-auth-user-sessions.component-BnrnXg4G.mjs} +2 -2
  66. package/fesm2022/{acorex-modules-auth-user-sessions.component-MZJramlf.mjs.map → acorex-modules-auth-user-sessions.component-BnrnXg4G.mjs.map} +1 -1
  67. package/fesm2022/acorex-modules-auth.mjs +1 -1
  68. package/fesm2022/acorex-modules-calendar-management.mjs +4 -3
  69. package/fesm2022/acorex-modules-calendar-management.mjs.map +1 -1
  70. package/fesm2022/acorex-modules-common.mjs +77 -36
  71. package/fesm2022/acorex-modules-common.mjs.map +1 -1
  72. package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs +318 -0
  73. package/fesm2022/acorex-modules-contact-core-emergency-service.entity-Cro3bM4G.mjs.map +1 -0
  74. package/fesm2022/acorex-modules-contact-core.mjs +247 -0
  75. package/fesm2022/acorex-modules-contact-core.mjs.map +1 -0
  76. package/fesm2022/acorex-modules-content-management.mjs +66 -19
  77. package/fesm2022/acorex-modules-content-management.mjs.map +1 -1
  78. package/fesm2022/acorex-modules-data-management.mjs +1009 -501
  79. package/fesm2022/acorex-modules-data-management.mjs.map +1 -1
  80. package/fesm2022/{acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs → acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs} +3 -7
  81. package/fesm2022/acorex-modules-document-management-drive-choose.component-BOeZ9mpL.mjs.map +1 -0
  82. package/fesm2022/acorex-modules-document-management.mjs +986 -3041
  83. package/fesm2022/acorex-modules-document-management.mjs.map +1 -1
  84. package/fesm2022/acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs +65 -0
  85. package/fesm2022/acorex-modules-health-core-allergy-type.entity-BaZ4OhHW.mjs.map +1 -0
  86. package/fesm2022/acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs +120 -0
  87. package/fesm2022/acorex-modules-health-core-blood-type.entity-Cu-UIgw4.mjs.map +1 -0
  88. package/fesm2022/acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs +65 -0
  89. package/fesm2022/acorex-modules-health-core-body-part.entity-Dc2SIiB3.mjs.map +1 -0
  90. package/fesm2022/acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs +65 -0
  91. package/fesm2022/acorex-modules-health-core-chronic-condition-type.entity-B-9j3pNB.mjs.map +1 -0
  92. package/fesm2022/acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs +120 -0
  93. package/fesm2022/acorex-modules-health-core-disability-status.entity-hs3vA3zZ.mjs.map +1 -0
  94. package/fesm2022/acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs +65 -0
  95. package/fesm2022/acorex-modules-health-core-injury-type.entity-BUA1VsE_.mjs.map +1 -0
  96. package/fesm2022/acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs +65 -0
  97. package/fesm2022/acorex-modules-health-core-vaccination-type.entity-DBdFkwx6.mjs.map +1 -0
  98. package/fesm2022/acorex-modules-health-core.mjs +487 -0
  99. package/fesm2022/acorex-modules-health-core.mjs.map +1 -0
  100. package/fesm2022/{acorex-modules-help-desk-acorex-modules-help-desk-Clea9Hhv.mjs → acorex-modules-help-desk-acorex-modules-help-desk-MfqQx2iN.mjs} +4 -5
  101. package/fesm2022/{acorex-modules-help-desk-acorex-modules-help-desk-Clea9Hhv.mjs.map → acorex-modules-help-desk-acorex-modules-help-desk-MfqQx2iN.mjs.map} +1 -1
  102. package/fesm2022/{acorex-modules-help-desk-capture-screen.component-CiQv__MW.mjs → acorex-modules-help-desk-capture-screen.component-CATwc3fe.mjs} +2 -2
  103. package/fesm2022/{acorex-modules-help-desk-capture-screen.component-CiQv__MW.mjs.map → acorex-modules-help-desk-capture-screen.component-CATwc3fe.mjs.map} +1 -1
  104. package/fesm2022/acorex-modules-help-desk.mjs +1 -1
  105. package/fesm2022/{acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs → acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs} +2 -2
  106. package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-CviI9xJC.mjs.map +1 -0
  107. package/fesm2022/{acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs → acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs} +6 -2
  108. package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-YitcNesR.mjs.map +1 -0
  109. package/fesm2022/acorex-modules-human-capital-management.mjs +351 -696
  110. package/fesm2022/acorex-modules-human-capital-management.mjs.map +1 -1
  111. package/fesm2022/acorex-modules-locale-management.mjs +13 -6
  112. package/fesm2022/acorex-modules-locale-management.mjs.map +1 -1
  113. package/fesm2022/acorex-modules-notification-management.mjs +4 -4
  114. package/fesm2022/acorex-modules-notification-management.mjs.map +1 -1
  115. package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs +120 -0
  116. package/fesm2022/acorex-modules-person-core-education-level.entity-BiXdPA-Z.mjs.map +1 -0
  117. package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs +120 -0
  118. package/fesm2022/acorex-modules-person-core-marital-status.entity-j6sMTtTS.mjs.map +1 -0
  119. package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs +191 -0
  120. package/fesm2022/acorex-modules-person-core-person-identifier-type.entity-BIFiRZ2d.mjs.map +1 -0
  121. package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs +119 -0
  122. package/fesm2022/acorex-modules-person-core-person-relationship-type.entity-2qysKjU5.mjs.map +1 -0
  123. package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs +120 -0
  124. package/fesm2022/acorex-modules-person-core-religion.entity-Czb5aHb6.mjs.map +1 -0
  125. package/fesm2022/acorex-modules-person-core.mjs +466 -0
  126. package/fesm2022/acorex-modules-person-core.mjs.map +1 -0
  127. package/fesm2022/{acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs → acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs} +4 -3
  128. package/fesm2022/acorex-modules-person-management-person-identifier.entity-HBmiUahC.mjs.map +1 -0
  129. package/fesm2022/{acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs → acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs} +4 -3
  130. package/fesm2022/acorex-modules-person-management-person-relationship.entity-DbcXasEe.mjs.map +1 -0
  131. package/fesm2022/acorex-modules-person-management.mjs +11 -259
  132. package/fesm2022/acorex-modules-person-management.mjs.map +1 -1
  133. package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BRVfUYiM.mjs → acorex-modules-settings-management-acorex-modules-settings-management-Dpjfgmg9.mjs} +6 -6
  134. package/fesm2022/{acorex-modules-settings-management-acorex-modules-settings-management-BRVfUYiM.mjs.map → acorex-modules-settings-management-acorex-modules-settings-management-Dpjfgmg9.mjs.map} +1 -1
  135. package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-WSxrvAsV.mjs → acorex-modules-settings-management-permission-definition.provider-nYV8iDwJ.mjs} +2 -2
  136. package/fesm2022/{acorex-modules-settings-management-permission-definition.provider-WSxrvAsV.mjs.map → acorex-modules-settings-management-permission-definition.provider-nYV8iDwJ.mjs.map} +1 -1
  137. package/fesm2022/{acorex-modules-settings-management-setting-page.component-MYnJYUxE.mjs → acorex-modules-settings-management-setting-page.component-B1lhCtl_.mjs} +2 -2
  138. package/fesm2022/{acorex-modules-settings-management-setting-page.component-MYnJYUxE.mjs.map → acorex-modules-settings-management-setting-page.component-B1lhCtl_.mjs.map} +1 -1
  139. package/fesm2022/{acorex-modules-settings-management-setting-view.component-Cq80snth.mjs → acorex-modules-settings-management-setting-view.component-CAX1kFy2.mjs} +2 -2
  140. package/fesm2022/{acorex-modules-settings-management-setting-view.component-Cq80snth.mjs.map → acorex-modules-settings-management-setting-view.component-CAX1kFy2.mjs.map} +1 -1
  141. package/fesm2022/acorex-modules-settings-management.mjs +1 -1
  142. package/fesm2022/acorex-modules-system-insight.mjs +4 -3
  143. package/fesm2022/acorex-modules-system-insight.mjs.map +1 -1
  144. package/fesm2022/{acorex-modules-task-management-task-board.page-Cgxdk78j.mjs → acorex-modules-task-management-task-board.page-BOOY3qla.mjs} +53 -60
  145. package/fesm2022/acorex-modules-task-management-task-board.page-BOOY3qla.mjs.map +1 -0
  146. package/fesm2022/acorex-modules-task-management.mjs +39 -11
  147. package/fesm2022/acorex-modules-task-management.mjs.map +1 -1
  148. package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs +258 -0
  149. package/fesm2022/acorex-modules-workflow-management-activity-definition.entity-BbBEPTBa.mjs.map +1 -0
  150. package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs +371 -0
  151. package/fesm2022/acorex-modules-workflow-management-workflow-definition.entity-nJMBL0qt.mjs.map +1 -0
  152. package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs +313 -0
  153. package/fesm2022/acorex-modules-workflow-management-workflow-instance.entity-Pso0oRN5.mjs.map +1 -0
  154. package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-BF9xYEkf.mjs +345 -0
  155. package/fesm2022/acorex-modules-workflow-management-workflow-task-popover.component-BF9xYEkf.mjs.map +1 -0
  156. package/fesm2022/acorex-modules-workflow-management.mjs +733 -2521
  157. package/fesm2022/acorex-modules-workflow-management.mjs.map +1 -1
  158. package/health-core/index.d.ts +156 -0
  159. package/help-desk/index.d.ts +1 -1
  160. package/human-capital-management/index.d.ts +19 -79
  161. package/locale-management/index.d.ts +1 -1
  162. package/notification-management/index.d.ts +1 -1
  163. package/package.json +24 -12
  164. package/person-core/index.d.ts +132 -0
  165. package/person-management/index.d.ts +1 -25
  166. package/task-management/index.d.ts +12 -1
  167. package/workflow-management/index.d.ts +239 -265
  168. package/fesm2022/acorex-modules-assessment-management-acorex-modules-assessment-management-ClgGS32i.mjs.map +0 -1
  169. package/fesm2022/acorex-modules-assessment-management-assessment-case.entity-CjhC5YAF.mjs.map +0 -1
  170. package/fesm2022/acorex-modules-assessment-management-fill-assessment-session.command-zT5u3h_s.mjs.map +0 -1
  171. package/fesm2022/acorex-modules-assessment-management-preview-questionnaire.command-BIXy9eut.mjs.map +0 -1
  172. package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-edit.component-3wVcKQGE.mjs.map +0 -1
  173. package/fesm2022/acorex-modules-assessment-management-questionnaire-builder-view.component-meuUo7Vx.mjs.map +0 -1
  174. package/fesm2022/acorex-modules-assessment-management-questionnaire-builder.component-CGgUUkOY.mjs.map +0 -1
  175. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-kVnWtedV.mjs +0 -416
  176. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer-popup.component-kVnWtedV.mjs.map +0 -1
  177. package/fesm2022/acorex-modules-assessment-management-questionnaire-viewer.service-D3k3J93r.mjs.map +0 -1
  178. package/fesm2022/acorex-modules-assessment-management-questionnaire.entity-C8sX0d_p.mjs.map +0 -1
  179. package/fesm2022/acorex-modules-auth-acorex-modules-auth-IIyirCLb.mjs.map +0 -1
  180. package/fesm2022/acorex-modules-auth-master.layout-XkwT3Slv.mjs.map +0 -1
  181. package/fesm2022/acorex-modules-document-management-drive-choose.component-ovwhHP2n.mjs.map +0 -1
  182. package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs +0 -381
  183. package/fesm2022/acorex-modules-human-capital-management-leave-request-task-popover.component-yGvT9kSL.mjs.map +0 -1
  184. package/fesm2022/acorex-modules-human-capital-management-leave-request.entity-BDSyXKSF.mjs.map +0 -1
  185. package/fesm2022/acorex-modules-human-capital-management-leave-type.entity-CY81Nohl.mjs.map +0 -1
  186. package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs +0 -498
  187. package/fesm2022/acorex-modules-person-management-person-identifier-type.entity-VchCczk-.mjs.map +0 -1
  188. package/fesm2022/acorex-modules-person-management-person-identifier.entity-CI8u0Ro6.mjs.map +0 -1
  189. package/fesm2022/acorex-modules-person-management-person-relationship.entity-DK3mYVFv.mjs.map +0 -1
  190. package/fesm2022/acorex-modules-task-management-task-board.page-Cgxdk78j.mjs.map +0 -1
  191. package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs +0 -296
  192. package/fesm2022/acorex-modules-workflow-management-cartable-page.component-Bso0XRkJ.mjs.map +0 -1
  193. package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs +0 -469
  194. package/fesm2022/acorex-modules-workflow-management-index-xB36g4F1.mjs.map +0 -1
@@ -39,9 +39,9 @@ import { AXSearchBoxModule } from '@acorex/components/search-box';
39
39
  import * as i4$2 from '@acorex/components/text-area';
40
40
  import { AXTextAreaModule } from '@acorex/components/text-area';
41
41
  import { AXFormModule } from '@acorex/components/form';
42
+ import { AXPLayoutRendererComponent, AXPLayoutBuilderService } from '@acorex/platform/layout/builder';
42
43
  import { moveItemInArray as moveItemInArray$1, transferArrayItem, CdkDropList, CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop';
43
44
  import { AXDialogService } from '@acorex/components/dialog';
44
- import { AXPLayoutBuilderService, AXPLayoutRendererComponent } from '@acorex/platform/layout/builder';
45
45
 
46
46
  const config = {
47
47
  i18n: 'data-management',
@@ -91,6 +91,19 @@ const RootConfig = {
91
91
  title: '@general:terms.common.tag',
92
92
  icon: 'fa-light fa-tags',
93
93
  },
94
+ equipmentCategory: {
95
+ name: 'EquipmentCategory',
96
+ title: '@data-management:equipments.entities.equipment-category.title',
97
+ titlePlural: '@data-management:equipments.entities.equipment-category.plural',
98
+ icon: 'fa-light fa-folder-tree',
99
+ },
100
+ equipment: {
101
+ name: 'Equipment',
102
+ source: 'DataManagement.Equipment',
103
+ title: '@data-management:equipments.entities.equipment.title',
104
+ titlePlural: '@data-management:equipments.entities.equipment.plural',
105
+ icon: 'fa-light fa-plug',
106
+ },
94
107
  },
95
108
  };
96
109
 
@@ -1384,6 +1397,7 @@ const AXMDataManagementFeatureKeys = {
1384
1397
  Queries: 'DataManagement:Feature:Queries',
1385
1398
  DataSources: 'DataManagement:Feature:DataSources',
1386
1399
  MetaDataDefinitions: 'DataManagement:Feature:MetaDataDefinitions',
1400
+ Equipments: 'DataManagement:Feature:Equipments',
1387
1401
  };
1388
1402
 
1389
1403
  //#region ---- Imports ----
@@ -1416,6 +1430,13 @@ class AXPDataManagementFeatureDefinitionProvider {
1416
1430
  defaultValue: true,
1417
1431
  type: 'boolean',
1418
1432
  });
1433
+ // Equipments feature
1434
+ context.addFeature(AXMDataManagementFeatureKeys.Equipments, {
1435
+ title: '@data-management:features.equipments.title',
1436
+ description: '@data-management:features.equipments.description',
1437
+ defaultValue: true,
1438
+ type: 'boolean',
1439
+ });
1419
1440
  }
1420
1441
  }
1421
1442
  //#endregion
@@ -1431,6 +1452,9 @@ const AXMPermissionsKeys = {
1431
1452
  MetaDataDefinition: {
1432
1453
  Management: 'DataManagement:Permission:MetaDataDefinition.Management',
1433
1454
  },
1455
+ Equipment: {
1456
+ Management: 'DataManagement:Permission:Equipment.Management',
1457
+ },
1434
1458
  Tag: {
1435
1459
  Management: 'DataManagement:Permission:Tag.Management',
1436
1460
  },
@@ -1455,6 +1479,8 @@ class AXMPermissionDefinitionProvider {
1455
1479
  const transMetaData = async (key) => await this.translateService.translateAsync(`@data-management:metadata-definitions.permissions.metadata-definitions.${key}`);
1456
1480
  // Tag permissions
1457
1481
  const transTag = async (key) => await this.translateService.translateAsync(`@data-management:tags.permissions.tags.${key}`);
1482
+ // Equipment permissions
1483
+ const transEquipment = async (key) => await this.translateService.translateAsync(`@data-management:equipments.permissions.equipments.${key}`);
1458
1484
  context
1459
1485
  .addGroup(RootConfig.module.name, moduleTitle, moduleDescription)
1460
1486
  //
@@ -1467,6 +1493,9 @@ class AXMPermissionDefinitionProvider {
1467
1493
  .addPermission(keys.MetaDataDefinition.Management, await transMetaData('actions.manage.title'), await transMetaData('actions.manage.description'))
1468
1494
  .endPermission()
1469
1495
  //
1496
+ .addPermission(keys.Equipment.Management, await transEquipment('actions.manage.title'), await transEquipment('actions.manage.description'))
1497
+ .endPermission()
1498
+ //
1470
1499
  .addPermission(keys.Tag.Management, await transTag('actions.manage.title'), await transTag('actions.manage.description'))
1471
1500
  .endPermission()
1472
1501
  //
@@ -1484,6 +1513,8 @@ const AXPDataManagementMenuKeys = {
1484
1513
  Queries: 'DataManagement:Menu:Queries',
1485
1514
  DataSources: 'DataManagement:Menu:DataSources',
1486
1515
  MetaDataDefinitions: 'DataManagement:Menu:MetaDataDefinitions',
1516
+ Equipments: 'DataManagement:Menu:Equipments',
1517
+ EquipmentCategories: 'DataManagement:Menu:EquipmentCategories',
1487
1518
  Tags: 'DataManagement:Menu:Tags',
1488
1519
  };
1489
1520
 
@@ -1536,12 +1567,35 @@ class AXMMenuProvider {
1536
1567
  permissions: [AXMPermissionsKeys.DataManagement.MetaDataDefinition.Management],
1537
1568
  },
1538
1569
  },
1570
+ // Equipments & Equipment Categories (commented out)
1571
+ // {
1572
+ // name: AXPDataManagementMenuKeys.Equipments,
1573
+ // text: '@data-management:equipments.menus.equipments.title',
1574
+ // path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.equipment.name),
1575
+ // icon: RootConfig.entities.equipment.icon,
1576
+ // priority: 9006,
1577
+ // policy: {
1578
+ // features: [AXMDataManagementFeatureKeys.Equipments],
1579
+ // permissions: [AXMPermissionsKeys.DataManagement.Equipment.Management],
1580
+ // },
1581
+ // },
1582
+ // {
1583
+ // name: AXPDataManagementMenuKeys.EquipmentCategories,
1584
+ // text: '@data-management:equipments.menus.equipment-categories.title',
1585
+ // path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.equipmentCategory.name),
1586
+ // icon: RootConfig.entities.equipmentCategory.icon,
1587
+ // priority: 9007,
1588
+ // policy: {
1589
+ // features: [AXMDataManagementFeatureKeys.Equipments],
1590
+ // permissions: [AXMPermissionsKeys.DataManagement.Equipment.Management],
1591
+ // },
1592
+ // },
1539
1593
  {
1540
1594
  name: AXPDataManagementMenuKeys.Tags,
1541
1595
  text: '@general:terms.common.tags',
1542
1596
  icon: RootConfig.entities.tag.icon,
1543
1597
  path: this.entityService.createPath(RootConfig.module.name, RootConfig.entities.tag.name),
1544
- priority: 9006,
1598
+ priority: 9008,
1545
1599
  policy: {
1546
1600
  permissions: [AXMPermissionsKeys.DataManagement.Tag.Management],
1547
1601
  },
@@ -1574,6 +1628,8 @@ class AXMEntityProvider {
1574
1628
  return (await Promise.resolve().then(function () { return metaDataDefinition_entity; })).metaDataDefinitionFactory(this.injector);
1575
1629
  case RootConfig.entities.tag.name:
1576
1630
  return (await Promise.resolve().then(function () { return tag_entity; })).factory(this.injector);
1631
+ case RootConfig.entities.equipment.name:
1632
+ return (await Promise.resolve().then(function () { return equipment_entity; })).equipmentFactory(this.injector);
1577
1633
  }
1578
1634
  }
1579
1635
  return null;
@@ -1936,6 +1992,64 @@ class AXMChoiceOptionsDataSourceDefinition {
1936
1992
  });
1937
1993
  },
1938
1994
  };
1995
+ //#endregion
1996
+ //#region ---- Availability Options ----
1997
+ this.availabilityOptions = {
1998
+ name: 'availability-options',
1999
+ title: '@data-management:datasources.availability-options.title',
2000
+ columns: [
2001
+ {
2002
+ name: 'value',
2003
+ title: '@data-management:datasources.availability-options.columns.value.title',
2004
+ type: AXPWidgetsCatalog.text,
2005
+ datatype: 'string',
2006
+ },
2007
+ {
2008
+ name: 'title',
2009
+ title: '@data-management:datasources.availability-options.columns.title.title',
2010
+ type: AXPWidgetsCatalog.text,
2011
+ datatype: 'string',
2012
+ },
2013
+ ],
2014
+ filters: [],
2015
+ textField: { name: 'title', title: '@data-management:datasources.availability-options.columns.title.title' },
2016
+ valueField: { name: 'value', title: '@data-management:datasources.availability-options.columns.value.title' },
2017
+ samples: [
2018
+ { value: '24-7', title: '@data-management:datasources.availability-options.samples.24-7' },
2019
+ { value: 'business-hours', title: '@data-management:datasources.availability-options.samples.business-hours' },
2020
+ { value: 'weekdays', title: '@data-management:datasources.availability-options.samples.weekdays' },
2021
+ { value: 'weekends', title: '@data-management:datasources.availability-options.samples.weekends' },
2022
+ { value: 'limited-hours', title: '@data-management:datasources.availability-options.samples.limited-hours' },
2023
+ ],
2024
+ source: () => {
2025
+ return new AXDataSource({
2026
+ pageSize: 10,
2027
+ key: 'value',
2028
+ load: async () => {
2029
+ return {
2030
+ items: [
2031
+ { value: '24-7', title: '@data-management:datasources.availability-options.samples.24-7' },
2032
+ { value: 'business-hours', title: '@data-management:datasources.availability-options.samples.business-hours' },
2033
+ { value: 'weekdays', title: '@data-management:datasources.availability-options.samples.weekdays' },
2034
+ { value: 'weekends', title: '@data-management:datasources.availability-options.samples.weekends' },
2035
+ { value: 'limited-hours', title: '@data-management:datasources.availability-options.samples.limited-hours' },
2036
+ ],
2037
+ total: 5,
2038
+ };
2039
+ },
2040
+ byKey: async (key) => {
2041
+ const items = [
2042
+ { value: '24-7', title: '@data-management:datasources.availability-options.samples.24-7' },
2043
+ { value: 'business-hours', title: '@data-management:datasources.availability-options.samples.business-hours' },
2044
+ { value: 'weekdays', title: '@data-management:datasources.availability-options.samples.weekdays' },
2045
+ { value: 'weekends', title: '@data-management:datasources.availability-options.samples.weekends' },
2046
+ { value: 'limited-hours', title: '@data-management:datasources.availability-options.samples.limited-hours' },
2047
+ ];
2048
+ return items.find(item => item.value === key);
2049
+ },
2050
+ });
2051
+ },
2052
+ };
1939
2053
  }
1940
2054
  //#endregion
1941
2055
  async items() {
@@ -1946,6 +2060,7 @@ class AXMChoiceOptionsDataSourceDefinition {
1946
2060
  this.frequencyOptions,
1947
2061
  this.satisfactionOptions,
1948
2062
  this.priorityOptions,
2063
+ this.availabilityOptions,
1949
2064
  ];
1950
2065
  }
1951
2066
  }
@@ -4299,6 +4414,179 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
4299
4414
  //#region ---- Tag Entity Types ----
4300
4415
  //#endregion
4301
4416
 
4417
+ //#region ---- Imports ----
4418
+ //#endregion
4419
+ async function equipmentFactory(injector) {
4420
+ const entityDef = {
4421
+ module: RootConfig.module.name,
4422
+ name: RootConfig.entities.equipment.name,
4423
+ title: RootConfig.entities.equipment.title,
4424
+ icon: RootConfig.entities.equipment.icon,
4425
+ formats: {
4426
+ individual: RootConfig.entities.equipment.title,
4427
+ plural: RootConfig.entities.equipment.titlePlural,
4428
+ displayName: RootConfig.entities.equipment.title,
4429
+ searchResult: {
4430
+ title: '{{ title }} ({{ code }})',
4431
+ description: RootConfig.module.title,
4432
+ },
4433
+ },
4434
+ plugins: [
4435
+ { name: 'history' },
4436
+ { name: 'lock' },
4437
+ { name: 'compare' },
4438
+ { name: 'clone' },
4439
+ {
4440
+ name: 'category',
4441
+ options: {
4442
+ appearance: { icon: true, color: true },
4443
+ metaData: { enabled: true },
4444
+ },
4445
+ },
4446
+ {
4447
+ name: 'meta-data-form',
4448
+ options: {
4449
+ path: 'categoryIds',
4450
+ title: '@data-management:equipments.entities.equipment.components.meta-data-form.title',
4451
+ },
4452
+ },
4453
+ { name: 'tags' },
4454
+ { name: 'notes' },
4455
+ ],
4456
+ relatedEntities: [],
4457
+ groups: [
4458
+ {
4459
+ id: 'basic-info',
4460
+ title: '@general:terms.interface.basic-info',
4461
+ },
4462
+ ],
4463
+ properties: [
4464
+ {
4465
+ name: 'code',
4466
+ title: '@general:terms.common.code',
4467
+ groupId: 'basic-info',
4468
+ options: {
4469
+ sort: { enabled: true },
4470
+ filter: {
4471
+ advance: { enabled: true },
4472
+ inline: { enabled: true },
4473
+ },
4474
+ },
4475
+ schema: {
4476
+ dataType: 'string',
4477
+ interface: {
4478
+ type: AXPWidgetsCatalog.text,
4479
+ options: {
4480
+ placeholder: 'e.g., EQ-001',
4481
+ },
4482
+ },
4483
+ },
4484
+ validations: [
4485
+ {
4486
+ rule: 'required',
4487
+ },
4488
+ ],
4489
+ },
4490
+ {
4491
+ name: 'title',
4492
+ title: '@general:terms.common.title',
4493
+ groupId: 'basic-info',
4494
+ options: {
4495
+ sort: { enabled: true },
4496
+ filter: {
4497
+ advance: { enabled: true },
4498
+ inline: { enabled: true },
4499
+ },
4500
+ },
4501
+ schema: {
4502
+ dataType: 'string',
4503
+ interface: {
4504
+ type: AXPWidgetsCatalog.text,
4505
+ },
4506
+ },
4507
+ validations: [
4508
+ {
4509
+ rule: 'required',
4510
+ },
4511
+ ],
4512
+ },
4513
+ {
4514
+ name: 'description',
4515
+ title: '@general:terms.common.description',
4516
+ groupId: 'basic-info',
4517
+ options: {
4518
+ sort: { enabled: false },
4519
+ filter: {
4520
+ advance: { enabled: true },
4521
+ inline: { enabled: false },
4522
+ },
4523
+ },
4524
+ schema: {
4525
+ dataType: 'string',
4526
+ interface: {
4527
+ type: AXPWidgetsCatalog.largeText,
4528
+ options: {
4529
+ rows: 3,
4530
+ },
4531
+ },
4532
+ },
4533
+ },
4534
+ ],
4535
+ columns: [
4536
+ { name: 'code' },
4537
+ { name: 'title' },
4538
+ { name: 'categoryIds', options: { dataPath: 'categories' } },
4539
+ ],
4540
+ interfaces: {
4541
+ master: {
4542
+ create: {
4543
+ sections: [{ id: 'basic-info' }, { id: 'classification' }],
4544
+ properties: [
4545
+ { name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
4546
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
4547
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
4548
+ { name: 'categoryIds', layout: { positions: { lg: { colSpan: 12, order: 12 } } } },
4549
+ ],
4550
+ },
4551
+ update: {
4552
+ sections: [{ id: 'basic-info' }, { id: 'classification' }],
4553
+ properties: [
4554
+ { name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
4555
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
4556
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
4557
+ { name: 'categoryIds', layout: { positions: { lg: { colSpan: 12, order: 12 } } } },
4558
+ ],
4559
+ },
4560
+ single: {
4561
+ title: '{{title}}',
4562
+ sections: [{ id: 'basic-info' }, { id: 'classification' }],
4563
+ properties: [
4564
+ { name: 'code', layout: { positions: { lg: { colSpan: 6, order: 1 } } } },
4565
+ { name: 'title', layout: { positions: { lg: { colSpan: 6, order: 2 } } } },
4566
+ { name: 'description', layout: { positions: { lg: { colSpan: 12, order: 3 } } } },
4567
+ { name: 'categoryIds', layout: { label: { visible: true }, positions: { lg: { colSpan: 12, order: 12 } } } },
4568
+ ],
4569
+ actions: [...entityMasterRecordActions()],
4570
+ },
4571
+ list: {
4572
+ actions: [...entityMasterCrudActions()],
4573
+ views: [
4574
+ createAllQueryView({
4575
+ sorts: [{ name: 'title', dir: 'asc' }],
4576
+ }),
4577
+ ],
4578
+ },
4579
+ },
4580
+ },
4581
+ };
4582
+ return entityDef;
4583
+ }
4584
+
4585
+ var equipment_entity = /*#__PURE__*/Object.freeze({
4586
+ __proto__: null,
4587
+ equipmentFactory: equipmentFactory
4588
+ });
4589
+
4302
4590
  class AXMQueryEntityModule {
4303
4591
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXMQueryEntityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4304
4592
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.16", ngImport: i0, type: AXMQueryEntityModule }); }
@@ -7774,12 +8062,12 @@ var queryBuilderWidgetDesigner_component = /*#__PURE__*/Object.freeze({
7774
8062
  //#region ---- Re-exports from Entity Types ----
7775
8063
  //#endregion
7776
8064
 
7777
- const AXPMetaDataSelectorWidget = {
7778
- name: 'meta-data-selector-editor',
7779
- title: '@data-management:metadata-definitions.components.meta-data-selector.title',
8065
+ const AXPMetaDataFormWidget = {
8066
+ name: 'meta-data-form-editor',
8067
+ title: '@data-management:metadata-definitions.components.meta-data-form.title',
7780
8068
  categories: AXP_WIDGETS_EDITOR_CATEGORY,
7781
8069
  groups: [AXPWidgetGroupEnum.UtilityWidget],
7782
- description: '@data-management:metadata-definitions.components.meta-data-selector.description',
8070
+ description: '@data-management:metadata-definitions.components.meta-data-form.description',
7783
8071
  icon: 'fa-light fa-list-check',
7784
8072
  defaultFilterWidgetName: 'string-filter',
7785
8073
  type: 'editor',
@@ -7789,36 +8077,513 @@ const AXPMetaDataSelectorWidget = {
7789
8077
  properties: [
7790
8078
  AXP_NAME_PROPERTY,
7791
8079
  AXP_DATA_PATH_PROPERTY,
8080
+ AXP_READONLY_PROPERTY,
8081
+ AXP_DISABLED_PROPERTY,
7792
8082
  ],
7793
8083
  components: {
7794
8084
  view: {
7795
- component: () => Promise.resolve().then(function () { return metaDataSelectorView_component; }).then((c) => c.AXPMetaDataSelectorWidgetViewComponent),
8085
+ component: () => Promise.resolve().then(function () { return metaDataFormEdit_component; }).then((c) => c.AXPMetaDataFormWidgetEditComponent),
7796
8086
  },
7797
8087
  edit: {
7798
- component: () => Promise.resolve().then(function () { return metaDataSelectorEdit_component; }).then((c) => c.AXPMetaDataSelectorWidgetEditComponent),
8088
+ component: () => Promise.resolve().then(function () { return metaDataFormEdit_component; }).then((c) => c.AXPMetaDataFormWidgetEditComponent),
7799
8089
  },
7800
8090
  print: {
7801
- component: () => Promise.resolve().then(function () { return metaDataSelectorEdit_component; }).then((c) => c.AXPMetaDataSelectorWidgetEditComponent),
8091
+ component: () => Promise.resolve().then(function () { return metaDataFormEdit_component; }).then((c) => c.AXPMetaDataFormWidgetEditComponent),
7802
8092
  },
7803
8093
  },
7804
8094
  };
7805
8095
 
7806
- //#region ---- Meta-Data Selector Field Types ----
7807
- //#endregion
7808
- //#region ---- Utility Functions ----
7809
- /**
7810
- * Convert raw value to designer state
7811
- */
7812
- function convertValueToState(value) {
7813
- // Handle null/undefined
7814
- if (!value) {
7815
- return {
7816
- groups: [createDefaultGroup()],
7817
- mode: 'designer',
7818
- };
8096
+ class AXPMetaDataFormWidgetEditComponent extends AXPValueWidgetComponent {
8097
+ constructor() {
8098
+ super(...arguments);
8099
+ //#region ---- Inputs ----
8100
+ /**
8101
+ * Groups structure from meta-data-selector or evaluated expression
8102
+ */
8103
+ this.groups = computed(() => {
8104
+ const options = this.options();
8105
+ const groupsOption = options['groups'];
8106
+ // Handle evaluated expression result (array of groups) or direct groups array
8107
+ if (Array.isArray(groupsOption) && groupsOption.length > 0) {
8108
+ return groupsOption;
8109
+ }
8110
+ return [];
8111
+ }, ...(ngDevMode ? [{ debugName: "groups" }] : []));
8112
+ this.#effect = effect(() => {
8113
+ this.initializeFormDefinition();
8114
+ }, ...(ngDevMode ? [{ debugName: "#effect" }] : []));
8115
+ /**
8116
+ * Check if there are any valid metadata definitions available
8117
+ */
8118
+ this.hasDefinitions = computed(() => {
8119
+ const groups = this.groups();
8120
+ if (groups.length === 0) {
8121
+ return false;
8122
+ }
8123
+ return groups.some((group) => {
8124
+ const fields = group.fields || [];
8125
+ return fields.length > 0 && fields.some((field) => field != null);
8126
+ });
8127
+ }, ...(ngDevMode ? [{ debugName: "hasDefinitions" }] : []));
8128
+ //#endregion
8129
+ //#region ---- Outputs ----
8130
+ /**
8131
+ * Emitted when form context changes
8132
+ */
8133
+ this.contextChange = output();
8134
+ /**
8135
+ * Emitted when form validity changes
8136
+ */
8137
+ this.validityChange = output();
8138
+ //#endregion
8139
+ //#region ---- Properties ----
8140
+ this.layoutRenderer = viewChild(AXPLayoutRendererComponent, ...(ngDevMode ? [{ debugName: "layoutRenderer" }] : []));
8141
+ /**
8142
+ * Form definition signal that only updates when structure actually changes
8143
+ */
8144
+ this.formDefinition = signal({ groups: [] }, ...(ngDevMode ? [{ debugName: "formDefinition" }] : []));
7819
8145
  }
7820
- // Handle old structure (flat array) - no longer supported but graceful fallback
7821
- if (Array.isArray(value)) {
8146
+ #effect;
8147
+ //#endregion
8148
+ //#region ---- Event Handlers ----
8149
+ /**
8150
+ * Handle context change from dynamic form
8151
+ */
8152
+ onContextChange(context) {
8153
+ this.contextChange.emit(context);
8154
+ this.setValue(context);
8155
+ }
8156
+ /**
8157
+ * Handle validity change from dynamic form
8158
+ */
8159
+ onValidityChange(isValid) {
8160
+ this.validityChange.emit(isValid);
8161
+ }
8162
+ //#endregion
8163
+ //#region ---- Private Methods ----
8164
+ /**
8165
+ * Initialize form definition based on current inputs
8166
+ */
8167
+ initializeFormDefinition() {
8168
+ const groups = this.groups();
8169
+ if (groups.length > 0) {
8170
+ const newFormDefinition = this.convertGroupsToFormDefinition(groups);
8171
+ this.formDefinition.set(newFormDefinition);
8172
+ }
8173
+ }
8174
+ /**
8175
+ * Convert groups structure from meta-data-selector to form definition
8176
+ * Each metadata group becomes a separate form group with visual separation (card look)
8177
+ */
8178
+ convertGroupsToFormDefinition(groups) {
8179
+ const formGroups = [];
8180
+ groups.forEach((group) => {
8181
+ const fields = group.fields || [];
8182
+ const validFields = fields.filter((field) => field != null);
8183
+ if (validFields.length > 0) {
8184
+ const parameters = validFields.map((field) => this.convertMetadataToFieldDefinition(field));
8185
+ formGroups.push({
8186
+ name: this.sanitizeGroupName(group.name || 'default'),
8187
+ title: group.title || group.name,
8188
+ description: group.description,
8189
+ look: groups.length > 1 ? 'group' : 'container',
8190
+ parameters,
8191
+ });
8192
+ }
8193
+ });
8194
+ return { groups: formGroups };
8195
+ }
8196
+ /**
8197
+ * Convert single metadata definition to field definition
8198
+ */
8199
+ convertMetadataToFieldDefinition(metadata) {
8200
+ // Handle null/undefined metadata
8201
+ if (!metadata) {
8202
+ console.warn('Undefined metadata definition encountered');
8203
+ return {
8204
+ path: 'undefined',
8205
+ title: 'Undefined Field',
8206
+ description: 'This field has undefined metadata',
8207
+ widget: {
8208
+ type: 'text-editor',
8209
+ path: 'undefined',
8210
+ options: {
8211
+ defaultValue: '',
8212
+ validations: [],
8213
+ },
8214
+ },
8215
+ };
8216
+ }
8217
+ const interfaceConfig = this.parseInterfaceConfig(metadata.interface);
8218
+ // Handle defaultValue: support both direct property and configuration.defaultValue
8219
+ // (meta-data-selector uses configuration.defaultValue, other sources may use defaultValue directly)
8220
+ const defaultValue = metadata.defaultValue ?? metadata.configuration?.defaultValue;
8221
+ // Handle description: support both direct property and from configuration
8222
+ const description = metadata.description ?? metadata.configuration?.description;
8223
+ const widget = {
8224
+ type: interfaceConfig.type || 'text-editor',
8225
+ path: metadata.name || 'unnamed',
8226
+ options: {
8227
+ ...interfaceConfig.options,
8228
+ defaultValue: defaultValue,
8229
+ validations: this.parseValidations(metadata.interface),
8230
+ },
8231
+ };
8232
+ if (interfaceConfig.triggers?.length) {
8233
+ widget.triggers = interfaceConfig.triggers;
8234
+ }
8235
+ return {
8236
+ path: metadata.name || 'unnamed',
8237
+ title: metadata.title || 'Untitled Field',
8238
+ description: description,
8239
+ widget,
8240
+ };
8241
+ }
8242
+ /**
8243
+ * Parse interface configuration from metadata
8244
+ */
8245
+ parseInterfaceConfig(interfaceValue) {
8246
+ if (typeof interfaceValue === 'string') {
8247
+ try {
8248
+ return JSON.parse(interfaceValue || '{}');
8249
+ }
8250
+ catch (error) {
8251
+ console.warn('Failed to parse interface config:', interfaceValue, error);
8252
+ return {};
8253
+ }
8254
+ }
8255
+ return interfaceValue || {};
8256
+ }
8257
+ /**
8258
+ * Parse validations from interface configuration
8259
+ */
8260
+ parseValidations(interfaceValue) {
8261
+ const config = this.parseInterfaceConfig(interfaceValue);
8262
+ return config.options?.validations || [];
8263
+ }
8264
+ /**
8265
+ * Sanitize group name for use as identifier
8266
+ */
8267
+ sanitizeGroupName(name) {
8268
+ return name.toLowerCase().replace(/[^a-z0-9]/g, '-');
8269
+ }
8270
+ //#endregion
8271
+ //#region ---- Public Methods ----
8272
+ /**
8273
+ * Get the layout renderer component instance
8274
+ */
8275
+ getLayoutRenderer() {
8276
+ return this.layoutRenderer();
8277
+ }
8278
+ /**
8279
+ * Validate the form
8280
+ */
8281
+ async validate() {
8282
+ const renderer = this.layoutRenderer();
8283
+ if (renderer) {
8284
+ const validation = await renderer.validate();
8285
+ return validation.result;
8286
+ }
8287
+ return false;
8288
+ }
8289
+ /**
8290
+ * Get current form context
8291
+ */
8292
+ getContext() {
8293
+ const renderer = this.layoutRenderer();
8294
+ return renderer ? renderer.getContext() : {};
8295
+ }
8296
+ /**
8297
+ * Update form context programmatically
8298
+ */
8299
+ updateContext(context) {
8300
+ console.log('updateContext', context);
8301
+ const renderer = this.layoutRenderer();
8302
+ if (renderer) {
8303
+ renderer.updateContext(context);
8304
+ }
8305
+ }
8306
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataFormWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8307
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXPMetaDataFormWidgetEditComponent, isStandalone: true, selector: "axp-meta-data-form-widget-edit", outputs: { contextChange: "contextChange", validityChange: "validityChange" }, viewQueries: [{ propertyName: "layoutRenderer", first: true, predicate: AXPLayoutRendererComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
8308
+ @if (hasDefinitions()) {
8309
+ <axp-layout-renderer
8310
+ [layout]="formDefinition()"
8311
+ [context]="getValue()"
8312
+ [look]="'container'"
8313
+ (contextChange)="onContextChange($event)"
8314
+ (validityChange)="onValidityChange($event)"
8315
+ >
8316
+ </axp-layout-renderer>
8317
+ } @else {
8318
+ <axp-state-message
8319
+ icon="fa-light fa-clipboard-list"
8320
+ [title]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.title'"
8321
+ [description]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.description'"
8322
+ >
8323
+ </axp-state-message>
8324
+ }
8325
+ `, isInline: true, dependencies: [{ kind: "component", type: AXPLayoutRendererComponent, selector: "axp-layout-renderer", inputs: ["layout", "context", "look", "mode"], outputs: ["contextChange", "contextInitiated", "validityChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8326
+ }
8327
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataFormWidgetEditComponent, decorators: [{
8328
+ type: Component,
8329
+ args: [{ selector: 'axp-meta-data-form-widget-edit', template: `
8330
+ @if (hasDefinitions()) {
8331
+ <axp-layout-renderer
8332
+ [layout]="formDefinition()"
8333
+ [context]="getValue()"
8334
+ [look]="'container'"
8335
+ (contextChange)="onContextChange($event)"
8336
+ (validityChange)="onValidityChange($event)"
8337
+ >
8338
+ </axp-layout-renderer>
8339
+ } @else {
8340
+ <axp-state-message
8341
+ icon="fa-light fa-clipboard-list"
8342
+ [title]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.title'"
8343
+ [description]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.description'"
8344
+ >
8345
+ </axp-state-message>
8346
+ }
8347
+ `, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXPLayoutRendererComponent, AXFormModule, AXLabelModule, AXPWidgetCoreModule, AXPStateMessageComponent] }]
8348
+ }], propDecorators: { contextChange: [{ type: i0.Output, args: ["contextChange"] }], validityChange: [{ type: i0.Output, args: ["validityChange"] }], layoutRenderer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPLayoutRendererComponent), { isSignal: true }] }] } });
8349
+
8350
+ var metaDataFormEdit_component = /*#__PURE__*/Object.freeze({
8351
+ __proto__: null,
8352
+ AXPMetaDataFormWidgetEditComponent: AXPMetaDataFormWidgetEditComponent
8353
+ });
8354
+
8355
+ class ShowMetaDataFormPopupCommand {
8356
+ constructor() {
8357
+ this.layoutBuilder = inject(AXPLayoutBuilderService);
8358
+ this.translationService = inject(AXTranslationService);
8359
+ this.entityService = inject(AXPEntityService);
8360
+ this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
8361
+ }
8362
+ async execute(input) {
8363
+ try {
8364
+ // Extract evaluated options from __context__ (private/controlled data)
8365
+ // The __context__.options contains evaluated expressions from entity actions
8366
+ const contextOptions = input.__context__?.options;
8367
+ // Merge root-level input with evaluated options from __context__
8368
+ // Root-level takes precedence if both exist
8369
+ const evaluatedInput = {
8370
+ ...contextOptions,
8371
+ ...input,
8372
+ // Ensure we use evaluated options from __context__ if available
8373
+ ...(contextOptions ? contextOptions : {}),
8374
+ };
8375
+ const { entity, id, field = META_DATA_FORM_FIELD, title, path } = evaluatedInput;
8376
+ if (!entity || !id) {
8377
+ return {
8378
+ success: false,
8379
+ message: {
8380
+ text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
8381
+ },
8382
+ };
8383
+ }
8384
+ // Ensure id is a string
8385
+ if (typeof id !== 'string' && id != null) {
8386
+ const stringId = String(id);
8387
+ if (stringId) {
8388
+ evaluatedInput.id = stringId;
8389
+ }
8390
+ }
8391
+ if (!evaluatedInput.id || typeof evaluatedInput.id !== 'string') {
8392
+ return {
8393
+ success: false,
8394
+ message: {
8395
+ text: await this.translationService.translateAsync('@general:messages.entity.invalid-data'),
8396
+ },
8397
+ };
8398
+ }
8399
+ const finalId = evaluatedInput.id;
8400
+ // Get current entity record to get the metadata expression value
8401
+ const [moduleName, entityName] = entity.split('.');
8402
+ const currentRecord = await this.findRecord(entity, finalId);
8403
+ if (!currentRecord) {
8404
+ return {
8405
+ success: false,
8406
+ message: {
8407
+ text: await this.translationService.translateAsync('@general:messages.entity.not-found'),
8408
+ },
8409
+ };
8410
+ }
8411
+ // Note: pathValue might be null/undefined, but the metadata expression evaluator will handle it
8412
+ // The expression will return an empty array if pathValue is not available
8413
+ // Resolve entity to get metadata expression and determine if it's category or entity lookup
8414
+ const entityDef = await this.entityRegistry.resolve(moduleName, entityName);
8415
+ const metaDataFormExt = entityDef.extensions?.metaDataForm?.[field];
8416
+ if (!metaDataFormExt) {
8417
+ return {
8418
+ success: false,
8419
+ message: {
8420
+ text: await this.translationService.translateAsync('@data-management:metadata-definitions.messages.meta-data-form-not-configured'),
8421
+ },
8422
+ };
8423
+ }
8424
+ // Get path property to determine metadata source type
8425
+ const props = entityDef.properties || [];
8426
+ const pathProperty = props.find((p) => p.name === path);
8427
+ const targetEntity = pathProperty?.schema?.interface?.options?.['entity'];
8428
+ if (!targetEntity) {
8429
+ return {
8430
+ success: false,
8431
+ message: {
8432
+ text: await this.translationService.translateAsync('@data-management:metadata-definitions.messages.invalid-path-field'),
8433
+ },
8434
+ };
8435
+ }
8436
+ // Build metadata expression based on target entity type
8437
+ let metadataExpression;
8438
+ if (targetEntity.endsWith('Category')) {
8439
+ // Category lookup - use fromCategory
8440
+ metadataExpression = `{{ metadata.fromCategory("${entity}", context.eval('${path}')) }}`;
8441
+ }
8442
+ else {
8443
+ // Relationship lookup - use fromEntity
8444
+ metadataExpression = `{{ metadata.fromEntity("${targetEntity}", context.eval('${path}')) }}`;
8445
+ }
8446
+ // Get current meta data form value
8447
+ const currentMetaDataValue = currentRecord[field] || {};
8448
+ // Build dialog title
8449
+ const dialogTitle = title || metaDataFormExt.title || await this.translationService.translateAsync('@data-management:metadata-definitions.components.meta-data-form.title');
8450
+ // Open dialog with meta-data-form-editor widget
8451
+ const result = await this.layoutBuilder
8452
+ .create()
8453
+ .dialog((dialog) => {
8454
+ dialog
8455
+ .setTitle(dialogTitle)
8456
+ .setSize('lg')
8457
+ .setCloseButton(true)
8458
+ .setContext({
8459
+ ...currentRecord,
8460
+ [field]: currentMetaDataValue,
8461
+ })
8462
+ .content((layout) => {
8463
+ layout.flex((flex) => {
8464
+ flex.setDirection('column').setGap('16px');
8465
+ // Add meta-data-form-editor widget with metadata expression
8466
+ flex.formField('', (fieldBuilder) => {
8467
+ fieldBuilder
8468
+ .path(field)
8469
+ .setShowLabel(false)
8470
+ .customWidget('meta-data-form-editor', {
8471
+ groups: metadataExpression,
8472
+ });
8473
+ });
8474
+ });
8475
+ })
8476
+ .setActions((actions) => {
8477
+ actions
8478
+ .cancel('@general:actions.cancel.title')
8479
+ .submit('@general:actions.save.title');
8480
+ })
8481
+ .onAction(async (dialogRef) => {
8482
+ const context = dialogRef.context();
8483
+ const action = dialogRef.action();
8484
+ if (!context || action === 'cancel') {
8485
+ return { success: false };
8486
+ }
8487
+ const updateData = {
8488
+ [field]: context[field],
8489
+ };
8490
+ const updated = await this.updateRecord(entity, finalId, updateData);
8491
+ return {
8492
+ success: true,
8493
+ data: updated,
8494
+ message: {
8495
+ text: await this.translationService.translateAsync('@general:messages.entity.updated'),
8496
+ },
8497
+ };
8498
+ });
8499
+ })
8500
+ .show();
8501
+ return result;
8502
+ }
8503
+ catch (error) {
8504
+ return {
8505
+ success: false,
8506
+ message: {
8507
+ text: error instanceof Error ? error.message : 'Failed to show meta data form popup',
8508
+ },
8509
+ };
8510
+ }
8511
+ }
8512
+ //#region ---- Overridable Methods ----
8513
+ /**
8514
+ * Loads a record by entity and id. Override to use custom data sources or key handling.
8515
+ */
8516
+ findRecord(entity, id) {
8517
+ const dataAccessor = this.entityService.withEntity(entity).data();
8518
+ return dataAccessor.byKey(id);
8519
+ }
8520
+ /**
8521
+ * Persists meta-data form changes. Override to use custom persistence or validation.
8522
+ */
8523
+ updateRecord(entity, id, data) {
8524
+ const dataAccessor = this.entityService.withEntity(entity).data();
8525
+ return dataAccessor.update(id, data);
8526
+ }
8527
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataFormPopupCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
8528
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataFormPopupCommand, providedIn: 'root' }); }
8529
+ }
8530
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataFormPopupCommand, decorators: [{
8531
+ type: Injectable,
8532
+ args: [{
8533
+ providedIn: 'root',
8534
+ }]
8535
+ }] });
8536
+
8537
+ var showMetaDataFormPopup_command = /*#__PURE__*/Object.freeze({
8538
+ __proto__: null,
8539
+ ShowMetaDataFormPopupCommand: ShowMetaDataFormPopupCommand
8540
+ });
8541
+
8542
+ const AXPMetaDataSelectorWidget = {
8543
+ name: 'meta-data-selector-editor',
8544
+ title: '@data-management:metadata-definitions.components.meta-data-selector.title',
8545
+ categories: AXP_WIDGETS_EDITOR_CATEGORY,
8546
+ groups: [AXPWidgetGroupEnum.UtilityWidget],
8547
+ description: '@data-management:metadata-definitions.components.meta-data-selector.description',
8548
+ icon: 'fa-light fa-list-check',
8549
+ defaultFilterWidgetName: 'string-filter',
8550
+ type: 'editor',
8551
+ options: {
8552
+ needLabel: false,
8553
+ },
8554
+ properties: [
8555
+ AXP_NAME_PROPERTY,
8556
+ AXP_DATA_PATH_PROPERTY,
8557
+ ],
8558
+ components: {
8559
+ view: {
8560
+ component: () => Promise.resolve().then(function () { return metaDataSelectorView_component; }).then((c) => c.AXPMetaDataSelectorWidgetViewComponent),
8561
+ },
8562
+ edit: {
8563
+ component: () => Promise.resolve().then(function () { return metaDataSelectorEdit_component; }).then((c) => c.AXPMetaDataSelectorWidgetEditComponent),
8564
+ },
8565
+ print: {
8566
+ component: () => Promise.resolve().then(function () { return metaDataSelectorEdit_component; }).then((c) => c.AXPMetaDataSelectorWidgetEditComponent),
8567
+ },
8568
+ },
8569
+ };
8570
+
8571
+ //#region ---- Meta-Data Selector Field Types ----
8572
+ //#endregion
8573
+ //#region ---- Utility Functions ----
8574
+ /**
8575
+ * Convert raw value to designer state
8576
+ */
8577
+ function convertValueToState(value) {
8578
+ // Handle null/undefined
8579
+ if (!value) {
8580
+ return {
8581
+ groups: [createDefaultGroup()],
8582
+ mode: 'designer',
8583
+ };
8584
+ }
8585
+ // Handle old structure (flat array) - no longer supported but graceful fallback
8586
+ if (Array.isArray(value)) {
7822
8587
  return {
7823
8588
  groups: [
7824
8589
  {
@@ -8686,35 +9451,22 @@ var metaDataSelectorEdit_component = /*#__PURE__*/Object.freeze({
8686
9451
  AXPMetaDataSelectorWidgetEditComponent: AXPMetaDataSelectorWidgetEditComponent
8687
9452
  });
8688
9453
 
8689
- class AXPMetaDataSelectorWidgetViewComponent extends AXPValueWidgetComponent {
8690
- /**
8691
- * Returns a comma-separated list of selected meta titles.
8692
- * Extracting this logic into a getter keeps the template simple and
8693
- * avoids using arrow functions, which are not allowed in Angular
8694
- * interpolation expressions.
8695
- */
8696
- get display() {
8697
- const val = this.getValue();
8698
- return Array.isArray(val) ? val.map((v) => v.title || v.text).join(', ') : '';
9454
+ function normalizeSelectorDisplayConfig(display, defaultTitle) {
9455
+ if (!display)
9456
+ return { section: { enabled: true } };
9457
+ if (typeof display === 'object')
9458
+ return display;
9459
+ switch (display) {
9460
+ case 'section':
9461
+ return { section: { enabled: true, title: defaultTitle }, popup: { enabled: false } };
9462
+ case 'popup':
9463
+ return { section: { enabled: false }, popup: { enabled: true, title: defaultTitle } };
9464
+ case 'both':
9465
+ return { section: { enabled: true, title: defaultTitle }, popup: { enabled: true, title: defaultTitle } };
9466
+ default:
9467
+ return { section: { enabled: true } };
8699
9468
  }
8700
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8701
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXPMetaDataSelectorWidgetViewComponent, isStandalone: true, selector: "axp-meta-data-selector-widget-view", usesInheritance: true, ngImport: i0, template: `<span>{{ display }}</span>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8702
9469
  }
8703
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataSelectorWidgetViewComponent, decorators: [{
8704
- type: Component,
8705
- args: [{
8706
- selector: 'axp-meta-data-selector-widget-view',
8707
- template: `<span>{{ display }}</span>`,
8708
- changeDetection: ChangeDetectionStrategy.OnPush,
8709
- imports: [AXDecoratorModule],
8710
- }]
8711
- }] });
8712
-
8713
- var metaDataSelectorView_component = /*#__PURE__*/Object.freeze({
8714
- __proto__: null,
8715
- AXPMetaDataSelectorWidgetViewComponent: AXPMetaDataSelectorWidgetViewComponent
8716
- });
8717
-
8718
9470
  /**
8719
9471
  * meta-data-selector plugin
8720
9472
  *
@@ -8772,6 +9524,12 @@ const metaDataSelectorPlugin = {
8772
9524
  : (categoryMetaDataTitle && categoryMetaDataTitle.trim().length > 0)
8773
9525
  ? categoryMetaDataTitle
8774
9526
  : '@data-management:metadata-definitions.actions.configure-meta-data.title';
9527
+ const displayConfig = normalizeSelectorDisplayConfig(opts.display, displayTitle);
9528
+ const sectionConfig = displayConfig.section ?? {};
9529
+ const popupConfig = displayConfig.popup ?? {};
9530
+ const showSection = sectionConfig.enabled !== false;
9531
+ const showPopup = popupConfig.enabled === true;
9532
+ const popupTitle = popupConfig.title ?? displayTitle;
8775
9533
  //#region ---- Step 1: Create Meta-Data Selector Property ----
8776
9534
  // Ensure group and section for the selector configuration itself
8777
9535
  const selectorSectionId = `meta-data-config`;
@@ -8795,62 +9553,74 @@ const metaDataSelectorPlugin = {
8795
9553
  },
8796
9554
  });
8797
9555
  }
8798
- // Add selector to single/create/modify views (for configuration)
8799
- const selectorColSpan = 12;
8800
- ctx.interfaces.master.single.update((single) => {
8801
- const next = single ?? { title: ctx.entity.title, sections: [], properties: [] };
8802
- next.sections = next.sections ?? [];
8803
- if (!next.sections.some((s) => s.id === selectorSectionId)) {
8804
- next.sections.push({ id: selectorSectionId, title: displayTitle, order: 200 });
8805
- }
8806
- next.properties = next.properties ?? [];
8807
- if (!next.properties.some((p) => p.name === field)) {
8808
- next.properties.push({
8809
- name: field,
8810
- layout: {
8811
- label: { visible: false },
8812
- positions: { lg: { colSpan: selectorColSpan, order: 9 } },
8813
- },
8814
- });
8815
- }
8816
- return next;
8817
- });
8818
- ctx.interfaces.master.create.update((create) => {
8819
- const next = create ?? { sections: [], properties: [] };
8820
- next.sections = next.sections ?? [];
8821
- if (!next.sections.some((s) => s.id === selectorSectionId)) {
8822
- next.sections.push({ id: selectorSectionId, title: displayTitle });
8823
- }
8824
- next.properties = next.properties ?? [];
8825
- if (!next.properties.some((p) => p.name === field)) {
8826
- next.properties.push({
8827
- name: field,
8828
- layout: {
8829
- label: { visible: false },
8830
- positions: { lg: { colSpan: selectorColSpan, order: 7 } },
8831
- },
8832
- });
8833
- }
8834
- return next;
8835
- });
8836
- ctx.interfaces.master.modify.update((modify) => {
8837
- const next = modify ?? { sections: [], properties: [] };
8838
- next.sections = next.sections ?? [];
8839
- if (!next.sections.some((s) => s.id === selectorSectionId)) {
8840
- next.sections.push({ id: selectorSectionId, title: displayTitle });
8841
- }
8842
- next.properties = next.properties ?? [];
8843
- if (!next.properties.some((p) => p.name === field)) {
8844
- next.properties.push({
8845
- name: field,
8846
- layout: {
8847
- label: { visible: false },
8848
- positions: { lg: { colSpan: selectorColSpan, order: 7 } },
8849
- },
8850
- });
8851
- }
8852
- return next;
8853
- });
9556
+ // Add selector to single/create/modify views only when section display is enabled
9557
+ const selectorColSpan = 12;
9558
+ if (showSection) {
9559
+ ctx.interfaces.master.single.update((single) => {
9560
+ const next = single ?? { title: ctx.entity.title, sections: [], properties: [] };
9561
+ next.sections = next.sections ?? [];
9562
+ if (!next.sections.some((s) => s.id === selectorSectionId)) {
9563
+ next.sections.push({
9564
+ id: selectorSectionId,
9565
+ title: sectionConfig.title ?? displayTitle,
9566
+ order: sectionConfig.order ?? 200,
9567
+ });
9568
+ }
9569
+ next.properties = next.properties ?? [];
9570
+ if (!next.properties.some((p) => p.name === field)) {
9571
+ next.properties.push({
9572
+ name: field,
9573
+ layout: {
9574
+ label: { visible: false },
9575
+ positions: { lg: { colSpan: selectorColSpan, order: 9 } },
9576
+ },
9577
+ });
9578
+ }
9579
+ return next;
9580
+ });
9581
+ ctx.interfaces.master.create.update((create) => {
9582
+ const next = create ?? { sections: [], properties: [] };
9583
+ next.sections = next.sections ?? [];
9584
+ if (!next.sections.some((s) => s.id === selectorSectionId)) {
9585
+ next.sections.push({
9586
+ id: selectorSectionId,
9587
+ title: sectionConfig.title ?? displayTitle,
9588
+ });
9589
+ }
9590
+ next.properties = next.properties ?? [];
9591
+ if (!next.properties.some((p) => p.name === field)) {
9592
+ next.properties.push({
9593
+ name: field,
9594
+ layout: {
9595
+ label: { visible: false },
9596
+ positions: { lg: { colSpan: selectorColSpan, order: 7 } },
9597
+ },
9598
+ });
9599
+ }
9600
+ return next;
9601
+ });
9602
+ ctx.interfaces.master.modify.update((modify) => {
9603
+ const next = modify ?? { sections: [], properties: [] };
9604
+ next.sections = next.sections ?? [];
9605
+ if (!next.sections.some((s) => s.id === selectorSectionId)) {
9606
+ next.sections.push({
9607
+ id: selectorSectionId,
9608
+ title: sectionConfig.title ?? displayTitle,
9609
+ });
9610
+ }
9611
+ next.properties = next.properties ?? [];
9612
+ if (!next.properties.some((p) => p.name === field)) {
9613
+ next.properties.push({
9614
+ name: field,
9615
+ layout: {
9616
+ label: { visible: false },
9617
+ positions: { lg: { colSpan: selectorColSpan, order: 7 } },
9618
+ },
9619
+ });
9620
+ }
9621
+ return next;
9622
+ });
9623
+ }
8854
9624
  //#endregion
8855
9625
  //#region ---- Step 2: Dynamic Group Generation Middleware ----
8856
9626
  // Add metadata middleware to dynamically generate groups at runtime
@@ -8989,355 +9759,120 @@ const metaDataSelectorPlugin = {
8989
9759
  // Note: This is conceptual - actual implementation depends on platform capabilities
8990
9760
  // (ctx as any).middleware?.add?.(metadataMiddleware);
8991
9761
  //#endregion
8992
- //#region ---- Step 3: List Actions ----
8993
- // Ensure list action to open meta data selector popup exists
8994
- // ensureListActions(ctx);
8995
- // ctx.interfaces.update((i) => {
8996
- // const actions = (i as any).master.list.actions as any[];
8997
- // const cmdName = 'show-meta-data-selector-popup';
8998
- // const actionName = `meta-data-${field}`;
8999
- // if (!actionExists(actions, cmdName, actionName)) {
9000
- // actions.push({
9001
- // name: actionName,
9002
- // title: '@data-management:metadata-definitions.actions.configure-meta-data.title',
9003
- // command: {
9004
- // name: cmdName,
9005
- // options: {
9006
- // id: '{{ context.eval("id") }}',
9007
- // metaData: `{{ context.eval("${field}") }}`,
9008
- // key: field,
9009
- // },
9010
- // },
9011
- // priority: 'secondary',
9012
- // type: 'configure',
9013
- // scope: AXPEntityCommandScope.Individual,
9014
- // });
9015
- // }
9016
- // return i as any;
9017
- // });
9018
- //#endregion
9019
- //#region ---- Step 4: Extension Metadata ----
9020
- // Stamp normalized config for middleware
9021
- ctx.entity.extensions ??= {};
9022
- ctx.entity.extensions.metaDataSelector ??= {};
9023
- ctx.entity.extensions.metaDataSelector[field] = {
9024
- title: displayTitle,
9025
- };
9026
- //#endregion
9027
- },
9028
- };
9029
-
9030
- const AXPMetaDataFormWidget = {
9031
- name: 'meta-data-form-editor',
9032
- title: '@data-management:metadata-definitions.components.meta-data-form.title',
9033
- categories: AXP_WIDGETS_EDITOR_CATEGORY,
9034
- groups: [AXPWidgetGroupEnum.UtilityWidget],
9035
- description: '@data-management:metadata-definitions.components.meta-data-form.description',
9036
- icon: 'fa-light fa-list-check',
9037
- defaultFilterWidgetName: 'string-filter',
9038
- type: 'editor',
9039
- options: {
9040
- needLabel: false,
9041
- },
9042
- properties: [
9043
- AXP_NAME_PROPERTY,
9044
- AXP_DATA_PATH_PROPERTY,
9045
- AXP_READONLY_PROPERTY,
9046
- AXP_DISABLED_PROPERTY,
9047
- ],
9048
- components: {
9049
- view: {
9050
- component: () => Promise.resolve().then(function () { return metaDataFormEdit_component; }).then((c) => c.AXPMetaDataFormWidgetEditComponent),
9051
- },
9052
- edit: {
9053
- component: () => Promise.resolve().then(function () { return metaDataFormEdit_component; }).then((c) => c.AXPMetaDataFormWidgetEditComponent),
9054
- },
9055
- print: {
9056
- component: () => Promise.resolve().then(function () { return metaDataFormEdit_component; }).then((c) => c.AXPMetaDataFormWidgetEditComponent),
9057
- },
9058
- },
9059
- };
9060
-
9061
- class AXPMetaDataFormWidgetEditComponent extends AXPValueWidgetComponent {
9062
- constructor() {
9063
- super(...arguments);
9064
- //#region ---- Inputs ----
9065
- /**
9066
- * Groups structure from meta-data-selector or evaluated expression
9067
- */
9068
- this.groups = computed(() => {
9069
- const options = this.options();
9070
- const groupsOption = options['groups'];
9071
- // Handle evaluated expression result (array of groups) or direct groups array
9072
- if (Array.isArray(groupsOption) && groupsOption.length > 0) {
9073
- return groupsOption;
9074
- }
9075
- return [];
9076
- }, ...(ngDevMode ? [{ debugName: "groups" }] : []));
9077
- this.#effect = effect(() => {
9078
- this.initializeFormDefinition();
9079
- }, ...(ngDevMode ? [{ debugName: "#effect" }] : []));
9080
- /**
9081
- * Check if there are any valid metadata definitions available
9082
- */
9083
- this.hasDefinitions = computed(() => {
9084
- const groups = this.groups();
9085
- if (groups.length === 0) {
9086
- return false;
9087
- }
9088
- return groups.some((group) => {
9089
- const fields = group.fields || [];
9090
- return fields.length > 0 && fields.some((field) => field != null);
9091
- });
9092
- }, ...(ngDevMode ? [{ debugName: "hasDefinitions" }] : []));
9093
- //#endregion
9094
- //#region ---- Outputs ----
9095
- /**
9096
- * Emitted when form context changes
9097
- */
9098
- this.contextChange = output();
9099
- /**
9100
- * Emitted when form validity changes
9101
- */
9102
- this.validityChange = output();
9103
- //#endregion
9104
- //#region ---- Properties ----
9105
- this.layoutRenderer = viewChild(AXPLayoutRendererComponent, ...(ngDevMode ? [{ debugName: "layoutRenderer" }] : []));
9106
- /**
9107
- * Form definition signal that only updates when structure actually changes
9108
- */
9109
- this.formDefinition = signal({ groups: [] }, ...(ngDevMode ? [{ debugName: "formDefinition" }] : []));
9110
- }
9111
- #effect;
9112
- //#endregion
9113
- //#region ---- Event Handlers ----
9114
- /**
9115
- * Handle context change from dynamic form
9116
- */
9117
- onContextChange(context) {
9118
- this.contextChange.emit(context);
9119
- this.setValue(context);
9120
- }
9121
- /**
9122
- * Handle validity change from dynamic form
9123
- */
9124
- onValidityChange(isValid) {
9125
- this.validityChange.emit(isValid);
9126
- }
9127
- //#endregion
9128
- //#region ---- Private Methods ----
9129
- /**
9130
- * Initialize form definition based on current inputs
9131
- */
9132
- initializeFormDefinition() {
9133
- const groups = this.groups();
9134
- if (groups.length > 0) {
9135
- const newFormDefinition = this.convertGroupsToFormDefinition(groups);
9136
- this.formDefinition.set(newFormDefinition);
9137
- }
9138
- }
9139
- /**
9140
- * Convert groups structure from meta-data-selector to form definition
9141
- * Each metadata group becomes a separate form group with visual separation (card look)
9142
- */
9143
- convertGroupsToFormDefinition(groups) {
9144
- const formGroups = [];
9145
- groups.forEach((group) => {
9146
- const fields = group.fields || [];
9147
- const validFields = fields.filter((field) => field != null);
9148
- if (validFields.length > 0) {
9149
- const parameters = validFields.map((field) => this.convertMetadataToFieldDefinition(field));
9150
- formGroups.push({
9151
- name: this.sanitizeGroupName(group.name || 'default'),
9152
- title: group.title || group.name,
9153
- description: group.description,
9154
- look: groups.length > 1 ? 'group' : 'container',
9155
- parameters,
9156
- });
9157
- }
9158
- });
9159
- return { groups: formGroups };
9160
- }
9161
- /**
9162
- * Convert single metadata definition to field definition
9163
- */
9164
- convertMetadataToFieldDefinition(metadata) {
9165
- // Handle null/undefined metadata
9166
- if (!metadata) {
9167
- console.warn('Undefined metadata definition encountered');
9168
- return {
9169
- path: 'undefined',
9170
- title: 'Undefined Field',
9171
- description: 'This field has undefined metadata',
9172
- widget: {
9173
- type: 'text-editor',
9174
- path: 'undefined',
9175
- options: {
9176
- defaultValue: '',
9177
- validations: [],
9178
- },
9179
- },
9180
- };
9181
- }
9182
- const interfaceConfig = this.parseInterfaceConfig(metadata.interface);
9183
- // Handle defaultValue: support both direct property and configuration.defaultValue
9184
- // (meta-data-selector uses configuration.defaultValue, other sources may use defaultValue directly)
9185
- const defaultValue = metadata.defaultValue ?? metadata.configuration?.defaultValue;
9186
- // Handle description: support both direct property and from configuration
9187
- const description = metadata.description ?? metadata.configuration?.description;
9188
- const widget = {
9189
- type: interfaceConfig.type || 'text-editor',
9190
- path: metadata.name || 'unnamed',
9191
- options: {
9192
- ...interfaceConfig.options,
9193
- defaultValue: defaultValue,
9194
- validations: this.parseValidations(metadata.interface),
9195
- },
9196
- };
9197
- if (interfaceConfig.triggers?.length) {
9198
- widget.triggers = interfaceConfig.triggers;
9762
+ //#region ---- Step 3: Popup actions (when display is popup or both) ----
9763
+ if (showPopup) {
9764
+ const actionName = `show-meta-data-selector-popup-${field}`;
9765
+ const commandName = 'show-meta-data-selector-popup';
9766
+ ctx.interfaces.master.single.update((single) => {
9767
+ const next = single ?? { title: ctx.entity.title, sections: [], properties: [], actions: [] };
9768
+ next.actions = next.actions ?? [];
9769
+ if (!actionExists(next.actions, commandName, actionName)) {
9770
+ next.actions.push({
9771
+ name: actionName,
9772
+ title: popupTitle,
9773
+ command: {
9774
+ name: commandName,
9775
+ options: {
9776
+ entity: `${ctx.entity.module}.${ctx.entity.name}`,
9777
+ id: '{{ context.eval("id") }}',
9778
+ field,
9779
+ title: popupTitle,
9780
+ },
9781
+ },
9782
+ priority: 'secondary',
9783
+ type: 'configure',
9784
+ icon: 'fa-light fa-list-check',
9785
+ scope: AXPEntityCommandScope.Individual,
9786
+ });
9787
+ }
9788
+ return next;
9789
+ });
9790
+ ctx.interfaces.master.list.update((list) => {
9791
+ const next = list ?? { actions: [], views: [] };
9792
+ next.actions = next.actions ?? [];
9793
+ if (!actionExists(next.actions, commandName, actionName)) {
9794
+ next.actions.push({
9795
+ name: actionName,
9796
+ title: popupTitle,
9797
+ command: {
9798
+ name: commandName,
9799
+ options: {
9800
+ entity: `${ctx.entity.module}.${ctx.entity.name}`,
9801
+ id: '{{ context.eval("id") }}',
9802
+ field,
9803
+ title: popupTitle,
9804
+ },
9805
+ },
9806
+ priority: 'secondary',
9807
+ type: 'configure',
9808
+ icon: 'fa-light fa-list-check',
9809
+ scope: AXPEntityCommandScope.Individual,
9810
+ });
9811
+ }
9812
+ return next;
9813
+ });
9199
9814
  }
9200
- return {
9201
- path: metadata.name || 'unnamed',
9202
- title: metadata.title || 'Untitled Field',
9203
- description: description,
9204
- widget,
9815
+ //#endregion
9816
+ //#region ---- Step 4: Extension Metadata ----
9817
+ // Stamp normalized config for middleware
9818
+ ctx.entity.extensions ??= {};
9819
+ ctx.entity.extensions.metaDataSelector ??= {};
9820
+ ctx.entity.extensions.metaDataSelector[field] = {
9821
+ title: displayTitle,
9822
+ display: displayConfig,
9205
9823
  };
9206
- }
9207
- /**
9208
- * Parse interface configuration from metadata
9209
- */
9210
- parseInterfaceConfig(interfaceValue) {
9211
- if (typeof interfaceValue === 'string') {
9212
- try {
9213
- return JSON.parse(interfaceValue || '{}');
9214
- }
9215
- catch (error) {
9216
- console.warn('Failed to parse interface config:', interfaceValue, error);
9217
- return {};
9218
- }
9219
- }
9220
- return interfaceValue || {};
9221
- }
9222
- /**
9223
- * Parse validations from interface configuration
9224
- */
9225
- parseValidations(interfaceValue) {
9226
- const config = this.parseInterfaceConfig(interfaceValue);
9227
- return config.options?.validations || [];
9228
- }
9229
- /**
9230
- * Sanitize group name for use as identifier
9231
- */
9232
- sanitizeGroupName(name) {
9233
- return name.toLowerCase().replace(/[^a-z0-9]/g, '-');
9234
- }
9235
- //#endregion
9236
- //#region ---- Public Methods ----
9237
- /**
9238
- * Get the layout renderer component instance
9239
- */
9240
- getLayoutRenderer() {
9241
- return this.layoutRenderer();
9242
- }
9243
- /**
9244
- * Validate the form
9245
- */
9246
- async validate() {
9247
- const renderer = this.layoutRenderer();
9248
- if (renderer) {
9249
- const validation = await renderer.validate();
9250
- return validation.result;
9251
- }
9252
- return false;
9253
- }
9254
- /**
9255
- * Get current form context
9256
- */
9257
- getContext() {
9258
- const renderer = this.layoutRenderer();
9259
- return renderer ? renderer.getContext() : {};
9260
- }
9824
+ //#endregion
9825
+ },
9826
+ };
9827
+
9828
+ class AXPMetaDataSelectorWidgetViewComponent extends AXPValueWidgetComponent {
9261
9829
  /**
9262
- * Update form context programmatically
9830
+ * Returns a comma-separated list of selected meta titles.
9831
+ * Extracting this logic into a getter keeps the template simple and
9832
+ * avoids using arrow functions, which are not allowed in Angular
9833
+ * interpolation expressions.
9263
9834
  */
9264
- updateContext(context) {
9265
- console.log('updateContext', context);
9266
- const renderer = this.layoutRenderer();
9267
- if (renderer) {
9268
- renderer.updateContext(context);
9269
- }
9270
- }
9271
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataFormWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
9272
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: AXPMetaDataFormWidgetEditComponent, isStandalone: true, selector: "axp-meta-data-form-widget-edit", outputs: { contextChange: "contextChange", validityChange: "validityChange" }, viewQueries: [{ propertyName: "layoutRenderer", first: true, predicate: AXPLayoutRendererComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
9273
- @if (hasDefinitions()) {
9274
- <axp-layout-renderer
9275
- [layout]="formDefinition()"
9276
- [context]="getValue()"
9277
- [look]="'container'"
9278
- (contextChange)="onContextChange($event)"
9279
- (validityChange)="onValidityChange($event)"
9280
- >
9281
- </axp-layout-renderer>
9282
- } @else {
9283
- <axp-state-message
9284
- icon="fa-light fa-clipboard-list"
9285
- [title]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.title'"
9286
- [description]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.description'"
9287
- >
9288
- </axp-state-message>
9835
+ get display() {
9836
+ const val = this.getValue();
9837
+ return Array.isArray(val) ? val.map((v) => v.title || v.text).join(', ') : '';
9289
9838
  }
9290
- `, isInline: true, dependencies: [{ kind: "component", type: AXPLayoutRendererComponent, selector: "axp-layout-renderer", inputs: ["layout", "context", "look", "mode"], outputs: ["contextChange", "contextInitiated", "validityChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXPWidgetCoreModule }, { kind: "component", type: AXPStateMessageComponent, selector: "axp-state-message", inputs: ["mode", "icon", "title", "description", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9839
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataSelectorWidgetViewComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
9840
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: AXPMetaDataSelectorWidgetViewComponent, isStandalone: true, selector: "axp-meta-data-selector-widget-view", usesInheritance: true, ngImport: i0, template: `<span>{{ display }}</span>`, isInline: true, dependencies: [{ kind: "ngmodule", type: AXDecoratorModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
9291
9841
  }
9292
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataFormWidgetEditComponent, decorators: [{
9842
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: AXPMetaDataSelectorWidgetViewComponent, decorators: [{
9293
9843
  type: Component,
9294
- args: [{ selector: 'axp-meta-data-form-widget-edit', template: `
9295
- @if (hasDefinitions()) {
9296
- <axp-layout-renderer
9297
- [layout]="formDefinition()"
9298
- [context]="getValue()"
9299
- [look]="'container'"
9300
- (contextChange)="onContextChange($event)"
9301
- (validityChange)="onValidityChange($event)"
9302
- >
9303
- </axp-layout-renderer>
9304
- } @else {
9305
- <axp-state-message
9306
- icon="fa-light fa-clipboard-list"
9307
- [title]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.title'"
9308
- [description]="'@data-management:metadata-definitions.components.meta-data-selector.empty-states.no-metadata-definitions.description'"
9309
- >
9310
- </axp-state-message>
9311
- }
9312
- `, changeDetection: ChangeDetectionStrategy.OnPush, imports: [AXPLayoutRendererComponent, AXFormModule, AXLabelModule, AXPWidgetCoreModule, AXPStateMessageComponent] }]
9313
- }], propDecorators: { contextChange: [{ type: i0.Output, args: ["contextChange"] }], validityChange: [{ type: i0.Output, args: ["validityChange"] }], layoutRenderer: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPLayoutRendererComponent), { isSignal: true }] }] } });
9844
+ args: [{
9845
+ selector: 'axp-meta-data-selector-widget-view',
9846
+ template: `<span>{{ display }}</span>`,
9847
+ changeDetection: ChangeDetectionStrategy.OnPush,
9848
+ imports: [AXDecoratorModule],
9849
+ }]
9850
+ }] });
9314
9851
 
9315
- var metaDataFormEdit_component = /*#__PURE__*/Object.freeze({
9852
+ var metaDataSelectorView_component = /*#__PURE__*/Object.freeze({
9316
9853
  __proto__: null,
9317
- AXPMetaDataFormWidgetEditComponent: AXPMetaDataFormWidgetEditComponent
9854
+ AXPMetaDataSelectorWidgetViewComponent: AXPMetaDataSelectorWidgetViewComponent
9318
9855
  });
9319
9856
 
9320
- class ShowMetaDataFormPopupCommand {
9857
+ /**
9858
+ * Opens the meta-data-selector (configuration UI for groups/fields) in a popup.
9859
+ * Used when meta-data-selector plugin has display: 'popup' or 'both'.
9860
+ */
9861
+ class ShowMetaDataSelectorPopupCommand {
9321
9862
  constructor() {
9322
9863
  this.layoutBuilder = inject(AXPLayoutBuilderService);
9323
9864
  this.translationService = inject(AXTranslationService);
9324
9865
  this.entityService = inject(AXPEntityService);
9325
- this.entityRegistry = inject(AXPEntityDefinitionRegistryService);
9326
9866
  }
9327
9867
  async execute(input) {
9328
9868
  try {
9329
- // Extract evaluated options from __context__ (private/controlled data)
9330
- // The __context__.options contains evaluated expressions from entity actions
9331
9869
  const contextOptions = input.__context__?.options;
9332
- // Merge root-level input with evaluated options from __context__
9333
- // Root-level takes precedence if both exist
9334
9870
  const evaluatedInput = {
9335
9871
  ...contextOptions,
9336
9872
  ...input,
9337
- // Ensure we use evaluated options from __context__ if available
9338
9873
  ...(contextOptions ? contextOptions : {}),
9339
9874
  };
9340
- const { entity, id, field = META_DATA_FORM_FIELD, title, path } = evaluatedInput;
9875
+ const { entity, id, field = META_DATA_SELECTOR_FIELD, title, } = evaluatedInput;
9341
9876
  if (!entity || !id) {
9342
9877
  return {
9343
9878
  success: false,
@@ -9346,14 +9881,8 @@ class ShowMetaDataFormPopupCommand {
9346
9881
  },
9347
9882
  };
9348
9883
  }
9349
- // Ensure id is a string
9350
- if (typeof id !== 'string' && id != null) {
9351
- const stringId = String(id);
9352
- if (stringId) {
9353
- evaluatedInput.id = stringId;
9354
- }
9355
- }
9356
- if (!evaluatedInput.id || typeof evaluatedInput.id !== 'string') {
9884
+ const finalId = typeof id === 'string' ? id : String(id);
9885
+ if (!finalId) {
9357
9886
  return {
9358
9887
  success: false,
9359
9888
  message: {
@@ -9361,11 +9890,7 @@ class ShowMetaDataFormPopupCommand {
9361
9890
  },
9362
9891
  };
9363
9892
  }
9364
- const finalId = evaluatedInput.id;
9365
- // Get current entity record to get the metadata expression value
9366
- const [moduleName, entityName] = entity.split('.');
9367
- const dataAccessor = this.entityService.withEntity(entity).data();
9368
- const currentRecord = await dataAccessor.byKey(finalId);
9893
+ const currentRecord = await this.findRecord(entity, finalId);
9369
9894
  if (!currentRecord) {
9370
9895
  return {
9371
9896
  success: false,
@@ -9374,46 +9899,9 @@ class ShowMetaDataFormPopupCommand {
9374
9899
  },
9375
9900
  };
9376
9901
  }
9377
- // Note: pathValue might be null/undefined, but the metadata expression evaluator will handle it
9378
- // The expression will return an empty array if pathValue is not available
9379
- // Resolve entity to get metadata expression and determine if it's category or entity lookup
9380
- const entityDef = await this.entityRegistry.resolve(moduleName, entityName);
9381
- const metaDataFormExt = entityDef.extensions?.metaDataForm?.[field];
9382
- if (!metaDataFormExt) {
9383
- return {
9384
- success: false,
9385
- message: {
9386
- text: await this.translationService.translateAsync('@data-management:metadata-definitions.messages.meta-data-form-not-configured'),
9387
- },
9388
- };
9389
- }
9390
- // Get path property to determine metadata source type
9391
- const props = entityDef.properties || [];
9392
- const pathProperty = props.find((p) => p.name === path);
9393
- const targetEntity = pathProperty?.schema?.interface?.options?.['entity'];
9394
- if (!targetEntity) {
9395
- return {
9396
- success: false,
9397
- message: {
9398
- text: await this.translationService.translateAsync('@data-management:metadata-definitions.messages.invalid-path-field'),
9399
- },
9400
- };
9401
- }
9402
- // Build metadata expression based on target entity type
9403
- let metadataExpression;
9404
- if (targetEntity.endsWith('Category')) {
9405
- // Category lookup - use fromCategory
9406
- metadataExpression = `{{ metadata.fromCategory("${entity}", context.eval('${path}')) }}`;
9407
- }
9408
- else {
9409
- // Relationship lookup - use fromEntity
9410
- metadataExpression = `{{ metadata.fromEntity("${targetEntity}", context.eval('${path}')) }}`;
9411
- }
9412
- // Get current meta data form value
9413
- const currentMetaDataValue = currentRecord[field] || {};
9414
- // Build dialog title
9415
- const dialogTitle = title || metaDataFormExt.title || await this.translationService.translateAsync('@data-management:metadata-definitions.components.meta-data-form.title');
9416
- // Open dialog with meta-data-form-editor widget
9902
+ const currentSelectorValue = currentRecord[field] ?? { groups: [] };
9903
+ const dialogTitle = title ??
9904
+ (await this.translationService.translateAsync('@data-management:metadata-definitions.actions.configure-meta-data.title'));
9417
9905
  const result = await this.layoutBuilder
9418
9906
  .create()
9419
9907
  .dialog((dialog) => {
@@ -9423,19 +9911,16 @@ class ShowMetaDataFormPopupCommand {
9423
9911
  .setCloseButton(true)
9424
9912
  .setContext({
9425
9913
  ...currentRecord,
9426
- [field]: currentMetaDataValue,
9914
+ [field]: currentSelectorValue,
9427
9915
  })
9428
9916
  .content((layout) => {
9429
9917
  layout.flex((flex) => {
9430
9918
  flex.setDirection('column').setGap('16px');
9431
- // Add meta-data-form-editor widget with metadata expression
9432
9919
  flex.formField('', (fieldBuilder) => {
9433
9920
  fieldBuilder
9434
9921
  .path(field)
9435
9922
  .setShowLabel(false)
9436
- .customWidget('meta-data-form-editor', {
9437
- groups: metadataExpression,
9438
- });
9923
+ .customWidget('meta-data-selector-editor', {});
9439
9924
  });
9440
9925
  });
9441
9926
  })
@@ -9450,10 +9935,8 @@ class ShowMetaDataFormPopupCommand {
9450
9935
  if (!context || action === 'cancel') {
9451
9936
  return { success: false };
9452
9937
  }
9453
- const updateData = {
9454
- [field]: context[field],
9455
- };
9456
- const updated = await dataAccessor.update(finalId, updateData);
9938
+ const updateData = { [field]: context[field] };
9939
+ const updated = await this.updateRecord(entity, finalId, updateData);
9457
9940
  return {
9458
9941
  success: true,
9459
9942
  data: updated,
@@ -9470,24 +9953,41 @@ class ShowMetaDataFormPopupCommand {
9470
9953
  return {
9471
9954
  success: false,
9472
9955
  message: {
9473
- text: error instanceof Error ? error.message : 'Failed to show meta data form popup',
9956
+ text: error instanceof Error
9957
+ ? error.message
9958
+ : 'Failed to show meta data selector popup',
9474
9959
  },
9475
9960
  };
9476
9961
  }
9477
9962
  }
9478
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataFormPopupCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9479
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataFormPopupCommand, providedIn: 'root' }); }
9963
+ //#region ---- Overridable Methods ----
9964
+ /**
9965
+ * Loads a record by entity and id. Override to use custom data sources or key handling.
9966
+ */
9967
+ findRecord(entity, id) {
9968
+ const dataAccessor = this.entityService.withEntity(entity).data();
9969
+ return dataAccessor.byKey(id);
9970
+ }
9971
+ /**
9972
+ * Persists meta-data changes. Override to use custom persistence or validation.
9973
+ */
9974
+ updateRecord(entity, id, data) {
9975
+ const dataAccessor = this.entityService.withEntity(entity).data();
9976
+ return dataAccessor.update(id, data);
9977
+ }
9978
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataSelectorPopupCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
9979
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataSelectorPopupCommand, providedIn: 'root' }); }
9480
9980
  }
9481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataFormPopupCommand, decorators: [{
9981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ShowMetaDataSelectorPopupCommand, decorators: [{
9482
9982
  type: Injectable,
9483
9983
  args: [{
9484
9984
  providedIn: 'root',
9485
9985
  }]
9486
9986
  }] });
9487
9987
 
9488
- var showMetaDataFormPopup_command = /*#__PURE__*/Object.freeze({
9988
+ var showMetaDataSelectorPopup_command = /*#__PURE__*/Object.freeze({
9489
9989
  __proto__: null,
9490
- ShowMetaDataFormPopupCommand: ShowMetaDataFormPopupCommand
9990
+ ShowMetaDataSelectorPopupCommand: ShowMetaDataSelectorPopupCommand
9491
9991
  });
9492
9992
 
9493
9993
  /**
@@ -10047,6 +10547,10 @@ class AXMDataManagementModule {
10047
10547
  key: 'show-meta-data-form-popup',
10048
10548
  command: () => Promise.resolve().then(function () { return showMetaDataFormPopup_command; }).then((c) => c.ShowMetaDataFormPopupCommand),
10049
10549
  },
10550
+ {
10551
+ key: 'show-meta-data-selector-popup',
10552
+ command: () => Promise.resolve().then(function () { return showMetaDataSelectorPopup_command; }).then((c) => c.ShowMetaDataSelectorPopupCommand),
10553
+ },
10050
10554
  ]),
10051
10555
  // Module Manifest Provider
10052
10556
  {
@@ -10145,6 +10649,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
10145
10649
  key: 'show-meta-data-form-popup',
10146
10650
  command: () => Promise.resolve().then(function () { return showMetaDataFormPopup_command; }).then((c) => c.ShowMetaDataFormPopupCommand),
10147
10651
  },
10652
+ {
10653
+ key: 'show-meta-data-selector-popup',
10654
+ command: () => Promise.resolve().then(function () { return showMetaDataSelectorPopup_command; }).then((c) => c.ShowMetaDataSelectorPopupCommand),
10655
+ },
10148
10656
  ]),
10149
10657
  // Module Manifest Provider
10150
10658
  {
@@ -10191,5 +10699,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
10191
10699
  * Generated bundle index. Do not edit.
10192
10700
  */
10193
10701
 
10194
- export { AXMColumnFilterSelectorWidget, AXMColumnFilterSelectorWidgetColumnComponent, AXMColumnFilterSelectorWidgetEditComponent, AXMColumnFilterSelectorWidgetFilterComponent, AXMColumnFilterSelectorWidgetPrintComponent, AXMColumnFilterSelectorWidgetViewComponent, AXMDataManagementFeatureKeys, AXMDataManagementModule, AXMDataSourceEntityModule, AXMDataSourceOutputType, AXMDataSourceService, AXMDataSourceServiceImpl, AXMDataSourceType, AXMDefaultAggregateFunctionProvider, AXMDefaultDatabaseTypeProvider, AXMEntityProvider, AXMMenuProvider, AXMMetaDataDefinitionEntityModule, AXMMetaDataDefinitionService, AXMMetaDataFeatureModule, AXMMetadataEvaluatorScopeProvider, AXMPMetaDataDefinitionServiceImpl, AXMPermissionsKeys, AXMQueryEntityModule, AXMQueryService, AXMQueryServiceImpl, AXMTagEntityModule, AXMTagEntityService, AXMTagsFeatureModule, AXM_COLUMN_DEF_WIDGET, AXM_FILTER_DEF_WIDGET, AXPAggregateBuilderComponent, AXPAggregateFunctionService, AXPAggregateFunctionsRegistry, AXPColumnsBuilderComponent, AXPDataManagementMenuKeys, AXPDatabaseTypeService, AXPGroupByBuilderComponent, AXPQueryBuilderComponent, AXPQueryBuilderWidget, AXPQueryBuilderWidgetColumnComponent, AXPQueryBuilderWidgetDesignerComponent, AXPQueryBuilderWidgetEditComponent, AXPQueryBuilderWidgetViewComponent, AXPRawQueryBuilderComponent, AXPSortBuilderComponent, AXPSystemTagProvider, AXPWhereBuilderComponent, AXP_AGGREGATE_FUNCTION_PROVIDER, AXP_DATABASE_TYPE_PROVIDER, AXP_DEFAULT_AGGREGATE_FUNCTION_PROVIDER, AXP_DEFAULT_DATABASE_TYPE_PROVIDER, META_DATA_FORM_FIELD, META_DATA_SELECTOR_FIELD, RootConfig, dataSourceEntityFactory, factory, metaDataDefinitionFactory, queryFactory, tagsPlugin };
10702
+ export { AXMColumnFilterSelectorWidget, AXMColumnFilterSelectorWidgetColumnComponent, AXMColumnFilterSelectorWidgetEditComponent, AXMColumnFilterSelectorWidgetFilterComponent, AXMColumnFilterSelectorWidgetPrintComponent, AXMColumnFilterSelectorWidgetViewComponent, AXMDataManagementFeatureKeys, AXMDataManagementModule, AXMDataSourceEntityModule, AXMDataSourceOutputType, AXMDataSourceService, AXMDataSourceServiceImpl, AXMDataSourceType, AXMDefaultAggregateFunctionProvider, AXMDefaultDatabaseTypeProvider, AXMEntityProvider, AXMMenuProvider, AXMMetaDataDefinitionEntityModule, AXMMetaDataDefinitionService, AXMMetaDataFeatureModule, AXMMetadataEvaluatorScopeProvider, AXMPMetaDataDefinitionServiceImpl, AXMPermissionsKeys, AXMQueryEntityModule, AXMQueryService, AXMQueryServiceImpl, AXMTagEntityModule, AXMTagEntityService, AXMTagsFeatureModule, AXM_COLUMN_DEF_WIDGET, AXM_FILTER_DEF_WIDGET, AXPAggregateBuilderComponent, AXPAggregateFunctionService, AXPAggregateFunctionsRegistry, AXPColumnsBuilderComponent, AXPDataManagementMenuKeys, AXPDatabaseTypeService, AXPGroupByBuilderComponent, AXPMetaDataFormWidget, AXPMetaDataFormWidgetEditComponent, AXPMetaDataSelectorWidget, AXPMetaDataSelectorWidgetEditComponent, AXPMetaDataSelectorWidgetViewComponent, AXPQueryBuilderComponent, AXPQueryBuilderWidget, AXPQueryBuilderWidgetColumnComponent, AXPQueryBuilderWidgetDesignerComponent, AXPQueryBuilderWidgetEditComponent, AXPQueryBuilderWidgetViewComponent, AXPRawQueryBuilderComponent, AXPSortBuilderComponent, AXPSystemTagProvider, AXPWhereBuilderComponent, AXP_AGGREGATE_FUNCTION_PROVIDER, AXP_DATABASE_TYPE_PROVIDER, AXP_DEFAULT_AGGREGATE_FUNCTION_PROVIDER, AXP_DEFAULT_DATABASE_TYPE_PROVIDER, META_DATA_FORM_FIELD, META_DATA_SELECTOR_FIELD, RootConfig, ShowMetaDataFormPopupCommand, ShowMetaDataSelectorPopupCommand, convertStateToValue, convertValueToState, createDefaultGroup, dataSourceEntityFactory, equipmentFactory, factory, metaDataDefinitionFactory, metaDataSelectorPlugin, queryFactory, tagsPlugin };
10195
10703
  //# sourceMappingURL=acorex-modules-data-management.mjs.map