@acorex-platform/module-workplacesafety-management-client 2.0.0-next.50 → 2.0.0-next.55

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 (86) hide show
  1. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-WoADykTl.mjs → acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-B4ztvsfz.mjs} +27 -27
  2. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-WoADykTl.mjs.map → acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-B4ztvsfz.mjs.map} +1 -1
  3. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-C46YEBVd.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-BB9oJlDT.mjs} +16 -16
  4. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-C46YEBVd.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-BB9oJlDT.mjs.map} +1 -1
  5. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-oylKTsgJ.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-DKz8Nk0U.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-oylKTsgJ.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-hierarchy-levels.entity-DKz8Nk0U.mjs.map} +1 -1
  7. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-DHm1nRwW.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-lhvf7uyZ.mjs} +2 -2
  8. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-DHm1nRwW.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-control-measure.entity-lhvf7uyZ.mjs.map} +1 -1
  9. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-DH-hPuAD.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-Nzs2PYMN.mjs} +2 -2
  10. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-DH-hPuAD.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-ppe-rule.entity-Nzs2PYMN.mjs.map} +1 -1
  11. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-g4AT_IiT.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-CMnad-mC.mjs} +2 -2
  12. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-g4AT_IiT.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-register.entity-CMnad-mC.mjs.map} +1 -1
  13. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-BwNlWbnC.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-DTRMT8Ry.mjs} +3 -3
  14. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-BwNlWbnC.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard-risk.entity-DTRMT8Ry.mjs.map} +1 -1
  15. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-Cogwbd1P.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-CLxjKrxo.mjs} +2 -2
  16. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-Cogwbd1P.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-hazard.entity-CLxjKrxo.mjs.map} +1 -1
  17. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-0xqGaPnk.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-DOGMVCyX.mjs} +2 -2
  18. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-0xqGaPnk.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-ppe-item.entity-DOGMVCyX.mjs.map} +1 -1
  19. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-risk-management.integration-CUZIl8zt.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-risk-management.integration-T7XtDUR4.mjs} +1 -1
  20. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-risk-management.integration-CUZIl8zt.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-risk-management.integration-T7XtDUR4.mjs.map} +1 -1
  21. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-activity.entity-CZCYupQT.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-activity.entity-BjDmpnqp.mjs} +3 -3
  22. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-activity.entity-CZCYupQT.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-activity.entity-BjDmpnqp.mjs.map} +1 -1
  23. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-D0fzHV_L.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-hnIchzs_.mjs} +3 -3
  24. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-D0fzHV_L.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section-dependency-hnIchzs_.mjs.map} +1 -1
  25. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-BpziBgGf.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-B-ZO45Jb.mjs} +3 -3
  26. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-BpziBgGf.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-section.entity-B-ZO45Jb.mjs.map} +1 -1
  27. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-D8wL0ned.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-CWStJXeo.mjs} +3 -3
  28. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-D8wL0ned.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type-section.entity-CWStJXeo.mjs.map} +1 -1
  29. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-DrqQDYn9.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-Cb4ZTolO.mjs} +2 -2
  30. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-DrqQDYn9.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan-type.entity-Cb4ZTolO.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-DaRnWCin.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-DIi-StOp.mjs} +2 -2
  32. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-DaRnWCin.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-plan.entity-DIi-StOp.mjs.map} +1 -1
  33. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-Coj5Rzry.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-DqIBG63v.mjs} +2 -2
  34. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-Coj5Rzry.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-safety-template.entity-DqIBG63v.mjs.map} +1 -1
  35. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-BU5roQ5-.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-DNLr6QxL.mjs} +2 -2
  36. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-BU5roQ5-.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-section-type.entity-DNLr6QxL.mjs.map} +1 -1
  37. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-DijGV30H.mjs → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-2qkwyh7a.mjs} +3 -3
  38. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-DijGV30H.mjs.map → acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog-work-step-type.entity-2qkwyh7a.mjs.map} +1 -1
  39. package/fesm2022/acorex-platform-module-workplacesafety-management-client-contracts-entity-catalog.mjs +1 -1
  40. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-CplIrmy1.mjs → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-CLmWHTfS.mjs} +3 -3
  41. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-CplIrmy1.mjs.map → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram-widget-view.component-CLmWHTfS.mjs.map} +1 -1
  42. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-B4Xem1ro.mjs → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-bohOkOIV.mjs} +4 -4
  43. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-B4Xem1ro.mjs.map → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.component-bohOkOIV.mjs.map} +1 -1
  44. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-tMrUDnCb.mjs → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-B0aLa6KF.mjs} +1 -1
  45. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-tMrUDnCb.mjs.map → acorex-platform-module-workplacesafety-management-client-control-hierarchy-diagram.service-B0aLa6KF.mjs.map} +1 -1
  46. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-fill-safety-plan.command-MUyZCEGu.mjs → acorex-platform-module-workplacesafety-management-client-fill-safety-plan.command-By_pSGSY.mjs} +4 -4
  47. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-fill-safety-plan.command-MUyZCEGu.mjs.map → acorex-platform-module-workplacesafety-management-client-fill-safety-plan.command-By_pSGSY.mjs.map} +1 -1
  48. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-hazard-ppe-rule-status.provider-6ZWaO5DG.mjs → acorex-platform-module-workplacesafety-management-client-hazard-ppe-rule-status.provider-XUpvOWyt.mjs} +1 -1
  49. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-hazard-ppe-rule-status.provider-6ZWaO5DG.mjs.map → acorex-platform-module-workplacesafety-management-client-hazard-ppe-rule-status.provider-XUpvOWyt.mjs.map} +1 -1
  50. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-hazard-risk-status.provider-B6IkRYbW.mjs → acorex-platform-module-workplacesafety-management-client-hazard-risk-status.provider-hCnzjOe7.mjs} +1 -1
  51. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-hazard-risk-status.provider-B6IkRYbW.mjs.map → acorex-platform-module-workplacesafety-management-client-hazard-risk-status.provider-hCnzjOe7.mjs.map} +1 -1
  52. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-BxVoD0Xb.mjs → acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-SFRvQ81J.mjs} +2 -2
  53. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-BxVoD0Xb.mjs.map → acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-SFRvQ81J.mjs.map} +1 -1
  54. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-load-safety-plan-preview-structure-B2GOM4uJ.mjs → acorex-platform-module-workplacesafety-management-client-load-safety-plan-preview-structure-072LSKo7.mjs} +3 -3
  55. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-load-safety-plan-preview-structure-B2GOM4uJ.mjs.map → acorex-platform-module-workplacesafety-management-client-load-safety-plan-preview-structure-072LSKo7.mjs.map} +1 -1
  56. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-column.component-D2Mmow12.mjs → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-column.component-D4bhgV8u.mjs} +2 -2
  57. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-column.component-D2Mmow12.mjs.map → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-column.component-D4bhgV8u.mjs.map} +1 -1
  58. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-edit.component-B5qY_1PI.mjs → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-edit.component-CUwa70wq.mjs} +5 -5
  59. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-edit.component-B5qY_1PI.mjs.map → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer-widget-edit.component-CUwa70wq.mjs.map} +1 -1
  60. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-BxcGph1I.mjs → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-B_TuM6zB.mjs} +6 -6
  61. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-BxcGph1I.mjs.map → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.service-B_TuM6zB.mjs.map} +1 -1
  62. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-2Kl3_3sg.mjs → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-BTR9I8Te.mjs} +1 -1
  63. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-2Kl3_3sg.mjs.map → acorex-platform-module-workplacesafety-management-client-ppe-item-viewer.util-BTR9I8Te.mjs.map} +1 -1
  64. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-Dd9xdo_y.mjs → acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-BfuvjV_F.mjs} +2 -2
  65. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-Dd9xdo_y.mjs.map → acorex-platform-module-workplacesafety-management-client-preview-control-hierarchy-diagram.command-BfuvjV_F.mjs.map} +1 -1
  66. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-BqRFFXZO.mjs → acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-B6HKY2jC.mjs} +4 -4
  67. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-BqRFFXZO.mjs.map → acorex-platform-module-workplacesafety-management-client-preview-safety-plan.command-B6HKY2jC.mjs.map} +1 -1
  68. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-publish-safety-plan.command-Ci-zcrmO.mjs → acorex-platform-module-workplacesafety-management-client-publish-safety-plan.command-BiBLNqr4.mjs} +1 -1
  69. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-publish-safety-plan.command-Ci-zcrmO.mjs.map → acorex-platform-module-workplacesafety-management-client-publish-safety-plan.command-BiBLNqr4.mjs.map} +1 -1
  70. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-fill-values.util-RLOdySf7.mjs → acorex-platform-module-workplacesafety-management-client-safety-plan-fill-values.util-m4eQ5zx3.mjs} +1 -1
  71. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-fill-values.util-RLOdySf7.mjs.map → acorex-platform-module-workplacesafety-management-client-safety-plan-fill-values.util-m4eQ5zx3.mjs.map} +1 -1
  72. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-DNeDu1Q8.mjs → acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-omdGHrWD.mjs} +19 -19
  73. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-DNeDu1Q8.mjs.map → acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-omdGHrWD.mjs.map} +1 -1
  74. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs → acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-DQX6nPWP.mjs} +1 -1
  75. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs.map → acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-DQX6nPWP.mjs.map} +1 -1
  76. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-index-x3bUQx1Y.mjs → acorex-platform-module-workplacesafety-management-client-safety-plan-sections-page-Bj0ZofWy.mjs} +8 -8
  77. package/fesm2022/acorex-platform-module-workplacesafety-management-client-safety-plan-sections-page-Bj0ZofWy.mjs.map +1 -0
  78. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-status.provider-BpWx3gIf.mjs → acorex-platform-module-workplacesafety-management-client-safety-plan-status.provider-BjdJDKHn.mjs} +1 -1
  79. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-safety-plan-status.provider-BpWx3gIf.mjs.map → acorex-platform-module-workplacesafety-management-client-safety-plan-status.provider-BjdJDKHn.mjs.map} +1 -1
  80. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-D0aRQHWk.mjs → acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-CQqJ-p5u.mjs} +2 -2
  81. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-D0aRQHWk.mjs.map → acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-CQqJ-p5u.mjs.map} +1 -1
  82. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-show-job-doc-setup.command-B0g4JL0B.mjs → acorex-platform-module-workplacesafety-management-client-show-job-doc-setup.command-YJ1FDIR3.mjs} +1 -1
  83. package/fesm2022/{acorex-platform-module-workplacesafety-management-client-show-job-doc-setup.command-B0g4JL0B.mjs.map → acorex-platform-module-workplacesafety-management-client-show-job-doc-setup.command-YJ1FDIR3.mjs.map} +1 -1
  84. package/fesm2022/acorex-platform-module-workplacesafety-management-client.mjs +1 -1
  85. package/package.json +2 -2
  86. package/fesm2022/acorex-platform-module-workplacesafety-management-client-index-x3bUQx1Y.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-DNeDu1Q8.mjs","sources":["../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/catalog-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/catalog-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/hierarchy-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/hierarchy-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/ppe-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/ppe-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-preview.util.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/risk-matrix-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/risk-matrix-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/activity-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/activity-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-preview-modal.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-preview-modal.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-catalog-section-preview',\n templateUrl: './catalog-section-preview.component.html',\n styleUrl: './catalog-section-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXTranslationModule, AsyncPipe],\n host: {\n class: 'axm-catalog-section-preview block',\n },\n})\nexport class AXMCatalogSectionPreviewComponent {\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n}\n\n//#endregion\n","<div class=\"axm-catalog-section-preview\">\n @if (items().length > 0) {\n <!-- ----- Linked catalog items as a document bullet list ----- -->\n <ul class=\"__list\">\n @for (item of items(); track item.id) {\n <li class=\"__item\">\n <span class=\"__title\">{{ item.title }}</span>\n <!--->\n <!-- ----- Optional business code after the item title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </li>\n }\n </ul>\n }\n <!-- ----- Empty catalog section ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\n\nimport { AXMControlHierarchyDiagramComponent } from '../control-hierarchy-diagram/control-hierarchy-diagram.component';\nimport { AXMControlHierarchyDiagramService } from '../control-hierarchy-diagram/control-hierarchy-diagram.service';\nimport {\n resolveControlHierarchyDiagramViewType,\n type AXMControlHierarchyDiagramItem,\n type AXMControlHierarchyDiagramViewType,\n} from '../control-hierarchy-diagram/control-hierarchy-diagram.types';\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-hierarchy-section-preview',\n templateUrl: './hierarchy-section-preview.component.html',\n styleUrl: './hierarchy-section-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMControlHierarchyDiagramComponent],\n host: {\n class: 'axm-hierarchy-section-preview block',\n },\n})\nexport class AXMHierarchySectionPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly diagramService = inject(AXMControlHierarchyDiagramService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n readonly viewType = input<unknown>();\n readonly showTitle = input<boolean | undefined>(undefined);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly diagramItems = signal<AXMControlHierarchyDiagramItem[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly resolvedViewType = computed<AXMControlHierarchyDiagramViewType>(() =>\n resolveControlHierarchyDiagramViewType(this.viewType() as Parameters<typeof resolveControlHierarchyDiagramViewType>[0]),\n );\n\n protected readonly resolvedShowTitle = computed(() => this.showTitle() === true);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly loadItems = effect((onCleanup) => {\n const catalogItems = this.items();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n void this.refresh(catalogItems, () => cancelled);\n });\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async refresh(\n catalogItems: AXMSafetyPlanPreviewCatalogItem[],\n isCancelled: () => boolean,\n ): Promise<void> {\n if (catalogItems.length === 0) {\n this.diagramItems.set([]);\n return;\n }\n\n try {\n const loaded = await this.diagramService.loadDiagramItemsByLevelIds(catalogItems.map((item) => item.id));\n if (!isCancelled()) {\n this.diagramItems.set(loaded);\n }\n } catch {\n if (!isCancelled()) {\n this.diagramItems.set([]);\n }\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Control hierarchy diagram using saved section widget options ----- -->\n<axm-control-hierarchy-diagram\n [viewType]=\"resolvedViewType()\"\n [items]=\"diagramItems()\"\n [showTitle]=\"resolvedShowTitle()\"\n [showViewTypeSelector]=\"false\"\n/>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, output, signal } from '@angular/core';\n\nimport { AXMPpeItemViewerComponent } from '../ppe-item-viewer/ppe-item-viewer.component';\nimport { AXMPpeItemViewerService } from '../ppe-item-viewer/ppe-item-viewer.service';\nimport type { AXMPpeItemViewerDisplayItem, AXMPpeItemViewerLayout } from '../ppe-item-viewer/ppe-item-viewer.types';\nimport { extractPpeItemIds, resolvePpeItemViewerLayout } from '../ppe-item-viewer/ppe-item-viewer.util';\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-ppe-section-preview',\n templateUrl: './ppe-section-preview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMPpeItemViewerComponent],\n host: {\n class: 'axm-ppe-section-preview block',\n },\n})\nexport class AXMPpeSectionPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly ppeItemViewerService = inject(AXMPpeItemViewerService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n readonly layout = input<unknown>();\n readonly value = input<unknown>(undefined);\n readonly editable = input(false);\n\n //#endregion\n\n //#region ----- Outputs -----\n\n readonly valueChange = output<unknown>();\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(false);\n protected readonly displayItems = signal<AXMPpeItemViewerDisplayItem[]>([]);\n protected readonly selectedIds = signal<string[]>([]);\n\n protected readonly resolvedLayout = computed<AXMPpeItemViewerLayout>(() =>\n resolvePpeItemViewerLayout(this.layout() as Parameters<typeof resolvePpeItemViewerLayout>[0]),\n );\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly applyStoredValue = effect(() => {\n this.selectedIds.set(extractPpeItemIds(this.value()));\n });\n\n private readonly loadItems = effect((onCleanup) => {\n const catalogItems = this.items();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n void this.refresh(catalogItems, () => cancelled);\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onSelectedIdsChange(ids: string[]): void {\n if (!this.editable()) {\n return;\n }\n this.selectedIds.set(ids);\n this.valueChange.emit(ids);\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async refresh(\n catalogItems: AXMSafetyPlanPreviewCatalogItem[],\n isCancelled: () => boolean,\n ): Promise<void> {\n if (catalogItems.length === 0) {\n this.displayItems.set([]);\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n const fallback = catalogItems.map((item) => this.toDisplayItem(item));\n try {\n const loaded = await this.ppeItemViewerService.loadDisplayItems(catalogItems.map((item) => item.id));\n if (isCancelled()) {\n return;\n }\n const byId = new Map(loaded.map((row) => [row.id, row]));\n this.displayItems.set(fallback.map((item) => byId.get(item.id) ?? item));\n } catch {\n if (!isCancelled()) {\n this.displayItems.set(fallback);\n }\n } finally {\n if (!isCancelled()) {\n this.loading.set(false);\n }\n }\n }\n\n private toDisplayItem(item: AXMSafetyPlanPreviewCatalogItem): AXMPpeItemViewerDisplayItem {\n return {\n id: item.id,\n title: item.title,\n code: item.code,\n imageUrl: null,\n };\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- PPE Item viewer; checks are workflow fill values, not the section catalog ----- -->\n<axm-ppe-item-viewer\n [items]=\"displayItems()\"\n [layout]=\"resolvedLayout()\"\n [selectedIds]=\"selectedIds()\"\n [loading]=\"loading()\"\n [readonly]=\"!editable()\"\n (selectedIdsChange)=\"onSelectedIdsChange($event)\"\n/>\n","//#region ----- Imports -----\n\nimport { resolveEntityRowDisplayText } from '@acorex-platform/framework-client/common';\nimport {\n isActivitySectionType,\n resolveSectionTypeKey,\n type AXMSafetyPlanSectionBuilderItemValue,\n type AXMSafetyPlanSectionBuilderSectionValue,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nimport type {\n AXMSafetyPlanPreviewCatalogItem,\n AXMSafetyPlanSectionPreviewKind,\n} from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Display helpers -----\n\nexport function toSafetyPlanPreviewDisplayText(value: unknown, locale: string): string {\n return resolveEntityRowDisplayText(value, locale).trim();\n}\n\nexport function resolveSafetyPlanPreviewSectionTitle(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n locale: string,\n): string {\n return (\n toSafetyPlanPreviewDisplayText(section.title, locale) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.title, locale) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.code, locale)\n );\n}\n\n/**\n * Maps a section type to a preview renderer. New document kinds (SWMS, JSA, SOP, Permit)\n * can add cases here without changing the editor.\n */\nexport function resolveSafetyPlanSectionPreviewKind(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n): AXMSafetyPlanSectionPreviewKind {\n if (isActivitySectionType(section.sectionTypeId, section.sectionType)) {\n return 'activity';\n }\n if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'RiskMatrix') {\n return 'risk-matrix';\n }\n if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'Ppe') {\n return 'ppe';\n }\n if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'HierarchyLevel') {\n return 'hierarchy';\n }\n return 'catalog';\n}\n\n/** True when the section has at least one previewable item (catalog row or activity row). */\nexport function safetyPlanPreviewSectionHasItems(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n): boolean {\n if (isActivitySectionType(section.sectionTypeId, section.sectionType)) {\n return (section.items ?? []).some((item) => {\n const row = item.activityRow;\n const snapshotTitle = item.items?.[0]?.title;\n return Boolean(row?.title?.trim() || snapshotTitle?.trim());\n });\n }\n return collectSafetyPlanPreviewCatalogItems(section, '').length > 0;\n}\n\nexport function collectSafetyPlanPreviewCatalogItems(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n locale: string,\n): AXMSafetyPlanPreviewCatalogItem[] {\n const linked: AXMSafetyPlanPreviewCatalogItem[] = [];\n const seen = new Set<string>();\n\n for (const slot of section.items ?? []) {\n for (const item of flattenCatalogSlot(slot, locale)) {\n if (!item.id || seen.has(item.id)) {\n continue;\n }\n seen.add(item.id);\n linked.push(item);\n }\n }\n\n return linked;\n}\n\nfunction flattenCatalogSlot(\n slot: AXMSafetyPlanSectionBuilderItemValue,\n locale: string,\n): AXMSafetyPlanPreviewCatalogItem[] {\n const ids = Array.isArray(slot.itemIds) ? slot.itemIds : [];\n const snapshots = Array.isArray(slot.items) ? slot.items : [];\n const items: AXMSafetyPlanPreviewCatalogItem[] = [];\n\n for (let index = 0; index < ids.length; index += 1) {\n const id = String(ids[index] ?? '').trim();\n if (!id) {\n continue;\n }\n const snapshot = snapshots.find((entry) => entry?.id === id) ?? snapshots[index];\n const title =\n toSafetyPlanPreviewDisplayText(snapshot?.title, locale) ||\n String(snapshot?.code ?? '').trim() ||\n id;\n items.push({\n id,\n title,\n code: snapshot?.code,\n });\n }\n\n if (items.length === 0 && snapshots.length > 0) {\n for (const snapshot of snapshots) {\n const id = String(snapshot?.id ?? '').trim();\n if (!id) {\n continue;\n }\n items.push({\n id,\n title: toSafetyPlanPreviewDisplayText(snapshot.title, locale) || String(snapshot.code ?? '').trim() || id,\n code: snapshot.code,\n });\n }\n }\n\n return items;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService, AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWidgetsList, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { RISK_MANAGEMENT_RISK_MATRIX_ENTITY } from '@acorex-platform/module-workplacesafety-management-client/contracts';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep } from 'lodash';\n\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\nimport { toSafetyPlanPreviewDisplayText } from './safety-plan-preview.util';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXMRiskMatrixRecord {\n id: string;\n title?: unknown;\n code?: unknown;\n}\n\ninterface AXMRiskMatrixPreviewItem {\n id: string;\n title: string;\n code?: string;\n context: Record<string, unknown>;\n layout: AXPWidgetNode;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-risk-matrix-preview',\n templateUrl: './risk-matrix-preview.component.html',\n styleUrl: './risk-matrix-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, AXLoadingModule, AXTranslationModule, AXPLayoutRendererComponent],\n host: {\n class: 'axm-risk-matrix-preview block',\n },\n})\nexport class AXMRiskMatrixPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(false);\n protected readonly matrices = signal<AXMRiskMatrixPreviewItem[]>([]);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly loadItems = effect((onCleanup) => {\n const catalogItems = this.items();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n void this.refresh(catalogItems, () => cancelled);\n });\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async refresh(\n catalogItems: AXMSafetyPlanPreviewCatalogItem[],\n isCancelled: () => boolean,\n ): Promise<void> {\n if (catalogItems.length === 0) {\n this.matrices.set([]);\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n try {\n const loaded = await this.queryByIds(catalogItems.map((item) => item.id));\n if (isCancelled()) {\n return;\n }\n const byId = new Map(loaded.map((row) => [row.id, row]));\n const locale = this.translationService.getActiveLang() ?? 'en-US';\n this.matrices.set(\n catalogItems.flatMap((item) => {\n const row = byId.get(item.id);\n if (!row) {\n return [];\n }\n return [this.toPreviewItem(item, row, locale)];\n }),\n );\n } catch {\n if (!isCancelled()) {\n this.matrices.set([]);\n }\n } finally {\n if (!isCancelled()) {\n this.loading.set(false);\n }\n }\n }\n\n private async queryByIds(ids: string[]): Promise<AXMRiskMatrixRecord[]> {\n const dataAccessor = this.entityService\n .withEntity(RISK_MANAGEMENT_RISK_MATRIX_ENTITY)\n .data<string, AXMRiskMatrixRecord>();\n\n try {\n const result = await dataAccessor.query({\n skip: 0,\n take: Math.max(ids.length, 100),\n filter:\n ids.length === 1\n ? { field: 'id', operator: { type: 'equal' }, value: ids[0] }\n : { field: 'id', operator: { type: 'in' }, value: ids },\n });\n return result?.items ?? [];\n } catch {\n const loaded: AXMRiskMatrixRecord[] = [];\n for (const id of ids) {\n try {\n const row = await dataAccessor.byKey(id);\n if (row) {\n loaded.push(row);\n }\n } catch {\n /* skip missing rows */\n }\n }\n return loaded;\n }\n }\n\n private toPreviewItem(\n catalogItem: AXMSafetyPlanPreviewCatalogItem,\n row: AXMRiskMatrixRecord,\n locale: string,\n ): AXMRiskMatrixPreviewItem {\n const code = typeof row.code === 'string' ? row.code.trim() : catalogItem.code;\n return {\n id: catalogItem.id,\n title: toSafetyPlanPreviewDisplayText(row.title, locale) || catalogItem.title,\n code: code && code.length > 0 ? code : undefined,\n context: { ...row },\n layout: cloneDeep(this.buildMatrixLayout()),\n };\n }\n\n //#endregion\n\n //#region ----- Layout -----\n\n private buildMatrixLayout(): AXPWidgetNode {\n return this.layoutBuilder\n .create()\n .flex((flex) => {\n flex.mode('view').setDirection('column');\n flex.formField('', (field) => {\n field\n .path('cells')\n .setShowLabel(false)\n .mode('view')\n .customWidget(AXPWidgetsList.Editors.RiskMatrix, { readonly: true });\n });\n })\n .build();\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-risk-matrix-preview\">\n @if (loading()) {\n <!-- ----- Loading indicator while risk matrix records are fetched ----- -->\n <ax-loading></ax-loading>\n }\n <!-- ----- Empty state when no risk matrices are selected ----- -->\n @else if (matrices().length === 0) {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n <!-- ----- Selected risk matrices rendered with the RiskMatrix widget ----- -->\n @else {\n <div class=\"__items\">\n @for (item of matrices(); track item.id) {\n <article class=\"__item\">\n <header class=\"__item-header\">\n <h4 class=\"__item-title\">{{ item.title }}</h4>\n <!--->\n <!-- ----- Optional business code after the matrix title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </header>\n <div class=\"__matrix\">\n <axp-layout-renderer [layout]=\"item.layout\" [context]=\"item.context\" mode=\"view\" look=\"container\" />\n </div>\n </article>\n }\n </div>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport {\n type AXMSafetyPlanSectionBuilderSectionValue,\n type AXMSafetyPlanActivityRowBuilderPayload,\n type AXMSafetyPlanActivitySectionSnapshot,\n asSafetyPlanDisplayText,\n resolveSectionTypeDisplayTitle,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nimport { toSafetyPlanPreviewDisplayText } from './safety-plan-preview.util';\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\nimport { AXMCatalogSectionPreviewComponent } from './catalog-section-preview.component';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXMActivityPreviewRowView {\n key: string;\n title: string;\n code: string;\n description: string;\n sections: Array<{\n key: string;\n title: string;\n items: AXMSafetyPlanPreviewCatalogItem[];\n }>;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-activity-preview',\n templateUrl: './activity-preview.component.html',\n styleUrl: './activity-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXTranslationModule, AsyncPipe, AXMCatalogSectionPreviewComponent],\n host: {\n class: 'axm-activity-preview block',\n },\n})\nexport class AXMActivityPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly section = input.required<AXMSafetyPlanSectionBuilderSectionValue>();\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly rows = computed((): AXMActivityPreviewRowView[] => {\n const locale = this.translationService.getActiveLang() ?? 'en-US';\n return (this.section().items ?? [])\n .map((item, index) => {\n const row = item.activityRow;\n if (!row) {\n return null;\n }\n return {\n view: this.toRowView(row, item.id || String(index), locale),\n sortOrder: row.sortOrder ?? index + 1,\n };\n })\n .filter((entry): entry is { view: AXMActivityPreviewRowView; sortOrder: number } => entry != null)\n .sort((a, b) => a.sortOrder - b.sortOrder)\n .map((entry) => entry.view);\n });\n\n //#endregion\n\n //#region ----- Display -----\n\n private toRowView(\n row: AXMSafetyPlanActivityRowBuilderPayload,\n key: string,\n locale: string,\n ): AXMActivityPreviewRowView {\n const sections = [...(row.sections ?? [])].sort(\n (a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0),\n );\n return {\n key,\n title: toSafetyPlanPreviewDisplayText(row.title, locale) || 'Row',\n code: String(row.code ?? '').trim(),\n description: toSafetyPlanPreviewDisplayText(row.description, locale),\n sections: sections.map((section, index) =>\n this.toSectionView(section, `${key}__section_${index}`, locale),\n ),\n };\n }\n\n private toSectionView(\n section: AXMSafetyPlanActivitySectionSnapshot,\n key: string,\n locale: string,\n ): AXMActivityPreviewRowView['sections'][number] {\n const title =\n toSafetyPlanPreviewDisplayText(section.title, locale) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.title, locale) ||\n resolveSectionTypeDisplayTitle(section.sectionTypeId, section.sectionType) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.code, locale) ||\n 'Section';\n const items: AXMSafetyPlanPreviewCatalogItem[] = (section.itemIds ?? []).map((id, index) => {\n const snapshot = section.items?.find((entry) => entry.id === id) ?? section.items?.[index];\n return {\n id,\n title:\n toSafetyPlanPreviewDisplayText(snapshot?.title, locale) ||\n asSafetyPlanDisplayText(snapshot?.code) ||\n id,\n code: asSafetyPlanDisplayText(snapshot?.code) || undefined,\n };\n });\n return { key, title, items };\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-activity-preview\">\n @if (rows().length > 0) {\n <!-- ----- Activity items with nested predefined sections ----- -->\n <ul class=\"__list\">\n @for (row of rows(); track row.key) {\n <li class=\"__item\">\n <div class=\"__header\">\n <span class=\"__title\">{{ row.title }}</span>\n <!--->\n <!-- ----- Optional business code after the item title ----- -->\n @if (row.code) {\n <span class=\"__code\">({{ row.code }})</span>\n }\n </div>\n <!--->\n <!-- ----- Optional activity description below the title ----- -->\n @if (row.description) {\n <p class=\"__description\">{{ row.description }}</p>\n }\n <!--->\n <!-- ----- Predefined SafetyPlanActivity sections (Control, Hazard, …) ----- -->\n @if (row.sections.length > 0) {\n <div class=\"__sections\">\n @for (activitySection of row.sections; track activitySection.key) {\n <div class=\"__section\">\n <h4 class=\"__section-title\">{{ activitySection.title }}</h4>\n <axm-catalog-section-preview [items]=\"activitySection.items\" />\n </div>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n <!-- ----- Empty activity section ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXMSafetyPlanSectionBuilderSectionValue } from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nimport { AXMCatalogSectionPreviewComponent } from './catalog-section-preview.component';\nimport { AXMHierarchySectionPreviewComponent } from './hierarchy-section-preview.component';\nimport { AXMPpeSectionPreviewComponent } from './ppe-section-preview.component';\nimport { AXMRiskMatrixPreviewComponent } from './risk-matrix-preview.component';\nimport { AXMActivityPreviewComponent } from './activity-preview.component';\nimport {\n collectSafetyPlanPreviewCatalogItems,\n resolveSafetyPlanPreviewSectionTitle,\n resolveSafetyPlanSectionPreviewKind,\n safetyPlanPreviewSectionHasItems,\n} from './safety-plan-preview.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-safety-plan-section-preview',\n templateUrl: './safety-plan-section-preview.component.html',\n styleUrl: './safety-plan-section-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AXMCatalogSectionPreviewComponent,\n AXMHierarchySectionPreviewComponent,\n AXMPpeSectionPreviewComponent,\n AXMRiskMatrixPreviewComponent,\n AXMActivityPreviewComponent,\n ],\n host: {\n class: 'axm-safety-plan-section-preview',\n '[class.block]': 'hasItems()',\n '[hidden]': '!hasItems()',\n },\n})\nexport class AXMSafetyPlanSectionPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly section = input.required<AXMSafetyPlanSectionBuilderSectionValue>();\n readonly fillValue = input<unknown>(undefined);\n readonly editable = input(false);\n\n //#endregion\n\n //#region ----- Outputs -----\n\n readonly fillValueChange = output<unknown>();\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n private readonly locale = computed(() => this.translationService.getActiveLang() ?? 'en-US');\n\n protected readonly kind = computed(() => resolveSafetyPlanSectionPreviewKind(this.section()));\n\n protected readonly title = computed(() =>\n resolveSafetyPlanPreviewSectionTitle(this.section(), this.locale()),\n );\n\n protected readonly catalogItems = computed(() =>\n collectSafetyPlanPreviewCatalogItems(this.section(), this.locale()),\n );\n\n protected readonly hasItems = computed(() => safetyPlanPreviewSectionHasItems(this.section()));\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onFillValueChange(value: unknown): void {\n this.fillValueChange.emit(value);\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (hasItems()) {\n <!-- ----- Section with at least one item ----- -->\n <section class=\"axm-safety-plan-section-preview\">\n <header class=\"__header\">\n <h3 class=\"__title\">{{ title() }}</h3>\n </header>\n\n @switch (kind()) {\n @case ('activity') {\n <axm-activity-preview [section]=\"section()\" />\n }\n @case ('risk-matrix') {\n <axm-risk-matrix-preview [items]=\"catalogItems()\" />\n }\n @case ('ppe') {\n <axm-ppe-section-preview\n [items]=\"catalogItems()\"\n [layout]=\"section().widgetOptions?.layout\"\n [value]=\"fillValue()\"\n [editable]=\"editable()\"\n (valueChange)=\"onFillValueChange($event)\"\n />\n }\n @case ('hierarchy') {\n <axm-hierarchy-section-preview\n [items]=\"catalogItems()\"\n [viewType]=\"section().widgetOptions?.viewType\"\n [showTitle]=\"section().widgetOptions?.showTitle\"\n />\n }\n @default {\n <axm-catalog-section-preview [items]=\"catalogItems()\" />\n }\n }\n </section>\n}\n","//#region ----- Imports -----\n\nimport { AXComponentClosing } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport type {\n AXMSafetyPlanFillValues,\n AXMSafetyPlanSectionBuilderValue,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal, ViewEncapsulation } from '@angular/core';\n\nimport { normalizeSafetyPlanSectionBuilderValue } from '../safety-plan-sections-page/safety-plan-section-builder.types';\nimport { AXMSafetyPlanSectionPreviewComponent } from './safety-plan-section-preview.component';\nimport { normalizeSafetyPlanFillValues, saveSafetyPlanFillValues } from './safety-plan-fill-values.util';\nimport { safetyPlanPreviewSectionHasItems } from './safety-plan-preview.util';\nimport type { AXMSafetyPlanPreviewResult, AXMSafetyPlanPreviewWorkflowActionSet } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-safety-plan-preview-modal',\n templateUrl: './safety-plan-preview-modal.component.html',\n styleUrl: './safety-plan-preview-modal.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AXTranslationModule, AsyncPipe, AXButtonModule, AXMSafetyPlanSectionPreviewComponent],\n host: {\n class: 'axm-safety-plan-preview-modal-host flex flex-col w-full h-full min-h-0',\n },\n})\nexport class AXMSafetyPlanPreviewModalComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly structure = input<AXMSafetyPlanSectionBuilderValue>({ sections: [] });\n readonly workflowActionSet = input<AXMSafetyPlanPreviewWorkflowActionSet | undefined>(undefined);\n /** When true, section values can be edited and are saved when the dialog closes. */\n readonly editable = input<boolean | string | undefined>(undefined);\n readonly planId = input<string | undefined>(undefined);\n readonly fillValues = input<AXMSafetyPlanFillValues>({});\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly fillDirty = signal(false);\n private readonly saving = signal(false);\n private skipClosePersist = false;\n protected readonly draftValues = signal<AXMSafetyPlanFillValues>({});\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly sections = computed(() => {\n const raw = this.safeInputValue(this.structure);\n return [...normalizeSafetyPlanSectionBuilderValue(raw).sections]\n .sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0))\n .filter((section) => safetyPlanPreviewSectionHasItems(section));\n });\n\n protected readonly resolvedActionSet = computed((): AXMSafetyPlanPreviewWorkflowActionSet | undefined => {\n const raw = this.safeInputValue(this.workflowActionSet) as unknown;\n if (raw === 'draft' || raw === 'assigned' || raw === 'locked') {\n return raw;\n }\n return undefined;\n });\n\n protected readonly showDraftActions = computed(() => this.resolvedActionSet() === 'draft');\n protected readonly showAssignedActions = computed(() => this.resolvedActionSet() === 'assigned');\n protected readonly showLockedActions = computed(() => this.resolvedActionSet() === 'locked');\n protected readonly canEditFill = computed(\n () => this.resolvedActionSet() === 'draft' || this.resolvedActionSet() === 'assigned' || this.isEditableRequested(),\n );\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly hydrateFillValues = effect(() => {\n if (this.fillDirty()) {\n return;\n }\n this.draftValues.set(normalizeSafetyPlanFillValues(this.safeInputValue(this.fillValues)));\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected sectionFillValue(sectionId: string): unknown {\n return this.draftValues()[sectionId];\n }\n\n protected onSectionFillValueChange(sectionId: string, value: unknown): void {\n if (!sectionId || !this.canEditFill()) {\n return;\n }\n this.fillDirty.set(true);\n this.draftValues.update((current) => ({ ...current, [sectionId]: value }));\n }\n\n override async onClosing(e: AXComponentClosing): Promise<void> {\n if (this.skipClosePersist) {\n this.skipClosePersist = false;\n return;\n }\n if (!this.isEditableRequested()) {\n return;\n }\n if (!(await this.persistFillValues())) {\n e.cancel = true;\n }\n }\n\n protected saveAsDraft(): void {\n void this.closeAfterPersist({ saved: true, submitted: false });\n }\n\n protected submitPlan(): void {\n void this.closeAfterPersist({ saved: false, submitted: true });\n }\n\n protected savePlan(): void {\n void this.closeAfterPersist({ saved: true });\n }\n\n protected lockPlan(): void {\n void this.closeAfterPersist({ locked: true });\n }\n\n protected signOffPlan(): void {\n void this.closeAfterPersist({ signOff: true });\n }\n\n //#endregion\n\n //#region ----- Persistence -----\n\n private async closeAfterPersist(result: AXMSafetyPlanPreviewResult): Promise<void> {\n if (!(await this.persistFillValues())) {\n return;\n }\n this.skipClosePersist = true;\n this.close(result);\n }\n\n private async persistFillValues(): Promise<boolean> {\n if (!this.canEditFill()) {\n return true;\n }\n const planId = this.resolvePlanId();\n if (this.saving()) {\n return false;\n }\n if (!planId) {\n await this.showSaveError();\n return false;\n }\n\n this.saving.set(true);\n try {\n await saveSafetyPlanFillValues(this.entityService, planId, this.draftValues());\n return true;\n } catch {\n await this.showSaveError();\n return false;\n } finally {\n this.saving.set(false);\n }\n }\n\n private async showSaveError(): Promise<void> {\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: await this.translationService.translateAsync('@general:messages.generic.error.description'),\n closeButton: true,\n timeOut: 7000,\n });\n }\n\n private resolvePlanId(): string | undefined {\n const raw = this.safeInputValue(this.planId);\n return typeof raw === 'string' && raw.trim().length > 0 ? raw.trim() : undefined;\n }\n\n private isEditableRequested(): boolean {\n const raw = this.safeInputValue(this.editable) as unknown;\n if (raw === true || raw === 'true') {\n return true;\n }\n const actionSet = this.safeInputValue(this.workflowActionSet);\n return actionSet === 'draft' || actionSet === 'assigned';\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private safeInputValue<T>(inputOrValue: T | (() => T)): T {\n return typeof inputOrValue === 'function' ? (inputOrValue as () => T)() : (inputOrValue as T);\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-safety-plan-preview-modal\">\n <div class=\"__content-area\">\n @if (sections().length === 0) {\n <!-- ----- Empty state when the plan has no sections ----- -->\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty' | translate | async }}\n </p>\n }\n <!-- ----- Document blocks in configured section order ----- -->\n @else {\n <div class=\"__document\">\n @for (section of sections(); track section.id) {\n <axm-safety-plan-section-preview\n [section]=\"section\"\n [fillValue]=\"sectionFillValue(section.id)\"\n [editable]=\"canEditFill()\"\n (fillValueChange)=\"onSectionFillValueChange(section.id, $event)\"\n />\n }\n </div>\n }\n </div>\n\n @if (showDraftActions()) {\n <!-- ----- Save as Draft / Submit while the task is Initial or Draft ----- -->\n <div class=\"__actions\">\n <ax-button\n look=\"outline\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.save-draft' | translate | async\"\n (onClick)=\"saveAsDraft()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.submit' | translate | async\"\n (onClick)=\"submitPlan()\"\n ></ax-button>\n </div>\n }\n <!-- ----- Save / Lock while the task is Assigned ----- -->\n @else if (showAssignedActions()) {\n <div class=\"__actions\">\n <ax-button\n look=\"outline\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.save' | translate | async\"\n (onClick)=\"savePlan()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.lock' | translate | async\"\n (onClick)=\"lockPlan()\"\n ></ax-button>\n </div>\n }\n <!-- ----- Sign Off while the task is Locked ----- -->\n @else if (showLockedActions()) {\n <div class=\"__actions\">\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.sign-off' | translate | async\"\n (onClick)=\"signOffPlan()\"\n ></ax-button>\n </div>\n }\n</div>\n\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA;AAEA;MAYa,iCAAiC,CAAA;AAV9C,IAAA,WAAA,GAAA;QAWW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoC,EAAE;kFAAC;AAC9D,IAAA;8GAFY,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,mCAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtB9C,0vBAuBA,EAAA,MAAA,EAAA,CAAA,4yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,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AA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,oCAAoC,EAAA,QAAA,EAAA,iCAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,iBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAA/D,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAK7B,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAX9C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+BAA+B,mBAGxB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,oCAAoC,CAAC,EAAA,IAAA,EACzF;AACJ,wBAAA,KAAK,EAAE,wEAAwE;AAChF,qBAAA,EAAA,QAAA,EAAA,i8EAAA,EAAA,MAAA,EAAA,CAAA,k9CAAA,CAAA,EAAA;;;"}
