ngx-t-forms 3.0.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (254) hide show
  1. package/fesm2022/ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs +411 -0
  2. package/fesm2022/ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs.map +1 -0
  3. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs} +2 -2
  4. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-DFApar1W.mjs.map → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs.map} +1 -1
  5. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs} +3 -3
  6. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-ChCeve-w.mjs.map → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs.map} +1 -1
  7. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs +643 -0
  8. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs.map +1 -0
  9. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs → ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs} +4 -4
  10. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs.map +1 -0
  11. package/fesm2022/ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs +513 -0
  12. package/fesm2022/ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs.map +1 -0
  13. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs} +4 -4
  14. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs.map +1 -0
  15. package/fesm2022/ngx-t-forms-data-source-picker.component-CN51SdCK.mjs +261 -0
  16. package/fesm2022/ngx-t-forms-data-source-picker.component-CN51SdCK.mjs.map +1 -0
  17. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs} +2 -2
  18. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-NM2cFs3P.mjs.map → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs.map} +1 -1
  19. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs +166 -0
  20. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs.map +1 -0
  21. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs +373 -0
  22. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs.map +1 -0
  23. package/fesm2022/ngx-t-forms-document-picker.component-9clYsOcl.mjs +1259 -0
  24. package/fesm2022/ngx-t-forms-document-picker.component-9clYsOcl.mjs.map +1 -0
  25. package/fesm2022/ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs +417 -0
  26. package/fesm2022/ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs.map +1 -0
  27. package/fesm2022/{ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs → ngx-t-forms-editor-js-input.component-02HnmInT.mjs} +25 -11
  28. package/fesm2022/ngx-t-forms-editor-js-input.component-02HnmInT.mjs.map +1 -0
  29. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs} +2 -2
  30. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-Km-qgANx.mjs.map → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs.map} +1 -1
  31. package/fesm2022/ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs +86 -0
  32. package/fesm2022/ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs.map +1 -0
  33. package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.mjs → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs} +2 -2
  34. package/fesm2022/{ngx-t-forms-form-json-view.component-r64GKVhI.mjs.map → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs.map} +1 -1
  35. package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs +179 -0
  36. package/fesm2022/ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs.map +1 -0
  37. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs} +4 -4
  38. package/fesm2022/{ngx-t-forms-form-section-stepper.component-B3DRJ--U.mjs.map → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs.map} +1 -1
  39. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs} +5 -5
  40. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-BYFynpTn.mjs.map → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs.map} +1 -1
  41. package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs → ngx-t-forms-geo-location.component-D-BhLdx6.mjs} +2 -2
  42. package/fesm2022/{ngx-t-forms-geo-location.component-D2fIbagr.mjs.map → ngx-t-forms-geo-location.component-D-BhLdx6.mjs.map} +1 -1
  43. package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs +159 -0
  44. package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs.map +1 -0
  45. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs} +2 -2
  46. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-BgnzErQt.mjs.map → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs.map} +1 -1
  47. package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs +2 -0
  48. package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs.map +1 -0
  49. package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.mjs → ngx-t-forms-input-custom.component-s1ryJQy4.mjs} +2 -2
  50. package/fesm2022/{ngx-t-forms-input-custom.component-Dcoze7U3.mjs.map → ngx-t-forms-input-custom.component-s1ryJQy4.mjs.map} +1 -1
  51. package/fesm2022/ngx-t-forms-input-editor.component-oIzCTmbx.mjs +190 -0
  52. package/fesm2022/ngx-t-forms-input-editor.component-oIzCTmbx.mjs.map +1 -0
  53. package/fesm2022/{ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs → ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs} +2 -3
  54. package/fesm2022/ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs.map +1 -0
  55. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs → ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs} +5 -5
  56. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs.map +1 -0
  57. package/fesm2022/{ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs → ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs} +3 -3
  58. package/fesm2022/ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs.map +1 -0
  59. package/fesm2022/{ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs → ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs} +3 -3
  60. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs.map +1 -0
  61. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs} +2 -2
  62. package/fesm2022/{ngx-t-forms-missing-form-configs.component-CEa8ZNKA.mjs.map → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs.map} +1 -1
  63. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs} +2 -2
  64. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-DklkxNgg.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs.map} +1 -1
  65. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs +447 -0
  66. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs.map +1 -0
  67. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs +905 -0
  68. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs.map +1 -0
  69. package/fesm2022/{ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs → ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs} +2738 -415
  70. package/fesm2022/ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs.map +1 -0
  71. package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs} +2 -2
  72. package/fesm2022/{ngx-t-forms-paginated-selection-table-DrXB22iY.mjs.map → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs.map} +1 -1
  73. package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs +85 -0
  74. package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs.map +1 -0
  75. package/fesm2022/ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs +748 -0
  76. package/fesm2022/ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs.map +1 -0
  77. package/fesm2022/{ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs → ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs} +4 -4
  78. package/fesm2022/ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs.map +1 -0
  79. package/fesm2022/ngx-t-forms-required-inputs.component-CK7NIhbq.mjs +272 -0
  80. package/fesm2022/ngx-t-forms-required-inputs.component-CK7NIhbq.mjs.map +1 -0
  81. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs +699 -0
  82. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs.map +1 -0
  83. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs +38 -0
  84. package/fesm2022/ngx-t-forms-search-field.component-mR4Kk12C.mjs.map +1 -0
  85. package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs → ngx-t-forms-section-report.component-DhSaf85h.mjs} +2 -2
  86. package/fesm2022/{ngx-t-forms-section-report.component-BYMcaRE5.mjs.map → ngx-t-forms-section-report.component-DhSaf85h.mjs.map} +1 -1
  87. package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs → ngx-t-forms-select-input-element.component-D5HFzh35.mjs} +2 -2
  88. package/fesm2022/{ngx-t-forms-select-input-element.component-Nsa3dpvV.mjs.map → ngx-t-forms-select-input-element.component-D5HFzh35.mjs.map} +1 -1
  89. package/fesm2022/ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs +169 -0
  90. package/fesm2022/ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs.map +1 -0
  91. package/fesm2022/{ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs → ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs} +3 -3
  92. package/fesm2022/ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs.map +1 -0
  93. package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs} +2 -2
  94. package/fesm2022/{ngx-t-forms-textarea-input-element.component-DPxUzkAu.mjs.map → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs.map} +1 -1
  95. package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs} +2 -2
  96. package/fesm2022/{ngx-t-forms-toggle-input-element.component-OZre5TJ7.mjs.map → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs.map} +1 -1
  97. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs +173 -0
  98. package/fesm2022/ngx-t-forms-token-transform-D_wsFbNc.mjs.map +1 -0
  99. package/fesm2022/ngx-t-forms-validators-config.component-0_Y6bvtE.mjs +574 -0
  100. package/fesm2022/ngx-t-forms-validators-config.component-0_Y6bvtE.mjs.map +1 -0
  101. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs} +3 -3
  102. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-CrDZg3Nl.mjs.map → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs.map} +1 -1
  103. package/fesm2022/ngx-t-forms.mjs +1 -1
  104. package/package.json +2 -2
  105. package/styles/_editor-mixins.scss +117 -117
  106. package/styles/_signature-pad.scss +26 -26
  107. package/styles/_tokens.scss +148 -148
  108. package/types/ngx-t-forms.d.ts +110 -6
  109. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs +0 -261
  110. package/fesm2022/ngx-t-forms-auto-complete-input-element.component-7g5cpVfB.mjs.map +0 -1
  111. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs +0 -225
  112. package/fesm2022/ngx-t-forms-basic-input-input-element.component-BhMw2vpl.mjs.map +0 -1
  113. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs +0 -1011
  114. package/fesm2022/ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs.map +0 -1
  115. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs +0 -643
  116. package/fesm2022/ngx-t-forms-calculated-field-rules.component-CJMwqoHL.mjs.map +0 -1
  117. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs +0 -136
  118. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-ALkkDotT.mjs.map +0 -1
  119. package/fesm2022/ngx-t-forms-chip-options-creator-editor.component-B54kOArR.mjs.map +0 -1
  120. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-CAZv0_uR.mjs.map +0 -1
  121. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs +0 -253
  122. package/fesm2022/ngx-t-forms-config-mscoa-additional-inputs.component-Dap7QkKD.mjs.map +0 -1
  123. package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs +0 -261
  124. package/fesm2022/ngx-t-forms-data-source-picker.component-8G28L1Cg.mjs.map +0 -1
  125. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs +0 -419
  126. package/fesm2022/ngx-t-forms-data-source-picker.component-CJ1C1Znp.mjs.map +0 -1
  127. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs +0 -231
  128. package/fesm2022/ngx-t-forms-date-picker-input-element.component-DjYq63Iv.mjs.map +0 -1
  129. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs +0 -156
  130. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-DhU_bhy3.mjs.map +0 -1
  131. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs +0 -333
  132. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-g0wIRj9b.mjs.map +0 -1
  133. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs +0 -373
  134. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-K-KFdCcS.mjs.map +0 -1
  135. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs +0 -543
  136. package/fesm2022/ngx-t-forms-document-list-label-config-editor.component-NuPXy_Ms.mjs.map +0 -1
  137. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs +0 -1259
  138. package/fesm2022/ngx-t-forms-document-picker.component-BSG7k3IN.mjs.map +0 -1
  139. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs +0 -1996
  140. package/fesm2022/ngx-t-forms-document-picker.component-ChGqXHcQ.mjs.map +0 -1
  141. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs +0 -581
  142. package/fesm2022/ngx-t-forms-editor-input-element.component-B8Pk-EVY.mjs.map +0 -1
  143. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs +0 -417
  144. package/fesm2022/ngx-t-forms-editor-input-element.component-Bb7w-vNw.mjs.map +0 -1
  145. package/fesm2022/ngx-t-forms-editor-js-input.component-DlsLiHi1.mjs.map +0 -1
  146. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs +0 -585
  147. package/fesm2022/ngx-t-forms-editor-js-input.component-XX6kU8DW.mjs.map +0 -1
  148. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs +0 -447
  149. package/fesm2022/ngx-t-forms-file-upload-input-element.component-RCmUClXv.mjs.map +0 -1
  150. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs +0 -163
  151. package/fesm2022/ngx-t-forms-form-input-selector.component-0jfD5C0G.mjs.map +0 -1
  152. package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs +0 -86
  153. package/fesm2022/ngx-t-forms-form-input-selector.component-D5KYWQ2R.mjs.map +0 -1
  154. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs +0 -28
  155. package/fesm2022/ngx-t-forms-form-json-view.component-z0nQxpqB.mjs.map +0 -1
  156. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs +0 -291
  157. package/fesm2022/ngx-t-forms-form-payload-projection.component-CkH7zmdJ.mjs.map +0 -1
  158. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs +0 -179
  159. package/fesm2022/ngx-t-forms-form-payload-projection.component-D46W1-4z.mjs.map +0 -1
  160. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs +0 -936
  161. package/fesm2022/ngx-t-forms-form-section-stepper.component-UUTHYU-A.mjs.map +0 -1
  162. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs +0 -816
  163. package/fesm2022/ngx-t-forms-forms-builder-menu.component-DTIAOxGV.mjs.map +0 -1
  164. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs +0 -329
  165. package/fesm2022/ngx-t-forms-geo-location.component-DW2b5Zli.mjs.map +0 -1
  166. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs +0 -360
  167. package/fesm2022/ngx-t-forms-image-capture-input-element.component-Us_NAQSl.mjs.map +0 -1
  168. package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs +0 -2
  169. package/fesm2022/ngx-t-forms-index-6YIhS6cm.mjs.map +0 -1
  170. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs +0 -2
  171. package/fesm2022/ngx-t-forms-index-BPNBX_ve.mjs.map +0 -1
  172. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs +0 -128
  173. package/fesm2022/ngx-t-forms-input-custom.component-DQOqy047.mjs.map +0 -1
  174. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs +0 -512
  175. package/fesm2022/ngx-t-forms-input-editor.component-3fRj5swF.mjs.map +0 -1
  176. package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs +0 -190
  177. package/fesm2022/ngx-t-forms-input-editor.component-B6UKwV4i.mjs.map +0 -1
  178. package/fesm2022/ngx-t-forms-map-mat-options-keys-BsfvYiEU.mjs.map +0 -1
  179. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs +0 -132
  180. package/fesm2022/ngx-t-forms-map-mat-options-keys-eSc99wdA.mjs.map +0 -1
  181. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs +0 -268
  182. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CN17K5q6.mjs.map +0 -1
  183. package/fesm2022/ngx-t-forms-mat-chip-list-editor.component-CYtTBtyf.mjs.map +0 -1
  184. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs +0 -241
  185. package/fesm2022/ngx-t-forms-mat-slider-editor.component-B-_yUJ5N.mjs.map +0 -1
  186. package/fesm2022/ngx-t-forms-mat-slider-editor.component-CTSBrM-j.mjs.map +0 -1
  187. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-CcYiwx-8.mjs.map +0 -1
  188. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs +0 -180
  189. package/fesm2022/ngx-t-forms-mat-slider-toggle-editor.component-D0F1d1mO.mjs.map +0 -1
  190. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs +0 -114
  191. package/fesm2022/ngx-t-forms-missing-form-configs.component-AaDfeALs.mjs.map +0 -1
  192. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs +0 -69
  193. package/fesm2022/ngx-t-forms-mscoa-chart-toolbar.component-D0igUV3W.mjs.map +0 -1
  194. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs +0 -200
  195. package/fesm2022/ngx-t-forms-mscoa-error-display.component-rzl-fMmd.mjs.map +0 -1
  196. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs +0 -447
  197. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-2SspNWtF.mjs.map +0 -1
  198. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs +0 -850
  199. package/fesm2022/ngx-t-forms-mscoa-segment-config.component-CSGf4XeN.mjs.map +0 -1
  200. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs +0 -107
  201. package/fesm2022/ngx-t-forms-mscoa-temporary-hint.component-CBuGHwnU.mjs.map +0 -1
  202. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs +0 -1665
  203. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-CbQdnVgw.mjs.map +0 -1
  204. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs +0 -905
  205. package/fesm2022/ngx-t-forms-multiple-input-input-element.component-dmRIi9ph.mjs.map +0 -1
  206. package/fesm2022/ngx-t-forms-ngx-t-forms-0gzvHzEK.mjs.map +0 -1
  207. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs +0 -28237
  208. package/fesm2022/ngx-t-forms-ngx-t-forms-BefvSS-p.mjs.map +0 -1
  209. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs +0 -1024
  210. package/fesm2022/ngx-t-forms-paginated-selection-table-BGNxI2yq.mjs.map +0 -1
  211. package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs +0 -203
  212. package/fesm2022/ngx-t-forms-payload-template-editor.component-DL4ZTTsH.mjs.map +0 -1
  213. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs +0 -234
  214. package/fesm2022/ngx-t-forms-payload-template-editor.component-o3qwpvYu.mjs.map +0 -1
  215. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs +0 -1126
  216. package/fesm2022/ngx-t-forms-pipeline-generator.component-BqtdKcN2.mjs.map +0 -1
  217. package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs +0 -748
  218. package/fesm2022/ngx-t-forms-pipeline-generator.component-DcZPv8-N.mjs.map +0 -1
  219. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs +0 -639
  220. package/fesm2022/ngx-t-forms-record-list-manager.component-BcANl5Bq.mjs.map +0 -1
  221. package/fesm2022/ngx-t-forms-record-list-manager.component-l-2uDVmi.mjs.map +0 -1
  222. package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs +0 -272
  223. package/fesm2022/ngx-t-forms-required-inputs.component-BMmNxeE-.mjs.map +0 -1
  224. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs +0 -451
  225. package/fesm2022/ngx-t-forms-required-inputs.component-Dr0P1gin.mjs.map +0 -1
  226. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs +0 -625
  227. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-BSv_KQIU.mjs.map +0 -1
  228. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs +0 -444
  229. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-C3sNmq_H.mjs.map +0 -1
  230. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs +0 -38
  231. package/fesm2022/ngx-t-forms-search-field.component-B2ZO7lqO.mjs.map +0 -1
  232. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs +0 -72
  233. package/fesm2022/ngx-t-forms-search-field.component-BGdAmzJV.mjs.map +0 -1
  234. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs +0 -248
  235. package/fesm2022/ngx-t-forms-section-report.component-yGAjX7Gb.mjs.map +0 -1
  236. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs +0 -408
  237. package/fesm2022/ngx-t-forms-select-input-element.component-BqtJi4ek.mjs.map +0 -1
  238. package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs +0 -169
  239. package/fesm2022/ngx-t-forms-selection-options-editor.component-BuXVzo7Z.mjs.map +0 -1
  240. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs +0 -275
  241. package/fesm2022/ngx-t-forms-selection-options-editor.component-_glw1cqH.mjs.map +0 -1
  242. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs +0 -366
  243. package/fesm2022/ngx-t-forms-t-workflow-picker.component-CLgN3YM4.mjs.map +0 -1
  244. package/fesm2022/ngx-t-forms-t-workflow-picker.component-DAwP-cWK.mjs.map +0 -1
  245. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs +0 -233
  246. package/fesm2022/ngx-t-forms-textarea-input-element.component-SCEBLqJd.mjs.map +0 -1
  247. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs +0 -305
  248. package/fesm2022/ngx-t-forms-toggle-input-element.component-CoyTMRMa.mjs.map +0 -1
  249. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs +0 -1105
  250. package/fesm2022/ngx-t-forms-validators-config.component-B1Lzs7o2.mjs.map +0 -1
  251. package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs +0 -574
  252. package/fesm2022/ngx-t-forms-validators-config.component-CoGSFor3.mjs.map +0 -1
  253. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs +0 -2923
  254. package/fesm2022/ngx-t-forms-workflow-adjudication.component-Bz07jv-N.mjs.map +0 -1
