ngx-t-forms 3.0.0 → 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 (247) hide show
  1. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs → ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs} +2 -2
  2. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.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-ChCeve-w.mjs → ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs} +3 -3
  4. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.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-B54kOArR.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-CAZv0_uR.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-NM2cFs3P.mjs → ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs} +2 -2
  14. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.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-DlsLiHi1.mjs → ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs} +25 -11
  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-Km-qgANx.mjs → ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs} +2 -2
  26. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.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-r64GKVhI.mjs → ngx-t-forms-form-json-view.component-DzJKFl4c.mjs} +2 -2
  30. package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.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-B3DRJ--U.mjs → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs} +4 -4
  34. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs.map → ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs} +5 -5
  36. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs.map → ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs → ngx-t-forms-geo-location.component-Bj_qIEqi.mjs} +2 -2
  38. package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.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-BgnzErQt.mjs → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs} +2 -2
  42. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs.map → ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs.map} +1 -1
  43. package/fesm2022/{ngx-t-forms-index-6YIhS6cm.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-Dcoze7U3.mjs → ngx-t-forms-input-custom.component-DiciFhSS.mjs} +2 -2
  46. package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.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-BsfvYiEU.mjs → ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs} +2 -2
  50. package/fesm2022/{ngx-t-forms-map-mat-options-keys-BsfvYiEU.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-CYtTBtyf.mjs → ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs} +5 -5
  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-CEa8ZNKA.mjs → ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs} +2 -2
  58. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CEa8ZNKA.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-DklkxNgg.mjs → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs} +2 -2
  60. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs.map} +1 -1
  61. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs +447 -0
  62. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs.map +1 -0
  63. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs +905 -0
  64. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map +1 -0
  65. package/fesm2022/{ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs → ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs} +1391 -158
  66. package/fesm2022/ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map +1 -0
  67. package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs} +2 -2
  68. package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs.map → ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs.map} +1 -1
  69. package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs +79 -0
  70. package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs.map +1 -0
  71. package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs +748 -0
  72. package/fesm2022/ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs.map +1 -0
  73. package/fesm2022/{ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs → ngx-t-forms-record-list-manager.component-CtCOIpai.mjs} +4 -4
  74. package/fesm2022/ngx-t-forms-record-list-manager.component-CtCOIpai.mjs.map +1 -0
  75. package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs +272 -0
  76. package/fesm2022/ngx-t-forms-required-inputs.component-D9wIdOhg.mjs.map +1 -0
  77. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs → ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs} +38 -7
  78. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs.map +1 -0
  79. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs +38 -0
  80. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs.map +1 -0
  81. package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs} +2 -2
  82. package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs.map → ngx-t-forms-section-report.component-U9uQ_Ow9.mjs.map} +1 -1
  83. package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs} +2 -2
  84. package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs.map → ngx-t-forms-select-input-element.component-CxYTmuvV.mjs.map} +1 -1
  85. package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs +169 -0
  86. package/fesm2022/ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs.map +1 -0
  87. package/fesm2022/{ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs → ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs} +3 -3
  88. package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
  89. package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs} +2 -2
  90. package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs.map → ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map} +1 -1
  91. package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs} +2 -2
  92. package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs.map → ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map} +1 -1
  93. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +173 -0
  94. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +1 -0
  95. package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs +574 -0
  96. package/fesm2022/ngx-t-forms-validators-config.component-EM7RSWIz.mjs.map +1 -0
  97. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs → ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs} +3 -3
  98. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs.map → ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs.map} +1 -1
  99. package/fesm2022/ngx-t-forms.mjs +1 -1
  100. package/package.json +2 -2
  101. package/styles/_editor-mixins.scss +117 -117
  102. package/styles/_signature-pad.scss +26 -26
  103. package/styles/_tokens.scss +148 -148
  104. package/types/ngx-t-forms.d.ts +7 -2
  105. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs +0 -261
  106. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs.map +0 -1
  107. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs +0 -225
  108. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs.map +0 -1
  109. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs +0 -1011
  110. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs.map +0 -1
  111. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs +0 -643
  112. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs.map +0 -1
  113. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs +0 -136
  114. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs.map +0 -1
  115. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs.map +0 -1
  116. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs.map +0 -1
  117. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs +0 -253
  118. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs.map +0 -1
  119. package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs +0 -261
  120. package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs.map +0 -1
  121. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs +0 -419
  122. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs.map +0 -1
  123. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs +0 -231
  124. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs.map +0 -1
  125. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs +0 -156
  126. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs.map +0 -1
  127. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs +0 -333
  128. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs.map +0 -1
  129. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs +0 -373
  130. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs.map +0 -1
  131. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs +0 -543
  132. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs.map +0 -1
  133. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs +0 -1259
  134. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs.map +0 -1
  135. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs +0 -1996
  136. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs.map +0 -1
  137. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs +0 -581
  138. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs.map +0 -1
  139. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs +0 -417
  140. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs.map +0 -1
  141. package/fesm2022/ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs.map +0 -1
  142. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs +0 -585
  143. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs.map +0 -1
  144. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs +0 -447
  145. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs.map +0 -1
  146. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs +0 -163
  147. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs.map +0 -1
  148. package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs +0 -86
  149. package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs.map +0 -1
  150. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs +0 -28
  151. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs.map +0 -1
  152. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs +0 -291
  153. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs.map +0 -1
  154. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs +0 -179
  155. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map +0 -1
  156. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs +0 -936
  157. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs.map +0 -1
  158. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs +0 -816
  159. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs.map +0 -1
  160. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs +0 -329
  161. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs.map +0 -1
  162. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs +0 -360
  163. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs.map +0 -1
  164. package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs.map +0 -1
  165. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs +0 -2
  166. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs.map +0 -1
  167. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs +0 -128
  168. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs.map +0 -1
  169. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs +0 -512
  170. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs.map +0 -1
  171. package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs +0 -190
  172. package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs.map +0 -1
  173. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs +0 -132
  174. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs.map +0 -1
  175. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs +0 -268
  176. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs.map +0 -1
  177. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs.map +0 -1
  178. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs +0 -241
  179. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs.map +0 -1
  180. package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +0 -1
  181. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +0 -1
  182. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs +0 -180
  183. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map +0 -1
  184. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs +0 -114
  185. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs.map +0 -1
  186. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs +0 -69
  187. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs.map +0 -1
  188. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs +0 -200
  189. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs.map +0 -1
  190. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs +0 -447
  191. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs.map +0 -1
  192. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs +0 -850
  193. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs.map +0 -1
  194. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs +0 -107
  195. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs.map +0 -1
  196. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs +0 -1665
  197. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs.map +0 -1
  198. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs +0 -905
  199. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs.map +0 -1
  200. package/fesm2022/ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs.map +0 -1
  201. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs +0 -28237
  202. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs.map +0 -1
  203. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs +0 -1024
  204. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs.map +0 -1
  205. package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs +0 -203
  206. package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs.map +0 -1
  207. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs +0 -234
  208. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs.map +0 -1
  209. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs +0 -1126
  210. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs.map +0 -1
  211. package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs +0 -748
  212. package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs.map +0 -1
  213. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs +0 -639
  214. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs.map +0 -1
  215. package/fesm2022/ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs.map +0 -1
  216. package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs +0 -272
  217. package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs.map +0 -1
  218. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs +0 -451
  219. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs.map +0 -1
  220. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs +0 -625
  221. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs.map +0 -1
  222. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs.map +0 -1
  223. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +0 -38
  224. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +0 -1
  225. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs +0 -72
  226. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs.map +0 -1
  227. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs +0 -248
  228. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs.map +0 -1
  229. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs +0 -408
  230. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs.map +0 -1
  231. package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs +0 -169
  232. package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs.map +0 -1
  233. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs +0 -275
  234. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs.map +0 -1
  235. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs +0 -366
  236. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs.map +0 -1
  237. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs.map +0 -1
  238. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs +0 -233
  239. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs.map +0 -1
  240. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs +0 -305
  241. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs.map +0 -1
  242. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs +0 -1105
  243. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs.map +0 -1
  244. package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs +0 -574
  245. package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs.map +0 -1
  246. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs +0 -2923
  247. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs.map +0 -1
