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 @@
1
+ {"version":3,"file":"ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/selection-options-editor/selection-options-editor.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/selection-options-editor/selection-options-editor.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n PLATFORM_ID,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\r\nimport {\r\n FormControl,\r\n FormGroup,\r\n NonNullableFormBuilder,\r\n ReactiveFormsModule,\r\n Validators,\r\n} from '@angular/forms';\r\n\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\n\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\nimport { EmptyStateComponent } from '../_shared/empty-state/empty-state.component';\r\n\r\n/** A single selectable option managed by the editor. */\r\ninterface Option {\r\n /** Stable identifier, generated once per option and never reassigned. */\r\n id: string;\r\n /** Display text the end user sees in the rendered form. */\r\n label: string;\r\n /** Stored value persisted when the option is chosen. */\r\n value: string;\r\n}\r\n\r\n/** Reactive form shape backing the add/edit card. */\r\ntype OptionForm = FormGroup<{\r\n label: FormControl<string>;\r\n value: FormControl<string>;\r\n}>;\r\n\r\nlet nextUniqueId = 0;\r\n\r\n/**\r\n * Editor for a list of selectable `{ id, label, value }` options. Renders inside\r\n * `t-dynamic-data-edit`, which supplies the field label, hint, and validation\r\n * errors — so this component owns only the chip list plus the add/edit card.\r\n *\r\n * @example\r\n * <lib-selection-options-editor\r\n * [options]=\"options()\"\r\n * [disabled]=\"disabled()\"\r\n * (valueChanged)=\"onOptions($event)\" />\r\n */\r\n@Component({\r\n selector: 'lib-selection-options-editor',\r\n templateUrl: './selection-options-editor.component.html',\r\n styleUrl: './selection-options-editor.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n 'class': 'lib-selection-options-editor',\r\n '[attr.id]': 'hostId',\r\n },\r\n imports: [\r\n ReactiveFormsModule,\r\n MatButtonModule,\r\n MatCardModule,\r\n MatChipsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatToolbarModule,\r\n MatTooltipModule,\r\n EmptyStateComponent,\r\n ],\r\n})\r\nexport class SelectionOptionsEditorComponent {\r\n /** Validation errors surfaced by the parent (kept for contract parity). */\r\n readonly errors = input<IConfigElementError[] | undefined>([]);\r\n\r\n /** Disables interaction with the chip list and the add control. */\r\n readonly disabled = input<boolean>(false);\r\n\r\n /** Current set of options to edit. */\r\n readonly options = input<readonly Option[]>([]);\r\n\r\n /** Fires the full option list whenever it is added to, edited, or pruned. */\r\n readonly valueChanged = output<Option[]>();\r\n\r\n /** Stable host id used by the parent's `[attr.id]` binding. */\r\n readonly hostId = `app-selection-options-editor-${nextUniqueId++}`;\r\n\r\n readonly #platformId = inject(PLATFORM_ID);\r\n readonly #document = inject(DOCUMENT);\r\n readonly #fb = inject(NonNullableFormBuilder);\r\n\r\n /** Option being edited (existing) or added (no id yet); `null` when closed. */\r\n protected readonly inEdit = signal<Option | null>(null);\r\n\r\n /** Whether the editor is in \"add new\" mode (open card, no existing id). */\r\n protected readonly isAdding = signal<boolean>(false);\r\n\r\n /** When true, an empty value auto-fills from the camelCased label on blur. */\r\n protected readonly isAutoCamelCase = signal<boolean>(true);\r\n\r\n /** Live snapshot of the upstream options, defensively normalised to an array. */\r\n protected readonly optionList = computed<readonly Option[]>(() => this.options() ?? []);\r\n\r\n /** Whether the add/edit card is currently open. */\r\n protected readonly isEditing = computed<boolean>(\r\n () => this.isAdding() || this.inEdit() !== null,\r\n );\r\n\r\n /** Reactive form for the open add/edit card. */\r\n protected readonly form: OptionForm = this.#fb.group({\r\n label: this.#fb.control('', Validators.required),\r\n value: this.#fb.control('', Validators.required),\r\n });\r\n\r\n /** Opens the card to add a new option. */\r\n protected add(): void {\r\n this.inEdit.set(null);\r\n this.isAdding.set(true);\r\n this.#resetForm('', '');\r\n }\r\n\r\n /** Opens the card to edit an existing option. */\r\n protected startEdit(option: Option): void {\r\n this.isAdding.set(false);\r\n this.inEdit.set(option);\r\n this.#resetForm(option.label, option.value);\r\n }\r\n\r\n /** Closes the card without persisting changes. */\r\n protected closeEdit(): void {\r\n this.inEdit.set(null);\r\n this.isAdding.set(false);\r\n }\r\n\r\n /** Removes an option after browser confirmation, then emits the new list. */\r\n protected remove(option: Option): void {\r\n if (!isPlatformBrowser(this.#platformId)) return;\r\n const win = this.#document.defaultView;\r\n if (!win) return;\r\n if (!win.confirm(`Are you sure you want to delete the option \"${option.label}\"?`)) return;\r\n\r\n this.valueChanged.emit(this.optionList().filter((o) => o.id !== option.id));\r\n if (this.inEdit()?.id === option.id) this.closeEdit();\r\n }\r\n\r\n /** Persists the open card as a new or updated option, then emits the list. */\r\n protected save(): void {\r\n if (this.form.invalid) return;\r\n\r\n const { label, value } = this.form.getRawValue();\r\n const editing = this.inEdit();\r\n const next = editing\r\n ? this.optionList().map((o) => (o.id === editing.id ? { ...o, label, value } : o))\r\n : [...this.optionList(), { id: uuidv4(), label, value }];\r\n\r\n this.valueChanged.emit(next);\r\n this.closeEdit();\r\n }\r\n\r\n /** Toggles auto-camelCase generation of an empty value from the label. */\r\n protected toggleAutoCamelCase(): void {\r\n this.isAutoCamelCase.update((on) => !on);\r\n }\r\n\r\n /**\r\n * Fills an empty `value` with the camelCased `label` on label blur. A value\r\n * the user already set is never overwritten.\r\n */\r\n protected autoFillValueFromLabel(): void {\r\n if (!this.isAutoCamelCase()) return;\r\n const label = this.form.controls.label.value.trim();\r\n if (label && !this.form.controls.value.value) {\r\n this.form.controls.value.setValue(this.#camelCase(label));\r\n }\r\n }\r\n\r\n /** Resets the form to the supplied label/value pair. */\r\n #resetForm(label: string, value: string): void {\r\n this.form.reset({ label, value });\r\n }\r\n\r\n /** Native camelCase: identical output to the previous lodash dependency. */\r\n #camelCase(input: string): string {\r\n const words = input\r\n .replace(/[^A-Za-z0-9]+/g, ' ')\r\n .replace(/([a-z0-9])([A-Z])/g, '$1 $2')\r\n .trim()\r\n .toLowerCase()\r\n .split(/\\s+/)\r\n .filter((w) => w.length > 0);\r\n return words\r\n .map((word, i) => (i === 0 ? word : word.charAt(0).toUpperCase() + word.slice(1)))\r\n .join('');\r\n }\r\n}\r\n","@if (optionList().length) {\r\n <mat-chip-listbox\r\n class=\"lib-selection-options-editor__listbox\"\r\n aria-label=\"Option selection\"\r\n [disabled]=\"disabled()\">\r\n @for (option of optionList(); track option.id) {\r\n <mat-chip-option\r\n class=\"lib-selection-options-editor__chip\"\r\n color=\"accent\"\r\n [value]=\"option.value\"\r\n [selected]=\"inEdit()?.id === option.id\"\r\n (click)=\"startEdit(option)\">\r\n {{ option.label }}\r\n <button\r\n matChipRemove\r\n [attr.aria-label]=\"'Remove ' + option.label\"\r\n (click)=\"$event.stopPropagation(); remove(option)\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-option>\r\n }\r\n </mat-chip-listbox>\r\n} @else if (!isEditing()) {\r\n <lib-empty-state icon=\"list_alt\" message=\"No options yet\" />\r\n}\r\n\r\n@if (!isEditing()) {\r\n <mat-toolbar class=\"lib-selection-options-editor__toolbar\">\r\n <button\r\n class=\"lib-selection-options-editor__add\"\r\n mat-stroked-button\r\n [disabled]=\"disabled()\"\r\n (click)=\"add()\">\r\n Add an option <mat-icon>add</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n} @else {\r\n <mat-card class=\"lib-selection-options-editor__card\" appearance=\"outlined\">\r\n <mat-card-header>\r\n <mat-card-subtitle>{{ inEdit() ? 'Edit Option' : 'Add New Option' }}</mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <mat-card-content>\r\n <form [formGroup]=\"form\">\r\n <mat-form-field\r\n class=\"lib-selection-options-editor__field\"\r\n subscriptSizing=\"dynamic\"\r\n floatLabel=\"always\"\r\n appearance=\"outline\">\r\n <mat-label>Display Text</mat-label>\r\n <input\r\n type=\"text\"\r\n matInput\r\n formControlName=\"label\"\r\n placeholder=\"Enter option text\"\r\n (blur)=\"autoFillValueFromLabel()\" />\r\n <mat-hint>The text users will see and select from the list.</mat-hint>\r\n </mat-form-field>\r\n\r\n <mat-form-field\r\n class=\"lib-selection-options-editor__field\"\r\n subscriptSizing=\"dynamic\"\r\n floatLabel=\"always\"\r\n appearance=\"outline\">\r\n <mat-label>Stored Value</mat-label>\r\n <input type=\"text\" matInput formControlName=\"value\" placeholder=\"Enter data value\" />\r\n <button\r\n matSuffix\r\n mat-icon-button\r\n matTooltip=\"Toggle auto-creation of value from display text\"\r\n [color]=\"isAutoCamelCase() ? 'primary' : ''\"\r\n (click)=\"toggleAutoCamelCase()\">\r\n <mat-icon>{{ isAutoCamelCase() ? 'drive_file_rename_outline' : 'edit_off' }}</mat-icon>\r\n </button>\r\n <mat-hint>The value saved when this option is chosen. (Often an ID or code)</mat-hint>\r\n </mat-form-field>\r\n </form>\r\n </mat-card-content>\r\n\r\n <mat-card-actions>\r\n <button mat-button (click)=\"closeEdit()\">Cancel</button>\r\n <button mat-flat-button [disabled]=\"form.invalid\" (click)=\"save()\">\r\n {{ inEdit() ? 'Save Changes' : 'Add Option' }}\r\n </button>\r\n </mat-card-actions>\r\n </mat-card>\r\n}\r\n"],"names":["uuidv4","i5","i6","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkDA,IAAI,YAAY,GAAG,CAAC;AAEpB;;;;;;;;;;AAUG;MAwBU,+BAA+B,CAAA;AAvB5C,IAAA,WAAA,GAAA;;AAyBW,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAoC,EAAE,6EAAC;;AAGrD,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;;AAGhC,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAoB,EAAE,8EAAC;;QAGtC,IAAA,CAAA,YAAY,GAAG,MAAM,EAAY;;AAGjC,QAAA,IAAA,CAAA,MAAM,GAAG,CAAA,6BAAA,EAAgC,YAAY,EAAE,EAAE;AAEzD,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC5B,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,sBAAsB,CAAC;;AAG1B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAgB,IAAI,6EAAC;;AAGpC,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAU,KAAK,+EAAC;;AAGjC,QAAA,IAAA,CA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A,UAAA,EAAA,CAAA;kBAvB3C,SAAS;+BACE,8BAA8B,EAAA,eAAA,EAGvB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;AACJ,wBAAA,OAAO,EAAE,8BAA8B;AACvC,wBAAA,WAAW,EAAE,QAAQ;qBACtB,EAAA,OAAA,EACQ;wBACP,mBAAmB;wBACnB,eAAe;wBACf,aAAa;wBACb,cAAc;wBACd,kBAAkB;wBAClB,aAAa;wBACb,cAAc;wBACd,gBAAgB;wBAChB,gBAAgB;wBAChB,mBAAmB;AACpB,qBAAA,EAAA,QAAA,EAAA,6yGAAA,EAAA,MAAA,EAAA,CAAA,2sBAAA,CAAA,EAAA;;;;;"}
@@ -222,7 +222,7 @@ class TWorkflowPickerComponent {
222
222
  .subscribe((workflows) => this.#workflows.set(workflows ?? []));
223
223
  }
224
224
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TWorkflowPickerComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
225
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TWorkflowPickerComponent, isStandalone: true, selector: "lib-t-workflow-picker", inputs: { disabled: "disabled", errors: "errors", required: "required", value: "value", placeholder: "placeholder", getWorkflowOptions: "getWorkflowOptions" }, outputs: { valueChanged: "valueChanged", workflowNameChanged: "workflowNameChanged" }, host: { properties: { "attr.id": "id", "attr.aria-describedby": "describedBy", "class.floating": "shouldLabelFloat" } }, providers: [{ provide: MatFormFieldControl, useExisting: TWorkflowPickerComponent }], ngImport: i0, template: "<mat-toolbar class=\"lib-t-workflow-picker__bar\">\n @if (error()) {\n <span class=\"lib-t-workflow-picker__bar-label\">Failed to load workflow list</span>\n <span class=\"lib-t-workflow-picker__spacer\"></span>\n <button type=\"button\" color=\"primary\" mat-raised-button (click)=\"loadWorkflows()\">\n Retry\n <mat-icon>refresh</mat-icon>\n </button>\n } @else {\n <span class=\"lib-t-workflow-picker__bar-label\">Reload workflows</span>\n <span class=\"lib-t-workflow-picker__spacer\"></span>\n <button type=\"button\" mat-stroked-button (click)=\"loadWorkflows()\">\n Reload\n <mat-icon>refresh</mat-icon>\n </button>\n }\n</mat-toolbar>\n\n@if (loading()) {\n <div class=\"lib-t-workflow-picker__loading\">\n <mat-spinner diameter=\"40\" />\n </div>\n} @else if (!error()) {\n <mat-card>\n <mat-nav-list class=\"lib-t-workflow-picker__list\">\n @for (row of rows(); track row.option.id) {\n <mat-list-item (click)=\"select(row)\">\n <mat-chip class=\"docType\" [attr.data-kind]=\"row.kind\" matListItemIcon>\n <span class=\"lib-t-workflow-picker__chip-label\">{{ row.label }}</span>\n </mat-chip>\n\n <div matListItemTitle>\n <div>{{ row.option.name }}</div>\n <div class=\"lib-t-workflow-picker__meta\">\n {{ row.option.createdAt | date: 'medium' }} &nbsp; {{ row.option.numberOfSteps }}\n </div>\n </div>\n\n <button\n type=\"button\"\n matListItemMeta\n mat-icon-button\n [attr.aria-label]=\"\n row.selected ? 'Clear selected workflow' : 'Select ' + row.option.name\n \">\n <mat-icon [color]=\"row.selected ? 'primary' : undefined\">\n {{ row.selected ? 'check_circle' : 'radio_button_unchecked' }}\n </mat-icon>\n </button>\n </mat-list-item>\n\n @if (!$last) {\n <mat-divider />\n }\n } @empty {\n <div class=\"lib-t-workflow-picker__empty\">No workflows available.</div>\n }\n </mat-nav-list>\n </mat-card>\n}\n", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}.docType[data-kind=doc]{background:var(--lib-forms-workflow-chip-doc, lightskyblue)}.docType[data-kind=in-out]{background:var(--lib-forms-workflow-chip-in-out, antiquewhite)}mat-card{margin-bottom:8px;background:var(--mat-sys-surface-container, var(--mat-app-surface))}.lib-t-workflow-picker__bar-label{font-size:.75rem}.lib-t-workflow-picker__spacer{flex:1 1 auto}.lib-t-workflow-picker__loading{display:flex;align-items:center;justify-content:center;padding:2rem}.lib-t-workflow-picker__list{padding:0}.lib-t-workflow-picker__chip-label{font-size:.625em}.lib-t-workflow-picker__meta{font-size:.8125em;line-height:normal;opacity:.6}.lib-t-workflow-picker__empty{padding:2rem;font-size:.9375rem;text-align:center;opacity:.6}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { 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: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "ngmodule", type: MatDividerModule }, { 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: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
225
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TWorkflowPickerComponent, isStandalone: true, selector: "lib-t-workflow-picker", inputs: { disabled: "disabled", errors: "errors", required: "required", value: "value", placeholder: "placeholder", getWorkflowOptions: "getWorkflowOptions" }, outputs: { valueChanged: "valueChanged", workflowNameChanged: "workflowNameChanged" }, host: { properties: { "attr.id": "id", "attr.aria-describedby": "describedBy", "class.floating": "shouldLabelFloat" } }, providers: [{ provide: MatFormFieldControl, useExisting: TWorkflowPickerComponent }], ngImport: i0, template: "<mat-toolbar class=\"lib-t-workflow-picker__bar\">\r\n @if (error()) {\r\n <span class=\"lib-t-workflow-picker__bar-label\">Failed to load workflow list</span>\r\n <span class=\"lib-t-workflow-picker__spacer\"></span>\r\n <button type=\"button\" color=\"primary\" mat-raised-button (click)=\"loadWorkflows()\">\r\n Retry\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n } @else {\r\n <span class=\"lib-t-workflow-picker__bar-label\">Reload workflows</span>\r\n <span class=\"lib-t-workflow-picker__spacer\"></span>\r\n <button type=\"button\" mat-stroked-button (click)=\"loadWorkflows()\">\r\n Reload\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n\r\n@if (loading()) {\r\n <div class=\"lib-t-workflow-picker__loading\">\r\n <mat-spinner diameter=\"40\" />\r\n </div>\r\n} @else if (!error()) {\r\n <mat-card>\r\n <mat-nav-list class=\"lib-t-workflow-picker__list\">\r\n @for (row of rows(); track row.option.id) {\r\n <mat-list-item (click)=\"select(row)\">\r\n <mat-chip class=\"docType\" [attr.data-kind]=\"row.kind\" matListItemIcon>\r\n <span class=\"lib-t-workflow-picker__chip-label\">{{ row.label }}</span>\r\n </mat-chip>\r\n\r\n <div matListItemTitle>\r\n <div>{{ row.option.name }}</div>\r\n <div class=\"lib-t-workflow-picker__meta\">\r\n {{ row.option.createdAt | date: 'medium' }} &nbsp; {{ row.option.numberOfSteps }}\r\n </div>\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n matListItemMeta\r\n mat-icon-button\r\n [attr.aria-label]=\"\r\n row.selected ? 'Clear selected workflow' : 'Select ' + row.option.name\r\n \">\r\n <mat-icon [color]=\"row.selected ? 'primary' : undefined\">\r\n {{ row.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </button>\r\n </mat-list-item>\r\n\r\n @if (!$last) {\r\n <mat-divider />\r\n }\r\n } @empty {\r\n <div class=\"lib-t-workflow-picker__empty\">No workflows available.</div>\r\n }\r\n </mat-nav-list>\r\n </mat-card>\r\n}\r\n", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}.docType[data-kind=doc]{background:var(--lib-forms-workflow-chip-doc, lightskyblue)}.docType[data-kind=in-out]{background:var(--lib-forms-workflow-chip-in-out, antiquewhite)}mat-card{margin-bottom:8px;background:var(--mat-sys-surface-container, var(--mat-app-surface))}.lib-t-workflow-picker__bar-label{font-size:.75rem}.lib-t-workflow-picker__spacer{flex:1 1 auto}.lib-t-workflow-picker__loading{display:flex;align-items:center;justify-content:center;padding:2rem}.lib-t-workflow-picker__list{padding:0}.lib-t-workflow-picker__chip-label{font-size:.625em}.lib-t-workflow-picker__meta{font-size:.8125em;line-height:normal;opacity:.6}.lib-t-workflow-picker__empty{padding:2rem;font-size:.9375rem;text-align:center;opacity:.6}\n"], dependencies: [{ kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { 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: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i6.MatListItemIcon, selector: "[matListItemIcon]" }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i6.MatListItemMeta, selector: "[matListItemMeta]" }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["role", "id", "aria-label", "aria-description", "value", "color", "removable", "highlighted", "disableRipple", "disabled"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "ngmodule", type: MatDividerModule }, { 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: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
226
226
  }
