ngx-t-forms 2.0.37 → 3.0.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 (205) hide show
  1. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs +261 -0
  2. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs.map +1 -0
  3. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs → ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs} +4 -4
  4. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-D_l5sbNh.mjs.map → ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs.map} +1 -1
  5. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs +225 -0
  6. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs.map +1 -0
  7. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs → ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs} +6 -6
  8. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-fJIsRm0v.mjs.map → ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs.map} +1 -1
  9. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs +1011 -0
  10. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs.map +1 -0
  11. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs → ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs} +4 -4
  12. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-B8Do3h4B.mjs.map → ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs.map} +1 -1
  13. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs +136 -0
  14. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs.map +1 -0
  15. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs → ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs} +2 -2
  16. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-L1kPy15K.mjs.map → ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs.map} +1 -1
  17. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs} +2 -2
  18. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6Cp-oK.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs.map} +1 -1
  19. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs +253 -0
  20. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs.map +1 -0
  21. package/fesm2022/{ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs → ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs} +8 -8
  22. package/fesm2022/{ngx-t-forms-data-source-picker.component-r7OGAsxo.mjs.map → ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs.map} +1 -1
  23. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs +419 -0
  24. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs.map +1 -0
  25. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs +231 -0
  26. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs.map +1 -0
  27. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs → ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs} +4 -4
  28. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-DsjcLQ5A.mjs.map → ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs.map} +1 -1
  29. package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs → ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs} +4 -4
  30. package/fesm2022/{ngx-t-forms-date-range-picker-input-element.component-B8V7IpoK.mjs.map → ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs.map} +1 -1
  31. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs +333 -0
  32. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs.map +1 -0
  33. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs → ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs} +5 -5
  34. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-hKJqVYUY.mjs.map → ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs.map} +1 -1
  35. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs +543 -0
  36. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs.map +1 -0
  37. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs +1259 -0
  38. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs.map +1 -0
  39. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs +1996 -0
  40. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs.map +1 -0
  41. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs +581 -0
  42. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs.map +1 -0
  43. package/fesm2022/{ngx-t-forms-editor-input-element.component-D38U94oj.mjs → ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs} +138 -15
  44. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs.map +1 -0
  45. package/fesm2022/ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs +539 -0
  46. package/fesm2022/ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs.map +1 -0
  47. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs +585 -0
  48. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs.map +1 -0
  49. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs → ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs} +7 -7
  50. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-_RBYRgn9.mjs.map → ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs.map} +1 -1
  51. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs +447 -0
  52. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs.map +1 -0
  53. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs +163 -0
  54. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs.map +1 -0
  55. package/fesm2022/{ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs → ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs} +2 -2
  56. package/fesm2022/{ngx-t-forms-form-input-selector.component-CUwK3DqG.mjs.map → ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs.map} +1 -1
  57. package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs → ngx-t-forms-form-json-view.component-r64GKVhI.mjs} +2 -2
  58. package/fesm2022/{ngx-t-forms-form-json-view.component-D9rU9vxT.mjs.map → ngx-t-forms-form-json-view.component-r64GKVhI.mjs.map} +1 -1
  59. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs +28 -0
  60. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs.map +1 -0
  61. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs +291 -0
  62. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs.map +1 -0
  63. package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs → ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs} +6 -6
  64. package/fesm2022/{ngx-t-forms-form-section-stepper.component-CqCL3Bnc.mjs.map → ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs.map} +1 -1
  65. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs +936 -0
  66. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs.map +1 -0
  67. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs → ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs} +11 -11
  68. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-wmRDJU4P.mjs.map → ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs.map} +1 -1
  69. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs +816 -0
  70. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs.map +1 -0
  71. package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs → ngx-t-forms-geo-location.component-D2fIbagr.mjs} +7 -7
  72. package/fesm2022/{ngx-t-forms-geo-location.component-CMbBSXe0.mjs.map → ngx-t-forms-geo-location.component-D2fIbagr.mjs.map} +1 -1
  73. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs +329 -0
  74. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs.map +1 -0
  75. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs → ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs} +7 -7
  76. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-Cbq8OYk7.mjs.map → ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs.map} +1 -1
  77. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs +360 -0
  78. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs.map +1 -0
  79. package/fesm2022/{ngx-t-forms-index-CPNvE4PP.mjs → ngx-t-forms-index-6YIhS6cm.mjs} +2 -2
  80. package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs.map +1 -0
  81. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs +2 -0
  82. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs.map +1 -0
  83. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs +128 -0
  84. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs.map +1 -0
  85. package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs → ngx-t-forms-input-custom.component-Dcoze7U3.mjs} +2 -2
  86. package/fesm2022/{ngx-t-forms-input-custom.component-uNVdF9aA.mjs.map → ngx-t-forms-input-custom.component-Dcoze7U3.mjs.map} +1 -1
  87. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs +512 -0
  88. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs.map +1 -0
  89. package/fesm2022/{ngx-t-forms-input-editor.component-BWoKhlI3.mjs → ngx-t-forms-input-editor.component-B6UKwV4i.mjs} +7 -7
  90. package/fesm2022/{ngx-t-forms-input-editor.component-BWoKhlI3.mjs.map → ngx-t-forms-input-editor.component-B6UKwV4i.mjs.map} +1 -1
  91. package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs → ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs} +2 -2
  92. package/fesm2022/{ngx-t-forms-map-mat-options-keys-D0SGS9xQ.mjs.map → ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs.map} +1 -1
  93. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs +132 -0
  94. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs.map +1 -0
  95. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs +268 -0
  96. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs.map +1 -0
  97. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs +167 -0
  98. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs.map +1 -0
  99. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs +241 -0
  100. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs.map +1 -0
  101. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs +180 -0
  102. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map +1 -0
  103. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs +114 -0
  104. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs.map +1 -0
  105. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs → ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs} +4 -4
  106. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CxF6Ljjf.mjs.map → ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs.map} +1 -1
  107. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs +69 -0
  108. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs.map +1 -0
  109. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs → ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs} +4 -4
  110. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-BqT5Z8SM.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs.map} +1 -1
  111. package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs} +3 -3
  112. package/fesm2022/{ngx-t-forms-mscoa-error-display.component-99DpVSy7.mjs.map → ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs.map} +1 -1
  113. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs +200 -0
  114. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs.map +1 -0
  115. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs → ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs} +7 -7
  116. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BT-dM_5C.mjs.map → ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs.map} +1 -1
  117. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs +850 -0
  118. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs.map +1 -0
  119. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs +107 -0
  120. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs.map +1 -0
  121. package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs} +3 -3
  122. package/fesm2022/{ngx-t-forms-mscoa-temporary-hint.component-B1Z-IXSL.mjs.map → ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs.map} +1 -1
  123. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs +1665 -0
  124. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs.map +1 -0
  125. package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs → ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs} +13 -13
  126. package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-DXAh2Mbm.mjs.map → ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs.map} +1 -1
  127. package/fesm2022/{ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs → ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs} +826 -120
  128. package/fesm2022/ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs.map +1 -0
  129. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs +28237 -0
  130. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs.map +1 -0
  131. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs +1024 -0
  132. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs.map +1 -0
  133. package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs → ngx-t-forms-paginated-selection-table-DrXB22iY.mjs} +8 -8
  134. package/fesm2022/{ngx-t-forms-paginated-selection-table-DHwojPhn.mjs.map → ngx-t-forms-paginated-selection-table-DrXB22iY.mjs.map} +1 -1
  135. package/fesm2022/{ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs → ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs} +2 -2
  136. package/fesm2022/{ngx-t-forms-payload-template-editor.component-CAXdFu4E.mjs.map → ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs.map} +1 -1
  137. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs +234 -0
  138. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs.map +1 -0
  139. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs +1126 -0
  140. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs.map +1 -0
  141. package/fesm2022/{ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs → ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs} +11 -11
  142. package/fesm2022/{ngx-t-forms-pipeline-generator.component-BJQ-KnmU.mjs.map → ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs.map} +1 -1
  143. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs +639 -0
  144. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs.map +1 -0
  145. package/fesm2022/ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs +446 -0
  146. package/fesm2022/ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs.map +1 -0
  147. package/fesm2022/{ngx-t-forms-required-inputs.component-C-E3fQu6.mjs → ngx-t-forms-required-inputs.component-BMmNxeE-.mjs} +6 -6
  148. package/fesm2022/{ngx-t-forms-required-inputs.component-C-E3fQu6.mjs.map → ngx-t-forms-required-inputs.component-BMmNxeE-.mjs.map} +1 -1
  149. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs +451 -0
  150. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs.map +1 -0
  151. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs +625 -0
  152. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs.map +1 -0
  153. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs → ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs} +5 -5
  154. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-D3sa7sNg.mjs.map → ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs.map} +1 -1
  155. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs +72 -0
  156. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs.map +1 -0
  157. package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs → ngx-t-forms-section-report.component-BYMcaRE5.mjs} +4 -4
  158. package/fesm2022/{ngx-t-forms-section-report.component-D6jakGa5.mjs.map → ngx-t-forms-section-report.component-BYMcaRE5.mjs.map} +1 -1
  159. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs +248 -0
  160. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs.map +1 -0
  161. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs +408 -0
  162. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs.map +1 -0
  163. package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs → ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs} +8 -8
  164. package/fesm2022/{ngx-t-forms-select-input-element.component-CwqIck0h.mjs.map → ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs.map} +1 -1
  165. package/fesm2022/{ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs → ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs} +6 -6
  166. package/fesm2022/{ngx-t-forms-selection-options-editor.component-Coj9gnrq.mjs.map → ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs.map} +1 -1
  167. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs +275 -0
  168. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs.map +1 -0
  169. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs +366 -0
  170. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs.map +1 -0
  171. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs +263 -0
  172. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs.map +1 -0
  173. package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs → ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs} +4 -4
  174. package/fesm2022/{ngx-t-forms-textarea-input-element.component-D4dEi8Vs.mjs.map → ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs.map} +1 -1
  175. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs +233 -0
  176. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs.map +1 -0
  177. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs +305 -0
  178. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs.map +1 -0
  179. package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs → ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs} +4 -4
  180. package/fesm2022/{ngx-t-forms-toggle-input-element.component-BZiTFB0j.mjs.map → ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs.map} +1 -1
  181. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs +1105 -0
  182. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs.map +1 -0
  183. package/fesm2022/{ngx-t-forms-validators-config.component-B3K9nLxx.mjs → ngx-t-forms-validators-config.component-CoGSFor3.mjs} +5 -5
  184. package/fesm2022/{ngx-t-forms-validators-config.component-B3K9nLxx.mjs.map → ngx-t-forms-validators-config.component-CoGSFor3.mjs.map} +1 -1
  185. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs +2923 -0
  186. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs.map +1 -0
  187. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs → ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs} +17 -17
  188. package/fesm2022/ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs.map +1 -0
  189. package/fesm2022/ngx-t-forms.mjs +1 -1
  190. package/package.json +2 -2
  191. package/types/ngx-t-forms.d.ts +7 -0
  192. package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs +0 -704
  193. package/fesm2022/ngx-t-forms-document-picker.component-f-hz6Vef.mjs.map +0 -1
  194. package/fesm2022/ngx-t-forms-editor-input-element.component-D38U94oj.mjs.map +0 -1
  195. package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs +0 -240
  196. package/fesm2022/ngx-t-forms-editor-js-input.component-D_Jq7sfY.mjs.map +0 -1
  197. package/fesm2022/ngx-t-forms-index-CPNvE4PP.mjs.map +0 -1
  198. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs +0 -66
  199. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-Cu-KiAeY.mjs.map +0 -1
  200. package/fesm2022/ngx-t-forms-ngx-t-forms-DQ_h-jPF.mjs.map +0 -1
  201. package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs +0 -358
  202. package/fesm2022/ngx-t-forms-record-list-manager.component-BoD3S_7u.mjs.map +0 -1
  203. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs +0 -204
  204. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DqFMP1rZ.mjs.map +0 -1
  205. package/fesm2022/ngx-t-forms-workflow-adjudication.component-DD6Fhx06.mjs.map +0 -1
