ngx-t-forms 3.1.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 (102) 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-FhUHTsUF.mjs → ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs} +2 -2
  4. package/fesm2022/{ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.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-BJKe9wIA.mjs → ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs} +3 -3
  6. package/fesm2022/{ngx-t-forms-basic-input-input-element.component-BJKe9wIA.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-FQLTI7CX.mjs → ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs} +2 -2
  8. package/fesm2022/{ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs.map → ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs.map} +1 -1
  9. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs → ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs} +2 -2
  10. package/fesm2022/{ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs.map → ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs.map} +1 -1
  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-CU6R5h-x.mjs → ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs} +2 -2
  14. package/fesm2022/{ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs.map → ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs.map} +1 -1
  15. package/fesm2022/{ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs → ngx-t-forms-data-source-picker.component-CN51SdCK.mjs} +6 -6
  16. package/fesm2022/{ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs.map → ngx-t-forms-data-source-picker.component-CN51SdCK.mjs.map} +1 -1
  17. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs → ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs} +2 -2
  18. package/fesm2022/{ngx-t-forms-date-picker-input-element.component-Dux6uy66.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-SMWrTm5X.mjs → ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs} +11 -2
  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-uGM93dvc.mjs → ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs} +3 -3
  22. package/fesm2022/{ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs.map → ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs.map} +1 -1
  23. package/fesm2022/{ngx-t-forms-document-picker.component-DIqaaBSl.mjs → ngx-t-forms-document-picker.component-9clYsOcl.mjs} +2 -2
  24. package/fesm2022/{ngx-t-forms-document-picker.component-DIqaaBSl.mjs.map → ngx-t-forms-document-picker.component-9clYsOcl.mjs.map} +1 -1
  25. package/fesm2022/{ngx-t-forms-editor-input-element.component-CIELjDty.mjs → ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs} +3 -3
  26. package/fesm2022/{ngx-t-forms-editor-input-element.component-CIELjDty.mjs.map → ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs.map} +1 -1
  27. package/fesm2022/{ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs → ngx-t-forms-editor-js-input.component-02HnmInT.mjs} +2 -2
  28. package/fesm2022/{ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs.map → ngx-t-forms-editor-js-input.component-02HnmInT.mjs.map} +1 -1
  29. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs → ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs} +2 -2
  30. package/fesm2022/{ngx-t-forms-file-upload-input-element.component-CQsKz87N.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-Dj0jvBdm.mjs → ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs} +2 -2
  32. package/fesm2022/{ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs.map → ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs.map} +1 -1
  33. package/fesm2022/{ngx-t-forms-form-json-view.component-DzJKFl4c.mjs → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs} +2 -2
  34. package/fesm2022/{ngx-t-forms-form-json-view.component-DzJKFl4c.mjs.map → ngx-t-forms-form-json-view.component-Cmw1hHGZ.mjs.map} +1 -1
  35. package/fesm2022/{ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs} +4 -4
  36. package/fesm2022/{ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs.map → ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs.map} +1 -1
  37. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs} +4 -4
  38. package/fesm2022/{ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs.map → ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs.map} +1 -1
  39. package/fesm2022/{ngx-t-forms-geo-location.component-Bj_qIEqi.mjs → ngx-t-forms-geo-location.component-D-BhLdx6.mjs} +2 -2
  40. package/fesm2022/{ngx-t-forms-geo-location.component-Bj_qIEqi.mjs.map → ngx-t-forms-geo-location.component-D-BhLdx6.mjs.map} +1 -1
  41. package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs +159 -0
  42. package/fesm2022/ngx-t-forms-header-template-editor.component-Z5frEhho.mjs.map +1 -0
  43. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs} +2 -2
  44. package/fesm2022/{ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs.map → ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs.map} +1 -1
  45. package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs +2 -0
  46. package/fesm2022/ngx-t-forms-index-D8xr_Sxp.mjs.map +1 -0
  47. package/fesm2022/{ngx-t-forms-input-custom.component-DiciFhSS.mjs → ngx-t-forms-input-custom.component-s1ryJQy4.mjs} +2 -2
  48. package/fesm2022/{ngx-t-forms-input-custom.component-DiciFhSS.mjs.map → ngx-t-forms-input-custom.component-s1ryJQy4.mjs.map} +1 -1
  49. package/fesm2022/{ngx-t-forms-input-editor.component-D12hrHOc.mjs → ngx-t-forms-input-editor.component-oIzCTmbx.mjs} +3 -3
  50. package/fesm2022/{ngx-t-forms-input-editor.component-D12hrHOc.mjs.map → ngx-t-forms-input-editor.component-oIzCTmbx.mjs.map} +1 -1
  51. package/fesm2022/{ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs → ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs} +2 -3
  52. package/fesm2022/ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs.map +1 -0
  53. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs → ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs} +2 -2
  54. package/fesm2022/{ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs.map → ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs.map} +1 -1
  55. package/fesm2022/{ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs} +2 -2
  56. package/fesm2022/{ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs.map → ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs.map} +1 -1
  57. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs} +2 -2
  58. package/fesm2022/{ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs.map → ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs.map} +1 -1
  59. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs → ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs} +2 -2
  60. package/fesm2022/{ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs.map → ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs.map} +1 -1
  61. package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs → ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs} +4 -4
  62. package/fesm2022/{ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs.map → ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs.map} +1 -1
  63. package/fesm2022/{ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs → ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs} +1807 -717
  64. package/fesm2022/ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs.map +1 -0
  65. package/fesm2022/{ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs} +2 -2
  66. package/fesm2022/{ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs.map → ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs.map} +1 -1
  67. package/fesm2022/{ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs → ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs} +11 -5
  68. package/fesm2022/ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs.map +1 -0
  69. package/fesm2022/{ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs → ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs} +2 -2
  70. package/fesm2022/{ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs.map → ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs.map} +1 -1
  71. package/fesm2022/{ngx-t-forms-record-list-manager.component-CtCOIpai.mjs → ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs} +2 -2
  72. package/fesm2022/{ngx-t-forms-record-list-manager.component-CtCOIpai.mjs.map → ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs.map} +1 -1
  73. package/fesm2022/{ngx-t-forms-required-inputs.component-D9wIdOhg.mjs → ngx-t-forms-required-inputs.component-CK7NIhbq.mjs} +2 -2
  74. package/fesm2022/{ngx-t-forms-required-inputs.component-D9wIdOhg.mjs.map → ngx-t-forms-required-inputs.component-CK7NIhbq.mjs.map} +1 -1
  75. package/fesm2022/{ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs → ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs} +249 -25
  76. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs.map +1 -0
  77. package/fesm2022/{ngx-t-forms-section-report.component-U9uQ_Ow9.mjs → ngx-t-forms-section-report.component-DhSaf85h.mjs} +2 -2
  78. package/fesm2022/{ngx-t-forms-section-report.component-U9uQ_Ow9.mjs.map → ngx-t-forms-section-report.component-DhSaf85h.mjs.map} +1 -1
  79. package/fesm2022/{ngx-t-forms-select-input-element.component-CxYTmuvV.mjs → ngx-t-forms-select-input-element.component-D5HFzh35.mjs} +2 -2
  80. package/fesm2022/{ngx-t-forms-select-input-element.component-CxYTmuvV.mjs.map → ngx-t-forms-select-input-element.component-D5HFzh35.mjs.map} +1 -1
  81. package/fesm2022/{ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs → ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs} +2 -2
  82. package/fesm2022/{ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs.map → ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs.map} +1 -1
  83. package/fesm2022/{ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs} +2 -2
  84. package/fesm2022/{ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs.map → ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs.map} +1 -1
  85. package/fesm2022/{ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs} +2 -2
  86. package/fesm2022/{ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs.map → ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs.map} +1 -1
  87. package/fesm2022/{ngx-t-forms-validators-config.component-EM7RSWIz.mjs → ngx-t-forms-validators-config.component-0_Y6bvtE.mjs} +2 -2
  88. package/fesm2022/{ngx-t-forms-validators-config.component-EM7RSWIz.mjs.map → ngx-t-forms-validators-config.component-0_Y6bvtE.mjs.map} +1 -1
  89. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs} +3 -3
  90. package/fesm2022/{ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs.map → ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs.map} +1 -1
  91. package/fesm2022/ngx-t-forms.mjs +1 -1
  92. package/package.json +2 -2
  93. package/types/ngx-t-forms.d.ts +103 -4
  94. package/fesm2022/ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs.map +0 -1
  95. package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs +0 -129
  96. package/fesm2022/ngx-t-forms-header-template-editor.component-DLldVmcN.mjs.map +0 -1
  97. package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs +0 -2
  98. package/fesm2022/ngx-t-forms-index-C8NtLE16.mjs.map +0 -1
  99. package/fesm2022/ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs.map +0 -1
  100. package/fesm2022/ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map +0 -1
  101. package/fesm2022/ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs.map +0 -1
  102. package/fesm2022/ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs.map +0 -1
@@ -51,6 +51,7 @@ import { MatCardModule } from '@angular/material/card';
51
51
  import * as i1$4 from '@angular/material/tree';
52
52
  import { MatTreeFlattener, MatTreeFlatDataSource, MatTreeModule } from '@angular/material/tree';
53
53
  import { FlatTreeControl, CdkTreeModule } from '@angular/cdk/tree';
54
+ import CryptoJS from 'crypto-js';
54
55
  import * as i5$1 from '@angular/material/table';
55
56
  import { MatTableModule, MatTableDataSource } from '@angular/material/table';
56
57
  import { DomSanitizer } from '@angular/platform-browser';
@@ -90,7 +91,6 @@ import * as i2$4 from '@angular/cdk/overlay';
90
91
  import { OverlayModule } from '@angular/cdk/overlay';
91
92
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
92
93
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
93
- import CryptoJS from 'crypto-js';
94
94
  import { A11yModule } from '@angular/cdk/a11y';
95
95
 
96
96
  /**
@@ -1737,27 +1737,31 @@ function elementDefaultValue(element, inputInEdit) {
1737
1737
  case ElementEditorTypes.PayloadTemplate:
1738
1738
  return payloadTemplateDefault(element, inputInEdit);
1739
1739
  case ElementEditorTypes.HeaderTemplate:
1740
- return headerTemplateDefault(element, inputInEdit);
1740
+ return capturedSiblingDefault(element, inputInEdit, 'capturedHeaders');
1741
+ case ElementEditorTypes.QueryTemplate:
1742
+ return capturedSiblingDefault(element, inputInEdit, 'capturedQuery');
1741
1743
  default:
1742
1744
  return element.defaultValue;
1743
1745
  }
1744
1746
  }
1745
1747
  /**
1746
- * Derives the default header template for a HeaderTemplate editor: the headers
1747
- * captured from the selected endpoint, when the collection carried any.
1748
+ * Derives the default for a Header/Query template editor: the map captured from
1749
+ * the selected endpoint (`capturedHeaders` / `capturedQuery`), when it carried
1750
+ * any entries.
1748
1751
  *
1749
1752
  * Returns `undefined` rather than `{}` when nothing was captured — the editor
1750
1753
  * falls back to its own skeleton, and an absent default means the descriptor's
1751
1754
  * emit-on-init has nothing to write, so merely *opening* an existing fetch never
1752
- * stamps an empty header map onto it.
1755
+ * stamps an empty map onto it.
1753
1756
  *
1754
- * @param element - The descriptor (its `deepBind` ends at `headerTemplate`).
1757
+ * @param element - The descriptor (its `deepBind` ends at the template key).
1755
1758
  * @param inputInEdit - The input being configured.
1756
- * @returns The captured headers, or `undefined` when the endpoint declared none.
1759
+ * @param capturedKey - The sibling capture key on the fetch config.
1760
+ * @returns The captured map, or `undefined` when the endpoint declared none.
1757
1761
  */
1758
- function headerTemplateDefault(element, inputInEdit) {
1759
- // deepBind = [...,'fetch',<slot>,'headerTemplate']; read the sibling capture.
1760
- const capturedPath = [...(element.deepBind ?? []).slice(0, -1), 'capturedHeaders'];
1762
+ function capturedSiblingDefault(element, inputInEdit, capturedKey) {
1763
+ // deepBind = [...,'fetch',<slot>,<templateKey>]; read the sibling capture.
1764
+ const capturedPath = [...(element.deepBind ?? []).slice(0, -1), capturedKey];
1761
1765
  const captured = safeReturnDeepProperty(inputInEdit, capturedPath)?.value;
1762
1766
  return captured && Object.keys(captured).length > 0 ? { ...captured } : undefined;
1763
1767
  }
@@ -1770,7 +1774,7 @@ function payloadTemplateDefault(element, inputInEdit) {
1770
1774
  return deriveDefaultPayloadTemplate(backEndConfig);
1771
1775
  }
1772
1776
  function getPostmanConfig(element, NGX_T_FORMS_CONFIG) {
1773
- const validForPostman = [ElementEditorTypes.ApiCall, ElementEditorTypes.ApiValueAccessRules, ElementEditorTypes.DataSourcePicker].includes(element.editType);
1777
+ const validForPostman = [ElementEditorTypes.ApiCall, ElementEditorTypes.ApiValueAccessRules, ElementEditorTypes.DataSourcePicker, ElementEditorTypes.ApiEndpointConfig].includes(element.editType);
1774
1778
  if (!validForPostman)
1775
1779
  return undefined;
1776
1780
  const config = {
@@ -3856,8 +3860,11 @@ function selectFormSteps(self) {
3856
3860
  }
3857
3861
  const selectAllFormTours = (self) => {
3858
3862
  const steps = selectFormSteps(self);
3859
- return steps.flatMap((step) => {
3860
- return step.columns.filter(c => !!c.tourContent).map((column) => ({
3863
+ // A tour step anchors to a rendered element by input id. Conditionally
3864
+ // hidden inputs (and whole hidden sections) are not in the DOM, so a tour
3865
+ // stop pointing at one would open on nothing.
3866
+ return steps.filter((step) => self.isSectionVisible(step.sectionId)).flatMap((step) => {
3867
+ return step.columns.filter(c => !!c.tourContent && self.isInputVisible(c.id)).map((column) => ({
3861
3868
  anchorId: column.id,
3862
3869
  title: step.label,
3863
3870
  content: column.tourContent || '',
@@ -3924,7 +3931,12 @@ const allFormInputs = (form) => {
3924
3931
 
3925
3932
  function formProgress(self) {
3926
3933
  try {
3927
- const requiredInputs = self.allFormInputs()?.filter(c => c.required && !c.multipleInputInEditId && c.element !== ElementTypes.SectionTitle) || [];
3934
+ // A hidden input is not required of the user, so it belongs in neither the
3935
+ // numerator nor the denominator. Leaving it in inflates completion: a
3936
+ // DISABLED control reports `valid === false` AND `invalid === false`, so the
3937
+ // second branch below counts it as done — a form with one unfilled visible
3938
+ // field and one hidden required field would read 50% instead of 0%.
3939
+ const requiredInputs = self.allFormInputs()?.filter(c => c.required && !c.multipleInputInEditId && c.element !== ElementTypes.SectionTitle && self.isInputVisible(c.id)) || [];
3928
3940
  const allValidRequiredInputs = requiredInputs.filter(c => {
3929
3941
  const sectionGroup = self.mainForm?.controls[c.sectionId];
3930
3942
  const inputControl = sectionGroup?.controls[c.id];
@@ -3932,6 +3944,13 @@ function formProgress(self) {
3932
3944
  });
3933
3945
  const valid = allValidRequiredInputs.length;
3934
3946
  const total = requiredInputs.length;
3947
+ // Nothing required of the user is nothing outstanding. Without this guard the
3948
+ // division yields NaN, which `getSubmissionStatusFn` coerces to 0% via
3949
+ // `formProgress || 0` — reporting a complete form as untouched. Reachable
3950
+ // today for a form with no required inputs, and newly reachable when every
3951
+ // required input is hidden.
3952
+ if (total === 0)
3953
+ return 100;
3935
3954
  return Math.round((valid / total) * 100);
3936
3955
  }
3937
3956
  catch {
@@ -4060,6 +4079,20 @@ function partitionFormErrors(self) {
4060
4079
  return { blocking, overridable };
4061
4080
  const byId = inputIndex(self);
4062
4081
  const visit = (control, key) => {
4082
+ // A DISABLED control does not participate in the form — Angular itself
4083
+ // excludes it from value and validity — so its errors must never gate
4084
+ // submission. `disable()` nulls errors, but nothing STOPS later stamping:
4085
+ // the DateRangePicker widget re-writes `{required:true}` whenever a half is
4086
+ // not `valid` (and a disabled control never is), and
4087
+ // `setInputError` writes via `setErrors` too — while Angular keeps the control
4088
+ // DISABLED through all of it. Reading those errors here produced the worst
4089
+ // failure shape there is: `mainForm.valid` true, progress 100%, and a
4090
+ // submit button dead-locked on an error the user cannot see or fix —
4091
+ // stamped either on a conditionally-hidden input or an author-disabled one.
4092
+ // Skipping the whole subtree is safe: every child of a disabled group is
4093
+ // itself disabled.
4094
+ if (control.disabled)
4095
+ return;
4063
4096
  if (control.errors)
4064
4097
  classifyErrors(key, control.errors, byId, blocking, overridable);
4065
4098
  if (control instanceof FormGroup) {
@@ -4090,6 +4123,11 @@ function partitionControlList(self, controls) {
4090
4123
  const overridable = [];
4091
4124
  const byId = inputIndex(self);
4092
4125
  for (const { inputId, control } of controls) {
4126
+ // Same non-participation rule as the `partitionFormErrors` walk: a disabled
4127
+ // control (conditionally hidden, or author-disabled) cannot be edited, so
4128
+ // its errors must not block the sub-row save gate either.
4129
+ if (control.disabled)
4130
+ continue;
4093
4131
  if (control.errors)
4094
4132
  classifyErrors(inputId, control.errors, byId, blocking, overridable);
4095
4133
  }
@@ -4237,6 +4275,14 @@ const setTemporaryHint = (self, inputId, hint, type) => {
4237
4275
  const setInputError = (self, err, inputId) => {
4238
4276
  if (!self.mainForm)
4239
4277
  return;
4278
+ // Never stamp an error onto a conditionally-hidden input: it is not on
4279
+ // screen, so the user cannot act on it, and `setErrors` on its disabled
4280
+ // control would leave a phantom error on a form that reports valid.
4281
+ // CLEARING (`temporaryError: null`) is still allowed — an input may have
4282
+ // been hidden while a temporary error's removal timer was pending, and that
4283
+ // stale error must still come off.
4284
+ if (err['temporaryError'] !== null && !self.isInputVisible(inputId))
4285
+ return;
4240
4286
  const input = self.allFormInputs()?.find(input => input.id === inputId);
4241
4287
  if (!input?.sectionId)
4242
4288
  return;
@@ -4758,6 +4804,27 @@ const toggleMultipleInput = (self, mainForm, inputId, open, rowInEditId) => {
4758
4804
  sectionGroup.addControl(key, control);
4759
4805
  }
4760
4806
  });
4807
+ // Align the freshly-minted controls with their conditional visibility,
4808
+ // SYNCHRONOUSLY. `generateControlsForTheseInputs` mints them enabled, and
4809
+ // although opening a row does eventually re-run the projection effect (it
4810
+ // patches `formIsOpen` onto the definition, which the effect reads), that
4811
+ // only happens on the next flush. Between here and then a hidden
4812
+ // `required` inner control would still be live and would block the row
4813
+ // from saving — for a field the user cannot see.
4814
+ //
4815
+ // Disable-only: a control the config already marked disabled was minted
4816
+ // disabled, and a visible one is already in the right state, so there is
4817
+ // no enable case to get wrong and no need to re-derive the
4818
+ // config-`disabled` precedence here.
4819
+ Object.keys(controls).forEach((key) => {
4820
+ if (self.isInputVisible(key))
4821
+ return;
4822
+ const control = sectionGroup.controls[key];
4823
+ // `{ emitEvent: false }` — `bindMultipleInputRowControls` (called just
4824
+ // below) routes sub-row valueChanges into `updateValue`.
4825
+ if (control?.enabled)
4826
+ control.disable({ emitEvent: false });
4827
+ });
4761
4828
  }
4762
4829
  else {
4763
4830
  // Drop the live sub-row valueChanges → updateValue bridge before the
@@ -4879,7 +4946,11 @@ const multipleInputDuplicateRow = (self, mainForm, inputId, rowId) => {
4879
4946
  };
4880
4947
 
4881
4948
  const handleStepChange = (self, event) => {
4882
- const slides = self.form?.slides;
4949
+ // The event's indices are positions in the list the stepper actually
4950
+ // RENDERED, which excludes any section whose every column is hidden by a
4951
+ // conditional rule. Indexing the raw `slides` array would therefore activate
4952
+ // the wrong section as soon as one section ahead of it is hidden.
4953
+ const slides = self.form?.slides.filter(slide => self.isSectionVisible(slide.sectionId));
4883
4954
  const sectionId = slides?.[event.selectedIndex]?.sectionId;
4884
4955
  if (!sectionId)
4885
4956
  return;
@@ -5003,6 +5074,14 @@ const validateInnerInputs = (self, sectionGroup, inputId, innerInputs) => {
5003
5074
  */
5004
5075
  const collectInnerInputValues = (self, sectionGroup, innerInputs) => {
5005
5076
  return innerInputs?.reduce((values, innerInput) => {
5077
+ // A hidden inner input is not part of this row. This read goes STRAIGHT to
5078
+ // `controls[id].value`, bypassing `FormGroup.value`, so `disable()` does not
5079
+ // filter it here the way it does everywhere else — without this skip a
5080
+ // hidden field's stale value would be written into the saved row, and its
5081
+ // empty value would raise a "Please fill all fields" error for a field the
5082
+ // user cannot see.
5083
+ if (!self.isInputVisible(innerInput.id))
5084
+ return values;
5006
5085
  const control = sectionGroup?.controls[innerInput.id];
5007
5086
  values[innerInput.id] = control?.value;
5008
5087
  if (control?.value === null || control?.value === undefined) {
@@ -6533,152 +6612,580 @@ function refreshSectionInput(self, sectionId) {
6533
6612
  }
6534
6613
 
6535
6614
  /**
6536
- * @file Shared diagnostic for the dependency-gated `FunctionType` builders.
6537
- *
6538
- * Three function types silently short-circuit when a *required upstream input*
6539
- * they depend on has no value yet:
6540
- *
6541
- * | FunctionType | Short-circuit site |
6542
- * |-----------------------|-----------------------------------------------------|
6543
- * | `ValueCalculation` | `computed` returns `undefined` (a variable is empty)|
6544
- * | `ValuePostMethodAPI` | `params` returns `undefined` → resource stays `idle`|
6545
- * | `OptionsPostMethodAPI`| `params` returns `undefined` → resource stays `idle`|
6546
- *
6547
- * In every case the field is typically **required** (it either *is* the value,
6548
- * or supplies the only way to pick the value), yet nothing is surfaced to the
6549
- * user — the field just never calculates / never loads, and the user is left
6550
- * guessing why. This module restores visibility: it names the missing upstream
6551
- * field(s) by label and tells the user *what* is blocked, *where*, and *what to
6552
- * do about it*.
6553
- *
6554
- * ## Why an `effect` (not the computed itself)
6615
+ * @file Pure resolver for the `headerTemplate` request-header template — and,
6616
+ * since it is the exact structural twin, the `queryTemplate` URL-parameter
6617
+ * template (see {@link resolveQueryTemplate} / {@link mergeQueryOptions}).
6555
6618
  *
6556
- * The short-circuit is detected inside a `computed` (the calc signal / the
6557
- * resource `params`). A `computed` MUST be side-effect free — calling
6558
- * `setTemporaryHint` there (which patches the definition signal and arms a
6559
- * timer) is the forbidden "write a signal inside a computed" anti-pattern and
6560
- * would corrupt the signal graph. So this diagnostic runs in a dedicated
6561
- * `effect()` — an external sink, exactly like the options builder's
6562
- * resolved-edge `effect` and the persist `effect`. The effect reads the same
6563
- * dependencies through `readDep`, so Angular re-runs it whenever they change.
6619
+ * A {@link HeaderTemplate} is authored as the literal JSON header map an endpoint
6620
+ * expects, with the same two special string forms {@link resolvePayloadTemplate}
6621
+ * recognises — but applied to header **values** only (header names are always
6622
+ * literal, because a header whose *name* moved with the form data could not be
6623
+ * matched by the endpoint):
6564
6624
  *
6565
- * ## Emit policy (deterministic, self-throttling)
6625
+ * | Value | Meaning |
6626
+ * |-----------------------|---------------------------------------------------------|
6627
+ * | `"{{inputId}}"` | **Raw substitution** — that input's live value, stringified. |
6628
+ * | `"Bearer {{token}}"` | **Interpolation** — each token replaced by `String(v)`. |
6629
+ * | any other literal | **Fixed default** — emitted as text (numbers/booleans stringified). |
6566
6630
  *
6567
- * The effect tracks the *set of still-missing dependency ids* between runs:
6631
+ * ### Why headers gate the fetch (idle contract)
6632
+ * A token whose resolved value is empty (`undefined` / `null` / `''`) lands in
6633
+ * `missing`, and the API builders return `undefined` params while `missing` is
6634
+ * non-empty — exactly as they do for an unmet payload token. The alternative
6635
+ * (send the request with the header dropped) trades a deferred request for a
6636
+ * guaranteed failure: a fetch whose `Authorization` or tenant header has not
6637
+ * resolved yet does not return partial data, it returns 401/403. Waiting for the
6638
+ * bound field and firing once is both cheaper and the only behaviour that
6639
+ * produces a correct result. The unmet ids also feed the missing-dependency
6640
+ * diagnostic, so the user is told *which* field the fetch is waiting on.
6568
6641
  *
6569
- * 1. **First run establishes a silent baseline.** During `initialize()` the
6570
- * effect's first flush happens *after* `#seedModelFromDefinition`, so the
6571
- * baseline reflects authored defaults. No hint fires on load — a wholly
6572
- * unstarted required field is already covered by standard required-field
6573
- * validation, and a load-time hint would auto-clear before the user looked.
6574
- * 2. **Subsequent runs emit only on a *change* to the missing-set** that leaves
6575
- * it non-empty. This is the high-signal moment: the user edited something and
6576
- * the function is *still* blocked — e.g. "you filled A, I still need B", or
6577
- * they cleared a previously-supplied value. Deduping on the set key means a
6578
- * stable missing-set never re-spams.
6579
- * 3. **A now-empty missing-set emits nothing** — the function proceeds (the
6580
- * calc runs / the resource fires), which is its own feedback.
6642
+ * A **tokenless** header is never "missing" — it is a fixed default and resolves
6643
+ * immediately, so a config with only literal headers stays as eager as it was
6644
+ * before headers existed. A blank literal is dropped rather than sent empty.
6581
6645
  *
6582
- * ## Hint semantics
6646
+ * ### Applies to GET as well as POST
6647
+ * Headers are a transport concern, not a body concern. That is why this module is
6648
+ * separate from `payload-template.ts` and why {@link buildApiRequestParams} —
6649
+ * which every value/options branch routes through — treats the body as optional:
6650
+ * a GET has no body but may well have a live-bound header, and must therefore
6651
+ * re-fetch when that header's field changes.
6583
6652
  *
6584
- * Emitted as {@link HintType.WARNING} (⚠️, amber). Per the design rule book a
6585
- * missing dependency is *user-action-needed, not failure/culpability* — amber,
6586
- * never error-red. Red is reserved for genuine failures (HTTP errors keep their
6587
- * existing {@link FormTowerControllerService.setInputTemporaryError} red hints).
6653
+ * ### Purity
6654
+ * No Angular DI, no I/O. `readDep` is the sole injected accessor; calling this
6655
+ * from inside a `computed` is what makes the enclosing `params` reactive.
6588
6656
  */
6657
+ /** A string leaf that is EXACTLY a single token, e.g. `"{{accessToken}}"`. */
6658
+ const RAW_TOKEN = /^\{\{\s*([^{}]+?)\s*\}\}$/;
6659
+ /** Every `{{token}}` occurrence inside a string leaf (global, for interpolation). */
6660
+ const TOKEN_GLOBAL = /\{\{\s*([^{}]+?)\s*\}\}/g;
6661
+ /** A resolved value counts as "missing" (idle-gating) when empty. */
6662
+ function isEmpty(value) {
6663
+ return value === undefined || value === null || value === '';
6664
+ }
6589
6665
  /**
6590
- * Collects the dependency input ids a single `minimumInputRequired` entry maps
6591
- * to. `'default'` entries (which carry their value inline) map to nothing and
6592
- * yield `[]`, so they can never be reported as "missing".
6666
+ * Renders a resolved dependency value as header text.
6593
6667
  *
6594
- * Handles both the single-target (`mapto`) shape (`mapTo.inputId`) and the
6595
- * multi-target (`mapDocFilter`) shape (`mapTo: Array<{ inputId }>`), mirroring
6596
- * the snapshot-building logic in the value/options POST-computed builders.
6668
+ * Objects and arrays are JSON-serialised rather than passed to `String()`, whose
6669
+ * `"[object Object]"` would be silently accepted by the transport and rejected
6670
+ * (or worse, misread) by the endpoint. A header bound to a structured value is
6671
+ * almost always a misconfiguration; serialising it keeps the mistake visible in
6672
+ * the request instead of hiding it behind a placeholder.
6597
6673
  *
6598
- * @param minInput - A `minimumInputRequired` entry (loosely typed to the only
6599
- * fields read here, avoiding an `@angular/common/http` type import).
6600
- * @returns The mapped dependency input ids (possibly empty).
6674
+ * @param value - The resolved dependency value.
6675
+ * @returns The value as header text.
6601
6676
  */
6602
- function collectMinInputDepIds(minInput) {
6603
- const mapTo = minInput.mapTo;
6604
- if (Array.isArray(mapTo)) {
6605
- return mapTo
6606
- .map((entry) => entry?.inputId)
6607
- .filter((id) => typeof id === 'string' && id.length > 0);
6608
- }
6609
- if (mapTo && typeof mapTo === 'object') {
6610
- const id = mapTo.inputId;
6611
- return id ? [id] : [];
6677
+ function toHeaderText(value) {
6678
+ if (typeof value === 'object') {
6679
+ try {
6680
+ return JSON.stringify(value);
6681
+ }
6682
+ catch {
6683
+ return String(value);
6684
+ }
6612
6685
  }
6613
- return [];
6686
+ return String(value);
6614
6687
  }
6615
6688
  /**
6616
- * Computes the unmet dependency input ids for an HTTP POST-computed function
6617
- * (`ValuePostMethodAPI` / `OptionsPostMethodAPI`), mirroring the builder's own
6618
- * `params` validation: it assembles a snapshot of every mapped dependency value
6619
- * via `readDep`, then runs the supplied `validate` (the shared `validateMinInput`)
6620
- * for each non-`'default'` entry. Any entry that fails contributes its mapped
6621
- * dependency ids to the result.
6689
+ * Resolves a {@link HeaderTemplate} against the current form values.
6622
6690
  *
6623
- * The validator is injected (rather than imported) so this module stays free of
6624
- * the `t-form-controller` value-fetch helpers and any import-cycle risk.
6691
+ * Pure — call it from inside a `computed` so every `readDep` read wires the
6692
+ * template's token inputs as reactive dependencies (edit a bound field ⇒ the
6693
+ * computed re-runs ⇒ the resource re-fetches with the new header).
6625
6694
  *
6626
- * @typeParam M - The `minimumInputRequired` entry shape (only `mapTo` is read here).
6627
- * @param minInputs - The fetch config's `backEndConfig.minimumInputRequired`.
6628
- * @param readDep - Cycle-safe dependency reader from {@link DerivedBuildContext}.
6629
- * @param validate - Predicate returning `true` when an entry is satisfied
6630
- * (typically `(m, snap) => validateMinInput(m, snap)`); a throw is treated as
6631
- * unsatisfied, matching the builders' `try/catch`.
6632
- * @returns The unmet dependency input ids (empty when every entry is satisfied).
6695
+ * @param template - The authored header map (or `undefined` for none).
6696
+ * @param readDep - Reader for a dependency input's current value (the builder's
6697
+ * cycle-safe `ctx.readDep`).
6698
+ * @returns The resolved `headers` plus the `missing` unmet-token inputIds.
6633
6699
  */
6634
- function computeUnmetMinInputs(minInputs, readDep, validate) {
6635
- const snapshot = {};
6636
- for (const minInput of minInputs) {
6637
- for (const id of collectMinInputDepIds(minInput))
6638
- snapshot[id] = readDep(id);
6639
- }
6640
- const missing = [];
6641
- for (const minInput of minInputs) {
6642
- const depIds = collectMinInputDepIds(minInput);
6643
- if (depIds.length === 0)
6644
- continue; // 'default' entries carry inline values
6645
- let satisfied;
6646
- try {
6647
- satisfied = validate(minInput, snapshot);
6700
+ function resolveHeaderTemplate(template, readDep) {
6701
+ const headers = {};
6702
+ const missing = new Set();
6703
+ if (!template || typeof template !== 'object')
6704
+ return { headers, missing: [] };
6705
+ for (const [rawName, rawValue] of Object.entries(template)) {
6706
+ const name = rawName.trim();
6707
+ if (name === '')
6708
+ continue; // an unnamed header cannot be sent
6709
+ if (typeof rawValue !== 'string') {
6710
+ // Typed literal (number / boolean) — a fixed default, never a dependency.
6711
+ if (rawValue === null || rawValue === undefined)
6712
+ continue;
6713
+ headers[name] = toHeaderText(rawValue);
6714
+ continue;
6648
6715
  }
6649
- catch {
6650
- satisfied = false;
6716
+ const exact = RAW_TOKEN.exec(rawValue);
6717
+ if (exact) {
6718
+ const inputId = exact[1].trim();
6719
+ const value = readDep(inputId);
6720
+ if (isEmpty(value)) {
6721
+ missing.add(inputId);
6722
+ continue;
6723
+ }
6724
+ headers[name] = toHeaderText(value);
6725
+ continue;
6651
6726
  }
6652
- if (!satisfied)
6653
- missing.push(...depIds);
6727
+ if (rawValue.includes('{{')) {
6728
+ // Interpolation — stitch tokens into the surrounding text. Guard on
6729
+ // `includes('{{')` rather than a stateful `.test()` on the /g regex, which
6730
+ // would advance lastIndex and corrupt the replace.
6731
+ const interpolated = rawValue.replace(TOKEN_GLOBAL, (_match, rawId) => {
6732
+ const inputId = rawId.trim();
6733
+ const value = readDep(inputId);
6734
+ if (isEmpty(value)) {
6735
+ missing.add(inputId);
6736
+ return '';
6737
+ }
6738
+ return toHeaderText(value);
6739
+ });
6740
+ headers[name] = interpolated;
6741
+ continue;
6742
+ }
6743
+ // Plain literal. A blank one is dropped: the author cleared the value, and
6744
+ // sending an empty header is never what that means.
6745
+ if (rawValue === '')
6746
+ continue;
6747
+ headers[name] = rawValue;
6654
6748
  }
6655
- return missing;
6749
+ return { headers, missing: [...missing] };
6656
6750
  }
6657
6751
  /**
6658
- * Renders the human-readable, action-oriented label list (`"A"`, `"A" and "B"`,
6659
- * `"A", "B" and "C"`), de-duplicated and blank-stripped.
6752
+ * The deduped inputIds a {@link HeaderTemplate} references through `{{inputId}}`
6753
+ * tokens — the template's **dependency set**.
6660
6754
  *
6661
- * @internal
6755
+ * Implemented by resolving with a reader that yields `undefined` for every id, so
6756
+ * the resolver's own walk (single source of truth for what counts as a token)
6757
+ * also enumerates them. No second parser to drift out of sync.
6758
+ *
6759
+ * @param template - The authored header map (or `undefined` for none).
6760
+ * @returns The referenced inputIds (empty for a tokenless / absent template).
6662
6761
  */
6663
- function joinLabels(labels) {
6664
- const unique = [...new Set(labels)].filter((l) => l && l.trim().length > 0);
6665
- const quoted = unique.map((l) => `"${l}"`);
6666
- if (quoted.length <= 1)
6667
- return { list: quoted[0] ?? 'an upstream field', plural: false };
6668
- return {
6669
- list: `${quoted.slice(0, -1).join(', ')} and ${quoted[quoted.length - 1]}`,
6670
- plural: true,
6671
- };
6762
+ function collectHeaderTemplateInputIds(template) {
6763
+ return [...resolveHeaderTemplate(template, () => undefined).missing];
6672
6764
  }
6673
6765
  /**
6674
- * Builds the context-rich hint message for a short-circuited function: it states
6675
- * *what* is blocked (this field, by label), *with what* (the missing upstream
6676
- * fields, by label), and *what to do* (provide them).
6766
+ * The unmet-token inputIds for a header template at the current values — the
6767
+ * `missing` slice of {@link resolveHeaderTemplate}, exposed for the
6768
+ * missing-dependency diagnostic hint (`readMissing`).
6677
6769
  *
6678
- * @param targetLabel - The blocked input's own display label.
6679
- * @param missingLabels - Display labels of the unmet dependency inputs.
6680
- * @param kind - The function's work kind (selects phrasing).
6681
- * @returns The plain hint string (the leading ⚠️ icon is added by `setTemporaryHint`).
6770
+ * @param template - The authored header map.
6771
+ * @param readDep - Reader for a dependency input's current value.
6772
+ * @returns The deduped inputIds whose token currently resolves to an empty value.
6773
+ */
6774
+ function unmetHeaderInputs(template, readDep) {
6775
+ return [...resolveHeaderTemplate(template, readDep).missing];
6776
+ }
6777
+ /**
6778
+ * Resolves a {@link QueryTemplate} against the current form values.
6779
+ *
6780
+ * A `QueryTemplate` is the exact structural twin of a {@link HeaderTemplate}
6781
+ * (flat map of scalar values, same `{{inputId}}` token grammar, same
6782
+ * empty-token idle gate), so this delegates to {@link resolveHeaderTemplate} —
6783
+ * one walk is the single source of truth for what counts as a token, an empty
6784
+ * value, and a droppable blank literal.
6785
+ *
6786
+ * @param template - The authored query-parameter map (or `undefined` for none).
6787
+ * @param readDep - Reader for a dependency input's current value.
6788
+ * @returns The resolved `params` plus the `missing` unmet-token inputIds.
6789
+ */
6790
+ function resolveQueryTemplate(template, readDep) {
6791
+ const { headers, missing } = resolveHeaderTemplate(template, readDep);
6792
+ return { params: headers, missing };
6793
+ }
6794
+ /**
6795
+ * The deduped inputIds a {@link QueryTemplate} references through `{{inputId}}`
6796
+ * tokens — the template's dependency set. Twin of
6797
+ * {@link collectHeaderTemplateInputIds}.
6798
+ *
6799
+ * @param template - The authored query-parameter map (or `undefined` for none).
6800
+ * @returns The referenced inputIds (empty for a tokenless / absent template).
6801
+ */
6802
+ function collectQueryTemplateInputIds(template) {
6803
+ return [...resolveQueryTemplate(template, () => undefined).missing];
6804
+ }
6805
+ /**
6806
+ * The unmet-token inputIds for a query template at the current values — feeds
6807
+ * the missing-dependency diagnostic. Twin of {@link unmetHeaderInputs}.
6808
+ *
6809
+ * @param template - The authored query-parameter map.
6810
+ * @param readDep - Reader for a dependency input's current value.
6811
+ * @returns The deduped inputIds whose token currently resolves to an empty value.
6812
+ */
6813
+ function unmetQueryInputs(template, readDep) {
6814
+ return [...resolveQueryTemplate(template, readDep).missing];
6815
+ }
6816
+ /**
6817
+ * Merges resolved template query params into a fetch's existing
6818
+ * `httpHeaderOptions`.
6819
+ *
6820
+ * The template wins on a name collision — it is the live, author-facing surface,
6821
+ * whereas `httpHeaderOptions.params` is the persisted static bag. When there is
6822
+ * nothing to merge the `base` reference is returned **unchanged**, so a config
6823
+ * without a query template produces byte-for-byte the request it produced before
6824
+ * query templates existed. Any literal query text inside `httpEndPoint` is not
6825
+ * touched here — the HTTP layer appends `params` after it.
6826
+ *
6827
+ * @param base - The options bag so far (may be absent).
6828
+ * @param params - The resolved template query params.
6829
+ * @returns The options bag to pass to the HTTP function.
6830
+ */
6831
+ function mergeQueryOptions(base, params) {
6832
+ if (Object.keys(params).length === 0)
6833
+ return base;
6834
+ return { ...base, params: { ...base?.params, ...params } };
6835
+ }
6836
+ /**
6837
+ * Merges resolved template headers into a fetch's existing `httpHeaderOptions`.
6838
+ *
6839
+ * The template wins on a name collision — it is the live, author-facing surface,
6840
+ * whereas `httpHeaderOptions` is the persisted static bag. When there is nothing
6841
+ * to merge the `base` reference is returned **unchanged**, so a config without a
6842
+ * header template produces byte-for-byte the request it produced before header
6843
+ * templates existed.
6844
+ *
6845
+ * @param base - The fetch's `httpHeaderOptions` (may be absent).
6846
+ * @param headers - The resolved template headers.
6847
+ * @returns The options bag to pass to the HTTP function.
6848
+ */
6849
+ function mergeHeaderOptions(base, headers) {
6850
+ if (Object.keys(headers).length === 0)
6851
+ return base;
6852
+ return { ...base, headers: { ...base?.headers, ...headers } };
6853
+ }
6854
+ /**
6855
+ * Selects the transport for a body-bearing fetch: a `PUT` config goes through
6856
+ * `httpPutDataFunction`, everything else through `httpPostDataFunction`.
6857
+ * PUT rides the POST branch family in both the value and options builders —
6858
+ * gating, body shaping and hints are identical; only the wire verb differs.
6859
+ *
6860
+ * @param fetchCfg - The resolved fetch config (absent falls back to POST).
6861
+ * @param utils - The builder context's utility bag carrying both transports.
6862
+ * @returns The transport function to call with `(url, body, options)`.
6863
+ */
6864
+ function resolveBodyTransport(fetchCfg, utils) {
6865
+ return fetchCfg?.httpMethod?.toUpperCase() === 'PUT'
6866
+ ? utils.httpPutDataFunction
6867
+ : utils.httpPostDataFunction;
6868
+ }
6869
+ /**
6870
+ * Builds the `params` signal every value/options API `resource()` is driven by.
6871
+ *
6872
+ * Returns `undefined` — which keeps the resource `idle`, issuing no request —
6873
+ * when ANY gate fires:
6874
+ * 0. the owning input is **hidden** by its conditional-display rules, or
6875
+ * 1. a `headerTemplate` token is still unmet, or
6876
+ * 1b. a `queryTemplate` token is still unmet (same contract — a request missing
6877
+ * a bound parameter returns the wrong data, so the fetch waits), or
6878
+ * 2. `buildBody` was supplied and itself returned `undefined` (the body's own
6879
+ * `validateMinInput` / unmet-token gate).
6880
+ *
6881
+ * Gate 0 is checked first and is the ONLY thing that stops a hidden input's
6882
+ * fetch. An Angular `resource()` is not lazy — `ResourceImpl` drives its loader
6883
+ * from its own eager `effect()`, which fires as soon as `params` is anything but
6884
+ * `undefined`, whether or not a consumer ever reads `.status()` or `.value()`.
6885
+ * A dependency-free static GET would otherwise fire on the first flush even
6886
+ * though its input is not on screen. Reading visibility here also means the
6887
+ * request fires exactly once, automatically, the moment the input is revealed.
6888
+ *
6889
+ * Header resolution runs first and short-circuits: while a header is unmet the
6890
+ * body's dependencies are not read, so the computed does not re-run on unrelated
6891
+ * body edits. Nothing is lost — the resource is idle either way, and satisfying
6892
+ * the header re-runs the computed, which then reads the body's dependencies and
6893
+ * wires them.
6894
+ *
6895
+ * Omitting `buildBody` means "this request has no body" (GET), which is NOT a
6896
+ * gate — a GET with only literal headers therefore yields a stable, dependency-free
6897
+ * params object and fires exactly once, preserving the pre-header-template
6898
+ * behaviour of the static GET branches.
6899
+ *
6900
+ * @param fetchCfg - The resolved fetch config (carries `headerTemplate` +
6901
+ * `httpHeaderOptions`); `undefined` yields headerless options.
6902
+ * @param readDep - The builder's cycle-safe `ctx.readDep`.
6903
+ * @param buildBody - Optional body factory; returning `undefined` gates the fetch.
6904
+ * @param isVisible - The owning input's `ctx.isVisible`. Omitted only by call
6905
+ * sites that have no input context; when omitted the request is never gated on
6906
+ * visibility.
6907
+ * @returns A `computed` params signal, structurally deduped so an unrelated form
6908
+ * edit never re-fires the request.
6909
+ */
6910
+ function buildApiRequestParams(fetchCfg, readDep, buildBody, isVisible) {
6911
+ return computed(() => {
6912
+ // Gate 0 — hidden inputs consume no resources. Checked before the header
6913
+ // read so a hidden input takes no dependency on its upstream fields.
6914
+ if (isVisible && !isVisible())
6915
+ return undefined;
6916
+ const { headers, missing } = resolveHeaderTemplate(fetchCfg?.headerTemplate, readDep);
6917
+ if (missing.length > 0)
6918
+ return undefined;
6919
+ // Gate 1b — query params gate exactly like headers. Resolved after them
6920
+ // so an unmet header short-circuits before the query tokens are read.
6921
+ const query = resolveQueryTemplate(fetchCfg?.queryTemplate, readDep);
6922
+ if (query.missing.length > 0)
6923
+ return undefined;
6924
+ const body = buildBody ? buildBody() : undefined;
6925
+ if (buildBody && body === undefined)
6926
+ return undefined;
6927
+ return {
6928
+ body,
6929
+ options: mergeQueryOptions(mergeHeaderOptions(fetchCfg?.httpHeaderOptions, headers), query.params),
6930
+ };
6931
+ }, {
6932
+ // The resolution allocates a fresh object on every recompute, and this
6933
+ // computed re-runs on ANY change to a value it reads. Without structural
6934
+ // equality the resource would treat every unrelated edit as a params change
6935
+ // and re-issue the request.
6936
+ equal: _isEqual,
6937
+ });
6938
+ }
6939
+
6940
+ /**
6941
+ * @file Shared diagnostic for the dependency-gated `FunctionType` builders.
6942
+ *
6943
+ * Three function types silently short-circuit when a *required upstream input*
6944
+ * they depend on has no value yet:
6945
+ *
6946
+ * | FunctionType | Short-circuit site |
6947
+ * |-----------------------|-----------------------------------------------------|
6948
+ * | `ValueCalculation` | `computed` returns `undefined` (a variable is empty)|
6949
+ * | `ValuePostMethodAPI` | `params` returns `undefined` → resource stays `idle`|
6950
+ * | `OptionsPostMethodAPI`| `params` returns `undefined` → resource stays `idle`|
6951
+ *
6952
+ * In every case the field is typically **required** (it either *is* the value,
6953
+ * or supplies the only way to pick the value), yet nothing is surfaced to the
6954
+ * user — the field just never calculates / never loads, and the user is left
6955
+ * guessing why. This module restores visibility: it names the missing upstream
6956
+ * field(s) by label and tells the user *what* is blocked, *where*, and *what to
6957
+ * do about it*.
6958
+ *
6959
+ * ## Why an `effect` (not the computed itself)
6960
+ *
6961
+ * The short-circuit is detected inside a `computed` (the calc signal / the
6962
+ * resource `params`). A `computed` MUST be side-effect free — calling
6963
+ * `setTemporaryHint` there (which patches the definition signal and arms a
6964
+ * timer) is the forbidden "write a signal inside a computed" anti-pattern and
6965
+ * would corrupt the signal graph. So this diagnostic runs in a dedicated
6966
+ * `effect()` — an external sink, exactly like the options builder's
6967
+ * resolved-edge `effect` and the persist `effect`. The effect reads the same
6968
+ * dependencies through `readDep`, so Angular re-runs it whenever they change.
6969
+ *
6970
+ * ## Emit policy (deterministic, self-throttling)
6971
+ *
6972
+ * The effect tracks the *set of still-missing dependency ids* between runs:
6973
+ *
6974
+ * 1. **First run establishes a silent baseline.** During `initialize()` the
6975
+ * effect's first flush happens *after* `#seedModelFromDefinition`, so the
6976
+ * baseline reflects authored defaults. No hint fires on load — a wholly
6977
+ * unstarted required field is already covered by standard required-field
6978
+ * validation, and a load-time hint would auto-clear before the user looked.
6979
+ * 2. **Subsequent runs emit only on a *change* to the missing-set** that leaves
6980
+ * it non-empty. This is the high-signal moment: the user edited something and
6981
+ * the function is *still* blocked — e.g. "you filled A, I still need B", or
6982
+ * they cleared a previously-supplied value. Deduping on the set key means a
6983
+ * stable missing-set never re-spams.
6984
+ * 3. **A now-empty missing-set emits nothing** — the function proceeds (the
6985
+ * calc runs / the resource fires), which is its own feedback.
6986
+ *
6987
+ * ## Hint semantics
6988
+ *
6989
+ * Emitted as {@link HintType.WARNING} (⚠️, amber). Per the design rule book a
6990
+ * missing dependency is *user-action-needed, not failure/culpability* — amber,
6991
+ * never error-red. Red is reserved for genuine failures (HTTP errors keep their
6992
+ * existing {@link FormTowerControllerService.setInputTemporaryError} red hints).
6993
+ */
6994
+ /**
6995
+ * Collects the dependency input ids a single `minimumInputRequired` entry maps
6996
+ * to. `'default'` entries (which carry their value inline) map to nothing and
6997
+ * yield `[]`, so they can never be reported as "missing".
6998
+ *
6999
+ * Handles both the single-target (`mapto`) shape (`mapTo.inputId`) and the
7000
+ * multi-target (`mapDocFilter`) shape (`mapTo: Array<{ inputId }>`), mirroring
7001
+ * the snapshot-building logic in the value/options POST-computed builders.
7002
+ *
7003
+ * @param minInput - A `minimumInputRequired` entry (loosely typed to the only
7004
+ * fields read here, avoiding an `@angular/common/http` type import).
7005
+ * @returns The mapped dependency input ids (possibly empty).
7006
+ */
7007
+ /**
7008
+ * Resolves the snapshot entry for a `minimumInputRequired` entry that maps a
7009
+ * **DateRangePicker** dependency, or `undefined` for every other entry.
7010
+ *
7011
+ * A date range is not one input: the tower flattens the column into TWO flat
7012
+ * controls whose ids are `${columnId}.${startKey}` / `${columnId}.${endKey}` —
7013
+ * the raw column id the editor writes into `mapTo.inputId` resolves to nothing.
7014
+ * Meanwhile both consumers of the snapshot (`validateMinInput` via
7015
+ * `getMinInputValue`, and `returnMappedData`) read a date-range entry under
7016
+ * `formValues[minInput.name]`, and by legacy convention the entry's `name` IS
7017
+ * the half's control key (e.g. `startPeriod` / `endPeriod` — one entry per
7018
+ * half). So the half's dotted id is `${mapTo.inputId}.${name}`, and the value
7019
+ * must land in the snapshot under `name`.
7020
+ *
7021
+ * Shared by the value builder, the options builder, and
7022
+ * {@link computeUnmetMinInputs} so the gate and its diagnostic can never
7023
+ * disagree about what a date-range entry is waiting on.
7024
+ *
7025
+ * @param minInput - A `minimumInputRequired` entry (loosely typed).
7026
+ * @returns `{ name, halfInputId }` for a date-range `mapto` entry; else `undefined`.
7027
+ */
7028
+ function dateRangeSnapshotEntry(minInput) {
7029
+ const mapTo = minInput.mapTo;
7030
+ if (!mapTo || Array.isArray(mapTo) || typeof mapTo !== 'object')
7031
+ return undefined;
7032
+ const entry = mapTo;
7033
+ if (entry.element !== ElementTypes.DateRangePicker)
7034
+ return undefined;
7035
+ if (!entry.inputId || !minInput.name)
7036
+ return undefined;
7037
+ return { name: minInput.name, halfInputId: `${entry.inputId}.${minInput.name}` };
7038
+ }
7039
+ function collectMinInputDepIds(minInput) {
7040
+ // A 'default' entry carries its value inline and tracks no dependency, even
7041
+ // when a stray `mapTo` survives an editor mode switch (D3 alignment — the
7042
+ // builders' snapshot loops key on `type`, and the diagnostic must agree).
7043
+ if (minInput.type === 'default')
7044
+ return [];
7045
+ // A date-range entry's real dependency is the HALF control, not the raw
7046
+ // column id the editor persisted (which resolves to nothing in the tower).
7047
+ const range = dateRangeSnapshotEntry(minInput);
7048
+ if (range)
7049
+ return [range.halfInputId];
7050
+ const mapTo = minInput.mapTo;
7051
+ if (Array.isArray(mapTo)) {
7052
+ return mapTo
7053
+ .map((entry) => entry?.inputId)
7054
+ .filter((id) => typeof id === 'string' && id.length > 0);
7055
+ }
7056
+ if (mapTo && typeof mapTo === 'object') {
7057
+ const id = mapTo.inputId;
7058
+ return id ? [id] : [];
7059
+ }
7060
+ return [];
7061
+ }
7062
+ /**
7063
+ * Computes the unmet dependency input ids for an HTTP POST-computed function
7064
+ * (`ValuePostMethodAPI` / `OptionsPostMethodAPI`), mirroring the builder's own
7065
+ * `params` validation: it assembles a snapshot of every mapped dependency value
7066
+ * via `readDep`, then runs the supplied `validate` (the shared `validateMinInput`)
7067
+ * for each non-`'default'` entry. Any entry that fails contributes its mapped
7068
+ * dependency ids to the result.
7069
+ *
7070
+ * The validator is injected (rather than imported) so this module stays free of
7071
+ * the `t-form-controller` value-fetch helpers and any import-cycle risk.
7072
+ *
7073
+ * @typeParam M - The `minimumInputRequired` entry shape (only `mapTo` is read here).
7074
+ * @param minInputs - The fetch config's `backEndConfig.minimumInputRequired`.
7075
+ * @param readDep - Cycle-safe dependency reader from {@link DerivedBuildContext}.
7076
+ * @param validate - Predicate returning `true` when an entry is satisfied
7077
+ * (typically `(m, snap) => validateMinInput(m, snap)`); a throw is treated as
7078
+ * unsatisfied, matching the builders' `try/catch`.
7079
+ * @returns The unmet dependency input ids (empty when every entry is satisfied).
7080
+ */
7081
+ function computeUnmetMinInputs(minInputs, readDep, validate) {
7082
+ const snapshot = {};
7083
+ for (const minInput of minInputs) {
7084
+ // Mirror the builders' snapshot exactly: a date-range entry stores the HALF
7085
+ // value under the entry's `name` (that is the key `validateMinInput` reads).
7086
+ const range = dateRangeSnapshotEntry(minInput);
7087
+ if (range) {
7088
+ snapshot[range.name] = readDep(range.halfInputId);
7089
+ continue;
7090
+ }
7091
+ for (const id of collectMinInputDepIds(minInput))
7092
+ snapshot[id] = readDep(id);
7093
+ }
7094
+ const missing = [];
7095
+ for (const minInput of minInputs) {
7096
+ const depIds = collectMinInputDepIds(minInput);
7097
+ if (depIds.length === 0)
7098
+ continue; // 'default' entries carry inline values
7099
+ let satisfied;
7100
+ try {
7101
+ satisfied = validate(minInput, snapshot);
7102
+ }
7103
+ catch {
7104
+ satisfied = false;
7105
+ }
7106
+ if (!satisfied)
7107
+ missing.push(...depIds);
7108
+ }
7109
+ return missing;
7110
+ }
7111
+ /**
7112
+ * Surfaces a config error for `minimumInputRequired` entries of the deprecated
7113
+ * type `'bind'` — a type nothing implements: no snapshot loop reads it, no body
7114
+ * builder maps it, and `validateMinInput` reports it unsatisfied, so a fetch
7115
+ * carrying one is *permanently idle*. Because a `'bind'` entry has no `mapTo`,
7116
+ * the missing-dependency diagnostic can never name it either — without this
7117
+ * warning the field just silently never loads.
7118
+ *
7119
+ * Emitted once, at build time (mirroring the GET missing-config error), naming
7120
+ * every offending entry so the author can re-map it in the editor.
7121
+ *
7122
+ * @param input - The column-input config that owns the fetch.
7123
+ * @param ctx - Shared build context (hint channel).
7124
+ * @param minInputs - The fetch config's `backEndConfig.minimumInputRequired`
7125
+ * (loosely typed to the two fields read here).
7126
+ */
7127
+ /**
7128
+ * Names the field(s) an unmet `headerTemplate` OR `queryTemplate` token is
7129
+ * waiting on, so a fetch held idle by a transport template is as visible as one
7130
+ * held idle by a payload mapping. No-op when the fetch has neither template
7131
+ * (nothing can gate). Shared by the value and options builders (one copy per
7132
+ * builder file used to drift — D13).
7133
+ *
7134
+ * @param input - The column-input that owns the fetch (id + display label).
7135
+ * @param ctx - Shared build context.
7136
+ * @param fetchCfg - The resolved fetch config (may be absent).
7137
+ * @param kind - Selects the hint phrasing (`'value'` vs `'options'`).
7138
+ */
7139
+ function wireRequestTemplateDiagnostic(input, ctx, fetchCfg, kind) {
7140
+ const headerTemplate = fetchCfg?.headerTemplate;
7141
+ const queryTemplate = fetchCfg?.queryTemplate;
7142
+ if (!headerTemplate && !queryTemplate)
7143
+ return;
7144
+ wireMissingDependencyDiagnostic(ctx, {
7145
+ inputId: input.id,
7146
+ targetLabel: input.label?.trim() || input.id,
7147
+ kind,
7148
+ readMissing: () => [
7149
+ ...new Set([
7150
+ ...unmetHeaderInputs(headerTemplate, ctx.readDep),
7151
+ ...unmetQueryInputs(queryTemplate, ctx.readDep),
7152
+ ]),
7153
+ ],
7154
+ });
7155
+ }
7156
+ function warnUnsupportedBindEntries(input, ctx, minInputs) {
7157
+ const bindNames = minInputs
7158
+ .filter((m) => m.type === 'bind')
7159
+ .map((m) => (m.name?.trim() ? m.name : '(unnamed)'));
7160
+ if (bindNames.length === 0)
7161
+ return;
7162
+ ctx.utils.setInputTemporaryError(input.id, `Unsupported mapping type 'bind' on "${bindNames.join('", "')}" — this fetch can never fire. Re-map the entry in the form editor.`);
7163
+ }
7164
+ /**
7165
+ * Renders the human-readable, action-oriented label list (`"A"`, `"A" and "B"`,
7166
+ * `"A", "B" and "C"`), de-duplicated and blank-stripped.
7167
+ *
7168
+ * @internal
7169
+ */
7170
+ function joinLabels(labels) {
7171
+ const unique = [...new Set(labels)].filter((l) => l && l.trim().length > 0);
7172
+ const quoted = unique.map((l) => `"${l}"`);
7173
+ if (quoted.length <= 1)
7174
+ return { list: quoted[0] ?? 'an upstream field', plural: false };
7175
+ return {
7176
+ list: `${quoted.slice(0, -1).join(', ')} and ${quoted[quoted.length - 1]}`,
7177
+ plural: true,
7178
+ };
7179
+ }
7180
+ /**
7181
+ * Builds the context-rich hint message for a short-circuited function: it states
7182
+ * *what* is blocked (this field, by label), *with what* (the missing upstream
7183
+ * fields, by label), and *what to do* (provide them).
7184
+ *
7185
+ * @param targetLabel - The blocked input's own display label.
7186
+ * @param missingLabels - Display labels of the unmet dependency inputs.
7187
+ * @param kind - The function's work kind (selects phrasing).
7188
+ * @returns The plain hint string (the leading ⚠️ icon is added by `setTemporaryHint`).
6682
7189
  */
6683
7190
  function formatMissingDependencyHint(targetLabel, missingLabels, kind) {
6684
7191
  const { list, plural } = joinLabels(missingLabels);
@@ -6783,7 +7290,16 @@ function wireInputSetDiagnostic(ctx, opts) {
6783
7290
  let firstRun = true;
6784
7291
  let prevKey = '';
6785
7292
  const ref = effect(() => {
6786
- const ids = opts.readIds(); // reads deps via readDep → reactive
7293
+ // A hidden input's function is not blocked — it is switched off. Telling
7294
+ // the user to fill something in for a field that is not on screen is noise,
7295
+ // and the hint write patches the definition signal, which would churn every
7296
+ // definition consumer on each visibility flip.
7297
+ if (!ctx.isVisible())
7298
+ return;
7299
+ // A hidden dependency reads `undefined` through the gated `readDep`, so it
7300
+ // looks "missing" to `readIds()`. Drop those: the user cannot act on a
7301
+ // field that is not on screen, and naming it would be actively misleading.
7302
+ const ids = opts.readIds().filter((id) => ctx.isVisible(id));
6787
7303
  const key = [...ids].sort().join('|');
6788
7304
  // 1. First flush (post-seed): record the baseline silently — no load spam.
6789
7305
  if (firstRun) {
@@ -7322,7 +7838,6 @@ function validateMinInput(input, formValues) {
7322
7838
  if (!mapDocFilterIsValid) {
7323
7839
  throw new Error(`Please provide valid values for ${input.name}.`);
7324
7840
  }
7325
- 1;
7326
7841
  return mapDocFilterIsValid;
7327
7842
  default:
7328
7843
  return false;
@@ -7504,7 +8019,11 @@ function inputGetApiPostData(inputConfig, formValues, dataFor, utils) {
7504
8019
  return throwError(() => error instanceof Error ? error.message : 'Failed to fetch data');
7505
8020
  }
7506
8021
  }
7507
- function returnMappedData(formValues, minInputs, endpoint) {
8022
+ // _endpoint is retained for call-site stability only. It used to select a
8023
+ // hardcoded per-endpoint payload reshape (/api/internal/getListBudgetData),
8024
+ // which was removed by owner decision (2026-08-18): endpoint-specific body
8025
+ // shapes are expressed with backEndConfig.payloadTemplate instead.
8026
+ function returnMappedData(formValues, minInputs, _endpoint) {
7508
8027
  try {
7509
8028
  const newData = {
7510
8029
  data: {},
@@ -7552,254 +8071,20 @@ function returnMappedData(formValues, minInputs, endpoint) {
7552
8071
  newData['docFilter'] = docFilter;
7553
8072
  }
7554
8073
  else {
7555
- newData.data['docFilter'] = docFilter;
7556
- }
7557
- }
7558
- }
7559
- // budget depleted
7560
- if (endpoint === "/api/internal/getListBudgetData") {
7561
- const { startPeriod, endPeriod, searchFilter } = newData;
7562
- const payload = { ...newData, startPeriod: undefined, endPeriod: undefined, searchFilter: undefined };
7563
- payload.data['filter'] = {};
7564
- return {
7565
- startPeriod, endPeriod, searchFilter,
7566
- ...payload,
7567
- };
7568
- }
7569
- if (Object.keys(newData.data || {}).length === 0) {
7570
- newData.data = undefined;
7571
- }
7572
- return newData;
7573
- }
7574
- catch (error) {
7575
- console.error(`[returnMappedData] an error occurred:`, error);
7576
- const msg = error instanceof Error ? error.message : 'Failed to fetch data';
7577
- throw new Error(msg);
7578
- }
7579
- }
7580
-
7581
- /**
7582
- * @file Pure resolver for the `headerTemplate` request-header template.
7583
- *
7584
- * A {@link HeaderTemplate} is authored as the literal JSON header map an endpoint
7585
- * expects, with the same two special string forms {@link resolvePayloadTemplate}
7586
- * recognises — but applied to header **values** only (header names are always
7587
- * literal, because a header whose *name* moved with the form data could not be
7588
- * matched by the endpoint):
7589
- *
7590
- * | Value | Meaning |
7591
- * |-----------------------|---------------------------------------------------------|
7592
- * | `"{{inputId}}"` | **Raw substitution** — that input's live value, stringified. |
7593
- * | `"Bearer {{token}}"` | **Interpolation** — each token replaced by `String(v)`. |
7594
- * | any other literal | **Fixed default** — emitted as text (numbers/booleans stringified). |
7595
- *
7596
- * ### Why headers gate the fetch (idle contract)
7597
- * A token whose resolved value is empty (`undefined` / `null` / `''`) lands in
7598
- * `missing`, and the API builders return `undefined` params while `missing` is
7599
- * non-empty — exactly as they do for an unmet payload token. The alternative
7600
- * (send the request with the header dropped) trades a deferred request for a
7601
- * guaranteed failure: a fetch whose `Authorization` or tenant header has not
7602
- * resolved yet does not return partial data, it returns 401/403. Waiting for the
7603
- * bound field and firing once is both cheaper and the only behaviour that
7604
- * produces a correct result. The unmet ids also feed the missing-dependency
7605
- * diagnostic, so the user is told *which* field the fetch is waiting on.
7606
- *
7607
- * A **tokenless** header is never "missing" — it is a fixed default and resolves
7608
- * immediately, so a config with only literal headers stays as eager as it was
7609
- * before headers existed. A blank literal is dropped rather than sent empty.
7610
- *
7611
- * ### Applies to GET as well as POST
7612
- * Headers are a transport concern, not a body concern. That is why this module is
7613
- * separate from `payload-template.ts` and why {@link buildApiRequestParams} —
7614
- * which every value/options branch routes through — treats the body as optional:
7615
- * a GET has no body but may well have a live-bound header, and must therefore
7616
- * re-fetch when that header's field changes.
7617
- *
7618
- * ### Purity
7619
- * No Angular DI, no I/O. `readDep` is the sole injected accessor; calling this
7620
- * from inside a `computed` is what makes the enclosing `params` reactive.
7621
- */
7622
- /** A string leaf that is EXACTLY a single token, e.g. `"{{accessToken}}"`. */
7623
- const RAW_TOKEN = /^\{\{\s*([^{}]+?)\s*\}\}$/;
7624
- /** Every `{{token}}` occurrence inside a string leaf (global, for interpolation). */
7625
- const TOKEN_GLOBAL = /\{\{\s*([^{}]+?)\s*\}\}/g;
7626
- /** A resolved value counts as "missing" (idle-gating) when empty. */
7627
- function isEmpty(value) {
7628
- return value === undefined || value === null || value === '';
7629
- }
7630
- /**
7631
- * Renders a resolved dependency value as header text.
7632
- *
7633
- * Objects and arrays are JSON-serialised rather than passed to `String()`, whose
7634
- * `"[object Object]"` would be silently accepted by the transport and rejected
7635
- * (or worse, misread) by the endpoint. A header bound to a structured value is
7636
- * almost always a misconfiguration; serialising it keeps the mistake visible in
7637
- * the request instead of hiding it behind a placeholder.
7638
- *
7639
- * @param value - The resolved dependency value.
7640
- * @returns The value as header text.
7641
- */
7642
- function toHeaderText(value) {
7643
- if (typeof value === 'object') {
7644
- try {
7645
- return JSON.stringify(value);
7646
- }
7647
- catch {
7648
- return String(value);
7649
- }
7650
- }
7651
- return String(value);
7652
- }
7653
- /**
7654
- * Resolves a {@link HeaderTemplate} against the current form values.
7655
- *
7656
- * Pure — call it from inside a `computed` so every `readDep` read wires the
7657
- * template's token inputs as reactive dependencies (edit a bound field ⇒ the
7658
- * computed re-runs ⇒ the resource re-fetches with the new header).
7659
- *
7660
- * @param template - The authored header map (or `undefined` for none).
7661
- * @param readDep - Reader for a dependency input's current value (the builder's
7662
- * cycle-safe `ctx.readDep`).
7663
- * @returns The resolved `headers` plus the `missing` unmet-token inputIds.
7664
- */
7665
- function resolveHeaderTemplate(template, readDep) {
7666
- const headers = {};
7667
- const missing = new Set();
7668
- if (!template || typeof template !== 'object')
7669
- return { headers, missing: [] };
7670
- for (const [rawName, rawValue] of Object.entries(template)) {
7671
- const name = rawName.trim();
7672
- if (name === '')
7673
- continue; // an unnamed header cannot be sent
7674
- if (typeof rawValue !== 'string') {
7675
- // Typed literal (number / boolean) — a fixed default, never a dependency.
7676
- if (rawValue === null || rawValue === undefined)
7677
- continue;
7678
- headers[name] = toHeaderText(rawValue);
7679
- continue;
7680
- }
7681
- const exact = RAW_TOKEN.exec(rawValue);
7682
- if (exact) {
7683
- const inputId = exact[1].trim();
7684
- const value = readDep(inputId);
7685
- if (isEmpty(value)) {
7686
- missing.add(inputId);
7687
- continue;
7688
- }
7689
- headers[name] = toHeaderText(value);
7690
- continue;
7691
- }
7692
- if (rawValue.includes('{{')) {
7693
- // Interpolation — stitch tokens into the surrounding text. Guard on
7694
- // `includes('{{')` rather than a stateful `.test()` on the /g regex, which
7695
- // would advance lastIndex and corrupt the replace.
7696
- const interpolated = rawValue.replace(TOKEN_GLOBAL, (_match, rawId) => {
7697
- const inputId = rawId.trim();
7698
- const value = readDep(inputId);
7699
- if (isEmpty(value)) {
7700
- missing.add(inputId);
7701
- return '';
7702
- }
7703
- return toHeaderText(value);
7704
- });
7705
- headers[name] = interpolated;
7706
- continue;
7707
- }
7708
- // Plain literal. A blank one is dropped: the author cleared the value, and
7709
- // sending an empty header is never what that means.
7710
- if (rawValue === '')
7711
- continue;
7712
- headers[name] = rawValue;
7713
- }
7714
- return { headers, missing: [...missing] };
7715
- }
7716
- /**
7717
- * The deduped inputIds a {@link HeaderTemplate} references through `{{inputId}}`
7718
- * tokens — the template's **dependency set**.
7719
- *
7720
- * Implemented by resolving with a reader that yields `undefined` for every id, so
7721
- * the resolver's own walk (single source of truth for what counts as a token)
7722
- * also enumerates them. No second parser to drift out of sync.
7723
- *
7724
- * @param template - The authored header map (or `undefined` for none).
7725
- * @returns The referenced inputIds (empty for a tokenless / absent template).
7726
- */
7727
- function collectHeaderTemplateInputIds(template) {
7728
- return [...resolveHeaderTemplate(template, () => undefined).missing];
7729
- }
7730
- /**
7731
- * The unmet-token inputIds for a header template at the current values — the
7732
- * `missing` slice of {@link resolveHeaderTemplate}, exposed for the
7733
- * missing-dependency diagnostic hint (`readMissing`).
7734
- *
7735
- * @param template - The authored header map.
7736
- * @param readDep - Reader for a dependency input's current value.
7737
- * @returns The deduped inputIds whose token currently resolves to an empty value.
7738
- */
7739
- function unmetHeaderInputs(template, readDep) {
7740
- return [...resolveHeaderTemplate(template, readDep).missing];
7741
- }
7742
- /**
7743
- * Merges resolved template headers into a fetch's existing `httpHeaderOptions`.
7744
- *
7745
- * The template wins on a name collision — it is the live, author-facing surface,
7746
- * whereas `httpHeaderOptions` is the persisted static bag. When there is nothing
7747
- * to merge the `base` reference is returned **unchanged**, so a config without a
7748
- * header template produces byte-for-byte the request it produced before header
7749
- * templates existed.
7750
- *
7751
- * @param base - The fetch's `httpHeaderOptions` (may be absent).
7752
- * @param headers - The resolved template headers.
7753
- * @returns The options bag to pass to the HTTP function.
7754
- */
7755
- function mergeHeaderOptions(base, headers) {
7756
- if (Object.keys(headers).length === 0)
7757
- return base;
7758
- return { ...base, headers: { ...base?.headers, ...headers } };
7759
- }
7760
- /**
7761
- * Builds the `params` signal every value/options API `resource()` is driven by.
7762
- *
7763
- * Returns `undefined` — which keeps the resource `idle`, issuing no request —
7764
- * when EITHER gate fires:
7765
- * 1. a `headerTemplate` token is still unmet, or
7766
- * 2. `buildBody` was supplied and itself returned `undefined` (the body's own
7767
- * `validateMinInput` / unmet-token gate).
7768
- *
7769
- * Header resolution runs first and short-circuits: while a header is unmet the
7770
- * body's dependencies are not read, so the computed does not re-run on unrelated
7771
- * body edits. Nothing is lost — the resource is idle either way, and satisfying
7772
- * the header re-runs the computed, which then reads the body's dependencies and
7773
- * wires them.
7774
- *
7775
- * Omitting `buildBody` means "this request has no body" (GET), which is NOT a
7776
- * gate — a GET with only literal headers therefore yields a stable, dependency-free
7777
- * params object and fires exactly once, preserving the pre-header-template
7778
- * behaviour of the static GET branches.
7779
- *
7780
- * @param fetchCfg - The resolved fetch config (carries `headerTemplate` +
7781
- * `httpHeaderOptions`); `undefined` yields headerless options.
7782
- * @param readDep - The builder's cycle-safe `ctx.readDep`.
7783
- * @param buildBody - Optional body factory; returning `undefined` gates the fetch.
7784
- * @returns A `computed` params signal, structurally deduped so an unrelated form
7785
- * edit never re-fires the request.
7786
- */
7787
- function buildApiRequestParams(fetchCfg, readDep, buildBody) {
7788
- return computed(() => {
7789
- const { headers, missing } = resolveHeaderTemplate(fetchCfg?.headerTemplate, readDep);
7790
- if (missing.length > 0)
7791
- return undefined;
7792
- const body = buildBody ? buildBody() : undefined;
7793
- if (buildBody && body === undefined)
7794
- return undefined;
7795
- return { body, options: mergeHeaderOptions(fetchCfg?.httpHeaderOptions, headers) };
7796
- }, {
7797
- // The resolution allocates a fresh object on every recompute, and this
7798
- // computed re-runs on ANY change to a value it reads. Without structural
7799
- // equality the resource would treat every unrelated edit as a params change
7800
- // and re-issue the request.
7801
- equal: _isEqual,
7802
- });
8074
+ newData.data['docFilter'] = docFilter;
8075
+ }
8076
+ }
8077
+ }
8078
+ if (Object.keys(newData.data || {}).length === 0) {
8079
+ newData.data = undefined;
8080
+ }
8081
+ return newData;
8082
+ }
8083
+ catch (error) {
8084
+ console.error(`[returnMappedData] an error occurred:`, error);
8085
+ const msg = error instanceof Error ? error.message : 'Failed to fetch data';
8086
+ throw new Error(msg);
8087
+ }
7803
8088
  }
7804
8089
 
7805
8090
  /**
@@ -7953,8 +8238,8 @@ function buildValueGetMethodApi(input, ctx) {
7953
8238
  // options. With no `headerTemplate` the computed reads nothing reactive and
7954
8239
  // yields a stable object — the resource fires exactly once, as it always
7955
8240
  // has. With a live-bound header it re-fires when that field changes.
7956
- params: buildApiRequestParams(fetchCfg, ctx.readDep),
7957
- loader: async ({ params }) => {
8241
+ params: buildApiRequestParams(fetchCfg, ctx.readDep, undefined, ctx.isVisible),
8242
+ loader: async ({ params, abortSignal }) => {
7958
8243
  if (!fetchCfg) {
7959
8244
  ctx.utils.setInputTemporaryError(input.id, `Cannot fetch data. Source is not from an API`);
7960
8245
  return undefined;
@@ -7963,40 +8248,28 @@ function buildValueGetMethodApi(input, ctx) {
7963
8248
  if (params === undefined)
7964
8249
  return undefined;
7965
8250
  try {
8251
+ // LOADING hint, matching the POST branches (alignment, 2026-08-18).
8252
+ ctx.utils.setTemporaryHint(input.id, 'Fetching data...', HintType.LOADING);
7966
8253
  const rawData = await firstValueFrom(ctx.utils.httpGetDataFunction(fetchCfg.httpEndPoint, params.options));
8254
+ // Superseded mid-flight: the newer fetch owns the hint channel.
8255
+ if (abortSignal.aborted)
8256
+ return undefined;
7967
8257
  ctx.utils.setTemporaryHint(input.id, `Data fetched successfully`, HintType.SUCCESS);
7968
8258
  return applyValueAccessRules$1(input, fetchCfg, rawData);
7969
8259
  }
7970
8260
  catch (error) {
8261
+ // A superseded fetch's late failure must not paint an error over the
8262
+ // live fetch's state — rethrow silently so the stale run just ends.
8263
+ if (abortSignal.aborted)
8264
+ throw error;
7971
8265
  ctx.utils.setInputTemporaryError(input.id, `Error fetching data from API`);
7972
8266
  throw error;
7973
8267
  }
7974
8268
  },
7975
8269
  }));
7976
- wireHeaderDiagnostic$1(input, ctx, fetchCfg, 'value');
8270
+ wireRequestTemplateDiagnostic(input, ctx, fetchCfg, 'value');
7977
8271
  return { kind: 'resource', resource: ref };
7978
8272
  }
7979
- /**
7980
- * Names the field(s) an unmet `headerTemplate` token is waiting on, so a fetch
7981
- * held idle by a header is as visible as one held idle by a payload mapping.
7982
- * No-op when the fetch has no header template (nothing can gate).
7983
- *
7984
- * @param input - The column-input config for the target field.
7985
- * @param ctx - Shared build context.
7986
- * @param fetchCfg - The resolved fetch config (may be absent).
7987
- * @param kind - Selects the hint phrasing (`'value'` vs `'options'`).
7988
- */
7989
- function wireHeaderDiagnostic$1(input, ctx, fetchCfg, kind) {
7990
- const template = fetchCfg?.headerTemplate;
7991
- if (!template)
7992
- return;
7993
- wireMissingDependencyDiagnostic(ctx, {
7994
- inputId: input.id,
7995
- targetLabel: input.label?.trim() || input.id,
7996
- kind,
7997
- readMissing: () => unmetHeaderInputs(template, ctx.readDep),
7998
- });
7999
- }
8000
8273
  // ---------------------------------------------------------------------------
8001
8274
  // POST-static branch (ValuePostMethodAPIWithAllDefaultParams)
8002
8275
  // ---------------------------------------------------------------------------
@@ -8030,8 +8303,8 @@ function buildValuePostMethodApiWithAllDefaultParams(input, ctx) {
8030
8303
  catch {
8031
8304
  return undefined;
8032
8305
  }
8033
- }),
8034
- loader: async ({ params }) => {
8306
+ }, ctx.isVisible),
8307
+ loader: async ({ params, abortSignal }) => {
8035
8308
  if (!fetchCfg) {
8036
8309
  ctx.utils.setInputTemporaryError(input.id, `Cannot fetch data. Source is not from an API`);
8037
8310
  return undefined;
@@ -8041,22 +8314,24 @@ function buildValuePostMethodApiWithAllDefaultParams(input, ctx) {
8041
8314
  return undefined;
8042
8315
  try {
8043
8316
  ctx.utils.setTemporaryHint(input.id, 'Fetching data...', HintType.LOADING);
8044
- const rawData = await firstValueFrom(ctx.utils.httpPostDataFunction(fetchCfg.httpEndPoint, params.body, params.options));
8045
- const { valueAccessRules } = fetchCfg;
8046
- const extracted = !valueAccessRules
8047
- ? rawData
8048
- : getValueFromValueAccessor(valueAccessRules, rawData);
8049
- const result = mapRowsForInput(input, extracted);
8317
+ const rawData = await firstValueFrom(resolveBodyTransport(fetchCfg, ctx.utils)(fetchCfg.httpEndPoint, params.body, params.options));
8318
+ // Superseded mid-flight: the newer fetch owns the hint channel.
8319
+ if (abortSignal.aborted)
8320
+ return undefined;
8321
+ const result = applyValueAccessRules$1(input, fetchCfg, rawData);
8050
8322
  ctx.utils.setTemporaryHint(input.id, 'Data fetched successfully', HintType.SUCCESS);
8051
8323
  return result;
8052
8324
  }
8053
8325
  catch (error) {
8326
+ // Superseded late failure: no error paint over the live fetch.
8327
+ if (abortSignal.aborted)
8328
+ throw error;
8054
8329
  ctx.utils.setInputTemporaryError(input.id, `Error fetching data from API`);
8055
8330
  throw error;
8056
8331
  }
8057
8332
  },
8058
8333
  }));
8059
- wireHeaderDiagnostic$1(input, ctx, fetchCfg, 'value');
8334
+ wireRequestTemplateDiagnostic(input, ctx, fetchCfg, 'value');
8060
8335
  return { kind: 'resource', resource: ref };
8061
8336
  }
8062
8337
  // ---------------------------------------------------------------------------
@@ -8120,8 +8395,17 @@ function buildValuePostMethodApi(input, ctx) {
8120
8395
  if (minInput.type === 'mapto' &&
8121
8396
  minInput.mapTo &&
8122
8397
  !Array.isArray(minInput.mapTo)) {
8123
- const mapToInput = minInput.mapTo;
8124
- snapshot[mapToInput.inputId] = ctx.readDep(mapToInput.inputId);
8398
+ // A date range is TWO flat controls — the raw column id the editor
8399
+ // persisted resolves to nothing, and validateMinInput/returnMappedData
8400
+ // read the value under the entry's `name` (the half's control key).
8401
+ const range = dateRangeSnapshotEntry(minInput);
8402
+ if (range) {
8403
+ snapshot[range.name] = ctx.readDep(range.halfInputId);
8404
+ }
8405
+ else {
8406
+ const mapToInput = minInput.mapTo;
8407
+ snapshot[mapToInput.inputId] = ctx.readDep(mapToInput.inputId);
8408
+ }
8125
8409
  }
8126
8410
  else if (minInput.type === 'mapDocFilter' &&
8127
8411
  Array.isArray(minInput.mapTo)) {
@@ -8158,23 +8442,25 @@ function buildValuePostMethodApi(input, ctx) {
8158
8442
  // ANY `#model` change (readDep reads the whole map), so without it the
8159
8443
  // resource would treat every unrelated value edit as a params change and
8160
8444
  // reload the API.
8161
- params: buildApiRequestParams(fetchCfg, ctx.readDep, buildBody),
8162
- loader: async ({ params }) => {
8445
+ params: buildApiRequestParams(fetchCfg, ctx.readDep, buildBody, ctx.isVisible),
8446
+ loader: async ({ params, abortSignal }) => {
8163
8447
  if (params === undefined) {
8164
8448
  return undefined;
8165
8449
  }
8166
8450
  try {
8167
8451
  ctx.utils.setTemporaryHint(input.id, 'Fetching data...', HintType.LOADING);
8168
- const rawData = await firstValueFrom(ctx.utils.httpPostDataFunction(fetchCfg.httpEndPoint, params.body, params.options));
8169
- const { valueAccessRules } = fetchCfg;
8170
- const extracted = !valueAccessRules
8171
- ? rawData
8172
- : getValueFromValueAccessor(valueAccessRules, rawData);
8173
- const result = mapRowsForInput(input, extracted);
8452
+ const rawData = await firstValueFrom(resolveBodyTransport(fetchCfg, ctx.utils)(fetchCfg.httpEndPoint, params.body, params.options));
8453
+ // Superseded mid-flight: the newer fetch owns the hint channel.
8454
+ if (abortSignal.aborted)
8455
+ return undefined;
8456
+ const result = applyValueAccessRules$1(input, fetchCfg, rawData);
8174
8457
  ctx.utils.setTemporaryHint(input.id, 'Data fetched successfully', HintType.SUCCESS);
8175
8458
  return result;
8176
8459
  }
8177
8460
  catch (error) {
8461
+ // Superseded late failure: no error paint over the live fetch.
8462
+ if (abortSignal.aborted)
8463
+ throw error;
8178
8464
  ctx.utils.setInputTemporaryError(input.id, `Error fetching data from API`);
8179
8465
  throw error;
8180
8466
  }
@@ -8194,7 +8480,7 @@ function buildValuePostMethodApi(input, ctx) {
8194
8480
  readMissing: () => computeUnmetMinInputs(minInputs, ctx.readDep, validateMinInput),
8195
8481
  });
8196
8482
  }
8197
- wireHeaderDiagnostic$1(input, ctx, fetchCfg, 'value');
8483
+ wireRequestTemplateDiagnostic(input, ctx, fetchCfg, 'value');
8198
8484
  return { kind: 'resource', resource: ref };
8199
8485
  }
8200
8486
  // ---------------------------------------------------------------------------
@@ -8232,18 +8518,24 @@ function buildValuePostMethodApiFromTemplate(input, ctx, fetchCfg) {
8232
8518
  return payload;
8233
8519
  };
8234
8520
  return resource({
8235
- params: buildApiRequestParams(fetchCfg, ctx.readDep, buildBody),
8236
- loader: async ({ params }) => {
8521
+ params: buildApiRequestParams(fetchCfg, ctx.readDep, buildBody, ctx.isVisible),
8522
+ loader: async ({ params, abortSignal }) => {
8237
8523
  if (params === undefined)
8238
8524
  return undefined;
8239
8525
  try {
8240
8526
  ctx.utils.setTemporaryHint(input.id, 'Fetching data...', HintType.LOADING);
8241
- const rawData = await firstValueFrom(ctx.utils.httpPostDataFunction(fetchCfg.httpEndPoint, params.body, params.options));
8527
+ const rawData = await firstValueFrom(resolveBodyTransport(fetchCfg, ctx.utils)(fetchCfg.httpEndPoint, params.body, params.options));
8528
+ // Superseded mid-flight: the newer fetch owns the hint channel.
8529
+ if (abortSignal.aborted)
8530
+ return undefined;
8242
8531
  const result = applyValueAccessRules$1(input, fetchCfg, rawData);
8243
8532
  ctx.utils.setTemporaryHint(input.id, 'Data fetched successfully', HintType.SUCCESS);
8244
8533
  return result;
8245
8534
  }
8246
8535
  catch (error) {
8536
+ // Superseded late failure: no error paint over the live fetch.
8537
+ if (abortSignal.aborted)
8538
+ throw error;
8247
8539
  ctx.utils.setInputTemporaryError(input.id, `Error fetching data from API`);
8248
8540
  throw error;
8249
8541
  }
@@ -8258,7 +8550,7 @@ function buildValuePostMethodApiFromTemplate(input, ctx, fetchCfg) {
8258
8550
  kind: 'value',
8259
8551
  readMissing: () => unmetTemplateInputs(template, ctx.readDep),
8260
8552
  });
8261
- wireHeaderDiagnostic$1(input, ctx, fetchCfg, 'value');
8553
+ wireRequestTemplateDiagnostic(input, ctx, fetchCfg, 'value');
8262
8554
  return { kind: 'resource', resource: ref };
8263
8555
  }
8264
8556
  // ---------------------------------------------------------------------------
@@ -8287,18 +8579,24 @@ function buildValuePostMethodApiFromTemplate(input, ctx, fetchCfg) {
8287
8579
  *
8288
8580
  * @param input - The full column-input config. `matOptions.fetch.value` must
8289
8581
  * carry an `APIDataFetchingConfigurationInterface` with an `httpMethod` of
8290
- * `'GET'` or `'POST'` and a valid `httpEndPoint`.
8582
+ * `'GET'`, `'POST'` or `'PUT'` (case-insensitive; PUT rides the POST branch
8583
+ * family with the PUT transport) and a valid `httpEndPoint`.
8291
8584
  * @param ctx - Shared build context (readDep, utils, injector).
8292
8585
  * @returns A {@link ResourceDerivedEntry} whose `.resource.value()` becomes
8293
8586
  * this input's value in the engine's merged `value()` computed.
8294
8587
  */
8295
8588
  function buildValueApiResource(input, ctx) {
8296
8589
  const fetchCfg = resolveValueFetchConfig(input);
8297
- const httpMethod = fetchCfg?.httpMethod;
8590
+ // Normalised: a persisted lowercase method must dispatch the same way here
8591
+ // as on the options side (which has always uppercased before comparing).
8592
+ const httpMethod = fetchCfg?.httpMethod?.toUpperCase();
8298
8593
  if (httpMethod === 'GET') {
8299
8594
  return buildValueGetMethodApi(input, ctx);
8300
8595
  }
8301
- if (httpMethod === 'POST') {
8596
+ // PUT rides the POST branch family — identical gating/body semantics; only
8597
+ // the transport differs (resolveBodyTransport picks httpPutDataFunction).
8598
+ if (httpMethod === 'POST' || httpMethod === 'PUT') {
8599
+ warnUnsupportedBindEntries(input, ctx, fetchCfg?.backEndConfig?.minimumInputRequired ?? []);
8302
8600
  // A payloadTemplate supersedes minimumInputRequired for body shaping — but
8303
8601
  // ONLY when the author has not explicitly chosen the mapped-inputs mode
8304
8602
  // (requestBodyMode). Taken BEFORE the all-default split: the template branch
@@ -8457,28 +8755,87 @@ function buildOptionsPatch(input, options) {
8457
8755
  },
8458
8756
  };
8459
8757
  }
8460
- // ---------------------------------------------------------------------------
8461
- // Internal helper — header-template diagnostic.
8462
- // ---------------------------------------------------------------------------
8758
+ /** `true` for values a `Set`-membership check compares meaningfully. */
8759
+ function isPrimitive(v) {
8760
+ return v === null || (typeof v !== 'object' && typeof v !== 'function');
8761
+ }
8463
8762
  /**
8464
- * Names the field(s) an unmet `headerTemplate` token is waiting on, so options
8465
- * held idle by a header are as visible as options held idle by a payload mapping.
8466
- * No-op when the fetch has no header template (nothing can gate).
8763
+ * Warns (amber, owner decision 2026-08-18) when a refreshed option set no
8764
+ * longer contains the value the user already chose. The value itself is left
8765
+ * untouched — options builders must not write value state (A-4), and the form
8766
+ * will still submit it — but the user is no longer left staring at a field
8767
+ * that silently renders no selection.
8467
8768
  *
8468
- * @param input - The full column-input configuration.
8469
- * @param ctx - Shared builder context.
8470
- * @param fetchConfig - The resolved options fetch config (may be absent).
8769
+ * Conservative by design: the comparison runs only when the chosen value(s)
8770
+ * and every candidate option value are primitives — object-shaped values have
8771
+ * no reliable identity here, and a false "stale" warning is worse than none.
8772
+ *
8773
+ * @param input - The column-input config that owns the options fetch.
8774
+ * @param ctx - Shared builder context (`readSelf` is untracked).
8775
+ * @param results - The freshly-resolved option list.
8471
8776
  */
8472
- function wireHeaderDiagnostic(input, ctx, fetchConfig) {
8473
- const template = fetchConfig?.headerTemplate;
8474
- if (!template)
8777
+ function warnOnStaleSelection(input, ctx, results) {
8778
+ if (!Array.isArray(results))
8475
8779
  return;
8476
- wireMissingDependencyDiagnostic(ctx, {
8477
- inputId: input.id,
8478
- targetLabel: input.label?.trim() || input.id,
8479
- kind: 'options',
8480
- readMissing: () => unmetHeaderInputs(template, ctx.readDep),
8780
+ const chosen = ctx.readSelf();
8781
+ const chosenList = (Array.isArray(chosen) ? chosen : [chosen]).filter((v) => v !== undefined && v !== null && v !== '');
8782
+ if (chosenList.length === 0 || !chosenList.every(isPrimitive))
8783
+ return;
8784
+ const optionValues = results.map((o) => o && typeof o === 'object' && 'value' in o
8785
+ ? o.value
8786
+ : o);
8787
+ if (!optionValues.every(isPrimitive))
8788
+ return;
8789
+ const known = new Set(optionValues);
8790
+ if (chosenList.every((v) => known.has(v)))
8791
+ return;
8792
+ const label = input.label?.trim() || input.id;
8793
+ ctx.utils.setTemporaryHint(input.id, `The current selection for "${label}" is not in the refreshed options. Review the selection.`, HintType.WARNING);
8794
+ }
8795
+ /**
8796
+ * Wires the resolved-edge write-back shared by all four branches: on a
8797
+ * `loading|reloading → resolved` transition (deduped by a plain `prevStatus`
8798
+ * closure — never a signal write inside the effect) it patches
8799
+ * `matOptions.options`, emits the success hint, clears the status badge, and
8800
+ * runs the stale-selection check. Returns the `lastStatus` accessor for the
8801
+ * {@link OptionsDerivedEntry}.
8802
+ *
8803
+ * Fires on BOTH pre-resolution edges: the first fetch transitions
8804
+ * `loading → resolved`, but `.reload()` (refresh family) transitions
8805
+ * `reloading → resolved` — guarding on `'loading'` alone silently dropped the
8806
+ * reload write-back (OG-6).
8807
+ *
8808
+ * MUST be called inside `runInInjectionContext` (creates an `effect`).
8809
+ *
8810
+ * @param input - The column-input config that owns the fetch.
8811
+ * @param ctx - Shared builder context.
8812
+ * @param optionsResource - The backing resource.
8813
+ * @param statusIdToClear - Status badge to clear on the resolved edge (POST
8814
+ * branches; the GET branch clears its badge in the loader alone).
8815
+ * @returns Accessor for the last-observed {@link ResourceStatus}.
8816
+ */
8817
+ function wireResolvedEdge(input, ctx, optionsResource, statusIdToClear) {
8818
+ let prevStatus = 'idle';
8819
+ effect(() => {
8820
+ const current = optionsResource.status();
8821
+ const prev = prevStatus;
8822
+ if ((prev === 'loading' || prev === 'reloading') && current === 'resolved') {
8823
+ const results = optionsResource.value();
8824
+ ctx.utils.updateFormInputConfig(input.id, buildOptionsPatch(input, results));
8825
+ // SUCCESS (✅), matching the value family — the historical DOCUMENT (📄)
8826
+ // glyph mis-signalled a fetch-succeeded event (owner decision 2026-08-18,
8827
+ // hue/glyph carry semantics per the design rules).
8828
+ ctx.utils.setTemporaryHint(input.id, 'Data options fetched successfully', HintType.SUCCESS);
8829
+ if (statusIdToClear)
8830
+ ctx.utils.removeInputStatus(input.id, statusIdToClear);
8831
+ warnOnStaleSelection(input, ctx, results);
8832
+ }
8833
+ // Record the status AFTER the edge check. `prevStatus` is a plain closure
8834
+ // variable, so this is an ordinary assignment — not a signal write — and the
8835
+ // effect's only reactive dependency is `optionsResource.status()`.
8836
+ prevStatus = current;
8481
8837
  });
8838
+ return () => prevStatus;
8482
8839
  }
8483
8840
  // ---------------------------------------------------------------------------
8484
8841
  // GET-static branch
@@ -8501,63 +8858,46 @@ function wireHeaderDiagnostic(input, ctx, fetchConfig) {
8501
8858
  function buildGetOptionsResource(input, ctx) {
8502
8859
  return runInInjectionContext(ctx.injector, () => {
8503
8860
  const fetchConfig = input.matOptions?.fetch?.options;
8504
- // Track the previous resource status so we can detect the pending→resolved edge.
8505
- // Edge-tracker: a plain closure variable (NOT a signal — nothing reads it
8506
- // reactively), so the resolved-edge effect below never writes a signal.
8507
- let prevStatus = 'idle';
8508
8861
  const optionsResource = resource({ ...(ngDevMode ? { debugName: "optionsResource" } : /* istanbul ignore next */ {}),
8509
8862
  // A GET sends no body, so `params` carries only the resolved request
8510
8863
  // options. With no `headerTemplate` the computed reads nothing reactive and
8511
8864
  // yields a stable object — the resource fires exactly once, as it always
8512
8865
  // has. With a live-bound header it re-fires when that field changes.
8513
- params: buildApiRequestParams(fetchConfig, ctx.readDep),
8514
- loader: async ({ params }) => {
8866
+ params: buildApiRequestParams(fetchConfig, ctx.readDep, undefined, ctx.isVisible),
8867
+ loader: async ({ params, abortSignal }) => {
8515
8868
  // Header-gated (a bound header field is still empty) → no request.
8516
8869
  if (params === undefined)
8517
8870
  return [];
8518
8871
  ctx.utils.setInputStatus(input.id, GET_STATUS_ID, 'Fetching options...');
8872
+ // LOADING hint, matching the POST branches (alignment, 2026-08-18).
8873
+ ctx.utils.setTemporaryHint(input.id, 'Fetching options...', HintType.LOADING);
8519
8874
  try {
8520
8875
  const data = await firstValueFrom(ctx.utils.httpGetDataFunction(fetchConfig.httpEndPoint, params.options));
8876
+ // Superseded mid-flight: the live fetch owns the badge/hint channel.
8877
+ if (abortSignal.aborted)
8878
+ return [];
8521
8879
  ctx.utils.removeInputStatus(input.id, GET_STATUS_ID);
8522
8880
  const results = applyValueAccessRules(fetchConfig, data);
8523
8881
  return (results ?? []);
8524
8882
  }
8525
8883
  catch (error) {
8884
+ // A superseded fetch's late failure must not clear the live fetch's
8885
+ // badge or paint an error over its state — rethrow silently.
8886
+ if (abortSignal.aborted)
8887
+ throw error;
8526
8888
  ctx.utils.removeInputStatus(input.id, GET_STATUS_ID);
8527
8889
  ctx.utils.setInputTemporaryError(input.id, 'Error fetching options from API');
8528
8890
  throw error;
8529
8891
  }
8530
8892
  } });
8531
- // Resolved-edge effect: fires updateFormInputConfig exactly once per
8532
- // pending→resolved transition, deduped by the prevStatus edge-tracker.
8533
- effect(() => {
8534
- const current = optionsResource.status();
8535
- const prev = prevStatus;
8536
- // Fire on BOTH pre-resolution edges: the first fetch transitions
8537
- // `loading → resolved`, but `.reload()` (refresh family) transitions
8538
- // `reloading → resolved` — never re-entering `'loading'`. Guarding on
8539
- // `'loading'` alone silently dropped the reload write-back, so refreshed
8540
- // options never re-patched `matOptions.options` (OG-6). Both are deduped
8541
- // by the single `prevStatus` edge-tracker, preserving the once-per-fetch
8542
- // contract (OG-9).
8543
- if ((prev === 'loading' || prev === 'reloading') && current === 'resolved') {
8544
- const results = optionsResource.value();
8545
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Phase 4 TODO: mirrors legacy helpers' cast.
8546
- ctx.utils.updateFormInputConfig(input.id, buildOptionsPatch(input, results));
8547
- ctx.utils.setTemporaryHint(input.id, 'Data options fetched successfully', HintType.DOCUMENT);
8548
- }
8549
- // Record the status AFTER the edge check. `prevStatus` is a plain closure
8550
- // variable, so this is an ordinary assignment — not a signal write — and the
8551
- // effect's only reactive dependency is `optionsResource.status()`.
8552
- prevStatus = current;
8553
- });
8893
+ const lastStatus = wireResolvedEdge(input, ctx, optionsResource);
8554
8894
  const optionsSignal = computed(() => (optionsResource.value() ?? []), ...(ngDevMode ? [{ debugName: "optionsSignal" }] : /* istanbul ignore next */ []));
8555
- wireHeaderDiagnostic(input, ctx, fetchConfig);
8895
+ wireRequestTemplateDiagnostic(input, ctx, fetchConfig, 'options');
8556
8896
  return {
8557
8897
  kind: 'options',
8558
8898
  signal: optionsSignal,
8559
8899
  resource: optionsResource,
8560
- lastStatus: () => prevStatus,
8900
+ lastStatus,
8561
8901
  };
8562
8902
  });
8563
8903
  }
@@ -8597,19 +8937,33 @@ function buildPostComputedOptionsResource(input, ctx) {
8597
8937
  const snapshot = {};
8598
8938
  for (const minInput of minInputs) {
8599
8939
  // Build a per-call snapshot keyed by inputId for validateMinInput.
8600
- if (minInput.mapTo && !Array.isArray(minInput.mapTo)) {
8940
+ // Keyed on `type` like the value path (D3 alignment, 2026-08-18): a
8941
+ // `'default'` entry carrying a stray `mapTo` used to become a reactive
8942
+ // dependency HERE but not on the value side.
8943
+ if (minInput.type === 'mapto' &&
8944
+ minInput.mapTo &&
8945
+ !Array.isArray(minInput.mapTo)) {
8946
+ // Date range: TWO flat controls — resolve the half by the entry's
8947
+ // `name` (see dateRangeSnapshotEntry) instead of the raw column id.
8948
+ const range = dateRangeSnapshotEntry(minInput);
8949
+ if (range) {
8950
+ snapshot[range.name] = ctx.readDep(range.halfInputId);
8951
+ continue;
8952
+ }
8601
8953
  const depId = minInput.mapTo.inputId;
8602
8954
  if (depId) {
8603
8955
  snapshot[depId] = ctx.readDep(depId);
8604
8956
  }
8605
8957
  }
8606
- else if (Array.isArray(minInput.mapTo)) {
8958
+ else if (minInput.type === 'mapDocFilter' &&
8959
+ Array.isArray(minInput.mapTo)) {
8607
8960
  for (const mapEntry of minInput.mapTo) {
8608
8961
  if (mapEntry.inputId) {
8609
8962
  snapshot[mapEntry.inputId] = ctx.readDep(mapEntry.inputId);
8610
8963
  }
8611
8964
  }
8612
8965
  }
8966
+ // 'default' entries carry their value inline — no readDep needed.
8613
8967
  }
8614
8968
  // Validate all required inputs. If any fail, return undefined → idle.
8615
8969
  const allValid = minInputs.every((minInput) => {
@@ -8623,20 +8977,24 @@ function buildPostComputedOptionsResource(input, ctx) {
8623
8977
  if (!allValid) {
8624
8978
  return undefined;
8625
8979
  }
8626
- // Build the mapped POST body.
8627
- return returnMappedData(snapshot, minInputs, fetchConfig.httpEndPoint);
8980
+ // Build the mapped POST body. Guarded like the value path: a malformed
8981
+ // `defaultValue` (JSON.parse throw inside returnMappedData) must park the
8982
+ // resource idle, not escape the params computed.
8983
+ try {
8984
+ return returnMappedData(snapshot, minInputs, fetchConfig.httpEndPoint);
8985
+ }
8986
+ catch {
8987
+ return undefined;
8988
+ }
8628
8989
  };
8629
- // Edge-tracker: a plain closure variable (NOT a signal — nothing reads it
8630
- // reactively), so the resolved-edge effect below never writes a signal.
8631
- let prevStatus = 'idle';
8632
8990
  const optionsResource = resource({ ...(ngDevMode ? { debugName: "optionsResource" } : /* istanbul ignore next */ {}),
8633
8991
  // Structural dedupe lives in `buildApiRequestParams`: `returnMappedData`
8634
8992
  // allocates a fresh object on every recompute and this computed re-runs on
8635
8993
  // ANY `#model` change (readDep reads the whole map), so without it the
8636
8994
  // resource would treat every unrelated value edit (e.g. selecting a row in
8637
8995
  // THIS field) as a params change and reload the API — a runaway refetch loop.
8638
- params: buildApiRequestParams(fetchConfig, ctx.readDep, buildBody),
8639
- loader: async ({ params }) => {
8996
+ params: buildApiRequestParams(fetchConfig, ctx.readDep, buildBody, ctx.isVisible),
8997
+ loader: async ({ params, abortSignal }) => {
8640
8998
  if (params === undefined) {
8641
8999
  // Params undefined → stay idle; loader should not be called, but guard anyway.
8642
9000
  return [];
@@ -8644,12 +9002,19 @@ function buildPostComputedOptionsResource(input, ctx) {
8644
9002
  ctx.utils.setInputStatus(input.id, POST_STATUS_ID, 'Fetching options...');
8645
9003
  ctx.utils.setTemporaryHint(input.id, 'Fetching options...', HintType.LOADING);
8646
9004
  try {
8647
- const data = await firstValueFrom(ctx.utils.httpPostDataFunction(fetchConfig.httpEndPoint, params.body, params.options));
9005
+ const data = await firstValueFrom(resolveBodyTransport(fetchConfig, ctx.utils)(fetchConfig.httpEndPoint, params.body, params.options));
9006
+ // Superseded mid-flight: the live fetch owns the badge/hint channel.
9007
+ if (abortSignal.aborted)
9008
+ return [];
8648
9009
  ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8649
9010
  const results = applyValueAccessRules(fetchConfig, data);
8650
9011
  return (results ?? []);
8651
9012
  }
8652
9013
  catch (error) {
9014
+ // A superseded fetch's late failure must not clear the live fetch's
9015
+ // badge or paint an error over its state — rethrow silently.
9016
+ if (abortSignal.aborted)
9017
+ throw error;
8653
9018
  ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8654
9019
  const errMsg = errorResolver(error instanceof Error
8655
9020
  ? error
@@ -8658,21 +9023,7 @@ function buildPostComputedOptionsResource(input, ctx) {
8658
9023
  throw error;
8659
9024
  }
8660
9025
  } });
8661
- // Resolved-edge effect: deduped by the prevStatus edge-tracker.
8662
- effect(() => {
8663
- const current = optionsResource.status();
8664
- const prev = prevStatus;
8665
- // Fire on BOTH pre-resolution edges (`loading → resolved` first fetch and
8666
- // `reloading → resolved` on `.reload()`); `'loading'` alone dropped the
8667
- // reload write-back (OG-6). Deduped by the single `prevStatus` tracker (OP-9).
8668
- if ((prev === 'loading' || prev === 'reloading') && current === 'resolved') {
8669
- const results = optionsResource.value();
8670
- ctx.utils.updateFormInputConfig(input.id, buildOptionsPatch(input, results));
8671
- ctx.utils.setTemporaryHint(input.id, 'Data options fetched successfully', HintType.DOCUMENT);
8672
- ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8673
- }
8674
- prevStatus = current;
8675
- });
9026
+ const lastStatus = wireResolvedEdge(input, ctx, optionsResource, POST_STATUS_ID);
8676
9027
  const optionsSignal = computed(() => (optionsResource.value() ?? []), ...(ngDevMode ? [{ debugName: "optionsSignal" }] : /* istanbul ignore next */ []));
8677
9028
  // Surface a context-rich hint when options stay idle because a required
8678
9029
  // mapped dependency is missing/invalid (the `params → undefined` short-circuit
@@ -8684,12 +9035,12 @@ function buildPostComputedOptionsResource(input, ctx) {
8684
9035
  kind: 'options',
8685
9036
  readMissing: () => computeUnmetMinInputs(minInputs, ctx.readDep, validateMinInput),
8686
9037
  });
8687
- wireHeaderDiagnostic(input, ctx, fetchConfig);
9038
+ wireRequestTemplateDiagnostic(input, ctx, fetchConfig, 'options');
8688
9039
  return {
8689
9040
  kind: 'options',
8690
9041
  signal: optionsSignal,
8691
9042
  resource: optionsResource,
8692
- lastStatus: () => prevStatus,
9043
+ lastStatus,
8693
9044
  };
8694
9045
  });
8695
9046
  }
@@ -8723,23 +9074,27 @@ function buildPostTemplateOptionsResource(input, ctx, fetchConfig) {
8723
9074
  return undefined;
8724
9075
  return payload;
8725
9076
  };
8726
- // Edge-tracker: a plain closure variable (NOT a signal — nothing reads it
8727
- // reactively), so the resolved-edge effect below never writes a signal.
8728
- let prevStatus = 'idle';
8729
- const optionsResource = resource({ ...(ngDevMode ? { debugName: "optionsResource" } : /* istanbul ignore next */ {}), params: buildApiRequestParams(fetchConfig, ctx.readDep, buildBody),
8730
- loader: async ({ params }) => {
9077
+ const optionsResource = resource({ ...(ngDevMode ? { debugName: "optionsResource" } : /* istanbul ignore next */ {}), params: buildApiRequestParams(fetchConfig, ctx.readDep, buildBody, ctx.isVisible),
9078
+ loader: async ({ params, abortSignal }) => {
8731
9079
  if (params === undefined) {
8732
9080
  return [];
8733
9081
  }
8734
9082
  ctx.utils.setInputStatus(input.id, POST_STATUS_ID, 'Fetching options...');
8735
9083
  ctx.utils.setTemporaryHint(input.id, 'Fetching options...', HintType.LOADING);
8736
9084
  try {
8737
- const data = await firstValueFrom(ctx.utils.httpPostDataFunction(fetchConfig.httpEndPoint, params.body, params.options));
9085
+ const data = await firstValueFrom(resolveBodyTransport(fetchConfig, ctx.utils)(fetchConfig.httpEndPoint, params.body, params.options));
9086
+ // Superseded mid-flight: the live fetch owns the badge/hint channel.
9087
+ if (abortSignal.aborted)
9088
+ return [];
8738
9089
  ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8739
9090
  const results = applyValueAccessRules(fetchConfig, data);
8740
9091
  return (results ?? []);
8741
9092
  }
8742
9093
  catch (error) {
9094
+ // A superseded fetch's late failure must not clear the live fetch's
9095
+ // badge or paint an error over its state — rethrow silently.
9096
+ if (abortSignal.aborted)
9097
+ throw error;
8743
9098
  ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8744
9099
  const errMsg = errorResolver(error instanceof Error
8745
9100
  ? error
@@ -8748,19 +9103,7 @@ function buildPostTemplateOptionsResource(input, ctx, fetchConfig) {
8748
9103
  throw error;
8749
9104
  }
8750
9105
  } });
8751
- // Resolved-edge effect: deduped by the prevStatus edge-tracker (see the
8752
- // POST-computed branch for the both-edges / dedupe rationale).
8753
- effect(() => {
8754
- const current = optionsResource.status();
8755
- const prev = prevStatus;
8756
- if ((prev === 'loading' || prev === 'reloading') && current === 'resolved') {
8757
- const results = optionsResource.value();
8758
- ctx.utils.updateFormInputConfig(input.id, buildOptionsPatch(input, results));
8759
- ctx.utils.setTemporaryHint(input.id, 'Data options fetched successfully', HintType.DOCUMENT);
8760
- ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8761
- }
8762
- prevStatus = current;
8763
- });
9106
+ const lastStatus = wireResolvedEdge(input, ctx, optionsResource, POST_STATUS_ID);
8764
9107
  const optionsSignal = computed(() => (optionsResource.value() ?? []), ...(ngDevMode ? [{ debugName: "optionsSignal" }] : /* istanbul ignore next */ []));
8765
9108
  wireMissingDependencyDiagnostic(ctx, {
8766
9109
  inputId: input.id,
@@ -8768,12 +9111,12 @@ function buildPostTemplateOptionsResource(input, ctx, fetchConfig) {
8768
9111
  kind: 'options',
8769
9112
  readMissing: () => unmetTemplateInputs(template, ctx.readDep),
8770
9113
  });
8771
- wireHeaderDiagnostic(input, ctx, fetchConfig);
9114
+ wireRequestTemplateDiagnostic(input, ctx, fetchConfig, 'options');
8772
9115
  return {
8773
9116
  kind: 'options',
8774
9117
  signal: optionsSignal,
8775
9118
  resource: optionsResource,
8776
- lastStatus: () => prevStatus,
9119
+ lastStatus,
8777
9120
  };
8778
9121
  });
8779
9122
  }
@@ -8802,28 +9145,40 @@ function buildPostStaticOptionsResource(input, ctx) {
8802
9145
  return runInInjectionContext(ctx.injector, () => {
8803
9146
  const fetchConfig = input.matOptions?.fetch?.options;
8804
9147
  const minInputs = fetchConfig.backEndConfig?.minimumInputRequired ?? [];
8805
- // Static request body — built once (all minInputs are 'default' type).
8806
- const staticBody = returnMappedData({}, minInputs, fetchConfig.httpEndPoint);
8807
- // Edge-tracker: a plain closure variable (NOT a signal — nothing reads it
8808
- // reactively), so the resolved-edge effect below never writes a signal.
8809
- let prevStatus = 'idle';
8810
9148
  const optionsResource = resource({ ...(ngDevMode ? { debugName: "optionsResource" } : /* istanbul ignore next */ {}),
8811
9149
  // The body reads no form value, so the only reactive dependency this params
8812
- // computed can acquire is a live-bound header.
8813
- params: buildApiRequestParams(fetchConfig, ctx.readDep, () => staticBody),
8814
- loader: async ({ params }) => {
9150
+ // computed can acquire is a live-bound header. Built lazily and guarded
9151
+ // (mirroring the value path): the old eager, unguarded construction let a
9152
+ // malformed `defaultValue` throw ESCAPE the builder and take down the
9153
+ // whole tower initialize() — one bad author config rendered a blank form.
9154
+ params: buildApiRequestParams(fetchConfig, ctx.readDep, () => {
9155
+ try {
9156
+ return returnMappedData({}, minInputs, fetchConfig.httpEndPoint);
9157
+ }
9158
+ catch {
9159
+ return undefined;
9160
+ }
9161
+ }, ctx.isVisible),
9162
+ loader: async ({ params, abortSignal }) => {
8815
9163
  // Header-gated (a bound header field is still empty) → no request.
8816
9164
  if (params === undefined)
8817
9165
  return [];
8818
9166
  ctx.utils.setInputStatus(input.id, POST_STATUS_ID, 'Fetching options...');
8819
9167
  ctx.utils.setTemporaryHint(input.id, 'Fetching options...', HintType.LOADING);
8820
9168
  try {
8821
- const data = await firstValueFrom(ctx.utils.httpPostDataFunction(fetchConfig.httpEndPoint, params.body, params.options));
9169
+ const data = await firstValueFrom(resolveBodyTransport(fetchConfig, ctx.utils)(fetchConfig.httpEndPoint, params.body, params.options));
9170
+ // Superseded mid-flight: the live fetch owns the badge/hint channel.
9171
+ if (abortSignal.aborted)
9172
+ return [];
8822
9173
  ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8823
9174
  const results = applyValueAccessRules(fetchConfig, data);
8824
9175
  return (results ?? []);
8825
9176
  }
8826
9177
  catch (error) {
9178
+ // A superseded fetch's late failure must not clear the live fetch's
9179
+ // badge or paint an error over its state — rethrow silently.
9180
+ if (abortSignal.aborted)
9181
+ throw error;
8827
9182
  ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8828
9183
  const errMsg = errorResolver(error instanceof Error
8829
9184
  ? error
@@ -8832,28 +9187,14 @@ function buildPostStaticOptionsResource(input, ctx) {
8832
9187
  throw error;
8833
9188
  }
8834
9189
  } });
8835
- // Resolved-edge effect: deduped by the prevStatus edge-tracker.
8836
- effect(() => {
8837
- const current = optionsResource.status();
8838
- const prev = prevStatus;
8839
- // Fire on BOTH pre-resolution edges (`loading → resolved` first fetch and
8840
- // `reloading → resolved` on `.reload()`); `'loading'` alone dropped the
8841
- // reload write-back (OG-6). Deduped by the single `prevStatus` tracker (OP-9).
8842
- if ((prev === 'loading' || prev === 'reloading') && current === 'resolved') {
8843
- const results = optionsResource.value();
8844
- ctx.utils.updateFormInputConfig(input.id, buildOptionsPatch(input, results));
8845
- ctx.utils.setTemporaryHint(input.id, 'Data options fetched successfully', HintType.DOCUMENT);
8846
- ctx.utils.removeInputStatus(input.id, POST_STATUS_ID);
8847
- }
8848
- prevStatus = current;
8849
- });
9190
+ const lastStatus = wireResolvedEdge(input, ctx, optionsResource, POST_STATUS_ID);
8850
9191
  const optionsSignal = computed(() => (optionsResource.value() ?? []), ...(ngDevMode ? [{ debugName: "optionsSignal" }] : /* istanbul ignore next */ []));
8851
- wireHeaderDiagnostic(input, ctx, fetchConfig);
9192
+ wireRequestTemplateDiagnostic(input, ctx, fetchConfig, 'options');
8852
9193
  return {
8853
9194
  kind: 'options',
8854
9195
  signal: optionsSignal,
8855
9196
  resource: optionsResource,
8856
- lastStatus: () => prevStatus,
9197
+ lastStatus,
8857
9198
  };
8858
9199
  });
8859
9200
  }
@@ -8929,6 +9270,10 @@ function buildOptionsApiResource(input, ctx) {
8929
9270
  if (httpMethod === 'GET') {
8930
9271
  return buildGetOptionsResource(input, ctx);
8931
9272
  }
9273
+ // Body-bearing family (POST, and PUT via resolveBodyTransport). Surface the
9274
+ // deprecated-'bind' config error before branch selection — such an entry
9275
+ // otherwise leaves the fetch permanently idle with no diagnostic.
9276
+ warnUnsupportedBindEntries(input, ctx, fetchConfig.backEndConfig?.minimumInputRequired ?? []);
8932
9277
  // A payloadTemplate supersedes minimumInputRequired for body shaping — but ONLY
8933
9278
  // when the author has not explicitly chosen the mapped-inputs mode. Taken BEFORE
8934
9279
  // the all-default split: the template branch covers both the token-bearing
@@ -8962,7 +9307,7 @@ function buildOptionsApiResource(input, ctx) {
8962
9307
  *
8963
9308
  * @returns The aggregated number, or `0` when there are no rows.
8964
9309
  */
8965
- function aggregateListColumn(rows, columnId, aggregate) {
9310
+ function aggregateListColumn$1(rows, columnId, aggregate) {
8966
9311
  if (!Array.isArray(rows))
8967
9312
  return 0;
8968
9313
  const values = rows.map((row) => Number(row?.[columnId]));
@@ -8992,7 +9337,7 @@ function buildValidationScope(inputsObservedForChanges, readDep) {
8992
9337
  if (!inputId || !variable)
8993
9338
  continue;
8994
9339
  if (aggregate) {
8995
- scope[variable] = aggregateListColumn(readDep(parentInputId ?? inputId), inputId, aggregate);
9340
+ scope[variable] = aggregateListColumn$1(readDep(parentInputId ?? inputId), inputId, aggregate);
8996
9341
  }
8997
9342
  else {
8998
9343
  scope[variable] = readDep(inputId);
@@ -9118,6 +9463,250 @@ const buildManualValidation = (input, ctx) => {
9118
9463
  return { kind: 'validation', errorFn };
9119
9464
  };
9120
9465
 
9466
+ /**
9467
+ * @file Pure factory for an input's **conditional visibility** signal.
9468
+ *
9469
+ * Mirrors {@link buildManualValidation} one-for-one — same scope assembly, same
9470
+ * {@link validateObjectAgainstString} evaluator, same `readDep` contract, no
9471
+ * Angular runtime import beyond `computed`. The single semantic difference is
9472
+ * polarity:
9473
+ *
9474
+ * | | Expression `true` means |
9475
+ * |---|---|
9476
+ * | `build-manual-validation` | the input is **invalid** |
9477
+ * | `build-conditional-visibility` | the input is **revealed** |
9478
+ *
9479
+ * ### Why this is NOT a `#derived` entry
9480
+ *
9481
+ * Visibility produces neither value, options nor validation. Modelling it as a
9482
+ * `DerivedEntry` variant would force a skip-clause into `#value()`,
9483
+ * `isBusyComputed`, `#forceLiveness`, `inputFunctionsCollection`,
9484
+ * `clearFormState` and `#entryToObservable` — six loops, all to describe
9485
+ * something that is structurally a *gate*, not a *function*. It would also add a
9486
+ * member to a public enum in `ngx-t-forms-types`. The engine keeps a sibling
9487
+ * `Map<string, Signal<boolean>>` instead.
9488
+ *
9489
+ * ### Combination and failure policy
9490
+ *
9491
+ * - Rules combine with **AND**: every expression-bearing rule must evaluate to
9492
+ * `true` for the input to be revealed. This matches how every other show-gate
9493
+ * in the form builder composes (`additionalTest` entries are all applied with
9494
+ * `.every`).
9495
+ * - Rules with no `expression` are **inert** — they are descriptive metadata for
9496
+ * external consumers, never a gate.
9497
+ * - An expression that throws **fails open** (the input stays visible). A field
9498
+ * the author cannot see is a field the user cannot fill; a misconfigured rule
9499
+ * must not silently delete part of the form. This matches the cycle policy in
9500
+ * the engine, which also forces visibility on detection.
9501
+ * - An input whose rules are all inert gets **no signal at all** (the factory
9502
+ * returns `undefined`), so it never enters the visibility map and costs the
9503
+ * reactive graph nothing.
9504
+ */
9505
+ /**
9506
+ * Reduces a multiple-input row array to a single value for the rule scope.
9507
+ *
9508
+ * Byte-for-byte the same reduction `build-manual-validation` applies, so an
9509
+ * aggregate binding (`sum of a MultipleInput column`) means the same thing in a
9510
+ * visibility rule as it does in a validator.
9511
+ *
9512
+ * @param rows - The multiple-input container's value (array of row objects).
9513
+ * @param columnId - The bound sub-input's id (the row key to read).
9514
+ * @param aggregate - The aggregate function to apply.
9515
+ * @returns The aggregated number, or `0` when there are no rows.
9516
+ */
9517
+ function aggregateListColumn(rows, columnId, aggregate) {
9518
+ if (!Array.isArray(rows))
9519
+ return 0;
9520
+ const values = rows.map((row) => Number(row?.[columnId]));
9521
+ return calculateListOveralFunctions(aggregate, values);
9522
+ }
9523
+ /**
9524
+ * Builds the variable scope a rule expression is evaluated against: each
9525
+ * `{ inputId, variable }` entry maps `variable` to the current value of
9526
+ * `inputId`, read through `readDep`.
9527
+ *
9528
+ * @param inputsObservedForChanges - The rule's dependency list.
9529
+ * @param readDep - Signal-graph read accessor from {@link DerivedBuildContext}.
9530
+ * @returns A plain object keyed by variable name.
9531
+ */
9532
+ function buildRuleScope(inputsObservedForChanges, readDep) {
9533
+ const scope = {};
9534
+ for (const entry of inputsObservedForChanges) {
9535
+ const { inputId, variable, parentInputId, function: aggregate } = entry;
9536
+ if (!inputId || !variable)
9537
+ continue;
9538
+ if (aggregate) {
9539
+ scope[variable] = aggregateListColumn(readDep(parentInputId ?? inputId), inputId, aggregate);
9540
+ }
9541
+ else {
9542
+ scope[variable] = readDep(inputId);
9543
+ }
9544
+ }
9545
+ return scope;
9546
+ }
9547
+ /**
9548
+ * Whether a rule carries an expression the engine can evaluate. Rules that do
9549
+ * not are descriptive metadata and never gate anything.
9550
+ *
9551
+ * @param rule - The rule to test.
9552
+ * @returns `true` when the rule has a non-blank `expression`.
9553
+ */
9554
+ function isGatingRule(rule) {
9555
+ return typeof rule.expression === 'string' && rule.expression.trim().length > 0;
9556
+ }
9557
+ /**
9558
+ * Returns the rules on an input that actually gate its visibility.
9559
+ *
9560
+ * @param input - The column-input config.
9561
+ * @returns The expression-bearing rules (possibly empty).
9562
+ */
9563
+ function gatingRulesOf(input) {
9564
+ const rules = input.conditionalInputConfig;
9565
+ return Array.isArray(rules) ? rules.filter(isGatingRule) : [];
9566
+ }
9567
+ /**
9568
+ * Evaluates one rule against the current signal-graph state.
9569
+ *
9570
+ * @param rule - The rule to evaluate (guaranteed to carry an `expression`).
9571
+ * @param readDep - Signal-graph read accessor.
9572
+ * @returns `true` when the rule is satisfied (contributes a reveal), and `true`
9573
+ * when evaluation throws (fail open).
9574
+ */
9575
+ function evaluateRule(rule, readDep) {
9576
+ try {
9577
+ const scope = buildRuleScope(rule.inputsObservedForChanges ?? [], readDep);
9578
+ return validateObjectAgainstString(rule.expression ?? '', scope) === true;
9579
+ }
9580
+ catch {
9581
+ // Fail open — a rule that cannot be evaluated must not delete the field.
9582
+ return true;
9583
+ }
9584
+ }
9585
+ /**
9586
+ * Builds the live visibility signal for one input.
9587
+ *
9588
+ * Takes **only** `readDep`, not a whole {@link DerivedBuildContext}. A visibility
9589
+ * rule reads dependency values and nothing else — it issues no HTTP, writes no
9590
+ * hint, creates no reactive primitive that needs an injector. Narrowing the
9591
+ * parameter keeps that true by construction: it means declaring a conditional
9592
+ * input can never drag in a side-effect surface (`utils.fileUpload` and friends)
9593
+ * that a form without derived functions would otherwise never have touched.
9594
+ *
9595
+ * @param input - The full column-input config carrying `conditionalInputConfig`.
9596
+ * @param ctx - Anything carrying the gated `readDep` — in practice the engine's
9597
+ * {@link DerivedBuildContext}. The signal tracks exactly the inputs the rules
9598
+ * reference, so it invalidates when they change and at no other time.
9599
+ * @returns A `Signal<boolean>` that is `true` while the input is revealed, or
9600
+ * `undefined` when the input declares no gating rule (the caller then omits it
9601
+ * from the visibility map entirely, which is what makes a non-conditional form
9602
+ * cost nothing).
9603
+ *
9604
+ * @example
9605
+ * ```ts
9606
+ * const vis = buildConditionalVisibility(input, { readDep });
9607
+ * if (vis) this.#visibility.set(input.id, vis);
9608
+ * ```
9609
+ */
9610
+ function buildConditionalVisibility(input, ctx) {
9611
+ const rules = gatingRulesOf(input);
9612
+ if (rules.length === 0)
9613
+ return undefined;
9614
+ return computed(() => rules.every((rule) => evaluateRule(rule, ctx.readDep)));
9615
+ }
9616
+
9617
+ /**
9618
+ * @file Static cycle detection for the conditional-visibility digraph.
9619
+ *
9620
+ * Conditional rules read their dependencies through the engine's **gated**
9621
+ * `#readDep`, so evaluating `vis(X)` reads `vis(dep)` for every input `X`
9622
+ * observes. That forms a digraph whose edges are exactly the
9623
+ * `inputsObservedForChanges` entries between conditional inputs. A cycle
9624
+ * (`X` observes `Y`, `Y` observes `X`) would make Angular throw
9625
+ * *"Detected cycle in computations"* the first time either signal is read —
9626
+ * at render time, with a stack that names neither field.
9627
+ *
9628
+ * This module finds those cycles **before** any signal is read, so the engine
9629
+ * can fail open (force the offending inputs permanently visible) and name them
9630
+ * by label. A form with a misconfigured rule renders in full rather than
9631
+ * throwing; the author sees a message naming the fields to fix.
9632
+ *
9633
+ * Note this is deliberately NOT `getTopologicalExecutionOrder` — that helper was
9634
+ * reduced to a stub during the Phase-1 rewrite and no longer walks any graph.
9635
+ */
9636
+ /**
9637
+ * Finds every input that participates in a visibility cycle.
9638
+ *
9639
+ * Iterative depth-first search with grey/black colouring. Only edges that point
9640
+ * at another **conditional** input can close a cycle (a non-conditional input's
9641
+ * visibility is the constant `true`), so edges to ids absent from the graph are
9642
+ * ignored rather than treated as leaves.
9643
+ *
9644
+ * @param edges - One entry per conditional input, in any order.
9645
+ * @returns The ids of every input on a cycle, de-duplicated. Empty when the
9646
+ * digraph is acyclic.
9647
+ *
9648
+ * @example
9649
+ * ```ts
9650
+ * findVisibilityCycles([
9651
+ * { inputId: 'a', observes: ['b'] },
9652
+ * { inputId: 'b', observes: ['a'] },
9653
+ * ]); // → ['a', 'b']
9654
+ * ```
9655
+ */
9656
+ function findVisibilityCycles(edges) {
9657
+ const graph = new Map();
9658
+ for (const edge of edges)
9659
+ graph.set(edge.inputId, edge.observes);
9660
+ /** 0 = unvisited, 1 = on the current path (grey), 2 = fully explored (black). */
9661
+ const colour = new Map();
9662
+ const onCycle = new Set();
9663
+ for (const root of graph.keys()) {
9664
+ if (colour.get(root) === 2)
9665
+ continue;
9666
+ // Explicit stack of (node, next-edge-index) so a deep graph cannot blow the
9667
+ // call stack, and so the grey path is available when an edge closes a loop.
9668
+ const stack = [{ node: root, index: 0 }];
9669
+ const path = [];
9670
+ colour.set(root, 1);
9671
+ path.push(root);
9672
+ while (stack.length > 0) {
9673
+ const frame = stack[stack.length - 1];
9674
+ const neighbours = graph.get(frame.node) ?? [];
9675
+ if (frame.index >= neighbours.length) {
9676
+ colour.set(frame.node, 2);
9677
+ stack.pop();
9678
+ path.pop();
9679
+ continue;
9680
+ }
9681
+ const next = neighbours[frame.index];
9682
+ frame.index += 1;
9683
+ // A self-edge is not a cycle: `#readDep` returns `undefined` for the
9684
+ // self-edge BEFORE it consults visibility, so `vis(X)` reading `X` never
9685
+ // re-enters `vis(X)`.
9686
+ if (next === frame.node)
9687
+ continue;
9688
+ // Only conditional inputs can close a cycle; everything else is a leaf.
9689
+ if (!graph.has(next))
9690
+ continue;
9691
+ const nextColour = colour.get(next) ?? 0;
9692
+ if (nextColour === 1) {
9693
+ // Grey edge — every node from `next` to the top of the path is on the cycle.
9694
+ const start = path.lastIndexOf(next);
9695
+ if (start >= 0)
9696
+ for (const id of path.slice(start))
9697
+ onCycle.add(id);
9698
+ continue;
9699
+ }
9700
+ if (nextColour === 2)
9701
+ continue;
9702
+ colour.set(next, 1);
9703
+ path.push(next);
9704
+ stack.push({ node: next, index: 0 });
9705
+ }
9706
+ }
9707
+ return [...onCycle];
9708
+ }
9709
+
9121
9710
  /**
9122
9711
  * @file Auto-computed value detection — the single, configuration-only answer to
9123
9712
  * "does the tower own this input's value?" — plus the read-only stamping helpers
@@ -9627,6 +10216,23 @@ class FormTowerControllerService {
9627
10216
  * derived signals through `readDep`. Built once per `initialize` (Blueprint §2.2).
9628
10217
  */
9629
10218
  this.#derived = new Map();
10219
+ /**
10220
+ * `inputId → live visibility`, for conditional inputs ONLY. An **absent entry
10221
+ * means always visible**, so {@link FormTowerControllerService.#isVisible}
10222
+ * returns a literal without touching the reactive graph — a form with no
10223
+ * `conditionalInputConfig` pays exactly nothing.
10224
+ *
10225
+ * A sibling of `#derived`, deliberately not a `DerivedEntry` variant:
10226
+ * visibility produces neither value, options nor validation, and modelling it
10227
+ * as a function type would force a skip-clause into six existing loops (see
10228
+ * `build-conditional-visibility.ts`).
10229
+ *
10230
+ * Keyed by `input.id`, which for MultipleInput sub-rows and mSCOA inner inputs
10231
+ * is already the composite `${column.id}.${child.id}` that
10232
+ * {@link allFormInputs} mints — so one map covers all three levels with no
10233
+ * special-casing.
10234
+ */
10235
+ this.#visibility = new Map();
9630
10236
  /**
9631
10237
  * Per-input re-validation effects for {@link FunctionTypes.ManualValueValidation}.
9632
10238
  * An Angular `ValidatorFn` only re-runs on its OWN control's value/validity
@@ -9671,6 +10277,11 @@ class FormTowerControllerService {
9671
10277
  * {@link FormTowerControllerService.bindScoaInnerInputControls}.
9672
10278
  */
9673
10279
  this.#scoaInnerInputSub = undefined;
10280
+ /**
10281
+ * Bridge subscriptions for DateRangePicker half controls (one composite sub).
10282
+ * See {@link FormTowerControllerService.bindDateRangeHalfControls}.
10283
+ */
10284
+ this.#dateRangeHalfSub = undefined;
9674
10285
  // ──────────────────────────────────────────────────────────────────────────
9675
10286
  // Overridable-validation submission gate
9676
10287
  // ──────────────────────────────────────────────────────────────────────────
@@ -9828,8 +10439,19 @@ class FormTowerControllerService {
9828
10439
  */
9829
10440
  this.#value = computed(() => {
9830
10441
  const merged = { ...this.#model() };
10442
+ // A hidden input contributes no value. Dropping it here is what keeps it out
10443
+ // of getFormValue(), previewFormValue and the AI-suggestion snapshot; the
10444
+ // submission payload and the persist snapshot are covered separately by the
10445
+ // projection effect disabling the control (FormGroup.value omits disabled).
10446
+ // The retained `#model` entry is inert until the input is revealed again.
10447
+ for (const [inputId, visible] of this.#visibility) {
10448
+ if (!visible())
10449
+ delete merged[inputId];
10450
+ }
9831
10451
  for (const [key, entry] of this.#derived) {
9832
10452
  const inputId = idOf(key);
10453
+ if (!this.#isVisible(inputId))
10454
+ continue;
9833
10455
  if (entry.kind === 'value')
9834
10456
  merged[inputId] = entry.signal();
9835
10457
  else if (entry.kind === 'sourced')
@@ -9849,6 +10471,57 @@ class FormTowerControllerService {
9849
10471
  }
9850
10472
  return merged;
9851
10473
  }, ...(ngDevMode ? [{ debugName: "#value" }] : /* istanbul ignore next */ []));
10474
+ /**
10475
+ * Whether a form input is currently revealed by its conditional-display rules.
10476
+ *
10477
+ * Reads the input's live visibility signal, so calling this from a template or
10478
+ * a `computed` makes that consumer re-evaluate whenever the rule's observed
10479
+ * inputs change. An input that declares no `conditionalInputConfig` is always
10480
+ * visible and costs nothing to ask about.
10481
+ *
10482
+ * @param inputId - The input id. For MultipleInput sub-row fields and mSCOA
10483
+ * inner inputs this is the composite `${columnId}.${childId}`.
10484
+ * @returns `true` when the input is revealed, `false` when it is hidden.
10485
+ *
10486
+ * @example
10487
+ * ```ts
10488
+ * const visibleColumns = computed(() =>
10489
+ * step.columns.filter((col) => tower.isInputVisible(col.id)),
10490
+ * );
10491
+ * ```
10492
+ */
10493
+ this.isInputVisible = (inputId) => this.#isVisible(inputId);
10494
+ /**
10495
+ * Whether a section still has anything to show.
10496
+ *
10497
+ * A section whose every column is hidden by a conditional rule is not an empty
10498
+ * step to page through — it is a section that does not apply. It is reported
10499
+ * hidden so the stepper can drop it entirely.
10500
+ *
10501
+ * A section that was authored with **no columns at all** stays visible: that is
10502
+ * an empty section the author made, not one this feature emptied, and hiding it
10503
+ * would change the behaviour of forms that declare no rules.
10504
+ *
10505
+ * Reads the visibility signals of the section's columns, so a consumer calling
10506
+ * this from a template or `computed` re-evaluates when a rule flips.
10507
+ *
10508
+ * @param sectionId - The slide's `sectionId`.
10509
+ * @returns `true` when the section should be rendered.
10510
+ *
10511
+ * @example
10512
+ * ```ts
10513
+ * const steps = computed(() =>
10514
+ * tower.selectFormSteps().filter((s) => tower.isSectionVisible(s.sectionId)),
10515
+ * );
10516
+ * ```
10517
+ */
10518
+ this.isSectionVisible = (sectionId) => {
10519
+ const slide = this.form?.slides.find((s) => s.sectionId === sectionId);
10520
+ const columns = slide?.columns ?? [];
10521
+ if (columns.length === 0)
10522
+ return true;
10523
+ return columns.some((column) => this.#isVisible(column.id));
10524
+ };
9852
10525
  // ──────────────────────────────────────────────────────────────────────────
9853
10526
  // W7 — Busy / settled computeds (resource-activation contract, Blueprint §2.4)
9854
10527
  // ──────────────────────────────────────────────────────────────────────────
@@ -9929,6 +10602,11 @@ class FormTowerControllerService {
9929
10602
  .forEach(input => toggleMultipleInput(this, this._mainForm, input.id, true));
9930
10603
  // 6. Build the signal graph + wire effects — all in injection context (HAZARD 1).
9931
10604
  runInInjectionContext(this.#injector, () => {
10605
+ // Visibility FIRST: `#buildDerivedForInput` hands every builder a
10606
+ // `ctx.isVisible` bound to this map, and the resource `params` computeds
10607
+ // read it to stay `idle` while hidden. Building it after the loop would
10608
+ // leave those params reading an empty map on their first evaluation.
10609
+ this.#buildVisibilityForInputs(inputs);
9932
10610
  for (const input of inputs) {
9933
10611
  if (input.element === ElementTypes.SectionTitle)
9934
10612
  continue;
@@ -9951,18 +10629,41 @@ class FormTowerControllerService {
9951
10629
  // MSCOA chart's ComponentPortal, which has no `(valueChange)` binding of
9952
10630
  // its own — mirrors step 5's MultipleInput sub-row bridge.
9953
10631
  this.bindScoaInnerInputControls();
10632
+ // 8b. Bridge DateRangePicker half controls (`${colId}.${startKey}` /
10633
+ // `${colId}.${endKey}`) into `#model` the same way — the range element
10634
+ // writes its controls directly and the generic `t-form-input` bridge
10635
+ // no-ops for ranges, so without this a user-picked range is invisible
10636
+ // to dependent value/options fetches.
10637
+ this.bindDateRangeHalfControls();
9954
10638
  // 9. Register this form's suggestion channel so external AI systems can
9955
10639
  // observe its editable surface and propose optional edits. No-op unless
9956
10640
  // the consumer installed `withFormSuggestions()`; transient import-row
9957
10641
  // towers bind the registry to `null` and never register.
9958
10642
  this.#registerSuggestionChannel();
10643
+ // 10. Align conditional controls with their rules NOW, synchronously.
10644
+ // `initialize()` is async, so a consumer can read `canSubmit()` /
10645
+ // `hasBlockingErrors()` before the projection effect has had its first
10646
+ // flush — during which window a hidden required input would still be
10647
+ // ENABLED and would block submission. This also covers the MultipleInput
10648
+ // rows re-opened at step 5, which ran before the visibility map existed.
10649
+ // `untracked` so this can never take a reactive dependency.
10650
+ if (this.#visibility.size > 0) {
10651
+ untracked(() => this.#syncVisibleControls());
10652
+ // Step 3 ran before the visibility map existed, so it may have marked a
10653
+ // section active that turns out to have no visible columns. Re-pick now
10654
+ // that the rules are known.
10655
+ untracked(() => this.setFirstStepAsActive());
10656
+ }
9959
10657
  };
9960
10658
  /**
9961
10659
  * Marks the form's first slide as active. Called during
9962
10660
  * {@link FormTowerControllerService.initialize}.
9963
10661
  */
9964
10662
  this.setFirstStepAsActive = () => {
9965
- const firstStep = this.selectFormSteps()?.[0];
10663
+ // First step the user can actually reach. A section whose every column is
10664
+ // hidden is not rendered, so marking it active would leave the form opened
10665
+ // on a step that does not exist.
10666
+ const firstStep = this.selectFormSteps()?.find((step) => this.isSectionVisible(step.sectionId));
9966
10667
  if (!firstStep)
9967
10668
  return;
9968
10669
  this.setSectionAsActive(firstStep.sectionId);
@@ -10165,6 +10866,10 @@ class FormTowerControllerService {
10165
10866
  }
10166
10867
  }
10167
10868
  this.#derived.clear();
10869
+ // Visibility signals are plain computeds over the (now-cleared) graph —
10870
+ // nothing to destroy, but the map must not outlive the definition that
10871
+ // produced it, or a re-init would gate the new form by the old form's rules.
10872
+ this.#visibility.clear();
10168
10873
  // Drop any live MultipleInput sub-row valueChanges bridges (the takeUntil
10169
10874
  // anchor below also completes their inner subs; this clears the registry).
10170
10875
  for (const sub of this.#multipleInputRowSubs.values()) {
@@ -10181,6 +10886,12 @@ class FormTowerControllerService {
10181
10886
  }
10182
10887
  catch { /* best-effort */ }
10183
10888
  this.#scoaInnerInputSub = undefined;
10889
+ // Drop the DateRangePicker half-control bridge the same way.
10890
+ try {
10891
+ this.#dateRangeHalfSub?.unsubscribe();
10892
+ }
10893
+ catch { /* best-effort */ }
10894
+ this.#dateRangeHalfSub = undefined;
10184
10895
  this.#definition.set(undefined);
10185
10896
  this._mainForm = undefined;
10186
10897
  this.#model.set({});
@@ -10199,8 +10910,14 @@ class FormTowerControllerService {
10199
10910
  this._hintTimeoutIds = {};
10200
10911
  this.setTemporaryHint = (inputId, hint, type) => setTemporaryHint(this, inputId, hint, type);
10201
10912
  this.registerFormInputConfigChangeFn = (fn) => this._onFormInputConfigChange = fn;
10202
- this.httpPostDataFunction = (url, data, options) => this.NGX_T_FORMS_CONFIG.formBuilder.httpPostDataFunction(url, data, options) || this._http.post(url, data);
10203
- this.httpGetDataFunction = (url, options) => this.NGX_T_FORMS_CONFIG.formBuilder.httpGetDataFunction(url, options) || this._http.get(url);
10913
+ // Host transport first; direct HttpClient only when the host supplies none.
10914
+ // The fallback MUST forward `options` — it carries the resolved header
10915
+ // template (and any persisted `params` bag), which the old `.post(url, data)`
10916
+ // form silently dropped. `?.()`/`??` so an absent host function falls back
10917
+ // instead of throwing, and a host function's Observable is never coerced.
10918
+ this.httpPostDataFunction = (url, data, options) => this.NGX_T_FORMS_CONFIG.formBuilder.httpPostDataFunction?.(url, data, options) ?? this._http.post(url, data, options);
10919
+ this.httpGetDataFunction = (url, options) => this.NGX_T_FORMS_CONFIG.formBuilder.httpGetDataFunction?.(url, options) ?? this._http.get(url, options);
10920
+ this.httpPutDataFunction = (url, data, options) => this.NGX_T_FORMS_CONFIG.formBuilder.httpPutDataFunction?.(url, data, options) ?? this._http.put(url, data, options);
10204
10921
  this._errorTimeoutIds = {};
10205
10922
  this.setInputTemporaryError = (inputId, message) => setInputTemporaryError(this, inputId, message);
10206
10923
  this.setInputError = (err, inputId) => setInputError(this, err, inputId);
@@ -10391,6 +11108,50 @@ class FormTowerControllerService {
10391
11108
  }
10392
11109
  this.#scoaInnerInputSub = sub;
10393
11110
  };
11111
+ /**
11112
+ * Bridges live edits of **DateRangePicker half controls** into the signal
11113
+ * graph.
11114
+ *
11115
+ * A date-range column is flattened into two synthetic inputs whose ids (and
11116
+ * control names) are `${columnId}.${startKey}` / `${columnId}.${endKey}`.
11117
+ * The range element writes those controls directly (`control.setValue`), and
11118
+ * the generic value bridge in `t-form-input` deliberately no-ops for date
11119
+ * ranges — so before this bridge existed a user-picked range never reached
11120
+ * `#model`, and every dependent value/options POST keyed on the range stayed
11121
+ * permanently `idle` (owner decision 2026-08-18: fixed, with the builders'
11122
+ * name-keyed snapshot fix). Direct mirror of
11123
+ * {@link FormTowerControllerService.bindScoaInnerInputControls}.
11124
+ *
11125
+ * Idempotent (tears down the prior bridge first) and anchored to
11126
+ * `_destroyed$`, so re-init/destroy drops every half subscription.
11127
+ */
11128
+ this.bindDateRangeHalfControls = () => {
11129
+ this.#dateRangeHalfSub?.unsubscribe();
11130
+ this.#dateRangeHalfSub = undefined;
11131
+ if (!this._mainForm)
11132
+ return;
11133
+ // allFormInputs() lists the flattened HALVES (never the raw column), each
11134
+ // carrying the DateRangePicker element and a dotted `${colId}.${key}` id.
11135
+ const halfIds = new Set((this.allFormInputs() ?? [])
11136
+ .filter(input => input.element === ElementTypes.DateRangePicker)
11137
+ .map(input => input.id));
11138
+ if (halfIds.size === 0)
11139
+ return;
11140
+ const sub = new Subscription();
11141
+ for (const sectionGroup of Object.values(this._mainForm.controls)) {
11142
+ const group = sectionGroup;
11143
+ if (!group?.controls)
11144
+ continue;
11145
+ for (const [controlName, control] of Object.entries(group.controls)) {
11146
+ if (!halfIds.has(controlName))
11147
+ continue;
11148
+ sub.add(control.valueChanges
11149
+ .pipe(takeUntil(this._destroyed$))
11150
+ .subscribe(value => this.updateValue(controlName, value)));
11151
+ }
11152
+ }
11153
+ this.#dateRangeHalfSub = sub;
11154
+ };
10394
11155
  // ──────────────────────────────────────────────────────────────────────────
10395
11156
  // W13 — Refresh / revert family (resource .reload() + #derived membership)
10396
11157
  // ──────────────────────────────────────────────────────────────────────────
@@ -10683,6 +11444,23 @@ class FormTowerControllerService {
10683
11444
  * derived signals through `readDep`. Built once per `initialize` (Blueprint §2.2).
10684
11445
  */
10685
11446
  #derived;
11447
+ /**
11448
+ * `inputId → live visibility`, for conditional inputs ONLY. An **absent entry
11449
+ * means always visible**, so {@link FormTowerControllerService.#isVisible}
11450
+ * returns a literal without touching the reactive graph — a form with no
11451
+ * `conditionalInputConfig` pays exactly nothing.
11452
+ *
11453
+ * A sibling of `#derived`, deliberately not a `DerivedEntry` variant:
11454
+ * visibility produces neither value, options nor validation, and modelling it
11455
+ * as a function type would force a skip-clause into six existing loops (see
11456
+ * `build-conditional-visibility.ts`).
11457
+ *
11458
+ * Keyed by `input.id`, which for MultipleInput sub-rows and mSCOA inner inputs
11459
+ * is already the composite `${column.id}.${child.id}` that
11460
+ * {@link allFormInputs} mints — so one map covers all three levels with no
11461
+ * special-casing.
11462
+ */
11463
+ #visibility;
10686
11464
  /** FormGroup-projection effect (signals → FormGroup). Created in `initialize`. */
10687
11465
  #formProjection;
10688
11466
  /** settled-gated `saveFormData` persist effect. Created in `initialize`. */
@@ -10733,6 +11511,11 @@ class FormTowerControllerService {
10733
11511
  * {@link FormTowerControllerService.bindScoaInnerInputControls}.
10734
11512
  */
10735
11513
  #scoaInnerInputSub;
11514
+ /**
11515
+ * Bridge subscriptions for DateRangePicker half controls (one composite sub).
11516
+ * See {@link FormTowerControllerService.bindDateRangeHalfControls}.
11517
+ */
11518
+ #dateRangeHalfSub;
10736
11519
  // ──────────────────────────────────────────────────────────────────────────
10737
11520
  // W7 — Getters / setters re-pointed onto the source signals
10738
11521
  // ──────────────────────────────────────────────────────────────────────────
@@ -10787,10 +11570,31 @@ class FormTowerControllerService {
10787
11570
  * @returns The dependency value, or `undefined` (self-edge / absent).
10788
11571
  */
10789
11572
  #readDep(selfId, inputId) {
11573
+ // ORDER IS LOAD-BEARING. The self-edge guard MUST precede the visibility
11574
+ // guard: a condition that references its own input would otherwise evaluate
11575
+ // `vis(X)` from inside `vis(X)` and Angular would throw a computation cycle.
10790
11576
  if (inputId === selfId)
10791
11577
  return undefined;
11578
+ // A hidden input is non-existent to the tower — dependents read `undefined`,
11579
+ // so dependent conditionals collapse transitively (hiding a parent hides its
11580
+ // conditional children).
11581
+ if (!this.#isVisible(inputId))
11582
+ return undefined;
10792
11583
  return this.#narrowDependencyValue(this.#rawDep(inputId));
10793
11584
  }
11585
+ /**
11586
+ * Whether `inputId` is currently revealed.
11587
+ *
11588
+ * An input with no `conditionalInputConfig` has no visibility entry, so this
11589
+ * returns the literal `true` **without reading any signal** — the zero-cost
11590
+ * path every non-conditional form takes.
11591
+ *
11592
+ * @param inputId - The input to test (composite id for sub-row / mSCOA children).
11593
+ * @returns `true` when the input participates in the form right now.
11594
+ */
11595
+ #isVisible(inputId) {
11596
+ return this.#visibility.get(inputId)?.() ?? true;
11597
+ }
10794
11598
  /**
10795
11599
  * The unadapted signal-graph value for `inputId` — the raw resolution half of
10796
11600
  * {@link FormTowerControllerService.#readDep}, split out so the read order stays
@@ -11015,20 +11819,7 @@ class FormTowerControllerService {
11015
11819
  */
11016
11820
  #buildDerivedForInput(input) {
11017
11821
  const types = getAllFunctionTypes(input);
11018
- const ctx = {
11019
- readDep: (depId) => this.#readDep(input.id, depId),
11020
- utils: this.#buildUtils(),
11021
- injector: this.#injector,
11022
- // Label lookup is `untracked` so a diagnostic effect that names missing
11023
- // dependencies does not take a reactive dependency on the definition —
11024
- // otherwise the hint-write (which patches the definition) would re-trigger it.
11025
- describeDep: (depId) => {
11026
- const dep = untracked(() => this.#inputById().get(depId));
11027
- const label = dep?.label?.trim();
11028
- return label && label.length > 0 ? label : depId;
11029
- },
11030
- registerCleanup: (teardown) => { this.#derivedCleanups.push(teardown); },
11031
- };
11822
+ const ctx = this.#buildDerivedContext(input);
11032
11823
  const set = (t, entry) => {
11033
11824
  this.#derived.set(`${input.id}:${t}`, entry);
11034
11825
  };
@@ -11061,6 +11852,109 @@ class FormTowerControllerService {
11061
11852
  set(FunctionTypes.ManualValueValidation, buildManualValidation(input, ctx));
11062
11853
  }
11063
11854
  }
11855
+ /**
11856
+ * The immutable build context handed to every pure builder for one input —
11857
+ * shared by {@link FormTowerControllerService.#buildDerivedForInput} and
11858
+ * {@link FormTowerControllerService.#buildVisibilityForInputs} so a visibility
11859
+ * rule reads dependencies through exactly the same gated reader (and the same
11860
+ * self-edge guard) as a validator or a resource's params.
11861
+ *
11862
+ * @param input - The input the builder belongs to.
11863
+ * @returns The build context bound to that input.
11864
+ */
11865
+ #buildDerivedContext(input) {
11866
+ return {
11867
+ readDep: (depId) => this.#readDep(input.id, depId),
11868
+ // Untracked self-read for diagnostics (stale-selection warning): bypasses
11869
+ // the self-edge guard without letting the caller take a reactive
11870
+ // dependency on #model — an effect reading its own input's value through
11871
+ // a tracked read would re-run on every selection.
11872
+ readSelf: () => untracked(() => this.#rawDep(input.id)),
11873
+ utils: this.#buildUtils(),
11874
+ injector: this.#injector,
11875
+ // Label lookup is `untracked` so a diagnostic effect that names missing
11876
+ // dependencies does not take a reactive dependency on the definition —
11877
+ // otherwise the hint-write (which patches the definition) would re-trigger it.
11878
+ describeDep: (depId) => {
11879
+ const dep = untracked(() => this.#inputById().get(depId));
11880
+ const label = dep?.label?.trim();
11881
+ return label && label.length > 0 ? label : depId;
11882
+ },
11883
+ registerCleanup: (teardown) => { this.#derivedCleanups.push(teardown); },
11884
+ // Self-visibility. Resource `params` computeds return `undefined` while
11885
+ // this is false, which is what keeps a hidden input's fetch from firing:
11886
+ // an Angular `resource()` loads from its OWN eager effect as soon as
11887
+ // `params` is defined — nothing has to read `.status()` or `.value()` —
11888
+ // so gating the readers would not have stopped a single request.
11889
+ isVisible: (depId) => this.#isVisible(depId ?? input.id),
11890
+ };
11891
+ }
11892
+ /**
11893
+ * Builds the conditional-visibility signal for every input that declares one,
11894
+ * then fails open on any cycle.
11895
+ *
11896
+ * Because rules read through the gated `#readDep`, `vis(X)` reads `vis(dep)` —
11897
+ * a digraph whose edges are the rules' `inputsObservedForChanges`. A cycle
11898
+ * would make Angular throw *"Detected cycle in computations"* on first read,
11899
+ * at render time, naming neither field. Detecting it statically here lets the
11900
+ * form render in full with the offending inputs forced visible and named by
11901
+ * label, which is the loud-but-recoverable failure the design calls for.
11902
+ *
11903
+ * MUST be called inside `runInInjectionContext` (it creates computeds).
11904
+ *
11905
+ * @param inputs - The flattened input list (`allFormInputs()`).
11906
+ */
11907
+ #buildVisibilityForInputs(inputs) {
11908
+ const edges = [];
11909
+ const register = (input) => {
11910
+ if (input.element === ElementTypes.SectionTitle)
11911
+ return;
11912
+ if (this.#visibility.has(input.id))
11913
+ return;
11914
+ const rules = gatingRulesOf(input);
11915
+ if (rules.length === 0)
11916
+ return;
11917
+ // Only the gated dependency reader — see `buildConditionalVisibility`'s
11918
+ // note on why a visibility rule must not be handed the side-effect bag.
11919
+ const signal = buildConditionalVisibility(input, {
11920
+ readDep: (depId) => this.#readDep(input.id, depId),
11921
+ });
11922
+ if (!signal)
11923
+ return;
11924
+ this.#visibility.set(input.id, signal);
11925
+ edges.push({
11926
+ inputId: input.id,
11927
+ observes: rules.flatMap((rule) => (rule.inputsObservedForChanges ?? [])
11928
+ .map((observed) => observed.parentInputId ?? observed.inputId)
11929
+ .filter((id) => typeof id === 'string' && id.length > 0)),
11930
+ });
11931
+ };
11932
+ for (const input of inputs)
11933
+ register(input);
11934
+ // `allFormInputs` REPLACES some slide columns instead of listing them:
11935
+ // a DateRangePicker column flattens to its two composite halves and the raw
11936
+ // column id never appears. The halves' signals (registered above) gate the
11937
+ // controls, but the RENDER gates — `isInputVisible(col.id)` in the stepper's
11938
+ // `visibleSteps` and `isSectionVisible` — key on the raw slide-column id.
11939
+ // Without an entry for it, a conditional DateRangePicker renders forever:
11940
+ // shown with disabled halves instead of hidden. Register the raw columns
11941
+ // too; ids already covered (every other element keeps its id) are skipped.
11942
+ for (const slide of this.form?.slides ?? []) {
11943
+ for (const column of slide.columns)
11944
+ register(column);
11945
+ }
11946
+ const cycles = findVisibilityCycles(edges);
11947
+ if (cycles.length === 0)
11948
+ return;
11949
+ // Fail open, loudly: drop the offending signals so those inputs are
11950
+ // permanently visible, and name them by label so the author can fix the rule.
11951
+ const labels = untracked(() => cycles.map((id) => this.#inputById().get(id)?.label?.trim() || id));
11952
+ for (const id of cycles)
11953
+ this.#visibility.delete(id);
11954
+ console.error(`[ngx-t-forms] Conditional-display rules form a cycle between: ${labels.join(', ')}. ` +
11955
+ `Those inputs have been forced visible. Break the loop so each rule only observes ` +
11956
+ `inputs that do not (directly or transitively) observe it back.`);
11957
+ }
11064
11958
  /** Builds the {@link IFunctionUtils} bag handed to every builder + status helper. */
11065
11959
  #buildUtils() {
11066
11960
  return {
@@ -11069,6 +11963,7 @@ class FormTowerControllerService {
11069
11963
  httpPostDataFunction: this.httpPostDataFunction.bind(this),
11070
11964
  setInputTemporaryError: this.setInputTemporaryError.bind(this),
11071
11965
  httpGetDataFunction: this.httpGetDataFunction.bind(this),
11966
+ httpPutDataFunction: this.httpPutDataFunction.bind(this),
11072
11967
  updateFormInputConfig: this.updateFormInputConfig.bind(this),
11073
11968
  setInputStatus: this.setInputStatus.bind(this),
11074
11969
  removeInputStatus: this.removeInputStatus.bind(this),
@@ -11091,11 +11986,56 @@ class FormTowerControllerService {
11091
11986
  const main = this._mainForm;
11092
11987
  if (!main)
11093
11988
  return;
11989
+ // Iterate the visibility map DIRECTLY, not just the ids present in `v`.
11990
+ // A conditional input the user has never typed into, with no derived
11991
+ // entry, appears in neither `#model` nor `#derived` — so flipping its
11992
+ // visibility would not invalidate `#value()` through a value key, its
11993
+ // control would never be enabled, and the field would render disabled
11994
+ // forever. Reading every visibility signal here also establishes the
11995
+ // dependency that re-runs this effect on ANY flip.
11996
+ this.#syncVisibleControls();
11094
11997
  for (const [inputId, val] of Object.entries(v)) {
11095
11998
  this.#projectControl(inputId, val);
11096
11999
  }
11097
12000
  }, ...(ngDevMode ? [{ debugName: "#formProjection" }] : /* istanbul ignore next */ []));
11098
12001
  }
12002
+ /**
12003
+ * Aligns every conditional input's projected control with its live visibility:
12004
+ * hidden ⇒ `disable()`, revealed ⇒ `enable()` (unless the input is
12005
+ * configuration-disabled, which always wins).
12006
+ *
12007
+ * `{ emitEvent: false }` is MANDATORY, not tidiness.
12008
+ * {@link FormTowerControllerService.bindMultipleInputRowControls} subscribes
12009
+ * sub-row `valueChanges` → `updateValue()` → `#model.update()`; without the
12010
+ * flag, disabling a sub-row control from inside the projection effect would
12011
+ * write a signal from an effect and close a feedback loop.
12012
+ *
12013
+ * Idempotent: Angular's `disable()`/`enable()` are cheap no-ops when the
12014
+ * control is already in the requested state, but the explicit status check
12015
+ * below avoids the ancestor-revalidation walk they would otherwise perform on
12016
+ * every projection pass.
12017
+ */
12018
+ #syncVisibleControls() {
12019
+ const main = this._mainForm;
12020
+ if (!main)
12021
+ return;
12022
+ for (const [inputId, visible] of this.#visibility) {
12023
+ const isVisible = visible();
12024
+ const input = this.#inputById().get(inputId);
12025
+ if (!input || !input.sectionId)
12026
+ continue;
12027
+ const control = getSectionControl(main, input.sectionId, inputId);
12028
+ if (!control)
12029
+ continue;
12030
+ // Config-`disabled` always wins: a field authored as disabled stays
12031
+ // disabled when its condition reveals it.
12032
+ const shouldEnable = !input.disabled && isVisible;
12033
+ if (shouldEnable && control.disabled)
12034
+ control.enable({ emitEvent: false });
12035
+ else if (!shouldEnable && control.enabled)
12036
+ control.disable({ emitEvent: false });
12037
+ }
12038
+ }
11099
12039
  /**
11100
12040
  * Phase-3 seam: the SOLE place that writes the projected `FormGroup`. Patches
11101
12041
  * the control for `inputId` with `{ emitEvent: false }` so no `valueChanges`
@@ -11293,6 +12233,15 @@ class FormTowerControllerService {
11293
12233
  const t = key.slice(key.indexOf(':') + 1);
11294
12234
  if (entry.kind === 'validation')
11295
12235
  continue; // not a refreshable "function"
12236
+ // A hidden input exposes no refreshable functions, so `refreshInput`,
12237
+ // `refreshInputWithDependencies`, `refreshSection`, `canRefresh` and
12238
+ // `runMultipleInputPrepopulationFunctions` all resolve `undefined` and
12239
+ // no-op. Belt-and-braces rather than load-bearing: a hidden resource's
12240
+ // params are `undefined`, so it is `idle`, and `reload()` returns false on
12241
+ // an idle resource — but a refresh that quietly does nothing is clearer
12242
+ // than one that appears to run.
12243
+ if (!this.#isVisible(inputId))
12244
+ continue;
11296
12245
  (out[inputId] ??= {})[t] = this.#entryToObservable(entry);
11297
12246
  }
11298
12247
  return out;
@@ -11451,6 +12400,10 @@ class FormTowerControllerService {
11451
12400
  #isEditableField(input, systemIds) {
11452
12401
  if (systemIds.has(input.id))
11453
12402
  return false;
12403
+ // A hidden input is non-existent to the tower, so it can neither receive a
12404
+ // suggestion nor appear in the schema an external system reads.
12405
+ if (!this.#isVisible(input.id))
12406
+ return false;
11454
12407
  // Composite inner controls (MSCOA inner inputs, MultipleInput sub-row fields)
11455
12408
  // are addressed through their parent field, not as standalone targets.
11456
12409
  if (input.id.includes('.'))
@@ -11476,6 +12429,14 @@ class FormTowerControllerService {
11476
12429
  for (const child of children) {
11477
12430
  if (child.element === ElementTypes.SectionTitle)
11478
12431
  continue;
12432
+ // A hidden sub-row field is not part of the editable surface. `#isEditableField`
12433
+ // cannot cover this — it rejects every composite id outright, because inner
12434
+ // controls are addressed through their parent, so the parent's row schema is
12435
+ // the only place the gate can be applied. The key is the composite id the
12436
+ // visibility map is built with (`allFormInputs` mints it; `formInputs`
12437
+ // children carry their original id).
12438
+ if (!this.#isVisible(`${input.id}.${child.id}`))
12439
+ continue;
11479
12440
  const isMscoa = child.element === ElementTypes.MscoaSelection;
11480
12441
  const isMultiple = child.element === ElementTypes.MultipleInput;
11481
12442
  const options = isMscoa || isMultiple ? undefined : this.#fieldOptions(child);
@@ -11525,7 +12486,12 @@ class FormTowerControllerService {
11525
12486
  addSegs(cfg?.segments, 'accrual');
11526
12487
  if (accountingBasis !== 'accrual')
11527
12488
  addSegs(cfg?.cashSegments, 'cash');
11528
- const inputs = (cfg?.inputs ?? []).map((i) => ({
12489
+ // Hidden mSCOA inner inputs are not part of the editable surface — same
12490
+ // reasoning as the MultipleInput row fields: their composite ids are rejected
12491
+ // by `#isEditableField`, so the parent's capability is the only place to gate.
12492
+ const inputs = (cfg?.inputs ?? [])
12493
+ .filter((i) => this.#isVisible(`${input.id}.${i.id}`))
12494
+ .map((i) => ({
11529
12495
  key: i.formControlName ?? i.id,
11530
12496
  label: i.label ?? i.formControlName ?? i.id,
11531
12497
  element: String(i.element),
@@ -16125,9 +17091,9 @@ class FormBuilderComponent {
16125
17091
  this.#store.actionsFormBuilder.setFormTitle(value);
16126
17092
  }
16127
17093
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: FormBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16128
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormBuilderComponent, isStandalone: true, selector: "lib-form-builder, app-form-builder", inputs: { formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [FormsStoreService], ngImport: i0, template: "<header style=\"position:fixed;width:100%;left:0px;top:0px\">\r\n <mat-toolbar color=\"primary\">\r\n @if (closeButton) {\r\n <button mat-icon-button [style.color]=\"closeButton.color\" (click)=\"closeButton.onClick()\">\r\n <mat-icon>{{closeButton.icon}}</mat-icon>\r\n </button>\r\n }\r\n\r\n <!-- Navigation group -->\r\n <div class=\"nav-group\">\r\n <button mat-button routerLink=\"/\">Forms</button>\r\n <mat-icon>navigate_next</mat-icon>\r\n </div>\r\n\r\n <!-- Title input with optimized binding -->\r\n @if (selectHasFormId()) {\r\n <input [ngModel]=\"titleValue()\" (ngModelChange)=\"setTitleValue($event)\" class=\"section-title-input\" placeholder=\"Enter Form Title\">\r\n }\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n @defer (on viewport) {\r\n <lib-forms-builder-menu />\r\n } @placeholder {\r\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"20\" />\r\n </div>\r\n\r\n }\r\n\r\n <span class=\"divider\">|</span>\r\n\r\n <!-- Persist to server: visible once local preview is in sync -->\r\n @if (!pendingExternalRefresh()) {\r\n <button mat-raised-button color=\"accent\" class=\"save-button\" [disabled]=\"!(canSaveForm())\" (click)=\"saveForm()\">\r\n <mat-icon style=\"width: 24px;\">cloud_upload</mat-icon>\r\n @if (selectFormBuilderIsBusy()) {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Creating form...' : 'Saving changes...'}}</span>\r\n </span>\r\n } @else {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Save New Form' : 'Save Changes'}}</span>\r\n @if (canSaveForm()) {\r\n <span class=\"save-sub\">Not saved to server yet</span>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <!-- Local sync: applies your changes to the builder preview \u00B7 does NOT save to server -->\r\n @if (pendingExternalRefresh()) {\r\n <button class=\"refresh-button\" matRipple matRippleColor=\"rgba(255,255,255,0.12)\" (click)=\"triggerRefreshNow()\">\r\n <span class=\"countdown-ring\">\r\n <mat-progress-spinner\r\n diameter=\"34\"\r\n mode=\"determinate\"\r\n [value]=\"refreshCountdown() * 20\">\r\n </mat-progress-spinner>\r\n <span class=\"countdown-number\">{{refreshCountdown()}}</span>\r\n </span>\r\n <span class=\"refresh-text\">\r\n <span class=\"refresh-label\">Apply Now</span>\r\n <span class=\"refresh-sub\">Preview updates in {{refreshCountdown()}}s</span>\r\n </span>\r\n <mat-icon class=\"refresh-chevron\">chevron_right</mat-icon>\r\n </button>\r\n }\r\n\r\n </mat-toolbar>\r\n</header>\r\n\r\n<!-- Main content with optimized loading -->\r\n@defer (on viewport) {\r\n<div class=\"container\">\r\n <div class=\"middle\">\r\n <br>\r\n @if (selectLoadingForm()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner />\r\n </div>\r\n } @else {\r\n <lib-form-section-stepper />\r\n }\r\n <br>\r\n @if ((hasMissingConfigs()) && !(selectLoadingForm())) {\r\n <lib-missing-form-configs />\r\n }\r\n <!-- Updated time info -->\r\n @if (!(isNewForm())) {\r\n <div class=\"updated-time\">\r\n <mat-icon>update</mat-icon>\r\n <span>Updated {{ selectFormUpdated() }}</span>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (elementEditorOpen()) {\r\n <lib-input-editor style=\"max-width:480px;height:calc(100vh - 76px);\r\n position:sticky;\r\n top:76px;\r\n z-index:1\" cdkDrag cdkDragBoundary=\"container\" class=\"middle editor-container\" />\r\n }\r\n <!-- Missing fields section -->`\r\n\r\n\r\n</div>\r\n}@placeholder {\r\n<div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n</div>\r\n}", styles: [".container{display:flex;width:100%;height:calc(100% - 64px);padding-top:4em}.side{width:100px;background-color:var(--sem-error-surface)}.middle{flex-grow:1;height:calc(100vh - 68px);overflow:auto;background-color:none}.section-title-input{border:none;background-color:transparent;font-size:.8575em;font-weight:600;color:var(--lib-forms-on-primary);padding-top:12px;padding-bottom:12px;outline:none;width:100%;min-width:268px;transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid var(--lib-forms-on-primary)}.missing-fields{position:fixed;bottom:0}.updated-time{display:flex;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));gap:8px;align-items:center;line-height:normal;font-size:.875em;bottom:0;position:absolute;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:8px;border-radius:4px}.nav-group{display:flex;align-items:center;gap:8px}.save-button{margin-left:8px;min-width:168px;height:44px}.save-button .save-text{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.save-button .save-text .save-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap}.save-button .save-text .save-sub{font-size:10px;line-height:1;opacity:.78;white-space:nowrap}.refresh-button{margin-left:8px;background:var(--mat-fab-small-container-color, var(--mat-sys-tertiary-container));color:var(--mat-sys-on-tertiary-container);border:1.5px solid var(--mat-sys-outline-variant);border-radius:10px;padding:4px 14px 4px 6px;cursor:pointer;display:inline-flex;align-items:center;gap:12px;height:44px;width:fit-content;box-shadow:0 2px 12px color-mix(in srgb,var(--lib-forms-shadow-color) 18%,transparent);transition:box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);outline:none;overflow:hidden;position:relative}.refresh-button:hover{box-shadow:0 4px 20px color-mix(in srgb,var(--lib-forms-shadow-color) 28%,transparent);transform:translateY(-1px)}.refresh-button:active{transform:translateY(0);box-shadow:0 1px 6px color-mix(in srgb,var(--lib-forms-shadow-color) 12%,transparent)}.refresh-button .countdown-ring{position:relative;width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.refresh-button .countdown-ring mat-progress-spinner{position:absolute;inset:0;--mdc-circular-progress-active-indicator-color: var(--mat-sys-on-tertiary-container);--mdc-circular-progress-track-color: color-mix(in srgb, var(--mat-sys-on-tertiary-container) 18%, transparent)}.refresh-button .countdown-ring .countdown-number{font-size:11px;font-weight:600;line-height:1;z-index:1;letter-spacing:-.3px;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.refresh-button .refresh-text .refresh-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text .refresh-sub{font-size:10px;line-height:1;opacity:.68;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-chevron{font-size:18px;width:18px;height:18px;opacity:.65;flex-shrink:0;color:var(--mat-sys-on-tertiary-container)}.loading-container{display:flex;height:calc(100% - 150px);justify-content:center;align-items:center}.editor-container{max-width:500px}.divider{margin:0 8px;opacity:.5}app-missing-form-configs{position:absolute;bottom:0;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i7$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs').then(m => m.FormsBuilderMenuComponent)], () => [i3$1.MatIcon, i4.MatProgressSpinner, i1$2.CdkDrag, import('./ngx-t-forms-input-editor.component-D12hrHOc.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs').then(m => m.MissingFormConfigsComponent)]] }); }
17094
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: FormBuilderComponent, isStandalone: true, selector: "lib-form-builder, app-form-builder", inputs: { formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null } }, providers: [FormsStoreService], ngImport: i0, template: "<header style=\"position:fixed;width:100%;left:0px;top:0px\">\r\n <mat-toolbar color=\"primary\">\r\n @if (closeButton) {\r\n <button mat-icon-button [style.color]=\"closeButton.color\" (click)=\"closeButton.onClick()\">\r\n <mat-icon>{{closeButton.icon}}</mat-icon>\r\n </button>\r\n }\r\n\r\n <!-- Navigation group -->\r\n <div class=\"nav-group\">\r\n <button mat-button routerLink=\"/\">Forms</button>\r\n <mat-icon>navigate_next</mat-icon>\r\n </div>\r\n\r\n <!-- Title input with optimized binding -->\r\n @if (selectHasFormId()) {\r\n <input [ngModel]=\"titleValue()\" (ngModelChange)=\"setTitleValue($event)\" class=\"section-title-input\" placeholder=\"Enter Form Title\">\r\n }\r\n\r\n <span class=\"spacer\"></span>\r\n\r\n @defer (on viewport) {\r\n <lib-forms-builder-menu />\r\n } @placeholder {\r\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"20\" />\r\n </div>\r\n\r\n }\r\n\r\n <span class=\"divider\">|</span>\r\n\r\n <!-- Persist to server: visible once local preview is in sync -->\r\n @if (!pendingExternalRefresh()) {\r\n <button mat-raised-button color=\"accent\" class=\"save-button\" [disabled]=\"!(canSaveForm())\" (click)=\"saveForm()\">\r\n <mat-icon style=\"width: 24px;\">cloud_upload</mat-icon>\r\n @if (selectFormBuilderIsBusy()) {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Creating form...' : 'Saving changes...'}}</span>\r\n </span>\r\n } @else {\r\n <span class=\"save-text\">\r\n <span class=\"save-label\">{{(isNewForm()) ? 'Save New Form' : 'Save Changes'}}</span>\r\n @if (canSaveForm()) {\r\n <span class=\"save-sub\">Not saved to server yet</span>\r\n }\r\n </span>\r\n }\r\n </button>\r\n }\r\n\r\n <!-- Local sync: applies your changes to the builder preview \u00B7 does NOT save to server -->\r\n @if (pendingExternalRefresh()) {\r\n <button class=\"refresh-button\" matRipple matRippleColor=\"rgba(255,255,255,0.12)\" (click)=\"triggerRefreshNow()\">\r\n <span class=\"countdown-ring\">\r\n <mat-progress-spinner\r\n diameter=\"34\"\r\n mode=\"determinate\"\r\n [value]=\"refreshCountdown() * 20\">\r\n </mat-progress-spinner>\r\n <span class=\"countdown-number\">{{refreshCountdown()}}</span>\r\n </span>\r\n <span class=\"refresh-text\">\r\n <span class=\"refresh-label\">Apply Now</span>\r\n <span class=\"refresh-sub\">Preview updates in {{refreshCountdown()}}s</span>\r\n </span>\r\n <mat-icon class=\"refresh-chevron\">chevron_right</mat-icon>\r\n </button>\r\n }\r\n\r\n </mat-toolbar>\r\n</header>\r\n\r\n<!-- Main content with optimized loading -->\r\n@defer (on viewport) {\r\n<div class=\"container\">\r\n <div class=\"middle\">\r\n <br>\r\n @if (selectLoadingForm()) {\r\n <div class=\"loading-container\">\r\n <mat-spinner />\r\n </div>\r\n } @else {\r\n <lib-form-section-stepper />\r\n }\r\n <br>\r\n @if ((hasMissingConfigs()) && !(selectLoadingForm())) {\r\n <lib-missing-form-configs />\r\n }\r\n <!-- Updated time info -->\r\n @if (!(isNewForm())) {\r\n <div class=\"updated-time\">\r\n <mat-icon>update</mat-icon>\r\n <span>Updated {{ selectFormUpdated() }}</span>\r\n </div>\r\n }\r\n </div>\r\n\r\n @if (elementEditorOpen()) {\r\n <lib-input-editor style=\"max-width:480px;height:calc(100vh - 76px);\r\n position:sticky;\r\n top:76px;\r\n z-index:1\" cdkDrag cdkDragBoundary=\"container\" class=\"middle editor-container\" />\r\n }\r\n <!-- Missing fields section -->`\r\n\r\n\r\n</div>\r\n}@placeholder {\r\n<div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"50\" />\r\n</div>\r\n}", styles: [".container{display:flex;width:100%;height:calc(100% - 64px);padding-top:4em}.side{width:100px;background-color:var(--sem-error-surface)}.middle{flex-grow:1;height:calc(100vh - 68px);overflow:auto;background-color:none}.section-title-input{border:none;background-color:transparent;font-size:.8575em;font-weight:600;color:var(--lib-forms-on-primary);padding-top:12px;padding-bottom:12px;outline:none;width:100%;min-width:268px;transition:border-bottom-color .3s ease-in-out}.section-title-input:focus{border-bottom:1px solid var(--lib-forms-on-primary)}.missing-fields{position:fixed;bottom:0}.updated-time{display:flex;color:var(--mat-sidenav-content-text-color, var(--mat-sys-on-background));gap:8px;align-items:center;line-height:normal;font-size:.875em;bottom:0;position:absolute;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);padding:8px;border-radius:4px}.nav-group{display:flex;align-items:center;gap:8px}.save-button{margin-left:8px;min-width:168px;height:44px}.save-button .save-text{display:flex;flex-direction:column;align-items:flex-start;gap:2px}.save-button .save-text .save-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap}.save-button .save-text .save-sub{font-size:10px;line-height:1;opacity:.78;white-space:nowrap}.refresh-button{margin-left:8px;background:var(--mat-fab-small-container-color, var(--mat-sys-tertiary-container));color:var(--mat-sys-on-tertiary-container);border:1.5px solid var(--mat-sys-outline-variant);border-radius:10px;padding:4px 14px 4px 6px;cursor:pointer;display:inline-flex;align-items:center;gap:12px;height:44px;width:fit-content;box-shadow:0 2px 12px color-mix(in srgb,var(--lib-forms-shadow-color) 18%,transparent);transition:box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);outline:none;overflow:hidden;position:relative}.refresh-button:hover{box-shadow:0 4px 20px color-mix(in srgb,var(--lib-forms-shadow-color) 28%,transparent);transform:translateY(-1px)}.refresh-button:active{transform:translateY(0);box-shadow:0 1px 6px color-mix(in srgb,var(--lib-forms-shadow-color) 12%,transparent)}.refresh-button .countdown-ring{position:relative;width:34px;height:34px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.refresh-button .countdown-ring mat-progress-spinner{position:absolute;inset:0;--mdc-circular-progress-active-indicator-color: var(--mat-sys-on-tertiary-container);--mdc-circular-progress-track-color: color-mix(in srgb, var(--mat-sys-on-tertiary-container) 18%, transparent)}.refresh-button .countdown-ring .countdown-number{font-size:11px;font-weight:600;line-height:1;z-index:1;letter-spacing:-.3px;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text{display:flex;flex-direction:column;align-items:flex-start;gap:3px}.refresh-button .refresh-text .refresh-label{font-size:13px;font-weight:600;line-height:1;letter-spacing:.01em;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-text .refresh-sub{font-size:10px;line-height:1;opacity:.68;white-space:nowrap;color:var(--mat-sys-on-tertiary-container)}.refresh-button .refresh-chevron{font-size:18px;width:18px;height:18px;opacity:.65;flex-shrink:0;color:var(--mat-sys-on-tertiary-container)}.loading-container{display:flex;height:calc(100% - 150px);justify-content:center;align-items:center}.editor-container{max-width:500px}.divider{margin:0 8px;opacity:.5}app-missing-form-configs{position:absolute;bottom:0;right:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i7.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: DragDropModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i7$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs').then(m => m.FormsBuilderMenuComponent)], () => [i3$1.MatIcon, i4.MatProgressSpinner, i1$2.CdkDrag, import('./ngx-t-forms-input-editor.component-oIzCTmbx.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs').then(m => m.MissingFormConfigsComponent)]] }); }
16129
17095
  }
16130
- i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: FormBuilderComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-forms-builder-menu.component-CcqyQLf5.mjs').then(m => m.FormsBuilderMenuComponent), import('./ngx-t-forms-input-editor.component-D12hrHOc.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-DOvVtJGB.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-BaTR_jzc.mjs').then(m => m.MissingFormConfigsComponent)], resolveMetadata: (FormsBuilderMenuComponent, InputEditorComponent, FormSectionStepperComponent, MissingFormConfigsComponent) => ({ decorators: [{
17096
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: FormBuilderComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-forms-builder-menu.component-DisrOv5x.mjs').then(m => m.FormsBuilderMenuComponent), import('./ngx-t-forms-input-editor.component-oIzCTmbx.mjs').then(m => m.InputEditorComponent), import('./ngx-t-forms-form-section-stepper.component-CFdwgxRl.mjs').then(m => m.FormSectionStepperComponent), import('./ngx-t-forms-missing-form-configs.component-C1XuXRdn.mjs').then(m => m.MissingFormConfigsComponent)], resolveMetadata: (FormsBuilderMenuComponent, InputEditorComponent, FormSectionStepperComponent, MissingFormConfigsComponent) => ({ decorators: [{
16131
17097
  type: Component,
16132
17098
  args: [{ selector: 'lib-form-builder, app-form-builder', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
16133
17099
  CommonModule,
@@ -16469,6 +17435,60 @@ class UserFormStepperComponent {
16469
17435
  this.stepper = viewChild('stepper', ...(ngDevMode ? [{ debugName: "stepper" }] : /* istanbul ignore next */ []));
16470
17436
  /** True when the engine holds at least one pending (unreviewed) AI suggestion. */
16471
17437
  this.hasPendingSuggestions = computed(() => this.engine.stagedSuggestions().some((s) => s.status === 'pending'), ...(ngDevMode ? [{ debugName: "hasPendingSuggestions" }] : /* istanbul ignore next */ []));
17438
+ /**
17439
+ * The form's steps with every conditionally-hidden input removed — what this
17440
+ * stepper renders.
17441
+ *
17442
+ * The filter lives HERE rather than in `selectFormSteps` because that selector
17443
+ * is shared with the form builder's own section stepper. Filtering centrally
17444
+ * would make a conditional field invisible, undraggable and un-editable to the
17445
+ * author the moment its condition happened to be false. The builder must see
17446
+ * every column; only the person filling the form in should not.
17447
+ *
17448
+ * A hidden MultipleInput sub-row field is dropped by replacing the column's
17449
+ * `formInputs` with a filtered copy. That array flows down through
17450
+ * `[inputConfig]` → `t-form-input` → `*ngComponentOutlet` →
17451
+ * `multiple-input-table-edit.innerInputs()`, so the sub-row editor, the
17452
+ * saved-rows table and `formInvalid()` all drop the field with no edits of
17453
+ * their own.
17454
+ *
17455
+ * Reading `engine.isInputVisible` makes this computed a consumer of the
17456
+ * visibility signals, so a rule flipping re-renders the affected columns and
17457
+ * nothing else.
17458
+ */
17459
+ this.visibleSteps = computed(() => this.engine.selectFormSteps()
17460
+ // A section whose every column is hidden does not apply to this user —
17461
+ // it is dropped entirely rather than rendered as an empty step to page
17462
+ // through. `handleStepChange` filters the same way, so the stepper's
17463
+ // selected index and the engine's section lookup stay in agreement.
17464
+ .filter((step) => this.engine.isSectionVisible(step.sectionId))
17465
+ .map((step) => ({
17466
+ ...step,
17467
+ columns: step.columns
17468
+ .filter((col) => this.engine.isInputVisible(col.id))
17469
+ .map((col) => {
17470
+ const children = col.formInputs;
17471
+ const mscoa = col.mscoaConfig;
17472
+ if (!children && !mscoa?.inputs)
17473
+ return col;
17474
+ return {
17475
+ ...col,
17476
+ ...(children && {
17477
+ formInputs: children.filter((child) => this.engine.isInputVisible(`${col.id}.${child.id}`)),
17478
+ }),
17479
+ // mSCOA inner inputs render through the chart's ComponentPortal
17480
+ // from `mscoaConfig.inputs` — same filtered-copy trick as the
17481
+ // MultipleInput children, so a hidden inner input is absent from
17482
+ // the DOM rather than shown disabled.
17483
+ ...(mscoa?.inputs && {
17484
+ mscoaConfig: {
17485
+ ...mscoa,
17486
+ inputs: mscoa.inputs.filter((child) => this.engine.isInputVisible(`${col.id}.${child.id}`)),
17487
+ },
17488
+ }),
17489
+ };
17490
+ }),
17491
+ })), ...(ngDevMode ? [{ debugName: "visibleSteps" }] : /* istanbul ignore next */ []));
16472
17492
  /** Whether the form is editable / can be navigated freely. */
16473
17493
  this.isEditable = true;
16474
17494
  /** True while the form definition is being fetched. */
@@ -16591,7 +17611,10 @@ class UserFormStepperComponent {
16591
17611
  return '';
16592
17612
  const currentIndex = stepper.selectedIndex;
16593
17613
  if (currentIndex > 0) {
16594
- return this.engine.selectFormSteps()?.[currentIndex - 1]?.label;
17614
+ // `selectedIndex` is a position in the RENDERED list, so the label must be
17615
+ // read from the same list — the unfiltered one would name the wrong step
17616
+ // once a section is hidden.
17617
+ return this.visibleSteps()?.[currentIndex - 1]?.label;
16595
17618
  }
16596
17619
  return '';
16597
17620
  }
@@ -16600,7 +17623,7 @@ class UserFormStepperComponent {
16600
17623
  if (stepper === undefined)
16601
17624
  return '';
16602
17625
  const currentIndex = stepper.selectedIndex;
16603
- const steps = this.engine.selectFormSteps();
17626
+ const steps = this.visibleSteps();
16604
17627
  if (!steps)
16605
17628
  return '';
16606
17629
  if (currentIndex < steps.length - 1) {
@@ -16613,7 +17636,9 @@ class UserFormStepperComponent {
16613
17636
  }
16614
17637
  get getSubmissionStatus() {
16615
17638
  const progress = this.engine.formProgress() || 0;
16616
- const steps = this.engine.selectFormSteps();
17639
+ // Rendered steps: `getSubmissionStatusFn` indexes this by `selectedIndex`
17640
+ // and counts invalid/unseen sections, and a hidden section is neither.
17641
+ const steps = this.visibleSteps();
16617
17642
  return getSubmissionStatusFn(this.stepper(), this.engine.mainForm, progress, steps, this.loading());
16618
17643
  }
16619
17644
  handleSubmit() {
@@ -16669,7 +17694,7 @@ class UserFormStepperComponent {
16669
17694
  startTour() {
16670
17695
  const tourOptions = this.engine.selectAllFormTours();
16671
17696
  const formTitle = this.engine.form?.formTitle || 'this Form';
16672
- const firstSectionTitle = this.engine.selectFormSteps()[0]?.label || 'First Section';
17697
+ const firstSectionTitle = this.visibleSteps()[0]?.label || 'First Section';
16673
17698
  const fullTourOptions = [
16674
17699
  {
16675
17700
  anchorId: 'form-title',
@@ -16733,7 +17758,7 @@ class UserFormStepperComponent {
16733
17758
  this.engine.refreshSection(sectionId).pipe(take(1), takeUntilDestroyed(this.#destroyRef)).subscribe();
16734
17759
  }
16735
17760
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: UserFormStepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
16736
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UserFormStepperComponent, isStandalone: true, selector: "lib-user-form-stepper", inputs: { formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null }, globalSystemInputs: { classPropertyName: "globalSystemInputs", publicName: "globalSystemInputs", isSignal: true, isRequired: false, transformFunction: null }, passParamsOnSubmit: { classPropertyName: "passParamsOnSubmit", publicName: "passParamsOnSubmit", isSignal: true, isRequired: false, transformFunction: null }, showAiSuggestions: { classPropertyName: "showAiSuggestions", publicName: "showAiSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:keydown": "onKeyDown($event)" } }, providers: [TFormEngine], viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\r\n<div class=\"loading-container\">\r\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\r\n</div>\r\n}\r\n\r\n <mat-toolbar [tourAnchor]=\"'form-title'\" style=\" background: none;\r\n height: 28px;\">\r\n <span class=\"spacer\"></span>\r\n <span style=\"font-size: small;\">\r\n help\r\n </span>\r\n<button \r\n[matTooltip]=\"'Start guided tour for this form'\"\r\n mat-icon-button (click)=\"startTour()\">\r\n <mat-icon>\r\n help\r\n </mat-icon>\r\n</button>\r\n</mat-toolbar>\r\n\r\n@if (showAiSuggestions() && hasPendingSuggestions()) {\r\n<t-suggestion-review\r\n class=\"form-ai-suggestions\"\r\n [suggestions]=\"engine.stagedSuggestions()\"\r\n [schema]=\"engine.editableFormSchema()\"\r\n [previewValue]=\"engine.previewFormValue()\"\r\n (accept)=\"engine.acceptSuggestion($event)\"\r\n (reject)=\"engine.rejectSuggestion($event)\"\r\n (acceptAll)=\"engine.acceptAllSuggestions()\"\r\n (rejectAll)=\"engine.rejectAllSuggestions()\" />\r\n}\r\n\r\n<mat-stepper\r\n\r\n[style.display]=\"loading()?'none':'block'\" #stepper class=\"form-stepper\" orientation=\"vertical\"\r\n [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\r\n (selectionChange)=\"engine.handleStepChange($event)\">\r\n\r\n @for (step of engine.selectFormSteps(); track step.sectionId) {\r\n @if (!!step.sectionForm ) {\r\n <mat-step [stepControl]=\"step.sectionForm\" [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\"\r\n\r\n [editable]=\"isEditable\" [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\r\n [hasError]=\"!step.sectionForm.valid && !!step.sectionForm.touched\">\r\n <ng-template matStepLabel >\r\n <div [tourAnchor]=\"step.sectionId\" class=\"step-label-container\" [attr.aria-label]=\"'Section ' + step.label\">\r\n <span class=\"step-label-text\">{{step.label|titlecase}}</span>\r\n @if (step.sectionIsSeen) {\r\n <mat-icon [class.error]=\"step.sectionIsInvalid\"\r\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\r\n {{step.sectionIsSeen}}\r\n </mat-icon>\r\n }\r\n @if(engine.canRefreshSection(step.sectionId) && step.isActive){\r\n <button mat-icon-button\r\n style=\"margin-right: 8px;\"\r\n matTooltip=\"Click to refresh this section.\"\r\n class=\"input-sync-button\"\r\n (click)=\"refreshASection(step.sectionId)\" >\r\n <mat-icon style=\"color:var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n \r\n </div>\r\n </ng-template>\r\n @if(!!step.isActive){\r\n @defer (on viewport; prefetch on idle) {\r\n <div [tourAnchor]=\"'content-'+step.sectionId\" class=\"step-content\">\r\n <div class=\"row form-section\">\r\n @for (col of step.columns; track col.id) {\r\n <div [class]=\"'col-md-'+col.colSize + ' box'\">\r\n <lib-t-form-input \r\n [tourAnchor]=\"col.id\" (valueChange)=\"engine.updateValue(col.id,$event)\" [editorMode]=\"false\"\r\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\r\n [attr.aria-label]=\"col?.label || ''\">\r\n </lib-t-form-input>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"step-actions\">\r\n @if(!$first) {\r\n <button\r\n \r\n mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\r\n\r\n Back\r\n </button>\r\n }\r\n @if (!$last) {\r\n <button\r\n \r\n mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\r\n Next\r\n </button>\r\n }\r\n @if (!!$last) {\r\n <button mat-button (click)=\"stepper.reset();engine.reset()\">Reset</button>\r\n }\r\n </div>\r\n </div>\r\n } @placeholder {\r\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"24\" />\r\n </div>\r\n }\r\n\r\n }\r\n\r\n </mat-step>\r\n }\r\n }\r\n</mat-stepper>\r\n\r\n<!-- Defer the footer toolbar until after the main form is loaded -->\r\n@defer (on idle; prefetch on viewport) {\r\n<footer>\r\n <mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\r\n <span class=\"submission-status\" style=\"font-size: 0.625em\" role=\"status\">\r\n {{getSubmissionStatus}}\r\n </span>\r\n\r\n <!-- Override-reason gate: while overridable validations remain, submission is\r\n locked behind a motivation for each. The panel now lives in a dialog so\r\n the footer stays a single, calm action row. -->\r\n @if (overridableErrors.length > 0) {\r\n @if (pendingOverrideCount; as pending) {\r\n <button mat-flat-button color=\"warn\" type=\"button\" class=\"override-reason-button\"\r\n (click)=\"openOverrideDialog()\"\r\n [attr.aria-label]=\"'Provide override ' + (pending === 1 ? 'reason' : 'reasons')\r\n + ', ' + pending + ' still required'\">\r\n <mat-icon>flag</mat-icon>\r\n <span>Provide {{ pending }} {{ pending === 1 ? 'reason' : 'reasons' }}</span>\r\n </button>\r\n } @else {\r\n <button mat-stroked-button type=\"button\" class=\"override-reason-button override-reason-button--done\"\r\n (click)=\"openOverrideDialog()\"\r\n aria-label=\"Review or edit the provided override reasons\">\r\n <mat-icon>check_circle</mat-icon>\r\n <span>Reasons provided</span>\r\n </button>\r\n }\r\n }\r\n\r\n <button [tourAnchor]=\"'form-submit-button'\" \r\n style=\"min-width: fit-content;\"\r\n mat-raised-button color=\"primary\" [disabled]=\"!canSubmit || engine.submittingForm\" (click)=\"handleSubmit()\"\r\n aria-label=\"Submit form\">\r\n <span>\r\n {{ engine.formSubmissionMessage()}}\r\n </span>\r\n @if(engine.submittingForm){\r\n <mat-spinner diameter=\"10\"></mat-spinner>\r\n }\r\n\r\n </button>\r\n </mat-toolbar>\r\n</footer>\r\n} @placeholder {\r\n<!-- Simple placeholder for the footer that maintains layout -->\r\n<footer>\r\n <div class=\"submission-toolbar-placeholder\"></div>\r\n</footer>\r\n}", styles: [".form-stepper{min-height:400px}.form-ai-suggestions{display:block;margin:1.5rem 0 2rem}.step-label-container{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.step-error-message{font-size:.75em;opacity:.9;margin-left:16px}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:8px;margin-bottom:24px}.step-actions{display:flex;gap:16px;margin-top:24px}.navigation-button{display:flex;align-items:center;gap:8px}.loading-container{display:flex;justify-content:center;padding:32px}footer{position:sticky;bottom:0}.submission-toolbar{z-index:1000;background:#ffffff0d;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:8px 16px;display:flex;justify-content:flex-end;gap:16px}.submission-status{font-size:.75em;opacity:.87;display:flex;align-items:center;white-space:normal}.box{padding:8px 5px 5px}.tour-trigger{position:absolute;right:8px;font-size:.75em;opacity:.6}.tour-trigger:hover{opacity:1}.step-label-text{padding-top:8px;padding-bottom:8px;cursor:pointer}.override-reason-button{display:inline-flex;align-items:center;gap:.5rem;min-width:fit-content}.override-reason-button--done{color:var(--mat-sys-primary);border-color:color-mix(in srgb,var(--mat-sys-primary) 40%,transparent)}.override-reason-button--done mat-icon{color:var(--mat-sys-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "aria-label", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TSuggestionReviewComponent, selector: "t-suggestion-review", inputs: ["suggestions", "schema", "previewValue"], outputs: ["accept", "reject", "acceptAll", "rejectAll"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7$2.TourAnchorMatMenuDirective, selector: "[tourAnchor]", inputs: ["tourAnchor"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i2.MatButton, i4$1.MatStepperNext, i4$1.MatStepperPrevious, Promise.resolve().then(function () { return tFormInput_component; }).then(m => m.TFormInputComponent), i1$1.NgControlStatusGroup, i1$1.FormGroupDirective, i7$2.TourAnchorMatMenuDirective], () => [i2.MatButton, i3$1.MatIcon, i4.MatProgressSpinner, i8.MatToolbar, i7$2.TourAnchorMatMenuDirective]] }); }
17761
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: UserFormStepperComponent, isStandalone: true, selector: "lib-user-form-stepper", inputs: { formId: { classPropertyName: "formId", publicName: "formId", isSignal: true, isRequired: false, transformFunction: null }, initialValues: { classPropertyName: "initialValues", publicName: "initialValues", isSignal: true, isRequired: false, transformFunction: null }, globalSystemInputs: { classPropertyName: "globalSystemInputs", publicName: "globalSystemInputs", isSignal: true, isRequired: false, transformFunction: null }, passParamsOnSubmit: { classPropertyName: "passParamsOnSubmit", publicName: "passParamsOnSubmit", isSignal: true, isRequired: false, transformFunction: null }, showAiSuggestions: { classPropertyName: "showAiSuggestions", publicName: "showAiSuggestions", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "document:keydown": "onKeyDown($event)" } }, providers: [TFormEngine], viewQueries: [{ propertyName: "stepper", first: true, predicate: ["stepper"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (loading()) {\n<div class=\"loading-container\">\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\n</div>\n}\n\n <mat-toolbar [tourAnchor]=\"'form-title'\" style=\" background: none;\n height: 28px;\">\n <span class=\"spacer\"></span>\n <span style=\"font-size: small;\">\n help\n </span>\n<button \n[matTooltip]=\"'Start guided tour for this form'\"\n mat-icon-button (click)=\"startTour()\">\n <mat-icon>\n help\n </mat-icon>\n</button>\n</mat-toolbar>\n\n@if (showAiSuggestions() && hasPendingSuggestions()) {\n<t-suggestion-review\n class=\"form-ai-suggestions\"\n [suggestions]=\"engine.stagedSuggestions()\"\n [schema]=\"engine.editableFormSchema()\"\n [previewValue]=\"engine.previewFormValue()\"\n (accept)=\"engine.acceptSuggestion($event)\"\n (reject)=\"engine.rejectSuggestion($event)\"\n (acceptAll)=\"engine.acceptAllSuggestions()\"\n (rejectAll)=\"engine.rejectAllSuggestions()\" />\n}\n\n<mat-stepper\n\n[style.display]=\"loading()?'none':'block'\" #stepper class=\"form-stepper\" orientation=\"vertical\"\n [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\n (selectionChange)=\"engine.handleStepChange($event)\">\n\n @for (step of visibleSteps(); track step.sectionId) {\n @if (!!step.sectionForm ) {\n <mat-step [stepControl]=\"step.sectionForm\" [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\"\n\n [editable]=\"isEditable\" [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\n [hasError]=\"!step.sectionForm.valid && !!step.sectionForm.touched\">\n <ng-template matStepLabel >\n <div [tourAnchor]=\"step.sectionId\" class=\"step-label-container\" [attr.aria-label]=\"'Section ' + step.label\">\n <span class=\"step-label-text\">{{step.label|titlecase}}</span>\n @if (step.sectionIsSeen) {\n <mat-icon [class.error]=\"step.sectionIsInvalid\"\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\n {{step.sectionIsSeen}}\n </mat-icon>\n }\n @if(engine.canRefreshSection(step.sectionId) && step.isActive){\n <button mat-icon-button\n style=\"margin-right: 8px;\"\n matTooltip=\"Click to refresh this section.\"\n class=\"input-sync-button\"\n (click)=\"refreshASection(step.sectionId)\" >\n <mat-icon style=\"color:var(--mat-sys-primary)\">sync</mat-icon>\n </button>\n }\n\n \n </div>\n </ng-template>\n @if(!!step.isActive){\n @defer (on viewport; prefetch on idle) {\n <div [tourAnchor]=\"'content-'+step.sectionId\" class=\"step-content\">\n <div class=\"row form-section\">\n @for (col of step.columns; track col.id) {\n <div [class]=\"'col-md-'+col.colSize + ' box'\">\n <lib-t-form-input \n [tourAnchor]=\"col.id\" (valueChange)=\"engine.updateValue(col.id,$event)\" [editorMode]=\"false\"\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\n [attr.aria-label]=\"col?.label || ''\">\n </lib-t-form-input>\n </div>\n }\n </div>\n\n <div class=\"step-actions\">\n @if(!$first) {\n <button\n \n mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\n\n Back\n </button>\n }\n @if (!$last) {\n <button\n \n mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\n [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\n Next\n </button>\n }\n @if (!!$last) {\n <button mat-button (click)=\"stepper.reset();engine.reset()\">Reset</button>\n }\n </div>\n </div>\n } @placeholder {\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\n <mat-spinner diameter=\"24\" />\n </div>\n }\n\n }\n\n </mat-step>\n }\n }\n</mat-stepper>\n\n<!-- Defer the footer toolbar until after the main form is loaded -->\n@defer (on idle; prefetch on viewport) {\n<footer>\n <mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\n <span class=\"submission-status\" style=\"font-size: 0.625em\" role=\"status\">\n {{getSubmissionStatus}}\n </span>\n\n <!-- Override-reason gate: while overridable validations remain, submission is\n locked behind a motivation for each. The panel now lives in a dialog so\n the footer stays a single, calm action row. -->\n @if (overridableErrors.length > 0) {\n @if (pendingOverrideCount; as pending) {\n <button mat-flat-button color=\"warn\" type=\"button\" class=\"override-reason-button\"\n (click)=\"openOverrideDialog()\"\n [attr.aria-label]=\"'Provide override ' + (pending === 1 ? 'reason' : 'reasons')\n + ', ' + pending + ' still required'\">\n <mat-icon>flag</mat-icon>\n <span>Provide {{ pending }} {{ pending === 1 ? 'reason' : 'reasons' }}</span>\n </button>\n } @else {\n <button mat-stroked-button type=\"button\" class=\"override-reason-button override-reason-button--done\"\n (click)=\"openOverrideDialog()\"\n aria-label=\"Review or edit the provided override reasons\">\n <mat-icon>check_circle</mat-icon>\n <span>Reasons provided</span>\n </button>\n }\n }\n\n <button [tourAnchor]=\"'form-submit-button'\" \n style=\"min-width: fit-content;\"\n mat-raised-button color=\"primary\" [disabled]=\"!canSubmit || engine.submittingForm\" (click)=\"handleSubmit()\"\n aria-label=\"Submit form\">\n <span>\n {{ engine.formSubmissionMessage()}}\n </span>\n @if(engine.submittingForm){\n <mat-spinner diameter=\"10\"></mat-spinner>\n }\n\n </button>\n </mat-toolbar>\n</footer>\n} @placeholder {\n<!-- Simple placeholder for the footer that maintains layout -->\n<footer>\n <div class=\"submission-toolbar-placeholder\"></div>\n</footer>\n}", styles: [".form-stepper{min-height:400px}.form-ai-suggestions{display:block;margin:1.5rem 0 2rem}.step-label-container{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.step-error-message{font-size:.75em;opacity:.9;margin-left:16px}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:8px;margin-bottom:24px}.step-actions{display:flex;gap:16px;margin-top:24px}.navigation-button{display:flex;align-items:center;gap:8px}.loading-container{display:flex;justify-content:center;padding:32px}footer{position:sticky;bottom:0}.submission-toolbar{z-index:1000;background:#ffffff0d;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:8px 16px;display:flex;justify-content:flex-end;gap:16px}.submission-status{font-size:.75em;opacity:.87;display:flex;align-items:center;white-space:normal}.box{padding:8px 5px 5px}.tour-trigger{position:absolute;right:8px;font-size:.75em;opacity:.6}.tour-trigger:hover{opacity:1}.step-label-text{padding-top:8px;padding-bottom:8px;cursor:pointer}.override-reason-button{display:inline-flex;align-items:center;gap:.5rem;min-width:fit-content}.override-reason-button--done{color:var(--mat-sys-primary);border-color:color-mix(in srgb,var(--mat-sys-primary) 40%,transparent)}.override-reason-button--done mat-icon{color:var(--mat-sys-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "ngmodule", type: MatStepperModule }, { kind: "component", type: i4$1.MatStep, selector: "mat-step", inputs: ["color"], exportAs: ["matStep"] }, { kind: "directive", type: i4$1.MatStepLabel, selector: "[matStepLabel]" }, { kind: "component", type: i4$1.MatStepper, selector: "mat-stepper, mat-vertical-stepper, mat-horizontal-stepper, [matStepper]", inputs: ["disableRipple", "color", "labelPosition", "headerPosition", "aria-label", "headerPrefix", "animationDuration"], outputs: ["animationDone"], exportAs: ["matStepper", "matVerticalStepper", "matHorizontalStepper"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i8.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: TSuggestionReviewComponent, selector: "t-suggestion-review", inputs: ["suggestions", "schema", "previewValue"], outputs: ["accept", "reject", "acceptAll", "rejectAll"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i7$2.TourAnchorMatMenuDirective, selector: "[tourAnchor]", inputs: ["tourAnchor"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i2.MatButton, i4$1.MatStepperNext, i4$1.MatStepperPrevious, Promise.resolve().then(function () { return tFormInput_component; }).then(m => m.TFormInputComponent), i1$1.NgControlStatusGroup, i1$1.FormGroupDirective, i7$2.TourAnchorMatMenuDirective], () => [i2.MatButton, i3$1.MatIcon, i4.MatProgressSpinner, i8.MatToolbar, i7$2.TourAnchorMatMenuDirective]] }); }
16737
17762
  }
16738
17763
  i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: UserFormStepperComponent, resolveDeferredDeps: () => [Promise.resolve().then(function () { return tFormInput_component; }).then(m => m.TFormInputComponent)], resolveMetadata: TFormInputComponent => ({ decorators: [{
16739
17764
  type: Component,
@@ -16751,7 +17776,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", n
16751
17776
  ...TourMatMenu,
16752
17777
  ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
16753
17778
  '(document:keydown)': 'onKeyDown($event)',
16754
- }, providers: [TFormEngine], template: "@if (loading()) {\r\n<div class=\"loading-container\">\r\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\r\n</div>\r\n}\r\n\r\n <mat-toolbar [tourAnchor]=\"'form-title'\" style=\" background: none;\r\n height: 28px;\">\r\n <span class=\"spacer\"></span>\r\n <span style=\"font-size: small;\">\r\n help\r\n </span>\r\n<button \r\n[matTooltip]=\"'Start guided tour for this form'\"\r\n mat-icon-button (click)=\"startTour()\">\r\n <mat-icon>\r\n help\r\n </mat-icon>\r\n</button>\r\n</mat-toolbar>\r\n\r\n@if (showAiSuggestions() && hasPendingSuggestions()) {\r\n<t-suggestion-review\r\n class=\"form-ai-suggestions\"\r\n [suggestions]=\"engine.stagedSuggestions()\"\r\n [schema]=\"engine.editableFormSchema()\"\r\n [previewValue]=\"engine.previewFormValue()\"\r\n (accept)=\"engine.acceptSuggestion($event)\"\r\n (reject)=\"engine.rejectSuggestion($event)\"\r\n (acceptAll)=\"engine.acceptAllSuggestions()\"\r\n (rejectAll)=\"engine.rejectAllSuggestions()\" />\r\n}\r\n\r\n<mat-stepper\r\n\r\n[style.display]=\"loading()?'none':'block'\" #stepper class=\"form-stepper\" orientation=\"vertical\"\r\n [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\r\n (selectionChange)=\"engine.handleStepChange($event)\">\r\n\r\n @for (step of engine.selectFormSteps(); track step.sectionId) {\r\n @if (!!step.sectionForm ) {\r\n <mat-step [stepControl]=\"step.sectionForm\" [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\"\r\n\r\n [editable]=\"isEditable\" [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\r\n [hasError]=\"!step.sectionForm.valid && !!step.sectionForm.touched\">\r\n <ng-template matStepLabel >\r\n <div [tourAnchor]=\"step.sectionId\" class=\"step-label-container\" [attr.aria-label]=\"'Section ' + step.label\">\r\n <span class=\"step-label-text\">{{step.label|titlecase}}</span>\r\n @if (step.sectionIsSeen) {\r\n <mat-icon [class.error]=\"step.sectionIsInvalid\"\r\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\r\n {{step.sectionIsSeen}}\r\n </mat-icon>\r\n }\r\n @if(engine.canRefreshSection(step.sectionId) && step.isActive){\r\n <button mat-icon-button\r\n style=\"margin-right: 8px;\"\r\n matTooltip=\"Click to refresh this section.\"\r\n class=\"input-sync-button\"\r\n (click)=\"refreshASection(step.sectionId)\" >\r\n <mat-icon style=\"color:var(--mat-sys-primary)\">sync</mat-icon>\r\n </button>\r\n }\r\n\r\n \r\n </div>\r\n </ng-template>\r\n @if(!!step.isActive){\r\n @defer (on viewport; prefetch on idle) {\r\n <div [tourAnchor]=\"'content-'+step.sectionId\" class=\"step-content\">\r\n <div class=\"row form-section\">\r\n @for (col of step.columns; track col.id) {\r\n <div [class]=\"'col-md-'+col.colSize + ' box'\">\r\n <lib-t-form-input \r\n [tourAnchor]=\"col.id\" (valueChange)=\"engine.updateValue(col.id,$event)\" [editorMode]=\"false\"\r\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\r\n [attr.aria-label]=\"col?.label || ''\">\r\n </lib-t-form-input>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div class=\"step-actions\">\r\n @if(!$first) {\r\n <button\r\n \r\n mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\r\n\r\n Back\r\n </button>\r\n }\r\n @if (!$last) {\r\n <button\r\n \r\n mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\r\n [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\r\n Next\r\n </button>\r\n }\r\n @if (!!$last) {\r\n <button mat-button (click)=\"stepper.reset();engine.reset()\">Reset</button>\r\n }\r\n </div>\r\n </div>\r\n } @placeholder {\r\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\r\n <mat-spinner diameter=\"24\" />\r\n </div>\r\n }\r\n\r\n }\r\n\r\n </mat-step>\r\n }\r\n }\r\n</mat-stepper>\r\n\r\n<!-- Defer the footer toolbar until after the main form is loaded -->\r\n@defer (on idle; prefetch on viewport) {\r\n<footer>\r\n <mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\r\n <span class=\"submission-status\" style=\"font-size: 0.625em\" role=\"status\">\r\n {{getSubmissionStatus}}\r\n </span>\r\n\r\n <!-- Override-reason gate: while overridable validations remain, submission is\r\n locked behind a motivation for each. The panel now lives in a dialog so\r\n the footer stays a single, calm action row. -->\r\n @if (overridableErrors.length > 0) {\r\n @if (pendingOverrideCount; as pending) {\r\n <button mat-flat-button color=\"warn\" type=\"button\" class=\"override-reason-button\"\r\n (click)=\"openOverrideDialog()\"\r\n [attr.aria-label]=\"'Provide override ' + (pending === 1 ? 'reason' : 'reasons')\r\n + ', ' + pending + ' still required'\">\r\n <mat-icon>flag</mat-icon>\r\n <span>Provide {{ pending }} {{ pending === 1 ? 'reason' : 'reasons' }}</span>\r\n </button>\r\n } @else {\r\n <button mat-stroked-button type=\"button\" class=\"override-reason-button override-reason-button--done\"\r\n (click)=\"openOverrideDialog()\"\r\n aria-label=\"Review or edit the provided override reasons\">\r\n <mat-icon>check_circle</mat-icon>\r\n <span>Reasons provided</span>\r\n </button>\r\n }\r\n }\r\n\r\n <button [tourAnchor]=\"'form-submit-button'\" \r\n style=\"min-width: fit-content;\"\r\n mat-raised-button color=\"primary\" [disabled]=\"!canSubmit || engine.submittingForm\" (click)=\"handleSubmit()\"\r\n aria-label=\"Submit form\">\r\n <span>\r\n {{ engine.formSubmissionMessage()}}\r\n </span>\r\n @if(engine.submittingForm){\r\n <mat-spinner diameter=\"10\"></mat-spinner>\r\n }\r\n\r\n </button>\r\n </mat-toolbar>\r\n</footer>\r\n} @placeholder {\r\n<!-- Simple placeholder for the footer that maintains layout -->\r\n<footer>\r\n <div class=\"submission-toolbar-placeholder\"></div>\r\n</footer>\r\n}", styles: [".form-stepper{min-height:400px}.form-ai-suggestions{display:block;margin:1.5rem 0 2rem}.step-label-container{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.step-error-message{font-size:.75em;opacity:.9;margin-left:16px}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:8px;margin-bottom:24px}.step-actions{display:flex;gap:16px;margin-top:24px}.navigation-button{display:flex;align-items:center;gap:8px}.loading-container{display:flex;justify-content:center;padding:32px}footer{position:sticky;bottom:0}.submission-toolbar{z-index:1000;background:#ffffff0d;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:8px 16px;display:flex;justify-content:flex-end;gap:16px}.submission-status{font-size:.75em;opacity:.87;display:flex;align-items:center;white-space:normal}.box{padding:8px 5px 5px}.tour-trigger{position:absolute;right:8px;font-size:.75em;opacity:.6}.tour-trigger:hover{opacity:1}.step-label-text{padding-top:8px;padding-bottom:8px;cursor:pointer}.override-reason-button{display:inline-flex;align-items:center;gap:.5rem;min-width:fit-content}.override-reason-button--done{color:var(--mat-sys-primary);border-color:color-mix(in srgb,var(--mat-sys-primary) 40%,transparent)}.override-reason-button--done mat-icon{color:var(--mat-sys-primary)}\n"] }]
17779
+ }, providers: [TFormEngine], template: "@if (loading()) {\n<div class=\"loading-container\">\n <mat-spinner diameter=\"48\" aria-label=\"Loading form\" />\n</div>\n}\n\n <mat-toolbar [tourAnchor]=\"'form-title'\" style=\" background: none;\n height: 28px;\">\n <span class=\"spacer\"></span>\n <span style=\"font-size: small;\">\n help\n </span>\n<button \n[matTooltip]=\"'Start guided tour for this form'\"\n mat-icon-button (click)=\"startTour()\">\n <mat-icon>\n help\n </mat-icon>\n</button>\n</mat-toolbar>\n\n@if (showAiSuggestions() && hasPendingSuggestions()) {\n<t-suggestion-review\n class=\"form-ai-suggestions\"\n [suggestions]=\"engine.stagedSuggestions()\"\n [schema]=\"engine.editableFormSchema()\"\n [previewValue]=\"engine.previewFormValue()\"\n (accept)=\"engine.acceptSuggestion($event)\"\n (reject)=\"engine.rejectSuggestion($event)\"\n (acceptAll)=\"engine.acceptAllSuggestions()\"\n (rejectAll)=\"engine.rejectAllSuggestions()\" />\n}\n\n<mat-stepper\n\n[style.display]=\"loading()?'none':'block'\" #stepper class=\"form-stepper\" orientation=\"vertical\"\n [linear]=\"!isEditable\" aria-label=\"Form sections stepper\" [animationDuration]=\"'300'\"\n (selectionChange)=\"engine.handleStepChange($event)\">\n\n @for (step of visibleSteps(); track step.sectionId) {\n @if (!!step.sectionForm ) {\n <mat-step [stepControl]=\"step.sectionForm\" [completed]=\"step.sectionIsSeen && !step.sectionIsInvalid\"\n\n [editable]=\"isEditable\" [errorMessage]=\"step.sectionFormErrorMessage||''\" [state]=\"getStepState(step,$index)\"\n [hasError]=\"!step.sectionForm.valid && !!step.sectionForm.touched\">\n <ng-template matStepLabel >\n <div [tourAnchor]=\"step.sectionId\" class=\"step-label-container\" [attr.aria-label]=\"'Section ' + step.label\">\n <span class=\"step-label-text\">{{step.label|titlecase}}</span>\n @if (step.sectionIsSeen) {\n <mat-icon [class.error]=\"step.sectionIsInvalid\"\n [attr.aria-label]=\"step.sectionIsInvalid ? 'Section has errors' : 'Section completed'\">\n {{step.sectionIsSeen}}\n </mat-icon>\n }\n @if(engine.canRefreshSection(step.sectionId) && step.isActive){\n <button mat-icon-button\n style=\"margin-right: 8px;\"\n matTooltip=\"Click to refresh this section.\"\n class=\"input-sync-button\"\n (click)=\"refreshASection(step.sectionId)\" >\n <mat-icon style=\"color:var(--mat-sys-primary)\">sync</mat-icon>\n </button>\n }\n\n \n </div>\n </ng-template>\n @if(!!step.isActive){\n @defer (on viewport; prefetch on idle) {\n <div [tourAnchor]=\"'content-'+step.sectionId\" class=\"step-content\">\n <div class=\"row form-section\">\n @for (col of step.columns; track col.id) {\n <div [class]=\"'col-md-'+col.colSize + ' box'\">\n <lib-t-form-input \n [tourAnchor]=\"col.id\" (valueChange)=\"engine.updateValue(col.id,$event)\" [editorMode]=\"false\"\n [formBuilderFunctions]=\"formBuilderFunctions\" [inputConfig]=\"col\" [formGroup]=\"step.sectionForm\"\n [attr.aria-label]=\"col?.label || ''\">\n </lib-t-form-input>\n </div>\n }\n </div>\n\n <div class=\"step-actions\">\n @if(!$first) {\n <button\n \n mat-button matStepperPrevious type=\"button\" class=\"navigation-button\"\n [attr.aria-label]=\"'Go back to ' + getPreviousStepLabel()\">\n\n Back\n </button>\n }\n @if (!$last) {\n <button\n \n mat-flat-button matStepperNext color=\"primary\" type=\"button\" class=\"navigation-button\"\n [attr.aria-label]=\"'Continue to ' + getNextStepLabel()\">\n Next\n </button>\n }\n @if (!!$last) {\n <button mat-button (click)=\"stepper.reset();engine.reset()\">Reset</button>\n }\n </div>\n </div>\n } @placeholder {\n <div style=\"padding: 50px;display:flex;justify-content:center;align-items:center; text-align: center;\">\n <mat-spinner diameter=\"24\" />\n </div>\n }\n\n }\n\n </mat-step>\n }\n }\n</mat-stepper>\n\n<!-- Defer the footer toolbar until after the main form is loaded -->\n@defer (on idle; prefetch on viewport) {\n<footer>\n <mat-toolbar class=\"submission-toolbar\" role=\"toolbar\" aria-label=\"Form submission actions\">\n <span class=\"submission-status\" style=\"font-size: 0.625em\" role=\"status\">\n {{getSubmissionStatus}}\n </span>\n\n <!-- Override-reason gate: while overridable validations remain, submission is\n locked behind a motivation for each. The panel now lives in a dialog so\n the footer stays a single, calm action row. -->\n @if (overridableErrors.length > 0) {\n @if (pendingOverrideCount; as pending) {\n <button mat-flat-button color=\"warn\" type=\"button\" class=\"override-reason-button\"\n (click)=\"openOverrideDialog()\"\n [attr.aria-label]=\"'Provide override ' + (pending === 1 ? 'reason' : 'reasons')\n + ', ' + pending + ' still required'\">\n <mat-icon>flag</mat-icon>\n <span>Provide {{ pending }} {{ pending === 1 ? 'reason' : 'reasons' }}</span>\n </button>\n } @else {\n <button mat-stroked-button type=\"button\" class=\"override-reason-button override-reason-button--done\"\n (click)=\"openOverrideDialog()\"\n aria-label=\"Review or edit the provided override reasons\">\n <mat-icon>check_circle</mat-icon>\n <span>Reasons provided</span>\n </button>\n }\n }\n\n <button [tourAnchor]=\"'form-submit-button'\" \n style=\"min-width: fit-content;\"\n mat-raised-button color=\"primary\" [disabled]=\"!canSubmit || engine.submittingForm\" (click)=\"handleSubmit()\"\n aria-label=\"Submit form\">\n <span>\n {{ engine.formSubmissionMessage()}}\n </span>\n @if(engine.submittingForm){\n <mat-spinner diameter=\"10\"></mat-spinner>\n }\n\n </button>\n </mat-toolbar>\n</footer>\n} @placeholder {\n<!-- Simple placeholder for the footer that maintains layout -->\n<footer>\n <div class=\"submission-toolbar-placeholder\"></div>\n</footer>\n}", styles: [".form-stepper{min-height:400px}.form-ai-suggestions{display:block;margin:1.5rem 0 2rem}.step-label-container{display:flex;justify-content:space-between;align-items:center;width:100%;gap:16px}.step-error-message{font-size:.75em;opacity:.9;margin-left:16px}.form-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:8px;margin-bottom:24px}.step-actions{display:flex;gap:16px;margin-top:24px}.navigation-button{display:flex;align-items:center;gap:8px}.loading-container{display:flex;justify-content:center;padding:32px}footer{position:sticky;bottom:0}.submission-toolbar{z-index:1000;background:#ffffff0d;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-top:var(--mat-divider-width) solid var(--mat-divider-color);padding:8px 16px;display:flex;justify-content:flex-end;gap:16px}.submission-status{font-size:.75em;opacity:.87;display:flex;align-items:center;white-space:normal}.box{padding:8px 5px 5px}.tour-trigger{position:absolute;right:8px;font-size:.75em;opacity:.6}.tour-trigger:hover{opacity:1}.step-label-text{padding-top:8px;padding-bottom:8px;cursor:pointer}.override-reason-button{display:inline-flex;align-items:center;gap:.5rem;min-width:fit-content}.override-reason-button--done{color:var(--mat-sys-primary);border-color:color-mix(in srgb,var(--mat-sys-primary) 40%,transparent)}.override-reason-button--done mat-icon{color:var(--mat-sys-primary)}\n"] }]
16755
17780
  }], ctorParameters: null, propDecorators: { formId: [{ type: i0.Input, args: [{ isSignal: true, alias: "formId", required: false }] }], initialValues: [{ type: i0.Input, args: [{ isSignal: true, alias: "initialValues", required: false }] }], globalSystemInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalSystemInputs", required: false }] }], passParamsOnSubmit: [{ type: i0.Input, args: [{ isSignal: true, alias: "passParamsOnSubmit", required: false }] }], showAiSuggestions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAiSuggestions", required: false }] }], stepper: [{ type: i0.ViewChild, args: ['stepper', { isSignal: true }] }] } }) });
16756
17781
 
16757
17782
  const convertElementEditorTypesToInputType = (editType) => {
@@ -16876,6 +17901,8 @@ class TDynamicDataEditComponent {
16876
17901
  ElementEditorTypes.FormPayloadProjection,
16877
17902
  ElementEditorTypes.PayloadTemplate,
16878
17903
  ElementEditorTypes.HeaderTemplate,
17904
+ ElementEditorTypes.QueryTemplate,
17905
+ ElementEditorTypes.ApiEndpointConfig,
16879
17906
  ]);
16880
17907
  this.#editorConfig$ = new BehaviorSubject(undefined);
16881
17908
  this.#data$ = new BehaviorSubject(undefined);
@@ -17207,9 +18234,9 @@ class TDynamicDataEditComponent {
17207
18234
  }
17208
18235
  }
17209
18236
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: TDynamicDataEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
17210
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TDynamicDataEditComponent, isStandalone: true, selector: "lib-t-dynamic-data-edit", inputs: { editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, validationErrors: { classPropertyName: "validationErrors", publicName: "validationErrors", isSignal: true, isRequired: false, transformFunction: null }, mscoaSaveCustomInput: { classPropertyName: "mscoaSaveCustomInput", publicName: "mscoaSaveCustomInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaEditInput: { classPropertyName: "mscoaEditInput", publicName: "mscoaEditInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaDeleteInput: { classPropertyName: "mscoaDeleteInput", publicName: "mscoaDeleteInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [{ provide: NESTED_EDITOR_COMPONENT, useValue: TDynamicDataEditComponent }], ngImport: i0, template: "@defer {\r\n@if (( vm$ |async); as vm) {\r\n\r\n @if (vm.isFormFieldControl) {\r\n <!-- Editor types that resolve to a MatFormFieldControl render inside the field. -->\r\n <mat-form-field appearance=\"outline\" [color]=\"((validationErrors())||[]).length>0 ? 'warn' : 'primary'\"\r\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\" [hintLabel]=\"vm.editorConfigValue?.hint||''\">\r\n <mat-label> {{ (vm. editorConfigValue)?.label }} </mat-label>\r\n @switch ((vm. editorConfigValue)?.editType) {\r\n @default {\r\n <lib-input-custom\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [inputConfig]=\"$any(vm.inputConfig)\"\r\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\"\r\n [required]=\"!!(vm. editorConfigValue)?.required\"\r\n [disabled]=\"!!(vm.disabled)\"\r\n [ngModel]=\"(vm.value)\"\r\n (blur)=\"elementBlur($event)\"\r\n (input)=\"inputChange($event)\" ></lib-input-custom>\r\n\r\n\r\n }\r\n @case ( elementEditorTypes.Toggle) {\r\n <lib-mat-slider-toggle-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [name]=\"((vm. editorConfigValue)?.name||'') \"\r\n [label]=\"((vm. editorConfigValue)?.label||'')\" [disabled]=\"(vm.disabled)||false\"\r\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\r\n </lib-mat-slider-toggle-editor>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.Range) {\r\n\r\n\r\n <lib-mat-slider-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\r\n [disabled]=\"(vm.disabled)||false\" [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [min]=\"( vm.editorConfigValue)?.min || 0\"\r\n (valueChange)=\"inputChange($event)\" [step]=\"( vm.editorConfigValue)?.step || 1\">\r\n\r\n\r\n </lib-mat-slider-editor>\r\n\r\n\r\n\r\n }\r\n\r\n @case (elementEditorTypes.OptionSelect) {\r\n\r\n <mat-select\r\n\r\n [value]=\"$any(vm.value)\" (selectionChange)=\"valueChanged($event.value)\"\r\n [disabled]=\"(vm.disabled)||false\">\r\n @for(option of ( vm.editorConfigValue)?.options || vm.dataOptions;track option.value){\r\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\r\n }\r\n </mat-select>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.RichTextEditor) {\r\n <lib-editor-js-input\r\n\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [value]=\"$any(vm.value)\" (valueChanged)=\"valueChanged($event)\"\r\n [disabled]=\"(vm.disabled)||false\" [inputConfig]=\"$any(data())\">\r\n </lib-editor-js-input>\r\n }\r\n\r\n @case (elementEditorTypes.MongoPipelineBuilder) {\r\n\r\n <lib-pipeline-generator [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\r\n (valueChanged)=\"valueChanged($event)\"></lib-pipeline-generator>\r\n\r\n }\r\n @case (elementEditorTypes.MapMatOptionsKeys) {\r\n <lib-map-mat-options-keys [disabled]=\"(vm.disabled)||false\"\r\n [value]=\"$any(vm.value)\"\r\n [formInputs]=\"formInputs() || []\"\r\n [mapToData]=\"vm.dataOptions\"\r\n [errors]=\"(validationErrors())||[]\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-map-mat-options-keys>\r\n\r\n }\r\n\r\n @case(elementEditorTypes.CalculatedFieldRules){\r\n\r\n <lib-calculated-field-rules [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\"\r\n [mapToData]=\"vm.dataOptions\"></lib-calculated-field-rules>\r\n }\r\n\r\n @case(elementEditorTypes.Validators){\r\n\r\n <lib-validators-config [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\r\n [mapToData]=\"vm.dataOptions\">\r\n </lib-validators-config>\r\n\r\n }\r\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\r\n\r\n <lib-config-mscoa-additional-inputs [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [mapToData]=\"vm.dataOptions\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-config-mscoa-additional-inputs>\r\n\r\n }\r\n @case (elementEditorTypes.DataSourcePicker) {\r\n <lib-data-source-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [editorConfig]=\"vm. editorConfigValue\"\r\n (valueChange)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\">\r\n </lib-data-source-picker>\r\n }\r\n @case (elementEditorTypes.ListLabelConfigEditor) {\r\n <lib-document-list-label-config-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [formInputs]=\"formInputs() ||[]\"\r\n [disabled]=\"(vm.disabled)||false\"\r\n [editorConfig]=\"vm. editorConfigValue\"\r\n (valueChange)=\"valueChanged($event)\"\r\n [value]=\"$any(vm.value)\" [mapToData]=\"vm.dataOptions\"\r\n [errors]=\"(validationErrors())||[]\">\r\n\r\n </lib-document-list-label-config-editor>\r\n }\r\n @case(\r\n elementEditorTypes.WorkflowPicker\r\n ){\r\n <lib-t-workflow-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [getWorkflowOptions]=\"getWorkflowOptions$\"\r\n (valueChanged)=\"valueChanged($event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-t-workflow-picker>\r\n }\r\n @case (\r\n elementEditorTypes.RecordListManager\r\n ) {\r\n <lib-record-list-manager\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [editorConfig]=\"vm.editorConfigValue\" [disabled]=\"(vm.disabled)||false\"\r\n [formInputs]=\"formInputs() ||[]\" [mapToData]=\"vm.dataOptions\" (valueChange)=\"valueChanged($event)\"\r\n\r\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-record-list-manager>\r\n }\r\n }\r\n\r\n @if (vm.inputHasBlurFunction) {\r\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\"\r\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\r\n mat-icon-button>\r\n <mat-icon>{{\r\n blurOff?'blur_off':'blur_on'\r\n }}\r\n\r\n\r\n </mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <!-- Editor types backed by plain (signal-based) components render outside\r\n the field, since they are not MatFormFieldControls. They are wrapped to\r\n mirror the outline mat-form-field appearance: the fieldset draws the\r\n outline, its legend is the notched floating label, and the hint renders\r\n as a subscript below the box. -->\r\n <div class=\"non-control-editor\">\r\n <fieldset class=\"non-control-editor__field\">\r\n @if ((vm. editorConfigValue)?.label) {\r\n <legend class=\"non-control-editor__label\">{{ (vm. editorConfigValue)?.label }}</legend>\r\n }\r\n @switch ((vm. editorConfigValue)?.editType) {\r\n\r\n @case (elementEditorTypes.ChipSelect) {\r\n\r\n <lib-mat-chip-list-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [multiple]=\"!!vm.editorConfigValue?.multipleSelection\"\r\n [disabled]=\"(vm.disabled)||false\"\r\n [options]=\"(vm.editorConfigValue)?.options || vm.dataOptions\"\r\n [required]=\"!!( vm.editorConfigValue)?.required\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\"\r\n (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\r\n\r\n\r\n }\r\n\r\n @case (elementEditorTypes.SelectionOptions) {\r\n\r\n <lib-selection-options-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [errors]=\"(validationErrors())||[]\" [disabled]=\"(vm.disabled)||false\"\r\n [options]=\"$any(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></lib-selection-options-editor>\r\n }\r\n\r\n @case (\r\n elementEditorTypes.ApiCall) {\r\n\r\n <lib-rest-api-call-setup\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\" [disabled]=\"(vm.disabled)||false\"\r\n [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\r\n\r\n </lib-rest-api-call-setup>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.ApiValueAccessRules) {\r\n\r\n\r\n\r\n <lib-api-value-access-rules [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\"\r\n [formInputs]=\"formInputs() ||[]\"\r\n\r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\" [mapToData]=\"vm.dataOptions\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-api-value-access-rules>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.FormInputSelector)\r\n {\r\n\r\n <lib-form-input-selector [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [formInputs]=\"formInputs() ||[]\"\r\n [errors]=\"(validationErrors())||[]\" [value]=\"$any(vm.value) || []\" (change)=\"valueChanged($event)\">\r\n </lib-form-input-selector>\r\n }\r\n\r\n @case (\r\n elementEditorTypes.RequiredInputs\r\n ){\r\n\r\n <lib-required-inputs [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\r\n </lib-required-inputs>\r\n }\r\n\r\n @case(elementEditorTypes.ConfigMscoaSegments){\r\n\r\n <lib-mscoa-segment-config [disabled]=\"(vm.disabled)||false\" [id]=\"((vm.editorConfigValue)?.id)\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [dataValue]=\"$any(vm.dataValue)\"\r\n [isCashSegmentConfig]=\"vm.editorConfigValue?.deepBind?.at(-1) === 'cashSegments'\"\r\n [saveCustomInput]=\"mscoaSaveCustomInput()\"\r\n [editSegmentInput]=\"mscoaEditInput()\"\r\n [deleteSegmentInput]=\"mscoaDeleteInput()\"\r\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></lib-mscoa-segment-config>\r\n }\r\n @case (elementEditorTypes.ChipOptionsCreator) {\r\n <lib-chip-options-creator-editor [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" (valueChange)=\"valueChanged($event)\"\r\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\r\n\r\n </lib-chip-options-creator-editor>\r\n\r\n }\r\n @case (elementEditorTypes.FormPayloadProjection) {\r\n <lib-form-payload-projection [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\r\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-form-payload-projection>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.PayloadTemplate) {\r\n <lib-payload-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\r\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\r\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\r\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\r\n </lib-payload-template-editor>\r\n\r\n }\r\n @case (elementEditorTypes.HeaderTemplate) {\r\n <lib-header-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\r\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\r\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\r\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\r\n </lib-header-template-editor>\r\n\r\n }\r\n }\r\n </fieldset>\r\n\r\n @if ((vm. editorConfigValue)?.hint) {\r\n <small class=\"non-control-editor__hint\">{{ (vm. editorConfigValue)?.hint }}</small>\r\n }\r\n </div>\r\n }\r\n\r\n\r\n @for (error of (validationErrors())||[]; track $index) {\r\n <mat-error style=\" font-size: 0.75em;\r\n margin-left: 14px;\r\n \">\r\n\r\n {{error.message}}</mat-error>\r\n }\r\n\r\n}\r\n\r\n}@error {\r\n<mat-card>\r\n <mat-card-content>\r\n\r\n <span>\r\n Failed to load form inputs\r\n </span>\r\n </mat-card-content>\r\n</mat-card>\r\n}\r\n\r\n\r\n\r\n<!-- -\r\n `TableConfigSetup`\r\n- `ConditionalInputConfig`\r\n- `MatrixTable`-->\r\n", styles: [".showItemValue{opacity:.6}.non-control-editor{display:flex;flex-direction:column;width:100%}.non-control-editor__field{margin:0;min-width:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:.75rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--mdc-outlined-text-field-container-shape, 4px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.non-control-editor__field:focus-within{border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.non-control-editor__label{padding:0 .25rem;margin-left:.5rem;font-size:.75rem;font-weight:400;line-height:1;color:var(--lib-forms-on-surface-variant)}.non-control-editor__hint{margin-top:.5rem;padding:0 .875rem;font-size:.75rem;line-height:1.5;color:var(--lib-forms-on-surface-variant)}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:1em;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--lib-forms-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs').then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-D9wIdOhg.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-EM7RSWIz.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs').then(m => m.MatChipListEditorComponent), i2$1.MatFormField, i2$1.MatLabel, i2$1.MatError, i2$1.MatSuffix, i8$1.MatSelect, i8$1.MatOption, i2.MatIconButton, i3$1.MatIcon, i5.MatTooltip, import('./ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs').then(function (n) { return n.e; }).then(m => m.EditorJsInputComponent), import('./ngx-t-forms-record-list-manager.component-CtCOIpai.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-DLldVmcN.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-input-custom.component-DiciFhSS.mjs').then(m => m.InputCustomComponent), i1$1.NgControlStatus, i1$1.RequiredValidator, i1$1.NgModel, import('./ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)]] }); }
18237
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: TDynamicDataEditComponent, isStandalone: true, selector: "lib-t-dynamic-data-edit", inputs: { editorConfig: { classPropertyName: "editorConfig", publicName: "editorConfig", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, validationErrors: { classPropertyName: "validationErrors", publicName: "validationErrors", isSignal: true, isRequired: false, transformFunction: null }, mscoaSaveCustomInput: { classPropertyName: "mscoaSaveCustomInput", publicName: "mscoaSaveCustomInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaEditInput: { classPropertyName: "mscoaEditInput", publicName: "mscoaEditInput", isSignal: true, isRequired: false, transformFunction: null }, mscoaDeleteInput: { classPropertyName: "mscoaDeleteInput", publicName: "mscoaDeleteInput", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", blur: "blur" }, providers: [{ provide: NESTED_EDITOR_COMPONENT, useValue: TDynamicDataEditComponent }], ngImport: i0, template: "@defer {\n@if (( vm$ |async); as vm) {\n\n @if (vm.isFormFieldControl) {\n <!-- Editor types that resolve to a MatFormFieldControl render inside the field. -->\n <mat-form-field appearance=\"outline\" [color]=\"((validationErrors())||[]).length>0 ? 'warn' : 'primary'\"\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\" [hintLabel]=\"vm.editorConfigValue?.hint||''\">\n <mat-label> {{ (vm. editorConfigValue)?.label }} </mat-label>\n @switch ((vm. editorConfigValue)?.editType) {\n @default {\n <lib-input-custom\n [id]=\"((vm.editorConfigValue)?.id)\"\n [inputConfig]=\"$any(vm.inputConfig)\"\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\"\n [required]=\"!!(vm. editorConfigValue)?.required\"\n [disabled]=\"!!(vm.disabled)\"\n [ngModel]=\"(vm.value)\"\n (blur)=\"elementBlur($event)\"\n (input)=\"inputChange($event)\" ></lib-input-custom>\n\n\n }\n @case ( elementEditorTypes.Toggle) {\n <lib-mat-slider-toggle-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [name]=\"((vm. editorConfigValue)?.name||'') \"\n [label]=\"((vm. editorConfigValue)?.label||'')\" [disabled]=\"(vm.disabled)||false\"\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n </lib-mat-slider-toggle-editor>\n\n }\n\n @case (elementEditorTypes.Range) {\n\n\n <lib-mat-slider-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\n [disabled]=\"(vm.disabled)||false\" [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [min]=\"( vm.editorConfigValue)?.min || 0\"\n (valueChange)=\"inputChange($event)\" [step]=\"( vm.editorConfigValue)?.step || 1\">\n\n\n </lib-mat-slider-editor>\n\n\n\n }\n\n @case (elementEditorTypes.OptionSelect) {\n\n <mat-select\n\n [value]=\"$any(vm.value)\" (selectionChange)=\"valueChanged($event.value)\"\n [disabled]=\"(vm.disabled)||false\">\n @for(option of ( vm.editorConfigValue)?.options || vm.dataOptions;track option.value){\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\n }\n </mat-select>\n\n }\n\n @case (elementEditorTypes.RichTextEditor) {\n <lib-editor-js-input\n\n [id]=\"((vm.editorConfigValue)?.id)\"\n [value]=\"$any(vm.value)\" (valueChanged)=\"valueChanged($event)\"\n [disabled]=\"(vm.disabled)||false\" [inputConfig]=\"$any(data())\">\n </lib-editor-js-input>\n }\n\n @case (elementEditorTypes.MongoPipelineBuilder) {\n\n <lib-pipeline-generator [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\"></lib-pipeline-generator>\n\n }\n @case (elementEditorTypes.MapMatOptionsKeys) {\n <lib-map-mat-options-keys [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() || []\"\n [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-map-mat-options-keys>\n\n }\n\n @case(elementEditorTypes.CalculatedFieldRules){\n\n <lib-calculated-field-rules [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\"\n [mapToData]=\"vm.dataOptions\"></lib-calculated-field-rules>\n }\n\n @case(elementEditorTypes.Validators){\n\n <lib-validators-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-validators-config>\n\n }\n\n @case(elementEditorTypes.ConditionalInputConfig){\n\n <lib-conditional-display-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-conditional-display-config>\n\n }\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\n\n <lib-config-mscoa-additional-inputs [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-config-mscoa-additional-inputs>\n\n }\n @case (elementEditorTypes.DataSourcePicker) {\n <lib-data-source-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\">\n </lib-data-source-picker>\n }\n @case (elementEditorTypes.ListLabelConfigEditor) {\n <lib-document-list-label-config-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [formInputs]=\"formInputs() ||[]\"\n [disabled]=\"(vm.disabled)||false\"\n [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\">\n\n </lib-document-list-label-config-editor>\n }\n @case(\n elementEditorTypes.WorkflowPicker\n ){\n <lib-t-workflow-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-t-workflow-picker>\n }\n @case (\n elementEditorTypes.RecordListManager\n ) {\n <lib-record-list-manager\n [id]=\"((vm.editorConfigValue)?.id)\"\n [editorConfig]=\"vm.editorConfigValue\" [disabled]=\"(vm.disabled)||false\"\n [formInputs]=\"formInputs() ||[]\" [mapToData]=\"vm.dataOptions\" (valueChange)=\"valueChanged($event)\"\n\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-record-list-manager>\n }\n }\n\n @if (vm.inputHasBlurFunction) {\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\"\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\n mat-icon-button>\n <mat-icon>{{\n blurOff?'blur_off':'blur_on'\n }}\n\n\n </mat-icon>\n </button>\n }\n </mat-form-field>\n } @else {\n <!-- Editor types backed by plain (signal-based) components render outside\n the field, since they are not MatFormFieldControls. They are wrapped to\n mirror the outline mat-form-field appearance: the fieldset draws the\n outline, its legend is the notched floating label, and the hint renders\n as a subscript below the box. -->\n <div class=\"non-control-editor\">\n <fieldset class=\"non-control-editor__field\">\n @if ((vm. editorConfigValue)?.label) {\n <legend class=\"non-control-editor__label\">{{ (vm. editorConfigValue)?.label }}</legend>\n }\n @switch ((vm. editorConfigValue)?.editType) {\n\n @case (elementEditorTypes.ChipSelect) {\n\n <lib-mat-chip-list-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [multiple]=\"!!vm.editorConfigValue?.multipleSelection\"\n [disabled]=\"(vm.disabled)||false\"\n [options]=\"(vm.editorConfigValue)?.options || vm.dataOptions\"\n [required]=\"!!( vm.editorConfigValue)?.required\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\n\n\n }\n\n @case (elementEditorTypes.SelectionOptions) {\n\n <lib-selection-options-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [errors]=\"(validationErrors())||[]\" [disabled]=\"(vm.disabled)||false\"\n [options]=\"$any(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></lib-selection-options-editor>\n }\n\n @case (\n elementEditorTypes.ApiCall) {\n\n <lib-rest-api-call-setup\n [id]=\"((vm.editorConfigValue)?.id)\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\" [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n\n </lib-rest-api-call-setup>\n\n }\n\n @case (elementEditorTypes.ApiValueAccessRules) {\n\n\n\n <lib-api-value-access-rules [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n [formInputs]=\"formInputs() ||[]\"\n\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-api-value-access-rules>\n\n }\n\n @case (elementEditorTypes.FormInputSelector)\n {\n\n <lib-form-input-selector [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [formInputs]=\"formInputs() ||[]\"\n [errors]=\"(validationErrors())||[]\" [value]=\"$any(vm.value) || []\" (change)=\"valueChanged($event)\">\n </lib-form-input-selector>\n }\n\n @case (\n elementEditorTypes.RequiredInputs\n ){\n\n <lib-required-inputs [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n </lib-required-inputs>\n }\n\n @case(elementEditorTypes.ConfigMscoaSegments){\n\n <lib-mscoa-segment-config [disabled]=\"(vm.disabled)||false\" [id]=\"((vm.editorConfigValue)?.id)\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [dataValue]=\"$any(vm.dataValue)\"\n [isCashSegmentConfig]=\"vm.editorConfigValue?.deepBind?.at(-1) === 'cashSegments'\"\n [saveCustomInput]=\"mscoaSaveCustomInput()\"\n [editSegmentInput]=\"mscoaEditInput()\"\n [deleteSegmentInput]=\"mscoaDeleteInput()\"\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></lib-mscoa-segment-config>\n }\n @case (elementEditorTypes.ChipOptionsCreator) {\n <lib-chip-options-creator-editor [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n\n </lib-chip-options-creator-editor>\n\n }\n @case (elementEditorTypes.FormPayloadProjection) {\n <lib-form-payload-projection [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-form-payload-projection>\n\n }\n\n @case (elementEditorTypes.PayloadTemplate) {\n <lib-payload-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-payload-template-editor>\n\n }\n @case (elementEditorTypes.HeaderTemplate) {\n <lib-header-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.QueryTemplate) {\n <lib-header-template-editor kind=\"query\" [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.ApiEndpointConfig) {\n <lib-api-endpoint-config [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [kind]=\"(vm.editorConfigValue)?.deepBind?.at(-1) === 'options' ? 'options' : 'value'\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"$any((vm.editorConfigValue)?.httpGetDataFunction)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-api-endpoint-config>\n\n }\n }\n </fieldset>\n\n @if ((vm. editorConfigValue)?.hint) {\n <small class=\"non-control-editor__hint\">{{ (vm. editorConfigValue)?.hint }}</small>\n }\n </div>\n }\n\n\n @for (error of (validationErrors())||[]; track $index) {\n <mat-error style=\" font-size: 0.75em;\n margin-left: 14px;\n \">\n\n {{error.message}}</mat-error>\n }\n\n}\n\n}@error {\n<mat-card>\n <mat-card-content>\n\n <span>\n Failed to load form inputs\n </span>\n </mat-card-content>\n</mat-card>\n}\n\n\n\n<!-- -\n `TableConfigSetup`\n\n- `MatrixTable`-->\n", styles: [".showItemValue{opacity:.6}.non-control-editor{display:flex;flex-direction:column;width:100%}.non-control-editor__field{margin:0;min-width:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:.75rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--mdc-outlined-text-field-container-shape, 4px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.non-control-editor__field:focus-within{border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.non-control-editor__label{padding:0 .25rem;margin-left:.5rem;font-size:.75rem;font-weight:400;line-height:1;color:var(--lib-forms-on-surface-variant)}.non-control-editor__hint{margin-top:.5rem;padding:0 .875rem;font-size:.75rem;line-height:1.5;color:var(--lib-forms-on-surface-variant)}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:1em;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--lib-forms-primary)}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "ngmodule", type: MatSelectModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i3$2.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$2.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [import('./ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs').then(function (n) { return n.f; }).then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-CK7NIhbq.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-0_Y6bvtE.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs').then(m => m.ConditionalDisplayConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs').then(m => m.MatChipListEditorComponent), i2$1.MatFormField, i2$1.MatLabel, i2$1.MatError, i2$1.MatSuffix, i8$1.MatSelect, i8$1.MatOption, i2.MatIconButton, i3$1.MatIcon, i5.MatTooltip, import('./ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-CN51SdCK.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-editor-js-input.component-02HnmInT.mjs').then(function (n) { return n.e; }).then(m => m.EditorJsInputComponent), import('./ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-Z5frEhho.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs').then(m => m.ApiEndpointConfigComponent), import('./ngx-t-forms-input-custom.component-s1ryJQy4.mjs').then(m => m.InputCustomComponent), i1$1.NgControlStatus, i1$1.RequiredValidator, i1$1.NgModel, import('./ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)]] }); }
17211
18238
  }
17212
- i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: TDynamicDataEditComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-selection-options-editor.component-BLLejOLG.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-Dj0jvBdm.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-Gy7Rtmue.mjs').then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-D9wIdOhg.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-D2stBXXC.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-FQLTI7CX.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-EM7RSWIz.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-CU6R5h-x.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-BPQuzR5k.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-C1Qrze7K.mjs').then(m => m.MatChipListEditorComponent), import('./ngx-t-forms-chip-options-creator-editor.component-CJtbprXS.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-C8MBbnfz.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-uGM93dvc.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-editor-js-input.component-C1dI_7rU.mjs').then(function (n) { return n.e; }).then(m => m.EditorJsInputComponent), import('./ngx-t-forms-record-list-manager.component-CtCOIpai.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-DGCUsTYx.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-DLldVmcN.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-input-custom.component-DiciFhSS.mjs').then(m => m.InputCustomComponent), import('./ngx-t-forms-map-mat-options-keys-C2JpMTEc.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)], resolveMetadata: (SelectionOptionsEditorComponent, FormInputSelectorComponent, RestApiCallSetupComponent, ApiValueAccessRulesComponent, RequiredInputsComponent, PipelineGeneratorComponent, CalculatedFieldRulesComponent, ValidatorsConfigComponent, ConfigMscoaAdditionalInputsComponent, MatSliderEditorComponent, MscoaSegmentConfigComponent, MatSliderToggleEditorComponent, MatChipListEditorComponent, ChipOptionsCreatorEditorComponent, DataSourcePickerComponent, DocumentListLabelConfigEditorComponent, TWorkflowPickerComponent, EditorJsInputComponent, RecordListManagerComponent, FormPayloadProjectionComponent, PayloadTemplateEditorComponent, HeaderTemplateEditorComponent, InputCustomComponent, MapMatOptionsKeys, AsyncPipe) => ({ decorators: [{
18239
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: TDynamicDataEditComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-selection-options-editor.component-BhmmJOco.mjs').then(m => m.SelectionOptionsEditorComponent), import('./ngx-t-forms-form-input-selector.component-vCj2SCxs.mjs').then(m => m.FormInputSelectorComponent), import('./ngx-t-forms-rest-api-call-setup.component-YChv7Arm.mjs').then(function (n) { return n.f; }).then(m => m.RestApiCallSetupComponent), Promise.resolve().then(function () { return apiValueAccessRules_component; }).then(m => m.ApiValueAccessRulesComponent), import('./ngx-t-forms-required-inputs.component-CK7NIhbq.mjs').then(m => m.RequiredInputsComponent), import('./ngx-t-forms-pipeline-generator.component-7Vfwaqnx.mjs').then(m => m.PipelineGeneratorComponent), import('./ngx-t-forms-calculated-field-rules.component-CwI-WEX7.mjs').then(m => m.CalculatedFieldRulesComponent), import('./ngx-t-forms-validators-config.component-0_Y6bvtE.mjs').then(m => m.ValidatorsConfigComponent), import('./ngx-t-forms-conditional-display-config.component-Cmf7gDfO.mjs').then(m => m.ConditionalDisplayConfigComponent), import('./ngx-t-forms-config-mscoa-additional-inputs.component-BHiOEQe4.mjs').then(m => m.ConfigMscoaAdditionalInputsComponent), import('./ngx-t-forms-mat-slider-editor.component-4buvmLkX.mjs').then(m => m.MatSliderEditorComponent), import('./ngx-t-forms-mscoa-segment-config.component-GyKF31Ve.mjs').then(m => m.MscoaSegmentConfigComponent), import('./ngx-t-forms-mat-slider-toggle-editor.component-DX8L0O1k.mjs').then(m => m.MatSliderToggleEditorComponent), import('./ngx-t-forms-mat-chip-list-editor.component-wskkKr4y.mjs').then(m => m.MatChipListEditorComponent), import('./ngx-t-forms-chip-options-creator-editor.component-CO_3EQ_v.mjs').then(m => m.ChipOptionsCreatorEditorComponent), import('./ngx-t-forms-data-source-picker.component-CN51SdCK.mjs').then(m => m.DataSourcePickerComponent), import('./ngx-t-forms-document-list-label-config-editor.component-DLzba2AQ.mjs').then(m => m.DocumentListLabelConfigEditorComponent), import('./ngx-t-forms-t-workflow-picker.component-D0ttyEex.mjs').then(m => m.TWorkflowPickerComponent), import('./ngx-t-forms-editor-js-input.component-02HnmInT.mjs').then(function (n) { return n.e; }).then(m => m.EditorJsInputComponent), import('./ngx-t-forms-record-list-manager.component-CfZdqKhY.mjs').then(m => m.RecordListManagerComponent), import('./ngx-t-forms-form-payload-projection.component-y9PSIeP1.mjs').then(m => m.FormPayloadProjectionComponent), import('./ngx-t-forms-payload-template-editor.component-CVzOTLYE.mjs').then(m => m.PayloadTemplateEditorComponent), import('./ngx-t-forms-header-template-editor.component-Z5frEhho.mjs').then(m => m.HeaderTemplateEditorComponent), import('./ngx-t-forms-api-endpoint-config.component-CZm3Z_7B.mjs').then(m => m.ApiEndpointConfigComponent), import('./ngx-t-forms-input-custom.component-s1ryJQy4.mjs').then(m => m.InputCustomComponent), import('./ngx-t-forms-map-mat-options-keys-C1kxlZS_.mjs').then(m => m.MapMatOptionsKeys), import('@angular/common').then(m => m.AsyncPipe)], resolveMetadata: (SelectionOptionsEditorComponent, FormInputSelectorComponent, RestApiCallSetupComponent, ApiValueAccessRulesComponent, RequiredInputsComponent, PipelineGeneratorComponent, CalculatedFieldRulesComponent, ValidatorsConfigComponent, ConditionalDisplayConfigComponent, ConfigMscoaAdditionalInputsComponent, MatSliderEditorComponent, MscoaSegmentConfigComponent, MatSliderToggleEditorComponent, MatChipListEditorComponent, ChipOptionsCreatorEditorComponent, DataSourcePickerComponent, DocumentListLabelConfigEditorComponent, TWorkflowPickerComponent, EditorJsInputComponent, RecordListManagerComponent, FormPayloadProjectionComponent, PayloadTemplateEditorComponent, HeaderTemplateEditorComponent, ApiEndpointConfigComponent, InputCustomComponent, MapMatOptionsKeys, AsyncPipe) => ({ decorators: [{
17213
18240
  type: Component,
17214
18241
  args: [{ selector: 'lib-t-dynamic-data-edit', imports: [
17215
18242
  AsyncPipe,
@@ -17221,6 +18248,7 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", n
17221
18248
  PipelineGeneratorComponent,
17222
18249
  CalculatedFieldRulesComponent,
17223
18250
  ValidatorsConfigComponent,
18251
+ ConditionalDisplayConfigComponent,
17224
18252
  ConfigMscoaAdditionalInputsComponent,
17225
18253
  MatSliderEditorComponent,
17226
18254
  MscoaSegmentConfigComponent,
@@ -17241,10 +18269,11 @@ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", n
17241
18269
  FormPayloadProjectionComponent,
17242
18270
  PayloadTemplateEditorComponent,
17243
18271
  HeaderTemplateEditorComponent,
18272
+ ApiEndpointConfigComponent,
17244
18273
  InputCustomComponent,
17245
18274
  FormsModule,
17246
18275
  MapMatOptionsKeys,
17247
- ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NESTED_EDITOR_COMPONENT, useValue: TDynamicDataEditComponent }], template: "@defer {\r\n@if (( vm$ |async); as vm) {\r\n\r\n @if (vm.isFormFieldControl) {\r\n <!-- Editor types that resolve to a MatFormFieldControl render inside the field. -->\r\n <mat-form-field appearance=\"outline\" [color]=\"((validationErrors())||[]).length>0 ? 'warn' : 'primary'\"\r\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\" [hintLabel]=\"vm.editorConfigValue?.hint||''\">\r\n <mat-label> {{ (vm. editorConfigValue)?.label }} </mat-label>\r\n @switch ((vm. editorConfigValue)?.editType) {\r\n @default {\r\n <lib-input-custom\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [inputConfig]=\"$any(vm.inputConfig)\"\r\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\"\r\n [required]=\"!!(vm. editorConfigValue)?.required\"\r\n [disabled]=\"!!(vm.disabled)\"\r\n [ngModel]=\"(vm.value)\"\r\n (blur)=\"elementBlur($event)\"\r\n (input)=\"inputChange($event)\" ></lib-input-custom>\r\n\r\n\r\n }\r\n @case ( elementEditorTypes.Toggle) {\r\n <lib-mat-slider-toggle-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [name]=\"((vm. editorConfigValue)?.name||'') \"\r\n [label]=\"((vm. editorConfigValue)?.label||'')\" [disabled]=\"(vm.disabled)||false\"\r\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\r\n </lib-mat-slider-toggle-editor>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.Range) {\r\n\r\n\r\n <lib-mat-slider-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\r\n [disabled]=\"(vm.disabled)||false\" [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [min]=\"( vm.editorConfigValue)?.min || 0\"\r\n (valueChange)=\"inputChange($event)\" [step]=\"( vm.editorConfigValue)?.step || 1\">\r\n\r\n\r\n </lib-mat-slider-editor>\r\n\r\n\r\n\r\n }\r\n\r\n @case (elementEditorTypes.OptionSelect) {\r\n\r\n <mat-select\r\n\r\n [value]=\"$any(vm.value)\" (selectionChange)=\"valueChanged($event.value)\"\r\n [disabled]=\"(vm.disabled)||false\">\r\n @for(option of ( vm.editorConfigValue)?.options || vm.dataOptions;track option.value){\r\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\r\n }\r\n </mat-select>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.RichTextEditor) {\r\n <lib-editor-js-input\r\n\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [value]=\"$any(vm.value)\" (valueChanged)=\"valueChanged($event)\"\r\n [disabled]=\"(vm.disabled)||false\" [inputConfig]=\"$any(data())\">\r\n </lib-editor-js-input>\r\n }\r\n\r\n @case (elementEditorTypes.MongoPipelineBuilder) {\r\n\r\n <lib-pipeline-generator [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\r\n (valueChanged)=\"valueChanged($event)\"></lib-pipeline-generator>\r\n\r\n }\r\n @case (elementEditorTypes.MapMatOptionsKeys) {\r\n <lib-map-mat-options-keys [disabled]=\"(vm.disabled)||false\"\r\n [value]=\"$any(vm.value)\"\r\n [formInputs]=\"formInputs() || []\"\r\n [mapToData]=\"vm.dataOptions\"\r\n [errors]=\"(validationErrors())||[]\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-map-mat-options-keys>\r\n\r\n }\r\n\r\n @case(elementEditorTypes.CalculatedFieldRules){\r\n\r\n <lib-calculated-field-rules [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\"\r\n [mapToData]=\"vm.dataOptions\"></lib-calculated-field-rules>\r\n }\r\n\r\n @case(elementEditorTypes.Validators){\r\n\r\n <lib-validators-config [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\r\n [mapToData]=\"vm.dataOptions\">\r\n </lib-validators-config>\r\n\r\n }\r\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\r\n\r\n <lib-config-mscoa-additional-inputs [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [mapToData]=\"vm.dataOptions\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-config-mscoa-additional-inputs>\r\n\r\n }\r\n @case (elementEditorTypes.DataSourcePicker) {\r\n <lib-data-source-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [editorConfig]=\"vm. editorConfigValue\"\r\n (valueChange)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\">\r\n </lib-data-source-picker>\r\n }\r\n @case (elementEditorTypes.ListLabelConfigEditor) {\r\n <lib-document-list-label-config-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [formInputs]=\"formInputs() ||[]\"\r\n [disabled]=\"(vm.disabled)||false\"\r\n [editorConfig]=\"vm. editorConfigValue\"\r\n (valueChange)=\"valueChanged($event)\"\r\n [value]=\"$any(vm.value)\" [mapToData]=\"vm.dataOptions\"\r\n [errors]=\"(validationErrors())||[]\">\r\n\r\n </lib-document-list-label-config-editor>\r\n }\r\n @case(\r\n elementEditorTypes.WorkflowPicker\r\n ){\r\n <lib-t-workflow-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [getWorkflowOptions]=\"getWorkflowOptions$\"\r\n (valueChanged)=\"valueChanged($event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-t-workflow-picker>\r\n }\r\n @case (\r\n elementEditorTypes.RecordListManager\r\n ) {\r\n <lib-record-list-manager\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [editorConfig]=\"vm.editorConfigValue\" [disabled]=\"(vm.disabled)||false\"\r\n [formInputs]=\"formInputs() ||[]\" [mapToData]=\"vm.dataOptions\" (valueChange)=\"valueChanged($event)\"\r\n\r\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-record-list-manager>\r\n }\r\n }\r\n\r\n @if (vm.inputHasBlurFunction) {\r\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\"\r\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\r\n mat-icon-button>\r\n <mat-icon>{{\r\n blurOff?'blur_off':'blur_on'\r\n }}\r\n\r\n\r\n </mat-icon>\r\n </button>\r\n }\r\n </mat-form-field>\r\n } @else {\r\n <!-- Editor types backed by plain (signal-based) components render outside\r\n the field, since they are not MatFormFieldControls. They are wrapped to\r\n mirror the outline mat-form-field appearance: the fieldset draws the\r\n outline, its legend is the notched floating label, and the hint renders\r\n as a subscript below the box. -->\r\n <div class=\"non-control-editor\">\r\n <fieldset class=\"non-control-editor__field\">\r\n @if ((vm. editorConfigValue)?.label) {\r\n <legend class=\"non-control-editor__label\">{{ (vm. editorConfigValue)?.label }}</legend>\r\n }\r\n @switch ((vm. editorConfigValue)?.editType) {\r\n\r\n @case (elementEditorTypes.ChipSelect) {\r\n\r\n <lib-mat-chip-list-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [multiple]=\"!!vm.editorConfigValue?.multipleSelection\"\r\n [disabled]=\"(vm.disabled)||false\"\r\n [options]=\"(vm.editorConfigValue)?.options || vm.dataOptions\"\r\n [required]=\"!!( vm.editorConfigValue)?.required\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\"\r\n (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\r\n\r\n\r\n }\r\n\r\n @case (elementEditorTypes.SelectionOptions) {\r\n\r\n <lib-selection-options-editor\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [errors]=\"(validationErrors())||[]\" [disabled]=\"(vm.disabled)||false\"\r\n [options]=\"$any(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></lib-selection-options-editor>\r\n }\r\n\r\n @case (\r\n elementEditorTypes.ApiCall) {\r\n\r\n <lib-rest-api-call-setup\r\n [id]=\"((vm.editorConfigValue)?.id)\"\r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\r\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\" [disabled]=\"(vm.disabled)||false\"\r\n [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\r\n\r\n </lib-rest-api-call-setup>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.ApiValueAccessRules) {\r\n\r\n\r\n\r\n <lib-api-value-access-rules [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\"\r\n [formInputs]=\"formInputs() ||[]\"\r\n\r\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\" [mapToData]=\"vm.dataOptions\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-api-value-access-rules>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.FormInputSelector)\r\n {\r\n\r\n <lib-form-input-selector [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [formInputs]=\"formInputs() ||[]\"\r\n [errors]=\"(validationErrors())||[]\" [value]=\"$any(vm.value) || []\" (change)=\"valueChanged($event)\">\r\n </lib-form-input-selector>\r\n }\r\n\r\n @case (\r\n elementEditorTypes.RequiredInputs\r\n ){\r\n\r\n <lib-required-inputs [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\r\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\r\n </lib-required-inputs>\r\n }\r\n\r\n @case(elementEditorTypes.ConfigMscoaSegments){\r\n\r\n <lib-mscoa-segment-config [disabled]=\"(vm.disabled)||false\" [id]=\"((vm.editorConfigValue)?.id)\" [value]=\"$any(vm.value)\"\r\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [dataValue]=\"$any(vm.dataValue)\"\r\n [isCashSegmentConfig]=\"vm.editorConfigValue?.deepBind?.at(-1) === 'cashSegments'\"\r\n [saveCustomInput]=\"mscoaSaveCustomInput()\"\r\n [editSegmentInput]=\"mscoaEditInput()\"\r\n [deleteSegmentInput]=\"mscoaDeleteInput()\"\r\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></lib-mscoa-segment-config>\r\n }\r\n @case (elementEditorTypes.ChipOptionsCreator) {\r\n <lib-chip-options-creator-editor [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" (valueChange)=\"valueChanged($event)\"\r\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\r\n\r\n </lib-chip-options-creator-editor>\r\n\r\n }\r\n @case (elementEditorTypes.FormPayloadProjection) {\r\n <lib-form-payload-projection [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\r\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\r\n (valueChanged)=\"valueChanged($event)\">\r\n </lib-form-payload-projection>\r\n\r\n }\r\n\r\n @case (elementEditorTypes.PayloadTemplate) {\r\n <lib-payload-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\r\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\r\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\r\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\r\n </lib-payload-template-editor>\r\n\r\n }\r\n @case (elementEditorTypes.HeaderTemplate) {\r\n <lib-header-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\r\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\r\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\r\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\r\n </lib-header-template-editor>\r\n\r\n }\r\n }\r\n </fieldset>\r\n\r\n @if ((vm. editorConfigValue)?.hint) {\r\n <small class=\"non-control-editor__hint\">{{ (vm. editorConfigValue)?.hint }}</small>\r\n }\r\n </div>\r\n }\r\n\r\n\r\n @for (error of (validationErrors())||[]; track $index) {\r\n <mat-error style=\" font-size: 0.75em;\r\n margin-left: 14px;\r\n \">\r\n\r\n {{error.message}}</mat-error>\r\n }\r\n\r\n}\r\n\r\n}@error {\r\n<mat-card>\r\n <mat-card-content>\r\n\r\n <span>\r\n Failed to load form inputs\r\n </span>\r\n </mat-card-content>\r\n</mat-card>\r\n}\r\n\r\n\r\n\r\n<!-- -\r\n `TableConfigSetup`\r\n- `ConditionalInputConfig`\r\n- `MatrixTable`-->\r\n", styles: [".showItemValue{opacity:.6}.non-control-editor{display:flex;flex-direction:column;width:100%}.non-control-editor__field{margin:0;min-width:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:.75rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--mdc-outlined-text-field-container-shape, 4px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.non-control-editor__field:focus-within{border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.non-control-editor__label{padding:0 .25rem;margin-left:.5rem;font-size:.75rem;font-weight:400;line-height:1;color:var(--lib-forms-on-surface-variant)}.non-control-editor__hint{margin-top:.5rem;padding:0 .875rem;font-size:.75rem;line-height:1.5;color:var(--lib-forms-on-surface-variant)}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:1em;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--lib-forms-primary)}\n"] }]
18276
+ ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [{ provide: NESTED_EDITOR_COMPONENT, useValue: TDynamicDataEditComponent }], template: "@defer {\n@if (( vm$ |async); as vm) {\n\n @if (vm.isFormFieldControl) {\n <!-- Editor types that resolve to a MatFormFieldControl render inside the field. -->\n <mat-form-field appearance=\"outline\" [color]=\"((validationErrors())||[]).length>0 ? 'warn' : 'primary'\"\n [floatLabel]=\"'always'\" [subscriptSizing]=\"'dynamic'\" [hintLabel]=\"vm.editorConfigValue?.hint||''\">\n <mat-label> {{ (vm. editorConfigValue)?.label }} </mat-label>\n @switch ((vm. editorConfigValue)?.editType) {\n @default {\n <lib-input-custom\n [id]=\"((vm.editorConfigValue)?.id)\"\n [inputConfig]=\"$any(vm.inputConfig)\"\n [placeholder]=\"(vm. editorConfigValue)?.placeholder ||'Enter value'\"\n [required]=\"!!(vm. editorConfigValue)?.required\"\n [disabled]=\"!!(vm.disabled)\"\n [ngModel]=\"(vm.value)\"\n (blur)=\"elementBlur($event)\"\n (input)=\"inputChange($event)\" ></lib-input-custom>\n\n\n }\n @case ( elementEditorTypes.Toggle) {\n <lib-mat-slider-toggle-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [name]=\"((vm. editorConfigValue)?.name||'') \"\n [label]=\"((vm. editorConfigValue)?.label||'')\" [disabled]=\"(vm.disabled)||false\"\n (valueChange)=\"valueChanged(!!$event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n </lib-mat-slider-toggle-editor>\n\n }\n\n @case (elementEditorTypes.Range) {\n\n\n <lib-mat-slider-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [format]=\"( vm.editorConfigValue)?.format \" [formatLabel]=\" formatLabel\"\n [disabled]=\"(vm.disabled)||false\" [max]=\"( vm.editorConfigValue)?.max || 100\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [min]=\"( vm.editorConfigValue)?.min || 0\"\n (valueChange)=\"inputChange($event)\" [step]=\"( vm.editorConfigValue)?.step || 1\">\n\n\n </lib-mat-slider-editor>\n\n\n\n }\n\n @case (elementEditorTypes.OptionSelect) {\n\n <mat-select\n\n [value]=\"$any(vm.value)\" (selectionChange)=\"valueChanged($event.value)\"\n [disabled]=\"(vm.disabled)||false\">\n @for(option of ( vm.editorConfigValue)?.options || vm.dataOptions;track option.value){\n <mat-option [value]=\"option.value\">{{option.label}}</mat-option>\n }\n </mat-select>\n\n }\n\n @case (elementEditorTypes.RichTextEditor) {\n <lib-editor-js-input\n\n [id]=\"((vm.editorConfigValue)?.id)\"\n [value]=\"$any(vm.value)\" (valueChanged)=\"valueChanged($event)\"\n [disabled]=\"(vm.disabled)||false\" [inputConfig]=\"$any(data())\">\n </lib-editor-js-input>\n }\n\n @case (elementEditorTypes.MongoPipelineBuilder) {\n\n <lib-pipeline-generator [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\"></lib-pipeline-generator>\n\n }\n @case (elementEditorTypes.MapMatOptionsKeys) {\n <lib-map-mat-options-keys [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() || []\"\n [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-map-mat-options-keys>\n\n }\n\n @case(elementEditorTypes.CalculatedFieldRules){\n\n <lib-calculated-field-rules [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\"\n [mapToData]=\"vm.dataOptions\"></lib-calculated-field-rules>\n }\n\n @case(elementEditorTypes.Validators){\n\n <lib-validators-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-validators-config>\n\n }\n\n @case(elementEditorTypes.ConditionalInputConfig){\n\n <lib-conditional-display-config [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\"\n [mapToData]=\"vm.dataOptions\">\n </lib-conditional-display-config>\n\n }\n @case(elementEditorTypes.ConfigMscoaAdditionalInputs){\n\n <lib-config-mscoa-additional-inputs [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-config-mscoa-additional-inputs>\n\n }\n @case (elementEditorTypes.DataSourcePicker) {\n <lib-data-source-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\" [formInputs]=\"formInputs() ||[]\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\">\n </lib-data-source-picker>\n }\n @case (elementEditorTypes.ListLabelConfigEditor) {\n <lib-document-list-label-config-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [formInputs]=\"formInputs() ||[]\"\n [disabled]=\"(vm.disabled)||false\"\n [editorConfig]=\"vm. editorConfigValue\"\n (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [mapToData]=\"vm.dataOptions\"\n [errors]=\"(validationErrors())||[]\">\n\n </lib-document-list-label-config-editor>\n }\n @case(\n elementEditorTypes.WorkflowPicker\n ){\n <lib-t-workflow-picker [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [getWorkflowOptions]=\"getWorkflowOptions$\"\n (valueChanged)=\"valueChanged($event)\" [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-t-workflow-picker>\n }\n @case (\n elementEditorTypes.RecordListManager\n ) {\n <lib-record-list-manager\n [id]=\"((vm.editorConfigValue)?.id)\"\n [editorConfig]=\"vm.editorConfigValue\" [disabled]=\"(vm.disabled)||false\"\n [formInputs]=\"formInputs() ||[]\" [mapToData]=\"vm.dataOptions\" (valueChange)=\"valueChanged($event)\"\n\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\"></lib-record-list-manager>\n }\n }\n\n @if (vm.inputHasBlurFunction) {\n <button [matTooltip]=\"blurFunctionTooltip((vm.editorConfigValue)?.blurHandle)\"\n [disabled]=\"(vm.disabled)\" [color]=\"blurOff?'':'primary'\" (click)=\"blurOff=!blurOff\" matSuffix\n mat-icon-button>\n <mat-icon>{{\n blurOff?'blur_off':'blur_on'\n }}\n\n\n </mat-icon>\n </button>\n }\n </mat-form-field>\n } @else {\n <!-- Editor types backed by plain (signal-based) components render outside\n the field, since they are not MatFormFieldControls. They are wrapped to\n mirror the outline mat-form-field appearance: the fieldset draws the\n outline, its legend is the notched floating label, and the hint renders\n as a subscript below the box. -->\n <div class=\"non-control-editor\">\n <fieldset class=\"non-control-editor__field\">\n @if ((vm. editorConfigValue)?.label) {\n <legend class=\"non-control-editor__label\">{{ (vm. editorConfigValue)?.label }}</legend>\n }\n @switch ((vm. editorConfigValue)?.editType) {\n\n @case (elementEditorTypes.ChipSelect) {\n\n <lib-mat-chip-list-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [multiple]=\"!!vm.editorConfigValue?.multipleSelection\"\n [disabled]=\"(vm.disabled)||false\"\n [options]=\"(vm.editorConfigValue)?.options || vm.dataOptions\"\n [required]=\"!!( vm.editorConfigValue)?.required\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n (valueChange)=\" valueChanged($event)\"></lib-mat-chip-list-editor>\n\n\n }\n\n @case (elementEditorTypes.SelectionOptions) {\n\n <lib-selection-options-editor\n [id]=\"((vm.editorConfigValue)?.id)\"\n [errors]=\"(validationErrors())||[]\" [disabled]=\"(vm.disabled)||false\"\n [options]=\"$any(vm.value) || []\" (valueChanged)=\"valueChanged($event)\"></lib-selection-options-editor>\n }\n\n @case (\n elementEditorTypes.ApiCall) {\n\n <lib-rest-api-call-setup\n [id]=\"((vm.editorConfigValue)?.id)\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"(vm.editorConfigValue)?.httpGetDataFunction\" [disabled]=\"(vm.disabled)||false\"\n [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n\n </lib-rest-api-call-setup>\n\n }\n\n @case (elementEditorTypes.ApiValueAccessRules) {\n\n\n\n <lib-api-value-access-rules [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\"\n [formInputs]=\"formInputs() ||[]\"\n\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\" [mapToData]=\"vm.dataOptions\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-api-value-access-rules>\n\n }\n\n @case (elementEditorTypes.FormInputSelector)\n {\n\n <lib-form-input-selector [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" [formInputs]=\"formInputs() ||[]\"\n [errors]=\"(validationErrors())||[]\" [value]=\"$any(vm.value) || []\" (change)=\"valueChanged($event)\">\n </lib-form-input-selector>\n }\n\n @case (\n elementEditorTypes.RequiredInputs\n ){\n\n <lib-required-inputs [formInputs]=\"formInputs() ||[]\" [disabled]=\"(vm.disabled)||false\"\n [id]=\"((vm.editorConfigValue)?.label||'')+((vm.editorConfigValue)?.editType||'')\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" (valueChanged)=\"valueChanged($event)\">\n </lib-required-inputs>\n }\n\n @case(elementEditorTypes.ConfigMscoaSegments){\n\n <lib-mscoa-segment-config [disabled]=\"(vm.disabled)||false\" [id]=\"((vm.editorConfigValue)?.id)\" [value]=\"$any(vm.value)\"\n [errors]=\"(validationErrors())||[]\" [getMscoaTree]=\"getMscoaTree$\" [dataValue]=\"$any(vm.dataValue)\"\n [isCashSegmentConfig]=\"vm.editorConfigValue?.deepBind?.at(-1) === 'cashSegments'\"\n [saveCustomInput]=\"mscoaSaveCustomInput()\"\n [editSegmentInput]=\"mscoaEditInput()\"\n [deleteSegmentInput]=\"mscoaDeleteInput()\"\n [showAllSegments]=\"vm.dataOptions\" (valueChanged)=\"valueChanged($event)\"></lib-mscoa-segment-config>\n }\n @case (elementEditorTypes.ChipOptionsCreator) {\n <lib-chip-options-creator-editor [id]=\"((vm.editorConfigValue)?.id)\" [disabled]=\"(vm.disabled)||false\" (valueChange)=\"valueChanged($event)\"\n [value]=\"$any(vm.value)\" [errors]=\"(validationErrors())||[]\">\n\n </lib-chip-options-creator-editor>\n\n }\n @case (elementEditorTypes.FormPayloadProjection) {\n <lib-form-payload-projection [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n (valueChanged)=\"valueChanged($event)\">\n </lib-form-payload-projection>\n\n }\n\n @case (elementEditorTypes.PayloadTemplate) {\n <lib-payload-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-payload-template-editor>\n\n }\n @case (elementEditorTypes.HeaderTemplate) {\n <lib-header-template-editor [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.QueryTemplate) {\n <lib-header-template-editor kind=\"query\" [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [defaultTemplate]=\"$any((vm.editorConfigValue)?.defaultValue)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-header-template-editor>\n\n }\n @case (elementEditorTypes.ApiEndpointConfig) {\n <lib-api-endpoint-config [disabled]=\"(vm.disabled)||false\" [value]=\"$any(vm.value)\"\n [kind]=\"(vm.editorConfigValue)?.deepBind?.at(-1) === 'options' ? 'options' : 'value'\"\n [postmanCollectionConfig]=\"(vm.editorConfigValue)?.postmanCollectionConfig\"\n [httpGetDataFunction]=\"$any((vm.editorConfigValue)?.httpGetDataFunction)\"\n [formInputs]=\"formInputs() ||[]\" [errors]=\"(validationErrors())||[]\"\n [id]=\"((vm.editorConfigValue)?.id)\" (valueChanged)=\"valueChanged($event)\">\n </lib-api-endpoint-config>\n\n }\n }\n </fieldset>\n\n @if ((vm. editorConfigValue)?.hint) {\n <small class=\"non-control-editor__hint\">{{ (vm. editorConfigValue)?.hint }}</small>\n }\n </div>\n }\n\n\n @for (error of (validationErrors())||[]; track $index) {\n <mat-error style=\" font-size: 0.75em;\n margin-left: 14px;\n \">\n\n {{error.message}}</mat-error>\n }\n\n}\n\n}@error {\n<mat-card>\n <mat-card-content>\n\n <span>\n Failed to load form inputs\n </span>\n </mat-card-content>\n</mat-card>\n}\n\n\n\n<!-- -\n `TableConfigSetup`\n\n- `MatrixTable`-->\n", styles: [".showItemValue{opacity:.6}.non-control-editor{display:flex;flex-direction:column;width:100%}.non-control-editor__field{margin:0;min-width:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;padding:.75rem;border:1px solid var(--lib-forms-outline-variant);border-radius:var(--mdc-outlined-text-field-container-shape, 4px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),box-shadow var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.non-control-editor__field:focus-within{border-color:var(--lib-forms-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--lib-forms-primary) 25%,transparent)}.non-control-editor__label{padding:0 .25rem;margin-left:.5rem;font-size:.75rem;font-weight:400;line-height:1;color:var(--lib-forms-on-surface-variant)}.non-control-editor__hint{margin-top:.5rem;padding:0 .875rem;font-size:.75rem;line-height:1.5;color:var(--lib-forms-on-surface-variant)}mat-form-field{width:100%}mat-slider{width:100%}.range{display:flex;align-items:center}.elementInfo{display:flex;align-items:center;justify-content:center;padding:0;height:24px;width:24px}.infoIcon{font-size:1em;height:16px;width:16px}.toggle-label{margin-left:5px;align-items:center;display:flex;font-weight:500;line-height:normal;justify-content:space-between;color:var(--lib-forms-primary)}\n"] }]
17248
18277
  }], ctorParameters: null, propDecorators: { editorConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "editorConfig", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], data: [{ type: i0.Input, args: [{ isSignal: true, alias: "data", required: false }] }], validationErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "validationErrors", required: false }] }], mscoaSaveCustomInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "mscoaSaveCustomInput", required: false }] }], mscoaEditInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "mscoaEditInput", required: false }] }], mscoaDeleteInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "mscoaDeleteInput", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], blur: [{ type: i0.Output, args: ["blur"] }] } }) });
17249
18278
 
17250
18279
  const isEmptyPath = (path) => path.length === 0;
@@ -17676,6 +18705,101 @@ var formatData_pipe = /*#__PURE__*/Object.freeze({
17676
18705
  FormatDataPipe: FormatDataPipe
17677
18706
  });
17678
18707
 
18708
+ const ITERATIONS = 100000;
18709
+ const KEY_LENGTH = 32;
18710
+ async function encrypt(value, secret) {
18711
+ if (!value || !secret)
18712
+ throw new Error('Missing required parameters');
18713
+ try {
18714
+ const salt = crypto.getRandomValues(new Uint8Array(16));
18715
+ const iv = crypto.getRandomValues(new Uint8Array(16));
18716
+ const saltWords = CryptoJS.lib.WordArray.create(salt);
18717
+ const ivWords = CryptoJS.lib.WordArray.create(iv);
18718
+ const key = CryptoJS.PBKDF2(secret, saltWords, {
18719
+ keySize: KEY_LENGTH / 4,
18720
+ iterations: ITERATIONS,
18721
+ hasher: CryptoJS.algo.SHA256
18722
+ });
18723
+ // Convert input to WordArray
18724
+ const messageWords = CryptoJS.enc.Utf8.parse(value);
18725
+ const encrypted = CryptoJS.AES.encrypt(messageWords, key, {
18726
+ iv: ivWords,
18727
+ mode: CryptoJS.mode.CBC,
18728
+ padding: CryptoJS.pad.Pkcs7
18729
+ });
18730
+ const hmac = CryptoJS.HmacSHA256(encrypted.ciphertext.toString(), key);
18731
+ return {
18732
+ ciphertext: CryptoJS.enc.Base64.stringify(encrypted.ciphertext),
18733
+ salt: CryptoJS.enc.Base64.stringify(saltWords),
18734
+ iv: CryptoJS.enc.Base64.stringify(ivWords),
18735
+ hmac: hmac.toString(CryptoJS.enc.Base64)
18736
+ };
18737
+ }
18738
+ catch (error) {
18739
+ throw error;
18740
+ }
18741
+ }
18742
+ async function decrypt(encrypted, secret) {
18743
+ if (!encrypted || !encrypted.salt || !secret || typeof encrypted.iv !== 'string' || typeof encrypted.salt !== 'string') {
18744
+ throw new Error('Encrypted data is missing or corrupt');
18745
+ }
18746
+ try {
18747
+ const salt = CryptoJS.enc.Base64.parse(encrypted.salt);
18748
+ const iv = CryptoJS.enc.Base64.parse(encrypted.iv);
18749
+ const ciphertext = CryptoJS.enc.Base64.parse(encrypted.ciphertext);
18750
+ const key = CryptoJS.PBKDF2(secret, salt, {
18751
+ keySize: KEY_LENGTH / 4,
18752
+ iterations: ITERATIONS,
18753
+ hasher: CryptoJS.algo.SHA256
18754
+ });
18755
+ const computedHmac = CryptoJS.HmacSHA256(ciphertext.toString(), key)
18756
+ .toString(CryptoJS.enc.Base64);
18757
+ if (computedHmac !== encrypted.hmac) {
18758
+ throw new Error('Invalid HMAC - data may be tampered');
18759
+ }
18760
+ const decrypted = CryptoJS.AES.decrypt(CryptoJS.lib.CipherParams.create({
18761
+ ciphertext: ciphertext
18762
+ }), key, {
18763
+ iv: iv,
18764
+ mode: CryptoJS.mode.CBC,
18765
+ padding: CryptoJS.pad.Pkcs7
18766
+ });
18767
+ return decrypted.toString(CryptoJS.enc.Utf8);
18768
+ }
18769
+ catch (error) {
18770
+ throw error;
18771
+ }
18772
+ }
18773
+
18774
+ // `crypto-js` is CommonJS — destructure from the default export rather than using
18775
+ // named ESM imports, so Node ESM consumers (SSR, smoke harness) resolve cleanly.
18776
+ const { HmacSHA256, enc } = CryptoJS;
18777
+ /**
18778
+ * Derives a deterministic 32-char HMAC key for a given form input, salted by
18779
+ * the consumer-supplied secret. The secret must be configured via
18780
+ * `withInputSecret()` and read from `INPUT_SECRET_TOKEN` at the callsite —
18781
+ * this function does not (and cannot, as a free helper) inject it itself.
18782
+ *
18783
+ * @param input Input descriptor; its identity fields seed the primary digest.
18784
+ * @param secret Consumer-supplied HMAC secret. Throws if missing.
18785
+ */
18786
+ const generateSecretKey = async (input, secret) => {
18787
+ if (!input) {
18788
+ throw new Error('Input is required to generate secret key');
18789
+ }
18790
+ if (!secret) {
18791
+ throw new Error('[ngx-t-forms] generateSecretKey: secret is required. Configure it via withInputSecret() and inject INPUT_SECRET_TOKEN at the callsite.');
18792
+ }
18793
+ const { id, element, formControlName, sectionId } = input;
18794
+ const pepper = 'NGX_T_FORMS_V1';
18795
+ const timestamp = new Date().getTimezoneOffset();
18796
+ const primarySeed = `${id}:${formControlName}:${element}:${sectionId}`;
18797
+ const enrichedSeed = `${pepper}:${primarySeed}:${timestamp}`;
18798
+ const firstHash = HmacSHA256(enrichedSeed, secret);
18799
+ const secondHash = HmacSHA256(firstHash.toString(), secret + pepper);
18800
+ return secondHash.toString(enc.Hex).substring(0, 32);
18801
+ };
18802
+
17679
18803
  /**
17680
18804
  * @public
17681
18805
  * @deprecated Reachable for one minor cycle only as part of the Phase 1 public-surface
@@ -17758,41 +18882,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
17758
18882
  const ELEMENT_REGISTRY = {
17759
18883
  [ElementTypes.Location]: {
17760
18884
  builderAware: true,
17761
- load: () => import('./ngx-t-forms-geo-location.component-Bj_qIEqi.mjs').then(m => m.GeoLocationComponent),
18885
+ load: () => import('./ngx-t-forms-geo-location.component-D-BhLdx6.mjs').then(m => m.GeoLocationComponent),
17762
18886
  },
17763
18887
  [ElementTypes.AutoCompleteInput]: {
17764
- load: () => import('./ngx-t-forms-auto-complete-input-element.component-FhUHTsUF.mjs').then(m => m.AutoCompleteInputElementComponent),
18888
+ load: () => import('./ngx-t-forms-auto-complete-input-element.component-IciY6hb3.mjs').then(m => m.AutoCompleteInputElementComponent),
17765
18889
  },
17766
18890
  [ElementTypes.Toggle]: {
17767
- load: () => import('./ngx-t-forms-toggle-input-element.component-DQGvEJN-.mjs').then(m => m.ToggleInputElementComponent),
18891
+ load: () => import('./ngx-t-forms-toggle-input-element.component-XZi6kPnL.mjs').then(m => m.ToggleInputElementComponent),
17768
18892
  },
17769
18893
  [ElementTypes.Select]: {
17770
- load: () => import('./ngx-t-forms-select-input-element.component-CxYTmuvV.mjs').then(m => m.SelectInputElementComponent),
18894
+ load: () => import('./ngx-t-forms-select-input-element.component-D5HFzh35.mjs').then(m => m.SelectInputElementComponent),
17771
18895
  },
17772
18896
  [ElementTypes.Textarea]: {
17773
- load: () => import('./ngx-t-forms-textarea-input-element.component-75VdPc6z.mjs').then(m => m.TextareaInputElementComponent),
18897
+ load: () => import('./ngx-t-forms-textarea-input-element.component-DWEADTsz.mjs').then(m => m.TextareaInputElementComponent),
17774
18898
  },
17775
18899
  [ElementTypes.DateRangePicker]: {
17776
- load: () => import('./ngx-t-forms-date-range-picker-input-element.component-SMWrTm5X.mjs').then(m => m.DateRangePickerInputElementComponent),
18900
+ load: () => import('./ngx-t-forms-date-range-picker-input-element.component-C-4fqOF0.mjs').then(m => m.DateRangePickerInputElementComponent),
17777
18901
  },
17778
18902
  [ElementTypes.DatePicker]: {
17779
- load: () => import('./ngx-t-forms-date-picker-input-element.component-Dux6uy66.mjs').then(m => m.DatePickerInputElementComponent),
18903
+ load: () => import('./ngx-t-forms-date-picker-input-element.component-c3OSDXWw.mjs').then(m => m.DatePickerInputElementComponent),
17780
18904
  },
17781
18905
  [ElementTypes.FileUpload]: {
17782
- load: () => import('./ngx-t-forms-file-upload-input-element.component-CQsKz87N.mjs').then(m => m.FileUploadInputElementComponent),
18906
+ load: () => import('./ngx-t-forms-file-upload-input-element.component-BF7KbSPb.mjs').then(m => m.FileUploadInputElementComponent),
17783
18907
  },
17784
18908
  [ElementTypes.ImageCapture]: {
17785
- load: () => import('./ngx-t-forms-image-capture-input-element.component-lwp3IcDt.mjs').then(m => m.ImageCaptureInputElementComponent),
18909
+ load: () => import('./ngx-t-forms-image-capture-input-element.component-CoJTXMbL.mjs').then(m => m.ImageCaptureInputElementComponent),
17786
18910
  },
17787
18911
  [ElementTypes.Editor]: {
17788
- load: () => import('./ngx-t-forms-editor-input-element.component-CIELjDty.mjs').then(m => m.EditorInputElementComponent),
18912
+ load: () => import('./ngx-t-forms-editor-input-element.component-BGdZ4evj.mjs').then(m => m.EditorInputElementComponent),
17789
18913
  },
17790
18914
  [ElementTypes.Signature]: {
17791
18915
  load: () => Promise.resolve().then(function () { return signatureInputElement_component; }).then(m => m.SignatureInputElementComponent),
17792
18916
  },
17793
18917
  [ElementTypes.MultipleInput]: {
17794
18918
  builderAware: true,
17795
- load: () => import('./ngx-t-forms-multiple-input-input-element.component-hXWMRFjl.mjs').then(m => m.MultipleInputInputElementComponent),
18919
+ load: () => import('./ngx-t-forms-multiple-input-input-element.component-BrPJPR2R.mjs').then(m => m.MultipleInputInputElementComponent),
17796
18920
  },
17797
18921
  [ElementTypes.MscoaSelection]: {
17798
18922
  builderAware: true,
@@ -17800,14 +18924,14 @@ const ELEMENT_REGISTRY = {
17800
18924
  },
17801
18925
  [ElementTypes.WorkflowDocumentPicker]: {
17802
18926
  builderAware: true,
17803
- load: () => import('./ngx-t-forms-document-picker.component-DIqaaBSl.mjs').then(m => m.DocumentPickerComponent),
18927
+ load: () => import('./ngx-t-forms-document-picker.component-9clYsOcl.mjs').then(m => m.DocumentPickerComponent),
17804
18928
  },
17805
18929
  [ElementTypes.WorkflowAdjudication]: {
17806
18930
  builderAware: true,
17807
- load: () => import('./ngx-t-forms-workflow-adjudication.component-C1Em-g9e.mjs').then(m => m.WorkflowAdjudicationComponent),
18931
+ load: () => import('./ngx-t-forms-workflow-adjudication.component-Gkimmw-X.mjs').then(m => m.WorkflowAdjudicationComponent),
17808
18932
  },
17809
18933
  [ElementTypes.PaginatedSelectionTable]: {
17810
- load: () => import('./ngx-t-forms-paginated-selection-table-pYY2sWAb.mjs').then(m => m.PaginatedSelectionTable),
18934
+ load: () => import('./ngx-t-forms-paginated-selection-table-Bk77dBo9.mjs').then(m => m.PaginatedSelectionTable),
17811
18935
  },
17812
18936
  };
17813
18937
  /**
@@ -17815,7 +18939,7 @@ const ELEMENT_REGISTRY = {
17815
18939
  * `@default` switch branch (a basic input).
17816
18940
  */
17817
18941
  const FALLBACK_ELEMENT = {
17818
- load: () => import('./ngx-t-forms-basic-input-input-element.component-BJKe9wIA.mjs').then(m => m.BasicInputInputElementComponent),
18942
+ load: () => import('./ngx-t-forms-basic-input-input-element.component-CykKxWu0.mjs').then(m => m.BasicInputInputElementComponent),
17819
18943
  };
17820
18944
  /**
17821
18945
  * Resolves the renderer entry for a given element type, falling back to the
@@ -20607,9 +21731,9 @@ class MscoaChartComponent {
20607
21731
  }
20608
21732
  }
20609
21733
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: MscoaChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20610
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MscoaChartComponent, isStandalone: true, selector: "lib-mscoa-chart", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onContainerClick: "onContainerClick", interaction: "interaction" }, ngImport: i0, template: "@if ((viewData$ | async); as viewData) {\r\n<section\r\n (click)=\"setAsTouched($event)\"\r\n class=\"mscoa-chart__container\"\r\n [class.mscoa-chart__container--touched]=\"touched()\"\r\n role=\"region\"\r\n [attr.aria-label]=\"'MSCOA Account Chart'\"\r\n [attr.aria-busy]=\"viewData.loading || viewData.validatingValue\">\r\n\r\n @if (viewData.loading) {\r\n <div class=\"mscoa-chart__loading-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner [diameter]=\"40\"></mat-spinner>\r\n <span class=\"sr-only\">Loading account chart data...</span>\r\n </div>\r\n } @else {\r\n @defer () {\r\n @if (viewData.accountTreeKeys || viewData.cashAccountTreeKeys) {\r\n <div class=\"mscoa-chart__table-container\">\r\n @if (isDualAccountBasis) {\r\n <div class=\"dual-basis-container\" role=\"group\" aria-label=\"Dual accounting basis tables\">\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.ACCRUAL,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.CASH,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: config()?.accountingBasis,\r\n canCollapse: false,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #selectionTable\r\n let-accountingBasis=\"accountingBasis\"\r\n let-canCollapse=\"canCollapse\"\r\n let-viewData=\"viewData\">\r\n\r\n <div class=\"mscoa-chart-table\" role=\"group\" [attr.aria-label]=\"'Accounting basis: ' + (accountingBasis || 'Accrual')\">\r\n <!-- Toolbar -->\r\n <lib-mscoa-chart-toolbar\r\n [accountingBasis]=\"accountingBasis\"\r\n [canCollapse]=\"canCollapse\"\r\n [isExpanded]=\"getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n (toggleExpansion)=\"toggleDualBasisExpansion(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\">\r\n </lib-mscoa-chart-toolbar>\r\n\r\n @if (shouldShowTable(isDualAccountBasis, getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL), accountingBasis)) {\r\n <div class=\"account-selection-table-wrapper\">\r\n <div\r\n class=\"account-selection-table-container\"\r\n [class.account-selection-table-container--accrual]=\"!accountingBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL\"\r\n [class.account-selection-table-container--cash]=\"accountingBasis === ACCOUNTING_BASIS.CASH\"\r\n role=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\">\r\n\r\n <table\r\n mat-table\r\n [dataSource]=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashTableData : viewData.tableData\"\r\n [trackBy]=\"trackByRow\"\r\n class=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\"\r\n [attr.aria-describedby]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n role=\"table\">\r\n <span [id]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\" class=\"sr-only\">\r\n Use arrow keys to navigate between cells. Press Enter or Space to select an account.\r\n </span>\r\n\r\n @for (\r\n col of (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols);\r\n track trackByColumn($index, col);\r\n let i = $index\r\n ) {\r\n <ng-container [matColumnDef]=\"col\" [sticky]=\"i === 0\">\r\n <!-- Header Cell -->\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [class.table__header-cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__header-cell--regular]=\"!isSegmentColumn(i)\"\r\n [style.width.%]=\"getColumnWidthPercent(isSegmentColumn(i), (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols).length)\"\r\n [style.min-width.px]=\"isSegmentColumn(i) ? 150 : 200\"\r\n [attr.aria-sort]=\"i === 0 ? 'none' : null\"\r\n [attr.scope]=\"'col'\"\r\n [attr.aria-label]=\"getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) + ' column'\">\r\n {{ getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) | titlecase | unCamelCase }}\r\n </th>\r\n\r\n <!-- Data Cell -->\r\n <td\r\n mat-cell\r\n *matCellDef=\"let row\"\r\n [class.table__cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__cell--regular]=\"!isSegmentColumn(i)\"\r\n [class.table__cell--active]=\"editSelection?.segment === row['segment'] && activeColumn === col\"\r\n [class.table__cell--business-error]=\"!isSegmentColumn(i) && getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-label]=\"'Cell for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-selected]=\"!!row[col]\"\r\n [attr.aria-invalid]=\"!isSegmentColumn(i) && !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.role]=\"'gridcell'\"\r\n [attr.tabindex]=\"isSegmentColumn(i) ? -1 : (row[col] ? 0 : -1)\">\r\n\r\n @if (isSegmentColumn(i)) {\r\n <!-- Segment Column -->\r\n <div class=\"segment-cell-content\">\r\n @if (editorMode() && row.innerInput?.id) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerData]=\"{innerInput: row.innerInput}\"\r\n [matMenuTriggerFor]=\"inputMenu\"\r\n [matTooltip]=\"'Options for: ' + row.innerInput.label\"\r\n [attr.aria-label]=\"'Options menu for ' + row.innerInput.label\"\r\n (click)=\"$event.stopPropagation()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n }\r\n <span class=\"segment-cell-content__label\">{{ row['label'] }}</span>\r\n </div>\r\n } @else {\r\n <!-- Regular Column -->\r\n @if (row.innerInput?.id) {\r\n <!-- Custom-input row (peer of the segments): the value is entered inline via the\r\n input portal on the primary (debit) leg; other legs mirror it and render no\r\n control. `innerInput.id` is already the namespaced portal key, so it is looked\r\n up directly \u2014 prepending it again (getPortalKey) double-namespaces and misses. -->\r\n @if (col === COLUMNS.DEBIT && formGroup() && inputPortals[row.innerInput.id]) {\r\n <div class=\"portal-container\">\r\n <ng-template [cdkPortalOutlet]=\"inputPortals[row.innerInput.id]\"></ng-template>\r\n </div>\r\n }\r\n } @else {\r\n @if (row[col]) {\r\n <!-- Account Selected -->\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment']); as cellError) {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"row['singleSelect'] === true && col === COLUMNS.CREDIT\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected cell-button--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Business error: ' + cellError.message\"\r\n [attr.aria-invalid]=\"true\"\r\n [attr.aria-pressed]=\"true\"\r\n [matTooltip]=\"cellError.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag selected-acount-label--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n </div>\r\n </button>\r\n </div>\r\n } @else {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Press Enter or Space to change'\"\r\n [attr.aria-invalid]=\"false\"\r\n [attr.aria-disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-pressed]=\"true\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n @if (showValidationSuccessIndicators) {\r\n <mat-icon class=\"validated-indicator\" aria-hidden=\"true\" [matTooltip]=\"'Validated'\">shield</mat-icon>\r\n } @else {\r\n <mat-icon class=\"success-indicator\" aria-hidden=\"true\">check_circle</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n } @else {\r\n <!-- No Account Selected -->\r\n <div class=\"cell-button-wrapper\">\r\n <button\r\n [disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [color]=\"\"\r\n (click)=\"selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); $event.stopPropagation(); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n mat-button\r\n class=\"cell-button\"\r\n [class.cell-button--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-label]=\"shouldShowAutoSelectedLabel(row, col) ? 'Auto selected for ' + row['segment'] + ' segment, ' + col + ' column' : 'Select account for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-describedby]=\"getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ? 'hint-' + row['segment'] + '-' + col : null\"\r\n [attr.aria-invalid]=\"hasError(touched(), inputConfig().required || false, !!row[col]) || !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-required]=\"inputConfig().required && !row[col]\"\r\n [matTooltip]=\"getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])?.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label\"\r\n [class.selected-acount-label--error]=\"hasError(touched(), inputConfig().required || false, !!row[col])\"\r\n [class.selected-acount-label--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\">\r\n {{ (shouldShowAutoSelectedLabel(row, col) ? 'auto selected' : 'Select account') | unCamelCase }}\r\n @if (inputConfig().required && !row[col]) {\r\n <span class=\"required-indicator\" aria-label=\"Required field\">*</span>\r\n }\r\n </span>\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])) {\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n } @else if (shouldShowDropdownIcon(row, col)) {\r\n <mat-icon aria-hidden=\"true\">arrow_drop_down</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n @if (getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as hint) {\r\n <span\r\n class=\"inline-hint\"\r\n [id]=\"'hint-' + row['segment'] + '-' + col\"\r\n role=\"tooltip\"\r\n aria-live=\"polite\">\r\n {{ hint }}\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols)\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty State -->\r\n @if ((accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashAccountTreeKeys : viewData.accountTreeKeys).length === 0) {\r\n <section class=\"empty-state\" role=\"status\" aria-live=\"polite\">\r\n <mat-icon aria-hidden=\"true\">info</mat-icon>\r\n <span>\r\n No account segments are currently configured.\r\n Please configure account segments to proceed.\r\n </span>\r\n </section>\r\n }\r\n\r\n <!-- Success Messages (Temporary) -->\r\n @if ((successMessage$ | async); as successMessages) {\r\n @if (getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as msg) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ?? ''\"\r\n [type]=\"'info'\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n }\r\n\r\n <!-- Business Rule Errors (Temporary display, keeps error styling) -->\r\n @if ((viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []).length > 0) {\r\n <lib-mscoa-error-display\r\n [errors]=\"viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []\"\r\n type=\"error\"\r\n [context]=\"{ accountingBasis: accountingBasis || ACCOUNTING_BASIS.ACCRUAL }\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-error-display>\r\n }\r\n\r\n <!-- Temporary Contextual Hints -->\r\n @if (temporaryHintMessage) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"temporaryHintMessage\"\r\n [type]=\"temporaryHintType\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n\r\n <!-- Validation Hints (Context-Aware) -->\r\n @if (!touched() && inputConfig().required && !viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL]?.length && (!isDualAccountBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL || !accountingBasis)) {\r\n <div class=\"validation-hints\" role=\"region\" aria-label=\"Validation guidance\">\r\n <p class=\"validation-hints__title\">Guidance:</p>\r\n <ul class=\"validation-hints__list\">\r\n <li>Account combinations are validated automatically. Select accounts that belong to compatible reporting categories.</li>\r\n <li>Required fields are marked with an asterisk (*). Complete all required selections to proceed.</li>\r\n <li>Some fields may be automatically populated based on your selections to ensure consistency.</li>\r\n </ul>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n } @placeholder {\r\n <div class=\"loading-placeholder\" role=\"status\" aria-live=\"polite\">\r\n <p>Loading data...</p>\r\n </div>\r\n } @loading (minimum 100ms) {\r\n <div class=\"loading-spinner-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"40\"></mat-progress-spinner>\r\n <span class=\"sr-only\">Loading account chart...</span>\r\n </div>\r\n } @error {\r\n <div class=\"error-state\" role=\"alert\" aria-live=\"assertive\">\r\n <p>Error loading data. Please try again.</p>\r\n </div>\r\n }\r\n }\r\n</section>\r\n}\r\n\r\n<!-- Input Menu -->\r\n<mat-menu #inputMenu=\"matMenu\">\r\n <ng-template matMenuContent let-innerInput=\"innerInput\">\r\n <lib-mscoa-chart-input-menu\r\n [innerInput]=\"innerInput\"\r\n [countdownSeconds]=\"inputWillBeRemovedIn(innerInput.id)\"\r\n [hoveredId]=\"hoveredInputId\"\r\n (edit)=\"onInputMenuEdit($event)\"\r\n (delete)=\"onInputMenuDelete($event)\"\r\n (cancelDelete)=\"onInputMenuCancelDelete($event)\"\r\n (hoverStart)=\"onInputMenuHoverStart($event)\"\r\n (hoverEnd)=\"onInputMenuHoverEnd()\">\r\n </lib-mscoa-chart-input-menu>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["@charset \"UTF-8\";:host{--mscoa-chart-spacing-xs: 4px;--mscoa-chart-spacing-sm: 8px;--mscoa-chart-spacing-md: 16px;--mscoa-chart-spacing-lg: 24px;--mscoa-chart-spacing-xl: 32px;--mscoa-chart-border-radius: 4px;--mscoa-chart-transition: var(--lib-forms-duration-hover) var(--lib-forms-easing);--mscoa-chart-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--mscoa-chart-font-size-base: 14px;--mscoa-chart-line-height: 1.5;display:block;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height)}.mscoa-chart__container{padding:0;transition:background-color var(--mscoa-chart-transition);width:100%;max-width:100%;overflow-x:hidden;box-sizing:border-box}.mscoa-chart__loading-container{padding:var(--mscoa-chart-spacing-lg);display:flex;align-items:center;justify-content:center}.mscoa-chart__table-container{position:relative;width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;box-sizing:border-box}.dual-basis-container{display:flex;flex-direction:column;gap:var(--mscoa-chart-spacing-sm)}.dual-basis-container__item{flex:1}:host .single-base{gap:var(--mscoa-chart-spacing-sm);height:48px;font-size:.875em;font-weight:500;transition:background-color var(--mscoa-chart-transition)}:host .single-base--cash{background:var(--mat-sys-inverse-primary)}.account-selection-table-wrapper{position:relative;width:100%}.account-selection-table-container{border-radius:var(--mscoa-chart-border-radius);overflow-x:auto;overflow-y:visible;transition:border-color var(--mscoa-chart-transition);width:100%;max-width:100%;box-sizing:border-box;display:block}.account-selection-table-container--accrual{border:solid 1px var(--mat-sys-primary)}.account-selection-table-container--cash{border:solid 1px var(--mat-sys-inverse-primary)}.account-selection-table-container::-webkit-scrollbar{height:8px}.account-selection-table-container::-webkit-scrollbar-track{background:var(--lib-forms-surface-container-low);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb{background:var(--lib-forms-outline-variant);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb:hover{background:var(--lib-forms-outline)}.table{width:100%;table-layout:fixed;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);border-collapse:separate;border-spacing:0;display:table;box-sizing:border-box;max-width:100%}.table__header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.table__header-cell--segment{text-align:right;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px}.table__header-cell--regular{padding-left:var(--mscoa-chart-spacing-lg);min-width:200px;max-width:none}.table__cell{overflow:visible;box-sizing:border-box;position:relative;vertical-align:top}.table__cell--segment{background:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container));text-align:right;font-weight:500;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;vertical-align:middle}.table__cell--regular{padding:0;min-width:200px;max-width:none;word-wrap:break-word;vertical-align:top;overflow:visible}.table__cell--active{background-color:var(--mat-sys-primary-container);transition:background-color var(--mscoa-chart-transition)}mat-header-cell{background:var(--mat-sys-surface-container);font-weight:600;font-size:var(--mscoa-chart-font-size-base);padding:var(--mscoa-chart-spacing-md)}.mscoa-chart-table{display:flex;flex-direction:column}.portal-container{width:100%}.account-cell-wrapper{position:relative;width:100%;max-width:100%;overflow:visible;z-index:1;min-height:38px;display:flex;flex-direction:column;gap:4px}.cell-button-wrapper{position:relative;width:100%;max-width:100%;overflow:hidden}.cell-button{height:fit-content;min-height:38px;width:100%;max-width:100%;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);position:relative;overflow:visible;padding:8px}.cell-button:hover:not(:disabled){background-color:var(--mat-sys-surface-container);transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.cell-button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;z-index:1}.cell-button:disabled{opacity:.6;cursor:not-allowed}.cell-button--selected{background-color:transparent}.cell-button--selected:hover:not(:disabled){background-color:var(--lib-forms-surface-container-low);border-color:var(--lib-forms-primary)}.cell-button.cell-button--selected{animation:fadeInSuccess var(--mscoa-chart-transition)}.cell-button.cell-button--business-error{border-color:var(--lib-forms-error)}.cell-button.cell-button--business-error .selected-acount-label--business-error{color:var(--mat-sys-error);border-color:var(--mat-sys-error)}.success-indicator{color:var(--sem-success);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);animation:scaleIn var(--mscoa-chart-transition);flex-shrink:0}.validated-indicator{color:var(--lib-forms-primary);font-size:18px;width:18px;height:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0;animation:validatedShieldIn .3s ease-out forwards}.business-error-indicator{color:var(--lib-forms-error);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0}.required-indicator{color:var(--lib-forms-error);font-weight:600;margin-left:2px}.inline-hint{display:block;font-size:12px;color:var(--lib-forms-on-surface-variant);margin-top:var(--mscoa-chart-spacing-xs);padding:var(--mscoa-chart-spacing-xs) var(--mscoa-chart-spacing-sm);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);line-height:1.4;max-width:100%;word-wrap:break-word}.content{padding:0;display:flex;gap:6px;width:100%;max-width:100%;overflow:visible;min-width:0;flex-wrap:wrap;align-items:center}.selected-acount-label{text-align:left;flex:1;font-weight:400;transition:color var(--mscoa-chart-transition)}.selected-acount-label--error,.selected-acount-label--business-error{color:var(--mat-sys-error);font-weight:500}.selected-acount-label--tag{display:inline-block;padding:4px 10px;background-color:var(--lib-forms-primary-container);color:var(--lib-forms-on-primary-container);border-radius:16px;font-size:13px;font-weight:500;line-height:1.5;border:1px solid var(--lib-forms-primary);box-shadow:0 1px 2px #0000001a;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);width:100%;max-width:100%;overflow:visible;white-space:normal;word-wrap:break-word;word-break:break-word;cursor:pointer;box-sizing:border-box;position:relative}.selected-acount-label--tag:hover{background-color:var(--sem-info-surface);box-shadow:0 2px 4px #1976d226}.segment-cell-content{display:flex;align-items:center;justify-content:flex-end;font-weight:500}.vat-badge{display:inline-flex;align-items:center;justify-content:center;height:16px;padding:2px 6px;border-radius:8px;font-size:9px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;background-color:var(--sem-success-surface);color:var(--sem-warning);border:1px solid var(--lib-forms-outline-variant);box-shadow:none;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),border-color var(--lib-forms-duration-hover) var(--lib-forms-easing);flex-shrink:0;align-self:flex-start;margin-top:2px;line-height:1}.vat-badge:hover{background-color:var(--sem-warning-surface);border-color:var(--sem-warning)}.vat-chip-container{padding-left:var(--mscoa-chart-spacing-sm);padding-right:var(--mscoa-chart-spacing-sm);padding-bottom:var(--mscoa-chart-spacing-xs);margin-top:var(--mscoa-chart-spacing-xs)}.vat-chip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:4px 8px;border-radius:12px;font-size:11px;font-weight:600;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);box-shadow:0 1px 3px #0000001f}.vat-chip--applicable{background:linear-gradient(135deg,var(--sem-warning) 0%,var(--sem-warning) 100%);color:var(--lib-forms-on-primary);border:1px solid var(--sem-warning)}.vat-chip--applicable:hover{box-shadow:0 2px 6px #f57c004d;transform:translateY(-1px)}.vat-chip__icon{font-size:14px;width:14px;height:14px;opacity:.9}.vat-chip__text{font-size:11px;font-weight:600;letter-spacing:.3px}.info-box{display:flex;align-items:center;gap:var(--mscoa-chart-spacing-sm);padding:12px;background:var(--sem-info-surface);border-radius:var(--mscoa-chart-border-radius);margin-bottom:var(--mscoa-chart-spacing-md)}.info-icon{min-width:38px;margin:auto;margin-top:var(--mscoa-chart-spacing-sm)}.empty-state{padding:var(--mscoa-chart-spacing-md);text-align:center;display:flex;align-items:center;justify-content:center;gap:var(--mscoa-chart-spacing-sm);color:var(--mat-sys-on-surface-variant)}.validation-hints{margin-top:var(--mscoa-chart-spacing-md);padding:var(--mscoa-chart-spacing-md);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);border-left:4px solid var(--lib-forms-primary);box-shadow:0 1px 3px #00000014}.validation-hints__title{font-weight:600;font-size:var(--mscoa-chart-font-size-base);margin:0 0 var(--mscoa-chart-spacing-sm) 0;color:var(--lib-forms-on-surface);display:flex;align-items:center;gap:var(--mscoa-chart-spacing-xs)}.validation-hints__title:before{content:\"\\1f4a1\";font-size:16px}.validation-hints__list{margin:0;padding-left:var(--mscoa-chart-spacing-md);color:var(--lib-forms-on-surface-variant);font-size:13px;line-height:1.6}.validation-hints__list li{margin-bottom:var(--mscoa-chart-spacing-sm);position:relative}.validation-hints__list li::marker{color:var(--lib-forms-primary)}.validation-hints__list li:last-child{margin-bottom:0}mat-error{font-size:.75em;margin-top:var(--mscoa-chart-spacing-xs)}mat-error ul{margin:0;padding-left:var(--mscoa-chart-spacing-md)}mat-error li{margin-bottom:var(--mscoa-chart-spacing-xs)}.loading-placeholder{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-on-surface-variant)}.loading-spinner-container{display:flex;justify-content:center;align-items:center;height:256px}.error-state{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-error)}mat-panel-description{font-size:.875em;line-height:1.4}:host .main-expanse-content{background:var(--mat-sys-surface-container)}@media(max-width:768px){.dual-basis-container{gap:var(--mscoa-chart-spacing-md)}.cell-button{min-height:44px;font-size:15px;max-width:300px}.content{padding:var(--mscoa-chart-spacing-md)}.validation-hints{font-size:13px;padding:var(--mscoa-chart-spacing-sm)}.inline-hint{font-size:11px}}.cell-button:focus-visible,button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;outline-style:solid}@media(prefers-contrast:high){.cell-button{border:2px solid currentColor}.cell-button:focus-visible{outline-width:4px}.selected-acount-label--error{font-weight:600}}@media(prefers-reduced-motion:reduce){.cell-button,.success-indicator,.fade-in,.validated-indicator{animation:none;transition:none}}.table__cell--active{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}@media(prefers-contrast:high){.table__cell--active{background-color:var(--mat-sys-primary);color:var(--mat-sys-on-primary)}}.table__cell--business-error{background-color:var(--lib-forms-error-container);border-left:3px solid var(--lib-forms-error)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeInSuccess{0%{background-color:transparent}50%{background-color:var(--sem-success-surface)}to{background-color:var(--mat-sys-primary-container)}}@keyframes scaleIn{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes validatedShieldIn{0%{opacity:0;transform:scale(.6)}70%{opacity:1;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.fade-in{animation:fadeIn var(--mscoa-chart-transition)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.skeleton-loader{background:linear-gradient(90deg,var(--mat-sys-surface-container) 25%,var(--mat-sys-surface-container-high) 50%,var(--mat-sys-surface-container) 75%);background-size:200% 100%;animation:loading 1.5s ease-in-out infinite;border-radius:var(--mscoa-chart-border-radius)}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.skeleton-row{height:48px;margin-bottom:var(--mscoa-chart-spacing-xs)}.skeleton-cell{height:100%;margin-right:var(--mscoa-chart-spacing-md)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PortalModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i6$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "ngmodule", type: MatTableModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MscoaChartInputMenuComponent, selector: "lib-mscoa-chart-input-menu", inputs: ["innerInput", "countdownSeconds", "hoveredId"], outputs: ["edit", "delete", "cancelDelete", "hoverStart", "hoverEnd"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i3.NgTemplateOutlet, i4$2.CdkPortalOutlet, i2.MatButton, i2.MatIconButton, i3$1.MatIcon, i6$1.MatMenuTrigger, i5$1.MatTable, i5$1.MatHeaderCellDef, i5$1.MatHeaderRowDef, i5$1.MatColumnDef, i5$1.MatCellDef, i5$1.MatRowDef, i5$1.MatHeaderCell, i5$1.MatCell, i5$1.MatHeaderRow, i5$1.MatRow, i5.MatTooltip, import('./ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), i3.AsyncPipe, i3.TitleCasePipe, Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)]] }); }
21734
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: MscoaChartComponent, isStandalone: true, selector: "lib-mscoa-chart", inputs: { inputConfig: { classPropertyName: "inputConfig", publicName: "inputConfig", isSignal: true, isRequired: true, transformFunction: null }, editorMode: { classPropertyName: "editorMode", publicName: "editorMode", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, formBuilderFunctions: { classPropertyName: "formBuilderFunctions", publicName: "formBuilderFunctions", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onContainerClick: "onContainerClick", interaction: "interaction" }, ngImport: i0, template: "@if ((viewData$ | async); as viewData) {\r\n<section\r\n (click)=\"setAsTouched($event)\"\r\n class=\"mscoa-chart__container\"\r\n [class.mscoa-chart__container--touched]=\"touched()\"\r\n role=\"region\"\r\n [attr.aria-label]=\"'MSCOA Account Chart'\"\r\n [attr.aria-busy]=\"viewData.loading || viewData.validatingValue\">\r\n\r\n @if (viewData.loading) {\r\n <div class=\"mscoa-chart__loading-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-spinner [diameter]=\"40\"></mat-spinner>\r\n <span class=\"sr-only\">Loading account chart data...</span>\r\n </div>\r\n } @else {\r\n @defer () {\r\n @if (viewData.accountTreeKeys || viewData.cashAccountTreeKeys) {\r\n <div class=\"mscoa-chart__table-container\">\r\n @if (isDualAccountBasis) {\r\n <div class=\"dual-basis-container\" role=\"group\" aria-label=\"Dual accounting basis tables\">\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.ACCRUAL,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"dual-basis-container__item\">\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: ACCOUNTING_BASIS.CASH,\r\n canCollapse: true,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n </div>\r\n </div>\r\n } @else {\r\n <ng-container\r\n *ngTemplateOutlet=\"selectionTable;\r\n context: {\r\n accountingBasis: config()?.accountingBasis,\r\n canCollapse: false,\r\n viewData: viewData\r\n }\">\r\n </ng-container>\r\n }\r\n </div>\r\n }\r\n\r\n <ng-template\r\n #selectionTable\r\n let-accountingBasis=\"accountingBasis\"\r\n let-canCollapse=\"canCollapse\"\r\n let-viewData=\"viewData\">\r\n\r\n <div class=\"mscoa-chart-table\" role=\"group\" [attr.aria-label]=\"'Accounting basis: ' + (accountingBasis || 'Accrual')\">\r\n <!-- Toolbar -->\r\n <lib-mscoa-chart-toolbar\r\n [accountingBasis]=\"accountingBasis\"\r\n [canCollapse]=\"canCollapse\"\r\n [isExpanded]=\"getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n (toggleExpansion)=\"toggleDualBasisExpansion(accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\">\r\n </lib-mscoa-chart-toolbar>\r\n\r\n @if (shouldShowTable(isDualAccountBasis, getExpansionState(accountingBasis || ACCOUNTING_BASIS.ACCRUAL), accountingBasis)) {\r\n <div class=\"account-selection-table-wrapper\">\r\n <div\r\n class=\"account-selection-table-container\"\r\n [class.account-selection-table-container--accrual]=\"!accountingBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL\"\r\n [class.account-selection-table-container--cash]=\"accountingBasis === ACCOUNTING_BASIS.CASH\"\r\n role=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\">\r\n\r\n <table\r\n mat-table\r\n [dataSource]=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashTableData : viewData.tableData\"\r\n [trackBy]=\"trackByRow\"\r\n class=\"table\"\r\n [attr.aria-label]=\"'Account selection table for ' + (accountingBasis || 'Accrual') + ' basis'\"\r\n [attr.aria-describedby]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\"\r\n role=\"table\">\r\n <span [id]=\"'table-description-' + (accountingBasis || ACCOUNTING_BASIS.ACCRUAL)\" class=\"sr-only\">\r\n Use arrow keys to navigate between cells. Press Enter or Space to select an account.\r\n </span>\r\n\r\n @for (\r\n col of (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols);\r\n track trackByColumn($index, col);\r\n let i = $index\r\n ) {\r\n <ng-container [matColumnDef]=\"col\" [sticky]=\"i === 0\">\r\n <!-- Header Cell -->\r\n <th\r\n mat-header-cell\r\n *matHeaderCellDef\r\n [class.table__header-cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__header-cell--regular]=\"!isSegmentColumn(i)\"\r\n [style.width.%]=\"getColumnWidthPercent(isSegmentColumn(i), (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols).length)\"\r\n [style.min-width.px]=\"isSegmentColumn(i) ? 150 : 200\"\r\n [attr.aria-sort]=\"i === 0 ? 'none' : null\"\r\n [attr.scope]=\"'col'\"\r\n [attr.aria-label]=\"getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) + ' column'\">\r\n {{ getHeaderText(col, i, accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashHasMultiSelect : viewData.hasMultiSelect) | titlecase | unCamelCase }}\r\n </th>\r\n\r\n <!-- Data Cell -->\r\n <td\r\n mat-cell\r\n *matCellDef=\"let row\"\r\n [class.table__cell--segment]=\"isSegmentColumn(i)\"\r\n [class.table__cell--regular]=\"!isSegmentColumn(i)\"\r\n [class.table__cell--active]=\"editSelection?.segment === row['segment'] && activeColumn === col\"\r\n [class.table__cell--business-error]=\"!isSegmentColumn(i) && getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-label]=\"'Cell for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-selected]=\"!!row[col]\"\r\n [attr.aria-invalid]=\"!isSegmentColumn(i) && !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.role]=\"'gridcell'\"\r\n [attr.tabindex]=\"isSegmentColumn(i) ? -1 : (row[col] ? 0 : -1)\">\r\n\r\n @if (isSegmentColumn(i)) {\r\n <!-- Segment Column -->\r\n <div class=\"segment-cell-content\">\r\n @if (editorMode() && row.innerInput?.id) {\r\n <button\r\n mat-icon-button\r\n [matMenuTriggerData]=\"{innerInput: row.innerInput}\"\r\n [matMenuTriggerFor]=\"inputMenu\"\r\n [matTooltip]=\"'Options for: ' + row.innerInput.label\"\r\n [attr.aria-label]=\"'Options menu for ' + row.innerInput.label\"\r\n (click)=\"$event.stopPropagation()\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n }\r\n <span class=\"segment-cell-content__label\">{{ row['label'] }}</span>\r\n </div>\r\n } @else {\r\n <!-- Regular Column -->\r\n @if (row.innerInput?.id) {\r\n <!-- Custom-input row (peer of the segments): the value is entered inline via the\r\n input portal on the primary (debit) leg; other legs mirror it and render no\r\n control. `innerInput.id` is already the namespaced portal key, so it is looked\r\n up directly \u2014 prepending it again (getPortalKey) double-namespaces and misses. -->\r\n @if (col === COLUMNS.DEBIT && formGroup() && inputPortals[row.innerInput.id]) {\r\n <div class=\"portal-container\">\r\n <ng-template [cdkPortalOutlet]=\"inputPortals[row.innerInput.id]\"></ng-template>\r\n </div>\r\n }\r\n } @else {\r\n @if (row[col]) {\r\n <!-- Account Selected -->\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment']); as cellError) {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"row['singleSelect'] === true && col === COLUMNS.CREDIT\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected cell-button--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Business error: ' + cellError.message\"\r\n [attr.aria-invalid]=\"true\"\r\n [attr.aria-pressed]=\"true\"\r\n [matTooltip]=\"cellError.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag selected-acount-label--business-error\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n </div>\r\n </button>\r\n </div>\r\n } @else {\r\n <div class=\"account-cell-wrapper\"\r\n [class.account-cell-wrapper--expandable]=\"isTextTruncated(row[col] | unCamelCase)\">\r\n <button\r\n [disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n (mousedown)=\"$event.preventDefault(); $event.stopPropagation(); selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n color=\"primary\"\r\n mat-button\r\n class=\"cell-button cell-button--selected\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase) + ' for ' + row['segment'] + ' segment, ' + col + ' column. Press Enter or Space to change'\"\r\n [attr.aria-invalid]=\"false\"\r\n [attr.aria-disabled]=\"(row['singleSelect'] === true && col === COLUMNS.CREDIT) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-pressed]=\"true\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label selected-acount-label--tag\"\r\n [attr.aria-label]=\"'Selected account: ' + (row[col] | unCamelCase)\">\r\n {{ row[col] | unCamelCase }}\r\n @if (shouldShowVatChip(row, col)) {\r\n <span\r\n class=\"vat-badge\"\r\n [attr.aria-label]=\"'VAT applicable to ' + col + ' column'\"\r\n [matTooltip]=\"'VAT is applicable to this ' + col + ' account selection'\">\r\n VAT\r\n </span>\r\n }\r\n </span>\r\n @if (showValidationSuccessIndicators) {\r\n <mat-icon class=\"validated-indicator\" aria-hidden=\"true\" [matTooltip]=\"'Validated'\">shield</mat-icon>\r\n } @else {\r\n <mat-icon class=\"success-indicator\" aria-hidden=\"true\">check_circle</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n </div>\r\n }\r\n } @else {\r\n <!-- No Account Selected -->\r\n <div class=\"cell-button-wrapper\">\r\n <button\r\n [disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [color]=\"\"\r\n (click)=\"selectAccount(row, col, accountingBasis === ACCOUNTING_BASIS.CASH); $event.stopPropagation(); setAsTouched($event)\"\r\n (keydown)=\"handleCellKeyDown($event, row, col, accountingBasis === ACCOUNTING_BASIS.CASH)\"\r\n mat-button\r\n class=\"cell-button\"\r\n [class.cell-button--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-label]=\"shouldShowAutoSelectedLabel(row, col) ? 'Auto selected for ' + row['segment'] + ' segment, ' + col + ' column' : 'Select account for ' + row['segment'] + ' segment, ' + col + ' column'\"\r\n [attr.aria-disabled]=\"selectionDisabled(row, col) || isCellDisabledByBusinessErrors(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-describedby]=\"getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ? 'hint-' + row['segment'] + '-' + col : null\"\r\n [attr.aria-invalid]=\"hasError(touched(), inputConfig().required || false, !!row[col]) || !!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\"\r\n [attr.aria-required]=\"inputConfig().required && !row[col]\"\r\n [matTooltip]=\"getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])?.message\">\r\n <div class=\"content\">\r\n <span\r\n class=\"selected-acount-label\"\r\n [class.selected-acount-label--error]=\"hasError(touched(), inputConfig().required || false, !!row[col])\"\r\n [class.selected-acount-label--business-error]=\"!!getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])\">\r\n {{ (shouldShowAutoSelectedLabel(row, col) ? 'auto selected' : 'Select account') | unCamelCase }}\r\n @if (inputConfig().required && !row[col]) {\r\n <span class=\"required-indicator\" aria-label=\"Required field\">*</span>\r\n }\r\n </span>\r\n @if (getCellBusinessError(viewData.validationErrors, accountingBasis || ACCOUNTING_BASIS.ACCRUAL, col, row['segment'])) {\r\n <mat-icon class=\"business-error-indicator\" aria-hidden=\"true\">error</mat-icon>\r\n } @else if (shouldShowDropdownIcon(row, col)) {\r\n <mat-icon aria-hidden=\"true\">arrow_drop_down</mat-icon>\r\n }\r\n </div>\r\n </button>\r\n @if (getValidationHint(row, col, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as hint) {\r\n <span\r\n class=\"inline-hint\"\r\n [id]=\"'hint-' + row['segment'] + '-' + col\"\r\n role=\"tooltip\"\r\n aria-live=\"polite\">\r\n {{ hint }}\r\n </span>\r\n }\r\n </div>\r\n }\r\n }\r\n }\r\n </td>\r\n </ng-container>\r\n }\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: (accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashCols : viewData.cols)\"></tr>\r\n </table>\r\n </div>\r\n </div>\r\n\r\n <!-- Empty State -->\r\n @if ((accountingBasis === ACCOUNTING_BASIS.CASH ? viewData.cashAccountTreeKeys : viewData.accountTreeKeys).length === 0) {\r\n <section class=\"empty-state\" role=\"status\" aria-live=\"polite\">\r\n <mat-icon aria-hidden=\"true\">info</mat-icon>\r\n <span>\r\n No account segments are currently configured.\r\n Please configure account segments to proceed.\r\n </span>\r\n </section>\r\n }\r\n\r\n <!-- Success Messages (Temporary) -->\r\n @if ((successMessage$ | async); as successMessages) {\r\n @if (getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL); as msg) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"getSuccessMessage(successMessages, accountingBasis || ACCOUNTING_BASIS.ACCRUAL) ?? ''\"\r\n [type]=\"'info'\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n }\r\n\r\n <!-- Business Rule Errors (Temporary display, keeps error styling) -->\r\n @if ((viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []).length > 0) {\r\n <lib-mscoa-error-display\r\n [errors]=\"viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL] || []\"\r\n type=\"error\"\r\n [context]=\"{ accountingBasis: accountingBasis || ACCOUNTING_BASIS.ACCRUAL }\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-error-display>\r\n }\r\n\r\n <!-- Temporary Contextual Hints -->\r\n @if (temporaryHintMessage) {\r\n <lib-mscoa-temporary-hint\r\n [message]=\"temporaryHintMessage\"\r\n [type]=\"temporaryHintType\"\r\n [duration]=\"6000\"\r\n [showDismiss]=\"true\">\r\n </lib-mscoa-temporary-hint>\r\n }\r\n\r\n <!-- Validation Hints (Context-Aware) -->\r\n @if (!touched() && inputConfig().required && !viewData.busnessRuleErrors[accountingBasis || ACCOUNTING_BASIS.ACCRUAL]?.length && (!isDualAccountBasis || accountingBasis === ACCOUNTING_BASIS.ACCRUAL || !accountingBasis)) {\r\n <div class=\"validation-hints\" role=\"region\" aria-label=\"Validation guidance\">\r\n <p class=\"validation-hints__title\">Guidance:</p>\r\n <ul class=\"validation-hints__list\">\r\n <li>Account combinations are validated automatically. Select accounts that belong to compatible reporting categories.</li>\r\n <li>Required fields are marked with an asterisk (*). Complete all required selections to proceed.</li>\r\n <li>Some fields may be automatically populated based on your selections to ensure consistency.</li>\r\n </ul>\r\n </div>\r\n }\r\n }\r\n </div>\r\n </ng-template>\r\n } @placeholder {\r\n <div class=\"loading-placeholder\" role=\"status\" aria-live=\"polite\">\r\n <p>Loading data...</p>\r\n </div>\r\n } @loading (minimum 100ms) {\r\n <div class=\"loading-spinner-container\" role=\"status\" aria-live=\"polite\">\r\n <mat-progress-spinner mode=\"indeterminate\" [diameter]=\"40\"></mat-progress-spinner>\r\n <span class=\"sr-only\">Loading account chart...</span>\r\n </div>\r\n } @error {\r\n <div class=\"error-state\" role=\"alert\" aria-live=\"assertive\">\r\n <p>Error loading data. Please try again.</p>\r\n </div>\r\n }\r\n }\r\n</section>\r\n}\r\n\r\n<!-- Input Menu -->\r\n<mat-menu #inputMenu=\"matMenu\">\r\n <ng-template matMenuContent let-innerInput=\"innerInput\">\r\n <lib-mscoa-chart-input-menu\r\n [innerInput]=\"innerInput\"\r\n [countdownSeconds]=\"inputWillBeRemovedIn(innerInput.id)\"\r\n [hoveredId]=\"hoveredInputId\"\r\n (edit)=\"onInputMenuEdit($event)\"\r\n (delete)=\"onInputMenuDelete($event)\"\r\n (cancelDelete)=\"onInputMenuCancelDelete($event)\"\r\n (hoverStart)=\"onInputMenuHoverStart($event)\"\r\n (hoverEnd)=\"onInputMenuHoverEnd()\">\r\n </lib-mscoa-chart-input-menu>\r\n </ng-template>\r\n</mat-menu>\r\n", styles: ["@charset \"UTF-8\";:host{--mscoa-chart-spacing-xs: 4px;--mscoa-chart-spacing-sm: 8px;--mscoa-chart-spacing-md: 16px;--mscoa-chart-spacing-lg: 24px;--mscoa-chart-spacing-xl: 32px;--mscoa-chart-border-radius: 4px;--mscoa-chart-transition: var(--lib-forms-duration-hover) var(--lib-forms-easing);--mscoa-chart-font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;--mscoa-chart-font-size-base: 14px;--mscoa-chart-line-height: 1.5;display:block;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height)}.mscoa-chart__container{padding:0;transition:background-color var(--mscoa-chart-transition);width:100%;max-width:100%;overflow-x:hidden;box-sizing:border-box}.mscoa-chart__loading-container{padding:var(--mscoa-chart-spacing-lg);display:flex;align-items:center;justify-content:center}.mscoa-chart__table-container{position:relative;width:100%;max-width:100%;overflow-x:auto;overflow-y:visible;box-sizing:border-box}.dual-basis-container{display:flex;flex-direction:column;gap:var(--mscoa-chart-spacing-sm)}.dual-basis-container__item{flex:1}:host .single-base{gap:var(--mscoa-chart-spacing-sm);height:48px;font-size:.875em;font-weight:500;transition:background-color var(--mscoa-chart-transition)}:host .single-base--cash{background:var(--mat-sys-inverse-primary)}.account-selection-table-wrapper{position:relative;width:100%}.account-selection-table-container{border-radius:var(--mscoa-chart-border-radius);overflow-x:auto;overflow-y:visible;transition:border-color var(--mscoa-chart-transition);width:100%;max-width:100%;box-sizing:border-box;display:block}.account-selection-table-container--accrual{border:solid 1px var(--mat-sys-primary)}.account-selection-table-container--cash{border:solid 1px var(--mat-sys-inverse-primary)}.account-selection-table-container::-webkit-scrollbar{height:8px}.account-selection-table-container::-webkit-scrollbar-track{background:var(--lib-forms-surface-container-low);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb{background:var(--lib-forms-outline-variant);border-radius:4px}.account-selection-table-container::-webkit-scrollbar-thumb:hover{background:var(--lib-forms-outline)}.table{width:100%;table-layout:fixed;font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);border-collapse:separate;border-spacing:0;display:table;box-sizing:border-box;max-width:100%}.table__header-cell{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;box-sizing:border-box}.table__header-cell--segment{text-align:right;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px}.table__header-cell--regular{padding-left:var(--mscoa-chart-spacing-lg);min-width:200px;max-width:none}.table__cell{overflow:visible;box-sizing:border-box;position:relative;vertical-align:top}.table__cell--segment{background:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container));text-align:right;font-weight:500;padding-right:var(--mscoa-chart-spacing-md);min-width:150px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;vertical-align:middle}.table__cell--regular{padding:0;min-width:200px;max-width:none;word-wrap:break-word;vertical-align:top;overflow:visible}.table__cell--active{background-color:var(--mat-sys-primary-container);transition:background-color var(--mscoa-chart-transition)}mat-header-cell{background:var(--mat-sys-surface-container);font-weight:600;font-size:var(--mscoa-chart-font-size-base);padding:var(--mscoa-chart-spacing-md)}.mscoa-chart-table{display:flex;flex-direction:column}.portal-container{width:100%}.account-cell-wrapper{position:relative;width:100%;max-width:100%;overflow:visible;z-index:1;min-height:38px;display:flex;flex-direction:column;gap:4px}.cell-button-wrapper{position:relative;width:100%;max-width:100%;overflow:hidden}.cell-button{height:fit-content;min-height:38px;width:100%;max-width:100%;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);font-family:var(--mscoa-chart-font-family);font-size:var(--mscoa-chart-font-size-base);line-height:var(--mscoa-chart-line-height);position:relative;overflow:visible;padding:8px}.cell-button:hover:not(:disabled){background-color:var(--mat-sys-surface-container);transform:translateY(-1px);box-shadow:0 2px 4px #0000001a}.cell-button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;z-index:1}.cell-button:disabled{opacity:.6;cursor:not-allowed}.cell-button--selected{background-color:transparent}.cell-button--selected:hover:not(:disabled){background-color:var(--lib-forms-surface-container-low);border-color:var(--lib-forms-primary)}.cell-button.cell-button--selected{animation:fadeInSuccess var(--mscoa-chart-transition)}.cell-button.cell-button--business-error{border-color:var(--lib-forms-error)}.cell-button.cell-button--business-error .selected-acount-label--business-error{color:var(--mat-sys-error);border-color:var(--mat-sys-error)}.success-indicator{color:var(--sem-success);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);animation:scaleIn var(--mscoa-chart-transition);flex-shrink:0}.validated-indicator{color:var(--lib-forms-primary);font-size:18px;width:18px;height:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0;animation:validatedShieldIn .3s ease-out forwards}.business-error-indicator{color:var(--lib-forms-error);font-size:18px;width:18px;right:-8px;top:-4px;background:var(--lib-forms-surface);border-radius:16px;position:absolute;height:18px;margin-left:var(--mscoa-chart-spacing-xs);flex-shrink:0}.required-indicator{color:var(--lib-forms-error);font-weight:600;margin-left:2px}.inline-hint{display:block;font-size:12px;color:var(--lib-forms-on-surface-variant);margin-top:var(--mscoa-chart-spacing-xs);padding:var(--mscoa-chart-spacing-xs) var(--mscoa-chart-spacing-sm);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);line-height:1.4;max-width:100%;word-wrap:break-word}.content{padding:0;display:flex;gap:6px;width:100%;max-width:100%;overflow:visible;min-width:0;flex-wrap:wrap;align-items:center}.selected-acount-label{text-align:left;flex:1;font-weight:400;transition:color var(--mscoa-chart-transition)}.selected-acount-label--error,.selected-acount-label--business-error{color:var(--mat-sys-error);font-weight:500}.selected-acount-label--tag{display:inline-block;padding:4px 10px;background-color:var(--lib-forms-primary-container);color:var(--lib-forms-on-primary-container);border-radius:16px;font-size:13px;font-weight:500;line-height:1.5;border:1px solid var(--lib-forms-primary);box-shadow:0 1px 2px #0000001a;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing);width:100%;max-width:100%;overflow:visible;white-space:normal;word-wrap:break-word;word-break:break-word;cursor:pointer;box-sizing:border-box;position:relative}.selected-acount-label--tag:hover{background-color:var(--sem-info-surface);box-shadow:0 2px 4px #1976d226}.segment-cell-content{display:flex;align-items:center;justify-content:flex-end;font-weight:500}.vat-badge{display:inline-flex;align-items:center;justify-content:center;height:16px;padding:2px 6px;border-radius:8px;font-size:9px;font-weight:600;letter-spacing:.5px;text-transform:uppercase;background-color:var(--sem-success-surface);color:var(--sem-warning);border:1px solid var(--lib-forms-outline-variant);box-shadow:none;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),border-color var(--lib-forms-duration-hover) var(--lib-forms-easing);flex-shrink:0;align-self:flex-start;margin-top:2px;line-height:1}.vat-badge:hover{background-color:var(--sem-warning-surface);border-color:var(--sem-warning)}.vat-chip-container{padding-left:var(--mscoa-chart-spacing-sm);padding-right:var(--mscoa-chart-spacing-sm);padding-bottom:var(--mscoa-chart-spacing-xs);margin-top:var(--mscoa-chart-spacing-xs)}.vat-chip{display:inline-flex;align-items:center;gap:4px;height:24px;padding:4px 8px;border-radius:12px;font-size:11px;font-weight:600;transition:background-color var(--lib-forms-duration-hover) var(--lib-forms-easing),box-shadow var(--lib-forms-duration-hover) var(--lib-forms-easing),transform var(--lib-forms-duration-hover) var(--lib-forms-easing);box-shadow:0 1px 3px #0000001f}.vat-chip--applicable{background:linear-gradient(135deg,var(--sem-warning) 0%,var(--sem-warning) 100%);color:var(--lib-forms-on-primary);border:1px solid var(--sem-warning)}.vat-chip--applicable:hover{box-shadow:0 2px 6px #f57c004d;transform:translateY(-1px)}.vat-chip__icon{font-size:14px;width:14px;height:14px;opacity:.9}.vat-chip__text{font-size:11px;font-weight:600;letter-spacing:.3px}.info-box{display:flex;align-items:center;gap:var(--mscoa-chart-spacing-sm);padding:12px;background:var(--sem-info-surface);border-radius:var(--mscoa-chart-border-radius);margin-bottom:var(--mscoa-chart-spacing-md)}.info-icon{min-width:38px;margin:auto;margin-top:var(--mscoa-chart-spacing-sm)}.empty-state{padding:var(--mscoa-chart-spacing-md);text-align:center;display:flex;align-items:center;justify-content:center;gap:var(--mscoa-chart-spacing-sm);color:var(--mat-sys-on-surface-variant)}.validation-hints{margin-top:var(--mscoa-chart-spacing-md);padding:var(--mscoa-chart-spacing-md);background-color:var(--lib-forms-surface-container-low);border-radius:var(--mscoa-chart-border-radius);border-left:4px solid var(--lib-forms-primary);box-shadow:0 1px 3px #00000014}.validation-hints__title{font-weight:600;font-size:var(--mscoa-chart-font-size-base);margin:0 0 var(--mscoa-chart-spacing-sm) 0;color:var(--lib-forms-on-surface);display:flex;align-items:center;gap:var(--mscoa-chart-spacing-xs)}.validation-hints__title:before{content:\"\\1f4a1\";font-size:16px}.validation-hints__list{margin:0;padding-left:var(--mscoa-chart-spacing-md);color:var(--lib-forms-on-surface-variant);font-size:13px;line-height:1.6}.validation-hints__list li{margin-bottom:var(--mscoa-chart-spacing-sm);position:relative}.validation-hints__list li::marker{color:var(--lib-forms-primary)}.validation-hints__list li:last-child{margin-bottom:0}mat-error{font-size:.75em;margin-top:var(--mscoa-chart-spacing-xs)}mat-error ul{margin:0;padding-left:var(--mscoa-chart-spacing-md)}mat-error li{margin-bottom:var(--mscoa-chart-spacing-xs)}.loading-placeholder{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-on-surface-variant)}.loading-spinner-container{display:flex;justify-content:center;align-items:center;height:256px}.error-state{padding:var(--mscoa-chart-spacing-md);color:var(--mat-sys-error)}mat-panel-description{font-size:.875em;line-height:1.4}:host .main-expanse-content{background:var(--mat-sys-surface-container)}@media(max-width:768px){.dual-basis-container{gap:var(--mscoa-chart-spacing-md)}.cell-button{min-height:44px;font-size:15px;max-width:300px}.content{padding:var(--mscoa-chart-spacing-md)}.validation-hints{font-size:13px;padding:var(--mscoa-chart-spacing-sm)}.inline-hint{font-size:11px}}.cell-button:focus-visible,button:focus-visible{outline:3px solid var(--mat-sys-primary);outline-offset:2px;outline-style:solid}@media(prefers-contrast:high){.cell-button{border:2px solid currentColor}.cell-button:focus-visible{outline-width:4px}.selected-acount-label--error{font-weight:600}}@media(prefers-reduced-motion:reduce){.cell-button,.success-indicator,.fade-in,.validated-indicator{animation:none;transition:none}}.table__cell--active{background-color:var(--mat-sys-primary-container);color:var(--mat-sys-on-primary-container)}@media(prefers-contrast:high){.table__cell--active{background-color:var(--mat-sys-primary);color:var(--mat-sys-on-primary)}}.table__cell--business-error{background-color:var(--lib-forms-error-container);border-left:3px solid var(--lib-forms-error)}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeInSuccess{0%{background-color:transparent}50%{background-color:var(--sem-success-surface)}to{background-color:var(--mat-sys-primary-container)}}@keyframes scaleIn{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes validatedShieldIn{0%{opacity:0;transform:scale(.6)}70%{opacity:1;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.fade-in{animation:fadeIn var(--mscoa-chart-transition)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.skeleton-loader{background:linear-gradient(90deg,var(--mat-sys-surface-container) 25%,var(--mat-sys-surface-container-high) 50%,var(--mat-sys-surface-container) 75%);background-size:200% 100%;animation:loading 1.5s ease-in-out infinite;border-radius:var(--mscoa-chart-border-radius)}@keyframes loading{0%{background-position:200% 0}to{background-position:-200% 0}}.skeleton-row{height:48px;margin-bottom:var(--mscoa-chart-spacing-xs)}.skeleton-cell{height:100%;margin-right:var(--mscoa-chart-spacing-md)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: PortalModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "ngmodule", type: MatDialogModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i6$1.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "directive", type: i6$1.MatMenuContent, selector: "ng-template[matMenuContent]" }, { kind: "ngmodule", type: MatTableModule }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: MscoaChartInputMenuComponent, selector: "lib-mscoa-chart-input-menu", inputs: ["innerInput", "countdownSeconds", "hoveredId"], outputs: ["edit", "delete", "cancelDelete", "hoverStart", "hoverEnd"] }, { kind: "pipe", type: i3.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, deferBlockDependencies: [() => [i3.NgTemplateOutlet, i4$2.CdkPortalOutlet, i2.MatButton, i2.MatIconButton, i3$1.MatIcon, i6$1.MatMenuTrigger, i5$1.MatTable, i5$1.MatHeaderCellDef, i5$1.MatHeaderRowDef, i5$1.MatColumnDef, i5$1.MatCellDef, i5$1.MatRowDef, i5$1.MatHeaderCell, i5$1.MatCell, i5$1.MatHeaderRow, i5$1.MatRow, i5.MatTooltip, import('./ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), i3.AsyncPipe, i3.TitleCasePipe, Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)]] }); }
20611
21735
  }
20612
- i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: MscoaChartComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-mscoa-chart-toolbar.component-Dni_bv_G.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)], resolveMetadata: (MscoaChartToolbarComponent, MscoaErrorDisplayComponent, MscoaTemporaryHintComponent, ConvertCamelCasePipe) => ({ decorators: [{
21736
+ i0.ɵɵngDeclareClassMetadataAsync({ minVersion: "18.0.0", version: "21.2.12", ngImport: i0, type: MscoaChartComponent, resolveDeferredDeps: () => [import('./ngx-t-forms-mscoa-chart-toolbar.component-BJrOTRuQ.mjs').then(m => m.MscoaChartToolbarComponent), import('./ngx-t-forms-mscoa-error-display.component-BDPi6w2E.mjs').then(m => m.MscoaErrorDisplayComponent), import('./ngx-t-forms-mscoa-temporary-hint.component-g7DosiVb.mjs').then(m => m.MscoaTemporaryHintComponent), Promise.resolve().then(function () { return daysAgo_pipe; }).then(m => m.ConvertCamelCasePipe)], resolveMetadata: (MscoaChartToolbarComponent, MscoaErrorDisplayComponent, MscoaTemporaryHintComponent, ConvertCamelCasePipe) => ({ decorators: [{
20613
21737
  type: Component,
20614
21738
  args: [{ selector: 'lib-mscoa-chart', imports: [
20615
21739
  CommonModule,
@@ -21348,101 +22472,6 @@ const SignatureConfigOptions = {
21348
22472
  }
21349
22473
  };
21350
22474
 
21351
- const ITERATIONS = 100000;
21352
- const KEY_LENGTH = 32;
21353
- async function encrypt(value, secret) {
21354
- if (!value || !secret)
21355
- throw new Error('Missing required parameters');
21356
- try {
21357
- const salt = crypto.getRandomValues(new Uint8Array(16));
21358
- const iv = crypto.getRandomValues(new Uint8Array(16));
21359
- const saltWords = CryptoJS.lib.WordArray.create(salt);
21360
- const ivWords = CryptoJS.lib.WordArray.create(iv);
21361
- const key = CryptoJS.PBKDF2(secret, saltWords, {
21362
- keySize: KEY_LENGTH / 4,
21363
- iterations: ITERATIONS,
21364
- hasher: CryptoJS.algo.SHA256
21365
- });
21366
- // Convert input to WordArray
21367
- const messageWords = CryptoJS.enc.Utf8.parse(value);
21368
- const encrypted = CryptoJS.AES.encrypt(messageWords, key, {
21369
- iv: ivWords,
21370
- mode: CryptoJS.mode.CBC,
21371
- padding: CryptoJS.pad.Pkcs7
21372
- });
21373
- const hmac = CryptoJS.HmacSHA256(encrypted.ciphertext.toString(), key);
21374
- return {
21375
- ciphertext: CryptoJS.enc.Base64.stringify(encrypted.ciphertext),
21376
- salt: CryptoJS.enc.Base64.stringify(saltWords),
21377
- iv: CryptoJS.enc.Base64.stringify(ivWords),
21378
- hmac: hmac.toString(CryptoJS.enc.Base64)
21379
- };
21380
- }
21381
- catch (error) {
21382
- throw error;
21383
- }
21384
- }
21385
- async function decrypt(encrypted, secret) {
21386
- if (!encrypted || !encrypted.salt || !secret || typeof encrypted.iv !== 'string' || typeof encrypted.salt !== 'string') {
21387
- throw new Error('Encrypted data is missing or corrupt');
21388
- }
21389
- try {
21390
- const salt = CryptoJS.enc.Base64.parse(encrypted.salt);
21391
- const iv = CryptoJS.enc.Base64.parse(encrypted.iv);
21392
- const ciphertext = CryptoJS.enc.Base64.parse(encrypted.ciphertext);
21393
- const key = CryptoJS.PBKDF2(secret, salt, {
21394
- keySize: KEY_LENGTH / 4,
21395
- iterations: ITERATIONS,
21396
- hasher: CryptoJS.algo.SHA256
21397
- });
21398
- const computedHmac = CryptoJS.HmacSHA256(ciphertext.toString(), key)
21399
- .toString(CryptoJS.enc.Base64);
21400
- if (computedHmac !== encrypted.hmac) {
21401
- throw new Error('Invalid HMAC - data may be tampered');
21402
- }
21403
- const decrypted = CryptoJS.AES.decrypt(CryptoJS.lib.CipherParams.create({
21404
- ciphertext: ciphertext
21405
- }), key, {
21406
- iv: iv,
21407
- mode: CryptoJS.mode.CBC,
21408
- padding: CryptoJS.pad.Pkcs7
21409
- });
21410
- return decrypted.toString(CryptoJS.enc.Utf8);
21411
- }
21412
- catch (error) {
21413
- throw error;
21414
- }
21415
- }
21416
-
21417
- // `crypto-js` is CommonJS — destructure from the default export rather than using
21418
- // named ESM imports, so Node ESM consumers (SSR, smoke harness) resolve cleanly.
21419
- const { HmacSHA256, enc } = CryptoJS;
21420
- /**
21421
- * Derives a deterministic 32-char HMAC key for a given form input, salted by
21422
- * the consumer-supplied secret. The secret must be configured via
21423
- * `withInputSecret()` and read from `INPUT_SECRET_TOKEN` at the callsite —
21424
- * this function does not (and cannot, as a free helper) inject it itself.
21425
- *
21426
- * @param input Input descriptor; its identity fields seed the primary digest.
21427
- * @param secret Consumer-supplied HMAC secret. Throws if missing.
21428
- */
21429
- const generateSecretKey = async (input, secret) => {
21430
- if (!input) {
21431
- throw new Error('Input is required to generate secret key');
21432
- }
21433
- if (!secret) {
21434
- throw new Error('[ngx-t-forms] generateSecretKey: secret is required. Configure it via withInputSecret() and inject INPUT_SECRET_TOKEN at the callsite.');
21435
- }
21436
- const { id, element, formControlName, sectionId } = input;
21437
- const pepper = 'NGX_T_FORMS_V1';
21438
- const timestamp = new Date().getTimezoneOffset();
21439
- const primarySeed = `${id}:${formControlName}:${element}:${sectionId}`;
21440
- const enrichedSeed = `${pepper}:${primarySeed}:${timestamp}`;
21441
- const firstHash = HmacSHA256(enrichedSeed, secret);
21442
- const secondHash = HmacSHA256(firstHash.toString(), secret + pepper);
21443
- return secondHash.toString(enc.Hex).substring(0, 32);
21444
- };
21445
-
21446
22475
  const customInputConfig = {
21447
22476
  controlType: 'lib-signature-pad-input',
21448
22477
  nextId: 0,
@@ -23278,6 +24307,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
23278
24307
  args: [{ selector: 'lib-error-list', imports: [MatIconModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: { 'class': 'lib-error-list' }, template: "@if ((errors() || []).length) {\r\n<ul class=\"lib-error-list__list\" role=\"alert\">\r\n @for (error of errors() || []; track $index) {\r\n <li class=\"lib-error-list__item\">\r\n <mat-icon class=\"lib-error-list__icon\">error</mat-icon>\r\n <span>{{ error.message }}</span>\r\n </li>\r\n }\r\n</ul>\r\n}\r\n", styles: [":host{display:block}.lib-error-list__list{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.25rem}.lib-error-list__item{display:flex;align-items:center;gap:.5rem;font-size:.75rem;line-height:1.4;color:var(--lib-forms-error)}.lib-error-list__icon{flex:none;width:1rem;height:1rem;font-size:1rem}\n"] }]
23279
24308
  }], propDecorators: { errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
23280
24309
 
24310
+ /**
24311
+ * One cached fetch of the Postman collection per `(url, key)` pair, shared by
24312
+ * every editor that needs it (the endpoint picker, the access-rules `_id`
24313
+ * resolution, the composite endpoint editor).
24314
+ *
24315
+ * Before this service each consumer issued its own `HttpClient` GET — opening
24316
+ * the response-mapping panel re-downloaded the entire collection just to
24317
+ * resolve one endpoint id. The stream is `shareReplay(1)`-cached for the
24318
+ * session; a failed fetch evicts its cache entry so the next call retries
24319
+ * instead of replaying the error forever.
24320
+ *
24321
+ * Internal to the editor tree — not part of the public API. Config-free, so
24322
+ * `providedIn: 'root'` per the library checklist.
24323
+ */
24324
+ class PostmanCollectionLoaderService {
24325
+ #http = inject(HttpClient);
24326
+ #cache = new Map();
24327
+ /**
24328
+ * Fetches (or replays) the collection behind `config`.
24329
+ *
24330
+ * @param config - The collection URL + API key from the host's token config.
24331
+ * @returns A replayed stream of the collection document.
24332
+ */
24333
+ getCollection(config) {
24334
+ const key = `${config.collectionUrl}::${config.collectionKey}`;
24335
+ let stream = this.#cache.get(key);
24336
+ if (!stream) {
24337
+ stream = this.#http
24338
+ .get(config.collectionUrl, {
24339
+ params: { apikey: config.collectionKey, clearSystemHeaders: 'true' },
24340
+ headers: { 'Content-Type': 'application/json' },
24341
+ })
24342
+ .pipe(
24343
+ // An error must not be cached: evict so the next caller retries.
24344
+ catchError((err) => {
24345
+ this.#cache.delete(key);
24346
+ return throwError(() => err);
24347
+ }), shareReplay$1({ bufferSize: 1, refCount: false }));
24348
+ this.#cache.set(key, stream);
24349
+ }
24350
+ return stream;
24351
+ }
24352
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PostmanCollectionLoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
24353
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PostmanCollectionLoaderService, providedIn: 'root' }); }
24354
+ }
24355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: PostmanCollectionLoaderService, decorators: [{
24356
+ type: Injectable,
24357
+ args: [{ providedIn: 'root' }]
24358
+ }] });
24359
+
23281
24360
  function convertPostmanFolderItemsToTree(obj, parentPath = []) {
23282
24361
  if (!obj) {
23283
24362
  return [];
@@ -23338,6 +24417,20 @@ class ApiValueAccessRulesComponent {
23338
24417
  this.mapToData = input(undefined, ...(ngDevMode ? [{ debugName: "mapToData" }] : /* istanbul ignore next */ []));
23339
24418
  /** Postman collection source to load available requests from. */
23340
24419
  this.postmanCollectionConfig = input(undefined, ...(ngDevMode ? [{ debugName: "postmanCollectionConfig" }] : /* istanbul ignore next */ []));
24420
+ /**
24421
+ * A freshly-fetched response supplied by the host (the endpoint dialog's
24422
+ * "Run API call"). When set it overrides the Postman item's saved sample as
24423
+ * the mapping tree's data — the same override channel the internal Data Sync
24424
+ * run uses. `undefined` keeps the Postman sample.
24425
+ */
24426
+ this.liveResponse = input(undefined, ...(ngDevMode ? [{ debugName: "liveResponse" }] : /* istanbul ignore next */ []));
24427
+ /**
24428
+ * Shows the internal Value Mapping / Data Sync mode toggle. A host that runs
24429
+ * refreshes itself (the endpoint dialog, whose Run button sends the
24430
+ * CONFIGURED request) passes `false` so there is exactly one way to refresh.
24431
+ * Standalone hosts keep the built-in sync mode.
24432
+ */
24433
+ this.showSync = input(true, ...(ngDevMode ? [{ debugName: "showSync" }] : /* istanbul ignore next */ []));
23341
24434
  // -- Outputs --
23342
24435
  /** Fires with the new mapping (a tree path or a keyed record). */
23343
24436
  this.valueChanged = output();
@@ -23356,7 +24449,9 @@ class ApiValueAccessRulesComponent {
23356
24449
  // Parsed bodies (arbitrary JSON shapes). They track the active item but can be
23357
24450
  // overridden locally — the response by runApiCall, the request by the editor —
23358
24451
  // so they are linkedSignals, not pure computeds.
23359
- this.#parsedResponseBody = linkedSignal(() => this.#parseResponseBody(this.#activeItem()), ...(ngDevMode ? [{ debugName: "#parsedResponseBody" }] : /* istanbul ignore next */ []));
24452
+ this.#parsedResponseBody = linkedSignal(() =>
24453
+ // A host-supplied fresh response outranks the Postman item's saved sample.
24454
+ this.liveResponse() ?? this.#parseResponseBody(this.#activeItem()), ...(ngDevMode ? [{ debugName: "#parsedResponseBody" }] : /* istanbul ignore next */ []));
23360
24455
  this.#parsedRequestBody = linkedSignal(() => this.#parseRequestBody(this.#activeItem()), ...(ngDevMode ? [{ debugName: "#parsedRequestBody" }] : /* istanbul ignore next */ []));
23361
24456
  this.error = this.#error.asReadonly();
23362
24457
  this.loading = this.#loading.asReadonly();
@@ -23388,7 +24483,7 @@ class ApiValueAccessRulesComponent {
23388
24483
  this.treeData = computed(() => this.#parsedResponseBody() ?? this.mapToData(), ...(ngDevMode ? [{ debugName: "treeData" }] : /* istanbul ignore next */ []));
23389
24484
  // -- Injected dependencies --
23390
24485
  this.#destroyRef = inject(DestroyRef);
23391
- this.#httpClient = inject(HttpClient);
24486
+ this.#collectionLoader = inject(PostmanCollectionLoaderService);
23392
24487
  this.#formsConfig = inject(NGX_T_FORMS_CONFIG_TOKEN);
23393
24488
  this.#postFn = this.#formsConfig.formBuilder.httpPostDataFunction;
23394
24489
  this.#getFn = this.#formsConfig.formBuilder.httpGetDataFunction;
@@ -23414,7 +24509,7 @@ class ApiValueAccessRulesComponent {
23414
24509
  #parsedRequestBody;
23415
24510
  // -- Injected dependencies --
23416
24511
  #destroyRef;
23417
- #httpClient;
24512
+ #collectionLoader;
23418
24513
  #formsConfig;
23419
24514
  #postFn;
23420
24515
  #getFn;
@@ -23477,14 +24572,9 @@ class ApiValueAccessRulesComponent {
23477
24572
  this.#error.set(new HttpErrorResponse({ error: 'Invalid Postman Collection Config' }));
23478
24573
  return;
23479
24574
  }
23480
- const { collectionUrl, collectionKey } = cfg;
23481
- const requestOptions = {
23482
- params: { apikey: collectionKey, clearSystemHeaders: 'true' },
23483
- headers: { 'Content-Type': 'application/json' },
23484
- };
23485
24575
  this.#loading.set(true);
23486
- this.#httpClient
23487
- .get(collectionUrl, requestOptions)
24576
+ this.#collectionLoader
24577
+ .getCollection(cfg)
23488
24578
  .pipe(take(1), tap((data) => {
23489
24579
  this.#error.set(undefined);
23490
24580
  this.#loading.set(false);
@@ -23528,7 +24618,7 @@ class ApiValueAccessRulesComponent {
23528
24618
  }
23529
24619
  }
23530
24620
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ApiValueAccessRulesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
23531
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ApiValueAccessRulesComponent, isStandalone: true, selector: "lib-api-value-access-rules", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, multipleBind: { classPropertyName: "multipleBind", publicName: "multipleBind", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, mapToData: { classPropertyName: "mapToData", publicName: "mapToData", isSignal: true, isRequired: false, transformFunction: null }, postmanCollectionConfig: { classPropertyName: "postmanCollectionConfig", publicName: "postmanCollectionConfig", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged", reload: "reload" }, host: { classAttribute: "lib-api-value-access-rules" }, ngImport: i0, template: "@if (hasErrors()) {\r\n <lib-error-list [errors]=\"errors()\" />\r\n}\r\n\r\n<div class=\"mode-toggle\">\r\n <mat-button-toggle-group name=\"valueAccessMode\" aria-label=\"Value access mode\" [value]=\"viewMode()\">\r\n <mat-button-toggle (click)=\"setViewMode('map')\" [checked]=\"viewMode() === 'map'\" value=\"map\">\r\n Value Mapping\r\n </mat-button-toggle>\r\n <mat-button-toggle (click)=\"setViewMode('sync')\" [checked]=\"viewMode() === 'sync'\" value=\"sync\">\r\n Data Sync\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n</div>\r\n\r\n@if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\"\r\n [message]=\"err.error || err.message || 'Failed to load the collection.'\" />\r\n}\r\n\r\n@switch (viewMode()) {\r\n @case ('sync') {\r\n @if (parsedRequestBody(); as body) {\r\n <lib-json-editor (valueChange)=\"requestBodyChanged($event)\" [value]=\"body\" />\r\n } @else {\r\n <lib-empty-state icon=\"data_object\"\r\n message=\"No request body found in the selected API request.\" />\r\n }\r\n\r\n <div class=\"run-bar\">\r\n <p class=\"run-bar__hint\">Run the API call with the body above to load a live response.</p>\r\n <span class=\"run-bar__spacer\"></span>\r\n <button mat-stroked-button type=\"button\" [disabled]=\"loading()\" (click)=\"runApiCall()\"\r\n [attr.aria-busy]=\"loading()\" aria-label=\"Run API call\">\r\n @if (loading()) {\r\n <mat-spinner diameter=\"16\" />\r\n } @else {\r\n <mat-icon>play_arrow</mat-icon>\r\n }\r\n <span>{{ loading() ? 'Running API\u2026' : 'Run API Call' }}</span>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('map') {\r\n @if (multipleBind(); as controls) {\r\n @for (controlName of controls; track controlName) {\r\n <section class=\"mapping-section\">\r\n <label class=\"mapping-section__label\" [attr.for]=\"controlName\">\r\n Map <strong>{{ controlName }}</strong>\r\n </label>\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\"\r\n [value]=\"keyedValueFor(controlName)\"\r\n (pathChanged)=\"pathChanged($event, controlName)\" />\r\n </section>\r\n }\r\n } @else {\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\" [value]=\"singleValue()\"\r\n (pathChanged)=\"pathChanged($event)\" />\r\n }\r\n }\r\n}\r\n\r\n<!-- CDK overlay shown while disabled -->\r\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled()\">\r\n <div class=\"disabled-overlay\" aria-hidden=\"true\"></div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;position:relative}.mode-toggle{display:flex;justify-content:center;margin-bottom:1.5rem}.mode-toggle ::ng-deep .mat-button-toggle-group{border:none;border-radius:var(--lib-forms-radius-pill, 999px);background:var(--lib-forms-surface-container-high);padding:.25rem;gap:.25rem;box-shadow:none;overflow:hidden}.mode-toggle ::ng-deep .mat-button-toggle{border:none;background:transparent;border-radius:var(--lib-forms-radius-pill, 999px);color:var(--lib-forms-on-surface-variant);transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.mode-toggle ::ng-deep .mat-button-toggle+.mat-button-toggle{border-left:none}.mode-toggle ::ng-deep .mat-button-toggle-button{height:auto}.mode-toggle ::ng-deep .mat-button-toggle-label-content{padding:.375rem 1.125rem;line-height:1.5;font-size:.8125rem;font-weight:600}.mode-toggle ::ng-deep .mat-button-toggle-checked{background:var(--lib-forms-surface);color:var(--lib-forms-primary);box-shadow:var(--lib-forms-shadow-edge)}.mode-toggle ::ng-deep .mat-pseudo-checkbox{display:none}.run-bar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-top:1.5rem;padding:1rem 1.25rem;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)}.run-bar__hint{margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}.run-bar__spacer{flex:1 1 auto}.mapping-section{margin-bottom:1.5rem}.mapping-section:last-child{margin-bottom:0}.mapping-section__label{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;font-size:.75rem;font-weight:500;color:var(--lib-forms-on-surface-variant)}.mapping-section__label strong{padding:.125rem .5rem;border-radius:var(--lib-forms-radius-pill, 6px);background:color-mix(in srgb,var(--lib-forms-primary) 10%,transparent);color:var(--lib-forms-on-surface);font-family:var(--lib-forms-font-mono, ui-monospace, monospace);font-weight:600;font-size:.75rem}.disabled-overlay{position:absolute;inset:0;background:color-mix(in srgb,var(--lib-forms-on-surface) 30%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);z-index:10}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2$4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3$5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: DataTreeComponent, selector: "lib-data-tree", inputs: ["data", "value", "formInputs"], outputs: ["pathChanged"] }, { kind: "component", type: JsonEditorComponent, selector: "lib-json-editor", inputs: ["value", "height", "disabled", "bindings"], outputs: ["valueChange"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }, { kind: "component", type: ErrorListComponent, selector: "lib-error-list", inputs: ["errors"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24621
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ApiValueAccessRulesComponent, isStandalone: true, selector: "lib-api-value-access-rules", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, multipleBind: { classPropertyName: "multipleBind", publicName: "multipleBind", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, mapToData: { classPropertyName: "mapToData", publicName: "mapToData", isSignal: true, isRequired: false, transformFunction: null }, postmanCollectionConfig: { classPropertyName: "postmanCollectionConfig", publicName: "postmanCollectionConfig", isSignal: true, isRequired: false, transformFunction: null }, liveResponse: { classPropertyName: "liveResponse", publicName: "liveResponse", isSignal: true, isRequired: false, transformFunction: null }, showSync: { classPropertyName: "showSync", publicName: "showSync", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChanged: "valueChanged", reload: "reload" }, host: { classAttribute: "lib-api-value-access-rules" }, ngImport: i0, template: "@if (hasErrors()) {\r\n <lib-error-list [errors]=\"errors()\" />\r\n}\r\n\r\n@if (showSync()) {\r\n <div class=\"mode-toggle\">\r\n <mat-button-toggle-group name=\"valueAccessMode\" aria-label=\"Value access mode\" [value]=\"viewMode()\">\r\n <mat-button-toggle (click)=\"setViewMode('map')\" [checked]=\"viewMode() === 'map'\" value=\"map\">\r\n Value Mapping\r\n </mat-button-toggle>\r\n <mat-button-toggle (click)=\"setViewMode('sync')\" [checked]=\"viewMode() === 'sync'\" value=\"sync\">\r\n Data Sync\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n}\r\n\r\n@if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\"\r\n [message]=\"err.error || err.message || 'Failed to load the collection.'\" />\r\n}\r\n\r\n@switch (viewMode()) {\r\n @case ('sync') {\r\n @if (parsedRequestBody(); as body) {\r\n <lib-json-editor (valueChange)=\"requestBodyChanged($event)\" [value]=\"body\" />\r\n } @else {\r\n <lib-empty-state icon=\"data_object\"\r\n message=\"No request body found in the selected API request.\" />\r\n }\r\n\r\n <div class=\"run-bar\">\r\n <p class=\"run-bar__hint\">Run the API call with the body above to load a live response.</p>\r\n <span class=\"run-bar__spacer\"></span>\r\n <button mat-stroked-button type=\"button\" [disabled]=\"loading()\" (click)=\"runApiCall()\"\r\n [attr.aria-busy]=\"loading()\" aria-label=\"Run API call\">\r\n @if (loading()) {\r\n <mat-spinner diameter=\"16\" />\r\n } @else {\r\n <mat-icon>play_arrow</mat-icon>\r\n }\r\n <span>{{ loading() ? 'Running API\u2026' : 'Run API Call' }}</span>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('map') {\r\n @if (multipleBind(); as controls) {\r\n @for (controlName of controls; track controlName) {\r\n <section class=\"mapping-section\">\r\n <label class=\"mapping-section__label\" [attr.for]=\"controlName\">\r\n Map <strong>{{ controlName }}</strong>\r\n </label>\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\"\r\n [value]=\"keyedValueFor(controlName)\"\r\n (pathChanged)=\"pathChanged($event, controlName)\" />\r\n </section>\r\n }\r\n } @else {\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\" [value]=\"singleValue()\"\r\n (pathChanged)=\"pathChanged($event)\" />\r\n }\r\n }\r\n}\r\n\r\n<!-- CDK overlay shown while disabled -->\r\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled()\">\r\n <div class=\"disabled-overlay\" aria-hidden=\"true\"></div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;position:relative}.mode-toggle{display:flex;justify-content:center;margin-bottom:1.5rem}.mode-toggle ::ng-deep .mat-button-toggle-group{border:none;border-radius:var(--lib-forms-radius-pill, 999px);background:var(--lib-forms-surface-container-high);padding:.25rem;gap:.25rem;box-shadow:none;overflow:hidden}.mode-toggle ::ng-deep .mat-button-toggle{border:none;background:transparent;border-radius:var(--lib-forms-radius-pill, 999px);color:var(--lib-forms-on-surface-variant);transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.mode-toggle ::ng-deep .mat-button-toggle+.mat-button-toggle{border-left:none}.mode-toggle ::ng-deep .mat-button-toggle-button{height:auto}.mode-toggle ::ng-deep .mat-button-toggle-label-content{padding:.375rem 1.125rem;line-height:1.5;font-size:.8125rem;font-weight:600}.mode-toggle ::ng-deep .mat-button-toggle-checked{background:var(--lib-forms-surface);color:var(--lib-forms-primary);box-shadow:var(--lib-forms-shadow-edge)}.mode-toggle ::ng-deep .mat-pseudo-checkbox{display:none}.run-bar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-top:1.5rem;padding:1rem 1.25rem;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)}.run-bar__hint{margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}.run-bar__spacer{flex:1 1 auto}.mapping-section{margin-bottom:1.5rem}.mapping-section:last-child{margin-bottom:0}.mapping-section__label{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;font-size:.75rem;font-weight:500;color:var(--lib-forms-on-surface-variant)}.mapping-section__label strong{padding:.125rem .5rem;border-radius:var(--lib-forms-radius-pill, 6px);background:color-mix(in srgb,var(--lib-forms-primary) 10%,transparent);color:var(--lib-forms-on-surface);font-family:var(--lib-forms-font-mono, ui-monospace, monospace);font-weight:600;font-size:.75rem}.disabled-overlay{position:absolute;inset:0;background:color-mix(in srgb,var(--lib-forms-on-surface) 30%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);z-index:10}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i2$4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3$5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatProgressSpinnerModule }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: DataTreeComponent, selector: "lib-data-tree", inputs: ["data", "value", "formInputs"], outputs: ["pathChanged"] }, { kind: "component", type: JsonEditorComponent, selector: "lib-json-editor", inputs: ["value", "height", "disabled", "bindings"], outputs: ["valueChange"] }, { kind: "component", type: EmptyStateComponent, selector: "lib-empty-state", inputs: ["icon", "message"] }, { kind: "component", type: ErrorListComponent, selector: "lib-error-list", inputs: ["errors"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
23532
24622
  }
23533
24623
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ApiValueAccessRulesComponent, decorators: [{
23534
24624
  type: Component,
@@ -23542,8 +24632,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImpo
23542
24632
  JsonEditorComponent,
23543
24633
  EmptyStateComponent,
23544
24634
  ErrorListComponent,
23545
- ], template: "@if (hasErrors()) {\r\n <lib-error-list [errors]=\"errors()\" />\r\n}\r\n\r\n<div class=\"mode-toggle\">\r\n <mat-button-toggle-group name=\"valueAccessMode\" aria-label=\"Value access mode\" [value]=\"viewMode()\">\r\n <mat-button-toggle (click)=\"setViewMode('map')\" [checked]=\"viewMode() === 'map'\" value=\"map\">\r\n Value Mapping\r\n </mat-button-toggle>\r\n <mat-button-toggle (click)=\"setViewMode('sync')\" [checked]=\"viewMode() === 'sync'\" value=\"sync\">\r\n Data Sync\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n</div>\r\n\r\n@if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\"\r\n [message]=\"err.error || err.message || 'Failed to load the collection.'\" />\r\n}\r\n\r\n@switch (viewMode()) {\r\n @case ('sync') {\r\n @if (parsedRequestBody(); as body) {\r\n <lib-json-editor (valueChange)=\"requestBodyChanged($event)\" [value]=\"body\" />\r\n } @else {\r\n <lib-empty-state icon=\"data_object\"\r\n message=\"No request body found in the selected API request.\" />\r\n }\r\n\r\n <div class=\"run-bar\">\r\n <p class=\"run-bar__hint\">Run the API call with the body above to load a live response.</p>\r\n <span class=\"run-bar__spacer\"></span>\r\n <button mat-stroked-button type=\"button\" [disabled]=\"loading()\" (click)=\"runApiCall()\"\r\n [attr.aria-busy]=\"loading()\" aria-label=\"Run API call\">\r\n @if (loading()) {\r\n <mat-spinner diameter=\"16\" />\r\n } @else {\r\n <mat-icon>play_arrow</mat-icon>\r\n }\r\n <span>{{ loading() ? 'Running API\u2026' : 'Run API Call' }}</span>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('map') {\r\n @if (multipleBind(); as controls) {\r\n @for (controlName of controls; track controlName) {\r\n <section class=\"mapping-section\">\r\n <label class=\"mapping-section__label\" [attr.for]=\"controlName\">\r\n Map <strong>{{ controlName }}</strong>\r\n </label>\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\"\r\n [value]=\"keyedValueFor(controlName)\"\r\n (pathChanged)=\"pathChanged($event, controlName)\" />\r\n </section>\r\n }\r\n } @else {\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\" [value]=\"singleValue()\"\r\n (pathChanged)=\"pathChanged($event)\" />\r\n }\r\n }\r\n}\r\n\r\n<!-- CDK overlay shown while disabled -->\r\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled()\">\r\n <div class=\"disabled-overlay\" aria-hidden=\"true\"></div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;position:relative}.mode-toggle{display:flex;justify-content:center;margin-bottom:1.5rem}.mode-toggle ::ng-deep .mat-button-toggle-group{border:none;border-radius:var(--lib-forms-radius-pill, 999px);background:var(--lib-forms-surface-container-high);padding:.25rem;gap:.25rem;box-shadow:none;overflow:hidden}.mode-toggle ::ng-deep .mat-button-toggle{border:none;background:transparent;border-radius:var(--lib-forms-radius-pill, 999px);color:var(--lib-forms-on-surface-variant);transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.mode-toggle ::ng-deep .mat-button-toggle+.mat-button-toggle{border-left:none}.mode-toggle ::ng-deep .mat-button-toggle-button{height:auto}.mode-toggle ::ng-deep .mat-button-toggle-label-content{padding:.375rem 1.125rem;line-height:1.5;font-size:.8125rem;font-weight:600}.mode-toggle ::ng-deep .mat-button-toggle-checked{background:var(--lib-forms-surface);color:var(--lib-forms-primary);box-shadow:var(--lib-forms-shadow-edge)}.mode-toggle ::ng-deep .mat-pseudo-checkbox{display:none}.run-bar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-top:1.5rem;padding:1rem 1.25rem;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)}.run-bar__hint{margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}.run-bar__spacer{flex:1 1 auto}.mapping-section{margin-bottom:1.5rem}.mapping-section:last-child{margin-bottom:0}.mapping-section__label{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;font-size:.75rem;font-weight:500;color:var(--lib-forms-on-surface-variant)}.mapping-section__label strong{padding:.125rem .5rem;border-radius:var(--lib-forms-radius-pill, 6px);background:color-mix(in srgb,var(--lib-forms-primary) 10%,transparent);color:var(--lib-forms-on-surface);font-family:var(--lib-forms-font-mono, ui-monospace, monospace);font-weight:600;font-size:.75rem}.disabled-overlay{position:absolute;inset:0;background:color-mix(in srgb,var(--lib-forms-on-surface) 30%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);z-index:10}\n"] }]
23546
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], multipleBind: [{ type: i0.Input, args: [{ isSignal: true, alias: "multipleBind", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], mapToData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mapToData", required: false }] }], postmanCollectionConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "postmanCollectionConfig", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
24635
+ ], template: "@if (hasErrors()) {\r\n <lib-error-list [errors]=\"errors()\" />\r\n}\r\n\r\n@if (showSync()) {\r\n <div class=\"mode-toggle\">\r\n <mat-button-toggle-group name=\"valueAccessMode\" aria-label=\"Value access mode\" [value]=\"viewMode()\">\r\n <mat-button-toggle (click)=\"setViewMode('map')\" [checked]=\"viewMode() === 'map'\" value=\"map\">\r\n Value Mapping\r\n </mat-button-toggle>\r\n <mat-button-toggle (click)=\"setViewMode('sync')\" [checked]=\"viewMode() === 'sync'\" value=\"sync\">\r\n Data Sync\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n}\r\n\r\n@if (error(); as err) {\r\n <lib-empty-state icon=\"error_outline\"\r\n [message]=\"err.error || err.message || 'Failed to load the collection.'\" />\r\n}\r\n\r\n@switch (viewMode()) {\r\n @case ('sync') {\r\n @if (parsedRequestBody(); as body) {\r\n <lib-json-editor (valueChange)=\"requestBodyChanged($event)\" [value]=\"body\" />\r\n } @else {\r\n <lib-empty-state icon=\"data_object\"\r\n message=\"No request body found in the selected API request.\" />\r\n }\r\n\r\n <div class=\"run-bar\">\r\n <p class=\"run-bar__hint\">Run the API call with the body above to load a live response.</p>\r\n <span class=\"run-bar__spacer\"></span>\r\n <button mat-stroked-button type=\"button\" [disabled]=\"loading()\" (click)=\"runApiCall()\"\r\n [attr.aria-busy]=\"loading()\" aria-label=\"Run API call\">\r\n @if (loading()) {\r\n <mat-spinner diameter=\"16\" />\r\n } @else {\r\n <mat-icon>play_arrow</mat-icon>\r\n }\r\n <span>{{ loading() ? 'Running API\u2026' : 'Run API Call' }}</span>\r\n </button>\r\n </div>\r\n }\r\n\r\n @case ('map') {\r\n @if (multipleBind(); as controls) {\r\n @for (controlName of controls; track controlName) {\r\n <section class=\"mapping-section\">\r\n <label class=\"mapping-section__label\" [attr.for]=\"controlName\">\r\n Map <strong>{{ controlName }}</strong>\r\n </label>\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\"\r\n [value]=\"keyedValueFor(controlName)\"\r\n (pathChanged)=\"pathChanged($event, controlName)\" />\r\n </section>\r\n }\r\n } @else {\r\n <lib-data-tree [formInputs]=\"formInputs()\" [data]=\"treeData()\" [value]=\"singleValue()\"\r\n (pathChanged)=\"pathChanged($event)\" />\r\n }\r\n }\r\n}\r\n\r\n<!-- CDK overlay shown while disabled -->\r\n<ng-template cdkConnectedOverlay [cdkConnectedOverlayOpen]=\"disabled()\">\r\n <div class=\"disabled-overlay\" aria-hidden=\"true\"></div>\r\n</ng-template>\r\n", styles: ["@charset \"UTF-8\";:host{display:block;position:relative}.mode-toggle{display:flex;justify-content:center;margin-bottom:1.5rem}.mode-toggle ::ng-deep .mat-button-toggle-group{border:none;border-radius:var(--lib-forms-radius-pill, 999px);background:var(--lib-forms-surface-container-high);padding:.25rem;gap:.25rem;box-shadow:none;overflow:hidden}.mode-toggle ::ng-deep .mat-button-toggle{border:none;background:transparent;border-radius:var(--lib-forms-radius-pill, 999px);color:var(--lib-forms-on-surface-variant);transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing),background var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing)}.mode-toggle ::ng-deep .mat-button-toggle+.mat-button-toggle{border-left:none}.mode-toggle ::ng-deep .mat-button-toggle-button{height:auto}.mode-toggle ::ng-deep .mat-button-toggle-label-content{padding:.375rem 1.125rem;line-height:1.5;font-size:.8125rem;font-weight:600}.mode-toggle ::ng-deep .mat-button-toggle-checked{background:var(--lib-forms-surface);color:var(--lib-forms-primary);box-shadow:var(--lib-forms-shadow-edge)}.mode-toggle ::ng-deep .mat-pseudo-checkbox{display:none}.run-bar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-top:1.5rem;padding:1rem 1.25rem;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)}.run-bar__hint{margin:0;font-size:.8125rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}.run-bar__spacer{flex:1 1 auto}.mapping-section{margin-bottom:1.5rem}.mapping-section:last-child{margin-bottom:0}.mapping-section__label{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;font-size:.75rem;font-weight:500;color:var(--lib-forms-on-surface-variant)}.mapping-section__label strong{padding:.125rem .5rem;border-radius:var(--lib-forms-radius-pill, 6px);background:color-mix(in srgb,var(--lib-forms-primary) 10%,transparent);color:var(--lib-forms-on-surface);font-family:var(--lib-forms-font-mono, ui-monospace, monospace);font-weight:600;font-size:.75rem}.disabled-overlay{position:absolute;inset:0;background:color-mix(in srgb,var(--lib-forms-on-surface) 30%,transparent);border-radius:var(--lib-forms-radius-lg, 12px);z-index:10}\n"] }]
24636
+ }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], multipleBind: [{ type: i0.Input, args: [{ isSignal: true, alias: "multipleBind", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], formInputs: [{ type: i0.Input, args: [{ isSignal: true, alias: "formInputs", required: false }] }], mapToData: [{ type: i0.Input, args: [{ isSignal: true, alias: "mapToData", required: false }] }], postmanCollectionConfig: [{ type: i0.Input, args: [{ isSignal: true, alias: "postmanCollectionConfig", required: false }] }], liveResponse: [{ type: i0.Input, args: [{ isSignal: true, alias: "liveResponse", required: false }] }], showSync: [{ type: i0.Input, args: [{ isSignal: true, alias: "showSync", required: false }] }], valueChanged: [{ type: i0.Output, args: ["valueChanged"] }], reload: [{ type: i0.Output, args: ["reload"] }] } });
23547
24637
 
23548
24638
  var apiValueAccessRules_component = /*#__PURE__*/Object.freeze({
23549
24639
  __proto__: null,
@@ -24159,7 +25249,7 @@ class ValidationExpressioCreatorComponent {
24159
25249
  }
24160
25250
  }
24161
25251
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ValidationExpressioCreatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24162
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ValidationExpressioCreatorComponent, isStandalone: true, selector: "lib-validation-expressio-creator", inputs: { hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, expression: { classPropertyName: "expression", publicName: "expression", isSignal: true, isRequired: false, transformFunction: null }, valueAccessRules: { classPropertyName: "valueAccessRules", publicName: "valueAccessRules", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expressionChange: "expressionChange" }, host: { classAttribute: "lib-validation-expressio-creator" }, viewQueries: [{ propertyName: "textareaElementRef", first: true, predicate: ["textarea"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"lib-vec\">\r\n <div class=\"lib-vec__head\">\r\n <div class=\"lib-vec__heading\">\r\n <span class=\"lib-vec__f-label\">Condition expression</span>\r\n <p class=\"lib-vec__sub-hint\">{{ hint() }}</p>\r\n </div>\r\n\r\n @if (mode() === 'advanced') {\r\n <button type=\"button\" class=\"lib-vec__link\" [disabled]=\"!canUseGuided()\"\r\n [matTooltip]=\"canUseGuided() ? 'Build this with guided rows' : 'This expression is too advanced for the guided builder'\"\r\n (click)=\"useGuided()\">\r\n <mat-icon>view_module</mat-icon> Guided\r\n </button>\r\n } @else {\r\n <button type=\"button\" class=\"lib-vec__link\" matTooltip=\"Type the expression yourself\"\r\n (click)=\"useAdvanced()\">\r\n <mat-icon>code</mat-icon> Advanced\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (mode() === 'guided') {\r\n @if (fieldOptions().length === 0) {\r\n <p class=\"lib-vec__sub-hint\">\r\n No fields available yet \u2014 switch to Advanced to type an expression.\r\n </p>\r\n } @else if (group().conditions.length === 0) {\r\n <p class=\"lib-vec__sub-hint lib-vec__sub-hint--lead\">\r\n <mat-icon class=\"lib-vec__lead-icon\">lightbulb</mat-icon>\r\n <span>Add a check below \u2014 this passes when it\u2019s true.</span>\r\n </p>\r\n } @else if (group().conditions.length > 1) {\r\n <div class=\"lib-vec__match\">\r\n <span class=\"lib-vec__muted\">Match</span>\r\n <mat-button-toggle-group class=\"lib-vec__seg\" [value]=\"group().connector\"\r\n hideSingleSelectionIndicator (change)=\"setConnector($event.value)\"\r\n aria-label=\"Combine conditions\">\r\n <mat-button-toggle value=\"&&\">All</mat-button-toggle>\r\n <mat-button-toggle value=\"||\">Any</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n <span class=\"lib-vec__muted\">of the checks</span>\r\n </div>\r\n }\r\n\r\n @for (cond of group().conditions; track $index; let first = $first) {\r\n @if (!first) {\r\n <div class=\"lib-vec__connector\" aria-hidden=\"true\">\r\n <span>{{ group().connector === '&&' ? 'AND' : 'OR' }}</span>\r\n </div>\r\n }\r\n <div class=\"lib-vec__cond\" [class.lib-vec__cond--incomplete]=\"!cond.field || !cond.value\">\r\n <div class=\"lib-vec__cond-row\">\r\n <select class=\"lib-vec__control lib-vec__control--field\"\r\n [class.lib-vec__control--invalid]=\"!cond.field\"\r\n (change)=\"updateCondition($index, { field: inputValue($event) })\">\r\n <option value=\"\" disabled [selected]=\"!cond.field\">Choose a field</option>\r\n @for (group of fieldOptionGroups(); track $index) {\r\n @if (group.label) {\r\n <optgroup [label]=\"group.label\">\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n </optgroup>\r\n } @else {\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n }\r\n }\r\n </select>\r\n <button type=\"button\" class=\"lib-vec__icon-btn\"\r\n (click)=\"removeCondition($index)\" matTooltip=\"Remove check\" aria-label=\"Remove check\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"lib-vec__cond-row lib-vec__cond-row--ops\">\r\n <select class=\"lib-vec__control\"\r\n (change)=\"updateCondition($index, { operator: inputValue($event) })\">\r\n @for (op of operators; track op.value) {\r\n <option [value]=\"op.value\" [selected]=\"op.value === cond.operator\">\r\n {{ op.label }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (cond.compareTo === 'field') {\r\n <select class=\"lib-vec__control\"\r\n [class.lib-vec__control--invalid]=\"!cond.value\"\r\n (change)=\"updateCondition($index, { value: inputValue($event) })\">\r\n <option value=\"\" disabled [selected]=\"!cond.value\">Choose a field</option>\r\n @for (group of fieldOptionGroups(); track $index) {\r\n @if (group.label) {\r\n <optgroup [label]=\"group.label\">\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n </optgroup>\r\n } @else {\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n }\r\n }\r\n </select>\r\n } @else {\r\n <input class=\"lib-vec__control\"\r\n [class.lib-vec__control--invalid]=\"!cond.value\"\r\n [value]=\"cond.value\"\r\n (input)=\"updateCondition($index, { value: inputValue($event) })\"\r\n [placeholder]=\"'a value'\" />\r\n }\r\n\r\n <button type=\"button\" class=\"lib-vec__icon-btn\"\r\n [class.lib-vec__icon-btn--on]=\"cond.compareTo === 'field'\"\r\n (click)=\"toggleCompareTo($index)\"\r\n [attr.aria-label]=\"cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\"\r\n [matTooltip]=\"cond.compareTo === 'field' ? 'Comparing to a field \u2014 switch to a typed value' : 'Compare to another field instead'\">\r\n <mat-icon>{{ cond.compareTo === 'field' ? 'link' : 'link_off' }}</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"lib-vec__foot\">\r\n <button type=\"button\" class=\"lib-vec__link\" [disabled]=\"fieldOptions().length === 0\"\r\n (click)=\"addCondition()\">\r\n <mat-icon>add</mat-icon> Add check\r\n </button>\r\n\r\n @if (expressionText()) {\r\n <span class=\"lib-vec__valid\" matTooltip=\"Generated expression: {{ expressionText() }}\">\r\n <mat-icon>check_circle</mat-icon> Ready\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" style=\"width: 100%;\"\r\n floatLabel=\"always\" id=\"validationExpressionCreator\">\r\n <mat-label>Expression</mat-label>\r\n <textarea [formControl]=\"expressionControl\" matInput #textarea (focus)=\"onFocus()\"\r\n class=\"lib-vec__mono\"\r\n placeholder=\"Enter a validation string for the function\"></textarea>\r\n\r\n <mat-hint\r\n [style.color]=\"expressionControl.invalid && !showSuggestions() ? 'var(--mat-form-field-error-text-color, var(--mat-sys-error))' : ''\">\r\n @if (expressionControl.invalid && errorMessage !== null && !showSuggestions()) {\r\n {{ errorMessage }}\r\n } @else {\r\n {{ showSuggestions() ? 'Click a suggestion to apply it' : 'Enter a filter condition. Type $ for options' }}\r\n @if (showSuggestions()) {\r\n <section class=\"showSuggestionContainer\">\r\n <mat-divider></mat-divider>\r\n <div style=\"padding: 0px;margin-top:8px\" class=\"\">\r\n <div class=\"suggestion-container\">\r\n <div class=\"suggestion-column\">\r\n <div class=\"suggestion-heading\">\r\n Logical Operators\r\n </div>\r\n <div class=\"button-container\">\r\n @for (method of getMethods() | searchList:optionsSearch(); track method.value) {\r\n <button type=\"button\" matTooltipPosition=\"left\" [matTooltip]=\"method.hint\" color=\"primary\" mat-button\r\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\r\n {{ method.label | titlecase }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"suggestion-column\">\r\n <div class=\"suggestion-heading\">\r\n Add Input as a Variable\r\n </div>\r\n <div class=\"button-container\">\r\n @for (inp of allInputs() | searchList:optionsSearch(); track inp.formControlName) {\r\n <button type=\"button\" mat-button matTooltipPosition=\"right\"\r\n [matTooltip]=\"'Add Variable - ' + inp.label\"\r\n (click)=\"selectSuggestionInput(inp.formControlName)\" class=\"suggestion-button\">\r\n {{ inp.label | titlecase }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n }\r\n }\r\n </mat-hint>\r\n </mat-form-field>\r\n }\r\n</section>\r\n\r\n@if (valueAccessOptions().length > 0) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" style=\"width: 100%;margin-top:12px\"\r\n floatLabel=\"always\" id=\"Value access options\">\r\n <mat-label>\r\n Form Fields for expression\r\n </mat-label>\r\n <mat-chip-grid #chipGrid aria-label=\"value access options\">\r\n @for (variable of valueAccessOptions(); track variable) {\r\n <mat-chip-option\r\n [selected]=\"variableInEdit() === variable\"\r\n (click)=\"toggleVariableInEdit(variable)\"\r\n [aria-description]=\"'press enter to edit ' + variable\">\r\n {{ variable }}\r\n </mat-chip-option>\r\n }\r\n <input placeholder=\"\" style=\"display: none;\" [matChipInputFor]=\"chipGrid\" />\r\n </mat-chip-grid>\r\n @if (variableInEdit(); as activeVariable) {\r\n <lib-api-value-access-rules\r\n [value]=\"getValueAccessRule(activeVariable)\"\r\n [errors]=\"[]\"\r\n [formInputs]=\"formInputs() || []\"\r\n [mapToData]=\"data()\"\r\n (valueChanged)=\"activeVariableChanged($event)\">\r\n </lib-api-value-access-rules>\r\n }\r\n <mat-hint>\r\n Click a field to define how to process its value. You can filter a list, count its items, or access specific\r\n data within a complex object.\r\n </mat-hint>\r\n </mat-form-field>\r\n}\r\n", styles: [".lib-vec{display:flex;flex-direction:column;gap:.625rem}.lib-vec__head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.lib-vec__heading{display:flex;flex-direction:column;gap:.125rem;min-width:0}.lib-vec__f-label{font-size:.625rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-vec__sub-hint{margin:0;font-size:.75rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}.lib-vec__sub-hint--lead{display:flex;align-items:center;gap:.375rem;padding:.4375rem .625rem;background:var(--lib-forms-surface-container-lowest);border:1px dashed var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-sm, 8px)}.lib-vec__lead-icon{flex:none;font-size:1rem;width:1rem;height:1rem;color:var(--sem-info, var(--lib-forms-primary))}.lib-vec__match{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.lib-vec__muted{font-size:.75rem;color:var(--lib-forms-on-surface-variant)}.lib-vec__seg{--mat-standard-button-toggle-height: 28px;height:28px}.lib-vec__connector{display:flex;justify-content:center;margin:-.1875rem 0}.lib-vec__connector span{padding:.0625rem .5rem;font-size:.5625rem;font-weight:600;letter-spacing:.1em;color:var(--lib-forms-on-surface-variant);background:var(--lib-forms-surface-container-high);border-radius:var(--lib-forms-radius-pill, 999px)}.lib-vec__cond{display:flex;flex-direction:column;gap:.375rem;padding:.5rem .5rem .5625rem;background:var(--lib-forms-surface-container-lowest);border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-md, 12px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__cond:hover{border-color:var(--lib-forms-outline)}.lib-vec__cond--incomplete{border-color:var(--sem-warning, var(--lib-forms-outline-variant))}.lib-vec__cond-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.375rem;min-width:0}.lib-vec__cond-row--ops{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.lib-vec__control{box-sizing:border-box;width:100%;min-width:0;height:2rem;padding:.3125rem .5rem;font-family:inherit;font-size:.8125rem;line-height:1.2;color:var(--lib-forms-on-surface);background:var(--lib-forms-surface-container-lowest);border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-sm, 8px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__control--field{font-weight:500}select.lib-vec__control{cursor:pointer}.lib-vec__control:hover{border-color:var(--lib-forms-outline)}.lib-vec__control:focus{outline:none;border-color:var(--lib-forms-primary);box-shadow:0 0 0 1px var(--lib-forms-primary)}.lib-vec__control--invalid:not(:focus){border-color:var(--sem-warning, var(--lib-forms-outline));background:var(--sem-warning-surface, var(--lib-forms-surface-container-lowest))}.lib-vec__icon-btn{display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.875rem;height:1.875rem;padding:0;color:var(--lib-forms-on-surface-variant);background:transparent;border:1px solid transparent;border-radius:var(--lib-forms-radius-sm, 8px);cursor:pointer;transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__icon-btn:hover{color:var(--lib-forms-primary);background:var(--lib-forms-primary-container)}.lib-vec__icon-btn--on{color:var(--lib-forms-primary);border-color:var(--lib-forms-primary)}.lib-vec__icon-btn mat-icon{font-size:1.0625rem;width:1.0625rem;height:1.0625rem}.lib-vec__link{display:inline-flex;align-items:center;gap:.25rem;height:1.75rem;padding:0 .5rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--lib-forms-primary);background:transparent;border:0;border-radius:var(--lib-forms-radius-sm, 8px);cursor:pointer;transition:background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__head .lib-vec__link{flex:none}.lib-vec__link:hover:not(:disabled){background:var(--lib-forms-primary-container)}.lib-vec__link:disabled{color:var(--lib-forms-on-surface-variant);cursor:default;opacity:.6}.lib-vec__link mat-icon{flex:none;font-size:1.0625rem;width:1.0625rem;height:1.0625rem}.lib-vec__foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.lib-vec__valid{display:inline-flex;align-items:center;gap:.25rem;font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--sem-success, var(--lib-forms-primary));cursor:default}.lib-vec__valid mat-icon{font-size:.9375rem;width:.9375rem;height:.9375rem}.lib-vec__mono{font-family:var(--lib-forms-font-mono, monospace)}:host ::ng-deep .mat-mdc-form-field-hint-wrapper{min-width:0}:host ::ng-deep .mat-mdc-form-field-hint{min-width:0;width:100%}.showSuggestionContainer{display:block;box-sizing:border-box;width:100%;max-width:100%;overflow:hidden}.suggestion-container{display:flex;flex-wrap:wrap;box-sizing:border-box;width:100%;gap:24px;max-height:220px;overflow-x:hidden;overflow-y:auto}.suggestion-column{flex:1 1 150px;min-width:0}.suggestion-heading{margin-bottom:12px;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;opacity:.7}.button-container{display:flex;flex-wrap:wrap;gap:4px}.suggestion-button{height:auto;min-width:0;max-width:100%;text-align:left;font-size:11px;line-height:normal;padding:4px 8px;border-radius:4px;overflow:hidden}.suggestion-button ::ng-deep .mdc-button__label{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3$5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i4$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: i4$3.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ApiValueAccessRulesComponent, selector: "lib-api-value-access-rules", inputs: ["disabled", "multipleBind", "errors", "value", "formInputs", "mapToData", "postmanCollectionConfig"], outputs: ["valueChanged", "reload"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: SearchListPipe, name: "searchList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25252
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.12", type: ValidationExpressioCreatorComponent, isStandalone: true, selector: "lib-validation-expressio-creator", inputs: { hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, formInputs: { classPropertyName: "formInputs", publicName: "formInputs", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null }, expression: { classPropertyName: "expression", publicName: "expression", isSignal: true, isRequired: false, transformFunction: null }, valueAccessRules: { classPropertyName: "valueAccessRules", publicName: "valueAccessRules", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expressionChange: "expressionChange" }, host: { classAttribute: "lib-validation-expressio-creator" }, viewQueries: [{ propertyName: "textareaElementRef", first: true, predicate: ["textarea"], descendants: true, isSignal: true }], ngImport: i0, template: "<section class=\"lib-vec\">\r\n <div class=\"lib-vec__head\">\r\n <div class=\"lib-vec__heading\">\r\n <span class=\"lib-vec__f-label\">Condition expression</span>\r\n <p class=\"lib-vec__sub-hint\">{{ hint() }}</p>\r\n </div>\r\n\r\n @if (mode() === 'advanced') {\r\n <button type=\"button\" class=\"lib-vec__link\" [disabled]=\"!canUseGuided()\"\r\n [matTooltip]=\"canUseGuided() ? 'Build this with guided rows' : 'This expression is too advanced for the guided builder'\"\r\n (click)=\"useGuided()\">\r\n <mat-icon>view_module</mat-icon> Guided\r\n </button>\r\n } @else {\r\n <button type=\"button\" class=\"lib-vec__link\" matTooltip=\"Type the expression yourself\"\r\n (click)=\"useAdvanced()\">\r\n <mat-icon>code</mat-icon> Advanced\r\n </button>\r\n }\r\n </div>\r\n\r\n @if (mode() === 'guided') {\r\n @if (fieldOptions().length === 0) {\r\n <p class=\"lib-vec__sub-hint\">\r\n No fields available yet \u2014 switch to Advanced to type an expression.\r\n </p>\r\n } @else if (group().conditions.length === 0) {\r\n <p class=\"lib-vec__sub-hint lib-vec__sub-hint--lead\">\r\n <mat-icon class=\"lib-vec__lead-icon\">lightbulb</mat-icon>\r\n <span>Add a check below \u2014 this passes when it\u2019s true.</span>\r\n </p>\r\n } @else if (group().conditions.length > 1) {\r\n <div class=\"lib-vec__match\">\r\n <span class=\"lib-vec__muted\">Match</span>\r\n <mat-button-toggle-group class=\"lib-vec__seg\" [value]=\"group().connector\"\r\n hideSingleSelectionIndicator (change)=\"setConnector($event.value)\"\r\n aria-label=\"Combine conditions\">\r\n <mat-button-toggle value=\"&&\">All</mat-button-toggle>\r\n <mat-button-toggle value=\"||\">Any</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n <span class=\"lib-vec__muted\">of the checks</span>\r\n </div>\r\n }\r\n\r\n @for (cond of group().conditions; track $index; let first = $first) {\r\n @if (!first) {\r\n <div class=\"lib-vec__connector\" aria-hidden=\"true\">\r\n <span>{{ group().connector === '&&' ? 'AND' : 'OR' }}</span>\r\n </div>\r\n }\r\n <div class=\"lib-vec__cond\" [class.lib-vec__cond--incomplete]=\"!cond.field || !cond.value\">\r\n <div class=\"lib-vec__cond-row\">\r\n <select class=\"lib-vec__control lib-vec__control--field\"\r\n [class.lib-vec__control--invalid]=\"!cond.field\"\r\n (change)=\"updateCondition($index, { field: inputValue($event) })\">\r\n <option value=\"\" disabled [selected]=\"!cond.field\">Choose a field</option>\r\n @for (group of fieldOptionGroups(); track $index) {\r\n @if (group.label) {\r\n <optgroup [label]=\"group.label\">\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n </optgroup>\r\n } @else {\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.field\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n }\r\n }\r\n </select>\r\n <button type=\"button\" class=\"lib-vec__icon-btn\"\r\n (click)=\"removeCondition($index)\" matTooltip=\"Remove check\" aria-label=\"Remove check\">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n\r\n <div class=\"lib-vec__cond-row lib-vec__cond-row--ops\">\r\n <select class=\"lib-vec__control\"\r\n (change)=\"updateCondition($index, { operator: inputValue($event) })\">\r\n @for (op of operators; track op.value) {\r\n <option [value]=\"op.value\" [selected]=\"op.value === cond.operator\">\r\n {{ op.label }}\r\n </option>\r\n }\r\n </select>\r\n\r\n @if (cond.compareTo === 'field') {\r\n <select class=\"lib-vec__control\"\r\n [class.lib-vec__control--invalid]=\"!cond.value\"\r\n (change)=\"updateCondition($index, { value: inputValue($event) })\">\r\n <option value=\"\" disabled [selected]=\"!cond.value\">Choose a field</option>\r\n @for (group of fieldOptionGroups(); track $index) {\r\n @if (group.label) {\r\n <optgroup [label]=\"group.label\">\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n </optgroup>\r\n } @else {\r\n @for (f of group.options; track $index) {\r\n <option [value]=\"f.variable\" [selected]=\"f.variable === cond.value\">\r\n {{ f.label }}\r\n </option>\r\n }\r\n }\r\n }\r\n </select>\r\n } @else {\r\n <input class=\"lib-vec__control\"\r\n [class.lib-vec__control--invalid]=\"!cond.value\"\r\n [value]=\"cond.value\"\r\n (input)=\"updateCondition($index, { value: inputValue($event) })\"\r\n [placeholder]=\"'a value'\" />\r\n }\r\n\r\n <button type=\"button\" class=\"lib-vec__icon-btn\"\r\n [class.lib-vec__icon-btn--on]=\"cond.compareTo === 'field'\"\r\n (click)=\"toggleCompareTo($index)\"\r\n [attr.aria-label]=\"cond.compareTo === 'field' ? 'Compare to a typed value' : 'Compare to another field'\"\r\n [matTooltip]=\"cond.compareTo === 'field' ? 'Comparing to a field \u2014 switch to a typed value' : 'Compare to another field instead'\">\r\n <mat-icon>{{ cond.compareTo === 'field' ? 'link' : 'link_off' }}</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n }\r\n\r\n <div class=\"lib-vec__foot\">\r\n <button type=\"button\" class=\"lib-vec__link\" [disabled]=\"fieldOptions().length === 0\"\r\n (click)=\"addCondition()\">\r\n <mat-icon>add</mat-icon> Add check\r\n </button>\r\n\r\n @if (expressionText()) {\r\n <span class=\"lib-vec__valid\" matTooltip=\"Generated expression: {{ expressionText() }}\">\r\n <mat-icon>check_circle</mat-icon> Ready\r\n </span>\r\n }\r\n </div>\r\n } @else {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" style=\"width: 100%;\"\r\n floatLabel=\"always\" id=\"validationExpressionCreator\">\r\n <mat-label>Expression</mat-label>\r\n <textarea [formControl]=\"expressionControl\" matInput #textarea (focus)=\"onFocus()\"\r\n class=\"lib-vec__mono\"\r\n placeholder=\"Enter a validation string for the function\"></textarea>\r\n\r\n <mat-hint\r\n [style.color]=\"expressionControl.invalid && !showSuggestions() ? 'var(--mat-form-field-error-text-color, var(--mat-sys-error))' : ''\">\r\n @if (expressionControl.invalid && errorMessage !== null && !showSuggestions()) {\r\n {{ errorMessage }}\r\n } @else {\r\n {{ showSuggestions() ? 'Click a suggestion to apply it' : 'Enter a filter condition. Type $ for options' }}\r\n @if (showSuggestions()) {\r\n <section class=\"showSuggestionContainer\">\r\n <mat-divider></mat-divider>\r\n <div style=\"padding: 0px;margin-top:8px\" class=\"\">\r\n <div class=\"suggestion-container\">\r\n <div class=\"suggestion-column\">\r\n <div class=\"suggestion-heading\">\r\n Logical Operators\r\n </div>\r\n <div class=\"button-container\">\r\n @for (method of getMethods() | searchList:optionsSearch(); track method.value) {\r\n <button type=\"button\" matTooltipPosition=\"left\" [matTooltip]=\"method.hint\" color=\"primary\" mat-button\r\n (click)=\"selectSuggestionInput(method.value)\" class=\"suggestion-button\">\r\n {{ method.label | titlecase }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n <div class=\"suggestion-column\">\r\n <div class=\"suggestion-heading\">\r\n Add Input as a Variable\r\n </div>\r\n <div class=\"button-container\">\r\n @for (inp of allInputs() | searchList:optionsSearch(); track inp.formControlName) {\r\n <button type=\"button\" mat-button matTooltipPosition=\"right\"\r\n [matTooltip]=\"'Add Variable - ' + inp.label\"\r\n (click)=\"selectSuggestionInput(inp.formControlName)\" class=\"suggestion-button\">\r\n {{ inp.label | titlecase }}\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </section>\r\n }\r\n }\r\n </mat-hint>\r\n </mat-form-field>\r\n }\r\n</section>\r\n\r\n@if (valueAccessOptions().length > 0) {\r\n <mat-form-field appearance=\"outline\" subscriptSizing=\"dynamic\" style=\"width: 100%;margin-top:12px\"\r\n floatLabel=\"always\" id=\"Value access options\">\r\n <mat-label>\r\n Form Fields for expression\r\n </mat-label>\r\n <mat-chip-grid #chipGrid aria-label=\"value access options\">\r\n @for (variable of valueAccessOptions(); track variable) {\r\n <mat-chip-option\r\n [selected]=\"variableInEdit() === variable\"\r\n (click)=\"toggleVariableInEdit(variable)\"\r\n [aria-description]=\"'press enter to edit ' + variable\">\r\n {{ variable }}\r\n </mat-chip-option>\r\n }\r\n <input placeholder=\"\" style=\"display: none;\" [matChipInputFor]=\"chipGrid\" />\r\n </mat-chip-grid>\r\n @if (variableInEdit(); as activeVariable) {\r\n <lib-api-value-access-rules\r\n [value]=\"getValueAccessRule(activeVariable)\"\r\n [errors]=\"[]\"\r\n [formInputs]=\"formInputs() || []\"\r\n [mapToData]=\"data()\"\r\n (valueChanged)=\"activeVariableChanged($event)\">\r\n </lib-api-value-access-rules>\r\n }\r\n <mat-hint>\r\n Click a field to define how to process its value. You can filter a list, count its items, or access specific\r\n data within a complex object.\r\n </mat-hint>\r\n </mat-form-field>\r\n}\r\n", styles: [".lib-vec{display:flex;flex-direction:column;gap:.625rem}.lib-vec__head{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem}.lib-vec__heading{display:flex;flex-direction:column;gap:.125rem;min-width:0}.lib-vec__f-label{font-size:.625rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--lib-forms-on-surface-variant)}.lib-vec__sub-hint{margin:0;font-size:.75rem;line-height:1.4;color:var(--lib-forms-on-surface-variant)}.lib-vec__sub-hint--lead{display:flex;align-items:center;gap:.375rem;padding:.4375rem .625rem;background:var(--lib-forms-surface-container-lowest);border:1px dashed var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-sm, 8px)}.lib-vec__lead-icon{flex:none;font-size:1rem;width:1rem;height:1rem;color:var(--sem-info, var(--lib-forms-primary))}.lib-vec__match{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.lib-vec__muted{font-size:.75rem;color:var(--lib-forms-on-surface-variant)}.lib-vec__seg{--mat-standard-button-toggle-height: 28px;height:28px}.lib-vec__connector{display:flex;justify-content:center;margin:-.1875rem 0}.lib-vec__connector span{padding:.0625rem .5rem;font-size:.5625rem;font-weight:600;letter-spacing:.1em;color:var(--lib-forms-on-surface-variant);background:var(--lib-forms-surface-container-high);border-radius:var(--lib-forms-radius-pill, 999px)}.lib-vec__cond{display:flex;flex-direction:column;gap:.375rem;padding:.5rem .5rem .5625rem;background:var(--lib-forms-surface-container-lowest);border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-md, 12px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__cond:hover{border-color:var(--lib-forms-outline)}.lib-vec__cond--incomplete{border-color:var(--sem-warning, var(--lib-forms-outline-variant))}.lib-vec__cond-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:.375rem;min-width:0}.lib-vec__cond-row--ops{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto}.lib-vec__control{box-sizing:border-box;width:100%;min-width:0;height:2rem;padding:.3125rem .5rem;font-family:inherit;font-size:.8125rem;line-height:1.2;color:var(--lib-forms-on-surface);background:var(--lib-forms-surface-container-lowest);border:1px solid var(--lib-forms-outline-variant);border-radius:var(--lib-forms-radius-sm, 8px);transition:border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__control--field{font-weight:500}select.lib-vec__control{cursor:pointer}.lib-vec__control:hover{border-color:var(--lib-forms-outline)}.lib-vec__control:focus{outline:none;border-color:var(--lib-forms-primary);box-shadow:0 0 0 1px var(--lib-forms-primary)}.lib-vec__control--invalid:not(:focus){border-color:var(--sem-warning, var(--lib-forms-outline));background:var(--sem-warning-surface, var(--lib-forms-surface-container-lowest))}.lib-vec__icon-btn{display:inline-flex;align-items:center;justify-content:center;flex:none;width:1.875rem;height:1.875rem;padding:0;color:var(--lib-forms-on-surface-variant);background:transparent;border:1px solid transparent;border-radius:var(--lib-forms-radius-sm, 8px);cursor:pointer;transition:color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1)),border-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__icon-btn:hover{color:var(--lib-forms-primary);background:var(--lib-forms-primary-container)}.lib-vec__icon-btn--on{color:var(--lib-forms-primary);border-color:var(--lib-forms-primary)}.lib-vec__icon-btn mat-icon{font-size:1.0625rem;width:1.0625rem;height:1.0625rem}.lib-vec__link{display:inline-flex;align-items:center;gap:.25rem;height:1.75rem;padding:0 .5rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--lib-forms-primary);background:transparent;border:0;border-radius:var(--lib-forms-radius-sm, 8px);cursor:pointer;transition:background-color var(--lib-forms-duration-hover, .3s) var(--lib-forms-easing, cubic-bezier(.16, 1, .3, 1))}.lib-vec__head .lib-vec__link{flex:none}.lib-vec__link:hover:not(:disabled){background:var(--lib-forms-primary-container)}.lib-vec__link:disabled{color:var(--lib-forms-on-surface-variant);cursor:default;opacity:.6}.lib-vec__link mat-icon{flex:none;font-size:1.0625rem;width:1.0625rem;height:1.0625rem}.lib-vec__foot{display:flex;align-items:center;justify-content:space-between;gap:.5rem}.lib-vec__valid{display:inline-flex;align-items:center;gap:.25rem;font-size:.6875rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--sem-success, var(--lib-forms-primary));cursor:default}.lib-vec__valid mat-icon{font-size:.9375rem;width:.9375rem;height:.9375rem}.lib-vec__mono{font-family:var(--lib-forms-font-mono, monospace)}:host ::ng-deep .mat-mdc-form-field-hint-wrapper{min-width:0}:host ::ng-deep .mat-mdc-form-field-hint{min-width:0;width:100%}.showSuggestionContainer{display:block;box-sizing:border-box;width:100%;max-width:100%;overflow:hidden}.suggestion-container{display:flex;flex-wrap:wrap;box-sizing:border-box;width:100%;gap:24px;max-height:220px;overflow-x:hidden;overflow-y:auto}.suggestion-column{flex:1 1 150px;min-width:0}.suggestion-heading{margin-bottom:12px;font-size:.625rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase;opacity:.7}.button-container{display:flex;flex-wrap:wrap;gap:4px}.suggestion-button{height:auto;min-width:0;max-width:100%;text-align:left;font-size:11px;line-height:normal;padding:4px 8px;border-radius:4px;overflow:hidden}.suggestion-button ::ng-deep .mdc-button__label{display:block;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatButtonToggleModule }, { kind: "directive", type: i3$5.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i3$5.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i4$3.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i4$3.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled", "readonly", "matChipInputDisabledInteractive"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: i4$3.MatChipOption, selector: "mat-basic-chip-option, [mat-basic-chip-option], mat-chip-option, [mat-chip-option]", inputs: ["selectable", "selected"], outputs: ["selectionChange"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i2$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i5.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: ApiValueAccessRulesComponent, selector: "lib-api-value-access-rules", inputs: ["disabled", "multipleBind", "errors", "value", "formInputs", "mapToData", "postmanCollectionConfig", "liveResponse", "showSync"], outputs: ["valueChanged", "reload"] }, { kind: "pipe", type: TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: SearchListPipe, name: "searchList" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
24163
25253
  }
24164
25254
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.12", ngImport: i0, type: ValidationExpressioCreatorComponent, decorators: [{
24165
25255
  type: Component,
@@ -24298,5 +25388,5 @@ const getSignatureImage = async (inputConfig, value, secret) => {
24298
25388
  * Generated bundle index. Do not edit.
24299
25389
  */
24300
25390
 
24301
- export { fuzzySearch as $, resolveDateRangeControlNames as A, BaseCustomInput as B, calculateListOveralFunctions as C, DaysAgoPipe as D, EmptyStateComponent as E, FormsStoreService as F, readDocumentIdentifier as G, DOCUMENT_REPOSITORY as H, DEFAULT_DOCUMENT_PAGE_SIZE as I, JsonEditorComponent as J, DEFAULT_DOCUMENT_SORT as K, DocumentPickerConfigurationError as L, MscoaFormInputComponent as M, NGX_T_FORMS_CONFIG_TOKEN as N, readDocumentPath as O, PREDICATE_OPERATORS as P, readDocumentId as Q, toDocumentReference as R, SignatureInputElementComponent as S, TDynamicDataEditComponent as T, UserFormStepperComponent as U, ValidationExpressioCreatorComponent as V, FormatDataPipe as W, readDocumentReferences as X, writeDocumentValue as Y, resolveIdentifierPath as Z, _isEqual as _, assignDeepPropertyToObject as a, returnMappedPathValue as a0, ACCOUNTING_BASIS as a1, getToolbarColor as a2, getToolbarBackground as a3, getToolbarIconColor as a4, FORM_ACTIONS_TOKEN as a5, FORM_CONFIG_TOKEN as a6, FORM_INPUTS_TOKEN as a7, FORM_ROUTE_SOURCE as a8, FORM_SLIDES_TOKEN as a9, provideNgxTForms as aA, returnDeepProperty as aB, sheetConsolodation as aC, textIconsForUserHints as aD, toSuggestionBatch as aE, validateExpressionSyntax as aF, validateObjectAgainstString as aG, withFormSuggestions as aH, withHttpPipeline as aI, withInputSecret as aJ, withRouterFormId as aK, formatData_pipe as aL, FORM_SUGGESTION_REGISTRY as aa, FormSuggestionRegistry as ab, FormSuggestionRegistryService as ac, FormTowerControllerService as ad, HttpPipelineRepository as ae, IMPORT_TOWER_INSTANCE_ID as af, INPUT_SECRET_TOKEN as ag, MSCOA_TREE_PROVIDER as ah, MULTIPLE_FORM_INPUT_TOKEN as ai, NgxTFormsComponent as aj, NgxTFormsService as ak, PIPELINE_REPOSITORY as al, PipelineRepository as am, PropertyAccessError as an, TFormImportController as ao, TSuggestionReviewComponent as ap, UTILS_OBJECT_TOKEN as aq, buildSuggestionSchema as ar, createFileFromBase64 as as, formGenerator as at, getPipedValueFromDataType as au, getSampleValueForInput as av, getSectionElements as aw, getUrl as ax, getValueFromValueAccessor as ay, initFormConfigToV2 as az, TDynamicDataViewComponent as b, TFormEngine as c, TourManagerService as d, getSubmissionStatusFn as e, evaluatePredicate as f, getAvatar as g, emptyCondition as h, deriveObservedInputs as i, TreeComponent as j, convertPostmanFolderItemsToTree as k, ErrorListComponent as l, NESTED_EDITOR_COMPONENT as m, safeReturnDeepProperty as n, DataTreeComponent as o, parseConditions as p, getInputErrorMessage as q, referencedTokens as r, serializeConditions as s, testAgainstItem as t, TFormInputStatusComponent as u, DialogTemplateComponent as v, FormBuilderComponent as w, FormsComponent as x, TFormInputComponent as y, getSignatureImage as z };
24302
- //# sourceMappingURL=ngx-t-forms-ngx-t-forms-tQEbZK_e.mjs.map
25391
+ export { calculateListOveralFunctions as $, ApiValueAccessRulesComponent as A, mergeHeaderOptions as B, PostmanCollectionLoaderService as C, DaysAgoPipe as D, EmptyStateComponent as E, FormsStoreService as F, TreeComponent as G, convertPostmanFolderItemsToTree as H, DataTreeComponent as I, JsonEditorComponent as J, DialogTemplateComponent as K, FormBuilderComponent as L, FormsComponent as M, NGX_T_FORMS_CONFIG_TOKEN as N, MscoaFormInputComponent as O, PREDICATE_OPERATORS as P, TFormInputComponent as Q, getSignatureImage as R, SignatureInputElementComponent as S, TDynamicDataEditComponent as T, UserFormStepperComponent as U, ValidationExpressioCreatorComponent as V, BaseCustomInput as W, getInputErrorMessage as X, TFormInputStatusComponent as Y, resolveDateRangeControlNames as Z, _isEqual as _, assignDeepPropertyToObject as a, readDocumentIdentifier as a0, DOCUMENT_REPOSITORY as a1, DEFAULT_DOCUMENT_PAGE_SIZE as a2, DEFAULT_DOCUMENT_SORT as a3, DocumentPickerConfigurationError as a4, readDocumentPath as a5, readDocumentId as a6, toDocumentReference as a7, FormatDataPipe as a8, readDocumentReferences as a9, PropertyAccessError as aA, TFormImportController as aB, TSuggestionReviewComponent as aC, UTILS_OBJECT_TOKEN as aD, buildSuggestionSchema as aE, createFileFromBase64 as aF, decrypt as aG, formGenerator as aH, generateSecretKey as aI, getPipedValueFromDataType as aJ, getSampleValueForInput as aK, getSectionElements as aL, getUrl as aM, getValueFromValueAccessor as aN, initFormConfigToV2 as aO, provideNgxTForms as aP, returnDeepProperty as aQ, sheetConsolodation as aR, textIconsForUserHints as aS, toSuggestionBatch as aT, validateExpressionSyntax as aU, validateObjectAgainstString as aV, withFormSuggestions as aW, withHttpPipeline as aX, withInputSecret as aY, withRouterFormId as aZ, formatData_pipe as a_, writeDocumentValue as aa, resolveIdentifierPath as ab, fuzzySearch as ac, returnMappedPathValue as ad, ACCOUNTING_BASIS as ae, getToolbarColor as af, getToolbarBackground as ag, getToolbarIconColor as ah, FORM_ACTIONS_TOKEN as ai, FORM_CONFIG_TOKEN as aj, FORM_INPUTS_TOKEN as ak, FORM_ROUTE_SOURCE as al, FORM_SLIDES_TOKEN as am, FORM_SUGGESTION_REGISTRY as an, FormSuggestionRegistry as ao, FormSuggestionRegistryService as ap, FormTowerControllerService as aq, HttpPipelineRepository as ar, IMPORT_TOWER_INSTANCE_ID as as, INPUT_SECRET_TOKEN as at, MSCOA_TREE_PROVIDER as au, MULTIPLE_FORM_INPUT_TOKEN as av, NgxTFormsComponent as aw, NgxTFormsService as ax, PIPELINE_REPOSITORY as ay, PipelineRepository as az, TDynamicDataViewComponent as b, TFormEngine as c, TourManagerService as d, getSubmissionStatusFn as e, evaluatePredicate as f, getAvatar as g, emptyCondition as h, deriveObservedInputs as i, NESTED_EDITOR_COMPONENT as j, safeReturnDeepProperty as k, ErrorListComponent as l, deriveDefaultPayloadTemplate as m, collectHeaderTemplateInputIds as n, collectQueryTemplateInputIds as o, parseConditions as p, collectTemplateInputIds as q, referencedTokens as r, serializeConditions as s, testAgainstItem as t, collectMinInputDepIds as u, resolveHeaderTemplate as v, resolveQueryTemplate as w, resolvePayloadTemplate as x, returnMappedData as y, mergeQueryOptions as z };
25392
+ //# sourceMappingURL=ngx-t-forms-ngx-t-forms-DqAcUfN4.mjs.map