227
227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TWorkflowPickerComponent, decorators: [{
228
228
  type: Component,
@@ -240,7 +240,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
240
240
  '[attr.id]': 'id',
241
241
  '[attr.aria-describedby]': 'describedBy',
242
242
  '[class.floating]': 'shouldLabelFloat',
243
- }, template: "<mat-toolbar class=\"lib-t-workflow-picker__bar\">\n @if (error()) {\n <span class=\"lib-t-workflow-picker__bar-label\">Failed to load workflow list</span>\n <span class=\"lib-t-workflow-picker__spacer\"></span>\n <button type=\"button\" color=\"primary\" mat-raised-button (click)=\"loadWorkflows()\">\n Retry\n <mat-icon>refresh</mat-icon>\n </button>\n } @else {\n <span class=\"lib-t-workflow-picker__bar-label\">Reload workflows</span>\n <span class=\"lib-t-workflow-picker__spacer\"></span>\n <button type=\"button\" mat-stroked-button (click)=\"loadWorkflows()\">\n Reload\n <mat-icon>refresh</mat-icon>\n </button>\n }\n</mat-toolbar>\n\n@if (loading()) {\n <div class=\"lib-t-workflow-picker__loading\">\n <mat-spinner diameter=\"40\" />\n </div>\n} @else if (!error()) {\n <mat-card>\n <mat-nav-list class=\"lib-t-workflow-picker__list\">\n @for (row of rows(); track row.option.id) {\n <mat-list-item (click)=\"select(row)\">\n <mat-chip class=\"docType\" [attr.data-kind]=\"row.kind\" matListItemIcon>\n <span class=\"lib-t-workflow-picker__chip-label\">{{ row.label }}</span>\n </mat-chip>\n\n <div matListItemTitle>\n <div>{{ row.option.name }}</div>\n <div class=\"lib-t-workflow-picker__meta\">\n {{ row.option.createdAt | date: 'medium' }} &nbsp; {{ row.option.numberOfSteps }}\n </div>\n </div>\n\n <button\n type=\"button\"\n matListItemMeta\n mat-icon-button\n [attr.aria-label]=\"\n row.selected ? 'Clear selected workflow' : 'Select ' + row.option.name\n \">\n <mat-icon [color]=\"row.selected ? 'primary' : undefined\">\n {{ row.selected ? 'check_circle' : 'radio_button_unchecked' }}\n </mat-icon>\n </button>\n </mat-list-item>\n\n @if (!$last) {\n <mat-divider />\n }\n } @empty {\n <div class=\"lib-t-workflow-picker__empty\">No workflows available.</div>\n }\n </mat-nav-list>\n </mat-card>\n}\n", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}.docType[data-kind=doc]{background:var(--lib-forms-workflow-chip-doc, lightskyblue)}.docType[data-kind=in-out]{background:var(--lib-forms-workflow-chip-in-out, antiquewhite)}mat-card{margin-bottom:8px;background:var(--mat-sys-surface-container, var(--mat-app-surface))}.lib-t-workflow-picker__bar-label{font-size:.75rem}.lib-t-workflow-picker__spacer{flex:1 1 auto}.lib-t-workflow-picker__loading{display:flex;align-items:center;justify-content:center;padding:2rem}.lib-t-workflow-picker__list{padding:0}.lib-t-workflow-picker__chip-label{font-size:.625em}.lib-t-workflow-picker__meta{font-size:.8125em;line-height:normal;opacity:.6}.lib-t-workflow-picker__empty{padding:2rem;font-size:.9375rem;text-align:center;opacity:.6}\n"] }]
243
+ }, template: "<mat-toolbar class=\"lib-t-workflow-picker__bar\">\r\n @if (error()) {\r\n <span class=\"lib-t-workflow-picker__bar-label\">Failed to load workflow list</span>\r\n <span class=\"lib-t-workflow-picker__spacer\"></span>\r\n <button type=\"button\" color=\"primary\" mat-raised-button (click)=\"loadWorkflows()\">\r\n Retry\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n } @else {\r\n <span class=\"lib-t-workflow-picker__bar-label\">Reload workflows</span>\r\n <span class=\"lib-t-workflow-picker__spacer\"></span>\r\n <button type=\"button\" mat-stroked-button (click)=\"loadWorkflows()\">\r\n Reload\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n\r\n@if (loading()) {\r\n <div class=\"lib-t-workflow-picker__loading\">\r\n <mat-spinner diameter=\"40\" />\r\n </div>\r\n} @else if (!error()) {\r\n <mat-card>\r\n <mat-nav-list class=\"lib-t-workflow-picker__list\">\r\n @for (row of rows(); track row.option.id) {\r\n <mat-list-item (click)=\"select(row)\">\r\n <mat-chip class=\"docType\" [attr.data-kind]=\"row.kind\" matListItemIcon>\r\n <span class=\"lib-t-workflow-picker__chip-label\">{{ row.label }}</span>\r\n </mat-chip>\r\n\r\n <div matListItemTitle>\r\n <div>{{ row.option.name }}</div>\r\n <div class=\"lib-t-workflow-picker__meta\">\r\n {{ row.option.createdAt | date: 'medium' }} &nbsp; {{ row.option.numberOfSteps }}\r\n </div>\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n matListItemMeta\r\n mat-icon-button\r\n [attr.aria-label]=\"\r\n row.selected ? 'Clear selected workflow' : 'Select ' + row.option.name\r\n \">\r\n <mat-icon [color]=\"row.selected ? 'primary' : undefined\">\r\n {{ row.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </button>\r\n </mat-list-item>\r\n\r\n @if (!$last) {\r\n <mat-divider />\r\n }\r\n } @empty {\r\n <div class=\"lib-t-workflow-picker__empty\">No workflows available.</div>\r\n }\r\n </mat-nav-list>\r\n </mat-card>\r\n}\r\n", styles: [".suggestion-container{display:flex;width:100%;gap:14px}.docType{width:min-content;margin-top:auto!important;margin-bottom:auto!important}.docType[data-kind=doc]{background:var(--lib-forms-workflow-chip-doc, lightskyblue)}.docType[data-kind=in-out]{background:var(--lib-forms-workflow-chip-in-out, antiquewhite)}mat-card{margin-bottom:8px;background:var(--mat-sys-surface-container, var(--mat-app-surface))}.lib-t-workflow-picker__bar-label{font-size:.75rem}.lib-t-workflow-picker__spacer{flex:1 1 auto}.lib-t-workflow-picker__loading{display:flex;align-items:center;justify-content:center;padding:2rem}.lib-t-workflow-picker__list{padding:0}.lib-t-workflow-picker__chip-label{font-size:.625em}.lib-t-workflow-picker__meta{font-size:.8125em;line-height:normal;opacity:.6}.lib-t-workflow-picker__empty{padding:2rem;font-size:.9375rem;text-align:center;opacity:.6}\n"] }]
244
244
  }], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
