ngx-t-forms 3.0.0 → 3.1.1

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 (254) hide show
  1. package/fesm2022/ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs +411 -0
  2. package/fesm2022/ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs.map +1 -0
  3. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs} +2 -2
  4. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs.map → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs.map} +1 -1
  5. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs} +3 -3
  6. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs.map → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs.map} +1 -1
  7. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs +643 -0
  8. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs.map +1 -0
  9. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs → ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs} +4 -4
  10. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs.map +1 -0
  11. package/fesm2022/ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs +513 -0
  12. package/fesm2022/ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs.map +1 -0
  13. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs} +4 -4
  14. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs.map +1 -0
  15. package/fesm2022/ngx-t-forms-data-source-picker.component-CN51SdCK.mjs +261 -0
  16. package/fesm2022/ngx-t-forms-data-source-picker.component-CN51SdCK.mjs.map +1 -0
  17. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs} +2 -2
  18. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs.map → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs.map} +1 -1
  19. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs +166 -0
  20. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs.map +1 -0
  21. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs +373 -0
  22. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs.map +1 -0
  23. package/fesm2022/ngx-t-forms-document-picker.component-9clYsOcl.mjs +1259 -0
  24. package/fesm2022/ngx-t-forms-document-picker.component-9clYsOcl.mjs.map +1 -0
  25. package/fesm2022/ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs +417 -0
  26. package/fesm2022/ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs.map +1 -0
  27. package/fesm2022/{ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs → ngx-t-forms-editor-js-input.component-02HnmInT.mjs} +25 -11
  28. package/fesm2022/ngx-t-forms-editor-js-input.component-02HnmInT.mjs.map +1 -0
  29. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs} +2 -2
  30. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs.map → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs.map} +1 -1
  31. package/fesm2022/ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs +86 -0
  32. package/fesm2022/ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs.map +1 -0
  33. package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.mjs → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs} +2 -2
  34. package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.mjs.map → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs.map} +1 -1
  35. package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs +179 -0
  36. package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs.map +1 -0
  37. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs} +4 -4
  38. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs.map → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs.map} +1 -1
  39. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs} +5 -5
  40. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs.map → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs.map} +1 -1
  41. package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs → ngx-t-forms-geo-location.component-D-BhLdx6.mjs} +2 -2
  42. package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs.map → ngx-t-forms-geo-location.component-D-BhLdx6.mjs.map} +1 -1
  43. package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs +159 -0
  44. package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs.map +1 -0
  45. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs} +2 -2
  46. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs.map → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs.map} +1 -1
  47. package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs +2 -0
  48. package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs.map +1 -0
  49. package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.mjs → ngx-t-forms-input-custom.component-s1ryJQy4.mjs} +2 -2
  50. package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.mjs.map → ngx-t-forms-input-custom.component-s1ryJQy4.mjs.map} +1 -1
  51. package/fesm2022/ngx-t-forms-input-editor.component-oIzCTmbx.mjs +190 -0
  52. package/fesm2022/ngx-t-forms-input-editor.component-oIzCTmbx.mjs.map +1 -0
  53. package/fesm2022/{ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs → ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs} +2 -3
  54. package/fesm2022/ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs.map +1 -0
  55. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs → ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs} +5 -5
  56. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs.map +1 -0
  57. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs → ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs} +3 -3
  58. package/fesm2022/ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs.map +1 -0
  59. 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
  60. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs.map +1 -0
  61. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs} +2 -2
  62. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs.map → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs.map} +1 -1
  63. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs} +2 -2
  64. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs.map} +1 -1
  65. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs +447 -0
  66. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs.map +1 -0
  67. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs +905 -0
  68. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs.map +1 -0
  69. package/fesm2022/{ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs → ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs} +2738 -415
  70. package/fesm2022/ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs.map +1 -0
  71. package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs} +2 -2
  72. package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs.map → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs.map} +1 -1
  73. package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs +85 -0
  74. package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs.map +1 -0
  75. package/fesm2022/ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs +748 -0
  76. package/fesm2022/ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs.map +1 -0
  77. package/fesm2022/{ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs → ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs} +4 -4
  78. package/fesm2022/ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs.map +1 -0
  79. package/fesm2022/ngx-t-forms-required-inputs.component-CK7NIhbq.mjs +272 -0
  80. package/fesm2022/ngx-t-forms-required-inputs.component-CK7NIhbq.mjs.map +1 -0
  81. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs +699 -0
  82. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs.map +1 -0
  83. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs +38 -0
  84. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs.map +1 -0
  85. package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs → ngx-t-forms-section-report.component-DhSaf85h.mjs} +2 -2
  86. package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs.map → ngx-t-forms-section-report.component-DhSaf85h.mjs.map} +1 -1
  87. package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs → ngx-t-forms-select-input-element.component-D5HFzh35.mjs} +2 -2
  88. package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs.map → ngx-t-forms-select-input-element.component-D5HFzh35.mjs.map} +1 -1
  89. package/fesm2022/ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs +169 -0
  90. package/fesm2022/ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs.map +1 -0
  91. package/fesm2022/{ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs → ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs} +3 -3
  92. package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
  93. package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs} +2 -2
  94. package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs.map → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs.map} +1 -1
  95. package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs} +2 -2
  96. package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs.map → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs.map} +1 -1
  97. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +173 -0
  98. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +1 -0
  99. package/fesm2022/ngx-t-forms-validators-config.component-0_Y6bvtE.mjs +574 -0
  100. package/fesm2022/ngx-t-forms-validators-config.component-0_Y6bvtE.mjs.map +1 -0
  101. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs} +3 -3
  102. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs.map → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs.map} +1 -1
  103. package/fesm2022/ngx-t-forms.mjs +1 -1
  104. package/package.json +2 -2
  105. package/styles/_editor-mixins.scss +117 -117
  106. package/styles/_signature-pad.scss +26 -26
  107. package/styles/_tokens.scss +148 -148
  108. package/types/ngx-t-forms.d.ts +110 -6
  109. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs +0 -261
  110. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs.map +0 -1
  111. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs +0 -225
  112. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs.map +0 -1
  113. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs +0 -1011
  114. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs.map +0 -1
  115. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs +0 -643
  116. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs.map +0 -1
  117. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs +0 -136
  118. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs.map +0 -1
  119. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs.map +0 -1
  120. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs.map +0 -1
  121. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs +0 -253
  122. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs.map +0 -1
  123. package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs +0 -261
  124. package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs.map +0 -1
  125. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs +0 -419
  126. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs.map +0 -1
  127. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs +0 -231
  128. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs.map +0 -1
  129. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs +0 -156
  130. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs.map +0 -1
  131. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs +0 -333
  132. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs.map +0 -1
  133. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs +0 -373
  134. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs.map +0 -1
  135. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs +0 -543
  136. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs.map +0 -1
  137. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs +0 -1259
  138. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs.map +0 -1
  139. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs +0 -1996
  140. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs.map +0 -1
  141. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs +0 -581
  142. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs.map +0 -1
  143. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs +0 -417
  144. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs.map +0 -1
  145. package/fesm2022/ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs.map +0 -1
  146. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs +0 -585
  147. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs.map +0 -1
  148. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs +0 -447
  149. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs.map +0 -1
  150. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs +0 -163
  151. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs.map +0 -1
  152. package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs +0 -86
  153. package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs.map +0 -1
  154. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs +0 -28
  155. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs.map +0 -1
  156. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs +0 -291
  157. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs.map +0 -1
  158. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs +0 -179
  159. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map +0 -1
  160. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs +0 -936
  161. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs.map +0 -1
  162. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs +0 -816
  163. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs.map +0 -1
  164. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs +0 -329
  165. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs.map +0 -1
  166. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs +0 -360
  167. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs.map +0 -1
  168. package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs +0 -2
  169. package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs.map +0 -1
  170. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs +0 -2
  171. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs.map +0 -1
  172. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs +0 -128
  173. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs.map +0 -1
  174. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs +0 -512
  175. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs.map +0 -1
  176. package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs +0 -190
  177. package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs.map +0 -1
  178. package/fesm2022/ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs.map +0 -1
  179. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs +0 -132
  180. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs.map +0 -1
  181. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs +0 -268
  182. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs.map +0 -1
  183. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs.map +0 -1
  184. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs +0 -241
  185. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs.map +0 -1
  186. package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +0 -1
  187. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +0 -1
  188. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs +0 -180
  189. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map +0 -1
  190. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs +0 -114
  191. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs.map +0 -1
  192. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs +0 -69
  193. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs.map +0 -1
  194. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs +0 -200
  195. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs.map +0 -1
  196. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs +0 -447
  197. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs.map +0 -1
  198. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs +0 -850
  199. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs.map +0 -1
  200. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs +0 -107
  201. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs.map +0 -1
  202. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs +0 -1665
  203. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs.map +0 -1
  204. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs +0 -905
  205. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs.map +0 -1
  206. package/fesm2022/ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs.map +0 -1
  207. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs +0 -28237
  208. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs.map +0 -1
  209. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs +0 -1024
  210. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs.map +0 -1
  211. package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs +0 -203
  212. package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs.map +0 -1
  213. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs +0 -234
  214. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs.map +0 -1
  215. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs +0 -1126
  216. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs.map +0 -1
  217. package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs +0 -748
  218. package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs.map +0 -1
  219. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs +0 -639
  220. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs.map +0 -1
  221. package/fesm2022/ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs.map +0 -1
  222. package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs +0 -272
  223. package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs.map +0 -1
  224. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs +0 -451
  225. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs.map +0 -1
  226. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs +0 -625
  227. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs.map +0 -1
  228. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs +0 -444
  229. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs.map +0 -1
  230. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +0 -38
  231. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +0 -1
  232. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs +0 -72
  233. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs.map +0 -1
  234. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs +0 -248
  235. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs.map +0 -1
  236. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs +0 -408
  237. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs.map +0 -1
  238. package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs +0 -169
  239. package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs.map +0 -1
  240. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs +0 -275
  241. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs.map +0 -1
  242. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs +0 -366
  243. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs.map +0 -1
  244. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs.map +0 -1
  245. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs +0 -233
  246. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs.map +0 -1
  247. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs +0 -305
  248. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs.map +0 -1
  249. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs +0 -1105
  250. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs.map +0 -1
  251. package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs +0 -574
  252. package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs.map +0 -1
  253. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs +0 -2923
  254. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs.map +0 -1
