ngx-t-forms 2.0.37 → 3.1.0

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 (158) hide show
  1. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs} +4 -4
  2. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs.map → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs.map} +1 -1
  3. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs} +6 -6
  4. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs.map → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs.map} +1 -1
  5. package/fesm2022/ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs +643 -0
  6. package/fesm2022/ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs.map +1 -0
  7. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs → ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs} +4 -4
  8. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs.map +1 -0
  9. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs} +4 -4
  10. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs.map +1 -0
  11. package/fesm2022/ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs +261 -0
  12. package/fesm2022/ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs.map +1 -0
  13. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs} +4 -4
  14. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs.map → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs.map} +1 -1
  15. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs +157 -0
  16. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs.map +1 -0
  17. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs +373 -0
  18. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs.map +1 -0
  19. package/fesm2022/ngx-t-forms-document-picker.component-DIqaaBSl.mjs +1259 -0
  20. package/fesm2022/ngx-t-forms-document-picker.component-DIqaaBSl.mjs.map +1 -0
  21. package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs +417 -0
  22. package/fesm2022/ngx-t-forms-editor-input-element.component-CIELjDty.mjs.map +1 -0
  23. package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs +553 -0
  24. package/fesm2022/ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs.map +1 -0
  25. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs} +7 -7
  26. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs.map → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs.map} +1 -1
  27. package/fesm2022/ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs +86 -0
  28. package/fesm2022/ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs.map +1 -0
  29. package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs} +2 -2
  30. package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs.map → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs.map} +1 -1
  31. package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs +179 -0
  32. package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs.map +1 -0
  33. package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs} +6 -6
  34. package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs.map → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs} +12 -12
  36. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs.map → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs} +7 -7
  38. package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs.map → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs.map} +1 -1
  39. package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs +129 -0
  40. package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs.map +1 -0
  41. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs} +7 -7
  42. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs.map → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs.map} +1 -1
  43. package/fesm2022/{ngx-t-forms-index-CPNvE4PP.mjs → ngx-t-forms-index-C8NtLE16.mjs} +2 -2
  44. package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs.map +1 -0
  45. package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs → ngx-t-forms-input-custom.component-DiciFhSS.mjs} +2 -2
  46. package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs.map → ngx-t-forms-input-custom.component-DiciFhSS.mjs.map} +1 -1
  47. package/fesm2022/ngx-t-forms-input-editor.component-D12hrHOc.mjs +190 -0
  48. package/fesm2022/ngx-t-forms-input-editor.component-D12hrHOc.mjs.map +1 -0
  49. package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs} +2 -2
  50. package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs.map → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs.map} +1 -1
  51. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs +167 -0
  52. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs.map +1 -0
  53. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs → ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs} +3 -3
  54. package/fesm2022/ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs.map +1 -0
  55. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs} +3 -3
  56. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs.map +1 -0
  57. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs} +4 -4
  58. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs.map → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs.map} +1 -1
  59. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs} +4 -4
  60. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs.map} +1 -1
  61. package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs} +3 -3
  62. package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs.map → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map} +1 -1
  63. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs +447 -0
  64. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs.map +1 -0
  65. package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs} +3 -3
  66. package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map} +1 -1
  67. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs +905 -0
  68. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map +1 -0
  69. package/fesm2022/{ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs → ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs} +2188 -249
  70. package/fesm2022/ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map +1 -0
  71. package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs} +8 -8
  72. package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs.map → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs.map} +1 -1
  73. package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs +79 -0
  74. package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs.map +1 -0
  75. package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs +748 -0
  76. package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs.map +1 -0
  77. package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs +446 -0
  78. package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs.map +1 -0
  79. package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs +272 -0
  80. package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs.map +1 -0
  81. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs → ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs} +39 -8
  82. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs.map +1 -0
  83. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs +38 -0
  84. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs.map +1 -0
  85. package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs} +4 -4
  86. package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs.map → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs.map} +1 -1
  87. package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs} +8 -8
  88. package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs.map → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs.map} +1 -1
  89. package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs +169 -0
  90. package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs.map +1 -0
  91. package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs +263 -0
  92. package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
  93. package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs} +4 -4
  94. package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs.map → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map} +1 -1
  95. package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs} +4 -4
  96. package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs.map → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map} +1 -1
  97. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +173 -0
  98. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +1 -0
  99. package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs +574 -0
  100. package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs.map +1 -0
  101. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs → ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs} +17 -17
  102. package/fesm2022/ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs.map +1 -0
  103. package/fesm2022/ngx-t-forms.mjs +1 -1
  104. package/package.json +2 -2
  105. package/styles/_editor-mixins.scss +117 -117
  106. package/styles/_signature-pad.scss +26 -26
  107. package/styles/_tokens.scss +148 -148
  108. package/types/ngx-t-forms.d.ts +14 -2
  109. package/fesm2022/ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs +0 -643
  110. package/fesm2022/ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs.map +0 -1
  111. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs.map +0 -1
  112. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs.map +0 -1
  113. package/fesm2022/ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs +0 -261
  114. package/fesm2022/ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs.map +0 -1
  115. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs +0 -156
  116. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs.map +0 -1
  117. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs +0 -373
  118. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs.map +0 -1
  119. package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs +0 -704
  120. package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs.map +0 -1
  121. package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs +0 -294
  122. package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs.map +0 -1
  123. package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs +0 -240
  124. package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs.map +0 -1
  125. package/fesm2022/ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs +0 -86
  126. package/fesm2022/ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs.map +0 -1
  127. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs +0 -179
  128. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map +0 -1
  129. package/fesm2022/ngx-t-forms-index-CPNvE4PP.mjs.map +0 -1
  130. package/fesm2022/ngx-t-forms-input-editor.component-BWoKhlI3.mjs +0 -190
  131. package/fesm2022/ngx-t-forms-input-editor.component-BWoKhlI3.mjs.map +0 -1
  132. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs +0 -66
  133. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs.map +0 -1
  134. package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +0 -1
  135. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +0 -1
  136. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs +0 -447
  137. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs.map +0 -1
  138. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs +0 -905
  139. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs.map +0 -1
  140. package/fesm2022/ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs.map +0 -1
  141. package/fesm2022/ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs +0 -203
  142. package/fesm2022/ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs.map +0 -1
  143. package/fesm2022/ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs +0 -748
  144. package/fesm2022/ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs.map +0 -1
  145. package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs +0 -358
  146. package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs.map +0 -1
  147. package/fesm2022/ngx-t-forms-required-inputs.component-C-E3fQu6.mjs +0 -272
  148. package/fesm2022/ngx-t-forms-required-inputs.component-C-E3fQu6.mjs.map +0 -1
  149. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs.map +0 -1
  150. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +0 -38
  151. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +0 -1
  152. package/fesm2022/ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs +0 -169
  153. package/fesm2022/ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs.map +0 -1
  154. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs +0 -204
  155. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs.map +0 -1
  156. package/fesm2022/ngx-t-forms-validators-config.component-B3K9nLxx.mjs +0 -574
  157. package/fesm2022/ngx-t-forms-validators-config.component-B3K9nLxx.mjs.map +0 -1
  158. package/fesm2022/ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-t-forms-validators-config.component-B3K9nLxx.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/validators-config/validators-config.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/validators-config/validators-config.component.html"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n Input,\n type OnDestroy,\n ViewEncapsulation,\n computed,\n inject,\n input,\n output,\n signal,\n} from '@angular/core';\n\nimport { v4 as uuidv4 } from 'uuid';\n\nimport type {\n DraftFormControlCustomValidator,\n FormColumnInputs,\n FormControlCustomValidatorsInterface,\n} from 'ngx-t-forms-types';\nimport { CalculationFunctions, InputDataTypes, InputTypes } from 'ngx-t-forms-types';\n\nimport { CommonModule } from '@angular/common';\nimport { NgControl } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatCardModule } from '@angular/material/card';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Subject } from 'rxjs';\n\nimport { evaluatePredicate } from '../../../../shared/functions/array-access/predicate-dsl';\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\nimport {\n type FieldBinding,\n PREDICATE_OPERATORS,\n type ValidatorCondition,\n type ValidatorConditionGroup,\n deriveObservedInputs,\n emptyCondition,\n parseConditions,\n referencedTokens,\n serializeConditions,\n} from './validator-condition';\n\n/** A selectable field in the condition builder's field/value dropdowns. */\ninterface FieldOption {\n readonly variable: string;\n readonly label: string;\n readonly isSelf: boolean;\n /** A multiple-input column (lives inside a repeatable group). */\n readonly isMultiple: boolean;\n /** Whether the field holds a numeric value (gates numeric aggregates). */\n readonly numeric: boolean;\n /** The input read at runtime: a primary input id, or a list sub-item id. */\n readonly inputId: string;\n /** Row-array container id, for multiple-input columns. */\n readonly parentInputId?: string;\n}\n\n/** A friendly aggregate choice shown for a referenced list field. */\ninterface AggregateOption {\n readonly value: CalculationFunctions;\n readonly label: string;\n}\n\n/**\n * Internal editor implementing `MatFormFieldControl<FormControlCustomValidatorsInterface[]>`\n * for authoring a form input's custom validators.\n *\n * Rendered by `t-dynamic-data-edit` inside its `<mat-form-field>`, which supplies\n * the surrounding field label, hint, and validation errors — so this component\n * owns only the validator chip list and the inline draft editor.\n *\n * ### Authoring model\n * A validator's `expression` is evaluated by the shared predicate DSL where\n * **`true` means the field is invalid** (the error message is then shown). The\n * editor captures that condition through a **guided builder** — `field operator\n * value` rows joined by All/Any — that serialises to the expression string and\n * auto-derives `inputsObservedForChanges` from the fields it references. An\n * **Advanced** raw editor is the escape hatch for expressions the builder cannot\n * represent (grouping, mixed connectors, negation); these round-trip unchanged.\n *\n * The bound `value` may contain both string entries (legacy validator-name\n * references such as `'required'`, which are read-only) and object entries\n * ({@link FormControlCustomValidatorsInterface}, which are editable). Only object\n * entries open the draft editor.\n *\n * NOTE: `MatFormFieldControl<T>` mandates plain mutable `value` / `disabled` /\n * `required` / `placeholder` / `id` members, `@Input()` decorators, the\n * `focused` / `touched` / `stateChanges` members, and the `useExisting`\n * provider. These are framework wiring, not defects — the CLAUDE.md bans on\n * `@Input()` / `useExisting` do not apply to MatFormFieldControl integration.\n */\n@Component({\n selector: 'lib-validators-config',\n templateUrl: './validators-config.component.html',\n styleUrls: ['./validators-config.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n imports: [\n CommonModule,\n MatIconModule,\n MatChipsModule,\n MatCardModule,\n MatToolbarModule,\n MatButtonModule,\n MatButtonToggleModule,\n MatSlideToggleModule,\n MatTooltipModule,\n ],\n providers: [{ provide: MatFormFieldControl, useExisting: ValidatorsConfigComponent }],\n host: {\n 'class': 'lib-validators-config',\n '[attr.id]': 'id',\n },\n})\nexport class ValidatorsConfigComponent\n implements MatFormFieldControl<FormControlCustomValidatorsInterface[]>, OnDestroy\n{\n static nextId = 0;\n\n /** Emits whenever a piece of `MatFormFieldControl` state changes. */\n readonly stateChanges = new Subject<void>();\n readonly controlType = 'lib-validators-config';\n\n id = `lib-validators-config-${ValidatorsConfigComponent.nextId++}`;\n placeholder = '';\n focused = false;\n touched = false;\n required = false;\n describedBy = '';\n autofilled: boolean | undefined = undefined;\n userAriaDescribedBy: string | undefined = undefined;\n disableAutomaticLabeling: boolean | undefined = undefined;\n\n /** Whether the editor is inert. Kept as `@Input()` for the MFC contract. */\n @Input() disabled = false;\n /** Current validator list. Kept as `@Input()` for the MFC contract. */\n @Input() value: FormControlCustomValidatorsInterface[] = [];\n /** Validation errors surfaced by the parent for error-state derivation. */\n @Input() errors: IConfigElementError[] | undefined = [];\n\n /** Source input that owns this validator config (for multiple-input scopes). */\n readonly mapToData = input<FormColumnInputs | undefined>(undefined);\n /** Available form inputs offered as variables. */\n readonly formInputs = input<Array<FormColumnInputs>>([]);\n\n /** Emits the full validator list whenever it changes. */\n readonly valueChanged = output<FormControlCustomValidatorsInterface[]>();\n\n /** Operator choices shared with the array-access predicate builder. */\n protected readonly operators = PREDICATE_OPERATORS;\n\n /** Aggregate choices for a list field, with non-technical labels. */\n protected readonly aggregates: readonly AggregateOption[] = [\n { value: CalculationFunctions.Sum, label: 'total' },\n { value: CalculationFunctions.Avg, label: 'average' },\n { value: CalculationFunctions.Min, label: 'lowest' },\n { value: CalculationFunctions.Max, label: 'highest' },\n { value: CalculationFunctions.Count, label: 'count' },\n ];\n\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n /** Draft currently open in the inline editor, or `null` when closed. */\n readonly #edit = signal<DraftFormControlCustomValidator | null>(null);\n /** Read-only view of the open draft for the template. */\n protected readonly edit = this.#edit.asReadonly();\n\n /** Guided builder model mirroring the open draft's expression. */\n readonly #group = signal<ValidatorConditionGroup>({ connector: '&&', conditions: [] });\n protected readonly group = this.#group.asReadonly();\n\n /** Whether the draft is being edited as a raw expression instead of guided rows. */\n readonly #raw = signal(false);\n protected readonly raw = this.#raw.asReadonly();\n\n /** Chosen aggregate per referenced list variable (keyed by variable name). */\n readonly #functions = signal<Record<string, CalculationFunctions>>({});\n\n /** Whether the validator being authored lives on a multiple-input sub-item. */\n protected readonly validatorOnList = computed<boolean>(\n () => !!this.mapToData()?.multipleInputInEditId,\n );\n\n /**\n * Fields the builder can reference: every primary input plus every\n * multiple-input column. A multiple column carries its row-array container\n * (`parentInputId`); whether it must be aggregated is decided per condition\n * (see {@link requiredAggregateVariables}), not by the field itself.\n */\n protected readonly fieldOptions = computed<readonly FieldOption[]>(() => {\n const self = this.mapToData();\n const selfId = self?.id;\n const options: FieldOption[] = [];\n for (const input of this.formInputs()) {\n if (!input.formControlName) continue;\n const group = input.multipleInputInEditId;\n options.push({\n variable: input.formControlName,\n label: input.label || input.formControlName,\n isSelf: input.id === selfId,\n isMultiple: !!group,\n numeric: this.#isNumeric(input),\n inputId: group ? input.id : (input.originalId ?? input.id),\n parentInputId: group,\n });\n }\n return options;\n });\n\n /** Primary (scalar) fields, for the first dropdown group. */\n protected readonly directFields = computed<readonly FieldOption[]>(() =>\n this.fieldOptions().filter((f) => !f.isMultiple),\n );\n\n /** Multiple-input columns, for the second dropdown group. */\n protected readonly listFields = computed<readonly FieldOption[]>(() =>\n this.fieldOptions().filter((f) => f.isMultiple),\n );\n\n /** Field option keyed by its expression variable, for operand lookups. */\n readonly #fieldByVariable = computed<ReadonlyMap<string, FieldOption>>(\n () => new Map(this.fieldOptions().map((f) => [f.variable, f])),\n );\n\n /** Multiple-input columns actually referenced by the current expression. */\n protected readonly referencedListFields = computed<readonly FieldOption[]>(() => {\n const tokens = referencedTokens(this.#edit()?.expression ?? '');\n return this.listFields().filter((f) => tokens.has(f.variable));\n });\n\n /**\n * Multiple-input variables that MUST be aggregated: a list column compared\n * against a non-list operand (a primary field or a typed value) has to be\n * reduced to a single value. A list-vs-list comparison leaves the aggregate\n * optional (the columns are row-aligned). In raw mode operand pairing cannot\n * be analysed, so every referenced list column is treated as required.\n */\n protected readonly requiredAggregateVariables = computed<ReadonlySet<string>>(() => {\n if (this.#raw()) {\n return new Set(this.referencedListFields().map((f) => f.variable));\n }\n const byVariable = this.#fieldByVariable();\n const required = new Set<string>();\n for (const cond of this.#group().conditions) {\n const left = byVariable.get(cond.field);\n const right = cond.compareTo === 'field' ? byVariable.get(cond.value) : undefined;\n const leftMultiple = !!left?.isMultiple;\n const rightMultiple = !!right?.isMultiple;\n if (leftMultiple && !rightMultiple) required.add(cond.field);\n if (rightMultiple && !leftMultiple && right) required.add(right.variable);\n }\n return required;\n });\n\n /** Whether every list column that MUST be aggregated has an aggregate chosen. */\n protected readonly aggregatesResolved = computed<boolean>(() => {\n const functions = this.#functions();\n const required = this.requiredAggregateVariables();\n return [...required].every((variable) => !!functions[variable]);\n });\n\n /** Aggregates offered for a field: numeric columns get all, others only count. */\n protected aggregatesFor(field: FieldOption): readonly AggregateOption[] {\n return field.numeric\n ? this.aggregates\n : this.aggregates.filter((a) => a.value === CalculationFunctions.Count);\n }\n\n /** Whether a referenced list column is required to have an aggregate. */\n protected isAggregateRequired(variable: string): boolean {\n return this.requiredAggregateVariables().has(variable);\n }\n\n /**\n * Whether a guided condition is fully specified (field, operator and a value\n * all set). Incomplete conditions are otherwise silently dropped on save, so\n * this gates {@link canSave}.\n */\n protected isConditionComplete(condition: ValidatorCondition): boolean {\n return (\n condition.field.trim() !== '' &&\n condition.operator.trim() !== '' &&\n condition.value.trim() !== ''\n );\n }\n\n /** Whether the guided builder has at least one condition and all are complete. */\n protected readonly conditionsComplete = computed<boolean>(() => {\n if (this.#raw()) return true; // raw mode is gated by syntaxError + non-empty\n const conditions = this.#group().conditions;\n return conditions.length > 0 && conditions.every((c) => this.isConditionComplete(c));\n });\n\n /** Whether the current draft expression can be edited in the guided builder. */\n protected readonly canUseGuided = computed<boolean>(\n () => parseConditions(this.#edit()?.expression ?? '', this.#fieldNameSet()) !== null,\n );\n\n /** Human-readable syntax error for the raw editor, or `null` when valid/empty. */\n protected readonly syntaxError = computed<string | null>(() => {\n const expression = this.#edit()?.expression ?? '';\n if (expression.trim() === '') return null;\n try {\n evaluatePredicate(expression, {});\n return null;\n } catch (error: unknown) {\n return error instanceof Error ? error.message : 'The expression syntax is invalid.';\n }\n });\n\n /** Whether the open draft can be saved (message, a complete/valid rule, aggregates chosen). */\n protected readonly canSave = computed<boolean>(() => {\n const draft = this.#edit();\n return (\n !!draft &&\n !!draft.message &&\n !!draft.expression &&\n this.syntaxError() === null &&\n this.conditionsComplete() &&\n this.aggregatesResolved()\n );\n });\n\n /** A one-line reason the rule cannot be saved yet, or `null` when it can. */\n protected readonly saveHint = computed<string | null>(() => {\n const draft = this.#edit();\n if (!draft) return null;\n if (!draft.message) return 'Add an error message.';\n if (!this.#raw() && !this.conditionsComplete()) {\n return 'Finish every condition — choose a field, a condition and a value.';\n }\n if (!draft.expression) return 'Add at least one condition.';\n if (this.#raw() && this.syntaxError() !== null) return this.syntaxError();\n if (!this.aggregatesResolved()) return 'Choose how to combine each list field.';\n return null;\n });\n\n // MatFormFieldControl reads these as plain getters during its own change\n // detection, so they stay getters rather than `computed()` signals.\n\n get empty(): boolean {\n return this.value.length === 0;\n }\n\n get shouldLabelFloat(): boolean {\n return this.focused || !this.empty;\n }\n\n get errorState(): boolean {\n const ngControlError = this.ngControl?.errors != null;\n const externalError = (this.errors?.length ?? 0) > 0 && this.touched;\n const requiredUnset = this.empty && this.required;\n return requiredUnset || ngControlError || externalError;\n }\n\n setDescribedByIds(ids: string[]): void {\n this.describedBy = ids.join(' ');\n const el = this.#elementRef.nativeElement;\n const controlElement = el.querySelector('.lib-validators-config__list');\n controlElement?.setAttribute('aria-describedby', this.describedBy);\n this.stateChanges.next();\n }\n\n onContainerClick(): void {\n this.markAsTouched();\n this.stateChanges.next();\n }\n\n onTouched: () => void = () => {};\n\n markAsTouched(): void {\n if (!this.touched) {\n this.touched = true;\n this.onTouched();\n this.stateChanges.next();\n }\n }\n\n /** Tear down the MFC state stream so subscribers do not leak. */\n ngOnDestroy(): void {\n this.stateChanges.complete();\n }\n\n /** `@for` track key: object validators by id, string validators by value. */\n protected trackValidator(\n validator: string | FormControlCustomValidatorsInterface,\n ): string {\n return typeof validator === 'string' ? validator : validator.id;\n }\n\n /** Resolve the label shown on a validator chip. */\n protected validatorLabel(validator: string | FormControlCustomValidatorsInterface): string {\n return typeof validator === 'string' ? validator : validator.message;\n }\n\n /** Whether a validator chip is the one currently being edited. */\n protected isEditing(validator: string | FormControlCustomValidatorsInterface): boolean {\n if (typeof validator === 'string') {\n return false;\n }\n return this.#edit()?.id === validator.id;\n }\n\n /**\n * Open a validator for editing. String entries are read-only legacy\n * references and are ignored. Editing the open validator again closes it.\n * The draft is a clone, so edits only land in `value` on Save.\n *\n * DEFECT FIX (discard semantics): the editor is an inline panel with an\n * explicit Close/Save toolbar, not a transient overlay that vanishes on an\n * outside click. Opening a different validator (or {@link addValidator})\n * deliberately replaces the open draft — an explicit, documented discard,\n * never a silent loss mid-edit.\n */\n protected editV(validator: string | FormControlCustomValidatorsInterface): void {\n if (typeof validator === 'string') {\n return;\n }\n if (this.#edit()?.id === validator.id) {\n this.#edit.set(null);\n return;\n }\n this.#edit.set(this.#cloneValidator(validator));\n this.#initBuilderFromDraft();\n }\n\n /** Begin a brand-new validator draft (id assigned on save). */\n protected addValidator(): void {\n this.#edit.set(this.#emptyDraft());\n this.#initBuilderFromDraft();\n }\n\n /** Discard the open draft without persisting it. */\n protected closeEditor(): void {\n this.#edit.set(null);\n }\n\n /** Remove a validator (string or object) from the list and emit. */\n protected remove(validator: string | FormControlCustomValidatorsInterface): void {\n const next = this.value.filter((item) => !this.#sameValidator(item, validator));\n this.#commit(next);\n if (this.isEditing(validator)) {\n this.#edit.set(null);\n }\n }\n\n /** Update the draft's message, or replace its raw expression as the user types. */\n protected onTextChange(event: Event, key: 'message' | 'expression'): void {\n const value = (event.target as HTMLInputElement).value;\n if (key === 'expression') {\n this.#syncExpression(value);\n return;\n }\n this.#edit.update((draft) => {\n const base = draft ?? this.#emptyDraft();\n return { ...base, message: value };\n });\n }\n\n /** Toggle whether users may override (warn instead of block) this validator. */\n protected setCanOverride(checked: boolean): void {\n this.#edit.update((draft) => (draft ? { ...draft, canOverride: checked } : draft));\n }\n\n /**\n * Persist the open draft. A new draft (no id) is appended with a fresh uuid;\n * an existing draft (has id) replaces the matching entry. Emits the new list.\n */\n protected saveVariable(): void {\n const draft = this.#edit();\n if (!draft || !draft.message || !draft.expression) {\n return;\n }\n if (draft.id !== undefined) {\n const id = draft.id;\n const saved: FormControlCustomValidatorsInterface = { ...draft, id };\n this.#commit(\n this.value.map((item) =>\n typeof item !== 'string' && item.id === id ? saved : item,\n ),\n );\n } else {\n const saved: FormControlCustomValidatorsInterface = { ...draft, id: uuidv4() };\n this.#commit([...this.value, saved]);\n }\n this.#edit.set(null);\n }\n\n // ---- guided condition builder ------------------------------------------\n\n /** Switch the All/Any connector joining the conditions. */\n protected setConnector(connector: '&&' | '||'): void {\n this.#applyGroup({ ...this.#group(), connector });\n }\n\n /** Append a fresh condition, defaulting its field to the owning input. */\n protected addCondition(): void {\n const fallback =\n this.directFields().find((f) => f.isSelf) ??\n this.directFields()[0] ??\n this.fieldOptions()[0];\n const group = this.#group();\n this.#applyGroup({\n ...group,\n conditions: [...group.conditions, emptyCondition(fallback?.variable ?? '')],\n });\n }\n\n /** Apply a partial change to the condition at `index`. */\n protected updateCondition(index: number, patch: Partial<ValidatorCondition>): void {\n const group = this.#group();\n const conditions = group.conditions.map((c, i) => (i === index ? { ...c, ...patch } : c));\n this.#applyGroup({ ...group, conditions });\n }\n\n /** Flip a condition between comparing to a typed value and another field. */\n protected toggleCompareTo(index: number): void {\n const condition = this.#group().conditions[index];\n if (!condition) return;\n if (condition.compareTo === 'value') {\n const field = this.fieldOptions().find((f) => f.variable !== condition.field);\n this.updateCondition(index, { compareTo: 'field', value: field?.variable ?? '' });\n } else {\n this.updateCondition(index, { compareTo: 'value', value: '' });\n }\n }\n\n /** Remove the condition at `index`. */\n protected removeCondition(index: number): void {\n const group = this.#group();\n this.#applyGroup({ ...group, conditions: group.conditions.filter((_, i) => i !== index) });\n }\n\n /**\n * Choose (or clear, by re-clicking) the aggregate that reduces a referenced\n * list field to a single value.\n */\n protected setFunction(variable: string, fn: CalculationFunctions): void {\n this.#functions.update((current) => {\n const next = { ...current };\n if (next[variable] === fn) {\n delete next[variable];\n } else {\n next[variable] = fn;\n }\n return next;\n });\n // The expression text is unchanged, but the observed deps now carry the\n // aggregate — re-sync so inputsObservedForChanges reflects the choice.\n this.#syncExpression(this.#edit()?.expression ?? '');\n }\n\n /** The aggregate currently chosen for a list variable, if any. */\n protected currentFunction(variable: string): CalculationFunctions | undefined {\n return this.#functions()[variable];\n }\n\n /** Switch to the raw expression editor. */\n protected useRaw(): void {\n this.#raw.set(true);\n }\n\n /** Switch back to the guided builder, reparsing the current expression. */\n protected useGuided(): void {\n if (!this.canUseGuided()) return;\n this.#initGroupFromExpression();\n this.#raw.set(false);\n }\n\n /** Read the value-event target as a string. */\n protected inputValue(event: Event): string {\n return (event.target as HTMLInputElement | HTMLSelectElement).value;\n }\n\n // ---- internal ----------------------------------------------------------\n\n #emptyDraft(): DraftFormControlCustomValidator {\n return {\n message: '',\n expression: '',\n canOverride: false,\n inputsObservedForChanges: [],\n };\n }\n\n #cloneValidator(\n validator: FormControlCustomValidatorsInterface,\n ): DraftFormControlCustomValidator {\n return {\n ...validator,\n inputsObservedForChanges: validator.inputsObservedForChanges.map((i) => ({ ...i })),\n };\n }\n\n #sameValidator(\n item: string | FormControlCustomValidatorsInterface,\n target: string | FormControlCustomValidatorsInterface,\n ): boolean {\n if (typeof item === 'string' || typeof target === 'string') {\n return item === target;\n }\n return item.id === target.id;\n }\n\n /** Set of field variable names the builder recognises (for parsing). */\n #fieldNameSet(): ReadonlySet<string> {\n return new Set(this.fieldOptions().map((f) => f.variable));\n }\n\n /** Whether an input carries a numeric data type. */\n #isNumeric(input: FormColumnInputs): boolean {\n return input.dataType === InputDataTypes.Number || input.type === InputTypes.Number;\n }\n\n /** Recover the per-variable aggregate choices from a draft's observed inputs. */\n #functionsFromDraft(): Record<string, CalculationFunctions> {\n const map: Record<string, CalculationFunctions> = {};\n for (const observed of this.#edit()?.inputsObservedForChanges ?? []) {\n if (observed.function) map[observed.variable] = observed.function;\n }\n return map;\n }\n\n /** Seed the builder state when a draft opens: guided if parseable, else raw. */\n #initBuilderFromDraft(): void {\n this.#functions.set(this.#functionsFromDraft());\n const parsed = parseConditions(this.#edit()?.expression ?? '', this.#fieldNameSet());\n if (parsed) {\n this.#group.set(parsed);\n this.#raw.set(false);\n } else {\n this.#raw.set(true);\n }\n }\n\n /** Reparse the current draft expression into the guided model. */\n #initGroupFromExpression(): void {\n const parsed = parseConditions(this.#edit()?.expression ?? '', this.#fieldNameSet());\n if (parsed) {\n this.#group.set(parsed);\n }\n }\n\n /** Store a builder change: update the model, then serialise into the draft. */\n #applyGroup(next: ValidatorConditionGroup): void {\n this.#group.set(next);\n this.#syncExpression(serializeConditions(next));\n }\n\n /** Write an expression onto the draft and re-derive its observed-input deps. */\n #syncExpression(expression: string): void {\n const fields: readonly FieldBinding[] = this.fieldOptions();\n const functions = this.#functions();\n this.#edit.update((draft) => {\n const base = draft ?? this.#emptyDraft();\n return {\n ...base,\n expression,\n inputsObservedForChanges: deriveObservedInputs(expression, fields, functions),\n };\n });\n }\n\n /** Single mutation path: store the new list and notify the parent. */\n #commit(next: FormControlCustomValidatorsInterface[]): void {\n this.value = next;\n this.markAsTouched();\n this.stateChanges.next();\n this.valueChanged.emit([...next]);\n }\n}\n","<section class=\"lib-validators-config__list\">\n <h5 class=\"lib-validators-config__title\">Validation rules</h5>\n\n <p class=\"lib-validators-config__hint\">\n <mat-icon class=\"lib-validators-config__hint-icon\">lightbulb</mat-icon>\n <span>Each rule shows its message when its condition is true — describe when the entry is\n <strong>wrong</strong>.</span>\n </p>\n\n <mat-chip-listbox [disabled]=\"disabled\" aria-label=\"Validation rules\">\n @for (validator of value; track trackValidator(validator)) {\n <mat-chip-option\n class=\"lib-validators-config__chip\"\n [selected]=\"isEditing(validator)\"\n (click)=\"editV(validator)\"\n >\n <span class=\"lib-validators-config__chip-label\">\n {{ validatorLabel(validator) | titlecase }}\n </span>\n\n @if (isEditing(validator)) {\n <mat-icon matChipTrailingIcon>check_circle</mat-icon>\n } @else {\n <button matChipRemove [attr.aria-label]=\"'remove validator'\" (click)=\"remove(validator)\">\n <mat-icon>cancel</mat-icon>\n </button>\n }\n </mat-chip-option>\n }\n\n @if (!edit()) {\n <mat-chip-option\n class=\"lib-validators-config__add\"\n matTooltip=\"Add a new validation rule\"\n [selectable]=\"false\"\n [disabled]=\"disabled\"\n (click)=\"addValidator()\"\n >\n Add rule\n <mat-icon matChipTrailingIcon>add</mat-icon>\n </mat-chip-option>\n }\n </mat-chip-listbox>\n</section>\n\n@if (edit(); as draft) {\n<mat-card class=\"lib-validators-config__editor\" (click)=\"$event.stopPropagation()\">\n <label class=\"lib-validators-config__field\">\n <span class=\"lib-validators-config__f-label\">Error message</span>\n <textarea\n class=\"lib-validators-config__control lib-validators-config__textarea\"\n rows=\"2\"\n [value]=\"draft.message\"\n (input)=\"onTextChange($event, 'message')\"\n placeholder=\"e.g. End date must be after the start date\"\n ></textarea>\n </label>\n\n <div class=\"lib-validators-config__condition-head\">\n <span class=\"lib-validators-config__f-label\">Show this error when</span>\n @if (!raw() && group().conditions.length > 1) {\n <div class=\"lib-validators-config__match\">\n <mat-button-toggle-group\n class=\"lib-validators-config__seg\"\n [value]=\"group().connector\"\n hideSingleSelectionIndicator\n (change)=\"setConnector($event.value)\"\n aria-label=\"Combine conditions\"\n >\n <mat-button-toggle value=\"&&\">All</mat-button-toggle>\n <mat-button-toggle value=\"||\">Any</mat-button-toggle>\n </mat-button-toggle-group>\n <span class=\"lib-validators-config__muted\">of these match</span>\n </div>\n }\n </div>\n\n @if (raw()) {\n <label class=\"lib-validators-config__field\">\n <span class=\"lib-validators-config__f-label\">Expression</span>\n <textarea\n class=\"lib-validators-config__control lib-validators-config__textarea lib-validators-config__mono\"\n rows=\"2\"\n [value]=\"draft.expression\"\n (input)=\"onTextChange($event, 'expression')\"\n placeholder='e.g. endDate < startDate'\n ></textarea>\n </label>\n @if (syntaxError(); as error) {\n <p class=\"lib-validators-config__error\">\n <mat-icon class=\"lib-validators-config__error-icon\">error_outline</mat-icon>\n <span>{{ error }}</span>\n </p>\n } @else {\n <p class=\"lib-validators-config__sub-hint\">\n True means the entry is invalid. Reference a field by its name; comparisons use\n <code>===</code>, <code>&gt;</code>, <code>includes</code> …\n </p>\n }\n } @else {\n @if (fieldOptions().length === 0) {\n <p class=\"lib-validators-config__sub-hint\">\n No fields available yet — switch to Advanced to type an expression.\n </p>\n }\n @for (cond of group().conditions; track $index; let first = $first) {\n @if (!first) {\n <div class=\"lib-validators-config__connector\" aria-hidden=\"true\">\n <span>{{ group().connector === '&&' ? 'AND' : 'OR' }}</span>\n </div>\n }\n <div class=\"lib-validators-config__cond\">\n <div class=\"lib-validators-config__cond-body\">\n <label class=\"lib-validators-config__field\">\n <span class=\"lib-validators-config__f-label\">Field</span>\n <select\n class=\"lib-validators-config__control\"\n [class.lib-validators-config__control--invalid]=\"!cond.field\"\n (change)=\"updateCondition($index, { field: inputValue($event) })\"\n >\n <option value=\"\" disabled [selected]=\"!cond.field\">Choose a field</option>\n @if (directFields().length) {\n <optgroup label=\"Fields\">\n @for (f of directFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">\n {{ f.label }}{{ f.isSelf ? ' (this field)' : '' }}\n </option>\n }\n </optgroup>\n }\n @if (listFields().length) {\n <optgroup label=\"List fields (totalled)\">\n @for (f of listFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">{{ f.label }}</option>\n }\n </optgroup>\n }\n </select>\n </label>\n\n <div class=\"lib-validators-config__cond-pair\">\n <label class=\"lib-validators-config__field\">\n <span class=\"lib-validators-config__f-label\">Condition</span>\n <select\n class=\"lib-validators-config__control\"\n (change)=\"updateCondition($index, { operator: inputValue($event) })\"\n >\n @for (op of operators; track op.value) {\n <option [value]=\"op.value\" [selected]=\"op.value === cond.operator\">{{ op.label }}</option>\n }\n </select>\n </label>\n\n <div class=\"lib-validators-config__field\">\n <span class=\"lib-validators-config__f-label\">\n {{ cond.compareTo === 'field' ? 'Other field' : 'Value' }}\n </span>\n <div class=\"lib-validators-config__value\">\n @if (cond.compareTo === 'field') {\n <select\n class=\"lib-validators-config__control\"\n [class.lib-validators-config__control--invalid]=\"!cond.value\"\n (change)=\"updateCondition($index, { value: inputValue($event) })\"\n >\n <option value=\"\" disabled [selected]=\"!cond.value\">Choose a field</option>\n @if (directFields().length) {\n <optgroup label=\"Fields\">\n @for (f of directFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">\n {{ f.label }}{{ f.isSelf ? ' (this field)' : '' }}\n </option>\n }\n </optgroup>\n }\n @if (listFields().length) {\n <optgroup label=\"List fields (totalled)\">\n @for (f of listFields(); track f.variable) {\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">{{ f.label }}</option>\n }\n </optgroup>\n }\n </select>\n } @else {\n <input\n class=\"lib-validators-config__control\"\n [class.lib-validators-config__control--invalid]=\"!cond.value\"\n [value]=\"cond.value\"\n (input)=\"updateCondition($index, { value: inputValue($event) })\"\n placeholder=\"e.g. 18\"\n />\n }\n <button\n type=\"button\"\n class=\"lib-validators-config__value-toggle\"\n (click)=\"toggleCompareTo($index)\"\n [attr.aria-label]=\"\n cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\n \"\n [matTooltip]=\"\n cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\n \"\n >\n <mat-icon>{{ cond.compareTo === 'field' ? 'edit' : 'link' }}</mat-icon>\n </button>\n </div>\n </div>\n </div>\n </div>\n\n <button\n type=\"button\"\n class=\"lib-validators-config__cond-remove\"\n mat-icon-button\n (click)=\"removeCondition($index)\"\n matTooltip=\"Remove condition\"\n aria-label=\"Remove condition\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </div>\n }\n\n <button type=\"button\" class=\"lib-validators-config__link\" (click)=\"addCondition()\">\n <mat-icon>add</mat-icon> Add condition\n </button>\n }\n\n @if (referencedListFields().length) {\n <div class=\"lib-validators-config__lists\">\n <span class=\"lib-validators-config__f-label\">Combine each list</span>\n <p class=\"lib-validators-config__sub-hint\">\n A list field has many rows. Choose how to reduce it to one value when comparing against a\n single field or value — optional when comparing two lists.\n </p>\n @for (f of referencedListFields(); track f.variable) {\n <div\n class=\"lib-validators-config__list-row\"\n [class.lib-validators-config__list-row--unset]=\"\n isAggregateRequired(f.variable) && !currentFunction(f.variable)\n \"\n >\n <span class=\"lib-validators-config__list-name\">\n {{ f.label }}\n @if (!isAggregateRequired(f.variable)) {\n <span class=\"lib-validators-config__list-optional\">optional</span>\n }\n </span>\n <div class=\"lib-validators-config__agg\" role=\"group\" [attr.aria-label]=\"'Combine ' + f.label\">\n @for (agg of aggregatesFor(f); track agg.value) {\n <button\n type=\"button\"\n class=\"lib-validators-config__agg-chip\"\n [class.lib-validators-config__agg-chip--on]=\"currentFunction(f.variable) === agg.value\"\n (click)=\"setFunction(f.variable, agg.value)\"\n >\n {{ agg.label }}\n </button>\n }\n </div>\n </div>\n }\n </div>\n }\n\n @if (draft.expression) {\n <div class=\"lib-validators-config__preview\">\n <span class=\"lib-validators-config__f-label\">Generated</span>\n <code>{{ draft.expression }}</code>\n </div>\n }\n\n <div class=\"lib-validators-config__override\">\n <mat-slide-toggle\n name=\"canOverride\"\n [checked]=\"draft.canOverride\"\n (change)=\"setCanOverride($event.checked)\"\n >\n <span class=\"lib-validators-config__toggle-label\">Users can override this rule</span>\n </mat-slide-toggle>\n <span class=\"lib-validators-config__sub-hint\">\n @if (draft.canOverride) { Shown as a warning — the form can still be submitted. } @else { Blocks\n submission until the entry is fixed. }\n </span>\n </div>\n\n <div class=\"lib-validators-config__foot\">\n @if (raw()) {\n <button\n type=\"button\"\n class=\"lib-validators-config__link\"\n [disabled]=\"!canUseGuided()\"\n [matTooltip]=\"canUseGuided() ? '' : 'This expression is too advanced for the guided builder'\"\n (click)=\"useGuided()\"\n >\n <mat-icon>view_module</mat-icon> Guided\n </button>\n } @else {\n <button type=\"button\" class=\"lib-validators-config__link\" (click)=\"useRaw()\">\n <mat-icon>code</mat-icon> Advanced\n </button>\n }\n </div>\n\n @if (saveHint(); as hint) {\n <p class=\"lib-validators-config__save-hint\">\n <mat-icon class=\"lib-validators-config__save-hint-icon\">info</mat-icon>\n <span>{{ hint }}</span>\n </p>\n }\n\n <mat-toolbar class=\"lib-validators-config__toolbar\">\n <span class=\"lib-validators-config__spacer\"></span>\n <button mat-button (click)=\"closeEditor()\">Close</button>\n <button mat-raised-button color=\"accent\" [disabled]=\"!canSave()\" (click)=\"saveVariable()\">\n Save rule\n </button>\n </mat-toolbar>\n</mat-card>\n}\n"],"names":["uuidv4","i1","i2","i3","i4","i5","i6","i8","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuEA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;MAwBU,yBAAyB,CAAA;AAvBtC,IAAA,WAAA,GAAA;;AA6BW,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;QAClC,IAAA,CAAA,WAAW,GAAG,uBAAuB;AAE9C,QAAA,IAAA,CAAA,E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AAA,EAGhB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,OAAA,EAChC;wBACP,YAAY;wBACZ,aAAa;wBACb,cAAc;wBACd,aAAa;wBACb,gBAAgB;wBAChB,eAAe;wBACf,qBAAqB;wBACrB,oBAAoB;wBACpB,gBAAgB;qBACjB,EAAA,SAAA,EACU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,yBAA2B,EAAE,CAAC,EAAA,IAAA,EAC/E;AACJ,wBAAA,OAAO,EAAE,uBAAuB;AAChC,wBAAA,WAAW,EAAE,IAAI;AAClB,qBAAA,EAAA,QAAA,EAAA,g5XAAA,EAAA,MAAA,EAAA,CAAA,m7SAAA,CAAA,EAAA;;sBAsBA;;sBAEA;;sBAEA;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/points-creation/points-creation.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/points-creation/points-creation.component.html","../../../projects/ngx-t-forms/src/lib/shared/functions/mapColors.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/elements/submission-review-dialog/submission-review-dialog.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/elements/submission-review-dialog/submission-review-dialog.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/submission-review.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/submission-review/submission-review.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/elements/point-assignment-dialog/point-assignment-dialog.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/elements/point-assignment-dialog/point-assignment-dialog.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/point-assignment.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/point-assignment/point-assignment.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/supplier-selection/supplier-selection.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/supplier-selection/supplier-selection.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/workflow-adjudication.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/workflow-adjudication/workflow-adjudication.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, computed, effect, inject, input, output } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { TextFieldModule } from '@angular/cdk/text-field';\r\n\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatSelectModule, MatSelectChange } from '@angular/material/select';\r\nimport { MatSortModule } from '@angular/material/sort';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { tap } from 'rxjs';\r\nimport { FormColumnInputs, ITowerStepColumn, WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens';\r\nimport { getInputIcon } from '../../../../../../shared/functions/getInputIcon';\r\n\r\n@Component({\r\n selector: 'lib-points-creation',\r\n templateUrl: './points-creation.component.html',\r\n styleUrls: ['./points-creation.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n ReactiveFormsModule,\r\n FormsModule,\r\n TextFieldModule,\r\n MatAutocompleteModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatSelectModule,\r\n MatSortModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n ],\r\n})\r\nexport class PointsCreationComponent {\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n /** Tower step column config that drives column layout, types, and disabled/readonly state. */\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n\r\n /** Existing points list pushed in from the parent (workflow-adjudication-reactive-input). */\r\n // NOTE(phase-4): Trap 6 — parent (`workflow-adjudication-reactive-input`) binds a\r\n // `WorkflowAdjudicationValue | null` union of three incompatible shapes. Until the parent\r\n // template is split per adjudication step type, this input must remain `any`.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n /** Emits the updated points list whenever the user saves, edits, or removes a row. */\r\n readonly pointsChange = output<WorkflowAdjudicationScoreSheetValue[]>();\r\n\r\n protected pointRow: WorkflowAdjudicationScoreSheetValue = this.#createDefaultPointRow();\r\n protected selectAllWorkflowInputs: FormColumnInputs[] = [];\r\n #points: WorkflowAdjudicationScoreSheetValue[] = [];\r\n\r\n /** Material table columns derived from the input config. */\r\n protected readonly cols = computed(() => {\r\n const cfg = this.inputConfig();\r\n let cols: string[] = (cfg?.adjudicationPointTypes?.length || 0) > 0\r\n ? ['description', 'totalPoints', 'pointType', 'actions']\r\n : ['description', 'totalPoints', 'actions'];\r\n if (cfg?.disabled || !!cfg?.readonly) {\r\n cols = cols.filter(col => col !== 'actions');\r\n }\r\n return cols;\r\n });\r\n\r\n /** Mirrors the legacy `set value` setter — pushes incoming `value` into the internal `#points` buffer. */\r\n protected readonly valueBridge = effect(() => {\r\n const next = this.value();\r\n this.#points = (next || []) as WorkflowAdjudicationScoreSheetValue[];\r\n });\r\n\r\n constructor() {\r\n this.#config.formBuilder.getCurrentFormAvailableInputOptions().pipe(\r\n tap((inputs: FormColumnInputs[]) => {\r\n this.selectAllWorkflowInputs = inputs;\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n ).subscribe();\r\n }\r\n\r\n protected get points(): WorkflowAdjudicationScoreSheetValue[] {\r\n const cfg = this.inputConfig();\r\n if (cfg?.disabled || !!cfg?.readonly) {\r\n return this.#points;\r\n }\r\n return [...this.#points, this.pointRow];\r\n }\r\n\r\n protected get filteredInputs(): FormColumnInputs[] {\r\n const description = this.pointRow.description?.toLowerCase() || '';\r\n if (!description) {\r\n return this.selectAllWorkflowInputs;\r\n }\r\n const regex = new RegExp(description.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&'), 'i');\r\n return this.selectAllWorkflowInputs.filter((input: FormColumnInputs) =>\r\n (typeof input.label === 'string' && regex.test(input.label)) ||\r\n (typeof input.hintLabel === 'string' && regex.test(input.hintLabel)),\r\n );\r\n }\r\n\r\n protected get pointInEditIsValid(): boolean {\r\n const cfg = this.inputConfig();\r\n const typeRequired = (cfg?.adjudicationPointTypes?.length || 0) > 0;\r\n return !!this.pointRow.description && this.pointRow.totalPoints > 0 && (!typeRequired || !!this.pointRow.pointType);\r\n }\r\n\r\n #createDefaultPointRow(): WorkflowAdjudicationScoreSheetValue {\r\n return {\r\n id: '',\r\n formControlName: '',\r\n totalPoints: 0,\r\n description: '',\r\n pointType: '',\r\n inputId: undefined,\r\n isEditRow: true,\r\n };\r\n }\r\n\r\n #resetPointRow(): void {\r\n this.pointRow = this.#createDefaultPointRow();\r\n }\r\n\r\n protected selectActiveInput(input: FormColumnInputs): void {\r\n const cfg = this.inputConfig();\r\n this.pointRow = {\r\n ...this.pointRow,\r\n totalPoints: 0,\r\n description: input.label || '',\r\n id: input.id,\r\n formControlName: input.formControlName,\r\n pointType: this.pointRow.pointType || cfg?.adjudicationPointTypes[0] || '',\r\n inputId: input.id,\r\n };\r\n }\r\n\r\n protected selectPointType(pointType: MatSelectChange): void {\r\n this.pointRow = {\r\n ...this.pointRow,\r\n pointType: pointType.value,\r\n };\r\n }\r\n\r\n protected savePoints(): void {\r\n const pointToSave: WorkflowAdjudicationScoreSheetValue = {\r\n ...this.pointRow,\r\n id: this.pointRow.id || uuidv4(),\r\n formControlName: this.pointRow.formControlName || this.pointRow.description,\r\n isEditRow: undefined,\r\n };\r\n this.#points = [...this.#points, pointToSave];\r\n this.pointsChange.emit(this.#points);\r\n this.#resetPointRow();\r\n }\r\n\r\n protected edit(element: WorkflowAdjudicationScoreSheetValue): void {\r\n this.pointRow = {\r\n ...element,\r\n isEditRow: true,\r\n };\r\n this.#points = this.#points.filter(p => p.id !== element.id);\r\n this.pointsChange.emit(this.#points);\r\n }\r\n\r\n protected remove(element: WorkflowAdjudicationScoreSheetValue): void {\r\n this.#points = this.#points.filter(p => p.id !== element.id);\r\n this.pointsChange.emit(this.#points);\r\n }\r\n\r\n protected getInputIcon(input: FormColumnInputs): string {\r\n return getInputIcon(input.element);\r\n }\r\n}\r\n","<div style=\"resize: both; overflow: auto;\">\r\n @if (!points || points.length === 1) {\r\n <h5 style=\"margin-bottom: 5px; margin-top: 0px;\">\r\n &#8505;&#65039; To add a scoring item:\r\n </h5>\r\n <ol>\r\n <li>\r\n <strong>Enter Description:</strong>\r\n <ul style=\"margin-top: 5px; margin-bottom: 5px; padding-left: 20px; list-style-type: disc;\">\r\n <li>\r\n To <strong>link</strong> a field: You <strong>must select it</strong> from the list first (you can\r\n edit it after).\r\n </li>\r\n <li>\r\n For a <strong>custom</strong> point: <strong>Ignore the list</strong> and just type your own\r\n description.\r\n </li>\r\n </ul>\r\n </li>\r\n <li>\r\n <strong>Set Details:</strong>\r\n Assign the <strong>Points</strong> and select the <strong>Point Type</strong>.\r\n </li>\r\n <li>\r\n <strong>Save:</strong>\r\n Click the <strong>\"Save\"</strong> button to add the item.\r\n </li>\r\n </ol>\r\n }\r\n <table mat-table [dataSource]=\"points\" matSort>\r\n <ng-container matColumnDef=\"description\">\r\n <th mat-header-cell *matHeaderCellDef>Description</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (element.isEditRow) {\r\n <mat-form-field subscriptSizing=\"dynamic\" class=\"input-add\" appearance=\"outline\">\r\n <textarea [matAutocomplete]=\"auto\" [(ngModel)]=\"pointRow.description\" matInput cdkTextareaAutosize\r\n cdkAutosizeMinRows=\"1\" placeholder=\"Enter point description\"></textarea>\r\n <mat-autocomplete autoActiveFirstOption #auto=\"matAutocomplete\">\r\n @for (input of filteredInputs; track input.id) {\r\n <mat-option [value]=\"input.label\" (click)=\"selectActiveInput(input)\">\r\n <div style=\"display: flex;align-items: center;gap:8px\">\r\n <mat-icon style=\"font-size:24px; width:24px; height:24px;\"\r\n [attr.aria-label]=\"input.label\">\r\n {{ getInputIcon(input) }}\r\n </mat-icon>\r\n <span>\r\n <div style=\"font-size: 0.75em;\">\r\n <strong>\r\n {{ input.label }}\r\n </strong>\r\n </div>\r\n <div\r\n style=\"font-size: 0.75em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;\">\r\n {{ input.hintLabel || input.formControlName }}\r\n </div>\r\n </span>\r\n </div>\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n </mat-form-field>\r\n } @else {\r\n {{ element.description }}\r\n }\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"totalPoints\">\r\n <th mat-header-cell *matHeaderCellDef>Points</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (element.isEditRow) {\r\n <mat-form-field subscriptSizing=\"dynamic\" class=\"input-add\" appearance=\"outline\">\r\n <input matInput [(ngModel)]=\"pointRow.totalPoints\"\r\n placeholder=\"Enter points , eg 50\" type=\"number\">\r\n </mat-form-field>\r\n } @else {\r\n {{ element.totalPoints }}\r\n }\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"pointType\">\r\n <th mat-header-cell *matHeaderCellDef>Point Type</th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n @if (element.isEditRow) {\r\n <mat-form-field subscriptSizing=\"dynamic\" class=\"input-add\" appearance=\"outline\">\r\n <mat-select (selectionChange)=\"selectPointType($event)\" ngDefaultControl\r\n [value]=\"pointRow.pointType\"\r\n placeholder=\"Select\">\r\n @for (type of inputConfig()?.adjudicationPointTypes || []; track $index) {\r\n <mat-option [value]=\"type\">{{ type }}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n } @else {\r\n {{ element.pointType }}\r\n }\r\n </td>\r\n </ng-container>\r\n <ng-container matColumnDef=\"actions\" [stickyEnd]=\"true\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <span style=\"display: flex; justify-content: center;\">\r\n @if (element.isEditRow) {\r\n <button matTooltip=\"Save Point in Edit\" color=\"primary\" style=\"white-space: nowrap;\r\n height: 26px;\r\n margin-bottom: 0px;\" mat-flat-button (click)=\"savePoints()\" [disabled]=\"!pointInEditIsValid || inputConfig()?.disabled || inputConfig()?.readonly\">\r\n <span style=\"font-size: 0.875em;\">\r\n save\r\n </span>\r\n </button>\r\n } @else {\r\n <button mat-icon-button (click)=\"edit(element)\">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n <button mat-icon-button (click)=\"remove(element)\">\r\n <mat-icon>delete_forever</mat-icon>\r\n </button>\r\n }\r\n </span>\r\n </td>\r\n </ng-container>\r\n <tr mat-header-row *matHeaderRowDef=\"cols()\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: cols()\"></tr>\r\n </table>\r\n</div>\r\n","export function getColorForNumber(targetNumber: number, numbers: number[], asc = true): string {\r\n if (numbers.length === 0) {\r\n throw new Error(\"The numbers array must not be empty.\");\r\n }\r\n\r\n // Avoid sorting the original array\r\n const sortedNumbers = [...numbers].sort((a, b) => asc ? a - b : b - a);\r\n const min = sortedNumbers[0];\r\n const max = sortedNumbers[sortedNumbers.length - 1];\r\n if (!min || !max) {\r\n return \"rgb(173, 173, 173)\";\r\n }\r\n if (min === max) {\r\n return \"rgb(173, 173, 173)\"; // Return gray if there is no range\r\n }\r\n\r\n const interpolateColor = (value: number): string => {\r\n const fraction = (value - min) / (max - min);\r\n const colors = [\r\n { color: [247, 0, 0], pos: 0.0 }, // Red\r\n { color: [247, 187, 0], pos: 0.25 }, // Orange\r\n { color: [247, 247, 0], pos: 0.5 }, // Yellow\r\n { color: [207, 247, 0], pos: 0.75 }, // Light green\r\n { color: [96, 247, 0], pos: 1.0 } // Green\r\n ];\r\n\r\n for (let i = 0; i < colors.length - 1; i++) {\r\n const nextColor = colors[i + 1]\r\n const currentColor = colors[i]\r\n if (currentColor && nextColor && fraction <= nextColor.pos) {\r\n\r\n const range = nextColor.pos - currentColor.pos;\r\n const localFraction = (fraction - currentColor.pos) / range;\r\n const r = Math.round(currentColor.color[0]! + localFraction * (nextColor.color[0]! - currentColor.color[0]!));\r\n const g = Math.round(currentColor.color[1]! + localFraction * (nextColor.color[1]! - currentColor.color[1]!));\r\n const b = Math.round(currentColor.color[2]! + localFraction * (nextColor.color[2]! - currentColor.color[2]!));\r\n return `rgb(${r}, ${g}, ${b})`;\r\n }\r\n }\r\n\r\n return `rgb(${colors[colors.length - 1]?.color[0]}, ${colors[colors.length - 1]?.color[1]}, ${colors[colors.length - 1]?.color[2]},0.6)`;\r\n };\r\n\r\n return interpolateColor(targetNumber);\r\n}\r\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation, inject } from '@angular/core';\r\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { OutputData } from '@editorjs/editorjs';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { EditorJsInputComponent } from '../../../../../editor-input-element/core/editor-js-input/editor-js-input.component';\r\n\r\nexport interface SubmissionReviewDialogData {\r\n readonly: boolean;\r\n respondentNameKey: string;\r\n respondentCodeKey: string;\r\n activeRowNotes: OutputData | undefined;\r\n row: {\r\n nameOfBidder: string;\r\n [key: string]: unknown;\r\n adj_microFlow_review_notes: OutputData | undefined;\r\n adj_microFlow_assignedScore: Record<string, number>;\r\n };\r\n}\r\n\r\n@Component({\r\n selector: 'lib-submission-review-dialog',\r\n templateUrl: './submission-review-dialog.component.html',\r\n styleUrl: './submission-review-dialog.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [MatDialogModule, MatFormFieldModule, MatButtonModule, EditorJsInputComponent],\r\n})\r\nexport class SubmissionReviewDialogComponent {\r\n protected readonly dialogRef = inject<MatDialogRef<SubmissionReviewDialogComponent>>(MatDialogRef);\r\n protected readonly data = inject<SubmissionReviewDialogData>(MAT_DIALOG_DATA);\r\n\r\n protected changedNotes: OutputData | undefined;\r\n\r\n protected get notesInputConfig(): ITowerStepColumn {\r\n return {\r\n id: 'adj_microFlow_review_notes',\r\n label: 'Notes',\r\n readonly: this.data.readonly,\r\n required: false,\r\n formControlName: 'adj_microFlow_review_notes',\r\n } as ITowerStepColumn;\r\n }\r\n\r\n protected get respondentName(): string {\r\n const raw = this.data.row[this.data.respondentNameKey];\r\n return typeof raw === 'string' ? raw : '';\r\n }\r\n\r\n protected notesChanged(notes: OutputData | undefined): void {\r\n this.changedNotes = notes;\r\n }\r\n}\r\n","<span mat-dialog-title>\r\n Review Feedback For <span class=\"bidder-name\">{{ respondentName }}</span>\r\n</span>\r\n\r\n<div class=\"dialog-instructions\">\r\n <p>\r\n Your notes will be visible to the respondent. Provide <strong>clear, constructive feedback</strong> to\r\n guide their future submissions.\r\n </p>\r\n</div>\r\n<mat-dialog-content style=\"padding-bottom: 8px;padding-bottom: 8px\">\r\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\" style=\"width: 100%;\r\n display: absolute;\r\n left: 0;\r\n margin-bottom: 8px;\r\n margin-top: 8px;\r\n border-radius:16px;\" appearance=\"outline\">\r\n <lib-editor-js-input [value]=\"data.row['adj_microFlow_review_notes'] || data.activeRowNotes\"\r\n (valueChanged)=\"notesChanged($event)\" ngDefaultControl [inputConfig]=\"notesInputConfig\"\r\n [required]=\"notesInputConfig.required\">\r\n </lib-editor-js-input>\r\n <mat-hint>\r\n <strong>Tip:</strong> Use bold, lists, and tables to structure your feedback.\r\n </mat-hint>\r\n </mat-form-field>\r\n</mat-dialog-content>\r\n\r\n\r\n<mat-dialog-actions align=\"end\">\r\n <button mat-dialog-close mat-button >\r\n Cancel\r\n </button>\r\n @if( !data.readonly){\r\n <button mat-flat-button\r\n [mat-dialog-close]=\"changedNotes\"\r\n >\r\n Save Feedback\r\n </button>}\r\n</mat-dialog-actions>","import { AsyncPipe, DecimalPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, computed, effect, inject, input, output, signal } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatSelectModule, MatSelectChange } from '@angular/material/select';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { BehaviorSubject, Observable, catchError, combineLatest, map, of, shareReplay, startWith, switchMap, take, tap } from 'rxjs';\r\n\r\nimport { OutputData } from '@editorjs/editorjs';\r\nimport { InputDataTypes, ITowerStepColumn, IWorkflowDocListCols, AdjResponseReviewColumnMapping, WorkflowAdjudicationMicroFlowReviewValue } from 'ngx-t-forms-types';\r\n\r\n/**\r\n * Internal review status union for adjudication micro-flow rows.\r\n * Mirrors the shared `WorkflowAdjudicationMicroFlowReviewValue.adj_microFlow_review`\r\n * optional literal union and includes `undefined` for the \"not yet reviewed\" branch.\r\n */\r\ntype AdjMicroFlowReviewStatus = 'compliant' | 'non-compliant' | undefined;\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens/index';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\nimport { getColorForNumber } from '../../../../../../shared/functions/mapColors';\r\nimport { DaysAgoPipe } from '../../../../../../shared/pipes/date/days-ago.pipe';\r\nimport { SubmissionReviewDialogComponent } from './elements/submission-review-dialog/submission-review-dialog.component';\r\n\r\n// --- TYPE DEFINITIONS FOR ROBUSTNESS ---\r\n\r\nexport interface ISubmission extends Record<string, any> {\r\n id: string;\r\n adjudicationPricePreferenceCalculationColor?: string;\r\n backgroundShades?: Record<string, string>;\r\n}\r\nexport interface tableCols extends Omit<IWorkflowDocListCols, 'type'> {\r\n /** Widened locally to allow the internal `'actions'` cell type used by this template's @switch. */\r\n type?: IWorkflowDocListCols['type'] | 'actions';\r\n showColor?: boolean;\r\n maxWidth?: string;\r\n}\r\ninterface IViewModel {\r\n submissions: ISubmission[];\r\n columnMapping: AdjResponseReviewColumnMapping;\r\n displayColumns?: tableCols[];\r\n displayCols: string[];\r\n loading: boolean;\r\n error?: string;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-submission-review',\r\n templateUrl: './submission-review.component.html',\r\n styleUrls: ['./submission-review.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n AsyncPipe,\r\n DecimalPipe,\r\n FormsModule,\r\n OverlayModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n DaysAgoPipe,\r\n ],\r\n})\r\nexport class SubmissionReviewComponent {\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly dialog = inject(MatDialog);\r\n\r\n readonly #refreshTrigger = new BehaviorSubject<void>(undefined);\r\n // A stream to push updates of the review values (`this.value`)\r\n readonly #valueChanges$ = new BehaviorSubject<WorkflowAdjudicationMicroFlowReviewValue[] | null>([]);\r\n\r\n readonly #valueSignal = signal<WorkflowAdjudicationMicroFlowReviewValue[] | null>([]);\r\n #value: WorkflowAdjudicationMicroFlowReviewValue[] | null = [];\r\n\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n /** The current review payload. Null while loading. */\r\n // Parent (`workflow-adjudication-reactive-input`) passes a `WorkflowAdjudicationValue | null`\r\n // union that includes three incompatible shapes (score-sheet array, micro-flow review array,\r\n // response-elected-supplier object). This component only consumes the micro-flow branch; the\r\n // input must remain `any` until parent template typing is split per micro-flow.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step type, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n protected readonly valueBridge = effect(() => {\r\n const next = this.value() ?? [];\r\n if (_isEqual(next, this.#value)) return;\r\n this.#value = next;\r\n this.#valueSignal.set(next);\r\n this.#valueChanges$.next(next);\r\n });\r\n\r\n readonly reviewChange = output<WorkflowAdjudicationMicroFlowReviewValue[]>();\r\n\r\n protected selected: string = '';\r\n protected columnMapping: AdjResponseReviewColumnMapping | undefined = undefined;\r\n protected submissions: ISubmission[] = [];\r\n\r\n readonly #initialState: IViewModel = {\r\n loading: true,\r\n submissions: [],\r\n columnMapping: { respondentNameKey: '', respondentCodeKey: '' },\r\n displayCols: [],\r\n displayColumns: [],\r\n error: undefined,\r\n };\r\n\r\n // Stream for the initial data fetch. Only re-runs when `refreshTrigger` is fired.\r\n readonly #fetchedData$ = this.#refreshTrigger.pipe(\r\n switchMap(() => this.#config.formBuilder.getCurrentStepMicroflowSubmissions().pipe(take(1))),\r\n shareReplay(1)\r\n );\r\n\r\n /**\r\n * REFACTORED: The new vm$ combines the one-time fetched data with the ongoing stream\r\n * of local review changes (`valueChanges$`). This prevents re-fetching from the server\r\n * every time a status or note is changed.\r\n */\r\n protected readonly vm$: Observable<IViewModel> = combineLatest([\r\n this.#fetchedData$,\r\n this.#valueChanges$\r\n ]).pipe(\r\n map(([res, reviewValues]) => {\r\n const { submissions, columnMapping } = res;\r\n\r\n this.columnMapping = columnMapping;\r\n this.submissions = submissions;\r\n // FIX: Pass reviewValues as an argument to make the function pure.\r\n\r\n const enrichedSubmissions = this.#enrichSubmissionsData(submissions, columnMapping, reviewValues) || this.#value || [];\r\n const calcKey = columnMapping.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation';\r\n const sortedSubmissions = [...enrichedSubmissions].sort((a, b) => Number(b[calcKey]) - Number(a[calcKey]));\r\n const newVm: IViewModel = {\r\n loading: false,\r\n submissions: sortedSubmissions || this.#value,\r\n columnMapping: columnMapping,\r\n displayCols: [columnMapping.respondentNameKey, 'adjudicationPricePreferenceCalculation', 'status', 'actions'],\r\n displayColumns: [\r\n { label: 'name', formControlName: columnMapping.respondentNameKey, type: InputDataTypes.String },\r\n { label: 'Preference', formControlName: 'adjudicationPricePreferenceCalculation', type: InputDataTypes.Number, showColor: true },\r\n { label: 'Actions', formControlName: 'actions', type: InputDataTypes.String },\r\n { label: 'status and Notes', formControlName: 'status', type: 'actions' },\r\n ],\r\n error: undefined,\r\n };\r\n\r\n return newVm;\r\n }),\r\n startWith(this.#initialState),\r\n catchError(() => {\r\n return of({ ...this.#initialState, loading: false, error: 'Failed to load submissions.' });\r\n }),\r\n shareReplay(1)\r\n );\r\n\r\n loadMicroSubmissions(): void {\r\n this.#refreshTrigger.next();\r\n }\r\n\r\n /**\r\n * REFACTORED: Now accepts `reviewValues` as a parameter instead of relying on `this.value`.\r\n */\r\n #enrichSubmissionsData(\r\n submissions: ISubmission[],\r\n cols: AdjResponseReviewColumnMapping,\r\n reviewValues: WorkflowAdjudicationMicroFlowReviewValue[] | null\r\n ): ISubmission[] {\r\n const numberSets = new Map<string, number[]>();\r\n numberSets.set(\r\n cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation',\r\n submissions.map((s) => Number(s[cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation'] || 0))\r\n );\r\n // NOTE(phase-4): the legacy fallback assigns review-value rows into a submission-shaped slot —\r\n // the two only share `id`, so most downstream property reads degrade to undefined. Preserved\r\n // for behavioural parity. `ISubmission` extends `Record<string, any>`, so review-value entries\r\n // satisfy the structural shape (with most fields as undefined). Flagged as a pre-existing\r\n // latent defect — out of scope for Phase 4 type tightening.\r\n const list: ReadonlyArray<ISubmission> = submissions.length > 0\r\n ? submissions\r\n : ((this.#value ?? []) as ReadonlyArray<ISubmission>);\r\n return list.map((submission: ISubmission) => {\r\n const priceCalcKey = cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation';\r\n const numbers = numberSets.get(priceCalcKey) || [];\r\n const color = numbers.length === 0 ? submission.adjudicationPricePreferenceCalculationColor : this.#getColorString(submission[priceCalcKey], numbers);\r\n const backgroundShades = numbers.length === 0 ? submission['backgroundShades'] : { [priceCalcKey]: this.#getScoreShade(color ?? '') };\r\n // Use the passed `reviewValues` argument\r\n // T-A widened upstream `adj_microFlow_review_notes` to `unknown` (consumer-side narrowing).\r\n // The local consumer expects an OutputData payload; narrow with a cast at the boundary.\r\n const submissionReview: Partial<WorkflowAdjudicationMicroFlowReviewValue> & { adj_microFlow_review_notes?: OutputData } =\r\n (reviewValues?.find((v) => v.id === submission.id) ?? {}) as Partial<WorkflowAdjudicationMicroFlowReviewValue> & { adj_microFlow_review_notes?: OutputData };\r\n\r\n return {\r\n ...submission,\r\n submissionIsReviewed: !!submissionReview,\r\n adj_microFlow_review_notes: submissionReview?.adj_microFlow_review_notes || '',\r\n submissionHasReviewNotes: !!submissionReview?.adj_microFlow_review_notes,\r\n adj_microFlow_review: submissionReview?.['adj_microFlow_review'],\r\n adjudicationPricePreferenceCalculationColor: color,\r\n adjudicationPricePreferenceCalculation: submission[cols.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation'],\r\n backgroundShades\r\n };\r\n });\r\n }\r\n\r\n #getColorString(target: number, numbers: number[]): string {\r\n return getColorForNumber(target, numbers, true);\r\n }\r\n\r\n #getScoreShade(rgbColor: string): string {\r\n if (!rgbColor) return '';\r\n return rgbColor.replace('rgb', 'rgba').replace(')', `, 0.1)`);\r\n }\r\n\r\n viewMicroSubmission(res: ISubmission): void {\r\n const alreadyInValue = this.#value?.find((v) => v.id === res.id);\r\n if (!alreadyInValue) {\r\n const newReview: WorkflowAdjudicationMicroFlowReviewValue = this.#buildReviewRecord(res, undefined);\r\n const newValue = [...(this.#value || []), newReview];\r\n this.reviewChange.emit(newValue);\r\n }\r\n this.#config.formBuilder['previewWorkflowDocument'](res.id);\r\n }\r\n\r\n /**\r\n * Builds a review record from a submission row. Status, createdAt and updatedAt are\r\n * all optional on the shared `WorkflowAdjudicationMicroFlowReviewValue` type, so\r\n * `undefined` flows through naturally without any casts.\r\n */\r\n #buildReviewRecord(res: ISubmission, status: AdjMicroFlowReviewStatus): WorkflowAdjudicationMicroFlowReviewValue {\r\n const cm = this.columnMapping;\r\n const createdAt: Date | undefined = res[cm?.responseDateKey || 'createdAt'] || undefined;\r\n const updatedAt: Date | undefined = res[cm?.responseDateKey || 'updatedAt'] || undefined;\r\n return {\r\n id: res.id,\r\n adj_microFlow_review: status,\r\n nameOfBidder: res[cm?.respondentNameKey || ''] || '',\r\n supplierNumber: res[cm?.respondentCodeKey || ''] || '',\r\n createdAt,\r\n updatedAt,\r\n adjudicationPricePreferenceCalculation: res[cm?.responsePreferenceCalculationKey || 'adjudicationPricePreferenceCalculation'] || 0,\r\n reference: res['reference'] || '',\r\n };\r\n }\r\n\r\n protected reviewStatuses = [\r\n {\r\n label: '✅ Compliant',\r\n value: 'compliant',\r\n color: 'var(--mat-sys-primary)',\r\n },\r\n {\r\n label: '❌ Non-compliant',\r\n value: 'non-compliant',\r\n color: 'var(--mat-sys-error)',\r\n },\r\n ];\r\n\r\n setResponseStatus(res: ISubmission, status: MatSelectChange): void {\r\n const alreadyInValue = this.#value?.find((v) => v.id === res.id);\r\n const statusValue = status.value as AdjMicroFlowReviewStatus;\r\n\r\n if (!alreadyInValue) {\r\n const newReview = this.#buildReviewRecord(res, statusValue);\r\n this.reviewChange.emit([...(this.#value || []), newReview]);\r\n this.reachedMax([...(this.#value || []), newReview]);\r\n return;\r\n }\r\n const newValue = (this.#value || []).map((v) => {\r\n if (v.id === res.id) {\r\n return { ...v, adj_microFlow_review: statusValue };\r\n }\r\n return v;\r\n });\r\n\r\n this.reviewChange.emit(newValue);\r\n this.reachedMax(newValue);\r\n }\r\n\r\n protected readonly maxLimit = computed(() => {\r\n const hasMax = this.inputConfig()?.maxLength;\r\n if (!hasMax || isNaN(Number(hasMax))) {\r\n return undefined;\r\n }\r\n return Number(hasMax);\r\n });\r\n\r\n reachedMax(newValue: WorkflowAdjudicationMicroFlowReviewValue[] | null): void {\r\n const hasMax = this.inputConfig()?.maxLength;\r\n if (!hasMax || isNaN(Number(hasMax))) {\r\n return; // No limit set, do nothin\r\n }\r\n const allCompetentSubmissions = newValue?.filter((v) => (v.adj_microFlow_review as unknown) === 'compliant').length || 0;\r\n if (!(allCompetentSubmissions >= (Number(hasMax) || 1))) {\r\n return;\r\n }\r\n const missingSubmission = this.submissions\r\n .filter((s) => !newValue?.find((v) => v.id === s.id))\r\n .map((s) => this.#buildReviewRecord(s, 'non-compliant'));\r\n const unique = new Set([...(newValue || []), ...missingSubmission]);\r\n this.reviewChange.emit(Array.from(unique));\r\n }\r\n\r\n protected notesOpenForRowId: string | null = null;\r\n // FIX: A Map to hold notes being edited, keyed by row ID. This prevents shared state.\r\n\r\n /**\r\n * REFACTORED: Saves the notes from the `notesBeingEdited` map.\r\n */\r\n notesBlur(notesToSave: OutputData | undefined): void {\r\n if (!this.notesOpenForRowId || !notesToSave) {\r\n this.notesOpenForRowId = null;\r\n return;\r\n }\r\n\r\n const alreadyInValue = this.#value?.find((v) => v.id === this.notesOpenForRowId);\r\n\r\n if (!alreadyInValue) {\r\n const newReview: WorkflowAdjudicationMicroFlowReviewValue = {\r\n id: this.notesOpenForRowId,\r\n adj_microFlow_review_notes: notesToSave,\r\n adj_microFlow_review: undefined,\r\n nameOfBidder: '',\r\n supplierNumber: '',\r\n createdAt: undefined,\r\n updatedAt: undefined,\r\n adjudicationPricePreferenceCalculation: 0,\r\n reference: '',\r\n };\r\n this.reviewChange.emit([...(this.#value || []), newReview]);\r\n } else {\r\n const newValue = (this.#value ?? []).map((v) => {\r\n if (v.id === this.notesOpenForRowId) {\r\n return { ...v, adj_microFlow_review_notes: notesToSave };\r\n }\r\n return v;\r\n });\r\n this.reviewChange.emit(newValue);\r\n }\r\n\r\n // Clean up and close the overlay\r\n }\r\n\r\n protected bulkOperations = [\r\n {\r\n label: '✅ Set all to Compliant',\r\n value: 'compliant',\r\n color: 'var(--mat-sys-primary)',\r\n },\r\n {\r\n label: '❌ Set all to Non-compliant',\r\n value: 'non-compliant',\r\n color: 'var(--mat-sys-error)',\r\n },\r\n {\r\n label: '🔄 Reset all ',\r\n value: 'reset',\r\n color: 'var(--mat-sys-secondary)',\r\n }\r\n ];\r\n\r\n protected readonly bulkStatus = computed(() => {\r\n // Re-read on submissions and value changes via the signal\r\n void this.#valueSignal();\r\n const allCompliant = this.submissions.every((s) => s['adj_microFlow_review'] === 'compliant');\r\n\r\n if (allCompliant) {\r\n return 'compliant';\r\n }\r\n\r\n const allNonCompliant = this.submissions.every((s) => s['adj_microFlow_review'] === 'non-compliant');\r\n if (allNonCompliant) {\r\n return 'non-compliant';\r\n }\r\n\r\n return 'mixed';\r\n });\r\n\r\n bulkStatusChanged(event: MatSelectChange): void {\r\n const newStatus = event.value;\r\n if (newStatus === 'reset') {\r\n this.reviewChange.emit([]);\r\n return;\r\n }\r\n // Create a Map of existing values for efficient O(1) lookup\r\n const existingValueMap = new Map((this.#value ?? []).map(v => [v.id, v]));\r\n\r\n // Destructure column keys with fallbacks for cleaner access\r\n const {\r\n respondentNameKey = '',\r\n respondentCodeKey = '',\r\n responseDateKey = 'createdAt',\r\n responsePreferenceCalculationKey = 'adjudicationPricePreferenceCalculation',\r\n } = this.columnMapping || {};\r\n\r\n let allItems = this.submissions.map(s => {\r\n // Efficiently look up the existing value using the Map\r\n const existingValue = existingValueMap.get(s.id);\r\n\r\n // If it exists, spread its properties to preserve them and update the status\r\n if (existingValue) {\r\n return { ...existingValue, adj_microFlow_review: newStatus };\r\n }\r\n\r\n // Otherwise, create a new object from the submission data\r\n return {\r\n id: s.id,\r\n adj_microFlow_review: newStatus,\r\n nameOfBidder: s[respondentNameKey] || '',\r\n supplierNumber: s[respondentCodeKey] || '',\r\n createdAt: s[responseDateKey] || undefined,\r\n updatedAt: s[this.columnMapping?.responseDateKey || 'updatedAt'] || undefined,\r\n adjudicationPricePreferenceCalculation: s[responsePreferenceCalculationKey] || 0,\r\n reference: s['reference'] || '',\r\n };\r\n });\r\n\r\n // Apply the compliance limit if necessary\r\n const limit = this.maxLimit();\r\n if (limit !== undefined && newStatus === 'compliant') {\r\n // Sort by preference calculation, highest first\r\n allItems.sort((a, b) =>\r\n (b.adjudicationPricePreferenceCalculation ?? 0) - (a.adjudicationPricePreferenceCalculation ?? 0)\r\n );\r\n\r\n // Mark items beyond the limit as 'non-compliant'\r\n allItems = allItems.map((item, index) => {\r\n if (index >= limit) {\r\n return { ...item, adj_microFlow_review: 'non-compliant' };\r\n }\r\n return item;\r\n });\r\n }\r\n\r\n this.reviewChange.emit(allItems as WorkflowAdjudicationMicroFlowReviewValue[]);\r\n }\r\n\r\n openNotes(row: ISubmission): void {\r\n this.notesOpenForRowId = row.id;\r\n\r\n const stringfiedTemplate = JSON.stringify(this.inputConfig()?.adjudicationReviewFeedbackTemplate);\r\n const template = stringfiedTemplate?.replace(/\\$bidderName/g, row[this.columnMapping?.respondentNameKey || ''])\r\n ?.replace(/\\$bidderCode/g, row[this.columnMapping?.respondentCodeKey || ''])\r\n ?.replace(/\\$responseDate/g, row[this.columnMapping?.responseDateKey || ''])\r\n ?.replace(/\\$responsePreferenceCalculation/g, row[this.columnMapping?.responsePreferenceCalculationKey || ''] || '0');\r\n\r\n this.dialog.open(\r\n SubmissionReviewDialogComponent, {\r\n height: 'fit-content',\r\n data: {\r\n row,\r\n respondentNameKey: this.columnMapping?.respondentNameKey || '',\r\n respondentCodeKey: this.columnMapping?.respondentCodeKey || '',\r\n readonly: this.inputConfig()?.readonly || false,\r\n activeRowNotes: JSON.parse(template || '{}') as OutputData | undefined\r\n },\r\n autoFocus: false,\r\n disableClose: true\r\n }).afterClosed().pipe(\r\n take(1),\r\n tap((result: OutputData | undefined) => {\r\n this.notesBlur(result);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n ).subscribe();\r\n }\r\n\r\n canChangeStatus(row: ISubmission): boolean {\r\n if (row['adj_microFlow_review'] === 'compliant') return true;\r\n const maxLength = this.inputConfig()?.maxLength;\r\n // check if max exists and is a number\r\n if (!maxLength || isNaN(Number(maxLength))) {\r\n return true; // No limit set, allow status change\r\n }\r\n const allCompetentSubmissions = this.#value?.filter((v) => (v.adj_microFlow_review as unknown) === 'compliant').length || 0;\r\n return allCompetentSubmissions < (Number(maxLength) || 1);\r\n }\r\n}\r\n","@if (vm$ | async; as vm) {\r\n\r\n @if (vm.loading) {\r\n <div style=\"display: flex; justify-content: center; align-items: center; padding:24px;width: 100%;\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n } @else if (vm.error) {\r\n <div class=\"info-card error-card\">\r\n <h5 class=\"info-title\">❌ Failed to load data</h5>\r\n <p>{{ vm.error }}</p>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\">\r\n Try Again\r\n </button>\r\n </div>\r\n } @else {\r\n @if (!vm.displayCols.length) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">⚙️ This step needs to be configured to show data.</h5>\r\n <ol>\r\n <li>\r\n <strong>Why you're seeing this:</strong>\r\n <ul>\r\n <li>This component is designed for a <strong>\"Submission Review\"</strong> workflow step.</li>\r\n <li>It's currently missing the required column setup.</li>\r\n </ul>\r\n </li>\r\n <li>\r\n <strong>What to do (for Administrators):</strong>\r\n To fix this, go to the <strong>Workflow Builder</strong> and for this specific step, <strong>map the display\r\n columns</strong> to the desired submission data (e.g., form fields or document keys).\r\n </li>\r\n </ol>\r\n </div>\r\n } @else if (!vm.submissions.length) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">ℹ️ There are no submissions to display.</h5>\r\n <ul>\r\n <li>This can happen if <strong>no one has responded</strong> yet, or if the <strong>submission closing date has\r\n passed</strong>.</li>\r\n <li>If you are expecting to see submissions, try clicking the <strong>Refresh</strong> button.</li>\r\n </ul>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\" class=\"load-button\">\r\n Refresh\r\n </button>\r\n </div>\r\n } @else {\r\n @if (!value() || (value()?.length ?? 0) === 0) {\r\n <!-- value() typed `any` per parent's mixed union; length check survives null -->\r\n\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">📝 How to Review Submissions</h5>\r\n <ol>\r\n <li>\r\n <strong>View Response:</strong> Click the <strong>Preview</strong> (<mat-icon\r\n class=\"smallIcon\">preview</mat-icon>) icon to see the full submission.\r\n </li>\r\n <li>\r\n <strong>Set Status:</strong> Use the dropdown to select <strong>Compliant</strong> or\r\n <strong>Non-compliant</strong>.\r\n </li>\r\n <li>\r\n <strong>Add Note (If Non-compliant):</strong>\r\n <ul>\r\n <li>If you select <strong>Non-compliant</strong>, you <strong>must</strong> add a note.</li>\r\n <li>Click the <strong>Add Note</strong> (<mat-icon class=\"smallIcon\">add_comment</mat-icon>) icon, write your\r\n feedback, and hit <strong>Save Feedback</strong>. Your note will be visible to the applicant.</li>\r\n </ul>\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n <table mat-table [dataSource]=\"vm.submissions\">\r\n @for (col of vm.displayColumns; track col.formControlName) {\r\n <ng-container [matColumnDef]=\"col.formControlName\">\r\n <th mat-header-cell *matHeaderCellDef style=\"padding:4px\">\r\n\r\n @if (col.formControlName === 'status' && !inputConfig()?.readonly) {\r\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\" style=\"width: 100%;\r\n margin-bottom: 8px;\r\n margin-top: 8px;\r\n border-radius:16px;\" appearance=\"outline\">\r\n <mat-label>\r\n Bulk Status Selection\r\n </mat-label>\r\n <mat-select\r\n [style.color]=\"bulkStatus() === 'non-compliant' ? 'var(--mat-sys-error)' : bulkStatus()==='compliant'? 'var(--mat-sys-primary)' : ''\"\r\n (selectionChange)=\"bulkStatusChanged($event)\" ngDefaultControl [value]=\"bulkStatus()\"\r\n placeholder=\" Select Status\">\r\n @for (type of bulkOperations || []; track type) {\r\n <mat-option [value]=\"type.value\">{{type.label}}</mat-option>\r\n }\r\n </mat-select>\r\n </mat-form-field>\r\n } @else {\r\n {{ col.label }}\r\n }\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\" mat-ripple class=\"table-cell\" [class.selected-row]=\"selected === row.id\"\r\n (click)=\"$event.stopPropagation()\" [class.price-preference-cell]=\"true\"\r\n [style.border-bottom-color]=\"row.adjudicationPricePreferenceCalculationColor\"\r\n [style.background]=\"row.backgroundShades?.[col.formControlName]\">\r\n\r\n @if (col.formControlName === 'actions') {\r\n <span style=\"display: flex; align-items: center;\">\r\n <button matTooltipPosition=\"before\"\r\n [matTooltip]=\"`View and review **` + row[vm.columnMapping.respondentNameKey]+ `** 's' Submission`\"\r\n (click)=\"viewMicroSubmission(row)\" mat-icon-button>\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n @if (!(inputConfig()?.readonly) || (inputConfig()?.readonly) && !!row['submissionHasReviewNotes']) {\r\n <button (click)=\"openNotes(row)\" cdkOverlayOrigin #trigger=\"cdkOverlayOrigin\" matTooltipPosition=\"after\"\r\n [matTooltip]=\"\r\n `Add a review note for **` + row[vm.columnMapping.respondentNameKey] + `**`\" mat-icon-button>\r\n <mat-icon [style.color]=\"\r\n notesOpenForRowId === row.id ? 'var(--mat-sys-primary)' : (row['adj_microFlow_review']==='non-compliant' && !row['adj_microFlow_review_notes']?'var(--mat-sys-error)':'')\r\n \">\r\n {{ !row['submissionHasReviewNotes']? 'add_comment' : 'comment' }}\r\n </mat-icon>\r\n </button>\r\n }\r\n </span>\r\n } @else if (col.formControlName === 'status') {\r\n <mat-form-field floatLabel=\"always\" subscriptSizing=\"dynamic\" style=\"width: 100%;\r\n margin-bottom: 8px;\r\n margin-top: 8px;\r\n border-radius:16px;\" appearance=\"outline\">\r\n <mat-select [disabled]=\"!canChangeStatus(row) || inputConfig()?.readonly === true\"\r\n [style.color]=\"row['adj_microFlow_review'] === 'non-compliant' ? 'var(--mat-sys-error)' : row['adj_microFlow_review']==='compliant'? 'var(--mat-sys-primary)' : ''\"\r\n (selectionChange)=\"setResponseStatus(row,$event)\" ngDefaultControl [value]=\"row.adj_microFlow_review\"\r\n placeholder=\" Select Status\">\r\n @for (type of reviewStatuses || []; track type) {\r\n <mat-option [value]=\"type.value\">{{type.label}}</mat-option>\r\n }\r\n </mat-select>\r\n @if (row['adj_microFlow_review']==='non-compliant' && !row['adj_microFlow_review_notes']) {\r\n <mat-hint style=\"color:var(--mat-sys-error)\">\r\n Rejection reason is required. Add a review note.\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n @switch (col?.type) {\r\n @case ('daysAgo') {\r\n {{ row[col.formControlName] | daysAgo }}\r\n }\r\n @case ('number') {\r\n <div class=\"number-cell\">\r\n <span>\r\n {{ (row[col.formControlName] | number:'0.0-0' ) || 'N/A' }}\r\n </span>\r\n @if (col.showColor) {\r\n <mat-icon [style.color]=\"row.adjudicationPricePreferenceCalculationColor\">\r\n fiber_manual_record\r\n </mat-icon>\r\n }\r\n </div>\r\n }\r\n @default {\r\n @if ($index === 0) {\r\n <span class=\"main-submission-text\">\r\n <mat-icon style=\"font-size: 1em;height:16px;width:16px\">domain</mat-icon>\r\n <strong>\r\n {{ row[col.formControlName] }}\r\n </strong>\r\n </span>\r\n <span class=\"secondary-text\">\r\n <mat-icon>fingerprint</mat-icon>\r\n {{row[vm.columnMapping.respondentCodeKey]}}\r\n <mat-icon>more_time</mat-icon>\r\n {{ row[vm.columnMapping.responseDateKey ||''] | daysAgo}}\r\n </span>\r\n } @else {\r\n {{ row[col.formControlName] }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"vm.displayCols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: vm.displayCols\"></tr>\r\n </table>\r\n }\r\n }\r\n\r\n}\r\n","import { AsyncPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, OnInit, ViewEncapsulation, inject } from '@angular/core';\r\nimport {\r\n FormBuilder,\r\n FormControl,\r\n FormGroup,\r\n FormGroupDirective,\r\n NgForm,\r\n ReactiveFormsModule,\r\n Validators,\r\n} from '@angular/forms';\r\nimport { ErrorStateMatcher } from '@angular/material/core';\r\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatExpansionModule } from '@angular/material/expansion';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\nimport { Observable, map, startWith } from 'rxjs';\r\nimport { WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\r\n\r\nexport interface ScoreSheetGroup {\r\n key: string;\r\n name: string;\r\n}\r\n\r\nexport interface PointAssignmentDialogData {\r\n readonly: boolean;\r\n row: { nameOfBidder: string; adj_microFlow_assignedScore: Record<string, number> };\r\n scoreSheetGroups: ScoreSheetGroup[];\r\n groupedScoreSheet: Record<string, WorkflowAdjudicationScoreSheetValue[]>;\r\n existingScores: Record<string, Record<string, number | null>>;\r\n}\r\n\r\n/** Shows validation errors as soon as the control becomes dirty + invalid. */\r\nexport class ShowErrorOnDirtyMatcher implements ErrorStateMatcher {\r\n isErrorState(control: FormControl | null, _form: FormGroupDirective | NgForm | null): boolean {\r\n return !!(control && control.invalid && control.dirty);\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'lib-point-assignment-dialog',\r\n templateUrl: './point-assignment-dialog.component.html',\r\n styleUrl: './point-assignment-dialog.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n AsyncPipe,\r\n ReactiveFormsModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatButtonModule,\r\n MatProgressBarModule,\r\n MatExpansionModule,\r\n MatDividerModule,\r\n ],\r\n})\r\nexport class PointAssignmentDialogComponent implements OnInit {\r\n protected readonly dialogRef = inject<MatDialogRef<PointAssignmentDialogComponent>>(MatDialogRef);\r\n protected readonly data = inject<PointAssignmentDialogData>(MAT_DIALOG_DATA);\r\n readonly #fb = inject(FormBuilder);\r\n\r\n protected pointsForm!: FormGroup;\r\n protected totalPoints$!: Observable<number>;\r\n protected maxPossiblePoints = 0;\r\n protected readonly matcher = new ShowErrorOnDirtyMatcher();\r\n\r\n ngOnInit(): void {\r\n this.#calculateMaxPoints();\r\n this.pointsForm = this.#buildForm();\r\n this.totalPoints$ = this.#createTotalPointsObservable();\r\n }\r\n\r\n protected correctMaxValue(event: Event, groupKey: string, controlId: string, maxPoints: number): void {\r\n const inputElement = event.target as HTMLInputElement;\r\n const currentValue = parseFloat(inputElement.value);\r\n\r\n if (currentValue > maxPoints) {\r\n this.pointsForm.get([groupKey, controlId])?.patchValue(maxPoints);\r\n }\r\n }\r\n\r\n #buildForm(): FormGroup {\r\n const groupOfGroups = this.data.scoreSheetGroups.reduce((acc, group) => {\r\n const scoresInGroup = this.data.groupedScoreSheet[group.key] || [];\r\n const groupControls = scoresInGroup.reduce((ctrls, score) => {\r\n const existingScore = this.data.row.adj_microFlow_assignedScore?.[score.id] ?? null;\r\n ctrls[score.id] = new FormControl(existingScore, [\r\n Validators.required,\r\n Validators.min(0),\r\n Validators.max(score.totalPoints),\r\n ]);\r\n return ctrls;\r\n }, {} as Record<string, FormControl>);\r\n acc[group.key] = this.#fb.group(groupControls);\r\n return acc;\r\n }, {} as Record<string, FormGroup>);\r\n return this.#fb.group(groupOfGroups);\r\n }\r\n\r\n #calculateMaxPoints(): void {\r\n this.maxPossiblePoints = Object.values(this.data.groupedScoreSheet)\r\n .flat()\r\n .reduce((acc, score) => acc + score.totalPoints, 0);\r\n }\r\n\r\n #createTotalPointsObservable(): Observable<number> {\r\n return this.pointsForm.valueChanges.pipe(\r\n startWith(this.pointsForm.value),\r\n map(formValue => {\r\n let total = 0;\r\n Object.values(formValue || {}).forEach((group: unknown) => {\r\n if (group && typeof group === 'object') {\r\n Object.values(group).forEach(score => {\r\n total += Number(score) || 0;\r\n });\r\n }\r\n });\r\n return total;\r\n }),\r\n );\r\n }\r\n}\r\n","<span mat-dialog-title>\r\n Assign Points for <span class=\"bidder-name\">{{ data.row['nameOfBidder'] }}</span>\r\n</span>\r\n @if( !data.readonly){\r\n<div class=\"dialog-instructions\">\r\n @if(!pointsForm.dirty && !pointsForm.touched){\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">💯 How to Assign Points\r\n\r\n </h5>\r\n <ol>\r\n <li>\r\n <strong>Enter a score</strong> for each item listed below.\r\n </li>\r\n <li>\r\n <strong>Follow the rules:</strong>\r\n <ul>\r\n <li>Your score cannot be higher than the maximum points shown (e.g., / 10).</li>\r\n <li>The <strong>\"Save Points\"</strong> button at the bottom will turn blue when everything is filled\r\n out correctly.</li>\r\n </ul>\r\n </li>\r\n <li>\r\n <strong>Click the blue \"Save Points\" button</strong> to finish.\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n @else {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">✍️ Editing Your Scores</h5>\r\n <ol>\r\n <li>\r\n <strong>You are viewing saved scores.</strong> To make a change, simply click on a score and type in a\r\n new number.\r\n </li>\r\n <li>\r\n The <strong>Total Points</strong> bar at the top will update as you make edits.\r\n </li>\r\n <li>\r\n Click <strong>\"Save Points\"</strong> to confirm your changes when you're done.\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n</div>\r\n\r\n }\r\n\r\n\r\n<mat-dialog-content style=\"padding-bottom: 8px;padding-bottom: 8px\" [formGroup]=\"pointsForm\">\r\n <div class=\"summary-bar\">\r\n <h3>Total Points: {{ totalPoints$ | async }} / {{ maxPossiblePoints }}</h3>\r\n <mat-progress-bar mode=\"determinate\"\r\n [value]=\"((totalPoints$ | async) || 0) / maxPossiblePoints * 100\"></mat-progress-bar>\r\n </div>\r\n\r\n <mat-accordion multi>\r\n @for (group of data.scoreSheetGroups; track group.key) {\r\n <mat-expansion-panel [expanded]=\"true\" [formGroupName]=\"group.key\">\r\n <mat-expansion-panel-header>\r\n <mat-panel-title>{{ group.name }}</mat-panel-title>\r\n </mat-expansion-panel-header>\r\n\r\n @for (score of data.groupedScoreSheet[group.key] || []; track score.id) {\r\n <div class=\"score-item\">\r\n <label [for]=\"score.id\" class=\"score-description\">{{ score.description }}</label>\r\n\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" class=\"score-input\">\r\n <mat-label>Score</mat-label>\r\n <input [disabled]=\"data.readonly\" matInput type=\"number\" placeholder=\"0\" [id]=\"score.id\"\r\n [formControlName]=\"score.id\" [max]=\"score.totalPoints\" min=\"0\" [errorStateMatcher]=\"matcher\"\r\n (input)=\"correctMaxValue($event, group.key, score.id, score.totalPoints)\" />\r\n <span matSuffix>\r\n <span style=\"min-width: 58px; display:flex\">\r\n / {{ score.totalPoints }}\r\n </span>\r\n </span>\r\n\r\n @if (pointsForm.get(group.key)?.get(score.id)?.hasError('required')) {\r\n <mat-error>A score is required.</mat-error>\r\n }\r\n @if (pointsForm.get(group.key)?.get(score.id)?.hasError('max')) {\r\n <mat-error>Score cannot exceed {{ score.totalPoints }}.</mat-error>\r\n }\r\n @if (pointsForm.get(group.key)?.get(score.id)?.hasError('min')) {\r\n <mat-error>Score cannot be negative.</mat-error>\r\n }\r\n </mat-form-field>\r\n </div>\r\n <mat-divider></mat-divider>\r\n }\r\n </mat-expansion-panel>\r\n }\r\n </mat-accordion>\r\n\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions align=\"end\">\r\n <button mat-button mat-dialog-close>Cancel</button>\r\n @if( !data.readonly){\r\n <button mat-flat-button color=\"primary\" \r\n [mat-dialog-close]=\"pointsForm.getRawValue()\"\r\n [disabled]=\"pointsForm.invalid\">\r\n Save Points\r\n </button>\r\n }\r\n\r\n</mat-dialog-actions>","import { AsyncPipe, DecimalPipe } from '@angular/common';\r\nimport { ChangeDetectionStrategy, Component, DestroyRef, ViewEncapsulation, computed, effect, inject, input, output, signal } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { BehaviorSubject, Observable, catchError, combineLatest, map, of, shareReplay, startWith, switchMap, take, tap } from 'rxjs';\r\n\r\nimport { AdjResponseReviewColumnMapping, ITowerStepColumn, WorkflowAdjudicationScoreSheetValue } from 'ngx-t-forms-types';\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\nimport { getColorForNumber } from '../../../../../../shared/functions/mapColors';\r\nimport { DaysAgoPipe } from '../../../../../../shared/pipes/date/days-ago.pipe';\r\nimport { ISubmission, tableCols } from '../submission-review/submission-review.component';\r\nimport { PointAssignmentDialogComponent } from './elements/point-assignment-dialog/point-assignment-dialog.component';\r\n\r\nexport interface IViewModel {\r\n submissions: ISubmission[];\r\n columnMapping: AdjResponseReviewColumnMapping;\r\n displayColumns?: tableCols[];\r\n displayCols: string[];\r\n loading: boolean;\r\n groupedScoreSheet?: Record<string, WorkflowAdjudicationScoreSheetValue[]>;\r\n scoreSheetGroups?: { name: string; key: string }[];\r\n error?: string;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-point-assignment',\r\n templateUrl: './point-assignment.component.html',\r\n styleUrls: ['./point-assignment.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n imports: [\r\n AsyncPipe,\r\n DecimalPipe,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n DaysAgoPipe,\r\n ],\r\n})\r\nexport class PointAssignmentComponent {\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #dialog = inject(MatDialog);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n readonly #refreshTrigger = new BehaviorSubject<void>(undefined);\r\n // A stream to push updates of the review values (`this.value`)\r\n readonly #valueChanges$ = new BehaviorSubject<unknown[] | null>([]);\r\n\r\n readonly #initialState: IViewModel = {\r\n loading: true,\r\n submissions: [],\r\n columnMapping: {} as AdjResponseReviewColumnMapping,\r\n displayCols: [],\r\n displayColumns: [],\r\n error: undefined,\r\n };\r\n\r\n readonly #valueSignal = signal<unknown[] | null>([]);\r\n\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n // NOTE(phase-4): Trap 6 — parent (`workflow-adjudication-reactive-input`) binds a\r\n // `WorkflowAdjudicationValue | null` union of three incompatible shapes. Until the parent\r\n // template is split per adjudication step type, this input must remain `any`; narrow\r\n // inside `valueBridge`.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n protected readonly valueBridge = effect(() => {\r\n const raw = this.value();\r\n const next: unknown[] = Array.isArray(raw) ? raw : [];\r\n if (_isEqual(next, this.#valueSignal())) return;\r\n this.#valueSignal.set(next);\r\n this.#valueChanges$.next(next);\r\n });\r\n\r\n // NOTE(phase-4): Trap 6 — emitter forwards enriched `ISubmission[]` rows (with score-sheet\r\n // augmentation) back to the parent which then writes through the `WorkflowAdjudicationValue`\r\n // union. D-013: the parent (`workflow-adjudication-reactive-input`) `(pointsChange)=\"setValue($event)\"`\r\n // binding only typechecks under strictTemplates if `$event` is assignable to that union; the\r\n // enriched `ISubmission[]` payload matches no single branch (missing formControlName/totalPoints/\r\n // description), so the emitted type must stay `any[]` to preserve parity. Narrows when the parent\r\n // template is split per adjudication step type.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this emitter.\r\n readonly pointsChange = output<any[]>();\r\n\r\n // Stream for the initial data fetch. Only re-runs when `refreshTrigger` is fired.\r\n readonly #fetchedData$ = this.#refreshTrigger.pipe(\r\n switchMap(() => this.#config.formBuilder.getCurrentStepMicroflowSubmissions().pipe(take(1))),\r\n shareReplay(1),\r\n );\r\n\r\n protected readonly vm$: Observable<IViewModel> = combineLatest([\r\n this.#fetchedData$,\r\n this.#valueChanges$,\r\n ]).pipe(\r\n map(([res, reviewValues]) => {\r\n const { columnMapping, submissions, scoreSheet } = res;\r\n // group scoresheet by pointType\r\n const groupedScoreSheet = (scoreSheet || []).reduce((acc, curr) => {\r\n const pointType = curr.pointType || 'default';\r\n if (!acc[pointType]) {\r\n acc[pointType] = [];\r\n }\r\n acc[pointType].push(curr);\r\n return acc;\r\n }, {} as Record<string, WorkflowAdjudicationScoreSheetValue[]>);\r\n\r\n const dataModel: IViewModel = {\r\n submissions: this.#enrichSubmissionsData(submissions || [], reviewValues),\r\n loading: false,\r\n error: undefined,\r\n groupedScoreSheet,\r\n scoreSheetGroups: Object.keys(groupedScoreSheet).map((key) => ({\r\n name: key.replace(/([a-z])([A-Z])/g, '$1 $2').replace(/([A-Z])([A-Z][a-z])/g, '$1 $2'),\r\n key,\r\n })),\r\n columnMapping,\r\n displayCols: [\r\n 'nameOfBidder',\r\n 'adj_microFlow_review',\r\n 'adjudicationPricePreferenceCalculation',\r\n 'adj_microFlow_scoreSheetTotalPoints',\r\n 'actions',\r\n ],\r\n displayColumns: [\r\n { label: 'name', formControlName: 'nameOfBidder', type: 'string' } as tableCols,\r\n { label: 'Pref Calc', formControlName: 'adjudicationPricePreferenceCalculation', type: 'number', showColor: true } as tableCols,\r\n { label: 'status', formControlName: 'adj_microFlow_review', type: 'string' } as tableCols,\r\n { label: 'Score', formControlName: 'adj_microFlow_scoreSheetTotalPoints', type: 'number', showColor: true } as tableCols,\r\n { label: '', formControlName: 'actions', type: 'string' } as tableCols,\r\n ],\r\n };\r\n\r\n return { ...dataModel };\r\n }),\r\n startWith(this.#initialState),\r\n catchError(() => of({ ...this.#initialState, loading: false, error: 'Failed to load submissions.' })),\r\n shareReplay(1),\r\n );\r\n\r\n protected readonly readonly = computed(() => this.inputConfig()?.readonly ?? false);\r\n\r\n loadMicroSubmissions(): void {\r\n this.#refreshTrigger.next();\r\n }\r\n\r\n viewMicroSubmission(res: { id: string }): void {\r\n this.#config.formBuilder['previewWorkflowDocument'](res.id);\r\n }\r\n\r\n #enrichSubmissionsData(submissions: ISubmission[], reviewValues: unknown[] | null): ISubmission[] {\r\n const numberSets = new Map<string, number[]>();\r\n numberSets.set(\r\n 'adjudicationPricePreferenceCalculation',\r\n submissions.map((s) => Number(s['adjudicationPricePreferenceCalculation'] || 0)),\r\n );\r\n const list = submissions.length > 0 ? submissions : ((reviewValues as ISubmission[]) || []);\r\n return list.map((submission) => {\r\n const numbers = numberSets.get('adjudicationPricePreferenceCalculation') || [];\r\n const color = numbers.length === 0\r\n ? submission['adjudicationPricePreferenceCalculationColor']\r\n : this.#getColorString(submission['adjudicationPricePreferenceCalculation'], numbers);\r\n const backgroundShades = { ['adjudicationPricePreferenceCalculation']: this.#getScoreShade(color ?? '') };\r\n const existing = (this.#valueSignal() as ISubmission[] | null)?.find((v) => v.id === submission.id);\r\n return {\r\n ...submission,\r\n adj_microFlow_review: submission['adj_microFlow_review'] === 'compliant' ? '✅' : '❌',\r\n adjudicationPricePreferenceCalculationColor: color,\r\n backgroundShades,\r\n ...existing,\r\n };\r\n });\r\n }\r\n\r\n #getScoreShade(rgbColor: string): string {\r\n if (!rgbColor) return '';\r\n return rgbColor.replace('rgb', 'rgba').replace(')', `, 0.1)`);\r\n }\r\n\r\n #getColorString(target: number, numbers: number[]): string {\r\n return getColorForNumber(target, numbers, true);\r\n }\r\n\r\n openPointAssignmentDialog(\r\n row: ISubmission,\r\n groupedScoreSheet: Record<string, WorkflowAdjudicationScoreSheetValue[]> | undefined,\r\n scoreSheetGroups: { name: string; key: string }[] | undefined,\r\n ): void {\r\n this.#dialog\r\n .open(PointAssignmentDialogComponent, {\r\n height: 'fit-content',\r\n data: {\r\n row,\r\n groupedScoreSheet,\r\n scoreSheetGroups,\r\n readonly: this.inputConfig()?.readonly || false,\r\n },\r\n autoFocus: false,\r\n disableClose: true,\r\n })\r\n .afterClosed()\r\n .pipe(\r\n take(1),\r\n switchMap((result: Record<string, Record<string, number>> | undefined) => {\r\n if (!result) return of(null);\r\n // Update the value with the new point assignments\r\n const assignment = Object.values(result).reduce((acc, curr) => {\r\n acc = { ...acc, ...curr };\r\n return acc;\r\n }, {} as Record<string, number>);\r\n row['adj_microFlow_assignedScore'] = assignment;\r\n const currentList = (this.#valueSignal() as ISubmission[] | null) ?? [];\r\n const alreadyInValue = currentList.find((v) => v.id === row.id);\r\n let newValue: ISubmission[];\r\n if (!alreadyInValue) {\r\n newValue = [\r\n ...currentList,\r\n {\r\n ...row,\r\n adj_microFlow_assignedScore: assignment,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(assignment).reduce((acc, curr) => acc + curr, 0),\r\n },\r\n ];\r\n } else {\r\n newValue = currentList.map((v) => {\r\n if (v.id === row.id) {\r\n return {\r\n ...v,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(assignment).reduce((acc, curr) => acc + curr, 0),\r\n adj_microFlow_assignedScore: assignment,\r\n };\r\n }\r\n return v;\r\n });\r\n }\r\n return of(newValue);\r\n }),\r\n tap((newValue) => {\r\n if (!newValue || this.inputConfig()?.readonly) return;\r\n this.pointsChange.emit(newValue);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n}\r\n","@if (vm$ | async; as vm) {\r\n @if (vm.loading) {\r\n <div style=\"display: flex; justify-content: center; align-items: center; padding:24px;width: 100%;\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n } @else if (vm.error) {\r\n <div class=\"info-card error-card\">\r\n <h5 class=\"info-title\">❌ Failed to load data</h5>\r\n <p>{{ vm.error }}</p>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\">\r\n Try Again\r\n </button>\r\n </div>\r\n } @else {\r\n @if (vm.submissions.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">ℹ️ There are no submissions to display.</h5>\r\n <ul>\r\n <li>This can happen if <strong>no one has responded</strong> yet, or if <strong>none of the submission were\r\n compliant </strong>.</li>\r\n <li>If you are expecting to see submissions, try clicking the <strong>Refresh</strong> button.</li>\r\n </ul>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\" class=\"load-button\">\r\n Refresh\r\n </button>\r\n </div>\r\n } @else {\r\n @if (!value || value.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">📝 How to Review Submissions</h5>\r\n <ol>\r\n <li>\r\n <strong>View Response:</strong> Click the <strong>Preview</strong> (<mat-icon\r\n class=\"smallIcon\">preview</mat-icon>) icon to see the full submission.\r\n </li>\r\n <li>\r\n <strong>Set Status:</strong> Use the dropdown to select <strong>Compliant</strong> or\r\n <strong>Non-compliant</strong>.\r\n </li>\r\n <li>\r\n <strong>Add Note (If Non-compliant):</strong>\r\n <ul>\r\n <li>If you select <strong>Non-compliant</strong>, you <strong>must</strong> add a note.</li>\r\n <li>Click the <strong>Add Note</strong> (<mat-icon class=\"smallIcon\">add_comment</mat-icon>) icon, write your\r\n feedback, and hit <strong>Save Feedback</strong>. Your note will be visible to the applicant.</li>\r\n </ul>\r\n </li>\r\n </ol>\r\n </div>\r\n }\r\n <table mat-table [dataSource]=\"vm.submissions\">\r\n @for (col of vm.displayColumns; track col.formControlName) {\r\n <ng-container [matColumnDef]=\"col.formControlName\">\r\n <th mat-header-cell *matHeaderCellDef style=\"padding:4px\">\r\n {{ col.label }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\" mat-ripple class=\"table-cell\" (click)=\"$event.stopPropagation()\"\r\n [class.price-preference-cell]=\"true\"\r\n [style.border-bottom-color]=\"row.adjudicationPricePreferenceCalculationColor\"\r\n [style.background]=\"row.backgroundShades?.[col.formControlName]\">\r\n @if (col.formControlName === 'actions') {\r\n <span style=\"display: flex; align-items: center;\">\r\n <button matTooltipPosition=\"before\"\r\n [matTooltip]=\"'View and review **' + row[vm.columnMapping.respondentNameKey] + '\\'s\\' Submission'\"\r\n (click)=\"viewMicroSubmission(row)\" mat-icon-button>\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n </span>\r\n } @else if (col.formControlName === 'adj_microFlow_scoreSheetTotalPoints') {\r\n <button\r\n (click)=\"openPointAssignmentDialog(row, vm?.groupedScoreSheet, vm.scoreSheetGroups)\"\r\n [id]=\"row.id\" mat-stroked-button>\r\n {{ (row[col.formControlName] | number:'0.0-0') || 'Assign Points' }}\r\n </button>\r\n } @else {\r\n @switch (col?.type) {\r\n @case ('daysAgo') {\r\n {{ row[col.formControlName] | daysAgo }}\r\n }\r\n @case ('number') {\r\n {{ (row[col.formControlName] | number:'0.0-0') || 'N/A' }}\r\n }\r\n @default {\r\n @if ($index === 0) {\r\n <span class=\"main-submission-text\">\r\n <mat-icon style=\"font-size: 1em;height:16px;width:16px\">domain</mat-icon>\r\n <strong>\r\n {{ row[col.formControlName] }}\r\n </strong>\r\n </span>\r\n <span class=\"secondary-text\">\r\n <mat-icon>fingerprint</mat-icon>\r\n {{ row[vm.columnMapping.respondentCodeKey] }}\r\n <mat-icon>more_time</mat-icon>\r\n {{ row[vm.columnMapping.responseDateKey || ''] | daysAgo }}\r\n </span>\r\n } @else {\r\n {{ row[col.formControlName] }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"vm.displayCols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: vm.displayCols\"></tr>\r\n </table>\r\n }\r\n }\r\n}\r\n","import { AsyncPipe, DecimalPipe } from '@angular/common';\r\nimport {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n effect,\r\n inject,\r\n input,\r\n output,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatRippleModule } from '@angular/material/core';\r\nimport { MatDialog, MatDialogModule } from '@angular/material/dialog';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { MatTableModule } from '@angular/material/table';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport {\r\n AdjResponseReviewColumnMapping,\r\n InputDataTypes,\r\n ITowerStepColumn,\r\n WorkflowAdjudicationScoreSheetValue,\r\n} from 'ngx-t-forms-types';\r\nimport {\r\n BehaviorSubject,\r\n Observable,\r\n catchError,\r\n combineLatest,\r\n map,\r\n of,\r\n shareReplay,\r\n startWith,\r\n switchMap,\r\n take,\r\n tap,\r\n} from 'rxjs';\r\n\r\nimport { NGX_T_FORMS_CONFIG_TOKEN } from '../../../../../../injection-tokens';\r\nimport { _isEqual } from '../../../../../../shared/functions/isEqual';\r\nimport { getColorForNumber } from '../../../../../../shared/functions/mapColors';\r\nimport { DaysAgoPipe } from '../../../../../../shared/pipes/date/days-ago.pipe';\r\nimport { IViewModel } from '../point-assignment/point-assignment.component';\r\nimport { PointAssignmentDialogComponent } from '../point-assignment/elements/point-assignment-dialog/point-assignment-dialog.component';\r\nimport { ISubmission } from '../submission-review/submission-review.component';\r\n\r\n/**\r\n * NOTE(phase-4): the parent `workflow-adjudication-reactive-input` binds `value` from a union\r\n * of three adjudication payloads (score-sheet, micro-flow review, elected-supplier). This\r\n * component consumes the micro-flow review branch — until the parent splits its template by\r\n * `adjudicationStep` (Trap 6), the input must accept the broader shape (`unknown`) and narrow\r\n * via the `toSupplierValue` guard.\r\n *\r\n * NOTE(phase-4 shared-type drift): the shared `WorkflowAdjudicationMicroFlowReviewValue` does\r\n * not declare `adj_microFlow_supplierAppointed`, `adj_microFlow_assignedScore`, or\r\n * `adj_microFlow_scoreSheetTotalPoints`, but the runtime payload carries them through this\r\n * component. `SupplierRow` extends `ISubmission` (a `Record<string, any>`) and adds the known\r\n * fields for editor support; the shared type should be widened in a follow-up.\r\n */\r\ntype SupplierRow = ISubmission & {\r\n adj_microFlow_supplierAppointed?: boolean;\r\n adj_microFlow_assignedScore?: Record<string, number>;\r\n adj_microFlow_scoreSheetTotalPoints?: number;\r\n adj_microFlow_pointsAwarded?: number;\r\n adj_microFlow_pricePointCalculation?: number;\r\n colColors?: Record<string, string>;\r\n};\r\n\r\nfunction toSupplierValue(input: unknown): SupplierRow[] {\r\n // Runtime guard — the parent supplies a union of array / object payloads.\r\n return Array.isArray(input) ? (input as SupplierRow[]) : [];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-supplier-selection',\r\n templateUrl: './supplier-selection.component.html',\r\n styleUrl: './supplier-selection.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n AsyncPipe,\r\n DecimalPipe,\r\n FormsModule,\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule,\r\n MatProgressSpinnerModule,\r\n MatRippleModule,\r\n MatTableModule,\r\n MatTooltipModule,\r\n DaysAgoPipe,\r\n ],\r\n})\r\nexport class SupplierSelectionComponent {\r\n readonly inputConfig = input<ITowerStepColumn | undefined>(undefined);\r\n\r\n // Phase-4 TODO: parent (workflow-adjudication-reactive-input) accepts broader `WorkflowAdjudicationValue` union.\r\n // Emitting narrower `SupplierRow[]` is structurally compatible at runtime; output widened to `any` for template typecheck (Trap 6).\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n readonly supplierSelection = output<any>();\r\n\r\n readonly #config = inject(NGX_T_FORMS_CONFIG_TOKEN);\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #dialog = inject(MatDialog);\r\n\r\n readonly #refreshTrigger = new BehaviorSubject<void>(undefined);\r\n // A stream to push updates of the review values (`this.value`)\r\n readonly #valueChanges$ = new BehaviorSubject<SupplierRow[]>([]);\r\n\r\n readonly #initialState: IViewModel = {\r\n loading: true,\r\n submissions: [],\r\n columnMapping: {} as AdjResponseReviewColumnMapping,\r\n displayCols: [],\r\n displayColumns: [],\r\n error: undefined,\r\n };\r\n\r\n #value: SupplierRow[] = [];\r\n\r\n // NOTE(phase-4): Trap 6 — parent (`workflow-adjudication-reactive-input`) binds a\r\n // `WorkflowAdjudicationValue | null` union of three incompatible shapes. The template\r\n // also reads `value.length` directly. Until parent template is split per adjudication step\r\n // the input must remain `any`; narrow inside the `valueBridge` via `toSupplierValue`.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO(phase-4): split parent template by adjudication step, then narrow this input.\r\n readonly value = input<any>(null);\r\n\r\n protected readonly valueBridge = effect(() => {\r\n const next = toSupplierValue(this.value());\r\n if (_isEqual(next, this.#value)) return;\r\n this.#value = next;\r\n this.#valueChanges$.next(this.#value);\r\n });\r\n\r\n readonly #fetchedData$ = this.#refreshTrigger.pipe(\r\n switchMap(() =>\r\n this.#config.formBuilder.getCurrentStepMicroflowSubmissions().pipe(take(1)),\r\n ),\r\n shareReplay(1),\r\n );\r\n\r\n protected loadMicroSubmissions(): void {\r\n this.#refreshTrigger.next();\r\n }\r\n\r\n protected readonly vm$: Observable<IViewModel> = combineLatest([\r\n this.#fetchedData$,\r\n this.#valueChanges$,\r\n ]).pipe(\r\n map(([res, reviewValues]) => {\r\n const {\r\n columnMapping,\r\n submissions,\r\n scoreSheet,\r\n adjudicationPricePreferenceCalculationFormula,\r\n } = res;\r\n //group scoreSheet by pointType\r\n const groupedScoreSheet = (scoreSheet || []).reduce(\r\n (acc, curr) => {\r\n const pointType = curr.pointType || 'default';\r\n if (!acc[pointType]) {\r\n acc[pointType] = [];\r\n }\r\n acc[pointType].push(curr);\r\n return acc;\r\n },\r\n {} as Record<string, WorkflowAdjudicationScoreSheetValue[]>,\r\n );\r\n const totalPossibleScore = (scoreSheet || []).reduce(\r\n (acc, curr) => acc + curr.totalPoints,\r\n 0,\r\n );\r\n\r\n const maxPointsAwarded: number =\r\n adjudicationPricePreferenceCalculationFormula ===\r\n '80(1-((totalBidPrice-Pmin)/(Pmin)))'\r\n ? 20\r\n : adjudicationPricePreferenceCalculationFormula ===\r\n '90(1-((totalBidPrice-Pmin)/(Pmin)))'\r\n ? 10\r\n : 100;\r\n const dataModel = {\r\n submissions: this.#enrichSubmissionsData(\r\n submissions || [],\r\n reviewValues,\r\n totalPossibleScore,\r\n maxPointsAwarded,\r\n ),\r\n loading: false,\r\n error: undefined,\r\n groupedScoreSheet,\r\n\r\n scoreSheetGroups: Object.keys(groupedScoreSheet).map((key) => ({\r\n name: key\r\n .replace(/([a-z])([A-Z])/g, '$1 $2')\r\n .replace(/([A-Z])([A-Z][a-z])/g, '$1 $2'),\r\n key: key,\r\n })),\r\n maxPointsAwarded,\r\n totalPossibleScore,\r\n columnMapping: columnMapping,\r\n displayCols: [\r\n 'nameOfBidder',\r\n 'adjudicationPricePreferenceCalculation',\r\n 'adj_microFlow_pointsAwarded',\r\n 'adj_microFlow_pricePointCalculation',\r\n\r\n 'actions',\r\n 'adj_microFlow_supplierAppointed',\r\n ],\r\n displayColumns: [\r\n { label: 'name', formControlName: 'nameOfBidder', type: InputDataTypes.String },\r\n {\r\n label: `${100 - maxPointsAwarded}`,\r\n formControlName: 'adjudicationPricePreferenceCalculation',\r\n type: InputDataTypes.Number,\r\n },\r\n {\r\n label: `${maxPointsAwarded}`,\r\n formControlName: 'adj_microFlow_pointsAwarded',\r\n type: InputDataTypes.Number,\r\n },\r\n {\r\n label: 'Total',\r\n formControlName: 'adj_microFlow_pricePointCalculation',\r\n type: InputDataTypes.Number,\r\n },\r\n // `actions` is an internal cell type used by the template `@switch`; widened locally in `tableCols`.\r\n { label: '', formControlName: 'actions', type: 'actions' as const },\r\n {\r\n label: 'Appointed',\r\n formControlName: 'adj_microFlow_supplierAppointed',\r\n type: InputDataTypes.Boolean,\r\n showColor: true,\r\n },\r\n ],\r\n };\r\n return {\r\n ...dataModel,\r\n } as IViewModel;\r\n }),\r\n startWith(this.#initialState),\r\n catchError(() => {\r\n return of({\r\n ...this.#initialState,\r\n loading: false,\r\n error: 'Failed to load submissions.',\r\n });\r\n }),\r\n shareReplay(1),\r\n );\r\n\r\n protected viewMicroSubmission(res: ISubmission): void {\r\n this.#config.formBuilder['previewWorkflowDocument'](res.id);\r\n }\r\n\r\n #enrichSubmissionsData(\r\n submissions: ISubmission[],\r\n value: SupplierRow[],\r\n totalPossibleScore: number,\r\n maxPointsAwarded: number,\r\n ): SupplierRow[] {\r\n // 1. Handle edge cases first for clarity.\r\n\r\n // 2. Improve performance by creating a lookup map to avoid O(n^2) complexity.\r\n // This is much faster than using .find() inside a loop.\r\n const valueMap = new Map<string, SupplierRow>(\r\n this.#value?.map((v) => [v.id, v]) || [],\r\n );\r\n const list: ISubmission[] = submissions.length > 0 ? submissions : (value || []);\r\n // 3. First pass: Enrich submissions with calculated scores.\r\n const enrichedSubmissions: SupplierRow[] = list.map((submission) => {\r\n const v = valueMap.get(submission.id);\r\n\r\n // Use nullish coalescing (??) for cleaner fallback logic.\r\n const totalPoints =\r\n (v?.['adj_microFlow_scoreSheetTotalPoints'] as number | undefined) ??\r\n (submission?.['adj_microFlow_scoreSheetTotalPoints'] as number | undefined) ??\r\n 0;\r\n\r\n // Simplify calculation: remove unnecessary try-catch. Division by zero in JS results\r\n // in Infinity, not an error. The check for totalPossibleScore > 0 handles this.\r\n const pointsAwarded =\r\n totalPossibleScore > 0\r\n ? (totalPoints / totalPossibleScore) * maxPointsAwarded\r\n : 0;\r\n\r\n const pricePointCalculation =\r\n (Number(submission['adjudicationPricePreferenceCalculation'] ?? 0)) + pointsAwarded;\r\n\r\n return {\r\n ...submission,\r\n ...v,\r\n adj_microFlow_pointsAwarded: pointsAwarded,\r\n adj_microFlow_pricePointCalculation: pricePointCalculation,\r\n };\r\n });\r\n\r\n // 4. Define keys to process to avoid repetition (DRY principle).\r\n const keysToColor = ['adj_microFlow_pricePointCalculation'] as const;\r\n\r\n // 5. Correctly build the number sets from the *newly enriched* data.\r\n const numberSets = new Map<string, number[]>();\r\n for (const key of keysToColor) {\r\n const values = enrichedSubmissions.map((s) => Number(s[key] ?? 0));\r\n numberSets.set(key, values);\r\n }\r\n\r\n // 6. Second pass: Add colors and shades based on the complete dataset.\r\n return enrichedSubmissions.map((submission) => {\r\n const colColors: Record<string, string> = {};\r\n const backgroundShades: Record<string, string> = {\r\n ...(submission.backgroundShades ?? {}),\r\n };\r\n\r\n for (const key of keysToColor) {\r\n const scoreValue = Number(submission[key] ?? 0);\r\n const allScores = numberSets.get(key) || [];\r\n const color = this.#getColorString(scoreValue, allScores);\r\n\r\n colColors[key] = color;\r\n backgroundShades[key] = this.#getScoreShade(color);\r\n }\r\n backgroundShades['adjudicationPricePreferenceCalculation'] = '';\r\n\r\n return {\r\n ...submission,\r\n colColors,\r\n backgroundShades,\r\n };\r\n });\r\n }\r\n\r\n #getScoreShade(rgbColor: string): string {\r\n if (!rgbColor) return '';\r\n return rgbColor.replace('rgb', 'rgba').replace(')', `, 0.1)`);\r\n }\r\n\r\n #getColorString(target: number, numbers: number[]): string {\r\n return getColorForNumber(target, numbers, true);\r\n }\r\n\r\n protected openPointAssignmentDialog(\r\n row: SupplierRow,\r\n groupedScoreSheet:\r\n | Record<string, WorkflowAdjudicationScoreSheetValue[]>\r\n | undefined,\r\n scoreSheetGroups:\r\n | {\r\n name: string;\r\n key: string;\r\n }[]\r\n | undefined,\r\n ): void {\r\n this.#dialog\r\n .open(PointAssignmentDialogComponent, {\r\n height: 'fit-content',\r\n data: {\r\n row,\r\n groupedScoreSheet,\r\n scoreSheetGroups,\r\n },\r\n autoFocus: false,\r\n disableClose: true,\r\n })\r\n .afterClosed()\r\n .pipe(\r\n take(1),\r\n switchMap((result: Record<string, Record<string, number>>) => {\r\n if (!result) return of(null);\r\n // Update the value with the new point assignments\r\n const assignment = Object.values(result).reduce(\r\n (acc, curr) => {\r\n acc = {\r\n ...acc,\r\n ...curr,\r\n };\r\n return acc;\r\n },\r\n {} as Record<string, number>,\r\n );\r\n row['adj_microFlow_assignedScore'] = assignment;\r\n const alreadyInValue = this.#value?.find((v) => v.id === row.id);\r\n let newValue: SupplierRow[];\r\n if (!alreadyInValue) {\r\n newValue = [\r\n ...(this.#value || []),\r\n {\r\n ...row,\r\n adj_microFlow_assignedScore: assignment,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(assignment).reduce(\r\n (acc, curr) => acc + curr,\r\n 0,\r\n ),\r\n },\r\n ];\r\n } else {\r\n newValue =\r\n this.#value?.map((v) => {\r\n if (v.id === row.id) {\r\n return {\r\n ...v,\r\n adj_microFlow_scoreSheetTotalPoints: Object.values(\r\n assignment,\r\n ).reduce((acc, curr) => acc + curr, 0),\r\n adj_microFlow_assignedScore: assignment,\r\n };\r\n }\r\n return v;\r\n }) || [];\r\n }\r\n\r\n return of(newValue);\r\n }),\r\n tap((newValue) => {\r\n if (!newValue) return;\r\n this.supplierSelection.emit(newValue);\r\n }),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe();\r\n }\r\n\r\n protected appointASupplier(row: ISubmission): void {\r\n if (this.inputConfig()?.readonly || this.inputConfig()?.disabled) {\r\n return;\r\n }\r\n if (row['adj_microFlow_supplierAppointed']) {\r\n row['adj_microFlow_supplierAppointed'] = false;\r\n } else {\r\n row['adj_microFlow_supplierAppointed'] = true;\r\n }\r\n const alreadyInValue = this.#value?.find((v) => v.id === row.id);\r\n let newValue: SupplierRow[] | undefined;\r\n if (!alreadyInValue) {\r\n const otherRows = this.#value?.map((v) => ({\r\n ...v,\r\n adj_microFlow_supplierAppointed: false,\r\n }));\r\n newValue = [...(otherRows || []), row];\r\n } else {\r\n newValue =\r\n this.#value?.map((v) => {\r\n if (v.id === row.id) {\r\n return {\r\n ...v,\r\n adj_microFlow_supplierAppointed: row['adj_microFlow_supplierAppointed'],\r\n };\r\n }\r\n return {\r\n ...v,\r\n adj_microFlow_supplierAppointed: false,\r\n };\r\n }) || [];\r\n }\r\n if (newValue) {\r\n this.supplierSelection.emit(newValue);\r\n }\r\n }\r\n}\r\n","@if (vm$ | async; as vm) {\r\n @if (vm.loading) {\r\n <div style=\"display: flex; justify-content: center; align-items: center; padding:24px;width: 100%;\">\r\n <mat-spinner></mat-spinner>\r\n </div>\r\n } @else if (vm.error) {\r\n <div class=\"info-card error-card\">\r\n <h5 class=\"info-title\">❌ Failed to load data</h5>\r\n <p>{{ vm.error }}</p>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\">\r\n Try Again\r\n </button>\r\n </div>\r\n } @else {\r\n\r\n @if (vm.submissions.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">ℹ️ There are no submissions to display.</h5>\r\n <ul>\r\n <li>This can happen if <strong>no one has responded</strong> yet, or if <strong>none of the submission were\r\n compliant </strong>.</li>\r\n <li>If you are expecting to see submissions, try clicking the <strong>Refresh</strong> button.</li>\r\n </ul>\r\n <button mat-raised-button color=\"primary\" (click)=\"loadMicroSubmissions()\" class=\"load-button\">\r\n Refresh\r\n </button>\r\n </div>\r\n } @else {\r\n\r\n @if (!value || value.length === 0) {\r\n <div class=\"info-card\">\r\n <h5 class=\"info-title\">📝 How to Appoint</h5>\r\n <ol>\r\n <li>\r\n <strong>View Response:</strong> Click the <strong>Preview</strong> (<mat-icon\r\n class=\"smallIcon\">preview</mat-icon>) icon to see the full submission.\r\n </li>\r\n <li>\r\n <strong>Appoint:</strong> Click the <strong>Appoint</strong> button to appoint the supplier.\r\n </li>\r\n\r\n </ol>\r\n </div>\r\n }\r\n <table mat-table [dataSource]=\"vm.submissions\">\r\n @for (col of vm.displayColumns; track col.formControlName) {\r\n <ng-container [matColumnDef]=\"col.formControlName\">\r\n <th mat-header-cell *matHeaderCellDef style=\"padding:4px\">\r\n {{ col.label }}\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\" mat-ripple class=\"table-cell\" (click)=\"$event.stopPropagation()\"\r\n [class.price-preference-cell]=\"true\" [style.border-bottom-color]=\"row.colColors[col.formControlName]\"\r\n [style.background]=\"row.backgroundShades?.[col.formControlName]\">\r\n @if (col.formControlName === 'actions') {\r\n <span style=\"display: flex; align-items: center;\">\r\n <button matTooltipPosition=\"before\"\r\n [matTooltip]=\"`View and review **` + row[vm.columnMapping.respondentNameKey]+ `** 's' Submission`\"\r\n (click)=\"viewMicroSubmission(row)\" mat-icon-button>\r\n <mat-icon>preview</mat-icon>\r\n </button>\r\n </span>\r\n } @else if (col.formControlName === 'adj_microFlow_supplierAppointed') {\r\n @if (row[col.formControlName] === true) {\r\n <button (click)=\"appointASupplier(row)\" mat-flat-button color=\"primary\">\r\n <mat-icon>\r\n check_circle\r\n </mat-icon>\r\n Appointed\r\n </button>\r\n } @else {\r\n <button (click)=\"appointASupplier(row)\" mat-stroked-button>\r\n Appoint\r\n </button>\r\n }\r\n } @else {\r\n @switch (col?.type) {\r\n @case ('daysAgo') {\r\n {{ row[col.formControlName] | daysAgo }}\r\n }\r\n @case ('number') {\r\n {{ (row[col.formControlName] | number:'0.0-0' ) || 'N/A' }}\r\n }\r\n @default {\r\n @if ($index === 0) {\r\n <span class=\"main-submission-text\">\r\n <mat-icon style=\"font-size: 1em;height:16px;width:16px\">domain</mat-icon>\r\n <strong>\r\n {{ row[col.formControlName] }}\r\n </strong>\r\n </span>\r\n <span class=\"secondary-text\">\r\n <mat-icon>fingerprint</mat-icon>\r\n {{ row[vm.columnMapping.respondentCodeKey] }}\r\n <mat-icon>more_time</mat-icon>\r\n {{ row[vm.columnMapping.responseDateKey ||''] | daysAgo }}\r\n </span>\r\n } @else {\r\n {{ row[col.formControlName] }}\r\n }\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n <tr mat-header-row *matHeaderRowDef=\"vm.displayCols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: vm.displayCols\"></tr>\r\n </table>\r\n }\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { TitleCasePipe } from '@angular/common';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport {\r\n AdjudicationSteps,\r\n FormBuilderFunctions,\r\n ITowerStepColumn,\r\n WorkflowAdjudicationMicroFlowReviewValue,\r\n WorkflowAdjudicationResponseElectedSupplierSelectionValue,\r\n WorkflowAdjudicationScoreSheetValue,\r\n} from 'ngx-t-forms-types';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { PointsCreationComponent } from '../points-creation/points-creation.component';\r\nimport { SubmissionReviewComponent } from '../submission-review/submission-review.component';\r\nimport { PointAssignmentComponent } from '../point-assignment/point-assignment.component';\r\nimport { SupplierSelectionComponent } from '../supplier-selection/supplier-selection.component';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-workflow-adjudication-reactive-input',\r\n nextId: 0,\r\n};\r\n\r\ntype WorkflowAdjudicationValue =\r\n | WorkflowAdjudicationScoreSheetValue[]\r\n | WorkflowAdjudicationMicroFlowReviewValue[]\r\n | WorkflowAdjudicationResponseElectedSupplierSelectionValue;\r\n\r\n@Component({\r\n selector: 'lib-workflow-adjudication-reactive-input',\r\n templateUrl: './workflow-adjudication-reactive-input.component.html',\r\n styleUrl: './workflow-adjudication-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n imports: [\r\n TitleCasePipe,\r\n PointsCreationComponent,\r\n SubmissionReviewComponent,\r\n SupplierSelectionComponent,\r\n PointAssignmentComponent,\r\n ],\r\n providers: [{ provide: MatFormFieldControl, useExisting: WorkflowAdjudicationReactiveInputComponent }],\r\n})\r\nexport class WorkflowAdjudicationReactiveInputComponent extends BaseCustomInput<WorkflowAdjudicationValue> {\r\n override get empty(): boolean {\r\n return this.value === null || this.value === undefined || Object.keys(this.value).length === 0;\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly editorMode = input<boolean>(false);\r\n readonly formBuilderFunctions = input<FormBuilderFunctions | undefined>(undefined);\r\n\r\n protected readonly adjudicationSteps = AdjudicationSteps;\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n protected setValue(value: WorkflowAdjudicationValue): void {\r\n this.value = value;\r\n this.onChange(value);\r\n this.onTouched();\r\n }\r\n}\r\n","@switch (inputConfig().adjudicationStep) {\r\n@case (adjudicationSteps.ScoreCreation) {\r\n<lib-points-creation [inputConfig]=\"inputConfig()\" [value]=\"value\" (pointsChange)=\"setValue($event)\">\r\n</lib-points-creation>\r\n}\r\n@case (adjudicationSteps.SubMissionReview) {\r\n<lib-submission-review [inputConfig]=\"inputConfig()\" [value]=\"value\"\r\n (reviewChange)=\"setValue($event)\"></lib-submission-review>\r\n}\r\n@case (adjudicationSteps.SupplierSelection) {\r\n<lib-supplier-selection [inputConfig]=\"inputConfig()\" [value]=\"value\"\r\n (supplierSelection)=\"setValue($event)\"></lib-supplier-selection>\r\n}\r\n@case (adjudicationSteps.PointAssignment) {\r\n<lib-point-assignment [inputConfig]=\"inputConfig()\" [value]=\"value\"\r\n (pointsChange)=\"setValue($event)\"></lib-point-assignment>\r\n}\r\n@default {\r\n<h6>\r\n {{ inputConfig().adjudicationStep | titlecase }} is not implemented yet.\r\n</h6>\r\n}\r\n}\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { FormBuilderFunctions, ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { WorkflowAdjudicationReactiveInputComponent } from './elements/workflow-adjudication-reactive-input/workflow-adjudication-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a workflow-adjudication reactive control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-workflow-adjudication',\r\n templateUrl: './workflow-adjudication.component.html',\r\n styleUrl: './workflow-adjudication.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n WorkflowAdjudicationReactiveInputComponent,\r\n ],\r\n})\r\nexport class WorkflowAdjudicationComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly editorMode = input<boolean>(false);\r\n readonly formBuilderFunctions = input<FormBuilderFunctions | undefined>(undefined);\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field\r\n [appearance]=\"inputConfig.appearance || 'fill'\"\r\n [floatLabel]=\"'always'\"\r\n subscriptSizing=\"dynamic\"\r\n >\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-workflow-adjudication-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [formControlName]=\"inputConfig.id\"\r\n [required]=\"inputConfig.required\"\r\n [formGroup]=\"formGroup()\"\r\n [editorMode]=\"editorMode()\"\r\n [formBuilderFunctions]=\"formBuilderFunctions()\"\r\n ></lib-workflow-adjudication-reactive-input>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["uuidv4","i3","i4","i6","i7","i8","i9","i10","i11","i2","i5","i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA2Ca,uBAAuB,CAAA;AACzB,IAAA,OAAO;AACP,IAAA,WAAW;AAiBpB,IAAA,OAAO;AAoBP,IAAA,WAAA,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