245
245
  type: Optional
246
246
  }, {
@@ -260,4 +260,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
260
260
  }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], workflowNameChanged: [{ type: i0.Output, args: ["workflowNameChanged"] }] } });
261
261
 
262
262
  export { TWorkflowPickerComponent };
263
- //# sourceMappingURL=ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs.map
263
+ //# sourceMappingURL=ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/t-workflow-picker/t-workflow-picker.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n Input,\r\n Optional,\r\n Self,\r\n ViewEncapsulation,\r\n computed,\r\n inject,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\n\r\nimport { DatePipe } from '@angular/common';\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatToolbarModule } from '@angular/material/toolbar';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatCardModule } from '@angular/material/card';\r\nimport { MatListModule } from '@angular/material/list';\r\nimport { MatChipsModule } from '@angular/material/chips';\r\nimport { MatDividerModule } from '@angular/material/divider';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\nimport { EMPTY, Observable, Subject, Subscription, catchError, finalize, take } from 'rxjs';\r\n\r\nimport type { IWorkflowOption } from 'ngx-t-forms-types';\r\nimport type { IConfigElementError } from '../../t-dynamic-data-edit.component';\r\n\r\n/** Chip variant rendered beside a workflow row. */\r\nexport type WorkflowRowKind = 'in-out' | 'doc' | 'flow';\r\n\r\n/** Pre-computed view model for one workflow row — keeps the template free of logic. */\r\nexport interface WorkflowRow {\r\n readonly option: IWorkflowOption;\r\n readonly kind: WorkflowRowKind;\r\n readonly label: string;\r\n readonly selected: boolean;\r\n}\r\n\r\nconst KIND_LABELS: Readonly<Record<WorkflowRowKind, string>> = {\r\n 'in-out': 'IN/OUT',\r\n doc: 'DOC',\r\n flow: 'FLOW',\r\n};\r\n\r\nfunction toRow(option: IWorkflowOption, selected: boolean): WorkflowRow {\r\n const kind: WorkflowRowKind = option.isCheckInCheckOut\r\n ? 'in-out'\r\n : option.isDocument\r\n ? 'doc'\r\n : 'flow';\r\n return { option, kind, label: KIND_LABELS[kind], selected };\r\n}\r\n\r\n/**\r\n * Picks a single workflow from a consumer-supplied stream of options.\r\n *\r\n * Rendered state (`loading`, `error`, the option list and the current selection)\r\n * is signal-backed: the options stream resolves outside any template event, so a\r\n * plain field write would never mark this OnPush view dirty and the spinner would\r\n * hang until an unrelated change-detection pass happened to sweep it up.\r\n */\r\n@Component({\r\n selector: 'lib-t-workflow-picker',\r\n imports: [\r\n DatePipe,\r\n MatToolbarModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n MatCardModule,\r\n MatListModule,\r\n MatChipsModule,\r\n MatDividerModule,\r\n MatProgressSpinnerModule,\r\n ],\r\n templateUrl: './t-workflow-picker.component.html',\r\n styleUrl: './t-workflow-picker.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n providers: [{ provide: MatFormFieldControl, useExisting: TWorkflowPickerComponent }],\r\n host: {\r\n '[attr.id]': 'id',\r\n '[attr.aria-describedby]': 'describedBy',\r\n '[class.floating]': 'shouldLabelFloat',\r\n },\r\n})\r\nexport class TWorkflowPickerComponent implements MatFormFieldControl<string | undefined> {\r\n static nextId = 0;\r\n\r\n readonly stateChanges = new Subject<void>();\r\n focused = false;\r\n touched = false;\r\n @Input() disabled = false;\r\n readonly controlType = 'lib-t-workflow-picker';\r\n readonly autofilled = false;\r\n\r\n @Input() errors: IConfigElementError[] | undefined = [];\r\n\r\n private _required = false;\r\n @Input()\r\n get required(): boolean {\r\n return this._required;\r\n }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n /**\r\n * Signal-backed so the template re-renders when the parent pushes a value back\r\n * down (or a reactive form calls `writeValue`) rather than only on a click.\r\n */\r\n readonly #value = signal<string | undefined>(undefined);\r\n\r\n @Input()\r\n get value(): string | undefined {\r\n return this.#value();\r\n }\r\n set value(val: string | undefined) {\r\n if (this.#value() === val) return;\r\n this.#value.set(val);\r\n this.onChange(val);\r\n this.stateChanges.next();\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string = '';\r\n\r\n readonly id = `lib-t-workflow-picker-${TWorkflowPickerComponent.nextId++}`;\r\n describedBy = '';\r\n get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n get empty(): boolean {\r\n return !this.value || this.value.length === 0;\r\n }\r\n\r\n get errorState(): boolean {\r\n return (\r\n (!this.value && this.required && this.touched) ||\r\n !!this.ngControl?.errors ||\r\n (this.errors || []).length > 0\r\n );\r\n }\r\n\r\n readonly #elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\r\n readonly #destroyRef = inject(DestroyRef);\r\n\r\n constructor(@Optional() @Self() public ngControl: NgControl) {\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n // ControlValueAccessor methods — Angular's CVA contract accepts any callback signature.\r\n // TODO(Phase-4): revisit once Angular tightens CVA generics upstream.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onChange: (val: any) => void = () => {};\r\n onTouched: () => void = () => {};\r\n\r\n writeValue(value: string | undefined): void {\r\n this.#value.set(value);\r\n this.stateChanges.next();\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n registerOnChange(fn: (val: any) => void): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: () => void): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n this.stateChanges.next();\r\n }\r\n\r\n // MatFormFieldControl methods\r\n setDescribedByIds(ids: string[]): void {\r\n const element = this.#elementRef?.nativeElement;\r\n if (element) {\r\n element.setAttribute('aria-describedby', ids.join(' '));\r\n }\r\n }\r\n\r\n onContainerClick(_event: MouseEvent): void {\r\n if (!this.focused) {\r\n this.focused = true;\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n markAsTouched(): void {\r\n if (!this.touched) {\r\n this.touched = true;\r\n this.onTouched();\r\n this.stateChanges.next();\r\n }\r\n }\r\n\r\n // ---- Workflow options ----------------------------------------------------\r\n\r\n #source: Observable<IWorkflowOption[] | undefined> | undefined;\r\n #loadRequested = false;\r\n #inFlight: Subscription | undefined;\r\n\r\n /**\r\n * Stream of selectable workflows.\r\n *\r\n * Parents commonly bind a getter that rebuilds this observable on every change\r\n * detection pass, so a fresh reference must never re-trigger a fetch: the first\r\n * defined source starts the one automatic load, every later load is explicit.\r\n */\r\n @Input() set getWorkflowOptions(value: Observable<IWorkflowOption[] | undefined> | undefined) {\r\n this.#source = value;\r\n if (value && !this.#loadRequested) this.loadWorkflows();\r\n }\r\n\r\n readonly valueChanged = output<string | undefined>();\r\n readonly workflowNameChanged = output<string | undefined>();\r\n\r\n readonly #workflows = signal<readonly IWorkflowOption[]>([]);\r\n readonly #loading = signal(false);\r\n readonly #error = signal<unknown>(undefined);\r\n\r\n protected readonly loading = this.#loading.asReadonly();\r\n protected readonly error = this.#error.asReadonly();\r\n\r\n /**\r\n * Either the single selected row or the full pick list — resolved once per\r\n * state change instead of re-running `find()` on every change detection pass.\r\n * An id that no loaded option matches falls back to the list so the selection\r\n * stays recoverable rather than rendering an empty row.\r\n */\r\n protected readonly rows = computed<readonly WorkflowRow[]>(() => {\r\n const selectedId = this.#value();\r\n const workflows = this.#workflows();\r\n const selected = selectedId\r\n ? workflows.find((option) => option.id === selectedId)\r\n : undefined;\r\n return selected ? [toRow(selected, true)] : workflows.map((option) => toRow(option, false));\r\n });\r\n\r\n /** Toggles the row: selects it, or clears the binding when it is already selected. */\r\n protected select(row: WorkflowRow): void {\r\n if (this.disabled) return;\r\n this.markAsTouched();\r\n\r\n const next = row.selected ? undefined : row.option.id;\r\n this.value = next;\r\n this.valueChanged.emit(next);\r\n this.workflowNameChanged.emit(next ? row.option.name : undefined);\r\n }\r\n\r\n /** (Re)fetches the workflow list, replacing any request still in flight. */\r\n protected loadWorkflows(): void {\r\n const source$ = this.#source;\r\n if (!source$) return;\r\n\r\n this.#inFlight?.unsubscribe();\r\n this.#loadRequested = true;\r\n this.#error.set(undefined);\r\n this.#loading.set(true);\r\n\r\n this.#inFlight = source$\r\n .pipe(\r\n take(1),\r\n catchError((error: unknown) => {\r\n this.#error.set(error);\r\n return EMPTY;\r\n }),\r\n // Clears the spinner on emit, error, completion-without-emit and\r\n // unsubscribe alike — the previous code only cleared it on emit.\r\n finalize(() => this.#loading.set(false)),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe((workflows) => this.#workflows.set(workflows ?? []));\r\n }\r\n}\r\n","<mat-toolbar class=\"lib-t-workflow-picker__bar\">\r\n @if (error()) {\r\n <span class=\"lib-t-workflow-picker__bar-label\">Failed to load workflow list</span>\r\n <span class=\"lib-t-workflow-picker__spacer\"></span>\r\n <button type=\"button\" color=\"primary\" mat-raised-button (click)=\"loadWorkflows()\">\r\n Retry\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n } @else {\r\n <span class=\"lib-t-workflow-picker__bar-label\">Reload workflows</span>\r\n <span class=\"lib-t-workflow-picker__spacer\"></span>\r\n <button type=\"button\" mat-stroked-button (click)=\"loadWorkflows()\">\r\n Reload\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n }\r\n</mat-toolbar>\r\n\r\n@if (loading()) {\r\n <div class=\"lib-t-workflow-picker__loading\">\r\n <mat-spinner diameter=\"40\" />\r\n </div>\r\n} @else if (!error()) {\r\n <mat-card>\r\n <mat-nav-list class=\"lib-t-workflow-picker__list\">\r\n @for (row of rows(); track row.option.id) {\r\n <mat-list-item (click)=\"select(row)\">\r\n <mat-chip class=\"docType\" [attr.data-kind]=\"row.kind\" matListItemIcon>\r\n <span class=\"lib-t-workflow-picker__chip-label\">{{ row.label }}</span>\r\n </mat-chip>\r\n\r\n <div matListItemTitle>\r\n <div>{{ row.option.name }}</div>\r\n <div class=\"lib-t-workflow-picker__meta\">\r\n {{ row.option.createdAt | date: 'medium' }} &nbsp; {{ row.option.numberOfSteps }}\r\n </div>\r\n </div>\r\n\r\n <button\r\n type=\"button\"\r\n matListItemMeta\r\n mat-icon-button\r\n [attr.aria-label]=\"\r\n row.selected ? 'Clear selected workflow' : 'Select ' + row.option.name\r\n \">\r\n <mat-icon [color]=\"row.selected ? 'primary' : undefined\">\r\n {{ row.selected ? 'check_circle' : 'radio_button_unchecked' }}\r\n </mat-icon>\r\n </button>\r\n </mat-list-item>\r\n\r\n @if (!$last) {\r\n <mat-divider />\r\n }\r\n } @empty {\r\n <div class=\"lib-t-workflow-picker__empty\">No workflows available.</div>\r\n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,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAqBC,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAxBpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,uBAAuB,EAAA,OAAA,EACxB;wBACP,QAAQ;wBACR,gBAAgB;wBAChB,eAAe;wBACf,aAAa;wBACb,aAAa;wBACb,aAAa;wBACb,cAAc;wBACd,gBAAgB;wBAChB,wBAAwB;AACzB,qBAAA,EAAA,eAAA,EAGgB,uBAAuB,CAAC,MAAM,iBAChC,iBAAiB,CAAC,QAAQ,EAAA,SAAA,EAC9B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,wBAA0B,EAAE,CAAC,EAAA,IAAA,EAC9E;AACJ,wBAAA,WAAW,EAAE,IAAI;AACjB,wBAAA,yBAAyB,EAAE,aAAa;AACxC,wBAAA,kBAAkB,EAAE,kBAAkB;AACvC,qBAAA,EAAA,QAAA,EAAA,suEAAA,EAAA,MAAA,EAAA,CAAA,i2BAAA,CAAA,EAAA;;0BAwEY;;0BAAY;;sBAhExB;;sBAIA;;sBAGA;;sBAeA;;sBAWA;;sBAkGA;;;;;"}
@@ -10,7 +10,7 @@ import * as i2$2 from '@angular/material/button';
10
10
  import { MatButtonModule } from '@angular/material/button';