1
+ {"version":3,"file":"acorex-platform-module-workplacesafety-management-client-safety-plan-preview-modal.component-omdGHrWD.mjs","sources":["../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/catalog-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/catalog-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/hierarchy-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/hierarchy-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/ppe-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/ppe-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-preview.util.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/risk-matrix-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/risk-matrix-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/activity-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/activity-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-section-preview.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-section-preview.component.html","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-preview-modal.component.ts","../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-preview/safety-plan-preview-modal.component.html"],"sourcesContent":["//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\nimport { AXTranslationModule } from '@acorex/core/translation';\n\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-catalog-section-preview',\n templateUrl: './catalog-section-preview.component.html',\n styleUrl: './catalog-section-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXTranslationModule, AsyncPipe],\n host: {\n class: 'axm-catalog-section-preview block',\n },\n})\nexport class AXMCatalogSectionPreviewComponent {\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n}\n\n//#endregion\n","<div class=\"axm-catalog-section-preview\">\n @if (items().length > 0) {\n <!-- ----- Linked catalog items as a document bullet list ----- -->\n <ul class=\"__list\">\n @for (item of items(); track item.id) {\n <li class=\"__item\">\n <span class=\"__title\">{{ item.title }}</span>\n <!--->\n <!-- ----- Optional business code after the item title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </li>\n }\n </ul>\n }\n <!-- ----- Empty catalog section ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal } from '@angular/core';\n\nimport { AXMControlHierarchyDiagramComponent } from '../control-hierarchy-diagram/control-hierarchy-diagram.component';\nimport { AXMControlHierarchyDiagramService } from '../control-hierarchy-diagram/control-hierarchy-diagram.service';\nimport {\n resolveControlHierarchyDiagramViewType,\n type AXMControlHierarchyDiagramItem,\n type AXMControlHierarchyDiagramViewType,\n} from '../control-hierarchy-diagram/control-hierarchy-diagram.types';\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-hierarchy-section-preview',\n templateUrl: './hierarchy-section-preview.component.html',\n styleUrl: './hierarchy-section-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMControlHierarchyDiagramComponent],\n host: {\n class: 'axm-hierarchy-section-preview block',\n },\n})\nexport class AXMHierarchySectionPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly diagramService = inject(AXMControlHierarchyDiagramService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n readonly viewType = input<unknown>();\n readonly showTitle = input<boolean | undefined>(undefined);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly diagramItems = signal<AXMControlHierarchyDiagramItem[]>([]);\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly resolvedViewType = computed<AXMControlHierarchyDiagramViewType>(() =>\n resolveControlHierarchyDiagramViewType(this.viewType() as Parameters<typeof resolveControlHierarchyDiagramViewType>[0]),\n );\n\n protected readonly resolvedShowTitle = computed(() => this.showTitle() === true);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly loadItems = effect((onCleanup) => {\n const catalogItems = this.items();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n void this.refresh(catalogItems, () => cancelled);\n });\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async refresh(\n catalogItems: AXMSafetyPlanPreviewCatalogItem[],\n isCancelled: () => boolean,\n ): Promise<void> {\n if (catalogItems.length === 0) {\n this.diagramItems.set([]);\n return;\n }\n\n try {\n const loaded = await this.diagramService.loadDiagramItemsByLevelIds(catalogItems.map((item) => item.id));\n if (!isCancelled()) {\n this.diagramItems.set(loaded);\n }\n } catch {\n if (!isCancelled()) {\n this.diagramItems.set([]);\n }\n }\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- Control hierarchy diagram using saved section widget options ----- -->\n<axm-control-hierarchy-diagram\n [viewType]=\"resolvedViewType()\"\n [items]=\"diagramItems()\"\n [showTitle]=\"resolvedShowTitle()\"\n [showViewTypeSelector]=\"false\"\n/>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, output, signal } from '@angular/core';\n\nimport { AXMPpeItemViewerComponent } from '../ppe-item-viewer/ppe-item-viewer.component';\nimport { AXMPpeItemViewerService } from '../ppe-item-viewer/ppe-item-viewer.service';\nimport type { AXMPpeItemViewerDisplayItem, AXMPpeItemViewerLayout } from '../ppe-item-viewer/ppe-item-viewer.types';\nimport { extractPpeItemIds, resolvePpeItemViewerLayout } from '../ppe-item-viewer/ppe-item-viewer.util';\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-ppe-section-preview',\n templateUrl: './ppe-section-preview.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXMPpeItemViewerComponent],\n host: {\n class: 'axm-ppe-section-preview block',\n },\n})\nexport class AXMPpeSectionPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly ppeItemViewerService = inject(AXMPpeItemViewerService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n readonly layout = input<unknown>();\n readonly value = input<unknown>(undefined);\n readonly editable = input(false);\n\n //#endregion\n\n //#region ----- Outputs -----\n\n readonly valueChange = output<unknown>();\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(false);\n protected readonly displayItems = signal<AXMPpeItemViewerDisplayItem[]>([]);\n protected readonly selectedIds = signal<string[]>([]);\n\n protected readonly resolvedLayout = computed<AXMPpeItemViewerLayout>(() =>\n resolvePpeItemViewerLayout(this.layout() as Parameters<typeof resolvePpeItemViewerLayout>[0]),\n );\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly applyStoredValue = effect(() => {\n this.selectedIds.set(extractPpeItemIds(this.value()));\n });\n\n private readonly loadItems = effect((onCleanup) => {\n const catalogItems = this.items();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n void this.refresh(catalogItems, () => cancelled);\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onSelectedIdsChange(ids: string[]): void {\n if (!this.editable()) {\n return;\n }\n this.selectedIds.set(ids);\n this.valueChange.emit(ids);\n }\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async refresh(\n catalogItems: AXMSafetyPlanPreviewCatalogItem[],\n isCancelled: () => boolean,\n ): Promise<void> {\n if (catalogItems.length === 0) {\n this.displayItems.set([]);\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n const fallback = catalogItems.map((item) => this.toDisplayItem(item));\n try {\n const loaded = await this.ppeItemViewerService.loadDisplayItems(catalogItems.map((item) => item.id));\n if (isCancelled()) {\n return;\n }\n const byId = new Map(loaded.map((row) => [row.id, row]));\n this.displayItems.set(fallback.map((item) => byId.get(item.id) ?? item));\n } catch {\n if (!isCancelled()) {\n this.displayItems.set(fallback);\n }\n } finally {\n if (!isCancelled()) {\n this.loading.set(false);\n }\n }\n }\n\n private toDisplayItem(item: AXMSafetyPlanPreviewCatalogItem): AXMPpeItemViewerDisplayItem {\n return {\n id: item.id,\n title: item.title,\n code: item.code,\n imageUrl: null,\n };\n }\n\n //#endregion\n}\n\n//#endregion\n","<!-- ----- PPE Item viewer; checks are workflow fill values, not the section catalog ----- -->\n<axm-ppe-item-viewer\n [items]=\"displayItems()\"\n [layout]=\"resolvedLayout()\"\n [selectedIds]=\"selectedIds()\"\n [loading]=\"loading()\"\n [readonly]=\"!editable()\"\n (selectedIdsChange)=\"onSelectedIdsChange($event)\"\n/>\n","//#region ----- Imports -----\n\nimport { resolveEntityRowDisplayText } from '@acorex-platform/framework-client/common';\nimport {\n isActivitySectionType,\n resolveSectionTypeKey,\n type AXMSafetyPlanSectionBuilderItemValue,\n type AXMSafetyPlanSectionBuilderSectionValue,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nimport type {\n AXMSafetyPlanPreviewCatalogItem,\n AXMSafetyPlanSectionPreviewKind,\n} from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Display helpers -----\n\nexport function toSafetyPlanPreviewDisplayText(value: unknown, locale: string): string {\n return resolveEntityRowDisplayText(value, locale).trim();\n}\n\nexport function resolveSafetyPlanPreviewSectionTitle(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n locale: string,\n): string {\n return (\n toSafetyPlanPreviewDisplayText(section.title, locale) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.title, locale) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.code, locale)\n );\n}\n\n/**\n * Maps a section type to a preview renderer. New document kinds (SWMS, JSA, SOP, Permit)\n * can add cases here without changing the editor.\n */\nexport function resolveSafetyPlanSectionPreviewKind(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n): AXMSafetyPlanSectionPreviewKind {\n if (isActivitySectionType(section.sectionTypeId, section.sectionType)) {\n return 'activity';\n }\n if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'RiskMatrix') {\n return 'risk-matrix';\n }\n if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'Ppe') {\n return 'ppe';\n }\n if (resolveSectionTypeKey(section.sectionTypeId, section.sectionType) === 'HierarchyLevel') {\n return 'hierarchy';\n }\n return 'catalog';\n}\n\n/** True when the section has at least one previewable item (catalog row or activity row). */\nexport function safetyPlanPreviewSectionHasItems(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n): boolean {\n if (isActivitySectionType(section.sectionTypeId, section.sectionType)) {\n return (section.items ?? []).some((item) => {\n const row = item.activityRow;\n const snapshotTitle = item.items?.[0]?.title;\n return Boolean(row?.title?.trim() || snapshotTitle?.trim());\n });\n }\n return collectSafetyPlanPreviewCatalogItems(section, '').length > 0;\n}\n\nexport function collectSafetyPlanPreviewCatalogItems(\n section: AXMSafetyPlanSectionBuilderSectionValue,\n locale: string,\n): AXMSafetyPlanPreviewCatalogItem[] {\n const linked: AXMSafetyPlanPreviewCatalogItem[] = [];\n const seen = new Set<string>();\n\n for (const slot of section.items ?? []) {\n for (const item of flattenCatalogSlot(slot, locale)) {\n if (!item.id || seen.has(item.id)) {\n continue;\n }\n seen.add(item.id);\n linked.push(item);\n }\n }\n\n return linked;\n}\n\nfunction flattenCatalogSlot(\n slot: AXMSafetyPlanSectionBuilderItemValue,\n locale: string,\n): AXMSafetyPlanPreviewCatalogItem[] {\n const ids = Array.isArray(slot.itemIds) ? slot.itemIds : [];\n const snapshots = Array.isArray(slot.items) ? slot.items : [];\n const items: AXMSafetyPlanPreviewCatalogItem[] = [];\n\n for (let index = 0; index < ids.length; index += 1) {\n const id = String(ids[index] ?? '').trim();\n if (!id) {\n continue;\n }\n const snapshot = snapshots.find((entry) => entry?.id === id) ?? snapshots[index];\n const title =\n toSafetyPlanPreviewDisplayText(snapshot?.title, locale) ||\n String(snapshot?.code ?? '').trim() ||\n id;\n items.push({\n id,\n title,\n code: snapshot?.code,\n });\n }\n\n if (items.length === 0 && snapshots.length > 0) {\n for (const snapshot of snapshots) {\n const id = String(snapshot?.id ?? '').trim();\n if (!id) {\n continue;\n }\n items.push({\n id,\n title: toSafetyPlanPreviewDisplayText(snapshot.title, locale) || String(snapshot.code ?? '').trim() || id,\n code: snapshot.code,\n });\n }\n }\n\n return items;\n}\n\n//#endregion\n","//#region ----- Imports -----\n\nimport { AXLoadingModule } from '@acorex/components/loading';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPLayoutBuilderService, AXPLayoutRendererComponent } from '@acorex-platform/framework-client/layout/builder';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPWidgetsList, type AXPWidgetNode } from '@acorex-platform/framework-shared/core';\nimport { RISK_MANAGEMENT_RISK_MATRIX_ENTITY } from '@acorex-platform/module-workplacesafety-management-client/contracts';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, signal } from '@angular/core';\nimport { cloneDeep } from 'lodash';\n\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\nimport { toSafetyPlanPreviewDisplayText } from './safety-plan-preview.util';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXMRiskMatrixRecord {\n id: string;\n title?: unknown;\n code?: unknown;\n}\n\ninterface AXMRiskMatrixPreviewItem {\n id: string;\n title: string;\n code?: string;\n context: Record<string, unknown>;\n layout: AXPWidgetNode;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-risk-matrix-preview',\n templateUrl: './risk-matrix-preview.component.html',\n styleUrl: './risk-matrix-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AsyncPipe, AXLoadingModule, AXTranslationModule, AXPLayoutRendererComponent],\n host: {\n class: 'axm-risk-matrix-preview block',\n },\n})\nexport class AXMRiskMatrixPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly layoutBuilder = inject(AXPLayoutBuilderService);\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly items = input<AXMSafetyPlanPreviewCatalogItem[]>([]);\n\n //#endregion\n\n //#region ----- State Signals -----\n\n protected readonly loading = signal(false);\n protected readonly matrices = signal<AXMRiskMatrixPreviewItem[]>([]);\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly loadItems = effect((onCleanup) => {\n const catalogItems = this.items();\n let cancelled = false;\n onCleanup(() => {\n cancelled = true;\n });\n void this.refresh(catalogItems, () => cancelled);\n });\n\n //#endregion\n\n //#region ----- Data Loading -----\n\n private async refresh(\n catalogItems: AXMSafetyPlanPreviewCatalogItem[],\n isCancelled: () => boolean,\n ): Promise<void> {\n if (catalogItems.length === 0) {\n this.matrices.set([]);\n this.loading.set(false);\n return;\n }\n\n this.loading.set(true);\n try {\n const loaded = await this.queryByIds(catalogItems.map((item) => item.id));\n if (isCancelled()) {\n return;\n }\n const byId = new Map(loaded.map((row) => [row.id, row]));\n const locale = this.translationService.getActiveLang() ?? 'en-US';\n this.matrices.set(\n catalogItems.flatMap((item) => {\n const row = byId.get(item.id);\n if (!row) {\n return [];\n }\n return [this.toPreviewItem(item, row, locale)];\n }),\n );\n } catch {\n if (!isCancelled()) {\n this.matrices.set([]);\n }\n } finally {\n if (!isCancelled()) {\n this.loading.set(false);\n }\n }\n }\n\n private async queryByIds(ids: string[]): Promise<AXMRiskMatrixRecord[]> {\n const dataAccessor = this.entityService\n .withEntity(RISK_MANAGEMENT_RISK_MATRIX_ENTITY)\n .data<string, AXMRiskMatrixRecord>();\n\n try {\n const result = await dataAccessor.query({\n skip: 0,\n take: Math.max(ids.length, 100),\n filter:\n ids.length === 1\n ? { field: 'id', operator: { type: 'equal' }, value: ids[0] }\n : { field: 'id', operator: { type: 'in' }, value: ids },\n });\n return result?.items ?? [];\n } catch {\n const loaded: AXMRiskMatrixRecord[] = [];\n for (const id of ids) {\n try {\n const row = await dataAccessor.byKey(id);\n if (row) {\n loaded.push(row);\n }\n } catch {\n /* skip missing rows */\n }\n }\n return loaded;\n }\n }\n\n private toPreviewItem(\n catalogItem: AXMSafetyPlanPreviewCatalogItem,\n row: AXMRiskMatrixRecord,\n locale: string,\n ): AXMRiskMatrixPreviewItem {\n const code = typeof row.code === 'string' ? row.code.trim() : catalogItem.code;\n return {\n id: catalogItem.id,\n title: toSafetyPlanPreviewDisplayText(row.title, locale) || catalogItem.title,\n code: code && code.length > 0 ? code : undefined,\n context: { ...row },\n layout: cloneDeep(this.buildMatrixLayout()),\n };\n }\n\n //#endregion\n\n //#region ----- Layout -----\n\n private buildMatrixLayout(): AXPWidgetNode {\n return this.layoutBuilder\n .create()\n .flex((flex) => {\n flex.mode('view').setDirection('column');\n flex.formField('', (field) => {\n field\n .path('cells')\n .setShowLabel(false)\n .mode('view')\n .customWidget(AXPWidgetsList.Editors.RiskMatrix, { readonly: true });\n });\n })\n .build();\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-risk-matrix-preview\">\n @if (loading()) {\n <!-- ----- Loading indicator while risk matrix records are fetched ----- -->\n <ax-loading></ax-loading>\n }\n <!-- ----- Empty state when no risk matrices are selected ----- -->\n @else if (matrices().length === 0) {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n <!-- ----- Selected risk matrices rendered with the RiskMatrix widget ----- -->\n @else {\n <div class=\"__items\">\n @for (item of matrices(); track item.id) {\n <article class=\"__item\">\n <header class=\"__item-header\">\n <h4 class=\"__item-title\">{{ item.title }}</h4>\n <!--->\n <!-- ----- Optional business code after the matrix title ----- -->\n @if (item.code) {\n <span class=\"__code\">({{ item.code }})</span>\n }\n </header>\n <div class=\"__matrix\">\n <axp-layout-renderer [layout]=\"item.layout\" [context]=\"item.context\" mode=\"view\" look=\"container\" />\n </div>\n </article>\n }\n </div>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { AsyncPipe } from '@angular/common';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport {\n type AXMSafetyPlanSectionBuilderSectionValue,\n type AXMSafetyPlanActivityRowBuilderPayload,\n type AXMSafetyPlanActivitySectionSnapshot,\n asSafetyPlanDisplayText,\n resolveSectionTypeDisplayTitle,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nimport { toSafetyPlanPreviewDisplayText } from './safety-plan-preview.util';\nimport type { AXMSafetyPlanPreviewCatalogItem } from './safety-plan-preview.types';\nimport { AXMCatalogSectionPreviewComponent } from './catalog-section-preview.component';\n\n//#endregion\n\n//#region ----- Types -----\n\ninterface AXMActivityPreviewRowView {\n key: string;\n title: string;\n code: string;\n description: string;\n sections: Array<{\n key: string;\n title: string;\n items: AXMSafetyPlanPreviewCatalogItem[];\n }>;\n}\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-activity-preview',\n templateUrl: './activity-preview.component.html',\n styleUrl: './activity-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [AXTranslationModule, AsyncPipe, AXMCatalogSectionPreviewComponent],\n host: {\n class: 'axm-activity-preview block',\n },\n})\nexport class AXMActivityPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly section = input.required<AXMSafetyPlanSectionBuilderSectionValue>();\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly rows = computed((): AXMActivityPreviewRowView[] => {\n const locale = this.translationService.getActiveLang() ?? 'en-US';\n return (this.section().items ?? [])\n .map((item, index) => {\n const row = item.activityRow;\n if (!row) {\n return null;\n }\n return {\n view: this.toRowView(row, item.id || String(index), locale),\n sortOrder: row.sortOrder ?? index + 1,\n };\n })\n .filter((entry): entry is { view: AXMActivityPreviewRowView; sortOrder: number } => entry != null)\n .sort((a, b) => a.sortOrder - b.sortOrder)\n .map((entry) => entry.view);\n });\n\n //#endregion\n\n //#region ----- Display -----\n\n private toRowView(\n row: AXMSafetyPlanActivityRowBuilderPayload,\n key: string,\n locale: string,\n ): AXMActivityPreviewRowView {\n const sections = [...(row.sections ?? [])].sort(\n (a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0),\n );\n return {\n key,\n title: toSafetyPlanPreviewDisplayText(row.title, locale) || 'Row',\n code: String(row.code ?? '').trim(),\n description: toSafetyPlanPreviewDisplayText(row.description, locale),\n sections: sections.map((section, index) =>\n this.toSectionView(section, `${key}__section_${index}`, locale),\n ),\n };\n }\n\n private toSectionView(\n section: AXMSafetyPlanActivitySectionSnapshot,\n key: string,\n locale: string,\n ): AXMActivityPreviewRowView['sections'][number] {\n const title =\n toSafetyPlanPreviewDisplayText(section.title, locale) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.title, locale) ||\n resolveSectionTypeDisplayTitle(section.sectionTypeId, section.sectionType) ||\n toSafetyPlanPreviewDisplayText(section.sectionType?.code, locale) ||\n 'Section';\n const items: AXMSafetyPlanPreviewCatalogItem[] = (section.itemIds ?? []).map((id, index) => {\n const snapshot = section.items?.find((entry) => entry.id === id) ?? section.items?.[index];\n return {\n id,\n title:\n toSafetyPlanPreviewDisplayText(snapshot?.title, locale) ||\n asSafetyPlanDisplayText(snapshot?.code) ||\n id,\n code: asSafetyPlanDisplayText(snapshot?.code) || undefined,\n };\n });\n return { key, title, items };\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-activity-preview\">\n @if (rows().length > 0) {\n <!-- ----- Activity items with nested predefined sections ----- -->\n <ul class=\"__list\">\n @for (row of rows(); track row.key) {\n <li class=\"__item\">\n <div class=\"__header\">\n <span class=\"__title\">{{ row.title }}</span>\n <!--->\n <!-- ----- Optional business code after the item title ----- -->\n @if (row.code) {\n <span class=\"__code\">({{ row.code }})</span>\n }\n </div>\n <!--->\n <!-- ----- Optional activity description below the title ----- -->\n @if (row.description) {\n <p class=\"__description\">{{ row.description }}</p>\n }\n <!--->\n <!-- ----- Predefined SafetyPlanActivity sections (Control, Hazard, …) ----- -->\n @if (row.sections.length > 0) {\n <div class=\"__sections\">\n @for (activitySection of row.sections; track activitySection.key) {\n <div class=\"__section\">\n <h4 class=\"__section-title\">{{ activitySection.title }}</h4>\n <axm-catalog-section-preview [items]=\"activitySection.items\" />\n </div>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n <!-- ----- Empty activity section ----- -->\n @else {\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty-items' | translate | async }}\n </p>\n }\n</div>\n","//#region ----- Imports -----\n\nimport { ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXMSafetyPlanSectionBuilderSectionValue } from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nimport { AXMCatalogSectionPreviewComponent } from './catalog-section-preview.component';\nimport { AXMHierarchySectionPreviewComponent } from './hierarchy-section-preview.component';\nimport { AXMPpeSectionPreviewComponent } from './ppe-section-preview.component';\nimport { AXMRiskMatrixPreviewComponent } from './risk-matrix-preview.component';\nimport { AXMActivityPreviewComponent } from './activity-preview.component';\nimport {\n collectSafetyPlanPreviewCatalogItems,\n resolveSafetyPlanPreviewSectionTitle,\n resolveSafetyPlanSectionPreviewKind,\n safetyPlanPreviewSectionHasItems,\n} from './safety-plan-preview.util';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-safety-plan-section-preview',\n templateUrl: './safety-plan-section-preview.component.html',\n styleUrl: './safety-plan-section-preview.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AXMCatalogSectionPreviewComponent,\n AXMHierarchySectionPreviewComponent,\n AXMPpeSectionPreviewComponent,\n AXMRiskMatrixPreviewComponent,\n AXMActivityPreviewComponent,\n ],\n host: {\n class: 'axm-safety-plan-section-preview',\n '[class.block]': 'hasItems()',\n '[hidden]': '!hasItems()',\n },\n})\nexport class AXMSafetyPlanSectionPreviewComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly translationService = inject(AXTranslationService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly section = input.required<AXMSafetyPlanSectionBuilderSectionValue>();\n readonly fillValue = input<unknown>(undefined);\n readonly editable = input(false);\n\n //#endregion\n\n //#region ----- Outputs -----\n\n readonly fillValueChange = output<unknown>();\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n private readonly locale = computed(() => this.translationService.getActiveLang() ?? 'en-US');\n\n protected readonly kind = computed(() => resolveSafetyPlanSectionPreviewKind(this.section()));\n\n protected readonly title = computed(() =>\n resolveSafetyPlanPreviewSectionTitle(this.section(), this.locale()),\n );\n\n protected readonly catalogItems = computed(() =>\n collectSafetyPlanPreviewCatalogItems(this.section(), this.locale()),\n );\n\n protected readonly hasItems = computed(() => safetyPlanPreviewSectionHasItems(this.section()));\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected onFillValueChange(value: unknown): void {\n this.fillValueChange.emit(value);\n }\n\n //#endregion\n}\n\n//#endregion\n","@if (hasItems()) {\n <!-- ----- Section with at least one item ----- -->\n <section class=\"axm-safety-plan-section-preview\">\n <header class=\"__header\">\n <h3 class=\"__title\">{{ title() }}</h3>\n </header>\n\n @switch (kind()) {\n @case ('activity') {\n <axm-activity-preview [section]=\"section()\" />\n }\n @case ('risk-matrix') {\n <axm-risk-matrix-preview [items]=\"catalogItems()\" />\n }\n @case ('ppe') {\n <axm-ppe-section-preview\n [items]=\"catalogItems()\"\n [layout]=\"section().widgetOptions?.layout\"\n [value]=\"fillValue()\"\n [editable]=\"editable()\"\n (valueChange)=\"onFillValueChange($event)\"\n />\n }\n @case ('hierarchy') {\n <axm-hierarchy-section-preview\n [items]=\"catalogItems()\"\n [viewType]=\"section().widgetOptions?.viewType\"\n [showTitle]=\"section().widgetOptions?.showTitle\"\n />\n }\n @default {\n <axm-catalog-section-preview [items]=\"catalogItems()\" />\n }\n }\n </section>\n}\n","//#region ----- Imports -----\n\nimport { AXComponentClosing } from '@acorex/cdk/common';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXBasePageComponent } from '@acorex/components/page';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport type {\n AXMSafetyPlanFillValues,\n AXMSafetyPlanSectionBuilderValue,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\nimport { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, effect, inject, input, signal, ViewEncapsulation } from '@angular/core';\n\nimport { normalizeSafetyPlanSectionBuilderValue } from '../safety-plan-sections-page/safety-plan-section-builder.types';\nimport { AXMSafetyPlanSectionPreviewComponent } from './safety-plan-section-preview.component';\nimport { normalizeSafetyPlanFillValues, saveSafetyPlanFillValues } from './safety-plan-fill-values.util';\nimport { safetyPlanPreviewSectionHasItems } from './safety-plan-preview.util';\nimport type { AXMSafetyPlanPreviewResult, AXMSafetyPlanPreviewWorkflowActionSet } from './safety-plan-preview.types';\n\n//#endregion\n\n//#region ----- Component -----\n\n@Component({\n selector: 'axm-safety-plan-preview-modal',\n templateUrl: './safety-plan-preview-modal.component.html',\n styleUrl: './safety-plan-preview-modal.component.css',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [AXTranslationModule, AsyncPipe, AXButtonModule, AXMSafetyPlanSectionPreviewComponent],\n host: {\n class: 'axm-safety-plan-preview-modal-host flex flex-col w-full h-full min-h-0',\n },\n})\nexport class AXMSafetyPlanPreviewModalComponent extends AXBasePageComponent {\n //#region ----- Services & Dependencies -----\n\n private readonly entityService = inject(AXPEntityService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n\n //#endregion\n\n //#region ----- Inputs -----\n\n readonly structure = input<AXMSafetyPlanSectionBuilderValue>({ sections: [] });\n readonly workflowActionSet = input<AXMSafetyPlanPreviewWorkflowActionSet | undefined>(undefined);\n /** When true, section values can be edited and are saved when the dialog closes. */\n readonly editable = input<boolean | string | undefined>(undefined);\n readonly planId = input<string | undefined>(undefined);\n readonly fillValues = input<AXMSafetyPlanFillValues>({});\n\n //#endregion\n\n //#region ----- State Signals -----\n\n private readonly fillDirty = signal(false);\n private readonly saving = signal(false);\n private skipClosePersist = false;\n protected readonly draftValues = signal<AXMSafetyPlanFillValues>({});\n\n //#endregion\n\n //#region ----- Computed Properties -----\n\n protected readonly sections = computed(() => {\n const raw = this.safeInputValue(this.structure);\n return [...normalizeSafetyPlanSectionBuilderValue(raw).sections]\n .sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0))\n .filter((section) => safetyPlanPreviewSectionHasItems(section));\n });\n\n protected readonly resolvedActionSet = computed((): AXMSafetyPlanPreviewWorkflowActionSet | undefined => {\n const raw = this.safeInputValue(this.workflowActionSet) as unknown;\n if (raw === 'draft' || raw === 'assigned' || raw === 'locked') {\n return raw;\n }\n return undefined;\n });\n\n protected readonly showDraftActions = computed(() => this.resolvedActionSet() === 'draft');\n protected readonly showAssignedActions = computed(() => this.resolvedActionSet() === 'assigned');\n protected readonly showLockedActions = computed(() => this.resolvedActionSet() === 'locked');\n protected readonly canEditFill = computed(\n () => this.resolvedActionSet() === 'draft' || this.resolvedActionSet() === 'assigned' || this.isEditableRequested(),\n );\n\n //#endregion\n\n //#region ----- Lifecycle -----\n\n private readonly hydrateFillValues = effect(() => {\n if (this.fillDirty()) {\n return;\n }\n this.draftValues.set(normalizeSafetyPlanFillValues(this.safeInputValue(this.fillValues)));\n });\n\n //#endregion\n\n //#region ----- Event Handlers -----\n\n protected sectionFillValue(sectionId: string): unknown {\n return this.draftValues()[sectionId];\n }\n\n protected onSectionFillValueChange(sectionId: string, value: unknown): void {\n if (!sectionId || !this.canEditFill()) {\n return;\n }\n this.fillDirty.set(true);\n this.draftValues.update((current) => ({ ...current, [sectionId]: value }));\n }\n\n override async onClosing(e: AXComponentClosing): Promise<void> {\n if (this.skipClosePersist) {\n this.skipClosePersist = false;\n return;\n }\n if (!this.isEditableRequested()) {\n return;\n }\n if (!(await this.persistFillValues())) {\n e.cancel = true;\n }\n }\n\n protected saveAsDraft(): void {\n void this.closeAfterPersist({ saved: true, submitted: false });\n }\n\n protected submitPlan(): void {\n void this.closeAfterPersist({ saved: false, submitted: true });\n }\n\n protected savePlan(): void {\n void this.closeAfterPersist({ saved: true });\n }\n\n protected lockPlan(): void {\n void this.closeAfterPersist({ locked: true });\n }\n\n protected signOffPlan(): void {\n void this.closeAfterPersist({ signOff: true });\n }\n\n //#endregion\n\n //#region ----- Persistence -----\n\n private async closeAfterPersist(result: AXMSafetyPlanPreviewResult): Promise<void> {\n if (!(await this.persistFillValues())) {\n return;\n }\n this.skipClosePersist = true;\n this.close(result);\n }\n\n private async persistFillValues(): Promise<boolean> {\n if (!this.canEditFill()) {\n return true;\n }\n const planId = this.resolvePlanId();\n if (this.saving()) {\n return false;\n }\n if (!planId) {\n await this.showSaveError();\n return false;\n }\n\n this.saving.set(true);\n try {\n await saveSafetyPlanFillValues(this.entityService, planId, this.draftValues());\n return true;\n } catch {\n await this.showSaveError();\n return false;\n } finally {\n this.saving.set(false);\n }\n }\n\n private async showSaveError(): Promise<void> {\n this.toastService.show({\n color: 'danger',\n title: await this.translationService.translateAsync('@general:messages.generic.error.title'),\n content: await this.translationService.translateAsync('@general:messages.generic.error.description'),\n closeButton: true,\n timeOut: 7000,\n });\n }\n\n private resolvePlanId(): string | undefined {\n const raw = this.safeInputValue(this.planId);\n return typeof raw === 'string' && raw.trim().length > 0 ? raw.trim() : undefined;\n }\n\n private isEditableRequested(): boolean {\n const raw = this.safeInputValue(this.editable) as unknown;\n if (raw === true || raw === 'true') {\n return true;\n }\n const actionSet = this.safeInputValue(this.workflowActionSet);\n return actionSet === 'draft' || actionSet === 'assigned';\n }\n\n //#endregion\n\n //#region ----- Helpers -----\n\n private safeInputValue<T>(inputOrValue: T | (() => T)): T {\n return typeof inputOrValue === 'function' ? (inputOrValue as () => T)() : (inputOrValue as T);\n }\n\n //#endregion\n}\n\n//#endregion\n","<div class=\"axm-safety-plan-preview-modal\">\n <div class=\"__content-area\">\n @if (sections().length === 0) {\n <!-- ----- Empty state when the plan has no sections ----- -->\n <p class=\"__empty\">\n {{ '@workplacesafety-management:safety-plan-sections.preview.empty' | translate | async }}\n </p>\n }\n <!-- ----- Document blocks in configured section order ----- -->\n @else {\n <div class=\"__document\">\n @for (section of sections(); track section.id) {\n <axm-safety-plan-section-preview\n [section]=\"section\"\n [fillValue]=\"sectionFillValue(section.id)\"\n [editable]=\"canEditFill()\"\n (fillValueChange)=\"onSectionFillValueChange(section.id, $event)\"\n />\n }\n </div>\n }\n </div>\n\n @if (showDraftActions()) {\n <!-- ----- Save as Draft / Submit while the task is Initial or Draft ----- -->\n <div class=\"__actions\">\n <ax-button\n look=\"outline\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.save-draft' | translate | async\"\n (onClick)=\"saveAsDraft()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.submit' | translate | async\"\n (onClick)=\"submitPlan()\"\n ></ax-button>\n </div>\n }\n <!-- ----- Save / Lock while the task is Assigned ----- -->\n @else if (showAssignedActions()) {\n <div class=\"__actions\">\n <ax-button\n look=\"outline\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.save' | translate | async\"\n (onClick)=\"savePlan()\"\n ></ax-button>\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.lock' | translate | async\"\n (onClick)=\"lockPlan()\"\n ></ax-button>\n </div>\n }\n <!-- ----- Sign Off while the task is Locked ----- -->\n @else if (showLockedActions()) {\n <div class=\"__actions\">\n <ax-button\n look=\"solid\"\n color=\"primary\"\n [text]=\"'@workplacesafety-management:safety-plan-sections.preview.actions.sign-off' | translate | async\"\n (onClick)=\"signOffPlan()\"\n ></ax-button>\n </div>\n }\n</div>\n\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAQA;AAEA;MAYa,iCAAiC,CAAA;AAV9C,IAAA,WAAA,GAAA;QAWW,IAAA,CAAA,KAAK,GAAG,KAAK,CAAoC,EAAE;kFAAC;AAC9D,IAAA;8GAFY,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,mCAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECtB9C,0vBAuBA,EAAA,MAAA,EAAA,CAAA,4yBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDNY,mBAAmB,0FAAE,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAK7B,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAV7C,SAAS;+BACE,6BAA6B,EAA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AAA,CAAA,gBAAA,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAA/D,SAAS,EAAA,IAAA,EAAA,OAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAK7B,kCAAkC,EAAA,UAAA,EAAA,CAAA;kBAX9C,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+BAA+B,mBAGxB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,OAAA,EAC5B,CAAC,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,oCAAoC,CAAC,EAAA,IAAA,EACzF;AACJ,wBAAA,KAAK,EAAE,wEAAwE;AAChF,qBAAA,EAAA,QAAA,EAAA,i8EAAA,EAAA,MAAA,EAAA,CAAA,i9CAAA,CAAA,EAAA;;;"}
@@ -182,4 +182,4 @@ function normalizeActivityRowPayload(payload) {
182
182
  }
183
183
 
184
184
  export { builderValueToSafetyPlanSectionPayloads as b, normalizeSafetyPlanSectionBuilderValue as n, safetyPlanSectionsToBuilderValue as s };
185
- //# sourceMappingURL=acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs.map
185
+ //# sourceMappingURL=acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-DQX6nPWP.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs","sources":["../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-sections-page/safety-plan-section-builder.types.ts"],"sourcesContent":["import { AXPDataGenerator } from '@acorex-platform/framework-client/core';\n\nimport {\n enrichSectionTypeSnapshot,\n isActivitySectionType,\n resolveEntityRefId,\n type AXMSafetyPlanSectionBuilderItemValue,\n type AXMSafetyPlanSectionBuilderSectionValue,\n type AXMSafetyPlanSectionBuilderValue,\n type AXMSafetyPlanActivityRowBuilderPayload,\n type AXMSafetyPlanActivitySectionSnapshot,\n type AXMWorkplaceSafetyManagementSafetyPlanSectionEntityModel,\n type AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nexport function createSafetyPlanSectionBuilderDefaultValue(): AXMSafetyPlanSectionBuilderValue {\n return { sections: [] };\n}\n\nexport function normalizeSafetyPlanSectionBuilderValue(\n value: AXMSafetyPlanSectionBuilderValue | null | undefined,\n): AXMSafetyPlanSectionBuilderValue {\n if (!value || !Array.isArray(value.sections)) {\n return createSafetyPlanSectionBuilderDefaultValue();\n }\n\n return {\n sections: value.sections.map((section, index) => normalizeSection(section, index)),\n };\n}\n\nexport function safetyPlanSectionsToBuilderValue(\n rows: AXMWorkplaceSafetyManagementSafetyPlanSectionEntityModel[],\n): AXMSafetyPlanSectionBuilderValue {\n const ordered = [...rows].sort(\n (a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0) || String(a.code ?? '').localeCompare(String(b.code ?? '')),\n );\n return {\n sections: ordered.map((row, index) => {\n const legacyItem = row.items?.[0];\n const sectionTypeId =\n resolveEntityRefId(legacyItem?.sectionTypeId) ??\n resolveEntityRefId(legacyItem?.sectionType) ??\n '';\n const sectionType = enrichSectionTypeSnapshot(sectionTypeId, legacyItem?.sectionType);\n const isActivity = isActivitySectionType(sectionTypeId, sectionType);\n\n return {\n id: row.id,\n sectionTypeId,\n sectionType,\n title: row.title,\n description: row.description ?? '',\n safetyPlanId: row.safetyPlanId,\n code: row.code,\n sourceSafetyPlanTypeSectionId: row.sourceSafetyPlanTypeSectionId,\n sortOrder: row.sortOrder ?? index + 1,\n widgetOptions: normalizeWidgetOptions(row.widgetOptions),\n items: isActivity\n ? toActivityBuilderItems(row.items ?? [], sectionTypeId, sectionType)\n : (row.items ?? []).map((item, itemIndex) => ({\n id: `${row.id}__item_${itemIndex + 1}`,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n })),\n };\n }),\n };\n}\n\nexport function builderValueToSafetyPlanSectionPayloads(\n value: AXMSafetyPlanSectionBuilderValue,\n safetyPlanId: string,\n): Array<{\n id: string;\n safetyPlanId: string;\n title: string;\n description?: string;\n sectionTypeId: string;\n sectionType?: AXMSafetyPlanSectionBuilderSectionValue['sectionType'];\n sourceSafetyPlanTypeSectionId?: string;\n sortOrder: number;\n safetyPlanActivityId?: string;\n safetyPlanActivity?: AXMSafetyPlanSectionBuilderSectionValue['safetyPlanActivity'];\n widgetOptions?: AXMSafetyPlanSectionBuilderSectionValue['widgetOptions'];\n items: AXMSafetyPlanSectionBuilderItemValue[];\n}> {\n return value.sections.map((section, index) => ({\n id: section.id,\n safetyPlanId,\n title: section.title,\n description: section.description?.trim() ? section.description.trim() : undefined,\n sectionTypeId: section.sectionTypeId,\n sectionType: section.sectionType,\n sourceSafetyPlanTypeSectionId: section.sourceSafetyPlanTypeSectionId,\n sortOrder: typeof section.sortOrder === 'number' ? section.sortOrder : index + 1,\n safetyPlanActivityId: section.safetyPlanActivityId,\n safetyPlanActivity: section.safetyPlanActivity,\n widgetOptions: section.widgetOptions,\n items: section.items.map((item) => ({\n ...item,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n activityRow: item.activityRow ? normalizeActivityRowPayload(item.activityRow) : undefined,\n })),\n }));\n}\n\nfunction toActivityBuilderItems(\n items: AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel[],\n sectionTypeId: string,\n sectionType: AXMSafetyPlanSectionBuilderSectionValue['sectionType'],\n): AXMSafetyPlanSectionBuilderItemValue[] {\n const rows = items\n .map((item, index): AXMSafetyPlanSectionBuilderItemValue | null => {\n const rowId =\n resolveEntityRefId(item.items?.[0]?.id) ??\n resolveEntityRefId(item.itemIds?.[0]) ??\n '';\n const title =\n (typeof item.title === 'string' && item.title.trim()) ||\n item.items?.[0]?.title ||\n undefined;\n const hasRowData =\n (typeof title === 'string' && title.trim().length > 0) ||\n !!rowId;\n\n if (!hasRowData && !rowId) {\n return null;\n }\n\n if (!rowId && !title?.trim()) {\n return null;\n }\n\n const id = rowId || AXPDataGenerator.uuid();\n const code =\n (typeof item.code === 'string' && item.code.trim()) ||\n item.items?.[0]?.code ||\n undefined;\n const description =\n (typeof item.description === 'string' && item.description.trim()) || undefined;\n\n return {\n id,\n itemIds: [id],\n items: [{ id, title, code }],\n activityRow: {\n code,\n sortOrder: typeof item.sortOrder === 'number' ? item.sortOrder : index + 1,\n title,\n description,\n },\n };\n })\n .filter((item): item is AXMSafetyPlanSectionBuilderItemValue => item != null);\n\n if (rows.length > 0) {\n return rows;\n }\n\n return items.map((item, itemIndex) => ({\n id: `${sectionTypeId || 'section'}__item_${itemIndex + 1}`,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n }));\n}\n\nfunction normalizeSection(\n section: Partial<AXMSafetyPlanSectionBuilderSectionValue>,\n index: number,\n): AXMSafetyPlanSectionBuilderSectionValue {\n const id = typeof section.id === 'string' && section.id ? section.id : AXPDataGenerator.uuid();\n const sectionTypeId = resolveEntityRefId(section.sectionTypeId) ?? '';\n const safetyPlanActivityId = resolveEntityRefId(section.safetyPlanActivityId) ?? undefined;\n return {\n id,\n sectionTypeId,\n sectionType: enrichSectionTypeSnapshot(sectionTypeId, section.sectionType),\n title: typeof section.title === 'string' ? section.title : '',\n description: typeof section.description === 'string' ? section.description : '',\n safetyPlanId: typeof section.safetyPlanId === 'string' ? section.safetyPlanId : undefined,\n code: typeof section.code === 'string' ? section.code : undefined,\n sourceSafetyPlanTypeSectionId:\n typeof section.sourceSafetyPlanTypeSectionId === 'string'\n ? section.sourceSafetyPlanTypeSectionId\n : undefined,\n sortOrder: typeof section.sortOrder === 'number' ? section.sortOrder : index + 1,\n required: section.required === true,\n safetyPlanActivityId,\n safetyPlanActivity: section.safetyPlanActivity,\n widgetOptions: normalizeWidgetOptions(section.widgetOptions),\n items: Array.isArray(section.items)\n ? section.items.map((item) => normalizeItem(item, id, sectionTypeId, section.sectionType))\n : [],\n };\n}\n\nfunction normalizeWidgetOptions(\n value: AXMSafetyPlanSectionBuilderSectionValue['widgetOptions'] | unknown,\n): AXMSafetyPlanSectionBuilderSectionValue['widgetOptions'] | undefined {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return undefined;\n }\n return { ...(value as NonNullable<AXMSafetyPlanSectionBuilderSectionValue['widgetOptions']>) };\n}\n\nfunction normalizeItem(\n item: Partial<AXMSafetyPlanSectionBuilderItemValue>,\n sectionId: string,\n sectionTypeId: string,\n sectionType: AXMSafetyPlanSectionBuilderSectionValue['sectionType'],\n): AXMSafetyPlanSectionBuilderItemValue {\n const isActivity = isActivitySectionType(sectionTypeId, sectionType);\n if (isActivity && item.activityRow) {\n const activityRow = normalizeActivityRowPayload(item.activityRow);\n const stepId =\n typeof item.id === 'string' && item.id && !item.id.includes('__item_') && !item.id.includes('__entity_')\n ? item.id\n : AXPDataGenerator.uuid();\n const title = activityRow.title?.trim() || 'Row';\n return {\n id: stepId,\n itemIds: [stepId],\n items: [{ id: stepId, title, code: activityRow.code }],\n activityRow,\n };\n }\n\n const id = typeof item.id === 'string' && item.id ? item.id : AXPDataGenerator.uuid();\n return {\n id: id.includes('__item_') || id.includes('__entity_') ? id : `${sectionId}__item_${id}`,\n itemIds: Array.isArray(item.itemIds) ? item.itemIds.filter((x): x is string => typeof x === 'string') : [],\n items: Array.isArray(item.items) ? item.items : [],\n };\n}\n\nfunction normalizeActivityRowPayload(\n payload: AXMSafetyPlanActivityRowBuilderPayload,\n): AXMSafetyPlanActivityRowBuilderPayload {\n return {\n code: typeof payload.code === 'string' ? payload.code : undefined,\n sortOrder: typeof payload.sortOrder === 'number' ? payload.sortOrder : undefined,\n title: typeof payload.title === 'string' ? payload.title : undefined,\n description: typeof payload.description === 'string' ? payload.description : undefined,\n sections: Array.isArray(payload.sections)\n ? payload.sections.map((section) => ({\n sectionTypeId: String(section.sectionTypeId ?? ''),\n sectionType: section.sectionType,\n itemIds: Array.isArray(section.itemIds) ? [...section.itemIds] : [],\n items: Array.isArray(section.items) ? section.items.map((item) => ({ ...item })) : [],\n sortOrder: typeof section.sortOrder === 'number' ? section.sortOrder : undefined,\n title: typeof section.title === 'string' ? section.title : undefined,\n }))\n : undefined,\n };\n}\n\nexport type {\n AXMSafetyPlanSectionBuilderItemValue,\n AXMSafetyPlanSectionBuilderSectionValue,\n AXMSafetyPlanSectionBuilderValue,\n AXMSafetyPlanActivityRowBuilderPayload,\n AXMSafetyPlanActivitySectionSnapshot,\n};\n"],"names":[],"mappings":";;;SAegB,0CAA0C,GAAA;AACxD,IAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;AACzB;AAEM,SAAU,sCAAsC,CACpD,KAA0D,EAAA;AAE1D,IAAA,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC5C,OAAO,0CAA0C,EAAE;IACrD;IAEA,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,KAAK,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;KACnF;AACH;AAEM,SAAU,gCAAgC,CAC9C,IAAgE,EAAA;IAEhE,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,IAAI,CAC5B,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAC9G;IACD,OAAO;QACL,QAAQ,EAAE,OAAO,CA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Q,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS;AAChF,gBAAA,KAAK,EAAE,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS;AACrE,aAAA,CAAC;AACJ,cAAE,SAAS;KACd;AACH;;"}
1
+ {"version":3,"file":"acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-DQX6nPWP.mjs","sources":["../../../../libs/modules/workplacesafety-management/client/src/lib/features/safety-plan-sections-page/safety-plan-section-builder.types.ts"],"sourcesContent":["import { AXPDataGenerator } from '@acorex-platform/framework-client/core';\n\nimport {\n enrichSectionTypeSnapshot,\n isActivitySectionType,\n resolveEntityRefId,\n type AXMSafetyPlanSectionBuilderItemValue,\n type AXMSafetyPlanSectionBuilderSectionValue,\n type AXMSafetyPlanSectionBuilderValue,\n type AXMSafetyPlanActivityRowBuilderPayload,\n type AXMSafetyPlanActivitySectionSnapshot,\n type AXMWorkplaceSafetyManagementSafetyPlanSectionEntityModel,\n type AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel,\n} from '@acorex-platform/module-workplacesafety-management-client/contracts';\n\nexport function createSafetyPlanSectionBuilderDefaultValue(): AXMSafetyPlanSectionBuilderValue {\n return { sections: [] };\n}\n\nexport function normalizeSafetyPlanSectionBuilderValue(\n value: AXMSafetyPlanSectionBuilderValue | null | undefined,\n): AXMSafetyPlanSectionBuilderValue {\n if (!value || !Array.isArray(value.sections)) {\n return createSafetyPlanSectionBuilderDefaultValue();\n }\n\n return {\n sections: value.sections.map((section, index) => normalizeSection(section, index)),\n };\n}\n\nexport function safetyPlanSectionsToBuilderValue(\n rows: AXMWorkplaceSafetyManagementSafetyPlanSectionEntityModel[],\n): AXMSafetyPlanSectionBuilderValue {\n const ordered = [...rows].sort(\n (a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0) || String(a.code ?? '').localeCompare(String(b.code ?? '')),\n );\n return {\n sections: ordered.map((row, index) => {\n const legacyItem = row.items?.[0];\n const sectionTypeId =\n resolveEntityRefId(legacyItem?.sectionTypeId) ??\n resolveEntityRefId(legacyItem?.sectionType) ??\n '';\n const sectionType = enrichSectionTypeSnapshot(sectionTypeId, legacyItem?.sectionType);\n const isActivity = isActivitySectionType(sectionTypeId, sectionType);\n\n return {\n id: row.id,\n sectionTypeId,\n sectionType,\n title: row.title,\n description: row.description ?? '',\n safetyPlanId: row.safetyPlanId,\n code: row.code,\n sourceSafetyPlanTypeSectionId: row.sourceSafetyPlanTypeSectionId,\n sortOrder: row.sortOrder ?? index + 1,\n widgetOptions: normalizeWidgetOptions(row.widgetOptions),\n items: isActivity\n ? toActivityBuilderItems(row.items ?? [], sectionTypeId, sectionType)\n : (row.items ?? []).map((item, itemIndex) => ({\n id: `${row.id}__item_${itemIndex + 1}`,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n })),\n };\n }),\n };\n}\n\nexport function builderValueToSafetyPlanSectionPayloads(\n value: AXMSafetyPlanSectionBuilderValue,\n safetyPlanId: string,\n): Array<{\n id: string;\n safetyPlanId: string;\n title: string;\n description?: string;\n sectionTypeId: string;\n sectionType?: AXMSafetyPlanSectionBuilderSectionValue['sectionType'];\n sourceSafetyPlanTypeSectionId?: string;\n sortOrder: number;\n safetyPlanActivityId?: string;\n safetyPlanActivity?: AXMSafetyPlanSectionBuilderSectionValue['safetyPlanActivity'];\n widgetOptions?: AXMSafetyPlanSectionBuilderSectionValue['widgetOptions'];\n items: AXMSafetyPlanSectionBuilderItemValue[];\n}> {\n return value.sections.map((section, index) => ({\n id: section.id,\n safetyPlanId,\n title: section.title,\n description: section.description?.trim() ? section.description.trim() : undefined,\n sectionTypeId: section.sectionTypeId,\n sectionType: section.sectionType,\n sourceSafetyPlanTypeSectionId: section.sourceSafetyPlanTypeSectionId,\n sortOrder: typeof section.sortOrder === 'number' ? section.sortOrder : index + 1,\n safetyPlanActivityId: section.safetyPlanActivityId,\n safetyPlanActivity: section.safetyPlanActivity,\n widgetOptions: section.widgetOptions,\n items: section.items.map((item) => ({\n ...item,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n activityRow: item.activityRow ? normalizeActivityRowPayload(item.activityRow) : undefined,\n })),\n }));\n}\n\nfunction toActivityBuilderItems(\n items: AXMWorkplaceSafetyManagementSafetyPlanSectionItemModel[],\n sectionTypeId: string,\n sectionType: AXMSafetyPlanSectionBuilderSectionValue['sectionType'],\n): AXMSafetyPlanSectionBuilderItemValue[] {\n const rows = items\n .map((item, index): AXMSafetyPlanSectionBuilderItemValue | null => {\n const rowId =\n resolveEntityRefId(item.items?.[0]?.id) ??\n resolveEntityRefId(item.itemIds?.[0]) ??\n '';\n const title =\n (typeof item.title === 'string' && item.title.trim()) ||\n item.items?.[0]?.title ||\n undefined;\n const hasRowData =\n (typeof title === 'string' && title.trim().length > 0) ||\n !!rowId;\n\n if (!hasRowData && !rowId) {\n return null;\n }\n\n if (!rowId && !title?.trim()) {\n return null;\n }\n\n const id = rowId || AXPDataGenerator.uuid();\n const code =\n (typeof item.code === 'string' && item.code.trim()) ||\n item.items?.[0]?.code ||\n undefined;\n const description =\n (typeof item.description === 'string' && item.description.trim()) || undefined;\n\n return {\n id,\n itemIds: [id],\n items: [{ id, title, code }],\n activityRow: {\n code,\n sortOrder: typeof item.sortOrder === 'number' ? item.sortOrder : index + 1,\n title,\n description,\n },\n };\n })\n .filter((item): item is AXMSafetyPlanSectionBuilderItemValue => item != null);\n\n if (rows.length > 0) {\n return rows;\n }\n\n return items.map((item, itemIndex) => ({\n id: `${sectionTypeId || 'section'}__item_${itemIndex + 1}`,\n itemIds: [...(item.itemIds ?? [])],\n items: item.items ? [...item.items] : [],\n }));\n}\n\nfunction normalizeSection(\n section: Partial<AXMSafetyPlanSectionBuilderSectionValue>,\n index: number,\n): AXMSafetyPlanSectionBuilderSectionValue {\n const id = typeof section.id === 'string' && section.id ? section.id : AXPDataGenerator.uuid();\n const sectionTypeId = resolveEntityRefId(section.sectionTypeId) ?? '';\n const safetyPlanActivityId = resolveEntityRefId(section.safetyPlanActivityId) ?? undefined;\n return {\n id,\n sectionTypeId,\n sectionType: enrichSectionTypeSnapshot(sectionTypeId, section.sectionType),\n title: typeof section.title === 'string' ? section.title : '',\n description: typeof section.description === 'string' ? section.description : '',\n safetyPlanId: typeof section.safetyPlanId === 'string' ? section.safetyPlanId : undefined,\n code: typeof section.code === 'string' ? section.code : undefined,\n sourceSafetyPlanTypeSectionId:\n typeof section.sourceSafetyPlanTypeSectionId === 'string'\n ? section.sourceSafetyPlanTypeSectionId\n : undefined,\n sortOrder: typeof section.sortOrder === 'number' ? section.sortOrder : index + 1,\n required: section.required === true,\n safetyPlanActivityId,\n safetyPlanActivity: section.safetyPlanActivity,\n widgetOptions: normalizeWidgetOptions(section.widgetOptions),\n items: Array.isArray(section.items)\n ? section.items.map((item) => normalizeItem(item, id, sectionTypeId, section.sectionType))\n : [],\n };\n}\n\nfunction normalizeWidgetOptions(\n value: AXMSafetyPlanSectionBuilderSectionValue['widgetOptions'] | unknown,\n): AXMSafetyPlanSectionBuilderSectionValue['widgetOptions'] | undefined {\n if (!value || typeof value !== 'object' || Array.isArray(value)) {\n return undefined;\n }\n return { ...(value as NonNullable<AXMSafetyPlanSectionBuilderSectionValue['widgetOptions']>) };\n}\n\nfunction normalizeItem(\n item: Partial<AXMSafetyPlanSectionBuilderItemValue>,\n sectionId: string,\n sectionTypeId: string,\n sectionType: AXMSafetyPlanSectionBuilderSectionValue['sectionType'],\n): AXMSafetyPlanSectionBuilderItemValue {\n const isActivity = isActivitySectionType(sectionTypeId, sectionType);\n if (isActivity && item.activityRow) {\n const activityRow = normalizeActivityRowPayload(item.activityRow);\n const stepId =\n typeof item.id === 'string' && item.id && !item.id.includes('__item_') && !item.id.includes('__entity_')\n ? item.id\n : AXPDataGenerator.uuid();\n const title = activityRow.title?.trim() || 'Row';\n return {\n id: stepId,\n itemIds: [stepId],\n items: [{ id: stepId, title, code: activityRow.code }],\n activityRow,\n };\n }\n\n const id = typeof item.id === 'string' && item.id ? item.id : AXPDataGenerator.uuid();\n return {\n id: id.includes('__item_') || id.includes('__entity_') ? id : `${sectionId}__item_${id}`,\n itemIds: Array.isArray(item.itemIds) ? item.itemIds.filter((x): x is string => typeof x === 'string') : [],\n items: Array.isArray(item.items) ? item.items : [],\n };\n}\n\nfunction normalizeActivityRowPayload(\n payload: AXMSafetyPlanActivityRowBuilderPayload,\n): AXMSafetyPlanActivityRowBuilderPayload {\n return {\n code: typeof payload.code === 'string' ? payload.code : undefined,\n sortOrder: typeof payload.sortOrder === 'number' ? payload.sortOrder : undefined,\n title: typeof payload.title === 'string' ? payload.title : undefined,\n description: typeof payload.description === 'string' ? payload.description : undefined,\n sections: Array.isArray(payload.sections)\n ? payload.sections.map((section) => ({\n sectionTypeId: String(section.sectionTypeId ?? ''),\n sectionType: section.sectionType,\n itemIds: Array.isArray(section.itemIds) ? [...section.itemIds] : [],\n items: Array.isArray(section.items) ? section.items.map((item) => ({ ...item })) : [],\n sortOrder: typeof section.sortOrder === 'number' ? section.sortOrder : undefined,\n title: typeof section.title === 'string' ? section.title : undefined,\n }))\n : undefined,\n };\n}\n\nexport type {\n AXMSafetyPlanSectionBuilderItemValue,\n AXMSafetyPlanSectionBuilderSectionValue,\n AXMSafetyPlanSectionBuilderValue,\n AXMSafetyPlanActivityRowBuilderPayload,\n AXMSafetyPlanActivitySectionSnapshot,\n};\n"],"names":[],"mappings":";;;SAegB,0CAA0C,GAAA;AACxD,IAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;AACzB;AAEM,SAAU,sCAAsC,CACpD,KAA0D,EAAA;AAE1D,IAAA,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE;QAC5C,OAAO,0CAA0C,EAAE;IACrD;IAEA,OAAO;QACL,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,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a,EAAE,MAAM,CAAC,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;gBAClD,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE;AACnE,gBAAA,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,GAAG,EAAE;AACrF,gBAAA,SAAS,EAAE,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,GAAG,OAAO,CAAC,SAAS,GAAG,SAAS;AAChF,gBAAA,KAAK,EAAE,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS;AACrE,aAAA,CAAC;AACJ,cAAE,SAAS;KACd;AACH;;"}
@@ -20,13 +20,13 @@ import { AXPLayoutBuilderService } from '@acorex-platform/framework-client/layou
20
20
  import { AXPWidgetPropertyViewerService, AXPStandardSectionItemsBuilderComponent } from '@acorex-platform/framework-client/layout/components';
21
21
  import * as i3 from '@angular/common';
22
22
  import { CommonModule, AsyncPipe } from '@angular/common';
23
- import { n as normalizeSafetyPlanSectionBuilderValue, s as safetyPlanSectionsToBuilderValue } from './acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-C0SEJsVM.mjs';
24
- import { P as PPE_ITEM_VIEWER_WIDGET_NAME } from './acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-WoADykTl.mjs';
23
+ import { n as normalizeSafetyPlanSectionBuilderValue, s as safetyPlanSectionsToBuilderValue } from './acorex-platform-module-workplacesafety-management-client-safety-plan-section-builder.types-DQX6nPWP.mjs';
24
+ import { P as PPE_ITEM_VIEWER_WIDGET_NAME } from './acorex-platform-module-workplacesafety-management-client-acorex-platform-module-workplacesafety-management-client-B4ztvsfz.mjs';
25
25
  import { AXP_BEHAVIOR_PROPERTY_GROUP } from '@acorex-platform/framework-client/layout/widgets';
26
26
  import { createBooleanProperty } from '@acorex-platform/framework-shared/widget-core';
27
- import { SAFETY_PLAN_SECTIONS_SAVE_COMMAND } from './acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-D0aRQHWk.mjs';
28
- export { AXMSaveSafetyPlanSectionsCommand } from './acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-D0aRQHWk.mjs';
29
- import { A as AXMSafetyPlanPreviewService, h as hydrateSafetyPlanActivitySectionsForPreview } from './acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-BxVoD0Xb.mjs';
27
+ import { SAFETY_PLAN_SECTIONS_SAVE_COMMAND } from './acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-CQqJ-p5u.mjs';
28
+ export { AXMSaveSafetyPlanSectionsCommand } from './acorex-platform-module-workplacesafety-management-client-save-safety-plan-sections.command-CQqJ-p5u.mjs';
29
+ import { A as AXMSafetyPlanPreviewService, h as hydrateSafetyPlanActivitySectionsForPreview } from './acorex-platform-module-workplacesafety-management-client-hydrate-safety-plan-activity-sections-SFRvQ81J.mjs';
30
30
  import { resolveEntityRowDisplayText } from '@acorex-platform/framework-client/common';
31
31
 
32
32
  //#region ----- Imports -----
@@ -1029,11 +1029,11 @@ class AXMSafetyPlanSectionBuilderComponent {
1029
1029
  }
1030
1030
  }