@@ -0,0 +1,1259 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, DestroyRef, signal, computed, Injectable, ViewEncapsulation, ChangeDetectionStrategy, Component, ElementRef, input } from '@angular/core';
3
+ import * as i1$1 from '@angular/forms';
4
+ import { NgControl, ReactiveFormsModule } from '@angular/forms';
5
+ import * as i2$1 from '@angular/material/form-field';
6
+ import { MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';
7
+ import * as i3 from '@angular/material/icon';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import * as i2 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
11
+ import * as i5 from '@angular/material/tooltip';
12
+ import { MatTooltipModule } from '@angular/material/tooltip';
13
+ import { C as readDocumentIdentifier, G as DOCUMENT_REPOSITORY, H as DEFAULT_DOCUMENT_PAGE_SIZE, I as DEFAULT_DOCUMENT_SORT, K as DocumentPickerConfigurationError, L as readDocumentPath, O as readDocumentId, Q as toDocumentReference, R as FormatDataPipe, B as BaseCustomInput, c as TFormEngine, W as readDocumentReferences, X as writeDocumentValue, Y as resolveIdentifierPath, q as getInputErrorMessage, u as TFormInputStatusComponent } from './ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs';
14
+ import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
15
+ import * as i1 from '@angular/material/dialog';
16
+ import { MAT_DIALOG_DATA, MatDialogRef, MatDialogModule, MatDialog } from '@angular/material/dialog';
17
+ import { distinctUntilChanged, tap, switchMap, of, forkJoin, map, catchError, debounceTime, take } from 'rxjs';
18
+ import * as i4 from '@angular/material/progress-spinner';
19
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
20
+
21
+ /** `true` for values that mean "the user has not chosen anything". */
22
+ function isEmptyValue(value) {
23
+ if (value == null || value === '')
24
+ return true;
25
+ return Array.isArray(value) && value.length === 0;
26
+ }
27
+ /** Escapes a string for safe literal use inside a regular expression. */
28
+ function escapeRegExp(value) {
29
+ return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
30
+ }
31
+ /** Applies the clause's declared value type to a single raw value. */
32
+ function coerceValue(value, valueType) {
33
+ if (value == null)
34
+ return value;
35
+ if (valueType === 'number') {
36
+ const asNumber = Number(value);
37
+ return Number.isNaN(asNumber) ? value : asNumber;
38
+ }
39
+ if (valueType === 'boolean') {
40
+ if (typeof value === 'boolean')
41
+ return value;
42
+ return String(value).trim().toLowerCase() === 'true';
43
+ }
44
+ return value;
45
+ }
46
+ /**
47
+ * Resolves a clause's value list. `in` / `nin` accept an array as-is and split a
48
+ * comma-separated string, so an administrator can type `draft, submitted` in the
49
+ * builder without needing array syntax.
50
+ */
51
+ function coerceValueList(value, valueType) {
52
+ const raw = Array.isArray(value)
53
+ ? value
54
+ : String(value ?? '')
55
+ .split(',')
56
+ .map(part => part.trim())
57
+ .filter(part => part !== '');
58
+ return raw.map(entry => coerceValue(entry, valueType));
59
+ }
60
+ /**
61
+ * Resolves which of the two mutually exclusive value sources a clause uses.
62
+ *
63
+ * An explicit `valueSource` always wins — that is the whole point of the switch:
64
+ * an administrator who picked "Fixed value" gets the fixed value even if a stale
65
+ * `fromInputId` is still sitting on the record. Only when `valueSource` is absent
66
+ * — every filter saved before the switch existed — is the source inferred from
67
+ * what was filled in, which is exactly the previous behaviour.
68
+ */
69
+ function isInputBound(preset) {
70
+ if (preset.valueSource === 'input')
71
+ return true;
72
+ if (preset.valueSource === 'fixed')
73
+ return false;
74
+ return !!preset.fromInputId;
75
+ }
76
+ /**
77
+ * Reads a clause's comparison value off the sibling input it is bound to.
78
+ *
79
+ * A sibling that is itself a document picker stores a whole reference object
80
+ * (`{ id, workflowId, reference, label }`) for its chips, and that object is never a
81
+ * valid comparison value: an `eq` clause becomes an exact-subdocument match against a
82
+ * string field, `in` stringifies to `'[object Object]'`, `regex` escapes the same. All
83
+ * three match nothing — and because `isEmptyValue` sees a populated object,
84
+ * `omitWhenEmpty` does not drop the clause either, so the failure surfaces as an empty
85
+ * browse dialog rather than an error. That is the whole point of narrowing here: it is
86
+ * the difference between "no transactions match" and "your filter is broken".
87
+ *
88
+ * The test is structural because it has to be — the picker field holds only its own
89
+ * config, so it cannot tell the builder that `fromInputId` names another picker. That
90
+ * is safe at this call site specifically: a Mongo comparison value is always a scalar
91
+ * or a scalar list, so a reference object here has no valid reading to protect.
92
+ * Anything not recognisable as a stored link is passed through untouched.
93
+ *
94
+ * A multi-select source narrows to the identifier **list**, which is what the `in` /
95
+ * `nin` operators want. Pair a multi-select picker with `eq` and the array reaches the
96
+ * query as an array — a configuration mismatch this deliberately does not paper over
97
+ * by rewriting the operator the administrator chose.
98
+ *
99
+ * @param formValue - Current value of the parent form, keyed by input id.
100
+ * @param fromInputId - The sibling input the clause reads from.
101
+ * @returns The comparison value, narrowed when it is a stored document link.
102
+ */
103
+ function readBoundValue(formValue, fromInputId) {
104
+ if (fromInputId === undefined)
105
+ return undefined;
106
+ const stored = formValue?.[fromInputId];
107
+ return readDocumentIdentifier(stored) ?? stored;
108
+ }
109
+ /** Translates one resolved clause into its Mongo-style predicate. */
110
+ function toPredicate(filter, value) {
111
+ switch (filter.op ?? 'eq') {
112
+ case 'ne':
113
+ return { $ne: coerceValue(value, filter.valueType) };
114
+ case 'in':
115
+ return { $in: coerceValueList(value, filter.valueType) };
116
+ case 'nin':
117
+ return { $nin: coerceValueList(value, filter.valueType) };
118
+ case 'gt':
119
+ return { $gt: coerceValue(value, filter.valueType) };
120
+ case 'gte':
121
+ return { $gte: coerceValue(value, filter.valueType) };
122
+ case 'lt':
123
+ return { $lt: coerceValue(value, filter.valueType) };
124
+ case 'lte':
125
+ return { $lte: coerceValue(value, filter.valueType) };
126
+ case 'regex':
127
+ return { $regex: escapeRegExp(String(value ?? '')), $options: 'i' };
128
+ case 'exists':
129
+ return { $exists: coerceValue(value, 'boolean') !== false };
130
+ default:
131
+ return coerceValue(value, filter.valueType);
132
+ }
133
+ }
134
+ /**
135
+ * Builds the filter object sent with a document query.
136
+ *
137
+ * Order is deliberate: the archive scope first, then the step restriction, then the
138
+ * administrator's preset clauses. Presets are applied last so a picker can deliberately
139
+ * widen the archive scope, and two presets on the same path resolve last-one-wins.
140
+ *
141
+ * Each preset takes its comparison value from exactly one source, chosen by its
142
+ * `valueSource` and falling back to inference when that is absent (see
143
+ * {@link isInputBound}). A clause bound to a sibling input with `omitWhenEmpty` is
144
+ * dropped while that input is empty, rather than filtering on an empty value —
145
+ * otherwise the picker would show an empty list before the user has filled in the
146
+ * field it depends on. `omitWhenEmpty` is meaningless for a fixed value and is ignored
147
+ * there. A clause bound to a sibling that is itself a document picker compares against
148
+ * that picker's identifier, not its stored reference object — see {@link readBoundValue}.
149
+ *
150
+ * @param input - Builder configuration, the browsing step choice, and the parent form value.
151
+ * @returns The filter for {@link IDocumentQueryRequest.filter}.
152
+ */
153
+ function buildDocumentFilter(input) {
154
+ const filter = { archive: input.includeArchived === true };
155
+ const activeStepId = input.activeStepId ?? null;
156
+ const lockedStepIds = input.lockedStepIds ?? [];
157
+ if (activeStepId) {
158
+ filter['currentStep'] = activeStepId;
159
+ }
160
+ else if (lockedStepIds.length === 1) {
161
+ filter['currentStep'] = lockedStepIds[0];
162
+ }
163
+ else if (lockedStepIds.length > 1) {
164
+ filter['currentStep'] = { $in: [...lockedStepIds] };
165
+ }
166
+ for (const preset of input.presetFilters ?? []) {
167
+ if (!preset?.path)
168
+ continue;
169
+ const boundToInput = isInputBound(preset);
170
+ const fromInputId = preset.fromInputId;
171
+ const rawValue = boundToInput
172
+ ? readBoundValue(input.formValue, fromInputId)
173
+ : preset.value;
174
+ if (boundToInput && preset.omitWhenEmpty && isEmptyValue(rawValue))
175
+ continue;
176
+ filter[preset.path] = toPredicate(preset, rawValue);
177
+ }
178
+ return filter;
179
+ }
180
+ /**
181
+ * Builds the filter that hydrates an existing selection, whatever page — or step —
182
+ * those documents currently sit on.
183
+ *
184
+ * @param ids - Selected document identifiers.
185
+ * @param identifierPath - Path the ids were read from; `_id` unless the picker is
186
+ * configured with a different primary identifier key.
187
+ * @returns A filter matching exactly those documents, or `undefined` when nothing is selected.
188
+ */
189
+ function buildSelectionFilter(ids, identifierPath) {
190
+ if (ids.length === 0)
191
+ return undefined;
192
+ return { [identifierPath]: { $in: [...ids] } };
193
+ }
194
+
195
+ /** Root-level document fields always present on a transaction, whatever the workflow. */
196
+ const REFERENCE_COLUMN = {
197
+ key: 'reference',
198
+ label: 'Reference',
199
+ path: 'reference',
200
+ type: undefined,
201
+ searchable: true,
202
+ };
203
+ /**
204
+ * Column types that cannot back a free-text search, mapped to the type name the
205
+ * search schema uses. Anything not listed is treated as text.
206
+ */
207
+ const NON_TEXT_TYPES = [
208
+ { match: 'currency', schemaType: 'number' },
209
+ { match: 'number', schemaType: 'number' },
210
+ { match: 'daysago', schemaType: 'Date' },
211
+ { match: 'date', schemaType: 'Date' },
212
+ { match: 'bool', schemaType: 'boolean' },
213
+ ];
214
+ /** Column type that is neither searchable nor a real form field. */
215
+ const SYSTEM_TYPE = 'systemreference';
216
+ /**
217
+ * Resolves a workflow's declared value type to the type name the search schema uses,
218
+ * or `undefined` for columns that must be left out of the schema entirely.
219
+ */
220
+ function resolveSchemaType(type) {
221
+ const normalized = String(type ?? '').toLowerCase();
222
+ if (normalized === SYSTEM_TYPE)
223
+ return undefined;
224
+ const nonText = NON_TEXT_TYPES.find(candidate => normalized.includes(candidate.match));
225
+ return nonText ? nonText.schemaType : 'string';
226
+ }
227
+ /**
228
+ * Turns the workflow's raw list configuration into the columns the picker renders.
229
+ *
230
+ * Hidden columns are dropped, `reference` is prepended because every transaction has
231
+ * one and it is what users actually recognise, and each column keeps the document
232
+ * `path` so sorting and searching address the stored field rather than the bare
233
+ * control name.
234
+ *
235
+ * @param cols - Column configuration as the host reports it.
236
+ * @returns Display columns, `reference` first, in workflow order after that.
237
+ */
238
+ function resolveDocumentColumns(cols) {
239
+ const resolved = (cols ?? [])
240
+ .filter(col => !col.hidden && col.formControlName !== REFERENCE_COLUMN.key)
241
+ .map(col => ({
242
+ key: col.formControlName,
243
+ label: col.label || col.formControlName,
244
+ path: col.path,
245
+ type: col.type,
246
+ searchable: resolveSchemaType(col.type) === 'string',
247
+ }));
248
+ return [REFERENCE_COLUMN, ...resolved];
249
+ }
250
+ /**
251
+ * Builds the path → type map that scopes a free-text search.
252
+ *
253
+ * This map is not optional decoration: a search term sent without it is silently
254
+ * ignored by the server and an unfiltered page comes back, which reads to the user
255
+ * as "search is broken" or, worse, as a filtered result set that is not filtered.
256
+ *
257
+ * @param columns - Resolved display columns.
258
+ * @returns Path → type map covering every text column, always including `reference`.
259
+ */
260
+ function buildDocumentSearchSchema(columns) {
261
+ const schema = { reference: 'string' };
262
+ for (const column of columns) {
263
+ const schemaType = resolveSchemaType(column.type);
264
+ if (!schemaType)
265
+ continue;
266
+ schema[column.path] = schemaType;
267
+ }
268
+ return schema;
269
+ }
270
+
271
+ /**
272
+ * Owns one document picker's query: which page, in what order, filtered how, matching
273
+ * what search term.
274
+ *
275
+ * Every user action funnels into a single request, and that request is the only thing
276
+ * that triggers a fetch — the picker never loads because a control gained focus or a
277
+ * validator changed. Requests are switched, so a slow page can no longer overwrite the
278
+ * page the user is actually looking at.
279
+ *
280
+ * Paging is keyset-based, so the cursor for page N is only known once page N-1 has been
281
+ * read. The store keeps the cursors it has seen and moves one page at a time; anything
282
+ * that invalidates them — a new sort, filter, search term or page size — resets paging
283
+ * to the first page rather than sending a cursor the server would reject.
284
+ *
285
+ * @internal Provided per picker instance; not exported via public-api.ts.
286
+ */
287
+ class DocumentQueryStore {
288
+ #repository;
289
+ #destroyRef;
290
+ #workflowId;
291
+ #filter;
292
+ #pageSize;
293
+ #sort;
294
+ #search;
295
+ /** Cursor for each page reached so far; index 0 is always the first page. */
296
+ #cursors;
297
+ #pageIndex;
298
+ /** Bumped by {@link refresh} so an identical request is re-issued deliberately. */
299
+ #tick;
300
+ #columns;
301
+ #columnsReady;
302
+ #steps;
303
+ #rows;
304
+ #hasMore;
305
+ #totalItems;
306
+ #totalPages;
307
+ #loading;
308
+ #error;
309
+ /** The request for the current state, or `null` while the store is not ready to query. */
310
+ #request;
311
+ constructor() {
312
+ this.#repository = inject(DOCUMENT_REPOSITORY);
313
+ this.#destroyRef = inject(DestroyRef);
314
+ this.#workflowId = signal('', ...(ngDevMode ? [{ debugName: "#workflowId" }] : /* istanbul ignore next */ []));
315
+ this.#filter = signal({}, ...(ngDevMode ? [{ debugName: "#filter" }] : /* istanbul ignore next */ []));
316
+ this.#pageSize = signal(DEFAULT_DOCUMENT_PAGE_SIZE, ...(ngDevMode ? [{ debugName: "#pageSize" }] : /* istanbul ignore next */ []));
317
+ this.#sort = signal(DEFAULT_DOCUMENT_SORT, ...(ngDevMode ? [{ debugName: "#sort" }] : /* istanbul ignore next */ []));
318
+ this.#search = signal('', ...(ngDevMode ? [{ debugName: "#search" }] : /* istanbul ignore next */ []));
319
+ /** Cursor for each page reached so far; index 0 is always the first page. */
320
+ this.#cursors = signal([undefined], ...(ngDevMode ? [{ debugName: "#cursors" }] : /* istanbul ignore next */ []));
321
+ this.#pageIndex = signal(0, ...(ngDevMode ? [{ debugName: "#pageIndex" }] : /* istanbul ignore next */ []));
322
+ /** Bumped by {@link refresh} so an identical request is re-issued deliberately. */
323
+ this.#tick = signal(0, ...(ngDevMode ? [{ debugName: "#tick" }] : /* istanbul ignore next */ []));
324
+ this.#columns = signal([], ...(ngDevMode ? [{ debugName: "#columns" }] : /* istanbul ignore next */ []));
325
+ this.#columnsReady = signal(false, ...(ngDevMode ? [{ debugName: "#columnsReady" }] : /* istanbul ignore next */ []));
326
+ this.#steps = signal([], ...(ngDevMode ? [{ debugName: "#steps" }] : /* istanbul ignore next */ []));
327
+ this.#rows = signal([], ...(ngDevMode ? [{ debugName: "#rows" }] : /* istanbul ignore next */ []));
328
+ this.#hasMore = signal(false, ...(ngDevMode ? [{ debugName: "#hasMore" }] : /* istanbul ignore next */ []));
329
+ this.#totalItems = signal(undefined, ...(ngDevMode ? [{ debugName: "#totalItems" }] : /* istanbul ignore next */ []));
330
+ this.#totalPages = signal(undefined, ...(ngDevMode ? [{ debugName: "#totalPages" }] : /* istanbul ignore next */ []));
331
+ this.#loading = signal(false, ...(ngDevMode ? [{ debugName: "#loading" }] : /* istanbul ignore next */ []));
332
+ this.#error = signal(undefined, ...(ngDevMode ? [{ debugName: "#error" }] : /* istanbul ignore next */ []));
333
+ /** Documents on the current page, in server order. */
334
+ this.rows = this.#rows.asReadonly();
335
+ /** Columns to render, resolved from the workflow's list configuration. */
336
+ this.columns = this.#columns.asReadonly();
337
+ /** Workflow steps available to filter by. */
338
+ this.steps = this.#steps.asReadonly();
339
+ /** `true` while a page or the workflow metadata is in flight. */
340
+ this.loading = this.#loading.asReadonly();
341
+ /** Why nothing is shown, or `undefined` when the last request succeeded. */
342
+ this.error = this.#error.asReadonly();
343
+ /** Active sort. */
344
+ this.sort = this.#sort.asReadonly();
345
+ /** Active search term. */
346
+ this.search = this.#search.asReadonly();
347
+ /** Page size in force. */
348
+ this.pageSize = this.#pageSize.asReadonly();
349
+ /** Zero-based index of the page being shown. */
350
+ this.pageIndex = this.#pageIndex.asReadonly();
351
+ /** Total matching records — known from the first page only, then remembered. */
352
+ this.totalItems = this.#totalItems.asReadonly();
353
+ /** Total pages for the current query, when the source reports it. */
354
+ this.totalPages = this.#totalPages.asReadonly();
355
+ /** `true` when a further page exists after the current one. */
356
+ this.canGoNext = computed(() => this.#hasMore() && !this.#loading(), ...(ngDevMode ? [{ debugName: "canGoNext" }] : /* istanbul ignore next */ []));
357
+ /** `true` when the current page is not the first. */
358
+ this.canGoPrevious = computed(() => this.#pageIndex() > 0 && !this.#loading(), ...(ngDevMode ? [{ debugName: "canGoPrevious" }] : /* istanbul ignore next */ []));
359
+ /** `true` when the query succeeded and matched nothing. */
360
+ this.isEmpty = computed(() => !this.#loading() && !this.#error() && this.#rows().length === 0, ...(ngDevMode ? [{ debugName: "isEmpty" }] : /* istanbul ignore next */ []));
361
+ /** The request for the current state, or `null` while the store is not ready to query. */
362
+ this.#request = computed(() => {
363
+ const workflowId = this.#workflowId();
364
+ if (!workflowId || !this.#columnsReady())
365
+ return null;
366
+ const sort = this.#sort();
367
+ const searchKey = this.#search().trim();
368
+ const cursor = this.#cursors()[this.#pageIndex()];
369
+ return {
370
+ workflowId,
371
+ itemsPerPage: this.#pageSize(),
372
+ ...(cursor === undefined ? {} : { cursor }),
373
+ sort: { [sort.path]: sort.direction },
374
+ filter: this.#filter(),
375
+ ...(searchKey === ''
376
+ ? {}
377
+ : { searchKey, schema: buildDocumentSearchSchema(this.#columns()) }),
378
+ };
379
+ }, ...(ngDevMode ? [{ debugName: "#request" }] : /* istanbul ignore next */ []));
380
+ this.#watchWorkflow();
381
+ this.#watchRequest();
382
+ }
383
+ /**
384
+ * Points the store at a workflow and its resolved filter. Safe to call on every
385
+ * change-detection pass: identical setup is ignored, and a genuinely new filter
386
+ * resets paging because outstanding cursors no longer describe the same result set.
387
+ *
388
+ * @param setup - Workflow, resolved filter clauses, and optional page size.
389
+ */
390
+ configure(setup) {
391
+ if (setup.pageSize && setup.pageSize !== this.#pageSize()) {
392
+ this.#pageSize.set(setup.pageSize);
393
+ this.#resetPaging();
394
+ }
395
+ if (!sameFilter(this.#filter(), setup.filter)) {
396
+ this.#filter.set({ ...setup.filter });
397
+ this.#resetPaging();
398
+ }
399
+ if (setup.workflowId !== this.#workflowId()) {
400
+ this.#workflowId.set(setup.workflowId);
401
+ }
402
+ }
403
+ /**
404
+ * Sorts by a document path. Re-selecting the active path flips its direction.
405
+ *
406
+ * @param path - Document path from a {@link DocumentColumn}, never a bare control name.
407
+ */
408
+ setSort(path) {
409
+ if (!path)
410
+ return;
411
+ const current = this.#sort();
412
+ const direction = current.path === path && current.direction === -1 ? 1 : -1;
413
+ this.#sort.set({ path, direction });
414
+ this.#resetPaging();
415
+ }
416
+ /**
417
+ * Applies a search term. Callers debounce their input; the store issues one request
418
+ * per term it is given.
419
+ *
420
+ * @param term - Raw search text; blank clears the search.
421
+ */
422
+ setSearch(term) {
423
+ const next = term ?? '';
424
+ if (next === this.#search())
425
+ return;
426
+ this.#search.set(next);
427
+ this.#resetPaging();
428
+ }
429
+ /** Changes the page size, returning to the first page. */
430
+ setPageSize(size) {
431
+ if (size <= 0 || size === this.#pageSize())
432
+ return;
433
+ this.#pageSize.set(size);
434
+ this.#resetPaging();
435
+ }
436
+ /** Advances one page, if the last response reported another. */
437
+ nextPage() {
438
+ if (!this.canGoNext())
439
+ return;
440
+ this.#pageIndex.update(index => index + 1);
441
+ }
442
+ /** Steps back one page. */
443
+ previousPage() {
444
+ if (!this.canGoPrevious())
445
+ return;
446
+ this.#pageIndex.update(index => index - 1);
447
+ }
448
+ /** Returns to the first page without disturbing sort, filter or search. */
449
+ firstPage() {
450
+ if (this.#pageIndex() === 0)
451
+ return;
452
+ this.#resetPaging();
453
+ }
454
+ /** Re-issues the current request, discarding any page cursors beyond the first. */
455
+ refresh() {
456
+ this.#resetPaging();
457
+ this.#tick.update(tick => tick + 1);
458
+ }
459
+ /** Drops every cursor and returns to the first page. */
460
+ #resetPaging() {
461
+ this.#cursors.set([undefined]);
462
+ this.#pageIndex.set(0);
463
+ this.#totalItems.set(undefined);
464
+ this.#totalPages.set(undefined);
465
+ }
466
+ /** Loads the workflow's columns and steps whenever the workflow changes. */
467
+ #watchWorkflow() {
468
+ toObservable(this.#workflowId)
469
+ .pipe(distinctUntilChanged(), tap(() => {
470
+ this.#columnsReady.set(false);
471
+ this.#columns.set([]);
472
+ this.#steps.set([]);
473
+ this.#rows.set([]);
474
+ this.#error.set(undefined);
475
+ this.#resetPaging();
476
+ }), switchMap(workflowId => {
477
+ if (!workflowId)
478
+ return of(null);
479
+ this.#loading.set(true);
480
+ return forkJoin({
481
+ columns: this.#repository.getColumns(workflowId),
482
+ steps: this.#repository.getSteps(workflowId),
483
+ }).pipe(map(result => ({
484
+ columns: resolveDocumentColumns(result.columns),
485
+ steps: result.steps,
486
+ })), catchError(error => {
487
+ this.#loading.set(false);
488
+ this.#error.set(toQueryError(error));
489
+ return of(null);
490
+ }));
491
+ }), takeUntilDestroyed(this.#destroyRef))
492
+ .subscribe(result => {
493
+ if (!result)
494
+ return;
495
+ this.#columns.set(result.columns);
496
+ this.#steps.set([...result.steps]);
497
+ this.#columnsReady.set(true);
498
+ });
499
+ }
500
+ /** Runs the current request, switching away from any request still in flight. */
501
+ #watchRequest() {
502
+ toObservable(computed(() => ({ request: this.#request(), tick: this.#tick() })))
503
+ .pipe(distinctUntilChanged((a, b) => JSON.stringify(a) === JSON.stringify(b)), switchMap(({ request }) => {
504
+ if (!request) {
505
+ this.#loading.set(false);
506
+ return of(null);
507
+ }
508
+ this.#loading.set(true);
509
+ this.#error.set(undefined);
510
+ return this.#repository.query(request).pipe(catchError(error => {
511
+ this.#error.set(toQueryError(error));
512
+ return of(null);
513
+ }));
514
+ }), takeUntilDestroyed(this.#destroyRef))
515
+ .subscribe(page => {
516
+ this.#loading.set(false);
517
+ if (!page) {
518
+ if (this.#error())
519
+ this.#rows.set([]);
520
+ return;
521
+ }
522
+ this.#applyPage(page);
523
+ });
524
+ }
525
+ /** Records a page and the cursor that reaches the page after it. */
526
+ #applyPage(page) {
527
+ this.#rows.set(page.items ?? []);
528
+ this.#hasMore.set(page.hasMore === true);
529
+ // Totals come back on the first page only; hold on to them for later pages.
530
+ if (typeof page.totalItems === 'number')
531
+ this.#totalItems.set(page.totalItems);
532
+ if (typeof page.totalPages === 'number')
533
+ this.#totalPages.set(page.totalPages);
534
+ const nextIndex = this.#pageIndex() + 1;
535
+ const cursors = [...this.#cursors()];
536
+ if (page.hasMore && page.nextCursor) {
537
+ cursors[nextIndex] = page.nextCursor;
538
+ }
539
+ else {
540
+ cursors.length = nextIndex;
541
+ }
542
+ this.#cursors.set(cursors);
543
+ }
544
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentQueryStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
545
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentQueryStore }); }
546
+ }
547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentQueryStore, decorators: [{
548
+ type: Injectable
549
+ }], ctorParameters: () => [] });
550
+ /** Shallow-compares two filters by their serialized form. */
551
+ function sameFilter(a, b) {
552
+ return JSON.stringify(a) === JSON.stringify(b);
553
+ }
554
+ /** Classifies a thrown value so the UI knows whether retrying can help. */
555
+ function toQueryError(error) {
556
+ if (error instanceof DocumentPickerConfigurationError) {
557
+ return { kind: 'configuration', message: error.message };
558
+ }
559
+ const message = error?.error?.message ??
560
+ (error instanceof Error ? error.message : 'Could not load transactions.');
561
+ return { kind: 'query', message };
562
+ }
563
+
564
+ /** How long the search box waits after the last keystroke before querying. */
565
+ const SEARCH_DEBOUNCE_MS = 350;
566
+ /** Page sizes offered in the footer. The active size is merged in when it differs. */
567
+ const PAGE_SIZE_OPTIONS = [5, 10, 25, 50];
568
+ /**
569
+ * Root-level field naming the workflow step a transaction currently sits on. It is a
570
+ * root field, so the document path is the field name itself — nothing is nested.
571
+ */
572
+ const CURRENT_STEP_PATH = 'currentStepID';
573
+ /**
574
+ * Number of colour slots in the step palette (see `--dbd-step-hue-0…7` in the
575
+ * stylesheet). A step's slot is its process-tree index modulo this count, so the
576
+ * palette must not shrink without re-checking that adjacent steps stay distinguishable.
577
+ */
578
+ const STEP_HUE_COUNT = 8;
579
+ /**
580
+ * Modal browser for a workflow's transactions, opened by the document picker so the
581
+ * user can find and link one — or several — cross-referenced documents.
582
+ *
583
+ * The dialog owns nothing but the user's in-progress selection: the query itself lives
584
+ * in a per-instance {@link DocumentQueryStore}, so browsing (sorting, paging, searching,
585
+ * step filtering) never touches the form control. The caller's value changes only when
586
+ * the user confirms, and dismissing the dialog leaves it untouched.
587
+ *
588
+ * Selecting a row is deliberately inert: it mutates the local selection and nothing
589
+ * else, so the list can never collapse or reload underneath the user mid-pick. To
590
+ * review a selection spread across pages, the "Selected" toggle re-queries by
591
+ * identifier instead.
592
+ *
593
+ * Opened with {@link DocumentBrowserDialogData} and closed with
594
+ * {@link DocumentBrowserDialogResult}.
595
+ *
596
+ * @internal Opened by the document picker; not exported via public-api.ts.
597
+ */
598
+ class DocumentBrowserDialogComponent {
599
+ #data;
600
+ #dialogRef;
601
+ #destroyRef;
602
+ /** Selection as the user has it right now; seeded from what is already linked. */
603
+ #selection;
604
+ /** Step the user chose to browse, or `undefined` for the picker's own step scope. */
605
+ #activeStepId;
606
+ /** `true` while the list is filtered down to the selected documents. */
607
+ #selectedOnly;
608
+ /** Raw search box text, before debouncing. */
609
+ #searchTerm;
610
+ /** Identifiers of the selected documents, for row-by-row comparison. */
611
+ #selectedIds;
612
+ /**
613
+ * Steps keyed by identifier, so a row resolves its step with one map lookup instead
614
+ * of scanning the step list on every change-detection pass.
615
+ */
616
+ #stepsById;
617
+ /**
618
+ * Column a reference is labelled by: the first searchable text column after
619
+ * `reference`, which is the one a user recognises a transaction from.
620
+ */
621
+ #labelColumn;
622
+ constructor() {
623
+ /** Query state for this dialog only — provided per instance, never shared. */
624
+ this.store = inject(DocumentQueryStore);
625
+ this.#data = inject(MAT_DIALOG_DATA);
626
+ this.#dialogRef = inject(MatDialogRef);
627
+ this.#destroyRef = inject(DestroyRef);
628
+ /** Selection as the user has it right now; seeded from what is already linked. */
629
+ this.#selection = signal([...this.#data.selection], ...(ngDevMode ? [{ debugName: "#selection" }] : /* istanbul ignore next */ []));
630
+ /** Step the user chose to browse, or `undefined` for the picker's own step scope. */
631
+ this.#activeStepId = signal(undefined, ...(ngDevMode ? [{ debugName: "#activeStepId" }] : /* istanbul ignore next */ []));
632
+ /** `true` while the list is filtered down to the selected documents. */
633
+ this.#selectedOnly = signal(false, ...(ngDevMode ? [{ debugName: "#selectedOnly" }] : /* istanbul ignore next */ []));
634
+ /** Raw search box text, before debouncing. */
635
+ this.#searchTerm = signal('', ...(ngDevMode ? [{ debugName: "#searchTerm" }] : /* istanbul ignore next */ []));
636
+ /** Identifiers of the selected documents, for row-by-row comparison. */
637
+ this.#selectedIds = computed(() => new Set(this.#selection().map(entry => entry.id)), ...(ngDevMode ? [{ debugName: "#selectedIds" }] : /* istanbul ignore next */ []));
638
+ /**
639
+ * Steps keyed by identifier, so a row resolves its step with one map lookup instead
640
+ * of scanning the step list on every change-detection pass.
641
+ */
642
+ this.#stepsById = computed(() => new Map(this.store.steps().map(step => [step.stepId, step])), ...(ngDevMode ? [{ debugName: "#stepsById" }] : /* istanbul ignore next */ []));
643
+ /**
644
+ * Column a reference is labelled by: the first searchable text column after
645
+ * `reference`, which is the one a user recognises a transaction from.
646
+ */
647
+ this.#labelColumn = computed(() => this.store.columns().find(column => column.searchable && column.path !== 'reference'), ...(ngDevMode ? [{ debugName: "#labelColumn" }] : /* istanbul ignore next */ []));
648
+ /** Dialog heading — the picker's own label. */
649
+ this.title = this.#data.title;
650
+ /** Whether more than one transaction may be linked. */
651
+ this.allowMultiple = this.#data.allowMultiple;
652
+ /** Current search text, mirrored back into the input. */
653
+ this.searchTerm = this.#searchTerm.asReadonly();
654
+ /** Step currently browsed, or `undefined` for "Any step". */
655
+ this.activeStepId = this.#activeStepId.asReadonly();
656
+ /** `true` while the list shows only the selected documents. */
657
+ this.selectedOnly = this.#selectedOnly.asReadonly();
658
+ /** Document path the Step column sorts on. */
659
+ this.stepPath = CURRENT_STEP_PATH;
660
+ /**
661
+ * Whether to render the Step column at all. Without the workflow's steps every pill
662
+ * would read "unknown", which tells the user less than no column does — so when the
663
+ * host has not implemented `getWorkflowSteps` the column is dropped, header included.
664
+ */
665
+ this.showStepColumn = computed(() => this.store.steps().length > 0, ...(ngDevMode ? [{ debugName: "showStepColumn" }] : /* istanbul ignore next */ []));
666
+ /** How many transactions are selected. */
667
+ this.selectedCount = computed(() => this.#selection().length, ...(ngDevMode ? [{ debugName: "selectedCount" }] : /* istanbul ignore next */ []));
668
+ /**
669
+ * Whether to offer the step chooser. A picker locked to exactly one step has no
670
+ * choice to make, so the control is not rendered at all.
671
+ */
672
+ this.showStepChooser = computed(() => this.#data.lockedStepIds.length !== 1 && this.store.steps().length > 0, ...(ngDevMode ? [{ debugName: "showStepChooser" }] : /* istanbul ignore next */ []));
673
+ /**
674
+ * Whether to offer the "Selected" filter. It stays visible while the filter is on
675
+ * even after the last row is deselected, so the user is never stranded in a
676
+ * filtered view with no way back.
677
+ */
678
+ this.showSelectedFilter = computed(() => this.selectedCount() > 0 || this.#selectedOnly(), ...(ngDevMode ? [{ debugName: "showSelectedFilter" }] : /* istanbul ignore next */ []));
679
+ /** Page sizes offered, always including whichever size is currently in force. */
680
+ this.pageSizeOptions = computed(() => [...new Set([...PAGE_SIZE_OPTIONS, this.store.pageSize()])].sort((a, b) => a - b), ...(ngDevMode ? [{ debugName: "pageSizeOptions" }] : /* istanbul ignore next */ []));
681
+ /**
682
+ * Position of the visible rows in the result set, e.g. `Showing 11–20 of 412`.
683
+ * Keyset paging cannot always know the total, in which case the total is omitted
684
+ * rather than guessed. Empty while there is nothing to place.
685
+ */
686
+ this.positionLabel = computed(() => {
687
+ const count = this.store.rows().length;
688
+ if (count === 0)
689
+ return '';
690
+ const start = this.store.pageIndex() * this.store.pageSize() + 1;
691
+ const end = start + count - 1;
692
+ const total = this.store.totalItems();
693
+ return total === undefined
694
+ ? `Showing ${start}–${end}`
695
+ : `Showing ${start}–${end} of ${total}`;
696
+ }, ...(ngDevMode ? [{ debugName: "positionLabel" }] : /* istanbul ignore next */ []));
697
+ this.store.configure({
698
+ workflowId: this.#data.workflowId,
699
+ filter: this.#browseFilter(),
700
+ pageSize: this.#data.pageSize,
701
+ });
702
+ // The store issues one request per term it is handed, so the debounce lives here.
703
+ toObservable(this.#searchTerm)
704
+ .pipe(debounceTime(SEARCH_DEBOUNCE_MS), map(term => term.trim()), distinctUntilChanged(), takeUntilDestroyed(this.#destroyRef))
705
+ .subscribe(term => this.store.setSearch(term));
706
+ }
707
+ /** Reads a cell's raw value from the stored document, which is never flattened. */
708
+ cell(row, column) {
709
+ return readDocumentPath(row, column.path);
710
+ }
711
+ /** Stable identity for a row, falling back to its position when it carries no id. */
712
+ rowKey(row, index) {
713
+ return readDocumentId(row, this.#data.identifierPath) ?? `row-${index}`;
714
+ }
715
+ /** `true` when a row is part of the current selection. */
716
+ isSelected(row) {
717
+ const id = readDocumentId(row, this.#data.identifierPath);
718
+ return id !== undefined && this.#selectedIds().has(id);
719
+ }
720
+ /** Accessible name for a row's selection control. */
721
+ rowLabel(row) {
722
+ const reference = readDocumentPath(row, 'reference');
723
+ const id = readDocumentId(row, this.#data.identifierPath);
724
+ const name = reference == null || reference === '' ? id : String(reference);
725
+ return name === undefined ? 'Select transaction' : `Select transaction ${name}`;
726
+ }
727
+ /**
728
+ * Resolves the Step pill for one row.
729
+ *
730
+ * The colour is the step's `index` — its position in the workflow's process tree —
731
+ * modulo {@link STEP_HUE_COUNT}. Tying it to the process tree, and never to the row's
732
+ * position on the current page, is what makes a step the same colour on every row, on
733
+ * every page and on every reopen: the same workflow always hands back the same index.
734
+ *
735
+ * Colour is only ever a second signal — the pill always carries the step's name.
736
+ */
737
+ stepPill(row) {
738
+ const raw = readDocumentPath(row, CURRENT_STEP_PATH);
739
+ const stepId = typeof raw === 'string' ? raw.trim() : typeof raw === 'number' ? String(raw) : '';
740
+ const step = stepId === '' ? undefined : this.#stepsById().get(stepId);
741
+ if (step === undefined) {
742
+ // Say what is actually known: the raw id when the document carries one, and an
743
+ // honest "unknown" when it does not. Never an empty pill.
744
+ return { label: stepId === '' ? 'Unknown step' : stepId, hue: undefined };
745
+ }
746
+ // The contract types `label` as a string, but the host supplies it: a workflow with
747
+ // an unnamed step must still produce a pill, so fall back to the id rather than
748
+ // rendering nothing.
749
+ const label = typeof step.label === 'string' ? step.label.trim() : '';
750
+ return {
751
+ label: label === '' ? step.stepId : label,
752
+ hue: stepHue(step.index),
753
+ };
754
+ }
755
+ /**
756
+ * `true` when a document path is the one currently sorted on.
757
+ *
758
+ * Path-based rather than column-based because the Step column is not part of
759
+ * `store.columns()`; the column-facing helpers delegate here so both share one rule.
760
+ */
761
+ isSortedPath(path) {
762
+ return this.store.sort().path === path;
763
+ }
764
+ /** `true` when a column is the one currently sorted on. */
765
+ isSorted(column) {
766
+ return this.isSortedPath(column.path);
767
+ }
768
+ /** Sort state a header cell reports; only the active path reports a direction. */
769
+ ariaSortPath(path) {
770
+ if (!this.isSortedPath(path))
771
+ return 'none';
772
+ return this.store.sort().direction === 1 ? 'ascending' : 'descending';
773
+ }
774
+ /** Sort state a column's header cell reports. */
775
+ ariaSort(column) {
776
+ return this.ariaSortPath(column.path);
777
+ }
778
+ /** Glyph for the active sort direction. */
779
+ sortIcon() {
780
+ return this.store.sort().direction === 1 ? 'arrow_upward' : 'arrow_downward';
781
+ }
782
+ /** Sorts by a document path, flipping direction when it is already the active one. */
783
+ sortByPath(path) {
784
+ this.store.setSort(path);
785
+ }
786
+ /** Sorts by a column, flipping direction when it is already the active one. */
787
+ sortBy(column) {
788
+ this.sortByPath(column.path);
789
+ }
790
+ /**
791
+ * Adds or removes a row from the selection. Multi-select toggles; single-select
792
+ * replaces, because a radio cannot be unset by re-clicking it — "Clear" is how a
793
+ * single selection is undone.
794
+ */
795
+ toggleRow(row) {
796
+ const reference = toDocumentReference(row, {
797
+ workflowId: this.#data.workflowId,
798
+ identifierPath: this.#data.identifierPath,
799
+ labelColumn: this.#labelColumn(),
800
+ });
801
+ if (!reference)
802
+ return;
803
+ if (!this.#data.allowMultiple) {
804
+ this.#selection.set([reference]);
805
+ return;
806
+ }
807
+ this.#selection.update(current => {
808
+ const without = current.filter(entry => entry.id !== reference.id);
809
+ return without.length === current.length ? [...current, reference] : without;
810
+ });
811
+ }
812
+ /** Drops the whole selection without disturbing the list. */
813
+ clearSelection() {
814
+ this.#selection.set([]);
815
+ }
816
+ /**
817
+ * Switches between browsing and reviewing the selection. Reviewing queries by
818
+ * identifier over the picker's own filter, so a selected transaction is found
819
+ * whatever page — or step — it currently sits on.
820
+ */
821
+ toggleSelectedOnly() {
822
+ this.#selectedOnly.update(active => !active);
823
+ this.#applyFilter();
824
+ }
825
+ /** Records the search box's text; the query follows once typing settles. */
826
+ onSearch(event) {
827
+ this.#searchTerm.set(event.target.value);
828
+ }
829
+ /** Clears the search box, restoring the unsearched list. */
830
+ clearSearch() {
831
+ this.#searchTerm.set('');
832
+ }
833
+ /** Restores the picker's own step scope after the user narrowed to one step. */
834
+ clearStep() {
835
+ if (this.#activeStepId() === undefined)
836
+ return;
837
+ this.#activeStepId.set(undefined);
838
+ this.#applyFilter();
839
+ }
840
+ /** Narrows the browse to one step, or restores the picker's own step scope. */
841
+ onStepChange(event) {
842
+ const value = event.target.value;
843
+ this.#activeStepId.set(value === '' ? undefined : value);
844
+ this.#applyFilter();
845
+ }
846
+ /** Changes how many rows a page holds, returning to the first page. */
847
+ onPageSizeChange(event) {
848
+ const size = Number(event.target.value);
849
+ if (Number.isFinite(size))
850
+ this.store.setPageSize(size);
851
+ }
852
+ /** Re-issues the failed request. Only offered for failures retrying can fix. */
853
+ retry() {
854
+ this.store.refresh();
855
+ }
856
+ /** Dismisses without touching the caller's value. */
857
+ cancel() {
858
+ this.#dialogRef.close(undefined);
859
+ }
860
+ /** Closes, handing the selection back to the picker. */
861
+ confirm() {
862
+ this.#dialogRef.close(this.#selection());
863
+ }
864
+ /** The picker's filter plus whichever step the user chose to browse. */
865
+ #browseFilter() {
866
+ const stepId = this.#activeStepId();
867
+ return stepId ? { ...this.#data.filter, currentStep: stepId } : { ...this.#data.filter };
868
+ }
869
+ /** The filter the list should currently run under. */
870
+ #currentFilter() {
871
+ if (this.#selectedOnly()) {
872
+ const ids = this.#selection().map(entry => entry.id);
873
+ const selectionFilter = buildSelectionFilter(ids, this.#data.identifierPath);
874
+ if (selectionFilter)
875
+ return { ...this.#data.filter, ...selectionFilter };
876
+ }
877
+ return this.#browseFilter();
878
+ }
879
+ /** Re-points the store at the filter in force, keeping the user's page size. */
880
+ #applyFilter() {
881
+ this.store.configure({
882
+ workflowId: this.#data.workflowId,
883
+ filter: this.#currentFilter(),
884
+ pageSize: this.store.pageSize(),
885
+ });
886
+ }
887
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentBrowserDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
888
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DocumentBrowserDialogComponent, isStandalone: true, selector: "lib-document-browser-dialog", host: { classAttribute: "lib-document-browser-dialog" }, providers: [DocumentQueryStore], ngImport: i0, template: "<div class=\"dbd__header\">\n <span class=\"dbd__header-icon\" aria-hidden=\"true\">\n <mat-icon>link</mat-icon>\n </span>\n <div class=\"dbd__heading\">\n <h2 mat-dialog-title class=\"dbd__title\">{{ title }}</h2>\n <p class=\"dbd__subtitle\">\n @if (allowMultiple) {\n Search the workflow and pick every transaction this form should reference.\n } @else {\n Search the workflow and pick the transaction this form should reference.\n }\n </p>\n </div>\n</div>\n\n<mat-dialog-content class=\"dbd__content\">\n <div class=\"dbd__controls\">\n <label class=\"dbd-field dbd-field--grow\">\n <span class=\"dbd-field__label\">Search</span>\n <input\n class=\"dbd-field__control\"\n type=\"search\"\n autocomplete=\"off\"\n placeholder=\"Reference, description\u2026\"\n [value]=\"searchTerm()\"\n (input)=\"onSearch($event)\" />\n </label>\n\n @if (showStepChooser()) {\n <label class=\"dbd-field\">\n <span class=\"dbd-field__label\">Step</span>\n <select\n class=\"dbd-field__control\"\n [disabled]=\"selectedOnly()\"\n (change)=\"onStepChange($event)\">\n <option value=\"\" [selected]=\"activeStepId() === undefined\">Any step</option>\n @for (step of store.steps(); track step.stepId) {\n <option [value]=\"step.stepId\" [selected]=\"step.stepId === activeStepId()\">\n {{ step.label }}\n </option>\n }\n </select>\n </label>\n }\n </div>\n\n @if (showSelectedFilter()) {\n <div class=\"dbd__selection\">\n <button\n type=\"button\"\n class=\"dbd-toggle\"\n [class.dbd-toggle--on]=\"selectedOnly()\"\n [attr.aria-pressed]=\"selectedOnly()\"\n (click)=\"toggleSelectedOnly()\">\n <mat-icon class=\"dbd-toggle__icon\" aria-hidden=\"true\">\n {{ selectedOnly() ? 'visibility' : 'filter_list' }}\n </mat-icon>\n <span>Selected ({{ selectedCount() }})</span>\n </button>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"dbd-clear\" (click)=\"clearSelection()\">Clear</button>\n }\n\n @if (selectedOnly()) {\n <span class=\"dbd__selection-hint\">Showing only what you have picked.</span>\n }\n </div>\n }\n\n @if (store.error(); as error) {\n <div class=\"dbd-alert\" role=\"alert\">\n <mat-icon class=\"dbd-alert__icon\" aria-hidden=\"true\">error_outline</mat-icon>\n <div class=\"dbd-alert__body\">\n <p class=\"dbd-alert__message\">{{ error.message }}</p>\n @if (error.kind === 'configuration') {\n <p class=\"dbd-alert__hint\">\n This picker cannot run as it is set up, so retrying will not help. A form\n builder or the host application needs to correct it.\n </p>\n }\n </div>\n @if (error.kind === 'query') {\n <button matButton=\"outlined\" type=\"button\" class=\"dbd-alert__retry\" (click)=\"retry()\">\n Retry\n </button>\n }\n </div>\n }\n\n <div class=\"dbd__table-wrap\">\n <div class=\"dbd__table-scroll\">\n <!-- role=\"table\", not \"grid\": grid promises two-dimensional arrow-key\n navigation, which this list does not implement. Each row's own control\n is focusable and every header is a real button, so the table stays fully\n keyboard-operable under the simpler role. -->\n <table role=\"table\" class=\"dbd-table\" [attr.aria-label]=\"title\">\n <thead class=\"dbd-table__head\">\n <tr role=\"row\">\n <th role=\"columnheader\" scope=\"col\" class=\"dbd-table__pick\">\n <span class=\"dbd-sr-only\">Select</span>\n </th>\n <!--\n Step sits ahead of the workflow's own columns and is not one of them: it\n reads the transaction's root `currentStepID`, so it is sorted by path\n rather than by a DocumentColumn. Hidden entirely when the host cannot\n supply the workflow's steps.\n -->\n @if (showStepColumn()) {\n <th\n role=\"columnheader\"\n scope=\"col\"\n class=\"dbd-table__step\"\n [attr.aria-sort]=\"ariaSortPath(stepPath)\">\n <button\n type=\"button\"\n class=\"dbd-sort\"\n [class.dbd-sort--active]=\"isSortedPath(stepPath)\"\n (click)=\"sortByPath(stepPath)\">\n <span class=\"dbd-sort__label\">Step</span>\n @if (isSortedPath(stepPath)) {\n <mat-icon class=\"dbd-sort__icon\" aria-hidden=\"true\">{{ sortIcon() }}</mat-icon>\n }\n </button>\n </th>\n }\n @for (column of store.columns(); track column.key) {\n <th role=\"columnheader\" scope=\"col\" [attr.aria-sort]=\"ariaSort(column)\">\n <button\n type=\"button\"\n class=\"dbd-sort\"\n [class.dbd-sort--active]=\"isSorted(column)\"\n (click)=\"sortBy(column)\">\n <span class=\"dbd-sort__label\">{{ column.label }}</span>\n @if (isSorted(column)) {\n <mat-icon class=\"dbd-sort__icon\" aria-hidden=\"true\">{{ sortIcon() }}</mat-icon>\n }\n </button>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of store.rows(); track rowKey(row, $index)) {\n <tr\n role=\"row\"\n class=\"dbd-row\"\n [class.dbd-row--selected]=\"isSelected(row)\"\n [attr.aria-selected]=\"isSelected(row)\"\n (click)=\"toggleRow(row)\">\n <td class=\"dbd-table__pick\">\n @if (allowMultiple) {\n <input\n class=\"dbd-pick\"\n type=\"checkbox\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"rowLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row)\" />\n } @else {\n <input\n class=\"dbd-pick\"\n type=\"radio\"\n name=\"dbd-selection\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"rowLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row)\" />\n }\n </td>\n @if (showStepColumn()) {\n @let pill = stepPill(row);\n <td class=\"dbd-cell dbd-table__step\">\n <!--\n The step's name is always the pill's text: the tint is a scanning\n aid, never the only way to tell one step from another.\n -->\n <span\n class=\"dbd-pill\"\n [class.dbd-pill--unknown]=\"pill.hue === undefined\"\n [attr.data-step-hue]=\"pill.hue\"\n [title]=\"pill.label\"\n >{{ pill.label }}</span\n >\n </td>\n }\n @for (column of store.columns(); track column.key) {\n <td class=\"dbd-cell\">\n <span class=\"dbd-cell__text\">\n {{ cell(row, column) | formatData: column.type }}\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n\n @if (store.isEmpty()) {\n <!--\n Never a bare \"no results\": name why the list is empty and offer the\n control that undoes it, so the user is not left guessing which of the\n search, the step or the field's own filters excluded everything.\n -->\n <div class=\"dbd-empty\">\n <mat-icon class=\"dbd-empty__icon\" aria-hidden=\"true\">search_off</mat-icon>\n\n @if (selectedOnly()) {\n <p class=\"dbd-empty__title\">Nothing picked yet</p>\n <p class=\"dbd-empty__hint\">\n Switch off <strong>Selected</strong> to browse the workflow and pick\n {{ allowMultiple ? 'transactions' : 'a transaction' }}.\n </p>\n } @else if (searchTerm()) {\n <p class=\"dbd-empty__title\">No transactions match \u201C{{ searchTerm() }}\u201D</p>\n <p class=\"dbd-empty__hint\">\n Search covers the reference and the columns shown above. Check the spelling,\n or try a shorter term.\n </p>\n } @else if (activeStepId()) {\n <p class=\"dbd-empty__title\">No transactions are at this step</p>\n <p class=\"dbd-empty__hint\">\n Every transaction has moved on, or none has reached it yet. Try another step.\n </p>\n } @else {\n <p class=\"dbd-empty__title\">No transactions to show</p>\n <p class=\"dbd-empty__hint\">\n This workflow has no transactions yet, or this field is set up to show only\n some of them. If you expected results here, ask an administrator to check the\n field's filters.\n </p>\n }\n\n <div class=\"dbd-empty__actions\">\n @if (searchTerm()) {\n <button type=\"button\" class=\"dbd-step\" (click)=\"clearSearch()\">Clear search</button>\n }\n @if (activeStepId()) {\n <button type=\"button\" class=\"dbd-step\" (click)=\"clearStep()\">Show all steps</button>\n }\n @if (selectedOnly()) {\n <button type=\"button\" class=\"dbd-step\" (click)=\"toggleSelectedOnly()\">\n Back to browsing\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n @if (store.loading()) {\n <div class=\"dbd__overlay\" role=\"status\" aria-live=\"polite\">\n <mat-spinner [diameter]=\"32\" />\n <span class=\"dbd-sr-only\">Loading transactions</span>\n </div>\n }\n </div>\n</mat-dialog-content>\n\n<!--\n Pinned footer. Paging and the confirm actions sit outside the scroll region so\n they stay reachable however many rows are loaded.\n-->\n<div class=\"dbd__footer\">\n <div class=\"dbd__paging\">\n <p class=\"dbd__position\" aria-live=\"polite\">{{ positionLabel() }}</p>\n\n <div class=\"dbd__paging-controls\">\n <label class=\"dbd-field dbd-field--inline\">\n <span class=\"dbd-field__label\">Rows</span>\n <select\n class=\"dbd-field__control dbd-field__control--compact\"\n (change)=\"onPageSizeChange($event)\">\n @for (size of pageSizeOptions(); track size) {\n <option value=\"{{ size }}\" [selected]=\"size === store.pageSize()\">{{ size }}</option>\n }\n </select>\n </label>\n\n <button\n type=\"button\"\n class=\"dbd-step\"\n [disabled]=\"!store.canGoPrevious()\"\n (click)=\"store.previousPage()\">\n <mat-icon class=\"dbd-step__icon\" aria-hidden=\"true\">chevron_left</mat-icon>\n <span>Previous</span>\n </button>\n\n <button\n type=\"button\"\n class=\"dbd-step\"\n [disabled]=\"!store.canGoNext()\"\n (click)=\"store.nextPage()\">\n <span>Next</span>\n <mat-icon class=\"dbd-step__icon\" aria-hidden=\"true\">chevron_right</mat-icon>\n </button>\n </div>\n </div>\n\n <mat-dialog-actions class=\"dbd__actions\">\n <button matButton type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button matButton=\"filled\" type=\"button\" (click)=\"confirm()\">Done</button>\n </mat-dialog-actions>\n</div>\n", styles: [":host{--dbd-radius-lg: 12px;--dbd-radius-md: 8px;--dbd-radius-sm: 6px;--dbd-ease: cubic-bezier(.2, 0, 0, 1);--dbd-primary-06: color-mix(in srgb, var(--mat-sys-primary) 6%, transparent);--dbd-primary-10: color-mix(in srgb, var(--mat-sys-primary) 10%, transparent);--dbd-primary-12: color-mix(in srgb, var(--mat-sys-primary) 12%, transparent);--dbd-primary-14: color-mix(in srgb, var(--mat-sys-primary) 14%, transparent);--dbd-primary-25: color-mix(in srgb, var(--mat-sys-primary) 25%, transparent);--dbd-outline-10: color-mix(in srgb, var(--mat-sys-outline) 10%, transparent);--dbd-outline-15: color-mix(in srgb, var(--mat-sys-outline) 15%, transparent);--dbd-zebra: color-mix(in srgb, var(--mat-sys-on-surface) 2.5%, transparent);--dbd-error-10: color-mix(in srgb, var(--mat-sys-error) 10%, transparent);--dbd-veil: color-mix(in srgb, var(--mat-sys-surface) 72%, transparent);--dbd-step-tint: 16%;--dbd-step-ink: 82%;--dbd-step-edge: 26%;--dbd-step-hue-0: #4c5fd7;--dbd-step-hue-1: #0d7a70;--dbd-step-hue-2: #a16207;--dbd-step-hue-3: #7c3aed;--dbd-step-hue-4: #be3455;--dbd-step-hue-5: #4d7c0f;--dbd-step-hue-6: #0369a1;--dbd-step-hue-7: #9a4a25;display:flex;flex:1 1 auto;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden;color:var(--mat-sys-on-surface)}.dbd__header{display:flex;flex:0 0 auto;align-items:flex-start;gap:1rem;padding:1.25rem 1.5rem 1rem}.dbd__header-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:var(--dbd-radius-md);background:var(--dbd-primary-12);color:var(--mat-sys-primary)}.dbd__header-icon mat-icon{font-size:1.375rem;width:1.375rem;height:1.375rem}.dbd__heading{min-width:0}.dbd__title{margin:0;padding:0;font-size:1.125rem;font-weight:600;letter-spacing:-.01em;line-height:1.3;color:var(--mat-sys-on-surface)}.dbd__title:before{display:none}.dbd__subtitle{margin:.125rem 0 0;font-size:.8125rem;line-height:1.35;color:var(--mat-sys-on-surface-variant)}.dbd__content{display:flex;flex:1 1 auto;flex-direction:column;gap:.75rem;min-height:0;max-height:none;padding:0 1.5rem .75rem;overflow:hidden}.dbd__controls{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:flex-end;gap:.75rem}.dbd-field{display:flex;flex-direction:column;gap:.35rem;min-width:10rem}.dbd-field--grow{flex:1 1 18rem}.dbd-field--inline{flex-direction:row;align-items:center;gap:.5rem;min-width:0}.dbd-field__label{font-size:.75rem;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant)}.dbd-field__control{box-sizing:border-box;width:100%;min-height:2.25rem;padding:.5rem .75rem;font:inherit;font-size:.875rem;color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container-high, var(--mat-sys-surface));border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-md);transition:border-color .15s var(--dbd-ease),box-shadow .15s var(--dbd-ease)}.dbd-field__control--compact{width:auto;min-height:2rem;padding:.25rem .5rem;font-size:.8125rem}.dbd-field__control::placeholder{color:color-mix(in srgb,var(--mat-sys-on-surface-variant) 60%,transparent)}.dbd-field__control:focus{outline:none;border-color:var(--mat-sys-primary);box-shadow:0 0 0 2px var(--dbd-primary-25)}.dbd-field__control:disabled{opacity:.45;pointer-events:none}.dbd__selection{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;gap:.5rem}.dbd-toggle{display:inline-flex;align-items:center;gap:.375rem;padding:.3rem .625rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-sm);cursor:pointer;transition:all .15s var(--dbd-ease)}.dbd-toggle:hover{color:var(--mat-sys-primary);background:var(--dbd-primary-06);border-color:var(--mat-sys-primary)}.dbd-toggle--on{color:var(--mat-sys-primary);background:var(--dbd-primary-12);border-color:var(--mat-sys-primary)}.dbd-toggle:focus-visible{outline:none;box-shadow:0 0 0 2px var(--dbd-primary-25)}.dbd-toggle__icon{font-size:.9375rem;width:.9375rem;height:.9375rem}.dbd-clear{padding:.3rem .375rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-on-surface-variant);background:transparent;border:none;border-radius:var(--dbd-radius-sm);cursor:pointer;transition:color .15s var(--dbd-ease)}.dbd-clear:hover{color:var(--mat-sys-primary)}.dbd__selection-hint{font-size:.75rem;color:var(--mat-sys-on-surface-variant)}.dbd-alert{display:flex;flex:0 0 auto;align-items:flex-start;gap:.75rem;padding:.75rem 1rem;background:var(--dbd-error-10);border-radius:var(--dbd-radius-md)}.dbd-alert__icon{flex-shrink:0;font-size:1.125rem;width:1.125rem;height:1.125rem;color:var(--mat-sys-error)}.dbd-alert__body{flex:1 1 auto;min-width:0}.dbd-alert__message{margin:0;font-size:.8125rem;line-height:1.4;color:var(--mat-sys-on-surface)}.dbd-alert__hint{margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--mat-sys-on-surface-variant)}.dbd-alert__retry{flex-shrink:0}.dbd__table-wrap{position:relative;display:flex;flex:1 1 auto;min-height:6rem;border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-lg);background:var(--mat-sys-surface-container, var(--mat-sys-surface));overflow:hidden}.dbd__table-scroll{flex:1 1 auto;width:100%;min-height:0;overflow:auto}.dbd-table{width:100%;border-collapse:collapse;text-align:left}.dbd-table__head{position:sticky;top:0;z-index:1;background:var(--mat-sys-surface-container-high, var(--mat-sys-surface))}.dbd-table th{padding:.5rem .75rem;font-weight:500;white-space:nowrap;border-bottom:1px solid var(--dbd-outline-10)}.dbd-table__pick{width:2.75rem;text-align:center}.dbd-sort{display:inline-flex;align-items:center;gap:.25rem;padding:0;font:inherit;font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant);background:transparent;border:none;cursor:pointer;transition:color .15s var(--dbd-ease)}.dbd-sort:hover,.dbd-sort--active{color:var(--mat-sys-primary)}.dbd-sort:focus-visible{outline:none;color:var(--mat-sys-primary);text-decoration:underline}.dbd-sort__icon{font-size:.875rem;width:.875rem;height:.875rem}.dbd-row{cursor:pointer;transition:background .15s var(--dbd-ease)}.dbd-row:nth-child(2n){background:var(--dbd-zebra)}.dbd-row:hover{background:var(--dbd-primary-06)}.dbd-row--selected,.dbd-row--selected:nth-child(2n){background:var(--dbd-primary-12)}.dbd-row--selected:hover{background:var(--dbd-primary-14)}.dbd-row--selected .dbd-table__pick{box-shadow:inset 2px 0 0 var(--mat-sys-primary)}.dbd-cell{padding:.4375rem .75rem;font-size:.8125rem;line-height:1.35;color:var(--mat-sys-on-surface);vertical-align:middle}.dbd-cell__text{display:block;max-width:16rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dbd-pick{width:1rem;height:1rem;margin:0;accent-color:var(--mat-sys-primary);cursor:pointer}.dbd-pick:focus-visible{outline:2px solid var(--dbd-primary-25);outline-offset:2px}.dbd-table__step{width:1%}.dbd-pill{display:inline-block;max-width:10rem;box-sizing:border-box;padding:.0625rem .4375rem;font-size:.6875rem;font-weight:500;letter-spacing:.01em;line-height:1.2;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid transparent;border-radius:var(--dbd-radius-sm);transition:background .15s var(--dbd-ease),color .15s var(--dbd-ease),border-color .15s var(--dbd-ease);background:color-mix(in srgb,var(--mat-sys-on-surface) 7%,transparent);color:var(--mat-sys-on-surface-variant);border-color:var(--dbd-outline-15)}.dbd-pill[data-step-hue]{background:color-mix(in srgb,var(--dbd-step-hue) var(--dbd-step-tint),var(--mat-sys-surface));color:color-mix(in srgb,var(--dbd-step-hue) var(--dbd-step-ink),var(--mat-sys-on-surface));border-color:color-mix(in srgb,var(--dbd-step-hue) var(--dbd-step-edge),transparent)}.dbd-pill[data-step-hue=\"0\"]{--dbd-step-hue: var(--dbd-step-hue-0)}.dbd-pill[data-step-hue=\"1\"]{--dbd-step-hue: var(--dbd-step-hue-1)}.dbd-pill[data-step-hue=\"2\"]{--dbd-step-hue: var(--dbd-step-hue-2)}.dbd-pill[data-step-hue=\"3\"]{--dbd-step-hue: var(--dbd-step-hue-3)}.dbd-pill[data-step-hue=\"4\"]{--dbd-step-hue: var(--dbd-step-hue-4)}.dbd-pill[data-step-hue=\"5\"]{--dbd-step-hue: var(--dbd-step-hue-5)}.dbd-pill[data-step-hue=\"6\"]{--dbd-step-hue: var(--dbd-step-hue-6)}.dbd-pill[data-step-hue=\"7\"]{--dbd-step-hue: var(--dbd-step-hue-7)}.dbd-pill--unknown{font-style:italic}.dbd-empty{display:flex;flex-direction:column;align-items:center;gap:.25rem;padding:2rem 1.5rem;text-align:center}.dbd-empty__icon{margin-bottom:.25rem;font-size:1.5rem;width:1.5rem;height:1.5rem;color:color-mix(in srgb,var(--mat-sys-on-surface-variant) 70%,transparent)}.dbd-empty__title{margin:0;font-size:.875rem;font-weight:600;color:var(--mat-sys-on-surface)}.dbd-empty__hint{max-width:30rem;margin:0;font-size:.8125rem;line-height:1.45;color:var(--mat-sys-on-surface-variant)}.dbd-empty__hint strong{font-weight:600;color:var(--mat-sys-on-surface)}.dbd-empty__actions{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.5rem}.dbd__overlay{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;background:var(--dbd-veil)}.dbd__footer{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1.5rem 1rem;border-top:1px solid var(--dbd-outline-10);background:var(--mat-sys-surface)}.dbd__paging{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.dbd__position{margin:0;font-size:.75rem;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.dbd__paging-controls{display:flex;align-items:center;gap:.375rem}.dbd-step{display:inline-flex;align-items:center;gap:.25rem;min-height:2rem;padding:.25rem .625rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-sm);cursor:pointer;transition:all .15s var(--dbd-ease)}.dbd-step:hover:not(:disabled){color:var(--mat-sys-primary);background:var(--dbd-primary-06);border-color:var(--mat-sys-primary)}.dbd-step:focus-visible{outline:none;box-shadow:0 0 0 2px var(--dbd-primary-25)}.dbd-step:disabled{opacity:.4;pointer-events:none}.dbd-step__icon{font-size:1rem;width:1rem;height:1rem}.dbd__actions{gap:.75rem;min-height:0;padding:0;justify-content:flex-end}.dbd-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(prefers-color-scheme:dark){:host{--dbd-veil: color-mix(in srgb, var(--mat-sys-surface) 80%, transparent);--dbd-zebra: color-mix(in srgb, var(--mat-sys-on-surface) 5%, transparent);--dbd-step-tint: 20%;--dbd-step-ink: 90%;--dbd-step-edge: 32%;--dbd-step-hue-0: #8b9bf0;--dbd-step-hue-1: #3fbfae;--dbd-step-hue-2: #d9a441;--dbd-step-hue-3: #b28ef5;--dbd-step-hue-4: #ef7f95;--dbd-step-hue-5: #8fbe52;--dbd-step-hue-6: #4fb0e8;--dbd-step-hue-7: #db8a5c}}:host-context(.dark),:host-context([data-theme=\"dark\"]){--dbd-veil: color-mix(in srgb, var(--mat-sys-surface) 80%, transparent);--dbd-zebra: color-mix(in srgb, var(--mat-sys-on-surface) 5%, transparent);--dbd-step-tint: 20%;--dbd-step-ink: 90%;--dbd-step-edge: 32%;--dbd-step-hue-0: #8b9bf0;--dbd-step-hue-1: #3fbfae;--dbd-step-hue-2: #d9a441;--dbd-step-hue-3: #b28ef5;--dbd-step-hue-4: #ef7f95;--dbd-step-hue-5: #8fbe52;--dbd-step-hue-6: #4fb0e8;--dbd-step-hue-7: #db8a5c}\n"], dependencies: [{ kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: FormatDataPipe, name: "formatData" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
889
+ }
890
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentBrowserDialogComponent, decorators: [{
891
+ type: Component,
892
+ args: [{ selector: 'lib-document-browser-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { 'class': 'lib-document-browser-dialog' }, imports: [
893
+ MatDialogModule,
894
+ MatButtonModule,
895
+ MatIconModule,
896
+ MatProgressSpinnerModule,
897
+ FormatDataPipe,
898
+ ], providers: [DocumentQueryStore], template: "<div class=\"dbd__header\">\n <span class=\"dbd__header-icon\" aria-hidden=\"true\">\n <mat-icon>link</mat-icon>\n </span>\n <div class=\"dbd__heading\">\n <h2 mat-dialog-title class=\"dbd__title\">{{ title }}</h2>\n <p class=\"dbd__subtitle\">\n @if (allowMultiple) {\n Search the workflow and pick every transaction this form should reference.\n } @else {\n Search the workflow and pick the transaction this form should reference.\n }\n </p>\n </div>\n</div>\n\n<mat-dialog-content class=\"dbd__content\">\n <div class=\"dbd__controls\">\n <label class=\"dbd-field dbd-field--grow\">\n <span class=\"dbd-field__label\">Search</span>\n <input\n class=\"dbd-field__control\"\n type=\"search\"\n autocomplete=\"off\"\n placeholder=\"Reference, description\u2026\"\n [value]=\"searchTerm()\"\n (input)=\"onSearch($event)\" />\n </label>\n\n @if (showStepChooser()) {\n <label class=\"dbd-field\">\n <span class=\"dbd-field__label\">Step</span>\n <select\n class=\"dbd-field__control\"\n [disabled]=\"selectedOnly()\"\n (change)=\"onStepChange($event)\">\n <option value=\"\" [selected]=\"activeStepId() === undefined\">Any step</option>\n @for (step of store.steps(); track step.stepId) {\n <option [value]=\"step.stepId\" [selected]=\"step.stepId === activeStepId()\">\n {{ step.label }}\n </option>\n }\n </select>\n </label>\n }\n </div>\n\n @if (showSelectedFilter()) {\n <div class=\"dbd__selection\">\n <button\n type=\"button\"\n class=\"dbd-toggle\"\n [class.dbd-toggle--on]=\"selectedOnly()\"\n [attr.aria-pressed]=\"selectedOnly()\"\n (click)=\"toggleSelectedOnly()\">\n <mat-icon class=\"dbd-toggle__icon\" aria-hidden=\"true\">\n {{ selectedOnly() ? 'visibility' : 'filter_list' }}\n </mat-icon>\n <span>Selected ({{ selectedCount() }})</span>\n </button>\n\n @if (selectedCount() > 0) {\n <button type=\"button\" class=\"dbd-clear\" (click)=\"clearSelection()\">Clear</button>\n }\n\n @if (selectedOnly()) {\n <span class=\"dbd__selection-hint\">Showing only what you have picked.</span>\n }\n </div>\n }\n\n @if (store.error(); as error) {\n <div class=\"dbd-alert\" role=\"alert\">\n <mat-icon class=\"dbd-alert__icon\" aria-hidden=\"true\">error_outline</mat-icon>\n <div class=\"dbd-alert__body\">\n <p class=\"dbd-alert__message\">{{ error.message }}</p>\n @if (error.kind === 'configuration') {\n <p class=\"dbd-alert__hint\">\n This picker cannot run as it is set up, so retrying will not help. A form\n builder or the host application needs to correct it.\n </p>\n }\n </div>\n @if (error.kind === 'query') {\n <button matButton=\"outlined\" type=\"button\" class=\"dbd-alert__retry\" (click)=\"retry()\">\n Retry\n </button>\n }\n </div>\n }\n\n <div class=\"dbd__table-wrap\">\n <div class=\"dbd__table-scroll\">\n <!-- role=\"table\", not \"grid\": grid promises two-dimensional arrow-key\n navigation, which this list does not implement. Each row's own control\n is focusable and every header is a real button, so the table stays fully\n keyboard-operable under the simpler role. -->\n <table role=\"table\" class=\"dbd-table\" [attr.aria-label]=\"title\">\n <thead class=\"dbd-table__head\">\n <tr role=\"row\">\n <th role=\"columnheader\" scope=\"col\" class=\"dbd-table__pick\">\n <span class=\"dbd-sr-only\">Select</span>\n </th>\n <!--\n Step sits ahead of the workflow's own columns and is not one of them: it\n reads the transaction's root `currentStepID`, so it is sorted by path\n rather than by a DocumentColumn. Hidden entirely when the host cannot\n supply the workflow's steps.\n -->\n @if (showStepColumn()) {\n <th\n role=\"columnheader\"\n scope=\"col\"\n class=\"dbd-table__step\"\n [attr.aria-sort]=\"ariaSortPath(stepPath)\">\n <button\n type=\"button\"\n class=\"dbd-sort\"\n [class.dbd-sort--active]=\"isSortedPath(stepPath)\"\n (click)=\"sortByPath(stepPath)\">\n <span class=\"dbd-sort__label\">Step</span>\n @if (isSortedPath(stepPath)) {\n <mat-icon class=\"dbd-sort__icon\" aria-hidden=\"true\">{{ sortIcon() }}</mat-icon>\n }\n </button>\n </th>\n }\n @for (column of store.columns(); track column.key) {\n <th role=\"columnheader\" scope=\"col\" [attr.aria-sort]=\"ariaSort(column)\">\n <button\n type=\"button\"\n class=\"dbd-sort\"\n [class.dbd-sort--active]=\"isSorted(column)\"\n (click)=\"sortBy(column)\">\n <span class=\"dbd-sort__label\">{{ column.label }}</span>\n @if (isSorted(column)) {\n <mat-icon class=\"dbd-sort__icon\" aria-hidden=\"true\">{{ sortIcon() }}</mat-icon>\n }\n </button>\n </th>\n }\n </tr>\n </thead>\n\n <tbody>\n @for (row of store.rows(); track rowKey(row, $index)) {\n <tr\n role=\"row\"\n class=\"dbd-row\"\n [class.dbd-row--selected]=\"isSelected(row)\"\n [attr.aria-selected]=\"isSelected(row)\"\n (click)=\"toggleRow(row)\">\n <td class=\"dbd-table__pick\">\n @if (allowMultiple) {\n <input\n class=\"dbd-pick\"\n type=\"checkbox\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"rowLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row)\" />\n } @else {\n <input\n class=\"dbd-pick\"\n type=\"radio\"\n name=\"dbd-selection\"\n [checked]=\"isSelected(row)\"\n [attr.aria-label]=\"rowLabel(row)\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleRow(row)\" />\n }\n </td>\n @if (showStepColumn()) {\n @let pill = stepPill(row);\n <td class=\"dbd-cell dbd-table__step\">\n <!--\n The step's name is always the pill's text: the tint is a scanning\n aid, never the only way to tell one step from another.\n -->\n <span\n class=\"dbd-pill\"\n [class.dbd-pill--unknown]=\"pill.hue === undefined\"\n [attr.data-step-hue]=\"pill.hue\"\n [title]=\"pill.label\"\n >{{ pill.label }}</span\n >\n </td>\n }\n @for (column of store.columns(); track column.key) {\n <td class=\"dbd-cell\">\n <span class=\"dbd-cell__text\">\n {{ cell(row, column) | formatData: column.type }}\n </span>\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n\n @if (store.isEmpty()) {\n <!--\n Never a bare \"no results\": name why the list is empty and offer the\n control that undoes it, so the user is not left guessing which of the\n search, the step or the field's own filters excluded everything.\n -->\n <div class=\"dbd-empty\">\n <mat-icon class=\"dbd-empty__icon\" aria-hidden=\"true\">search_off</mat-icon>\n\n @if (selectedOnly()) {\n <p class=\"dbd-empty__title\">Nothing picked yet</p>\n <p class=\"dbd-empty__hint\">\n Switch off <strong>Selected</strong> to browse the workflow and pick\n {{ allowMultiple ? 'transactions' : 'a transaction' }}.\n </p>\n } @else if (searchTerm()) {\n <p class=\"dbd-empty__title\">No transactions match \u201C{{ searchTerm() }}\u201D</p>\n <p class=\"dbd-empty__hint\">\n Search covers the reference and the columns shown above. Check the spelling,\n or try a shorter term.\n </p>\n } @else if (activeStepId()) {\n <p class=\"dbd-empty__title\">No transactions are at this step</p>\n <p class=\"dbd-empty__hint\">\n Every transaction has moved on, or none has reached it yet. Try another step.\n </p>\n } @else {\n <p class=\"dbd-empty__title\">No transactions to show</p>\n <p class=\"dbd-empty__hint\">\n This workflow has no transactions yet, or this field is set up to show only\n some of them. If you expected results here, ask an administrator to check the\n field's filters.\n </p>\n }\n\n <div class=\"dbd-empty__actions\">\n @if (searchTerm()) {\n <button type=\"button\" class=\"dbd-step\" (click)=\"clearSearch()\">Clear search</button>\n }\n @if (activeStepId()) {\n <button type=\"button\" class=\"dbd-step\" (click)=\"clearStep()\">Show all steps</button>\n }\n @if (selectedOnly()) {\n <button type=\"button\" class=\"dbd-step\" (click)=\"toggleSelectedOnly()\">\n Back to browsing\n </button>\n }\n </div>\n </div>\n }\n </div>\n\n @if (store.loading()) {\n <div class=\"dbd__overlay\" role=\"status\" aria-live=\"polite\">\n <mat-spinner [diameter]=\"32\" />\n <span class=\"dbd-sr-only\">Loading transactions</span>\n </div>\n }\n </div>\n</mat-dialog-content>\n\n<!--\n Pinned footer. Paging and the confirm actions sit outside the scroll region so\n they stay reachable however many rows are loaded.\n-->\n<div class=\"dbd__footer\">\n <div class=\"dbd__paging\">\n <p class=\"dbd__position\" aria-live=\"polite\">{{ positionLabel() }}</p>\n\n <div class=\"dbd__paging-controls\">\n <label class=\"dbd-field dbd-field--inline\">\n <span class=\"dbd-field__label\">Rows</span>\n <select\n class=\"dbd-field__control dbd-field__control--compact\"\n (change)=\"onPageSizeChange($event)\">\n @for (size of pageSizeOptions(); track size) {\n <option value=\"{{ size }}\" [selected]=\"size === store.pageSize()\">{{ size }}</option>\n }\n </select>\n </label>\n\n <button\n type=\"button\"\n class=\"dbd-step\"\n [disabled]=\"!store.canGoPrevious()\"\n (click)=\"store.previousPage()\">\n <mat-icon class=\"dbd-step__icon\" aria-hidden=\"true\">chevron_left</mat-icon>\n <span>Previous</span>\n </button>\n\n <button\n type=\"button\"\n class=\"dbd-step\"\n [disabled]=\"!store.canGoNext()\"\n (click)=\"store.nextPage()\">\n <span>Next</span>\n <mat-icon class=\"dbd-step__icon\" aria-hidden=\"true\">chevron_right</mat-icon>\n </button>\n </div>\n </div>\n\n <mat-dialog-actions class=\"dbd__actions\">\n <button matButton type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button matButton=\"filled\" type=\"button\" (click)=\"confirm()\">Done</button>\n </mat-dialog-actions>\n</div>\n", styles: [":host{--dbd-radius-lg: 12px;--dbd-radius-md: 8px;--dbd-radius-sm: 6px;--dbd-ease: cubic-bezier(.2, 0, 0, 1);--dbd-primary-06: color-mix(in srgb, var(--mat-sys-primary) 6%, transparent);--dbd-primary-10: color-mix(in srgb, var(--mat-sys-primary) 10%, transparent);--dbd-primary-12: color-mix(in srgb, var(--mat-sys-primary) 12%, transparent);--dbd-primary-14: color-mix(in srgb, var(--mat-sys-primary) 14%, transparent);--dbd-primary-25: color-mix(in srgb, var(--mat-sys-primary) 25%, transparent);--dbd-outline-10: color-mix(in srgb, var(--mat-sys-outline) 10%, transparent);--dbd-outline-15: color-mix(in srgb, var(--mat-sys-outline) 15%, transparent);--dbd-zebra: color-mix(in srgb, var(--mat-sys-on-surface) 2.5%, transparent);--dbd-error-10: color-mix(in srgb, var(--mat-sys-error) 10%, transparent);--dbd-veil: color-mix(in srgb, var(--mat-sys-surface) 72%, transparent);--dbd-step-tint: 16%;--dbd-step-ink: 82%;--dbd-step-edge: 26%;--dbd-step-hue-0: #4c5fd7;--dbd-step-hue-1: #0d7a70;--dbd-step-hue-2: #a16207;--dbd-step-hue-3: #7c3aed;--dbd-step-hue-4: #be3455;--dbd-step-hue-5: #4d7c0f;--dbd-step-hue-6: #0369a1;--dbd-step-hue-7: #9a4a25;display:flex;flex:1 1 auto;flex-direction:column;width:100%;height:100%;min-height:0;overflow:hidden;color:var(--mat-sys-on-surface)}.dbd__header{display:flex;flex:0 0 auto;align-items:flex-start;gap:1rem;padding:1.25rem 1.5rem 1rem}.dbd__header-icon{display:flex;flex-shrink:0;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;border-radius:var(--dbd-radius-md);background:var(--dbd-primary-12);color:var(--mat-sys-primary)}.dbd__header-icon mat-icon{font-size:1.375rem;width:1.375rem;height:1.375rem}.dbd__heading{min-width:0}.dbd__title{margin:0;padding:0;font-size:1.125rem;font-weight:600;letter-spacing:-.01em;line-height:1.3;color:var(--mat-sys-on-surface)}.dbd__title:before{display:none}.dbd__subtitle{margin:.125rem 0 0;font-size:.8125rem;line-height:1.35;color:var(--mat-sys-on-surface-variant)}.dbd__content{display:flex;flex:1 1 auto;flex-direction:column;gap:.75rem;min-height:0;max-height:none;padding:0 1.5rem .75rem;overflow:hidden}.dbd__controls{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:flex-end;gap:.75rem}.dbd-field{display:flex;flex-direction:column;gap:.35rem;min-width:10rem}.dbd-field--grow{flex:1 1 18rem}.dbd-field--inline{flex-direction:row;align-items:center;gap:.5rem;min-width:0}.dbd-field__label{font-size:.75rem;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant)}.dbd-field__control{box-sizing:border-box;width:100%;min-height:2.25rem;padding:.5rem .75rem;font:inherit;font-size:.875rem;color:var(--mat-sys-on-surface);background:var(--mat-sys-surface-container-high, var(--mat-sys-surface));border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-md);transition:border-color .15s var(--dbd-ease),box-shadow .15s var(--dbd-ease)}.dbd-field__control--compact{width:auto;min-height:2rem;padding:.25rem .5rem;font-size:.8125rem}.dbd-field__control::placeholder{color:color-mix(in srgb,var(--mat-sys-on-surface-variant) 60%,transparent)}.dbd-field__control:focus{outline:none;border-color:var(--mat-sys-primary);box-shadow:0 0 0 2px var(--dbd-primary-25)}.dbd-field__control:disabled{opacity:.45;pointer-events:none}.dbd__selection{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;gap:.5rem}.dbd-toggle{display:inline-flex;align-items:center;gap:.375rem;padding:.3rem .625rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-sm);cursor:pointer;transition:all .15s var(--dbd-ease)}.dbd-toggle:hover{color:var(--mat-sys-primary);background:var(--dbd-primary-06);border-color:var(--mat-sys-primary)}.dbd-toggle--on{color:var(--mat-sys-primary);background:var(--dbd-primary-12);border-color:var(--mat-sys-primary)}.dbd-toggle:focus-visible{outline:none;box-shadow:0 0 0 2px var(--dbd-primary-25)}.dbd-toggle__icon{font-size:.9375rem;width:.9375rem;height:.9375rem}.dbd-clear{padding:.3rem .375rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-on-surface-variant);background:transparent;border:none;border-radius:var(--dbd-radius-sm);cursor:pointer;transition:color .15s var(--dbd-ease)}.dbd-clear:hover{color:var(--mat-sys-primary)}.dbd__selection-hint{font-size:.75rem;color:var(--mat-sys-on-surface-variant)}.dbd-alert{display:flex;flex:0 0 auto;align-items:flex-start;gap:.75rem;padding:.75rem 1rem;background:var(--dbd-error-10);border-radius:var(--dbd-radius-md)}.dbd-alert__icon{flex-shrink:0;font-size:1.125rem;width:1.125rem;height:1.125rem;color:var(--mat-sys-error)}.dbd-alert__body{flex:1 1 auto;min-width:0}.dbd-alert__message{margin:0;font-size:.8125rem;line-height:1.4;color:var(--mat-sys-on-surface)}.dbd-alert__hint{margin:.25rem 0 0;font-size:.75rem;line-height:1.4;color:var(--mat-sys-on-surface-variant)}.dbd-alert__retry{flex-shrink:0}.dbd__table-wrap{position:relative;display:flex;flex:1 1 auto;min-height:6rem;border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-lg);background:var(--mat-sys-surface-container, var(--mat-sys-surface));overflow:hidden}.dbd__table-scroll{flex:1 1 auto;width:100%;min-height:0;overflow:auto}.dbd-table{width:100%;border-collapse:collapse;text-align:left}.dbd-table__head{position:sticky;top:0;z-index:1;background:var(--mat-sys-surface-container-high, var(--mat-sys-surface))}.dbd-table th{padding:.5rem .75rem;font-weight:500;white-space:nowrap;border-bottom:1px solid var(--dbd-outline-10)}.dbd-table__pick{width:2.75rem;text-align:center}.dbd-sort{display:inline-flex;align-items:center;gap:.25rem;padding:0;font:inherit;font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--mat-sys-on-surface-variant);background:transparent;border:none;cursor:pointer;transition:color .15s var(--dbd-ease)}.dbd-sort:hover,.dbd-sort--active{color:var(--mat-sys-primary)}.dbd-sort:focus-visible{outline:none;color:var(--mat-sys-primary);text-decoration:underline}.dbd-sort__icon{font-size:.875rem;width:.875rem;height:.875rem}.dbd-row{cursor:pointer;transition:background .15s var(--dbd-ease)}.dbd-row:nth-child(2n){background:var(--dbd-zebra)}.dbd-row:hover{background:var(--dbd-primary-06)}.dbd-row--selected,.dbd-row--selected:nth-child(2n){background:var(--dbd-primary-12)}.dbd-row--selected:hover{background:var(--dbd-primary-14)}.dbd-row--selected .dbd-table__pick{box-shadow:inset 2px 0 0 var(--mat-sys-primary)}.dbd-cell{padding:.4375rem .75rem;font-size:.8125rem;line-height:1.35;color:var(--mat-sys-on-surface);vertical-align:middle}.dbd-cell__text{display:block;max-width:16rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dbd-pick{width:1rem;height:1rem;margin:0;accent-color:var(--mat-sys-primary);cursor:pointer}.dbd-pick:focus-visible{outline:2px solid var(--dbd-primary-25);outline-offset:2px}.dbd-table__step{width:1%}.dbd-pill{display:inline-block;max-width:10rem;box-sizing:border-box;padding:.0625rem .4375rem;font-size:.6875rem;font-weight:500;letter-spacing:.01em;line-height:1.2;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid transparent;border-radius:var(--dbd-radius-sm);transition:background .15s var(--dbd-ease),color .15s var(--dbd-ease),border-color .15s var(--dbd-ease);background:color-mix(in srgb,var(--mat-sys-on-surface) 7%,transparent);color:var(--mat-sys-on-surface-variant);border-color:var(--dbd-outline-15)}.dbd-pill[data-step-hue]{background:color-mix(in srgb,var(--dbd-step-hue) var(--dbd-step-tint),var(--mat-sys-surface));color:color-mix(in srgb,var(--dbd-step-hue) var(--dbd-step-ink),var(--mat-sys-on-surface));border-color:color-mix(in srgb,var(--dbd-step-hue) var(--dbd-step-edge),transparent)}.dbd-pill[data-step-hue=\"0\"]{--dbd-step-hue: var(--dbd-step-hue-0)}.dbd-pill[data-step-hue=\"1\"]{--dbd-step-hue: var(--dbd-step-hue-1)}.dbd-pill[data-step-hue=\"2\"]{--dbd-step-hue: var(--dbd-step-hue-2)}.dbd-pill[data-step-hue=\"3\"]{--dbd-step-hue: var(--dbd-step-hue-3)}.dbd-pill[data-step-hue=\"4\"]{--dbd-step-hue: var(--dbd-step-hue-4)}.dbd-pill[data-step-hue=\"5\"]{--dbd-step-hue: var(--dbd-step-hue-5)}.dbd-pill[data-step-hue=\"6\"]{--dbd-step-hue: var(--dbd-step-hue-6)}.dbd-pill[data-step-hue=\"7\"]{--dbd-step-hue: var(--dbd-step-hue-7)}.dbd-pill--unknown{font-style:italic}.dbd-empty{display:flex;flex-direction:column;align-items:center;gap:.25rem;padding:2rem 1.5rem;text-align:center}.dbd-empty__icon{margin-bottom:.25rem;font-size:1.5rem;width:1.5rem;height:1.5rem;color:color-mix(in srgb,var(--mat-sys-on-surface-variant) 70%,transparent)}.dbd-empty__title{margin:0;font-size:.875rem;font-weight:600;color:var(--mat-sys-on-surface)}.dbd-empty__hint{max-width:30rem;margin:0;font-size:.8125rem;line-height:1.45;color:var(--mat-sys-on-surface-variant)}.dbd-empty__hint strong{font-weight:600;color:var(--mat-sys-on-surface)}.dbd-empty__actions{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.5rem}.dbd__overlay{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;background:var(--dbd-veil)}.dbd__footer{display:flex;flex:0 0 auto;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;padding:.75rem 1.5rem 1rem;border-top:1px solid var(--dbd-outline-10);background:var(--mat-sys-surface)}.dbd__paging{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.dbd__position{margin:0;font-size:.75rem;color:var(--mat-sys-on-surface-variant);white-space:nowrap}.dbd__paging-controls{display:flex;align-items:center;gap:.375rem}.dbd-step{display:inline-flex;align-items:center;gap:.25rem;min-height:2rem;padding:.25rem .625rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-on-surface-variant);background:var(--mat-sys-surface);border:1px solid var(--dbd-outline-15);border-radius:var(--dbd-radius-sm);cursor:pointer;transition:all .15s var(--dbd-ease)}.dbd-step:hover:not(:disabled){color:var(--mat-sys-primary);background:var(--dbd-primary-06);border-color:var(--mat-sys-primary)}.dbd-step:focus-visible{outline:none;box-shadow:0 0 0 2px var(--dbd-primary-25)}.dbd-step:disabled{opacity:.4;pointer-events:none}.dbd-step__icon{font-size:1rem;width:1rem;height:1rem}.dbd__actions{gap:.75rem;min-height:0;padding:0;justify-content:flex-end}.dbd-sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}@media(prefers-color-scheme:dark){:host{--dbd-veil: color-mix(in srgb, var(--mat-sys-surface) 80%, transparent);--dbd-zebra: color-mix(in srgb, var(--mat-sys-on-surface) 5%, transparent);--dbd-step-tint: 20%;--dbd-step-ink: 90%;--dbd-step-edge: 32%;--dbd-step-hue-0: #8b9bf0;--dbd-step-hue-1: #3fbfae;--dbd-step-hue-2: #d9a441;--dbd-step-hue-3: #b28ef5;--dbd-step-hue-4: #ef7f95;--dbd-step-hue-5: #8fbe52;--dbd-step-hue-6: #4fb0e8;--dbd-step-hue-7: #db8a5c}}:host-context(.dark),:host-context([data-theme=\"dark\"]){--dbd-veil: color-mix(in srgb, var(--mat-sys-surface) 80%, transparent);--dbd-zebra: color-mix(in srgb, var(--mat-sys-on-surface) 5%, transparent);--dbd-step-tint: 20%;--dbd-step-ink: 90%;--dbd-step-edge: 32%;--dbd-step-hue-0: #8b9bf0;--dbd-step-hue-1: #3fbfae;--dbd-step-hue-2: #d9a441;--dbd-step-hue-3: #b28ef5;--dbd-step-hue-4: #ef7f95;--dbd-step-hue-5: #8fbe52;--dbd-step-hue-6: #4fb0e8;--dbd-step-hue-7: #db8a5c}\n"] }]
899
+ }], ctorParameters: () => [] });
900
+ /**
901
+ * Maps a step's process-tree index onto a palette slot.
902
+ *
903
+ * The modulo is normalised so a negative or fractional index — which a malformed
904
+ * workflow can produce — still lands on a real slot instead of yielding `NaN` or a
905
+ * negative attribute value that no stylesheet rule would match.
906
+ *
907
+ * @param index - Zero-based position of the step in the workflow's process tree.
908
+ * @returns A slot in `0…STEP_HUE_COUNT - 1`.
909
+ */
910
+ function stepHue(index) {
911
+ const whole = Number.isFinite(index) ? Math.trunc(index) : 0;
912
+ return ((whole % STEP_HUE_COUNT) + STEP_HUE_COUNT) % STEP_HUE_COUNT;
913
+ }
914
+
915
+ const customInputConfig = {
916
+ controlType: 'lib-document-picker-reactive-input',
917
+ nextId: 0,
918
+ };
919
+ /**
920
+ * Compact summary of the transactions a form field links to: one chip per linked
921
+ * transaction plus a button that opens the browse dialog.
922
+ *
923
+ * The field itself queries nothing. Every reference it renders comes from the form
924
+ * control, and every change comes back from {@link DocumentBrowserDialogComponent},
925
+ * which owns searching, paging and step filtering. Display state is derived from the
926
+ * control value alone — deliberately never from `stateChanges`, which also fires on
927
+ * focus, blur, touch and `disabled` and previously turned every focus change into a
928
+ * fresh round of network requests.
929
+ *
930
+ * @example
931
+ * <lib-document-picker-reactive-input [inputConfig]="config" [formControlName]="config.id" />
932
+ */
933
+ class DocumentPickerReactiveInputComponent extends BaseCustomInput {
934
+ #dialog;
935
+ #destroyRef;
936
+ /**
937
+ * The form engine this picker is rendered inside, when there is one.
938
+ *
939
+ * Optional by necessity: the picker also renders in the builder's element preview
940
+ * and in portal-hosted contexts, where no engine is provided. Those keep the
941
+ * form-group fallback in {@link DocumentPickerReactiveInputComponent.#dependencyValues}.
942
+ */
943
+ #engine;
944
+ /**
945
+ * Signal mirror of the control value. `BaseCustomInput` keeps the value on a plain
946
+ * field, so both write paths are overridden to feed this: {@link writeValue}, which
947
+ * the form uses, and the `value` setter, which every user edit goes through. That
948
+ * keeps the template reactive under OnPush without observing `stateChanges` — which
949
+ * also fires on focus, blur and touch, and has no business redrawing this field.
950
+ */
951
+ #value;
952
+ /** Disabled state pushed by the reactive form, e.g. `control.disable()`. */
953
+ #formDisabled;
954
+ constructor() {
955
+ super(inject(NgControl, { self: true, optional: true }), inject(ElementRef), customInputConfig);
956
+ /** Builder configuration for this field: workflow, filters and selection mode. */
957
+ this.inputConfig = input(undefined, ...(ngDevMode ? [{ debugName: "inputConfig" }] : /* istanbul ignore next */ []));
958
+ /** Line shown while nothing is linked. */
959
+ this.emptyMessage = input('No transactions linked', ...(ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []));
960
+ this.#dialog = inject(MatDialog);
961
+ this.#destroyRef = inject(DestroyRef);
962
+ /**
963
+ * The form engine this picker is rendered inside, when there is one.
964
+ *
965
+ * Optional by necessity: the picker also renders in the builder's element preview
966
+ * and in portal-hosted contexts, where no engine is provided. Those keep the
967
+ * form-group fallback in {@link DocumentPickerReactiveInputComponent.#dependencyValues}.
968
+ */
969
+ this.#engine = inject(TFormEngine, { optional: true });
970
+ /**
971
+ * Signal mirror of the control value. `BaseCustomInput` keeps the value on a plain
972
+ * field, so both write paths are overridden to feed this: {@link writeValue}, which
973
+ * the form uses, and the `value` setter, which every user edit goes through. That
974
+ * keeps the template reactive under OnPush without observing `stateChanges` — which
975
+ * also fires on focus, blur and touch, and has no business redrawing this field.
976
+ */
977
+ this.#value = signal(null, ...(ngDevMode ? [{ debugName: "#value" }] : /* istanbul ignore next */ []));
978
+ /** Disabled state pushed by the reactive form, e.g. `control.disable()`. */
979
+ this.#formDisabled = signal(false, ...(ngDevMode ? [{ debugName: "#formDisabled" }] : /* istanbul ignore next */ []));
980
+ /** References parsed out of the stored value, with the count it could not read. */
981
+ this.#readResult = computed(() => readDocumentReferences(this.#value()), ...(ngDevMode ? [{ debugName: "#readResult" }] : /* istanbul ignore next */ []));
982
+ /** Transactions currently linked, in stored order. */
983
+ this.references = computed(() => this.#readResult().references, ...(ngDevMode ? [{ debugName: "references" }] : /* istanbul ignore next */ []));
984
+ /** Stored entries that are not readable as references — surfaced, never dropped. */
985
+ this.unreadable = computed(() => this.#readResult().unreadable, ...(ngDevMode ? [{ debugName: "unreadable" }] : /* istanbul ignore next */ []));
986
+ /** Whether this field links more than one transaction. */
987
+ this.allowMultiple = computed(() => this.inputConfig()?.allowMultipleSelection === true, ...(ngDevMode ? [{ debugName: "allowMultiple" }] : /* istanbul ignore next */ []));
988
+ /** Workflow whose transactions this field browses; empty when unconfigured. */
989
+ this.#workflowId = computed(() => this.inputConfig()?.workflowPickerConfig?.workflowId ?? '', ...(ngDevMode ? [{ debugName: "#workflowId" }] : /* istanbul ignore next */ []));
990
+ /** `true` when the field accepts no edits — disabled by the form or by configuration. */
991
+ this.interactionLocked = computed(() => {
992
+ const config = this.inputConfig();
993
+ return this.#formDisabled() || config?.disabled === true || config?.readonly === true;
994
+ }, ...(ngDevMode ? [{ debugName: "interactionLocked" }] : /* istanbul ignore next */ []));
995
+ /** `true` when the builder never chose a workflow, so there is nothing to browse. */
996
+ this.unconfigured = computed(() => this.#workflowId() === '', ...(ngDevMode ? [{ debugName: "unconfigured" }] : /* istanbul ignore next */ []));
997
+ /** `true` when the browse dialog can actually be opened. */
998
+ this.canBrowse = computed(() => !this.interactionLocked() && !this.unconfigured(), ...(ngDevMode ? [{ debugName: "canBrowse" }] : /* istanbul ignore next */ []));
999
+ /** Browse-button wording: replacing a single link reads differently from adding one. */
1000
+ this.browseLabel = computed(() => !this.allowMultiple() && this.references().length > 0 ? 'Change' : 'Browse transactions', ...(ngDevMode ? [{ debugName: "browseLabel" }] : /* istanbul ignore next */ []));
1001
+ /**
1002
+ * `true` when the empty field should spell out how to fill it.
1003
+ *
1004
+ * Withheld when the field is read-only or has no workflow configured: in both cases
1005
+ * the reader cannot act on the instructions, and telling them to press a button that
1006
+ * is absent or disabled is worse than saying nothing.
1007
+ */
1008
+ this.showSteps = computed(() => !this.interactionLocked() && !this.unconfigured(), ...(ngDevMode ? [{ debugName: "showSteps" }] : /* istanbul ignore next */ []));
1009
+ /** Calm one-liner naming how many stored links could not be read. */
1010
+ this.unreadableMessage = computed(() => {
1011
+ const count = this.unreadable();
1012
+ return `${count} saved ${count === 1 ? 'link' : 'links'} could not be read`;
1013
+ }, ...(ngDevMode ? [{ debugName: "unreadableMessage" }] : /* istanbul ignore next */ []));
1014
+ }
1015
+ /** References parsed out of the stored value, with the count it could not read. */
1016
+ #readResult;
1017
+ /** Workflow whose transactions this field browses; empty when unconfigured. */
1018
+ #workflowId;
1019
+ /** Current control value. */
1020
+ get value() {
1021
+ return super.value;
1022
+ }
1023
+ /**
1024
+ * Sets the control value, keeping the signal mirror in step with it.
1025
+ *
1026
+ * The mirror is updated first so anything reacting to the base setter's
1027
+ * `stateChanges` — `empty`, for one — already sees the new selection.
1028
+ */
1029
+ set value(next) {
1030
+ this.#value.set(next);
1031
+ super.value = next;
1032
+ }
1033
+ /** `true` when no transaction is linked, so the Material label floats correctly. */
1034
+ get empty() {
1035
+ return this.references().length === 0;
1036
+ }
1037
+ /** Always floats: the field renders chips, not text, so there is nothing to overlap. */
1038
+ get shouldLabelFloat() {
1039
+ return true;
1040
+ }
1041
+ /**
1042
+ * Accepts a value from the form and mirrors it into the signal the template reads.
1043
+ *
1044
+ * @param value - Stored value; `null` whenever the control is reset.
1045
+ */
1046
+ writeValue(value) {
1047
+ super.writeValue(value);
1048
+ this.#value.set(value ?? null);
1049
+ }
1050
+ /**
1051
+ * Records the form's disabled state so the template can react to it.
1052
+ *
1053
+ * @param isDisabled - `true` while the control is disabled.
1054
+ */
1055
+ setDisabledState(isDisabled) {
1056
+ super.setDisabledState(isDisabled);
1057
+ this.#formDisabled.set(isDisabled);
1058
+ }
1059
+ /**
1060
+ * A chip's leading text: the human reference, else the descriptive label, else the
1061
+ * raw id. The fallback order matters — a chip should only show an internal id when
1062
+ * there is genuinely nothing human to show.
1063
+ */
1064
+ chipReference(reference) {
1065
+ return reference.reference || reference.label || reference.id;
1066
+ }
1067
+ /**
1068
+ * A chip's trailing text — the descriptive label shown beside the reference, so a
1069
+ * linked transaction reads as "SDBIP-0197 · Machinery and Equipment" rather than a
1070
+ * bare code the user has to recognise from memory.
1071
+ *
1072
+ * Empty unless it adds something: when there is no `reference` the label is already
1073
+ * the leading text ({@link chipReference}), and a label identical to the reference
1074
+ * would just be printed twice.
1075
+ */
1076
+ chipDetail(reference) {
1077
+ const label = reference.label?.trim() ?? '';
1078
+ if (!reference.reference || label === '' || label === reference.reference)
1079
+ return '';
1080
+ return label;
1081
+ }
1082
+ /** The chip as one line of text — for the unlink button's accessible name. */
1083
+ chipLabel(reference) {
1084
+ const detail = this.chipDetail(reference);
1085
+ const lead = this.chipReference(reference);
1086
+ return detail === '' ? lead : `${lead} — ${detail}`;
1087
+ }
1088
+ /**
1089
+ * Unlinks one transaction.
1090
+ *
1091
+ * @param index - Position of the chip in {@link references}.
1092
+ */
1093
+ removeReference(index) {
1094
+ if (this.interactionLocked())
1095
+ return;
1096
+ this.commitSelection(this.references().filter((_, position) => position !== index));
1097
+ }
1098
+ /**
1099
+ * Opens the browse dialog and applies whatever selection it comes back with.
1100
+ * A dismissal returns `undefined` and leaves the stored links untouched.
1101
+ */
1102
+ openBrowser() {
1103
+ if (!this.canBrowse())
1104
+ return;
1105
+ const data = this.#buildDialogData();
1106
+ if (!data)
1107
+ return;
1108
+ this.#dialog
1109
+ .open(DocumentBrowserDialogComponent, {
1110
+ data,
1111
+ autoFocus: false,
1112
+ restoreFocus: true,
1113
+ // An explicit height is load-bearing, not cosmetic: the dialog is a flex
1114
+ // column whose table is the only scroll region, and that resolves only
1115
+ // against a definite panel height. Without it the footer is pushed below
1116
+ // the fold and the panel itself scrolls.
1117
+ width: 'min(60rem, 94vw)',
1118
+ maxWidth: '94vw',
1119
+ height: 'min(42rem, 86vh)',
1120
+ })
1121
+ .afterClosed()
1122
+ .pipe(take(1), takeUntilDestroyed(this.#destroyRef))
1123
+ .subscribe((result) => {
1124
+ if (result === undefined)
1125
+ return;
1126
+ this.commitSelection(result);
1127
+ });
1128
+ }
1129
+ /**
1130
+ * Writes a new selection to the form control.
1131
+ *
1132
+ * Only one change notification is emitted: `BaseCustomInput`'s `value` setter
1133
+ * already calls `onChange`, so this deliberately assigns through that setter
1134
+ * instead of calling `onChange` a second time. `onTouched` is called explicitly —
1135
+ * choosing (or clearing) a link is the interaction that makes the field touched.
1136
+ *
1137
+ * @param references - The selection as the user left it.
1138
+ */
1139
+ commitSelection(references) {
1140
+ this.value = writeDocumentValue(references, this.allowMultiple());
1141
+ this.onTouched();
1142
+ }
1143
+ /** Assembles everything the browse dialog needs, or nothing when unconfigured. */
1144
+ #buildDialogData() {
1145
+ const config = this.inputConfig();
1146
+ const pickerConfig = config?.workflowPickerConfig;
1147
+ if (!config || !pickerConfig?.workflowId)
1148
+ return undefined;
1149
+ const lockedStepIds = pickerConfig.stepFilter?.stepIds ?? [];
1150
+ return {
1151
+ workflowId: pickerConfig.workflowId,
1152
+ title: config.label || 'Transactions',
1153
+ filter: buildDocumentFilter({
1154
+ presetFilters: pickerConfig.presetFilters,
1155
+ lockedStepIds,
1156
+ formValue: this.#dependencyValues(),
1157
+ }),
1158
+ lockedStepIds,
1159
+ allowMultiple: this.allowMultiple(),
1160
+ identifierPath: resolveIdentifierPath(pickerConfig.primaryIdentifierKey),
1161
+ pageSize: DEFAULT_DOCUMENT_PAGE_SIZE,
1162
+ selection: this.references(),
1163
+ };
1164
+ }
1165
+ /**
1166
+ * The values a preset filter bound to a sibling input reads from, keyed by input id.
1167
+ *
1168
+ * Sourced from the engine rather than the surrounding `FormGroup`, because the two
1169
+ * disagree in three ways that all surface as the same silent bug — a browse dialog
1170
+ * that opens empty because a clause matched nothing:
1171
+ *
1172
+ * - **Scope.** `formGenerator` nests the form as root → one group per section →
1173
+ * controls, so `control.parent` is this picker's OWN section. A filter bound to an
1174
+ * input on another slide read `undefined` forever, even though the builder's input
1175
+ * selector happily offers those inputs. The engine's value is flat and whole-form.
1176
+ * - **Disabled controls.** `FormGroup.value` omits them (`getRawValue()` does not).
1177
+ * That silently excluded exactly the fields worth filtering by — calculated and
1178
+ * read-only ones. The engine's value never consulted the disabled flag.
1179
+ * - **Derived values.** A calculated or API-fetched value lives in the engine's
1180
+ * `#derived` graph; so do MultipleInput sub-row and mSCOA inner-input values. The
1181
+ * section group exposes none of them usefully.
1182
+ *
1183
+ * Both sources key by input id, which is what `fromInputId` stores, so nothing is
1184
+ * translated. Ids are unique per form — the engine's own flat maps already rely on
1185
+ * that — so flattening across slides introduces no collision.
1186
+ *
1187
+ * The fallback is not dead code: with no engine in scope this reproduces the previous
1188
+ * behaviour exactly, which is the right answer for a preview that has no live form.
1189
+ */
1190
+ #dependencyValues() {
1191
+ const fromEngine = this.#engine?.getFormValue();
1192
+ if (isValueRecord(fromEngine))
1193
+ return fromEngine;
1194
+ return isValueRecord(this.ngControl?.control?.parent?.value)
1195
+ ? this.ngControl?.control?.parent?.value
1196
+ : undefined;
1197
+ }
1198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentPickerReactiveInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1199
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DocumentPickerReactiveInputComponent, isStandalone: true, selector: "lib-document-picker-reactive-input", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focusin": "onFocusIn($event)", "focusout": "onFocusOut($event)" }, properties: { "class.floating": "shouldLabelFloat", "id": "id" }, classAttribute: "lib-document-picker-input" }, providers: [{ provide: MatFormFieldControl, useExisting: DocumentPickerReactiveInputComponent }], usesInheritance: true, ngImport: i0, template: "<!--\n The `lib-document-picker-reactive-input` class is the element `BaseCustomInput`\n looks up to apply `aria-describedby`, so it must stay on this container.\n-->\n<div class=\"lib-document-picker-reactive-input doc-link\">\n @if (references().length > 0) {\n <!-- Linked: chips and the browse action share one wrapping row. -->\n <div class=\"doc-link__row\">\n <ul class=\"doc-link__chips\">\n @for (reference of references(); track $index) {\n <li class=\"doc-link__chip\">\n <mat-icon class=\"doc-link__chip-icon\" aria-hidden=\"true\">description</mat-icon>\n <span class=\"doc-link__chip-label\">{{ chipReference(reference) }}</span>\n @if (chipDetail(reference); as detail) {\n <span class=\"doc-link__chip-detail\" [title]=\"detail\">{{ detail }}</span>\n }\n <button\n type=\"button\"\n class=\"doc-link__chip-remove\"\n [disabled]=\"interactionLocked()\"\n [attr.aria-label]=\"'Unlink ' + chipLabel(reference)\"\n (click)=\"removeReference($index)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </li>\n }\n </ul>\n\n @if (!interactionLocked()) {\n <button\n type=\"button\"\n class=\"doc-link__browse\"\n [disabled]=\"!canBrowse()\"\n (click)=\"openBrowser()\"\n >\n <mat-icon class=\"doc-link__browse-icon\" aria-hidden=\"true\">search</mat-icon>\n <span>{{ browseLabel() }}</span>\n </button>\n }\n </div>\n } @else {\n <!--\n Empty: say what this field is for and exactly how to fill it, rather than\n leaving a bare \"nothing here\" the user has to interpret. The steps are\n suppressed when the field is read-only or unconfigured, because there is\n then no action for this user to take.\n -->\n <div class=\"doc-link__guide\" [class.doc-link__guide--muted]=\"interactionLocked()\">\n <p class=\"doc-link__guide-head\">\n <mat-icon class=\"doc-link__guide-icon\" aria-hidden=\"true\">link</mat-icon>\n <span class=\"doc-link__empty\">{{ emptyMessage() }}</span>\n </p>\n\n @if (showSteps()) {\n <ol class=\"doc-link__steps\">\n <li>\n Choose <strong>{{ browseLabel() }}</strong> below to open the transaction list.\n </li>\n <li>\n Search by reference or any listed column, and narrow the list by workflow step.\n </li>\n <li>\n @if (allowMultiple()) {\n Tick every transaction this form relates to, then choose <strong>Done</strong>.\n } @else {\n Select the transaction this form relates to, then choose <strong>Done</strong>.\n }\n </li>\n </ol>\n }\n\n @if (!interactionLocked()) {\n <button\n type=\"button\"\n class=\"doc-link__browse\"\n [disabled]=\"!canBrowse()\"\n (click)=\"openBrowser()\"\n >\n <mat-icon class=\"doc-link__browse-icon\" aria-hidden=\"true\">search</mat-icon>\n <span>{{ browseLabel() }}</span>\n </button>\n }\n </div>\n }\n\n @if (unreadable() > 0) {\n <p class=\"doc-link__notice doc-link__notice--warn\" role=\"status\">\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">report_problem</mat-icon>\n <span>\n <strong>{{ unreadableMessage() }}</strong> \u2014 they were saved in an older format.\n Re-link them here to fix this field.\n </span>\n </p>\n }\n\n @if (unconfigured() && !interactionLocked()) {\n <p class=\"doc-link__notice doc-link__notice--warn\" role=\"status\">\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">report_problem</mat-icon>\n <span>\n <strong>No workflow is configured for this field</strong> \u2014 nothing can be linked\n until an administrator opens this form in the Form Builder and chooses the\n workflow whose transactions this field should reference.\n </span>\n </p>\n }\n</div>\n", styles: [":host{--doc-link-ease: cubic-bezier(.2, 0, 0, 1);--doc-link-radius-sm: 8px;--doc-link-radius-pill: 6px;--doc-link-primary-10: color-mix(in srgb, var(--mat-sys-primary) 10%, transparent);--doc-link-primary-16: color-mix(in srgb, var(--mat-sys-primary) 16%, transparent);--doc-link-primary-25: color-mix(in srgb, var(--mat-sys-primary) 25%, transparent);--doc-link-primary-06: color-mix(in srgb, var(--mat-sys-primary) 6%, transparent);--doc-link-outline-15: color-mix(in srgb, var(--mat-sys-outline) 15%, transparent);--doc-link-error-20: color-mix(in srgb, var(--mat-sys-error) 20%, transparent);--doc-link-warn: var(--sem-amber, #b45309);--doc-link-warn-surface: var( --sem-amber-surface, color-mix(in srgb, var(--mat-sys-on-surface) 6%, transparent) );display:block;width:100%}.doc-link{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0 .125rem}.doc-link__row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.doc-link__chips{display:flex;flex-wrap:wrap;gap:.5rem;margin:0;padding:0;list-style:none}.doc-link__chip{display:inline-flex;align-items:center;gap:.375rem;max-width:100%;padding:.25rem .375rem .25rem .5rem;font-size:.8125rem;line-height:1.3;color:var(--mat-sys-on-surface);background:var(--doc-link-primary-10);border-radius:var(--doc-link-radius-pill);transition:background .15s var(--doc-link-ease)}.doc-link__chip:hover{background:var(--doc-link-primary-16)}.doc-link__chip-icon{flex-shrink:0;font-size:.9375rem;width:.9375rem;height:.9375rem;line-height:1;color:var(--mat-sys-primary)}.doc-link__chip-label{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.doc-link__chip-detail{max-width:14rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;color:var(--mat-sys-on-surface-variant)}.doc-link__chip-detail:before{content:\"\\b7\";margin-right:.375rem;opacity:.55}.doc-link__chip-remove{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;padding:0;border:none;border-radius:4px;background:transparent;color:var(--mat-sys-on-surface-variant);cursor:pointer;transition:background .15s var(--doc-link-ease),color .15s var(--doc-link-ease)}.doc-link__chip-remove mat-icon{font-size:.875rem;width:.875rem;height:.875rem;line-height:1}.doc-link__chip-remove:hover{background:var(--doc-link-error-20);color:var(--mat-sys-error)}.doc-link__chip-remove:focus-visible{outline:none;box-shadow:0 0 0 2px var(--doc-link-primary-25)}.doc-link__chip-remove:disabled{opacity:.4;pointer-events:none}.doc-link__guide{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;padding:.75rem .875rem;background:color-mix(in srgb,var(--mat-sys-primary) 4%,transparent);border:1px dashed color-mix(in srgb,var(--mat-sys-primary) 25%,transparent);border-radius:var(--doc-link-radius-sm)}.doc-link__guide--muted{background:transparent;border-color:var(--doc-link-outline-15);border-style:solid}.doc-link__guide-head{display:flex;align-items:center;gap:.375rem;margin:0}.doc-link__guide-icon{flex-shrink:0;font-size:1rem;width:1rem;height:1rem;line-height:1;color:var(--mat-sys-primary)}.doc-link__guide--muted .doc-link__guide-icon{color:var(--mat-sys-on-surface-variant)}.doc-link__empty{font-size:.8125rem;font-weight:600;line-height:1.4;color:var(--mat-sys-on-surface)}.doc-link__guide--muted .doc-link__empty{font-weight:400;color:var(--mat-sys-on-surface-variant)}.doc-link__steps{margin:0;padding-left:1.125rem;font-size:.75rem;line-height:1.5;color:var(--mat-sys-on-surface-variant)}.doc-link__steps li+li{margin-top:.125rem}.doc-link__steps strong{font-weight:600;color:var(--mat-sys-on-surface)}.doc-link__browse{display:inline-flex;align-items:center;gap:.375rem;min-height:2rem;padding:.25rem .625rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-primary);background:var(--mat-sys-surface);border:1px solid var(--doc-link-outline-15);border-radius:var(--doc-link-radius-pill);cursor:pointer;transition:all .15s var(--doc-link-ease)}.doc-link__browse:hover:not(:disabled){background:var(--doc-link-primary-06);border-color:var(--mat-sys-primary)}.doc-link__browse:focus-visible{outline:none;border-color:var(--mat-sys-primary);box-shadow:0 0 0 2px var(--doc-link-primary-25)}.doc-link__browse:disabled{color:var(--mat-sys-on-surface-variant);opacity:.45;pointer-events:none}.doc-link__browse-icon{font-size:.9375rem;width:.9375rem;height:.9375rem;line-height:1}.doc-link__notice{display:flex;align-items:flex-start;gap:.375rem;align-self:flex-start;margin:0;padding:.375rem .625rem;font-size:.75rem;line-height:1.45;border-radius:var(--doc-link-radius-sm)}.doc-link__notice strong{font-weight:600}.doc-link__notice--warn{color:var(--doc-link-warn);background:var(--doc-link-warn-surface)}.doc-link__notice-icon{flex-shrink:0;margin-top:.0625rem;font-size:.875rem;width:.875rem;height:.875rem;line-height:1}:host-context(.dark),:host-context([data-theme=\"dark\"]){--doc-link-primary-10: color-mix(in srgb, var(--mat-sys-primary) 20%, transparent);--doc-link-primary-16: color-mix(in srgb, var(--mat-sys-primary) 28%, transparent)}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1200
+ }
1201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentPickerReactiveInputComponent, decorators: [{
1202
+ type: Component,
1203
+ args: [{ selector: 'lib-document-picker-reactive-input', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [MatIconModule], host: {
1204
+ 'class': 'lib-document-picker-input',
1205
+ '[class.floating]': 'shouldLabelFloat',
1206
+ '[id]': 'id',
1207
+ '(focusin)': 'onFocusIn($event)',
1208
+ '(focusout)': 'onFocusOut($event)',
1209
+ }, providers: [{ provide: MatFormFieldControl, useExisting: DocumentPickerReactiveInputComponent }], template: "<!--\n The `lib-document-picker-reactive-input` class is the element `BaseCustomInput`\n looks up to apply `aria-describedby`, so it must stay on this container.\n-->\n<div class=\"lib-document-picker-reactive-input doc-link\">\n @if (references().length > 0) {\n <!-- Linked: chips and the browse action share one wrapping row. -->\n <div class=\"doc-link__row\">\n <ul class=\"doc-link__chips\">\n @for (reference of references(); track $index) {\n <li class=\"doc-link__chip\">\n <mat-icon class=\"doc-link__chip-icon\" aria-hidden=\"true\">description</mat-icon>\n <span class=\"doc-link__chip-label\">{{ chipReference(reference) }}</span>\n @if (chipDetail(reference); as detail) {\n <span class=\"doc-link__chip-detail\" [title]=\"detail\">{{ detail }}</span>\n }\n <button\n type=\"button\"\n class=\"doc-link__chip-remove\"\n [disabled]=\"interactionLocked()\"\n [attr.aria-label]=\"'Unlink ' + chipLabel(reference)\"\n (click)=\"removeReference($index)\"\n >\n <mat-icon>close</mat-icon>\n </button>\n </li>\n }\n </ul>\n\n @if (!interactionLocked()) {\n <button\n type=\"button\"\n class=\"doc-link__browse\"\n [disabled]=\"!canBrowse()\"\n (click)=\"openBrowser()\"\n >\n <mat-icon class=\"doc-link__browse-icon\" aria-hidden=\"true\">search</mat-icon>\n <span>{{ browseLabel() }}</span>\n </button>\n }\n </div>\n } @else {\n <!--\n Empty: say what this field is for and exactly how to fill it, rather than\n leaving a bare \"nothing here\" the user has to interpret. The steps are\n suppressed when the field is read-only or unconfigured, because there is\n then no action for this user to take.\n -->\n <div class=\"doc-link__guide\" [class.doc-link__guide--muted]=\"interactionLocked()\">\n <p class=\"doc-link__guide-head\">\n <mat-icon class=\"doc-link__guide-icon\" aria-hidden=\"true\">link</mat-icon>\n <span class=\"doc-link__empty\">{{ emptyMessage() }}</span>\n </p>\n\n @if (showSteps()) {\n <ol class=\"doc-link__steps\">\n <li>\n Choose <strong>{{ browseLabel() }}</strong> below to open the transaction list.\n </li>\n <li>\n Search by reference or any listed column, and narrow the list by workflow step.\n </li>\n <li>\n @if (allowMultiple()) {\n Tick every transaction this form relates to, then choose <strong>Done</strong>.\n } @else {\n Select the transaction this form relates to, then choose <strong>Done</strong>.\n }\n </li>\n </ol>\n }\n\n @if (!interactionLocked()) {\n <button\n type=\"button\"\n class=\"doc-link__browse\"\n [disabled]=\"!canBrowse()\"\n (click)=\"openBrowser()\"\n >\n <mat-icon class=\"doc-link__browse-icon\" aria-hidden=\"true\">search</mat-icon>\n <span>{{ browseLabel() }}</span>\n </button>\n }\n </div>\n }\n\n @if (unreadable() > 0) {\n <p class=\"doc-link__notice doc-link__notice--warn\" role=\"status\">\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">report_problem</mat-icon>\n <span>\n <strong>{{ unreadableMessage() }}</strong> \u2014 they were saved in an older format.\n Re-link them here to fix this field.\n </span>\n </p>\n }\n\n @if (unconfigured() && !interactionLocked()) {\n <p class=\"doc-link__notice doc-link__notice--warn\" role=\"status\">\n <mat-icon class=\"doc-link__notice-icon\" aria-hidden=\"true\">report_problem</mat-icon>\n <span>\n <strong>No workflow is configured for this field</strong> \u2014 nothing can be linked\n until an administrator opens this form in the Form Builder and chooses the\n workflow whose transactions this field should reference.\n </span>\n </p>\n }\n</div>\n", styles: [":host{--doc-link-ease: cubic-bezier(.2, 0, 0, 1);--doc-link-radius-sm: 8px;--doc-link-radius-pill: 6px;--doc-link-primary-10: color-mix(in srgb, var(--mat-sys-primary) 10%, transparent);--doc-link-primary-16: color-mix(in srgb, var(--mat-sys-primary) 16%, transparent);--doc-link-primary-25: color-mix(in srgb, var(--mat-sys-primary) 25%, transparent);--doc-link-primary-06: color-mix(in srgb, var(--mat-sys-primary) 6%, transparent);--doc-link-outline-15: color-mix(in srgb, var(--mat-sys-outline) 15%, transparent);--doc-link-error-20: color-mix(in srgb, var(--mat-sys-error) 20%, transparent);--doc-link-warn: var(--sem-amber, #b45309);--doc-link-warn-surface: var( --sem-amber-surface, color-mix(in srgb, var(--mat-sys-on-surface) 6%, transparent) );display:block;width:100%}.doc-link{display:flex;flex-direction:column;gap:.5rem;padding:.25rem 0 .125rem}.doc-link__row{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem}.doc-link__chips{display:flex;flex-wrap:wrap;gap:.5rem;margin:0;padding:0;list-style:none}.doc-link__chip{display:inline-flex;align-items:center;gap:.375rem;max-width:100%;padding:.25rem .375rem .25rem .5rem;font-size:.8125rem;line-height:1.3;color:var(--mat-sys-on-surface);background:var(--doc-link-primary-10);border-radius:var(--doc-link-radius-pill);transition:background .15s var(--doc-link-ease)}.doc-link__chip:hover{background:var(--doc-link-primary-16)}.doc-link__chip-icon{flex-shrink:0;font-size:.9375rem;width:.9375rem;height:.9375rem;line-height:1;color:var(--mat-sys-primary)}.doc-link__chip-label{max-width:12rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.doc-link__chip-detail{max-width:14rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400;color:var(--mat-sys-on-surface-variant)}.doc-link__chip-detail:before{content:\"\\b7\";margin-right:.375rem;opacity:.55}.doc-link__chip-remove{flex-shrink:0;display:inline-flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;padding:0;border:none;border-radius:4px;background:transparent;color:var(--mat-sys-on-surface-variant);cursor:pointer;transition:background .15s var(--doc-link-ease),color .15s var(--doc-link-ease)}.doc-link__chip-remove mat-icon{font-size:.875rem;width:.875rem;height:.875rem;line-height:1}.doc-link__chip-remove:hover{background:var(--doc-link-error-20);color:var(--mat-sys-error)}.doc-link__chip-remove:focus-visible{outline:none;box-shadow:0 0 0 2px var(--doc-link-primary-25)}.doc-link__chip-remove:disabled{opacity:.4;pointer-events:none}.doc-link__guide{display:flex;flex-direction:column;align-items:flex-start;gap:.5rem;padding:.75rem .875rem;background:color-mix(in srgb,var(--mat-sys-primary) 4%,transparent);border:1px dashed color-mix(in srgb,var(--mat-sys-primary) 25%,transparent);border-radius:var(--doc-link-radius-sm)}.doc-link__guide--muted{background:transparent;border-color:var(--doc-link-outline-15);border-style:solid}.doc-link__guide-head{display:flex;align-items:center;gap:.375rem;margin:0}.doc-link__guide-icon{flex-shrink:0;font-size:1rem;width:1rem;height:1rem;line-height:1;color:var(--mat-sys-primary)}.doc-link__guide--muted .doc-link__guide-icon{color:var(--mat-sys-on-surface-variant)}.doc-link__empty{font-size:.8125rem;font-weight:600;line-height:1.4;color:var(--mat-sys-on-surface)}.doc-link__guide--muted .doc-link__empty{font-weight:400;color:var(--mat-sys-on-surface-variant)}.doc-link__steps{margin:0;padding-left:1.125rem;font-size:.75rem;line-height:1.5;color:var(--mat-sys-on-surface-variant)}.doc-link__steps li+li{margin-top:.125rem}.doc-link__steps strong{font-weight:600;color:var(--mat-sys-on-surface)}.doc-link__browse{display:inline-flex;align-items:center;gap:.375rem;min-height:2rem;padding:.25rem .625rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--mat-sys-primary);background:var(--mat-sys-surface);border:1px solid var(--doc-link-outline-15);border-radius:var(--doc-link-radius-pill);cursor:pointer;transition:all .15s var(--doc-link-ease)}.doc-link__browse:hover:not(:disabled){background:var(--doc-link-primary-06);border-color:var(--mat-sys-primary)}.doc-link__browse:focus-visible{outline:none;border-color:var(--mat-sys-primary);box-shadow:0 0 0 2px var(--doc-link-primary-25)}.doc-link__browse:disabled{color:var(--mat-sys-on-surface-variant);opacity:.45;pointer-events:none}.doc-link__browse-icon{font-size:.9375rem;width:.9375rem;height:.9375rem;line-height:1}.doc-link__notice{display:flex;align-items:flex-start;gap:.375rem;align-self:flex-start;margin:0;padding:.375rem .625rem;font-size:.75rem;line-height:1.45;border-radius:var(--doc-link-radius-sm)}.doc-link__notice strong{font-weight:600}.doc-link__notice--warn{color:var(--doc-link-warn);background:var(--doc-link-warn-surface)}.doc-link__notice-icon{flex-shrink:0;margin-top:.0625rem;font-size:.875rem;width:.875rem;height:.875rem;line-height:1}:host-context(.dark),:host-context([data-theme=\"dark\"]){--doc-link-primary-10: color-mix(in srgb, var(--mat-sys-primary) 20%, transparent);--doc-link-primary-16: color-mix(in srgb, var(--mat-sys-primary) 28%, transparent)}\n"] }]
1210
+ }], ctorParameters: () => [], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: false }] }], emptyMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "emptyMessage", required: false }] }] } });
1211
+ /** `true` for a plain object usable as an inputId-keyed value map. */
1212
+ function isValueRecord(value) {
1213
+ return value != null && typeof value === 'object' && !Array.isArray(value);
1214
+ }
1215
+
1216
+ /**
1217
+ * Wraps a document-picker control inside a `mat-form-field`, contributing the
1218
+ * label, hint, errors and prefix/suffix affordances. The control itself owns the
1219
+ * linked-transaction chips and the browse dialog.
1220
+ */
1221
+ class DocumentPickerComponent {
1222
+ constructor() {
1223
+ /** Builder configuration for the field being rendered. */
1224
+ this.inputConfig = input.required(...(ngDevMode ? [{ debugName: "inputConfig" }] : /* istanbul ignore next */ []));
1225
+ /** Form group holding the control this field writes to. */
1226
+ this.formGroup = input.required(...(ngDevMode ? [{ debugName: "formGroup" }] : /* istanbul ignore next */ []));
1227
+ /**
1228
+ * `true` while the field renders inside the form builder rather than a live form.
1229
+ * Declared because the element registry marks this renderer builder-aware and
1230
+ * forwards it; the picker's presentation does not currently differ.
1231
+ */
1232
+ this.editorMode = input(false, ...(ngDevMode ? [{ debugName: "editorMode" }] : /* istanbul ignore next */ []));
1233
+ /**
1234
+ * Builder callbacks forwarded by the element registry to builder-aware
1235
+ * renderers. The picker no longer loads its own data — the browse dialog queries
1236
+ * through the document repository — so nothing here consumes them.
1237
+ */
1238
+ this.formBuilderFunctions = input(undefined, ...(ngDevMode ? [{ debugName: "formBuilderFunctions" }] : /* istanbul ignore next */ []));
1239
+ /** First validation message to show under the field, if any. */
1240
+ this.errorMessage = computed(() => getInputErrorMessage(this.inputConfig(), this.formGroup()), ...(ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []));
1241
+ }
1242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentPickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1243
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: DocumentPickerComponent, isStandalone: true, selector: "lib-document-picker", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\">\n @if (inputConfig(); as inputConfig) {\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\n <mat-label>\n {{ inputConfig.label }}\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\n </mat-label>\n\n <lib-document-picker-reactive-input\n [disabled]=\"!!inputConfig.disabled\"\n [inputConfig]=\"inputConfig\"\n [required]=\"inputConfig.required\"\n [formControlName]=\"inputConfig.id\"\n ></lib-document-picker-reactive-input>\n\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\n <mat-hint class=\"inputHint\">\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\n </mat-hint>\n }\n\n @if (!!errorMessage()) {\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\n }\n\n @if (inputConfig.prefixIcon) {\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\n }\n\n @if (inputConfig.canReload?.canReload) {\n <button\n mat-icon-button\n matTooltip=\"Click to refresh this field.\"\n class=\"input-sync-button\"\n (click)=\"inputConfig.canReload.emit()\"\n matSuffix\n >\n <mat-icon>sync</mat-icon>\n </button>\n }\n\n @if (inputConfig.suffixIcon) {\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\n }\n\n @if (inputConfig.prefixText) {\n <span class=\"affix-text\" matPrefix>{{ inputConfig.prefixText }}</span>\n }\n @if (inputConfig.suffixText) {\n <span class=\"affix-text affix-text--suffix\" matSuffix>{{ inputConfig.suffixText }}</span>\n }\n </mat-form-field>\n }\n</form>\n", styles: ["mat-form-field{width:100%}mat-form-field .input-sync-button{display:none;margin-right:.25rem}mat-form-field:hover .input-sync-button,mat-form-field:focus-within .input-sync-button{display:inline-block}.input-sync-button mat-icon{color:var(--lib-forms-primary, var(--mat-sys-primary))}.affix-text{top:0;color:var(--lib-forms-on-surface-variant, var(--mat-sys-on-surface-variant))}.affix-text--suffix{padding-left:.375rem}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2$1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2$1.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2$1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: DocumentPickerReactiveInputComponent, selector: "lib-document-picker-reactive-input", inputs: ["inputConfig", "emptyMessage"] }, { kind: "component", type: TFormInputStatusComponent, selector: "lib-t-form-input-status", inputs: ["inputConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1244
+ }
1245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: DocumentPickerComponent, decorators: [{
1246
+ type: Component,
1247
+ args: [{ selector: 'lib-document-picker', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [
1248
+ ReactiveFormsModule,
1249
+ MatFormFieldModule,
1250
+ MatIconModule,
1251
+ MatButtonModule,
1252
+ MatTooltipModule,
1253
+ DocumentPickerReactiveInputComponent,
1254
+ TFormInputStatusComponent,
1255
+ ], template: "<form [formGroup]=\"formGroup()\">\n @if (inputConfig(); as inputConfig) {\n <mat-form-field [appearance]=\"inputConfig.appearance || 'fill'\" subscriptSizing=\"dynamic\">\n <mat-label>\n {{ inputConfig.label }}\n <lib-t-form-input-status [inputConfig]=\"inputConfig\"></lib-t-form-input-status>\n </mat-label>\n\n <lib-document-picker-reactive-input\n [disabled]=\"!!inputConfig.disabled\"\n [inputConfig]=\"inputConfig\"\n [required]=\"inputConfig.required\"\n [formControlName]=\"inputConfig.id\"\n ></lib-document-picker-reactive-input>\n\n @if (inputConfig.hintLabel || inputConfig.temporaryHint) {\n <mat-hint class=\"inputHint\">\n {{ inputConfig.temporaryHint || inputConfig.hintLabel }}\n </mat-hint>\n }\n\n @if (!!errorMessage()) {\n <mat-error class=\"oneLineTextEllipsis\" matTooltipClass=\"errorToolTip\">{{ errorMessage() }}</mat-error>\n }\n\n @if (inputConfig.prefixIcon) {\n <mat-icon matPrefix>{{ inputConfig.prefixIcon }}</mat-icon>\n }\n\n @if (inputConfig.canReload?.canReload) {\n <button\n mat-icon-button\n matTooltip=\"Click to refresh this field.\"\n class=\"input-sync-button\"\n (click)=\"inputConfig.canReload.emit()\"\n matSuffix\n >\n <mat-icon>sync</mat-icon>\n </button>\n }\n\n @if (inputConfig.suffixIcon) {\n <mat-icon matSuffix>{{ inputConfig.suffixIcon }}</mat-icon>\n }\n\n @if (inputConfig.prefixText) {\n <span class=\"affix-text\" matPrefix>{{ inputConfig.prefixText }}</span>\n }\n @if (inputConfig.suffixText) {\n <span class=\"affix-text affix-text--suffix\" matSuffix>{{ inputConfig.suffixText }}</span>\n }\n </mat-form-field>\n }\n</form>\n", styles: ["mat-form-field{width:100%}mat-form-field .input-sync-button{display:none;margin-right:.25rem}mat-form-field:hover .input-sync-button,mat-form-field:focus-within .input-sync-button{display:inline-block}.input-sync-button mat-icon{color:var(--lib-forms-primary, var(--mat-sys-primary))}.affix-text{top:0;color:var(--lib-forms-on-surface-variant, var(--mat-sys-on-surface-variant))}.affix-text--suffix{padding-left:.375rem}\n"] }]
1256
+ }], propDecorators: { inputConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputConfig", required: true }] }], formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], editorMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorMode", required: false }] }], formBuilderFunctions: [{ type: i0.Input, args: [{ isSignal: true, alias: "formBuilderFunctions", required: false }] }] } });
1257
+
1258
+ export { DocumentPickerComponent };
1259
+ //# sourceMappingURL=ngx-t-forms-document-picker.component-BSG7k3IN.mjs.map