11
11
  import * as i5 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
- import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs';
13
+ import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs';
14
14
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
15
15
  import * as i2 from '@angular/material/input';
16
16
  import { MatInputModule } from '@angular/material/input';
@@ -92,4 +92,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
92
92
  }], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
93
93
 
94
94
  export { TextareaInputElementComponent };
95
- //# sourceMappingURL=ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs.map
95
+ //# sourceMappingURL=ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/core/text-area-reactive-input/text-area-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/core/text-area-reactive-input/text-area-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n OnInit,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatAutocomplete } from '@angular/material/autocomplete';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { Subject, debounceTime } from 'rxjs';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-text-area-reactive-input',\r\n nextId: 0,\r\n};\r\n\r\n@Component({\r\n selector: 'lib-text-area-reactive-input',\r\n imports: [\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: TextAreaReactiveInputComponent }],\r\n templateUrl: './text-area-reactive-input.component.html',\r\n styleUrl: './text-area-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class TextAreaReactiveInputComponent extends BaseCustomInput<string | number | Date> implements OnInit {\r\n override get empty(): boolean {\r\n const n = this.value;\r\n // Check for null, undefined, or empty string, but allow 0\r\n return n === null || n === undefined || (n as unknown) === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n readonly auto = input<MatAutocomplete | undefined>(undefined);\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #debounceTime = 300;\r\n readonly #valueSubject = new Subject<Event>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n this.#valueSubject\r\n .pipe(\r\n debounceTime(this.#debounceTime),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(event => {\r\n const target = event.target as HTMLTextAreaElement;\r\n this.value = target.value;\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n });\r\n }\r\n\r\n protected onInputChange($event: Event): void {\r\n this.#valueSubject.next($event);\r\n }\r\n}\r\n","\r\n<textarea\r\n [readonly]=\"inputConfig().readonly || inputConfig().disabled\"\r\n [required]=\"inputConfig().required\"\r\n [attr.maxlength]=\"inputConfig().maxLength\" [attr.minlength]=\"inputConfig().minLength\"\r\n [rows]=\"inputConfig().rows\" [spellcheck]=\"inputConfig().spellcheck\"\r\n [value]=\"value\"\r\n [autocapitalize]=\"inputConfig().autocapitalize\" [autocomplete]=\"inputConfig().autocomplete\"\r\n (input)=\"onInputChange($event)\"\r\n [placeholder]=\"inputConfig().placeholder||''\" [wrap]=\"inputConfig().wrap\" matInput></textarea>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { TextAreaReactiveInputComponent } from './core/text-area-reactive-input/text-area-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive textarea control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-textarea-input-element',\r\n templateUrl: './textarea-input-element.component.html',\r\n styleUrl: './textarea-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n TextAreaReactiveInputComponent,\r\n ],\r\n})\r\nexport class TextareaInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-text-area-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-text-area-reactive-input>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i1","i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WA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A,ssEAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/core/text-area-reactive-input/text-area-reactive-input.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/core/text-area-reactive-input/text-area-reactive-input.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/textarea-input-element/textarea-input-element.component.html"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n OnInit,\r\n ViewEncapsulation,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { NgControl, ReactiveFormsModule } from '@angular/forms';\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatAutocomplete } from '@angular/material/autocomplete';\r\nimport { MatInputModule } from '@angular/material/input';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { Subject, debounceTime } from 'rxjs';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-text-area-reactive-input',\r\n nextId: 0,\r\n};\r\n\r\n@Component({\r\n selector: 'lib-text-area-reactive-input',\r\n imports: [\r\n ReactiveFormsModule,\r\n MatInputModule,\r\n ],\r\n host: {\r\n '[class.floating]': 'shouldLabelFloat',\r\n '[id]': 'id',\r\n },\r\n providers: [{ provide: MatFormFieldControl, useExisting: TextAreaReactiveInputComponent }],\r\n templateUrl: './text-area-reactive-input.component.html',\r\n styleUrl: './text-area-reactive-input.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class TextAreaReactiveInputComponent extends BaseCustomInput<string | number | Date> implements OnInit {\r\n override get empty(): boolean {\r\n const n = this.value;\r\n // Check for null, undefined, or empty string, but allow 0\r\n return n === null || n === undefined || (n as unknown) === '';\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return true;\r\n }\r\n\r\n readonly auto = input<MatAutocomplete | undefined>(undefined);\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n readonly #destroyRef = inject(DestroyRef);\r\n readonly #debounceTime = 300;\r\n readonly #valueSubject = new Subject<Event>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { self: true, optional: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig,\r\n );\r\n }\r\n\r\n ngOnInit(): void {\r\n this.#valueSubject\r\n .pipe(\r\n debounceTime(this.#debounceTime),\r\n takeUntilDestroyed(this.#destroyRef),\r\n )\r\n .subscribe(event => {\r\n const target = event.target as HTMLTextAreaElement;\r\n this.value = target.value;\r\n this.stateChanges.next();\r\n this.onChange(this.value);\r\n });\r\n }\r\n\r\n protected onInputChange($event: Event): void {\r\n this.#valueSubject.next($event);\r\n }\r\n}\r\n","\r\n<textarea\r\n [readonly]=\"inputConfig().readonly || inputConfig().disabled\"\r\n [required]=\"inputConfig().required\"\r\n [attr.maxlength]=\"inputConfig().maxLength\" [attr.minlength]=\"inputConfig().minLength\"\r\n [rows]=\"inputConfig().rows\" [spellcheck]=\"inputConfig().spellcheck\"\r\n [value]=\"value\"\r\n [autocapitalize]=\"inputConfig().autocapitalize\" [autocomplete]=\"inputConfig().autocomplete\"\r\n (input)=\"onInputChange($event)\"\r\n [placeholder]=\"inputConfig().placeholder||''\" [wrap]=\"inputConfig().wrap\" matInput></textarea>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { TextAreaReactiveInputComponent } from './core/text-area-reactive-input/text-area-reactive-input.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/** Wraps a reactive textarea control inside a `mat-form-field`. */\r\n@Component({\r\n selector: 'lib-textarea-input-element',\r\n templateUrl: './textarea-input-element.component.html',\r\n styleUrl: './textarea-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n TextAreaReactiveInputComponent,\r\n ],\r\n})\r\nexport class TextareaInputElementComponent {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n readonly formGroup = input.required<FormGroup>();\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\r\n <mat-label>\r\n {{ inputConfig.label }}\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n\r\n <lib-text-area-reactive-input\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-text-area-reactive-input>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i1","i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,8BAA8B;AAC3C,IAAA,MAAM,EAAE,CAAC;CACV;AAkBK,MAAO,8BAA+B,SAAQ,eAAuC,CAAA;AACzF,IAAA,IAAa,KAAK,GAAA;AAChB,QAAA,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK;;QAEpB,OAAO,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS,IAAK,CAAa,KAAK,EAAE;IAC/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,WAAA,EAAA,IAAA,EAAAC,IAAA,CAAA,aAAA,EAAA,QAAA,EAAA,sFAAA,EAAA,QAAA,EAAA,CAAA,WAAA,EAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACf,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,oBAAA,EAAA,4BAAA,EAAA,oBAAA,EAAA,qBAAA,EAAA,qBAAA,EAAA,yBAAA,EAAA,YAAA,EAAA,iBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAChB,yBAAyB,6FACzB,8BAA8B,EAAA,QAAA,EAAA,8BAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAGrB,6BAA6B,EAAA,UAAA,EAAA,CAAA;kBAfzC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,4BAA4B,EAAA,eAAA,EAGrB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,yBAAyB;wBACzB,8BAA8B;AAC/B,qBAAA,EAAA,QAAA,EAAA,ssEAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
@@ -10,7 +10,7 @@ import * as i2$2 from '@angular/material/button';
10
10
  import { MatButtonModule } from '@angular/material/button';