1031
1031
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMSafetyPlanSectionBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1032
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMSafetyPlanSectionBuilderComponent, isStandalone: true, selector: "axm-safety-plan-section-builder", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, safetyPlanId: { classPropertyName: "safetyPlanId", publicName: "safetyPlanId", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "standardRef", first: true, predicate: AXPStandardSectionItemsBuilderComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"axm-safety-plan-section-builder\">\n @if (!readonly() && !hideHeaderActions() && allowAddSection()) {\n <div class=\"__header\">\n <div class=\"__header-left\"></div>\n <div class=\"__header-right\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"\n '@workplacesafety-management:safety-plan-sections.entities.safety-plan-section.actions.add-section.title'\n | translate\n | async\n \"\n [color]=\"'primary'\"\n (onClick)=\"addSection()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n\n <axp-standard-section-items-builder\n class=\"block min-h-[200px]\"\n [value]=\"builderValue()\"\n [config]=\"standardConfig()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"onBuilderValueChange($event)\"\n />\n</div>\n", styles: [".axm-safety-plan-section-builder .__header{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStandardSectionItemsBuilderComponent, selector: "axp-standard-section-items-builder", inputs: ["value", "config", "readonly"], outputs: ["valueChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1032
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMSafetyPlanSectionBuilderComponent, isStandalone: true, selector: "axm-safety-plan-section-builder", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, safetyPlanId: { classPropertyName: "safetyPlanId", publicName: "safetyPlanId", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, viewQueries: [{ propertyName: "standardRef", first: true, predicate: AXPStandardSectionItemsBuilderComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"axm-safety-plan-section-builder\">\n @if (!readonly() && !hideHeaderActions() && allowAddSection()) {\n <div class=\"__header\">\n <div class=\"__header-left\"></div>\n <div class=\"__header-right\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"\n '@workplacesafety-management:safety-plan-sections.entities.safety-plan-section.actions.add-section.title'\n | translate\n | async\n \"\n [color]=\"'primary'\"\n (onClick)=\"addSection()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n\n <axp-standard-section-items-builder\n class=\"block min-h-[200px]\"\n [value]=\"builderValue()\"\n [config]=\"standardConfig()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"onBuilderValueChange($event)\"\n />\n</div>\n", styles: [".axm-safety-plan-section-builder .__header{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i2.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "component", type: AXPStandardSectionItemsBuilderComponent, selector: "axp-standard-section-items-builder", inputs: ["value", "config", "readonly"], outputs: ["valueChange"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1033
1033
  }
1034
1034
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMSafetyPlanSectionBuilderComponent, decorators: [{
1035
1035
  type: Component,
1036
- args: [{ selector: 'axm-safety-plan-section-builder', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXTranslationModule, AXPStandardSectionItemsBuilderComponent], template: "<div class=\"axm-safety-plan-section-builder\">\n @if (!readonly() && !hideHeaderActions() && allowAddSection()) {\n <div class=\"__header\">\n <div class=\"__header-left\"></div>\n <div class=\"__header-right\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"\n '@workplacesafety-management:safety-plan-sections.entities.safety-plan-section.actions.add-section.title'\n | translate\n | async\n \"\n [color]=\"'primary'\"\n (onClick)=\"addSection()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n\n <axp-standard-section-items-builder\n class=\"block min-h-[200px]\"\n [value]=\"builderValue()\"\n [config]=\"standardConfig()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"onBuilderValueChange($event)\"\n />\n</div>\n", styles: [".axm-safety-plan-section-builder .__header{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"] }]
1036
+ args: [{ selector: 'axm-safety-plan-section-builder', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, AXButtonModule, AXDecoratorModule, AXTranslationModule, AXPStandardSectionItemsBuilderComponent], template: "<div class=\"axm-safety-plan-section-builder\">\n @if (!readonly() && !hideHeaderActions() && allowAddSection()) {\n <div class=\"__header\">\n <div class=\"__header-left\"></div>\n <div class=\"__header-right\">\n <ax-button\n class=\"ax-sm\"\n [text]=\"\n '@workplacesafety-management:safety-plan-sections.entities.safety-plan-section.actions.add-section.title'\n | translate\n | async\n \"\n [color]=\"'primary'\"\n (onClick)=\"addSection()\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n </div>\n }\n\n <axp-standard-section-items-builder\n class=\"block min-h-[200px]\"\n [value]=\"builderValue()\"\n [config]=\"standardConfig()\"\n [readonly]=\"readonly()\"\n (valueChange)=\"onBuilderValueChange($event)\"\n />\n</div>\n", styles: [".axm-safety-plan-section-builder .__header{margin-bottom:calc(var(--spacing, .25rem) * 3);display:flex;align-items:center;justify-content:space-between}\n/*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */\n"] }]
1037
1037
  }], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], safetyPlanId: [{ type: i0.Input, args: [{ isSignal: true, alias: "safetyPlanId", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], standardRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPStandardSectionItemsBuilderComponent), { isSignal: true }] }] } });
1038
1038
 
1039
1039
  //#region ---- Imports ----
@@ -1869,4 +1869,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
1869
1869
  }] });
1870
1870
 
1871
1871
  export { AXMSafetyPlanSectionBuilderComponent, AXMSafetyPlanSectionsPageComponent, AXMSafetyPlanSectionsPageComponentProvider, SAFETY_PLAN_SECTIONS_SAVE_COMMAND };
1872
- //# sourceMappingURL=acorex-platform-module-workplacesafety-management-client-index-x3bUQx1Y.mjs.map
1872
+ //# sourceMappingURL=acorex-platform-module-workplacesafety-management-client-safety-plan-sections-page-Bj0ZofWy.mjs.map