@@ -0,0 +1,905 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, computed, ViewEncapsulation, ChangeDetectionStrategy, Component, inject, DestroyRef, ElementRef } from '@angular/core';
3
+ import * as i1$2 from '@angular/forms';
4
+ import { NgControl, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i2$2 from '@angular/material/form-field';
6
+ import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
7
+ import * as i3 from '@angular/material/icon';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import * as i2 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+ import * as i5$1 from '@angular/material/tooltip';
12
+ import { MatTooltipModule } from '@angular/material/tooltip';
13
+ import { b as TDynamicDataViewComponent, y as TFormInputComponent, C as calculateListOveralFunctions, B as BaseCustomInput, _ as _isEqual, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs';
14
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
15
+ import * as i5 from '@angular/material/table';
16
+ import { MatTableDataSource, MatTableModule } from '@angular/material/table';
17
+ import { DocumentLitsLabelConfigInterfaceValueType, InputDataTypes, MultipleInputAvailableOperations, CalculationFunctions } from 'ngx-t-forms-types';
18
+ import * as i4 from '@angular/material/chips';
19
+ import { MatChipsModule } from '@angular/material/chips';
20
+ import * as i6 from '@angular/material/menu';
21
+ import { MatMenuModule } from '@angular/material/menu';
22
+ import * as i1 from '@angular/material/progress-bar';
23
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
24
+ import * as i4$1 from '@angular/material/progress-spinner';
25
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
26
+ import * as i2$1 from '@angular/material/sort';
27
+ import { MatSortModule } from '@angular/material/sort';
28
+ import * as i3$1 from '@angular/common';
29
+ import { CommonModule } from '@angular/common';
30
+ import * as i3$2 from '@angular/material/card';
31
+ import { MatCardModule } from '@angular/material/card';
32
+ import { MatDividerModule } from '@angular/material/divider';
33
+ import * as i1$1 from '@angular/cdk/drag-drop';
34
+ import { DragDropModule } from '@angular/cdk/drag-drop';
35
+ import { Subject, timer, tap, takeUntil } from 'rxjs';
36
+ import { v4 } from 'uuid';
37
+ import * as i6$1 from '@angular/material/list';
38
+
39
+ class ColorScale {
40
+ constructor(min, max, colorStops, alpha = 1) {
41
+ validateMinMaxValues(min, max);
42
+ validateColorStops(colorStops);
43
+ validateAlphaValue(alpha);
44
+ this.min = min;
45
+ this.max = max;
46
+ this.alpha = alpha;
47
+ this.colorStops = colorStops.map((colorStop) => hexToColor(colorStop, alpha));
48
+ }
49
+ getColor(value) {
50
+ const numOfColorStops = this.colorStops.length;
51
+ if (value < this.min)
52
+ return this.colorStops[0];
53
+ if (value > this.max)
54
+ return this.colorStops[numOfColorStops - 1];
55
+ const range = this.max - this.min;
56
+ let weight = (value - this.min) / range;
57
+ const colorStopIndex = Math.max(Math.ceil(weight * (numOfColorStops - 1)), 1);
58
+ const minColor = this.colorStops[colorStopIndex - 1];
59
+ const maxColor = this.colorStops[colorStopIndex];
60
+ if (maxColor === undefined)
61
+ return minColor;
62
+ if (minColor === undefined)
63
+ return maxColor;
64
+ weight = weight * (numOfColorStops - 1) - (colorStopIndex - 1);
65
+ const r = Math.floor(weight * maxColor.r + (1 - weight) * minColor.r);
66
+ const g = Math.floor(weight * maxColor.g + (1 - weight) * minColor.g);
67
+ const b = Math.floor(weight * maxColor.b + (1 - weight) * minColor.b);
68
+ return new Color(r, g, b, this.alpha);
69
+ }
70
+ }
71
+ function validateMinMaxValues(min, max) {
72
+ if (min > max) {
73
+ throw new Error('The minimum value must be less than the maximum value.');
74
+ }
75
+ }
76
+ function validateColorStops(colorStops) {
77
+ if (colorStops.length < 2) {
78
+ throw new Error('At least two colors must be provided.');
79
+ }
80
+ colorStops.forEach((str) => {
81
+ if (!isValidHexColor(str)) {
82
+ throw new Error(`${str} is not a valid hex color.`);
83
+ }
84
+ });
85
+ }
86
+ function validateAlphaValue(alpha) {
87
+ if (alpha < 0 || alpha > 1) {
88
+ throw new Error('The alpha value must be between 0 and 1.');
89
+ }
90
+ }
91
+ function hexToColor(hex, alpha) {
92
+ if (isValid3DigitHexColor(hex)) {
93
+ hex = convertTo6DigitHexColor(hex);
94
+ }
95
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
96
+ if (!!result?.[1] && !!result?.[2] && !!result?.[3]) {
97
+ return new Color(parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16), alpha);
98
+ }
99
+ else {
100
+ throw new Error(`${hex} is not a valid hex color.`);
101
+ }
102
+ }
103
+ function isValidHexColor(colorString) {
104
+ return (isValid3DigitHexColor(colorString) || isValid6DigitHexColor(colorString));
105
+ }
106
+ function isValid3DigitHexColor(colorString) {
107
+ const hexColorRegex = /^#(?:[0-9a-fA-F]{3})$/;
108
+ return colorString.match(hexColorRegex);
109
+ }
110
+ function isValid6DigitHexColor(colorString) {
111
+ const hexColorRegex = /^#(?:[0-9a-fA-F]{6})$/;
112
+ return colorString.match(hexColorRegex);
113
+ }
114
+ function convertTo6DigitHexColor(threeDigitHex) {
115
+ return threeDigitHex
116
+ .substring(1)
117
+ .split('')
118
+ .map((char) => {
119
+ return char + char;
120
+ })
121
+ .join('');
122
+ }
123
+ function componentToHex(c) {
124
+ const hex = c.toString(16);
125
+ return hex.length === 1 ? '0' + hex : hex;
126
+ }
127
+ function rgbaToHex(color) {
128
+ const r = Math.floor(color.r * color.a);
129
+ const g = Math.floor(color.g * color.a);
130
+ const b = Math.floor(color.b * color.a);
131
+ return `#${componentToHex(r)}${componentToHex(g)}${componentToHex(b)}`;
132
+ }
133
+ class Color {
134
+ constructor(r, g, b, a = 1) {
135
+ validateAlphaValue(a);
136
+ this.r = r;
137
+ this.g = g;
138
+ this.b = b;
139
+ this.a = a;
140
+ }
141
+ toRGBString() {
142
+ return `rgb(${Math.floor(this.r * this.a)},${Math.floor(this.g * this.a)},${Math.floor(this.b * this.a)})`;
143
+ }
144
+ toRGBAString() {
145
+ return `rgba(${this.r},${this.g},${this.b},${this.a})`;
146
+ }
147
+ toHexString() {
148
+ return rgbaToHex(this);
149
+ }
150
+ }
151
+
152
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
153
+ function configureCols(inputConfig, tempLabels) {
154
+ try {
155
+ const labelInputs = (inputConfig?.formInputs || []).filter(input => input.showAsLabel || tempLabels.includes(input.formControlName));
156
+ const cols = [];
157
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
158
+ const colConfigs = {};
159
+ for (let index = 0; index < (labelInputs).length; index++) {
160
+ const c = labelInputs[index];
161
+ const col = { ...c };
162
+ cols.push(`${inputConfig.id}.${col.id}`);
163
+ if (!col.id) {
164
+ continue;
165
+ }
166
+ colConfigs[`${inputConfig.id}.${col.id}`] = {
167
+ property: `${inputConfig.id}.${col.id}`,
168
+ formControlName: col.formControlName,
169
+ label: col.label,
170
+ dataType: getDataType(col)
171
+ };
172
+ }
173
+ //add remove section config
174
+ cols.push('itemRemovalButton');
175
+ colConfigs['itemRemovalButton'] = {
176
+ property: 'itemRemovalButton',
177
+ label: '',
178
+ type: 'removal',
179
+ };
180
+ // end
181
+ return {
182
+ displayedColumnsInOrder: cols.filter((c) => !!c),
183
+ columnsConfig: colConfigs
184
+ };
185
+ }
186
+ catch (error) {
187
+ const message = error instanceof Error ? error.message : 'Failed to configure columns';
188
+ throw new Error(message);
189
+ }
190
+ }
191
+ function getDataType(input) {
192
+ try {
193
+ if (input.pipe?.pipeType) {
194
+ return input.pipe.pipeType;
195
+ }
196
+ const inputDataType = input.dataType;
197
+ switch (inputDataType) {
198
+ case InputDataTypes.Number:
199
+ return DocumentLitsLabelConfigInterfaceValueType.number;
200
+ case InputDataTypes.Date:
201
+ return DocumentLitsLabelConfigInterfaceValueType.date;
202
+ case InputDataTypes.Array:
203
+ return InputDataTypes.Array;
204
+ case InputDataTypes.Boolean:
205
+ return InputDataTypes.Boolean;
206
+ case InputDataTypes.Object:
207
+ return InputDataTypes.Object;
208
+ default:
209
+ return DocumentLitsLabelConfigInterfaceValueType.string;
210
+ }
211
+ }
212
+ catch (error) {
213
+ const msg = error instanceof Error ? error.message : 'Failed to get data type';
214
+ throw new Error(msg);
215
+ }
216
+ }
217
+
218
+ class MultipleInputTableViewComponent {
219
+ constructor() {
220
+ this.inputConfig = input(undefined, ...(ngDevMode ? [{ debugName: "inputConfig" }] : /* istanbul ignore next */ []));
221
+ this.dataSource = input(new MatTableDataSource(), ...(ngDevMode ? [{ debugName: "dataSource" }] : /* istanbul ignore next */ []));
222
+ this.applyOptionsTo = input(undefined, ...(ngDevMode ? [{ debugName: "applyOptionsTo" }] : /* istanbul ignore next */ []));
223
+ this.formGroup = input(null, ...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
224
+ this.onEditItem = output();
225
+ this.onDeleteItem = output();
226
+ this.onCopy = output();
227
+ this.onApplyOptionsTo = output();
228
+ this.showItemAsLabel = output();
229
+ this.colConfig = computed(() => {
230
+ const cfg = this.inputConfig();
231
+ if (!cfg) {
232
+ return {
233
+ columnsConfig: {},
234
+ displayedColumnsInOrder: [],
235
+ };
236
+ }
237
+ return configureCols(cfg, this.tempLabels);
238
+ }, ...(ngDevMode ? [{ debugName: "colConfig" }] : /* istanbul ignore next */ []));
239
+ this.displayedColumnsInOrderSig = computed(() => this.colConfig().displayedColumnsInOrder, ...(ngDevMode ? [{ debugName: "displayedColumnsInOrderSig" }] : /* istanbul ignore next */ []));
240
+ this.allPossibleLabels = computed(() => {
241
+ const cfg = this.inputConfig();
242
+ const displayed = this.displayedColumnsInOrderSig();
243
+ return (cfg?.formInputs?.map((inp) => ({
244
+ label: inp.label,
245
+ selected: displayed.includes(`${cfg?.id}.${inp.id}`),
246
+ formControlName: inp.formControlName,
247
+ })) || []);
248
+ }, ...(ngDevMode ? [{ debugName: "allPossibleLabels" }] : /* istanbul ignore next */ []));
249
+ this.userCanEdit = computed(() => {
250
+ const cfg = this.inputConfig();
251
+ if (!cfg)
252
+ return false;
253
+ if (!cfg.multipleInputAvailableOperations)
254
+ return true;
255
+ return cfg.multipleInputAvailableOperations.includes(MultipleInputAvailableOperations.Update);
256
+ }, ...(ngDevMode ? [{ debugName: "userCanEdit" }] : /* istanbul ignore next */ []));
257
+ this.userCanRemove = computed(() => {
258
+ const cfg = this.inputConfig();
259
+ if (!cfg)
260
+ return false;
261
+ if (!cfg.multipleInputAvailableOperations)
262
+ return true;
263
+ return cfg.multipleInputAvailableOperations.includes(MultipleInputAvailableOperations.Remove);
264
+ }, ...(ngDevMode ? [{ debugName: "userCanRemove" }] : /* istanbul ignore next */ []));
265
+ this.userCanAdd = computed(() => {
266
+ const cfg = this.inputConfig();
267
+ if (!cfg)
268
+ return false;
269
+ if (!cfg.multipleInputAvailableOperations)
270
+ return true;
271
+ return cfg.multipleInputAvailableOperations.includes(MultipleInputAvailableOperations.Add);
272
+ }, ...(ngDevMode ? [{ debugName: "userCanAdd" }] : /* istanbul ignore next */ []));
273
+ this.userCanApplyOptionsTo = computed(() => {
274
+ return this.userCanEdit() || this.userCanRemove() || this.userCanAdd();
275
+ }, ...(ngDevMode ? [{ debugName: "userCanApplyOptionsTo" }] : /* istanbul ignore next */ []));
276
+ this.areYouSureYouWantToDeleteRow = {};
277
+ this.countDownDate = new Date();
278
+ this.deletionTimers = {};
279
+ this.tempLabels = [];
280
+ this.SYSTEM_KEY_IN_EDIT = null;
281
+ this.overlayOpen = false;
282
+ this.overlayData = null;
283
+ this.overlayPosition = { top: 0, left: 0 };
284
+ this.fullView = false;
285
+ }
286
+ applyOptionsToFn(item) {
287
+ this.onApplyOptionsTo.emit(item);
288
+ }
289
+ editItem(row) {
290
+ const rowId = row[`${this.inputConfig()?.id}.id`];
291
+ this.onEditItem.emit(rowId);
292
+ }
293
+ copy(row) {
294
+ const rowId = row[`${this.inputConfig()?.id}.id`];
295
+ this.onCopy.emit(rowId);
296
+ }
297
+ isAboutToDeleteRow(row) {
298
+ return !!this.areYouSureYouWantToDeleteRow[row[`${this.inputConfig()?.id}.id`]];
299
+ }
300
+ getCountdownSeconds() {
301
+ const now = new Date();
302
+ const timeElapsed = (now.getTime() - this.countDownDate.getTime()) / 1000;
303
+ const percentage = Math.min(Math.round((timeElapsed / 3) * 100), 100);
304
+ return percentage;
305
+ }
306
+ secondsCountDown() {
307
+ return (3 - ((this.getCountdownSeconds() / 100) * 3)).toFixed(1);
308
+ }
309
+ multipleInputRemoveItem(event, row) {
310
+ const rowId = row[`${this.inputConfig()?.id}.id`];
311
+ if (this.areYouSureYouWantToDeleteRow[rowId]) {
312
+ if (this.deletionTimers[rowId]) {
313
+ clearTimeout(this.deletionTimers[rowId]);
314
+ delete this.deletionTimers[rowId];
315
+ }
316
+ delete this.areYouSureYouWantToDeleteRow[rowId];
317
+ }
318
+ else {
319
+ this.areYouSureYouWantToDeleteRow[rowId] = true;
320
+ this.countDownDate = new Date();
321
+ this.deletionTimers[rowId] = setTimeout(() => {
322
+ if (this.areYouSureYouWantToDeleteRow[rowId]) {
323
+ this.onDeleteItem.emit(row);
324
+ delete this.areYouSureYouWantToDeleteRow[rowId];
325
+ delete this.deletionTimers[rowId];
326
+ }
327
+ }, 3000);
328
+ }
329
+ event.preventDefault();
330
+ event.stopPropagation();
331
+ }
332
+ returnBackground(row, columnsConfig) {
333
+ let background = '';
334
+ const ds = this.dataSource();
335
+ if (ds
336
+ ? ds.data.length > 1
337
+ ? columnsConfig?.['colorScale']
338
+ : false
339
+ : false) {
340
+ const inputCfg = this.inputConfig();
341
+ const colKey = columnsConfig?.['key'] ?? '';
342
+ const point = Number(row[colKey]);
343
+ const inputIsGrouped = inputCfg.groupBy;
344
+ const groupKey = inputCfg.groupBy?.[0] || '';
345
+ const dataSet = inputIsGrouped
346
+ ? ds?.data.filter((s) => s[groupKey] === row[groupKey])
347
+ : new Array(ds?.data || []);
348
+ const arrayValues = dataSet?.map((vr) => Number(vr[colKey])) || [];
349
+ const max = Math.max(...arrayValues);
350
+ const min = Math.min(...arrayValues);
351
+ const hasNun = isNaN(max) || isNaN(min);
352
+ if (!hasNun && Number(max) !== Number(min)) {
353
+ const colorScale = new ColorScale(min, max, ['#2fdf75', '#FFA500', '#ff4961'], 0.8);
354
+ const color = colorScale.getColor(point)?.toRGBAString();
355
+ background = color ?? '';
356
+ }
357
+ }
358
+ return background;
359
+ }
360
+ hasTopBorder(row) {
361
+ const inputCfg = this.inputConfig();
362
+ const inputIsGrouped = inputCfg?.groupBy;
363
+ const ds = this.dataSource();
364
+ if (inputIsGrouped && ds) {
365
+ const indexOfRow = ds.data.indexOf(row);
366
+ const rowIsFirstInTable = indexOfRow === 0;
367
+ if (!inputCfg.groupBy) {
368
+ return false;
369
+ }
370
+ const groupKey = inputCfg.groupBy?.[0] ?? '';
371
+ const isFirstInGroup = rowIsFirstInTable
372
+ ? true
373
+ : ds.data[indexOfRow - 1][groupKey] !==
374
+ row[groupKey];
375
+ return isFirstInGroup;
376
+ }
377
+ else {
378
+ return false;
379
+ }
380
+ }
381
+ getCalculationFunction(row) {
382
+ const func = row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'];
383
+ switch (func) {
384
+ case CalculationFunctions.Sum:
385
+ return 'TOTAL';
386
+ case CalculationFunctions.Avg:
387
+ return 'AVERAGE';
388
+ case CalculationFunctions.Max:
389
+ return 'MAX';
390
+ case CalculationFunctions.Min:
391
+ return 'MIN';
392
+ default:
393
+ return func;
394
+ }
395
+ }
396
+ toggleTepLabel(event, label) {
397
+ if (this.tempLabels.includes(label)) {
398
+ this.tempLabels = this.tempLabels.filter((l) => l !== label);
399
+ }
400
+ else {
401
+ this.tempLabels.push(label);
402
+ }
403
+ event.stopPropagation();
404
+ event.preventDefault();
405
+ }
406
+ get getColConfig() {
407
+ return this.colConfig();
408
+ }
409
+ get displayedColumnsInOrder() {
410
+ return this.displayedColumnsInOrderSig();
411
+ }
412
+ rowIsInEdit(row) {
413
+ const cfg = this.inputConfig();
414
+ const fg = this.formGroup();
415
+ return (!!cfg?.formIsOpen &&
416
+ fg?.controls[`${cfg?.id}.id`]?.value === row[`${cfg?.id}.id`]);
417
+ }
418
+ openDataOverlay(event, data) {
419
+ event.stopPropagation();
420
+ const rect = event.currentTarget.getBoundingClientRect();
421
+ this.overlayData = data;
422
+ this.overlayPosition = { top: rect.bottom + 4, left: rect.left };
423
+ this.overlayOpen = true;
424
+ }
425
+ closeDataOverlay() {
426
+ this.overlayOpen = false;
427
+ this.overlayData = null;
428
+ }
429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputTableViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
430
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MultipleInputTableViewComponent, isStandalone: true, selector: "lib-multiple-input-table-view", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: false, transformFunction: null }, dataSource: { classPropertyName: "dataSource", publicName: "dataSource", isSignal: true, isRequired: false, transformFunction: null }, applyOptionsTo: { classPropertyName: "applyOptionsTo", publicName: "applyOptionsTo", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onEditItem: "onEditItem", onDeleteItem: "onDeleteItem", onCopy: "onCopy", onApplyOptionsTo: "onApplyOptionsTo", showItemAsLabel: "showItemAsLabel" }, ngImport: i0, template: "@defer (on viewport) {\r\n\r\n @if (getColConfig.displayedColumnsInOrder.length === 0) {\r\n <div class=\"mit-state mit-state--inline\">No columns</div>\r\n }\r\n\r\n <div class=\"table-container\">\r\n\r\n <table mat-table [dataSource]=\"(dataSource() || [])\" class=\"mit-table\" matSort matSortActive=\"created\"\r\n matSortDisableClear matSortDirection=\"desc\">\r\n @for (col of (displayedColumnsInOrder || []); track col) {\r\n <ng-container [matColumnDef]=\"col\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <span class=\"mit-th-label\">\r\n {{ getColConfig.columnsConfig?.[col]?.[\"label\"] }}\r\n </span>\r\n @if ($last) {\r\n <button matTooltip=\"Show other values\" [matMenuTriggerFor]=\"colOptions\" [matMenuTriggerData]=\"{}\"\r\n class=\"mit-th-action\" mat-icon-button>\r\n <mat-icon>label</mat-icon>\r\n </button>\r\n }\r\n </th>\r\n <td [class.functionClass]=\"row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION']\"\r\n [style.background]=\"returnBackground(row, getColConfig.columnsConfig?.[col])\"\r\n mat-cell *matCellDef=\"let row\">\r\n @if (getColConfig.columnsConfig?.[col]?.['type'] === 'removal') {\r\n <div class=\"cellClass\">\r\n\r\n @if (!!row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'] && !row['id'] && !inputConfig()?.multipleInputInEditId ||\r\n !!row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'] && inputConfig()?.multipleInputInEditId &&\r\n inputConfig()?.multipleInputInEditId !== row['id']) {\r\n <div class=\"mit-fn-label\">\r\n <strong>{{ getCalculationFunction(row) }}</strong>\r\n </div>\r\n }\r\n @if (\r\n userCanApplyOptionsTo() &&\r\n !row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'] &&\r\n row[''] !== 'true' && !inputConfig()?.readonly && !inputConfig()?.disabled\r\n ) {\r\n <button mat-icon-button [color]=\"t.menuOpen ? 'primary' : 'basic'\" [matMenuTriggerFor]=\"rowOptions\" [matMenuTriggerData]=\"{row:row}\" #t=\"matMenuTrigger\"\r\n (click)=\"applyOptionsToFn(row)\"\r\n class=\"mit-row-trigger\">\r\n @if (rowIsInEdit(row)) {\r\n <mat-icon color=\"primary\">edit</mat-icon>\r\n } @else {\r\n <mat-icon>{{ t.menuOpen ? 'close' : 'more_horiz' }}</mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n @if (row['SYSTEM_KEY_IN_EDIT']) {\r\n <mat-chip>In {{ inputConfig()?.readonly ? 'View' : 'Edit' }}</mat-chip>\r\n }\r\n\r\n </div>\r\n }\r\n @if (getColConfig.columnsConfig && getColConfig.columnsConfig?.[col]?.type !== 'removal') {\r\n <div class=\"cellClass\">\r\n <span>\r\n @if (getColConfig.columnsConfig?.[col].dataType === 'array' || getColConfig.columnsConfig?.[col].dataType === 'object') {\r\n <button mat-icon-button class=\"mit-data-button\"\r\n matTooltip=\"View data\"\r\n (click)=\"openDataOverlay($event, row[col])\">\r\n <mat-icon class=\"mit-data-icon\">data_object</mat-icon>\r\n </button>\r\n } @else {\r\n {{ row[col] | formatData: getColConfig.columnsConfig?.[col].dataType }}\r\n }\r\n </span>\r\n </div>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"getColConfig.displayedColumnsInOrder\"></tr>\r\n <tr [class.mit-group-start]=\"hasTopBorder(row)\" mat-row\r\n *matRowDef=\"let row; columns: getColConfig.displayedColumnsInOrder\"></tr>\r\n </table>\r\n\r\n @if (!dataSource()?.data?.length) {\r\n <div class=\"mit-empty\">\r\n <mat-icon class=\"mit-empty-icon\">list</mat-icon>\r\n <strong class=\"mit-empty-title\">No items yet</strong>\r\n <p class=\"mit-empty-text\">\r\n <strong>Click the add button</strong> to create a new row. You'll fill in details using a form, and each\r\n saved entry appears as a row here.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n} @placeholder {\r\n <div class=\"mit-placeholder\">\r\n <mat-spinner diameter=\"32\" />\r\n </div>\r\n}\r\n\r\n@if (overlayOpen) {\r\n <div class=\"data-overlay-backdrop\" (click)=\"closeDataOverlay()\"></div>\r\n <div class=\"data-overlay-panel\"\r\n [style.top.px]=\"overlayPosition.top\"\r\n [style.left.px]=\"overlayPosition.left\"\r\n (click)=\"$event.stopPropagation()\">\r\n <div class=\"data-overlay-header\">\r\n <span class=\"data-overlay-title\">\r\n <mat-icon class=\"data-overlay-title-icon\">data_object</mat-icon>\r\n Data\r\n </span>\r\n <button mat-icon-button class=\"mit-data-button\" (click)=\"closeDataOverlay()\">\r\n <mat-icon class=\"mit-data-icon\">close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"data-overlay-body\">\r\n <lib-t-dynamic-data-view [data]=\"overlayData\" />\r\n </div>\r\n </div>\r\n}\r\n\r\n<mat-menu #colOptions=\"matMenu\">\r\n <ng-template matMenuContent>\r\n @for (label of allPossibleLabels(); track label.formControlName) {\r\n <button mat-menu-item (click)=\"toggleTepLabel($event, label.formControlName);\">\r\n <mat-icon>{{ label.selected ? 'check_circle' : 'radio_button_unchecked' }}</mat-icon>\r\n {{ label.label }}\r\n </button>\r\n }\r\n </ng-template>\r\n</mat-menu>\r\n\r\n<mat-menu #rowOptions=\"matMenu\">\r\n <ng-template matMenuContent let-row=\"row\">\r\n @if (!inputConfig()?.readonly && !inputConfig()?.disabled) {\r\n @if (userCanEdit()) {\r\n <button mat-menu-item (click)=\"editItem(row)\">\r\n <mat-icon>edit</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text\">Edit</div>\r\n <div class=\"option-sub-text\">\r\n {{ inputConfig()?.readonly ? 'View item properties' : 'Modify item properties' }}\r\n </div>\r\n </div>\r\n </button>\r\n }\r\n @if (userCanAdd()) {\r\n <button mat-menu-item (click)=\"copy(row)\">\r\n <mat-icon>content_copy</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text\">Duplicate</div>\r\n <div class=\"option-sub-text\">Create a copy with same values</div>\r\n </div>\r\n </button>\r\n }\r\n\r\n @if (userCanRemove()) {\r\n @if (isAboutToDeleteRow(row)) {\r\n <button mat-menu-item (click)=\"multipleInputRemoveItem($event,row)\">\r\n <mat-icon color=\"accent\">cancel</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text option-main-text--cancel\">Cancel Deletion</div>\r\n <div class=\"option-sub-text\">Auto-deleting in {{ secondsCountDown() }} seconds...</div>\r\n </div>\r\n </button>\r\n <div class=\"deletion-progress-container\">\r\n <mat-progress-bar color=\"warn\" mode=\"determinate\" [value]=\"getCountdownSeconds()\"></mat-progress-bar>\r\n @if (getCountdownSeconds() > 75) {\r\n <div class=\"deletion-message\">Deleting soon...</div>\r\n }\r\n </div>\r\n } @else {\r\n <button mat-menu-item (click)=\"multipleInputRemoveItem($event,row)\">\r\n <mat-icon color=\"warn\">delete_outline</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text\">Delete</div>\r\n <div class=\"option-sub-text\">Will delete after 3 seconds (click to cancel)</div>\r\n </div>\r\n </button>\r\n }\r\n }\r\n }\r\n </ng-template>\r\n</mat-menu>\r\n", styles: [".table-container{max-width:100%!important;overflow:auto!important;border-radius:8px}.mit-table{width:100%;background:transparent}.mit-table .mat-mdc-header-cell,.mit-table .mat-mdc-cell{padding:0 .625rem;font-size:.8125rem}.mit-table .mat-mdc-header-row{min-height:2.25rem}.mit-table .mat-mdc-row{min-height:2.5rem;transition:background .2s cubic-bezier(.16,1,.3,1)}.mit-table .mat-mdc-row:hover{background:color-mix(in srgb,var(--mat-sys-primary, #6750a4) 5%,transparent)}.mit-th-label{text-align:start;line-height:normal;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #49454f)}.mit-th-action{width:1.75rem;height:1.75rem;line-height:1.75rem;opacity:.55;transition:opacity .2s cubic-bezier(.16,1,.3,1)}.mit-th-action:hover{opacity:1}.cellClass{display:flex;align-items:center;min-height:2.5rem}.mit-group-start .mat-mdc-cell{border-top:2px solid var(--mat-sys-outline-variant, #cac4d0)}.functionClass{background:var(--mat-sys-surface-container, #f3edf7);font-weight:500}.mit-fn-label{width:100%;text-align:right;color:var(--mat-sys-on-surface-variant, #49454f);font-size:.6875rem;letter-spacing:.06em;text-transform:uppercase}.mit-row-trigger{margin-left:auto;margin-right:0;display:block}.mit-data-button{width:1.75rem;height:1.75rem;line-height:1.75rem}.mit-data-icon{font-size:1.125rem;width:1.125rem;height:1.125rem;line-height:1.125rem}.mit-state{display:flex;justify-content:center;padding:1rem;font-size:.8125rem;color:var(--mat-sys-on-surface-variant, #49454f);opacity:.7}.mit-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.375rem;padding:1.5rem 1.25rem;color:var(--mat-sys-on-surface-variant, #49454f)}.mit-empty-icon{font-size:1.75rem;width:1.75rem;height:1.75rem;line-height:1.75rem;opacity:.5}.mit-empty-title{font-size:.875rem;color:var(--mat-sys-on-surface, #1c1b1f)}.mit-empty-text{margin:0;max-width:22rem;font-size:.75rem;line-height:1.45;opacity:.85}.mit-placeholder{display:flex;justify-content:center;align-items:center;padding:2rem}.option-text{display:flex;flex-direction:column;margin-left:.5rem}.option-main-text{font-size:.875rem;font-weight:500;margin-bottom:2px;line-height:normal}.option-main-text--cancel{color:var(--mat-sys-primary, #6750a4)}.option-sub-text{font-size:.75rem;color:var(--mat-sys-on-surface-variant, #49454f);font-weight:400;line-height:1.2}.deletion-progress-container{position:relative;padding:0 1rem .5rem}.deletion-message{position:absolute;right:1rem;top:2px;font-size:.6875rem;color:var(--mat-sys-error, #b3261e);font-weight:500;line-height:1.6;animation:pulse 1s infinite}button:has(+.deletion-progress-container){border-bottom:none!important;padding-bottom:4px!important}@keyframes pulse{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@media(max-width:600px){.option-sub-text{max-width:180px;white-space:normal}}.data-overlay-backdrop{position:fixed;inset:0;z-index:999;background:transparent}.data-overlay-panel{position:fixed;z-index:1000;background:var(--mat-sys-surface, #fef7ff);border:1px solid color-mix(in srgb,var(--mat-sys-outline, #79747e) 15%,transparent);border-radius:12px;box-shadow:0 16px 56px color-mix(in srgb,var(--mat-sys-shadow, #000) 14%,transparent);min-width:280px;max-width:min(380px,calc(100vw - 16px));max-height:60vh;display:flex;flex-direction:column;overflow:hidden}.data-overlay-header{display:flex;align-items:center;justify-content:space-between;padding:.25rem .25rem .25rem .75rem;border-bottom:1px solid color-mix(in srgb,var(--mat-sys-outline, #79747e) 12%,transparent);flex-shrink:0}.data-overlay-title{font-size:.8125rem;font-weight:500;display:flex;align-items:center;color:var(--mat-sys-on-surface, #1c1b1f)}.data-overlay-title-icon{font-size:1rem;width:1rem;height:1rem;line-height:1rem;vertical-align:middle;margin-right:.25rem}.data-overlay-body{overflow:auto;padding:.25rem .5rem .5rem;flex:1}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "ngmodule", type: MatTableModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "component", type: TDynamicDataViewComponent, selector: "lib-t-dynamic-data-view", inputs: ["data"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i2.MatIconButton, i4.MatChip, i3.MatIcon, i6.MatMenuTrigger, i2$1.MatSort, i5.MatTable, i5.MatHeaderCellDef, i5.MatHeaderRowDef, i5.MatColumnDef, i5.MatCellDef, i5.MatRowDef, i5.MatHeaderCell, i5.MatCell, i5.MatHeaderRow, i5.MatRow, i5$1.MatTooltip, import('./ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs').then(function (n) { return n.aL; }).then(m => m.FormatDataPipe)]] }); }
431
+ }
432
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputTableViewComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs').then(function (n) { return n.aL; }).then(m => m.FormatDataPipe)], resolveMetadata: FormatDataPipe => ({ decorators: [{
433
+ type: Component,
434
+ args: [{ selector: 'lib-multiple-input-table-view', imports: [
435
+ MatButtonModule,
436
+ MatChipsModule,
437
+ MatIconModule,
438
+ MatMenuModule,
439
+ MatProgressBarModule,
440
+ MatProgressSpinnerModule,
441
+ MatSortModule,
442
+ MatTableModule,
443
+ MatTooltipModule,
444
+ FormatDataPipe,
445
+ TDynamicDataViewComponent,
446
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "@defer (on viewport) {\r\n\r\n @if (getColConfig.displayedColumnsInOrder.length === 0) {\r\n <div class=\"mit-state mit-state--inline\">No columns</div>\r\n }\r\n\r\n <div class=\"table-container\">\r\n\r\n <table mat-table [dataSource]=\"(dataSource() || [])\" class=\"mit-table\" matSort matSortActive=\"created\"\r\n matSortDisableClear matSortDirection=\"desc\">\r\n @for (col of (displayedColumnsInOrder || []); track col) {\r\n <ng-container [matColumnDef]=\"col\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <span class=\"mit-th-label\">\r\n {{ getColConfig.columnsConfig?.[col]?.[\"label\"] }}\r\n </span>\r\n @if ($last) {\r\n <button matTooltip=\"Show other values\" [matMenuTriggerFor]=\"colOptions\" [matMenuTriggerData]=\"{}\"\r\n class=\"mit-th-action\" mat-icon-button>\r\n <mat-icon>label</mat-icon>\r\n </button>\r\n }\r\n </th>\r\n <td [class.functionClass]=\"row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION']\"\r\n [style.background]=\"returnBackground(row, getColConfig.columnsConfig?.[col])\"\r\n mat-cell *matCellDef=\"let row\">\r\n @if (getColConfig.columnsConfig?.[col]?.['type'] === 'removal') {\r\n <div class=\"cellClass\">\r\n\r\n @if (!!row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'] && !row['id'] && !inputConfig()?.multipleInputInEditId ||\r\n !!row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'] && inputConfig()?.multipleInputInEditId &&\r\n inputConfig()?.multipleInputInEditId !== row['id']) {\r\n <div class=\"mit-fn-label\">\r\n <strong>{{ getCalculationFunction(row) }}</strong>\r\n </div>\r\n }\r\n @if (\r\n userCanApplyOptionsTo() &&\r\n !row['SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION'] &&\r\n row[''] !== 'true' && !inputConfig()?.readonly && !inputConfig()?.disabled\r\n ) {\r\n <button mat-icon-button [color]=\"t.menuOpen ? 'primary' : 'basic'\" [matMenuTriggerFor]=\"rowOptions\" [matMenuTriggerData]=\"{row:row}\" #t=\"matMenuTrigger\"\r\n (click)=\"applyOptionsToFn(row)\"\r\n class=\"mit-row-trigger\">\r\n @if (rowIsInEdit(row)) {\r\n <mat-icon color=\"primary\">edit</mat-icon>\r\n } @else {\r\n <mat-icon>{{ t.menuOpen ? 'close' : 'more_horiz' }}</mat-icon>\r\n }\r\n </button>\r\n }\r\n\r\n @if (row['SYSTEM_KEY_IN_EDIT']) {\r\n <mat-chip>In {{ inputConfig()?.readonly ? 'View' : 'Edit' }}</mat-chip>\r\n }\r\n\r\n </div>\r\n }\r\n @if (getColConfig.columnsConfig && getColConfig.columnsConfig?.[col]?.type !== 'removal') {\r\n <div class=\"cellClass\">\r\n <span>\r\n @if (getColConfig.columnsConfig?.[col].dataType === 'array' || getColConfig.columnsConfig?.[col].dataType === 'object') {\r\n <button mat-icon-button class=\"mit-data-button\"\r\n matTooltip=\"View data\"\r\n (click)=\"openDataOverlay($event, row[col])\">\r\n <mat-icon class=\"mit-data-icon\">data_object</mat-icon>\r\n </button>\r\n } @else {\r\n {{ row[col] | formatData: getColConfig.columnsConfig?.[col].dataType }}\r\n }\r\n </span>\r\n </div>\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"getColConfig.displayedColumnsInOrder\"></tr>\r\n <tr [class.mit-group-start]=\"hasTopBorder(row)\" mat-row\r\n *matRowDef=\"let row; columns: getColConfig.displayedColumnsInOrder\"></tr>\r\n </table>\r\n\r\n @if (!dataSource()?.data?.length) {\r\n <div class=\"mit-empty\">\r\n <mat-icon class=\"mit-empty-icon\">list</mat-icon>\r\n <strong class=\"mit-empty-title\">No items yet</strong>\r\n <p class=\"mit-empty-text\">\r\n <strong>Click the add button</strong> to create a new row. You'll fill in details using a form, and each\r\n saved entry appears as a row here.\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n} @placeholder {\r\n <div class=\"mit-placeholder\">\r\n <mat-spinner diameter=\"32\" />\r\n </div>\r\n}\r\n\r\n@if (overlayOpen) {\r\n <div class=\"data-overlay-backdrop\" (click)=\"closeDataOverlay()\"></div>\r\n <div class=\"data-overlay-panel\"\r\n [style.top.px]=\"overlayPosition.top\"\r\n [style.left.px]=\"overlayPosition.left\"\r\n (click)=\"$event.stopPropagation()\">\r\n <div class=\"data-overlay-header\">\r\n <span class=\"data-overlay-title\">\r\n <mat-icon class=\"data-overlay-title-icon\">data_object</mat-icon>\r\n Data\r\n </span>\r\n <button mat-icon-button class=\"mit-data-button\" (click)=\"closeDataOverlay()\">\r\n <mat-icon class=\"mit-data-icon\">close</mat-icon>\r\n </button>\r\n </div>\r\n <div class=\"data-overlay-body\">\r\n <lib-t-dynamic-data-view [data]=\"overlayData\" />\r\n </div>\r\n </div>\r\n}\r\n\r\n<mat-menu #colOptions=\"matMenu\">\r\n <ng-template matMenuContent>\r\n @for (label of allPossibleLabels(); track label.formControlName) {\r\n <button mat-menu-item (click)=\"toggleTepLabel($event, label.formControlName);\">\r\n <mat-icon>{{ label.selected ? 'check_circle' : 'radio_button_unchecked' }}</mat-icon>\r\n {{ label.label }}\r\n </button>\r\n }\r\n </ng-template>\r\n</mat-menu>\r\n\r\n<mat-menu #rowOptions=\"matMenu\">\r\n <ng-template matMenuContent let-row=\"row\">\r\n @if (!inputConfig()?.readonly && !inputConfig()?.disabled) {\r\n @if (userCanEdit()) {\r\n <button mat-menu-item (click)=\"editItem(row)\">\r\n <mat-icon>edit</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text\">Edit</div>\r\n <div class=\"option-sub-text\">\r\n {{ inputConfig()?.readonly ? 'View item properties' : 'Modify item properties' }}\r\n </div>\r\n </div>\r\n </button>\r\n }\r\n @if (userCanAdd()) {\r\n <button mat-menu-item (click)=\"copy(row)\">\r\n <mat-icon>content_copy</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text\">Duplicate</div>\r\n <div class=\"option-sub-text\">Create a copy with same values</div>\r\n </div>\r\n </button>\r\n }\r\n\r\n @if (userCanRemove()) {\r\n @if (isAboutToDeleteRow(row)) {\r\n <button mat-menu-item (click)=\"multipleInputRemoveItem($event,row)\">\r\n <mat-icon color=\"accent\">cancel</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text option-main-text--cancel\">Cancel Deletion</div>\r\n <div class=\"option-sub-text\">Auto-deleting in {{ secondsCountDown() }} seconds...</div>\r\n </div>\r\n </button>\r\n <div class=\"deletion-progress-container\">\r\n <mat-progress-bar color=\"warn\" mode=\"determinate\" [value]=\"getCountdownSeconds()\"></mat-progress-bar>\r\n @if (getCountdownSeconds() > 75) {\r\n <div class=\"deletion-message\">Deleting soon...</div>\r\n }\r\n </div>\r\n } @else {\r\n <button mat-menu-item (click)=\"multipleInputRemoveItem($event,row)\">\r\n <mat-icon color=\"warn\">delete_outline</mat-icon>\r\n <div class=\"option-text\">\r\n <div class=\"option-main-text\">Delete</div>\r\n <div class=\"option-sub-text\">Will delete after 3 seconds (click to cancel)</div>\r\n </div>\r\n </button>\r\n }\r\n }\r\n }\r\n </ng-template>\r\n</mat-menu>\r\n", styles: [".table-container{max-width:100%!important;overflow:auto!important;border-radius:8px}.mit-table{width:100%;background:transparent}.mit-table .mat-mdc-header-cell,.mit-table .mat-mdc-cell{padding:0 .625rem;font-size:.8125rem}.mit-table .mat-mdc-header-row{min-height:2.25rem}.mit-table .mat-mdc-row{min-height:2.5rem;transition:background .2s cubic-bezier(.16,1,.3,1)}.mit-table .mat-mdc-row:hover{background:color-mix(in srgb,var(--mat-sys-primary, #6750a4) 5%,transparent)}.mit-th-label{text-align:start;line-height:normal;font-size:.6875rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant, #49454f)}.mit-th-action{width:1.75rem;height:1.75rem;line-height:1.75rem;opacity:.55;transition:opacity .2s cubic-bezier(.16,1,.3,1)}.mit-th-action:hover{opacity:1}.cellClass{display:flex;align-items:center;min-height:2.5rem}.mit-group-start .mat-mdc-cell{border-top:2px solid var(--mat-sys-outline-variant, #cac4d0)}.functionClass{background:var(--mat-sys-surface-container, #f3edf7);font-weight:500}.mit-fn-label{width:100%;text-align:right;color:var(--mat-sys-on-surface-variant, #49454f);font-size:.6875rem;letter-spacing:.06em;text-transform:uppercase}.mit-row-trigger{margin-left:auto;margin-right:0;display:block}.mit-data-button{width:1.75rem;height:1.75rem;line-height:1.75rem}.mit-data-icon{font-size:1.125rem;width:1.125rem;height:1.125rem;line-height:1.125rem}.mit-state{display:flex;justify-content:center;padding:1rem;font-size:.8125rem;color:var(--mat-sys-on-surface-variant, #49454f);opacity:.7}.mit-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:.375rem;padding:1.5rem 1.25rem;color:var(--mat-sys-on-surface-variant, #49454f)}.mit-empty-icon{font-size:1.75rem;width:1.75rem;height:1.75rem;line-height:1.75rem;opacity:.5}.mit-empty-title{font-size:.875rem;color:var(--mat-sys-on-surface, #1c1b1f)}.mit-empty-text{margin:0;max-width:22rem;font-size:.75rem;line-height:1.45;opacity:.85}.mit-placeholder{display:flex;justify-content:center;align-items:center;padding:2rem}.option-text{display:flex;flex-direction:column;margin-left:.5rem}.option-main-text{font-size:.875rem;font-weight:500;margin-bottom:2px;line-height:normal}.option-main-text--cancel{color:var(--mat-sys-primary, #6750a4)}.option-sub-text{font-size:.75rem;color:var(--mat-sys-on-surface-variant, #49454f);font-weight:400;line-height:1.2}.deletion-progress-container{position:relative;padding:0 1rem .5rem}.deletion-message{position:absolute;right:1rem;top:2px;font-size:.6875rem;color:var(--mat-sys-error, #b3261e);font-weight:500;line-height:1.6;animation:pulse 1s infinite}button:has(+.deletion-progress-container){border-bottom:none!important;padding-bottom:4px!important}@keyframes pulse{0%{opacity:.7}50%{opacity:1}to{opacity:.7}}@media(max-width:600px){.option-sub-text{max-width:180px;white-space:normal}}.data-overlay-backdrop{position:fixed;inset:0;z-index:999;background:transparent}.data-overlay-panel{position:fixed;z-index:1000;background:var(--mat-sys-surface, #fef7ff);border:1px solid color-mix(in srgb,var(--mat-sys-outline, #79747e) 15%,transparent);border-radius:12px;box-shadow:0 16px 56px color-mix(in srgb,var(--mat-sys-shadow, #000) 14%,transparent);min-width:280px;max-width:min(380px,calc(100vw - 16px));max-height:60vh;display:flex;flex-direction:column;overflow:hidden}.data-overlay-header{display:flex;align-items:center;justify-content:space-between;padding:.25rem .25rem .25rem .75rem;border-bottom:1px solid color-mix(in srgb,var(--mat-sys-outline, #79747e) 12%,transparent);flex-shrink:0}.data-overlay-title{font-size:.8125rem;font-weight:500;display:flex;align-items:center;color:var(--mat-sys-on-surface, #1c1b1f)}.data-overlay-title-icon{font-size:1rem;width:1rem;height:1rem;line-height:1rem;vertical-align:middle;margin-right:.25rem}.data-overlay-body{overflow:auto;padding:.25rem .5rem .5rem;flex:1}\n"] }]
447
+ }], ctorParameters: null, propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: false }] }], dataSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dataSource", required: false }] }], applyOptionsTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "applyOptionsTo", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }], onEditItem: [{ type: i0.Output, args: ["onEditItem"] }], onDeleteItem: [{ type: i0.Output, args: ["onDeleteItem"] }], onCopy: [{ type: i0.Output, args: ["onCopy"] }], onApplyOptionsTo: [{ type: i0.Output, args: ["onApplyOptionsTo"] }], showItemAsLabel: [{ type: i0.Output, args: ["showItemAsLabel"] }] } }) });
448
+
449
+ class MultipleInputTableEditComponent {
450
+ constructor() {
451
+ this.InputComponent = TFormInputComponent;
452
+ this.inputConfig = input.required(...(ngDevMode ? [{ debugName: "inputConfig" }] : /* istanbul ignore next */ []));
453
+ this.editorMode = input(false, ...(ngDevMode ? [{ debugName: "editorMode" }] : /* istanbul ignore next */ []));
454
+ this.formGroup = input(null, ...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
455
+ this.formBuilderFunctions = input(undefined, ...(ngDevMode ? [{ debugName: "formBuilderFunctions" }] : /* istanbul ignore next */ []));
456
+ this.onSaveMultipleInputForm = output();
457
+ this.editMultipleInput = output();
458
+ this.deleteInput = output();
459
+ this.showItemAsLabel = output();
460
+ this.addFunction = output();
461
+ this.reorderItems = output();
462
+ this.calculationFunctions = Object.values(CalculationFunctions);
463
+ this.activeInput = '';
464
+ this.dragging = false;
465
+ this.overId = null;
466
+ this.areYouSure = false;
467
+ this.countdownSeconds = {};
468
+ this.innerInputs = computed(() => {
469
+ const cfg = this.inputConfig();
470
+ return (cfg?.formInputs?.map((input) => ({
471
+ ...input,
472
+ originalId: input.id,
473
+ id: `${cfg?.id}.${input.id}`,
474
+ })) || []);
475
+ }, ...(ngDevMode ? [{ debugName: "innerInputs" }] : /* istanbul ignore next */ []));
476
+ this.rowInUpdate = computed(() => {
477
+ const cfg = this.inputConfig();
478
+ const fg = this.formGroup();
479
+ return !!cfg?.formIsOpen && !!fg?.controls[`${cfg?.id}.id`]?.value;
480
+ }, ...(ngDevMode ? [{ debugName: "rowInUpdate" }] : /* istanbul ignore next */ []));
481
+ this.formInvalid = computed(() => {
482
+ const cfg = this.inputConfig();
483
+ const fg = this.formGroup();
484
+ const allControls = [];
485
+ cfg?.formInputs?.forEach((input) => {
486
+ const control = fg?.controls[`${cfg?.id}.${input.id}`];
487
+ if (control) {
488
+ allControls.push(control);
489
+ }
490
+ });
491
+ return allControls.some((control) => control?.invalid || !control);
492
+ }, ...(ngDevMode ? [{ debugName: "formInvalid" }] : /* istanbul ignore next */ []));
493
+ this.#destroyRef = inject(DestroyRef);
494
+ }
495
+ #destroyRef;
496
+ ngOnDestroy() {
497
+ Object.values(this.countdownSeconds).forEach(({ stop$ }) => stop$.complete());
498
+ }
499
+ saveMultipleInputForm() {
500
+ this.onSaveMultipleInputForm.emit();
501
+ }
502
+ inputWillBeRemovedIn(id) {
503
+ return this.countdownSeconds[id]?.count;
504
+ }
505
+ removeInput(item) {
506
+ if (this.countdownSeconds[item.id]) {
507
+ this.stopDeletion(item.id);
508
+ return;
509
+ }
510
+ this.countdownSeconds[item.id] = {
511
+ count: 5,
512
+ stop$: new Subject(),
513
+ };
514
+ const countdown$ = timer(0, 1000).pipe(tap((secondsElapsed) => {
515
+ const data = this.countdownSeconds[item.id];
516
+ if (!data) {
517
+ return;
518
+ }
519
+ const remainingTime = 5 - secondsElapsed;
520
+ if (remainingTime <= 0) {
521
+ this.formDeleteInput(item);
522
+ this.stopDeletion(item.id);
523
+ }
524
+ else {
525
+ data.count = remainingTime;
526
+ }
527
+ }), takeUntil(this.countdownSeconds[item.id].stop$), takeUntilDestroyed(this.#destroyRef));
528
+ countdown$.subscribe({
529
+ complete: () => { },
530
+ });
531
+ }
532
+ stopDeletion(id) {
533
+ if (this.countdownSeconds[id]) {
534
+ this.countdownSeconds[id]?.stop$.next();
535
+ delete this.countdownSeconds[id];
536
+ }
537
+ }
538
+ formDeleteInput(item) {
539
+ this.deleteInput.emit(item);
540
+ }
541
+ dropItems(event) {
542
+ this.reorderItems.emit(event);
543
+ }
544
+ editInput(input) {
545
+ this.editMultipleInput.emit(input);
546
+ }
547
+ toggleLabel(item) {
548
+ this.showItemAsLabel.emit(item);
549
+ }
550
+ toggleFunction(func, _inputId) {
551
+ const addFunction = {
552
+ id: v4(),
553
+ inputId: this.activeInput,
554
+ func,
555
+ };
556
+ this.addFunction.emit(addFunction);
557
+ }
558
+ selectedFunction(func) {
559
+ return this.inputConfig()?.calculateListFunctions?.find((f) => f.inputId === this.activeInput && f.func === func);
560
+ }
561
+ closeMultipleInput() {
562
+ if (this.areYouSure) {
563
+ this.formBuilderFunctions()?.multipleInputToggleForm(this.inputConfig().id, false);
564
+ this.areYouSure = false;
565
+ return;
566
+ }
567
+ this.areYouSure = true;
568
+ }
569
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputTableEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
570
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MultipleInputTableEditComponent, isStandalone: true, selector: "lib-multiple-input-table-edit", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onSaveMultipleInputForm: "onSaveMultipleInputForm", editMultipleInput: "editMultipleInput", deleteInput: "deleteInput", showItemAsLabel: "showItemAsLabel", addFunction: "addFunction", reorderItems: "reorderItems" }, ngImport: i0, template: "<mat-card appearance=\"outlined\" class=\"edit-card mat-elevation-z4\">\r\n <mat-card-content>\r\n <div class=\"list row\" (cdkDropListDropped)=\"dropItems($event)\"\r\n [cdkDropListData]=\"innerInputs()\" cdkDropList #InputList=\"cdkDropList\">\r\n @for (innerInput of innerInputs(); track innerInput.id) {\r\n <ng-container>\r\n @if (editorMode()) {\r\n @if (!!formGroup()) {\r\n <mat-card (mouseover)=\"activeInput = innerInput.id\" cdkDrag\r\n (cdkDragStarted)=\"dragging = true\" (cdkDragReleased)=\"dragging = false\"\r\n [class.inputCardElevated]=\"activeInput === innerInput.id\"\r\n [class.inputCard]=\"activeInput !== innerInput.id\"\r\n [class]=\"'col-md-' + (dragging ? '12' : innerInput.colSize)\" class=\"box\">\r\n <ng-container *ngComponentOutlet=\"InputComponent;\r\n inputs: {\r\n inputConfig: innerInput,\r\n formGroup: formGroup(),\r\n formBuilderFunctions: formBuilderFunctions(),\r\n }\">\r\n </ng-container>\r\n @if (activeInput === innerInput.id) {\r\n <mat-card-actions class=\"input-actions\">\r\n <span class=\"spacer\"></span>\r\n <button [matTooltip]=\"'Edit Input: ' + innerInput.label\"\r\n (click)=\"editInput(innerInput)\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n @if (!!inputWillBeRemovedIn(innerInput.id)) {\r\n <button (mouseover)=\"overId = innerInput.id\" (mouseout)=\"overId = null\"\r\n (click)=\"removeInput(innerInput)\" color=\"warn\" mat-stroked-button>\r\n <div class=\"countdown-button\">\r\n <mat-progress-spinner class=\"cancelProgress\" color=\"primary\"\r\n [value]=\"((inputWillBeRemovedIn(innerInput.id) || 0) / 5) * 100\">\r\n </mat-progress-spinner>\r\n {{ overId === innerInput.id ? 'Click to cancel' : 'Deleting in' }}\r\n {{ inputWillBeRemovedIn(innerInput.id) }}\r\n </div>\r\n </button>\r\n } @else if (inputConfig().systemDefault !== true && innerInput.systemDefault !== true) {\r\n <button [matTooltip]=\"'Delete input ' + innerInput.label\"\r\n (click)=\"removeInput(innerInput)\" mat-icon-button>\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n <span class=\"action-divider\"></span>\r\n @if (!!innerInput.showAsLabel && innerInput.dataType === 'number' || !!innerInput.showAsLabel && innerInput.type === 'number') {\r\n <button\r\n [matMenuTriggerFor]=\"calculationMenu\"\r\n [matMenuTriggerData]=\"{inputId:innerInput.originalId || innerInput.id}\"\r\n [matTooltip]=\"'calculate sum,avg,min,max'\"\r\n mat-icon-button>\r\n <mat-icon>calculate</mat-icon>\r\n </button>\r\n }\r\n <button [color]=\"innerInput.showAsLabel ? 'primary' : ''\"\r\n (click)=\"toggleLabel(innerInput)\"\r\n [matTooltip]=\"innerInput.showAsLabel ? 'Hide as label' : 'Show as label'\"\r\n mat-icon-button>\r\n <mat-icon>label</mat-icon>\r\n </button>\r\n <span class=\"spacer\"></span>\r\n </mat-card-actions>\r\n }\r\n </mat-card>\r\n }\r\n } @else {\r\n <div [class]=\"'col-md-' + (dragging ? '12' : innerInput.colSize)\" class=\"box\">\r\n <ng-container *ngComponentOutlet=\"InputComponent;\r\n inputs: {\r\n inputConfig: innerInput,\r\n formGroup: formGroup(),\r\n formBuilderFunctions: formBuilderFunctions(),\r\n }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </ng-container>\r\n }\r\n @if (!!editorMode() && innerInputs().length === 0) {\r\n <div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n <strong>Add Form Input</strong>\r\n <br>\r\n Manage your list by adding, editing, or removing items. Each item is customizable through a form.\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n </mat-card-content>\r\n @if (innerInputs().length !== 0) {\r\n <mat-divider></mat-divider>\r\n <mat-card-actions align=\"end\" class=\"edit-card-actions\">\r\n <button [color]=\"areYouSure ? 'warn' : ''\"\r\n [class.confirm-leave]=\"areYouSure\" mat-button\r\n (click)=\"closeMultipleInput()\">\r\n {{ areYouSure ? \"leave without saving\" : \"cancel\" }}\r\n </button>\r\n @if (!inputConfig().readonly) {\r\n <button [disabled]=\"!!formInvalid()\" class=\"save-button\" color=\"primary\"\r\n (click)=\"saveMultipleInputForm()\" mat-raised-button>\r\n {{ rowInUpdate() ? \"Update\" : \"Save\" }}\r\n </button>\r\n }\r\n </mat-card-actions>\r\n }\r\n</mat-card>\r\n\r\n\r\n<mat-menu #calculationMenu=\"matMenu\">\r\n <ng-template matMenuContent let-inputId=\"sectionId\">\r\n @for (func of calculationFunctions; track func) {\r\n <button (click)=\"toggleFunction(func, inputId)\" mat-menu-item>\r\n {{ func }}\r\n @if (selectedFunction(func)) {\r\n <mat-icon color=\"primary\">check_circle</mat-icon>\r\n }\r\n </button>\r\n }\r\n </ng-template>\r\n</mat-menu>\r\n", styles: [".edit-card{margin-top:.5rem;background:var(--mat-sys-surface-container, #f3edf7);border-radius:12px}.inputCardElevated{background:var(--mat-sys-surface, #fef7ff);box-shadow:var(--mdc-elevated-card-container-elevation);transition:box-shadow .3s cubic-bezier(.16,1,.3,1)}.inputCard{box-shadow:none;transition:box-shadow .3s cubic-bezier(.16,1,.3,1)}.list{min-height:60px}.box{padding:.25rem;cursor:move}.input-actions{display:flex;align-items:center;gap:.125rem}.action-divider{width:1px;align-self:stretch;margin:.25rem;background:color-mix(in srgb,var(--mat-sys-outline, #79747e) 25%,transparent)}.countdown-button{display:flex;align-items:center}.cdk-drag-preview{box-sizing:border-box;border:none;border-radius:8px;box-shadow:0 5px 5px -3px color-mix(in srgb,var(--mat-sys-shadow, #000) 20%,transparent),0 8px 10px 1px color-mix(in srgb,var(--mat-sys-shadow, #000) 14%,transparent),0 3px 14px 2px color-mix(in srgb,var(--mat-sys-shadow, #000) 12%,transparent)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.box:last-child{border:none}.list.cdk-drop-list-dragging .box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cancelProgress{height:24px!important;width:24px!important;margin-right:.3125rem}.edit-card-actions{gap:.5rem;padding:.5rem .75rem .75rem}.confirm-leave{text-decoration:underline}.save-button{min-width:10em}.tree-instructions{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:color-mix(in srgb,var(--mat-sys-primary, #6750a4) 6%,transparent);border:1px solid color-mix(in srgb,var(--mat-sys-primary, #6750a4) 14%,transparent);border-radius:8px;margin-bottom:1rem;font-size:.8125rem;color:var(--mat-sys-on-surface-variant, #49454f)}.info-icon{min-width:38px!important;display:block;margin-top:4px;margin-bottom:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3$1.NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "directive", type: i1$1.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer", "cdkDropListHasAnchor"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i1$1.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i6.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i6.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "directive", type: i6.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4$1.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
571
+ }
572
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputTableEditComponent, decorators: [{
573
+ type: Component,
574
+ args: [{ selector: 'lib-multiple-input-table-edit', imports: [
575
+ CommonModule,
576
+ DragDropModule,
577
+ MatButtonModule,
578
+ MatCardModule,
579
+ MatDividerModule,
580
+ MatIconModule,
581
+ MatMenuModule,
582
+ MatProgressSpinnerModule,
583
+ MatTooltipModule,
584
+ ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<mat-card appearance=\"outlined\" class=\"edit-card mat-elevation-z4\">\r\n <mat-card-content>\r\n <div class=\"list row\" (cdkDropListDropped)=\"dropItems($event)\"\r\n [cdkDropListData]=\"innerInputs()\" cdkDropList #InputList=\"cdkDropList\">\r\n @for (innerInput of innerInputs(); track innerInput.id) {\r\n <ng-container>\r\n @if (editorMode()) {\r\n @if (!!formGroup()) {\r\n <mat-card (mouseover)=\"activeInput = innerInput.id\" cdkDrag\r\n (cdkDragStarted)=\"dragging = true\" (cdkDragReleased)=\"dragging = false\"\r\n [class.inputCardElevated]=\"activeInput === innerInput.id\"\r\n [class.inputCard]=\"activeInput !== innerInput.id\"\r\n [class]=\"'col-md-' + (dragging ? '12' : innerInput.colSize)\" class=\"box\">\r\n <ng-container *ngComponentOutlet=\"InputComponent;\r\n inputs: {\r\n inputConfig: innerInput,\r\n formGroup: formGroup(),\r\n formBuilderFunctions: formBuilderFunctions(),\r\n }\">\r\n </ng-container>\r\n @if (activeInput === innerInput.id) {\r\n <mat-card-actions class=\"input-actions\">\r\n <span class=\"spacer\"></span>\r\n <button [matTooltip]=\"'Edit Input: ' + innerInput.label\"\r\n (click)=\"editInput(innerInput)\" mat-icon-button>\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n @if (!!inputWillBeRemovedIn(innerInput.id)) {\r\n <button (mouseover)=\"overId = innerInput.id\" (mouseout)=\"overId = null\"\r\n (click)=\"removeInput(innerInput)\" color=\"warn\" mat-stroked-button>\r\n <div class=\"countdown-button\">\r\n <mat-progress-spinner class=\"cancelProgress\" color=\"primary\"\r\n [value]=\"((inputWillBeRemovedIn(innerInput.id) || 0) / 5) * 100\">\r\n </mat-progress-spinner>\r\n {{ overId === innerInput.id ? 'Click to cancel' : 'Deleting in' }}\r\n {{ inputWillBeRemovedIn(innerInput.id) }}\r\n </div>\r\n </button>\r\n } @else if (inputConfig().systemDefault !== true && innerInput.systemDefault !== true) {\r\n <button [matTooltip]=\"'Delete input ' + innerInput.label\"\r\n (click)=\"removeInput(innerInput)\" mat-icon-button>\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n }\r\n <span class=\"action-divider\"></span>\r\n @if (!!innerInput.showAsLabel && innerInput.dataType === 'number' || !!innerInput.showAsLabel && innerInput.type === 'number') {\r\n <button\r\n [matMenuTriggerFor]=\"calculationMenu\"\r\n [matMenuTriggerData]=\"{inputId:innerInput.originalId || innerInput.id}\"\r\n [matTooltip]=\"'calculate sum,avg,min,max'\"\r\n mat-icon-button>\r\n <mat-icon>calculate</mat-icon>\r\n </button>\r\n }\r\n <button [color]=\"innerInput.showAsLabel ? 'primary' : ''\"\r\n (click)=\"toggleLabel(innerInput)\"\r\n [matTooltip]=\"innerInput.showAsLabel ? 'Hide as label' : 'Show as label'\"\r\n mat-icon-button>\r\n <mat-icon>label</mat-icon>\r\n </button>\r\n <span class=\"spacer\"></span>\r\n </mat-card-actions>\r\n }\r\n </mat-card>\r\n }\r\n } @else {\r\n <div [class]=\"'col-md-' + (dragging ? '12' : innerInput.colSize)\" class=\"box\">\r\n <ng-container *ngComponentOutlet=\"InputComponent;\r\n inputs: {\r\n inputConfig: innerInput,\r\n formGroup: formGroup(),\r\n formBuilderFunctions: formBuilderFunctions(),\r\n }\">\r\n </ng-container>\r\n </div>\r\n }\r\n </ng-container>\r\n }\r\n @if (!!editorMode() && innerInputs().length === 0) {\r\n <div class=\"tree-instructions\">\r\n <mat-icon class=\"info-icon\" color=\"primary\">info</mat-icon>\r\n <span>\r\n <strong>Add Form Input</strong>\r\n <br>\r\n Manage your list by adding, editing, or removing items. Each item is customizable through a form.\r\n </span>\r\n </div>\r\n }\r\n </div>\r\n </mat-card-content>\r\n @if (innerInputs().length !== 0) {\r\n <mat-divider></mat-divider>\r\n <mat-card-actions align=\"end\" class=\"edit-card-actions\">\r\n <button [color]=\"areYouSure ? 'warn' : ''\"\r\n [class.confirm-leave]=\"areYouSure\" mat-button\r\n (click)=\"closeMultipleInput()\">\r\n {{ areYouSure ? \"leave without saving\" : \"cancel\" }}\r\n </button>\r\n @if (!inputConfig().readonly) {\r\n <button [disabled]=\"!!formInvalid()\" class=\"save-button\" color=\"primary\"\r\n (click)=\"saveMultipleInputForm()\" mat-raised-button>\r\n {{ rowInUpdate() ? \"Update\" : \"Save\" }}\r\n </button>\r\n }\r\n </mat-card-actions>\r\n }\r\n</mat-card>\r\n\r\n\r\n<mat-menu #calculationMenu=\"matMenu\">\r\n <ng-template matMenuContent let-inputId=\"sectionId\">\r\n @for (func of calculationFunctions; track func) {\r\n <button (click)=\"toggleFunction(func, inputId)\" mat-menu-item>\r\n {{ func }}\r\n @if (selectedFunction(func)) {\r\n <mat-icon color=\"primary\">check_circle</mat-icon>\r\n }\r\n </button>\r\n }\r\n </ng-template>\r\n</mat-menu>\r\n", styles: [".edit-card{margin-top:.5rem;background:var(--mat-sys-surface-container, #f3edf7);border-radius:12px}.inputCardElevated{background:var(--mat-sys-surface, #fef7ff);box-shadow:var(--mdc-elevated-card-container-elevation);transition:box-shadow .3s cubic-bezier(.16,1,.3,1)}.inputCard{box-shadow:none;transition:box-shadow .3s cubic-bezier(.16,1,.3,1)}.list{min-height:60px}.box{padding:.25rem;cursor:move}.input-actions{display:flex;align-items:center;gap:.125rem}.action-divider{width:1px;align-self:stretch;margin:.25rem;background:color-mix(in srgb,var(--mat-sys-outline, #79747e) 25%,transparent)}.countdown-button{display:flex;align-items:center}.cdk-drag-preview{box-sizing:border-box;border:none;border-radius:8px;box-shadow:0 5px 5px -3px color-mix(in srgb,var(--mat-sys-shadow, #000) 20%,transparent),0 8px 10px 1px color-mix(in srgb,var(--mat-sys-shadow, #000) 14%,transparent),0 3px 14px 2px color-mix(in srgb,var(--mat-sys-shadow, #000) 12%,transparent)}.cdk-drag-placeholder{opacity:0}.cdk-drag-animating{transition:transform .25s cubic-bezier(0,0,.2,1)}.box:last-child{border:none}.list.cdk-drop-list-dragging .box:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}.cancelProgress{height:24px!important;width:24px!important;margin-right:.3125rem}.edit-card-actions{gap:.5rem;padding:.5rem .75rem .75rem}.confirm-leave{text-decoration:underline}.save-button{min-width:10em}.tree-instructions{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:color-mix(in srgb,var(--mat-sys-primary, #6750a4) 6%,transparent);border:1px solid color-mix(in srgb,var(--mat-sys-primary, #6750a4) 14%,transparent);border-radius:8px;margin-bottom:1rem;font-size:.8125rem;color:var(--mat-sys-on-surface-variant, #49454f)}.info-icon{min-width:38px!important;display:block;margin-top:4px;margin-bottom:auto}\n"] }]
585
+ }], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], editorMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorMode", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }], formBuilderFunctions: [{ type: i0.Input, args: [{ isSignal: true, alias: "formBuilderFunctions", required: false }] }], onSaveMultipleInputForm: [{ type: i0.Output, args: ["onSaveMultipleInputForm"] }], editMultipleInput: [{ type: i0.Output, args: ["editMultipleInput"] }], deleteInput: [{ type: i0.Output, args: ["deleteInput"] }], showItemAsLabel: [{ type: i0.Output, args: ["showItemAsLabel"] }], addFunction: [{ type: i0.Output, args: ["addFunction"] }], reorderItems: [{ type: i0.Output, args: ["reorderItems"] }] } });
586
+
587
+ function getCaluculatedTableData(inputConfig, data) {
588
+ try {
589
+ if (!Array.isArray(data) || !inputConfig)
590
+ return data;
591
+ const input = inputConfig;
592
+ const funcs = (input?.calculateListFunctions || []);
593
+ const allUniqueFunctionNames = [
594
+ ...new Set(funcs.map((f) => f.func)),
595
+ ];
596
+ const calculatedData = allUniqueFunctionNames.map((func) => {
597
+ const newCalculatedData = {
598
+ SYSTEM_KEY_PROPERTY_FOR_MULTIPLE_INPUTS_CALCULATION_FUNCTION: func,
599
+ };
600
+ funcs.filter((f) => f.func === func).forEach((f) => {
601
+ const arrayValues = data.map((d) => Number(d[f.inputId]));
602
+ newCalculatedData[f.inputId] = calculateListOveralFunctions(func, arrayValues);
603
+ });
604
+ return newCalculatedData;
605
+ });
606
+ return [...data, ...calculatedData];
607
+ }
608
+ catch (error) {
609
+ return data;
610
+ }
611
+ }
612
+
613
+ const customInputConfig = {
614
+ controlType: 'app-multiple-input-table',
615
+ nextId: 0,
616
+ };
617
+ class MultipleInputTableComponent extends BaseCustomInput {
618
+ #destroyRef;
619
+ constructor() {
620
+ super(inject(NgControl, { self: true, optional: true }), inject(ElementRef), customInputConfig);
621
+ this.editorMode = input(false, ...(ngDevMode ? [{ debugName: "editorMode" }] : /* istanbul ignore next */ []));
622
+ this.formGroup = input.required(...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
623
+ this.inputConfig = input.required(...(ngDevMode ? [{ debugName: "inputConfig" }] : /* istanbul ignore next */ []));
624
+ this.formBuilderFunctions = input(undefined, ...(ngDevMode ? [{ debugName: "formBuilderFunctions" }] : /* istanbul ignore next */ []));
625
+ this.#destroyRef = inject(DestroyRef);
626
+ this.rowInViewOnly = undefined;
627
+ this.listenToValueChanges();
628
+ }
629
+ /**
630
+ * Manages custom validation errors on the form control.
631
+ * Intended to be called from the ngDoCheck lifecycle hook.
632
+ * This function handles both the 'required' error and the new
633
+ * 'multipleInputListMissingSomeFields' custom error.
634
+ */
635
+ checkValidationsAnErrors() {
636
+ const control = this.ngControl?.control;
637
+ // 1. Early exit if there's no form control to work with.
638
+ if (!control) {
639
+ return;
640
+ }
641
+ // --- DEFINE THE DESIRED ERROR STATE ---
642
+ // 2. Determine if the custom "multiple fields" error should exist.
643
+ let shouldHaveCustomError = false;
644
+ const formInputs = this.inputConfig()?.formInputs;
645
+ if (Array.isArray(formInputs) && Array.isArray(this.value)) {
646
+ const requiredFieldIds = formInputs
647
+ .filter(i => i.required)
648
+ .map(i => i.id);
649
+ if (requiredFieldIds.length > 0) {
650
+ const configId = this.inputConfig().id;
651
+ shouldHaveCustomError = this.value.some(item => requiredFieldIds.some(id => this._isNilOrEmpty(item?.[`${configId}.${id}`])));
652
+ }
653
+ }
654
+ // 3. Determine if the standard 'required' error should exist.
655
+ const shouldHaveRequiredError = this.required && this._isNilOrEmpty(this.value);
656
+ // --- APPLY THE ERROR STATE TO THE CONTROL ---
657
+ // 4. Preserve other errors that might be on the control (e.g., minlength, pattern).
658
+ const newErrors = { ...control.errors };
659
+ delete newErrors['required'];
660
+ delete newErrors['multipleInputListMissingSomeFields'];
661
+ // 5. Add our managed errors back if their conditions are met.
662
+ if (shouldHaveRequiredError) {
663
+ newErrors['required'] = true;
664
+ }
665
+ if (shouldHaveCustomError) {
666
+ newErrors['multipleInputListMissingSomeFields'] = { value: true }; // Or simply 'true'
667
+ }
668
+ // 6. Finalize the error object. If no errors, it must be null.
669
+ const finalErrors = Object.keys(newErrors).length > 0 ? newErrors : null;
670
+ // 7. IMPORTANT: Only update the control if the errors have actually changed.
671
+ // This prevents infinite loops within ngDoCheck. A simple stringify is a
672
+ // dependency-free way to compare the error objects.
673
+ if (JSON.stringify(control.errors) !== JSON.stringify(finalErrors)) {
674
+ control.setErrors(finalErrors);
675
+ }
676
+ }
677
+ get empty() {
678
+ return !this.value;
679
+ }
680
+ get shouldLabelFloat() {
681
+ return this.focused || !this.empty;
682
+ }
683
+ get errorState() {
684
+ // 1. Check for standard validation errors from Angular's Forms API.
685
+ const hasStandardError = !!this.ngControl?.errors;
686
+ // 2. Check for custom validation errors specific to 'IMultiple' type.
687
+ let hasCustomError = false;
688
+ const formInputs = this.inputConfig()?.formInputs;
689
+ // This custom logic only runs if the config and value are the expected array types.
690
+ if (Array.isArray(formInputs) && Array.isArray(this.value)) {
691
+ const requiredFieldIds = formInputs
692
+ .filter(input => input.required)
693
+ .map(input => input.id);
694
+ // The custom error is true if any item in our value array is missing
695
+ // a value for any of its required sub-fields.
696
+ if (requiredFieldIds.length > 0) {
697
+ hasCustomError = this.value.some(item => requiredFieldIds.some(id => this._isNilOrEmpty(item?.[`${this.inputConfig().id}.${id}`])));
698
+ }
699
+ }
700
+ // 3. The final error state is true if *any* validation fails,
701
+ // AND the control has been "touched" by the user.
702
+ return (hasStandardError || hasCustomError) && this.touched;
703
+ }
704
+ _isNilOrEmpty(value) {
705
+ return value === null || value === undefined || value === '';
706
+ }
707
+ listenToValueChanges() {
708
+ this.stateChanges
709
+ .pipe(takeUntilDestroyed(this.#destroyRef))
710
+ .subscribe(() => {
711
+ this.checkItemList();
712
+ });
713
+ }
714
+ checkItemList() {
715
+ try {
716
+ if (this.value) {
717
+ const config = this.inputConfig();
718
+ const TableData = (config.groupBy?.length ?? 0) > 0
719
+ ? addGroups(this.value, config.groupBy)
720
+ : this.value;
721
+ const data = getCaluculatedTableData(config, TableData);
722
+ if (!this.dataSource) {
723
+ this.dataSource = new MatTableDataSource(data);
724
+ this.dataSource;
725
+ }
726
+ else {
727
+ this.dataSource.data = data;
728
+ }
729
+ }
730
+ return true;
731
+ }
732
+ catch {
733
+ return false;
734
+ }
735
+ }
736
+ multipleInputRemoveItem(item) {
737
+ if (!item)
738
+ return;
739
+ if (!this.value)
740
+ return;
741
+ this.value = this.value.filter((i) => !_isEqual(i, item));
742
+ this.applyOptionsTo = undefined;
743
+ this.onChange(this.value);
744
+ this.stateChanges.next();
745
+ }
746
+ generateMultipleInputForm() {
747
+ const id = this.inputConfig()?.id;
748
+ if (!id)
749
+ return;
750
+ this.formBuilderFunctions()?.multipleInputToggleForm(id, true);
751
+ }
752
+ editRow(rowId) {
753
+ if (!rowId) {
754
+ throw new Error('Row id not provided');
755
+ }
756
+ const config = this.inputConfig();
757
+ const fbf = this.formBuilderFunctions();
758
+ if (!fbf || !config)
759
+ return;
760
+ fbf.multipleInputEditRow(config.id, rowId);
761
+ // if( !this.inputConfig?.multipleInputController){
762
+ // return
763
+ // }
764
+ // this.inputConfig.multipleInputInEditId = this.applyOptionsTo.id;
765
+ // this.inputConfig.applyMultipleInputValuesToForm(
766
+ // this.applyOptionsTo
767
+ // );
768
+ }
769
+ copy(rowId) {
770
+ const config = this.inputConfig();
771
+ const fbf = this.formBuilderFunctions();
772
+ if (!fbf || !config)
773
+ return;
774
+ fbf.multipleInputDuplicateRow(config.id, rowId);
775
+ // this.generateMultipleInputForm();
776
+ // this.inputConfig?.applyMultipleInputValuesToForm(
777
+ // this.applyOptionsTo
778
+ // );
779
+ // this.applyOptionsTo = undefined;
780
+ }
781
+ get handleLabel() {
782
+ return this.inputConfig()?.handleLabel;
783
+ }
784
+ handleIcon() {
785
+ // NOTE(phase-4): `handleIcon` is declared on `IBasicFormInput` but not on `IMultiple` directly;
786
+ // narrow through `ITowerStepColumn` (which extends FormColumnInputs) and provide a string fallback.
787
+ const cfg = this.inputConfig();
788
+ return cfg?.handleIcon || 'add';
789
+ }
790
+ saveMultipleInputForm() {
791
+ this.formBuilderFunctions()?.multipleInputSaveForm(this.inputConfig().id);
792
+ // const value: any = this.inputConfig?.multipleInputFormValue();
793
+ // value['id'] = uuidv4();
794
+ // if (!this.inputConfig) {
795
+ // return
796
+ // }
797
+ // const previousValue = this.value
798
+ // if (!previousValue) {
799
+ // this.value = [value];
800
+ // this.inputConfig.multipleInputController = undefined;
801
+ // } else {
802
+ // if (this.inputConfig?.multipleInputInEditId) {
803
+ // let inEdit = previousValue.find(
804
+ // (i: { id: any }) =>
805
+ // i.id === this.inputConfig?.multipleInputInEditId
806
+ // );
807
+ // Object.keys(inEdit).every((s) => {
808
+ // s;
809
+ // inEdit[s] = value[s];
810
+ // return !!inEdit[s];
811
+ // });
812
+ // this.value = [...previousValue],
813
+ // this.inputConfig.multipleInputController = undefined;
814
+ // } else {
815
+ // this.value = [...previousValue, value];
816
+ // this.inputConfig.multipleInputController = undefined;
817
+ // }
818
+ // }
819
+ // this.onChange(this.value);
820
+ // this.stateChanges.next();
821
+ // this.checkItemList(this.value || []);
822
+ // return
823
+ }
824
+ editInput(input) {
825
+ const fbf = this.formBuilderFunctions();
826
+ if (typeof fbf?.editInput !== 'function') {
827
+ throw new Error('editInput function not defined in formBuilderFunctions');
828
+ }
829
+ fbf.editInput(input);
830
+ }
831
+ deleteItemInput(input) {
832
+ this.formBuilderFunctions()?.deleteInput(input);
833
+ }
834
+ showItemAsLabel(input) {
835
+ this.formBuilderFunctions()?.multipleInputToggleLabel(input);
836
+ }
837
+ addFunction(func) {
838
+ this.formBuilderFunctions()?.addFunction(func, this.inputConfig()?.id);
839
+ }
840
+ // `FormBuilderFunctions.reorderItems` is now generic over the row shape; the
841
+ // container/data slots stay `unknown` (opaque drag payload).
842
+ reorderItems(event) {
843
+ const config = this.inputConfig();
844
+ const fbf = this.formBuilderFunctions();
845
+ if (!fbf || !config)
846
+ return;
847
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Phase-4 TODO: deduplicate @angular/cdk peer dep in typings package; CdkDragDrop types are nominally distinct across copies.
848
+ fbf.reorderItems(event, config.id);
849
+ }
850
+ get parentFormGroup() {
851
+ return this.ngControl?.control?.parent;
852
+ }
853
+ get canAddRecords() {
854
+ const config = this.inputConfig();
855
+ if (!config)
856
+ return false;
857
+ //NOTE: Temporary backward compatibility for older versions of the config that might not have the new property
858
+ if (!config.multipleInputAvailableOperations)
859
+ return true;
860
+ return config.multipleInputAvailableOperations?.includes(MultipleInputAvailableOperations.Add);
861
+ }
862
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
863
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MultipleInputTableComponent, isStandalone: true, selector: "lib-multiple-input-table", inputs: { editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: MatFormFieldControl, useExisting: MultipleInputTableComponent }], usesInheritance: true, ngImport: i0, template: "<lib-multiple-input-table-view\r\n [inputConfig]=\"inputConfig()\"\r\n [dataSource]=\"dataSource\"\r\n [applyOptionsTo]=\"applyOptionsTo\"\r\n [formGroup]=\"parentFormGroup\"\r\n (onEditItem)=\"editRow($event)\"\r\n (showItemAsLabel)=\"showItemAsLabel(inputConfig())\"\r\n (onDeleteItem)=\"multipleInputRemoveItem(applyOptionsTo)\"\r\n (onCopy)=\"copy($event)\"\r\n (onApplyOptionsTo)=\"applyOptionsTo = $event\"\r\n></lib-multiple-input-table-view>\r\n\r\n@if (!!inputConfig().formIsOpen || !!rowInViewOnly) {\r\n <lib-multiple-input-table-edit\r\n [editorMode]=\"editorMode()\"\r\n (editMultipleInput)=\"editInput($event)\"\r\n (deleteInput)=\"deleteItemInput($event)\"\r\n (addFunction)=\"addFunction($event)\"\r\n (showItemAsLabel)=\"showItemAsLabel($event)\"\r\n (onSaveMultipleInputForm)=\"saveMultipleInputForm()\"\r\n (reorderItems)=\"reorderItems($event)\"\r\n [formBuilderFunctions]=\"formBuilderFunctions()\"\r\n [formGroup]=\"parentFormGroup\"\r\n [inputConfig]=\"inputConfig()\"\r\n ></lib-multiple-input-table-edit>\r\n}\r\n\r\n@if (!inputConfig().readonly && !inputConfig().disabled && !inputConfig().formIsOpen && canAddRecords) {\r\n <section class=\"add-row-bar\">\r\n <button class=\"add-row-button\" (click)=\"generateMultipleInputForm()\" mat-stroked-button>\r\n <mat-icon class=\"add-row-icon\">{{ handleIcon() }}</mat-icon>\r\n <span class=\"add-row-label\">{{ handleLabel }}</span>\r\n </button>\r\n </section>\r\n}\r\n", styles: [".table-container{position:relative;max-height:400px;overflow:auto}table{width:100%}.add-row-bar{margin-top:.5rem}.add-row-button{width:100%;min-height:2.25rem;display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border:1px dashed color-mix(in srgb,var(--mat-sys-outline, #79747e) 60%,transparent);border-radius:8px;color:var(--mat-sys-on-surface-variant, #49454f);background:transparent;font-size:.8125rem;font-weight:500;letter-spacing:.01em;transition:border-color .3s cubic-bezier(.16,1,.3,1),color .3s cubic-bezier(.16,1,.3,1),background .3s cubic-bezier(.16,1,.3,1)}.add-row-button:hover{border-color:var(--mat-sys-primary, #6750a4);color:var(--mat-sys-primary, #6750a4);background:color-mix(in srgb,var(--mat-sys-primary, #6750a4) 6%,transparent)}.add-row-button:focus-visible{border-style:solid;border-color:var(--mat-sys-primary, #6750a4);box-shadow:0 0 0 2px color-mix(in srgb,var(--mat-sys-primary, #6750a4) 25%,transparent)}.add-row-icon{font-size:1.125rem;width:1.125rem;height:1.125rem;line-height:1.125rem}.add-row-label{line-height:1}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MultipleInputTableEditComponent, selector: "lib-multiple-input-table-edit", inputs: ["inputConfig", "editorMode", "formGroup", "formBuilderFunctions"], outputs: ["onSaveMultipleInputForm", "editMultipleInput", "deleteInput", "showItemAsLabel", "addFunction", "reorderItems"] }, { kind: "component", type: MultipleInputTableViewComponent, selector: "lib-multiple-input-table-view", inputs: ["inputConfig", "dataSource", "applyOptionsTo", "formGroup"], outputs: ["onEditItem", "onDeleteItem", "onCopy", "onApplyOptionsTo", "showItemAsLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
864
+ }
865
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputTableComponent, decorators: [{
866
+ type: Component,
867
+ args: [{ selector: 'lib-multiple-input-table', imports: [
868
+ MatButtonModule,
869
+ MatIconModule,
870
+ MultipleInputTableEditComponent,
871
+ MultipleInputTableViewComponent,
872
+ ], providers: [{ provide: MatFormFieldControl, useExisting: MultipleInputTableComponent }], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<lib-multiple-input-table-view\r\n [inputConfig]=\"inputConfig()\"\r\n [dataSource]=\"dataSource\"\r\n [applyOptionsTo]=\"applyOptionsTo\"\r\n [formGroup]=\"parentFormGroup\"\r\n (onEditItem)=\"editRow($event)\"\r\n (showItemAsLabel)=\"showItemAsLabel(inputConfig())\"\r\n (onDeleteItem)=\"multipleInputRemoveItem(applyOptionsTo)\"\r\n (onCopy)=\"copy($event)\"\r\n (onApplyOptionsTo)=\"applyOptionsTo = $event\"\r\n></lib-multiple-input-table-view>\r\n\r\n@if (!!inputConfig().formIsOpen || !!rowInViewOnly) {\r\n <lib-multiple-input-table-edit\r\n [editorMode]=\"editorMode()\"\r\n (editMultipleInput)=\"editInput($event)\"\r\n (deleteInput)=\"deleteItemInput($event)\"\r\n (addFunction)=\"addFunction($event)\"\r\n (showItemAsLabel)=\"showItemAsLabel($event)\"\r\n (onSaveMultipleInputForm)=\"saveMultipleInputForm()\"\r\n (reorderItems)=\"reorderItems($event)\"\r\n [formBuilderFunctions]=\"formBuilderFunctions()\"\r\n [formGroup]=\"parentFormGroup\"\r\n [inputConfig]=\"inputConfig()\"\r\n ></lib-multiple-input-table-edit>\r\n}\r\n\r\n@if (!inputConfig().readonly && !inputConfig().disabled && !inputConfig().formIsOpen && canAddRecords) {\r\n <section class=\"add-row-bar\">\r\n <button class=\"add-row-button\" (click)=\"generateMultipleInputForm()\" mat-stroked-button>\r\n <mat-icon class=\"add-row-icon\">{{ handleIcon() }}</mat-icon>\r\n <span class=\"add-row-label\">{{ handleLabel }}</span>\r\n </button>\r\n </section>\r\n}\r\n", styles: [".table-container{position:relative;max-height:400px;overflow:auto}table{width:100%}.add-row-bar{margin-top:.5rem}.add-row-button{width:100%;min-height:2.25rem;display:inline-flex;align-items:center;justify-content:center;gap:.375rem;border:1px dashed color-mix(in srgb,var(--mat-sys-outline, #79747e) 60%,transparent);border-radius:8px;color:var(--mat-sys-on-surface-variant, #49454f);background:transparent;font-size:.8125rem;font-weight:500;letter-spacing:.01em;transition:border-color .3s cubic-bezier(.16,1,.3,1),color .3s cubic-bezier(.16,1,.3,1),background .3s cubic-bezier(.16,1,.3,1)}.add-row-button:hover{border-color:var(--mat-sys-primary, #6750a4);color:var(--mat-sys-primary, #6750a4);background:color-mix(in srgb,var(--mat-sys-primary, #6750a4) 6%,transparent)}.add-row-button:focus-visible{border-style:solid;border-color:var(--mat-sys-primary, #6750a4);box-shadow:0 0 0 2px color-mix(in srgb,var(--mat-sys-primary, #6750a4) 25%,transparent)}.add-row-icon{font-size:1.125rem;width:1.125rem;height:1.125rem;line-height:1.125rem}.add-row-label{line-height:1}\n"] }]
873
+ }], ctorParameters: () => [], propDecorators: { editorMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorMode", required: false }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formBuilderFunctions: [{ type: i0.Input, args: [{ isSignal: true, alias: "formBuilderFunctions", required: false }] }] } });
874
+ function addGroups(tableValue, groupBy) {
875
+ throw new Error('Function not implemented.');
876
+ }
877
+
878
+ /** Wraps a multi-row input table inside a `mat-form-field`. */
879
+ class MultipleInputInputElementComponent {
880
+ constructor() {
881
+ this.inputConfig = input.required(...(ngDevMode ? [{ debugName: "inputConfig" }] : /* istanbul ignore next */ []));
882
+ this.formGroup = input.required(...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
883
+ this.editorMode = input(false, ...(ngDevMode ? [{ debugName: "editorMode" }] : /* istanbul ignore next */ []));
884
+ this.formBuilderFunctions = input(undefined, ...(ngDevMode ? [{ debugName: "formBuilderFunctions" }] : /* istanbul ignore next */ []));
885
+ this.reload = output();
886
+ this.errorMessage = computed(() => getInputErrorMessage(this.inputConfig(), this.formGroup()), ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
887
+ }
888
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputInputElementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
889
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MultipleInputInputElementComponent, isStandalone: true, selector: "lib-multiple-input-input-element", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { reload: "reload" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field\r\n class=\"multiple-input-field\"\r\n [appearance]=\"inputConfig.appearance || 'fill'\"\r\n subscriptSizing=\"dynamic\"\r\n floatLabel=\"always\"\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 @if (inputConfig.id) {\r\n <lib-multiple-input-table\r\n [editorMode]=\"editorMode()\"\r\n [required]=\"inputConfig.required\"\r\n [formGroup]=\"formGroup()\"\r\n [formBuilderFunctions]=\"formBuilderFunctions()\"\r\n [formControlName]=\"inputConfig.id\"\r\n [inputConfig]=\"inputConfig\"\r\n ></lib-multiple-input-table>\r\n }\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 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>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 class=\"affix-text\" matPrefix>{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span class=\"affix-text affix-text--suffix\" matSuffix>{{ 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", styles: [":host{display:block}.multiple-input-field{width:100%}.affix-text{top:0;color:var(--mat-sys-on-surface-variant, #49454f);font-size:.8125rem}.affix-text--suffix{padding-left:.3125rem}.input-sync-button{margin-right:.25rem;opacity:0;transform:scale(.85);pointer-events:none;transition:opacity .3s cubic-bezier(.16,1,.3,1),transform .3s cubic-bezier(.16,1,.3,1)}.input-sync-button mat-icon{color:var(--mat-sys-primary, #6750a4)}.multiple-input-field:hover .input-sync-button,.multiple-input-field:focus-within .input-sync-button{opacity:1;transform:scale(1);pointer-events:auto}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }, { kind: "component", type: MultipleInputTableComponent, selector: "lib-multiple-input-table", inputs: ["editorMode", "formGroup", "inputConfig", "formBuilderFunctions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
890
+ }
891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MultipleInputInputElementComponent, decorators: [{
892
+ type: Component,
893
+ args: [{ selector: 'lib-multiple-input-input-element', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
894
+ ReactiveFormsModule,
895
+ MatFormFieldModule,
896
+ MatIconModule,
897
+ MatButtonModule,
898
+ MatTooltipModule,
899
+ TFormInputStatusComponent,
900
+ MultipleInputTableComponent,
901
+ ], template: "<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field\r\n class=\"multiple-input-field\"\r\n [appearance]=\"inputConfig.appearance || 'fill'\"\r\n subscriptSizing=\"dynamic\"\r\n floatLabel=\"always\"\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 @if (inputConfig.id) {\r\n <lib-multiple-input-table\r\n [editorMode]=\"editorMode()\"\r\n [required]=\"inputConfig.required\"\r\n [formGroup]=\"formGroup()\"\r\n [formBuilderFunctions]=\"formBuilderFunctions()\"\r\n [formControlName]=\"inputConfig.id\"\r\n [inputConfig]=\"inputConfig\"\r\n ></lib-multiple-input-table>\r\n }\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 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>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 class=\"affix-text\" matPrefix>{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span class=\"affix-text affix-text--suffix\" matSuffix>{{ 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", styles: [":host{display:block}.multiple-input-field{width:100%}.affix-text{top:0;color:var(--mat-sys-on-surface-variant, #49454f);font-size:.8125rem}.affix-text--suffix{padding-left:.3125rem}.input-sync-button{margin-right:.25rem;opacity:0;transform:scale(.85);pointer-events:none;transition:opacity .3s cubic-bezier(.16,1,.3,1),transform .3s cubic-bezier(.16,1,.3,1)}.input-sync-button mat-icon{color:var(--mat-sys-primary, #6750a4)}.multiple-input-field:hover .input-sync-button,.multiple-input-field:focus-within .input-sync-button{opacity:1;transform:scale(1);pointer-events:auto}\n"] }]
902
+ }], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], editorMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorMode", required: false }] }], formBuilderFunctions: [{ type: i0.Input, args: [{ isSignal: true, alias: "formBuilderFunctions", required: false }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
903
+
904
+ export { MultipleInputInputElementComponent };
905
+ //# sourceMappingURL=ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map