@@ -1,1011 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, inject, ElementRef, PLATFORM_ID, effect, ViewEncapsulation, ChangeDetectionStrategy, Component, output, signal, viewChild, Input } from '@angular/core';
3
- import { isPlatformBrowser, CommonModule } from '@angular/common';
4
- import * as i1 from '@angular/forms';
5
- import { NgControl, FormsModule } from '@angular/forms';
6
- import * as i8 from '@angular/material/select';
7
- import { MatSelectModule } from '@angular/material/select';
8
- import * as i2$1 from '@angular/material/form-field';
9
- import { MatFormFieldModule, MatFormFieldControl } from '@angular/material/form-field';
10
- import * as i2$2 from '@angular/material/input';
11
- import { MatInputModule } from '@angular/material/input';
12
- import * as i3 from '@angular/material/icon';
13
- import { MatIconModule } from '@angular/material/icon';
14
- import * as i3$1 from '@angular/material/card';
15
- import { MatCardModule } from '@angular/material/card';
16
- import * as i2$3 from '@angular/material/button';
17
- import { MatButtonModule } from '@angular/material/button';
18
- import * as i4 from '@angular/material/chips';
19
- import { MatChipsModule } from '@angular/material/chips';
20
- import * as i2 from '@angular/cdk/overlay';
21
- import { OverlayModule } from '@angular/cdk/overlay';
22
- import { Subject } from 'rxjs';
23
- import { v4 } from 'uuid';
24
- import { CalculationFunctions } from 'ngx-t-forms-types';
25
- import { _ as _isEqual } from './ngx-t-forms-ngx-t-forms-BefvSS-p.mjs';
26
- import katex from 'katex';
27
- import { parse } from 'mathjs';
28
-
29
- /**
30
- * Parses a strictly-infix expression (the format `math.evaluate` consumes) and,
31
- * when it is syntactically valid, returns its LaTeX form for KaTeX to render.
32
- *
33
- * The expression is never rewritten — what the user types is what gets stored
34
- * and later evaluated by mathjs. This only *reads* it to derive a preview and a
35
- * friendly validity message; an empty expression is treated as "not yet valid"
36
- * rather than an error.
37
- */
38
- function parseInfixFormula(expression) {
39
- const trimmed = expression.trim();
40
- if (!trimmed) {
41
- return { tex: null, error: null };
42
- }
43
- try {
44
- return { tex: parse(trimmed).toTex(), error: null };
45
- }
46
- catch (error) {
47
- return { tex: null, error: friendlyMessage(error) };
48
- }
49
- }
50
- /** Maps mathjs' technical parser errors onto guidance a non-technical user can act on. */
51
- function friendlyMessage(error) {
52
- const raw = error instanceof Error ? error.message : '';
53
- if (/end of expression/i.test(raw)) {
54
- return 'The equation looks unfinished — add the missing number or variable.';
55
- }
56
- if (/parenthesis|bracket/i.test(raw)) {
57
- return 'Check that every opening bracket "(" has a matching closing bracket ")".';
58
- }
59
- if (/value expected/i.test(raw)) {
60
- return 'An operator (like + or ×) is missing a number or variable next to it.';
61
- }
62
- if (/unexpected/i.test(raw)) {
63
- return 'There is an unexpected symbol in the equation.';
64
- }
65
- return 'This equation is not valid yet.';
66
- }
67
-
68
- /**
69
- * Read-only "natural maths" preview of a strictly-infix expression.
70
- *
71
- * It parses the expression with mathjs and renders the result as MathML via
72
- * KaTeX (no stylesheet required — the browser draws the glyphs natively). The
73
- * expression itself is never modified, so what is previewed is exactly what
74
- * `math.evaluate` will later consume.
75
- *
76
- * Internal to `t-dynamic-data-edit` — not part of the library's public surface.
77
- */
78
- class MathPreviewComponent {
79
- #host;
80
- #isBrowser;
81
- constructor() {
82
- /** Strictly-infix expression to render (mathjs syntax, e.g. `((a+2)/(b-1))*2`). */
83
- this.expression = input('', ...(ngDevMode ? [{ debugName: "expression" }] : /* istanbul ignore next */ []));
84
- /** Text shown when there is nothing to preview. */
85
- this.placeholder = input('Nothing to preview yet', ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
86
- /** `'empty'` when no expression is set, otherwise `'rendered'`. */
87
- this.state = computed(() => this.expression().trim() ? 'rendered' : 'empty', ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
88
- this.#host = inject(ElementRef);
89
- this.#isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
90
- effect(() => {
91
- const expression = this.expression().trim();
92
- const placeholder = this.placeholder();
93
- const element = this.#host.nativeElement;
94
- // On the server KaTeX has no DOM to render into — fall back to plain text.
95
- if (!this.#isBrowser) {
96
- element.textContent = expression || placeholder;
97
- return;
98
- }
99
- if (!expression) {
100
- element.textContent = placeholder;
101
- return;
102
- }
103
- const { tex } = parseInfixFormula(expression);
104
- if (tex == null) {
105
- // Mid-edit / not yet valid: show the raw infix until it parses cleanly.
106
- element.textContent = expression;
107
- return;
108
- }
109
- katex.render(tex, element, {
110
- output: 'mathml',
111
- throwOnError: false,
112
- displayMode: true,
113
- });
114
- });
115
- }
116
- static { this.ɵfac = function MathPreviewComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MathPreviewComponent)(); }; }
117
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MathPreviewComponent, selectors: [["lib-math-preview"]], hostAttrs: [1, "lib-math-preview"], hostVars: 1, hostBindings: function MathPreviewComponent_HostBindings(rf, ctx) { if (rf & 2) {
118
- i0.ɵɵattribute("data-state", ctx.state());
119
- } }, inputs: { expression: [1, "expression"], placeholder: [1, "placeholder"] }, decls: 0, vars: 0, template: function MathPreviewComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:3rem;padding:.5rem .75rem;overflow-x:auto;color:var(--lib-forms-on-surface);font-size:1.375rem;line-height:1.4;text-align:center}[data-state=empty][_nghost-%COMP%]{color:var(--lib-forms-on-surface-variant);font-size:.9375rem;font-style:italic}[_nghost-%COMP%] math{max-width:100%}"], changeDetection: 0 }); }
120
- }
121
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MathPreviewComponent, [{
122
- type: Component,
123
- args: [{ selector: 'lib-math-preview', template: '', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
124
- 'class': 'lib-math-preview',
125
- '[attr.data-state]': 'state()',
126
- }, styles: [":host{display:flex;align-items:center;justify-content:center;min-height:3rem;padding:.5rem .75rem;overflow-x:auto;color:var(--lib-forms-on-surface);font-size:1.375rem;line-height:1.4;text-align:center}:host([data-state=empty]){color:var(--lib-forms-on-surface-variant);font-size:.9375rem;font-style:italic}:host ::ng-deep math{max-width:100%}\n"] }]
127
- }], () => [], { expression: [{ type: i0.Input, args: [{ isSignal: true, alias: "expression", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }] }); })();
128
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MathPreviewComponent, { className: "MathPreviewComponent", filePath: "lib/components/t-dynamic-data-edit/elements/calculated-field-rules/math-preview.component.ts", lineNumber: 38 }); })();
129
-
130
- const _c0 = ["formulaInput"];
131
- const _c1 = () => [];
132
- const _forTrack0 = ($index, $item) => $item.token;
133
- const _forTrack1 = ($index, $item) => $item.id;
134
- const _forTrack2 = ($index, $item) => $item.value;
135
- function CalculatedFieldRulesComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
136
- i0.ɵɵelementStart(0, "div", 4)(1, "mat-icon", 10);
137
- i0.ɵɵtext(2, "info");
138
- i0.ɵɵelementEnd();
139
- i0.ɵɵelementStart(3, "span");
140
- i0.ɵɵtext(4, "Save the input first to enable calculated field configurations");
141
- i0.ɵɵelementEnd()();
142
- } }
143
- function CalculatedFieldRulesComponent_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
144
- i0.ɵɵelementStart(0, "div", 8)(1, "mat-icon", 11);
145
- i0.ɵɵtext(2, "tune");
146
- i0.ɵɵelementEnd();
147
- i0.ɵɵelementStart(3, "span");
148
- i0.ɵɵtext(4);
149
- i0.ɵɵelementEnd()();
150
- } if (rf & 2) {
151
- const ctx_r1 = i0.ɵɵnextContext(2);
152
- i0.ɵɵadvance(4);
153
- i0.ɵɵtextInterpolate2("Shown to ", ctx_r1.value == null ? null : ctx_r1.value.decimalPlaces, " decimal place(s) \u00B7 ", (ctx_r1.value == null ? null : ctx_r1.value.roundingMode) ? ctx_r1.roundingLabel(ctx_r1.value == null ? null : ctx_r1.value.roundingMode) : "nearest");
154
- } }
155
- function CalculatedFieldRulesComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
156
- const _r1 = i0.ɵɵgetCurrentView();
157
- i0.ɵɵelementStart(0, "div", 1);
158
- i0.ɵɵconditionalCreate(1, CalculatedFieldRulesComponent_Conditional_0_Conditional_1_Template, 5, 0, "div", 4);
159
- i0.ɵɵelementStart(2, "div", 5)(3, "span", 6);
160
- i0.ɵɵtext(4, "Calculation");
161
- i0.ɵɵelementEnd();
162
- i0.ɵɵelement(5, "lib-math-preview", 7);
163
- i0.ɵɵconditionalCreate(6, CalculatedFieldRulesComponent_Conditional_0_Conditional_6_Template, 5, 2, "div", 8);
164
- i0.ɵɵelementEnd();
165
- i0.ɵɵelementStart(7, "button", 9);
166
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_0_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.startEdit()); });
167
- i0.ɵɵelementStart(8, "mat-icon");
168
- i0.ɵɵtext(9, "edit");
169
- i0.ɵɵelementEnd();
170
- i0.ɵɵtext(10);
171
- i0.ɵɵelementEnd()();
172
- } if (rf & 2) {
173
- let tmp_1_0;
174
- const ctx_r1 = i0.ɵɵnextContext();
175
- i0.ɵɵadvance();
176
- i0.ɵɵconditional(!!ctx_r1.value && !((tmp_1_0 = ctx_r1.mapToData()) == null ? null : tmp_1_0.id) && !ctx_r1.tableMode() ? 1 : -1);
177
- i0.ɵɵadvance(4);
178
- i0.ɵɵproperty("expression", (ctx_r1.value == null ? null : ctx_r1.value.formula) || "");
179
- i0.ɵɵadvance();
180
- i0.ɵɵconditional((ctx_r1.value == null ? null : ctx_r1.value.decimalPlaces) ? 6 : -1);
181
- i0.ɵɵadvance();
182
- i0.ɵɵproperty("disabled", ctx_r1.disabled);
183
- i0.ɵɵadvance(3);
184
- i0.ɵɵtextInterpolate1(" ", !!(ctx_r1.value == null ? null : ctx_r1.value.formula) ? "Edit calculation" : "Set up calculation", " ");
185
- } }
186
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_3_Template(rf, ctx) { if (rf & 1) {
187
- i0.ɵɵelementStart(0, "div", 41);
188
- i0.ɵɵtext(1, "No matching number fields");
189
- i0.ɵɵelementEnd();
190
- } }
191
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_4_For_1_Template(rf, ctx) { if (rf & 1) {
192
- const _r4 = i0.ɵɵgetCurrentView();
193
- i0.ɵɵelementStart(0, "button", 43);
194
- i0.ɵɵlistener("mousedown", function CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_4_For_1_Template_button_mousedown_0_listener($event) { return $event.preventDefault(); })("click", function CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_4_For_1_Template_button_click_0_listener() { const item_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.selectField(item_r5)); });
195
- i0.ɵɵelementStart(1, "mat-icon", 44);
196
- i0.ɵɵtext(2);
197
- i0.ɵɵelementEnd();
198
- i0.ɵɵelementStart(3, "span", 45);
199
- i0.ɵɵtext(4);
200
- i0.ɵɵelementEnd();
201
- i0.ɵɵelementStart(5, "span", 46);
202
- i0.ɵɵtext(6);
203
- i0.ɵɵelementEnd()();
204
- } if (rf & 2) {
205
- const item_r5 = ctx.$implicit;
206
- const ɵ$index_95_r6 = ctx.$index;
207
- const ctx_r1 = i0.ɵɵnextContext(4);
208
- i0.ɵɵclassProp("cfr-picker__item--active", ɵ$index_95_r6 === ctx_r1.pickerActiveIndex());
209
- i0.ɵɵattribute("aria-selected", ɵ$index_95_r6 === ctx_r1.pickerActiveIndex());
210
- i0.ɵɵadvance(2);
211
- i0.ɵɵtextInterpolate(item_r5.multipleInputInEditId ? "format_list_numbered" : "tag");
212
- i0.ɵɵadvance(2);
213
- i0.ɵɵtextInterpolate(item_r5.label);
214
- i0.ɵɵadvance(2);
215
- i0.ɵɵtextInterpolate(item_r5.formControlName);
216
- } }
217
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_4_Template(rf, ctx) { if (rf & 1) {
218
- i0.ɵɵrepeaterCreate(0, CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_4_For_1_Template, 7, 6, "button", 42, _forTrack1);
219
- } if (rf & 2) {
220
- const ctx_r1 = i0.ɵɵnextContext(3);
221
- i0.ɵɵrepeater(ctx_r1.pickerResults());
222
- } }
223
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Template(rf, ctx) { if (rf & 1) {
224
- i0.ɵɵelementStart(0, "div", 24)(1, "div", 40);
225
- i0.ɵɵtext(2, "Insert a field");
226
- i0.ɵɵelementEnd();
227
- i0.ɵɵconditionalCreate(3, CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_3_Template, 2, 0, "div", 41)(4, CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Conditional_4_Template, 2, 0);
228
- i0.ɵɵelementEnd();
229
- } if (rf & 2) {
230
- const ctx_r1 = i0.ɵɵnextContext(2);
231
- i0.ɵɵadvance(3);
232
- i0.ɵɵconditional(ctx_r1.pickerResults().length === 0 ? 3 : 4);
233
- } }
234
- function CalculatedFieldRulesComponent_Conditional_1_For_33_Template(rf, ctx) { if (rf & 1) {
235
- const _r7 = i0.ɵɵgetCurrentView();
236
- i0.ɵɵelementStart(0, "button", 47);
237
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_For_33_Template_button_click_0_listener() { const key_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.insertToken(key_r8.token, key_r8.caretBack)); });
238
- i0.ɵɵtext(1);
239
- i0.ɵɵelementEnd();
240
- } if (rf & 2) {
241
- const key_r8 = ctx.$implicit;
242
- i0.ɵɵattribute("aria-label", key_r8.aria);
243
- i0.ɵɵadvance();
244
- i0.ɵɵtextInterpolate1(" ", key_r8.label, " ");
245
- } }
246
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_34_For_5_Template(rf, ctx) { if (rf & 1) {
247
- i0.ɵɵelementStart(0, "mat-option", 49);
248
- i0.ɵɵtext(1);
249
- i0.ɵɵelementEnd();
250
- } if (rf & 2) {
251
- const input_r10 = ctx.$implicit;
252
- const ctx_r1 = i0.ɵɵnextContext(3);
253
- i0.ɵɵproperty("disabled", ctx_r1.checkIfInputCanBeLinkedToCalVariable(ctx_r1.mapToData(), input_r10) || input_r10.element !== "select")("value", input_r10.formControlName);
254
- i0.ɵɵadvance();
255
- i0.ɵɵtextInterpolate1(" ", input_r10.label, " ");
256
- } }
257
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_34_Template(rf, ctx) { if (rf & 1) {
258
- const _r9 = i0.ɵɵgetCurrentView();
259
- i0.ɵɵelementStart(0, "mat-form-field", 22)(1, "mat-label");
260
- i0.ɵɵtext(2, "Equation source");
261
- i0.ɵɵelementEnd();
262
- i0.ɵɵelementStart(3, "mat-select", 48);
263
- i0.ɵɵlistener("selectionChange", function CalculatedFieldRulesComponent_Conditional_1_Conditional_34_Template_mat_select_selectionChange_3_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.linkFormulaSource($event)); });
264
- i0.ɵɵrepeaterCreate(4, CalculatedFieldRulesComponent_Conditional_1_Conditional_34_For_5_Template, 2, 3, "mat-option", 49, _forTrack1);
265
- i0.ɵɵelementEnd();
266
- i0.ɵɵelementStart(6, "mat-hint");
267
- i0.ɵɵtext(7, "Pull the equation from another input's value");
268
- i0.ɵɵelementEnd()();
269
- } if (rf & 2) {
270
- const ctx_r1 = i0.ɵɵnextContext(2);
271
- i0.ɵɵproperty("subscriptSizing", "dynamic")("floatLabel", "always");
272
- i0.ɵɵadvance(3);
273
- i0.ɵɵproperty("value", ctx_r1.tempValue().formControlWithFormula);
274
- i0.ɵɵadvance();
275
- i0.ɵɵrepeater(ctx_r1.formInputs());
276
- } }
277
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_41_Template(rf, ctx) { if (rf & 1) {
278
- i0.ɵɵelementStart(0, "p", 30);
279
- i0.ɵɵtext(1, " Type ");
280
- i0.ɵɵelementStart(2, "strong");
281
- i0.ɵɵtext(3, "$");
282
- i0.ɵɵelementEnd();
283
- i0.ɵɵtext(4, " in the equation above to add a form field \u2014 each becomes a short letter you can use in the equation. ");
284
- i0.ɵɵelementEnd();
285
- } }
286
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Conditional_10_For_4_Template(rf, ctx) { if (rf & 1) {
287
- const _r13 = i0.ɵɵgetCurrentView();
288
- i0.ɵɵelementStart(0, "button", 59);
289
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Conditional_10_For_4_Template_button_click_0_listener() { const func_r14 = i0.ɵɵrestoreView(_r13).$implicit; const variable_r12 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.setVariableFunction(variable_r12.id, func_r14)); });
290
- i0.ɵɵtext(1);
291
- i0.ɵɵelementEnd();
292
- } if (rf & 2) {
293
- const func_r14 = ctx.$implicit;
294
- const variable_r12 = i0.ɵɵnextContext(2).$implicit;
295
- i0.ɵɵclassProp("cfr-legend__fn--active", variable_r12.function === func_r14);
296
- i0.ɵɵadvance();
297
- i0.ɵɵtextInterpolate1(" ", func_r14, " ");
298
- } }
299
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
300
- i0.ɵɵelementStart(0, "div", 56)(1, "span", 57);
301
- i0.ɵɵtext(2, "\u0192");
302
- i0.ɵɵelementEnd();
303
- i0.ɵɵrepeaterCreate(3, CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Conditional_10_For_4_Template, 2, 3, "button", 58, i0.ɵɵrepeaterTrackByIdentity);
304
- i0.ɵɵelementEnd();
305
- } if (rf & 2) {
306
- const ctx_r1 = i0.ɵɵnextContext(4);
307
- i0.ɵɵadvance(3);
308
- i0.ɵɵrepeater(ctx_r1.allCalculationFunction());
309
- } }
310
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Template(rf, ctx) { if (rf & 1) {
311
- const _r11 = i0.ɵɵgetCurrentView();
312
- i0.ɵɵelementStart(0, "li", 50)(1, "div", 51)(2, "input", 52);
313
- i0.ɵɵlistener("ngModelChange", function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Template_input_ngModelChange_2_listener($event) { const variable_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.setVariableShortName(variable_r12.id, $event)); });
314
- i0.ɵɵelementEnd();
315
- i0.ɵɵelementStart(3, "mat-icon", 53);
316
- i0.ɵɵtext(4, "arrow_right_alt");
317
- i0.ɵɵelementEnd();
318
- i0.ɵɵelementStart(5, "button", 54);
319
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Template_button_click_5_listener() { const variable_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.appendVariableToFormula(variable_r12.variable)); });
320
- i0.ɵɵtext(6);
321
- i0.ɵɵelementEnd();
322
- i0.ɵɵelementStart(7, "button", 55);
323
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Template_button_click_7_listener() { const variable_r12 = i0.ɵɵrestoreView(_r11).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.removeVariable(variable_r12.id)); });
324
- i0.ɵɵelementStart(8, "mat-icon");
325
- i0.ɵɵtext(9, "close");
326
- i0.ɵɵelementEnd()()();
327
- i0.ɵɵconditionalCreate(10, CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Conditional_10_Template, 5, 0, "div", 56);
328
- i0.ɵɵelementEnd();
329
- } if (rf & 2) {
330
- const variable_r12 = ctx.$implicit;
331
- i0.ɵɵadvance(2);
332
- i0.ɵɵproperty("ngModel", variable_r12.variable);
333
- i0.ɵɵadvance(3);
334
- i0.ɵɵattribute("aria-label", "Insert " + variable_r12.label + " into the equation");
335
- i0.ɵɵadvance();
336
- i0.ɵɵtextInterpolate1(" ", variable_r12.label, " ");
337
- i0.ɵɵadvance();
338
- i0.ɵɵattribute("aria-label", "Remove " + variable_r12.variable);
339
- i0.ɵɵadvance(3);
340
- i0.ɵɵconditional(variable_r12.parentInputId ? 10 : -1);
341
- } }
342
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_42_Template(rf, ctx) { if (rf & 1) {
343
- i0.ɵɵelementStart(0, "ul", 31);
344
- i0.ɵɵrepeaterCreate(1, CalculatedFieldRulesComponent_Conditional_1_Conditional_42_For_2_Template, 11, 5, "li", 50, _forTrack1);
345
- i0.ɵɵelementEnd();
346
- } if (rf & 2) {
347
- const ctx_r1 = i0.ɵɵnextContext(2);
348
- i0.ɵɵadvance();
349
- i0.ɵɵrepeater(ctx_r1.tempValue().variables || i0.ɵɵpureFunction0(0, _c1));
350
- } }
351
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_54_For_5_Template(rf, ctx) { if (rf & 1) {
352
- const _r15 = i0.ɵɵgetCurrentView();
353
- i0.ɵɵelementStart(0, "mat-chip-option", 62);
354
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_Conditional_54_For_5_Template_mat_chip_option_click_0_listener() { const type_r16 = i0.ɵɵrestoreView(_r15).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.setRoundingMode(type_r16.value)); });
355
- i0.ɵɵtext(1);
356
- i0.ɵɵelementEnd();
357
- } if (rf & 2) {
358
- const type_r16 = ctx.$implicit;
359
- const ctx_r1 = i0.ɵɵnextContext(3);
360
- i0.ɵɵproperty("selected", ctx_r1.tempValue().roundingMode === type_r16.value);
361
- i0.ɵɵadvance();
362
- i0.ɵɵtextInterpolate1(" ", type_r16.label, " ");
363
- } }
364
- function CalculatedFieldRulesComponent_Conditional_1_Conditional_54_Template(rf, ctx) { if (rf & 1) {
365
- i0.ɵɵelementStart(0, "div", 36)(1, "label", 6);
366
- i0.ɵɵtext(2, "Rounding");
367
- i0.ɵɵelementEnd();
368
- i0.ɵɵelementStart(3, "mat-chip-listbox", 60);
369
- i0.ɵɵrepeaterCreate(4, CalculatedFieldRulesComponent_Conditional_1_Conditional_54_For_5_Template, 2, 2, "mat-chip-option", 61, _forTrack2);
370
- i0.ɵɵelementEnd()();
371
- } if (rf & 2) {
372
- const ctx_r1 = i0.ɵɵnextContext(2);
373
- i0.ɵɵadvance(4);
374
- i0.ɵɵrepeater(ctx_r1.roundingType);
375
- } }
376
- function CalculatedFieldRulesComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
377
- const _r3 = i0.ɵɵgetCurrentView();
378
- i0.ɵɵelementStart(0, "mat-card", 2)(1, "header", 12)(2, "h3", 13)(3, "mat-icon");
379
- i0.ɵɵtext(4, "functions");
380
- i0.ɵɵelementEnd();
381
- i0.ɵɵtext(5, " Build the calculation ");
382
- i0.ɵɵelementEnd();
383
- i0.ɵɵelementStart(6, "p", 14);
384
- i0.ɵɵtext(7, " Combine your form fields with operators to work out this value automatically. ");
385
- i0.ɵɵelementEnd()();
386
- i0.ɵɵelementStart(8, "div", 15)(9, "span", 6);
387
- i0.ɵɵtext(10, "Live preview");
388
- i0.ɵɵelementEnd();
389
- i0.ɵɵelement(11, "lib-math-preview", 16);
390
- i0.ɵɵelementStart(12, "p", 17)(13, "mat-icon", 18);
391
- i0.ɵɵtext(14);
392
- i0.ɵɵelementEnd();
393
- i0.ɵɵelementStart(15, "span");
394
- i0.ɵɵtext(16);
395
- i0.ɵɵelementEnd()()();
396
- i0.ɵɵelementStart(17, "section", 19)(18, "div", 20)(19, "div", 21)(20, "mat-form-field", 22)(21, "mat-label");
397
- i0.ɵɵtext(22, "Equation");
398
- i0.ɵɵelementEnd();
399
- i0.ɵɵelementStart(23, "textarea", 23, 0);
400
- i0.ɵɵlistener("ngModelChange", function CalculatedFieldRulesComponent_Conditional_1_Template_textarea_ngModelChange_23_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFormulaChange($event)); })("keyup", function CalculatedFieldRulesComponent_Conditional_1_Template_textarea_keyup_23_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFormulaCaret()); })("click", function CalculatedFieldRulesComponent_Conditional_1_Template_textarea_click_23_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFormulaCaret()); })("focus", function CalculatedFieldRulesComponent_Conditional_1_Template_textarea_focus_23_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFormulaCaret()); })("keydown", function CalculatedFieldRulesComponent_Conditional_1_Template_textarea_keydown_23_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFormulaKeydown($event)); })("blur", function CalculatedFieldRulesComponent_Conditional_1_Template_textarea_blur_23_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onFormulaBlur()); });
401
- i0.ɵɵelementEnd();
402
- i0.ɵɵelementStart(25, "mat-hint");
403
- i0.ɵɵtext(26, "Type ");
404
- i0.ɵɵelementStart(27, "strong");
405
- i0.ɵɵtext(28, "$");
406
- i0.ɵɵelementEnd();
407
- i0.ɵɵtext(29, " to add a form field, then join fields with the operator keys.");
408
- i0.ɵɵelementEnd()();
409
- i0.ɵɵconditionalCreate(30, CalculatedFieldRulesComponent_Conditional_1_Conditional_30_Template, 5, 1, "div", 24);
410
- i0.ɵɵelementEnd();
411
- i0.ɵɵelementStart(31, "div", 25);
412
- i0.ɵɵrepeaterCreate(32, CalculatedFieldRulesComponent_Conditional_1_For_33_Template, 2, 2, "button", 26, _forTrack0);
413
- i0.ɵɵelementEnd()();
414
- i0.ɵɵconditionalCreate(34, CalculatedFieldRulesComponent_Conditional_1_Conditional_34_Template, 8, 3, "mat-form-field", 22);
415
- i0.ɵɵelementStart(35, "div", 27)(36, "div", 28)(37, "span", 6);
416
- i0.ɵɵtext(38, "Fields in this calculation");
417
- i0.ɵɵelementEnd();
418
- i0.ɵɵelementStart(39, "span", 29);
419
- i0.ɵɵtext(40, "Rename a letter, or type $ above to add another");
420
- i0.ɵɵelementEnd()();
421
- i0.ɵɵconditionalCreate(41, CalculatedFieldRulesComponent_Conditional_1_Conditional_41_Template, 5, 0, "p", 30)(42, CalculatedFieldRulesComponent_Conditional_1_Conditional_42_Template, 3, 1, "ul", 31);
422
- i0.ɵɵelementEnd();
423
- i0.ɵɵelementStart(43, "div", 32)(44, "div", 28)(45, "span", 6);
424
- i0.ɵɵtext(46, "Result formatting");
425
- i0.ɵɵelementEnd();
426
- i0.ɵɵelementStart(47, "span", 29);
427
- i0.ɵɵtext(48, "Optional \u2014 how the answer is rounded");
428
- i0.ɵɵelementEnd()();
429
- i0.ɵɵelementStart(49, "div", 33)(50, "mat-form-field", 34)(51, "mat-label");
430
- i0.ɵɵtext(52, "Decimal places");
431
- i0.ɵɵelementEnd();
432
- i0.ɵɵelementStart(53, "input", 35);
433
- i0.ɵɵlistener("ngModelChange", function CalculatedFieldRulesComponent_Conditional_1_Template_input_ngModelChange_53_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.setDecimalPlaces($event)); });
434
- i0.ɵɵelementEnd()();
435
- i0.ɵɵconditionalCreate(54, CalculatedFieldRulesComponent_Conditional_1_Conditional_54_Template, 6, 0, "div", 36);
436
- i0.ɵɵelementEnd()()();
437
- i0.ɵɵelementStart(55, "div", 37)(56, "button", 38);
438
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_Template_button_click_56_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.cancelEdit()); });
439
- i0.ɵɵtext(57, "Cancel");
440
- i0.ɵɵelementEnd();
441
- i0.ɵɵelementStart(58, "button", 39);
442
- i0.ɵɵlistener("click", function CalculatedFieldRulesComponent_Conditional_1_Template_button_click_58_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.saveEdit()); });
443
- i0.ɵɵtext(59, " Save calculation ");
444
- i0.ɵɵelementEnd()()();
445
- } if (rf & 2) {
446
- const ctx_r1 = i0.ɵɵnextContext();
447
- i0.ɵɵadvance(8);
448
- i0.ɵɵattribute("data-state", ctx_r1.formulaStatus().kind);
449
- i0.ɵɵadvance(3);
450
- i0.ɵɵproperty("expression", ctx_r1.tempValue().formula || "");
451
- i0.ɵɵadvance(3);
452
- i0.ɵɵtextInterpolate1(" ", ctx_r1.formulaStatus().kind === "valid" ? "check_circle" : ctx_r1.formulaStatus().kind === "invalid" ? "error" : "lightbulb", " ");
453
- i0.ɵɵadvance(2);
454
- i0.ɵɵtextInterpolate(ctx_r1.formulaStatus().message);
455
- i0.ɵɵadvance(4);
456
- i0.ɵɵproperty("subscriptSizing", "dynamic")("floatLabel", "always");
457
- i0.ɵɵadvance(3);
458
- i0.ɵɵproperty("ngModel", ctx_r1.tempValue().formula);
459
- i0.ɵɵadvance(7);
460
- i0.ɵɵconditional(ctx_r1.pickerOpen() ? 30 : -1);
461
- i0.ɵɵadvance(2);
462
- i0.ɵɵrepeater(ctx_r1.operatorKeys);
463
- i0.ɵɵadvance(2);
464
- i0.ɵɵconditional(!!ctx_r1.tempValue().getFormulaFromAFormInput ? 34 : -1);
465
- i0.ɵɵadvance(7);
466
- i0.ɵɵconditional((ctx_r1.tempValue().variables || i0.ɵɵpureFunction0(15, _c1)).length === 0 ? 41 : 42);
467
- i0.ɵɵadvance(9);
468
- i0.ɵɵproperty("subscriptSizing", "dynamic")("floatLabel", "always");
469
- i0.ɵɵadvance(3);
470
- i0.ɵɵproperty("ngModel", ctx_r1.tempValue().decimalPlaces);
471
- i0.ɵɵadvance();
472
- i0.ɵɵconditional(ctx_r1.tempValue().decimalPlaces ? 54 : -1);
473
- i0.ɵɵadvance(4);
474
- i0.ɵɵproperty("disabled", ctx_r1.formulaStatus().kind === "invalid");
475
- } }
476
- function CalculatedFieldRulesComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
477
- i0.ɵɵelement(0, "div", 63);
478
- } }
479
- /** Escapes a string for safe inclusion as a literal inside a `RegExp`. */
480
- function escapeRegExp(value) {
481
- return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
482
- }
483
- /**
484
- * Internal calculated-field-rules editor implementing
485
- * `MatFormFieldControl<CalculatedFieldRules | undefined>` and
486
- * `ControlValueAccessor`.
487
- *
488
- * Rendered by `t-dynamic-data-edit`, which supplies the surrounding field label,
489
- * hint, and validation errors — so this component owns only its two modes: a
490
- * read-only formula summary (view) and a sectioned editor (edit) for the
491
- * formula, its variables, the optional formula source link, and the rounding
492
- * settings.
493
- *
494
- * NOTE: `MatFormFieldControl<T>` and `ControlValueAccessor` mandate plain
495
- * mutable `value` / `placeholder` / `required` / `disabled` / `id` members,
496
- * `@Input()` decorators on them, the `focused` / `touched` / `stateChanges` /
497
- * `onChange` / `onTouched` members, and the `useExisting` provider. These are
498
- * framework wiring, not defects — the CLAUDE.md bans on `@Input()` /
499
- * `useExisting` do not apply to MatFormFieldControl integration. Genuinely
500
- * internal state is signal-based.
501
- */
502
- class CalculatedFieldRulesComponent {
503
- static { this.nextId = 0; }
504
- /** Index of the `$` that opened the picker, and the caret at that moment. */
505
- #dollarIndex;
506
- #cursorPosition;
507
- #elementRef;
508
- constructor() {
509
- // #region MatFormFieldControl framework members (plain mutable — not signals)
510
- this.placeholder = '';
511
- this.required = false;
512
- this.disabled = false;
513
- this.stateChanges = new Subject();
514
- this.controlType = 'app-calculated-field-rules';
515
- this.id = `app-calculated-field-rules-${CalculatedFieldRulesComponent.nextId++}`;
516
- this.focused = false;
517
- this.touched = false;
518
- this.describedBy = '';
519
- // #endregion
520
- // #region Non-MFC inputs / outputs (contract preserved exactly)
521
- /** Owning input definition; supplies table mode and the formula-source map. */
522
- this.mapToData = input(undefined, ...(ngDevMode ? [{ debugName: "mapToData" }] : /* istanbul ignore next */ []));
523
- /** All form inputs available to bind as calculation variables. */
524
- this.formInputs = input([], ...(ngDevMode ? [{ debugName: "formInputs" }] : /* istanbul ignore next */ []));
525
- /** Validation errors surfaced by the parent for error-state derivation. */
526
- this.errors = input([], ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
527
- /** Retained on the contract; reserved for path-scoped value emission. */
528
- this.valueChange2dWithPath = output();
529
- /** Emits the persisted rules whenever the editor commits a new value. */
530
- this.valueChanged = output();
531
- // #endregion
532
- // #region Internal signal state
533
- /** Whether the editor card is open (edit mode) versus the summary (view). */
534
- this.isEditing = signal(false, ...(ngDevMode ? [{ debugName: "isEditing" }] : /* istanbul ignore next */ []));
535
- /** Working copy edited in the card; committed to `value` on save. */
536
- this.tempValue = signal({}, ...(ngDevMode ? [{ debugName: "tempValue" }] : /* istanbul ignore next */ []));
537
- /** Whether the inline `$` field-picker is open. */
538
- this.pickerOpen = signal(false, ...(ngDevMode ? [{ debugName: "pickerOpen" }] : /* istanbul ignore next */ []));
539
- /** Text typed after `$`, used to filter the field-picker. */
540
- this.pickerQuery = signal('', ...(ngDevMode ? [{ debugName: "pickerQuery" }] : /* istanbul ignore next */ []));
541
- /** Keyboard-highlighted result in the field-picker. */
542
- this.pickerActiveIndex = signal(0, ...(ngDevMode ? [{ debugName: "pickerActiveIndex" }] : /* istanbul ignore next */ []));
543
- /** Index of the `$` that opened the picker, and the caret at that moment. */
544
- this.#dollarIndex = -1;
545
- this.#cursorPosition = 0;
546
- // #endregion
547
- this.roundingType = [
548
- { value: 'ROUND', label: 'Nearest' },
549
- { value: 'FLOOR', label: 'Round down' },
550
- { value: 'CEIL', label: 'Round up' },
551
- ];
552
- /** Operator palette inserted into the equation; glyphs are friendly, tokens are infix. */
553
- this.operatorKeys = [
554
- { label: '+', token: ' + ', caretBack: 0, aria: 'Add' },
555
- { label: '−', token: ' - ', caretBack: 0, aria: 'Subtract' },
556
- { label: '×', token: ' * ', caretBack: 0, aria: 'Multiply' },
557
- { label: '÷', token: ' / ', caretBack: 0, aria: 'Divide' },
558
- { label: '( )', token: '()', caretBack: 1, aria: 'Brackets' },
559
- { label: 'xⁿ', token: '^', caretBack: 0, aria: 'Power' },
560
- ];
561
- /** The equation textarea, used for caret-aware token insertion. */
562
- this.formulaInputRef = viewChild('formulaInput', ...(ngDevMode ? [{ debugName: "formulaInputRef" }] : /* istanbul ignore next */ []));
563
- /** Live, non-technical validity of the working equation (drives the preview banner). */
564
- this.formulaStatus = computed(() => {
565
- const formula = (this.tempValue().formula ?? '').trim();
566
- if (!formula) {
567
- return { kind: 'empty', message: 'Start building your equation below.' };
568
- }
569
- const { error } = parseInfixFormula(formula);
570
- return error
571
- ? { kind: 'invalid', message: error }
572
- : { kind: 'valid', message: 'This equation is valid.' };
573
- }, ...(ngDevMode ? [{ debugName: "formulaStatus" }] : /* istanbul ignore next */ []));
574
- /** Number-typed inputs that may back a calculation variable. */
575
- this.cachedNumberInputs = computed(() => this.formInputs().filter((input) => input.dataType === 'number' || input.type === 'number'), ...(ngDevMode ? [{ debugName: "cachedNumberInputs" }] : /* istanbul ignore next */ []));
576
- /** Field-picker results: number inputs filtered by the text typed after `$`. */
577
- this.pickerResults = computed(() => {
578
- const query = this.pickerQuery().trim().toLowerCase();
579
- const inputs = this.cachedNumberInputs();
580
- if (!query) {
581
- return inputs;
582
- }
583
- return inputs.filter((input) => input.label?.toLowerCase().includes(query) ||
584
- input.formControlName?.toLowerCase().includes(query));
585
- }, ...(ngDevMode ? [{ debugName: "pickerResults" }] : /* istanbul ignore next */ []));
586
- /** Every calculation function offered as a list-aggregation chip. */
587
- this.allCalculationFunction = computed(() => Object.values(CalculationFunctions), ...(ngDevMode ? [{ debugName: "allCalculationFunction" }] : /* istanbul ignore next */ []));
588
- /** True when this editor targets a table column rather than a scalar input. */
589
- this.tableMode = computed(() => !!this.mapToData()?.tableConfig, ...(ngDevMode ? [{ debugName: "tableMode" }] : /* istanbul ignore next */ []));
590
- /** Table configuration when in table mode. */
591
- this.tableConfig = computed(() => this.mapToData()?.tableConfig, ...(ngDevMode ? [{ debugName: "tableConfig" }] : /* istanbul ignore next */ []));
592
- this.ngControl = inject(NgControl, { self: true, optional: true });
593
- this.#elementRef = inject(ElementRef);
594
- // ControlValueAccessor — Angular registers an untyped change callback.
595
- this.onChange = () => { };
596
- this.onTouched = () => { };
597
- if (this.ngControl != null) {
598
- this.ngControl.valueAccessor = this;
599
- }
600
- }
601
- ngOnDestroy() {
602
- this.stateChanges.next();
603
- this.stateChanges.complete();
604
- }
605
- // #region Value accessor & MatFormFieldControl logic
606
- #value;
607
- get value() {
608
- return this.#value;
609
- }
610
- set value(val) {
611
- if (_isEqual(this.#value, val)) {
612
- return;
613
- }
614
- this.#value = val ? { ...val } : undefined;
615
- this.stateChanges.next();
616
- this.valueChanged.emit(this.#value ?? null);
617
- this.onChange(this.#value);
618
- }
619
- // MatFormFieldControl reads these as plain getters during its own change
620
- // detection, so they stay getters rather than `computed()` signals.
621
- get empty() {
622
- return !this.#value;
623
- }
624
- get shouldLabelFloat() {
625
- return this.focused || !this.empty;
626
- }
627
- get errorState() {
628
- const hasCustomError = (this.errors() ?? []).length > 0;
629
- const hasControlError = this.ngControl?.control?.errors != null;
630
- return ((this.touched && (hasControlError || hasCustomError)) ||
631
- (this.required && !this.#value));
632
- }
633
- writeValue(value) {
634
- this.value = value;
635
- }
636
- registerOnChange(fn) {
637
- this.onChange = fn;
638
- }
639
- registerOnTouched(fn) {
640
- this.onTouched = fn;
641
- }
642
- setDisabledState(isDisabled) {
643
- this.disabled = isDisabled;
644
- this.stateChanges.next();
645
- }
646
- setDescribedByIds(ids) {
647
- const controlElement = this.#elementRef.nativeElement.querySelector('.app-calculated-field-rules');
648
- controlElement?.setAttribute('aria-describedby', ids.join(' '));
649
- this.describedBy = ids.join(' ');
650
- this.stateChanges.next();
651
- }
652
- onContainerClick() {
653
- if (!this.focused) {
654
- this.focused = true;
655
- this.stateChanges.next();
656
- }
657
- this.markAsTouched();
658
- }
659
- markAsTouched() {
660
- if (!this.touched) {
661
- this.onTouched();
662
- this.touched = true;
663
- this.stateChanges.next();
664
- }
665
- }
666
- // #endregion
667
- // #region Edit-mode lifecycle
668
- startEdit() {
669
- this.tempValue.set(this.#value ? structuredClone(this.#value) : {});
670
- this.isEditing.set(true);
671
- this.markAsTouched();
672
- }
673
- saveEdit() {
674
- this.value = this.tempValue();
675
- this.isEditing.set(false);
676
- }
677
- cancelEdit() {
678
- this.isEditing.set(false);
679
- this.tempValue.set({});
680
- }
681
- // #endregion
682
- // #region Formula / variable editing (operates on tempValue)
683
- checkIfInputCanBeLinkedToCalVariable(currentInput, inputToDisable) {
684
- if (!currentInput) {
685
- return false;
686
- }
687
- if (currentInput.formControlName === inputToDisable.formControlName) {
688
- return true;
689
- }
690
- if (!currentInput.multipleInputInEditId) {
691
- return !!inputToDisable.parentInput || !!inputToDisable.multipleInputInEditId;
692
- }
693
- return false;
694
- }
695
- linkFormulaSource(event) {
696
- // Resetting formula to undefined intentionally during edit; persisted value
697
- // re-validates on save.
698
- this.tempValue.update((current) => ({
699
- ...current,
700
- formControlWithFormula: event.value,
701
- formula: '',
702
- }));
703
- }
704
- removeVariable(variableId) {
705
- const current = this.tempValue();
706
- const variables = current.variables ?? [];
707
- const target = variables.find((v) => v.id === variableId);
708
- let formula = current.formula ?? '';
709
- if (target?.variable) {
710
- formula = formula
711
- .replace(new RegExp(`\\b${escapeRegExp(target.variable)}\\b`, 'g'), '')
712
- .replace(/\s{2,}/g, ' ')
713
- .trim();
714
- }
715
- this.tempValue.set({
716
- ...current,
717
- variables: variables.filter((v) => v.id !== variableId),
718
- formula,
719
- });
720
- }
721
- appendVariableToFormula(variableName) {
722
- // A variable carries no spacing of its own, so pad it only where it would
723
- // otherwise fuse with an adjacent token (e.g. `ab` instead of `a b`).
724
- const { before, after } = this.#caretSlices();
725
- const lead = before.length > 0 && !/[\s(]$/.test(before) ? ' ' : '';
726
- const trail = after.length > 0 && !/^[\s)]/.test(after) ? ' ' : '';
727
- this.insertToken(`${lead}${variableName}${trail}`, trail ? 1 : 0);
728
- }
729
- setFormula(formula) {
730
- this.tempValue.update((current) => ({ ...current, formula }));
731
- }
732
- /**
733
- * Inserts an infix token at the caret (or appends it when the textarea is not
734
- * focused), then restores the caret just after the insertion. Used by both the
735
- * operator palette and the variable chips so the equation reads naturally while
736
- * staying strictly infix.
737
- */
738
- insertToken(token, caretBack = 0) {
739
- const element = this.formulaInputRef()?.nativeElement;
740
- const { before, after } = this.#caretSlices();
741
- const next = before + token + after;
742
- this.setFormula(next);
743
- if (!element) {
744
- return;
745
- }
746
- const caret = before.length + token.length - caretBack;
747
- // Restore focus + caret after Angular has written the new value back to the DOM.
748
- setTimeout(() => {
749
- element.focus();
750
- element.setSelectionRange(caret, caret);
751
- });
752
- }
753
- /** The formula split around the current caret/selection (end-of-string when unfocused). */
754
- #caretSlices() {
755
- const current = this.tempValue().formula ?? '';
756
- const element = this.formulaInputRef()?.nativeElement;
757
- const start = element?.selectionStart ?? current.length;
758
- const end = element?.selectionEnd ?? current.length;
759
- return { before: current.slice(0, start), after: current.slice(end) };
760
- }
761
- setDecimalPlaces(value) {
762
- const parsed = value === null || value === '' ? undefined : Number(value);
763
- this.tempValue.update((current) => ({
764
- ...current,
765
- decimalPlaces: parsed !== undefined && Number.isFinite(parsed) ? parsed : undefined,
766
- }));
767
- }
768
- setRoundingMode(mode) {
769
- this.tempValue.update((current) => ({ ...current, roundingMode: mode }));
770
- }
771
- /** Friendly label for a stored rounding mode, used in the read-only summary. */
772
- roundingLabel(mode) {
773
- return this.roundingType.find((option) => option.value === mode)?.label ?? 'nearest';
774
- }
775
- // #endregion
776
- // #region Inline `$` field-picker & variable binding
777
- /** Formula text changed: persist it and re-evaluate whether the `$` picker should show. */
778
- onFormulaChange(value) {
779
- this.setFormula(value);
780
- this.#syncPicker();
781
- }
782
- /** Caret moved (click / arrow keys / focus): re-evaluate the `$` picker against the new caret. */
783
- onFormulaCaret() {
784
- this.#syncPicker();
785
- }
786
- /** Closes the picker shortly after blur, leaving time for a result click to register. */
787
- onFormulaBlur() {
788
- setTimeout(() => this.closePicker(), 150);
789
- }
790
- /** Keyboard control for the open picker: navigate, select, dismiss. */
791
- onFormulaKeydown(event) {
792
- if (!this.pickerOpen()) {
793
- return;
794
- }
795
- const results = this.pickerResults();
796
- switch (event.key) {
797
- case 'ArrowDown':
798
- event.preventDefault();
799
- this.pickerActiveIndex.update((i) => Math.min(i + 1, results.length - 1));
800
- break;
801
- case 'ArrowUp':
802
- event.preventDefault();
803
- this.pickerActiveIndex.update((i) => Math.max(i - 1, 0));
804
- break;
805
- case 'Enter': {
806
- const item = results[this.pickerActiveIndex()];
807
- if (item) {
808
- event.preventDefault();
809
- this.selectField(item);
810
- }
811
- break;
812
- }
813
- case 'Escape':
814
- event.preventDefault();
815
- this.closePicker();
816
- break;
817
- }
818
- }
819
- closePicker() {
820
- this.pickerOpen.set(false);
821
- this.pickerActiveIndex.set(0);
822
- this.#dollarIndex = -1;
823
- }
824
- /**
825
- * Binds a form field to a calculation variable and drops its short token into
826
- * the equation. Reuses an existing scalar binding for the same field; otherwise
827
- * mints the next free short name (a, b, c, …). When opened from `$`, the typed
828
- * `$query` is replaced in place; otherwise the token is appended.
829
- */
830
- selectField(input) {
831
- const current = this.tempValue();
832
- const variables = current.variables ?? [];
833
- const existing = variables.find((v) => v.formControlName === input.formControlName && !v.function && !v.parentInputId);
834
- const token = existing ? existing.variable : this.#nextShortName();
835
- const nextVars = existing ? variables : [...variables, this.#makeVariable(input, token)];
836
- const formula = current.formula ?? '';
837
- let nextFormula;
838
- let caret;
839
- if (this.pickerOpen() && this.#dollarIndex >= 0) {
840
- const before = formula.slice(0, this.#dollarIndex);
841
- const after = formula.slice(this.#cursorPosition);
842
- const lead = before.length > 0 && !/[\s(]$/.test(before) ? ' ' : '';
843
- const insert = `${lead}${token} `;
844
- nextFormula = before + insert + after;
845
- caret = (before + insert).length;
846
- }
847
- else {
848
- const lead = formula.length > 0 && !/[\s(]$/.test(formula) ? ' ' : '';
849
- nextFormula = `${formula}${lead}${token} `;
850
- caret = nextFormula.length;
851
- }
852
- this.tempValue.set({ ...current, formula: nextFormula, variables: nextVars });
853
- this.closePicker();
854
- const element = this.formulaInputRef()?.nativeElement;
855
- if (element) {
856
- setTimeout(() => {
857
- element.focus();
858
- element.setSelectionRange(caret, caret);
859
- });
860
- }
861
- }
862
- /**
863
- * Renames a variable's short token, updating every whole-word occurrence in the
864
- * formula. An empty name is ignored so the token never desyncs from the formula
865
- * (the field repopulates with the current name on the next render).
866
- */
867
- setVariableShortName(id, rawName) {
868
- const name = rawName.trim();
869
- const current = this.tempValue();
870
- const variables = current.variables ?? [];
871
- const target = variables.find((v) => v.id === id);
872
- if (!target || !name || name === target.variable) {
873
- return;
874
- }
875
- const formula = target.variable
876
- ? (current.formula ?? '').replace(new RegExp(`\\b${escapeRegExp(target.variable)}\\b`, 'g'), name)
877
- : (current.formula ?? '');
878
- this.tempValue.set({
879
- ...current,
880
- formula,
881
- variables: variables.map((v) => (v.id === id ? { ...v, variable: name } : v)),
882
- });
883
- }
884
- /** Toggles a list-aggregation function (sum/avg/…) on a sub-item variable. */
885
- setVariableFunction(id, func) {
886
- this.tempValue.update((current) => ({
887
- ...current,
888
- variables: (current.variables ?? []).map((v) => {
889
- if (v.id !== id) {
890
- return v;
891
- }
892
- if (v.function === func) {
893
- return {
894
- ...v,
895
- function: undefined,
896
- applyFunctionToCol: undefined,
897
- applyFunctionToLabel: undefined,
898
- };
899
- }
900
- return {
901
- ...v,
902
- function: func,
903
- applyFunctionToCol: v.formControlName,
904
- applyFunctionToLabel: v.label,
905
- };
906
- }),
907
- }));
908
- }
909
- /** Recomputes the picker visibility/query from the current formula and caret. */
910
- #syncPicker() {
911
- const element = this.formulaInputRef()?.nativeElement;
912
- if (!element) {
913
- this.closePicker();
914
- return;
915
- }
916
- const position = element.selectionStart ?? 0;
917
- this.#cursorPosition = position;
918
- const formula = this.tempValue().formula ?? '';
919
- const lastDollar = formula.slice(0, position).lastIndexOf('$');
920
- if (lastDollar === -1) {
921
- this.closePicker();
922
- return;
923
- }
924
- const query = formula.slice(lastDollar + 1, position);
925
- // Only a run of letters/digits/spaces keeps the picker open; anything else
926
- // (an operator, a newline) means the `$` was not a field trigger.
927
- if (!/^[a-zA-Z0-9 ]*$/.test(query)) {
928
- this.closePicker();
929
- return;
930
- }
931
- this.#dollarIndex = lastDollar;
932
- this.pickerQuery.set(query);
933
- this.pickerActiveIndex.set(0);
934
- this.pickerOpen.set(true);
935
- }
936
- /** Builds a calculation variable bound to a form field, carrying the list parent when present. */
937
- #makeVariable(input, token) {
938
- return {
939
- id: v4(),
940
- variable: token,
941
- formControlName: input.formControlName,
942
- inputId: input.id,
943
- label: input.label,
944
- ...(input.multipleInputInEditId ? { parentInputId: input.multipleInputInEditId } : {}),
945
- };
946
- }
947
- /** Next free single-letter token (a, b, c, …), skipping mathjs constants and falling back to v1, v2…. */
948
- #nextShortName() {
949
- const used = new Set((this.tempValue().variables ?? []).map((v) => v.variable));
950
- const reserved = new Set(['e', 'i']); // mathjs constants
951
- for (let code = 97; code <= 122; code++) {
952
- const char = String.fromCharCode(code);
953
- if (!used.has(char) && !reserved.has(char)) {
954
- return char;
955
- }
956
- }
957
- let n = 1;
958
- while (used.has(`v${n}`)) {
959
- n++;
960
- }
961
- return `v${n}`;
962
- }
963
- static { this.ɵfac = function CalculatedFieldRulesComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CalculatedFieldRulesComponent)(); }; }
964
- static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CalculatedFieldRulesComponent, selectors: [["lib-calculated-field-rules"]], viewQuery: function CalculatedFieldRulesComponent_Query(rf, ctx) { if (rf & 1) {
965
- i0.ɵɵviewQuerySignal(ctx.formulaInputRef, _c0, 5);
966
- } if (rf & 2) {
967
- i0.ɵɵqueryAdvance();
968
- } }, hostAttrs: [1, "lib-calculated-field-rules"], hostVars: 1, hostBindings: function CalculatedFieldRulesComponent_HostBindings(rf, ctx) { if (rf & 2) {
969
- i0.ɵɵattribute("aria-describedby", ctx.describedBy);
970
- } }, inputs: { placeholder: "placeholder", required: "required", disabled: "disabled", mapToData: [1, "mapToData"], formInputs: [1, "formInputs"], errors: [1, "errors"], value: "value" }, outputs: { valueChange2dWithPath: "valueChange2dWithPath", valueChanged: "valueChanged" }, features: [i0.ɵɵProvidersFeature([{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }])], decls: 3, vars: 2, consts: [["formulaInput", ""], [1, "cfr-summary"], ["appearance", "outlined", 1, "cfr-editor"], ["cdkConnectedOverlay", "", 3, "cdkConnectedOverlayOpen"], [1, "cfr-hint"], [1, "cfr-formula-card"], [1, "cfr-section__label"], ["placeholder", "No calculation set up yet", 1, "cfr-formula-card__preview", 3, "expression"], [1, "cfr-formula-card__meta"], ["mat-stroked-button", "", "color", "primary", 1, "cfr-edit-trigger", 3, "click", "disabled"], ["color", "primary", 1, "cfr-hint__icon"], [1, "cfr-formula-card__meta-icon"], [1, "cfr-editor__head"], [1, "cfr-editor__title"], [1, "cfr-editor__subtitle"], [1, "cfr-preview"], ["placeholder", "Your equation will appear here", 1, "cfr-preview__render", 3, "expression"], [1, "cfr-preview__status"], [1, "cfr-preview__status-icon"], [1, "cfr-section"], [1, "cfr-equation"], [1, "cfr-equation__field"], ["appearance", "outline", 1, "cfr-field", 3, "subscriptSizing", "floatLabel"], ["matInput", "", "placeholder", "e.g. (a + 2) / b", "rows", "2", "spellcheck", "false", "autocapitalize", "off", "autocomplete", "off", 3, "ngModelChange", "keyup", "click", "focus", "keydown", "blur", "ngModel"], ["role", "listbox", "aria-label", "Form fields", 1, "cfr-picker"], ["role", "group", "aria-label", "Operators", 1, "cfr-keypad"], ["type", "button", 1, "cfr-key"], [1, "cfr-variables"], [1, "cfr-block-head"], [1, "cfr-block-head__hint"], [1, "cfr-variables__empty"], [1, "cfr-legend"], [1, "cfr-rounding"], [1, "cfr-rounding__row"], ["appearance", "outline", 1, "cfr-field", "cfr-rounding__decimals", 3, "subscriptSizing", "floatLabel"], ["matInput", "", "placeholder", "0", "type", "number", "min", "0", 3, "ngModelChange", "ngModel"], [1, "cfr-rounding__mode"], [1, "cfr-editor__actions"], ["mat-button", "", 3, "click"], ["mat-flat-button", "", "color", "primary", 3, "click", "disabled"], [1, "cfr-picker__head"], [1, "cfr-picker__empty"], ["type", "button", "role", "option", 1, "cfr-picker__item", 3, "cfr-picker__item--active"], ["type", "button", "role", "option", 1, "cfr-picker__item", 3, "mousedown", "click"], [1, "cfr-picker__icon"], [1, "cfr-picker__label"], [1, "cfr-picker__meta"], ["type", "button", 1, "cfr-key", 3, "click"], ["placeholder", "Select an input that holds a formula", 3, "selectionChange", "value"], [3, "disabled", "value"], [1, "cfr-legend__row"], [1, "cfr-legend__main"], ["aria-label", "Short name", "maxlength", "12", "spellcheck", "false", "autocomplete", "off", "autocapitalize", "off", 1, "cfr-legend__token", 3, "ngModelChange", "ngModel"], [1, "cfr-legend__arrow"], ["type", "button", 1, "cfr-legend__field", 3, "click"], ["type", "button", 1, "cfr-legend__remove", 3, "click"], ["role", "group", "aria-label", "Combine list values with", 1, "cfr-legend__fns"], ["aria-hidden", "true", 1, "cfr-legend__fns-label"], ["type", "button", 1, "cfr-legend__fn", 3, "cfr-legend__fn--active"], ["type", "button", 1, "cfr-legend__fn", 3, "click"], ["aria-label", "Rounding method"], [3, "selected"], [3, "click", "selected"], [1, "cfr-disabled-overlay"]], template: function CalculatedFieldRulesComponent_Template(rf, ctx) { if (rf & 1) {
971
- i0.ɵɵconditionalCreate(0, CalculatedFieldRulesComponent_Conditional_0_Template, 11, 5, "div", 1)(1, CalculatedFieldRulesComponent_Conditional_1_Template, 60, 16, "mat-card", 2);
972
- i0.ɵɵtemplate(2, CalculatedFieldRulesComponent_ng_template_2_Template, 1, 0, "ng-template", 3);
973
- } if (rf & 2) {
974
- i0.ɵɵconditional(!ctx.isEditing() ? 0 : 1);
975
- i0.ɵɵadvance(2);
976
- i0.ɵɵproperty("cdkConnectedOverlayOpen", ctx.disabled);
977
- } }, dependencies: [CommonModule,
978
- FormsModule, i1.DefaultValueAccessor, i1.NumberValueAccessor, i1.NgControlStatus, i1.MaxLengthValidator, i1.MinValidator, i1.NgModel, MathPreviewComponent,
979
- OverlayModule, i2.CdkConnectedOverlay, MatFormFieldModule, i2$1.MatFormField, i2$1.MatLabel, i2$1.MatHint, MatInputModule, i2$2.MatInput, MatSelectModule, i8.MatSelect, i8.MatOption, MatIconModule, i3.MatIcon, MatCardModule, i3$1.MatCard, MatButtonModule, i2$3.MatButton, MatChipsModule, i4.MatChipListbox, i4.MatChipOption], styles: ["[_nghost-%COMP%]{display:block;position:relative}.cfr-hint[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;background:var(--sem-info-surface);border-radius:var(--lib-forms-radius-sm, 8px);color:var(--lib-forms-on-surface);font-size:.875rem}.cfr-hint__icon[_ngcontent-%COMP%]{flex:0 0 auto}.cfr-section__label[_ngcontent-%COMP%]{display:block;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.cfr-field[_ngcontent-%COMP%]{width:100%}.cfr-block-head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;margin-bottom:.75rem}.cfr-block-head__hint[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--lib-forms-on-surface-variant)}.cfr-summary[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.cfr-formula-card[_ngcontent-%COMP%]{background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);box-shadow:var(--lib-forms-shadow-resting);display:flex;flex-direction:column;gap:1rem;padding:2rem}.cfr-formula-card__preview[_ngcontent-%COMP%]{display:block;border-radius:var(--lib-forms-radius-md, 10px);background:var(--lib-forms-surface-container-low)}.cfr-formula-card__meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--lib-forms-on-surface-variant)}.cfr-formula-card__meta-icon[_ngcontent-%COMP%]{font-size:1.125rem;width:1.125rem;height:1.125rem}.cfr-edit-trigger[_ngcontent-%COMP%]{width:100%}.cfr-editor[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;border-color:color-mix(in srgb,var(--lib-forms-primary) 30%,transparent)}.cfr-editor__head[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.cfr-editor__title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;font-size:1.25rem;font-weight:500;letter-spacing:-.01em;color:var(--lib-forms-on-surface)}.cfr-editor__subtitle[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;color:var(--lib-forms-on-surface-variant)}.cfr-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.875rem;padding:1.25rem 1.5rem;border-radius:var(--lib-forms-radius-lg, 12px);background:var(--lib-forms-surface-container-low);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);transition:border-color var(--lib-forms-duration, .4s) var(--lib-forms-easing)}.cfr-preview[data-state=valid][_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--sem-success) 45%,transparent)}.cfr-preview[data-state=invalid][_ngcontent-%COMP%]{border-color:color-mix(in srgb,var(--sem-error) 45%,transparent)}.cfr-preview__render[_ngcontent-%COMP%]{display:block}.cfr-preview__status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.875rem;color:var(--lib-forms-on-surface-variant)}.cfr-preview__status-icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:1.125rem;width:1.125rem;height:1.125rem}.cfr-preview[data-state=valid][_ngcontent-%COMP%] .cfr-preview__status[_ngcontent-%COMP%]{color:var(--sem-success)}.cfr-preview[data-state=invalid][_ngcontent-%COMP%] .cfr-preview__status[_ngcontent-%COMP%]{color:var(--sem-error)}.cfr-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.cfr-equation[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.625rem}.cfr-equation__field[_ngcontent-%COMP%]{position:relative}.cfr-keypad[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.375rem}.cfr-key[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;min-width:2.5rem;height:2.25rem;padding:0 .625rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-sm, 8px);background:var(--lib-forms-surface);color:var(--lib-forms-on-surface);font-size:1rem;font-weight:500;cursor:pointer;transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),transform var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-key[_ngcontent-%COMP%]:hover{border-color:var(--lib-forms-primary);background:color-mix(in srgb,var(--lib-forms-primary) 8%,transparent)}.cfr-key[_ngcontent-%COMP%]:active{transform:translateY(1px)}.cfr-picker[_ngcontent-%COMP%]{position:absolute;z-index:20;left:0;right:0;top:calc(100% - 1.25rem);max-height:16rem;overflow-y:auto;padding:.5rem;border-radius:var(--lib-forms-radius-md, 10px);background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 20%,transparent);box-shadow:var(--lib-forms-shadow-elevated, var(--lib-forms-shadow-resting))}.cfr-picker__head[_ngcontent-%COMP%]{padding:.25rem .5rem .5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.cfr-picker__empty[_ngcontent-%COMP%]{padding:.75rem .5rem;font-size:.875rem;color:var(--lib-forms-on-surface-variant)}.cfr-picker__item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;width:100%;padding:.5rem .625rem;border:none;border-radius:var(--lib-forms-radius-sm, 8px);background:transparent;color:var(--lib-forms-on-surface);font-size:.9375rem;text-align:left;cursor:pointer;transition:background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-picker__item[_ngcontent-%COMP%]:hover, .cfr-picker__item--active[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--lib-forms-primary) 12%,transparent)}.cfr-picker__icon[_ngcontent-%COMP%]{flex:0 0 auto;font-size:1.125rem;width:1.125rem;height:1.125rem;color:var(--lib-forms-on-surface-variant)}.cfr-picker__label[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cfr-picker__meta[_ngcontent-%COMP%]{flex:0 0 auto;font-size:.75rem;color:var(--lib-forms-on-surface-variant)}.cfr-variables[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}.cfr-variables__empty[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--lib-forms-on-surface-variant)}.cfr-legend[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none}.cfr-legend__row[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:.5rem .625rem;border-radius:var(--lib-forms-radius-md, 10px);background:var(--lib-forms-surface-container-low);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 12%,transparent)}.cfr-legend__main[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.cfr-legend__token[_ngcontent-%COMP%]{flex:0 0 auto;width:2.5rem;height:1.875rem;padding:0 .25rem;text-align:center;font-family:JetBrains Mono,SF Mono,ui-monospace,monospace;font-size:.9375rem;font-weight:600;color:var(--lib-forms-primary);background:color-mix(in srgb,var(--lib-forms-primary) 8%,var(--lib-forms-surface));border:1px solid color-mix(in srgb,var(--lib-forms-primary) 30%,transparent);border-radius:var(--lib-forms-radius-sm, 8px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__token[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.cfr-legend__arrow[_ngcontent-%COMP%]{flex:0 0 auto;font-size:1.125rem;width:1.125rem;height:1.125rem;color:var(--lib-forms-on-surface-variant)}.cfr-legend__field[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.3125rem .625rem;border:1px solid transparent;border-radius:var(--lib-forms-radius-sm, 8px);background:transparent;color:var(--lib-forms-on-surface);font-size:.875rem;text-align:left;cursor:pointer;transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__field[_ngcontent-%COMP%]:hover{border-color:var(--lib-forms-outline-variant);background:color-mix(in srgb,var(--lib-forms-primary) 6%,transparent)}.cfr-legend__remove[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border:none;border-radius:50%;background:transparent;color:var(--lib-forms-on-surface-variant);cursor:pointer;transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__remove[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.125rem;width:1.125rem;height:1.125rem}.cfr-legend__remove[_ngcontent-%COMP%]:hover{color:var(--sem-error);background:var(--sem-error-surface)}.cfr-legend__fns[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;padding-left:3rem}.cfr-legend__fns-label[_ngcontent-%COMP%]{margin-right:.125rem;font-style:italic;font-size:.8125rem;color:var(--lib-forms-on-surface-variant)}.cfr-legend__fn[_ngcontent-%COMP%]{padding:.1875rem .5rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-pill, 999px);background:transparent;color:var(--lib-forms-on-surface-variant);font-size:.6875rem;font-weight:500;letter-spacing:.02em;cursor:pointer;transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__fn[_ngcontent-%COMP%]:hover{border-color:var(--lib-forms-primary);color:var(--lib-forms-on-surface)}.cfr-legend__fn--active[_ngcontent-%COMP%]{border-color:transparent;background:var(--lib-forms-primary);color:var(--lib-forms-on-primary)}.cfr-rounding[_ngcontent-%COMP%]{display:flex;flex-direction:column}.cfr-rounding__row[_ngcontent-%COMP%]{display:flex;gap:1.5rem;flex-wrap:wrap}.cfr-rounding__decimals[_ngcontent-%COMP%]{flex:1 1 150px;min-width:150px}.cfr-rounding__mode[_ngcontent-%COMP%]{flex:2 1 220px;display:flex;flex-direction:column;gap:.5rem}.cfr-editor__actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.75rem}.cfr-disabled-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;background:color-mix(in srgb,var(--lib-forms-shadow-color) 50%,transparent);z-index:10}mat-chip[_ngcontent-%COMP%]{cursor:pointer}"], changeDetection: 0 }); }
980
- }
981
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CalculatedFieldRulesComponent, [{
982
- type: Component,
983
- args: [{ selector: 'lib-calculated-field-rules', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, imports: [
984
- CommonModule,
985
- FormsModule,
986
- MathPreviewComponent,
987
- OverlayModule,
988
- MatFormFieldModule,
989
- MatInputModule,
990
- MatSelectModule,
991
- MatIconModule,
992
- MatCardModule,
993
- MatButtonModule,
994
- MatChipsModule,
995
- ], providers: [{ provide: MatFormFieldControl, useExisting: CalculatedFieldRulesComponent }], host: {
996
- 'class': 'lib-calculated-field-rules',
997
- '[attr.aria-describedby]': 'describedBy',
998
- }, template: "<!-- View mode: read-only calculation summary -->\n@if (!isEditing()) {\n<div class=\"cfr-summary\">\n @if (!!value && !mapToData()?.id && !tableMode()) {\n <div class=\"cfr-hint\">\n <mat-icon class=\"cfr-hint__icon\" color=\"primary\">info</mat-icon>\n <span>Save the input first to enable calculated field configurations</span>\n </div>\n }\n\n <div class=\"cfr-formula-card\">\n <span class=\"cfr-section__label\">Calculation</span>\n <lib-math-preview class=\"cfr-formula-card__preview\" [expression]=\"value?.formula || ''\"\n placeholder=\"No calculation set up yet\" />\n @if (value?.decimalPlaces) {\n <div class=\"cfr-formula-card__meta\">\n <mat-icon class=\"cfr-formula-card__meta-icon\">tune</mat-icon>\n <span>Shown to {{ value?.decimalPlaces }} decimal place(s) \u00B7 {{ value?.roundingMode ? roundingLabel(value?.roundingMode) : 'nearest' }}</span>\n </div>\n }\n </div>\n\n <button class=\"cfr-edit-trigger\" mat-stroked-button color=\"primary\" [disabled]=\"disabled\"\n (click)=\"startEdit()\">\n <mat-icon>edit</mat-icon>\n {{ !!value?.formula ? 'Edit calculation' : 'Set up calculation' }}\n </button>\n</div>\n}\n\n<!-- Edit mode: guided calculation builder -->\n@else {\n<mat-card appearance=\"outlined\" class=\"cfr-editor\">\n <header class=\"cfr-editor__head\">\n <h3 class=\"cfr-editor__title\">\n <mat-icon>functions</mat-icon>\n Build the calculation\n </h3>\n <p class=\"cfr-editor__subtitle\">\n Combine your form fields with operators to work out this value automatically.\n </p>\n </header>\n\n <!-- Live preview + validity -->\n <div class=\"cfr-preview\" [attr.data-state]=\"formulaStatus().kind\">\n <span class=\"cfr-section__label\">Live preview</span>\n <lib-math-preview class=\"cfr-preview__render\" [expression]=\"tempValue().formula || ''\"\n placeholder=\"Your equation will appear here\" />\n <p class=\"cfr-preview__status\">\n <mat-icon class=\"cfr-preview__status-icon\">\n {{ formulaStatus().kind === 'valid' ? 'check_circle' : formulaStatus().kind === 'invalid' ? 'error' : 'lightbulb' }}\n </mat-icon>\n <span>{{ formulaStatus().message }}</span>\n </p>\n </div>\n\n <section class=\"cfr-section\">\n <!-- Equation input + inline field-picker + operator keypad -->\n <div class=\"cfr-equation\">\n <div class=\"cfr-equation__field\">\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation</mat-label>\n <textarea #formulaInput matInput [ngModel]=\"tempValue().formula\"\n (ngModelChange)=\"onFormulaChange($event)\" (keyup)=\"onFormulaCaret()\"\n (click)=\"onFormulaCaret()\" (focus)=\"onFormulaCaret()\"\n (keydown)=\"onFormulaKeydown($event)\" (blur)=\"onFormulaBlur()\"\n placeholder=\"e.g. (a + 2) / b\" rows=\"2\" spellcheck=\"false\" autocapitalize=\"off\"\n autocomplete=\"off\"></textarea>\n <mat-hint>Type <strong>$</strong> to add a form field, then join fields with the operator keys.</mat-hint>\n </mat-form-field>\n\n @if (pickerOpen()) {\n <div class=\"cfr-picker\" role=\"listbox\" aria-label=\"Form fields\">\n <div class=\"cfr-picker__head\">Insert a field</div>\n @if (pickerResults().length === 0) {\n <div class=\"cfr-picker__empty\">No matching number fields</div>\n } @else {\n @for (item of pickerResults(); track item.id; let idx = $index) {\n <button type=\"button\" role=\"option\" class=\"cfr-picker__item\"\n [class.cfr-picker__item--active]=\"idx === pickerActiveIndex()\"\n [attr.aria-selected]=\"idx === pickerActiveIndex()\"\n (mousedown)=\"$event.preventDefault()\" (click)=\"selectField(item)\">\n <mat-icon class=\"cfr-picker__icon\">{{ item.multipleInputInEditId ? 'format_list_numbered' : 'tag' }}</mat-icon>\n <span class=\"cfr-picker__label\">{{ item.label }}</span>\n <span class=\"cfr-picker__meta\">{{ item.formControlName }}</span>\n </button>\n }\n }\n </div>\n }\n </div>\n\n <div class=\"cfr-keypad\" role=\"group\" aria-label=\"Operators\">\n @for (key of operatorKeys; track key.token) {\n <button type=\"button\" class=\"cfr-key\" [attr.aria-label]=\"key.aria\"\n (click)=\"insertToken(key.token, key.caretBack)\">\n {{ key.label }}\n </button>\n }\n </div>\n </div>\n\n <!-- Optional equation source link -->\n @if (!!tempValue().getFormulaFromAFormInput) {\n <mat-form-field class=\"cfr-field\" [subscriptSizing]=\"'dynamic'\" [floatLabel]=\"'always'\"\n appearance=\"outline\">\n <mat-label>Equation source</mat-label>\n <mat-select [value]=\"tempValue().formControlWithFormula\"\n (selectionChange)=\"linkFormulaSource($event)\" placeholder=\"Select an input that holds a formula\">\n @for (input of formInputs(); track input.id) {\n <mat-option\n [disabled]=\"checkIfInputCanBeLinkedToCalVariable(mapToData(), input) || input.element !== 'select'\"\n [value]=\"input.formControlName\">\n {{ input.label }}\n </mat-option>\n }\n </mat-select>\n <mat-hint>Pull the equation from another input's value</mat-hint>\n </mat-form-field>\n }\n\n <!-- Bound fields legend -->\n <div class=\"cfr-variables\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Fields in this calculation</span>\n <span class=\"cfr-block-head__hint\">Rename a letter, or type $ above to add another</span>\n </div>\n\n @if ((tempValue().variables || []).length === 0) {\n <p class=\"cfr-variables__empty\">\n Type <strong>$</strong> in the equation above to add a form field \u2014 each becomes a short\n letter you can use in the equation.\n </p>\n } @else {\n <ul class=\"cfr-legend\">\n @for (variable of (tempValue().variables || []); track variable.id) {\n <li class=\"cfr-legend__row\">\n <div class=\"cfr-legend__main\">\n <input class=\"cfr-legend__token\" [ngModel]=\"variable.variable\"\n (ngModelChange)=\"setVariableShortName(variable.id, $event)\" aria-label=\"Short name\"\n maxlength=\"12\" spellcheck=\"false\" autocomplete=\"off\" autocapitalize=\"off\">\n <mat-icon class=\"cfr-legend__arrow\">arrow_right_alt</mat-icon>\n <button type=\"button\" class=\"cfr-legend__field\"\n [attr.aria-label]=\"'Insert ' + variable.label + ' into the equation'\"\n (click)=\"appendVariableToFormula(variable.variable)\">\n {{ variable.label }}\n </button>\n <button type=\"button\" class=\"cfr-legend__remove\"\n [attr.aria-label]=\"'Remove ' + variable.variable\"\n (click)=\"removeVariable(variable.id)\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n\n @if (variable.parentInputId) {\n <div class=\"cfr-legend__fns\" role=\"group\" aria-label=\"Combine list values with\">\n <span class=\"cfr-legend__fns-label\" aria-hidden=\"true\">\u0192</span>\n @for (func of allCalculationFunction(); track func) {\n <button type=\"button\" class=\"cfr-legend__fn\"\n [class.cfr-legend__fn--active]=\"variable.function === func\"\n (click)=\"setVariableFunction(variable.id, func)\">\n {{ func }}\n </button>\n }\n </div>\n }\n </li>\n }\n </ul>\n }\n </div>\n\n <!-- Result formatting -->\n <div class=\"cfr-rounding\">\n <div class=\"cfr-block-head\">\n <span class=\"cfr-section__label\">Result formatting</span>\n <span class=\"cfr-block-head__hint\">Optional \u2014 how the answer is rounded</span>\n </div>\n\n <div class=\"cfr-rounding__row\">\n <mat-form-field class=\"cfr-field cfr-rounding__decimals\" [subscriptSizing]=\"'dynamic'\"\n [floatLabel]=\"'always'\" appearance=\"outline\">\n <mat-label>Decimal places</mat-label>\n <input matInput [ngModel]=\"tempValue().decimalPlaces\"\n (ngModelChange)=\"setDecimalPlaces($event)\" placeholder=\"0\" type=\"number\" min=\"0\">\n </mat-form-field>\n\n @if (tempValue().decimalPlaces) {\n <div class=\"cfr-rounding__mode\">\n <label class=\"cfr-section__label\">Rounding</label>\n <mat-chip-listbox aria-label=\"Rounding method\">\n @for (type of roundingType; track type.value) {\n <mat-chip-option (click)=\"setRoundingMode(type.value)\"\n [selected]=\"tempValue().roundingMode === type.value\">\n {{ type.label }}\n </mat-chip-option>\n }\n </mat-chip-listbox>\n </div>\n }\n </div>\n </div>\n </section>\n\n <div class=\"cfr-editor__actions\">\n <button mat-button (click)=\"cancelEdit()\">Cancel</button>\n <button mat-flat-button color=\"primary\" [disabled]=\"formulaStatus().kind === 'invalid'\"\n (click)=\"saveEdit()\">\n Save calculation\n </button>\n </div>\n</mat-card>\n}\n\n<!-- Disabled overlay -->\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled\">\n <div class=\"cfr-disabled-overlay\"></div>\n</ng-template>\n", styles: [":host{display:block;position:relative}.cfr-hint{display:flex;align-items:center;gap:.5rem;padding:.875rem 1rem;background:var(--sem-info-surface);border-radius:var(--lib-forms-radius-sm, 8px);color:var(--lib-forms-on-surface);font-size:.875rem}.cfr-hint__icon{flex:0 0 auto}.cfr-section__label{display:block;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.cfr-field{width:100%}.cfr-block-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:.5rem .75rem;margin-bottom:.75rem}.cfr-block-head__hint{font-size:.8125rem;color:var(--lib-forms-on-surface-variant)}.cfr-summary{display:flex;flex-direction:column;gap:1.5rem}.cfr-formula-card{background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);box-shadow:var(--lib-forms-shadow-resting);display:flex;flex-direction:column;gap:1rem;padding:2rem}.cfr-formula-card__preview{display:block;border-radius:var(--lib-forms-radius-md, 10px);background:var(--lib-forms-surface-container-low)}.cfr-formula-card__meta{display:flex;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--lib-forms-on-surface-variant)}.cfr-formula-card__meta-icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.cfr-edit-trigger{width:100%}.cfr-editor{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem;border-color:color-mix(in srgb,var(--lib-forms-primary) 30%,transparent)}.cfr-editor__head{display:flex;flex-direction:column;gap:.5rem}.cfr-editor__title{display:flex;align-items:center;gap:.5rem;margin:0;font-size:1.25rem;font-weight:500;letter-spacing:-.01em;color:var(--lib-forms-on-surface)}.cfr-editor__subtitle{margin:0;font-size:.9375rem;color:var(--lib-forms-on-surface-variant)}.cfr-preview{display:flex;flex-direction:column;gap:.875rem;padding:1.25rem 1.5rem;border-radius:var(--lib-forms-radius-lg, 12px);background:var(--lib-forms-surface-container-low);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 15%,transparent);transition:border-color var(--lib-forms-duration, .4s) var(--lib-forms-easing)}.cfr-preview[data-state=valid]{border-color:color-mix(in srgb,var(--sem-success) 45%,transparent)}.cfr-preview[data-state=invalid]{border-color:color-mix(in srgb,var(--sem-error) 45%,transparent)}.cfr-preview__render{display:block}.cfr-preview__status{display:flex;align-items:center;gap:.5rem;margin:0;font-size:.875rem;color:var(--lib-forms-on-surface-variant)}.cfr-preview__status-icon{flex:0 0 auto;font-size:1.125rem;width:1.125rem;height:1.125rem}.cfr-preview[data-state=valid] .cfr-preview__status{color:var(--sem-success)}.cfr-preview[data-state=invalid] .cfr-preview__status{color:var(--sem-error)}.cfr-section{display:flex;flex-direction:column;gap:1.5rem}.cfr-equation{display:flex;flex-direction:column;gap:.625rem}.cfr-equation__field{position:relative}.cfr-keypad{display:flex;flex-wrap:wrap;gap:.375rem}.cfr-key{display:inline-flex;align-items:center;justify-content:center;min-width:2.5rem;height:2.25rem;padding:0 .625rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-sm, 8px);background:var(--lib-forms-surface);color:var(--lib-forms-on-surface);font-size:1rem;font-weight:500;cursor:pointer;transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),transform var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-key:hover{border-color:var(--lib-forms-primary);background:color-mix(in srgb,var(--lib-forms-primary) 8%,transparent)}.cfr-key:active{transform:translateY(1px)}.cfr-picker{position:absolute;z-index:20;left:0;right:0;top:calc(100% - 1.25rem);max-height:16rem;overflow-y:auto;padding:.5rem;border-radius:var(--lib-forms-radius-md, 10px);background:var(--lib-forms-surface);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 20%,transparent);box-shadow:var(--lib-forms-shadow-elevated, var(--lib-forms-shadow-resting))}.cfr-picker__head{padding:.25rem .5rem .5rem;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.cfr-picker__empty{padding:.75rem .5rem;font-size:.875rem;color:var(--lib-forms-on-surface-variant)}.cfr-picker__item{display:flex;align-items:center;gap:.625rem;width:100%;padding:.5rem .625rem;border:none;border-radius:var(--lib-forms-radius-sm, 8px);background:transparent;color:var(--lib-forms-on-surface);font-size:.9375rem;text-align:left;cursor:pointer;transition:background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-picker__item:hover,.cfr-picker__item--active{background:color-mix(in srgb,var(--lib-forms-primary) 12%,transparent)}.cfr-picker__icon{flex:0 0 auto;font-size:1.125rem;width:1.125rem;height:1.125rem;color:var(--lib-forms-on-surface-variant)}.cfr-picker__label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cfr-picker__meta{flex:0 0 auto;font-size:.75rem;color:var(--lib-forms-on-surface-variant)}.cfr-variables{display:flex;flex-direction:column;gap:.75rem}.cfr-variables__empty{margin:0;font-size:.875rem;color:var(--lib-forms-on-surface-variant)}.cfr-legend{display:flex;flex-direction:column;gap:.5rem;margin:0;padding:0;list-style:none}.cfr-legend__row{display:flex;flex-direction:column;gap:.5rem;padding:.5rem .625rem;border-radius:var(--lib-forms-radius-md, 10px);background:var(--lib-forms-surface-container-low);border:1px solid color-mix(in srgb,var(--lib-forms-outline) 12%,transparent)}.cfr-legend__main{display:flex;align-items:center;gap:.5rem}.cfr-legend__token{flex:0 0 auto;width:2.5rem;height:1.875rem;padding:0 .25rem;text-align:center;font-family:JetBrains Mono,SF Mono,ui-monospace,monospace;font-size:.9375rem;font-weight:600;color:var(--lib-forms-primary);background:color-mix(in srgb,var(--lib-forms-primary) 8%,var(--lib-forms-surface));border:1px solid color-mix(in srgb,var(--lib-forms-primary) 30%,transparent);border-radius:var(--lib-forms-radius-sm, 8px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__token:focus{outline:none;border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.cfr-legend__arrow{flex:0 0 auto;font-size:1.125rem;width:1.125rem;height:1.125rem;color:var(--lib-forms-on-surface-variant)}.cfr-legend__field{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:.3125rem .625rem;border:1px solid transparent;border-radius:var(--lib-forms-radius-sm, 8px);background:transparent;color:var(--lib-forms-on-surface);font-size:.875rem;text-align:left;cursor:pointer;transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__field:hover{border-color:var(--lib-forms-outline-variant);background:color-mix(in srgb,var(--lib-forms-primary) 6%,transparent)}.cfr-legend__remove{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:1.75rem;height:1.75rem;border:none;border-radius:50%;background:transparent;color:var(--lib-forms-on-surface-variant);cursor:pointer;transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__remove mat-icon{font-size:1.125rem;width:1.125rem;height:1.125rem}.cfr-legend__remove:hover{color:var(--sem-error);background:var(--sem-error-surface)}.cfr-legend__fns{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;padding-left:3rem}.cfr-legend__fns-label{margin-right:.125rem;font-style:italic;font-size:.8125rem;color:var(--lib-forms-on-surface-variant)}.cfr-legend__fn{padding:.1875rem .5rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-pill, 999px);background:transparent;color:var(--lib-forms-on-surface-variant);font-size:.6875rem;font-weight:500;letter-spacing:.02em;cursor:pointer;transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.cfr-legend__fn:hover{border-color:var(--lib-forms-primary);color:var(--lib-forms-on-surface)}.cfr-legend__fn--active{border-color:transparent;background:var(--lib-forms-primary);color:var(--lib-forms-on-primary)}.cfr-rounding{display:flex;flex-direction:column}.cfr-rounding__row{display:flex;gap:1.5rem;flex-wrap:wrap}.cfr-rounding__decimals{flex:1 1 150px;min-width:150px}.cfr-rounding__mode{flex:2 1 220px;display:flex;flex-direction:column;gap:.5rem}.cfr-editor__actions{display:flex;justify-content:flex-end;gap:.75rem}.cfr-disabled-overlay{position:absolute;inset:0;background:color-mix(in srgb,var(--lib-forms-shadow-color) 50%,transparent);z-index:10}mat-chip{cursor:pointer}\n"] }]
999
- }], () => [], { placeholder: [{
1000
- type: Input
1001
- }], required: [{
1002
- type: Input
1003
- }], disabled: [{
1004
- type: Input
1005
- }], mapToData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mapToData", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], valueChange2dWithPath: [{ type: i0.Output, args: ["valueChange2dWithPath"] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], formulaInputRef: [{ type: i0.ViewChild, args: ['formulaInput', { isSignal: true }] }], value: [{
1006
- type: Input
1007
- }] }); })();
1008
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CalculatedFieldRulesComponent, { className: "CalculatedFieldRulesComponent", filePath: "lib/components/t-dynamic-data-edit/elements/calculated-field-rules/calculated-field-rules.component.ts", lineNumber: 120 }); })();
1009
-
1010
- export { CalculatedFieldRulesComponent };
1011
- //# sourceMappingURL=ngx-t-forms-calculated-field-rules.component-BmWnrfWN.mjs.map