@@ -0,0 +1,699 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, output, inject, DestroyRef, signal, computed, effect, ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { JsDataTypes, DataSources } from 'ngx-t-forms-types';
4
+ import { m as deriveDefaultPayloadTemplate, n as collectHeaderTemplateInputIds, o as collectQueryTemplateInputIds, q as collectTemplateInputIds, u as collectMinInputDepIds, v as resolveHeaderTemplate, w as resolveQueryTemplate, x as resolvePayloadTemplate, y as returnMappedData, z as mergeQueryOptions, B as mergeHeaderOptions, C as PostmanCollectionLoaderService, G as TreeComponent, H as convertPostmanFolderItemsToTree, _ as _isEqual, E as EmptyStateComponent, l as ErrorListComponent } from './ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs';
5
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
+ import { HttpErrorResponse } from '@angular/common/http';
7
+ import { take, tap, catchError, throwError } from 'rxjs';
8
+ import * as i1 from '@angular/material/tree';
9
+ import { MatTreeModule } from '@angular/material/tree';
10
+ import * as i3 from '@angular/material/icon';
11
+ import { MatIconModule } from '@angular/material/icon';
12
+ import * as i2 from '@angular/material/button';
13
+ import { MatButtonModule } from '@angular/material/button';
14
+ import * as i4 from '@angular/material/progress-spinner';
15
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
16
+ import * as i5 from '@angular/material/tooltip';
17
+ import { MatTooltipModule } from '@angular/material/tooltip';
18
+ import { S as SearchFieldComponent } from './ngx-t-forms-search-field.component-mR4Kk12C.mjs';
19
+
20
+ /** CSS-variable colour per HTTP method (dark-mode-safe; never a hex literal). */
21
+ const METHOD_COLOR = {
22
+ GET: 'var(--lib-forms-method-get)',
23
+ POST: 'var(--lib-forms-method-post)',
24
+ PUT: 'var(--lib-forms-method-put)',
25
+ DELETE: 'var(--lib-forms-method-delete)',
26
+ };
27
+ /** Token colour for a config's HTTP method badge; `currentColor` when unknown. */
28
+ function methodColorOf(cfg) {
29
+ const method = cfg?.httpMethod;
30
+ return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';
31
+ }
32
+ /** POST and PUT carry a body; GET (and anything else) has no body panel. */
33
+ function sendsBody(cfg) {
34
+ const method = cfg?.httpMethod?.toUpperCase();
35
+ return method === 'POST' || method === 'PUT';
36
+ }
37
+ /** Active body mechanism — unset means mapped inputs (runtime parity). */
38
+ function bodyModeOf(cfg) {
39
+ return cfg?.backEndConfig?.requestBodyMode === 'template' ? 'template' : 'mappedInputs';
40
+ }
41
+ /** The configured minimum-input mapping, `[]` when none. */
42
+ function minInputsOf(cfg) {
43
+ return cfg?.backEndConfig?.minimumInputRequired ?? [];
44
+ }
45
+ /** True once a response mapping has been authored. */
46
+ function hasMappingOf(cfg) {
47
+ const rules = cfg?.valueAccessRules;
48
+ return Array.isArray(rules) ? rules.length > 0 : Boolean(rules);
49
+ }
50
+ /**
51
+ * Number of query parameters the request carries — the authored template when
52
+ * one exists, otherwise the endpoint's captured params (what the editor opens
53
+ * on). Display-only; the runtime sends the authored template.
54
+ */
55
+ function paramCountOf(cfg) {
56
+ return Object.keys(cfg?.queryTemplate ?? cfg?.capturedQuery ?? {}).length;
57
+ }
58
+ /** Number of request headers — same authored-else-captured read as params. */
59
+ function headerCountOf(cfg) {
60
+ return Object.keys(cfg?.headerTemplate ?? cfg?.capturedHeaders ?? {}).length;
61
+ }
62
+ /** Editor default for template mode, derived from the captured body/mapping. */
63
+ function payloadDefaultOf(cfg) {
64
+ return deriveDefaultPayloadTemplate(cfg?.backEndConfig);
65
+ }
66
+ /** The readiness rail, in configuration order. */
67
+ function readinessOf(cfg, kind) {
68
+ const items = [
69
+ { label: 'Endpoint', state: cfg?.httpEndPoint ? 'done' : 'pending' },
70
+ ];
71
+ if (sendsBody(cfg)) {
72
+ const bodyDone = bodyModeOf(cfg) === 'template'
73
+ ? Boolean(cfg?.backEndConfig?.payloadTemplate)
74
+ : minInputsOf(cfg).length > 0;
75
+ items.push({ label: 'Body', state: bodyDone ? 'done' : 'pending' });
76
+ }
77
+ items.push({
78
+ label: kind === 'options' ? 'Options mapping' : 'Response mapping',
79
+ state: hasMappingOf(cfg) ? 'done' : 'skip',
80
+ });
81
+ return items;
82
+ }
83
+ /**
84
+ * Labels of the live fields this fetch waits for at fill time — the union of
85
+ * header tokens, query tokens, and the active body mechanism's dependencies,
86
+ * collected with the SAME pure helpers the runtime gates with.
87
+ */
88
+ function waitsForLabels(cfg, formInputs) {
89
+ if (!cfg)
90
+ return [];
91
+ const ids = new Set([
92
+ ...collectHeaderTemplateInputIds(cfg.headerTemplate),
93
+ ...collectQueryTemplateInputIds(cfg.queryTemplate),
94
+ ]);
95
+ if (sendsBody(cfg)) {
96
+ if (bodyModeOf(cfg) === 'template') {
97
+ for (const tokenId of collectTemplateInputIds(cfg.backEndConfig?.payloadTemplate)) {
98
+ ids.add(tokenId);
99
+ }
100
+ }
101
+ else {
102
+ for (const minInput of minInputsOf(cfg)) {
103
+ for (const depId of collectMinInputDepIds(minInput))
104
+ ids.add(depId);
105
+ }
106
+ }
107
+ }
108
+ return [...ids].map((depId) => labelOf(formInputs, depId));
109
+ }
110
+ /**
111
+ * Derives the {@link ConfiguredTestRequest} for a fetch config, or `undefined`
112
+ * while no endpoint is configured (there is nothing to run).
113
+ *
114
+ * @param cfg - The fetch-slot configuration.
115
+ * @returns The runnable request, or `undefined` without an endpoint.
116
+ */
117
+ function deriveConfiguredRequest(cfg) {
118
+ if (!cfg?.httpEndPoint)
119
+ return undefined;
120
+ const noLiveValues = () => undefined;
121
+ const headers = resolveHeaderTemplate(cfg.headerTemplate, noLiveValues);
122
+ const query = resolveQueryTemplate(cfg.queryTemplate, noLiveValues);
123
+ const unresolved = new Set([...headers.missing, ...query.missing]);
124
+ let body;
125
+ if (sendsBody(cfg)) {
126
+ if (bodyModeOf(cfg) === 'template' && cfg.backEndConfig?.payloadTemplate) {
127
+ const resolved = resolvePayloadTemplate(cfg.backEndConfig.payloadTemplate, noLiveValues);
128
+ for (const id of resolved.missing)
129
+ unresolved.add(id);
130
+ body = resolved.payload;
131
+ }
132
+ else {
133
+ const minInputs = minInputsOf(cfg);
134
+ // Defaults resolve; mapped entries have no live value yet — send the
135
+ // body anyway (shape over completeness) and name what was missing.
136
+ try {
137
+ body = returnMappedData({}, minInputs, cfg.httpEndPoint);
138
+ }
139
+ catch {
140
+ body = { data: undefined };
141
+ }
142
+ for (const minInput of minInputs) {
143
+ for (const depId of collectMinInputDepIds(minInput))
144
+ unresolved.add(depId);
145
+ }
146
+ }
147
+ }
148
+ return {
149
+ method: cfg.httpMethod?.toUpperCase() ?? 'GET',
150
+ url: cfg.httpEndPoint,
151
+ options: mergeQueryOptions(mergeHeaderOptions(cfg.httpHeaderOptions, headers.headers), query.params),
152
+ body,
153
+ unresolved: [...unresolved],
154
+ };
155
+ }
156
+ /** Friendly labels for a set of dependency ids (date-range halves included). */
157
+ function dependencyLabels(formInputs, ids) {
158
+ return ids.map((depId) => labelOf(formInputs, depId));
159
+ }
160
+ /** Resolves a dependency id to a friendly label (date-range halves included). */
161
+ function labelOf(inputs, depId) {
162
+ const direct = inputs.find((candidate) => candidate.id === depId);
163
+ if (direct?.label)
164
+ return direct.label;
165
+ // A date-range dependency is the HALF id `${columnId}.${key}` while the
166
+ // builder's input list carries the raw column — name it via the column.
167
+ const dot = depId.indexOf('.');
168
+ if (dot > 0) {
169
+ const column = inputs.find((candidate) => candidate.id === depId.slice(0, dot));
170
+ if (column?.label)
171
+ return `${column.label} (${depId.slice(dot + 1)})`;
172
+ }
173
+ return depId;
174
+ }
175
+
176
+ /** True when an item's own name or description contains the (already-lowercased) search text. */
177
+ function itemMatches(item, searchText) {
178
+ return ((item.name?.toLowerCase().includes(searchText) ?? false) ||
179
+ (item.description?.toLowerCase().includes(searchText) ?? false));
180
+ }
181
+ /**
182
+ * Recursively prunes a folder tree to the items relevant to `searchText`.
183
+ *
184
+ * An item is kept when it matches directly (its whole subtree is then
185
+ * preserved) OR when one of its descendants matches — in which case the
186
+ * ancestor folder is preserved but its children are pruned to only the
187
+ * matching branches. This fixes the legacy defect where ancestor folders of a
188
+ * deep match were dropped (or whole sibling subtrees were retained).
189
+ */
190
+ function pruneItems(items, searchText) {
191
+ if (!items) {
192
+ return [];
193
+ }
194
+ return items.reduce((kept, item) => {
195
+ if (itemMatches(item, searchText)) {
196
+ // Direct hit: keep the item and its full subtree intact.
197
+ kept.push(item);
198
+ return kept;
199
+ }
200
+ const matchingChildren = pruneItems(item.item, searchText);
201
+ if (matchingChildren.length > 0) {
202
+ // Ancestor of a match: keep the folder but only the matching branches.
203
+ kept.push({ ...item, item: matchingChildren });
204
+ }
205
+ return kept;
206
+ }, []);
207
+ }
208
+ /**
209
+ * Filters a fetched Postman collection by a free-text search key, preserving
210
+ * the ancestor folders of every match. An empty/whitespace key returns the
211
+ * full set of top-level items unchanged.
212
+ */
213
+ function filterCollectionItems(collections, searchKey) {
214
+ const items = collections.collection.item;
215
+ const searchText = searchKey.trim().toLowerCase();
216
+ if (!searchText) {
217
+ return items;
218
+ }
219
+ return pruneItems(items, searchText);
220
+ }
221
+
222
+ /**
223
+ * Maps an HTTP method to its design-token CSS colour value.
224
+ *
225
+ * Returns a `var(--lib-forms-method-*)` reference (dark-mode safe, no hex /
226
+ * named colours) so the tree can colour-code endpoints. Unknown methods fall
227
+ * back to `currentColor`. Matching is case-insensitive.
228
+ */
229
+ function methodColor(method) {
230
+ switch (method.toUpperCase()) {
231
+ case 'GET':
232
+ return 'var(--lib-forms-method-get)';
233
+ case 'POST':
234
+ return 'var(--lib-forms-method-post)';
235
+ case 'PUT':
236
+ return 'var(--lib-forms-method-put)';
237
+ case 'PATCH':
238
+ return 'var(--lib-forms-method-patch)';
239
+ case 'DELETE':
240
+ return 'var(--lib-forms-method-delete)';
241
+ default:
242
+ return 'currentColor';
243
+ }
244
+ }
245
+
246
+ /**
247
+ * Internal Postman-collection picker used by `rest-api-call-setup`.
248
+ *
249
+ * Fetches a Postman collection over HTTP and renders it as a searchable tree of
250
+ * endpoints, emitting the selected folder item to the parent. Embedded
251
+ * component — owns only its tree content; the parent renders any field
252
+ * label / hint / errors.
253
+ */
254
+ class PostmanCollectionsComponent {
255
+ constructor() {
256
+ /** Postman API config (collection URL + key). When invalid the component shows an error. */
257
+ this.postmanCollectionConfig = input(undefined, ...(ngDevMode ? [{ debugName: "postmanCollectionConfig" }] : /* istanbul ignore next */ []));
258
+ /** Endpoint IDs currently in a loading state (rendered with a spinner in the tree). */
259
+ this.loadingEndPoints = input([], ...(ngDevMode ? [{ debugName: "loadingEndPoints" }] : /* istanbul ignore next */ []));
260
+ /** Emits when the user picks an endpoint node from the tree. */
261
+ this.nodeSelectionChanged = output();
262
+ this.#collectionLoader = inject(PostmanCollectionLoaderService);
263
+ this.#destroyRef = inject(DestroyRef);
264
+ /** Imperative mat-tree backing store reused from the access-rules tree. */
265
+ this.treeComponent = new TreeComponent();
266
+ /** Raw fetched collection; `undefined` until the request resolves. */
267
+ this.#collection = signal(undefined, ...(ngDevMode ? [{ debugName: "#collection" }] : /* istanbul ignore next */ []));
268
+ /** Current search text, two-way bound to the search field. */
269
+ this.searchKey = signal('', ...(ngDevMode ? [{ debugName: "searchKey" }] : /* istanbul ignore next */ []));
270
+ /** Request-in-flight flag. */
271
+ this.loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : /* istanbul ignore next */ []));
272
+ /** Last error (invalid config or HTTP failure); `undefined` when healthy. */
273
+ this.error = signal(undefined, ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
274
+ /** Folder items after applying the current search, ancestor-folders preserved. */
275
+ this.filteredItems = computed(() => {
276
+ const collection = this.#collection();
277
+ if (!collection) {
278
+ return [];
279
+ }
280
+ return filterCollectionItems(collection, this.searchKey());
281
+ }, ...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
282
+ /** Tree nodes derived from {@link filteredItems}. */
283
+ this.#treeData = computed(() => convertPostmanFolderItemsToTree(this.filteredItems()), ...(ngDevMode ? [{ debugName: "#treeData" }] : /* istanbul ignore next */ []));
284
+ /** True once a collection is loaded but the current search yields nothing. */
285
+ this.isEmpty = computed(() => Boolean(this.#collection()) && this.#treeData().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
286
+ /** Cache for {@link getNodeLines} so identical levels reuse one array. */
287
+ this.#nodeLinesCache = new Map();
288
+ /** Push derived tree data into the imperative mat-tree data source. */
289
+ this.syncTree = effect(() => {
290
+ this.treeComponent.assignDataSourceData(this.#treeData());
291
+ }, ...(ngDevMode ? [{ debugName: "syncTree" }] : /* istanbul ignore next */ []));
292
+ this.#hasLoadedOnce = false;
293
+ /** Fetch (or re-fetch) the collection only when the config input's content actually changes. */
294
+ this.loadOnConfigChange = effect(() => {
295
+ const config = this.postmanCollectionConfig();
296
+ if (this.#hasLoadedOnce && _isEqual(this.#loadedConfig, config)) {
297
+ return;
298
+ }
299
+ this.#hasLoadedOnce = true;
300
+ this.#loadedConfig = config;
301
+ this.#loadCollection(config);
302
+ }, ...(ngDevMode ? [{ debugName: "loadOnConfigChange" }] : /* istanbul ignore next */ []));
303
+ this.hasChild = (_, node) => this.treeComponent.hasChild(_, node);
304
+ }
305
+ #collectionLoader;
306
+ #destroyRef;
307
+ /** Raw fetched collection; `undefined` until the request resolves. */
308
+ #collection;
309
+ /** Tree nodes derived from {@link filteredItems}. */
310
+ #treeData;
311
+ /** Cache for {@link getNodeLines} so identical levels reuse one array. */
312
+ #nodeLinesCache;
313
+ /** Last config the effect acted on; guards against re-fetching when an unstable parent binding hands us a new-but-equal reference. */
314
+ #loadedConfig;
315
+ #hasLoadedOnce;
316
+ #isValidConfig(config) {
317
+ return Boolean(config?.collectionUrl) && Boolean(config?.collectionKey);
318
+ }
319
+ #loadCollection(config) {
320
+ if (!this.#isValidConfig(config)) {
321
+ this.#collection.set(undefined);
322
+ this.loading.set(false);
323
+ this.error.set(new HttpErrorResponse({ error: 'Invalid Postman Collection Config' }));
324
+ return;
325
+ }
326
+ this.loading.set(true);
327
+ this.#collectionLoader
328
+ .getCollection(config)
329
+ .pipe(take(1), tap(data => {
330
+ this.#collection.set(data);
331
+ this.error.set(undefined);
332
+ this.loading.set(false);
333
+ }), catchError((err) => {
334
+ this.loading.set(false);
335
+ this.error.set(err);
336
+ return throwError(() => err);
337
+ }), takeUntilDestroyed(this.#destroyRef))
338
+ .subscribe();
339
+ }
340
+ selectNode(node) {
341
+ this.nodeSelectionChanged.emit(node);
342
+ }
343
+ methodColor(method) {
344
+ return methodColor(method);
345
+ }
346
+ /**
347
+ * `true` when an endpoint cannot be configured onto an input: no URL, a
348
+ * body-bearing method (POST/PUT) captured without a body to map, or DELETE —
349
+ * which the runtime has no transport for (owner decision 2026-08-18: PUT is
350
+ * supported and rides the POST family; DELETE stays blocked here until a
351
+ * real need arrives).
352
+ */
353
+ isUnselectable(request) {
354
+ if (!request.url?.raw)
355
+ return true;
356
+ if (request.method === 'DELETE')
357
+ return true;
358
+ return !request.body?.raw && (request.method === 'POST' || request.method === 'PUT');
359
+ }
360
+ /** Why the endpoint is (un)selectable — shown as the row tooltip. */
361
+ selectionTooltip(request) {
362
+ if (!request.url?.raw)
363
+ return 'Invalid Postman config, missing Endpoint URL';
364
+ if (request.method === 'DELETE')
365
+ return 'DELETE endpoints are not supported';
366
+ if (!request.body?.raw && (request.method === 'POST' || request.method === 'PUT')) {
367
+ return `This ${request.method} endpoint has no request body to map`;
368
+ }
369
+ return request.url.raw;
370
+ }
371
+ isEndpointLoading(id) {
372
+ return this.loadingEndPoints().includes(id);
373
+ }
374
+ /** Memoised 1..level vertical guide-line indices for tree indentation. */
375
+ getNodeLines(level) {
376
+ const cached = this.#nodeLinesCache.get(level);
377
+ if (cached) {
378
+ return cached;
379
+ }
380
+ const lines = Array.from({ length: level }, (_, i) => i + 1);
381
+ this.#nodeLinesCache.set(level, lines);
382
+ return lines;
383
+ }
384
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PostmanCollectionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
385
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: PostmanCollectionsComponent, isStandalone: true, selector: "lib-postman-collections", inputs: { postmanCollectionConfig: { classPropertyName: "postmanCollectionConfig", publicName: "postmanCollectionConfig", isSignal: true, isRequired: false, transformFunction: null }, loadingEndPoints: { classPropertyName: "loadingEndPoints", publicName: "loadingEndPoints", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodeSelectionChanged: "nodeSelectionChanged" }, host: { classAttribute: "lib-postman-collections" }, ngImport: i0, template: "@if (loading()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner diameter=\"36\"></mat-spinner>\r\n </div>\r\n} @else {\r\n <lib-search-field\r\n class=\"search\"\r\n placeholder=\"Search api\"\r\n [(value)]=\"searchKey\" />\r\n\r\n @if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\" [message]=\"err.message\" />\r\n } @else if (isEmpty()) {\r\n <lib-empty-state\r\n icon=\"search_off\"\r\n [message]=\"searchKey() ? 'No endpoints match your search' : 'No endpoints in this collection'\" />\r\n } @else {\r\n <mat-tree\r\n [dataSource]=\"treeComponent.dataSource\"\r\n [treeControl]=\"treeComponent.treeControl\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\r\n @if (isEndpointLoading(node.value.id)) {\r\n <mat-spinner diameter=\"22\" class=\"loading-spinner\"></mat-spinner>\r\n }\r\n @for (line of getNodeLines(node.level); track line) {\r\n <div class=\"line\" [style.left.px]=\"line * 40 + 8\"></div>\r\n }\r\n @if (node.value?.request; as request) {\r\n <button\r\n mat-button\r\n class=\"item\"\r\n [disabled]=\"isUnselectable(request)\"\r\n [matTooltip]=\"selectionTooltip(request)\"\r\n (click)=\"selectNode(node.value)\">\r\n <span class=\"node-key method\" [style.color]=\"methodColor(request.method)\">\r\n {{ request.method }}\r\n </span>\r\n <span>{{ node.key }}</span>\r\n </button>\r\n }\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"toggle\"\r\n [attr.aria-label]=\"'Toggle ' + node.key\">\r\n <mat-icon>\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon class=\"folder-icon\">\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'folder_open' : 'folder' }}\r\n </mat-icon>\r\n <span class=\"folder-label\">{{ node.key }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n }\r\n}\r\n", styles: [":host{display:block}.search{margin-bottom:1rem}mat-tree{background:none}:host mat-tree-node{min-height:28px;height:32px}.toggle{padding:0}.folder-icon{color:var(--lib-forms-on-surface-variant)}.folder-label{margin-left:.5rem;font-weight:500}.item{display:flex;width:100%;justify-content:left;text-align:left;font-size:small;font-weight:400;white-space:nowrap;overflow:hidden}.method{display:inline-block;width:38px;text-align:right}.line{position:absolute;height:32px;left:48px;width:1px;background:color-mix(in srgb,var(--lib-forms-outline) 40%,transparent)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;padding:2rem}\n"], dependencies: [{ kind: "ngmodule", type: MatTreeModule }, { kind: "directive", type: i1.MatTreeNodeDef, selector: "[matTreeNodeDef]", inputs: ["matTreeNodeDefWhen", "matTreeNode"] }, { kind: "directive", type: i1.MatTreeNodePadding, selector: "[matTreeNodePadding]", inputs: ["matTreeNodePadding", "matTreeNodePaddingIndent"] }, { kind: "directive", type: i1.MatTreeNodeToggle, selector: "[matTreeNodeToggle]", inputs: ["matTreeNodeToggleRecursive"] }, { kind: "component", type: i1.MatTree, selector: "mat-tree", exportAs: ["matTree"] }, { kind: "directive", type: i1.MatTreeNode, selector: "mat-tree-node", inputs: ["tabIndex", "disabled"], outputs: ["activation", "expandedChange"], exportAs: ["matTreeNode"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.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: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: SearchFieldComponent, selector: "lib-search-field", inputs: ["value", "placeholder", "resultCount"], outputs: ["valueChange"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
386
+ }
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PostmanCollectionsComponent, decorators: [{
388
+ type: Component,
389
+ args: [{ selector: 'lib-postman-collections', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { 'class': 'lib-postman-collections' }, imports: [
390
+ MatTreeModule,
391
+ MatIconModule,
392
+ MatButtonModule,
393
+ MatProgressSpinnerModule,
394
+ MatTooltipModule,
395
+ SearchFieldComponent,
396
+ EmptyStateComponent,
397
+ ], template: "@if (loading()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner diameter=\"36\"></mat-spinner>\r\n </div>\r\n} @else {\r\n <lib-search-field\r\n class=\"search\"\r\n placeholder=\"Search api\"\r\n [(value)]=\"searchKey\" />\r\n\r\n @if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\" [message]=\"err.message\" />\r\n } @else if (isEmpty()) {\r\n <lib-empty-state\r\n icon=\"search_off\"\r\n [message]=\"searchKey() ? 'No endpoints match your search' : 'No endpoints in this collection'\" />\r\n } @else {\r\n <mat-tree\r\n [dataSource]=\"treeComponent.dataSource\"\r\n [treeControl]=\"treeComponent.treeControl\">\r\n <mat-tree-node *matTreeNodeDef=\"let node\" matTreeNodePadding>\r\n @if (isEndpointLoading(node.value.id)) {\r\n <mat-spinner diameter=\"22\" class=\"loading-spinner\"></mat-spinner>\r\n }\r\n @for (line of getNodeLines(node.level); track line) {\r\n <div class=\"line\" [style.left.px]=\"line * 40 + 8\"></div>\r\n }\r\n @if (node.value?.request; as request) {\r\n <button\r\n mat-button\r\n class=\"item\"\r\n [disabled]=\"isUnselectable(request)\"\r\n [matTooltip]=\"selectionTooltip(request)\"\r\n (click)=\"selectNode(node.value)\">\r\n <span class=\"node-key method\" [style.color]=\"methodColor(request.method)\">\r\n {{ request.method }}\r\n </span>\r\n <span>{{ node.key }}</span>\r\n </button>\r\n }\r\n </mat-tree-node>\r\n\r\n <mat-tree-node *matTreeNodeDef=\"let node; when: hasChild\" matTreeNodePadding>\r\n <button\r\n mat-icon-button\r\n matTreeNodeToggle\r\n class=\"toggle\"\r\n [attr.aria-label]=\"'Toggle ' + node.key\">\r\n <mat-icon>\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right' }}\r\n </mat-icon>\r\n </button>\r\n <mat-icon class=\"folder-icon\">\r\n {{ treeComponent.treeControl.isExpanded(node) ? 'folder_open' : 'folder' }}\r\n </mat-icon>\r\n <span class=\"folder-label\">{{ node.key }}</span>\r\n </mat-tree-node>\r\n </mat-tree>\r\n }\r\n}\r\n", styles: [":host{display:block}.search{margin-bottom:1rem}mat-tree{background:none}:host mat-tree-node{min-height:28px;height:32px}.toggle{padding:0}.folder-icon{color:var(--lib-forms-on-surface-variant)}.folder-label{margin-left:.5rem;font-weight:500}.item{display:flex;width:100%;justify-content:left;text-align:left;font-size:small;font-weight:400;white-space:nowrap;overflow:hidden}.method{display:inline-block;width:38px;text-align:right}.line{position:absolute;height:32px;left:48px;width:1px;background:color-mix(in srgb,var(--lib-forms-outline) 40%,transparent)}.loading-container{display:flex;align-items:center;justify-content:center;height:100%;padding:2rem}\n"] }]
398
+ }], propDecorators: { postmanCollectionConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "postmanCollectionConfig", required: false }] }], loadingEndPoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingEndPoints", required: false }] }], nodeSelectionChanged: [{ type: i0.Output, args: ["nodeSelectionChanged"] }] } });
399
+
400
+ let nextId = 0;
401
+ /**
402
+ * Parses a Postman raw request body into a plain object.
403
+ *
404
+ * Returns `{}` for an absent, blank or non-JSON body (a `graphql` / `formdata`
405
+ * mode, or raw text with comments). Nesting and key names are preserved exactly as
406
+ * authored — this is the document template mode seeds from.
407
+ *
408
+ * @param raw - `request.body.raw` from the Postman collection.
409
+ * @returns The parsed body, or `{}` when there is nothing usable.
410
+ */
411
+ function parseRawBody(raw) {
412
+ if (typeof raw !== 'string' || raw.trim() === '')
413
+ return {};
414
+ try {
415
+ const parsed = JSON.parse(raw);
416
+ return parsed !== null && typeof parsed === 'object' ? parsed : {};
417
+ }
418
+ catch {
419
+ return {};
420
+ }
421
+ }
422
+ /** True when a parsed body carries at least one key — i.e. it is worth persisting. */
423
+ function isNonEmptyBody(body) {
424
+ return Object.keys(body).length > 0;
425
+ }
426
+ /**
427
+ * Collects the endpoint's enabled request headers from the Postman item.
428
+ *
429
+ * Postman stores headers as `[{ key, value, disabled? }]`; a `disabled` entry is
430
+ * one the author deliberately switched off in the collection, so it is skipped
431
+ * rather than carried into the form config. The result seeds the header-template
432
+ * editor, so the author starts from what the endpoint actually declares and only
433
+ * has to swap the values they want bound to live fields.
434
+ *
435
+ * @param header - `request.header` from the Postman collection.
436
+ * @returns The captured `name → value` map (empty when there is nothing usable).
437
+ */
438
+ function parseRequestHeaders(header) {
439
+ if (!Array.isArray(header))
440
+ return {};
441
+ const captured = {};
442
+ for (const entry of header) {
443
+ if (entry?.disabled === true)
444
+ continue;
445
+ const key = typeof entry?.key === 'string' ? entry.key.trim() : '';
446
+ if (key === '')
447
+ continue;
448
+ captured[key] = typeof entry.value === 'string' ? entry.value : String(entry?.value ?? '');
449
+ }
450
+ return captured;
451
+ }
452
+ /**
453
+ * Collects the endpoint's enabled URL query params from the Postman item —
454
+ * the exact twin of {@link parseRequestHeaders} for `request.url.query`.
455
+ * Unticked (`disabled: true`) entries are excluded, mirroring what Postman
456
+ * itself would send. Seeds `capturedQuery`, never sent on its own.
457
+ *
458
+ * @param query - `request.url.query` from the Postman collection.
459
+ * @returns The captured `name → value` map (empty when there is nothing usable).
460
+ */
461
+ function parseRequestQuery(query) {
462
+ if (!Array.isArray(query))
463
+ return {};
464
+ const captured = {};
465
+ for (const entry of query) {
466
+ if (entry?.disabled === true)
467
+ continue;
468
+ const key = typeof entry?.key === 'string' ? entry.key.trim() : '';
469
+ if (key === '')
470
+ continue;
471
+ captured[key] = typeof entry.value === 'string' ? entry.value : String(entry?.value ?? '');
472
+ }
473
+ return captured;
474
+ }
475
+ /**
476
+ * Strips the query string from a captured endpoint URL — but ONLY when the
477
+ * query was captured structurally (so nothing is lost): once the params live in
478
+ * `capturedQuery`/`queryTemplate`, leaving them in the URL as text would send
479
+ * every param twice. A URL whose `?…` had no structured `url.query` entries is
480
+ * left verbatim — the text is then the only record of it.
481
+ *
482
+ * @param raw - `request.url.raw` from the Postman collection.
483
+ * @param capturedQuery - What {@link parseRequestQuery} extracted.
484
+ * @returns The URL to persist as `httpEndPoint`.
485
+ */
486
+ function stripCapturedQueryString(raw, capturedQuery) {
487
+ if (Object.keys(capturedQuery).length === 0)
488
+ return raw;
489
+ const cut = raw.indexOf('?');
490
+ return cut === -1 ? raw : raw.slice(0, cut);
491
+ }
492
+ /** Maps a JS `typeof` string to the shared {@link JsDataTypes} enum member. */
493
+ function toJsDataType(value) {
494
+ switch (typeof value) {
495
+ case 'string':
496
+ return JsDataTypes.String;
497
+ case 'number':
498
+ return JsDataTypes.Number;
499
+ case 'bigint':
500
+ return JsDataTypes.BigInt;
501
+ case 'boolean':
502
+ return JsDataTypes.Boolean;
503
+ case 'symbol':
504
+ return JsDataTypes.Symbol;
505
+ case 'function':
506
+ return JsDataTypes.Function;
507
+ case 'object':
508
+ return JsDataTypes.Object;
509
+ default:
510
+ return JsDataTypes.Undefined;
511
+ }
512
+ }
513
+ /**
514
+ * Lets the user pick an API endpoint from a Postman collection and exposes the
515
+ * resulting {@link APIDataFetchingConfigurationInterface}. Renders one of three
516
+ * states — no collection configured, the endpoint picker, or the selected
517
+ * endpoint card — and embeds {@link PostmanCollectionsComponent} for the tree.
518
+ *
519
+ * Internal editor consumed by `t-dynamic-data-edit` and `data-source-picker`;
520
+ * the parent owns the field label, hint and validation chrome.
521
+ *
522
+ * @example
523
+ * <lib-rest-api-call-setup
524
+ * [postmanCollectionConfig]="config()"
525
+ * [value]="value()"
526
+ * [disabled]="disabled()"
527
+ * (valueChanged)="onApiConfig($event)" />
528
+ */
529
+ class RestApiCallSetupComponent {
530
+ constructor() {
531
+ this.#fallbackId = `lib-rest-api-call-setup-${nextId++}`;
532
+ /** Optional consumer-provided host id. */
533
+ this.id = input(undefined, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
534
+ /** Postman collection that backs the picker. */
535
+ this.postmanCollectionConfig = input(undefined, ...(ngDevMode ? [{ debugName: "postmanCollectionConfig" }] : /* istanbul ignore next */ []));
536
+ /**
537
+ * Optional HTTP GET function for fetching sample responses. Retained on the
538
+ * contract for parity; this editor does not invoke it (selection is resolved
539
+ * from the Postman collection the parent already loads).
540
+ */
541
+ this.httpGetDataFunction = input(undefined, ...(ngDevMode ? [{ debugName: "httpGetDataFunction" }] : /* istanbul ignore next */ []));
542
+ /** Disables the picker and shows a lock affordance. */
543
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
544
+ /** Current configuration value. */
545
+ this.value = input(undefined, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
546
+ /** Validation errors surfaced from the parent editor. */
547
+ this.errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
548
+ /** Emits whenever the user selects a new endpoint or clears the value. */
549
+ this.valueChanged = output();
550
+ /** Endpoint IDs currently loading sample data (forwarded to the picker). */
551
+ this.loadingEndPoints = signal([], ...(ngDevMode ? [{ debugName: "loadingEndPoints" }] : /* istanbul ignore next */ []));
552
+ /** Local snapshot of the value, bridged from the `value` input. */
553
+ this.#localValue = signal(undefined, ...(ngDevMode ? [{ debugName: "#localValue" }] : /* istanbul ignore next */ []));
554
+ /** Read-only view of the active configuration for the template. */
555
+ this.currentValue = this.#localValue.asReadonly();
556
+ /** Host id: consumer-provided or a stable per-instance fallback. */
557
+ this.hostId = computed(() => this.id() ?? this.#fallbackId, ...(ngDevMode ? [{ debugName: "hostId" }] : /* istanbul ignore next */ []));
558
+ /** True once the snapshot carries a usable endpoint + method. */
559
+ this.hasValidValue = computed(() => {
560
+ const v = this.#localValue();
561
+ return Boolean(v?.httpEndPoint) && Boolean(v?.httpMethod);
562
+ }, ...(ngDevMode ? [{ debugName: "hasValidValue" }] : /* istanbul ignore next */ []));
563
+ /** Discrete UI mode driving the template's `@switch`. */
564
+ this.mode = computed(() => {
565
+ if (!this.postmanCollectionConfig())
566
+ return 'no-collection';
567
+ return this.hasValidValue() ? 'selected' : 'picker';
568
+ }, ...(ngDevMode ? [{ debugName: "mode" }] : /* istanbul ignore next */ []));
569
+ /** Token-based colour for the selected endpoint's HTTP method badge. */
570
+ this.methodColor = computed(() => {
571
+ const method = this.#localValue()?.httpMethod;
572
+ return method && method in METHOD_COLOR ? METHOD_COLOR[method] : 'currentColor';
573
+ }, ...(ngDevMode ? [{ debugName: "methodColor" }] : /* istanbul ignore next */ []));
574
+ /**
575
+ * Bridge the `value` input into the local mutable snapshot, de-duping with a
576
+ * deep structural compare (replaces the legacy `JSON.stringify` equality so
577
+ * key order and `undefined` no longer cause spurious resets).
578
+ */
579
+ this.valueBridge = effect(() => {
580
+ const next = this.value();
581
+ if (!_isEqual(next, this.#localValue())) {
582
+ this.#localValue.set(next);
583
+ }
584
+ }, ...(ngDevMode ? [{ debugName: "valueBridge" }] : /* istanbul ignore next */ []));
585
+ }
586
+ #fallbackId;
587
+ /** Local snapshot of the value, bridged from the `value` input. */
588
+ #localValue;
589
+ /**
590
+ * Maps the selected tree node into the API config and emits it.
591
+ *
592
+ * Gated on `request` alone. It used to also require `node.response` — a saved
593
+ * Postman *example response* — even though nothing here reads it. An endpoint
594
+ * without one could not be selected at all: the click was a silent no-op, the
595
+ * config was never rebuilt, `requestBody` was never captured, and template mode
596
+ * went on showing whatever skeleton was already persisted. A folder node (the
597
+ * only other thing the picker can emit) has no `request`, so that check alone
598
+ * is the correct guard.
599
+ */
600
+ nodeSelectionChanged(node) {
601
+ const { id, name, request } = node;
602
+ if (!request)
603
+ return;
604
+ const requestBody = parseRawBody(request.body?.raw);
605
+ const capturedHeaders = parseRequestHeaders(request.header);
606
+ const capturedQuery = parseRequestQuery(request.url.query);
607
+ // PUT is body-bearing exactly like POST (it rides the POST branch family
608
+ // at runtime), so it seeds the same required-input mapping.
609
+ const sendsBody = request.method === 'POST' || request.method === 'PUT';
610
+ const minimumInputRequired = sendsBody
611
+ ? this.#extractRequiredInputs(requestBody)
612
+ : [];
613
+ const config = {
614
+ _id: id,
615
+ name,
616
+ // Structurally-captured query params are stripped from the URL text so a
617
+ // param never rides twice (once as literal text, once via queryTemplate).
618
+ httpEndPoint: stripCapturedQueryString(request.url.raw, capturedQuery),
619
+ httpMethod: request.method,
620
+ source: DataSources.Api,
621
+ postFormData: sendsBody,
622
+ // The endpoint's own headers, kept so the header-template editor opens on
623
+ // what the API declares. Omitted when it declared none, so the editor falls
624
+ // back to its skeleton rather than persisting an empty map.
625
+ ...(Object.keys(capturedHeaders).length > 0 ? { capturedHeaders } : {}),
626
+ // Same contract for the URL's own query params → the query-template editor.
627
+ ...(Object.keys(capturedQuery).length > 0 ? { capturedQuery } : {}),
628
+ // The endpoint's Postman documentation, verbatim → the Docs tab.
629
+ ...(request.description?.trim() ? { capturedDocs: request.description } : {}),
630
+ backEndConfig: {
631
+ minimumInputRequired,
632
+ // The endpoint's untouched body is the ONLY faithful record of a nested
633
+ // payload (`minimumInputRequired` entries carry a `name`, not a path), so it
634
+ // is what seeds template mode. Captured for every method that actually sends
635
+ // one — keyed on the body being present, not on `method === 'POST'`, because
636
+ // PUT/PATCH bodies are equally real. Omitted entirely when there is nothing
637
+ // to store, so `deriveDefaultPayloadTemplate` falls back cleanly.
638
+ ...(isNonEmptyBody(requestBody)
639
+ ? { requestBody: requestBody }
640
+ : {}),
641
+ },
642
+ };
643
+ this.#localValue.set(config);
644
+ this.valueChanged.emit(config);
645
+ }
646
+ /**
647
+ * Clears the selection and emits a single `undefined` (the legacy double-emit
648
+ * — `undefined` then a stub `{ source }` — was removed; see FLAG).
649
+ */
650
+ clearValue() {
651
+ this.#localValue.set(undefined);
652
+ this.valueChanged.emit(undefined);
653
+ }
654
+ /**
655
+ * Derives the POST endpoint's required inputs from the request body. Top-level
656
+ * keys are primary; entries under `data` are secondary (non-primary).
657
+ *
658
+ * **Deliberately flat.** `MinimumInputRequiredInterface` has a `name`, not a path,
659
+ * so a nested value can only ever become one `JsDataTypes.Object` entry — mapping
660
+ * `filter.archive` is not expressible here. That is what template mode is for, and
661
+ * why the untouched `requestBody` is captured alongside this (see the caller): it is
662
+ * the only faithful record of a nested payload.
663
+ */
664
+ #extractRequiredInputs(requestBody) {
665
+ const { data, ...rest } = requestBody;
666
+ const dataEntries = data && typeof data === 'object' ? { ...data } : {};
667
+ const primaryKeys = Object.entries(rest).map(([key, val]) => this.#toRequiredInput(key, val, true));
668
+ const secondaryKeys = Object.entries(dataEntries).map(([key, val]) => this.#toRequiredInput(key, val, false));
669
+ return [...primaryKeys, ...secondaryKeys];
670
+ }
671
+ #toRequiredInput(name, value, primaryKey) {
672
+ return { name, type: toJsDataType(value), primaryKey };
673
+ }
674
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RestApiCallSetupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
675
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: RestApiCallSetupComponent, isStandalone: true, selector: "lib-rest-api-call-setup", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, postmanCollectionConfig: { classPropertyName: "postmanCollectionConfig", publicName: "postmanCollectionConfig", isSignal: true, isRequired: false, transformFunction: null }, httpGetDataFunction: { classPropertyName: "httpGetDataFunction", publicName: "httpGetDataFunction", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged" }, host: { properties: { "id": "hostId()", "attr.data-mode": "mode()" }, classAttribute: "lib-rest-api-call-setup" }, ngImport: i0, template: "@switch (mode()) {\r\n @case ('no-collection') {\r\n <lib-empty-state\r\n icon=\"link_off\"\r\n message=\"No Postman collection configured. Add a collection id and API key to pick an endpoint.\" />\r\n }\r\n\r\n @case ('selected') {\r\n <div class=\"lib-rest-api-call-setup__card\">\r\n <button\r\n type=\"button\"\r\n class=\"lib-rest-api-call-setup__endpoint\"\r\n mat-button\r\n [disabled]=\"disabled()\"\r\n [matTooltip]=\"currentValue()?.httpEndPoint ?? ''\"\r\n (click)=\"clearValue()\">\r\n <span class=\"lib-rest-api-call-setup__method\" [style.color]=\"methodColor()\">\r\n {{ currentValue()?.httpMethod }}\r\n </span>\r\n <span class=\"lib-rest-api-call-setup__name\">\r\n {{ currentValue()?.name }}\r\n </span>\r\n <mat-icon class=\"lib-rest-api-call-setup__clear\" aria-hidden=\"true\">close</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('picker') {\r\n <lib-postman-collections\r\n class=\"lib-rest-api-call-setup__picker\"\r\n [class.lib-rest-api-call-setup__picker--disabled]=\"disabled()\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig()!\"\r\n [loadingEndPoints]=\"loadingEndPoints()\"\r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\" />\r\n }\r\n}\r\n\r\n@if (disabled()) {\r\n <p class=\"lib-rest-api-call-setup__lock\">\r\n <mat-icon aria-hidden=\"true\">lock</mat-icon>\r\n <span>This endpoint is locked and cannot be changed.</span>\r\n </p>\r\n}\r\n\r\n<lib-error-list [errors]=\"errors()\" />\r\n", styles: [":host{display:flex;flex-direction:column;gap:1.5rem}.lib-rest-api-call-setup__card{background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);box-shadow:var(--lib-forms-shadow-resting);padding:.5rem}.lib-rest-api-call-setup__endpoint{display:flex;align-items:center;gap:.75rem;width:100%;justify-content:flex-start;padding:.5rem .75rem;font-weight:400;text-align:left;color:var(--lib-forms-on-surface);overflow:hidden}.lib-rest-api-call-setup__method{flex:0 0 auto;font-size:.625rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}.lib-rest-api-call-setup__name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--lib-forms-on-surface)}.lib-rest-api-call-setup__clear{flex:0 0 auto;color:var(--lib-forms-on-surface-variant)}.lib-rest-api-call-setup__picker--disabled{opacity:.55;pointer-events:none}.lib-rest-api-call-setup__lock{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}\n"], dependencies: [{ kind: "component", type: PostmanCollectionsComponent, selector: "lib-postman-collections", inputs: ["postmanCollectionConfig", "loadingEndPoints"], outputs: ["nodeSelectionChanged"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }, { kind: "component", type: ErrorListComponent, selector: "lib-error-list", inputs: ["errors"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
676
+ }
677
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: RestApiCallSetupComponent, decorators: [{
678
+ type: Component,
679
+ args: [{ selector: 'lib-rest-api-call-setup', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [
680
+ PostmanCollectionsComponent,
681
+ EmptyStateComponent,
682
+ ErrorListComponent,
683
+ MatButtonModule,
684
+ MatIconModule,
685
+ MatTooltipModule,
686
+ ], host: {
687
+ 'class': 'lib-rest-api-call-setup',
688
+ '[id]': 'hostId()',
689
+ '[attr.data-mode]': 'mode()',
690
+ }, template: "@switch (mode()) {\r\n @case ('no-collection') {\r\n <lib-empty-state\r\n icon=\"link_off\"\r\n message=\"No Postman collection configured. Add a collection id and API key to pick an endpoint.\" />\r\n }\r\n\r\n @case ('selected') {\r\n <div class=\"lib-rest-api-call-setup__card\">\r\n <button\r\n type=\"button\"\r\n class=\"lib-rest-api-call-setup__endpoint\"\r\n mat-button\r\n [disabled]=\"disabled()\"\r\n [matTooltip]=\"currentValue()?.httpEndPoint ?? ''\"\r\n (click)=\"clearValue()\">\r\n <span class=\"lib-rest-api-call-setup__method\" [style.color]=\"methodColor()\">\r\n {{ currentValue()?.httpMethod }}\r\n </span>\r\n <span class=\"lib-rest-api-call-setup__name\">\r\n {{ currentValue()?.name }}\r\n </span>\r\n <mat-icon class=\"lib-rest-api-call-setup__clear\" aria-hidden=\"true\">close</mat-icon>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('picker') {\r\n <lib-postman-collections\r\n class=\"lib-rest-api-call-setup__picker\"\r\n [class.lib-rest-api-call-setup__picker--disabled]=\"disabled()\"\r\n [postmanCollectionConfig]=\"postmanCollectionConfig()!\"\r\n [loadingEndPoints]=\"loadingEndPoints()\"\r\n (nodeSelectionChanged)=\"nodeSelectionChanged($event)\" />\r\n }\r\n}\r\n\r\n@if (disabled()) {\r\n <p class=\"lib-rest-api-call-setup__lock\">\r\n <mat-icon aria-hidden=\"true\">lock</mat-icon>\r\n <span>This endpoint is locked and cannot be changed.</span>\r\n </p>\r\n}\r\n\r\n<lib-error-list [errors]=\"errors()\" />\r\n", styles: [":host{display:flex;flex-direction:column;gap:1.5rem}.lib-rest-api-call-setup__card{background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);box-shadow:var(--lib-forms-shadow-resting);padding:.5rem}.lib-rest-api-call-setup__endpoint{display:flex;align-items:center;gap:.75rem;width:100%;justify-content:flex-start;padding:.5rem .75rem;font-weight:400;text-align:left;color:var(--lib-forms-on-surface);overflow:hidden}.lib-rest-api-call-setup__method{flex:0 0 auto;font-size:.625rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase}.lib-rest-api-call-setup__name{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--lib-forms-on-surface)}.lib-rest-api-call-setup__clear{flex:0 0 auto;color:var(--lib-forms-on-surface-variant)}.lib-rest-api-call-setup__picker--disabled{opacity:.55;pointer-events:none}.lib-rest-api-call-setup__lock{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}\n"] }]
691
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], postmanCollectionConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "postmanCollectionConfig", required: false }] }], httpGetDataFunction: [{ type: i0.Input, args: [{ isSignal: true, alias: "httpGetDataFunction", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }] } });
692
+
693
+ var restApiCallSetup_component = /*#__PURE__*/Object.freeze({
694
+ __proto__: null,
695
+ RestApiCallSetupComponent: RestApiCallSetupComponent
696
+ });
697
+
698
+ export { RestApiCallSetupComponent as R, payloadDefaultOf as a, bodyModeOf as b, minInputsOf as c, deriveConfiguredRequest as d, dependencyLabels as e, restApiCallSetup_component as f, headerCountOf as h, methodColorOf as m, paramCountOf as p, readinessOf as r, sendsBody as s, waitsForLabels as w };
699
+ //# sourceMappingURL=ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs.map