11
11
  import * as i5 from '@angular/material/tooltip';
12
12
  import { MatTooltipModule } from '@angular/material/tooltip';
13
- import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs';
13
+ import { B as BaseCustomInput, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs';
14
14
  import * as i1 from '@angular/material/slide-toggle';
15
15
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
16
16
  import * as i2 from '@angular/cdk/overlay';
@@ -90,4 +90,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
90
90
  }], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
91
91
 
92
92
  export { ToggleInputElementComponent };
93
- //# sourceMappingURL=ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs.map
93
+ //# sourceMappingURL=ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/core/toggle/toggle.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/core/toggle/toggle.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatSlideToggleChange, MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { TitleCasePipe } from '@angular/common';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-toggle',\r\n nextId: 0\r\n};\r\n\r\n@Component({\r\n selector: 'lib-toggle',\r\n imports: [MatSlideToggleModule, OverlayModule, TitleCasePipe],\r\n templateUrl: './toggle.component.html',\r\n providers: [{ provide: MatFormFieldControl, useExisting: ToggleComponent }],\r\n styleUrl: './toggle.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ToggleComponent extends BaseCustomInput<boolean> {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig\r\n );\r\n\r\n // A toggle is binary — it must always hold a value. Seed `false` so an\r\n // unset toggle is never in a \"no value\" state (which would otherwise read\r\n // as required while the switch visibly looks off).\r\n this._value = false;\r\n }\r\n\r\n override get empty(): boolean {\r\n // A toggle always holds a boolean (see `writeValue` + the constructor\r\n // seed), so it is never empty. `false` is a provided value, not an absent\r\n // one — mirroring `toggleRequiredValidator`, which passes `true` and `false`.\r\n return false;\r\n }\r\n\r\n /** Coerce any incoming value to a boolean so the control is never null/undefined. */\r\n override writeValue(value: boolean | null | undefined): void {\r\n super.writeValue(Boolean(value));\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n protected changed(event: MatSlideToggleChange): void {\r\n this.value = event.checked;\r\n this.onChange(event.checked);\r\n this.stateChanges.next();\r\n }\r\n\r\n protected get isChecked(): boolean {\r\n return Boolean(this.value);\r\n }\r\n}\r\n","<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOpen]=\"!!(inputConfig().disabled || inputConfig().readonly)\"\r\n>\r\n <div class=\"readonly-scrim\"></div>\r\n</ng-template>\r\n\r\n<mat-slide-toggle\r\n class=\"toggle-control\"\r\n [disabledInteractive]=\"inputConfig().disabled || inputConfig().readonly\"\r\n [required]=\"inputConfig().required\"\r\n [labelPosition]=\"inputConfig().labelPosition || 'after'\"\r\n (change)=\"changed($event)\"\r\n [checked]=\"isChecked\"\r\n [ariaReadOnly]=\"inputConfig().disabled || inputConfig().readonly\"\r\n [disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n>\r\n @if (inputConfig().falseLabel || inputConfig().trueLabel) {\r\n @if (inputConfig().labelPosition !== 'after') {\r\n {{ inputConfig().label | titlecase }}\r\n <span class=\"spacer\"></span>\r\n @if (isChecked) {\r\n <span class=\"true-label\">{{ inputConfig().trueLabel || 'Yes' }}</span>\r\n } @else {\r\n <span class=\"false-label\">{{ inputConfig().falseLabel || 'No' }}</span>\r\n }\r\n } @else {\r\n @if (isChecked) {\r\n <span class=\"true-label\">{{ inputConfig().trueLabel || 'Yes' }}</span>\r\n } @else {\r\n <span class=\"false-label\">{{ inputConfig().falseLabel || 'No' }}</span>\r\n }\r\n <span class=\"spacer\"></span>\r\n {{ inputConfig().label | titlecase }}\r\n }\r\n }\r\n</mat-slide-toggle>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { ToggleComponent } from './core/toggle/toggle.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/**\r\n * Wraps `lib-toggle` in a `mat-form-field` and surfaces the configured\r\n * label / hint / error / suffix / prefix metadata for the column.\r\n */\r\n@Component({\r\n selector: 'lib-toggle-input-element',\r\n templateUrl: './toggle-input-element.component.html',\r\n styleUrl: './toggle-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n ToggleComponent,\r\n ],\r\n})\r\nexport class ToggleInputElementComponent {\r\n /** Form-input column definition. */\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n /** Reactive form group hosting the control identified by `inputConfig.id`. */\r\n readonly formGroup = input.required<FormGroup>();\r\n\r\n /** Emitted when the consumer requests a reload of this input. */\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field\r\n [appearance]=\"inputConfig.appearance || 'fill'\"\r\n floatLabel=\"always\"\r\n subscriptSizing=\"dynamic\"\r\n >\r\n @if (!(inputConfig.disabled || errorMessage())) {\r\n <mat-label>\r\n toggle to select\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n }\r\n\r\n <lib-toggle\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-toggle>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,MAAM,EAAE;CACT;AAUK,MAAO,eAAgB,SAAQ,eAAwB,CAAA;AAG3D,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAc,EAC9D,MAAM,CAA0B,UAAU,CAAC,EAC3C,iBAAiB,CAClB;AAPM,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,iFAAoB;;;;AAYvD,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK;IACrB;AAEA,IAAA,IAAa,KAAK,GAAA;;;;AAIhB,QAAA,OAAO,KAAK;IACd;;AAGS,IAAA,UAAU,CAAC,KAAiC,EAAA;QACnD,KAAK,CAAC,UAAU,CAAC,OAAO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,UAAA,EAAA,CAAA;kBAfvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,0BAA0B,EAAA,eAAA,EAGnB,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,mBAAmB;wBACnB,kBAAkB;wBAClB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,yBAAyB;wBACzB,eAAe;AAChB,qBAAA,EAAA,QAAA,EAAA,kyEAAA,EAAA,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/core/toggle/toggle.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/core/toggle/toggle.component.html","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.ts","../../../projects/ngx-t-forms/src/lib/components/t-form-input/elements/toggle-input-element/toggle-input-element.component.html"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\r\nimport { NgControl } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { MatSlideToggleChange, MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { TitleCasePipe } from '@angular/common';\r\nimport { ITowerStepColumn } from 'ngx-t-forms-types';\r\n\r\nimport { BaseCustomInput, BaseCustomInputConfig } from '../../../../../../services/core/t-input-controller/functions/baseCustomInput';\r\n\r\nconst customInputConfig: BaseCustomInputConfig = {\r\n controlType: 'lib-toggle',\r\n nextId: 0\r\n};\r\n\r\n@Component({\r\n selector: 'lib-toggle',\r\n imports: [MatSlideToggleModule, OverlayModule, TitleCasePipe],\r\n templateUrl: './toggle.component.html',\r\n providers: [{ provide: MatFormFieldControl, useExisting: ToggleComponent }],\r\n styleUrl: './toggle.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class ToggleComponent extends BaseCustomInput<boolean> {\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n constructor() {\r\n super(\r\n inject(NgControl, { optional: true, self: true }) as NgControl,\r\n inject<ElementRef<HTMLElement>>(ElementRef),\r\n customInputConfig\r\n );\r\n\r\n // A toggle is binary — it must always hold a value. Seed `false` so an\r\n // unset toggle is never in a \"no value\" state (which would otherwise read\r\n // as required while the switch visibly looks off).\r\n this._value = false;\r\n }\r\n\r\n override get empty(): boolean {\r\n // A toggle always holds a boolean (see `writeValue` + the constructor\r\n // seed), so it is never empty. `false` is a provided value, not an absent\r\n // one — mirroring `toggleRequiredValidator`, which passes `true` and `false`.\r\n return false;\r\n }\r\n\r\n /** Coerce any incoming value to a boolean so the control is never null/undefined. */\r\n override writeValue(value: boolean | null | undefined): void {\r\n super.writeValue(Boolean(value));\r\n }\r\n\r\n override get shouldLabelFloat(): boolean {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n protected changed(event: MatSlideToggleChange): void {\r\n this.value = event.checked;\r\n this.onChange(event.checked);\r\n this.stateChanges.next();\r\n }\r\n\r\n protected get isChecked(): boolean {\r\n return Boolean(this.value);\r\n }\r\n}\r\n","<ng-template\r\n cdkConnectedOverlay\r\n [cdkConnectedOverlayOpen]=\"!!(inputConfig().disabled || inputConfig().readonly)\"\r\n>\r\n <div class=\"readonly-scrim\"></div>\r\n</ng-template>\r\n\r\n<mat-slide-toggle\r\n class=\"toggle-control\"\r\n [disabledInteractive]=\"inputConfig().disabled || inputConfig().readonly\"\r\n [required]=\"inputConfig().required\"\r\n [labelPosition]=\"inputConfig().labelPosition || 'after'\"\r\n (change)=\"changed($event)\"\r\n [checked]=\"isChecked\"\r\n [ariaReadOnly]=\"inputConfig().disabled || inputConfig().readonly\"\r\n [disabled]=\"inputConfig().disabled || inputConfig().readonly\"\r\n>\r\n @if (inputConfig().falseLabel || inputConfig().trueLabel) {\r\n @if (inputConfig().labelPosition !== 'after') {\r\n {{ inputConfig().label | titlecase }}\r\n <span class=\"spacer\"></span>\r\n @if (isChecked) {\r\n <span class=\"true-label\">{{ inputConfig().trueLabel || 'Yes' }}</span>\r\n } @else {\r\n <span class=\"false-label\">{{ inputConfig().falseLabel || 'No' }}</span>\r\n }\r\n } @else {\r\n @if (isChecked) {\r\n <span class=\"true-label\">{{ inputConfig().trueLabel || 'Yes' }}</span>\r\n } @else {\r\n <span class=\"false-label\">{{ inputConfig().falseLabel || 'No' }}</span>\r\n }\r\n <span class=\"spacer\"></span>\r\n {{ inputConfig().label | titlecase }}\r\n }\r\n }\r\n</mat-slide-toggle>\r\n","import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\r\nimport { FormGroup, ReactiveFormsModule } from '@angular/forms';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { MatTooltipModule } from '@angular/material/tooltip';\r\nimport type { ITowerStepColumn } from 'ngx-t-forms-types';\r\nimport { TFormInputStatusComponent } from '../../../t-form-input-status/t-form-input-status.component';\r\nimport { ToggleComponent } from './core/toggle/toggle.component';\r\nimport { getInputErrorMessage } from '../../../../services/core/t-input-controller/functions/inputErrorMessage';\r\n\r\n/**\r\n * Wraps `lib-toggle` in a `mat-form-field` and surfaces the configured\r\n * label / hint / error / suffix / prefix metadata for the column.\r\n */\r\n@Component({\r\n selector: 'lib-toggle-input-element',\r\n templateUrl: './toggle-input-element.component.html',\r\n styleUrl: './toggle-input-element.component.css',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [\r\n ReactiveFormsModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatTooltipModule,\r\n TFormInputStatusComponent,\r\n ToggleComponent,\r\n ],\r\n})\r\nexport class ToggleInputElementComponent {\r\n /** Form-input column definition. */\r\n readonly inputConfig = input.required<ITowerStepColumn>();\r\n\r\n /** Reactive form group hosting the control identified by `inputConfig.id`. */\r\n readonly formGroup = input.required<FormGroup>();\r\n\r\n /** Emitted when the consumer requests a reload of this input. */\r\n readonly reload = output<void>();\r\n\r\n protected readonly errorMessage = computed(() =>\r\n getInputErrorMessage(this.inputConfig(), this.formGroup()),\r\n );\r\n}\r\n","<form [formGroup]=\"formGroup()\">\r\n @if (inputConfig(); as inputConfig) {\r\n <mat-form-field\r\n [appearance]=\"inputConfig.appearance || 'fill'\"\r\n floatLabel=\"always\"\r\n subscriptSizing=\"dynamic\"\r\n >\r\n @if (!(inputConfig.disabled || errorMessage())) {\r\n <mat-label>\r\n toggle to select\r\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\r\n </mat-label>\r\n }\r\n\r\n <lib-toggle\r\n [inputConfig]=\"inputConfig\"\r\n [required]=\"inputConfig.required\"\r\n [formControlName]=\"inputConfig.id\"\r\n ></lib-toggle>\r\n\r\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\r\n <mat-hint class=\"inputHint\">\r\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\r\n </mat-hint>\r\n }\r\n\r\n @if (!!errorMessage()) {\r\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\r\n }\r\n\r\n @if (inputConfig.canReload?.canReload) {\r\n <button\r\n mat-icon-button\r\n style=\"margin-right: 4px;\"\r\n matTooltip=\"Click to refresh this field.\"\r\n class=\"input-sync-button\"\r\n (click)=\"inputConfig.canReload.emit()\"\r\n matSuffix\r\n >\r\n <mat-icon style=\"color: var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n @if (inputConfig.prefixIcon) {\r\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.suffixIcon && inputConfig.id !== 'password') {\r\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\r\n }\r\n\r\n @if (inputConfig.prefixText) {\r\n <span matPrefix style=\"top: 0\">{{ inputConfig.prefixText }}</span>\r\n }\r\n @if (inputConfig.suffixText) {\r\n <span matSuffix style=\"padding-left: 5px\">{{ inputConfig.suffixText }}</span>\r\n }\r\n\r\n @if (inputConfig.maxLength && formGroup()) {\r\n <mat-hint align=\"end\">\r\n {{ (formGroup().controls[inputConfig.id]?.value?.length || 0) + '/' + inputConfig.maxLength }}\r\n </mat-hint>\r\n }\r\n </mat-form-field>\r\n }\r\n</form>\r\n"],"names":["i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,MAAM,iBAAiB,GAA0B;AAC/C,IAAA,WAAW,EAAE,YAAY;AACzB,IAAA,MAAM,EAAE;CACT;AAUK,MAAO,eAAgB,SAAQ,eAAwB,CAAA;AAG3D,IAAA,WAAA,GAAA;QACE,KAAK,CACH,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAc,EAC9D,MAAM,CAA0B,UAAU,CAAC,EAC3C,iBAAiB,CAClB;AAPM,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,QAAQ,iFAAoB;;;;AAYvD,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK;IACrB;AAEA,IAAA,IAAa,KAAK,GAAA;;;;AAIhB,QAAA,OAAO,KAAK;IACd;;AAGS,IAAA,UAAU,CAAC,KAAiC,EAAA;QACnD,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClC;AAEA,IAAA,IAAa,gBAAgB,GAAA;QAC3B,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK;IACpC;AAEU,IAAA,OAAO,CAAC,KAA2B,EAAA;AAC3C,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO;AAC1B,QAAA,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC;AAC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,MAAA,EAAA,CAAA,oJAAA,CAAA,EAAA;;;;;"}
@@ -0,0 +1,173 @@
1
+ import { ElementTypes } from 'ngx-t-forms-types';
2
+ import { g as getInputIcon } from './ngx-t-forms-getInputIcon-B4ADgevZ.mjs';
3
+
4
+ /**
5
+ * @file Field → `$`-picker binding derivation, shared by every token-binding
6
+ * JSON editor (payload templates, header templates).
7
+ *
8
+ * Both editors offer the same gesture — type `$`, pick a form field, get its
9
+ * `{{token}}` inserted — over the same {@link JsonEditorComponent}. The only
10
+ * thing that differs is the document being edited, so the field list, the icon
11
+ * and kind labels, and the friendly-label ⇄ id aliasing live here rather than
12
+ * being copied per editor.
13
+ *
14
+ * Pure: no Angular DI, no signals. Callers wrap these in `computed()`.
15
+ */
16
+ /**
17
+ * Turns an element type into a short, friendly field-kind label — the muted
18
+ * second line in the picker that disambiguates same-named fields.
19
+ *
20
+ * @param element - The input's element type.
21
+ * @returns A spaced, capitalised label (e.g. `MultipleInput` → `Multiple Input`).
22
+ */
23
+ function humanizeElement(element) {
24
+ return String(element)
25
+ .replace(/([a-z])([A-Z])/g, '$1 $2')
26
+ .replace(/^./, (c) => c.toUpperCase());
27
+ }
28
+ /**
29
+ * The inputs a token may bind to.
30
+ *
31
+ * Excludes what cannot carry a value at request time: a `SectionTitle` (layout
32
+ * only) and a MultipleInput **sub-row** input (`multipleInputInEditId`), whose
33
+ * control exists only while its row is open — a token bound to one would resolve
34
+ * empty for every closed row and hold the fetch idle forever.
35
+ *
36
+ * @param formInputs - Every input on the form being configured.
37
+ * @returns The bindable inputs, unfiltered by anything else.
38
+ */
39
+ function bindableInputs(formInputs) {
40
+ return formInputs.filter((input) => input.element !== ElementTypes.SectionTitle && !input.multipleInputInEditId && !!input.id);
41
+ }
42
+ /**
43
+ * The bindable inputs as id/label pairs — the input to `buildTokenMaps`.
44
+ *
45
+ * @param formInputs - Every input on the form being configured.
46
+ * @returns One {@link TokenField} per bindable input, labelled by its display
47
+ * label (falling back to the raw id when none is authored).
48
+ */
49
+ function bindableFields(formInputs) {
50
+ return bindableInputs(formInputs).map((input) => ({
51
+ id: input.id,
52
+ label: input.label?.trim() || input.id,
53
+ }));
54
+ }
55
+ /**
56
+ * The bindings for the JSON editor's `$`-trigger picker.
57
+ *
58
+ * The picker shows the friendly label + field kind (never the raw id); the
59
+ * inserted token is the friendly `{{Label}}` when that label earned one, else the
60
+ * raw `{{id}}`. Each binding also aliases the *other* form, so a pasted or legacy
61
+ * `{{id}}` still renders as a valid (clickable) pill — and vice versa.
62
+ *
63
+ * @param formInputs - Every input on the form being configured.
64
+ * @param idToLabel - The `id → label` half of `buildTokenMaps`; only safe,
65
+ * uniquely-labelled fields appear in it, so anything absent keeps its raw id.
66
+ * @returns One {@link EditorBinding} per bindable input.
67
+ */
68
+ function fieldEditorBindings(formInputs, idToLabel) {
69
+ return bindableInputs(formInputs).map((input) => {
70
+ const label = input.label?.trim() || input.id;
71
+ const display = idToLabel.get(input.id);
72
+ return {
73
+ label,
74
+ insert: display ? `{{${display}}}` : `{{${input.id}}}`,
75
+ searchText: `${input.id} ${input.label ?? ''}`,
76
+ icon: getInputIcon(input.element),
77
+ detail: humanizeElement(input.element),
78
+ aliases: display ? [input.id] : [label],
79
+ };
80
+ });
81
+ }
82
+
83
+ /**
84
+ * @file Friendly-label ⇄ id token transform for the payload-template editor.
85
+ *
86
+ * The stored config always uses `{{inputId}}` tokens, but the editor shows the
87
+ * user-friendly field **label** inline (`{{Contract Type}}`). This module maps
88
+ * between the two forms on a per-field basis.
89
+ *
90
+ * ### Robustness (why this is safe despite arbitrary labels)
91
+ * The transform runs on the **parsed value** (objects/strings), never on raw
92
+ * JSON text — so `JSON.stringify`/`parse` handle escaping and a label with a
93
+ * quote can never corrupt the document. On top of that, a label only earns a
94
+ * friendly token when it is BOTH:
95
+ * - **safe** — contains none of `{ } " \` (which would break the `{{…}}`
96
+ * delimiters or a raw picker-insertion), and
97
+ * - **unique** — no other field shares it (so `label → id` is unambiguous).
98
+ *
99
+ * Any field failing either test keeps its raw `{{id}}` inline. The friendly view
100
+ * is therefore a lossless, best-effort layer that degrades to the id — it can
101
+ * never produce invalid JSON or an ambiguous mapping.
102
+ */
103
+ /** Characters that make a label unusable as a `{{label}}` token. */
104
+ const UNSAFE_LABEL = /[{}"\\]/;
105
+ /** Matches a `{{token}}` occurrence inside a string (token captured, trimmed by the caller). */
106
+ const TOKEN_RE = /\{\{\s*([^{}]+?)\s*\}\}/g;
107
+ /**
108
+ * Builds the id⇄label token maps for a set of fields, applying the safety and
109
+ * uniqueness rules described in the file header.
110
+ *
111
+ * @param fields - The candidate fields (id + label).
112
+ * @returns The bidirectional maps; a field absent from them keeps its raw id.
113
+ */
114
+ function buildTokenMaps(fields) {
115
+ const labelCounts = new Map();
116
+ for (const field of fields) {
117
+ const label = field.label?.trim();
118
+ if (!label || UNSAFE_LABEL.test(label))
119
+ continue;
120
+ labelCounts.set(label, (labelCounts.get(label) ?? 0) + 1);
121
+ }
122
+ const idToLabel = new Map();
123
+ const labelToId = new Map();
124
+ for (const field of fields) {
125
+ const label = field.label?.trim();
126
+ if (!label || UNSAFE_LABEL.test(label))
127
+ continue;
128
+ if (labelCounts.get(label) !== 1)
129
+ continue; // ambiguous → keep the raw id
130
+ if (label === field.id)
131
+ continue; // transform would be a no-op
132
+ idToLabel.set(field.id, label);
133
+ labelToId.set(label, field.id);
134
+ }
135
+ return { idToLabel, labelToId };
136
+ }
137
+ /**
138
+ * Deep-walks a parsed JSON value, rewriting every `{{token}}` whose trimmed token
139
+ * is a key in `lookup` to `{{mappedValue}}`. Unmapped tokens are left untouched.
140
+ * Non-string leaves (numbers/booleans/null) pass through unchanged.
141
+ *
142
+ * @typeParam T - The value shape (preserved).
143
+ * @param value - The parsed template value (object / array / primitive / undefined).
144
+ * @param lookup - `idToLabel` for display, `labelToId` for save.
145
+ * @returns A structurally-cloned value with tokens rewritten (or the original when `lookup` is empty).
146
+ */
147
+ function mapTemplateTokens(value, lookup) {
148
+ if (lookup.size === 0)
149
+ return value;
150
+ return walk(value, lookup);
151
+ }
152
+ function walk(node, lookup) {
153
+ if (typeof node === 'string') {
154
+ return node.replace(TOKEN_RE, (match, rawToken) => {
155
+ const mapped = lookup.get(rawToken.trim());
156
+ return mapped !== undefined ? `{{${mapped}}}` : match;
157
+ });
158
+ }
159
+ if (Array.isArray(node)) {
160
+ return node.map((item) => walk(item, lookup));
161
+ }
162
+ if (node !== null && typeof node === 'object') {
163
+ const out = {};
164
+ for (const [key, val] of Object.entries(node)) {
165
+ out[key] = walk(val, lookup);
166
+ }
167
+ return out;
168
+ }
169
+ return node;
170
+ }
171
+
172
+ export { bindableFields as a, buildTokenMaps as b, fieldEditorBindings as f, mapTemplateTokens as m };
173
+ //# sourceMappingURL=ngx-t-forms-token-transform-D_wsFbNc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngx-t-forms-token-transform-D_wsFbNc.mjs","sources":["../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/_shared/field-bindings.ts","../../../projects/ngx-t-forms/src/lib/components/t-dynamic-data-edit/elements/payload-template-editor/token-transform.ts"],"sourcesContent":["/**\r\n * @file Field → `$`-picker binding derivation, shared by every token-binding\r\n * JSON editor (payload templates, header templates).\r\n *\r\n * Both editors offer the same gesture — type `$`, pick a form field, get its\r\n * `{{token}}` inserted — over the same {@link JsonEditorComponent}. The only\r\n * thing that differs is the document being edited, so the field list, the icon\r\n * and kind labels, and the friendly-label ⇄ id aliasing live here rather than\r\n * being copied per editor.\r\n *\r\n * Pure: no Angular DI, no signals. Callers wrap these in `computed()`.\r\n */\r\nimport { ElementTypes } from 'ngx-t-forms-types';\r\nimport type { FormColumnInputs } from 'ngx-t-forms-types';\r\n\r\nimport { getInputIcon } from '../../../../shared/functions/getInputIcon';\r\nimport type { EditorBinding } from '../json-editor/json-editor.component';\r\nimport type { TokenField } from '../payload-template-editor/token-transform';\r\n\r\n/**\r\n * Turns an element type into a short, friendly field-kind label — the muted\r\n * second line in the picker that disambiguates same-named fields.\r\n *\r\n * @param element - The input's element type.\r\n * @returns A spaced, capitalised label (e.g. `MultipleInput` → `Multiple Input`).\r\n */\r\nfunction humanizeElement(element: ElementTypes): string {\r\n return String(element)\r\n .replace(/([a-z])([A-Z])/g, '$1 $2')\r\n .replace(/^./, (c) => c.toUpperCase());\r\n}\r\n\r\n/**\r\n * The inputs a token may bind to.\r\n *\r\n * Excludes what cannot carry a value at request time: a `SectionTitle` (layout\r\n * only) and a MultipleInput **sub-row** input (`multipleInputInEditId`), whose\r\n * control exists only while its row is open — a token bound to one would resolve\r\n * empty for every closed row and hold the fetch idle forever.\r\n *\r\n * @param formInputs - Every input on the form being configured.\r\n * @returns The bindable inputs, unfiltered by anything else.\r\n */\r\nexport function bindableInputs(\r\n formInputs: readonly FormColumnInputs[],\r\n): readonly FormColumnInputs[] {\r\n return formInputs.filter(\r\n (input) => input.element !== ElementTypes.SectionTitle && !input.multipleInputInEditId && !!input.id,\r\n );\r\n}\r\n\r\n/**\r\n * The bindable inputs as id/label pairs — the input to `buildTokenMaps`.\r\n *\r\n * @param formInputs - Every input on the form being configured.\r\n * @returns One {@link TokenField} per bindable input, labelled by its display\r\n * label (falling back to the raw id when none is authored).\r\n */\r\nexport function bindableFields(formInputs: readonly FormColumnInputs[]): readonly TokenField[] {\r\n return bindableInputs(formInputs).map((input) => ({\r\n id: input.id,\r\n label: input.label?.trim() || input.id,\r\n }));\r\n}\r\n\r\n/**\r\n * The bindings for the JSON editor's `$`-trigger picker.\r\n *\r\n * The picker shows the friendly label + field kind (never the raw id); the\r\n * inserted token is the friendly `{{Label}}` when that label earned one, else the\r\n * raw `{{id}}`. Each binding also aliases the *other* form, so a pasted or legacy\r\n * `{{id}}` still renders as a valid (clickable) pill — and vice versa.\r\n *\r\n * @param formInputs - Every input on the form being configured.\r\n * @param idToLabel - The `id → label` half of `buildTokenMaps`; only safe,\r\n * uniquely-labelled fields appear in it, so anything absent keeps its raw id.\r\n * @returns One {@link EditorBinding} per bindable input.\r\n */\r\nexport function fieldEditorBindings(\r\n formInputs: readonly FormColumnInputs[],\r\n idToLabel: ReadonlyMap<string, string>,\r\n): readonly EditorBinding[] {\r\n return bindableInputs(formInputs).map((input) => {\r\n const label = input.label?.trim() || input.id;\r\n const display = idToLabel.get(input.id);\r\n return {\r\n label,\r\n insert: display ? `{{${display}}}` : `{{${input.id}}}`,\r\n searchText: `${input.id} ${input.label ?? ''}`,\r\n icon: getInputIcon(input.element),\r\n detail: humanizeElement(input.element),\r\n aliases: display ? [input.id] : [label],\r\n } satisfies EditorBinding;\r\n });\r\n}\r\n","/**\r\n * @file Friendly-label ⇄ id token transform for the payload-template editor.\r\n *\r\n * The stored config always uses `{{inputId}}` tokens, but the editor shows the\r\n * user-friendly field **label** inline (`{{Contract Type}}`). This module maps\r\n * between the two forms on a per-field basis.\r\n *\r\n * ### Robustness (why this is safe despite arbitrary labels)\r\n * The transform runs on the **parsed value** (objects/strings), never on raw\r\n * JSON text — so `JSON.stringify`/`parse` handle escaping and a label with a\r\n * quote can never corrupt the document. On top of that, a label only earns a\r\n * friendly token when it is BOTH:\r\n * - **safe** — contains none of `{ } \" \\` (which would break the `{{…}}`\r\n * delimiters or a raw picker-insertion), and\r\n * - **unique** — no other field shares it (so `label → id` is unambiguous).\r\n *\r\n * Any field failing either test keeps its raw `{{id}}` inline. The friendly view\r\n * is therefore a lossless, best-effort layer that degrades to the id — it can\r\n * never produce invalid JSON or an ambiguous mapping.\r\n */\r\n\r\n/** A field that can back a token: its stable `id` and its display `label`. */\r\nexport interface TokenField {\r\n readonly id: string;\r\n readonly label: string;\r\n}\r\n\r\n/** Bidirectional token maps (only safe, uniquely-labelled fields are included). */\r\nexport interface TokenMaps {\r\n /** `id → label` (drives the id→friendly display transform + picker insert). */\r\n readonly idToLabel: ReadonlyMap<string, string>;\r\n /** `label → id` (drives the friendly→id save transform). */\r\n readonly labelToId: ReadonlyMap<string, string>;\r\n}\r\n\r\n/** Characters that make a label unusable as a `{{label}}` token. */\r\nconst UNSAFE_LABEL = /[{}\"\\\\]/;\r\n\r\n/** Matches a `{{token}}` occurrence inside a string (token captured, trimmed by the caller). */\r\nconst TOKEN_RE = /\\{\\{\\s*([^{}]+?)\\s*\\}\\}/g;\r\n\r\n/**\r\n * Builds the id⇄label token maps for a set of fields, applying the safety and\r\n * uniqueness rules described in the file header.\r\n *\r\n * @param fields - The candidate fields (id + label).\r\n * @returns The bidirectional maps; a field absent from them keeps its raw id.\r\n */\r\nexport function buildTokenMaps(fields: readonly TokenField[]): TokenMaps {\r\n const labelCounts = new Map<string, number>();\r\n for (const field of fields) {\r\n const label = field.label?.trim();\r\n if (!label || UNSAFE_LABEL.test(label)) continue;\r\n labelCounts.set(label, (labelCounts.get(label) ?? 0) + 1);\r\n }\r\n\r\n const idToLabel = new Map<string, string>();\r\n const labelToId = new Map<string, string>();\r\n for (const field of fields) {\r\n const label = field.label?.trim();\r\n if (!label || UNSAFE_LABEL.test(label)) continue;\r\n if (labelCounts.get(label) !== 1) continue; // ambiguous → keep the raw id\r\n if (label === field.id) continue; // transform would be a no-op\r\n idToLabel.set(field.id, label);\r\n labelToId.set(label, field.id);\r\n }\r\n return { idToLabel, labelToId };\r\n}\r\n\r\n/**\r\n * Deep-walks a parsed JSON value, rewriting every `{{token}}` whose trimmed token\r\n * is a key in `lookup` to `{{mappedValue}}`. Unmapped tokens are left untouched.\r\n * Non-string leaves (numbers/booleans/null) pass through unchanged.\r\n *\r\n * @typeParam T - The value shape (preserved).\r\n * @param value - The parsed template value (object / array / primitive / undefined).\r\n * @param lookup - `idToLabel` for display, `labelToId` for save.\r\n * @returns A structurally-cloned value with tokens rewritten (or the original when `lookup` is empty).\r\n */\r\nexport function mapTemplateTokens<T>(value: T, lookup: ReadonlyMap<string, string>): T {\r\n if (lookup.size === 0) return value;\r\n return walk(value, lookup) as T;\r\n}\r\n\r\nfunction walk(node: unknown, lookup: ReadonlyMap<string, string>): unknown {\r\n if (typeof node === 'string') {\r\n return node.replace(TOKEN_RE, (match, rawToken: string) => {\r\n const mapped = lookup.get(rawToken.trim());\r\n return mapped !== undefined ? `{{${mapped}}}` : match;\r\n });\r\n }\r\n if (Array.isArray(node)) {\r\n return node.map((item) => walk(item, lookup));\r\n }\r\n if (node !== null && typeof node === 'object') {\r\n const out: Record<string, unknown> = {};\r\n for (const [key, val] of Object.entries(node as Record<string, unknown>)) {\r\n out[key] = walk(val, lookup);\r\n }\r\n return out;\r\n }\r\n return node;\r\n}\r\n"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;AAWG;AAQH;;;;;;AAMG;AACH,SAAS,eAAe,CAAC,OAAqB,EAAA;IAC5C,OAAO,MAAM,CAAC,OAAO;AAClB,SAAA,OAAO,CAAC,iBAAiB,EAAE,OAAO;AAClC,SAAA,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AAC1C;AAEA;;;;;;;;;;AAUG;AACG,SAAU,cAAc,CAC5B,UAAuC,EAAA;AAEvC,IAAA,OAAO,UAAU,CAAC,MAAM,CACtB,CAAC,KAAK,KAAK,KAAK,CAAC,OAAO,KAAK,YAAY,CAAC,YAAY,IAAI,CAAC,KAAK,CAAC,qBAAqB,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,CACrG;AACH;AAEA;;;;;;AAMG;AACG,SAAU,cAAc,CAAC,UAAuC,EAAA;AACpE,IAAA,OAAO,cAAc,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,MAAM;QAChD,EAAE,EAAE,KAAK,CAAC,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE;AACvC,KAAA,CAAC,CAAC;AACL;AAEA;;;;;;;;;;;;AAYG;AACG,SAAU,mBAAmB,CACjC,UAAuC,EACvC,SAAsC,EAAA;IAEtC,OAAO,cAAc,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,KAAI;AAC9C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